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
form datetime import datetime | |
date = '2013-05-20 16:31:59.199579' | |
strptime = datetime.strptime(date, '%Y-%m-%d %H:%M:%S.%f') | |
strftime = strptime.strftime('%B %d, %Y') |
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 pymongo, re | |
regx = re.compile("^foo",re.IGNORECASE) | |
db.users.find({"name": regx}) |
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
def escape_html(self, var): | |
meta_chars = { | |
'"': '"', | |
'\'': ''', | |
'&': '&', | |
'<': '<', | |
'>': '>', | |
} | |
escaped_var = "" | |
for i in var: |
NewerOlder