Skip to content

Instantly share code, notes, and snippets.

Environment:
Request Method: GET
Request URL: http://69.172.212.35/usuarios/1/fitoria/
Django Version: 1.0.2 final
Python Version: 2.6.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
ADDRESSES_RE = re.compile(r"""(?x)
(?<!-|/|:|,|\.|\$) # These various characters are not allowed before an address/intersection.
\b
# Ignore things that look like dates -- e.g., "21 May 2009".
# This is a problem e.g. in cases where there's a May Street.
(?!
\d+\s+
(?:January|February|March|April|May|June|July|August|September|October|November|December)
,?\s+
for i in range(len(data)):
porcentaje_producen = "%.2f" % (data[i][0]/totals[0])*100 #fail
porcentaje_compran = (data[i][1]/totals[1])*100
porcentaje_suficiente = (data[i][2]/totals[2])*100
data[i].insert(1, porcentaje_producen)
data[i].insert(3, "%.2f" % porcentaje_compran) #fail
data[i].insert(5, porcentaje_suficiente)
data[i].insert(0, [dato[1] for dato in PRODUCTO_CHOICES][i])
# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7
@fitoria
fitoria / gist:217614
Created October 24, 2009 16:37 — forked from leah/gist:216443
:⌉
=⌉
¦-) as opposed to |
⍥ om nom nom
{% extends "base.html" %}
{%block extra_head%}
<link rel="stylesheet" href="/css/smoothness/jquery-ui-1.7.1.custom.css" type="text/css" />
<script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/js/ui.core.js"></script>
<script type="text/javascript" src="/js/ui.datepicker.js"></script>
<script type="text/javascript" src="/js/i18n/ui.datepicker-es.js"></script>
{%endblock%}
{%block title %}Editar Perfil{%endblock%}
def get_url(clean_update):
urlfinders = [
re.compile("([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}|(((news|telnet|nttp|file|http|ftp|https)://)|(www|ftp)[-A-Za-z0-9]*\\.)[-A-Za-z0-9\\.]+)(:[0-9]*)?/[-A-Za-z0-9_\\$\\.\\+\\!\\*\\(\\),;:@&=\\?/~\\#\\%]*[^]'\\.}>\\),\\\"]"),
re.compile("([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}|(((news|telnet|nttp|file|http|ftp|https)://)|(www|ftp)[-A-Za-z0-9]*\\.)[-A-Za-z0-9\\.]+)(:[0-9]*)?"),
re.compile("(~/|/|\\./)([-A-Za-z0-9_\\$\\.\\+\\!\\*\\(\\),;:@&=\\?/~\\#\\%]|\\\\)+"),
re.compile("'\\<((mailto:)|)[-A-Za-z0-9\\.]+@[-A-Za-z0-9\\.]+"),
]
<?
require "app.class.php";
function genSQL($object) {
$o = $object . "Table";
$data = new $o;
$sql = "CREATE TABLE $data->name (\n";
$i = 0;
foreach($data->definition as $column) {
unset($size);
>>> from handler_amarok2 import AmarokHandler
>>> player = AmarokHandler()
>>> player.is_running()
False
>>> player.is_playing()
False
>>> player.is_get_current_song()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'AmarokHandler' object has no attribute 'is_get_current_song'
fitoria@fitoria-laptop:/media/disk/home/fitoria/code/msn/emesene/mesinyer/plugins/music$ pylint handler_amarok2.py
No config file found, using default configuration
************* Module handler_amarok2
W: 47: Bad indentation. Found 11 spaces, expected 12
C: 1: Missing docstring
W: 25:AmarokHandler.__init__: Catch "Exception"
C: 14:AmarokHandler.__init__: Comma not followed by a space
dbus_version = getattr(dbus, 'version', (0,0,0))
^^