This is the handout of a lecture on immortality that I gave at Hofstra University on March 5th, 2007
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 | |
""" Reference implementation of Quicksort on an integer array """ | |
__author__ = 'Michael Goerz' | |
import numpy as np | |
import numpy.random as nprnd | |
import random | |
import math |
This file contains hidden or 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 json | |
from html2text import html2text | |
import pinboard | |
import time | |
import sys | |
username = 'pinboardusername' | |
password = 'secret' |
This file contains hidden or 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 | |
""" Add/update Local-File field to BibDesk-organized BibTeX file """ | |
import sys | |
import base64 | |
import re | |
import shutil | |
from Foundation import * | |
key_pattern = re.compile(r'^(?P<indent>\s*)Bdsk-File-1 = \{(?P<key>.*)\}[,}]$') |
This file contains hidden or 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/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by git-commit with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, make this file executable. | |
# This is slightly modified from Andrew Morton's Perfect Patch. |
This file contains hidden or 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 | |
#PBS -N example | |
#PBS -j oe | |
#PBS -l nodes=1:ppn=1 | |
#PBS -l mem=1000m | |
#PBS -l walltime=16:00:00 | |
#PBS -l cput=16:00:00 | |
######PBS -l file=1g |
This file contains hidden or 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 | |
#PBS -N pbstest | |
#PBS -j oe | |
#PBS -l nodes=1:ppn=1 | |
#PBS -l walltime=00:00:10 | |
#PBS -l mem=10mb | |
#PBS -o pbstest.out | |
echo "####################################################" | |
echo "User: $PBS_O_LOGNAME" |
This file contains hidden or 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/perl -w | |
use strict; | |
my @devicelist = </dev/sdb?>; # order is important: first found device ist default | |
my %mountpaths = ( qr"/dev/sd??" => '/mnt' ); # default paths | |
my $UID = 'goerz'; # the user id the device is mounted as | |
my $GID = 'users'; # the group id the device is mounted as | |
my $FMASK = '000'; # the permissions of the mounted device (masked) | |
my $UMOUNT = '/home/goerz/bin/umountstick'; # the name of the script that should be written for umounting | |
my $TRFILE = '/home/goerz/.usbmounts'; # file used for tracking which devices are mounted |
This file contains hidden or 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/perl -w | |
use strict; | |
use threads; | |
# (c) 2007 Michael Goerz <[email protected]> | |
# usage: | |
# scan [pdffile] | |
# Prerequisites: | |
# iText (http://www.lowagie.com/iText/) |