Skip to content

Instantly share code, notes, and snippets.

View tzmartin's full-sized avatar
🏴‍☠️
ahoy!

tz ✨ tzmartin

🏴‍☠️
ahoy!
View GitHub Profile
@vilsonrodrigues
vilsonrodrigues / chat_history.py
Last active October 2, 2024 17:04
A multimodal chat history multi user implementation in python. ChatHistory can manage chat duration based-on time. Implement reranker methods to search relevant messages from users.
import asyncio
import math
import re
from collections import defaultdict
from datetime import datetime, timedelta
from typing import Callable, Dict, List, Optional, Union
class BasicDBConnector:
@Cortexelus
Cortexelus / udio.py
Last active July 31, 2024 16:46
Automate Udio (2024-04-13)
# AUTOMATE UDIO
# by DADABOTS dadabots.com
# was working on 2024-04-13
# tldr; get your login cookie, use it to automate udio from python
import requests
import json
from time import sleep
import re
@thomwolf
thomwolf / fast_speech_text_speech.py
Last active October 18, 2024 21:06
speech to text to speech
""" To use: install LLM studio (or Ollama), clone OpenVoice, run this script in the OpenVoice directory
git clone https://github.com/myshell-ai/OpenVoice
cd OpenVoice
git clone https://huggingface.co/myshell-ai/OpenVoice
cp -r OpenVoice/* .
pip install whisper pynput pyaudio
"""
from openai import OpenAI
import time
#pip install git+https://github.com/huggingface/transformers.git
import datetime
import sys
from transformers import pipeline
from transformers.pipelines.audio_utils import ffmpeg_microphone_live
pipe = pipeline("automatic-speech-recognition", model="openai/whisper-base", device=0)
sampling_rate = pipe.feature_extractor.sampling_rate
@taskylizard
taskylizard / fmhy.md
Last active November 15, 2024 16:34
/r/freemediaheckyeah, in one single file (view raw)
@dievardump
dievardump / README.md
Last active January 25, 2023 14:55
Base file I used to use for my mainnet contracts to be compatible with OpenSea

Warning !!!

Recent events have shown that the auto-approval for user proxies is way too dangerous.

Security of users' NFTs should come before the convenience of auto approving collection for trading.

This is why I decided to remove the files in this gist.

Security risk

@dbieber
dbieber / fastbook.py
Last active October 23, 2024 17:23
fastbook speeds up the silence in audiobooks, and can speed up the non-silence too
"""Performs automatic speed edits to audio books.
Example usage:
Assuming you have an audiobook book.aax on your Desktop:
1. Convert it to wav:
ffmpeg -i ~/Desktop/book.aax ~/Desktop/book.wav
2. Adjust the speed:
@keijiro
keijiro / KlakHap.md
Last active February 25, 2019 01:17

KlakHAP

Gif

KlakHAP is a Unity plugin that allows playing back a video stream encoded with the [HAP video codecs].

HAP is a fast and high-quality video codec often used in real-time interactive applications. From the HAP Codecs website:

@campoy
campoy / sum.c
Created January 12, 2018 21:54
C function called from BigQuery
int sum(int a, int b)
{
return a + b;
}
@enricofoltran
enricofoltran / main.go
Last active October 3, 2024 14:08
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"