Skip to content

Instantly share code, notes, and snippets.

View fungos's full-sized avatar
🐀
.

Danny Angelo Carminati Grein fungos

🐀
.
View GitHub Profile
@fungos
fungos / transcribe.py
Created June 12, 2025 00:52 — forked from scpedicini/transcribe.py
Python Dictation Transcription Application
# This script will transcribe an audio file (mp3, wav, etc.) to text and then clean the text using a local LLM model via Ollama. Technically, this script will work with any LLM that supports the standard OpenAI bindings with minor adjustments.
# GETTING STARTED:
# 1. Install required python packages (pip install openai python-dotenv)
# 2. Git clone a copy of ggerganov/whisper (https://github.com/ggerganov/whisper.cpp)
# 3. Build the whisper binary (see the whisper.cpp README for instructions)
# 4. Download one of the whisper models (largev2 is the most accurate for all languages, though the base model works reasonably well for English).
# 5. Install ffmpeg (brew install ffmpeg on macOS, apt-get install ffmpeg)
# 6. Install ollama (https://ollama.com/download)
# 7. Download an LLM model (https://ollama.com/library)
//
// Created by mfuntowicz on 3/28/23.
//
// ! Requires std=c++20
#include <span>
#include "safetensors.hpp"
#include "nlohmann/json.hpp"
namespace huggingface::safetensors {
@fungos
fungos / dump_core.rs
Created March 12, 2020 13:17 — forked from epilys/dump_core.rs
easy core dump on panic in rust for debugging
pub fn register_panic_handler() {
let default_panic = std::panic::take_hook();
std::panic::set_hook(Box::new(move |panic_info| {
default_panic(panic_info);
// Don't forget to enable core dumps on your shell with eg `ulimit -c unlimited`
let pid = std::process::id();
eprintln!("dumping core for pid {}", std::process::id());
@fungos
fungos / crawler.rs
Created March 2, 2020 18:21 — forked from rolisz/Cargo.toml
Simple web crawler in Rust
use rayon::prelude::*;
use reqwest::Url;
use select::document::Document;
use select::predicate::Name;
use select::predicate::Predicate;
use std::collections::HashSet;
use std::fs;
use std::io::Error as IoErr;
use std::io::Read;
use std::path::Path;
@fungos
fungos / nrr_ill.h
Created January 19, 2020 13:55 — forked from Reedbeta/nrr_ill.h
#pragma once
// Intrusive Linked List (or Internal Linked List, etc)
// by Nathan Reed, 2020-01-18. Licensed CC0 https://creativecommons.org/publicdomain/zero/1.0/
//
// Use it like:
//
// class MyClass
// {
// ...
#!/usr/bin/env sh
if test ! -d ./overlay; then
read -p "No overlay found here. Want to create one? (y/N)" yn
case $yn in
[Yy]* ) install -d overlay/upperdir && install -d overlay/workdir && install -d overlay/mnt; break;;
* ) exit;;
esac
fi
@fungos
fungos / CLA.md
Last active September 26, 2019 01:41

CrossUO Individual Contributor License Agreement

Thank you for your interest in contributing to CrossUO ("We" or "Us").

This contributor agreement ("Agreement") documents the rights granted by contributors to Us. To make this document effective, please sign it and send it to Us by electronic submission, following the instructions at . This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us.

1. Definitions

"You" means the individual who Submits a Contribution to Us.

@fungos
fungos / tmux-cheatsheet.markdown
Created January 27, 2018 00:53 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@fungos
fungos / rust-env-setup.ps1
Last active June 15, 2018 13:43
A quickly hacked together Power Shell script to install and setup a complete Rust Development Environment.
function Download-Redirect-As
{
$uri = $args[0]
$target = $args[1]
Write-Host "Downloading $target..."
$request = Invoke-WebRequest -Uri $uri -MaximumRedirection 0 -ErrorAction Ignore
if ($request.StatusCode -ge 300 -and $request.StatusCode -lt 400)
{
$uri = $request.Headers.Location
}
#define ann_sigmoid(s) (1.0f / (1.0f + expf(-(s))))
#define ann_gaussian(s) (expf(-(s) * (s)))
#define ann_sin(s) (sinf(s))
#define ann_cos(s) (cosf(s))
#define ann_linear(s) (s)
#define ann_relu(s) ((s) < 0.0f ? FLT_EPSILON * (s) : (s))
#define ann_sigmoid_d(v) ((v) * (1.0f - (v)))
#define ann_gaussian_d(v, s) (-2.0f * (s) * v)