Install Docker Desktop for Windows https://hub.docker.com/editions/community/docker-ce-desktop-windows
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 hashlib | |
import pandas as pd | |
def split_train_test_by_id(data, test_ratio=0.2, id_column=None, hash=hashlib.md5): | |
""" | |
Reproducible train test split: uses hash of string concatenation of observation | |
""" | |
def _test_set_check(identifier, test_ratio, hash): | |
return ord( hash(identifier).digest()[-1] ) < 256 * test_ratio |
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
source /etc/vim/vimrc | |
set tabstop=4 " TAB width | |
set softtabstop=4 " TAB columns | |
set expandtab " Expand TABs to spaces | |
set shiftwidth=4 " Indentation width | |
" Remember last position | |
if has("autocmd") |
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
# Following official howto at: | |
# https://kubernetes.io/docs/tasks/tools/install-minikube/ | |
set -e | |
ret=$(sysctl -a | grep -E --color 'machdep.cpu.features' | sed -n 's/.*\(VMX\).*/\1/p') | |
if [[ $ret == 'VMX' ]]; then | |
echo 'VT-x feature is enabled' | |
else | |
echo 'VT-x feature is NOT enabled' |
You will find template of required files (requirements.txt
, requirements-test.txt
, project_package/base.py
, tests/base_test.py
, python-app.yml
) at the end of this gist.
- Add base functionality and test files:
project_package/base.py
tests/base_test.py
- Add test requirements
requirements-test.txt
- Check whether your folders and files structure looks like:
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 bash | |
set -e | |
BLOGNAME=${1:-myblog} | |
echo "building $BLOGNAME" | |
mkdir $BLOGNAME | |
# bundle initialization and local configuration |
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
# Python3 | |
VENV_NAME=.venv | |
python3 -m venv $VENV_NAME --copies | |
. ${VENV_NAME}/bin/activate | |
python -m pip install --upgrade pip | |
# Python 2 |