Skip to content

Instantly share code, notes, and snippets.

View theeluwin's full-sized avatar
🎹
스콜라아이돌교수버튜버

Jinseok Seol theeluwin

🎹
스콜라아이돌교수버튜버
View GitHub Profile
@theeluwin
theeluwin / gom_downloader.py
Created February 23, 2020 06:41
곰자막 다운로드 스크립트 (죄송해요 곰앤컴퍼니 여러분)
# -*- coding: utf -*-
import os
import time
import logging
import argparse
import requests
from bs4 import BeautifulSoup
@theeluwin
theeluwin / clean_debug_stuff.py
Created January 13, 2020 15:16
인생 백업할때 소스코드만 백업합시다.
# -*- coding: utf-8 -*-
import os
import shutil
TARGET_PATH = ""
bad_dirnames = (
'venv',
@theeluwin
theeluwin / keep_tree.py
Created January 8, 2020 01:22
gitignore 되어있는 폴더 트리를 구조만 유지하고 싶을때 .keep을 추가해서 처리
# -*- coding: utf-8 -*-
import os
import subprocess
def entry():
for root, _, _ in os.walk('.', topdown=True):
if root == '.':
continue
@theeluwin
theeluwin / pytorch-runtime.Dockerfile
Last active November 12, 2019 04:33
파이토치 런타임 환경용 도커
# syntax=docker/dockerfile:experimental
# from
FROM pytorch/pytorch:1.2-cuda10.0-cudnn7-runtime
LABEL maintainer="Jamie Seol <theeluwin@gmail.com>"
# apt init
ENV PYTHONUNBUFFERED=1
ENV LANG=C.UTF-8
ENV TZ=Asia/Seoul
@theeluwin
theeluwin / .gitignore
Created October 4, 2019 06:13
python .gitignore sample
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
@theeluwin
theeluwin / template.tex
Last active May 8, 2019 13:35
My tex file for memo. Credit: http://cls.snu.ac.kr/node/12
\documentclass[12pt,a4paper]{article}
%\input proof
\usepackage{mathpazo}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{color}
\usepackage{epstopdf}
\usepackage{tabularx,ragged2e,booktabs,caption}
@theeluwin
theeluwin / .gitlab-ci.yml
Created May 4, 2019 13:49
My gitlab ci file for build-test-release-deploy ing django docker image.
image: docker:stable
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- apk update && apk add -y openssh-client
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan $DEVELOP_SERVER >> ~/.ssh/known_hosts
@theeluwin
theeluwin / ddolgi.py
Created April 18, 2019 05:25
A challenge.
# https://twitter.com/CppDDoLgi/status/1118731208790138880
# a = 6 b = 3 일 때 2 반환하고
# a = 7 b = 3 일 때 3 반환하는거 구현하고 싶은데
import multiprocessing
import torch.nn as nn
from tqdm import tqdm
from torch import Tensor
from torch.utils.data import Dataset
@theeluwin
theeluwin / shortcoder.py
Created April 5, 2019 15:38
Convert Instagram long id into shortcode and vice versa.
# -*- coding: utf-8 -*-
# ported from: https://gist.github.com/sclark39/9daf13eea9c0b381667b61e3d2e7bc11
class Shortcoder(object):
LOWER = 'abcdefghijklmnopqrstuvwxyz'
UPPER = LOWER.upper()
NUMBERS = '0123456789'
@theeluwin
theeluwin / registry.portainer.docker-compose.yml
Created March 13, 2019 05:26
docker registry + portainer
version: "3"
services:
registry:
image: registry:2
ports:
- 5000:5000
volumes:
- registry-data-local:/var/lib/registry
restart: always
portainer: