Skip to content

Instantly share code, notes, and snippets.

View suensummit's full-sized avatar
🚀
Liftoff

Summit Suen suensummit

🚀
Liftoff
View GitHub Profile
@leoluyi
leoluyi / dbCreateTable.R
Last active February 14, 2017 08:05
DBI method for creating tables
# library(RSQLServer)
# library(RJDBC)
library(magrittr)
setGeneric("dbCreateTable", valueClass = "logical",
signature = c("conn", "name", "value"),
function(conn, name, value, ...) {
standardGeneric("dbCreateTable")
}
)
library('ggplot2')
# Dataset column names and classes
l_colnames = c( 'game_no','stadium', 'team', 'x_cord', 'y_cord', 'desc' )
l_colClasses = c( 'numeric', 'character', 'character', 'numeric', 'numeric', 'character' )
# Load the dataset
hip_data <- read.csv( file = 'hitsPerGame.csv'
, header = F
, col.names = l_colnames
@criccomini
criccomini / test_dags.py
Created June 22, 2016 15:18
test_dags.py
import os
import unittest
from airflow.models import DagBag
class TestDags(unittest.TestCase):
"""
Generic tests that all DAGs in the repository should be able to pass.
"""
@baraldilorenzo
baraldilorenzo / readme.md
Created January 16, 2016 12:57
VGG-19 pre-trained model for Keras

##VGG19 model for Keras

This is the Keras model of the 19-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

@chroth7
chroth7 / reactD3rescources.md
Last active December 6, 2017 05:37
React/D3 Resources

React <-> D3 Resources

Thanks for all the stars.

Due to unexpected demand, I move this to a proper github repo, see here: https://github.com/chroth7/reactD3resources

I would very much like to get your PRs there, thank you!

@c9s
c9s / GoogleSpreadSheetInviteToSlack.js
Last active August 29, 2015 14:20
InviteToSlack from Google SpreadSheet
/*
The original script: https://github.com/dherbst/slack-invite-script/blob/master/code.js
*/
/*
Get channels from: curl 'https://golang.slack.com/api/channels.list?token={token}' | json_pp
*/
function getInviteChannels() {
return ['C123123123'];
@ronnywang
ronnywang / gist:e79fb48512507de0a8a1
Created April 20, 2015 16:51
2015/4/1 - 2015/4/20 小當家聊天室 bigram 分析
2015401
{"<3":2612," ":1076,"知道":976,"乃哥":952,"李嚴":907,"當家":814,"RR":814,"..":783,"幹 ":754,"小當":742,"!!":715," <":707,"你又":668,"嘟嘟":665,"又知":657,"道了":589,"ㄤㄤ":574,"~~":571,"雷恩":557,"B嘴":552,"料理":538,"怎麼":520,"ED":515,"LE":504,"醬汁":498,"紹安":497,"不要":481," 幹":478,"所以":466,"le":460,"0":460,"不是":451,"1":445,"了 ":430,"bl":429,"出來":427,"向恩":414,"還是":410,"什麼":405,"mp":401,"這樣":397,"hu":396,"ib":395,"um":395,"Th":390,"Bi":389,"eT":384,"%%":379,"魚片":377,"銅牌":377,"生魚":369,"閉嘴":368,"XD":366,"不錄":360,"ww":359,"來的":355,"錄了":353,"\/\/":353,"2":352,"礦物":351,"物質":350,"大麻":344,"小時":344," B":336," 你":335,"四郎":330,"是你":328,"阿飛":320,"ht":320,"tt":318,"tp":316,":\/":316,"0勝":308,"就是":304," 我":301,"1小":299,"可以":298,"3":294,"你的":293,"你不":292,"??":288,"王福":287,"ㄋㄟ":282,"魯夫":282,".c":281,"的料":280,":幹":278,"沒有":277,"RQ":277,"這個":275,"阿貝":267,"ㄟㄋ":263,"的,":261,"幹":256,"co":255,"om":255,"你還":252,"來了":249,"最後":248,"GD":246}
2015402
{"<3":2599," ":1496,"RR":1309,"嘟嘟":1086,"幹 ":1054,"當家":1038,"小當":949,"王福":947,"~~":918,"!!":907,"ED":849,
@philipz
philipz / gist:40e1422416fae70ee321
Created March 26, 2015 07:02
Docker Moving SOP
  1. Use the Docker images that includes export volume.
  2. Backup volume data
  3. Docker-machine create
  4. Docker Save/load
  5. Run up docker container
  6. Import data to volume
  7. Check service
@kkc
kkc / elasticsearch.md
Last active December 29, 2023 00:39
Elasticsearch performance tuning

##TUNING##

Configuration

System: set file descriptors to 32K or 64K

vim /etc/security/limit.conf

#!/bin/bash
case "$1" in
new)
echo "[INFO] Creating new gitlab docker instances ..."
docker create --name='gitlab' -it -e 'GITLAB_PORT=10080' -e 'GITLAB_SSH_PORT=10022' -p 10022:22 -p 10080:80 -v /var/run/docker.sock:/run/docker.sock -v $(which docker):/bin/docker -v $(pwd):/vagrant sameersbn/gitlab:latest
;;
start)
echo "[INFO] Starting gitlab docker instances ..."
docker start gitlab
;;