Skip to content

Instantly share code, notes, and snippets.

View aviraldg's full-sized avatar

Aviral Dasgupta aviraldg

View GitHub Profile
@aviraldg
aviraldg / scraper.py
Last active November 3, 2022 00:22 — forked from anpseftis/crawler.py
Web Scraper
#!/usr/bin/python
__author__ = 'Angelis Pseftis'
from bs4 import BeautifulSoup
import urllib
import urlparse
import argparse
from termcolor import colored
import subprocess
import whois
- repo: git://github.com/pre-commit/pre-commit-hooks
sha: v0.8.0
hooks:
- id: autopep8-wrapper
- id: check-added-large-files
- id: check-ast
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-json

Keybase proof

I hereby claim:

  • I am aviraldg on github.
  • I am aviraldg (https://keybase.io/aviraldg) on keybase.
  • I have a public key whose fingerprint is 3875 FC93 96D5 216A 2768 0341 0E18 4AB0 523D 1E9B

To claim this, I am signing this object:

import fetch from 'isomorphic-fetch';
import receivePlaces from './receivePlaces'
import requestPlaces from './requestPlaces'
export default function() {
return dispatch => {
dispatch(requestPlaces());
fetch(`https://www.mozzobytes.com/api/places/`)
.then(response => response.json())
/* Combine all available reducers to a single root reducer.
*
* CAUTION: When using the generators, this file is modified in some places.
* This is done via AST traversal - Some of your formatting may be lost
* in the process - no functionality should be broken though.
* This modifications only run once when the generator is invoked - if
* you edit them, they are not updated again.
*/
import { combineReducers } from 'redux';
/* Populated by react-webpack-redux:reducer */

The Really Boring Phone

NOTE: This post is here because of two reasons: my blog is currently in a state of "flux" (I'm in the process of developing a custom theme and moving to a different blogging engine) and the fact that I usually don't participate in platform wars.

This is a reply to: http://virtuosovidit.blogspot.in/2013/01/the-curiously-boring-phone.html


“So, iPhone is boring. Its got this same UI for the last three years, and the same Apps launcher ever since its launch in 2007. Its boring. Its boring. Its Boring. What’s interesting is widgets, adventures with Viruses! clunky heavy themes. Quad Core processors, GBs of RAM, We want More Cores, We want More RAM! Even if we don’t know what it does! Bigger is better. More is Better. Larger is prettier. That’s just 4”, People have ‘upgraded’ to 6.3” phones. That Lumia is more colorful! iPhone’s only black or White, more color is always cooler, its interesting! Why, Apple won’t do that. They did, they’re just looking afte

@aviraldg
aviraldg / wikipdf.py
Created August 5, 2012 08:12
Wikipdf
import requests
import bs4
import io
ADD_URI = 'http://en.wikipedia.org/w/index.php?title=Special:Book&bookcmd=add_article&arttitle={0}&oldid=0'
BOOK_URI = 'http://en.wikipedia.org/wiki/Special:Book'
def wikify(topic):
return '+'.join(topic.split(' '))
"3 hundred spartans" == 3 # true
@aviraldg
aviraldg / ICSE.py
Created June 6, 2012 19:08
A script that scrapes the results of the current ICSE exams for a particular school/exam centre.
#!/usr/bin/env python
import sqlite3
import requests
import bs4
import datetime
SOURCE_URI = 'http://server2.examresults.net/icseX12-res.aspx'
def main(args):
aviraldg@aviraldg-netbook:~$ ssh -i path.to.key.pem ubuntu@ec2-???-???-???-???.ap-southeast-1.compute.amazonaws.com
Welcome to Ubuntu 11.10 (GNU/Linux 3.0.0-16-virtual x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Mon Apr 9 17:29:41 UTC 2012
System load: 0.0 Processes: 66
Usage of /: 12.9% of 7.87GB Users logged in: 0
Memory usage: 8% IP address for eth0: ???.???.???.???