Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| @@ -442,12 +443,14 @@ | |
| #set export filename | |
| } | |
| elsif ( $cmd eq 'exfilename' ) { | |
| - $sc->set_export_filename( $message->get_text ); | |
| + my $arg = defined $message->get ? $message->get_text : ""; | |
| + $sc->set_export_filename( $arg ); | |
| #set delay | |
| } |
| import sympy as sp | |
| from sympy.core.expr import Expr | |
| class TP(Expr): | |
| __slots__ = ['is_commutative'] | |
| def __new__(cls, l, r): | |
| l = sp.sympify(l) | |
| r = sp.sympify(r) | |
| obj = Expr.__new__(cls, l, r) |
| #define _USE_MATH_DEFINES | |
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #define eprintf(...) fprintf(stderr, __VA_ARGS__) | |
| #define forn(i, n) for (int i = 0; i < n; ++i) | |
| void timestamp(char const * const s, bool absolute = false); | |
| // </template> |
| { | |
| "shell_cmd": "g++ \"${file}\" -o \"${file_path}/${file_base_name}\"", | |
| "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
| "working_dir": "${file_path}", | |
| "selector": "source.c, source.c++", | |
| "variants": | |
| [ | |
| { |
| import os, hashlib | |
| data = [] | |
| for fname in sorted(os.listdir('.')): | |
| if os.path.isfile(fname): | |
| with open(fname, 'rb') as f: | |
| contents = f.read() | |
| data.append((fname, hashlib.sha1(contents).hexdigest())) |
| Downloading/unpacking mitmproxy | |
| Getting page https://pypi.python.org/simple/mitmproxy/ | |
| URLs to search for versions for mitmproxy: | |
| * https://pypi.python.org/simple/mitmproxy/ | |
| Analyzing links from page https://pypi.python.org/simple/mitmproxy/ | |
| Found link https://pypi.python.org/packages/py2/m/mitmproxy/mitmproxy-0.16-py2-none-any.whl#md5=19c9d32c64dbb0bacd4804d08cc3fce6 (from https://pypi.python.org/simple/mitmproxy/), version: 0.16 | |
| Found link https://pypi.python.org/packages/py2/m/mitmproxy/mitmproxy-0.17-py2-none-any.whl#md5=f2d1e4d9888fce2c15155d78478e5e50 (from https://pypi.python.org/simple/mitmproxy/), version: 0.17 | |
| Found link https://pypi.python.org/packages/source/m/mitmproxy/mitmproxy-0.10.1.tar.gz#md5=e166a2767e391c323b2d0b32013f0826 (from https://pypi.python.org/simple/mitmproxy/), version: 0.10.1 | |
| Found link https://pypi.python.org/packages/source/m/mitmproxy/mitmproxy-0.10.tar.gz#md5=6310a4f9752dce39314abe995cb25df6 (from https://pypi.python.org/simple/mitmproxy/), version: 0 |
| import pandas as pd | |
| import vobject | |
| def to_vcard(item): | |
| item = item.map(lambda s: s.strip()) | |
| c = vobject.vCard() | |
| c.add('n') | |
| if item['Additional Name']: |
| from sympy import symbols, expand, Matrix, solve_linear_system, Rational, N | |
| a, b, c = symbols('a b c') | |
| h = symbols('h') | |
| g1, g2, g3 = symbols('g1 g2 g3') | |
| f = lambda x: a + b * x + c * x**2 | |
| approx = g1 * f(-h/6) + g2 * f(0) + g3 * f(5 * h / 6) |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| import os | |
| import pandas as pd | |
| data_dir = 'data' | |
| expression_filename = 'Our_data_from_expression_console.for.scatterplot.txt' | |
| genes_dir = os.path.join('data', 'genes') | |
| output_dir = os.path.join('data', 'output') | |