Skip to content

Instantly share code, notes, and snippets.

View srujun's full-sized avatar

Srujun Thanmay Gupta srujun

View GitHub Profile
@srujun
srujun / maven-yum.sh
Created April 23, 2018 03:01 — forked from sebsto/gist:19b99f1fa1f32cae5d00
Install Maven with Yum on Amazon Linux
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/7/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
@srujun
srujun / match_parens.cpp
Last active October 24, 2015 22:49
A C++ Program that checks if all parentheses are matched, and prints a string with all unmatched parentheses removed. Except for the string appending at the end, the algorithm should run in linear time.
#include <stack>
#include <iostream>
#include <utility>
#include <map>
using namespace std;
int main() {
string instr, outstr;
stack< pair<char, int> > cstack;
@srujun
srujun / chairmans_teams.py
Created April 17, 2014 05:38
A Python script that runs on The Blue Alliance's v2 API to summarize the teams competing for the Chairman's award at the 2014 FIRST's Robotics Competition.
#!/usr/bin/env python
import urllib.request
import json
import pprint
URL = 'http://www.thebluealliance.com/api/v2/'
HEADER_KEY = 'X-TBA-App-Id'
HEADER_VAL = 'frc1816:scouting-machine:1'