View request_time.py
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 python3 | |
import time | |
# REMEMBER TO CHANGE THE VARIABLES BELOW BEFORE YOU RUN THE SCRIPT | |
_URL = 'http://localhost/tmp/derp.html' | |
_NUMBER = 1000 | |
def test_urllib2(): |
View dot_dict.py
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
class DotDict(dict): | |
""" A dictionary whose attributes are accessible by dot notation. | |
This is a variation on the classic `Bunch` recipe (which is more limited | |
and doesn't give you all of dict's methods). It is just like a dictionary, | |
but its attributes are accessible by dot notation in addition to regular | |
`dict['attribute']` notation. It also has all of dict's methods. | |
.. doctest:: |
View regex-weburl.js
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
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Updated: 2010/12/05 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
// | |
// Permission is hereby granted, free of charge, to any person |