Skip to content

Instantly share code, notes, and snippets.

Puneeth Chaganti punchagan

Block or report user

Report or block punchagan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View search_github_users.py
""" A simple script to search for GitHub users. """
from __future__ import print_function
import json
from os.path import abspath, dirname, exists, join
import requests
from requests.utils import quote
@punchagan
punchagan / pygmentize.el
Created Nov 9, 2014
Pygmentize code for Nikola
View pygmentize.el
;; Use pygments highlighting for code
(defun pygmentize (lang code)
"Use Pygments to highlight the given code and return the output"
(with-temp-buffer
(insert code)
(let ((lang (or (cdr (assoc lang org-pygments-language-alist)) "text")))
;; A crazy hack!! Why src-block have no info?!@!@#
(let* ((file-name (format "%s.png" (sha1 code)))
(output-path (format "%s" file-name))
(url (format "%s" file-name)))
@punchagan
punchagan / install.sh
Last active Aug 29, 2015
A columned LEDStrip module for RPi
View install.sh
set -e
# Defaults to install where install.sh is located
INSTALL_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
BUILD_DIR=${INSTALL_DIR}/BUILD
mkdir -p $BUILD_DIR
pushd $BUILD_DIR
@punchagan
punchagan / hello.py
Last active Nov 13, 2019
A simple Flask sockets example
View hello.py
# Copy of http://stackoverflow.com/a/20104705
from flask import Flask, render_template
from flask_sockets import Sockets
app = Flask(__name__)
app.debug = True
sockets = Sockets(app)
@sockets.route('/echo')
@punchagan
punchagan / Presentation.ipynb
Created Jul 15, 2014
cinspect presentation IPython notebook
View Presentation.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@punchagan
punchagan / video-loopback
Created Mar 29, 2014
Brighter video, thanks to video loopback and gstreamer
View video-loopback
#!/bin/bash
MODULE=v4l2loopback
if grep -q $MODULE /proc/modules;
then
echo $MODULE already loaded
else
echo loading $MODULE
sudo modprobe $MODULE
@punchagan
punchagan / backend_fogbugz.py
Created Jan 16, 2014
GTG Backend for FogBugz
View backend_fogbugz.py
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Getting Things GNOME! - a personal organizer for the GNOME desktop
# Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
@punchagan
punchagan / practice.dot
Last active Jan 2, 2016
Practice Sessions flow chart
View practice.dot
digraph {
label="Ideas for practice for 1 or 2 players."
labelloc="top"
node[shape="box", style="rounded"]
start; end;
node[shape="box", style="solid"]
wait2;condition;find_pole;kung_fu;yes_lying;usual;
node[shape="parallelogram", style=""]
@punchagan
punchagan / scrape_google_groups.py
Last active Jul 2, 2019
A simple script to scrape a google group.
View scrape_google_groups.py
import json
from os.path import exists
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import TimeoutException
class GoogleGroupsScraper(object):
""" A simple class to scrape a google group. """
@punchagan
punchagan / import-links-as-posts.py
Last active Dec 25, 2015
Scripts to import blog from o-blog to Nikola.
View import-links-as-posts.py
You can’t perform that action at this time.