Skip to content

Instantly share code, notes, and snippets.

# Quick and dirty AI-generated script for local dictation with GUI
# Generated by Gemini 2.5-flash
#
# Setup: pip install pyaudio whisper
# Run: python local-ai-dictation-gui.py
# Trouble shooting:
# - Install Python with tkinter
# - Set your microphone as default input in your system settings
# - Using a too big model will slow down the output
# - French is used as default language
# Jeu facile pour apprendre le Python !
# © 2024, gist.github.com/gitbra
# Constantes du jeu
c_largeur = 7
c_hauteur = 6
# Fonctions réutilisables
def safe_int(column: str) -> int:
@gitbra
gitbra / httpd.py
Created July 10, 2023 23:15
Static HTTP server within a local folder
from aiohttp import web
app = web.Application()
app.router.add_static('/', path='.')
web.run_app(app, host='127.0.0.1', port=8080)
@gitbra
gitbra / sftime.cpp
Created July 7, 2021 19:03
Tool to change the creation and modification dates of a file
#include <cstdio>
#include <windows.h>
#include <fileapi.h>
#include <timezoneapi.h>
int main()
{
char filename[1024];
HANDLE h;
SYSTEMTIME target;