Skip to content

Instantly share code, notes, and snippets.

View caiohamamura's full-sized avatar

Caio Hamamura caiohamamura

View GitHub Profile
@caiohamamura
caiohamamura / myevernote.py
Created February 4, 2017 12:50 — forked from wararyo/myevernote.py
Evernote for Python
from evernote.api.client import EvernoteClient
import evernote.edam.type.ttypes as Types
from evernote.edam.error import ttypes as Errors #この行が正しく機能してるかは怪しい
import os
import hashlib
import mimetypes
import binascii
dev_token = "your developer token"
client = EvernoteClient(token=dev_token, sandbox=True)
@caiohamamura
caiohamamura / segments.sql
Last active July 16, 2016 20:11 — forked from pramsey/segments.sql
Convert a Linestring into a set of two-point segments
CREATE TABLE lines (
gid integer primary key,
geom geometry(Linestring, 4326)
);
INSERT INTO lines VALUES (1, 'SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)');
INSERT INTO lines VALUES (2, 'SRID=4326;LINESTRING(0 1, 0 2, 0 3, 0 4)');
SELECT ST_AsText((ST_Dump(ST_Split(lines.geom, points.geom))).geom)
FROM