Skip to content

Instantly share code, notes, and snippets.

View hskang9's full-sized avatar
🏠
Working from home

Hyungsuk Kang hskang9

🏠
Working from home
View GitHub Profile
@hskang9
hskang9 / dennis-ritchie-tribute-page.markdown
Created November 8, 2016 14:56
Dennis Ritchie Tribute Page
@hskang9
hskang9 / install_caffe.sh
Created March 23, 2017 20:01 — forked from doctorpangloss/install_caffe.sh
Installing Caffe on Mac 10.11.5 and later in the 10.11 series, and 10.12.1 and later in the 10.12 series
#!/bin/sh
# Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Apple hides old versions of stuff at https://developer.apple.com/download/more/
# Install the latest XCode (8.0).
# We used to install the XCode Command Line Tools 7.3 here, but that would just upset the most recent versions of brew.
# So we're going to install all our brew dependencies first, and then downgrade the tools. You can switch back after
# you have installed caffe.
# Install CUDA toolkit 8.0 release candidate
# Register and download from https://developer.nvidia.com/cuda-release-candidate-download
@hskang9
hskang9 / xcode-cli-tools.sh
Created March 24, 2017 16:28 — forked from trinitronx/xcode-cli-tools.sh
Script to download & install XCode Command Line tools on OSX 10.7 or 10.8. Lifted from jedi4ever/veewee template.
#!/bin/sh
OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $2}')
# Get Xcode CLI tools
# https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/index-3905972D-B609-49CE-8D06-51ADC78E07BC.dvtdownloadableindex
# https://developer.apple.com/downloads/index.action
TOOLS=clitools.dmg
if [ ! -f "$TOOLS" ]; then
if [ "$OSX_VERS" -eq 7 ]; then
DMGURL=http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_os_x_lion_april_2013.dmg
@hskang9
hskang9 / install_reactvr.sh
Last active May 28, 2017 23:49
Installing react on command line
npm install -g react-vr-cli
react-vr init setup
cd setup
npm start
open http://localhost:8081/vr/index.html
@hskang9
hskang9 / MapViewController.swift
Created May 29, 2017 11:37
Set MKMapview as mainview
import UIKit
import MapKit
class MapViewController: ViewController, MKMapViewDelegate {
var mapView: MKMapView!
override func loadView() {
// Create a MapView
mapView = MKMapView()
@hskang9
hskang9 / MapViewController.swift
Created May 29, 2017 11:47
import CoreLocation and track user's current location using location manager
import UIKit
import MapKit
import CoreLocation
class MapViewController: UIViewController, MKMapViewDelegate, CLLocationManagerDelegate {
var mapView: MKMapView!
let locationManager = CLLocationManager()
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
@hskang9
hskang9 / MapViewController.swift
Created May 29, 2017 11:56
Make button programmatically and add programmatic control with event
import UIKit
import MapKit
import CoreLocation
class MapViewController: UIViewController, MKMapViewDelegate, CLLocationManagerDelegate {
var mapView: MKMapView!
let locationManager = CLLocationManager()
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
@hskang9
hskang9 / Markdown jekyll hacks
Created June 10, 2017 19:23 — forked from AleksejDix/Markdown jekyll hacks
add figure element with figcaption to markdown
$( document ).ready(function() {
$('.markdown p img').unwrap().wrap('<figure></figure>').after(function() {
return '<figcaption>'+this.alt+'</figcaption>';
});
});
@hskang9
hskang9 / WebViewController.swift
Created June 21, 2017 19:56
SimpleBrowserViewController
//
// WebViewController.swift
// SimpleBrowserViewController
//
// Created by hyungsukkang on 6/22/17.
// Copyright © 2017 Hyungsuk Kang. All rights reserved.
//
import UIKit
import Foundation
import WebKit
@hskang9
hskang9 / TF_boilerplate(supervised).py
Created July 14, 2017 08:01
Tensorflow Supervised Learning Boilerplate
# initialize variables/model parameters
# define the training loop operations
def inference(X):
# compute inference model over data X nd return the result
def loss(X, Y):
# compute loss over training data X and expected outputs Y
def inputs():