This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2.7 | |
import re | |
import requests | |
from envelopes import Envelope, SMTP | |
from lxml import etree | |
from splinter import Browser | |
REGEX_FIND_NUMBER = re.compile(r'\d*\.\d+|\d+') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from BeautifulSoup import BeautifulSoup | |
input_file = file('input.txt') | |
soup = BeautifulSoup(input_file.read()) | |
for a in soup.findAll('a'): | |
if 'watch?v=' in a['href']: | |
print 'http://www.youtube.com'+a['href'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -cp /opt/Multivalent.jar tool.pdf.Compress /tmp/5dd69f32-b97b-4f43-9bfa-f182e972f6ef.pdf | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User | |
from django.contrib.auth.hashers import make_password | |
from tastypie.authentication import ( | |
Authentication, ApiKeyAuthentication, BasicAuthentication, | |
MultiAuthentication) | |
from tastypie.authorization import Authorization | |
from tastypie.resources import ModelResource | |
from tastypie import fields |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
angular.module('App', ['ng', 'ngCookies', 'ngResource']); | |
angular.module('App').run(function($rootScope, $http, $cookies) { | |
$http.defaults.headers.common['X-CSRFToken'] = $cookies.csrftoken; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; | |
# echo date/time | |
date; | |
do | |
# make a post request to Indian Railways PNR Enquiry page and search for "CHART NOT PREPARED" | |
if curl --silent -X POST -d "lccp_pnrno1=$1&submitpnr=Get+PNR+Status" http://www.indianrail.gov.in/cgi_bin/inet_pnrstat_cgi.cgi | grep "CHART PREPARED" | |
then | |
# Chart prepared :) | |
echo "Chart prepared. \n\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hotshot | |
import os | |
import time | |
from django.conf import settings | |
import tempfile | |
try: | |
PROFILE_LOG_BASE = settings.PROFILE_LOG_BASE | |
except: | |
PROFILE_LOG_BASE = tempfile.gettempdir() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type='text/javascript' src='http://www.google.co.in/jsapi'></script> | |
<script> | |
google.load('visualization', '1', { | |
'packages': ['geomap'] | |
}); | |
google.setOnLoadCallback(drawMap2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Based on Stackoverflow Answer: http://stackoverflow.com/a/12525165/353550 | |
''' | |
import base64 | |
from Crypto.Cipher import AES | |
from Crypto import Random | |
BS = 16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>psjinx's Resume</title> | |
</head> | |
<body> | |
<iframe id="google-doc-iframe" srcdoc="" style="height: 1050px; margin: 0 auto;" align="middle" frameborder="0" width="100%" height="100%" scrolling="no"> | |
</iframe> |