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
#add this to your urls file | |
url(r'^version/$', 'api.views.code_version', name='code_version'), |
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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
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 Flask object from flask library | |
# you can install flask by pip install flask | |
from flask import Flask | |
# initialize Flask app with the name of the file | |
app = Flask(__name__) | |
# define the url for which the application should send an http response to | |
@app.route('/') | |
# plain python function to handle the request | |
def hello_world(): |
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
class സൂചിക: | |
""" | |
മലയാളത്തിൽ പൈതോണ് കോഡ് ചെയ്യാം എന്നുള്ളതിനുള്ള തെളിവ് | |
Proof that python can use malayalam language (Only on Python 3x) | |
""" | |
def സൂചിക(സ്വയം): | |
print(u"പൈതോണ് ഇപ്പോൾ മലയാളത്തിലും !") | |
സൂചി = സൂചിക() | |
സൂചി.സൂചിക() |
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 md5 | |
f = open("newmd5.py","r+") | |
b = md5.md5(f.read()) | |
# MD5 of the parent: 54062bcee8cdff7b3c3124421f5c5018 Last Modified:2011-11-21 23:28:46.974856 | |
f.seek(60) | |
import datetime | |
digest = b.hexdigest() | |
f.writelines("# MD5 of the parent: "+digest+" Last Modified:"+str(datetime.datetime.now())) | |
print digest | |
f.close() |