Skip to content

Instantly share code, notes, and snippets.

http://getcdn.hotstar.com/AVS/besc?action=GetCDN&asJson=Y&channel=TABLET&id=ID&type=VOD
http://askubuntu.com/questions/778906/problem-playing-hotstar-videos
http://askubuntu.com/questions/764727/hbonow-on-ubuntu-16-04lts/783717#783717
var list = document.getElementsByTagName('a');
for (i=1;i<list.length;i++){
var a = document.createElement('a')
a.href = list[i].href
a.text = "Download"
url = decodeURI(list[i].href)
a.download = url.substr(url.lastIndexOf('/')+1,url.length)
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
@axlevisu
axlevisu / find_jeemains_roll.py
Created August 15, 2016 20:53
srcipt used to get rollnumber through date of birth
import re
from mechanize import Browser
br = Browser()
# Ignore robots.txt
br.set_handle_robots( False )
# Google demands a user-agent that isn't a robot
br.addheaders = [('User-agent', 'Firefox')]
@axlevisu
axlevisu / CMAB.py
Created May 20, 2016 11:48
A class which solves multi-armed bandit problem
from scipy.stats import beta
from scipy.integrate import quad
from random import randint
import numpy as np
from operator import add
#Contextual Multi-Armed Bandit for Bernoulli Case
class CMAB:
%Bandpass FIR filter using Kaiser Window
%Question Parameters and Specs
m = 49;
q= floor((m-1)/10);
r = m - 10*q;
B_L = 4 + (0.7*q) + 2*r;
B_H = B_L + 10;
f = 100;
int potin = 1;
int mot1 = 7;
int mot2 = 6;
int sensorValue = 0;
//int pid = 0;
//int pwmcontrol=4;
int init_angle= 0;
int final_angle= 0;
int final_sensor_value= 0;
/********************************************************************************
Platform: SPARK V
Experiment: 4_Motion_Control_Simple
Written by: Vinod Desai, NEX Robotics Pvt. Ltd.
Edited By: Sachitanand Malewar, NEX Robotics Pvt. Ltd.
Last Modification: 22nd September 2010
AVR Studio Version 4.17, Build 666
Concepts covered: I/O interfacing, motion control using L293D
@axlevisu
axlevisu / The Technical Interview Cheat Sheet.md
Created December 24, 2015 05:43 — forked from meetps/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@axlevisu
axlevisu / get_mc_ids.R
Last active December 16, 2015 10:50
Code to get money_control_ids of companies from their website. Input data should be BSE_code/NSE_code/ISIN_code. I used ISIN_code data.
library(httr)
#library(stringr) #for str_split which is same as strsplit
data <- read.csv("nse.csv",header= TRUE,sep=",",stringsAsFactors = FALSE)
search_url <- "http://www.moneycontrol.com/stocks/cptmarket/compsearchnew.php?search_str="
url_list = paste(search_url,data[,'ISIN.code'],sep = "")
mc_list =c()
for(url in url_list){
x <- GET(url)
#redirect_url <- unlist(strsplit(x$url,"/"))
#mc_id<- redirect_url[length(redirect_url)]
@axlevisu
axlevisu / autotune.py
Created November 27, 2015 07:43
Autotuner application using GNU Radio
#Test using wav file
import sys
from scipy import *
from pylab import *
from scipy.io import wavfile
import numpy as np
samp_rate, inputa = wavfile.read("test.wav");
size = 2**16;