Skip to content

Instantly share code, notes, and snippets.

View tadeze's full-sized avatar
🎯
Focusing

Tadesse Zemicheal tadeze

🎯
Focusing
View GitHub Profile
@tadeze
tadeze / rolling_window.py
Created April 19, 2018 23:15 — forked from seberg/rolling_window.py
Multidimensional rolling_window for numpy
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
@tadeze
tadeze / 0_reuse_code.js
Created September 3, 2016 03:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tadeze
tadeze / thankyou.py
Last active May 26, 2016 06:49 — forked from naiquevin/thankyou.py
Python script to thank people who sent birthday wishes on facebook
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
"""
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