Skip to content

Instantly share code, notes, and snippets.

View minusplusminus's full-sized avatar
🎯
Focusing

Martijn Mellema minusplusminus

🎯
Focusing
View GitHub Profile
@ilomon10
ilomon10 / client.py
Created February 27, 2020 05:52
Send image as base64 buffer from client (python opencv) to server (nodejs) using SocketIO
import cv2
import socketio #python-socketio by @miguelgrinberg
import base64
sio = socketio.Client()
sio.connect('http://x.x.x.x:xxxx)
cam = cv2.VideoCapture(0)
while (True):
@tylercubell
tylercubell / add_remove_source_dynamically.py
Created February 7, 2019 20:08
GStreamer Python Add/Remove Source Dynamically
import gi
gi.require_version('Gst', '1.0')
from gi.repository import GObject, Gst
from threading import Thread, Event
Gst.init(None)
class Main:
def __init__(self):
self.pipeline = Gst.Pipeline.new("pipeline")
@mvanga
mvanga / ecs-annotated.py
Last active October 5, 2023 15:32
A Python3 implementation of an entity-component-system in under 50 lines code.
import uuid
import json
# Returns a python dictionary given a file containing a JSON-based
# component definition. Every definition *must* contain a 'type'
# and 'schema' field inside a top-level dictionary. Here is an
# example of a simple schema file that defines a 'meta' component
# containing a 'name' field.
#
@aursu
aursu / modem.py
Last active June 27, 2022 03:16
ModemManager interface via Python 3 (Dbus, Modems, SMS)
#!/usr/bin/python3
# script created for reading SMS messages from 3G modem connected to PC
# 1) it looks for modem
# 2) reads all SMS messages from modem
# 3) prints all found SMS messages to stdout only if total messages count
# greater than SMS_STORE_COUNT (default is 3)
# 4) save all but SMS_STORE_COUNT messages to txt files and
# delete them from modem
@Brainiarc7
Brainiarc7 / ffmpeg-desktop-livestreaming-nvenc-and netcat.md
Last active December 13, 2023 03:27
This gist will show you how to livestream your Linux desktop to a client via FFMpeg using a GPU-accelerated video encoder (NVENC and VAAPI-based)

Low-Latency Live Streaming for your Desktop using ffmpeg and netcat:

Preamble:

In this post I will explore how to stream a video and audio capture from one computer to another using ffmpeg and netcat, with a latency below 100ms, which is good enough for presentations and general purpose remote display tasks on a local network.

The problem:

Streaming low-latency live content is quite hard, because most software-based video codecs are designed to achieve the best compression and not best latency. This makes sense, because most movies are encoded once and decoded often, so it is a good trade-off to use more time for the encoding than the decoding.

@unohee
unohee / Bjorklund.cpp
Last active April 6, 2024 15:29
Bjorklund Algorithm in C++
#include "Bjorklund.h"
//Edited NoisyLittleBurger's Bjorklund Algorithm in C
//http://www.noisylittlebugger.net/diy/bjorklund/Bjorklund_Working_Final/Bjorklund_algorithm_arduino.txt
//CHANGED :
//1. use dynamic array.
//2. fixed sequence's off-spot problem
//3. added Explanation about Algorithm based on G.Touissant's Paper,
//"The Euclidean Algorithm Generates Traditional Musical Rhythms"
//
@czottmann
czottmann / gist:3402842
Created August 20, 2012 10:11
Bug report template
#### Issue description
#### Steps to reproduce the issue
1.
2.
3.