Tag : Python

Title User Language Tags Description Date
Pandora for Food – Crawl Yelp for personalized recommendations richyeung Python

This is just a fun little script that acts like a Pandora for food. Its implementation is simplistic. You choose a set of restaurants on Yelp that you like, and the script finds all reviewers that gave these restaurants 5 stars. You trust these reviewers because they share your awesome taste in food. The script then spits out all restaurants that these "trusted reviewers" also reviewed, and their rating for each review.

You would need a few additional lines of code to turn the scrapy output into a sorted list of restaurants. For example, the code below will sort restaurants by number of "trusted reviewers": \n import pandas \n reviews = pandas.readcsv('scrapyoutput.csv') fiveStarReviews = reviews[reviews['rating']==5] fiveStarReviews.restaurant.value_counts()

There are countless ways you can improve on this. One obvious one is you would want to normalize by total restaurant reviews. You would probably also want to pull in restaurant category information.

Happy food hunting!

May 31
Email to HTML Script drydenlong Python

A script to parse emails and return HTML suited for email blast programs

May 15
LJAutoComment aruseni Python

This class is used to automatically update a LiveJournal blog’s RSS feed, detect new entries and post a comment if the entry is new enough (i.e. is posted in a given period of time from now, for example not older than 1 hour)

Example:

comment = u"Первый комментарий."

engine = LJAutoComment('http://asena.livejournal.com/data/rss', 'user', 'password', comment, 1)
engine()
May 3
Scrape list of all NBA players asimmittal Python

This is a python script that allows you to scrape historical player names and links from NBA.com historical data

April 28
Synesthor Thinks (get a color from colorrrs.com) nerdfiles Python

alias synesthor_thinks="py /Users/nerdfiles/Tools/colorrrs/colorrrs.py | pbcopy"

February 2
Clean files/directory by time. djmornyc Python

*Does not check permissions. python cleanFiles.py --directory=/home/win98/tmp/ --ageInDays=2

December 15
Python main with options ssoton Python

Snippet to show how works optparse module to add optoins when it is called by command line

November 29
Filter Signals using scipy leonpalafox Python

This portion of code allows to do bandpass filtering over time series

November 26
Appindicator facade ssoton Python

snippet to show appindicator problem

November 22
Python simple thread manager ytech Python

A python static class that handles simple thread management.

November 18
Python - Basic Main Structure denakitan Python

Extremely simple snippet showing the basic structure of a Python program.

October 25
Simple IRC bot with SSL zhyar Python

This is a simple IRC bot connecting with SSL.

October 1
Example of web parser zhyar Python

Simple web parser using urllib and re libs.

October 1
Simple ID3 tagger zhyar Python

Require the ID3 lib. Place the script in the directory containing the mp3 files.

October 1
Random alphanumeric string generator zhyar Python

Returns 5 random alphanumeric strings of arbitrary size.

October 1