Skip to content

Instantly share code, notes, and snippets.

@yeesian
yeesian / gdal-driver-options.txt
Created August 10, 2016 22:02
GDAL Driver Options (pretty printed)
Driver: VRT/Virtual Raster
Driver: GTiff/GeoTIFF
COMPRESS <string-select>: possible values: NONE,LZW,PACKBITS,JPEG,CCITTRLE,CCITTFAX3,CCITTFAX4,DEFLATE,
PREDICTOR <int>: Predictor Type (1=default, 2=horizontal differencing, 3=floating point prediction)
DISCARD_LSB <string>: Number of least-significant bits to set to clear as a single value or comma-separated list of values for per-band values
JPEG_QUALITY <int>: JPEG quality 1-100
JPEGTABLESMODE <int>: Content of JPEGTABLES tag. 0=no JPEGTABLES tag, 1=Quantization tables only, 2=Huffman tables only, 3=Both
ZLEVEL <int>: DEFLATE compression level 1-9
NUM_THREADS <string>: Number of worker threads for compression. Can be set to ALL_CPUS
NBITS <int>: BITS for sub-byte files (1-7), sub-uint16 (9-15), sub-uint32 (17-31)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yeesian
yeesian / ma5243_hw2.ipynb
Created October 6, 2013 07:08
MA5243 homework 2
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Working with Images · ArchGDAL.jl</title><link rel="canonical" href="https://yeesian.com/ArchGDAL.jl/images.html"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script s
@yeesian
yeesian / gist:63a25a84fd48da041d653a6f95935347
Created March 20, 2018 22:19
Mitsubishi Report LP versus IP experiment
using Base.Test, SchedulingModels, JuMP, Gurobi
np = SchedulingModels.readnetwork("config/multiline-arrivals3.json")
# Integer Optimization based on Arrival Model
model = arrivalmodel(np, ScheduleOptions(), solver=Gurobi.GurobiSolver(TimeLimit=1000))
@time status = JuMP.solve(model.model)
# ...
# 1368 1076 151569.952 38 315 199238.000 151569.952 23.9% 97.3 984s
@yeesian
yeesian / pscc2018.ipynb
Created January 26, 2018 18:24
Notebook for OPFRecourse submission to PSCC 2018
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

The Query System

QuerySyntax

We compose valid syntax using the following components:

The Pipe: source |> verb(...)

  • where "source" must be a valid source
  • and "verb" must be a valid verb
@yeesian
yeesian / sqlquerynotes.md
Last active August 14, 2016 23:34
On writing yet-another-SQL-generator

sql_build(op, con, ...)

sql_build creates a select_query S3 object, that is rendered to a SQL string by sql_render. The output from sql_build is designed to be easy to test, as it's database diagnostic, and has a hierarchical structure.

Arguments

  • op A sequence of lazy operations
  • con A database connection. The default NULL uses a set of rules that should be very similar to ANSI 92, and allows for testing without an active database connection.