Skip to content

Instantly share code, notes, and snippets.

View achalddave's full-sized avatar

Achal Dave achalddave

View GitHub Profile
#!/bin/bash
# Save current git diff, log, status to output directory.
#
# Example usage:
# ./dump_git_info.sh /path/to/output/directory/
# ./dump_git_info.sh /path/to/output/directory/ /path/to/git/repo/
#
# Writes the following files to output_dir:
#
# git-status.txt: Output of git status -sb.
import argparse
import logging
import random
import os
import lmdb
from tqdm import tqdm
logging.getLogger().setLevel(logging.INFO)
logging.basicConfig(format='%(asctime)s.%(msecs).03d: %(message)s',
"""Dump features calculated from a network using Caffe.
Run 'python frame_features.py --help' for usage information.
"""
import argparse
import csv
import errno
import logging
import numpy as np
@achalddave
achalddave / install_caffe.sh
Last active August 2, 2022 12:33
This is a script to compile caffe without root permission. It hasn't been extensively tested, but it will hopefully still make things easier than going about it on your own. Please let me know if there are any bugs!
# This script installs (or at least, attempts to install) Caffe in CPU mode
# with Python bindings without root permission. In doing so, it installs the
# following dependencies:
#
# * protobuf
# * cmake
# * gflags
# * glog
# * opencv
# * hdf5
@achalddave
achalddave / tmux_local_install.sh
Last active October 12, 2015 02:11 — 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
TMUX_VERSION=2.0
function [C,N]=DataPerVeh(dt,VehId,Activity,cons)
%VehId
%dt=10
%Activity
%cons=[145.83; 163.7 ;223.62; 138.3]
ActivityId=find((Activity{2:end,1}==VehId));
VehActivity=Activity(ActivityId+1,:);
Nt=round(24/dt);
N=zeros(1,Nt);
C=zeros(1,Nt);%W
function [C,N]=DataPerVeh(dt,VehId,Activity,cons)
%VehId
%dt=10
%Activity
%cons=[145.83; 163.7 ;223.62; 138.3]
ActivityId=find((Activity{2:end,1}==VehId));
VehActivity=Activity(ActivityId+1,:);
Nt=round(24/dt);
N=zeros(1,Nt);
C=zeros(1,Nt);%W
ssh-dss AAAAB3NzaC1kc3MAAACBALPxVNv0mZBSe2x/T6zMN2jt+MJiRnQl7CBCZUp8qsjoB+rehjlGudCLoEShkWx9ubADRvhEcARPQdw9cDBTtZocEyDfvuQBctetPleUsS6LhnBgBkrGeYkFJtXkeCrM+1NqlZi0uewsQVr6MJ6qskZoIzqhxeyPbT4Q/L4cnT3hAAAAFQCfxaTcD9acayMg5HPNUNJabhBe7QAAAIBpAhr0aBJrG5hyDhCt8rw7iaherZCnIHTDzm4gWlL6yvmtTM6m+LRtFTIwzKn7owRObu2yasy7eHiKHKHNyvwLbqXRWt7J1mT7cTVLtSK9gcqLX+cOAqBISi9g2E741ptiOJTakBv9P3bqRI5rBQ/mPH5mOwgFpFcjRX/QeAq/5gAAAIBWf8tDtzjl1pYQZucWjX+cyQ+nqoE92NTkUVQ1EMjJlOZr5TGdcMQFUucRWsWUGqsEL/rT3iVTx1vS6LdpYwJCfWTQiHMENrhsdUzW5dD3OFSQ377wAIdWzoEzk8cTLcK/DX8QJYTEoFGsqdQ5y18YXuh7JDi1dGUA9UvLch2/Zw== Achal@Achal-Yoga
/*
*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
@achalddave
achalddave / markdown-makefile
Created August 6, 2013 17:43
Makefile for generating html files to an output folder from markdown files
SRCS=$(filter-out readme.md, $(wildcard *.md))
FILES=$(patsubst %.md, output/%.html,$(SRCS))
all : output $(FILES)
output :
mkdir -p output
output/%.html : %.md
pandoc --section-divs -c ../docs.css -s --smart -t html5 $< -o $@