Skip to content

Instantly share code, notes, and snippets.

0
SECTION
2
HEADER
9
$ACADVER
1
AC1015
9
$ACADMAINTVER
@jrjbertram
jrjbertram / example.py
Created May 18, 2020 02:29
Example of breaking up the run_window_config so that render could be called by an external simulation.
import moderngl_window as mglw
def run_window_config(config_cls: mglw.WindowConfig, timer=None, args=None) -> None:
"""
Run an WindowConfig entering a blocking main loop
Args:
config_cls: The WindowConfig class to render
args: Override sys.args
"""
@jrjbertram
jrjbertram / converter.py
Created January 24, 2019 16:24
Quick hack of cvat converter.py to handle interpolation. (Breaks support for non-interpolated annotation, however.)
#!/usr/bin/env python
#
# SPDX-License-Identifier: MIT
"""
Given a CVAT XML and a directory with the image dataset, this script reads the
CVAT XML and writes the annotations in PASCAL VOC format into a given
directory.
This implementation only supports bounding boxes in CVAT annotation format, and
warns if it encounter any tracks or annotations that are not bounding boxes,
@jrjbertram
jrjbertram / sendto_reproducer.ino
Created September 1, 2014 14:08
fast back to back sendtos crash arduino due
#include <ccspi.h>
#include <Adafruit_CC3000.h>
#include <SPI.h> // neede for some reason here too
#include <Arduino.h>
#include "utility/socket.h"
#define ENABLE_NET 1