This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
import numpy as np | |
def insert_bit(array, index): | |
inner = (index % 64) | |
index //= 64 | |
array[index] |= (1 << inner) | |
def is_set(array, index): | |
inner = (index % 64) | |
index //= 64 |
require 'rubygems' | |
require 'yaml' | |
# A demonstration of YAML anchors, references and handling of nested values | |
# For more info, see: | |
# http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/ | |
stooges = YAML::load( File.read('stooges.yml') ) | |
# => { | |
# "default" => { |
#!/usr/bin/env python | |
""" | |
Pass data between processes started through the multiprocessing module | |
using pyzmq and process them with PyCUDA | |
""" | |
import numpy as np | |
import zmq | |
import multiprocessing as mp |
adapted from this blog
# YAML
name: Jon
# YAML
object:
#!/usr/bin/env bash | |
NYAN=('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmbbbbbbbbbbbbbbbbbbbbbbbbbbb' | |
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmbmbbbbbbbbbbbbbbbbbbbbbbbbbb' | |
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmbbbbbbbbbbbbbbbbbbbbbbbbbbb' | |
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' | |
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' | |
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' | |
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' | |
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmb' |
from libc.stdint cimport int64_t | |
cdef tuple_hash(obj): | |
cdef int64_t mul = 1000003, l = len(obj), value = 0x345678, v | |
for i in obj: | |
l -= 1 | |
v = portable_hash(i) | |
if v == -1: | |
return -1 | |
value = (value ^ v) * mul | |
mul += <int64_t> (82520 + l * 2) |
#!/bin/ksh | |
typeset port=$((RANDOM % 60000)) | |
while ((port < 30000)); do | |
port=$((RANDOM % 60000)) | |
done | |
typeset pipe=`mktemp -u` | |
mkfifo $pipe | |
trap "rm -f $pipe" INT |