Skip to content

Instantly share code, notes, and snippets.

import AVFoundation
import QuartzCore
public class Recording : NSObject, AVAudioRecorderDelegate {
@objc public enum State: Int {
case None, Record, Play
}
static var directory: String {
@yungookim
yungookim / EURUSD 15M Prediction.ipynb
Created April 23, 2018 01:14
Weekend Exercise. Forex EURUSD 15 minute interval price prediction Part 1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yungookim
yungookim / note.md
Created February 17, 2016 22:41 — forked from fyears/note.md
how to install scipy numpy matplotlib ipython in virtualenv

if you are using linux, unix, os x:

pip install -U setuptools
pip install -U pip

pip install numpy
pip install scipy
pip install matplotlib
#pip install PySide
@yungookim
yungookim / gist:d9daf299396d645822df
Last active August 29, 2015 14:23
Initializing kiwi-library-web
'use strict'
// callback for sensor data. At sample rate of 50hz,
// this function will be called 50 times per second.
// i.e. every 20ms
var onData = function(data){
/*
Structure of data :
data = {
// Accelerometer x, y, z

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

@yungookim
yungookim / gist:9394810
Created March 6, 2014 17:24
Disable user's Javascript execution from console
(function() {
try {
var $_console$$ = console;
Object.defineProperty(window, "console", {
get: function() {
if ($_console$$._commandLineAPI)
throw "Sorry, for security reasons, the script console is deactivated on netflix.com";
return $_console$$
},
set: function($val$$) {
.element {
position: relative;
top: 50%;
transform: translateY(-50%);
}
@yungookim
yungookim / gist:7233820
Created October 30, 2013 14:43
Watch a process, when done, send me an email.
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage <PID> <email address>"
fi
if kill -0 $1; then
echo "Process $1 doesn't exist."
exit 1
fi
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
#!/bin/bash
#
# Install Postgres 9.2 on a clean Ubuntu 12.04
"""
LC_ALL issue
comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file.
sudo apt-get install language-pack-en-base
sudo dpkg-reconfigure locales
comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file.