Install Homebrew
Install a few things with homebrew:
Notice that some packages give you information at the end, read it carefully. To recall that info use brew info like this: $ brew info postgresql
$ brew install python --universal
| #Global stuff | |
| #First, install memcached and libmemcached using homebrew. This may require gcc, which may require you to update your XCode if it's not up to date. | |
| brew install memcached | |
| brew install libmemcached | |
| #Python stuff, inside your virtual environment | |
| pip install pylibmc, etc. |
| This is free and unencumbered software released into the public domain. | |
| Anyone is free to copy, modify, publish, use, compile, sell, or | |
| distribute this software, either in source code form or as a compiled | |
| binary, for any purpose, commercial or non-commercial, and by any | |
| means. | |
| In jurisdictions that recognize copyright laws, the author or authors | |
| of this software dedicate any and all copyright interest in the | |
| software to the public domain. We make this dedication for the benefit |
Install Homebrew
Install a few things with homebrew:
Notice that some packages give you information at the end, read it carefully. To recall that info use brew info like this: $ brew info postgresql
$ brew install python --universal
| """ | |
| One of our editors thought it would be fun to run a year-end list of our | |
| most-shared stories. This script uses the Facebook API to fetch stats for | |
| a given list of URLs. | |
| The script will: | |
| - create a csv file that's named based on the value of TOP_URLS_FILE. This | |
| file logs URLs that have enough shares to surpass your TOP_THRESHHOLD number. |
| import random | |
| class Markov(object): | |
| def __init__(self, open_file): | |
| self.cache = {} | |
| self.open_file = open_file | |
| self.words = self.file_to_words() | |
| self.word_size = len(self.words) | |
| self.database() |