Skip to content

Instantly share code, notes, and snippets.

View pebbie's full-sized avatar

Peb Ruswono Aryan pebbie

View GitHub Profile
@pebbie
pebbie / vis_timeline_with_arror_first_test.html
Created December 17, 2021 11:30 — forked from JimmyCheng/vis_timeline_with_arror_first_test.html
This is test to see how difficult it would be to add multiple arrows to vis.js timeline view. Can be previewed with https://gistpreview.github.io/?4a6a6feba553e2cbe0396486f157b7bb
<!DOCTYPE html>
<html>
<head>
<title>Timeline | Group example, with an arrow</title>
<style>
body,
html {
font-family: arial, sans-serif;
@pebbie
pebbie / web-servers.md
Created February 13, 2019 11:42 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@pebbie
pebbie / dataset-management.md
Created July 13, 2016 12:51 — forked from mheadd/dataset-management.md
Sample API calls for creating, updating and deleting things in CKAN via the CKAN API.

Get package list

curl http://test.civicdata.com/api/action/package_list

Get package details

curl http://test.civicdata.com/api/action/package_show?id={package_id}

Upload a file to storage

curl http://test.civicdata.com/api/storage/auth/form/testdata/test.csv -H "Authorization: <API-KEY>"
@pebbie
pebbie / bwmorph_thin.py
Created May 10, 2016 17:38 — forked from joefutrelle/bwmorph_thin.py
bwmorph('thin') in Python
import numpy as np
from scipy import ndimage as ndi
# lookup tables for bwmorph_thin
G123_LUT = np.array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1,
0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0,
1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,