This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
import numpy | |
import struct | |
import svg.path # pip install svg.path==2.2 | |
from typing import List, Dict, Tuple, Callable # kitchen sink? | |
array=numpy.array | |
# SVG <path> string describing the undistorted profile of the pot | |
PATH_DATA=''' | |
m 0,50.916666 9.1801683,0 c 0.8686257,-1.2561 2.0631007,-1.983971 3.2272117,-2.612425 6.345522,-3.425674 6.113453,-5.441741 9.183746,-10.130426 3.920877,-5.987623 6.247456,-11.575049 11.615424,-15.913572 1.361948,-1.10076 2.477231,0.565914 1.236122,1.532279 -5.445873,4.240321 -7.508074,9.124891 -11.047477,15.345625 C 20.372917,44.45 19.05,46.566667 12.975328,49.970155 11.821211,50.616778 10.583333,51.59375 10.583333,52.916667 L 0,52.916667 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Postgres automatic message queue demo | |
Wherein a record-insertion trigger notifies a worker to process new table records | |
Requires: | |
- Python 3.6 | |
- Postgres 9.6 | |
- Psycopg2 | |
Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------------------------------- | |
-- Boilerplate mocking out what we already have today. -- | |
-- Just scroll down to the bottom. -- | |
--------------------------------------------------------- | |
-- Cleanup | |
drop table if exists | |
import_log, | |
my_data_source, | |
meta_record, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sublime plugin that re-wraps text blocks so that each line contains the | |
# maximum number of characters before line 80 | |
# To install (Sublime 3?), find your Packages/User directory by going to | |
# Preferences Menu > Browse Packages... | |
# | |
# Save this file into that directory. | |
# | |
# To enable it in the [Ctrl+Shift+P] command palette, create a file called | |
# "mine.sublime-commands" (exact name before extension doesn't matter), |
NewerOlder