repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
hip-odoo/odoo
addons/mrp/tests/test_stock.py
26
5056
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import common from odoo.exceptions import except_orm class TestWarehouse(common.TestMrpCommon): def test_manufacturing_route(self): warehouse_1_stock_manager = self.warehouse_1.sudo(self.user_stock_...
agpl-3.0
nachandr/cfme_tests
cfme/scripting/conf.py
2
3831
#!/usr/bin/env python3 """Script to encrypt config files. Usage: scripts/encrypt_conf.py confname1 confname2 ... confnameN scripts/encrypt_conf.py credentials """ import io import click import yaycl_crypt from cfme.scripting import link_config from cfme.utils import conf @click.group(help='Functions affecti...
gpl-2.0
nikhila05/django-seo
rollyourown/seo/backends.py
7
13498
#!/usr/bin/env python # -*- coding: UTF-8 -*- from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.db import models from django.contrib.sites.models import Site from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic fro...
bsd-3-clause
baibaichen/eagle
eagle-external/eagle-ambari/lib/EAGLE/package/scripts/service_check.py
21
1521
#!/usr/bin/python # 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 # "Licen...
apache-2.0
andrewyoung1991/abjad
abjad/tools/sequencetools/remove_elements.py
2
2888
# -*- encoding: utf-8 -*- def remove_elements( sequence, indices=None, period=None, ): '''Removes `sequence` elements at `indices`. .. container:: example Removes all elements: :: >>> sequencetools.remove_elements(range(15)) [] .. container:: ...
gpl-3.0
jeshoward/RRTPath
vendor/googletest/googletest/scripts/gen_gtest_pred_impl.py
2538
21986
#!/usr/bin/env python # # Copyright 2006, 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...
gpl-3.0
dkodnik/Ant
addons/mrp/wizard/mrp_workcenter_load.py
56
2244
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
Soya93/Extract-Refactoring
python/helpers/pydev/_pydevd_bundle/pydevd_comm.py
2
57034
''' pydevd - a debugging daemon This is the daemon you launch for python remote debugging. Protocol: each command has a format: id\tsequence-num\ttext id: protocol command number sequence-num: each request has a sequence number. Sequence numbers originating at the debugger are odd, sequence numbers ori...
apache-2.0
SerialShadow/SickRage
lib/imdb/Movie.py
126
17281
""" Movie module (imdb package). This module provides the Movie class, used to store information about a given movie. Copyright 2004-2010 Davide Alberani <da@erlug.linux.it> 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 F...
gpl-3.0
redhat-cip/horizon
horizon/utils/functions.py
19
4828
# 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 t...
apache-2.0
ajaxsys/dict-admin
docutils/io.py
2
14324
# $Id: io.py 7073 2011-07-07 06:49:19Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ I/O classes provide a uniform API for low-level input and output. Subclasses will exist for a variety of input/output mechanisms. """ __docformat__ =...
bsd-3-clause
timedcy/python-goose
goose/utils/__init__.py
10
4267
# -*- coding: utf-8 -*- """\ This is a python port of "Goose" orignialy licensed to Gravity.com under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Python port was written by Xavier Grangier for Recrutae Gravity.co...
apache-2.0
glenn-edgar/local_controller_3
__backup__/flask_web/werkzeug-master/werkzeug/testsuite/debug.py
74
7476
# -*- coding: utf-8 -*- """ werkzeug.testsuite.debug ~~~~~~~~~~~~~~~~~~~~~~~~ Tests some debug utilities. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest import sys import re from werkzeug.testsuite import WerkzeugTestCase from werkzeug.de...
mit
dgarros/ansible
lib/ansible/modules/network/avi/avi_systemconfiguration.py
43
6203
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the te...
gpl-3.0
kofron/bigcouch
couchjs/scons/scons-local-2.0.1/SCons/Tool/hplink.py
61
2390
"""SCons.Tool.hplink Tool-specific initialization for the HP linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foun...
apache-2.0
vincent-noel/SigNetSim
signetsim/views/simulate/TimeSeriesSimulationView.py
2
9881
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2017 Vincent Noel (vincent.noel@butantan.gov.br) # # This file is part of libSigNetSim. # # libSigNetSim 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 Fou...
agpl-3.0
blinkbox/shaka-player
third_party/gjslint/python-gflags-2.0/gflags2man.py
407
18864
#!/usr/bin/env python # Copyright (c) 2006, 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 l...
apache-2.0
annarev/tensorflow
tensorflow/python/training/experimental/mixed_precision_test.py
8
7435
# Copyright 2019 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...
apache-2.0
badloop/SickRage
lib/hachoir_parser/archive/ace.py
95
9944
""" ACE parser From wotsit.org and the SDK header (bitflags) Partial study of a new block type (5) I've called "new_recovery", as its syntax is very close to the former one (of type 2). Status: can only read totally file and header blocks. Author: Christophe Gisquet <christophe.gisquet@free.fr> Creation date: 19 jan...
gpl-3.0
vamst/COSMOS2
examples/ex2.py
1
3562
import os import subprocess as sp from cosmos.api import Cosmos, Dependency, draw_stage_graph, draw_task_graph, \ pygraphviz_available, default_get_submit_args from functools import partial from tools import echo, cat, word_count def recipe(workflow): # Create two Tasks that echo "hello" and "world" respectiv...
gpl-3.0
oleksa-pavlenko/gae-django-project-template
django/templatetags/static.py
227
4084
from django import template from django.template.base import Node from django.utils.encoding import iri_to_uri from django.utils.six.moves.urllib.parse import urljoin register = template.Library() class PrefixNode(template.Node): def __repr__(self): return "<PrefixNode for %r>" % self.name def __in...
mit
longmen21/edx-platform
scripts/run_watch_data.py
182
1672
#! /usr/bin/env python # This script requires that you have watchdog installed. You can install # watchdog via 'pip install watchdog' import sys import time import logging import os from subprocess import Popen from signal import SIGTERM from watchdog.observers import Observer from watchdog.events import LoggingEvent...
agpl-3.0
arenadata/ambari
ambari-server/src/main/resources/stacks/ADH/1.4/services/ATLAS/package/scripts/metadata.py
1
10415
#!/usr/bin/env python """ 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");...
apache-2.0
lukeiwanski/tensorflow
tensorflow/contrib/timeseries/python/timeseries/state_management.py
67
11936
# 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...
apache-2.0
Changaco/oh-mainline
vendor/packages/django-tastypie/tastypie/serializers.py
34
19714
from __future__ import unicode_literals import datetime import re import django from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils import six from django.utils.encoding import force_text, smart_bytes from django.core.serializers import json as djangojson from tas...
agpl-3.0
PatrickKennedy/Sybil
console/app/pygments/plugin.py
27
1841
# -*- coding: utf-8 -*- """ pygments.plugin ~~~~~~~~~~~~~~~ Pygments setuptools plugin interface. The methods defined here also work if setuptools isn't installed but they just return nothing. lexer plugins:: [pygments.lexers] yourlexer = yourmodule:YourLexer formatter pl...
bsd-2-clause
ishay2b/tensorflow
tensorflow/contrib/timeseries/python/timeseries/state_space_models/filtering_postprocessor_test.py
67
3176
# 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...
apache-2.0
cagatayyildiz/boun-sim
bcpm/visualize.py
1
1414
''' This study is a Bogazici University - NETAS Nova V-Gate collaboration and funded by TEYDEB project "Realization of Anomaly Detection and Prevention with Learning System Architectures, Quality Improvement, High Rate Service Availability and Rich Services in a VoIP Firewall Product'', by the Scientific and Technolog...
gpl-2.0
dvarrazzo/Pyrseas
pyrseas/dbobject/table.py
1
36138
# -*- coding: utf-8 -*- """ pyrseas.dbobject.table ~~~~~~~~~~~~~~~~~~~~~~ This module defines six classes: DbClass derived from DbSchemaObject, Sequence, Table and View derived from DbClass, MaterializedView derived from View, and ClassDict derived from DbObjectDict. """ import re import os im...
bsd-3-clause
pyconca/2017-web
config/settings/common.py
1
9927
# -*- coding: utf-8 -*- """ Django settings for PyCon Canada 2017 project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from __future__ import absolute_import, u...
mit
simonwydooghe/ansible
test/units/modules/network/check_point/test_cp_mgmt_service_dce_rpc.py
19
4165
# Ansible module to manage CheckPoint Firewall (c) 2019 # # 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 version. # # Ansible is dist...
gpl-3.0
JPFrancoia/scikit-learn
examples/ensemble/plot_forest_iris.py
335
6271
""" ==================================================================== Plot the decision surfaces of ensembles of trees on the iris dataset ==================================================================== Plot the decision surfaces of forests of randomized trees trained on pairs of features of the iris dataset. ...
bsd-3-clause
wang16/swtoolkit
site_scons/site_tools/code_signing.py
21
5108
#!/usr/bin/python2.4 # Copyright 2009, 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...
bsd-3-clause
dubourg/openturns
python/test/t_ZipfMandelbrot_std.py
2
2964
#! /usr/bin/env python from __future__ import print_function from openturns import * TESTPREAMBLE() RandomGenerator.SetSeed(0) try: # Instanciate one distribution object distribution = ZipfMandelbrot(15, 1.2, 2.) print("Distribution ", repr(distribution)) print("Distribution ", distribution) # I...
gpl-3.0
hectord/lettuce
tests/functional/test_terrain.py
18
2374
# -*- coding: utf-8 -*- # <Lettuce - Behaviour Driven Development for python> # Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.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 Foundatio...
gpl-3.0
hsaputra/tensorflow
tensorflow/python/debug/wrappers/framework.py
9
34269
# 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...
apache-2.0
mtlchun/edx
common/lib/xmodule/xmodule/tests/xml/test_inheritance.py
193
1689
""" Test that inherited fields work correctly when parsing XML """ from nose.tools import assert_equals, assert_in # pylint: disable=no-name-in-module from xmodule.tests.xml import XModuleXmlImportTest from xmodule.tests.xml.factories import CourseFactory, SequenceFactory, ProblemFactory, XmlImportFactory class Tes...
agpl-3.0
thaim/ansible
lib/ansible/modules/network/fortios/fortios_web_proxy_forward_server_group.py
14
12179
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 the Lic...
mit
pschmitt/home-assistant
tests/components/plum_lightpad/test_init.py
4
3767
"""Tests for the Plum Lightpad config flow.""" from aiohttp import ContentTypeError from requests.exceptions import HTTPError from homeassistant.components.plum_lightpad.const import DOMAIN from homeassistant.core import HomeAssistant from homeassistant.setup import async_setup_component from tests.async_mock import ...
apache-2.0
ProfHoekstra/bluesky
bluesky/traffic/traffic.py
1
33317
""" BlueSky traffic implementation.""" from __future__ import print_function try: from collections.abc import Collection except ImportError: # In python <3.3 collections.abc doesn't exist from collections import Collection from math import * from random import randint import numpy as np import bluesky as b...
gpl-3.0
mnahm5/django-estore
Lib/site-packages/troposphere/sqs.py
27
1054
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty from .validators import integer try: from awacs.aws import Policy policytypes = (dict, Policy) except ImportError: policytypes = dict, class RedrivePolic...
mit
trdean/grEME
gr-qtgui/examples/pyqt_histogram_f.py
7
6691
#!/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) # ...
gpl-3.0
mcsalgado/ansible
lib/ansible/parsing/yaml/objects.py
169
2012
# (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...
gpl-3.0
wilsonianb/nacl_contracts
src/trusted/validator_mips/dgen/dgen_dump.py
6
1434
#!/usr/bin/python # # Copyright 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. # Copyright 2012, Google Inc. # """ Produces a table from the in-memory representation. Useful for storing the optimized table for...
bsd-3-clause
midgardproject/midgard-core
tests/GIR/test_200_user.py
1
2601
# coding=utf-8 import sys import struct import unittest from test_000_config import TestConfig from test_020_connection import TestConnection from gi.repository import Midgard from gi.repository import GObject class TestUser(unittest.TestCase): mgd = None def setUp(self): if self.mgd == None: self.mgd...
lgpl-2.1
Stavitsky/nova
nova/tests/unit/objects/test_vcpu_model.py
36
3702
# 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 # d...
apache-2.0
mlperf/inference_results_v0.7
closed/QCT/code/rnnt/tensorrt/harness.py
12
5140
# Copyright (c) 2020, NVIDIA CORPORATION. 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 appli...
apache-2.0
rahuldhote/scikit-learn
sklearn/neighbors/tests/test_dist_metrics.py
230
5234
import itertools import pickle import numpy as np from numpy.testing import assert_array_almost_equal import scipy from scipy.spatial.distance import cdist from sklearn.neighbors.dist_metrics import DistanceMetric from nose import SkipTest def dist_func(x1, x2, p): return np.sum((x1 - x2) ** p) ** (1. / p) de...
bsd-3-clause
camptocamp/odoo
addons/sale_layout/models/sale_layout.py
62
5080
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
cloudnautique/python-agent
cattle/plugins/docker/network/ipsec_tunnel.py
1
1316
import logging from .util import has_service from cattle.utils import get_or_create_map, get_or_create_list from cattle.agent.handler import BaseHandler log = logging.getLogger('docker') class IpsecTunnelSetup(BaseHandler): def __init__(self): pass def before_start(self, instance, host, config, sta...
apache-2.0
WMD-group/SMACT
examples/Practical_tutorial/Site/surface_points.py
1
13393
#!/usr/bin/env python # Defines the positions (on a 2D grid) of the positions of under-coordinated # atoms at the surface of a material ################################################################################ # Copyright Keith T Butler (2015) # # ...
mit
ArneBab/pypyjs
website/demo/home/rfk/repos/pypy/lib_pypy/ctypes_config_cache/resource.ctc.py
13
1502
""" 'ctypes_configure' source for resource.py. Run this to rebuild _resource_cache.py. """ from ctypes import sizeof import dumpcache from ctypes_configure.configure import (configure, ExternalCompilationInfo, ConstantInteger, DefinedConstantInteger, SimpleType) _CONSTANTS = ( 'RLIM_INFINITY', 'RLIM...
mit
arista-eosplus/ansible
lib/ansible/modules/files/fetch.py
27
4058
# this is a virtual module that is entirely implemented server side # 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 op...
gpl-3.0
streamlink/streamlink
src/streamlink/utils/url.py
3
4825
import re from collections import OrderedDict from urllib.parse import parse_qsl, quote_plus, urlencode, urljoin, urlparse, urlunparse _re_uri_implicit_scheme = re.compile(r"""^[a-z0-9][a-z0-9.+-]*://""", re.IGNORECASE) def update_scheme(current: str, target: str) -> str: """ Take the scheme from the curren...
bsd-2-clause
CMartelLML/numpy
numpy/polynomial/tests/test_hermite_e.py
123
17069
"""Tests for hermite_e module. """ from __future__ import division, absolute_import, print_function import numpy as np import numpy.polynomial.hermite_e as herme from numpy.polynomial.polynomial import polyval from numpy.testing import ( TestCase, assert_almost_equal, assert_raises, assert_equal, assert_, run...
bsd-3-clause
beckdaniel/GPy
GPy/old_tests/mapping_tests.py
15
2156
# Copyright (c) 2012, 2013 GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) import unittest import numpy as np import GPy class MappingGradChecker(GPy.core.Model): """ This class has everything we need to check the gradient of a mapping. It implement a simple like...
bsd-3-clause
qvazzler/Flexget
tests/test_exec.py
1
3067
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import sys class TestExec(object): __tmp__ = True config = """ templates: global: set: temp_dir: '__tmp__' acc...
mit
beni55/picochess
libs/requests/auth.py
331
6123
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib from base64 import b64encode from .compat import urlparse, str from .cookies import extract_cookies_to_jar from .utils import parse_dict_header ...
gpl-3.0
leiferikb/bitpop
build/third_party/sqlalchemy_0_7_1/sqlalchemy/orm/unitofwork.py
8
21483
# orm/unitofwork.py # Copyright (C) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """The internals for the unit of work system. The session's flush() process passes ...
gpl-3.0
root-mirror/root
build/unix/makeversion.py
15
1920
# Script to update base/inc/RVersion.h. # Called by main Makefile as soon as build/version_number has been updated. # # Author: Axel, 2020-03-06 import os, subprocess, re from datetime import date, datetime versionline = "" with open("build/version_number", "r") as file: versionline = file.read().replace('\n', '') ...
lgpl-2.1
pombredanne/django-moderation
tests/tests/unit/testforms.py
2
3554
from __future__ import unicode_literals from django.db.models.fields.files import ImageFieldFile from django.forms import CharField from django.contrib.auth.models import User from django.test.testcases import TestCase from tests.models import UserProfile, ModelWithImage from moderation.forms import BaseModeratedObjec...
bsd-3-clause
jpallas/beakerx
beakerx/beakerx/commands.py
1
2777
# Copyright 2018 TWO SIGMA OPEN SOURCE, LLC # # 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 agre...
apache-2.0
oudalab/fajita
pythonAPI/flask/lib/python3.5/site-packages/jinja2/optimizer.py
222
1722
# -*- coding: utf-8 -*- """ jinja2.optimizer ~~~~~~~~~~~~~~~~ The jinja optimizer is currently trying to constant fold a few expressions and modify the AST in place so that it should be easier to evaluate it. Because the AST does not contain all the scoping information and the compiler has to ...
mit
cratuki/solent
scenarios/eng_40_simple_udp_sub.py
2
5645
# // license # Copyright 2016, Free Software Foundation. # # This file is part of Solent. # # Solent 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) ...
lgpl-3.0
kwlzn/pex
tests/test_integration.py
1
31413
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import functools import os import platform import subprocess import sys from contextlib import contextmanager from textwrap import dedent import pytest from twitter.common.contextutil imp...
apache-2.0
sysalexis/kbengine
kbe/res/scripts/common/Lib/tkinter/commondialog.py
153
1412
# base class for tk common dialogues # # this module provides a base class for accessing the common # dialogues available in Tk 4.2 and newer. use filedialog, # colorchooser, and messagebox to access the individual # dialogs. # # written by Fredrik Lundh, May 1997 # from tkinter import * class Dialog: command ...
lgpl-3.0
AutorestCI/azure-sdk-for-python
azure-cognitiveservices-search-videosearch/azure/cognitiveservices/search/videosearch/models/trending_videos_subcategory.py
2
1152
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
michalliu/chromium-depot_tools
third_party/boto/auth.py
51
26228
# Copyright 2010 Google Inc. # Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Eucalyptus Systems, Inc. # # 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 re...
bsd-3-clause
kaiw/meld
meld/vcview.py
1
36042
# Copyright (C) 2002-2006 Stephen Kennedy <stevek@gnome.org> # Copyright (C) 2010-2013 Kai Willadsen <kai.willadsen@gmail.com> # 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 o...
gpl-2.0
WaldurChatbot/Waldur-Chatbot
common/offline_graphs/totalcosts_offline.py
1
16907
import json import collections import matplotlib matplotlib.use('Agg') # requirement of matplotlib import matplotlib.pyplot as plt import numpy as np from textwrap import wrap myinput = """[ { "url":"https://api.etais.ee/api/invoices/9e67980771a94de3bd0075fe84522b05/", "uuid":"9e67980771a94de3bd0075f...
mit
kobejean/tensorflow
tensorflow/contrib/optimizer_v2/gradient_descent.py
19
2974
# 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...
apache-2.0
cshallue/models
research/neural_programmer/data_utils.py
5
27733
# 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 agree...
apache-2.0
sophacles/invoke
invoke/config.py
1
19816
import copy import imp import json import os from os.path import join, splitext, expanduser from .vendor import six if six.PY3: from .vendor import yaml3 as yaml else: from .vendor import yaml2 as yaml from .env import Environment from .exceptions import UnknownFileType from .util import debug class DataPro...
bsd-2-clause
gestrem/Arduino
arduino-core/src/processing/app/i18n/python/requests/packages/urllib3/_collections.py
309
2903
# urllib3/_collections.py # Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from collections import MutableMapping from threading import Lock try: # Python 2.7+ ...
lgpl-2.1
Filechaser/nzbToMedia
libs/subliminal/providers/addic7ed.py
25
11049
# -*- coding: utf-8 -*- import logging import re from babelfish import Language, language_converters from guessit import guessit from requests import Session from . import ParserBeautifulSoup, Provider from .. import __short_version__ from ..cache import SHOW_EXPIRATION_TIME, region from ..exceptions import Authentic...
gpl-3.0
sylvestre/bedrock
bin/run-db-download.py
5
2276
#!/usr/bin/env python import os import sys import requests from db_s3_utils import ( get_db_checksum, get_git_sha, get_prev_db_data, set_db_data, JSON_DATA_FILE, DB_FILE, ) BUCKET_NAME = os.getenv('AWS_DB_S3_BUCKET', 'bedrock-db-dev') REGION_NAME = os.getenv('AWS_DB_REGION', 'us-west-2') S3...
mpl-2.0
nccgroup/umap
USBEndpoint.py
1
3016
# USBEndpoint.py # # Contains class definition for USBEndpoint. class USBEndpoint: direction_out = 0x00 direction_in = 0x01 transfer_type_control = 0x00 transfer_type_isochronous = 0x01 transfer_type_bulk = 0x02 transfer_type_interrupt = 0x03 ...
agpl-3.0
eevol/django-cities-light
cities_light/south_migrations/0008_add_region_geoname_id.py
2
4208
# -*- 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 'Region.geoname_id' db.add_column('cities_light_region', 'geoname_id', ...
mit
wikimedia/operations-debs-python-kafka
test/record/test_util.py
8
3754
import struct import pytest from kafka.record import util varint_data = [ (b"\x00", 0), (b"\x01", -1), (b"\x02", 1), (b"\x7E", 63), (b"\x7F", -64), (b"\x80\x01", 64), (b"\x81\x01", -65), (b"\xFE\x7F", 8191), (b"\xFF\x7F", -8192), (b"\x80\x80\x01", 8192), (b"\x81\x80\x01", -...
apache-2.0
tumbl3w33d/ansible
lib/ansible/modules/storage/purestorage/purefa_info.py
13
38316
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2019, Simon Dodsley (simon@purestorage.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_version': '1.1',...
gpl-3.0
jhbradley/moose
scripts/cluster_launcher.py
15
5493
#!/usr/bin/env python import os, sys, re, shutil from optparse import OptionParser, OptionGroup, Values # Determine the MOOSE Directory MOOSE_PYTHON_DIR = None if os.environ.has_key('MOOSE_DIR'): MOOSE_PYTHON_DIR = os.path.join(os.environ['MOOSE_DIR'], 'python') else: MOOSE_PYTHON_DIR = os.path.join(os.path.split(...
lgpl-2.1
filodej/django-filer
filer/utils/loader.py
38
1668
#-*- coding: utf-8 -*- """ This function is snatched from https://github.com/ojii/django-load/blob/3058ab9d9d4875589638cc45e84b59e7e1d7c9c3/django_load/core.py#L49 local changes: * added check for basestring to allow values that are already an object or method. """ from django.utils.importlib import import_module ...
bsd-3-clause
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/rest_framework/tests/test_relations_nested.py
17
14625
from __future__ import unicode_literals from django.db import models from django.test import TestCase from rest_framework import serializers from .models import OneToOneTarget class OneToOneSource(models.Model): name = models.CharField(max_length=100) target = models.OneToOneField(OneToOneTarget, related_nam...
agpl-3.0
Denisolt/IEEE-NYIT-MA
local/lib/python2.7/site-packages/setuptools/command/bdist_rpm.py
1049
1508
import distutils.command.bdist_rpm as orig class bdist_rpm(orig.bdist_rpm): """ Override the default bdist_rpm behavior to do the following: 1. Run egg_info to ensure the name and version are properly calculated. 2. Always run 'install' using --single-version-externally-managed to disable eggs...
gpl-3.0
apache/airflow
tests/providers/http/sensors/test_http.py
3
8988
# # 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...
apache-2.0
epssy/hue
desktop/core/ext-py/Django-1.6.10/django/conf/locale/sv/formats.py
118
1568
# -*- 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-2.0
hplustree/trove
trove/guestagent/datastore/experimental/couchbase/manager.py
3
4570
# Copyright (c) 2013 eBay Software 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 # # Unl...
apache-2.0
sadmansk/servo
tests/wpt/web-platform-tests/webvtt/tools/categorize_results.py
89
3940
import os import sys import json import fnmatch TEST_DIR = "/webvtt/" CATEGORIES_FILE = "../categories.json" class Test: def __init__(self, file, name, status, message): self.file = file self.name = name self.status = status self.message = message self.passed = status == 'P...
mpl-2.0
worldbank/cv4ag
modules/gdal_polygonize.py
2
6981
#!/usr/bin/env python # -*- coding: utf-8 -*- #****************************************************************************** # $Id$ # # Project: GDAL Python Interface # Purpose: Application for converting raster data to a vector polygon layer. # Author: Frank Warmerdam, warmerdam@pobox.com # #*****************...
mit
pdellaert/ansible
contrib/inventory/gce.py
37
19275
#!/usr/bin/env python # Copyright: (c) 2013, Google Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' GCE external inventory script ================================= Generates inventory that Ansible can understand by making API requests Google Compute Engine via th...
gpl-3.0
thomasf/offlineimap
offlineimap/folder/Base.py
4
40980
# Base folder support # Copyright (C) 2002-2015 John Goerzen & 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 2 of the License, or # (at your option) a...
gpl-2.0
ntts-clo/ryu
ryu/services/protocols/vrrp/monitor.py
56
6586
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 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...
apache-2.0
zapster/graal-core
mx.graal-core/mx_graal_core.py
1
36920
# # ---------------------------------------------------------------------------------------------------- # # Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify ...
gpl-2.0
Ictp/indico
indico/ext/importer/handlers.py
2
2394
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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; eith...
gpl-3.0
ininex/geofire-python
resource/lib/python2.7/site-packages/gcloud/monitoring/test_label.py
6
4111
# 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 agree...
mit
suneeth51/neutron
neutron/tests/unit/plugins/ml2/test_security_group.py
24
6979
# Copyright (c) 2013 OpenStack Foundation # Copyright 2013, Nachi Ueno, NTT MCL, 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.ap...
apache-2.0
armersong/zato
code/zato-web-admin/src/zato/admin/web/views/security/oauth.py
6
2297
# -*- coding: utf-8 -*- """ Copyright (C) 2010 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib import logging # Zato from zato.admin.web.forms import ChangePasswordFo...
gpl-3.0
rcgee/oq-hazardlib
openquake/hazardlib/tests/gsim/chiou_youngs_2014_test.py
1
6695
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2014-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
agpl-3.0
serzans/wagtail
wagtail/project_template/home/migrations/0002_create_homepage.py
61
1179
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def create_homepage(apps, schema_editor): # Get models ContentType = apps.get_model('contenttypes.ContentType') Page = apps.get_model('wagtailcore.Page') Site = apps.get_model('wagtailcore.Site') Home...
bsd-3-clause
zixiliuyue/pika
pika/connection.py
2
82517
"""Core connection objects""" import ast import sys import collections import copy import logging import math import numbers import platform import warnings if sys.version_info > (3,): import urllib.parse as urlparse # pylint: disable=E0611,F0401 else: import urlparse from pika import __version__ from pika i...
bsd-3-clause