Skip to content

Instantly share code, notes, and snippets.

@muendelezaji
muendelezaji / pre-commit-clang-format.sh
Last active April 5, 2016 09:56
Git hook to re-format code on commit
#!/bin/bash
#
# git pre-commit hook that runs a clang-format stylecheck.
#
# This file is part of a set of unofficial pre-commit hooks available
# at github.
# Link: https://github.com/githubbrowser/Pre-commit-hooks
# Contact: David Martin, david.martin.mailbox@googlemail.com
#
# Modifications for clang-format by rene.milk@wwu.de
@muendelezaji
muendelezaji / struct-pointer-array.cpp
Last active June 15, 2016 01:25
Converting an array of struct pointers to a generic int pointer and recovering original structs from it. May or may not have been used to settle an argument or two ;)
// Coliru - http://coliru.stacked-crooked.com/a/655f184e31f1e779
#include <iostream>
using std::size_t;
using std::string;
using std::ostream;
using std::cout;
using std::endl;
using std::boolalpha;
@muendelezaji
muendelezaji / page.html
Last active November 21, 2016 06:09
Exponential backoff strategy for a generic asynchronous function call
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Retry with Backoff</title>
</head>
<body>
<pre id="result"></pre>
</body>
</html>
@muendelezaji
muendelezaji / bash-to-zsh-hist.py
Created October 5, 2016 14:18 — forked from op/bash-history-to-zsh-history.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time
@muendelezaji
muendelezaji / TrafficVolume.java
Last active October 16, 2017 15:40
Clean up traffic volume data from a range of sensors and parse into a more usable format
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.lang.StringBuilder;
import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.Files;
import java.nio.file.FileSystems;
import java.nio.file.FileVisitResult;
import java.nio.file.Path;
import java.nio.file.Paths;
@muendelezaji
muendelezaji / Dockerfile
Last active February 21, 2018 14:04
Vagrant and Docker setups for the ARM Computer Vision and Machine Learning library - https://github.com/ARM-software/ComputeLibrary
# Docker
FROM ubuntu:xenial
# Install developer tools
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update && apt-get -y install \
build-essential \
g++-arm-linux-gnueabihf \
git \
openjdk-8-jdk \
@muendelezaji
muendelezaji / build-tensorflow.sh
Last active December 1, 2021 19:27 — forked from PatWie/update-tensorflow.sh
Script to build TensorFlow from source. Platform is ARM64 (aka aarch64) with OpenCL support via Codeplay SYCL SDK
#!/bin/bash
# =============================================================
# UPDATE SOURCE
# =============================================================
# git clone https://github.com/tensorflow/tensorflow
# git checkout -- .
# git pull origin master
# TF_BRANCH=r1.8
TF_ROOT=/home/tensorflow
@muendelezaji
muendelezaji / 0001-tflite-allow-fp16-for-fp32-models.patch
Last active February 11, 2020 13:22
Script to build TFLite benchmark_model tool and label_image demo for Android (arm64) including patches for FP16 support and optional RUY support
From b5a99e2174f115f87c0cb3de9d2a2479a0193db2 Mon Sep 17 00:00:00 2001
From: Koan-Sin Tan <koansin.tan@gmail.com>
Date: Sun, 18 Nov 2018 13:11:38 +0800
Subject: [PATCH 1/3] add cmdline option to allow running fp32 models with fp16
Add an option for TFLite benchmark_model to allow running fp32
models with fp16. Useful when testing NNPAI accelerators with
fp16.
---
.../lite/tools/benchmark/benchmark_tflite_model.cc | 9 ++++++++-
@muendelezaji
muendelezaji / README.markdown
Created October 14, 2019 21:47 — forked from alexshk/README.markdown
List of countries in YAML, CSV and TXT format
@muendelezaji
muendelezaji / tableau10.mplstyle
Last active March 5, 2020 02:40 — forked from rhiever/tableau10.mplstyle
Custom style (Tableau-inspired) for matplotlib plots in Jupyter Notebooks
# Author: Randal S. Olson (randalolson.com / @randal_olson)
# Uses Tableau's Tableau10 color scheme
#
# In Notebook, use it as follows:
# plt.style.use('https://gist.githubusercontent.com/muendelezaji/75fe7ca33ac3b47730ba85378459a206/raw/1b807615235ff6f4c919b5b70b01a609619e1e9c/tableau10.mplstyle')
figure.figsize: 12, 7
figure.edgecolor: white
figure.facecolor: white