Skip to content

Instantly share code, notes, and snippets.

View wapj's full-sized avatar

Seungkyoo wapj

View GitHub Profile
@wapj
wapj / students_test_data.sql
Created December 6, 2020 15:43
girl_group_datas
CREATE TABLE girl_group
(
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(32) NOT NULL,
debut DATE NOT NULL,
hit_song_id INT
);
CREATE TABLE song
(
@wapj
wapj / students_test_data.py
Last active December 1, 2020 23:06
파이썬으로 테스트 데이터 만들기
"""
https://blog.gyus.me/2020/generate-sample-data-with-python/ 에 관련 글이 있습니다.
student_score DDL
create table student_score
(
uid int auto_increment
primary key,
name varchar(30) null comment '이름',
@wapj
wapj / pycon2018_slides.py
Last active August 20, 2018 10:30
pycon2018_slides.py
import requests
from bs4 import BeautifulSoup
URL = 'https://www.pycon.kr/2018/program/schedule/'
def get_html(url):
r = requests.get(url)
if r.status_code == 200:
return r.text
return None
import json
import boto3
client = boto3.client('rds')
from pprint import pprint
def title(txt):
print("========================================================")
@wapj
wapj / python3-daemon
Last active June 4, 2017 12:14
PYTHON3 DAEONIZE
'''
***
Modified generic daemon class
Modified for python3
***
Author: http://www.jejik.com/articles/2007/02/
a_simple_unix_linux_daemon_in_python/www.boxedice.com
License: http://creativecommons.org/licenses/by-sa/3.0/
Changes: 23rd Jan 2009 (David Mytton <david@boxedice.com>)
- Replaced hard coded '/dev/null in __init__ with os.devnull
package main
import (
"io"
"log"
"os"
"runtime"
"time"
"path/filepath"
"strconv"
package main
import (
"fmt"
"time"
"sort"
"math/rand"
)