Skip to content

Instantly share code, notes, and snippets.

View YujiShen's full-sized avatar
🎉
Every time is big time!

Yuji Shen YujiShen

🎉
Every time is big time!
View GitHub Profile
black = '#272c33';
red = '#e78287'; // red
green = '#a7cb8b'; // green
yellow = '#daaa78'; // yellow
blue = '#71bdf2'; // blue
magenta = '#d190e3'; // pink
cyan = '#65c1cd'; // cyan
white = '#b9bfca'; // light gray
lightBlack = '#6f7683'; // medium gray
lightRed = '#e78287'; // red
@YujiShen
YujiShen / Solarized Dark.js
Last active November 5, 2017 23:22
Solarized Dark theme for Blink
base03 = "#002b36";
base02 = "#073642";
base01 = "#586e75";
base00 = "#657b83";
base0 = "#839496";
base1 = "#93a1a1";
base2 = "#eee8d5";
base3 = "#fdf6e3";
yellow = "#b58900";
orange = "#cb4b16";
@YujiShen
YujiShen / tic-tac-toe.py
Last active June 24, 2016 13:05
Calculate all possible endgame states in game Tic-Tac-Toe
'''
Tic Tac Toe Endstate Calculation
Assumption: X always moves first.
Including all symmetric or rotate situations.
Using 1D list to represent board, 1 as X, -1 as O, 0 as blank.
'''
def check(board):
@YujiShen
YujiShen / SQL_COOKBOOK_TABLE.sql
Created February 6, 2016 04:04
Table EMP and DEPT of SQL Cookbook for MySQL
-- Thanks to http://justinsomnia.org/2009/04/the-emp-and-dept-tables-for-mysql/
DROP TABLE IF EXISTS emp;
CREATE TABLE emp (
empno decimal(4,0) NOT NULL,
ename varchar(10) default NULL,
job varchar(9) default NULL,
mgr decimal(4,0) default NULL,
hiredate date default NULL,
@YujiShen
YujiShen / custom.css
Last active August 29, 2015 14:26
IPython Custom js and css
/*
Placeholder for custom user CSS
mainly to be overridden in profile/static/custom/custom.css
This will always be an empty file in IPython
*/
/* comment out this line to bring the toolbar back */
html, body {
overflow-y: hidden
@YujiShen
YujiShen / roll_ipython_in_aws.md
Last active December 22, 2015 13:24 — forked from iamatypeofwalrus/roll_ipython_in_aws.md
Create an iPython HTML Notebook on Amazon's AWS Free Tier from scratch.

What

Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.

What are we using? What do you need?

  • An active AWS account. First time sign-ups are eligible for the free tier for a year
  • One Micro Tier EC2 Instance
  • With AWS we will use the stock Ubuntu Server AMI and customize it.
  • Anaconda for Python.
  • Coffee/Beer/Time
@YujiShen
YujiShen / Spark+ipython_on_MacOS.md
Last active August 29, 2015 14:26 — forked from ololobus/Spark+ipython_on_MacOS.md
Apache Spark installation + ipython notebook integration guide for Mac OS X

Apache Spark installation + ipython notebook integration guide for Mac OS X

Tested with Apache Spark 1.3.1, Python 2.7.9 and Java 1.8.0_45

Install Java Development Kit

Download and install it from oracle.com

@YujiShen
YujiShen / Suicide.html
Last active August 29, 2015 14:09
Test
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #