Skip to content

Instantly share code, notes, and snippets.

/**
* dwt53.c - Fast discrete biorthogonal CDF 5/3 wavelet forward and inverse transform (lifting implementation)
*
* This code is provided "as is" and is given for educational purposes.
* 2007 - Gregoire Pau - [email protected]
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
@speps
speps / LeastSquaresL2Norm.jl
Created March 24, 2019 15:50
Julia: simple example of least squares L2 norm optimization using JuMP
# very simple example of L2 norm optimization using JuMP
using Images, TestImages, JuMP, Ipopt
# crop a test image to 50x50 and then flatten it
original = Gray.(testimage("lighthouse"))[250:299, 150:199]
w = size(original, 1)
h = size(original, 2)
t = w * h
y = reshape(float.(original), t)
@speps
speps / bcast-server.go
Created September 18, 2016 09:06
Golang: server streaming data using channels broadcasting (one source, multiple destination)
package main
import (
"fmt"
"log"
"net/http"
"sync"
)
type worker struct {
@speps
speps / DebugDraw.cs
Created September 11, 2012 19:48
DebugDraw - Unity3D based debug drawing for programmers
// Remi Gillig - http://speps.fr - 2012 - Public domain
using System;
using System.Collections.Generic;
using UnityEngine;
public class DebugDraw
{
static Material material = new Material(
@"Shader ""Custom/DebugDraw"" {
@speps
speps / SillyThings.cs
Created August 2, 2012 22:08
FudgeVB - simple C# file and instructions to use VB libraries in Unity3D projects
// GOAL: To remove dependency on Microsoft.VisualBasic in VB.NET libs... (eg. to use them in Unity3D)
// Place this file in a separate C# project and reference it from the VB project
// In the .vbproj file add
// <NoVBRuntimeReference>true</NoVBRuntimeReference>
// in the first <PropertyGroup> (the one without a condition at the beginning)
// This implies a ton of fixes to apply to replace things like string compare etc.
// Non-exhaustive list of fixes :
// - auto conversions are not done (use .ToString() for example)