Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tfmoraes's full-sized avatar

Thiago Franco de Moraes tfmoraes

View GitHub Profile
@tobiasfriden
tobiasfriden / Dockerfile
Last active March 27, 2024 09:30
Gstreamer WebRTC python demo working Dockerfile
FROM maxmcd/gstreamer:1.14-buster
WORKDIR /usr/src
RUN apt-get update && apt-get install -y python3-pip \
pkg-config \
libcairo2-dev \
gcc \
python3-dev \
libgirepository1.0-dev \
from asyncio.events import get_event_loop
import asyncio
import wx
import warnings
from asyncio.futures import CancelledError
from collections import defaultdict
GlobalWxAsyncApp = None
@edco
edco / fizzlefade.html
Last active December 30, 2017 13:42 — forked from antirez/fizzlefade.html
<!DOCTYPE html>
<html>
<head><title>Javascript RT</title></head>
<style>canvas {width: 1280px; height: 768px}</style>
<body>
<canvas id="framebuffer"></canvas>
<script type="text/javascript">
/* Fizzlefade using a Feistel network.
@simonw
simonw / recover_source_code.md
Last active January 16, 2024 08:13
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@deepankarsharma
deepankarsharma / modern_opengl_01_triangle.py
Created August 28, 2012 01:50
Modern opengl using Python
from glfwpy.glfw import (AUTO_POLL_EVENTS, OPENED, OPENGL_CORE_PROFILE,
OPENGL_FORWARD_COMPAT, OPENGL_PROFILE, OPENGL_VERSION_MAJOR,
OPENGL_VERSION_MINOR, WINDOW,
Enable, GetWindowParam, Init, OpenWindow, OpenWindowHint,
SetKeyCallback, SetWindowTitle, SwapBuffers, Terminate)
import numpy as np
from OpenGL.arrays import ArrayDatatype
from OpenGL.GL import (GL_ARRAY_BUFFER, GL_COLOR_BUFFER_BIT,
GL_COMPILE_STATUS, GL_FALSE, GL_FLOAT, GL_FRAGMENT_SHADER,
GL_LINK_STATUS, GL_RENDERER, GL_SHADING_LANGUAGE_VERSION,