Skip to content

Instantly share code, notes, and snippets.

View robodhruv's full-sized avatar
🥑

Dhruv Shah robodhruv

🥑
View GitHub Profile
"""
Convert Robinhood Account Summary (CSV) to a Transaction Summary (CSV) you can use with a tax software like Glacier (or TaxAct, SprinTax etc.
Coupled with (https://github.com/JiahaoShan/Glacier-tax-1099-B-Stock-Transactions-Helper), use this script to autofill Robinhood transaction summary for your 1099-B tax docs on Glacier Tax Prep (http://glaciertax.com).
NOTE: This can manually handle stock splits, but does not account for referral stocks. You might have to handle them externally.
"""
from collections import deque
import pandas as pd
import numpy as np
import csv
@robodhruv
robodhruv / habitat_wrapper.py
Created January 19, 2020 18:04
Gym Wrapper for Habitat environment compatible with tf-agents
class HabitatWrapper(gym_wrapper.GymWrapper):
# GymWrapper cannot handle all types of gym Spaces, and the action
# space in Habitat (at least for the PointNav task) is a gym.Dict
# (supported) with str keys and habitat.EmptySpace values
# (unsupported). Since the action space is really a discrete space,
# we'll update gym_env.action_space temporarily to be Discrete
# so that GymWrapper can create an action spec.
def __init__(self,
gym_env,
@robodhruv
robodhruv / odom_to_path.py
Last active May 29, 2023 09:10
ROS Node for converting nav_msgs/odometry messages to nav_msgs/Path
#!/usr/bin/env python
from __future__ import print_function
import rospy
from tf.transformations import quaternion_from_euler
from std_msgs.msg import String
from nav_msgs.msg import Odometry, Path
from geometry_msgs.msg import PoseWithCovarianceStamped, PoseStamped
from sensor_msgs.msg import Joy
import sys
import json
/*
Pure C code for multi-threaded matrix mutliplication of two
dynamically created and randomly instiated matrices.
Two different mutli-threading strategies are implemented, along
with the non-threaded multiplication kernel for comparison.
The functions are timed using system time.
CS347(M): Operating Systems, IIT Bombay (Autumn 2017)
*/
@robodhruv
robodhruv / sim.cpp
Created May 17, 2017 19:01
Multiple ROS publishers and subscribers in a single node
/*
* This can be seen as a sample node with 3 publishers
* and one subscriber, working perfectly. Hope this helps.
* Ignore the specifics, and marker topics etc. The heart of the
* program is the publish/subscribe statement. Full program at:
* https://github.com/PrieureDeSion/radiation-mapping/
*
* Copyright © 2017 by Dhruv Ilesh Shah
* shahdhruv@cmu.edu | dhruv.shah@iitb.ac.in
* Robotics Institute, Carnegie Mellon University
@robodhruv
robodhruv / modelsim_installation.md
Last active July 21, 2024 23:06
Installing ModelSim on Ubuntu

ModelSim Installation issues

Ubuntu 14.xx and above

Ignore this if you have not encountered any issue with the installation and running of ModelSim and Quartus on your system. You are very lucky. (Just Kidding! You have surely had this issue, only sorted.)

Hence assuming you have been following the procedure given in this guide. Most certainly, Quartus will install jsut fine, and so will ModelSim. The issue is in launching due to inappropriate linking etc.

Stage 1

This is the simplest error you would encounter. Navigate to the modelsim_ase folder and run:

@ericandrewlewis
ericandrewlewis / index.md
Last active June 6, 2024 01:43
C++ Pointer Tutorial

C++ Pointer Tutorial

Because pointers can be ugh

"Regular" variables (not pointers)

To understand a pointer, let's review "regular" variables first. If you're familiar with a programming language without pointers like JavaScript, this is what you think when you hear "variable".

When declaring a variable by identifier (or name), the variable is synonymous with its value.

@ryin
ryin / tmux_local_install.sh
Last active July 13, 2024 00:42
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=1.8
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 23, 2024 05:34
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname