Skip to content

Instantly share code, notes, and snippets.

View manangandhi7's full-sized avatar
🎯
Focusing

Manan Gandhi manangandhi7

🎯
Focusing
  • Planet Earth
View GitHub Profile
@manangandhi7
manangandhi7 / TileTest.cpp
Last active March 18, 2018 13:58
HackerRank Brick tiling problem solution (https://www.hackerrank.com/challenges/brick-tiling) with caching
// TileTest.cpp : Defines the entry point for the console application.
//Manan Gandhi
#include <iostream>
#include <unordered_map>
#include <string>
#include <sstream>
using namespace std;
@manangandhi7
manangandhi7 / pandas_inner_join_same_col.ipynb
Last active October 22, 2018 20:30
pandas_inner_join_same_col
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manangandhi7
manangandhi7 / pandas_left_join_same_col.ipynb
Created October 22, 2018 20:32
pandas_left_join_same_col
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manangandhi7
manangandhi7 / pandas_right_join_same_col.ipynb
Created October 22, 2018 20:34
pandas_right_join_same_col
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manangandhi7
manangandhi7 / pandas_outer_join_same_col.ipynb
Created October 22, 2018 20:36
pandas_outer_join_same_col
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manangandhi7
manangandhi7 / ExternalSort.cpp
Created December 28, 2018 17:38
External sort in c++
#include <iostream>
#include <fstream>
#include<sstream>
#include <queue>
#include<algorithm>
using namespace std;
class Compare
{
public:
@manangandhi7
manangandhi7 / Driving theory test.txt
Last active May 12, 2019 16:29
How to prepare for German licence (führerschein) theory test?
So, After living in Germany for 5 years, I decided to get my auto driving licence (führerschein). Just had my theory exam and aced it with zero wrong answers!
While preparing for theory exam I could not find a post that described how to prepare for theory test. While there are several blogs that describe getting the overall process concerning registration and documentation, I could find the tips and tricks for preparing for the test. So, I decided to give it a shot after passing my theory test.
This post assumes that you know the basics and registration process. If not, please get the general overview on other blogs.
General Info on theory test:
@manangandhi7
manangandhi7 / external_sort.ipynb
Created November 17, 2019 22:19
External sort in python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
''' Script for downloading all GLUE data.
Note: for legal reasons, we are unable to host MRPC.
You can either use the version hosted by the SentEval team, which is already tokenized,
or you can download the original data from (https://download.microsoft.com/download/D/4/6/D46FF87A-F6B9-4252-AA8B-3604ED519838/MSRParaphraseCorpus.msi) and extract the data from it manually.
For Windows users, you can run the .msi file. For Mac and Linux users, consider an external library such as 'cabextract' (see below for an example).
You should then rename and place specific files in a folder (see below for an example).
mkdir MRPC
cabextract MSRParaphraseCorpus.msi -d MRPC
cat MRPC/_2DEC3DBE877E4DB192D17C0256E90F1D | tr -d $'\r' > MRPC/msr_paraphrase_train.txt
cat MRPC/_D7B391F9EAFF4B1B8BCE8F21B20B1B61 | tr -d $'\r' > MRPC/msr_paraphrase_test.txt