This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import logging | |
| from shutil import rmtree | |
| import json | |
| import pandas as pd | |
| import git | |
| import traceback | |
| from pathlib import Path | |
| logging.basicConfig(level=logging.INFO, format='%(asctime)s :: %(levelname)s :: %(message)s') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PIL import Image | |
| import sys | |
| if len(sys.argv) < 3: | |
| print("USAGE: convert_image_to_black_white.py <input img name> <output img name>") | |
| exit(-1) | |
| input_img = sys.argv[1] | |
| out_img = sys.argv[2] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from datetime import datetime | |
| from elasticsearch import Elasticsearch | |
| from elasticsearch import helpers | |
| import pandas | |
| csv_file = pandas.DataFrame(pandas.read_csv("Dati-meteo_Lugano.csv", sep = ",", header = 0, index_col = False)) | |
| csv_file.rename(columns={'Data e ora':'@timestamp', | |
| 'Temp. [°C]':'temp_celcius', | |
| 'Prec. [mm]':'precipitation_mm', | |
| 'Data':'date', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| In_file_FILE = sys.argv[1] | |
| OUT_file_CSV = 'clean.csv' | |
| CSV_DELIMITER = ';' | |
| in_file_array = [] | |
| comuni_array = [] | |
| dupl_array = [] |