https://github.com/adobe-type-tools/afdko/ Adobe Font Development Kit for OpenType
https://github.com/mpcabd/python-arabic-reshaper/ Reconstruct Arabic sentences to be used in applications that don't support Arabic
#!/bin/sh | |
# This assumes that you have installed duckdb and that both /usr/local/data/overture/places and | |
# /usr/local/data/overture/places-geojson exist and that the Overture "places" parquet files have | |
# been downloaded in to the former. See also: https://github.com/OvertureMaps/data#3-duckdb-sql | |
for f in /usr/local/data/overture/places/* | |
do | |
f=`basename $f` | |
echo "process $f" |
//---------------------- | |
// Gaffer On Games | |
// https://gafferongames.com/post/fix_your_timestep/ | |
//---------------------- | |
// Fixed delta time | |
// If delta time match the display refresh rate, and you can ensure that your update loop takes less than one frame worth of real time. | |
double t = 0.0; | |
double dt = 1.0 / 60.0; | |
while (!quit) { |
/*** MIT LICENSE | |
Copyright (c) 2022 torcado | |
Permission is hereby granted, free of charge, to any person | |
obtaining a copy of this software and associated documentation | |
files (the "Software"), to deal in the Software without | |
restriction, including without limitation the rights to use, | |
copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the | |
Software is furnished to do so, subject to the following |
https://github.com/adobe-type-tools/afdko/ Adobe Font Development Kit for OpenType
https://github.com/mpcabd/python-arabic-reshaper/ Reconstruct Arabic sentences to be used in applications that don't support Arabic
Shader "Unlit/MatCap Techniques" | |
{ | |
Properties | |
{ | |
[NoScaleOffset] _MatCap ("MatCap", 2D) = "white" {} | |
[KeywordEnum(ViewSpaceNormal, ViewDirectionCross, ViewDirectionAligned)] _MatCapType ("Matcap UV Type", Float) = 2 | |
} | |
SubShader | |
{ | |
Tags { "RenderType"="Opaque" } |
#!/bin/bash | |
# | |
# A script that takes a Twitter data archive, which is produced as a | |
# set of JavaScript files (different from the regular archive, which | |
# is CSV and HTML), and converts the `tweet.js` file, which contains | |
# all of the tweets, into tractable JSON, one tweet per line. It then | |
# inserts /that/ into a SQLite3 database, and extracts a simple | |
# relational table of tweets from the JSON. Finally, it runs datasette | |
# on the resulting database to allow you to explore. |
When you have a giant image and you want to make it easy to pan and zoom without downloading the whole 50MB image into someone's browser, a nice workaround is to cut that image into tiles at different zoom levels and view it as it were a map. An example where I've used this technique is The "Snowpiercer" Scenario.
One way to cut your big image into the requisite tiles is with gdal2tiles.py.
Alternatively, this Node script will do the cutting after you install node-canvas and mkdirp:
const fs = require("fs"),
These are my notes for taking the Microsoft US Building Footprints and splitting them into more manageable chunks based on US Census Tracts.
All of this happened on an m5.xlarge in AWS and used up about ~300GB of EBS over the course of a few hours.
Make a filesystem on the EBS volume and mount it:
sudo mkfs.xfs /dev/nvme1n1
mount /dev/nvme1n1 /mnt
/* GET /tiles/:z/:x/:y.mvt */ | |
/* Retreive a vector tile by tileid */ | |
router.get('/tiles/:z/:x/:y.mvt', async (req, res) => { | |
const { z, x, y } = req.params; | |
// calculate the bounding polygon for this tile | |
const bbox = mercator.bbox(x, y, z, false); | |
// Query the database, using ST_AsMVTGeom() to clip the geometries | |
// Wrap the whole query with ST_AsMVT(), which will create a protocol buffer |
#!/usr/bin/python -u | |
# Use: modem-speed.py [baud, default 1200] | |
import sys | |
from time import sleep | |
baud = len(sys.argv) > 1 and int(sys.argv[1]) or 1200 | |
cps = baud/10.0 # 10 baud per octet at 8n1 | |
while True: |