Skip to content

Instantly share code, notes, and snippets.

View sykwer's full-sized avatar

Takahiro Ishikawa-Aso sykwer

View GitHub Profile
@Sharpie
Sharpie / .vimrc
Created January 27, 2010 01:24
A vim profile file designed for editing Fortran source code
" Ensure correct syntax highlighting and auto-indentation for Fortran free-form
" source code.
let fortran_free_source=1
let fortran_do_enddo=1
filetype plugin indent on
syntax on
" Turn on line numbers and row/column numbers.
set nu
@NeoCat
NeoCat / LibHook.h
Created December 25, 2011 13:48
Hook hidden symbol call (x86_64)
#include <string.h>
#include <dlfcn.h>
#include <err.h>
#include <errno.h>
#include <sys/mman.h>
#define LIB_PATH "libc.so.6"
template <class RET, class... ARGV>
class LibHook {
@melborne
melborne / README
Created August 7, 2012 11:42
Lack is a minified Rack just for study.
Lack is a minified Rack just for study.
@domenic
domenic / promises.md
Last active June 13, 2025 14:15
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@voluntas
voluntas / eval.rst
Last active November 25, 2024 08:17
評価制度の無い評価制度
@karpathy
karpathy / min-char-rnn.py
Last active July 10, 2025 01:16
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@voluntas
voluntas / webrtc.rst
Last active June 28, 2025 12:10
WebRTC コトハジメ
@bellbind
bellbind / CMakeLists.txt
Last active February 28, 2024 20:27
[c] malloc and free implementation on the static memory pool
# How to build and to run
# mkdir build ; cd build/ ; cmake .. ; make ; ./test
# (cleanup: rm -r build/)
set(CMAKE_C_STANDARD 11)
list(APPEND CMAKE_C_FLAGS "-Wall -Wextra -pedantic")
add_library(mymalloc SHARED mymalloc.c)
add_executable(test test.c)
link_directories(.)
target_link_libraries(test mymalloc)
@karpathy
karpathy / pg-pong.py
Created May 30, 2016 22:50
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward
@spitis
spitis / bnlstm.py
Created February 2, 2017 03:05
Batch normalized LSTM Cell for Tensorflow
"""adapted from https://github.com/OlavHN/bnlstm to store separate population statistics per state"""
import tensorflow as tf, numpy as np
RNNCell = tf.nn.rnn_cell.RNNCell
class BNLSTMCell(RNNCell):
'''Batch normalized LSTM as described in arxiv.org/abs/1603.09025'''
def __init__(self, num_units, is_training_tensor, max_bn_steps, initial_scale=0.1, activation=tf.tanh, decay=0.95):
"""
* max bn steps is the maximum number of steps for which to store separate population stats
"""