Skip to content

Instantly share code, notes, and snippets.

View srvm's full-sized avatar

Saurav Muralidharan srvm

View GitHub Profile
@srvm
srvm / weather
Created October 16, 2016 18:59
Weather forecast on the command-line
#!/bin/bash
curl -s http://wttr.in/sanjose | head -n 17 | tail -n 10
@srvm
srvm / matplotlibrc
Created February 11, 2016 05:42
Matplotlib global configuration file
lines.linewidth: 1.0
lines.antialiased: True
font.family: Times New Roman
patch.antialiased: True
text.color: black
grid.color: gray
grid.linewidth: 0.5
@srvm
srvm / timer.h
Last active March 17, 2017 22:10
CPU and GPU timing code
#pragma once
namespace util {
struct gpu_timer {
#ifdef __CUDACC__
gpu_timer() {
cudaEventCreate(&m_start);
cudaEventCreate(&m_end);
cudaEventRecord(m_start, 0);
@srvm
srvm / unlock_nvml.sh
Created April 10, 2015 21:35
Script to enable persistence mode and allow non-root users to change frequencies on NVIDIA Tesla GPUs
#!/bin/bash
nvidia-smi -acp UNRESTRICTED -i 0
nvidia-smi -pm ENABLED -i 0
@srvm
srvm / set_clocks_jetson.sh
Created April 9, 2015 00:15
Script to set core and memory frequencies on the NVIDIA Jetson TK1 board.
#!/bin/bash
if [ $# -ne 2 ]; then
echo "Format: set_clocks.sh <core_clock (kHz)> <mem_clock (kHz)>"
exit -1
fi
echo "Supported core clocks:"
cat /sys/kernel/debug/clock/gbus/possible_rates