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/python2 | |
"""Display the error message for an Oracle error either from the internet | |
or from the cache db, based on the error code ("the query") you get when | |
confronted with the error.""" | |
import sys, os, re, urllib2, urlparse, anydbm | |
from BeautifulSoup import BeautifulSoup | |
BASE_URL = "http://download.oracle.com/docs/cd/B19306_01/server.102/b14219/" | |
TOC_URL = BASE_URL + "toc.htm" |
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/perl | |
# $Id: safetynet,v 1.10 2001/01/19 17:42:02 syntec Exp $ | |
# Author : Evan Borgstrom ($Author: syntec $) at unixpimps.org | |
# Created : 2000/10/13 | |
# Purpose : Keep things running without complicated init scripts. | |
# Modified: $Date: 2001/01/19 17:42:02 $ | |
################################################################## |
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 sys | |
from quarrel import Quarrel | |
@Quarrel("multiply", int, int) | |
@Quarrel("multiply", int) | |
def multiply_int(a, b = 2): | |
print(a * b) | |
@Quarrel("greet", str) | |
def greet(name): |
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 | |
# An enhancement to the "python" executable that automatically launches you into the python debugger on error. | |
# | |
# Use it like you would the "python" executable, for example: | |
# $ trypy somefile.py | |
# or | |
# $ trypy somefile.py arg1 arg2 | |
# | |
# EXAMPLE: |
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
ruby -ryaml -rpp -e "pp YAML.load(STDIN)" < infile > outfile |
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 sys | |
import pprint | |
def displayhook_pprint(o): | |
"""Display hook powered by pprint. | |
https://www.python.org/dev/peps/pep-0217/ |
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
1) Read an image from file | |
2) Display an image that you read from file | |
3) Capture Video using your webcam and display the feed | |
4) Display back and white live stream from your webcam. | |
5) Have a slider to change brightness of the webcam live stream. Display. | |
6) Have a slider to change contrast of the webcam live stream. Display. | |
7) Capture a snapshot from your webcam. Then display difference between live video stream and this snapshot. (Background subtraction) | |
8) Display Canny edge image from your live webcam stream | |
9) Have a slider to change smoothness / sharpness of image from live webcam stream. | |
10) Display histogram of colors (RGB) from your live webcam stream |
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 | |
################# | |
# NOTE | |
# Now at https://github.com/jkominek/updatestars | |
################# | |
import requests | |
import json | |
import re |
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 cmd | |
import sys | |
import uuid | |
import pprint | |
import sqlite3 | |
def make_dicts(cursor, row): |
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
# Enable syntax-highlighting in less. | |
# Last tested on CentOS 6.3. | |
# | |
# First, add these two lines to ~/.bashrc | |
# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s" | |
# export LESS=" -R " | |
sudo yum -y install boost boost-devel ctags | |
wget http://springdale.math.ias.edu/data/puias/unsupported/6/x86_64/source-highlight-3.1.6-3.puias6.x86_64.rpm |
OlderNewer