Skip to content

Instantly share code, notes, and snippets.

Carlos H Brandt chbrandt

Block or report user

Report or block chbrandt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
chbrandt /
Last active Nov 28, 2019 — forked from jacquestardie/
Modern remote sensing image processing with Python
chbrandt /
Created Sep 9, 2019 — forked from ruxi/
python download_file with progressbar using request and tqdm
#!/usr/bin/env python
__author__ = ""
__license__ = "MIT"
import requests
import tqdm # progress bar
import os.path
def download_file(url, filename=False, verbose = False):
Download file with progressbar
chbrandt /
Last active Sep 9, 2019 — forked from wy193777/
Download file through HTTP using and tqdm
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"])
chbrandt / conda-environment-geoprocessing.yml
Created May 28, 2019
Conda environment file used during the Planmap project, handles raster/vector projection, OWS data access, data visualization
View conda-environment-geoprocessing.yml
name: planmap
- conda-forge
- defaults
- 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
View Merging_Apollo_shapefiles.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
chbrandt / notebook_block_color
Created Mar 5, 2018
Define color for background (div) block in jupyter ipython
View notebook_block_color
from IPython.display import HTML
style = """
div.warn {
background-color: #f2f2fc;
border-color: #dFb5b4;
border-left: 5px solid #dfb5b4;
padding: 0.5em;
chbrandt / notebook_toggle_code_onoff
Created Jan 30, 2018
Jupyter notebook toggle code-cells on/off
View notebook_toggle_code_onoff
from IPython.display import HTML
function code_toggle() {
if (code_show){
} else {
chbrandt /
Created Dec 26, 2017
Simplest Ever Queue system (SEQ)
#!/usr/bin/env bash
set -u
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]"
chbrandt /
Last active Dec 12, 2017
Download all 'user' repositories from github
# Get the list of (<100) repositories from user 'fulano' from github
# Using curl, goes like:
#$ curl > github_repos.json
import subprocess
with open('github_repos.json','r') as fp:
import json
repos = json.load(fp)
chbrandt /
Created Jun 16, 2017 — forked from bradmontgomery/
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
Very simple HTTP server in python.
./ [<port>]
Send a GET request::
curl http://localhost
You can’t perform that action at this time.