This file contains hidden or 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
[ | |
{ | |
"name": "Chicago, IL", | |
"id": 1, | |
"scores": { | |
"walkability": 1.7, | |
"job_growth": 2.32, | |
"green_space": 0.9, | |
"taxes": 0.6 | |
} |
This file contains hidden or 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 cherrypy | |
html_header = \ | |
""" | |
<html> | |
<head> | |
<title>Example of GET and POST</title> | |
</head> | |
<body> | |
""" |
This file contains hidden or 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
#**************************************************************************** | |
# | |
# GNU/ __ __ _ __ _ _ | |
# /gmake | \/ | __ _| | _____ / _(_) | ___ | |
# / | |\/| |/ _` | |/ / _ \ |_| | |/ _ \ | |
# /BSD-2c | | | | (_| | < __/ _| | | __/ | |
# |_| |_|\__,_|_|\_\___|_| |_|_|\___| | |
# | |
# HEREDOC | |
# |
This file contains hidden or 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
#A Virtual Environment Trick using virtualenv | |
***Full Disclosure (YMMV):*** | |
_virtualenv_ | |
--version: 15.0.2 | |
_Mint 17.1 MATE_ | |
uname: Linux [hostname] 3.13.0-37-generic #64-Ubuntu SMP [datetime] i686 athlon i686 GNU/Linux | |
_Python 2.7 Package Installed_ | |
--version: Python 2.7.6 |
This file contains hidden or 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
so a C programmer sees: | |
a, b=b, a | |
and thinks: | |
(a), (b=b), (a) | |
and wonders WTF? | |
but python thinks: | |
(a,b) = (b,a) | |
and swaps a and b with no more effort and no intermediate... |