Skip to content

Instantly share code, notes, and snippets.

View RupGautam's full-sized avatar

Rup Gautam RupGautam

View GitHub Profile
#!/usr/bin/env bash
# ~/osx.sh — Originally from https://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `osx.sh` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@RupGautam
RupGautam / key
Created February 6, 2017 06:32
MacBook Pro 2017
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6kC2AxkYBWRnb7/vmrSnqz2NgwGYjneRpUjeJgtddcKFQgcfKVGlfz54hr/74vAjBUoMzEBL8dIrLZDld3KltFV7cHngb1+/sMXdifpXarsPesB5Cd8vRSsfCAJ3Q+fo8SZgpnGUGZidRSchfkqecDB88o6sGon12LnuYNaP9rPFzEkjl5gn2pIrHfKxBUJkhN65ukiDWHcsTPobd2R0fj1ojU8zEMuNr5DURVNyLBPq28alYp/+KBUwMTUa9J/bqIiQepT1Ib/8rEk6km6/S/IbXXhQkqn2XgzirOT11Razm7EhQbsW19HOntkC6RWLELAEUaYsc7vHmPrInpdZV rup.gautam@yahoo.com
@RupGautam
RupGautam / log.txt
Created February 12, 2017 04:04
gitsome trending error
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/feedparser.py", line 399, in __getattr__
return self.__getitem__(key)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/feedparser.py", line 348, in __getitem__
return dict.__getitem__(self, 'updated_parsed')
KeyError: 'updated_parsed'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
/**
* Created by RupGautam on 2/21/17.
*/
import java.util.Scanner;
public class PhoneNumber {
// 2047773333, (204)777-3333, or 204-777-333
//Write a program to encrypt the line entered by the user. Encryption is performed
// by replacing all occurrences of the letter ‘i’ by ‘e', all occurrences of the letter ‘e’
// by the letter ‘a’, and all occurrences of the letter ‘a’ by the letter ‘i’. For example,
// if the user enters the line: The ear is big. Then the output from the program is: Tha
// air es beg. Both upper case and lower case of aforementioned letters must be
// encrypted.
import java.util.Scanner;
/**
* Created by RupGautam on 2/22/17.
*/
import java.util.Random;
import java.util.Scanner;
/**
* Copyright ${COPYRIGHT}.
*/
PL-XXv-cvA_iBVK2QzAV-R7NMA1ZkaiR2y - Introduction to Database Systems - Joseph Hellerstein
PL-XXv-cvA_iD8wQm8U0gG_Z1uHjImKXFy - Discrete Mathematics and Probability Theory - Umesh Vazirani
PL-XXv-cvA_iBDyz-ba4yDskqMDY6A1w_c - Operating Systems and System Programming - John Kubiatowicz
PL-XXv-cvA_iBM29DgZsGaQihJp8lLQn3J - The Structure and Interpretation of Computer Programs - John S. Denero
PL-XXv-cvA_iCfQHHS7rxlfHFsU4aQW1IF - Software Engineering - Armando Fox
PL-XXv-cvA_iCl2-D-FS5mk0jFF6cYSJs_ - Machine Structures - Vladimir Stojanovic & Krste Asanovic
PL-XXv-cvA_iA4YSaTMfF_K_wvrKAY2H8u - Introduction to Artificial Intelligence - Pieter Abbeel, Dan Klein
PL-XXv-cvA_iDD4nnsfVIqPFORTgZi9xRp - Data Structures - Joshua A. Hug
PL-XXv-cvA_iDq3FCoYLeUL-X-NUlT405n - Introduction to Embedded Systems - Edward A. Lee, Alberto Sangiovanni-vincentelli
import java.util.Scanner;
public class evaluateExpression {
// http://www.careercup.com/question?id=4911380140392448
public static void main(String[] args) {
// An equation with +, -, /, *
String anotherEquation;
System.out.print("Please enter math Expression: ");
Scanner kb = new Scanner(System.in);
package com.rupgautam.practice;/**
* Created by RupGautam on 3/24/17.
*/
/**
* Student Name: Rup Gautam
* Student No: 3091289
*/
public class Driver {
/**
* Assignment 4 Q2
*
*/
/**
* Student Name: Rup Gautam
* Student No: 3091289
*/