Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Byungjin Park posquit0

🎯
Focusing
Block or report user

Report or block posquit0

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am posquit0 on github.
  • I am posquit0 (https://keybase.io/posquit0) on keybase.
  • I have a public key ASAWooySOb8CkZYPKNDR9_Elv28KtIHwyquzeptBXdN0jQo

To claim this, I am signing this object:

@posquit0
posquit0 / base64.js
Last active Aug 21, 2017
Node.js base64
View base64.js
/*
* base64.js
*/
const base64 = {
encode: (plain) => {
return Buffer.from(plain || '').toString('base64');
},
decode: (encoded) => {
return Buffer.from(encoded || '', 'base64').toString('ascii');
@posquit0
posquit0 / pre-commit
Last active Aug 21, 2019
Git Pre Commit Hook for ESLint and Jest
View pre-commit
#!/usr/bin/env bash
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.jsx\?$')
BIN_PATH="$(git rev-parse --show-toplevel)/node_modules/.bin"
eslint() {
ESLINT="$BIN_PATH/eslint"
# Check for eslint
@posquit0
posquit0 / kmeans.py
Created Mar 19, 2017
k-menas with numpy
View kmeans.py
class KMeans(object):
"""K-Means clustring
"""
def __init__(self, k, init='forgy', max_iter=50):
self.k = k
self.init = init
self.max_iter = max_iter
def _init_centers(self):
@posquit0
posquit0 / chat.py
Created Oct 19, 2015
Simple Chat Server with Python (Not needed Client Interface)
View chat.py
#!/usr/bin/env python
# encoding: utf-8
from Queue import Queue
from SocketServer import BaseRequestHandler, ThreadingTCPServer
from datetime import datetime
import threading
ThreadingTCPServer.allow_reuse_address = True
@posquit0
posquit0 / gist:93200f7ca1ad3d0c943c
Created Apr 1, 2015
GDB with Python 2.7 in Ubuntu
View gist:93200f7ca1ad3d0c943c
apt-get install python2.7-dev python2.7
apt-get build-dep gdb
apt-get source gdb
cd gdb-*
sed -i -E "s|python3|/usr/bin/python2.7|" debian/rules
dpkg-buildpackage -uc -us -j8
dpkg-install ../*.deb
You can’t perform that action at this time.