Skip to content

Instantly share code, notes, and snippets.

View daeyun's full-sized avatar

Daeyun Shin daeyun

View GitHub Profile

Keybase proof

I hereby claim:

  • I am daeyun on github.
  • I am daeyun (https://keybase.io/daeyun) on keybase.
  • I have a public key whose fingerprint is 6553 BCFF 61B1 C9C3 8656 6941 C801 E60D B9BF 5E6A

To claim this, I am signing this object:

@daeyun
daeyun / default.nix
Created July 21, 2017 20:04
Dev sandbox
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "env";
env = buildEnv { name = name; paths = buildInputs;};
buildInputs = [
opencv3
c-blosc
eigen
assimp
google-gflags
@daeyun
daeyun / pca.py
Created February 15, 2016 11:33
computing principal components and singular values
import numpy as np
import numpy.linalg as la
np.random.seed(42)
X = np.random.randn(100, 5)
assert la.matrix_rank(X) == 5
def pca_svd(X):
///////////////////////////////////////////////////////////////////////////////
//
// Name: mexutil.h
// Purpose: Macros and helper functions for creating MATLAB MEX-files.
// Author: Daeyun Shin <dshin11@illinois.edu>
// Created: 01.15.2015
// Modified: 04.05.2015
// Version: 0.1.2
//
// This Source Code Form is subject to the terms of the Mozilla Public
///////////////////////////////////////////////////////////////////////////////
//
// Name: rasterizeTriangles.mex.cc
// Purpose: Draw triangles on a binary image
// Author: Daeyun Shin <dshin11@illinois.edu>
// Created: 04.05.2015
// Modified: 04.05.2015
// Version: 0.1
//
// This Source Code Form is subject to the terms of the Mozilla Public
@daeyun
daeyun / exporter.rb
Created November 23, 2015 15:26
sketchup exporter
require 'sketchup.rb'
skp_dir = "E:/3dw/skp/"
obj_dir = "E:/3dw/obj/"
skp_file = "Sikorsky+Erickson+S-64.skp"
skp_path = File.join(skp_dir, skp_file)
is_successful = Sketchup.open_file skp_path
@daeyun
daeyun / gist:7d581bad7ef46bcf8f6e
Created November 15, 2015 04:40
installing numpy and scipy with intel mkl

Add to ~/.numpy-site.cfg

[mkl]
library_dirs = /opt/intel/mkl/lib/intel64/
include_dirs = /opt/intel/mkl/include/
mkl_libs = mkl_rt
lapack_libs =
@daeyun
daeyun / nexus_5x_camera_calibration
Last active November 7, 2015 22:57
Nexus 5X camera calibration experiment using matlab
With HDR:
cameraParams =
cameraParameters with properties:
Camera Intrinsics
FocalLength: [3.049454576567071e+03 3.046823089742351e+03]
PrincipalPoint: [1.505576556380548e+03 2.003875417152112e+03]
Skew: 0
@daeyun
daeyun / rename_echo360_videos.py
Last active November 7, 2015 19:17
use video metadata to rename lecture videos downloaded from echo360
import sys
import os
import re
import subprocess
import textwrap
from dateutil.parser import parse
def rename_all(working_dir='.', video_ext='.mpg'):
filenames = sorted(os.listdir(working_dir))
#!/usr/bin/env python3
""" Take a screenshot, save to Dropbox, and copy link to clipboard.
Install imagemagick, xsel, and
sudo pip3 install sh docopt
Usage: screenshot.py [<delay>]
"""
import sh