This file contains hidden or 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
| def rolling_window(array, window=(0,), asteps=None, wsteps=None, axes=None, toend=True): | |
| """Create a view of `array` which for every point gives the n-dimensional | |
| neighbourhood of size window. New dimensions are added at the end of | |
| `array` or after the corresponding original dimension. | |
| Parameters | |
| ---------- | |
| array : array_like | |
| Array to which the rolling window is applied. | |
| window : int or tuple |
This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or 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
| import sys | |
| from urllib import urlencode | |
| import requests | |
| from urlparse import urlparse, parse_qs | |
| from random import choice | |
| import re | |
| self_id = None # your facebook id here | |
| utc_bday = None # utc timestamp of your birthday |
This file contains hidden or 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
| """ | |
| Code modified from https://jessesw.com/Data-Science-Skills/ | |
| Jeremy Karnowski August 30, 2015 | |
| """ | |
| from bs4 import BeautifulSoup # For HTML parsing | |
| import urllib2 # Website connections | |
| import tldextract # Extracts domain information | |
| import re # Regular expressions | |
| from time import sleep # To prevent overwhelming the server between connections |