Skip to content

Instantly share code, notes, and snippets.

View srafols's full-sized avatar

Sergi Ràfols srafols

  • Vilafranca del Penedès
View GitHub Profile
@rameerez
rameerez / telegram-mtproxy.md
Last active November 19, 2025 03:30
Telegram Proxy How-To: complete and up-to-date MTProxy tutorial

How to set up a Telegram Proxy (MTProxy)

This tutorial will teach you how to set up a Telegram MTProxy on an Ubuntu 22.04 sever using AWS Lightsail, although you can use any other Linux distribution and cloud provider.

Using a Telegram proxy is a safe, easy and effective way of overcoming Telegram bans. It's useful, for example, to keep using Telegram under tyrannical regimes, or to circumvent judges' decisions to block Telegram.

Telegram proxies are a built-in feature in all Telegram apps (both mobile and desktop). It allows Telegram users to connect to a proxy in just one or two clicks / taps.

Telegram proxies are safe: Telegram sends messages using their own MTProto secure protocol, and the proxy can only see encrypted traffic – there's no way for a proxy to decrypt the traffic and read the messages. The proxy does not even know which Telegram users are using the proxy, all the proxy sees is just a list of IPs.

@kylemcdonald
kylemcdonald / function-calling.ipynb
Created June 14, 2023 01:10
Example of OpenAI function calling API to extract data from LAPD newsroom articles.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mouredev
mouredev / chatgpt_api.py
Created March 7, 2023 19:31
Ejemplo de uso del API de ChatGPT desde Python
import openai # pip install openai
import typer # pip install "typer[all]"
from rich import print # pip install rich
from rich.table import Table
"""
Webs de interés:
- Módulo OpenAI: https://github.com/openai/openai-python
- Documentación API ChatGPT: https://platform.openai.com/docs/api-reference/chat
- Typer: https://typer.tiangolo.com
@nukeador
nukeador / chatgpt-bot-telegram.py
Last active December 9, 2022 14:28
Este script ha sido creado 100% por ChatGPT, sirve para crear un bot en telegram que conecte a la API de ChatGPT para hablar con el bot (también responde en grupos a los usuarios autorizados). Sutituye en el código XXXX por tu api de openai, tu token de telegram y tu user_id de telegram https://twitter.com/nukeador/status/1599502803877203979 Pue…
# Puedes ver una versión más avanzada de este bot en https://github.com/nukeador/chatgpt-tegram-bot
# Requisitos:
# 1. Tener una cuenta de Telegram y haber creado un bot de Telegram utilizando el BotFather.
# 2. Tener una cuenta de OpenAI y haber obtenido una clave de acceso a la API de ChatGPT.
# 3. Tener instalado Python 3 en el sistema.
# 4. Instalar los módulos de python `pyTelegramBotAPI` y `openai` utilizando pip.
# 5. Configurar el token del bot de Telegram y la clave de acceso a la API de ChatGPT en el script.
# 6. Ejecutar el script utilizando una conexión a Internet activa.
@midudev
midudev / README.md
Created October 15, 2022 17:52
Transcribe vídeo de YouTube con Whisper e Inteligencia Artificial

Requisitos

Necesitas tener instalado Python 3.9 e instalar la dependencia de Whisper y PyTube:

pip install git+https://github.com/openai/whisper.git
pip install pytube

También necesitas tener instalado ffmpeg. Según tu sistema operativo se instala de esta forma:

@nikolay-n
nikolay-n / jqPlay.md
Created September 29, 2020 20:49
jqPlay snippets collected using google and github search
@br3ndonland
br3ndonland / github-actions-notes.md
Last active September 30, 2025 19:09
Getting the Gist of GitHub Actions
@katef
katef / plot.awk
Last active November 3, 2025 23:57
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@mminer
mminer / cachedecorator.py
Created January 12, 2015 23:57
An example of a Python decorator to simplify caching a function's result.
"""An example of a cache decorator."""
import json
from functools import wraps
from redis import StrictRedis
redis = StrictRedis()
def cached(func):