Skip to content

Instantly share code, notes, and snippets.

Andrea Borruso aborruso

  • Palermo, Italy
Block or report user

Report or block aborruso

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View xpath-cheatsheet.js
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
View 01input.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
https://www.amazon.it/Voluker-x100mm-girevoli-Capacit%C3%A0-massima/dp/B07G55RQKK/ref=sr_1_6?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&keywords=ruote&qid=1559829681&s=gateway&sr=8-6
https://www.amazon.it/66002445-Inserti-Mag-Bit-Portainserto-Acciaio/dp/B07B4PWP2F/ref=pd_sim_60_3/258-6152471-3872959?_encoding=UTF8&pd_rd_i=B07B4PWP2F&pd_rd_r=399f72be-8876-11e9-83c5-0fcfcd25517b&pd_rd_w=P18xR&pd_rd_wg=pFbJM&pf_rd_p=56b3c50e-3915-4b91-b522-56dd1dac87e6&pf_rd_r=9PYG5QKK515A8TZVA3F0&psc=1&refRID=9PYG5QKK515A8TZVA3F0
https://www.amazon.it/dp/B07QZQKRXY/ref=sspa_dk_detail_2?psc=1&pd_rd_i=B07QZQKRXY&pd_rd_w=4eX3m&pf_rd_p=03cd7042-0e1a-42a1-a4de-5be35e24f850&pd_rd_wg=pAfPk&pf_rd_r=37WHSMFYZ6MZE449EWCP&pd_rd_r=fd743642-887a-11e9-aa9f-fddc3ee4654b
View bes.sh
#!/bin/bash
set -x
# crea variabile temporanea per memorizzare il nome della cartella
folder="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# rimuovi dalla cartella ogni CSV
rm "$folder"/*.csv
View out_noNull.csv
fid UPL UPL_nome Quartiere circoscrizione Id_Quartiere Cittadinanza Residenti
1 50 Partanna Mondello Partanna Mondello VII 22 Italiani 19427
1 50 Partanna Mondello Partanna Mondello VII 22 Albania 7
1 50 Partanna Mondello Partanna Mondello VII 22 Argentina 3
1 50 Partanna Mondello Partanna Mondello VII 22 Bangladesh 25
1 50 Partanna Mondello Partanna Mondello VII 22 Belgio 2
1 50 Partanna Mondello Partanna Mondello VII 22 Bielorussia 4
1 50 Partanna Mondello Partanna Mondello VII 22 Brasile 12
1 50 Partanna Mondello Partanna Mondello VII 22 Capo Verde 5
1 50 Partanna Mondello Partanna Mondello VII 22 Ceca- Repubblica 1
View out.csv
fid UPL UPL_nome Quartiere circoscrizione Id_Quartiere Cittadinanza Residenti
1 50 Partanna Mondello Partanna Mondello VII 22 Italiani 19427
1 50 Partanna Mondello Partanna Mondello VII 22 Afghanistan
1 50 Partanna Mondello Partanna Mondello VII 22 Albania 7
1 50 Partanna Mondello Partanna Mondello VII 22 Algeria
1 50 Partanna Mondello Partanna Mondello VII 22 Argentina 3
1 50 Partanna Mondello Partanna Mondello VII 22 Armenia
1 50 Partanna Mondello Partanna Mondello VII 22 Australia
1 50 Partanna Mondello Partanna Mondello VII 22 Austria
1 50 Partanna Mondello Partanna Mondello VII 22 Bahamas
@aborruso
aborruso / spatialitePython.md
Last active May 21, 2019
Usare spatialite in Python
View spatialitePython.md

In ambiente Linux

Di base è necessario il modulo sqlite3 e avere installato spatialite.

Uno script di esempio base:

# importa il modulo sqlite3
import sqlite3
# crea una connessione a un db sqlite esistente, che contiene al suo interno una tabella poligonale denominata "poly"
View 00README.md
twarc search --geocode 38.110889,13.372612,1km
View fortiniAndFolks_s.json
[
{
"created_at": "Mon May 06 13:47:51 +0000 2019",
"id": 1125396760271179800,
"id_str": "1125396760271179777",
"full_text": "Ho proposto a #SOD19 una discussione su \"Quali licenze per i dati pubblici?\" per cominciare a riparlarne , https://t.co/NztyGPGIhp ci siete? @morenaragone @GiorgiaLodi @napo @MonicaPalmirani @aborruso @vincpatruno @dagoneye @ChiaraVeninata",
"truncated": false,
"display_text_range": [
0,
240
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<script src="https://platform.twitter.com/widgets.js"></script>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<style>
.links line {
stroke: #999;
stroke-opacity: 0.8;
View linee
This file has been truncated, but you can view the full file.
You can’t perform that action at this time.