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 timeit | |
import numpy | |
def _encode(msg): | |
# simple but slow | |
ones = numpy.array(msg) == 1 | |
encoded = [] | |
offset = 0 | |
while True: |
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 functools | |
import time | |
from typing import Any, Callable | |
import pandas | |
def df_cache(f: Callable[..., Any]) -> Callable[..., Any]: | |
functools.wraps(f) |
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
# repo1 | |
# | repo2 | |
git subtree split --prefix repo2 --branch repo2_update --onto origin/master | |
git subtree push --prefix repo2 <repo2_url> repo2_update | |
cd ~/repo2 # (NOT the subtree) | |
git fetch origin | |
git checkout repo2_update | |
git rebase origin/master | |
git push --force origin repo2_update |
OlderNewer