Skip to content

Instantly share code, notes, and snippets.

View certik's full-sized avatar

Ondřej Čertík certik

View GitHub Profile
@certik
certik / log.txt
Created May 7, 2011 17:35
Python build log
checking for --with-universal-archs... 32-bit
checking MACHDEP... darwin
checking EXTRAPLATDIR... $(PLATMACDIRS)
checking machine type as reported by uname -m... i386
checking for --without-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
@certik
certik / gist:960896
Created May 7, 2011 22:14
pylab stacktrace
(gdb) bt full
#0 0x00007fff82b045d6 in __kill ()
No symbol table info available.
#1 0x00007fff82ba4cd6 in abort ()
No symbol table info available.
#2 0x00000001002242d2 in uw_init_context_1 ()
No symbol table info available.
#3 0x00000001002248e8 in _Unwind_Resume ()
No symbol table info available.
#4 0x0000000101b48174 in FT2Font (this=0x101372990, facefile=<value temporarily unavailable, due to optimizations>) at ExtensionOldType.hxx:88
@certik
certik / gist:961121
Created May 8, 2011 04:59
python build failure
Installing /Users/ondrej/repos/qsnake/spkg/standard/python-dcc4938.spkg...
checking for --with-universal-archs... 32-bit
checking MACHDEP... darwin
checking EXTRAPLATDIR... $(PLATMACDIRS)
checking machine type as reported by uname -m... i386
checking for --without-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
sympy/physics/quantum/tests/test_spin.py[4] .... [OK]
sympy/physics/quantum/tests/test_state.py[7] ....... [OK]
sympy/physics/quantum/tests/test_tensorproduct.py[5] ..... [OK]
sympy/physics/tests/test_clebsch_gordan.py[5] ..... [OK]
sympy/physics/tests/test_hydrogen.py[4] .... [OK]
sympy/physics/tests/test_paulialgebra.py[1] . [OK]
sympy/physics/tests/test_physics_matrices.py[2] .. [OK]
sympy/physics/tests/test_qho_1d.py[4] .... [OK]
sympy/physics/tests/test_secondquant.py[49] ....................................
............. [OK]
ondrej@eagle:~$ qsnake --lab
Starting Web GUI: Open your web browser at http://localhost:8888/
Press CTRL+C to kill it
WARNING:root:404 GET /favicon.ico (127.0.0.1) 0.42ms
Starting the kernel at pid: 2691
XREP Channel on port 45759
PUB Channel on port 48341
REQ Channel on port 36245
Heartbeat REP Channel on port 43260
@certik
certik / gist:970062
Created May 13, 2011 06:01
git failure
Installing /Users/aaronmeurer/Documents/python/sympy/qsnake/spkg/standard/git-a5b0d30.spkg...
configure: Setting lib to 'lib' (the default)
configure: Will try -pthread then -lpthread to enable POSIX Threads.
configure: CHECKS for site configuration
configure: Setting CURLDIR to /Users/aaronmeurer/Documents/python/sympy/qsnake/local
configure: Setting ZLIB_PATH to /Users/aaronmeurer/Documents/python/sympy/qsnake/local
ENERGY:
-15499.926022189740 306.17966222179530
40753.256191100605 -704.08066992190288
9503.3561207066869 -488.23805665501277
-59988.921122606938 887.28949245950207
-414.62411179979330 10.408515958832254
-25646.858944789179 11.558944063213858
alternative
-15499.926022189740 306.17966222179530
-9503.3561207066869 488.23805665501277
@certik
certik / gist:982097
Created May 20, 2011 00:28
Residual
Norm of the fractional residual: 3.49130567920728843E-002
Norm of the fractional residual: 1.81418842112863812E-002
Norm of the fractional residual: 9.64152947856228466E-003
Norm of the fractional residual: 9.93397534519451300E-004
Norm of the fractional residual: 3.96285682032359427E-004
Norm of the fractional residual: 8.12591014452967861E-005
Norm of the fractional residual: 2.82603575948482406E-005
Norm of the fractional residual: 1.25077387605167016E-005
Norm of the fractional residual: 4.70332198770324208E-006
Norm of the fractional residual: 1.49111880215182178E-006
@certik
certik / gist:994243
Created May 26, 2011 22:25
Fortran epsilon test
program test
implicit none
integer, parameter :: dp = 8
real(dp) :: a, b
a = 1.0_dp
b = a + epsilon(1.0_dp)
print *, "First we show, that we have two different 'a' and 'b':"
print *, "a == b:", a == b, "b-a:", b-a
print *, "using (es22.15)"
print "(es22.15)", a
@certik
certik / gist:996210
Created May 27, 2011 21:24
sqrt(x) using Newton method
def sqrt(x):
eps = 1e-10
x = float(x)
r = x/2
residual = r**2 - x
while abs(residual) > eps:
r -= residual/(2*r)
residual = r**2 - x
return r