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:
I hereby claim:
To claim this, I am signing this object:
with import <nixpkgs> {}; | |
stdenv.mkDerivation rec { | |
name = "env"; | |
env = buildEnv { name = name; paths = buildInputs;}; | |
buildInputs = [ | |
opencv3 | |
c-blosc | |
eigen | |
assimp | |
google-gflags |
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): |
public class Main { | |
public static void main(String[] args) throws IOException { | |
SocketChannel socketChannel = SocketChannel.open(); | |
try { | |
socketChannel.connect(new InetSocketAddress("localhost", 10100)); | |
} catch (IOException e) { | |
// Connection error | |
} |
/* Author: Daeyun Shin */ | |
#include<map> | |
#include<cassert> | |
#include<queue> | |
using namespace std; | |
map<char, map<char, bool> > graph; | |
int boggle(int board[4][4], const char * word) { | |
// populate the graph | |
for (int i = 0; i < 4; i++) { |
#!/usr/bin/python | |
class LongestPalindrome: | |
def longestPalindrome(self, string): | |
self.string = string | |
self.LP = {} | |
return self.longestPalindrome_(0, len(self.string) - 1) | |
def longestPalindrome_(self, i, j): | |
if (i, j) in self.LP: | |
return self.LP[(i, j)] |
#!/usr/bin/python | |
def lisBigger(prev, A): | |
if len(A) == 0: | |
return 0 | |
max = lisBigger(prev, A[1:]) | |
if A[0] > prev: | |
L = 1 + lisBigger(A[0], A[1:]) | |
if L > max: | |
max = L | |
return max |
# check if s is a subsquence of S | |
def checkSubsequence(s, S): | |
idx = 0 | |
for char in s: | |
if idx >= len(S): | |
return False | |
while char != S[idx]: | |
idx += 1 | |
if idx >= len(S): | |
return False |
testing
jekyll --server 8080 --auto
publishing
jekyll build
s3cmd sync _site/ s3://www.daeyunshin.com --add-header 'Cache-Control: max-age=300' --delete-removed --reduced-redundancy --acl-public --cf-invalidate
If you see this error when compiling a 32 bit x86 assembly code with the -m32
flag on a 64 bit environment, install gcc-multilib
.
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status