Skip to content

Instantly share code, notes, and snippets.

@ferrouswheel
ferrouswheel / Readme.md
Created January 14, 2017 22:15 — forked from myfavouritekk/Readme.md
Extract dense optical flow and save as grayscale or RGB images

#Extract dense optical flow and save as grayscale or RGB images Copyright @ Kai Kang (myfavouritekk@gmail.com) 2016

##Dependencies

  • OpenCV 2 with Python interface
  • glob, numpy, siopy

##Usages

# help messages
@ferrouswheel
ferrouswheel / reclaimWindows10.ps1
Created January 9, 2017 21:15 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@ferrouswheel
ferrouswheel / Install NVIDIA Driver and CUDA.md
Created November 23, 2016 02:56 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora
@ferrouswheel
ferrouswheel / move_to_github.sh
Created November 8, 2015 06:30
Move a launchpad repository to github
#!/bin/bash
# Destination must exist as empty repo on github
GIT_REPO="git@github.com:opencog/opencog.git"
TEMP_PATH=~/src/opencog_bzr_to_git
echo "Using $TEMP_PATH as working dir"
BRANCHES=(trunk UnityEmbodiment)
mkdir -p ${TEMP_PATH}
cd ${TEMP_PATH}
@ferrouswheel
ferrouswheel / get_total_size.sh
Created September 26, 2016 02:07
Get size of executable and all dependencies
#!/bin/bash
resolve_path() {
# From https://github.com/keen99/shell-functions/tree/master/resolve_path
#I'm bash only, please!
# usage: resolve_path <a file or directory>
# follows symlinks and relative paths, returns a full real path
#
local owd="$PWD"
#echo "$FUNCNAME for $1" >&2
#!/usr/bin/env python
# gpu_stat.py [DELAY [COUNT]]
# dump gpu stats as a line of json
# {"time": 1474168378.146957, "pci_tx": 146000, "pci_rx": 1508000,
# "gpu_util": 42, "mem_util": 24, "mem_used": 11710,
# "temp": 76, "fan_speed": 44 }
@ferrouswheel
ferrouswheel / template.html
Last active December 19, 2015 12:19
Want to use Django pagination and bootstrap's paginator div? Want to customise and avoid installing an entirely new app? Just copy, paste and customise the below.
<!-- Assume spreadsheets is a django pagination object and pages is an iterable of page numbers to display -->
<!-- Note: this doesn't preserve GET parameters or hash fragments -->
<div class="pagination">
<ul>
{% if spreadsheets.has_previous %}
<li><a href="?page={{ spreadsheets.previous_page_number }}">&laquo;</a></li>
{% else %}
<li class="disabled"><a href="?page={{ spreadsheets.previous_page_number }}">&laquo;</a></li>
{% endif %}
@ferrouswheel
ferrouswheel / access_horror.py
Last active December 18, 2015 23:49
Liberate data from Access databases.
"""
A script to run on a Windows 7 host after installing the Access redistributable:
http://www.microsoft.com/en-nz/download/details.aspx?id=13255
Install Python 2.7, and then pyodbc from:
http://code.google.com/p/pyodbc/
The script dumps all tables to a dictionary and pickles it. The dictionary has a key for each table name, each value is a dictionary that has the following keys.
@ferrouswheel
ferrouswheel / 3_install_deeplearning_libs.sh
Last active December 17, 2015 04:33 — forked from graphific/3_install_deeplearning_libs.sh
Installation script for Deep Learning Libraries on Ubuntu 14.04
#!/usr/bin/env bash
# Installation script for Deep Learning Libraries on Ubuntu 14.04, by Roelof Pieters (@graphific)
# BSD License
orig_executor="$(whoami)"
if [ "$(whoami)" == "root" ]; then
echo "running as root, please run as user you want to have stuff installed as"
exit 1
fi
###################################
@ferrouswheel
ferrouswheel / 2_test_gpu_cuda.sh
Last active December 17, 2015 03:39 — forked from graphific/2_test_gpu_cuda.sh
Test script for checking if Cuda and Drivers correctly installed on Ubuntu 14.04
#!/usr/bin/env bash
set -e
# Test script for checking if Cuda and Drivers correctly installed on Ubuntu 14.04, by Roelof Pieters (@graphific)
# BSD License
if [ "$(whoami)" == "root" ]; then
echo "running as root, please run as user you want to have stuff installed as"
exit 1