Skip to content

Instantly share code, notes, and snippets.

View YUChoe's full-sized avatar

Yong-uk Choe YUChoe

View GitHub Profile
@YUChoe
YUChoe / flask_gunicorn_app.py
Last active June 25, 2018 02:24 — forked from KatiRG/flask_gunicorn_app.py
Running Flask with Gunicorn
# coding: utf-8
# This gist shows how to integrate Flask into a
# custom Gunicorn-WSGI application described
# here: http://docs.gunicorn.org/en/stable/custom.html
from __future__ import unicode_literals
import multiprocessing
import gunicorn.app.base
from gunicorn.six import iteritems
@YUChoe
YUChoe / sid_rev.py
Last active August 29, 2015 14:08 — forked from idhunter/sid_rev.py
for line in open('a.txt'):
# print line
a_id = line.find("sid:")
a_rev = line.find("rev:")
# print a_id
# print a_rev
print line[a_id+4:a_rev-2]
print line[a_rev+4:-3]
for line in open('b.txt'):