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
# At least in the good old days, declaring apt "frontend" as `noninteractive` used to be necessary, | |
# I don't know if that still applies, but I keep doing it anyways...doesn't hurt. | |
# Same thing for `apt-get clean`, not necessary anymore but I keep it there. | |
# (https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get) | |
RUN DEBIAN_FRONTEND='noninteractive' && \ | |
apt-get update && \ | |
apt-get install -y vim && \ | |
apt-get clean && rm -rf /var/lib/apt/lists/* |
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
create_default_packages: | |
- pip | |
channels: | |
- conda-forge | |
- pyviz | |
- defaults | |
ssl_verify: true | |
anaconda_upload: false | |
envs_dirs: |
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__ = "github.com/ruxi" | |
__license__ = "MIT" | |
import requests | |
import tqdm # progress bar | |
import os.path | |
def download_file(url, filename=False, verbose = False): | |
""" | |
Download file with progressbar | |
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 os | |
import requests | |
from tqdm import tqdm | |
def download_from_url(url, dst): | |
""" | |
@param: download file URL | |
@param: output file name | |
""" | |
file_size = int(requests.head(url).headers["Content-Length"]) |
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
name: planmap | |
channels: | |
- conda-forge | |
- defaults | |
dependencies: | |
- asn1crypto=0.24.0=py37_1003 | |
- atk=2.25.90=hb9dd440_1002 | |
- atomicwrites=1.3.0=py_0 | |
- attrs=19.1.0=py_0 | |
- backcall=0.1.0=py_0 |
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 IPython.display import HTML | |
style = """ | |
<style> | |
div.warn { | |
background-color: #f2f2fc; | |
border-color: #dFb5b4; | |
border-left: 5px solid #dfb5b4; | |
padding: 0.5em; | |
} | |
</style> |
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 IPython.display import HTML | |
HTML('''<script> | |
code_show=true; | |
function code_toggle() { | |
if (code_show){ | |
$('div.input').hide(); | |
} else { | |
$('div.input').show(); | |
} |
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 -u | |
help(){ | |
echo "" | |
echo " Usage: $(basename $0) [-n ] -f <file-commands>" | |
echo "" | |
echo " Options:" | |
echo " -h : this help message" | |
echo " -n : number of jobs to run simultaneously [default: $NPROCS]" |