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/env python | |
step = 8 | |
# step = 1 # for finer resolution in the color-space | |
bitspan = lambda : range(0, 255, step) | |
def print_color(r, g, b): | |
print "%.2x%.2x%.2x" % (r, g, b) | |
# You could do this one way, by generating every single combination of red, |
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 urllib2 | |
import re | |
from BeautifulSoup import BeautifulSoup | |
""" | |
User inputs URL | |
User inputs email | |
User inputs keyword | |
User provides Frequency? |
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
<!-- Add these tags to the HEAD section of your page. --> | |
<link href="http://coderwall.com/stylesheets/jquery.coderwall.css" media="all" rel="stylesheet" type="text/css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script src="http://coderwall.com/javascripts/jquery.coderwall.js"></script> | |
<!-- You also need to place a container where you'd like the Coderwall badges to render. --> | |
<section class="coderwall" data-coderwall-username="(your username)" data-coderwall-orientation="(vertical or horizontal)"></section> |
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 flask import Flask | |
from flask import render_template | |
import twilio.twiml | |
app = Flask(__name__) | |
@app.route("/") | |
def hello_world(): |
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> | |
<title>CatFacts</title> | |
<body> | |
<pre> | |
(\_/) | |
( =(^Y^)= | |
____\_(m___m)_______ | |
</pre> | |
{{ catfact }} |
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/env python2 | |
from sqlalchemy import create_engine | |
from knowledge.model import Fact, Entity, DBSession, init_model, metadata | |
def inject_knowledge(): | |
knowledge = DBSession | |
monster = Entity(u'Monster') | |
fairy = Entity(u'Fairy') | |
rjbean = Entity(u'rjbean') | |
monster[u'color'] = u'Green' |
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
find /run/media/ryansb -maxdepth 1 -type d | sed 1d | while read line | |
do | |
echo "$line" | |
rm -r $line/* | |
cp -r /home/ryansb/IGIC/*.pdf $line | |
chmod 777 $line/* | |
umount $line | |
done | |
echo "Done!" |
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 tahrir_api.dbapi import TahrirDatabase | |
db = TahrirDatabase('backend://badges:badgesareawesome@localhost/badges') | |
badge_id = 'fossbox' | |
person_email = 'person@email.com' | |
person_id = hash(person_email) | |
issued_on = None |
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 read p; do | |
git clone $p | |
done < gittiprepos.txt |
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 ConfigParser | |
config = ConfigParser.ConfigParser() | |
config.read('config.ini') | |
CLIENT_ID = config.get('general', 'CLIENT_ID', 0) | |
CLIENT_SECRET = config.get('general', 'CLIENT_SECRET', 0) |
OlderNewer