View syncthing.txt
- Install & launch | |
$ brew install syncthing | |
$ brew services start syncthing | |
- Install it on your Linode or whatever too | |
- https://apt.syncthing.net/ | |
- Visit local dashboard at http://localhost:8384/ | |
- Click `Add Remote Device` to sync with another machine |
View main.cpp
#define CL_SILENCE_DEPRECATION | |
// #if defined(__APPLE__) || defined(__MACOSX) | |
// #include <OpenCL/cl.hpp> | |
// #else | |
// #include <CL/cl.hpp> | |
// #endif | |
#include "cl.hpp" |
View warp.py
import cairocffi as cairo | |
import numpy as np | |
import random | |
def random_coefs(order, sigma): | |
return [random.gauss(0, sigma) for _ in range(order)] | |
def random_transform(): | |
y_dx = random_coefs(5, 0.3) | |
y_dy = random_coefs(5, 0.3) |
View heightmap2stl.py
from PIL import Image | |
from pyhull.delaunay import DelaunayTri | |
from shapely import geometry | |
from skimage import measure | |
from scipy import interpolate | |
import math | |
import numpy as np | |
import struct | |
import sys |
View floats.c
#include <stdint.h> | |
#include <stdio.h> | |
typedef union { | |
uint32_t a; | |
float b; | |
} float_or_int; | |
int main() { | |
float_or_int u; |
View complex.go
package main | |
import ( | |
"image" | |
"image/color" | |
"math" | |
"math/cmplx" | |
"github.com/fogleman/fauxgl" | |
"github.com/fogleman/gg" |
View isoline.go
package main | |
import ( | |
"fmt" | |
"image" | |
"image/draw" | |
"image/png" | |
"math" | |
"os" |
View orient.go
package main | |
import ( | |
"fmt" | |
"math" | |
"os" | |
"time" | |
"github.com/fogleman/fauxgl" | |
embree "github.com/fogleman/go-embree" |
View astar.py
import heapq | |
def estimated_distance(node, target): | |
x1, y1 = node | |
x2, y2 = target | |
dx, dy = abs(x1 - x2), abs(y1 - y2) | |
dist = dx + dy | |
return dist | |
def shortest_path(graph, source, target, heuristic_func=None): |
View osm.py
from imposm.parser import OSMParser | |
from shapely import geometry, ops | |
import axi | |
import math | |
import sys | |
# put your lat/lng here | |
LAT, LNG = 0, 0 |
NewerOlder