Skip to content

Instantly share code, notes, and snippets.

View ProfAndreaPollini's full-sized avatar
🎯
Focusing

Andrea Pollini ProfAndreaPollini

🎯
Focusing
View GitHub Profile
# import sqlite3 as sq
# from datetime import datetime
# import json
# def get_last_data(days=1):
# rows = []
# with sq.connect("db.sqlite") as conn:
# conn.row_factory = sq.Row
# c = conn.cursor()
# %%
import sqlite3 as sq
import pandas as pd
conn = sq.connect('dati.sqlite')
conn.row_factory = sq.Row
c = conn.cursor()
rs = c.execute('SELECT COUNT(*) FROM misurazioni')
rs = rs.fetchone()
@ProfAndreaPollini
ProfAndreaPollini / gist:c080369dc140a09b9a05016def59e30c
Created April 12, 2024 17:25
flask sha1 signe package verifier
import os
import hmac
from flask import Flask,request,jsonify
import json
app = Flask(__name__)
MAGAZZINO_WEBHOOK_SECRET=""
@app.route('/')
[
{
"id": "21431df41ab893cc",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
@ProfAndreaPollini
ProfAndreaPollini / app.py
Created February 27, 2024 17:28
webapp flask con autenticazione semplice
from flask import Flask, redirect, render_template, request, url_for,session,g
import sqlite3 as sq
import hashlib
app = Flask(__name__)
USERNAME = "pippo"
PASSWORD = "pippo"
app.secret_key = b'_5#y2L"F4Q8z\n\xec]/'
@ProfAndreaPollini
ProfAndreaPollini / Test.txt
Created February 10, 2024 09:52
Cprova ed. Civica
Descrivere i social network parlando della loro evoluzione e delle questioni legate a sicurezza e gestione della privacy. Discutere gli aspetti legati alla condivisione delle risorse nella rete.
@ProfAndreaPollini
ProfAndreaPollini / game_loop.cpp
Created January 15, 2024 10:38 — forked from mariobadr/game_loop.cpp
A basic game loop using std::chrono
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 Mario Badr
*
* 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
@ProfAndreaPollini
ProfAndreaPollini / entity.rs
Created July 27, 2023 18:30
Entity and Item for a Rust Roguelike
use std::fmt::Display;
#[derive(Debug)]
pub struct Entity {
// id: Option<EntityKey>,
name: String,
health: i32,
xp: i32,
// inventory: Option<Inventory>,
}
import taichi as ti
import taichi.math as tm
import pygame as pg
ti.init(arch=ti.gpu, default_fp=ti.f64, fast_math=False)
pg.init()
clock = pg.time.Clock()
@ProfAndreaPollini
ProfAndreaPollini / ROADMAP.md
Created October 19, 2021 14:20
TODO LIST | JAVASCRIPT VANILLA

JAVASCRIPT TODO LIST

strumenti

User story

  • come utente voglio visualizzare le note
  • come utente voglio aggiungere una nuova nota