Skip to content

Instantly share code, notes, and snippets.


Masahiro Sakai msakai

View GitHub Profile
fancellu / .block
Last active Feb 10, 2022
Force directed graph for D3.js v4 with labelled edges and arrows
View .block
license: gpl-3.0
height: 600
enakai00 / reversi.ipynb
Created Nov 7, 2016
Reinforcement learning example for mini-max method Reversi.
View reversi.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/env python -u
import random
from os import environ, listdir, path
from sys import exit
from subprocess import Popen, PIPE
import signal
from base64 import b64decode
def alarm_handler(signum, frame):
print "timed out, sorry"
spake /
Last active Oct 23, 2015
Trend Micro CTF 2015: Crypto 400

We get a single file, document.xbm, which looks like an XBM image (a strange old file format that encodes images inside C strings). In our case, we have three arrays of bytes: bits, metadata1, and metadata2.

#define ________________width 1024
#define ________________height 540

static unsigned char ________________bits[] =
  0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1, 0x00, 0x00,
yudai / gist:6f8f44ac878c41eaf7dc
Last active Jun 6, 2019
Google v. Oracle API著作権裁判
View gist:6f8f44ac878c41eaf7dc

Oracle v. GoogleのAPI著作権裁判の話


全体の内容としては比較的単純で「あらゆるプログラムのコードは著作権で保護される。ただしFair Useによる合法的な利用に関しては差し戻し審で審議せよ」という事のようだ。実は「API」という言葉は一切判決文には出てこないため、内容を良く読む必要がある。

17 U.S.C. 102(b)を巡るGoogleの主張

koyhoge / gist:20b4570adcfc2bcab5da
Last active Nov 23, 2019
エンジニアのための法律勉強会 #3『判例に学ぶ、納期遅延と瑕疵担保責任についての注意事項』参加メモ
View gist:20b4570adcfc2bcab5da

エンジニアのための法律勉強会 #3『判例に学ぶ、納期遅延と瑕疵担保責任についての注意事項』参加メモ

  • 日時: 2015-04-123 19:15-20:50
  • 講師: 野島 梨恵氏 (東京山王法律事務所)
  • 場所: Co-Edo

  • 初参加の方が半分くらい
exoego / 転職先に訊きたいチェックリスト.md
Last active May 14, 2021
View 転職先に訊きたいチェックリスト.md


  • 有休…
  • 病休…
  • 育休…
  • 年収(月給、賞与など)…
  • 残業代…
  • 早朝/深夜手当…
  • 休出手当…
  • 住宅補助…
araipiyo / speed.rb
Created Jun 1, 2014
measure speed of HTTP GET at any particular site.
View speed.rb
require 'net/http'
require 'uri'
url = URI.parse(ARGV[0])
http =, url.port)
path = url.path != '' ? url.path : '/'
path += url.query ? "?#{url.query}" : ""
secs = []
willwade /
Last active Apr 7, 2019
inspired by the perl version - but not quite the same. Simply use to download your bibtex file and attachments on a regular basis. NB: Only downloads the PDF if not already present so technically only 2 calls at a minimum to CUL (Login and download of bibtex. Obviously a lot more if downloading the PDFs). If more than one attachment - will only …
#!/usr/bin/env python
# Contact: Will Wade
# Date: April 2013
# Needs mechanize and pybtex
# NB: Little error checking going on in this script
# TO-DO: Check last-download-date of bibtex file later than last-modified date on CUL. ? possible
# With thanks to for the login part
import mechanize