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 / 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 <mth.decoster@gmail.com>"]
[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;