Skip to content

Instantly share code, notes, and snippets.

# -*- python -*-
# ex: set syntax=python:
# This is a sample buildmaster config file. It must be installed as
# 'master.cfg' in your buildmaster's base directory (although the filename
# can be changed with the --basedir option to 'mktap buildbot master').
# It has one job: define a dictionary named BuildmasterConfig. This
# dictionary has a variety of keys to control different aspects of the
# buildmaster. They are documented in docs/config.xhtml .
From 54592cf1c231ade58339a70b6bc37dd58f0fed5f Mon Sep 17 00:00:00 2001
From: arlolra <arlolra@gmail.com>
Date: Mon, 22 Mar 2010 21:47:04 -0400
Subject: [PATCH] Migrates benchmarks to the new api.
---
benchmark/process_loop.js | 7 ++++---
benchmark/run.js | 7 ++++---
benchmark/static_http_server.js | 4 ++--
3 files changed, 10 insertions(+), 8 deletions(-)
// a lot of this from http://github.com/davglass/nodejs-yui3/blob/master/lib/node-yui3.js#L36-77
global.importScripts = function () {
var fs = require('fs'),
http = require('http'),
url = require('url');
//Script = process.binding('evals').Script,
var arglen = arguments.length;
if (arglen === 0) return;
@arlolra
arlolra / for marco
Created November 4, 2010 01:45
basic.blog tag view
def tag_detail(request, slug, template_name = 'blog/tag_detail.html', **kwargs):
"""
Tag detail
Template: ``blog/tag_detail.html``
Context:
object_list
List of posts specific to the given tag.
tag
Given tag.
@arlolra
arlolra / mike.py
Created December 9, 2010 22:31
square with hole
#!/usr/bin/python
# square with hole
# for mike
import math
def user_inputs():
large = int(input('Enter an integer: '))
small = int(input('Now enter a smaller integer: '))
if large > small:
return [small, large]
@arlolra
arlolra / mike2.py
Created December 10, 2010 02:42
is prime?
#!/usr/bin/python
# is it prime?
# for mike
number = int(input("Enter an integer: "))
is_prime = True
for x in range(2, number):
if (number % x) == 0:
is_prime = False
localhost:Formula arlolra$ brew install hiredis
==> Downloading https://github.com/antirez/hiredis/tarball/v0.9.2
File already downloaded and cached to /Users/arlolra/Library/Caches/Homebrew
==> make PREFIX=/usr/local/Cellar/hiredis/0.9.2
/usr/bin/cc -c -O3 -march=prescott -mfpmath=sse -w -pipe -arch i386 -arch x86_64 -g -ggdb net.c
/usr/bin/cc -c -O3 -march=prescott -mfpmath=sse -w -pipe -arch i386 -arch x86_64 -g -ggdb hiredis.c
net.c:1: error: CPU you selected does not support x86-64 instruction set
net.c:1: error: CPU you selected does not support x86-64 instruction set
lipo: can't open input file: /var/folders/8y/8yy3JdcHHdS8xy+JFV+XL++++TI/-Tmp-//cc78zeRv.out (No such file or directory)
make: *** [net.o] Error 1
/* css */
body, html { height: 100%; margin: 0; }
div, h1 { margin: 0; }
#content {
height: 400px;
background: red;
position: absolute;
top: 50%;
#!/usr/bin/env python
# opzi problem 1
# http://opzi.posterous.com/puzzle-1-youre-invited
divisors = {}
def find_divs(x):
if x not in divisors:
sub_divs= []
max = x/2 + 1
// opzi problem 2
// http://opzi.posterous.com/challenge-2
var count = 0,
SET_A = ['01001100','01101000','01010000','01010011','01001001','01000011','01101000','01101001','01110110','01101001','01110000','01101100','01100010','01000111','01101000','01111010','01100101','01111001','01101101','01100001'],
SET_B = ['10010001','01011110','01100101','10011010','10000010','11110000','11010000','00101101','11111000','11010110','11100000','00011011','01101110','11110000','01101100','01101010','11001010','11001011','01101110','01110010'];
SET_A.forEach(function (s) {
var str = s.split(''),
ls = str.length;