This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:UTF-8 -*- | |
import torch | |
import torch.nn as nn | |
import torch.nn.init as init | |
def weight_init(m): | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# MAYAVI SETUP | |
# mayavi is a python library for scientific visualisations, that can handle | |
# visualisation of Lidar Data. But, it can also be used to project Lidar data | |
# to 2D images. | |
# | |
# The set of commands I used to get mayavi set up on my computer so far. | |
# NOTE: I still do not know if it is set up properly, so this set of steps | |
# might be incomplete. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import imageio | |
import os, sys | |
class TargetFormat(object): | |
GIF = ".gif" | |
MP4 = ".mp4" | |
AVI = ".avi" | |
def convertFile(inputpath, targetFormat): | |
"""Reference: http://imageio.readthedocs.io/en/latest/examples.html#convert-a-movie""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Byobu is a suite of enhancements to tmux, as a command line | |
tool providing live system status, dynamic window management, | |
and some convenient keybindings: | |
F1 * Used by X11 * | |
Shift-F1 Display this help | |
F2 Create a new window | |
Shift-F2 Create a horizontal split | |
Ctrl-F2 Create a vertical split | |
Ctrl-Shift-F2 Create a new session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Python implementation of the OASIS algorithm. | |
Graham Taylor | |
Based on Matlab implementation of: | |
Chechik, Gal, et al. | |
"Large scale online learning of image similarity through ranking." | |
The Journal of Machine Learning Research 11 (2010): 1109-1135. | |
""" | |
from __future__ import division |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -ss <start_time> -i video.mp4 -t <duration> -q:v 2 -vf select="eq(pict_type\,PICT_TYPE_I)" -vsync 0 frame%03d.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
if [ -z "$REPO_URL" ]; then | |
echo "-- ERROR: Could not identify Repo url." | |
echo " It is possible this repo is already using SSH instead of HTTPS." | |
exit | |
fi |