Skip to content

Instantly share code, notes, and snippets.

@lossyrob
lossyrob / 2021-09-foss4g-ai4e-talks.md
Last active September 29, 2021 16:37
FOSS4G 2021 Microsoft AI for Earth track talk schedule
@lossyrob
lossyrob / azure-batch-force-pull.md
Last active August 20, 2021 16:40
Forcing an Azure Batch node to pull from ACR without restarting the node

Forcing an Azure Batch node to pull from ACR

Sometimes you want to keep a node in an Azure Batch pool up and running as you're debugging tasks so that you don't have to pay the waiting time to spin up and down a node. You may want to push a new image to ACR with the same tag to run the job based on fixes based on the last run. However, Azure Batch nodes don't pull an updated image by default, and will run with the same image if a task is run again even if ACR has been updated.

The best solution I've found to speed things up is:

  • In Batch Explorer, go to the pool view, right click on the node, and "connect"
  • This will ssh into the node. Inside of the shell, run:
@lossyrob
lossyrob / markdown-details-collapsible.md
Created June 17, 2021 15:00 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
@lossyrob
lossyrob / cb-watershed.geojson
Last active February 19, 2021 22:48
Chesapeake Bay Watershed
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lossyrob
lossyrob / hcris-diff-matches-1.json
Created April 6, 2020 17:02
HCRIS different matches
{
"type": "Feature",
"properties": {
"ID": "4937061",
"OBJECTID": "3503",
"Provider Number": "440232",
"X": -87.689643485999966,
"Y": 36.320170566000058,
"NAME": "HOUSTON COUNTY COMMUNITY HOSPITAL",
"ADDRESS": "5001 E. MAIN STREET",
@lossyrob
lossyrob / eac-admin1-regions.geojson
Created April 3, 2020 18:45
EAC Admin-1 regions
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lossyrob
lossyrob / rough-polygon-continental-us
Last active March 28, 2020 03:30
Rough polygon of continental US
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
@lossyrob
lossyrob / new_confrmed_cases.py
Last active March 26, 2020 16:56
New confirmed COVID-19 cases per county over time
from datetime import datetime
import pandas as pd
import requests
def get_usafacts_county_cases(url):
r = requests.get(url)
return pd.read_csv(io.BytesIO(r.content))
def get_new_cases(url):
@lossyrob
lossyrob / county-minmax.json
Last active March 21, 2020 03:35
min max of aggregations HSCAP
{
"Estimated Beds Available (Conventional) - Lower": [
0,
212
],
"Estimated Beds Available (Conventional) - Upper": [
0,
425
],
"Estimated Additional Ventilators Required (Conventional) - Lower": [
@lossyrob
lossyrob / stac_model.py
Last active August 25, 2019 15:57
STAC Python model strawdog
"""STAC Model classes.
"""
import os
import json
from copy import copy, deepcopy
STAC_VERSION = '0.7.0'
class STAC_IO: