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
#!/usr/bin/env python3 | |
import pandas as pd | |
import numpy as np | |
file_key = "1sIkC1vBalHB8SJsgpPazFGUSrMNUani6jLrOFS6IEFo" | |
df = pd.read_csv(f"https://docs.google.com/spreadsheets/d/{file_key}/export?format=csv") | |
for [item,number] in df.to_numpy(): | |
with open(item, 'w') as f: | |
f.write(f'{{"number":"{number}"}}') |
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 numpy as np | |
from scipy.optimize import curve_fit | |
import pandas as pd | |
import datetime | |
import matplotlib.pyplot as plt | |
url = "https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/dati-regioni/dpc-covid19-ita-regioni.csv" | |
df = pd.read_csv(url) | |
def line(x, a, b): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#python3 | |
import numpy as np | |
from itertools import combinations_with_replacement | |
from pyemd import emd | |
from scipy import spatial | |
import gensim as gs | |
synzero = np.load('data/it/wiki_iter.m.syn0.npy') | |
synoneneg = np.load('data/it/wiki_iter.m.syn1neg.npy') | |
table = np.load('data/it/wiki_iter.m.table.npy') |
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
// QM Stat 0.2 | |
// Simple Data Mining Algorithms, (c) Mario Alemi 2010 | |
// | |
// This program is free software: you can redistribute it and/or modify | |
// it under the terms of the GNU Affero General Public License as | |
// published by the Free Software Foundation | |
// This program is distributed in the hope that it will be useful, | |
// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |