This file contains 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
#!/usr/bin/env python | |
# coding: utf-8 | |
import tweepy | |
import datetime | |
consumer_key = "YOUR CONSUMER KEY" | |
consumer_secret = "YOUR CONSUMER SECRET KEY" | |
access_token = "YOUR ACCESS TOKEN" | |
access_secret = "YOUR ACCESS SECRET" |
This file contains 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
#-*- coding: utf-8 -*- | |
def cels2fahr(cels) | |
fahr = cels * 9 / 5 + 32 | |
p fahr | |
end | |
cels2fahr(10) #=> 50 | |
cels2fahr(20) #=> 68 |
This file contains 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
#!/usr/bin/env ruby | |
#-*- coding: utf-8 -*- | |
a = Array.new | |
100.times do |i| | |
a << i + 1 | |
end |
This file contains 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
#!/usr/bin/env python | |
# coding: utf-8 | |
#convert string to ascii code. | |
S = ["A","B","G"] | |
for i in S: | |
print ord(i) | |
This file contains 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
#!/usr/bin/env python | |
# coding: utf-8 | |
import pivotal | |
import tweepy | |
from bs4 import BeautifulSoup | |
import datetime as d | |
from dateutil.parser import parse | |
import pytz | |
TOKEN = 'YOUR_TOKEN' |
This file contains 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
#!/usr/bin/env python | |
# coding: utf-8 | |
import facebook | |
import tweepy | |
import urllib | |
#setting twitter | |
consumer_key = "YOUR_CONSUMER_KEY" | |
consumer_secret = "YOUR_SECRET_KEY" | |
access_token = "YOUR_ACCESS_TOKEN" | |
access_secret = "YOUR_ACCESS_SECRET" |
This file contains 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
for i in range(100): | |
if i % 15 == 0: | |
print "FizzBuzz" | |
elif i % 3 == 0: | |
print "Fizz" | |
elif i % 5 == 0: | |
print "Buzz" | |
else: | |
print i |
This file contains 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
#!/usr/bin/env python | |
# coding: utf-8 | |
import urllib | |
import json | |
booklogID = "YOUR_BOOKLOG_ID" | |
url = 'http://api.booklog.jp/json/%s?category&status=1&category=0&count=1000'% booklogID | |
f = urllib.urlopen(url) | |
obj = json.load(f) | |
books = obj['books'] |
This file contains 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
#!/usr/bin/env python | |
# coding: utf-8 | |
import sys | |
import tweepy | |
from bs4 import BeautifulSoup | |
import urllib | |
import urllib2 | |
import random | |
#YahooAPIのID(各自で取得) |
This file contains 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
#!/usr/bin/env python | |
# coding: utf-8 | |
import sqlite3 | |
import tweepy | |
import urllib | |
import re | |
import sys | |
import urllib2 | |
consumer_key = "YOUR_CONSUMER_KEY" |
OlderNewer