Skip to content

Instantly share code, notes, and snippets.

View theeluwin's full-sized avatar
🍄
curseholic

Jinseok Seol theeluwin

🍄
curseholic
View GitHub Profile
@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:
@theeluwin
theeluwin / colors.py
Created January 21, 2019 08:05
color print
# origin: https://github.com/fabric/fabric/blob/1.14/fabric/colors.py
import os
def _wrap_with(code):
def inner(text, bold=False):
c = code
if os.environ.get('FABRIC_DISABLE_COLORS'):
# -*- coding: utf-8 -*-
import os
import json
import torch
import pickle
import requests
import numpy as np
import torch as t
import torch.nn as nn
@theeluwin
theeluwin / HighwaySpeech.py
Created December 6, 2017 04:52
ASR by CNN-Highway-RNN CTC
from model import *
class HighwaySpeech(DeepSpeech):
def __init__(self, rnn_type=nn.LSTM, labels="abc", rnn_hidden_size=1024, nb_layers=3, audio_conf=None, bidirectional=True):
super(HighwaySpeech, self).__init__()
# fixed-values
rnn_type = nn.LSTM
nb_layers = 3
for cdn