This file contains hidden or 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
| ## Get latency of service | |
| repeat 1000; curl --output /dev/null --silent --write-out '%{time_total} %{http_code}\n' localhost:7575/healthcheck && sleep 5 | |
| ## Get file name from path | |
| basename "${path_sample} | |
| ## For each path. | |
| find "${root_path}" -name "${pattern}" | while IFS= read -r path_result; do | |
| echo "${path_result}" | |
| done |
This file contains hidden or 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
| clean-notebooks: | |
| echo "Cleaning notebooks" | |
| find ./ -name "*.ipynb" | xargs python3 -m nbconvert --ClearOutputPreprocessor.enabled=True --inplace | |
| echo "Removing checkpoints" | |
| find . -type d -iname .ipynb_checkpoints -exec rm -r {} + |
This file contains hidden or 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
| convert_notebook() { | |
| input_path="${1}" | |
| output_path="${2}" | |
| extension="md" | |
| echo "Converting ${input_path} to Markdown" | |
| env ENV=test jupyter nbconvert --ExecutePreprocessor.timeout=180 --stdout --to notebook --execute "${input_path}" | | |
| jupyter nbconvert --stdin --to markdown | |
| file_name=$(basename "${input_path}") |
This file contains hidden or 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
| CHROME_SIGNING_KEY_URL="https://dl-ssl.google.com/linux/linux_signing_key.pub" | |
| CHROME_REPOSITORY_URL="https://dl.google.com/linux/chrome/deb/" | |
| CHROME_DRIVER_BIN="chromedriver" | |
| CHROME_DRIVER_ZIP="${CHROME_DRIVER_BIN}_linux64.zip" | |
| CHROME_DRIVER_URL="https://chromedriver.storage.googleapis.com/2.41/${CHROME_DRIVER_ZIP}" | |
| SOURCES_LIST_PATH="/etc/apt/sources.list.d" | |
| install_chrome() { | |
| curl -sS -o - ${CHROME_SIGNING_KEY_URL} | apt-key add | |
| echo "deb [arch=amd64] ${CHROME_REPOSITORY_URL} stable main" >>${SOURCES_LIST_PATH}/google-chrome.list |
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 hidden or 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
| #!/bin/bash | |
| if [ "$TRAVIS_BRANCH" == "master" ]; then | |
| pip install --upgrade twine | |
| python setup.py sdist | |
| python -m twine upload -u ${PYPI_USER} -p ${PYPI_PASSWORD} dist/* | |
| fi |
This file contains hidden or 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
| #!/bin/bash | |
| unit_tests() { | |
| pytest | |
| } | |
| package_validation() { | |
| pip install --upgrade twine | |
| python setup.py sdist | |
| validation_output=$(python -m twine check dist/*) |
This file contains hidden or 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 <iostream> | |
| #import <vector> | |
| using namespace std; | |
| void print_vector(vector<int> v) { | |
| for(const auto elem: v) { | |
| cout << elem << ' '; | |
| } |
This file contains hidden or 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 libc.math cimport sin, cos, pi, ceil, floor, pow | |
| from libc.stdlib cimport abort, malloc, free | |
| import numpy as np | |
| cimport numpy as np | |
| cimport cython | |
| from cython.parallel import prange, parallel | |
| cimport openmp | |
| cdef double get_pixel2d( |