Quantcast
Channel: Python
Browsing all 15 articles
Browse latest View live

An Example of Parallel Processing using Python's "multiprocessing" Module

Site Section:  Computing Keywords:  Python #! /usr/bin/env python import math import random import Queue import multiprocessing import time def normal_pdf(x, mean, sd): return ( (1.0 / math.sqrt(2 *...

View Article



Vim: Making those Arrow Keys Work With You (or Why the Anti-Arrow-Key...

Site Section:  Computing Keywords:  Python Vim Zen The Great Controversy A standard dictum amongst experienced Vim users is not to use the arrow keys to move around your document. This dictum is often...

View Article

The Python Standard Library Documentation in Vim Help File Format

Site Section:  Program and Scripts Keywords:  Python Vim The Python 2 and 3 standard library documentation can be installed as Vim help files through installation of the following: Python 2.x:...

View Article

Quick and Easy Debugging in Python

Site Section:  Computing Keywords:  Python Vim debugging pdb I am afraid that in practice I have always ended up going the simple "litter the code with print statements" route when debugging my...

View Article

Building Python 2.5 (and 2.4, and 2.6, and 2.7, and 3.2) on Snow Leopard

Site Section:  Computing Keywords:  Python The Problem No amount of autotools-fu could get either Python 2.4 or 2.5 satisfactory built for Mark Holder and myself on Snow Leopard. Setting a slew of...

View Article


An Idiosyncratic Analogical Overview of Some Programming Languages from an...

Site Section:  Computing Keywords:  Python R C++ C Java This article was originally posted at geodendron. R R is like a microwave oven. It is capable of handling a wide range of pre-packaged tasks,...

View Article

A Story of a Heisenbug Hunt

Site Section:  Computing Keywords:  Python C/C++ C++ C programming It is past 4 am, and the bug hunt is over. It was a weird one. One that I'll remember. It led me on a wild exhausting chase through...

View Article

Pure-Python Implementation of Fisher's Exact Test for a 2x2 Contingency Table

Site Section:  Program and Scripts Keywords:  Python statistics While Python comes with many "batteries included", many others are not. Luckily, thanks to generosity and hard work of various members...

View Article


PDF Page Extraction/Selection in Python Using PyPDF

Site Section:  Program and Scripts Keywords:  Python PDF The pyPDF package provides really nice facilities for PDF document manipulation. Here is a simple application script to extract a specified...

View Article


Molecular Sequence Generation with DendroPy

Site Section:  Computing Keywords:  Python DendroPy Seq-Gen The DendroPy Phylogenetic Computing Library includes native infrastructure for phylogenetic sequence simulation on DendroPy trees under the...

View Article

Using DendroPy Interoperability Modules to Download and Align GenBank...

Site Section:  Program and Scripts Keywords:  Python DendroPy phylogenetics bioinformatics The following example shows how easy it can be to use the three interoperability modules provided by the...

View Article

Building and Installing SciPy, NumPy and PyMC on OS X 10.7 Lion

Site Section:  Computing Keywords:  Python OS X SciPy Numpy PyMC SciPy and Numpy are great packages for scientific computing. Unfortunately, installation on Mac OS X 10.7 Lion is not a very smooth...

View Article

Image may be NSFW.
Clik here to view.

Native install of matplotlib and Basemap on OS X Lion

Site Section:  Computing Keywords:  Python matplotlib Numpy SciPy OS X Lion matplotlib I previously discussed how to install NumPy, SciPy, and PyMC. As noted in the comments, most folks may actually...

View Article


Execute Selected Lines of (Optionally) Marked Up Python Code in a Vim Buffer

Site Section:  Computing Keywords:  Python Vim VimScript There are a number of solutions for executing Python code in your active buffer in Vim. All of these expect the buffer lines to be...

View Article

Show current Python class and method name or function name in Vim

Site Section:  Computing Keywords:  Python Vim There are a number of Vim plugins to show the current Python class and method name or function name (e.g., this). However, they can be extremely "heavy"...

View Article

Browsing all 15 articles
Browse latest View live




Latest Images