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
| # -*- coding: utf-8 -*- | |
| import hashlib | |
| import sys | |
| import time | |
| # Using: ./hash.py hashcode | |
| # For example: ./hash.py 9743a66f914cc249efca164485a19c5c | |
| def timing(f): |
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
| apt-get install python-pygraphviz | |
| pip install django-extensions | |
| # add 'django_extensions' to INSTALLED_APPS in settings.py | |
| python manage.py graph_models trees -o test.png |
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
| <!-- This loads of all of files that you call below from your 'static' folder --> | |
| {% load staticfiles %} | |
| <!--The static folder consists of your bootstrap files (.css, .js, fonts, etc)--> | |
| <!--When you load the static folders is calls all those folders in the static files without having to code each one in individually--> | |
| <html> | |
| <head> | |
| <!--This is the meta information which is good for SEO--> | |
| {% block head-meta %} | |
| <meta charset="utf-8"> |
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 turtle | |
| import turtle | |
| wn = turtle.Screen() | |
| wn.bgcolor("red") | |
| tess = turtle.Turtle() | |
| tess.shape("turtle") | |
| tess.color("blue") | |
| tess.penup() # This is new | |
| size = 30 |