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 / .vimrc
Created December 8, 2018 21:17
Vim Configuration
:set number
filetype plugin indent on
set tabstop=4
set shiftwidth=4
set expandtab
call plug#begin('~/.vim/plugged')
@hskang9
hskang9 / StandardERC223Token.sol
Created September 29, 2018 14:56
ERC223 Token with full application
pragma solidity ^0.4.24;
/**
* @title ERC223
* @dev New Interface for ERC223
*/
contract ERC223 {
// functions
@hskang9
hskang9 / Development.md
Last active September 22, 2018 09:51
Mandatory Developer Training

Mandatory Developer Training

2018/9/22

Outline

  • 1. Introduction
  • 2. Github SSH for private repositories
    • 2.1. Generate keys
  • 2.2. Adding your SSH key to the ssh-agent
@hskang9
hskang9 / Team.sol
Created July 7, 2018 05:38
Team.sol
pragma solidity ^0.4.24;
contract Team {
string public name;
string public uri = "";
uint public rank = 0;
uint public wins = 0;
uint public looses = 0;
uint public ties = 0;
@hskang9
hskang9 / TokenStorage.sol
Last active July 7, 2018 08:19
TokenStorage.sol
pragma solidity ^0.4.17;
import './StandardERC223Token.sol';
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
@hskang9
hskang9 / ICOContract.sol
Created July 7, 2018 05:37
ICOContract.sol
pragma solidity ^0.4.17;
import './StandardERC223Token.sol';
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
@hskang9
hskang9 / truffle.js
Last active January 7, 2019 19:07
Configuration for truffle framework
const HDWalletProvider = require("truffle-hdwallet-provider");
require('dotenv').config() // Store environment-specific variable from '.env' to process.env
module.exports = {
networks: {
development: {
host: 'localhost',
port: 8545,
network_id: '*' // Match any network id
@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 / auto_crop.sh
Created July 29, 2017 10:51
Auto bbox crop using imagemagick for images in a folder
# reference : http://www.imagemagick.org/Usage/crop/
for PHOTO in *.jpeg
do
BASE=`basename $PHOTO`
convert $BASE -crop `convert $BASE -virtual-pixel edge -blur 0x15 -fuzz 15% \
-trim -format '%wx%h%O' info:` +repage cropped/$BASE;
done
@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