Skip to content

Instantly share code, notes, and snippets.

View orchestor's full-sized avatar
🎯
Focusing

Lin Wang orchestor

🎯
Focusing
  • Fremont, CA
View GitHub Profile
### cartoon
http://www.askaswiss.com/2016/01/how-to-create-cartoon-effect-opencv-python.html
@orchestor
orchestor / llnode.py
Last active October 8, 2016 18:39
Simple linked list node class
class Node:
def __init__(self, init_data):
self.data = init_data
self.next = None
def getDate(self):
return self.data
def getNext(self):
return self.next
def setData(self, new_data):
self.data = new_data
class ll:
def __init__(self):
self.head = None
def isEmpty(self):
return self.head == None
def factorial(N):
if N==0:
return 1
return N*factorial(N-1)
@orchestor
orchestor / .block
Last active December 15, 2016 05:21
Royal Enfield Map
license: mit
#GET ALL NEW BRANCHES ETC....
git fetch
git checkout <branch name>
#AD MY LOCAL CHANGES AND PUSH
git status
git add -A .
git pull
# MERGE COLLISIONS HERE IF REQUIRED
@orchestor
orchestor / latency.txt
Created March 28, 2017 00:46 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
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
@orchestor
orchestor / index.html
Created March 28, 2017 22:53 — forked from lnmunhoz/index.html
RealTime chart with ChartJS, Socket.io and KnockoutJS
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="lnmunhoz">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/2.1.0/knockout-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.1/Chart.js"></script>
@orchestor
orchestor / index.html
Created March 28, 2017 22:53 — forked from arisetyo/index.html
Dynamic Real-time Chart Using Chart.js, Socket.io, and Knockout.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Galenic">
<script src="js/jquery-1.9.1.js"></script>
<script src="js/knockout-2.1.0.js"></script>
<script src="js/Chart.js"></script>
<link rel="stylesheet" href="pure-min.css">
@orchestor
orchestor / index.html
Created March 28, 2017 22:53 — forked from arisetyo/index.html
Dynamic Real-time Chart Using Chart.js, Socket.io, and Knockout.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Galenic">
<script src="js/jquery-1.9.1.js"></script>
<script src="js/knockout-2.1.0.js"></script>
<script src="js/Chart.js"></script>
<link rel="stylesheet" href="pure-min.css">