repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
arborh/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/linalg/linear_operator_composition_test.py
6
# Copyright 2016 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...
rajpushkar83/base
refs/heads/master
fabric/pypi.py
3
from fabric.api import task, local import build __all__ = ['upload', 'register'] @task def upload(): """upload the dist to pypi""" build.sdist() local("python shell_plugins.py.in sdist upload") @task def register(): """register with pypi. Needs only to be done once.""" local("python shell_plugi...
jlzeller/django-ajax-filtered-fields
refs/heads/master
ajax_filtered_fields/urls.py
1
from django.conf.urls import patterns, url, include from ajax_filtered_fields import settings from ajax_filtered_fields.views import json_index if settings.AUTH_DECORATOR: json_index = settings.AUTH_DECORATOR(json_index) urlpatterns = patterns('', (r'^json_index/$', json_index), )
wesm/statsmodels
refs/heads/master
scikits/statsmodels/datasets/longley/data.py
1
"""Longley dataset""" __docformat__ = 'restructuredtext' COPYRIGHT = """This is public domain.""" TITLE = __doc__ SOURCE = """ The classic 1967 Longley Data http://www.itl.nist.gov/div898/strd/lls/data/Longley.shtml :: Longley, J.W. (1967) "An Appraisal of Least Squares Programs for the El...
ghber/My-Django-Nonrel
refs/heads/master
django/contrib/sites/__init__.py
12133432
jvanz/core
refs/heads/master
wizards/com/sun/star/wizards/web/__init__.py
12133432
precompiler/python-101
refs/heads/master
mastering-python/ch05/__init__.py
12133432
galtys/odoo
refs/heads/8.0
addons/crm_mass_mailing/__openerp__.py
333
{ 'name': 'Campaign in Mass Mailing', 'version': '1.0', 'summary': 'This module allow to specify a campaign, a source and a channel for a mass mailing campaign.', 'author': 'OpenERP SA', 'description': """ Mass Mailing with Crm Marketing ================================ Link module mass mailing wit...
TeamEOS/external_chromium_org_third_party_WebKit
refs/heads/lp5.1
Tools/Scripts/webkitpy/common/system/workspace_mock.py
191
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
soulfx/gmusic-playlist
refs/heads/master
test/test-common.py
4
from atestframe import * from common import * class TestCommon(unittest.TestCase): def test_get_csv_fields(self): """ test that quoted and unquoted fields are being recognized """ fields = get_csv_fields(u'something,"good",to "eat","like a ""hot""",dog',u',') self.assertEqual(fields[0],u's...
fredmorcos/attic
refs/heads/master
projects/grafeo/attic/grafeo_20100227_python/grafeo/ui/gtk/MainWindow.py
1
import gtk from grafeo.config import Paths class MainWindow(gtk.Window): def __init__(self): gtk.Window.__init__(self) self.set_title('Grafeo') self.set_size_request(600, 400) self.set_default_size(600, 400) self.set_icon_from_file(Paths.get_img_filename('grafeo.svg')) ...
KSG-IT/ksg-nett
refs/heads/develop
common/templatetags/__init__.py
12133432
seijim/cloud-robotics-azure-platform-v1-sdk
refs/heads/master
SampleCode_Client/Python/MqttApi_D2D/paho/mqtt/__init__.py
10
__version__ = "1.2" class MQTTException(Exception): def __init__(self, *args, **kwargs): Exception.__init__(self, *args, **kwargs)
tomsilver/nupic
refs/heads/master
tests/unit/nupic/support/configuration_test.py
7
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
jusdng/odoo
refs/heads/8.0
addons/account_anglo_saxon/product.py
384
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publ...
pombreda/syzygy
refs/heads/master
third_party/numpy/files/numpy/setupscons.py
42
#!/usr/bin/env python from os.path import join as pjoin def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.misc_util import scons_generate_config_py pkgname = 'numpy' config = Configuration(pkgname, parent_package, top_path, ...
sander76/home-assistant
refs/heads/dev
homeassistant/helpers/httpx_client.py
5
"""Helper for httpx.""" from __future__ import annotations import sys from typing import Any, Callable import httpx from homeassistant.const import EVENT_HOMEASSISTANT_CLOSE, __version__ from homeassistant.core import Event, HomeAssistant, callback from homeassistant.helpers.frame import warn_use from homeassistant....
Snifer/BurpSuite-Plugins
refs/heads/master
Sqlmap/plugins/dbms/hsqldb/takeover.py
7
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.exception import SqlmapUnsupportedFeatureException from plugins.generic.takeover import Takeover as GenericTakeover class Takeover(GenericTakeover): def __i...
moijes12/oh-mainline
refs/heads/master
mysite/search/tests.py
8
# This file is part of OpenHatch. # Copyright (C) 2010 Parker Phinney # Copyright (C) 2010 Jack Grigg # Copyright (C) 2009, 2010 OpenHatch, Inc. # Copyright (C) 2010 Jessica McKellar # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as...
fxfitz/ansible
refs/heads/devel
lib/ansible/modules/files/copy.py
10
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ ...
syphar/django
refs/heads/master
django/db/backends/oracle/features.py
8
from django.db.backends.base.features import BaseDatabaseFeatures from django.db.utils import InterfaceError class DatabaseFeatures(BaseDatabaseFeatures): empty_fetchmany_value = () interprets_empty_strings_as_nulls = True uses_savepoints = True has_select_for_update = True has_select_for_update_n...
kcah27/HnTool
refs/heads/master
HnTool/modules/vsftpd.py
1
# -*- coding: utf-8 -*- # # HnTool rules - vsftpd # Copyright (C) 2010 Hugo Doria <mail@hugodoria.org> # # 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 2 of the License, or...
sklnet/opendroid-enigma2
refs/heads/master
lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py
19
from Screens.Screen import Screen from Plugins.Plugin import PluginDescriptor from Components.config import getConfigListEntry, config, ConfigBoolean config.misc.firstrun = ConfigBoolean(default = True) def NetworkWizardMain(session, **kwargs): session.open(NetworkWizard) def startSetup(menuid): if menuid != "syst...
blueboxgroup/nova
refs/heads/master
nova/tests/unit/api/openstack/compute/contrib/test_block_device_mapping.py
7
# Copyright 2013 OpenStack Foundation # 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 requ...
datalogics/scons
refs/heads/master
test/runtest/baseline/pass.py
2
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
jonatanSh/challenge-framework
refs/heads/master
challenge_framework/users/urls.py
1
from django.conf.urls import url from .views import SignUp, Api, Login, Logout app_name = 'users' urlpatterns = [ url(r'^signup$', SignUp.as_view(), name="signup"), url(r'^api$', Api.as_view()), url(r'^login$', Login.as_view(), name="login"), url(r'^logout$', Logout.as_view(), name="logout"), ]
luoyetx/mxnet
refs/heads/master
example/autoencoder/data.py
18
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
saurabh6790/med_lib_rels
refs/heads/master
core/doctype/default_home_page/default_home_page.py
578
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes class DocType: def __init__(self, d, dl): self.doc, self.doclist = d, dl
jmhsi/justin_tinker
refs/heads/master
data_science/courses/learning_dl_packages/models/research/syntaxnet/dragnn/python/composite_optimizer.py
12
# Copyright 2017 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...
Soya93/Extract-Refactoring
refs/heads/master
python/testData/inspections/unusedImport/subpackageInInitPy/module_a.py
83
#! /usr/bin/env python from package1 import ClassB b = ClassB()
gotomypc/scikit-learn
refs/heads/master
sklearn/utils/graph.py
289
""" Graph utilities and algorithms Graphs are represented with their adjacency matrices, preferably using sparse matrices. """ # Authors: Aric Hagberg <hagberg@lanl.gov> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Jake Vanderplas <vanderplas@astro.washington.edu> # License: BSD 3 clause impo...
zhoulingjun/jieba
refs/heads/master
test/test.py
62
#encoding=utf-8 import sys sys.path.append("../") import jieba def cuttest(test_sent): result = jieba.cut(test_sent) print(" / ".join(result)) if __name__ == "__main__": cuttest("这是一个伸手不见五指的黑夜。我叫孙悟空,我爱北京,我爱Python和C++。") cuttest("我不喜欢日本和服。") cuttest("雷猴回归人间。") cuttest("工信处女干事每月经过下属科室都要亲口交代24口...
twidi/satchmo
refs/heads/master
satchmo/apps/satchmo_ext/product_feeds/urls.py
6
""" Urls for product feeds, note that this does not have to get added manually to the urls, it will be added automatically by satchmo core if this app is installed. """ from django.conf.urls.defaults import * import logging log = logging.getLogger('product_feeds.urls') urlpatterns = patterns('satchmo_ext.product_feeds...
anistark/mozillians
refs/heads/master
mozillians/api/tests/test_models.py
5
from django.test import TestCase from nose.tools import ok_ from mozillians.users.tests import UserFactory from mozillians.api.models import APIApp class APIAppTests(TestCase): def test_save_generates_key(self): owner = UserFactory.create() api_app = APIApp.objects.create(owner=owner, name='Test...
wojons/rethinkdb
refs/heads/next
test/rql_test/connections/http_support/flask/testsuite/test_apps/flask_broken/__init__.py
629
import flask.ext.broken.b import missing_module
geekboxzone/lollipop_external_chromium_org
refs/heads/geekbox
tools/python/google/platform_utils_linux.py
193
# Copyright (c) 2011 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. """Platform-specific utility methods shared by several scripts.""" import os import subprocess import google.path_utils class PlatformUtility(object)...
siosio/intellij-community
refs/heads/master
python/testData/completion/rbStringPath/a.py
12
def f(storage_path): pass f(rb"./foo<caret>")
TalkingCactus/tgstation
refs/heads/master
tools/midi2piano/pyperclip/__init__.py
110
""" Pyperclip A cross-platform clipboard module for Python. (only handles plain text for now) By Al Sweigart al@inventwithpython.com BSD License Usage: import pyperclip pyperclip.copy('The text to be copied to the clipboard.') spam = pyperclip.paste() if not pyperclip.copy: print("Copy functionality unav...
jamesrobertlloyd/gpss-research
refs/heads/master
source/cblparallel/counter.py
13
""" Copyright (c) 2011,2012 George Dahl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
DakRomo/2017Challenges
refs/heads/master
challenge_1/python/DTCitron/src/main.py
3
import sys if __name__ == "__main__": # Read in all inputs input = sys.argv[1:] # Join list of inputs into a string input_string = " ".join(input) # Reverse now reverse_string = input_string[::-1] # Print print reverse_string
a-parhom/edx-platform
refs/heads/master
common/djangoapps/xblock_django/migrations/0002_auto_20160204_0809.py
60
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('xblock_django', '0001_initial'), ] operations = [ migrations.AddField( model_name='xblockdisableconfig', ...
pluckljn/paimei
refs/heads/master
console/modules/PAIMEIexplorer.py
6
# # PaiMei # Copyright (C) 2006 Pedram Amini <pedram.amini@gmail.com> # # $Id: PAIMEIexplorer.py 194 2007-04-05 15:31:53Z cameron $ # # 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 ...
operasoftware/presto-testo
refs/heads/master
wpt/websockets/websock_handlers/echo_wsh.py
8
#!/usr/bin/python from mod_pywebsocket import msgutil _GOODBYE_MESSAGE = u'Goodbye' def web_socket_do_extra_handshake(request): # This example handler accepts any request. See origin_check_wsh.py for how # to reject access from untrusted scripts based on origin value. pass # Always accept. def web_soc...
alheinecke/tensorflow-xsmm
refs/heads/master
tensorflow/tensorboard/scripts/generate_testdata.py
39
# Copyright 2015 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...
PhilipGarnero/django-pyscss
refs/heads/master
tests/utils.py
2
import shutil from django.test import TestCase from django.core.management import call_command from django.conf import settings class CollectStaticTestCase(TestCase): @classmethod def setUpClass(cls): super(CollectStaticTestCase, cls).setUpClass() call_command('collectstatic', interactive=Fal...
vitorio/bite-project
refs/heads/master
deps/gdata-python-client/src/gdata/Crypto/test.py
225
# # Test script for the Python Cryptography Toolkit. # __revision__ = "$Id: test.py,v 1.7 2002/07/11 14:31:19 akuchling Exp $" import os, sys # Add the build directory to the front of sys.path from distutils.util import get_platform s = "build/lib.%s-%.3s" % (get_platform(), sys.version) s = os.path.join(os.getcwd(...
PrefPy/opra
refs/heads/master
compsocsite/polls/migrations/0122_question_single_enabled.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-07-11 19:30 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('polls', '0121_remove_question_single_enabled'), ] operations = [ migrations...
ysavchuk/ansible
refs/heads/devel
lib/ansible/plugins/action/script.py
67
# (c) 2012, 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) any lat...
storm-computers/odoo
refs/heads/9.0
addons/mrp/report/bom_structure.py
15
## -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.osv import osv from openerp.report import report_sxw class bom_structure(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(bom_structure, self).__init__(cr, uid, name, c...
vitaly4uk/django
refs/heads/master
django/contrib/sites/shortcuts.py
615
from __future__ import unicode_literals from django.apps import apps def get_current_site(request): """ Checks if contrib.sites is installed and returns either the current ``Site`` object or a ``RequestSite`` object based on the request. """ # Imports are inside the function because its point is ...
azukov/py-orbit
refs/heads/master
py/orbit/teapot/teapot_matrix_lattice.py
2
""" The TEAPOT MATRIX_Lattice is a subclass of a MAXTRIX_Lattice class. The Matrix lattice is generated by using the TEAPOT lattice. The matrices are the linear part of the TEAPOT elements tracking. The number of transport matrices in the lattice is equal to the sum of all parts of TEAPOT elements. The RF cavities in ...
Zhongqilong/mykbengineer
refs/heads/master
kbe/res/scripts/common/Lib/test/test_plistlib.py
78
# Copyright (C) 2003-2013 Python Software Foundation import unittest import plistlib import os import datetime import codecs import binascii import collections import struct from test import support from io import BytesIO ALL_FORMATS=(plistlib.FMT_XML, plistlib.FMT_BINARY) # The testdata is generated using Mac/Tools...
bbuubbi/Django-OCR
refs/heads/master
OCRSite/OCR/tests.py
24123
from django.test import TestCase # Create your tests here.
android-ia/platform_external_chromium_org
refs/heads/master
tools/perf/metrics/speedindex.py
28
# Copyright 2013 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 collections from metrics import Metric from telemetry.core import bitmap from telemetry.value import scalar class SpeedIndexMetric(Metric): """Th...
mapr/hue
refs/heads/hue-3.9.0-mapr
desktop/core/ext-py/python-ldap-2.3.13/Lib/dsml.py
44
""" dsml - generate and parse DSMLv1 data (see http://www.oasis-open.org/committees/dsml/) See http://www.python-ldap.org/ for details. $Id: dsml.py,v 1.16 2010/05/07 08:15:47 stroeder Exp $ Python compability note: Tested with Python 2.0+. """ __version__ = '2.3.12' import string,base64 def list_dict(l): """ ...
litnimax/addons-yelizariev
refs/heads/8.0
mass_mailing_extra/__init__.py
2148
import models
2ndquadrant-it/barman
refs/heads/master
barman/server.py
1
# Copyright (C) 2011-2020 2ndQuadrant Limited # # This file is part of Barman. # # Barman 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) any later versio...
jjdmol/LOFAR
refs/heads/master
CEP/Pipeline/recipes/sip/master/selfcal_awimager.py
1
# LOFAR IMAGING PIPELINE # # Example recipe with simple job distribution # Wouter Klijn, 2010 # swinbank@transientskp.o...
fudong1127/python-bitcoin
refs/heads/master
testscript.py
4
#!/usr/bin/python # # testscript.py # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import sys import time import Log import MemPool import ChainDb import cStringIO from bitcoin.coredefs import NETWORKS from bitcoin.core...
m4ns0ur/grumpy
refs/heads/master
third_party/stdlib/sre_constants.py
7
# # Secret Labs' Regular Expression Engine # # various symbols used by the regular expression engine. # run this script to update the _sre include files! # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support modul...
honestbleeps/django-oauth-toolkit
refs/heads/master
oauth2_provider/views/generic.py
10
from django.views.generic import View from oauthlib.oauth2 import Server from ..settings import oauth2_settings from .mixins import ProtectedResourceMixin, ScopedResourceMixin, ReadWriteScopedResourceMixin class ProtectedResourceView(ProtectedResourceMixin, View): """ Generic view protecting resources by pr...
wangmingjob/OnlineJudge
refs/heads/master
contest/migrations/0006_merge.py
6
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contest', '0005_contestsubmission'), ('contest', '0005_contestproblem_score'), ] operations = [ ]
salamer/django
refs/heads/master
tests/test_runner/runner.py
193
from django.test.runner import DiscoverRunner class CustomOptionsTestRunner(DiscoverRunner): def __init__(self, verbosity=1, interactive=True, failfast=True, option_a=None, option_b=None, option_c=None, **kwargs): super(CustomOptionsTestRunner, self).__init__(verbosity=verbosity, interactive=interactive,...
edxnercel/edx-platform
refs/heads/master
common/lib/calc/calc/__init__.py
270
""" Ideally, we wouldn't need to pull in all the calc symbols here, but courses were using 'import calc', so we need this for backwards compatibility """ from calc import *
sarakha63/persomov
refs/heads/master
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/yourupload.py
35
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class YourUploadIE(InfoExtractor): _VALID_URL = r'''(?x)https?://(?:www\.)? (?:yourupload\.com/watch| embed\.yourupload\.com| embed\.yucache\.net )/(?P<id>[A-Za-z0-9]+) ...
zhouyuan/teuthology
refs/heads/master
scripts/test/test_nuke.py
13
from script import Script class TestNuke(Script): script_name = 'teuthology-nuke'
nathanial/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/modeltests/validators/models.py
12133432
primiano/blink-gitcs
refs/heads/master
Tools/Scripts/webkitpy/common/net/networktransaction.py
190
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
antoinecarme/pyaf
refs/heads/master
tests/artificial/transf_RelativeDifference/trend_MovingAverage/cycle_30/ar_12/test_artificial_1024_RelativeDifference_MovingAverage_30_12_100.py
1
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 30, transform = "RelativeDifference", sigma = 0.0, exog_count = 100, ar_order = 12);
heeraj123/oh-mainline
refs/heads/master
vendor/packages/docutils/test/test_parsers/test_rst/test_directives/test_compound.py
18
#! /usr/bin/env python # $Id: test_compound.py 7072 2011-07-06 15:52:30Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Tests for the 'compound' directive from body.py. """ from __init__ import DocutilsTestSupport def suite(): s = Docutils...
Sparker0i/fosswebsite
refs/heads/master
fosswebsite/wsgi.py
8
""" WSGI config for fosswebsite project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_...
CUFCTL/DLBD
refs/heads/master
face-detection-code/object_detection/builders/box_predictor_builder.py
2
# Copyright 2017 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...
R4chel/RecommendationGraph
refs/heads/master
recgraph/crawler/crawler.py
1
''' Created July 28, 2014 @author Adam Campbell, Rachel Ehrlich, Max Fowler ''' import json import re import time from py2neo import neo4j, cypher import pywikibot import mwparserfromhell from recgraph.settings import GRAPHDB def get_pages(infobox_type): site = pywikibot.getSite('en') infobox_template = ...
zainabg/NOX
refs/heads/master
doc/manual/source/conf.py
14
# -*- coding: utf-8 -*- # # NOX documentation build configuration file, created by # sphinx-quickstart on Sun May 18 15:09:51 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable ...
udoprog/metap2p
refs/heads/master
share/metap2p_service/controllers/__init__.py
12133432
pilou-/ansible
refs/heads/devel
test/units/mock/__init__.py
12133432
Affirm/moto
refs/heads/master
moto/ec2/responses/security_groups.py
3
from __future__ import unicode_literals from moto.core.responses import BaseResponse from moto.ec2.utils import filters_from_querystring def try_parse_int(value, default=None): try: return int(value) except (TypeError, ValueError): return default class SecurityGroups(BaseResponse): def...
jimi-c/ansible
refs/heads/devel
test/units/cli/test_vault.py
57
# (c) 2017, Adrian Likins <alikins@redhat.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) any later vers...
netscaler/neutron
refs/heads/master
neutron/tests/unit/midonet/test_midonet_plugin.py
2
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Midokura Japan K.K. # Copyright (C) 2013 Midokura PTE LTD # 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 th...
sergiohgz/incubator-airflow
refs/heads/master
airflow/contrib/hooks/salesforce_hook.py
7
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
jmmauricio/pypstools
refs/heads/master
tests/test_psys_map_sing.py
1
# -*- coding: utf-8 -*- """ Example converting ds txt output to python dict and plotting results Created on Sat Mar 21 12:13:25 2015 @author: jmmauricio """ # add pypstools to the path import sys,os sys.path.insert(0,os.path.abspath(os.path.join(os.getcwd(),'..'))) import pypstools pub = pypstools.publisher geo...
chongtianfeiyu/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/encodings/iso8859_7.py
272
""" Python Character Mapping Codec iso8859_7 generated from 'MAPPINGS/ISO8859/8859-7.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
4Kaylum/SkyBot
refs/heads/deleting-cogs
cogs/dnd_commands.py
1
import re import typing import random import string from urllib.parse import quote from discord.ext import commands import voxelbotutils as utils class DNDCommands(utils.Cog): DICE_REGEX = re.compile(r"^(?P<count>\d+)?[dD](?P<type>\d+) *(?P<modifier>(?P<modifier_parity>[+-]) *(?P<modifier_amount>\d+))?$") A...
cwrowley/dmdtools
refs/heads/master
python/scripts/streaming_dmd_example.py
1
""" An example highlighting the difference between DMD and streaming DMD Streaming DMD is a modification of the "standard" DMD procedure that produces *APPROXIMATIONS* of the DMD modes and eigenvalues. The benefit of this procedure is that it can be applied to data sets with large (in theory, infinite...
metala/avr-gcc-scons-skel
refs/heads/master
site_scons/site_tools/winavr.py
1
""" Tool-specific initialization for WinAVR (AVR-GCC). """ import os import re import subprocess import SCons.Util import SCons.Tool.cc as cc __author__ = "Marin Ivanov" __copyright__ = "Copyright 2012" __credits__ = ["Valori Ivanov"] __license__ = "BSD 2-clause" __version__ = "1.0.0" __maintainer_...
playpauseandstop/aiohttp
refs/heads/master
examples/legacy/crawl.py
12
#!/usr/bin/env python3 import asyncio import logging import re import signal import sys import urllib.parse import aiohttp class Crawler: def __init__(self, rooturl, loop, maxtasks=100): self.rooturl = rooturl self.loop = loop self.todo = set() self.busy = set() self.don...
Kamekameha/crunchy-xml-decoder
refs/heads/master
crunchy-xml-decoder/requests/packages/urllib3/contrib/pyopenssl.py
65
'''SSL with SNI_-support for Python 2. Follow these instructions if you would like to verify SSL certificates in Python 2. Note, the default libraries do *not* do certificate checking; you need to do additional work to validate certificates yourself. This needs the following packages installed: * pyOpenSSL (tested wi...
ciprian-radu/unimap.ns-3noc
refs/heads/master
bindings/python/ns3modulegen_core_customizations.py
9
import re from pybindgen.typehandlers import base as typehandlers from pybindgen import ReturnValue, Parameter from pybindgen.cppmethod import CustomCppMethodWrapper, CustomCppConstructorWrapper from pybindgen.typehandlers.codesink import MemoryCodeSink from pybindgen.typehandlers import ctypeparser from pybindgen imp...
spulec/freezegun
refs/heads/master
tests/test_configure.py
1
from unittest import mock import freezegun import freezegun.config def setup_function(): freezegun.config.reset_config() def teardown_function(): freezegun.config.reset_config() def test_default_ignore_list_is_overridden(): freezegun.configure(default_ignore_list=['threading', 'tensorflow']) with...
cwurld/django-phonegap
refs/heads/master
django_phonegap/data_port/serializers.py
1
__author__ = 'Chuck Martin' from rest_framework import serializers from models import Message class MessageSerializer(serializers.ModelSerializer): class Meta: model = Message exclude = ('user',)
sunbenxin/python-script
refs/heads/master
ask_ok.py
1
#!/usr/bin/python def ask_ok(prompt, retries=4, complaint='Yes or no, please!'): while True: ok = raw_input(prompt) if ok in ('y', 'ye', 'yes'): return True if ok in ('n', 'no', 'nop', 'nope'): return False retries = retries - 1 if retries < 0: raise IOError('refusenik user') print complaint if ...
BrandonY/python-docs-samples
refs/heads/master
speech/cloud-client/transcribe_streaming.py
1
#!/usr/bin/env python # Copyright 2017 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 require...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.2/Lib/test/test_ucn.py
15
""" Test script for the Unicode implementation. Written by Bill Tutt. Modified for Python 2.0 by Fredrik Lundh (fredrik@pythonware.com) (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" from test_support import verify, verbose print 'Testing General Unicode Character Name, and case insensitivity...', # G...
rynkowsg/hamster
refs/heads/master
src/hamster/lib/stuff.py
2
# - coding: utf-8 - # Copyright (C) 2008-2010 Toms Bauģis <toms.baugis at gmail.com> # This file is part of Project Hamster. # Project Hamster 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 ...
pombredanne/pywb
refs/heads/master
pywb/perms/perms_handler.py
1
from pywb.utils.canonicalize import UrlCanonicalizer from pywb.utils.wbexception import NotFoundException from pywb.framework.basehandlers import WbUrlHandler from pywb.framework.archivalrouter import ArchivalRouter, Route from pywb.framework.wbrequestresponse import WbResponse BLOCK = '["block"]' ALLOW = '["allow"]'...
JING-TIME/ustc-course
refs/heads/master
app/__init__.py
1
""" ustc courses :copyright: (c) 2015 by the USTC-Courses Team. """ import os from flask import Flask,request from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager,current_user,user_logged_in,user_loaded_from_cookie from flask_wtf.csrf import CSRFProtect from flask_babel import Babel f...
alex/logbook
refs/heads/master
benchmark/bench_redirect_to_logging.py
30
"""Tests redirects from logging to logbook""" from logging import getLogger, StreamHandler from logbook.compat import LoggingHandler from cStringIO import StringIO log = getLogger('Test logger') def run(): out = StringIO() log.addHandler(StreamHandler(out)) with LoggingHandler(): for x in xrange...
spartonia/django-oscar
refs/heads/master
src/oscar/apps/search/signals.py
28
from django.dispatch import Signal user_search = Signal(providing_args=["session_id", "user", "query"])
norayr/unisubs
refs/heads/staging
apps/auth/migrations/0028_auto__del_field_customuser_partner.py
5
# encoding: 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): # Deleting field 'CustomUser.partner' db.delete_column('auth_customuser', 'partner') def...
flgiordano/netcash
refs/heads/master
+/google-cloud-sdk/lib/surface/compute/operations/list.py
1
# Copyright 2014 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 ag...