Skip to content

Instantly share code, notes, and snippets.

Kiran Koduru kirankoduru

  • New York, NYC
Block or report user

Report or block kirankoduru

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
@kirankoduru
kirankoduru / filter.py
Last active Jun 7, 2016 — forked from thewarpaint/filter.js
Angular filter to convert numbers to thousand suffixes (1234 > 1.2k)
View filter.py
"""
Source: https://gist.github.com/thewarpaint/889690aeb21a8dfd7aba
"""
from __future__ import division
def number_suffixes(number):
suffixes = ['k', 'M', 'G', 'T', 'P', 'E']
if not isinstance(number, int):
return number
if number < 1000:
View EmbeddedSending.py
# DocuSign API Walkthrough 07 (PYTHON) - Embedded Sending
import sys, httplib2, json;
#enter your info:
username = "***";
password = "***";
integratorKey = "***";
templateId = "***";
authenticateStr = "<DocuSignCredentials>" \
@kirankoduru
kirankoduru / scrapy_webservice_call.py
Created May 22, 2015
Querying a Scrapy spider with JSON RPC
View scrapy_webservice_call.py
import requests
url = 'http://localhost:6080/crawler'
# This will call the crawler objects stop method.
# Checkout all the methods the crawler object has:
# https://github.com/scrapy/scrapy/blob/master/scrapy/crawler.py#L24
data = '{"id" : 2, "method" : "stop"}'
# The project has been moved out of scrapy but heres the web service API
View state-codes.md

##List of state and state codes

Not an official source

State Abbreviation Postal Code
Alabama Ala. AL
Alaska Alaska AK
American Samoa AS
Arizona Ariz. AZ
View selenium-scrapy-guide.md

###How to selenium

Selenium is a browser automation tool used for testing elements in the browser and can also be used by our dear friend scrapy to scrape elements off the internet.

####Install selenium via pip

Run this command on your system. Make sure you have pip installed. If not then, download and run this python program and then run the command below.

pip install selenium
@kirankoduru
kirankoduru / dialog.js
Created Aug 30, 2013
ajax dialog post
View dialog.js
var commentPolicy = function(username,category){
var username = username;
var category = category;
$('.icon-comment').click(function() {
var id = $(this).attr('name');
$("#dialog .policy-comment").val('');
$("#dialog").dialog({
You can’t perform that action at this time.