Skip to content

Instantly share code, notes, and snippets.

View aviraldg's full-sized avatar

Aviral Dasgupta aviraldg

View GitHub Profile
#!/usr/bin/python
import subprocess, cv2, os
PATH = '/home/aviraldg/Pictures/gitpic/'
def main():
sha = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip()
repo_name = os.path.basename(subprocess.check_output(["git", "rev-parse", "--show-toplevel"])).strip()
try:
os.makedirs(os.path.join(PATH, repo_name))
@aviraldg
aviraldg / post-commit
Created June 29, 2015 19:46
post-commit
#!/usr/bin/python
import subprocess, cv2, os
PATH = os.environ.get('GITPIC_PATH')
def main():
sha = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip()
repo_name = os.path.basename(subprocess.check_output(["git", "rev-parse", "--show-toplevel"])).strip()
try:
os.makedirs(os.path.join(PATH, repo_name))
/* 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 */
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())
@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

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:

- 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