Skip to content

Instantly share code, notes, and snippets.

View dmiyakawa's full-sized avatar
🤠
Vacation in Raccoon City

Daisuke Miyakawa dmiyakawa

🤠
Vacation in Raccoon City
View GitHub Profile
@dmiyakawa
dmiyakawa / sqlite3_exp.py
Created September 27, 2016 03:06
SQLite3 + Python でのトランザクション関係の実験
#!/usr/bin/env python
#
# See also http://stackoverflow.com/questions/15856976/transactions-with-python-sqlite3
#
import sqlite3
sql = sqlite3.connect("/tmp/test.db")
print('isolation_level: "{}"'.format(sql.isolation_level))
@dmiyakawa
dmiyakawa / life_game.py
Created September 7, 2016 05:56
Life Game with a bit tricky generator expressions in Python (from Effective Python item 40)
#!/usr/bin/env python3
#
#
# Life Game with a bit tricky generator expressions
#
# Based on a sample code in Effective Python
# See also
# https://github.com/bslatkin/effectivepython/blob/master/example_code/item_40.py
# Original Copyright notice follows.
#
@dmiyakawa
dmiyakawa / ms_cv_api_exp.py
Created July 28, 2016 01:59
Computer Vision API のデモ。Python2/3両系対応版
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Microsoft Computer Vision API のデモを
# Python 2 / 3 両系統で動作するようにしたもの
#
#
# Usage: python ms_cv_api_exp.py (image_url)
#
# 参考
@dmiyakawa
dmiyakawa / roo-exp.rb
Created March 2, 2016 06:06
roo-exp.rb
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'optparse'
require 'ostruct'
require 'logger'
require 'roo'
require 'roo-xls'
@dmiyakawa
dmiyakawa / gakunin_attributes_mod.php
Created February 22, 2016 03:34
gakunin_attributes_mod.php
<!--
Shows SAML attributes that are most related to Gakunin attributes.
Each table column (<td>) contains a name attribute inside it,
for allowing test scripts to find them more easily.
Copyright 2015 mokha Inc.
Licensed under the Apache License, Version 2.0 (the "License");
@dmiyakawa
dmiyakawa / gist.txt
Last active January 3, 2016 14:31
さらに新しいぎすと
らんらんらんらんらん♪
@dmiyakawa
dmiyakawa / gist.txt
Created January 3, 2016 14:20
新しいぎすと
gistnぽぽぽ
@dmiyakawa
dmiyakawa / GistApp.react.js
Last active January 2, 2016 03:17
React + $.get()
"use strict";
import React from 'react'
import $ from 'jquery'
import makeCancelable from '../utils/makeCancelable'
class GistApp extends React.Component {
constructor(props) {
super(props);
console.log(`source: ${this.props.source}`)
@dmiyakawa
dmiyakawa / main.es6
Created January 1, 2016 09:20
MyList実装そのに
"use strict";
console.log("main.js")
import _ from 'lodash'
import React from 'react'
import ReactDOM from 'react-dom'
class MyList extends React.Component {
constructor(props) {
@dmiyakawa
dmiyakawa / main.es6
Created December 31, 2015 09:03
React事始め
"use strict";
import React from 'react'
import ReactDOM from 'react-dom'
class MyList extends React.Component {
constructor(props) {
super(props);
this.state = {elems: [1, 4, 9]};
}