This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- configure 2011-03-23 18:17:28.000000000 -0700 | |
+++ configure 2011-03-23 18:21:28.000000000 -0700 | |
@@ -2864,7 +2864,7 @@ | |
die "swig did not return version information" | |
fi | |
if [ `echo $_swig_version | cut -f 2 -d '.'` -ge 4 ] || \ | |
- [ `echo $_swig_version | cut -f 3 -d '.'` -ge 29 ] | |
+ [ `echo $_swig_version | cut -f 3 -d '.'` -ge 29 ] || [ `echo $_swig_version | cut -f 1 -d '.'` -ge 2 ] | |
then | |
echores "`${SWIG} -version 2>&1 | grep Version | cut -f 3 -d ' '`" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import sqrt | |
from joblib import Memory, Parallel, delayed | |
mem = Memory('tmp') | |
@mem.cache | |
def sqrt2(v): | |
return sqrt(v) | |
print Parallel(n_jobs=4, verbose=True)(delayed(sqrt2)(i**2) for i in range(10)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -x | |
# -- if a session 'burn' already exists, re-attach | |
tmux ls | grep '^burn:' && tmux attach -d -t burn && exit 0 | |
# -- otherwise create it | |
tmux new-session -d -s burn htop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 274adce935a2 nose/plugins/multiprocess.py | |
--- a/nose/plugins/multiprocess.py Thu Jul 14 11:01:35 2011 -0500 | |
+++ b/nose/plugins/multiprocess.py Thu Jul 14 21:21:21 2011 -0400 | |
@@ -33,9 +33,13 @@ | |
Controlling distribution | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
-There are two context-level variables that you can use to control this default | |
+There are three context-level variables that you can use to control this default | |
behavior. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# script formats bonnie output and calls gnuplot to create a png graph | |
# of various bonnie parameters. | |
# | |
# feed script bonnie++ output - it will attempt to find the last line of bonnie output | |
# which is all it really cares about anyway | |
# | |
# eg: Using uid:65534, gid:65534. | |
# Writing a byte at a time...done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/osm/linux/os_linux.c b/osm/linux/os_linux.c | |
index cf30c4b..0c6fe51 100644 | |
--- a/osm/linux/os_linux.c | |
+++ b/osm/linux/os_linux.c | |
@@ -260,7 +260,7 @@ void refresh_sd_flags(PVBUS_EXT vbus_ext) | |
struct block_device *bdev = bdget(MKDEV(major[i], minor)); | |
if (bdev && | |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) | |
- blkdev_get(bdev, FMODE_READ) | |
+ blkdev_get(bdev, FMODE_READ, NULL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example of a BaseEstimator implemented with Theano. | |
# This could use the GPU, except that | |
# a) linear regression isn't really worth it, and | |
# b) the multi_hinge_margin Op is only implemented for the CPU. | |
# | |
import numpy as np | |
try: | |
import theano | |
from theano import tensor | |
except ImportError: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cairo as C | |
from math import pi | |
width, height = 400, 250 | |
output = "circle.png" | |
surf = C.ImageSurface(C.FORMAT_RGB24,width,height) | |
ctx = C.Context(surf) | |
# fill everyting with white |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import numpy as np | |
from scikits.learn import linear_model | |
from dldata import hongmajaj # Hong & Majaj Neuronal Datasets module | |
# -- random number generator | |
rng = np.random.RandomState(42) | |
# -- dataset object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -- Toolkit | |
(cd /tmp && wget http://developer.download.nvidia.com/compute/cuda/4_1/rel/toolkit/cudatoolkit_4.1.28_linux_64_ubuntu11.04.run) | |
(cd /tmp && sh cudatoolkit_4.1.28_linux_64_ubuntu11.04.run --noexec --target ./cudatoolkit) | |
(cd /tmp/cudatoolkit && ./install-linux.pl auto) | |
# -- SDK | |
(cd /tmp && wget http://developer.download.nvidia.com/compute/cuda/4_1/rel/sdk/gpucomputingsdk_4.1.28_linux.run) | |
(cd /tmp && sh gpucomputingsdk_4.1.28_linux.run --noexec --target ./cudasdk) | |
(cd /tmp/cudasdk && ./install-sdk-linux.pl --prefix=/usr/local/cuda/sdk --cudaprefix=/usr/local/cuda) |
OlderNewer