- lxml - Pythonic binding for the C libraries libxml2 and libxslt.
- boto - Python interface to Amazon Web Services
- Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
- Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
- PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
- Celery - Task queue to distribute work across threads or machines.
- pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.
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
/* | |
Render embeds inline in Live Preview mode | |
Source: https://gist.github.com/asdfgeoff/e6116873daa81ae92a6755af1d3c19e5 | |
*/ | |
/*********** | |
BLOCK EMBEDS | |
************/ | |
/* Make a bunch of block-level elements involved in embed display as inline */ |
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 click | |
from pathlib import Path | |
from subprocess import call, check_output | |
from tqdm import tqdm | |
@click.command() | |
@click.argument('directory', type=click.Path(exists=True)) | |
@click.option('--recursive', is_flag=True, help='Recursive') | |
@click.option('--file-ext', help='File format to process') | |
def main(directory, file_ext='mp4', recursive=False): |
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 typing import Callable, Union | |
import numpy as np | |
import pandas as pd | |
from sklearn.feature_extraction.text import CountVectorizer | |
from sklearn.utils.validation import check_X_y, check_array | |
from IPython.display import display | |
array_like = Union[list, np.ndarray] | |
matrix_like = Union[np.ndarray, pd.DataFrame] |
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 typing import Optional, Union | |
import numpy as np | |
import pandas as pd | |
from sklearn.linear_model import LinearRegression, LogisticRegression | |
from sklearn.base import BaseEstimator | |
from sklearn.utils.estimator_checks import check_estimator | |
from sklearn.utils.validation import check_X_y, check_array, check_is_fitted | |
from lightgbm import LGBMClassifier, LGBMRegressor |
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
{%- extends 'full.tpl' -%} | |
// Source: http://damianavila.github.io/blog/posts/mimic-the-ipython-notebook-cell-execution.html | |
{% block input_group -%}/Users/geoffruddock/Library/Jupyter/nbconvert/templates | |
<div class="input_hidden"> | |
{{ super() }} | |
</div> | |
{% endblock input_group %} | |
{%- block header -%} |
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 datetime as dt | |
from typing import List, Tuple | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import matplotlib.ticker as plticker | |
from scipy.stats import norm | |
plt.rcParams['figure.facecolor'] = 'white' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 airflow.operators.python_operator import PythonOperator | |
class SQLTemplatedPythonOperator(PythonOperator): | |
""" Extend PythonOperator to receive a templated SQL query and also to display it in the "Rendered Template" tab in Airflow's UI. | |
This is very helpful for troubleshooting specific task instances, since you can copy a propertly formatted query directly from | |
the web UI rather than copying the contents of "templates_dict" and parsing it manually. | |
Args: |