Skip to content

Instantly share code, notes, and snippets.

mmorton /
Created April 19, 2020 00:23 — forked from etienne87/
test of multiprocessing with python to stream temporally coherent batches
from __future__ import print_function
import glob
import sys
import time
import multiprocessing as mp, numpy as np, random
from prophesee_utils.td_video import ChronoVideo
import prophesee_utils.td_processing as tdp
import prophesee_utils.vis_utils as vis
import cv2
from numba import njit as jit
# install docker
sudo apt-get update
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
mmorton / gdk-gstappsrc-stream.c
Created April 20, 2019 06:12 — forked from nzjrs/gdk-gstappsrc-stream.c
GStreamer Streaming AppSrc Example
View gdk-gstappsrc-stream.c
/* gcc gdk-gstappsrc-stream.c -Wall `pkg-config --cflags --libs gstreamer-app-0.10 gdk-pixbuf-2.0` -o gdkstream */
#include <gst/gst.h>
#include <gst/app/gstappsrc.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
mmorton /
Last active May 5, 2018 00:04
Yarn With Private GitHub Repositories
  1. Open Shell (Use Git Bash on Windows)
  2. Run ssh-keyscan -H >> ~/.ssh/known_hosts.
  3. Create an SSH key with ssh-keygen -t rsa.
  4. Add SSH pub key to GitHub.
  5. Add the following to ~/.ssh/config:
      User git
mmorton / TokenValidator.cs
Created October 23, 2015 02:35 — forked from anonymous/TokenValidator.cs
Validate JSON Web Token (JWT) With .NET JWT Library
View TokenValidator.cs
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IdentityModel.Tokens;
using System.Linq;
using System.Net.Http;
using System.Security.Cryptography.X509Certificates;
using System.Text;
ReactDOM = require 'react/lib/ReactDOM'
ReactElement = require 'react/lib/ReactElement'
ReactElementValidator = require 'react/lib/ReactElementValidator'
SVGDOMPropertyConfig = require 'react/lib/SVGDOMPropertyConfig'
createFactory = if __DEV__
mmorton / component.js
Last active August 29, 2015 14:15 — forked from clavery/component.js
View component.js
import React from 'react';
import _ from 'underscore';
mmorton / Makefile
Last active August 29, 2015 14:15 — forked from edef1c/Makefile
View Makefile
sed -n -e '/^ \{4\}/s/^ \{4\}//p' $< > $@
sed -n -e '/^ \{4\}/s/^ \{4\}//p' $< > $@
coffee -cb $<
all: multi-inherit.future.js
* OpenSimplex (Simplectic) Noise in Java.
* (v1.0.1 With new gradient set and corresponding normalization factor, 9/19/14)
public class OpenSimplexNoise {
private static final double STRETCH_CONSTANT_3D = -1.0 / 6;
private static final double SQUISH_CONSTANT_3D = 1.0 / 3;
mmorton / CrossOriginSupportModule.cs
Created November 19, 2012 21:00
An IHttpModule for Enabling CORS
View CrossOriginSupportModule.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Sample
public class CrossOriginRequestInfo
public string Origin { get; set; }