Skip to content

Instantly share code, notes, and snippets.

View fortunto2's full-sized avatar

Rustam Salavatov fortunto2

View GitHub Profile
@fortunto2
fortunto2 / prompt_for_gpt_summarize.md
Last active November 11, 2024 12:11
Transcribe mp3 to SRT (with whisper)

This GPT processes SRT or text files with timecodes, specifically from YouTube videos, to create an Edit Decision List (EDL) with summarized highlight ideas. The goal is to scan through timestamps, generate summaries of the segments, and structure the content in an EDL format that is suitable for post-production use. It can extract the most relevant information from each clip and format it into a cohesive timeline, including clip details, highlights, and timestamps, ensuring an organized editing flow.

EDL (Edit Decision List) Generation Rules

Overview: An Edit Decision List (EDL) is used to describe how video clips are edited and compiled into a final sequence. It specifies which portions of a source video are included in the edit, their start and end times, and where they appear in the final timeline.

Each line in an EDL entry includes:

Clip Number: Identifies the sequence of clips in the final edit.

from telethon import TelegramClient
from telethon.tl.functions.messages import GetHistoryRequest
from datetime import datetime, timedelta, timezone
import asyncio
# Replace with your own API_ID and API_HASH
API_ID = '****'
API_HASH = '****'
CHANNEL_USERNAME = '****' # Example: '@channel_name'
@fortunto2
fortunto2 / index.html
Last active February 23, 2022 17:24
map
{% load static %}
<!doctype html>
<html lang="en">
<head>
<title>Markers Map</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="{% static 'map.css' %}">
<link rel="stylesheet" type="text/css" href="https://unpkg.com/[email protected]/dist/leaflet.css">
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
@fortunto2
fortunto2 / influx.yaml
Last active February 15, 2022 16:13
config influx 2 kube
## @section Global parameters
## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
## @param global.imageRegistry Global Docker image registry
## @param global.imagePullSecrets Global Docker registry secret names as an array
## @param global.storageClass Global storage class for dynamic provisioning
##
global:
mongodump --host localhost --port 27017 --username root --password XXXX --authenticationDatabase admin -d XXXX --gzip --archive > dump_`date "+%Y-%m-%d"`.gz
mongorestore --archive="mongodump-test-db" --nsFrom='test.*' --nsTo='examples.*'
#### build mongo dumper
git clone https://github.com/mongodb/mongo-tools
cd mongo-tools
sudo apt-get install -y libkrb5-dev
./make build -tools=mongodump,mongorestore
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help
vpn: ## Запускает
@wg-quick up /etc/wireguard/wg0.conf
@fortunto2
fortunto2 / runDSLR.sh
Created October 17, 2020 12:29
RUN canon DSLR as web-camera
#!/bin/sh
# https://askubuntu.com/questions/856460/using-a-digital-camera-canon-as-webcam
sudo modprobe v4l2loopback
gphoto2 --abilities
gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0
@fortunto2
fortunto2 / 1json_pydantic_django.py
Last active September 15, 2021 23:50
Use pydantic with django jsonfield and custom classes
import json
from fractions import Fraction
from pprint import pprint
from django.core import exceptions
from django.contrib.postgres.fields import JSONField
from psycopg2.extras import Json
import orjson
from pydantic.json import custom_pydantic_encoder
@fortunto2
fortunto2 / Dockerfile
Created March 16, 2020 15:57 — forked from 50Bytes-dev/Dockerfile
ACME traefik get manual dns challenge
FROM traefik:v2.2
RUN touch acme.json
RUN chmod 600 acme.json
@fortunto2
fortunto2 / clear.sh
Created March 6, 2020 18:25
очистка убунту от хлама
#!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
done