Skip to content

Instantly share code, notes, and snippets.

View henrikh's full-sized avatar

Henrik Enggaard henrikh

  • Denmark
View GitHub Profile

benchmark.py goes in the t-crest folder. Running it requires Python 3.

benchmarking.patch is applied in the patmos folder using

git apply benchmarking.patch

A folder called benchmark must exist in the t-crest folder.

The benchmarks were run on SSPM-device branch. Take notice that configuration and programming happens and works.

@henrikh
henrikh / data.json
Created May 10, 2017 20:13
Dataset for image compression
[
{
"File": "IR242-16bit",
"Format": "Golomb-16bit",
"CompressionFactor": 0.215483,
"Type": "Bit16",
"Max": 1.0,
"MSE": 0.491445,
"BinSize": 2,
"EntropyEstimate": 2.93074,
# Configuration file
DISPLAY_TIME = 50
entries = [
{
"src": "1829.jpg",
"xy": (0, 384),
"key": "1",
"pin": 23
# Configuration file
display_time = 15
entries = [
{
"src": "1829.jpg",
"xy": (0, 384),
"key": "1",
"pin": 23
@henrikh
henrikh / ev-bingo-board.lua
Created May 23, 2012 13:04
Eurovision bingo board generator
bingo_words = {"\\textit{Love}",
"\\textit{Peace}",
"\\textit{Heart}",
"\\textit{Family}",
"\\textit{Europe}",
"\\textit{Baku}",
"\\textit{Eurovision}",
"\\textit{Together}",
"\\textit{One}",
"Instrumental section",
@henrikh
henrikh / only-figures.sh
Created April 15, 2012 06:34
Take all figures from a LaTeX document and make a new document with only them.
#It's a shell script that should work on all Unix systems with pdflatex and pdfpages installed. You use by giving it the file name of the tex file (no .tex ending!) and the offset in pages (caused by front matter) as the second argument:
#
# ./only-figures.sh document 1
#
#
#First we load the .aux and prepare to store it in a variable.
STR=$(cat $1.aux |\
#We only care about the lines with figures.
grep figure |\
#And of these lines we only care about the number referring to unique pages.
#sidebar-notes a {
display: block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@henrikh
henrikh / gist:1306333
Created October 22, 2011 18:32
Very simple line-breaker
package main
import (
"fmt"
"strings"
)
var text = "I am a text that needs to be formatted. Please get started, I really can't wait to have so much fun with this. I also have some text that is supposed to break everything, but that won't really happen, 'cus I'm a badass programmer."
$ ruby ../gollum/lib/gollum.rb /home/henrik/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- ./gollum/git_access (LoadError)
from /home/henrik/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from ../gollum/lib/gollum.rb:23:in `<main>'
UnixPath do(
asSimpleString := method(path)
asString := getSlot("asSimpleString")
)