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 / cnn-in-numpy.py
Created November 26, 2017 15:38 — forked from chris-chris/cnn-in-numpy.py
Convolution in numpy
import numpy as np
import tensorflow as tf
from tensorflow.python.framework import dtypes
# 1. Setting up initial values
x = np.zeros((7, 7, 3))
x[:, :, 0] = np.mat(
"0 0 0 0 0 0 0;0 0 1 0 1 0 0;0 2 1 0 1 2 0;0 0 2 0 0 1 0;0 2 0 1 0 0 0;0 0 0 1 2 2 0;0 0 0 0 0 0 0"
).A
@hskang9
hskang9 / Spark+ipython_on_MacOS.md
Created July 25, 2017 16:49 — forked from ololobus/Spark+ipython_on_MacOS.md
Apache Spark installation + ipython/jupyter notebook integration guide for macOS

Apache Spark installation + ipython/jupyter notebook integration guide for macOS

Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112

For older versions of Spark and ipython, please, see also previous version of text.

Install Java Development Kit

@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 / 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_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