summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfahim-oscad2016-05-23 14:26:44 +0530
committerfahim-oscad2016-05-23 14:26:44 +0530
commit0930372f4634e26cb50f660ddf3cf8d8b6101b4d (patch)
treedf160eed68c08c0c132e008d224c7cf58a3dd1eb
parent9774e308dc82314d953742c11847c880123bfa8f (diff)
downloadeSimWebApp-0930372f4634e26cb50f660ddf3cf8d8b6101b4d.tar.gz
eSimWebApp-0930372f4634e26cb50f660ddf3cf8d8b6101b4d.tar.bz2
eSimWebApp-0930372f4634e26cb50f660ddf3cf8d8b6101b4d.zip
Remove unwanted files And modified the github link and title
-rw-r--r--public/bootstrap-3.3.6-dist.zipbin286035 -> 0 bytes
-rw-r--r--views/Redundant/__init__.py0
-rw-r--r--views/Redundant/__main__.py72
-rw-r--r--views/Redundant/demo.html1
-rw-r--r--views/Redundant/download.php58
-rw-r--r--views/Redundant/image.php19
-rw-r--r--views/Redundant/netlist.txt14
-rw-r--r--views/Redundant/python code backup/__main__.py59
-rw-r--r--views/Redundant/python code backup/__main__1.py64
-rw-r--r--views/Redundant/python code backup/with matplotlib change.py64
-rw-r--r--views/Redundant/screenshorts/Screenshot from 2015-10-14 15_10_50.pngbin83775 -> 0 bytes
-rw-r--r--views/Redundant/screenshorts/Screenshot from 2015-10-14 15_11_03.pngbin87330 -> 0 bytes
-rw-r--r--views/Redundant/screenshorts/Screenshot from 2015-10-14 15_11_14.pngbin98539 -> 0 bytes
-rw-r--r--views/Redundant/screenshorts/Screenshot from 2015-10-14 15_11_44.pngbin116979 -> 0 bytes
-rw-r--r--views/schematic.html9
-rw-r--r--views/script.php3
-rw-r--r--views/simulation.php42
-rw-r--r--views/spice.php62
18 files changed, 2 insertions, 465 deletions
diff --git a/public/bootstrap-3.3.6-dist.zip b/public/bootstrap-3.3.6-dist.zip
deleted file mode 100644
index 1425549..0000000
--- a/public/bootstrap-3.3.6-dist.zip
+++ /dev/null
Binary files differ
diff --git a/views/Redundant/__init__.py b/views/Redundant/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/views/Redundant/__init__.py
+++ /dev/null
diff --git a/views/Redundant/__main__.py b/views/Redundant/__main__.py
deleted file mode 100644
index 0291884..0000000
--- a/views/Redundant/__main__.py
+++ /dev/null
@@ -1,72 +0,0 @@
-import os
-import sys
-import numpy as np
-
-import matplotlib
-# Force matplotlib to not use any Xwindows backend.
-matplotlib.use('Agg')
-
-import matplotlib.pyplot as plt
-
-def get_plot_files(file):
- open_file = open(os.path.realpath(file),'r')
- raw_data = open_file.read()
- array = raw_data.split('* ')
-
- array.pop(0)
- dict_data = {}
- parameters = []
- parsed_files = []
- dir1 = str(file)
-
-
- if not os.path.exists(dir1[:-4]):
- os.makedirs(dir1[:-4])
-
-
- for i in range(len(array)):
- dict_data[i] = array[i]
-
- sample = dict_data[i].split('\n')
- write_file = open(os.path.realpath(dir1[:-4])+'/parsed_%s.txt'%(i),'w')
-
- for j in sample[3:]:
- if j.startswith('Index'):
- items = j.split()
- parameters.append(items) if len(parameters) < i+1 else None
- continue
- if j.startswith('--') or '*' in j:
- continue
- else:
- write_file.write(j+'\n')
-
- parsed_files.append(os.path.realpath(dir1[:-4])+'/parsed_%s.txt'%(i))
- return parameters, parsed_files
-
-def loudew(file):
- parameters, parsed_files = get_plot_files(file)
-
- for plot_file, parameter in zip(parsed_files, parameters):
- data = np.loadtxt(plot_file, unpack=True, dtype=str)
- for i in range(2, len(data)):
-
- plt.plot([x.strip(',') for x in data[1]], [y.strip(',') for y in data[i]])
-
- try:
- plt.xlabel(parameter[1]), plt.ylabel(parameter[i])
- plt.title('%s vs %s'%(parameter[1], parameter[i]))
- plt.savefig(plot_file+str(i)+'.png'), plt.clf()
- except IndexError:
- plt.xlabel(parameter[1]), plt.ylabel('missing y label')
- plt.title('%s vs missing y label'%(parameter[1], ))
- plt.savefig(plot_file+str(i)+'.png'), plt.clf()
-
-
-def main():
-
- files = sys.argv[1:]
- for fi in files:
- loudew(fi)
-
-if __name__ == '__main__':
- main()
diff --git a/views/Redundant/demo.html b/views/Redundant/demo.html
deleted file mode 100644
index afa6675..0000000
--- a/views/Redundant/demo.html
+++ /dev/null
@@ -1 +0,0 @@
-<img src="/eSIM/dump/parsed_0.txt2.png"></img>
diff --git a/views/Redundant/download.php b/views/Redundant/download.php
deleted file mode 100644
index a0ecaf7..0000000
--- a/views/Redundant/download.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-
-if (isset ($_POST["netlist"]))
-{
- $netlistval = $_POST["netlist"]; // for ajax
- //$netlistval = "CONTENT"; // without ajax
- $myfile = fopen("netlist.txt", "w") or die("Unable to open file!");
- fwrite($myfile, $netlistval);
- fclose($myfile);
-
-/*
-
- //echo "file written";
-
-
-
- if ( $netlistval == null ) {
- echo "fail";
- // $response['status'] = 'error';
- // $response['message'] = 'This failed';
- } else if ( $netlistval != null )
-{ echo "success";
- // $response['status'] = 'success';
- // $response['message'] = 'This was successful';
-
-
- }
-
- // echo json_encode($response);
-
- */
-}
-else
-{
-
-
-
-/*-------------------------------------------------------------------------------------------------------------------------------------------------
-FILE DOWNLOAD CODE PHP
--------------------------------------------------------------------------------------------------------------------------------------------------*/
- header('Content-Type: application/octet-stream');
- header('Content-Disposition: attachment; filename='.basename('netlist.txt'));
- header('Expires: 0');
- header('Cache-Control: must-revalidate');
- header('Pragma: public');
- header('Content-Length: ' . filesize('netlist.txt'));
- readfile('/var/www/html/eSIM/netlist.txt');
- exit;
-
-
-}
-
-
-
-
-//echo "file download start";
-
-?>
diff --git a/views/Redundant/image.php b/views/Redundant/image.php
deleted file mode 100644
index 5ba14c5..0000000
--- a/views/Redundant/image.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-$my_img = imagecreate( 200, 80 );
-$background = imagecolorallocate( $my_img, 0, 0, 255 );
-$text_colour = imagecolorallocate( $my_img, 255, 255, 0 );
-$line_colour = imagecolorallocate( $my_img, 128, 255, 0 );
-imagestring( $my_img, 4, 30, 25, "thesitewizard.com", $text_colour );
-imagesetthickness ( $my_img, 5 );
-imageline( $my_img, 30, 45, 165, 45, $line_colour );
-
-header( "Content-type: image/png" );
-imagepng( $my_img );
-imagecolordeallocate( $line_color );
-imagecolordeallocate( $text_color );
-imagecolordeallocate( $background );
-imagedestroy( $my_img );
-?>
-
-
-
diff --git a/views/Redundant/netlist.txt b/views/Redundant/netlist.txt
deleted file mode 100644
index dbcff26..0000000
--- a/views/Redundant/netlist.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-*ngspice netlist by niel mishra*
-v1 1 0 sin(0 5 1khz)
-c1 2 0 1pf
-d1 1 3 diode
-r1 3 2 10
-
-.tran 1e-03 100e-03 1e-03
-
-.control
-run
-print allv > dumpv.txt
-print alli > dumpi.txt
-.endc
-.end
diff --git a/views/Redundant/python code backup/__main__.py b/views/Redundant/python code backup/__main__.py
deleted file mode 100644
index 05b21d9..0000000
--- a/views/Redundant/python code backup/__main__.py
+++ /dev/null
@@ -1,59 +0,0 @@
-import os
-import sys
-import numpy as np
-
-import matplotlib
-# Force matplotlib to not use any Xwindows backend.
-matplotlib.use('Agg')
-
-import matplotlib.pyplot as plt
-
-def get_plot_files(file):
- open_file = open(os.path.realpath(file),'r')
- raw_data = open_file.read()
- array = raw_data.split('* ')
-
- array.pop(0)
- dict_data = {}
- parameters = []
- parsed_files = []
- for i in range(len(array)):
- dict_data[i] = array[i]
-
- sample = dict_data[i].split('\n')
- write_file = open('parsed_%s.txt'%(i),'w')
-
- for j in sample[3:]:
- if j.startswith('Index'):
- items = j.split()
- parameters.append(items) if len(parameters) < i+1 else None
- continue
- if j.startswith('--'):
- continue
- else:
- write_file.write(j+'\n')
-
- parsed_files.append('parsed_%s.txt'%(i))
- return parameters, parsed_files
-
-def main():
-
- file = sys.argv[1]
- parameters, parsed_files = get_plot_files(file)
-
- for plot_file, parameter in zip(parsed_files, parameters):
- data = np.loadtxt(plot_file, unpack=True, dtype=str)
- for i in range(2, len(data)):
-
- plt.plot([x.strip(',') for x in data[1]], [y.strip(',') for y in data[i]])
- try:
- plt.xlabel(parameter[1]), plt.ylabel(parameter[i])
- plt.title('%s vs %s'%(parameter[1], parameter[i]))
- plt.savefig(plot_file+str(i)+'.png'), plt.clf()
- except IndexError:
- plt.xlabel(parameter[1]), plt.ylabel('missing y label')
- plt.title('%s vs missing y label'%(parameter[1], ))
- plt.savefig(plot_file+str(i)+'.png'), plt.clf()
-
-if __name__ == '__main__':
- main()
diff --git a/views/Redundant/python code backup/__main__1.py b/views/Redundant/python code backup/__main__1.py
deleted file mode 100644
index 134ccec..0000000
--- a/views/Redundant/python code backup/__main__1.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/python
-__name__ = '__main__'
-import os
-import sys
-import numpy as np
-
-import matplotlib
-# Force matplotlib to not use any Xwindows backend.
-matplotlib.use('Agg')
-
-import matplotlib.pyplot as plt
-
-
-def get_plot_files(file):
- open_file = open(os.path.realpath(file),'r')
- raw_data = open_file.read()
- array = raw_data.split('* ')
-
- array.pop(0)
- dict_data = {}
- parameters = []
- parsed_files = []
- for i in range(len(array)):
- dict_data[i] = array[i]
-
- sample = dict_data[i].split('\n')
-
- write_file = open('parsed_%s.txt'%(i),'w')
-
- for j in sample[3:]:
-
- if j.startswith('Index'):
- items = j.split()
- parameters.append(items) if len(parameters) < i+1 else None
- continue
- if j.startswith('--'): #or j.startswith('/home') or j.startswith('Transient') or j.startswith(' Transient'):
- continue
- else:
- write_file.write(j+'\n')
-
- parsed_files.append('parsed_%s.txt'%(i))
- return parameters, parsed_files
-
-
-
-
-def mai1n():
-
- file = sys.argv[1]
- parameters, parsed_files = get_plot_files(file)
-
- for plot_file in parsed_files:
-
- for item in parameters:
- data= np.loadtxt(plot_file, unpack= True, dtype= str)
-
- for i in range(2, len(data)):
- plt.figure(i-1), plt.plot(data[1], data[i])
- plt.xlabel(item[1]), plt.ylabel(item[i])
- #plt.title('%s => %s vs %s'%(plot_file,item[1], item[i]))
- plt.savefig(plot_file+str(i)+'.png')
-
-
-mai1n()
diff --git a/views/Redundant/python code backup/with matplotlib change.py b/views/Redundant/python code backup/with matplotlib change.py
deleted file mode 100644
index 134ccec..0000000
--- a/views/Redundant/python code backup/with matplotlib change.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/python
-__name__ = '__main__'
-import os
-import sys
-import numpy as np
-
-import matplotlib
-# Force matplotlib to not use any Xwindows backend.
-matplotlib.use('Agg')
-
-import matplotlib.pyplot as plt
-
-
-def get_plot_files(file):
- open_file = open(os.path.realpath(file),'r')
- raw_data = open_file.read()
- array = raw_data.split('* ')
-
- array.pop(0)
- dict_data = {}
- parameters = []
- parsed_files = []
- for i in range(len(array)):
- dict_data[i] = array[i]
-
- sample = dict_data[i].split('\n')
-
- write_file = open('parsed_%s.txt'%(i),'w')
-
- for j in sample[3:]:
-
- if j.startswith('Index'):
- items = j.split()
- parameters.append(items) if len(parameters) < i+1 else None
- continue
- if j.startswith('--'): #or j.startswith('/home') or j.startswith('Transient') or j.startswith(' Transient'):
- continue
- else:
- write_file.write(j+'\n')
-
- parsed_files.append('parsed_%s.txt'%(i))
- return parameters, parsed_files
-
-
-
-
-def mai1n():
-
- file = sys.argv[1]
- parameters, parsed_files = get_plot_files(file)
-
- for plot_file in parsed_files:
-
- for item in parameters:
- data= np.loadtxt(plot_file, unpack= True, dtype= str)
-
- for i in range(2, len(data)):
- plt.figure(i-1), plt.plot(data[1], data[i])
- plt.xlabel(item[1]), plt.ylabel(item[i])
- #plt.title('%s => %s vs %s'%(plot_file,item[1], item[i]))
- plt.savefig(plot_file+str(i)+'.png')
-
-
-mai1n()
diff --git a/views/Redundant/screenshorts/Screenshot from 2015-10-14 15_10_50.png b/views/Redundant/screenshorts/Screenshot from 2015-10-14 15_10_50.png
deleted file mode 100644
index 9b6ee9a..0000000
--- a/views/Redundant/screenshorts/Screenshot from 2015-10-14 15_10_50.png
+++ /dev/null
Binary files differ
diff --git a/views/Redundant/screenshorts/Screenshot from 2015-10-14 15_11_03.png b/views/Redundant/screenshorts/Screenshot from 2015-10-14 15_11_03.png
deleted file mode 100644
index 03d2d52..0000000
--- a/views/Redundant/screenshorts/Screenshot from 2015-10-14 15_11_03.png
+++ /dev/null
Binary files differ
diff --git a/views/Redundant/screenshorts/Screenshot from 2015-10-14 15_11_14.png b/views/Redundant/screenshorts/Screenshot from 2015-10-14 15_11_14.png
deleted file mode 100644
index 3c93db5..0000000
--- a/views/Redundant/screenshorts/Screenshot from 2015-10-14 15_11_14.png
+++ /dev/null
Binary files differ
diff --git a/views/Redundant/screenshorts/Screenshot from 2015-10-14 15_11_44.png b/views/Redundant/screenshorts/Screenshot from 2015-10-14 15_11_44.png
deleted file mode 100644
index b89db79..0000000
--- a/views/Redundant/screenshorts/Screenshot from 2015-10-14 15_11_44.png
+++ /dev/null
Binary files differ
diff --git a/views/schematic.html b/views/schematic.html
index 40e34b5..2f587f1 100644
--- a/views/schematic.html
+++ b/views/schematic.html
@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
-<title>eSIM</title>
+<title>eSim</title>
<link rel="shortcut icon" href="../icons/favicon.ico" />
<meta charset="UTF-8">
<link rel="stylesheet" href="style/schematic.css" type="text/css">
@@ -67,12 +67,7 @@ toolbar
<br>
<a href="http://esim.fossee.in/" target="_blank"><img src="icons/logo.png"/></a>
<br>
- <a href="https://github.com/FOSSEE/eSIM-webapp" target="_blank">Fossee</a>
- <br>
- <a href="https://github.com/nielmishra" target="_blank">Github</a>
-
-
-
+ <a href="https://github.com/FOSSEE/eSimWebApp" target="_blank">Fossee</a>
</div>
diff --git a/views/script.php b/views/script.php
deleted file mode 100644
index f18d5b7..0000000
--- a/views/script.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
- echo "You win";
- ?>
diff --git a/views/simulation.php b/views/simulation.php
deleted file mode 100644
index 2050970..0000000
--- a/views/simulation.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-if (isset ($_POST["netlist"]))
-{
- $netlistval1 = $_POST["netlist"]; // for ajax
- //$netlistval = "CONTENT"; // without ajax
- $myfile = fopen("netlist.txt", "w") or die("Unable to open file!");
- fwrite($myfile, $netlistval1);
- fclose($myfile);
-
-}
-
-else
-
-{
-
- $output=shell_exec('cd /var/www/html/eSIM/; ngspice /var/www/html/eSIM/netlist.txt 2>&1' );
- $output=shell_exec('cd /var/www/html/eSIM/;python /var/www/html/eSIM/__main__.py /var/www/html/eSIM/dumpv.txt /var/www/html/eSIM/dumpi.txt 2>&1' );
- // $output1=shell_exec('cd /var/www/html/eSIM/;python /var/www/html/eSIM/__main__.py /var/www/html/eSIM/dump1.txt 2>&1' );
-
- $imagepath = '/eSIM/dumpi/';
- $images = glob('/var/www/html/eSIM/dumpi/*.{jpeg,gif,png}', GLOB_BRACE);//glob($imagesDir . '*.{jpg,jpeg,png,gif}', GLOB_BRACE);
- foreach ($images as $value) {
- echo " <img src=".$imagepath.basename($value)."><br> ";
-
- }
-
- $imagepath = '/eSIM/dumpv/';
- $images1 = glob('/var/www/html/eSIM/dumpv/*.{jpeg,gif,png}', GLOB_BRACE);
- foreach ($images1 as $value) {
- echo " <img src=".$imagepath.basename($value)."><br> ";
-
- }
-
-//$images1 = glob('/var/www/html/eSIM/dump1*.{jpeg,gif,png}', GLOB_BRACE);
- // var_dump($images.'-----------'. $images1);die;
- //echo json_encode($images);
- echo "<pre>$output</pre>";
- }
-
-//}
-?>
diff --git a/views/spice.php b/views/spice.php
deleted file mode 100644
index de81b13..0000000
--- a/views/spice.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
- function tempfilesfx($path, $suffix){
- do
- {
- $file = $path."/".mt_rand().$suffix;
- }
- while(file_exists($file));
- return $file;
- }
-
- $cmd = file_get_contents('php://input');
- //scan for .control directives
- if(preg_match('/\.control/',$cmd)){
- echo "no control directives allowed";
- return;
- };
- $tempimage =tempfilesfx('/tmp',".ps");
- $tempout=tempfilesfx('/tmp',".txt");
- //get plot and tran
- $control=
- ".control\n".
- " set hcopydevtype=postscript\n".
- " set hcopypscolor=true\n".
- " set color0 = white ;background\n".
- " set color1 = black ;text and grid\n".
- " set color2 = rgb:f/0/0 ;vector0\n".
- " set color3 = rgb:0/f/0 ;vector1\n".
- " set color3 = rgb:0/0/f ;vector2\n".
- " op\n";
-
- preg_match('/\.tran.*\n/',$cmd,$tran);
- $tran=preg_replace('/^\./','',$tran);
- $cmd=preg_replace('/\.tran.*\n/','',$cmd);
- preg_match('/\.plot\s+[^\s]+\s+([^\n]+)/',$cmd,$plot);
- //$cmd=preg_replace('/\.plot.*\n/','',$cmd);
- $hardcopy=" hardcopy ".$tempimage." ".$plot[1]." \n";
- $control.=$tran[0];
- $control.=$hardcopy;
- $control.=".endc\n";
- $cmd.=$control;
- $cmd=escapeshellarg($cmd);
-// echo $cmd;
- exec("echo $cmd | /usr/bin/ngspice > $tempout");
-
- try{
- $image = new Imagick($tempimage);
- $image->setImageFormat("png");
- header('Content-type: text/plain');
- echo "data:image/png;base64,".base64_encode ( $image);
- }
- catch(Exception $e){
- header('Content-type: text/plain');
- echo file_get_contents($tempout);
- }
-
- #header('Content-length: '.strlen($output));
- unlink($tempimage);
- unlink($tempout);
-
-
-?>