Skip to content

Instantly share code, notes, and snippets.

View caiohamamura's full-sized avatar

Caio Hamamura caiohamamura

View GitHub Profile
@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
@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)
[
{
"vehicleType":"excavator",
"vehicleColor":"yellow",
"fuel":"diesel",
"approvedOperators":[
{
"name":"Greg Stark",
"experiencePoints":13
},
@caiohamamura
caiohamamura / csv list of attendance.js
Last active August 5, 2021 21:18
Tampermonkey - Google meet: csv list of attendance
// ==UserScript==
// @name Google meet: csv list of attendance
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://meet.google.com/*
// @grant none
// ==/UserScript==
# Installs VS2022 with MAUI
winget install XPDCFJDKLZJLP8 --silent --override "--wait --quiet --addProductLang Pt-br --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetCrossPlat"
# Create AppModelUnlock if it doesn't exist, required for enabling Developer Mode
$RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock";
if (-not(Test-Path -Path $RegistryKeyPath)) { New-Item -Path $RegistryKeyPath -ItemType Directory -Force }
# Add registry value to enable Developer Mode
New-ItemProperty -Path $RegistryKeyPath -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1;
We can't make this file beautiful and searchable because it's too large.
plot,type,origin,tree,family,genus,scientific_name,common_name,density_wood,dbh,ht_crown_base,ht_total,depth_crown,stem_x,stem_y,crown_radius_x0,crown_radius_x50,crown_radius_y0,crown_radius_y50,ht_crown_max_x0,ht_crown_max_x50,ht_crown_max_y0,ht_crown_max_y50,shape_coeff_crown_x0,shape_coeff_crown_x50,shape_coeff_crown_y0,shape_coeff_crown_y50,shape_coeff_crown_below_x0,shape_coeff_crown_below_x50,shape_coeff_crown_below_y0,shape_coeff_crown_below_y50
1,SF,NE,1,Hypericaceae,Vismia,Vismia guianensis,Lacre branco,0.48,5.9,4.5,6,1.5,1.8,5.5,1.5,2,0.5,5,6,3,4.5,6,4,2,0.4,4,0.8,0.4,0.3,0.8
1,SF,NE,2,Salicaceae,Banara,Banara nitida,Cabelo de cutia,0.6,7.4,4.5,7.1,2.6,3.5,7,2.5,1.8,0,4,5.8,7.1,-9999,7.1,1.3,1.6,-9999,1.6,0.8,0.6,-9999,0.6
1,SF,NE,3,Salicaceae,Banara,Banara nitida,Cabelo de cutia,0.6,6.3,5,7.1,2.1,3.5,0.1,2.5,0,0,5,5.7,-9999,-9999,7.1,8,-9999,-9999,8,8.8,-9999,-9999,8.8
1,SF,NE,4,Salicaceae,Banara,Banara nitida,Cabelo de cutia,0.6,5.4,2.3,4.3,1.9,5,5,1.5,0,0,3.5,2.3,-9999,-9999,2.3,1,-9999,-9999,1.3
@caiohamamura
caiohamamura / air_quality_health_impact_data.csv
Last active March 6, 2025 23:03
air_quality_health_impact_data.csv
We can't make this file beautiful and searchable because it's too large.
RecordID,AQI,PM10,PM2_5,NO2,SO2,O3,Temperature,Humidity,WindSpeed,RespiratoryCases,CardiovascularCases,HospitalAdmissions,HealthImpactScore,HealthImpactClass
1,187.27005942368123,295.85303918510846,13.038560436938207,6.639263013112351,66.16114965083923,54.62427997507646,5.150335038375795,84.42434365437401,6.13775544737303,7,5,1,97.24404109007625,0.0
2,475.3571532049581,246.25470277893862,9.984497132675818,16.318326077385393,90.49952259723248,169.62172753232073,1.5433782900586372,46.851414776666765,4.521421553573566,10,2,0,100.0,0.0
3,365.99697090570254,84.44319073527582,23.111339767267758,96.31781102157555,17.875850347106436,9.006793603406171,1.169483416821425,17.806977221315286,11.157383587095595,13,3,0,100.0,0.0
4,299.3292420985183,21.020608716356836,14.27340277787601,81.2344025822972,48.32361562451519,93.16103260585835,21.925276294763393,99.47337305761987,15.302499623190101,8,8,1,100.0,0.0
5,78.00932022121826,16.98766721326741,152.11162310398458,121.23546115635352,90.86616698450506,241.79513844849802,9.217
@caiohamamura
caiohamamura / aula05-regress-o.ipynb
Last active March 24, 2026 23:46
aula05-regress-o.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@caiohamamura
caiohamamura / fundamentos_ml_knn.ipynb
Last active April 8, 2026 01:37
fundamentos_ml_knn.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.