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
{% macro render_field(field) %} | |
<dt>{{ field.label }} | |
<dd>{{ field(**kwargs)|safe }} | |
{% if field.errors %} | |
<ul class=errors> | |
{% for error in field.errors %} | |
<li>{{ error }}</li> | |
{% endfor %} | |
</ul> | |
{% endif %} |
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
# enable syntax completion | |
try: | |
import readline | |
except ImportError: | |
print "Module readline not available." | |
else: | |
import rlcompleter | |
readline.parse_and_bind("tab: complete") |
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
Traceback (most recent call last): | |
File "/home/sunu/moin/support/flask/app.py", line 1687, in wsgi_app | |
response = self.full_dispatch_request() | |
File "/home/sunu/moin/support/flask/app.py", line 1360, in full_dispatch_request | |
rv = self.handle_user_exception(e) | |
File "/home/sunu/moin/support/flask/app.py", line 1358, in full_dispatch_request | |
rv = self.dispatch_request() | |
File "/home/sunu/moin/support/flask/app.py", line 1344, in dispatch_request | |
return self.view_functions[rule.endpoint](**req.view_args) | |
File "/home/sunu/moin/MoinMoin/apps/frontend/views.py", line 463, in modify_item |
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
#!/usr/bin/env python | |
import os | |
import random | |
import time | |
import platform | |
snowflakes = {} | |
try: | |
# Windows Support |
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
sunu: /home/sunu/opensource/oppia-django | |
(oppia-django)⟶ python manage.py test widget | |
Creating test database for alias 'default'... | |
...F... | |
====================================================================== | |
FAIL: test_parameterized_widget (oppia.apps.widget.tests.WidgetUnitTests) | |
Test that parameterized widgets are correctly handled. | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/sunu/opensource/oppia-django/oppia/apps/widget/tests.py", line 141, in test_parameterized_widget |
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
diff --git a/lib/python2.7/site-packages/json_field/fields1.py b/json_field/fields.py | |
index dbf1c9d..3be8287 100644 | |
--- a/lib/python2.7/site-packages/json_field/fields1.py | |
+++ b/json_field/fields.py | |
@@ -24,6 +24,41 @@ TIME_RE = re.compile(r'^\d{2}:\d{2}:\d{2}') | |
DATE_RE = re.compile(r'^\d{4}-\d{2}-\d{2}(?!T)') | |
DATETIME_RE = re.compile(r'^\d{4}-\d{2}-\d{2}T') | |
+ | |
+class Converter(): |
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
diff --git a/lib/python2.7/site-packages/json_field/fields1.py b/json_field/fields.py | |
index dbf1c9d..f14d5ea 100644 | |
--- a/lib/python2.7/site-packages/json_field/fields1.py | |
+++ b/json_field/fields.py | |
@@ -24,6 +24,55 @@ TIME_RE = re.compile(r'^\d{2}:\d{2}:\d{2}') | |
DATE_RE = re.compile(r'^\d{4}-\d{2}-\d{2}(?!T)') | |
DATETIME_RE = re.compile(r'^\d{4}-\d{2}-\d{2}T') | |
+ | |
+class Converter(): |
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
#!/usr/bin/env python | |
### We must chdir() up one level. | |
import os | |
import os.path | |
import sys | |
THIS_FILE=os.path.abspath(__file__) | |
THIS_DIR=os.path.dirname(THIS_FILE) | |
UP_ONE_DIR=os.path.join(THIS_DIR, '..') | |
sys.path.append(UP_ONE_DIR) |
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
# N is the range in which you find all primes | |
N = 10000 | |
# initialize an array of flags | |
is_prime = [1 for num in xrange(N)] | |
is_prime[0] = 0 # this is because indexing starts at zero | |
is_prime[1] = 0 # one is not a prime, but don't mark all of its multiples! | |
def set_prime(num): | |
"num is a prime; set all of its multiples in is_prime to zero" |
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
# coding: utf-8 | |
# | |
# Copyright 2013 Google Inc. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
OlderNewer