Skip to content

Instantly share code, notes, and snippets.

View ttakamura's full-sized avatar

Tatsuya Takamura ttakamura

  • Preferred Networks, inc.
  • Tokyo, Japan
View GitHub Profile
@ttakamura
ttakamura / sympy_plot.ipynb
Last active November 25, 2015 01:48
Sympy + Plot
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ttakamura
ttakamura / helper.rb
Last active December 17, 2015 23:58
Try multi-threaded processing with lazy enumerables
def task num
puts "Start thread ##{num}"
Thread.new do
sleep 1
num * num
end
end
inputs = [1,2,3,4,5]
@ttakamura
ttakamura / rex_test.rb
Last active December 14, 2015 05:29
ruby 2.0.0-p0 と ruby 1.9.3-p194 で結果が違う、仕様?
# -*- coding: utf-8 -*-
s = 'か な'
p s =~ /^[\p{hiragana}\s]+$/
p s =~ /^[\s\p{hiragana}]+$/
--- wscript.org 2012-02-29 11:51:35.000000000 +0900
+++ wscript 2012-02-29 11:50:50.000000000 +0900
@@ -22,6 +22,7 @@
conf.check_tool('compiler_cxx')
conf.check_tool('unittest_gtest')
conf.check_tool('gnu_dirs')
+ conf.env.LINKFLAGS += ['-flat_namespace']
env = conf.env
ver = env.CC_VERSION
--- wscript.org 2012-02-29 11:23:32.000000000 +0900
+++ wscript 2012-02-29 11:24:20.000000000 +0900
@@ -27,6 +27,7 @@
def configure(conf):
conf.env.CXXFLAGS += ['-O2', '-Wall', '-g', '-pipe']
+ conf.env.LINKFLAGS += ['-flat_namespace']
conf.load('compiler_cxx')
conf.load('unittest_gtest')
@ttakamura
ttakamura / jubatus.rb
Created February 28, 2012 02:33 — forked from katsyoshi/jubatus.rb
jubatus homebrew
require 'formula'
class Jubatus < Formula
homepage 'http://jubat.us/'
url 'https://github.com/jubatus/jubatus/tarball/jubatus-0.2.0'
md5 '7cb01e7509e7b04dd3d07a3547db21f5'
depends_on 'glog'
depends_on 'pkg-config'
depends_on 'pficommon'