Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified HW0.ipynb
100644 → 100755
Empty file.
Empty file modified Procfile
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified Scraping and API Calls.pptx
100644 → 100755
Empty file.
Empty file modified Scraping and API Calls.txt
100644 → 100755
Empty file.
Empty file modified Setup.pptx
100644 → 100755
Empty file.
Empty file modified app.py
100644 → 100755
Empty file.
Empty file modified img/HarvardNow_logo-01.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified img/HarvardNow_logo-02.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified requirements.txt
100644 → 100755
Empty file.
Empty file modified services/MBTA/1
100644 → 100755
Empty file.
Empty file modified services/MBTA/MBTA.py
100644 → 100755
Empty file.
Empty file modified services/MBTA/__init__.py
100644 → 100755
Empty file.
Empty file modified services/MBTA/generate/.gitignore
100644 → 100755
Empty file.
Empty file modified services/MBTA/generate/README.md
100644 → 100755
Empty file.
Empty file modified services/MBTA/generate/generate.py
100644 → 100755
Empty file.
Empty file modified services/__init__.py
100644 → 100755
Empty file.
Empty file.
42 changes: 42 additions & 0 deletions services/strongestChessPlayer/strongestChessPlayer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import urllib2, urllib
import re
from bs4 import BeautifulSoup

#####################################
## Word of the Day Function ##
#####################################

def getWordData():
url = '2700chess.com'
hdr = {'User-Agent': 'Chrome'}
req = urllib2.Request(url,headers=hdr)
website = urllib2.urlopen(req)
soup = BeautifulSoup(website.read(), 'html.parser')

try:
playerHTML = soup.find_all("span", {"class" : "hidden searched"})[0]
player = playerHTML.get_text()
ratingHTML = soup.find_all("td", {"class" : "live_standard_rating"})[0].strong
rating = ratingHTML.get_text()

body = player + ": " + rating

except Exception, e:
print str(e)
return "Could not find top chess player info."

return body

############################
## Top-Level ##
############################

def makeSpecial():
s = 'This will get the current highest rated chess player.'
return s

## return proper format
special = makeSpecial()

def eval():
return getWordData()
Empty file modified services/weather/__init__.py
100644 → 100755
Empty file.
Empty file modified services/weather/weather.py
100644 → 100755
Empty file.
Empty file modified services/wordOfTheDay/__init__.py
100644 → 100755
Empty file.
Empty file modified services/wordOfTheDay/wordOfTheDay.py
100644 → 100755
Empty file.
Empty file modified test.py
100644 → 100755
Empty file.