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 guess_time(s): | |
""" | |
>>> guess_time('20:00') | |
(20, 0) | |
>>> guess_time('23:59') | |
(23, 59) | |
>>> guess_time('20:00foo') | |
(20, 0) | |
>>> guess_time('9pm') |
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
#encoding: utf-8 | |
class Humano(object): | |
"""Human Being""" | |
def __init__(self, nome, pai=None, mae=None): | |
print "alguem fez besteira e colocou mais um ser Humano no mundo \n" | |
self.nome = nome | |
self.pai = pai | |
self.mae = mae |
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
<!DOCTYPE html> | |
<!-- Helpful things to keep in your <head/> | |
// Brian Blakely, 360i | |
// http://twitter.com/brianblakely/ | |
--> | |
<head> | |
<!-- Disable automatic DNS prefetching. | |
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
.fb_access_token | |
.fbconsole.py |
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
sub, sup { | |
/* Specified in % so that the sup/sup is the | |
right size relative to the surrounding text */ | |
font-size: 75%; | |
/* Zero out the line-height so that it doesn't | |
interfere with the positioning that follows */ | |
line-height: 0; | |
/* Where the magic happens: makes all browsers position |
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
test: | |
clear | |
nosetests --with-coverage --cover-package slugfy test_slugfy.py | |
clean: | |
find -regex '.*\.pyc' -exec rm {} \; | |
find -regex '.*~' -exec rm {} \; | |
.PHONY: test clean |
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
# modules/tables.py | |
from gluon.dal import Field | |
from gluon.validators import * | |
from gluon.storage import Storage | |
class Tables(object): | |
"""Tables stores all dal tables as properties. The properties are lazy loaded so the define_table isn't | |
Called unless the table is explicitly needed. This also avoids the need to define tables in | |
a particular order.""" |
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
<uwsgi> | |
<uid>web2py</uid> | |
<gid>web2py</gid> | |
<pythonpath>/home/web2py/</pythonpath> | |
<app mountpoint="/"> | |
<script>wsgihandler</script> | |
</app> | |
<mule>run_scheduler.py</mule> | |
<workers>4</workers> | |
<pidfile>/tmp/uwsgi-prod.pid</pidfile> |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
# Note the app name is hardcoded! | |
APPLICATION = 'eden' | |
if '__file__' in globals(): | |
path = os.path.dirname(os.path.abspath(__file__)) |
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
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
OlderNewer