Skip to content

Instantly share code, notes, and snippets.

Avatar

Ondřej Čertík certik

View GitHub Profile
View gist:17957
#!/usr/bin/python
#latex.py
"""
Convert GAsympy output to LaTeX format
"""
import re as regrep
import string,copy,sys,os,StringIO,subprocess,types
from pyparsing import nestedExpr
View gist:81583
import sys
def fails():
e = 1/0
from IPython.kernel import client
mec = client.MultiEngineClient()
mec.reset()
ids = mec.get_ids()
mec.push_function({"f": fails})
View gist:81584
import sys
def fails():
e = 1/0
from IPython.kernel import client
mec = client.MultiEngineClient()
mec.reset()
ids = mec.get_ids()
mec.push_function({"f": fails})
View gist:81586
import sys
from IPython.kernel import client
mec = client.MultiEngineClient()
mec.get_ids()
def fails():
e = 1/0
mec.push_function(dict(fails=fails))
try:
print mec.execute('fails()')
except:
View gist:81594
In [1]: from IPython.kernel import client
In [2]: mec = client.MultiEngineClient()
In [3]: mec.activate()
In [4]: px import socket
Parallel execution on engines: all
Out[4]:
<Results List>
View gist:81596
import sys
from IPython.kernel import client
mec = client.MultiEngineClient()
mec.get_ids()
mec.execute("import socket")
print mec.execute("print socket.__file__")
def fails():
e = 1/0
mec.push_function(dict(fails=fails))
try:
View gist:113178
diff --git a/cmake/FindJUDY.cmake b/cmake/FindJUDY.cmake
index 57b5560..e9786b2 100644
--- a/cmake/FindJUDY.cmake
+++ b/cmake/FindJUDY.cmake
@@ -2,8 +2,8 @@
# Judy
#
-FIND_PATH(JUDY_INCLUDE_DIR Judy.h ${JUDY_ROOT})
-FIND_LIBRARY(JUDY_LIBRARY Judy ${JUDY_ROOT})
View test.py
from numpy import zeros, dot, diag, tensordot
from numpy.random import random
n = 6
m = 4
b = random((n, m))
d = random((m, m))
bdb = zeros(n, 'd')
for i in xrange(n):
bdb[i] = dot(b[i,:], dot(d, b[i, :]))
View gist:611924
from sympy import Symbol, integrate
print "Start"
x1 = Symbol('x1')
x2 = Symbol('x2')
x3 = Symbol('x3')
x4 = Symbol('x4')
x5 = Symbol('x5')
x6 = Symbol('x6')
x7 = Symbol('x7')
x8 = Symbol('x8')
View gist:643837
ondrej@raven:~/repos/sympy(smichr-2003)$ ./setup.py test
running test
============================= test process starts ==============================
executable: /usr/bin/python (2.6.5-final-0)
sympy/assumptions/tests/test_assumptions_2.py[7] ......f [OK]
sympy/assumptions/tests/test_query.py[37] ..ff.................................
[OK]
sympy/assumptions/tests/test_refine.py[3] ... [OK]
sympy/concrete/tests/test_gosper.py[2] .. [OK]