Skip to content

Instantly share code, notes, and snippets.

View rnbguy's full-sized avatar

Rano | Ranadeep rnbguy

View GitHub Profile
@rnbguy
rnbguy / tmux_local_install.sh
Last active August 4, 2016 09:16 — forked from ryin/tmux_local_install.sh
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/.local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
# create our directories
@rnbguy
rnbguy / cvc4_install.sh
Last active August 12, 2016 12:34
Install CVC4 from GitHub
#!/bin/bash
# script for installing CVC4 SMT solver locally
# CVC4 will be installed in $HOME/cvc4pref/bin
# exit on error
set -e
# clone repo from github
git clone https://github.com/cvc4/cvc4
@rnbguy
rnbguy / earthview_wallpaper.py
Last active October 28, 2016 17:46
Set images in wallpaper from Google EarthView
#!/usr/bin/env python3
"""
earthview_wallpaper.py
Get next images from Google EarthView (earthview.withgoogle.com)
and set it as the background wallpaper.
"""
@rnbguy
rnbguy / cbmc_run.sh
Created May 11, 2017 20:23
run cbmc on benchmarks are generate outputs
#!/usr/bin/bash
eval set -- $(getopt -o f:u:t:m:b:d: -l flags:,unwind:,timelimit:,memorylimit:benchmarkpath:dumpdir: -- "$@")
unwind=5
flags=""
timelimit=900
memorylimit=15000000
dump_dir="dump_directory"
@rnbguy
rnbguy / csv_from_dumps.py
Created May 11, 2017 20:27
generate csv from cbmc run dumps
#!/usr/bin/env python3
import os
import glob
import sys
import re
import csv
dump_dir = sys.argv[1].strip("/")
dump_basename = os.path.basename(dump_dir)
@rnbguy
rnbguy / fileserver.go
Created August 1, 2017 19:43
simple golang fileserver
package main
import (
"flag"
"fmt"
"net"
"net/http"
)
// simple golang fileserver
@rnbguy
rnbguy / decode_gyro_misphere.py
Last active February 23, 2018 22:34
Decode gyro data from MiSphere
import argparse
import struct
import numpy as np
import PIL.ExifTags
from PIL import Image
ap = argparse.ArgumentParser()
group = ap.add_mutually_exclusive_group(required=True)
group.add_argument("-i", "--image", help="path to the image")
@rnbguy
rnbguy / ralign.py
Created February 14, 2018 14:43 — forked from CarloNicolini/ralign
Umeyama algorithm for absolute orientation problem in Python
import numpy as np
"""
RALIGN - Rigid alignment of two sets of points in k-dimensional
Euclidean space. Given two sets of points in
correspondence, this function computes the scaling,
rotation, and translation that define the transform TR
that minimizes the sum of squared errors between TR(X)
and its corresponding points in Y. This routine takes
O(n k^3)-time.
@rnbguy
rnbguy / !AntidoteDB_docker.md
Last active April 30, 2019 15:12
AntidoteDB docker-compose file

In one console,

docker-compose up

When the nodes are ready, in another console,

docker exec antidote1 ./connect.erl 3
@rnbguy
rnbguy / !Boogie_docker.md
Last active February 28, 2019 17:27
Boogie is an intermediate verification language (https://github.com/boogie-org/boogie)

Put a foo.bpl file in proofs directory. Then run

docker-compose run boogie proofs/foo.bpl