Skip to content

Instantly share code, notes, and snippets.

View jbants's full-sized avatar

James Banting jbants

View GitHub Profile
@jbants
jbants / stac_ogc_cs_letter.adoc
Created July 10, 2023 22:17
OGC Community Spec for the STAC API
:CSname: STAC
:Title: STAC Community Standard Work Item Justification
:titletext: STAC Community Standard
:doctype: community-standard
:encoding: utf-8
:lang: en
:toc:
:toc-placement!:
@jbants
jbants / stac_api_ogc_cs_letter.adoc
Created July 10, 2023 22:15
OGC Community Standards STAC Spec
:CSname: STAC API
:Title: STAC API Community Standard Work Item Justification
:titletext: STAC API Community Standard
:doctype: community-standard
:encoding: utf-8
:lang: en
:toc:
:toc-placement!:
:toclevels: 4
:numbered:
@jbants
jbants / STAC_Sprint_4.md
Last active June 11, 2019 18:26
STAC Sprint 4

STAC Sprint 4

June 4-6, 2019

Lots of work around API changes, support for ML/Data Science, and cleaning up core spec/extension examples and schemas. Groups were mostly focused on prepping for a 0.8 release but had 1.0 in mind.

API discussions:

  • Subscritions and notifications for an AOI
  • Not much movement on this.
@jbants
jbants / stac_js_validation.js
Created June 10, 2019 21:59
Javascript STAC validation
const path = require("path");
const url = require("url");
const Ajv = require("ajv");
const fetch = require("node-fetch");
const ITEM_SCHEMA_URL = "";
// load schemas from whatever source; keep track of the URI prefix that contains them to help with
// relative refs
{
"id": "landsat-8-l1",
"title": "Landsat 8 L1",
"description": "Landat 8 imagery radiometrically calibrated and orthorectified using gound points and Digital Elevation Model (DEM) data to correct relief displacement.",
"keywords": [
"landsat",
"earth observation",
"usgs"
],
"version": "0.1.0",
@jbants
jbants / python_environment_setup.md
Created November 18, 2018 21:49 — forked from wronk/python_environment_setup.md
Setting up your python development environment (with pyenv, virtualenv, and virtualenvwrapper)

Overview

When you're working on multiple coding projects, you might want a couple different version of Python and/or modules installed. That way you can keep each project in its own sandbox instead of trying to juggle multiple projects (each with different dependencies) on your system's version of Python. This intermediate guide covers one way to handle multiple Python versions and Python environments on your own (i.e., without a package manager like conda). See the Using the workflow section to view the end result.

Use cases

  1. Working on 2+ projects that each have their own dependencies; e.g., a Python 2.7 project and a Python 3.6 project, or developing a module that needs to work across multiple versions of Python. It's not reasonable to uninstall/reinstall modules every time you want to switch environments.
  2. If you want to execute code on the cloud, you can set up a Python environment that mirrors the relevant
@jbants
jbants / README-Template.md
Created November 18, 2018 03:26 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@jbants
jbants / condaenv.txt
Created July 24, 2018 18:32 — forked from pratos/condaenv.txt
To package a conda environment (Requirement.txt and virtual environment)
# For Windows users# Note: <> denotes changes to be made
#Create a conda environment
conda create --name <environment-name> python=<version:2.7/3.5>
#To create a requirements.txt file:
conda list #Gives you list of packages used for the environment
conda list -e > requirements.txt #Save all the info about packages to your folder
@jbants
jbants / RemoteSensingImageClassification.py
Created March 25, 2018 22:44
Remote Sensing Image Classification with Python and Scikit-Learn
# ----------------------------------------------------------------------
# Remote Sensing Image Classification Workflow for Landsat data with soft
# voting on a SVM and Gradient Boosting classifier. Outlier in the
# training data are flagged through an Isolation Forest algorithm.
# Feature Selection is done by a Recursive Feature Elimination method.
# The results are classification and classification probability raster
# images in TIF format.
#
# Written by Dimo Dimov, MapTailor, 2017
# ----------------------------------------------------------------------
@jbants
jbants / install_gps_babel.md
Created May 15, 2017 21:13
Install GPS babel on Ubuntu 16

Get latest copy of gpsbabel from repo: https://github.com/gpsbabel/gpsbabel.git install qt5 build gpsbabel add to usr/local/bin

git clone https://github.com/gpsbabel/gpsbabel.git
sudo apt-get install qt5-default
cd gpsbabel
sudo make install