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
/* | |
* The program displays first n*n natural numbers arranged in clockwise spiral in n*n array | |
* | |
* Example: | |
* | |
* for n = 3; output | |
* | |
* 1 2 3 | |
* 8 9 4 | |
* 7 6 5 |
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
/* | |
* Display all the sequences of consecutive natural numbers that add up to n | |
* | |
* @author Gaurav Narula | |
* | |
* */ | |
public class consecadd { | |
private int 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
/* | |
* Multiplies two n*n matrices. | |
* | |
* @author Gaurav Narula | |
* */ | |
import java.util.Scanner; | |
public class matrix { | |
private int[][] arr; | |
private int 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
--- style.less 2012-09-11 16:57:26.000000000 +0530 | |
+++ style_new.less 2013-01-14 19:22:48.000000000 +0530 | |
@@ -28,8 +28,28 @@ | |
margin: 0; padding: 0; | |
} | |
+.flash { | |
+ padding: 10px; | |
+ margin: 20px 0; | |
+ &.error { |
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
xterm*faceName: Menlo for Powerline | |
xterm*faceSize: 8 | |
xterm*metaSendsEscape: true | |
xterm*utf8: 1 | |
*foreground: #DDEEDD | |
*background: #1C1C1C | |
!black | |
*color0: #1C1C1C |
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
set -g default-terminal "screen-256color" | |
set -g base-index 1 | |
setw -g mode-mouse on | |
source-file /usr/share/tmux/powerline.conf |
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 python2 | |
import argparse | |
import base64 | |
import getpass | |
import json | |
import os | |
import urllib | |
import urllib2 | |
import sys |
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
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=Xmonad | |
Comment=Highly configurable framework window manager | |
Type=XSession | |
Exec=/home/gaurav/.xmonad/xmonad_start.sh | |
TryExec=xmonad |
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
""" | |
Instructions: | |
1. Convert the pdf to a txt file using `pdftotext -layout chem.pdf out.txt` | |
2. Remove the names of absentees and ensure the results of each student are on 1 line | |
3. Create data.db with the following schema `CREATE TABLE chem (id TEXT, name TEXT, section TEXT, t1 REAL, t2 REAL, midsem REAL, grade TEXT, gp INT);` | |
""" | |
import re | |
import sqlite3 | |
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
import urllib2, urllib, multiprocessing | |
def makeRequest(roll): | |
data = {"regno": roll, "dob": "27/11/1996", "B2": "Submit"} | |
r = urllib2.Request("http://cbseresults.nic.in/jee/jee14_cbse.asp") | |
r.add_header('User-Agent', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36') | |
r.add_header('Referer', "http://cbseresults.nic.in/jee/jee_cbse_2014.htm") | |
r.add_header('Origin', "http://cbseresults.nic.in") | |
r.add_header('Host', "cbseresults.nic.in") | |
r.add_data(urllib.urlencode(data)) |
OlderNewer