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
"""Rate limiting monkey patch for Sentry error reporting SDK.""" | |
from datetime import datetime | |
from typing import Callable | |
import sentry_sdk | |
class RateLimit: | |
def __init__(self, limit: int = 100, period: int = 60 * 60): |
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
if [ -z $1 ]; then echo "Specify branch name"; exit; fi | |
git checkout master | |
git pull origin master | |
git checkout $1 | |
git merge master | |
git checkout master | |
out=`git diff master $1` | |
if [ -z "$out" ]; then | |
git branch -D $1 | |
else |
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
""" | |
Implements Apriori algorithm as defined in https://www.slideshare.net/INSOFE/apriori-algorithm-36054672 | |
Usage: | |
from apriori import apriori | |
dataset = [ | |
[1, 2], | |
[2, 3], |
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
sa ri1 ga1 ma1 pa tha1 ni1 sa | |
sa ri1 ga1 ma1 pa tha1 ni2 sa | |
sa ri1 ga1 ma1 pa tha1 ni3 sa | |
sa ri1 ga1 ma1 pa tha2 ni2 sa | |
sa ri1 ga1 ma1 pa tha2 ni3 sa |