Skip to content

Instantly share code, notes, and snippets.

Bae KwonHan darjeeling

Block or report user

Report or block darjeeling

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
darjeeling / gist:fe58e76e2ed7af6fa1b9
Created Jan 28, 2015
starbucks korea store list crawling
View gist:fe58e76e2ed7af6fa1b9
#!/usr/bin/env python
import bs4
import requests
import time
def main():
for sido_idx in range(1,18):
darjeeling /
Created Jul 18, 2012 — forked from dahlia/
PostgreSQL hstore + SQLAlchemy
""":mod:`hstore` --- Using PostgreSQL hstore with SQLAlchemy
.. note::
I released it under Public Domain. Feel free to use!
It provides :class:`Hstore` type which makes you to store Python
dictionaries into hstore columns in PostgreSQL. For example::
View gist:3340018
import os
if os.environ.has_key("PRODUCTION"):
'default': {
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
View gist:3340053
if __name__ == "__main__":
if os.environ.has_key("PRODUCTION"):
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "temporary.prod_settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "temporary.devel_settings")
from import execute_from_command_line
View gist:3528226
class Post(models.Model):
contents = models.TextField()
create_time = models.DateTimeField(auto_now_add=True)
writer = models.ForeignKey(User)
author = models.CharField(max_length=100, null=True)
has_attachments = models.BooleanField(default=False)
comments_count = models.IntegerField(default=0)
like_count = models.IntegerField(default=0)
like_string = models.CharField(max_length=100, default='')
is_deleted = models.BooleanField(default=False)
View gist:3923839
python -mwand.version --verbose
Wand 0.3.0
ImageMagick 6.6.9-7 2012-08-17 Q16
dj@djbhome:~/wand/wand$ python build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
darjeeling / gist:4022746
Created Nov 6, 2012
python korea facebook group offline meeting
View gist:4022746
Python Korea Facebook Group 에서 offline 미팅을 하고자합니다.
대략적으로 다음과 같은 순서로 하고자합니다.
* 자기소개
* Hyun-woo Park 님의 """SmartStudy 에서 장고 활용예"""
* Yeaji Shin 님의 """여성은 이렇게 코딩한다"""
* Hong Minhee 님의 """이거 쓰세요"""
* OST ( 그룹별로 모여서 농담 )
View gist:7182792
for c in 5,5,4,3,2,0,2,3,4,5,5:s=(c*' 'or'*')+'* '[:6-c];print s+s[-2::-1]
You can’t perform that action at this time.