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 / Output
Created December 30, 2011 13:28
How to use E_nl_dirac
n l s E
---------------------
1 0 1 -4861.19802312
2 0 1 -1257.39589026
2 1 1 -1089.61142092
2 1 -1 -1257.39589026
3 0 1 -539.09334179
3 1 1 -489.03708768
3 1 -1 -539.09334179
3 2 1 -476.26159516
root@prak:~# /etc/init.d/jenkins stop
* Stopping Jenkins Continuous Integration Server jenkins java: no process found
@certik
certik / t.py
Created January 2, 2012 19:36
Trajectory
from math import pi, sin, cos
from numpy import array, vstack
from numpy.linalg import norm
from pylab import plot, savefig
R = 10.
M = 1.
G = 1.
phi = 30 * 180. / pi
$ make html
rm -rf sphinx
mkdir -p src/.static
mkdir -p _build/html
mkdir -p _build/doctrees
mkdir -p src/modules
PYTHONPATH=..:/home/ondrej/repos/qsnake/local/lib/python sphinx-build -b html -d _build/doctrees -D latex_paper_size= src _build/html
Running Sphinx v1.1
loading pickled environment... not yet created
building [html]: targets for 149 source files that are out of date
@certik
certik / gist:1555850
Created January 3, 2012 17:11
Before
$ make html
rm -rf sphinx
mkdir -p src/.static
mkdir -p _build/html
mkdir -p _build/doctrees
mkdir -p src/modules
PYTHONPATH=..:/home/ondrej/repos/qsnake/local/lib/python sphinx-build -b html -d _build/doctrees -D latex_paper_size= src _build/html
Running Sphinx v1.1
loading pickled environment... not yet created
building [html]: targets for 149 source files that are out of date
module lapack
implicit none
interface
SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
INTEGER INFO, LDA, LDB, N, NRHS
INTEGER IPIV( * )
DOUBLE PRECISION A( LDA, * ), B( LDB, * )
$ tar xzf repsn.tar.gz
$ mkdir -p /home/ondrej/ext/pkg/
$ cp -r repsn /home/ondrej/ext/pkg/
$ gap -l '/home/ondrej/ext/;/usr/share/gap/'
gap> LoadPackage("repsn");
-------------------------------------------------------
Repsn for Constructing Representations of Finite Groups
Version 3.0.2
subroutine loadtxt(filename, d)
character(len=*), intent(in) :: filename
real(dp), allocatable, intent(out) :: d(:, :)
character :: c
integer :: s, ncol, nrow, ios, i
logical :: lastwhite
real(dp) :: r
open(newunit=s, file=filename, status="old")
@certik
certik / mandelbrot.f90
Created January 22, 2012 03:22
Mandelbrot with NumPy and Fortran
program Mandelbrot
use types, only: dp
use constants, only: I
use utils, only: savetxt, linspace, meshgrid
implicit none
integer, parameter :: ITERATIONS = 100
integer, parameter :: DENSITY = 1000
real(dp) :: x_min, x_max, y_min, y_max
real(dp), dimension(DENSITY, DENSITY) :: x, y
! Condensed modules with only the necessary functions
module types
implicit none
private
public dp
integer, parameter :: dp=kind(0.d0)
end module
module constants
use types, only: dp
implicit none