超巨大な Markdown ファイルをアップロードしたら、 HTML の生成がタイムアウトするらしく、
OH NO!
This page is taking way too long to load.
# coding: utf8 | |
from pit import Pit | |
from twython import Twython | |
def pit_config(key='twitter.bot.keys'): | |
conf = Pit.get(key, { | |
'require': { | |
'API_KEY': 'api key', |
#!/usr/bin/env python | |
# coding: utf8 | |
from twythonredispubsub import RedisPubSubStreamer | |
if __name__ == '__main__': | |
channel = '<channnel name here>' | |
try: | |
for tweet in RedisPubSubStreamer.get_tweet_via_redis(channel): |
# coding: utf8 | |
import types | |
def unstructure(structured, usedictkey=True, usedictvalue=True): | |
if isinstance(structured, dict): | |
for keys, values in structured.iteritems(): | |
if usedictkey: | |
for key in unstructure(keys): | |
yield key |
# coding: utf8 | |
import oauth2 as oauth | |
import urllib | |
import urlparse | |
def xauth_to_oauth( | |
consumer_key, consumer_secret, screen_name, password, | |
API_URL='https://api.twitter.com/oauth/access_token', | |
): |
('todict1', 2.637644052505493) | |
('todict2', 2.0221450328826904) | |
('todict3', 3.7830700874328613) | |
('todict4', 2.580557107925415) | |
('todict5', 2.2164390087127686) | |
('todict6', 2.159787178039551) |
# coding: utf-8 | |
from __future__ import print_function, unicode_literals | |
import csv | |
import sys | |
def to_md(row): | |
return '|' + '|'.join(row) + '|' | |
cr = csv.reader(sys.stdin, delimiter=b'\t') |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>カードのスコア管理的なやつを作ってる</title> | |
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<!-- | |
<script src="https://raw.githubusercontent.com/carhartl/jquery-cookie/master/jquery.cookie.js"></script> | |
--> | |
<script> |
ハッカー,クラッカー | |
ウィルス,細菌 | |
考える,思う | |
アメリカ,カナダ | |
インターネット,World Wide Web,Internet Explorer |