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 pygame | |
y = 0 | |
dir = 1 | |
running = 1 | |
width = 800 | |
height = 600 | |
screen = pygame.display.set_mode((width, height)) |
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 -u | |
DIR=$1 | |
shift | |
OMERO_GIT=${OMERO_URL:-git://github.com/joshmoore/homebrew.git} | |
OMERO_URL=${OMERO_URL:-https://github.com/joshmoore/homebrew/tarball/omero} |
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
ls -l $file | awk '{ print $1 }' | colrm 1 1 | sed -e 's/@$//' | sed -e 's/--x/1/g' -e 's/-w-/2/g' -e 's/-wx/3/g' -e 's/r--/4/g' -e 's/r-x/5/g' -e 's/rw-/6/g' -e 's/rwx/7/g' -e 's/---/0/g' |
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
<html> | |
<head> | |
<title>Line Chart Test</title> | |
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="excanvas.js"></script><![endif]--> | |
<script language="javascript" type="text/javascript" src="jquery.min.js"></script> | |
<script language="javascript" type="text/javascript" src="jquery.jqplot.min.js"></script> | |
<script language="javascript" type="text/javascript" src="plugins/jqplot.barRenderer.min.js"></script> | |
<script language="javascript" type="text/javascript" src="plugins/jqplot.dateAxisRenderer.min.js"></script> | |
<script language="javascript" type="text/javascript" src="plugins/jqplot.canvasTextRenderer.min.js"></script> |
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 | |
OriginalFileName="TypeA" | |
RAWFILE="/tmp/$(basename $0).$$.raw.tmp" | |
PREPFILE="/tmp/$(basename $0).$$.prep.tmp" | |
LOGFILE="$(basename $0).$$.log" | |
# Retrieve data | |
omero hql -q --limit=1000 "select name, id from OriginalFile where name = '$OriginalFileName'" > $RAWFILE |
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 | |
from string import maketrans | |
rot13trans = maketrans('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm') | |
def rot13(text): | |
return text.translate(rot13trans) | |
def main(): |
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 xml.sax.saxutils import XMLGenerator | |
from xml.sax.xmlreader import AttributesNSImpl | |
import hashlib | |
class SchemaGen: | |
def __init__(self, output, encoding, projectID, initial_prochi): | |
""" | |
""" | |
anonschema = XMLGenerator(output, encoding) |
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
class Bimap(dict): | |
# def alias(self,obj): | |
def lkey(self, obj): | |
return self[obj] | |
def rkey(self, obj): | |
for key,val in self.iteritems(): | |
if val is obj: |
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 Tkinter import * | |
root = Tk() | |
w = Label(root, text="Hello World") | |
w.pack() | |
root.mainloop() |
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
var http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
}).listen(8124, "127.0.0.1"); | |
console.log('Server running at http://127.0.0.1:8124/'); |