Skip to content

Instantly share code, notes, and snippets.

View ergoithz's full-sized avatar
🚚
Moved to gitlab.com/ergoithz

Felipe A. Hernandez ergoithz

🚚
Moved to gitlab.com/ergoithz
View GitHub Profile
@nico-lab
nico-lab / h264_nvenc.txt
Last active June 19, 2024 11:34
ffmpeg -h encoder=h264_nvenc
Encoder h264_nvenc [NVIDIA NVENC H.264 encoder]:
General capabilities: dr1 delay hardware
Threading capabilities: none
Supported hardware devices: cuda cuda d3d11va d3d11va
Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 bgra rgb0 rgba x2rgb10le x2bgr10le gbrp gbrp16le cuda d3d11
h264_nvenc AVOptions:
-preset <int> E..V....... Set the encoding preset (from 0 to 18) (default p4)
default 0 E..V.......
slow 1 E..V....... hq 2 passes
medium 2 E..V....... hq 1 pass
@kracekumar
kracekumar / ws_app.py
Last active October 5, 2021 08:52
Simple websocket server with uvloop.
# -*- coding: utf-8 -*-
import asyncio
import uvloop
from aiohttp.web import Application, MsgType, WebSocketResponse
def add_socket(app, socket, user_id):
if user_id in app['connections']:
pass
@dnmellen
dnmellen / ocrshot.py
Last active March 2, 2023 11:06
Takes an screenshot (the user draws a rectangle to select the interesting area), scans the resulting image and copy the text to clipboard
#!/usr/bin/python -tt
"""
Takes an screenshot (the user draws a rectangle to select the interesting area), scans the resulting image and copy the text to clipboard
- scrot (http://en.wikipedia.org/wiki/Scrot)
- readbot (`pip install readbot`)
- pyperclip (`pip install pyperclip`)
"""