I hereby claim:
- I am panchr on github.
- I am panchr (https://keybase.io/panchr) on keybase.
- I have a public key ASADHO1RTmQpEUNrbuhJ1Kob6gPI_wMsy96DTwMdnMHAUwo
To claim this, I am signing this object:
[[source]] | |
url = "https://pypi.python.org/simple" | |
verify_ssl = true | |
name = "pypi" | |
[dev-packages] | |
django-autofixture = "==0.12.1" | |
django-nose = "~=1.4.0" | |
model-mommy = "~=1.5.0" | |
nose-progressive = "~=1.5.0" |
I hereby claim:
To claim this, I am signing this object:
# Rushy Panchal | |
# configure.py | |
# Initializes the server | |
import subprocess | |
def main(): | |
'''Main process''' | |
with open("nginx.conf", "w") as nginx_conf: | |
nginx_conf.write('''{{ nginx_conf }}''') |
import logging | |
from logging.handlers import SMTPHandler | |
from flask import Flask | |
app = Flask(__name__) # configure however you normally do | |
app.debug = False | |
if not app.debug: | |
logging.basicConfig(level = logging.INFO) |
from queue_db import QueuedWriter | |
from pymongo import Connection | |
from flask import Flask | |
from json import dumps | |
def main(): | |
'''This is just an example using Flask and MongoDB/pymongo. | |
Of course, you can use any web server and any database as long as you set up the methods appropriately''' |
#!/bin/bash | |
set -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
if [ $# -eq 0 ]; then | |
exit 0 |
// Rushy Panchal | |
// bitstring.c | |
// Provides bitstring operations in C | |
#include <math.h> | |
unsigned int countBits(unsigned int n); | |
unsigned int not(unsigned int n); | |
unsigned int rcirc(unsigned int x, unsigned int n); | |
unsigned int lcirc(unsigned int x, unsigned int n); |
import re | |
FILTER_WORDS = ["spam", "morespam", "blahblah"] # and so forth | |
FILTER = re.compile("|".join(FILTER_WORDS)) | |
def phrasePassesFilter(word): | |
'''Checks if the phrase passes the filter''' | |
return not bool(FILTER.match(word)) # if there are no matches, FILTER.match --> None, so it passes the filter |
/* | |
repositories is a list of repository objects, in the form of | |
[ | |
{name: "repo A", description: "my first repository!"}, | |
{name: "repo B", description: "my second repository!"} | |
] | |
This is the same form as returned by the GitHub API: https://api.github.com/users/panchr/repos | |
query is just the search query as a string, such as "repo python my first" | |
*/ |
jQuery.fn.smoothScroll = function(options) { | |
var options = jQuery.extend({offset: 0, duration: 900, easing: "swing"}, options); | |
$('html, body').stop().animate({'scrollTop': this.offset().top + options.offset}, options.duration, options.easing); | |
} | |
function anchorLinkSmoothScroll() { | |
// Smooth scroll to any clicked anchor link | |
$("a[href^=#]").click(function (event) { | |
event.preventDefault(); | |
var anchorLink = this.href.replace(this.baseURI, ""); |