This file contains hidden or 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
#!bash | |
YEAR=2018 | |
for MONTH in JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC | |
do | |
for d in {1..31} | |
do | |
foo=$(printf "%02d" $d) | |
curl -O "https://www.nseindia.com/content/historical/EQUITIES/${YEAR}/${MONTH}/cm${foo}${MONTH}${YEAR}bhav.csv.zip" | |
done | |
done |
This file contains hidden or 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 time | |
import os | |
import psutil | |
class MeasureMemTime: | |
def __init__(self): | |
self.start = None | |
self.end = None |
This file contains hidden or 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
// ==UserScript== | |
// @name Firefox PDFJS | |
// @namespace poulet | |
// @include /^(http|https|file)://.*.pdf$/ | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// NOTE: Reloads the PDF by disabling Range requests for some proxies. | |
// NOTE: Useful for Firefox PDFJS viewer for proxies without range requests (ex: proxy inside IIT Madras) | |
var url=window.location |
This file contains hidden or 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/python | |
# Author: Karthikeyan | |
# https://github.com/lxkarthi | |
# Description: Generates Verilog code for fractional constant multiplier | |
## Functions defined | |
############################################################################################## | |
def get_value_prompt(prompt, vartype, condition, condition_value, error_string, default_value): | |
try: | |
var = vartype(raw_input(prompt)) | |
if not(condition(var,condition_value)): |
This file contains hidden or 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
<?php | |
// NOTE: Make this file not readable to others. | |
/** | |
* Gmail | |
* Pear::Mail | |
* @param string $to | |
* @param string $from | |
* @param string $bcc BCC | |
* @param string $subj | |
* @param string $body |
This file contains hidden or 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/python | |
#Compiles CUDA file and displays Kernel memory requirements in a table | |
import sys | |
import subprocess | |
def startpos(line): | |
found=0; | |
val=0; | |
for each in line: | |
if(found==0 and (each in "1234567890")): | |
found=1 |