repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
flp9001/eveggie
refs/heads/master
eveggie/orders/apps.py
2
from django.apps import AppConfig class OrdersConfig(AppConfig): name = 'orders' verbose_name = "Orders"
robhudson/kuma
refs/heads/master
vendor/packages/git/utils.py
32
# utils.py # Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os def dashify(string): return string.replace('_', '-') def touch(filename): fp = open...
neversun/sailfish-hackernews
refs/heads/master
pyPackages/requests-noarch/requests/packages/chardet/compat.py
2942
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Ian Cordasco - port to Python # # This library 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 # versio...
rubencabrera/odoo
refs/heads/8.0
addons/web_tests/tests/test_ui.py
175
# -*- coding: utf-8 -*- import os import openerp.tests class TestUi(openerp.tests.HttpCase): def test_03_js_public(self): self.phantom_js('/',"console.log('ok')","console") def test_04_js_admin(self): self.phantom_js('/web',"console.log('ok')","openerp.client.action_manager.inner_widget", logi...
rafaelhenrique/flask-tornado-dispatcher
refs/heads/master
project_flask/__init__.py
1
from flask import Flask from project_flask import config from project_flask.first_app import first_app from os import environ def create_app(config=config.dev_config): mode = environ.get('MODE', 'dev') app = Flask("project_flask") app.config.from_object( 'project_flask.config.{0}_config'.format(...
cyberplant/scrapy
refs/heads/master
scrapy/contrib/debug.py
144
import warnings from scrapy.exceptions import ScrapyDeprecationWarning warnings.warn("Module `scrapy.contrib.debug` is deprecated, " "use `scrapy.extensions.debug` instead", ScrapyDeprecationWarning, stacklevel=2) from scrapy.extensions.debug import *
kvar/ansible
refs/heads/seas_master_2.9.5
lib/ansible/modules/cloud/azure/azure_rm_acs.py
27
#!/usr/bin/python # -*- coding: utf-8 -* # Copyright: (c) 2017, Julien Stroheker <juliens@microsoft.com> # 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__ = type ANSIBLE_METADATA = {'metadata_ve...
spinellic/Mission-Planner
refs/heads/master
Lib/site-packages/scipy/misc/__init__.py
55
from info import __doc__ __all__ = ['who', 'source', 'info'] from common import * from numpy import who, source, info as _info import sys def info(object=None,maxwidth=76,output=sys.stdout,toplevel='scipy'): return _info(object, maxwidth, output, toplevel) info.__doc__ = _info.__doc__ del sys try: from pilu...
MackZxh/OCA-Choice
refs/heads/8.0
hr/hr_expense_sequence/__openerp__.py
13
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Odoo Source Management Solution # Copyright (c) 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) # Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> # # This pro...
jwren/intellij-community
refs/heads/master
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_0/_pkg0_1_0_0/_pkg0_1_0_0_0/__init__.py
30
from ._mod0_1_0_0_0_0 import * from ._mod0_1_0_0_0_1 import * from ._mod0_1_0_0_0_2 import * from ._mod0_1_0_0_0_3 import * from ._mod0_1_0_0_0_4 import *
aristanetworks/arista-ovs-nova
refs/heads/master
nova/scheduler/filters/all_hosts_filter.py
11
# Copyright (c) 2011-2012 OpenStack, LLC. # 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 ...
colin2k/VVS
refs/heads/master
lib/werkzeug/contrib/sessions.py
315
# -*- coding: utf-8 -*- r""" werkzeug.contrib.sessions ~~~~~~~~~~~~~~~~~~~~~~~~~ This module contains some helper classes that help one to add session support to a python WSGI application. For full client-side session storage see :mod:`~werkzeug.contrib.securecookie` which implements a secure,...
portnov/sverchok
refs/heads/master
nodes/list_struct/index_to_mask.py
3
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 (at your option) any later version. # # This program is distrib...
barbarubra/Don-t-know-What-i-m-doing.
refs/heads/master
python/src/Lib/encodings/euc_jisx0213.py
816
# # euc_jisx0213.py: Python Unicode Codec for EUC_JISX0213 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('euc_jisx0213') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(m...
tlk-emb/SWORDS
refs/heads/master
python/generatehlstcl.py
1
# -*- coding: utf-8 -*- import sys import argparse from jinja2 import Template,Environment,FileSystemLoader from analyzer.jsonparam import TasksConfig args = sys.argv def main(): parser = argparse.ArgumentParser() parser.add_argument("cfile_name") parser.add_argument("json_file_name") parser.add_a...
flakey-bit/plugin.audio.spotify
refs/heads/master
resources/libs/cherrypy/lib/static.py
19
import os import re import stat import mimetypes try: from io import UnsupportedOperation except ImportError: UnsupportedOperation = object() import cherrypy from cherrypy._cpcompat import ntob, unquote from cherrypy.lib import cptools, httputil, file_generator_limited mimetypes.init() mimetypes.types_map['...
jmchilton/pulsar
refs/heads/master
pulsar/managers/base/directory.py
1
import logging import os import stat from pulsar.managers.base import BaseManager from pulsar.managers import PULSAR_UNKNOWN_RETURN_CODE from ..util.job_script import job_script from ..util.env import env_to_statement log = logging.getLogger(__name__) # TODO: Rename these to abstract out the fact they are files - pu...
Jgarcia-IAS/ReporsitorioVacioOdoo
refs/heads/master
openerp/addons/website_event_sale/controllers/main.py
233
# -*- 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 ...
drewx2/android_kernel_htc_dlx
refs/heads/cm10
tools/perf/scripts/python/sctop.py
11180
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
Alberto-Beralix/Beralix
refs/heads/master
i386-squashfs-root/usr/lib/python2.7/dist-packages/launchpadlib/credentials.py
2
../../../../share/pyshared/launchpadlib/credentials.py
priyankadeswal/network-address-translator
refs/heads/master
waf-tools/cflags.py
16
from waflib import Logs, Options, Utils class CompilerTraits(object): def get_warnings_flags(self, level): """get_warnings_flags(level) -> list of cflags""" raise NotImplementedError def get_optimization_flags(self, level): """get_optimization_flags(level) -> list of cflags""" raise NotImplementedError d...
bsipocz/astropy
refs/heads/hacking
docs/conftest.py
4
# Licensed under a 3-clause BSD style license - see LICENSE.rst # This file needs to be included here to make sure commands such # as ``python setup.py test ... -t docs/...`` works, since this # will ignore the conftest.py file at the root of the repository # and the one in astropy/conftest.py import os import tempfi...
mmardini/django
refs/heads/master
django/test/client.py
7
from __future__ import unicode_literals import sys import os import re import mimetypes from copy import copy from importlib import import_module from io import BytesIO from django.apps import apps from django.conf import settings from django.core import urlresolvers from django.core.handlers.base import BaseHandler ...
Carrefour/linux-replication
refs/heads/replication-v3.6
scripts/tracing/draw_functrace.py
14679
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
lanfker/tdma_imac
refs/heads/master
src/config-store/bindings/callbacks_list.py
837
callback_classes = [ ]
trondhindenes/ansible
refs/heads/devel
lib/ansible/plugins/inventory/ini.py
37
# 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__ = type DOCUMENTATION = ''' inventory: ini version_added: "2.4" short_description: Uses an Ansibl...
UOSHUB/BackEnd
refs/heads/master
API/views/courses.py
1
from django.http.response import HttpResponse from rest_framework.response import Response from rest_framework.views import APIView from Requests import blackboard, myudc from .common import login_required from .api_root import APIRoot from threading import Thread from zipfile import ZipFile # Student's courses reque...
pballand/congress
refs/heads/master
thirdparty/antlr3-antlr-3.5/runtime/Python3/tests/t024finally.py
5
import antlr3 import testbase import unittest class t024finally(testbase.ANTLRTest): def setUp(self): self.compileGrammar() def testValid1(self): cStream = antlr3.StringStream('foobar') lexer = self.getLexer(cStream) tStream = antlr3.CommonTokenStream(lexer) p...
locked/4stability
refs/heads/master
adxl345.py
1
# license: BSD, see LICENSE included in this package # # based on awesome lib from Jonathan Williamson (https://github.com/pimoroni/adxl345-python/) # import smbus import time import sys class ADXL345: #SCALE_MULTIPLIER = 0.004 DATA_FORMAT = 0x31 BW_RATE = 0x2C POWER_CTL ...
15Dkatz/pants
refs/heads/master
src/python/pants/engine/parser.py
3
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from abc import abst...
jswope00/griffinx
refs/heads/master
common/test/acceptance/pages/common/logout.py
162
""" Logout Page. """ from bok_choy.page_object import PageObject from . import BASE_URL class LogoutPage(PageObject): """ Logout page to logout current logged in user. """ url = BASE_URL + "/logout" def is_browser_on_page(self): return self.q(css='.cta-login').present
ishirav/draw-and-learn
refs/heads/master
lessons/1/part-3.rectangles.py
1
from draw import * w = Window(title=__file__) w.rect(50, 50, 100, 200) w.rect(150, 150, 300, 250, color='orange', thickness=5) w.rect(300, 300, 400, 550, color='blue', fill='cyan', thickness=3) w.wait()
greut/invenio-kwalitee
refs/heads/master
tests/utils.py
3
# -*- coding: utf-8 -*- # # This file is part of kwalitee # Copyright (C) 2014 CERN. # # kwalitee 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 late...
t0in4/django
refs/heads/master
django/conf/locale/uk/formats.py
565
# -*- 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 E Y р.' TIME_FORMAT = 'H:i' DA...
buchbend/astrolyze
refs/heads/master
astrolyze/sed/plotSEDs.py
2
import matplotlib.pyplot as plt import astrolyze.functions.astro_functions as astFunc import astrolyze.functions.constants as const import numpy as np from copy import deepcopy as copy def plot_sed(p2, nu_or_lambda='nu', color='black', kappa='easy', linewidth=0.5, xRange='normal'): ''' Plot a mult...
wkentaro/chainer
refs/heads/master
chainer/__init__.py
3
from __future__ import absolute_import import collections import os import threading import warnings as builtin_warnings import numpy from chainer import _version from chainer import backends # NOQA from chainer import dataset # NOQA from chainer import datasets # NOQA from chainer import distributions # NOQA fro...
maxkoryukov/headphones
refs/heads/master
lib/html5lib/filters/optionaltags.py
1727
from __future__ import absolute_import, division, unicode_literals from . import _base class Filter(_base.Filter): def slider(self): previous1 = previous2 = None for token in self.source: if previous1 is not None: yield previous2, previous1, token previous2...
h2educ/scikit-learn
refs/heads/master
sklearn/externals/joblib/memory.py
194
""" A context object for caching a function's return value each time it is called with the same input arguments. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. from __future__ import with_statement import os import shutil ...
Alwnikrotikz/micolog
refs/heads/master
plugins/sys_plugin/sys_plugin.py
10
# -*- coding: utf-8 -*- from micolog_plugin import * import logging,re from google.appengine.api import mail from model import * from google.appengine.api import users from base import BaseRequestHandler,urldecode from google.appengine.ext.webapp import template SBODY='''New comment on your post "%(title)s" ...
xin3liang/platform_external_chromium_org_third_party_libyuv
refs/heads/master
tools/valgrind-libyuv/libyuv_tests.py
21
#!/usr/bin/env python # Copyright (c) 2012 The LibYuv Project Authors. All rights reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All c...
alanthai/django-guardian
refs/heads/master
guardian/exceptions.py
87
""" Exceptions used by django-guardian. All internal and guardian-specific errors should extend GuardianError class. """ from __future__ import unicode_literals class GuardianError(Exception): pass class NotUserNorGroup(GuardianError): pass class ObjectNotPersisted(GuardianError): pass class WrongAppEr...
mwx1993/TACTIC
refs/heads/master
src/tactic/ui/cgapp/app_init_wdg.py
6
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
miteshvp/fabric8-analytics-worker
refs/heads/master
f8a_worker/storages/postgres_base.py
2
#!/usr/bin/env python3 """Base class for PostgreSQL related adapters.""" import os from selinon import DataStorage from sqlalchemy import create_engine from sqlalchemy.exc import IntegrityError, SQLAlchemyError from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from sqlal...
kingvuplus/italysat-enigma5
refs/heads/master
lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py
28
from skin import parseColor, parseFont, parseSize from Components.config import config, ConfigClock, ConfigInteger, ConfigSubsection, ConfigYesNo, ConfigSelection, ConfigSelectionNumber from Components.Pixmap import Pixmap from Components.Button import Button from Components.ActionMap import HelpableActionMap from Comp...
youdonghai/intellij-community
refs/heads/master
python/testData/inspections/PyArgumentListInspection/CsvRegisterDialect/csv.py
42
from _csv import register_dialect __all__ = ["register_dialect"]
Buckmarble/Lunar_kernel_sense_m7
refs/heads/master
scripts/tracing/draw_functrace.py
14679
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
reneenoble/datacats
refs/heads/master
datacats/tests/test_validate.py
10
# Copyright 2014-2015 Boxkite Inc. # This file is part of the DataCats package and is released under # the terms of the GNU Affero General Public License version 3.0. # See LICENSE.txt or http://www.fsf.org/licensing/licenses/agpl-3.0.html from unittest import TestCase from datacats.validate import valid_name, valid...
Endika/event
refs/heads/8.0
event_registration_mass_mailing/tests/test_event_registration_mail_list_wizard.py
3
# -*- coding: utf-8 -*- # License AGPL-3: Antiun Ingenieria S.L. - Javier Iniesta # See README.rst file on addon root folder for more details from openerp.tests.common import TransactionCase class TestEventRegistrationMailListWizard(TransactionCase): def setUp(self): super(TestEventRegistrationMailListW...
alvin319/CarnotKE
refs/heads/master
jyhton/lib-python/2.7/plat-sunos5/STROPTS.py
66
# Generated by h2py from /usr/include/sys/stropts.h # Included from sys/feature_tests.h # Included from sys/isa_defs.h _CHAR_ALIGNMENT = 1 _SHORT_ALIGNMENT = 2 _INT_ALIGNMENT = 4 _LONG_ALIGNMENT = 8 _LONG_LONG_ALIGNMENT = 8 _DOUBLE_ALIGNMENT = 8 _LONG_DOUBLE_ALIGNMENT = 16 _POINTER_ALIGNMENT = 8 _MAX_ALIGNMENT = 16 _...
miguelpalacio/python-for-android
refs/heads/master
python-modules/twisted/twisted/runner/topfiles/setup.py
54
# Copyright (c) 2008 Twisted Matrix Laboratories. # See LICENSE for details. try: from twisted.python.dist import setup, ConditionalExtension as Extension except ImportError: raise SystemExit("twisted.python.dist module not found. Make sure you " "have installed the Twisted core package b...
priyatransbit/linux
refs/heads/master
scripts/tracing/draw_functrace.py
14679
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
sakisbl/OpenSesameOnline
refs/heads/master
webapp/os_online/translator/os_modules/multiline.py
1
# -*- coding: ascii -*- """ #============================================================================== #title :multiline.py #description :This class represents an OpenSesame Variable statement #author :OpenSesame group of GipHouse 2014, Radboud University #programmers :Ben Bruecker, Laur...
bgris/ODL_bgris
refs/heads/master
lib/python3.5/site-packages/astroid/builder.py
8
# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid 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 #...
derekchiang/keystone
refs/heads/master
keystone/openstack/common/context.py
24
# Copyright 2011 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 req...
jlyoung/stackoverflow_answers
refs/heads/master
transposesparsematrix/transposesparsematrix.py
1
data='''10 1 x_time 10 2 x_time 9 3 x_time 2 15 x_time 7 16 x_time 10 18 x_time 3 25 x_time 5 31 x_time 2 35 x_time 4 1 t_msg 3 5 t_msg 5 9 t_msg 8 10 t_msg 4 90 t_msg 8 4 g_up 3 5 g_up 3 56 g_up''' matrix = {} for line in data.splitlines(): rank, day, parame...
ApuliaSoftware/odoo
refs/heads/8.0
addons/auth_ldap/__init__.py
442
############################################################################## # # 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...
ityaptin/ceilometer
refs/heads/master
ceilometer/tests/unit/dispatcher/test_file.py
1
# # Copyright 2013 IBM Corp # # 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, ...
jkoelker/ryu
refs/heads/master
ryu/lib/ovs/db_client.py
31
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne jp> # # 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 # # h...
claudep/pootle
refs/heads/master
pootle/apps/pootle_statistics/migrations/0001_initial.py
7
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('pootle_translationproject', '0001_initial'), ('pootle_store', '0001_initial'), migrations.sw...
oryxr/dxf2gcode
refs/heads/master
Gui/TreeHandling.py
2
# -*- coding: utf-8 -*- ############################################################################ # # Copyright (C) 2012-2014 # Xavier Izard # Jean-Paul Schouwstra # # This file is part of DXF2GCODE. # # DXF2GCODE is free software: you can redistribute it and/or modify # it under the terms of...
neraliu/tainted-phantomjs
refs/heads/master
src/breakpad/src/tools/gyp/test/home_dot_gyp/gyptest-home-includes.py
151
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verifies inclusion of $HOME/.gyp/includes.gypi works. """ import os import TestGyp test = TestGyp.TestGyp() os.environ['HOME'] = os.p...
kalahbrown/HueBigSQL
refs/heads/master
desktop/core/ext-py/python-dateutil-2.4.2/dateutil/test/test.py
43
# -*- coding: utf-8 -*- from __future__ import unicode_literals import calendar import base64 import sys from six import StringIO, BytesIO, PY3 try: # python2.6 unittest has no skipUnless. So we use unittest2. # if you have python >= 2.7, you don't need unittest2, but it won't harm import unittest2 as un...
trankmichael/scipy
refs/heads/master
scipy/io/harwell_boeing/setup.py
128
#!/usr/bin/env python from __future__ import division, print_function, absolute_import def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('harwell_boeing',parent_package,top_path) config.add_data_dir('tests') return config i...
H0w13/WebGrabber
refs/heads/master
crawler/crawler/workers/eastmoney/fund_fetcher.py
1
import logging import random import time from ...framework.core.response import Response from ...framework.fetcher.sock5fetcher import Sock5Fetcher class FundFetcher(Sock5Fetcher): def __init__(self): Sock5Fetcher.__init__(self) return def doWork(self, request): time.sleep(random.ra...
Maccimo/intellij-community
refs/heads/master
python/testData/resolve/multiFile/pkgResourcesNamespace/root1/pkg/a.py
64
import pkg.second # <ref>
roopali8/tempest
refs/heads/master
tempest/api/compute/admin/test_hosts_negative.py
9
# Copyright 2013 Huawei Technologies Co.,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 applica...
FRidh/scipy
refs/heads/master
scipy/weave/tests/test_numpy_scalar_spec.py
91
from __future__ import absolute_import, print_function import os import sys import tempfile import numpy from numpy.testing import TestCase, assert_, run_module_suite from scipy.weave import inline_tools, ext_tools from scipy.weave.build_tools import msvc_exists, gcc_exists from scipy.weave.catalog import unique_fil...
Pluto-tv/blink-crosswalk
refs/heads/master
Tools/Scripts/webkitpy/thirdparty/coverage/data.py
64
"""Coverage data for Coverage.""" import os from coverage.backward import pickle, sorted # pylint: disable=W0622 from coverage.files import PathAliases class CoverageData(object): """Manages collected coverage data, including file storage. The data file format is a pickled dict, with these keys: ...
jirikuncar/invenio
refs/heads/master
invenio/modules/jsonalchemy/testsuite/functions/sync_meeting_names.py
33
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 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 later...
bitchute-kodi/bitchute-kodi
refs/heads/master
chardet/euctwprober.py
289
######################## 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...
ghadagesandip/zend-doctrine
refs/heads/master
vendor/doctrine/orm/docs/en/_exts/configurationblock.py
2577
#Copyright (c) 2010 Fabien Potencier # #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, distrib...
BancDelTempsDAW/symfony
refs/heads/master
vendor/doctrine/orm/docs/en/_exts/configurationblock.py
2577
#Copyright (c) 2010 Fabien Potencier # #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, distrib...
WladimirSidorenko/DiscourseSenser
refs/heads/master
tests/xgboost/test_xgb_explicit.py
1
#!/usr/bin/env python # -*- coding: utf-8; mode: python; -*- ################################################################## # Imports from __future__ import absolute_import import dsenser from dsenser.xgboost.explicit import XGBoostExplicitSenser from mock import patch from unittest import TestCase ###########...
Perkville/django-autocomplete-light
refs/heads/v2
test_project/linked_data/__init__.py
5
default_app_config = 'linked_data.apps.TestApp'
jeezybrick/django
refs/heads/master
tests/test_client/auth_backends.py
315
from django.contrib.auth.backends import ModelBackend class TestClientBackend(ModelBackend): pass
iulian787/spack
refs/heads/develop
var/spack/repos/builtin/packages/perl-file-which/package.py
5
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PerlFileWhich(PerlPackage): """Perl implementation of the which utility as an API""" ...
ramusus/django-odnoklassniki-discussions
refs/heads/master
odnoklassniki_discussions/models.py
1
# -*- coding: utf-8 -*- import logging import re from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.utils.translation import ugettext as _ from m2m_history.fields impor...
nfcpy/ndeftool
refs/heads/master
src/ndeftool/commands/TeXT.py
1
# -*- coding: utf-8 -*- import click import ndef from ndeftool.cli import command_processor, dmsg @click.command(short_help="Create an NFC Forum Text Record.") @click.argument('text') @click.option('-l', '--language', default='en', help="Set the IANA language code.") @click.option('--encoding', defaul...
tung7970/mbed-os-1
refs/heads/master
tools/host_tests/host_tests_plugins/module_copy_firefox.py
128
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
rdo-management/tuskar
refs/heads/mgt-master
tuskar/manager/role.py
1
# 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 # distributed under the Li...
andela-ifageyinbo/django
refs/heads/master
tests/utils_tests/test_datastructures.py
262
""" Tests for stuff in django.utils.datastructures. """ import copy from django.test import SimpleTestCase from django.utils import six from django.utils.datastructures import ( DictWrapper, ImmutableList, MultiValueDict, MultiValueDictKeyError, OrderedSet, ) class OrderedSetTests(SimpleTestCase): def ...
sgammon/libcloud
refs/heads/trunk
libcloud/loadbalancer/base.py
6
# 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 use ...
Nivl/www.melvin.la
refs/heads/master
nivls_website/commons/happyforms/__init__.py
3
from django import forms from django.forms.fields import FileField from django.core.exceptions import ValidationError class BaseForm: """ We do some automatic stripping of globally bad input. For example, we strip leading/trailing spaces from all data. Since Django-core hasn't done this already: htt...
oracleyue/rubber-for-latex
refs/heads/master
src/converters/compressor.py
1
# This file is part of Rubber and thus covered by the GPL # (c) Nicolas Boulenguez 2015 """ Compressing the output of Rubber. """ from rubber import _, msg import rubber.depend class Node (rubber.depend.Node): def __init__ (self, node_dictionary, constructor, extension, source): super (Node, self).__init...
apark263/tensorflow
refs/heads/master
tensorflow/python/util/lock_util_test.py
54
# 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...
mercycorps/TolaActivity
refs/heads/master
scripts/workflow_migration.py
1
from django.apps import apps from django import db from django.db import connection app_models = apps.get_app_config('workflow').get_models() #rename the app tables from the old activitydb to workflow def run(): print "Migration" for app in app_models: name = str(app._meta.db_table) new_app...
kmill/textadv
refs/heads/master
textadv/gameworld/basickinds.py
1
### Not to be imported ## Should be execfile'd # basickinds.py # These are definitions of the core kinds in the world, where a kind # is something like a class of objects. The definitions of KindOf and # IsA are in basicrelations.py world.add_relation(KindOf("room", "kind")) world.add_relation(KindOf("thing", "kind...
courtarro/gnuradio-wg-grc
refs/heads/master
gr-qtgui/apps/plot_time_raster_base.py
47
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
varshadyavaiah/RED-with-In-and-Out-RIO-queue-discipline
refs/heads/master
examples/energy/examples-to-run.py
196
#! /usr/bin/env python ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- # A list of C++ examples to run in order to ensure that they remain # buildable and runnable over time. Each tuple in the list contains # # (example_name, do_run, do_valgrind_run). # # See test.py for more i...
PokemonGoF/PokemonGo-Bot-Desktop
refs/heads/development
build/pywin/Lib/test/crashers/buffer_mutate.py
66
# # The various methods of bufferobject.c (here buffer_subscript()) call # get_buf() before calling potentially more Python code (here via # PySlice_GetIndicesEx()). But get_buf() already returned a void* # pointer. This void* pointer can become invalid if the object # underlying the buffer is mutated (here a bytearr...
haobtc/bitcoin
refs/heads/master
qa/rpc-tests/keypool.py
86
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the wallet keypool, and interaction with wallet encryption/locking from test_framework.test_f...
timothydmorton/bokeh
refs/heads/master
examples/plotting/file/grid.py
48
import numpy as np from bokeh.plotting import figure, gridplot, output_file, show N = 50 x = np.linspace(0, 4*np.pi, N) y = np.sin(x) output_file("grid.html", title="grid.py example") TOOLS = "pan,wheel_zoom,box_zoom,reset,save,crosshair" l = figure(title="line", tools=TOOLS, plot_width=300, plot_height=300) l.li...
alfasin/st2
refs/heads/master
st2common/tests/unit/test_isotime_utils.py
11
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
fimbox/CasualRelighting
refs/heads/master
relighting_projects/fruit_table_projected/solve_shaded_input.py
1
import os ROOT_FOLDER = '../relighting_projects/fruit_table_projected' INPUT_FOLDER = ROOT_FOLDER OUTPUT_FOLDER = ROOT_FOLDER + '/py_results' SCREENSHOT_VIEW = "-0,260829061 0,2491733 0,976253152" cam = Item("Camera") cam.Fov = 40 def screenshotMesh(mesh_name, path): RaytracerTool.actionSelectMesh(mesh_name, "hi...
katzoo/amu
refs/heads/master
isi/cluster/Task703.py
1
# -*- coding: utf-8 -*- """ Task 703 """ def average_vectors(first_idx, second_idx, clusters): """ rozw """ return [(a+b)/2 for a, b in \ zip(clusters[first_idx].vec, clusters[second_idx].vec)]
jasonkying/pip
refs/heads/develop
tests/unit/test_req_uninstall.py
28
import os import pytest from mock import Mock import pip.req.req_uninstall from pip.req.req_uninstall import UninstallPathSet # Pretend all files are local, so UninstallPathSet accepts files in the tmpdir, # outside the virtualenv def mock_is_local(path): return True class TestUninstallPathSet(object): de...
mikebrevard/UnixAdministration
refs/heads/master
vagrant/etc/data/genData/venv/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/compat.py
2942
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Ian Cordasco - port to Python # # This library 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 # versio...
gfacciol/pvflip
refs/heads/master
glfw/glfw.py
1
""" Python bindings for GLFW. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals __author__ = 'Florian Rhiem (florian.rhiem@gmail.com)' __copyright__ = 'Copyright (c) 2013-2016 Florian Rhiem' __license__ = 'MIT' __version__ = '1.3.1' # By default (ERROR_...
tedder/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_cdnprofile_facts.py
9
#!/usr/bin/python # # Copyright (c) 2018 Hai Cao, <t-haicao@microsoft.com>, Yunge Zhu <yungez@microsoft.com> # # 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__ = type ANSIBLE_METADATA = {'metada...
ther12k/android-client
refs/heads/master
phone/jni/webrtc/sources/build/merge_libs.py
22
#!/usr/bin/env python # Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All ...