repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
ansible/ansible-modules-core | refs/heads/devel | network/cumulus/__init__.py | 12133432 | |
lino-framework/book | refs/heads/master | lino_book/projects/mti/fixtures/__init__.py | 12133432 | |
oliver-sanders/cylc | refs/heads/master | cylc/flow/network/resolvers.py | 1 | # THIS FILE IS PART OF THE CYLC SUITE ENGINE.
# Copyright (C) 2008-2019 NIWA & British Crown (Met Office) & Contributors.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of th... |
vijaysbhat/incubator-airflow | refs/heads/master | airflow/migrations/versions/e3a246e0dc1_current_schema.py | 38 | # -*- coding: utf-8 -*-
#
# 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
#
# Unless required by applicable law or agreed to in writing, software
... |
redhat-openstack/rally | refs/heads/master | tests/unit/common/test_sshutils.py | 9 | # Copyright 2013: Mirantis 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
#
# Unless required b... |
ClovisIRex/Snake-django | refs/heads/master | env/lib/python3.6/site-packages/pip/_vendor/requests/status_codes.py | 481 | # -*- coding: utf-8 -*-
from .structures import LookupDict
_codes = {
# Informational.
100: ('continue',),
101: ('switching_protocols',),
102: ('processing',),
103: ('checkpoint',),
122: ('uri_too_long', 'request_uri_too_long'),
200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'... |
jalavik/invenio | refs/heads/master | invenio/modules/pidstore/views.py | 5 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014, 2015 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any... |
carlini/cleverhans | refs/heads/master | cleverhans/__init__.py | 1 | """The CleverHans adversarial example library"""
from cleverhans.devtools.version import append_dev_version
# If possible attach a hex digest to the version string to keep track of
# changes in the development branch
__version__ = append_dev_version('2.0.0')
|
nypl-spacetime/oldnyc | refs/heads/master | nyc/expand-pickle.py | 2 | #!/usr/bin/python
'''Split single image records in the pickle file into multiple records.
Each photo extracted from the original image gets its own record in the new pickle.'''
import os, sys
parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0,parentdir)
import cPickle
import c... |
jelugbo/ddi | refs/heads/master | common/lib/capa/capa/safe_exec/lazymod.py | 68 | """A module proxy for delayed importing of modules.
From http://barnesc.blogspot.com/2006/06/automatic-python-imports-with-autoimp.html,
in the public domain.
"""
import sys
class LazyModule(object):
"""A lazy module proxy."""
def __init__(self, modname):
self.__dict__['__name__'] = modname
... |
nkmk/python-snippets | refs/heads/master | notebook/numpy_tile.py | 1 | import numpy as np
a = np.array([0, 1, 2, 3])
print(np.tile(a, 2))
# [0 1 2 3 0 1 2 3]
print(np.tile(a, (3, 2)))
# [[0 1 2 3 0 1 2 3]
# [0 1 2 3 0 1 2 3]
# [0 1 2 3 0 1 2 3]]
print(np.tile(a, (2, 1)))
# [[0 1 2 3]
# [0 1 2 3]]
a = np.array([[11, 12], [21, 22]])
print(np.tile(a, 2))
# [[11 12 11 12]
# [21 22 2... |
gVallverdu/pymatgen | refs/heads/master | pymatgen/analysis/chemenv/__init__.py | 132 | __author__ = 'waroquiers'
|
mollstam/UnrealPy | refs/heads/master | UnrealPyEmbed/Source/Python/Lib/python27/lib-tk/test/test_tkinter/test_text.py | 40 | import unittest
import Tkinter as tkinter
from test.test_support import requires, run_unittest
from test_ttk.support import AbstractTkTest
requires('gui')
class TextTest(AbstractTkTest, unittest.TestCase):
def setUp(self):
super(TextTest, self).setUp()
self.text = tkinter.Text(self.root)
def... |
giobauermeister/openembedded | refs/heads/master | recipes/python/python-pyyaml/setup.py | 69 | NAME = 'PyYAML'
VERSION = '3.06'
DESCRIPTION = "YAML parser and emitter for Python"
LONG_DESCRIPTION = """\
YAML is a data serialization format designed for human readability and
interaction with scripting languages. PyYAML is a YAML parser and
emitter for Python.
PyYAML features a complete YAML 1.1 parser, Unicode s... |
nuagenetworks/tempest | refs/heads/master | tempest/api/compute/keypairs/__init__.py | 12133432 | |
willemneal/Docky | refs/heads/master | lib/pygments/styles/vim.py | 135 | # -*- coding: utf-8 -*-
"""
pygments.styles.vim
~~~~~~~~~~~~~~~~~~~
A highlighting style for Pygments, inspired by vim.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keywor... |
bennylope/ciafactbook | refs/heads/master | countries/tests.py | 6666 | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 a... |
ngokevin/zamboni | refs/heads/master | lib/es/__init__.py | 12133432 | |
av8ramit/tensorflow | refs/heads/master | tensorflow/python/ops/distributions/__init__.py | 12133432 | |
zakuro9715/lettuce | refs/heads/master | tests/integration/lib/Django-1.2.5/django/conf/locale/mk/__init__.py | 12133432 | |
jwren/intellij-community | refs/heads/master | python/testData/completion/importInMiddleOfHierarchy/xyzzy/__init__.py | 12133432 | |
KellyChan/Python | refs/heads/master | javascript/backbone/backbone-templates/backbone-fileupload/venvs/lib/python2.7/site-packages/django/conf/locale/ml/__init__.py | 12133432 | |
sparrow629/Lofter-image-Crawler | refs/heads/master | TestFile/foldername.py | 1 | #!/usr/bin/python
import re
import urllib
import os
def getHtml(url):
page = urllib.urlopen(url)
html = page.read()
return html
def foldername(html,url):
reg_month = r'<div class="month">(.*?)</div>'
month = re.compile(reg_month)
time_month = re.findall(month, html)
reg_date = r'<div class="date">(.*?)</div>'... |
1st/django | refs/heads/master | tests/i18n/other/locale/__init__.py | 12133432 | |
hihacoder/codestyle | refs/heads/master | csc/core/__init__.py | 12133432 | |
jbeich/Aquaria | refs/heads/warnings | ExternalLibs/freetype2/src/tools/docmaker/tohtml.py | 395 | # ToHTML (c) 2002, 2003, 2005, 2006, 2007, 2008
# David Turner <david@freetype.org>
from sources import *
from content import *
from formatter import *
import time
# The following defines the HTML header used by all generated pages.
html_header_1 = """\
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional/... |
louietsai/python-for-android | refs/heads/master | python-build/python-libs/gdata/build/lib/gdata/data.py | 133 | #!/usr/bin/env python
#
# Copyright (C) 2009 Google Inc.
#
# 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
#
# Unless required by applicable ... |
dalgr/svtplay-dl | refs/heads/master | lib/svtplay_dl/service/svtplay.py | 1 | # ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
from __future__ import absolute_import
import re
import os
import xml.etree.ElementTree as ET
import copy
import json
import hashlib
from svtplay_dl.log import log
from svtplay_dl.service import Service, OpenGraphThumbMixin
from s... |
PeterWangIntel/chromium-crosswalk | refs/heads/master | tools/telemetry/telemetry/value/list_of_string_values_unittest.py | 8 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import unittest
from telemetry import page as page_module
from telemetry.page import page_set
from telemetry import value
from telemetry.value impo... |
apporc/cinder | refs/heads/master | cinder/tests/unit/backup/fake_swift_client2.py | 28 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
# Copyright (C) 2014 TrilioData, 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
#
# ... |
eayunstack/horizon | refs/heads/master | openstack_dashboard/dashboards/admin/dashboard.py | 31 | # Copyright 2012 Nebula, Inc.
#
# 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
#
# Unless required by applicable law or agree... |
2PacIsAlive/deepnet.works | refs/heads/master | deep_networks/data/dicom/plot.py | 2 | import logging
#import pylab
import matplotlib.pyplot as plt
from skimage import measure
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
class Plotter(object):
logging.basicConfig(level=logging.INFO)
log = logging.getLogger(__name__)
def plot_3d(self, image, threshold=-300):
"""
... |
smendez/lean | refs/heads/master | paart/apps/agencies/migrations/0002_auto__add_field_agency_registration.py | 2 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Agency.registration'
db.add_column('agencies_agency', 'registration',
... |
grimmjow8/ansible | refs/heads/devel | test/integration/targets/module_utils/module_utils/sub/bam/bam.py | 298 | #!/usr/bin/env python
bam = "BAM FROM sub/bam/bam.py"
|
Ledoux/ShareYourSystem | refs/heads/master | Pythonlogy/ShareYourSystem/Standards/Viewers/Boxer/01_ExampleDoc.py | 1 |
#ImportModules
import ShareYourSystem as SYS
#Definition an Tree instance
MyBoxer=SYS.BoxerClass().view()
MyBoxer.MeteoredConcurrentDDPClientVariable.stop()
#Definition the AttestedStr
SYS._attest(
[
'MyBoxer is '+SYS._str(
MyBoxer,
**{
'RepresentingBaseKeyStrsListBool':False,
'RepresentingAlineaIsBoo... |
toolmacher/micropython | refs/heads/master | tests/basics/try_finally_return.py | 82 | def func1():
try:
return "it worked"
finally:
print("finally 1")
print(func1())
def func2():
try:
return "it worked"
finally:
print("finally 2")
def func3():
try:
s = func2()
return s + ", did this work?"
finally:
print("finally 3")
pr... |
ingokegel/intellij-community | refs/heads/master | python/testData/mover/multiLineSelection4.py | 83 | class Test(object):
<selection> a = 1
b = 2
<caret></selection> def q(self):
c = 3
|
ibarria0/Cactus | refs/heads/master | cactus/tests/data/skeleton/plugins/version.py | 5 | from __future__ import print_function
import os
INFO = {
'name': 'Version Updater',
'description': 'Add a version to /versions.txt after each deploy'
}
# Set up extra django template tags
def templateTags():
pass
# Build actions
# def preBuild(site):
# print 'preBuild'
#
# def postBuild(... |
isidorn/test2 | refs/heads/master | packaging/scripts/VirtuaBuild/smoke_test.py | 6 | #!/usr/bin/python
# Copyright 2010-2012 RethinkDB, all rights reserved.
# usage: ./smoke_test.py --mode OS_NAME --num-keys SOME_NUMBER_HERE
import time, sys, os, socket, random, time, signal, subprocess
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir, 'test', 'co... |
kubaszostak/gdal-dragndrop | refs/heads/master | osgeo/apps/Python27/Lib/ctypes/_endian.py | 2 | import sys
from ctypes import *
_array_type = type(Array)
def _other_endian(typ):
"""Return the type with the 'other' byte order. Simple types like
c_int and so on already have __ctype_be__ and __ctype_le__
attributes which contain the types, for more complicated types
arrays and structures ... |
thresholdsoftware/asylum | refs/heads/master | openerp/addons/hr_attendance/res_config.py | 434 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... |
huangchaosuper/ReportViewer | refs/heads/master | reportviewer/node_modules/cordova/node_modules/plugman/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py | 2736 | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Visual Studio project reader/writer."""
import gyp.common
import gyp.easy_xml as easy_xml
class Writer(object):
"""Visual Studio XML tool file writer."""
... |
moondrop-entertainment/django-nonrel-drawp | refs/heads/master | tests/regressiontests/forms/localflavor/cl.py | 86 | from django.contrib.localflavor.cl.forms import CLRutField, CLRegionSelect
from django.core.exceptions import ValidationError
from utils import LocalFlavorTestCase
class CLLocalFlavorTests(LocalFlavorTestCase):
def test_CLRegionSelect(self):
f = CLRegionSelect()
out = u'''<select name="foo">
<opt... |
kenorb-contrib/BitTorrent | refs/heads/master | python_bt_codebase_library/BTL/protocol.py | 11 | # The contents of this file are subject to the Python Software Foundation
# License Version 2.3 (the License). You may not copy or use this file, in
# either source code or executable form, except in compliance with the License.
# You may obtain a copy of the License at http://www.python.org/license.
#
# Software dist... |
gonzolino/heat | refs/heads/master | heat/api/openstack/v1/services.py | 8 | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# 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
#
# Unless required by applica... |
Ichimonji10/robottelo | refs/heads/master | tests/foreman/api/test_computeprofile.py | 2 | # -*- encoding: utf-8 -*-
"""Unit tests for the Compute Profile feature.
@Requirement: Computeprofile
@CaseAutomation: Automated
@CaseLevel: Acceptance
@CaseComponent: API
@TestType: Functional
@CaseImportance: High
@Upstream: No
"""
from nailgun import entities
from requests.exceptions import HTTPError
from rob... |
mvaled/sentry | refs/heads/master | src/sentry/south_migrations/0454_resolve_duplicate_0452.py | 1 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
# Flag to indicate if this migration is too risky
# to run online and needs to be coordinated for offline
... |
DeMille/emailhooks | refs/heads/master | django_nonrel/django/contrib/auth/tests/hashers.py | 19 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.global_settings import PASSWORD_HASHERS as default_hashers
from django.contrib.auth.hashers import (is_password_usable,
check_password, make_password, PBKDF2PasswordHasher, load_hashers,
PBKDF2SHA1PasswordHasher, get_hasher, ident... |
mrfuxi/docker-py | refs/heads/master | docker/utils/ports/__init__.py | 57 | from .ports import (
split_port,
build_port_bindings
) # flake8: noqa
|
madmouser1/aubio | refs/heads/master | python/demos/demo_pitch.py | 4 | #! /usr/bin/env python
import sys
from aubio import source, pitch, freqtomidi
if len(sys.argv) < 2:
print "Usage: %s <filename> [samplerate]" % sys.argv[0]
sys.exit(1)
filename = sys.argv[1]
downsample = 1
samplerate = 44100 / downsample
if len( sys.argv ) > 2: samplerate = int(sys.argv[2])
win_s = 4096 / ... |
kjung/scikit-learn | refs/heads/master | examples/ensemble/plot_voting_probas.py | 316 | """
===========================================================
Plot class probabilities calculated by the VotingClassifier
===========================================================
Plot the class probabilities of the first sample in a toy dataset
predicted by three different classifiers and averaged by the
`VotingC... |
ucb-sejits/opentuner | refs/heads/master | opentuner/search/objective.py | 1 | import abc
import logging
from fn import _
import opentuner
from opentuner.resultsdb.models import *
log = logging.getLogger(__name__)
class SearchObjective(object):
"""
delegates the comparison of results and configurations
"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def result_order_by_terms... |
slevenhagen/odoo-npg | refs/heads/8.0 | addons/website_crm_partner_assign/controllers/main.py | 271 | # -*- coding: utf-8 -*-
import werkzeug
from openerp import SUPERUSER_ID
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.addons.website.models.website import slug, unslug
from openerp.tools.translate import _
class WebsiteCrmPartnerAssign(http.Controller):
_references_... |
madjar/cython | refs/heads/master | tests/run/for_in_iter.py | 26 | # mode: run
# tag: forin
import sys
import cython
try:
from builtins import next
except ImportError:
def next(it):
return it.next()
def for_in_pyiter_pass(it):
"""
>>> it = Iterable(5)
>>> for_in_pyiter_pass(it)
>>> next(it)
Traceback (most recent call last):
StopIteration
... |
sgml/popcorn_maker | refs/heads/master | vendor-local/lib/python/south/db/postgresql_psycopg2.py | 20 | import uuid
from django.db.backends.util import truncate_name
from south.db import generic
class DatabaseOperations(generic.DatabaseOperations):
"""
PsycoPG2 implementation of database operations.
"""
backend_name = "postgres"
def create_index_name(self, table_name, column_names, suffix="")... |
hvnsweeting/Diamond | refs/heads/master | src/collectors/netapp/test/testnetappDisk.py | 29 | #!/usr/bin/python
# coding=utf-8
###############################################################################
from test import CollectorTestCase
from test import get_collector_config
from test import unittest
from netappDisk import netappDisk
######################################################################... |
kdwink/intellij-community | refs/heads/master | python/testData/refactoring/rename/renameShadowingVariable.py | 83 | def lab(): pass
lab = 1
print(l<caret>ab)
|
ovnicraft/openerp-restaurant | refs/heads/master | website_mail/__openerp__.py | 379 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... |
carthagecollege/django-djtinue | refs/heads/master | djtinue/admissions/urls.py | 1 | from django.conf.urls import include, url
from django.views.generic import TemplateView
from djtinue.admissions import views
urlpatterns = [
# information request
url(
r'^information-request/$', views.info_request,
name='info_request'
),
url(
r'^information-request/success/$',
... |
sfrenza/test-for-bot | refs/heads/master | venv/Lib/site-packages/click/_termui_impl.py | 136 | """
click._termui_impl
~~~~~~~~~~~~~~~~~~
This module contains implementations for the termui module. To keep the
import time of Click down, some infrequently used functionality is placed
in this module and only imported as needed.
:copyright: (c) 2014 by Armin Ronacher.
:license: BSD, se... |
nelson-liu/scikit-learn | refs/heads/master | examples/neural_networks/plot_mnist_filters.py | 79 | """
=====================================
Visualization of MLP weights on MNIST
=====================================
Sometimes looking at the learned coefficients of a neural network can provide
insight into the learning behavior. For example if weights look unstructured,
maybe some were not used at all, or if very l... |
camilonova/django | refs/heads/master | django/contrib/gis/geos/mutable_list.py | 21 | # Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved.
# Released under the New BSD license.
"""
This module contains a base type which provides list-style mutations
without specific data storage methods.
See also http://static.aryehleib.com/oldsite/MutableLists.html
Author: Aryeh Leib Taurog.
"""
from fun... |
mfigurnov/sact | refs/heads/master | imagenet_eval.py | 1 | # Copyright 2016 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
#
# Unless required by applicable law or a... |
akaariai/django | refs/heads/master | django/utils/checksums.py | 105 | """
Common checksum routines.
"""
__all__ = ['luhn']
import warnings
from django.utils import six
from django.utils.deprecation import RemovedInDjango20Warning
warnings.warn(
"django.utils.checksums will be removed in Django 2.0. The "
"luhn() function is now included in django-localflavor 1.1+.",
Remov... |
umitproject/tease-o-matic | refs/heads/master | django/core/management/commands/sqlreset.py | 313 | from optparse import make_option
from django.core.management.base import AppCommand
from django.core.management.sql import sql_reset
from django.db import connections, DEFAULT_DB_ALIAS
class Command(AppCommand):
help = "Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s)."
option_... |
ychen820/microblog | refs/heads/master | y/google-cloud-sdk/platform/google_appengine/lib/django-1.3/django/core/management/commands/sqlreset.py | 313 | from optparse import make_option
from django.core.management.base import AppCommand
from django.core.management.sql import sql_reset
from django.db import connections, DEFAULT_DB_ALIAS
class Command(AppCommand):
help = "Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s)."
option_... |
ojengwa/odoo | refs/heads/8.0 | addons/account/tests/test_reconciliation.py | 179 | from openerp.tests.common import TransactionCase
import time
class TestReconciliation(TransactionCase):
"""Tests for reconciliation (account.tax)
Test used to check that when doing a sale or purchase invoice in a different currency,
the result will be balanced.
"""
def setUp(self):
super(... |
ShassAro/ShassAro | refs/heads/master | Bl_project/blVirtualEnv/lib/python2.7/re.py | 4 | /usr/lib/python2.7/re.py |
safawo/antlr4 | refs/heads/master | runtime/Python2/src/antlr4/atn/ATNConfig.py | 5 | #
# [The "BSD license"]
# Copyright (c) 2012 Terence Parr
# Copyright (c) 2012 Sam Harwell
# Copyright (c) 2014 Eric Vergnaud
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redis... |
mattlinares/django-reg | refs/heads/master | registration/backends/default/urls.py | 57 | """
URLconf for registration and activation, using django-registration's
default backend.
If the default behavior of these views is acceptable to you, simply
use a line like this in your root URLconf to set up the default URLs
for registration::
(r'^accounts/', include('registration.backends.default.urls')),
Thi... |
patriciolobos/desa8 | refs/heads/master | openerp/addons/website_mail/models/mail_message.py | 264 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... |
rmboggs/django | refs/heads/master | django/conf/locale/ro/formats.py | 619 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'H:i'
DATETI... |
apache/bloodhound | refs/heads/trunk | trac/trac/web/tests/wikisyntax.py | 8 | import unittest
from trac.wiki.tests import formatter
TEST_CASES = """
============================== htdocs: links resolver
htdocs:release-1.0.tar.gz
[htdocs:release-1.0.tar.gz Release 1.0]
------------------------------
<p>
<a href="/chrome/site/release-1.0.tar.gz">htdocs:release-1.0.tar.gz</a>
</p>
<p>
<a href="/... |
jalexvig/tensorflow | refs/heads/master | tensorflow/contrib/distributions/python/ops/bijectors/scale_tril.py | 13 | # Copyright 2018 The TensorFlow Authors. 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
#
# Unless required by applica... |
ettm2012/MissionPlanner | refs/heads/master | Lib/struct.py | 69 | from _struct import *
from _struct import _clearcache
from _struct import __doc__
|
reddit-coder/RedditSearchAndDump | refs/heads/master | Main/RedditGenreFinder.py | 2 | #!/usr/bin/python3.2
#Author: reddit_coder
#This software is under GPLv3, this is free to distribute, change and use.
import urllib.request as url
import json
import webbrowser
from time import sleep
browser = input('What browser are you using? (firefox, safari, konqueror, opera, internet explorer, netscape) ').lower... |
FHannes/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/template/loaders/cached.py | 229 | """
Wrapper class that takes a list of template loaders as an argument and attempts
to load templates from them in order, caching the result.
"""
from django.core.exceptions import ImproperlyConfigured
from django.template.base import TemplateDoesNotExist
from django.template.loader import BaseLoader, get_template_fro... |
MrLYC/Python-Which | refs/heads/master | src/which.py | 1 | #!/usr/bin/env python
# encoding: utf-8
from argparse import ArgumentParser
import os
import platform
PLATFORM_NAME = platform.system()
class WhichCommand(object):
def __init__(self, name):
self.name = name
@property
def path_list(self):
path = os.environ.get("PATH", "")
... |
datsfosure/ansible | refs/heads/devel | lib/ansible/inventory/__init__.py | 14 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... |
mycodeday/crm-platform | refs/heads/master | report_webkit/report/webkit_report_demo.py | 438 |
from openerp.addons.report_webkit.webkit_report import webkit_report_extender
from openerp import SUPERUSER_ID
@webkit_report_extender("report_webkit.webkit_demo_report")
def extend_demo(pool, cr, uid, localcontext, context):
admin = pool.get("res.users").browse(cr, uid, SUPERUSER_ID, context)
localcontext.u... |
moorecoin/MooreCoinMiningAlgorithm | refs/heads/master | qa/rpc-tests/mempool_spendcoinbase.py | 1 | #!/usr/bin/env python2
# copyright (c) 2014 the moorecoin core developers
# distributed under the mit software license, see the accompanying
# file copying or http://www.opensource.org/licenses/mit-license.php.
#
# test spending coinbase transactions.
# the coinbase transaction in block n can appear in block
# n+100..... |
AVarfolomeev/picasso-graphic | refs/heads/master | tools/gyp/tools/pretty_sln.py | 806 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Prints the information in a sln file in a diffable way.
It first outputs each projects in alphabetical order with their
dependenci... |
nikhilprathapani/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/tkinter/test/runtktests.py | 67 | """
Use this module to get and run all tk tests.
tkinter tests should live in a package inside the directory where this file
lives, like test_tkinter.
Extensions also should live in packages following the same rule as above.
"""
import os
import sys
import unittest
import importlib
import test.support
this_dir_path ... |
shakamunyi/neutron | refs/heads/master | neutron/plugins/sriovnicagent/pci_lib.py | 15 | # Copyright 2014 Mellanox Technologies, Ltd
#
# 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
#
# Unless required by applicable law or agreed t... |
tempbottle/kbengine | refs/heads/master | kbe/src/lib/python/Lib/test/test_multiprocessing_forkserver.py | 92 | import unittest
import test._test_multiprocessing
test._test_multiprocessing.install_tests_in_module_dict(globals(), 'forkserver')
if __name__ == '__main__':
unittest.main()
|
stencila/hub | refs/heads/master | manager/projects/migrations/0011_auto_20200806_0605.py | 1 | # Generated by Django 3.0.8 on 2020-08-06 06:05
from django.db import migrations, models
import django.db.models.deletion
import projects.models.projects
class Migration(migrations.Migration):
dependencies = [
('projects', '0010_auto_20200804_0354'),
]
operations = [
migrations.AddField... |
j00bar/django-widgy | refs/heads/master | widgy/contrib/form_builder/south_migrations/0008_auto__add_field_emailsuccesshandler_subject.py | 1 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'EmailSuccessHandler.subject'
db.add_column('form_builder_emailsuccesshandler', 'subject',
... |
alvin319/CarnotKE | refs/heads/master | jyhton/bugtests/test340c.py | 13 |
import java.lang.Exception
raise java.lang.Exception
|
NoviceInDisguise/render-to-loop | refs/heads/master | basic-crossfade/loop.py | 1 | import bpy
scn = bpy.context.scene #set convenient variable to current scene
sel = bpy.context.selected_sequences #set convenient variable to selected sequences
if len(sel) == 1: #if only one (1) sequence is selected, then execute
track = sel[0] ... |
craighiller/serendipity | refs/heads/master | venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py | 2918 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... |
tgarc/rideagg | refs/heads/master | requests/packages/chardet/eucjpprober.py | 2918 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... |
Denisolt/Tensorflow_Chat_Bot | refs/heads/master | local/lib/python2.7/site-packages/numpy/compat/__init__.py | 264 | """
Compatibility module.
This module contains duplicated code from Python itself or 3rd party
extensions, which may be included for the following reasons:
* compatibility
* we may only need a small subset of the copied library/module
"""
from __future__ import division, absolute_import, print_function
from . i... |
David-Wobrock/django-fake-database-backends | refs/heads/master | tests/test_project/test_project/__init__.py | 12133432 | |
evoskuil/czmq | refs/heads/master | setup.py | 17 | from distutils.core import setup
setup(name='czmq',
description="""The high-level C binding for 0MQ""",
version='0.1',
url='https://github.com/zeromq/czmq',
packages=['czmq'],
package_dir={'': 'bindings/python'},
)
|
PaulKinlan/cli-caniuse | refs/heads/master | site/app/scripts/bower_components/jsrepl-build/extern/python/reloop-closured/lib/python2.7/shutil.py | 76 | """Utility functions for copying and archiving files and directory trees.
XXX The functions here don't copy the resource fork or other metadata on Mac.
"""
import os
import sys
import stat
from os.path import abspath
import fnmatch
import collections
import errno
try:
from pwd import getpwnam
except ImportError... |
getzze/magnum.fe | refs/heads/master | site-packages/magnumfe/integrators/integrator.py | 2 | # Copyright (C) 2011-2015 Claas Abert
#
# This file is part of magnum.fe.
#
# magnum.fe is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ... |
nibaozhu/project_x | refs/heads/master | src/test/p1/18.py | 2 | #!/usr/bin/python
import random, sys, os, math
for i in range(10):
print(str(i) + ": " + str(random.randint(0,10)))
|
xumi1993/seispy | refs/heads/master | seispy/rf.py | 1 | import obspy
from obspy.io.sac import SACTrace
import re
from seispy.io import wsfetch
from os.path import join
from seispy.para import para
import seispy
from seispy.eq import eq
from seispy.setuplog import setuplog
import glob
import numpy as np
from datetime import timedelta
import pandas as pd
from obspy.taup impor... |
cherishlm/ssdb | refs/heads/master | deps/cpy/antlr3/tokens.py | 99 | """ANTLR3 runtime package"""
# begin[licence]
#
# [The "BSD licence"]
# Copyright (c) 2005-2008 Terence Parr
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code ... |
bzhpwr/MediExports | refs/heads/master | project_env/lib/python2.6/site-packages/flask/exthook.py | 783 | # -*- coding: utf-8 -*-
"""
flask.exthook
~~~~~~~~~~~~~
Redirect imports for extensions. This module basically makes it possible
for us to transition from flaskext.foo to flask_foo without having to
force all extensions to upgrade at the same time.
When a user does ``from flask.ext.foo import... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.