Skip to content

Instantly share code, notes, and snippets.

View MarcoBuster's full-sized avatar

Marco Aceti MarcoBuster

View GitHub Profile
@MarcoBuster
MarcoBuster / Legge dei grandi numeri.py
Last active April 11, 2017 15:36
Dimostrazione della legge dei grandi numeri per il progetto di statistica e probabilità della prof. Saddemi.
# Copyright (c) 2017 Marco Aceti <personale@marcoaceti.it>
#
# Con la presente si concede,
# a chiunque ottenga una copia di questo software e dei file di documentazione associati (il "Software"),
# l'autorizzazione a usare gratuitamente il Software senza alcuna limitazione,
# compresi i diritti di usare, copiare, modificare, unire, pubblicare, distribuire,
# cedere in sottolicenza e/o vendere copie del Software,
# nonché di permettere ai soggetti cui il Software è fornito di fare altrettanto, alle seguenti condizioni:
#
# L'avviso di copyright indicato sopra e questo avviso di autorizzazione
@MarcoBuster
MarcoBuster / Stazioni italiane.geojson
Last active March 23, 2023 13:46
Lista delle stazioni ferroviarie civili italiane, fruibile da mappa .geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MarcoBuster
MarcoBuster / Stazioni italiane.csv
Last active March 23, 2023 12:51
Lista delle stazioni ferroviarie civili italiane, fruibile da ricerca e tabella .csv
code region long_name short_name latitude longitude
S01427 1 Ardenno Masino Ardenno Masino 46.16198 9.651374
S01947 1 Arena Po Arena Po 45.082065 9.360394
S01847 1 Asola Asola 45.220454 10.402313
S01041 1 Corbetta S. Stefano Corbetta S.Stef. 45.480829 8.917457
S01424 1 Cosio Traona Cosio Traona 46.135564 9.525498
S01207 1 Gazzada Schianno Morazzone Gazzada Schian.M 45.77862 8.824815
S02381 1 Gazzo Di Bigarello Gazzo Di Bigarel 45.176648 10.894005
S01841 1 Ghedi Ghedi 45.409439 10.280506
S02382 1 Castel D`Ario Castel D'Ario 45.183399 10.97531
@MarcoBuster
MarcoBuster / Python 3.7.0 installer.sh
Last active March 13, 2019 20:44
Python 3.7.0 installer with sqlite3 and openssl libraries.
#!/bin/bash
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
@MarcoBuster
MarcoBuster / Morse code.py
Created May 11, 2017 19:59
Python Morse code generator. Runs on all versions of Python.
# Copyright (c) 2017 Marco Aceti <dev@marcoaceti.it>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# Copyright (c) 2017 Marco Aceti. All rights reserved.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#include <stdio.h>
// Piccolo tutorial sui puntatori in C / C++
// Relased under Creative Commons CC0 1.0 Universal License (public domain)
int main()
{
int var = 45;
int *pointer; // inizializza puntatore di tipo int
int array[] = {0, 1, 2, 3, 4, 5}; // inizializza array a caso
#include <stdio.h>
#include <stdlib.h>
// Piccolo tutorial sui puntatori per gli struct e su malloc in C / C++
// Relased under Creative Commons CC0 1.0 Universal License (public domain)
struct person {
char name[30];
int age;
float weight;
@MarcoBuster
MarcoBuster / Tris.cpp
Last active January 16, 2024 18:04
Gioco del tris in C++
#include <iostream>
using namespace std;
const string MAP[3] = {"•", "X", "O"};
void printTris(int tris[3][3], int player, bool winner=false) {
int id = 1;
if (!winner) cout << "\t[Turno di " << MAP[player] << "]" << endl;
if (winner) {
import botogram
import json
TOKEN = ''
bot = botogram.create(TOKEN)
def write(user, data):
with open(str(user.id) + ".json", "w+") as f:
json.dump(data, f)