Skip to content

Instantly share code, notes, and snippets.


Anthony Lukach alukach

View GitHub Profile
alukach / app.yaml
Last active Apr 8, 2022
An example Github Actions for Python + Pipenv + Postgres + Pyright
View app.yaml
# .github/workflows/app.yaml
name: My Python Project
on: push
runs-on: ubuntu-latest
timeout-minutes: 10
alukach /
Last active Dec 23, 2021
AWS S3 Batch Operation boilerplate
import urllib
import boto3
from botocore.exceptions import ClientError
s3 = boto3.resource("s3")
TMP_FAILURE = "TemporaryFailure"
FAILURE = "PermanentFailure"
alukach /
Last active Aug 2, 2021
Parsing S3 Inventory results in Python
#! /usr/bin/env python3
A utility to stream records from one or many S3 Inventory reports, with a progress bar.
./parse-inventory-progress s3://my-bucket/path/to/my/inventory/2019-12-15T00-00Z/manifest.json > out.csv
import json
import csv
import gzip
import sys
alukach /
Last active Mar 14, 2020
An example of a PIL-friendly object to represent an S3 file.
from typing import IO
from dataclasses import dataclass, field
from io import BytesIO
import boto3
from PIL import Image
s3 = boto3.resource("s3")
alukach / bundles.json
Last active Nov 6, 2019
Convert Planet product bundles description into JSON
View bundles.json
"bundles": {
"analytic": {
"name": "Analytic Radiance",
"description": "Orthorectified product, calibrated to at-sensor radiance",
"assets": {
"Landsat8L1G": [
alukach / custom-errors.ts
Last active Jul 23, 2019
Typescript Favorites
View custom-errors.ts
In this file, we subclass the built-in Error object to create custom errors.
// tslint:disable:max-classes-per-file
abstract class CustomError extends Error {
constructor(...params: any[]) {
// Pass remaining arguments (including vendor specific ones) to parent constructor
alukach /
Last active May 10, 2019
A framework for a Volunteer Software Dev program


The basic idea of this organization is to link up software developers with organizations (from here on out referred to as "partners") that need custom software development.


For Developers

Developers may be interested for the following reasons:

alukach /
Last active Apr 9, 2018
Calgary building detection

Generating building geometries from satellite imagery


Currently, the OpenStreetMap dataset for the Calgary, Alberta, Canada region is lacking most of the city's building footprints. The City of Calgary possesses a dataset of the building footprints, however it opts to sell this data rather than distribute it for free via its open data catalogue. The City of Edmonton does distribute its respective building footprint dataset freely and thus the footprints are available via OpenStreetMap. Utilizing high resolution satellite imagery of the City of Edmonton and the building footprint dataset from OpenStreetMap, it should be feasible to train a neural network classifier to generate building footprint polygons from provided satellite imagery of the Calgary region.


A similar challenge Kaggle competition exists: Dstl's Satellite Imagery competition

alukach / runserver
Last active Mar 29, 2018
Serve ESRI Web App Builder app from HTTP
View runserver
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import json
import os
from BaseHTTPServer import HTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
if __name__ == '__main__':
alukach / json_pps
Last active Nov 25, 2017 — forked from thiagophx/pp
JSON Pretty Print Stream
View json_pps
#!/usr/bin/python -u
import json
import sys
from pygments import highlight
from pygments.lexers import JsonLexer
from pygments.formatters import Terminal256Formatter
for line in sys.stdin:
if line.strip():