Skip to content

Instantly share code, notes, and snippets.

View shubh-agrawal's full-sized avatar

Shubh Agrawal shubh-agrawal

  • Bangalore
View GitHub Profile
@shubh-agrawal
shubh-agrawal / covid_resources_india_compilation.md
Created May 2, 2021 21:30
Websites for Searching Covid Resources [Oxygen, Remdesvir, Beds] | India
@shubh-agrawal
shubh-agrawal / doda_log.md
Last active May 2, 2021 21:35
Playing multiplayer games under network proxy and blocked ports

Instructions for playing AoE via Voobly

  1. Download OpenVPN for windows from https://openvpn.net/index.php/open-source/downloads.html
  2. After installing the OpenVPN app, run the app in administrator mode only. Right click the tray icon for settings and set institute proxy
  3. Now go the https://www.tcpvpn.com and select Server Asia -> VPN Server India -> Server TCP India 3
  4. Create username and password. This is has to be made everytime before you download config files
  5. Then download the .ovpn files. There must be a button as Download config
  6. Extract the .rar file for .ovpn files. These files are valid for 5 days. After 5 days, you again have to download the files following the previous procedure. Remember to register username and password again.
  7. Place these files in C:\Users\name\OpenVPN\config folder
  8. Right click on the tray icon of OpenVPN and look for option with port 443, then click Connect. Other ports usually don't work.
  9. The connection must establish now. Successfull connection could b
@shubh-agrawal
shubh-agrawal / rotationMat2Quaternion.cpp
Last active October 25, 2023 13:59
OpenCV lacks a conversion function from rotation matrix to quaternion. In ROS applications, the rotation of a robot or link is generally described by 4 quaternion numbers. Some people might say that you have "tf" for all such transformations, but it requires your data to be of specific datatype. Here is a small function, that converts opencv Mat…
void getQuaternion(Mat R, double Q[])
{
double trace = R.at<double>(0,0) + R.at<double>(1,1) + R.at<double>(2,2);
if (trace > 0.0)
{
double s = sqrt(trace + 1.0);
Q[3] = (s * 0.5);
s = 0.5 / s;
Q[0] = ((R.at<double>(2,1) - R.at<double>(1,2)) * s);
# arguement required.
# Pre-requisites: 1. Format the dataset as explained by deboc
# 2. create the Imageset text file using 'ls Annotations/ -m | sed s/\\s/\\n/g | sed s/.xml//g | sed s/,//g > ImageSets/train.txt'
# 1st arguement = Imageset file name Example: train.txt
# 2nd arguement = path to custom dataset Example: ~/py-faster-rcnn/data/VOC_devkit/
# Using Instructions
# $ python discard_shuffle_data.py [arg1] [arg2]
We couldn’t find that file to show.