Skip to content

Instantly share code, notes, and snippets.

@pantor
pantor / topico_example.cpp
Created June 4, 2021 11:38
TopiCo Benchmark
// Simple benchmark script for TopiCo
#include "rt_nonfinite.h"
#include "topico_wrapper.h"
#include "topico_wrapper_terminate.h"
#include "topico_wrapper_types.h"
#include "coder_array.h"
#include <iostream>
#include <sstream>
@pantor
pantor / nvidia-driver-realtime.sh
Last active May 15, 2024 15:52
Installing NVIDIA drivers on a realtime Linux (PREEMPT-RT)
# Tested on Ubuntu 16.04 and X11, 2019
# 1. Download NVIDIA driver as a .run file
# 2. Stop X-Server
sudo service lightdm stop
# 3. Blacklist Nouveau driver
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
@pantor
pantor / viewer.py
Created December 11, 2017 23:08
Image Viewer
#!/usr/bin/python3
import numpy as np
import pandas as pd
import tkinter as tk
from PIL import Image, ImageTk
class Viewer:
grid = (3, 2)
@pantor
pantor / image_matching.py
Last active November 30, 2017 14:25
Images Transformation
#!/usr/bin/python2
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import os
import numpy as np
import matplotlib.pyplot as plt
from skimage import io
@pantor
pantor / chordpro_to_text
Created October 23, 2014 14:46
A simple PHP script that converts the ChordPro syntax to plain text.
<?php
$test = "Hello [C]song, this is [Am]wonderful. [E] [Am]";
print($test."\n");
$helper_line = $test;
$chord_line = "";
$lyrics_line = "";