Skip to content

Instantly share code, notes, and snippets.

Kocsen Chung kocsenc

Block or report user

Report or block kocsenc

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
@kocsenc
kocsenc / halloween.py
Last active Nov 7, 2017
Cycle some creepy colors on your hue lights for halloween!
View halloween.py
#!/usr/bin/env python3
import random
import time
from phue import Bridge
BRIGHTNESS = 255 # Max is 255
TRANSITION_TIME = 100 # Deciseconds for transition
bridge_ip = "192.168.1.172"
@kocsenc
kocsenc / Invite Codes
Last active Aug 29, 2016
Invite codes to all the services
View Invite Codes
# Airbnb
www.airbnb.com/c/kchung41
# Uber
https://www.uber.com/invite/uberkocsen
# Lyft
https://www.lyft.com/invite/KOCSEN1
# Munchery - Home cooked goods
View keybase.md

Keybase proof

I hereby claim:

  • I am kocsenc on github.
  • I am kocsenc (https://keybase.io/kocsenc) on keybase.
  • I have a public key whose fingerprint is CD11 08CF F262 C618 2657 CE68 EE43 FB56 94FB 1BCE

To claim this, I am signing this object:

@kocsenc
kocsenc / Yahoo finance api.md
Last active Jul 31, 2019
SWEN 262 - Interfacing with Yahoo's Finance API
View Yahoo finance api.md

Using Yahoo's Finance API

It was surprisingly hard to find a simple straight forward stock API; this community built API hosted by Yahoo does the job.

Let's get to it.

Below is a complete URL example if you want to play on your own and figure it out.

http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22AAPL%22)&env=store://datatables.org/alltableswithkeys
@kocsenc
kocsenc / osx-django.md
Last active Sep 10, 2015
Installing Django OS X and Windows
View osx-django.md

Install Django on OS X

Django can be tricky to install on OS X if you don't use the appropriate tools. I am using OS X 10.10 but any lower version should work.

NOTE: I assume you have NOT tried to install Python 3 in some other way, if so delete as much as you can.

  1. Get homebrew. Run ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. brew doctor This will show you if everything is gucci. If it's not cool, then attempt to fix the issues.
  3. brew install python3 This should install both Python 3 and pip3.
@kocsenc
kocsenc / org.nginx.plist
Created Aug 13, 2015
nginx plist for Mac
View org.nginx.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key><string>nginx</string>
<key>Program</key><string>/usr/local/sbin/nginx</string>
<key>KeepAlive</key><true/>
<key>NetworkState</key><true/>
<key>StandardErrorPath</key><string>/var/log/system.log</string>
@kocsenc
kocsenc / pisland.py
Last active Dec 12, 2015
Island Script
View pisland.py
#!/usr/bin/env python
from time import sleep
from selenium.common.exceptions import TimeoutException, StaleElementReferenceException
from selenium.webdriver.support.wait import WebDriverWait
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
import sys
@kocsenc
kocsenc / sleepsort.py
Created Mar 20, 2015
Sleep Sort with ThreadPool
View sleepsort.py
from concurrent.futures import ThreadPoolExecutor
import time
import timeit
import random
def sleepsort(lst):
"""
Use ThreadPool to execute each thread. Have it sleep for val/100 and then
add itself to results array.
@kocsenc
kocsenc / blueprint.md
Last active Aug 16, 2019
Installing jSpin for Unix/Linux and Mac
View blueprint.md

jSpin for Mac and Linux

This is a quick simple guide to getting jSpin setup for Mac and Linux.

Prereq's

You will need:

  • Java (1.5 +)
You can’t perform that action at this time.