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
$ brew install libmagic | |
$ pip install python-magic | |
$ pip install boto3 |
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
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 |
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
commit 30b34746b1c90c6085a0fc553adc9f4acb192345 | |
Author: Kenta Murata <[email protected]> | |
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 |
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
require 'thread' | |
queue = Queue.new | |
thread = Thread.start do | |
loop do | |
queue.pop.call | |
end | |
end |
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
--- 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 |
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
module RefineInteger | |
refine Fixnum do | |
def /(other) | |
case other | |
when Integer | |
Rational(self, other) | |
else | |
super | |
end | |
end |
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
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 <[email protected]> | |
+ | |
+ * configure.in (POSTLINK): sign built program using RUBY_CODESIGN identity. | |
+ | |
+ * Makefile.in (PROGRAM): ditto. |
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
require 'active_record' | |
ActiveRecord::Base.establish_connection( | |
adapter: 'sqlite3', | |
database: 'test', | |
) | |
class Migration < ActiveRecord::Migration | |
def up | |
drop_table :users rescue nil |
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
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) |
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
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) |