Skip to content

Instantly share code, notes, and snippets.

@aman-tiwari
aman-tiwari / WORKSHOP.md
Last active January 10, 2021 07:55
Document containing install instructions and cool links for the Making Maps with ML workshop!

Messing with Maps and ML quickstart

This document: https://goo.gl/AqGoE8

Installation instructions

By far the most annoying part of getting started with messing with ML is installing researcher-made code and turning it into something fun to play with.

Before doing any of these, please install Miniconda. If you don't have it installed already, here's how:

For OSX, this is:

@aman-tiwari
aman-tiwari / supported_device.patch
Created September 17, 2017 20:47
Diff of change needed to allow WebARonARCore run on all devices. Use with `patch -p1 < supported_device.patch`
index df7f8cb..46cdd7b 100644
--- a/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java
+++ b/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java
@@ -429,7 +429,7 @@ public class AwShellActivity extends Activity implements OnRequestPermissionsRes
super.onCreate(savedInstanceState);
// If the device is not supported, show an alert and quit.
- if (!SupportedDevices.isSupported(this))
+ if (false)
{
@aman-tiwari
aman-tiwari / .block
Last active October 30, 2017 06:50
Pano 2 persp
license: mit
// 'stroke' changes all the
// edges:
scale 0.3
background 0
10 times
i = 0
@aman-tiwari
aman-tiwari / wfc.lp
Last active November 16, 2017 00:45
wfc in clingo?
% Default
#const n = 5.
% define?
cell(1..n, 1..n).
pattern(a).
pattern(b).
dx(0, 1).
@aman-tiwari
aman-tiwari / wfc-elabel.lp
Created November 17, 2017 07:16
wfc with edge labels in clingo
#const n = 3.
% define?
cell(1..n, 1..n).
% kinds of edges
edge_kind(path).
edge_kind(empty).
% tiles, format:
@aman-tiwari
aman-tiwari / wfc-elabel-connected.lp
Last active May 29, 2020 17:35
asp map generation with connectivity constraints
#const n = 5.
#const m = 5.
% define?
cell(1..m, 1..n).
% tiles, format:
% pdef((tile name, rotation in 90deg increments), bottom edge, right edge, top edge, left edge)
pdef((line_v, 0), empty, path, empty, path).
pdef((line_v, 1), path, empty, path, empty).
Keypoints:
Person pose keypoints:
Person 0 (x, y, score):
1133.585815 353.646790 0.769051
1121.857056 668.699341 0.555814
909.934998 609.766541 0.448050
927.560059 904.014893 0.561476
1304.351807 971.803040 0.111922
1339.713989 742.165649 0.384544
1551.632080 942.356506 0.401359
@aman-tiwari
aman-tiwari / zmq.py
Created April 12, 2018 22:37
zmq ml template
import zmq
def zmq_serv():
bind_at = "tcp://*:5566"
context = zmq.Context()
socket = context.socket(zmq.REP)
socket.bind(bind_at)
print("server init")
img_shape = (480, 720, 3)
@aman-tiwari
aman-tiwari / game.txt
Created September 7, 2018 18:19
flickgame
{"gameLink":"www.flickgame.org","canvasses":[[1677,"0",12,"e",145,"0",24,"e",135,"0",28,"e",128,"0",34,"e",122,"0",39,"e",117,"0",45,"e",109,"0",52,"e",107,"0",54,"e",105,"0",56,"e",103,"0",58,"e",101,"0",60,"e",99,"0",62,"e",98,"0",4,"e",1,"6",18,"e",14,"0",25,"e",98,"0",3,"e",2,"6",14,"e",19,"0",24,"e",98,"0",3,"e",1,"6",11,"e",27,"0",20,"e",97,"0",14,"e",32,"0",18,"e",95,"0",11,"e",38,"0",16,"e",94,"0",12,"e",39,"0",15,"e",94,"0",12,"e",40,"0",14,"e",93,"0",13,"e",40,"0",14,"e",92,"0",14,"e",40,"0",14,"e",91,"0",15,"e",41,"0",13,"e",90,"0",15,"e",42,"0",13,"e",90,"0",14,"e",43,"0",13,"e",90,"0",12,"e",45,"0",13,"e",90,"0",11,"e",22,"0",6,"d",18,"0",13,"e",90,"0",10,"e",21,"0",9,"d",17,"0",13,"e",90,"0",9,"e",21,"0",7,"d",2,"6",5,"d",13,"0",13,"e",91,"0",7,"e",22,"0",7,"d",3,"6",5,"d",11,"0",14,"e",92,"0",5,"e",23,"0",15,"d",11,"0",14,"e",121,"0",14,"d",11,"0",14,"e",122,"0",14,"d",9,"0",15,"e",123,"0",16,"d",6,"0",15,"e",126,"0",14,"d",4,"0",16,"e",128,"0",12,"d",4,"0",15,"e",130,"0",11,"d",2,"0",17,"e",13