Skip to content

Instantly share code, notes, and snippets.

Jianxin Gao j-gao

Block or report user

Report or block j-gao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
j-gao /
Created Sep 27, 2016 — forked from bhumphreys/
Playing with making a simple perceptron in Python. Used Foundations of Statistical Natural Language Processing as a reference.
# Ben's Magical Perceptron
def dot_product(a, b):
return sum([a[i]*b[i] for i in range(len(a))])
def decision( x, w, theta ):
return (dot_product(x, w) > theta)
j-gao /
Created Sep 27, 2016 — forked from velocityzen/
This script take pictures from directory and post it to tumblr blog and then delete it. Tumblr API v2! This example for oath file upload.
import urlparse
import oauth2 as oauth
consumer_key = ''
consumer_secret = ''
request_token_url = ''
access_token_url = ''
authorize_url = ''
j-gao /
Created Dec 13, 2015 — forked from marianposaceanu/
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Make sure you have Ruby installed via : ruby -v
  4. Install the lolcat [2] via : gem gem install lolcat
  5. Profit!
j-gao / 0_reuse_code.js
Created Nov 20, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.