Skip to content

Instantly share code, notes, and snippets.

View abrocod's full-sized avatar

Jinchao abrocod

  • Google
  • New York, NY
View GitHub Profile
@abrocod
abrocod / bash-cheatsheet.sh
Created March 1, 2017 21:51 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@abrocod
abrocod / git-cheatsheet.md
Created September 19, 2016 16:56 — forked from Kartones/git-cheatsheet.md
Git cheatsheet

Commands

  • git checkout -b __newbranch__ : get a new branch and switch to it
  • git checkout -b __branchname__ / __branchname__ : get a local copy of a remote existing branch
  • git checkout __branchname__ : switch branch
  • git checkout --orphan __branchname__ : create branch without full history
  • git log -n X -p : show X last commits with diffs
  • git log __branchA__ ^__branchB__ : commits in branch A that aren't in branch B
  • git log --pretty=oneline --stat --all __foldername__ : modified files under a given folder
  • git fetch
@abrocod
abrocod / .bash_profile
Created July 2, 2016 19:57 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@abrocod
abrocod / create_index.sh
Created January 26, 2016 07:24 — forked from bonzanini/create_index.sh
Elasticsearch/Python test
curl -XPOST http://localhost:9200/test/articles/1 -d '{
"content": "The quick brown fox"
}'
curl -XPOST http://localhost:9200/test/articles/2 -d '{
"content": "What does the fox say?"
}'
curl -XPOST http://localhost:9200/test/articles/3 -d '{
"content": "The quick brown fox jumped over the lazy dog"
}'
curl -XPOST http://localhost:9200/test/articles/4 -d '{
@abrocod
abrocod / cvdiff.py
Created August 26, 2014 21:42 — forked from tobigue/cvdiff.py
from sklearn.linear_model import SGDClassifier
from sklearn import cross_validation
from sklearn import metrics
from sklearn.grid_search import GridSearchCV
from sklearn.datasets import load_iris
data = load_iris()
sample_vector = data.data
targets = data.target

To install scikit-learn easily run the following command.

curl https://gist.github.com/dacamo76/4780765/raw/36acfb10aba554a7738d2fea11d15a31dd8f3a0d/scikit-learn-install.sh | sh

Please look over the shell file being run to make sure no evil is done to your machine.