This file contains 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 json | |
import time | |
import zipfile | |
from typing import Dict, List, Optional, Tuple, Union | |
from zipfile import BadZipFile | |
from torch import nn | |
import torch | |
from transformers import AutoModel, AutoTokenizer, AutoConfig, T5Config | |
from sentence_transformers import SentenceTransformer | |
import sentence_transformers |
This file contains 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
# ds dev stuff | |
data/ | |
notebooks_dev/ | |
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class |
This file contains 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 chunks(l, n): | |
return [l[i:i+n] for i in range(0, len(l), n)] | |
def do_job(job_id, stock_pairs, data_slice): | |
all_prediction_df = [] | |
prediction_for_upcoming_week(data_slice, stock_pairs, job_id=job_id) | |
return pd.concat(all_prediction_df) | |
def dispatch_jobs(data, job_number, pairs): |
This file contains 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
.git/hooks/pre-push | |
^new file | |
chmod +x pre-push | |
#!/bin/bash | |
protected_branch='master' | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') |
This file contains 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
# create | |
python -m venv . | |
# activate | |
source /bin/activate |
This file contains 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
sudo du -hsx /* | sort -rh | head -n 40 |
This file contains 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
ls -F |grep -v / | wc -l |
This file contains 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
pyenv virtualenv 2.7.10 my-virtual-env-2.7.10 | |
Need to run - pyenv install 3.6.5 if the python version is not installed |
This file contains 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
with most_recent_subscription as ( | |
select | |
user_id, | |
max(id) as subscription_id | |
from alooma.subscriptions | |
group by 1 | |
), | |
weekly_minutes as ( | |
select | |
a.user_id, |
This file contains 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
--waitlist | |
select | |
distinct | |
us.name, | |
us.email, | |
c.code as pricing_plan, | |
c.amount, | |
u.created_at::date as entered_credit_card_at | |
from user_events u | |
join coupons c |
NewerOlder