→ Back to programming languages
Meetings:→ SciPy2006, SciPy2007, SciPy2008
Columns:
Language:→ extracting source-embedded comments → Python idioms and efficiency
Interaction:→ IPython
Science:→ Software Carpentry (excellent!) → scientific tools with Python → using weave to inline C++ code in Python
Graphics: |
python
(/progtricks)
2008-09-16, 11:35
[edit]
→ Back to Python, conferences
Tutorials
Day 1
Day 2 |
scipy2008
(/progtricks)
2008-09-16, 11:34
[edit]
→ Back to Python, conferences
General→ Useful scientific Python computing resources → Schrodinger evolution simulation by Nagel/Perez (from scipy.org cookbook) → Installing numpy and scipy: in recent versions, edit site.cfg (in dist directories) for location of blas, lapack, fftw… OS X (with devtools) has accelerated blas and lapack (note a BLAS Altivec bug in OS X 10.4). Note that numpy release 1.0.3 breaks scipy build (it may be enough to link scipy/scipy to scipy/Lib). → New traits and ets repository; uses EasyInstall, very nice installation engine → Considered the NVIDA G8800 GTX as a platform for CUDA → Mac: building universal libraries → Notebook progress in ipython?
Tutorials→ Idiomatic Python (see also Goodger) → Wrapping tutorial: slides, Graph.i, all materials
Day 1→ Lots about the One Laptop per Child project; talked to Ivan Krstic about hypercard-like educational stacks wtih scientific data and its analysis. Perhaps SAGE?
Day 2 |
scipy2007
(/progtricks)
2007-08-17, 15:05
[edit]
The standard installation procedure for packages built with distutils is Python eggs are a nice innovation that can simplify installs involving C extensions. After installing easy_install and setting up a ~/.pydistutils.cfg specifying something like [install] install_lib = ~/lib/python2.4/site-packages install_scripts = ~/bin you simply need to run easy_install on the egg (or the tar.gz, or the package name… the tool is a veritable Swiss army knife). By the way, a good install_lib location on OS X is ~/Library/Python/$py_version_short/site-packages, since Python will then recognize .pth files (which does not happen elsewhere)… Note that the location specified in ~/.pydistutils.cfg may override other install locations given as --prefix parameters to setup.py. You're warned! |
pythoninstall
(/progtricks)
2007-05-24, 15:19
[edit]
Under default preferences, svn will not edit timestamps in newly added archive files. To allow that, use something like svn propset svn:keywords Id,Date,Author,Revision lisasim/lisasim-retard.cpp |
svnkey
(/progtricks)
2006-11-06, 08:26
[edit]
→ Back to Programming Tricks home
Unix:→ redirecting stderr to stdout → setting environment variables → locating unresolved linking dependencies → removing files by inode number
Other:
Numerics:→ high-precision floating-point arithmetic
Philosophy: |
genericprog
(/progtricks)
2006-11-06, 08:24
[edit]
→ Back to Programming Tricks home
C/C++:→ printing out filename and location in error messages → extracting source-embedded comments
Java/Processing:→ creating a standalone application
LaTeX:→ A survey of free math fonts. → Hey, it works! (on TugBoat) → Creating sparklines in LaTeX
Mathematica:
MATLAB:→ Mathworks programming contest → A figure command that does not raise plot windows
Python: |
languageprog
(/progtricks)
2006-09-22, 15:48
[edit]
→ Back to Python
General
Day 1: tutorials→ Travis Oliphant, NumPy tutorial (NumPy website) → Fernando Perez, IPython tutorial (IPython website)
Day 2, morning→ Guido Van Rossum, keynote (Python 3000 PEP) → Travis Oliphant, state of Numpy → Fernando Perez, doing science with Python → Michael Aivazis, Pyre
Day 2, afternoon→ Eric Jones, Enthought Tool Suite → Christopher Mueller, Synthetic programming → Prabhu Ramachandran, MayaVi → Andrew Straw, realtime computing → William Stein, SAGE (uses very cool jsmath for TeX display) → Greg Wilson, software carpentry (look at Trac and DrProject, check recommended reading at his homepage)
Day 3, morning→ Benjamin Eitzen, GpuPy → … → Bill Spotz, parallel PDE solvers in Python |
scipy2006
(/progtricks)
2006-08-18, 12:40
[edit]
→ Back to the wiki root
Sections:→ Generic → Languages (direct link to Python) → Tools → See all tricks → See also programming on OS X |
home
(/progtricks)
2006-08-17, 18:09
[edit]
Get the inode number using ls -il and then remove using the incantation
find . -inum [inode # here] -exec rm -i {} \;
|
rminode
(/progtricks)
2006-03-29, 16:45
[edit]
→ Back to Programming Tricks home
Emacs:
Graphics:→ Tioga
Literate Programming:→ Amrita
Presentations:→ Wink → CSS-based presentations: S5 → LaTeX-based presentations: Prosper, Seminar, PdfScreen, PPower4, Tutorial |
tools
(/progtricks)
2006-03-04, 12:10
[edit]
PyX 0.8.1 chokes on the stock psfonts.map installed by i-Installer on OS X Tiger (the TeX itself is TeXLive 2006 or something similar). A simple solution is to set fontmaps = psfonts.cmz in /etc/pyxrc. This seems to give PyX all the fonts it needs. |
pyxfonts
(/progtricks)
2006-02-24, 13:32
[edit]
→ MPI: PyMPI (not actively maintained, difficult to install), Pypar (poorly maintained?), Scientific.MPI (confusing doc!), MMPI (new, seems simple), myMPI (also new, seems good approach) |
parallelpython
(/progtricks)
2006-02-01, 12:13
[edit]
#!/bin/bash
T1="foo"
T2="bar"
if [ "$T1" = "$T2" ]; then
echo expression evaluated as true
else
echo expression evaluated as false
fi
|
bashif
(/progtricks)
2006-01-03, 15:35
[edit]
In C mode, add the line (setq c-basic-offset 4)
to your .emacs file. In Python, it is |
emacs-tabs
(/progtricks)
2005-11-02, 10:47
[edit]
→ In sh/bash:
→ In csh/tcsh: For some reason I always seem to forget this. |
stdout
(/progtricks)
2005-07-28, 08:08
[edit]
Using Proce55ing (v. greater than 91) and OS X /Developer/Applications/Java Tools/Java Bundler, it's easy to create a standalone OS X application from a Proce55ing applet. Among other things, this allows use of the very fast OpenGL graphics routines. Just "Export" the applet under Proce55ing; if you're using any external files (such as fonts), copy them back to the Applet directory, since Proce55ing does not do this by itself (in fact, it repeatedly deletes the files that you put in). Then open the Jar Bundler, select your main class from the jar file, and under "Classpath and Files", add all additional files and libraries that appear in the Proce55ing-created applet directory. (If you have OpenGL libraries, you should need only those that end in .jnilib; the .so files should be linux, and the .dll files should be Windows. But don't quote me on this. Under "Properties", check "Set Working Directory to Inside Application Package". Don't forget to select a catchy icon under "Build Information" (this is the "running" icon; you'll need to change the "file" icon for the application bundle in the Finder). A compressed disk image (dmg) can be made with Disk Utility by first creating an image large enough to contain the bundle as it is, and then converting to a read-only compressed image. |
processing-standalone
(/progtricks)
2005-06-18, 14:49
[edit]
I use Mathematica and Adobe Illustrator to create the EPS figures in my papers, but the resulting EPS files often end up enormous. A quick, and usually harmless way to slim them down is to filter them through Ghostscript. I use this script.
Also, when I have multiple versions of a figure, I usually need to find out which version is being used in the current LaTeX file. This script will do that. For good measure, this other script will also find out which other TeX files are being |
latexeps
(/progtricks)
2005-04-29, 13:03
[edit]
Can be a powerful tool. To look into. |
decorators
(/progtricks)
2005-04-13, 13:14
[edit]
From macosxhints: "The following example piece of Matlab code makes Matlab convert a figure to PDF and display it in TeXShop, which auto-refreshes the PDF (unlike Preview):"
figure(1);
set(gcf, 'Visible', 'off');
plot(x, y);
print(gcf, '-dpdf', 'figure1.pdf');
system('open -a Texshop figure1.pdf');
|
matlabpreview
(/progtricks)
2005-04-09, 14:04
[edit]