// jQuery
$(document).ready(function() {
// code
})
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 time | |
import sys | |
ms = int(sys.argv[1]) if len(sys.argv) > 1 else 250 | |
words, start = 0, time.time() | |
print "\n"*2 | |
try: | |
for line in sys.stdin: |
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 collections import Counter | |
a = {'a': 1} | |
b = {'a': 2, 'b': 3} | |
c = Counter(a) + Counter(b) |
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
@app.route('/post/<id>') | |
@app.route('/post/<id>/<slug>') | |
def view_post(id, slug=None): | |
post = models.Post.query.get_or_404(id) | |
if post.slug != slug: | |
return redirect(url_for('post', id=id,slug = post.slug)) | |
return render_template("post.html", post=post) |
NewerOlder