This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://74.125.95.132/search?q=cache:81MAwvRRt4kJ:twitter.com/_why/status/3389695893 | |
programming is rather thankless. you see your works become replaced by superior works in a year. unable to run at all in a few more. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
import subprocess | |
import threading | |
import Queue | |
# c.f.: http://is.gd/2T1p | |
path = '/usr/bin/mplayer' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smtplib | |
from smtplib import SMTPException | |
from email.mime.text import MIMEText | |
config = { | |
'host': None, | |
'port': None, | |
'username': None, | |
'password': None, | |
'use_tls': False, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# test.py | |
@cmd('^$') | |
def index(): | |
# this is what shows up when you run python test.py | |
return "Welcome to test.py..." | |
@get('^hello (.+)$') | |
def hello(name): | |
# this shows up when you run python test.py hello <name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import berry | |
from berry import path, render, redirect | |
from models import Post | |
def index(): | |
posts = Post.query.all() | |
return render('index', {'posts': posts}) | |
path('^$').GET = index | |
def post(id): |
NewerOlder