Skip to content

Instantly share code, notes, and snippets.

View m-decoster's full-sized avatar

Mathieu De Coster m-decoster

View GitHub Profile
@m-decoster
m-decoster / main.py
Last active January 31, 2025 13:15
OMPL constrained planning
import numpy as np
from airo_drake import SingleArmScene, add_floor, add_manipulator, add_meshcat, finish_build, animate_joint_trajectory, \
time_parametrize_toppra, visualize_frame, add_wall
from airo_planner import SingleArmOmplPlanner, function_to_ompl, uniform_symmetric_joint_bounds
from airo_typing import HomogeneousMatrixType, JointConfigurationType
from ompl import base as ob
from ompl import geometric as og
from pydrake.planning import RobotDiagramBuilder, SceneGraphCollisionChecker
from ur_analytic_ik_ext import ur3e
@m-decoster
m-decoster / cut_out_mkv.sh
Created June 28, 2019 14:13
Remove part of an MKV file
#!/usr/bin/env bash
# Very simple script if you have to do this operation quite often, but is not exactly checking a lot of edge cases
# USE WITH CARE!
# Requires ffmpeg (apt install ffmpeg)
# Requires mkvmerge (apt install mkvtoolnix)
# Call as ./cut_out_mkv.sh INPUT_FILE.mkv 00:00:10 00:00:15 OUTPUT_FILE.mkv to e.g.
# remove 5 seconds from the video starting at the tenth second
[package]
name = "triangle"
version = "0.1.0"
authors = ["Mathieu De Coster <[email protected]>"]
[dependencies]
sdl2 = "0.30"
gl = "0.6"
@m-decoster
m-decoster / main.py
Created November 29, 2016 21:36
A character level LSTM for text generation, based on Lasagne's text generation recipe
import numpy as np
import lasagne as L
import theano as T
import random
import sys
def info(info_string):
print '[INFO] {}'.format(info_string)
def build_network(batch_size, seq_length, vocabulary_size, num_hidden, learning_r):
@m-decoster
m-decoster / webgl.dart
Last active September 4, 2023 09:05
A simple WebGL application in Dart to get you started.
library webglapp;
import 'dart:typed_data';
import 'dart:html';
import 'dart:web_gl';
import 'dart:async';
CanvasElement canvas = document.getElementById("gameCanvas");
RenderingContext gl;