This file contains hidden or 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 distutils.core import setup | |
| from distutils.extension import Extension | |
| from Cython.Distutils import build_ext | |
| ext_modules = [ | |
| Extension("test_um", | |
| ["test_um.pyx"], | |
| include_dirs=["/usr/local/include/boost"], | |
| library_dirs=["/usr/local/lib"], | |
| language="c++") |
This file contains hidden or 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
| def enc(s) | |
| encoded = [] | |
| s.bytes {|i| | |
| if i < 0x80 | |
| encoded << i.chr(Encoding::ASCII) | |
| else | |
| encoded << '%'+i.chr(Encoding::ASCII_8BIT).unpack('H2').join('') | |
| end | |
| } | |
| encoded.join('') |
This file contains hidden or 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 re | |
| import string | |
| import sets | |
| import sys | |
| import urllib2 | |
| import os.path | |
| import subprocess | |
| from gntp.notifier import mini |
This file contains hidden or 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
| # tmux 1.3 | |
| set-window-option -g utf8 on | |
| set-window-option -g mode-keys vi | |
| # | |
| set-option -g prefix C-q | |
| set-option -g default-path /Users/hiroyuki/Develop/ | |
| set-option -g default-command "reattach-to-user-namespace -l zsh" | |
| unbind-key C-b | |
| bind-key C-q send-prefix | |
| set-option -g detach-on-destroy |
This file contains hidden or 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
| Testing Perl 5.014002, Method::Signatures 20120523, Moo 1.000006, | |
| Object::InsideOut 3.97, Mouse 1.02, Moose 2.0604 | |
| Benchmark: timing 6000000 iterations of Method::Signatures, Moo, Moose, Mouse, | |
| Object::InsideOut, manual, struct... | |
| Method::Signatures: 31 wallclock secs (31.30 usr + 0.00 sys = 31.30 CPU) @191693.29/s (n=6000000) | |
| Moo: 39 wallclock secs (39.50 usr + 0.00 sys = 39.50 CPU) @ 151898.73/s(n=6000000) | |
| Moose: 12 wallclock secs (12.35 usr + 0.00 sys = 12.35 CPU) @ 485829.96/s(n=6000000) | |
| Mouse: 2 wallclock secs ( 2.13 usr + 0.00 sys = 2.13 CPU) @ 2816901.41/s(n=6000000) | |
| Object::InsideOut: 6 wallclock secs ( 6.11 usr + 0.00 sys = 6.11 CPU) @981996.73/s (n=6000000) |
This file contains hidden or 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 perl | |
| use strict; | |
| use warnings; | |
| # ...........structure access.............. | |
| { | |
| package Foo::Structure; | |
| sub new { bless {} => shift } |
This file contains hidden or 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 ruby | |
| require 'json' | |
| def expand_clusters clusters | |
| expanded = false | |
| clusters.each do |label, hosts| | |
| tmp_hosts = [] | |
| hosts.each do |host| | |
| if clusters.key?(host) | |
| tmp_hosts.concat(clusters[host]) |
This file contains hidden or 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 ruby | |
| require 'logger' | |
| require 'rubygems' | |
| require 'soundcloud' | |
| require 'rainbow' | |
| $: << "./soundcloud2000/lib" | |
| require 'soundcloud2000' | |
| def duration_to_s(mills) |
This file contains hidden or 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 ruby | |
| #encoding: utf-8 | |
| # | |
| # TODO | |
| # ---- | |
| # | |
| # # Output inventories as HTML. | |
| # ./pomosound.rb report > report.html | |
| # |
This file contains hidden or 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 ruby | |
| #encoding: utf-8 | |
| framework 'Cocoa' | |
| framework 'ApplicationServices' | |
| framework 'AppKit' | |
| # Get a list of applications currently running. | |
| ws = NSWorkspace.sharedWorkspace |