This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import sys | |
from requests import get | |
from requests_html import ( | |
HTMLSession, | |
) | |
s = HTMLSession() | |
url = sys.argv[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from requests import post | |
import pymongo | |
import sys | |
# 8100: 234000878 | |
# 8110: 204000082 | |
# m4102: 234001159 | |
def get_buses(bus_no): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
} |
OlderNewer