Skip to content

Instantly share code, notes, and snippets.

View mrkn's full-sized avatar
:octocat:

Kenta Murata mrkn

:octocat:
View GitHub Profile
@mrkn
mrkn / file0.txt
Last active November 9, 2015 06:21
Python で S3 に保存されているファイルの種類を調べる方法 ref: http://qiita.com/mrkn/items/32c341972e10194b9619
$ brew install libmagic
$ pip install python-magic
$ pip install boto3
ubuntu@ip-172-31-49-232:~/NVIDIA_CUDA-7.0_Samples$ bin/x86_64/linux/release/deviceQuery
bin/x86_64/linux/release/deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 1 CUDA Capable device(s)
Device 0: "GRID K520"
CUDA Driver Version / Runtime Version 7.0 / 7.0
CUDA Capability Major/Minor version number: 3.0
commit 30b34746b1c90c6085a0fc553adc9f4acb192345
Author: Kenta Murata <mrkn@cookpad.com>
Date: Fri Jul 18 16:35:59 2014 +0200
Prevent to break cookie domain
diff --git a/src/cookiejar.cpp b/src/cookiejar.cpp
index a953d4b..eb9e3ba 100644
--- a/src/cookiejar.cpp
+++ b/src/cookiejar.cpp
require 'thread'
queue = Queue.new
thread = Thread.start do
loop do
queue.pop.call
end
end
--- hash.c.orig 2014-02-28 14:05:25.000000000 +0900
+++ hash.c 2014-02-28 14:06:08.000000000 +0900
@@ -1178,7 +1178,7 @@
#endif
}
}
-#if HASH_REJECT_COPY_MISC_ATTRIBUTES
+#if HASH_REJECT_COPY_EXTRA_STATES
result = rb_hash_dup_empty(hash);
#else
module RefineInteger
refine Fixnum do
def /(other)
case other
when Integer
Rational(self, other)
else
super
end
end
diff --git a/ChangeLog b/ChangeLog
index e1a43e5..7879e10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Thu Feb 6 09:06:00 2014 Kenta Murata <mrkn@cookpad.com>
+
+ * configure.in (POSTLINK): sign built program using RUBY_CODESIGN identity.
+
+ * Makefile.in (PROGRAM): ditto.
require 'active_record'
ActiveRecord::Base.establish_connection(
adapter: 'sqlite3',
database: 'test',
)
class Migration < ActiveRecord::Migration
def up
drop_table :users rescue nil
GC_DEBUG = false
CHAR_BIT = 8
BITS_SIZE = 8
BITS_BITLENGTH = BITS_SIZE * CHAR_BIT
SIZEOF_RVALUE = GC_DEBUG ? 56 : 40
SIZEOF_SIZE_T = 8
SIZEOF_STRUCT_HEAP_PAGE_HEADER = 8
def ceildiv(i, mod)
xs <- (0:1000 - 500) / 150
x0975 <- qnorm(0.975)
y0975 <- dnorm(x0975)
plot(dnorm(xs) ~ xs, type="n", main="standard normal distribution", xlab=NA, ylab=NA)
polygon(x=c(-x0975, -x0975, xs[abs(xs) < x0975], x0975, x0975),
y=c( 0, y0975, dnorm(xs[abs(xs) < x0975]), y0975, 0),
density=-1, border=NA, col=grey(0.8))
lines(dnorm(xs) ~ xs)