Skip to content

Instantly share code, notes, and snippets.

View certik's full-sized avatar

Ondřej Čertík certik

View GitHub Profile
#!/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
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})
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})
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:
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>
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:
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})
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, :]))
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')
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]