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/python | |
# take a master css file and inject @import css files into it. | |
import re, os, sys | |
bigcss = [] | |
path = sys.argv[1] | |
output = sys.argv[2] |
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 | |
# remove all svn:external references | |
# in a bunch of numbered directories | |
for i in {2..17} | |
do | |
echo $i | |
svn propdel svn:externals package.$i/build | |
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
#!/usr/bin/python | |
# read an svn parent page and export everything | |
import re | |
import urllib2 | |
from BeautifulSoup import BeautifulSoup | |
from subprocess import call | |
import os | |
subversion = 'http://subversion.tigris.org/' |
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 | |
# rsync pull from remote to local | |
rsync -azv --rsync-path=/usr/local/bin/rsync --delete --force jira@<some ip>:attachments/ /var/jira/jira-data/attachments/ |
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/python | |
# vim settings python | |
print "yes" | |
# vim: set et ts=4 sw=4 tw=72 nu: |
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 | |
# better grep if you use svn | |
# Copyright 2004 Ben Reser <[email protected]> | |
# Licensed under the terms subversion ships under or GPLv2. | |
# Useful for greping in a subversion working copy. | |
# Essentially it behaves the same way your grep command does (in fact it | |
# ultimately calls the grep command on your path) with a few exceptions. | |
# Ignores the subversion admin directories (.svn) and vi(m) backup files. |
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/python | |
# Ou bouffer a Paris | |
import urllib2 | |
import re | |
import time | |
import random | |
import sys | |
try: | |
import json |
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/python | |
# primes up to 10000 | |
# Steve Krenzel's code | |
r,e,a = range,enumerate,all | |
for i,x in e(i for i in r(4,10**4) if a(i%j!=0 for j in r(3,i))): | |
print x |
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/python | |
# smarts from Steve Krenzel | |
import sys, time | |
from random import randint | |
from math import sqrt, ceil, floor, log | |
MAX = 20000000 | |
def sieveOfErat(upperBound): |
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
""" Tarjan's algorithm and topological sorting implementation in Python | |
by Paul Harrison, Public domain, do with it as you will""" | |
def strongly_connected_components(graph): | |
""" Find the strongly connected components in a graph using | |
Tarjan's algorithm. | |
graph should be a dictionary mapping node names to | |
lists of successor nodes. | |
""" |
OlderNewer