Skip to content

Instantly share code, notes, and snippets.

View sasadep's full-sized avatar
πŸ”¬

Sandeep Aswath Narayana sasadep

πŸ”¬
View GitHub Profile
@sasadep
sasadep / quick_debug.py
Created May 12, 2019 22:57
simple debugging with python print
from inspect import getframeinfo, stack
def DEBUG_MESSAGE(debug_message):
caller = getframeinfo(stack()[1][0])
print("DEBUG " + caller.filename + ":" + str(caller.lineno) + " >>> " + debug_message)
DEBUG_MESSAGE ("Begin")
DEBUG_MESSAGE("call_value is "+str(5))
DEBUG_MESSAGE ("End")
@sasadep
sasadep / mat_to_csv.py
Created January 4, 2017 23:18
convert .mat file to .csv file
import scipy.io
import pandas as pd
mat = scipy.io.loadmat('path_to_/fiename.mat')
mat = {k:v for k, v in mat.items() if k[0] != '_'}
data = pd.DataFrame({k: pd.Series(v[0]) for k, v in mat.iteritems()})
data.to_csv("fiename.csv")
@sasadep
sasadep / tensorflow_from_source.sh
Last active September 8, 2017 05:43
install tensorflow CPU from source bash script
#!/bin/bash
set -e
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "-----------------------------------"
echo "installing apt-get dependencies ..."
echo "-----------------------------------"
@sasadep
sasadep / boost_Git_install.sh
Last active December 10, 2016 07:32
install github boost 1.62 script
#!/bin/bash
set -e
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "------------------------"
echo "Building up Boost ..."
echo "------------------------"
cd ${script_dir}