Skip to content

Instantly share code, notes, and snippets.

View ami-GS's full-sized avatar
🎯
Focusing

Daiki AMINAKA ami-GS

🎯
Focusing
View GitHub Profile
@ami-GS
ami-GS / gist:5152bba2a3bfbf0f288ab09b7db7ab5a
Created July 25, 2017 06:14
DL articles I got interested
FACTORIZATION TRICKS FOR LSTM NETWORKS
https://arxiv.org/pdf/1703.10722.pdf
@ami-GS
ami-GS / progress_bar.py
Last active June 28, 2017 05:21
caffeのプログレスバー
"""
progress_bar.py
Copyright (c) [2017] [ami_GS]
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
"""
from subprocess import Popen, PIPE
@ami-GS
ami-GS / huffmanTable.h
Last active August 29, 2015 14:04
huffman table for HPACK
struct huffman{
uint32_t code;
uint32_t bitLen;
};
const huffman huffman_table[] = {
{0x1ff8, 13},
{0x7fffd8, 23},
{0xfffffe2, 28},
{0xfffffe3, 28},
@ami-GS
ami-GS / dir.js
Created April 6, 2014 10:50
Pythonのdir(object)みたいな関数
function printProperties(obj) {
var properties = '';
for (var prop in obj){
properties += prop + "=" + obj[prop] + "\n";
}
alert(properties);
};
@ami-GS
ami-GS / getPid.js
Created March 12, 2014 08:44
get process ID using Node.js and its child_process
var spawn = require('child_process').spawn;
var grep = spawn('grep', ['ssh']);
console.log(grep.pid);
grep.stdin.end();
@ami-GS
ami-GS / workIgnoring.sh
Last active August 29, 2015 13:57
すでにリポジトリに無視したいファイルがある時に.gitignoreを反映させる
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
git push origin master
@ami-GS
ami-GS / oreore.sh
Created February 25, 2014 15:44
オレオレ証明書を作る
openssl genrsa 2048 > server.key
openssl req -new -key server.key > server.csr
openssl x509 -days 3650 -req -signkey server.key < server.csr > server.crt
@ami-GS
ami-GS / getArgments.py
Last active August 29, 2015 13:56
get arguments of function or method
import inspect
print inspect.getargspec(function)
print inspect.getargspec(Class.method)
@ami-GS
ami-GS / varAccess.py
Created February 14, 2014 09:04
study for variable access
class Var():
x = "x"
_x = "_x"
__x = "__x"
def __init__(self):
self.y = "y"
self._y = "_y"
self.__y = "__y"
@ami-GS
ami-GS / fastPrime.py
Last active August 29, 2015 13:56
Nまでの素数のリストを出力
import sys
import time
s = time.time()
N = int(sys.argv[1])
prime = [1]*N
prime[0] = 0
prime[1] = 0