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
(define (Square x) (* x x) ) | |
| | |_ multiple |_ it by |_ itself | |
| |_something | |
To | | |
|_ Procedure name | |
(define (<name> <formal parameters>) <body>) |
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
(define (Suare x) (* x x)) | |
(Square 3) | |
; the paremeter is x the argument is 3 |
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
; Applicative Order | |
(f 5) | |
(sum-of-squares (+ a 1) (* a 2)) | |
(sum-of-squares (+ 5 1) (* 5 2)) | |
(+ (square 6) (square 10) | |
(+ (* 6 6) (* 10 10)) | |
(+ 36 100) | |
136 | |
; Normal Order |
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
33 projects that make developing django apps awesome | |
http://elweb.co/programacion/33-projects-that-make-developing-django-apps-awesome/ | |
Enter Django Development | |
http://blog.eood.cn/enter_django_python_development | |
virtualenv 1.6.4 | |
http://pypi.python.org/pypi/virtualenv |
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
http://kukuklok.com/ | |
http://gettingstartedwithdjango.com/resources/index.html | |
http://readthedocs.org/docs/djangocon-2011-notes/en/latest/from_designer_to_djangoer.html | |
http://code.google.com/edu/languages/google-python-class/introduction.html | |
http://docs.python.org/tutorial/datastructures.html | |
https://code.djangoproject.com/wiki/DjangoResources | |
http://www.ece.uci.edu/~chou/py02/python.html | |
http://hameedullah.com/2009/04/28/step-by-step-guide-to-use-sign-in-with-twitter-with-django/ | |
http://en.wikibooks.org/wiki/Algorithm_Implementation/Sorting/Insertion_sort |
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
from urlparse import urlparse, urljoin | |
def get_fav_icon(url): | |
""" | |
return the URL of the favicon | |
""" | |
base_url = '%s://%s' % urlparse(url)[:2] | |
favicon_url = urljoin(base_url, 'favicon.ico') | |
print favicon_url |
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
;; Division by zero in Scheme for fun | |
(define (checkZeroValue a n) | |
(if (= n 0) | |
(print "n is zero") | |
(/ a n))) | |
(define divisionByZero | |
(lambda (a n) | |
(checkZeroValue a n))) |
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
;; Check if x < -2 or x > 2 | |
;; If True return x exponent | |
;; If False print "bla bla bla" | |
;; In Logic Form :: | |
;; :: If p or q then r | |
;; :: Therefore, if not r, then not p and not q | |
(define logicalForm | |
(lambda (x) | |
(if (or (< x (- 2)) (> x 2)) |
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
# A grid function that draws a grid | |
# based on the example at http://www.greenteapress.com/thinkpython/html/thinkpython004.html | |
def grid(x, y): | |
def beem(): | |
print '+ - - - -', | |
def post(): | |
print '| ', |
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
# Django settings for ontwik project. | |
import os | |
import dj_database_url | |
PROJECT_ROOT = os.path.dirname(__file__) | |
DEBUG = True | |
TEMPLATE_DEBUG = DEBUG | |
ADMINS = ( |