Skip to content

Instantly share code, notes, and snippets.

View pyar6329's full-sized avatar

Tsukasa Arima pyar6329

View GitHub Profile
@pyar6329
pyar6329 / fullAccessRoles.json
Created October 6, 2016 09:08
aws inline policies fullAccess Roles
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"iam:AddRoleToInstanceProfile",
"iam:AttachRolePolicy",
"iam:CreateInstanceProfile",
"iam:CreateRole",
"iam:DeleteInstanceProfile",
@yang-wei
yang-wei / destructuring.md
Last active February 15, 2026 13:03
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
@omnibs
omnibs / phoenix showdown rackspace onmetal io.md
Last active February 23, 2026 13:46
Phoenix Showdown Comparative Benchmarks @ Rackspace

Comparative Benchmark Numbers @ Rackspace

I've taken the benchmarks from Matthew Rothenberg's phoenix-showdown, updated Phoenix to 0.13.1 and ran the tests on the most powerful machines available at Rackspace.

Results

Framework Throughput (req/s) Latency (ms) Consistency (σ ms)
@pnlybubbles
pnlybubbles / gulpfile.coffee
Last active December 10, 2015 11:30
gulpfile.coffee
gulp = require 'gulp'
plumber = require 'gulp-plumber'
coffee = require 'gulp-coffee'
coffee_react = require 'gulp-cjsx'
watchify = require 'gulp-watchify'
rename = require 'gulp-rename'
uglify = require 'gulp-uglify'
sourcemaps = require 'gulp-sourcemaps'
buffer = require 'vinyl-buffer'
@reiji1020
reiji1020 / WhatisCNN.md
Last active February 8, 2017 05:03
卒研用のメモ,機械学習の基礎と畳み込みニューラルネットワークとは何か

畳み込みニューラルネットワーク

RBMとは何か

  • Restricted Bolzmann Machine
  • 通常のボルツマンマシンとは違い,可視ユニット同士,不可視ユニット同士の連結を認めない 制限付きボルツマンマシン のことを指す
  • 通常1層ではなく,何層かに重ねて使われる
  • RBMを1段階学習した後,不可視ユニットの活性(値)をより高階層のRBMの入力データとする
  • 不可視ユニットを効率的に学習させることができ,また計算量を現実的な水準に落としている
  • ある訓練データvが与えられたとき、条件付き確率p(hj=1|v)が計算でき、その意味は「vが与えられたとき hjがONになる(1になる)確率 」
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
@josephabrahams
josephabrahams / .gitconfig
Last active January 19, 2021 15:44
Kaleidoscope Git Configuration
[diff]
tool = Kaleidoscope
[difftool]
prompt = false
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[merge]
tool = Kaleidoscope
keepBackup = false
[mergetool]
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@jboner
jboner / latency.txt
Last active July 17, 2026 11:44
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@a2ikm
a2ikm / p4d-20120129.txt
Created January 29, 2012 08:23
SELECT系SQLでできることとかActiveRecordでできること - p4dでの資料
SELECT系SQLでできることとかActiveRecordでできること
# people
* name : 名前(文字列)
* age : 年齢(整数)
| id | name | age |
| 1 | John | 18 |
| 2 | Ben | 27 |