This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
File: process_rosbag_sync.py | |
Author: Dhruv Shah ([email protected]) | |
Python Version: 3.8.13 | |
A simple script to extract rostopics at a fixed (reduced) rate from a rosbag. | |
""" | |
import pickle as pkl | |
import pandas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
File: planner.py | |
Author: Dhruv Ilesh Shah. CS 747, Autumn 2018. | |
Indian Institute of Technology, Bombay. | |
Date created: 8/30/2018 | |
Date last modified: 9/07/2018 | |
Python Version: 2.7.12 | |
This file contains two ways of solving an MDP planning problem: (i) using Howard's PI (Howard, 1960) | |
or (ii) by posing it as a linear program. The PuLP package has been used to solve the linear system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function out = compute_RIC(A, s) | |
% This function computes the Restricted Isometry Constant of given matrix A | |
% at sparsity level s. | |
% Written by Alankar Kotwal ([email protected]), Dhruv Shah ([email protected]) | |
A = normc(A); | |
nT = size(A, 2); | |
combs = combnk(1:nT, s); | |
out = 0; | |
disp(size(combs, 1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Discrete time Fourier Transform of FIR filters | |
% Generate the DTFT of Window Functions in FIR Filter Design. For a custom | |
% window, define the window function and use the following snippets as is. | |
% Written by Dhruv Ilesh Shah ([email protected]) | |
clear all; close all; | |
N = 100; | |
k = -N:N; | |
hamming_window = 0.54 + (0.46 * cos(2*pi*k / (2 * N))); | |
bartlett_window = 1 - (abs(k) / N); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear all; close all; | |
n = [0:0.1:50]; | |
w = pi/2; | |
Ts = 0.2; | |
ks = [-200:200]; | |
y = zeros(size(n)) | |
frame_count = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Lloyd Max Quantizer | |
This program implements a midrise lloyd-max quantizer, for optimal | |
quantization of a random variable demonstrating a Gaussian PDF. | |
The clustering mechanism used here equivalent to k-Means clustering. | |
Author: Dhruv Ilesh Shah | |
EE308 - Communication Systems, Autumn 2017 | |
Indian Institute of Technology, Bombay | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <cstdlib> | |
# include <iostream> | |
# include <iomanip> | |
# include <cmath> | |
# include <ctime> | |
# include <omp.h> | |
using namespace std; | |
int main ( void ); |
NewerOlder