Skip to content

Instantly share code, notes, and snippets.

View v-i-s-h's full-sized avatar

Vishnu Raj v-i-s-h

View GitHub Profile
@v-i-s-h
v-i-s-h / revive.sh
Created January 21, 2017 10:28
Revive ns3 installation in Mac OSX 10.10
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:$PKG_CONFIG_PATH
./waf distclean
./waf configure --enable-test --enable-example
./waf build
@v-i-s-h
v-i-s-h / ROS.md
Created May 23, 2017 09:56
ROS Workflow cheatsheet
  1. Create 'ws' 'ws/src'
  2. Goto 'ws/src' and 'catkin_init_workspace'
  3. Back to 'ws' and 'catkin_make'
  4. 'source devel/setup.sh'
  5. Goto 'ws/src' and 'catkin_create_pkg beginner_tutorials std_msgs rospy roscpp | catkin create pkg beginner_tutorials --catkin-deps roscpp rospy std_msgs
  6. Edit package.xml if necessary
  7. Come to 'ws' and 'catkin_make' Writing Code:
  8. Goto 'ws/src/<package_name>/src' and create '<node_name.cpp>' Editing Package
@v-i-s-h
v-i-s-h / instance_factory.jl
Last active November 17, 2017 08:58
Julia: Making derived type objects with parameters
abstract type baseType end
function call( ::Type{T}, params... ) where T <: baseType
return T( params... )
end
# call (generic function with 1 method)
type derived1 <: baseType
x::Int64
y::Float64
@v-i-s-h
v-i-s-h / README.md
Last active January 20, 2018 17:05
Gist of setting up Raspberry Pi

Setting Up Raspberry Pi

Disabling Serial TTY (For EnOcean Pi)

Edit /boot/cmdline.txt and remove any references to serial1 or ttyACM0

Setting up NodeJS: The Easy Way

  1. cat /proc/cpuinfo to determine CPU arch
  2. wget https://nodejs.org/dist/vX.Y.Z/node-vX.Y.Z-linux-armv??.tar.gz
  3. tar -xzf node-vX.Y.Z-linux-armv??.tar.gz
  4. node-v6.2.1-linux-armv6l/bin/node -v
@v-i-s-h
v-i-s-h / build.sh
Created September 1, 2018 06:22
Shell script to build programs
# Shell script to build programs
CFLAGS=`pkg-config --cflags libzmq`
LIBS=`pkg-config --libs libzmq`
# If no input, build all
if [ -z "$1" ]
then
for file in *.c
do
@v-i-s-h
v-i-s-h / .vimrc
Created October 7, 2018 14:34
My Vim
execute pathogen#infect()
syntax on
filetype plugin on
set tabstop=4
set shiftwidth=4
set expandtab
set number
" let g:netrw_banner = 0
" let g:netrw_liststyle = 3
@v-i-s-h
v-i-s-h / rbf_test.ipynb
Created March 20, 2019 04:45
Rayleigh Block Fading Test: Fig 6b of http://arxiv.org/abs/1812.05929
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@v-i-s-h
v-i-s-h / test.log
Created May 13, 2019 03:43
CUDAnative.jl: [CUDA error: no kernel image is available for execution on the device (code #209, ERROR_NO_BINARY_FOR_GPU)]
(v1.1) pkg> test CUDAnative
Testing CUDAnative
Resolving package versions...
Status `/tmp/tmpujFYYx/Manifest.toml`
[79e6a3ab] Adapt v0.4.2
[3895d2a7] CUDAapi v0.6.3
[c5f51814] CUDAdrv v3.0.0
[be33ccc6] CUDAnative v2.1.0
[a8cc5b0e] Crayons v4.0.0
[864edb3b] DataStructures v0.15.0
@v-i-s-h
v-i-s-h / rl-lab-cpu.yaml
Created September 27, 2019 04:45
My conda environments
name: rl-lab
channels:
- anaconda
- conda-forge
- defaults
dependencies:
- dbus=1.13.6=h746ee38_0
- expat=2.2.6=he6710b0_0
- fontconfig=2.13.0=h9420a91_0
- freetype=2.9.1=h8a8886c_1
@v-i-s-h
v-i-s-h / list_gym_env.sh
Last active February 11, 2020 04:59
List and search all OpenAi Gyms installed
# To list all the available enviroments
python -c "from gym import envs; env_list = [env_spec.id for env_spec in envs.registry.all()]; print(\"\\n\".join(env_list));"
# Search in list with grep
python -c "from gym import envs; env_list = [env_spec.id for env_spec in envs.registry.all()]; print(\"\\n\".join(env_list));" | grep -i cart