Skip to content

Instantly share code, notes, and snippets.

View lloyd's full-sized avatar

Lloyd Hilaiel lloyd

View GitHub Profile
all: foo
foo:
@echo "this is foo"
An array of actions to perform. Each action is
either a string (i.e. { actions: [ 'solarize' ] })
, or an object with a single property, where the
property name is the action to perform, and the
property value is the argument (i.e. { actions:
[{rotate: 90}] }. Supported actions include:
contrast -- adjust the image's contrast, accepts
an optional numeric argument between -10 and 10 |
crop -- select a subset of an image, accepts an
array of four floating point numbers: x1,y1,x2,y2
#!/home/y/bin/ruby1.8
# constant
delim = [ 5 ].pack("c")
# how often do we output
period = 60
def initStats
s = Hash.new
s[:start] = Time.now
<html>
<head>
<title>The Image Manipulation Performance Comparator</title>
<!-- site-specific styling code -->
<style type="text/css" media="screen">
#dropArea {
width: 200px;
height: 200px;
border: 1px dashed #999;
{"_id":"00f67c9ddb85fb7c0a16c2db6eab6687","_rev":"1-044b6aceccfb72c81a95ca9f74089081","type":"failure-info","fails":{"tests/layout/reftests/bugs/9458-basic-1.html":{"lastsuccess":null,"firstfailed":{"product":"Fennec","os":"Maemo","timestamp":"2009-11-19 15:47:40.932464","_rev":"1-bc6fe18e564b8ef57ce65c69a8dd8355","tinderboxID":"1258652821.1258666170.3186.gz","fail_count":250,"build":"20091119084738","type":"test-run","pass_count":3418,"_id":"4f1ebaa66e804b642920025ba87dc088","testtype":"reftest"}},"tests/layout/reftests/backgrounds/continuous-inline-5b.html":{"lastsuccess":null,"firstfailed":{"product":"Fennec","os":"Maemo","timestamp":"2009-11-19 15:47:40.932464","_rev":"1-bc6fe18e564b8ef57ce65c69a8dd8355","tinderboxID":"1258652821.1258666170.3186.gz","fail_count":250,"build":"20091119084738","type":"test-run","pass_count":3418,"_id":"4f1ebaa66e804b642920025ba87dc088","testtype":"reftest"}},"tests/layout/reftests/generated-content/dynamic-attr-01.html":{"lastsuccess":null,"firstfailed":{"product":"Fennec","
#!/usr/bin/env python
from datetime import datetime
import os, sys
import simplejson
import yajl
import json
small_doc_string = '{"type":"counting"}'
large_doc_string = open(os.path.join(os.path.dirname(__file__), 'large_doc.json'), 'r').read()
tyler's benchmark:
[lth@clover py-yajl]$ python compare.py
yajl serialize: 0.237 deserialize: 0.251 total: 0.488
cjson serialize: 0.375 deserialize: 0.145 total: 0.521
simplejson serialize: 0.927 deserialize: 0.830 total: 1.757
stdlib json serialize: 3.733 deserialize: 12.698 total: 16.431
mik's benchmark:
ParseTime: cjson 98.35441ms
ParseTime: yajl 139.10844ms
ParseTime: simplejson 195.61997ms
DumpTime: cjson 279.26731ms
DumpTime: yajl 155.00796ms
DumpTime: simplejson 192.82215ms
input:
object {
object {
string first;
string last;
} name;
integer [0,200];
} person;
{
:url => 'http://download.github.com/lloyd-yajl-b78dd79.tar.gz',
:md5 => '1432f587bd8e5e4788b60a243bc8f1e9',
:configure => lambda { |c|
btstr = c[:build_type].to_s.capitalize
cmakeGen = nil
# on windows we must specify a generator, we'll get that from the
# passed in configuration
cmakeGen = "-G \"#{c[:cmake_generator]}\"" if c[:cmake_generator]