Skip to content

Instantly share code, notes, and snippets.

View gbvitrano's full-sized avatar

Giovan Battista Vitrano gbvitrano

View GitHub Profile
#!/bin/bash
### requisiti ###
# Miller https://miller.readthedocs.io/en/latest/
# jq https://stedolan.github.io/jq/
# scrape-cli https://github.com/aborruso/scrape-cli
# yq https://kislyuk.github.io/yq/
### requisiti ###
set -x
function importCSVFromWeb() {
var csvUrl = "https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/dati-regioni/dpc-covid19-ita-regioni.csv";
var csvContent = UrlFetchApp.fetch(csvUrl).getContentText();
//csvContent.replace(/[ \t]+$/gm, ' ');
var csvData = Utilities.parseCsv(csvContent);
var sheet = SpreadsheetApp.getActiveSheet();
var sheet = SpreadsheetApp.getActive().getSheetByName('Sheet1')
sheet.getRange(1, 1, csvData.length, csvData[0].length).setValues(csvData);
@Korto19
Korto19 / Get_cat_color.py
Last active April 23, 2021 15:47
A QGIS field calculator expression to get the color of a categorized item
from qgis.gui import *
from qgis.utils import iface
@qgsfunction(args='auto', group='Custom')
def get_catg_color(value, feature, parent):
"""
Restituisce il colore RGBA dell'elemento categorizzato:
il campo in input e' quello utilizzato per la categorizzazione
Per i campi della categorizzazione numerici formattatarli opportunamente e
utilizzare la stessa espressione per catturarne il colore
@aborruso
aborruso / README.md
Last active February 26, 2021 16:26

Avere risposta "content-type: text/csv" da CSV pubblicati su GitHub

Se puntiamo a un CSV pubblicato su GitHub, il server risponde con

HTTP/2 302
date: Tue, 19 Jan 2021 07:54:53 GMT
content-type: text/html; charset=utf-8
# -*- coding: utf-8 -*-
"""
/***************************************************************************
WMS Catasto Agenzia delle Entrate CC BY 4.0
-------------------
copyright : (C) 2020 by Giulio Fattori
email : [email protected]
***************************************************************************/
"""
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active November 18, 2024 01:03
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.