This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for n in $*; do | |
q=${n}; | |
#q=${n%.png}; | |
mogrify -gravity southeast -density 300 -font Arial -pointsize 12 -annotate 0 ${q} $n | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf -*- | |
S = "-"*70 + u"█" + "-"*80 | |
for x in range(100): | |
print S | |
Q = "-" | |
for l in range(1, len(S)-1): | |
a, b, c = S[l-1]==u"█", S[l]==u"█", S[l+1]==u"█" | |
if (a and not b and not c) or (not a and b and not c) or (not a and not b and c) or (not a and b and c): | |
Q = Q+u"█" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
fn_bash() { for x in "$@"; do echo $x; done; } | |
echo '#!/usr/bin/env python' > printer.py | |
echo 'import sys ' >> printer.py | |
echo 'for a in sys.argv: print a' >> printer.py | |
chmod +x printer.py | |
fn() { ./printer.py "$@" ; } | |
echo 'Example 1 supplies the arguments at the line of function call and prints 3 lines, as we need' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
## Import common moduli | |
import matplotlib, sys, os, time | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from scipy.constants import c, h, hbar, pi, k, e | |
import scipy.integrate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
## . S C SM | |
## F1 PREAMB Import UseLatex StartFig | |
## F2 GET Load1D Gen1D Get2D | |
## F3 | |
## F4 | |
## F5 PLOT Plot1D Contours | |
## F6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding:utf8 | |
import numpy as np | |
import scipy.linalg as la | |
size = 3 | |
A = np.random.random([size, size]) | |
print "\n== Random square matrix can be subject to virtually any function ==" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
#-*- coding: utf-8 -*- | |
import os,sys | |
import numpy as np | |
try: from enthought.mayavi import mlab | |
except: from mayavi import mlab | |
mlab.options.offscreen = True ## XXX | |
def symmetric_colors(lut_manager): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
## Import common moduli | |
import matplotlib, sys, os, time, re | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from scipy.constants import c, hbar, pi | |
matplotlib.rc('text', usetex=True) | |
matplotlib.rc('font', size=10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
## Import common moduli | |
import matplotlib, sys, os, time | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from scipy.constants import c, hbar, pi | |
## Use LaTeX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
## Import common moduli | |
from __future__ import division | |
import matplotlib, sys, os, time | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from scipy.constants import c, hbar, pi |