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
brew update | |
brew link yasm | |
brew link x264 | |
brew link lame | |
brew link xvid | |
brew install ffmpeg | |
ffmpeg wiki: | |
https://trac.ffmpeg.org/wiki/Encode/MP3 |
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
""" | |
System/Runtime Requirements: | |
>=Python3.7 | |
Linux / Mac | |
>=2 CPU Cores | |
Must pip install to use `pd_processit`: | |
pickle5, tqdm, numpy, pandas | |
To use this file, have processit.py in same folder as pd_processit.py (this file). |
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
""" | |
################ | |
# Installation # | |
################ | |
memory_profiler: | |
pip install memory-profiler | |
pympler: | |
pip install pympler |
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
""" | |
Modified file (<VIRTUALENV>/lib/python3.7/site-packages/sqlalchemy/dialects/mssql/base.py) | |
for sqlalchemy==1.3.7 to get it to work with sqlacodegen==2.1.0 | |
for an Azure SQL Data Warehouse server using the following get_engine function: | |
``` | |
def get_engine(username=None, password=None, hostname=None, database=None) -> Engine: | |
from skykick_ds.runconfig import RunConfig | |
username = username or RunConfig.sql_username |
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
""" | |
from .diskcached import clear_all, diskcached | |
@diskcached() | |
def cached_fn(x): | |
print(x) | |
return x + 2 | |
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
""" | |
NOTE: THIS IS NOT MY CODE. I'M JUST SAVING IT HERE. | |
--------------------------------------------------- | |
Easily put time restrictions on things | |
Note: Requires Python 3.x | |
Usage as a context manager: | |
``` | |
with timeout(10): | |
something_that_should_not_exceed_ten_seconds() |
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
""" | |
pip install \ | |
pandas \ | |
sqlalchemy \ | |
pyarrow | |
""" | |
import json | |
import os | |
import time |
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
""" | |
pip install \ | |
numpy \ | |
pandas \ | |
numba | |
""" | |
import time | |
from dataclasses import dataclass | |
from functools import wraps |
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
""" | |
pip install \ | |
bigquery-schema-generator \ | |
google-api-python-client \ | |
pandas-gbq \ | |
pandas | |
""" | |
import logging | |
import os |
NewerOlder