Skip to content

Instantly share code, notes, and snippets.

📖
Working on a book!

Nitin Madnani desilinguist

📖
Working on a book!
Block or report user

Report or block desilinguist

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@desilinguist
desilinguist / facebook-pnas.md
Last active Aug 29, 2015
Analyzing Facebook's PNAS paper on Emotional Contagion
View facebook-pnas.md

The Internet has been abuzz today about Facebook data scientists publishing a paper in the Proceedings of the National Academy of Sciences describing experiments in which they deliberately removed posts from users' news feeds. I decided to actually read the paper, describe what was actually done, and write up some of my observations both as a scientist as well as a Facebook user. I try my best to use language that should be accessible to almost everyone, not just other scientists.

What they did

The Facebook data scientists selected 689,003 people who viewed Facebook in English as subjects for this experiment. The experiments took place during a week between January 11th through 18th, 2012. The basic idea of the experiment was to measure the effect of removing positive (or negative) posts from the people's news feeds on how positive (or negative) their own posts were in the days after these changes were made.

Now on to the details of the experiment. The

@desilinguist
desilinguist / download_videos.sh
Last active Aug 29, 2015
Downloading YouTube videos from titles in a filename.
View download_videos.sh
python geturls.py --f test.txt | cut -d'|' -f2 | youtube-dl -a -
@desilinguist
desilinguist / tokenize.doctest
Created Feb 14, 2012
Latest version of treebank.py that fixes comma and colon errors when followed by numbers. Also the latest version of tokenize.doctest that tests for these errors.
View tokenize.doctest
.. Copyright (C) 2001-2012 NLTK Project
.. For license information, see LICENSE.TXT
>>> from nltk.tokenize import *
Regression Tests: Treebank Tokenizer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Some test strings.
@desilinguist
desilinguist / tokenize.doctest
Created Dec 21, 2011
Fixed Treebank Tokenizer for NLTK
View tokenize.doctest
.. Copyright (C) 2001-2012 NLTK Project
.. For license information, see LICENSE.TXT
>>> from nltk.tokenize import *
Regression Tests: Treebank Tokenizer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Some test strings.
You can’t perform that action at this time.