Skip to content

Instantly share code, notes, and snippets.

View alukach's full-sized avatar
🍊

Anthony Lukach alukach

🍊
View GitHub Profile
@alukach
alukach / example.py
Last active March 14, 2020 19:52
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
alukach / docker-tips.md
Last active February 12, 2020 21:32
Docker Cheatsheet

Docker Cheatsheet

Glossary

Container
Single unit of computing.
Task
@alukach
alukach / bundles.json
Last active November 6, 2019 04:50
Convert Planet product bundles description into JSON
{
"bundles": {
"analytic": {
"name": "Analytic Radiance",
"description": "Orthorectified product, calibrated to at-sensor radiance",
"assets": {
"Landsat8L1G": [
"analytic_b1",
"analytic_b2",
"analytic_b3",
@alukach
alukach / custom-errors.ts
Last active July 23, 2019 22:55
Typescript Favorites
/*
In this file, we subclass the built-in Error object to create custom errors.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
*/
// tslint:disable:max-classes-per-file
abstract class CustomError extends Error {
constructor(...params: any[]) {
// Pass remaining arguments (including vendor specific ones) to parent constructor
super(...params);
@alukach
alukach / 1.organization.md
Last active May 10, 2019 14:39
A framework for a Volunteer Software Dev program

Organization

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.

Motivations

For Developers

Developers may be interested for the following reasons:

@alukach
alukach / threading.py
Created May 11, 2017 20:52
Threading Context Manager
from multiprocessing import cpu_count
import threading
import queue
import logging
logger = logging.getLogger(__name__)
class ThreadQueue(object):
@alukach
alukach / README.md
Last active April 9, 2018 11:34
Calgary building detection

Generating building geometries from satellite imagery

Goals

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.

Methodology

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

@alukach
alukach / runserver
Last active March 29, 2018 05:08
Serve ESRI Web App Builder app from HTTP
#!/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
alukach / json_pps
Last active November 25, 2017 19:58 — forked from thiagophx/pp
JSON Pretty Print Stream
#!/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():
@alukach
alukach / Myanmar.html
Created June 1, 2017 18:42
A quick test of a computers ability to view Myanmar set of Unicode characters.
<!DOCTYPE html>
<html class="client-nojs" lang="en" dir="ltr">
<head>
<meta charset="UTF-8"/>
<title>S'gaw Karen Script - Wikipedia</title>
</head>
<body>
<h3><span class="mw-headline" id="Blocks">Blocks</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=S%27gaw_Karen_Script&amp;action=edit&amp;section=2" title="Edit section: Blocks">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<div role="note" class="hatnote navigation-not-searchable">See also: <a href="/wiki/Myanmar_(Unicode_block)" title="Myanmar (Unicode block)">Myanmar (Unicode block)</a>, <a href="/wiki/Myanmar_Extended-A" title="Myanmar Extended-A">Myanmar Extended-A (Unicode block)</a>, and <a href="/wiki/Myanmar_Extended-B" title="Myanmar Extended-B">Myanmar Extended-B (Unicode block)</a></div>
<p>The Unicode blocks for Burmese, called Myanmar, are U+1000–U+109F, U+AA60–U+AA7B, and U+A9E0-U+A9FF.</p>