Skip to content

Instantly share code, notes, and snippets.

View yonghanjung's full-sized avatar

Yonghan Jung yonghanjung

View GitHub Profile
/* MY code, solving the Try_catch problem */
@yonghanjung
yonghanjung / 00_1. Code Review.cpp
Last active December 20, 2015 01:18
Code Study
/* To study Other good Codes
@yonghanjung
yonghanjung / Class
Last active December 20, 2015 14:19
이론 리뷰
Class 는 Structs 의 확장된 형태로, 함수까지도 담을 수 있다.
Object는 Class안에 들어있는 것을 말한다. 즉, int number 에서 int를 class, number를 object로 볼 수 있다.
class class_name {
access_specifier_1:
member1;
access_specifier_2:
member2;
...
} object_names;
import random
def main():
balls = range(1,46)
random.shuffle(balls)
print sorted(balls[0:6])
if __name__ == '__main__':
main()
import mechanize
import urllib
from bs4 import BeautifulSoup
import unicodedata
import csv
def parserparser(url):
htmlread = mechanize.urlopen(url)
htmltext = htmlread.read()
@yonghanjung
yonghanjung / inheritance.py
Last active August 29, 2015 14:04
멋쟁이사자 클래스
# Object-oriented programming intro
# Adapted from MIT 6.01 course notes (Section 3.5)
# http://mit.edu/6.01/mercurial/spring10/www/handouts/readings.pdf
class Staff601:
course = '6.01'
building = 34
room = 501
def salutation(self):
# -*- coding: utf-8 -*-
def find_all_paths(graph, start, end, path=[]):
path = path + [start]
if start == end:
return [path]
if not graph.has_key(start):
return []
paths = []
for node in graph[start]:
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <cstdlib>
#include <cmath>
#define MAX_TOK 10
using namespace std;
@yonghanjung
yonghanjung / EM_Algorithm.cpp
Created November 18, 2014 05:43
EM Algorithm
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <cstdlib>
#include <cmath>
#define MAX_TOK 10
#define PI 3.14159265359
// g++ -std=c++11 $(pkg-config --cflags --libs opencv) Letter_Detect_ver0.0.cpp -o letter
// "A" 2, 6, 7, 85, 10
// "B", 1, 3, 6, 7, 8, 10
// "C" 1, 3, 7, 10
// "D" 0, 2, 3, 4, 5, 6, 7, 8, 10
// "E": 1, 3, 4, 5, 7, 8, 9, 10
/* ============== Library ================= */