Skip to content

Instantly share code, notes, and snippets.

View dohvis's full-sized avatar
📝

Kim Dohyeon dohvis

📝
View GitHub Profile
# Define triangle's type
ACUTE = 0
RIGHT_ANGLED = 1
OBTUSE = 2
FAIL = 3
def classify_triangle(x, y, z):
if z >= (x + y):
return FAIL
@dohvis
dohvis / b8100.py
Last active July 22, 2017 20:48
8100번 승하차 기록
from pymongo import MongoClient
from datetime import datetime as d, timedelta
client = MongoClient('mongodb://user:passwd@localhost:33066/DATABASE')
db = client.busDB
bojung = '228001003'
ori = '206000040'
migum = '206000087'
jungja_station = "206000725"
bundang = '206000082'
@dohvis
dohvis / install-uwsgi-nginx.sh
Last active July 22, 2017 18:18 — forked from puilp0502/install-uwsgi-nginx.sh
Install uWSGI and nginx
#!/bin/bash
# uWSGI & nginx installation script
# Created at 2017-06-27 by Frank Yang (https://github.com/puilp0502)
# Tested on Ubuntu Server 16.04 LTS
# Check if user is root
if [[ $UID -ne '0' ]]; then
echo "This script needs to be run as root; exiting..."
exit 0
@dohvis
dohvis / aladin.py
Last active December 1, 2018 01:54
goodreads book add helper
import re
import sys
from requests import get
from requests_html import (
HTMLSession,
)
s = HTMLSession()
url = sys.argv[1]
@dohvis
dohvis / get_buses.py
Created September 23, 2018 17:34
버스 정류장 시간대별 승하차 인원 분석
from datetime import datetime
from requests import post
import pymongo
import sys
# 8100: 234000878
# 8110: 204000082
# m4102: 234001159
def get_buses(bus_no):
@dohvis
dohvis / spec.abc
Created January 11, 2019 19:59
Language design
import get from requests
import requests
fn funcName(a: int, b: int) {
var number: int
obj := { a: 1}
var { a } = obj
var newObj = { a } // a: 1
print(newObj)
}