Skip to content

Instantly share code, notes, and snippets.

@yeesian
yeesian / gdal-driver-options.txt
Created Aug 10, 2016
GDAL Driver Options (pretty printed)
View gdal-driver-options.txt
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)
View spatialite-cookbook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yeesian
yeesian / gist:63a25a84fd48da041d653a6f95935347
Created Mar 20, 2018
Mitsubishi Report LP versus IP experiment
View gist:63a25a84fd48da041d653a6f95935347
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 Jan 26, 2018
Notebook for OPFRecourse submission to PSCC 2018
View pscc2018.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View provider-examples.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View absqueries-spec.md

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 Aug 14, 2016
On writing yet-another-SQL-generator
View sqlquerynotes.md
View dplyr_notes.md

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.
@yeesian
yeesian / cs1010s_review.ipynb
Created Nov 19, 2013
CS1010S (2nd half) Review
View cs1010s_review.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View oop_review.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.