Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.
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
#!/usr/bin/env python | |
# Author: Chris Eberle <eberle1080@gmail.com> | |
# Watch for any changes in a module or package, and reload it automatically | |
import pyinotify | |
import imp | |
import os | |
class ModuleWatcher(pyinotify.ProcessEvent): | |
""" |
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
# -*- coding: utf-8 -*- | |
import datetime | |
from numpy import asarray, ceil | |
import pandas | |
import rpy2.robjects as robjects | |
def stl(data, ns, np=None, nt=None, nl=None, isdeg=0, itdeg=1, ildeg=1, | |
nsjump=None, ntjump=None, nljump=None, ni=2, no=0, fulloutput=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
#!/usr/bin/python | |
import re | |
import sys | |
def removeComments(text): | |
""" remove c-style comments. | |
text: blob of text with comments (can include newlines) | |
returns: text with comments removed | |
""" | |
pattern = r""" |
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 streamlit as st | |
import pandas as pd | |
import numpy as np | |
def display_dataframe_quickly(df, max_rows=5000, **st_dataframe_kwargs): | |
"""Display a subset of a DataFrame or Numpy Array to speed up app renders. | |
Parameters | |
---------- | |
df : DataFrame | ndarray |
- Install Docker CE for Windows
- Go to Docker for Windows Settings -> General and enable
Expose daemon on tcp://localhost:2375 without TLS
.
This will enable the Docker remote API for requests, coming from localhost, not from another computer in your network. A TLS secured version is not yet supported in Docker for Windows. See docker/for-win#453 for more information. I also tried a daemon.json file with options tlscacert, tlscert, tlskey and tlsverify, but Docker for Windows crashed on booting.
- Enable Developer Mode as described in Enable your device for development
- Install WSL by running the following in Powershell as Administrator: `E
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
# Start a Scylla cluster | |
######################## | |
docker run --name some-scylla -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 | |
# Do not use the above --api-address for production. Exposing API IP is not secure. | |
SEED=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' some-scylla) | |
echo $SEED | |
docker run --name some-scylla2 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED" | |
docker run --name some-scylla3 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED" |
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
# The Best Medium-Hard Data Analyst SQL Interview Questions | |
By Zachary Thomas ([zthomas.nc@gmail.com](mailto:zthomas.nc@gmail.com), [Twitter](https://twitter.com/zach_i_thomas), [LinkedIn](https://www.linkedin.com/in/thomaszi/)) | |
**Tip: **See the Table of Contents (document outline) by hovering over the vertical line on the right side of the page | |
## Background & Motivation | |
> The first 70% of SQL is pretty straightforward but the remaining 30% can be pretty tricky. |
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
""" Utils for S3 | |
pip install utilmy python-fire | |
##### Install LocalStack: | |
pip install localstack | |
Start LocalStack: Use the following command to start LocalStack with S3 service: | |
localstack start --services=s3 |