Skip to content

Instantly share code, notes, and snippets.

found 16 partitions
partition 0
message set size of 161
offset 112357631, message size of 84
key size of -1
val size of 70
found 64 bytes of data
[[1085, 5514843, 4914, 1393542960.0, 0, None], [1085, 5514843, 4914, 1393542970.0, 10, None], [1085, 5514843, 4914, 1393542980.0, 20, None], [1085, 5514843, 4914, 1393542990.0, 30, None], [1085, 5514843, 4914, 1393543000.0, 40, None], [1085, 5514843, 4914, 1393543010.0, 50, None]]
partition 5
message set size of 161
@clofresh
clofresh / PKGBUILD
Created May 22, 2015 02:14
iguana-ir
# Original PKGBUILD came from https://github.com/terazini/abs-htpc/iguana-ir
# Maintainer: Sterling Lombard <kb7jtz at arrl dot net>
# Contributor: Atanas Kunev <atanas dot kunev at gmail dot com>
pkgname=iguana-ir
pkgver=1.1.0
pkgrel=3
pkgdesc="IguanaWorks USB IR Transceiver driver, client and reflasher"
arch=('i686' 'x86_64')
@clofresh
clofresh / caching_proxy.lua
Created November 8, 2008 21:09
Memcache caching layer for Mysql Proxy
require('luarocks.require')
require('md5')
require('Memcached')
local memcache = Memcached.Connect()
cache_hits = 0
cache_misses = 0
function is_query(packet)
return packet:byte() == proxy.COM_QUERY
class Lazy(type):
def __init__(cls, name, bases, dict):
super(Lazy, cls).__init__(name, bases, dict)
cls.instance = None
def check_instance(cls):
if cls.instance is None:
if hasattr(cls, 'instantiate'):
setattr(cls, 'instance', getattr(cls, 'instantiate')())
else:
def get_db():
db = getattr(get_db, 'db', db_connection())
get_db.db = db
return db
def func1():
db = get_db()
db.execute('SELECT * FROM things')
def func2():
import Image
from numpy import average, linalg, dot
import sys
images = sys.argv[1:3]
vectors = []
norms = []
for image in images:
vector = []
source :idx,
{
:file => 'listings.txt',
:parser => :delimited,
:skip_lines => 1
},
[
:listing_id,
:area,
:baths_full,
Header "%% Erliki".
Nonterminals phrase wikilink word.
Terminals string '[[' ']]' '<' '>'.
Rootsymbol phrase.
phrase -> word : '$1'.
phrase -> word phrase : ['$1', '$2'].
wikilink -> '[[' string ']]' : {'wikilink', '$2'}.
word -> wikilink : '$1'.
word -> string : '$1'.
#!/bin/bash
HOST=127.0.0.1
PORT=1978
SID=1
UPDATE_LOG_DIR=ulog/$SID
MASTER_HOST=127.0.0.1
MASTER_PORT=1979
mkdir -p $UPDATE_LOG_DIR
$clock.bpm = 80
$mutation = L{|measure| true}
$measures = 4
def note(midi_note_number)
Note.create(:channel => 2,
:number => midi_note_number,
:duration => 1,
:velocity => 100 + rand(27))