code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# coding: utf-8 """ OpenAPI spec version: Generated by: https://github.com/swagger-api/swagger-codegen.git 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 ...
detiber/lib_openshift
lib_openshift/models/v1_image_source.py
Python
apache-2.0
5,181
from a10sdk.common.A10BaseClass import A10BaseClass class VeCfg(A10BaseClass): """This class does not support CRUD Operations please use parent. :param ve_end: {"type": "number", "description": "VE port", "format": "number"} :param ve_start: {"type": "number", "description": "VE port (VE Interface n...
amwelch/a10sdk-python
a10sdk/core/enable/enable_management_service_ssh_acl_v4.py
Python
apache-2.0
3,405
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('server', '0015_auto_20150819_1501'), ] operations = [ migrations.AlterField( model_name='apikey', na...
chasetb/sal
server/migrations/0016_auto_20151026_0851.py
Python
apache-2.0
4,470
from django.conf import settings from django.core import mail from rdmo.core.mail import send_mail def test_send_mail(db): send_mail('Subject', 'Message', to=['user@example.com']) assert len(mail.outbox) == 1 assert mail.outbox[0].subject == '[example.com] Subject' assert mail.outbox[0].body == 'Mes...
DMPwerkzeug/DMPwerkzeug
rdmo/core/tests/test_mail.py
Python
apache-2.0
2,649
# Copyright 2015 Alex Brandt # # 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, ...
kumoru/torment
test_torment/test_unit/test_fixtures/__init__.py
Python
apache-2.0
15,613
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 Hewlett Packard Enterprise Development LP # # 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 ...
HPENetworking/topology_docker
lib/topology_docker/shell.py
Python
apache-2.0
2,063
# SPDX-License-Identifier: Apache-2.0 # Copyright Contributors to the Rez Project ''' Bundle a context and its packages into a relocatable dir. ''' from __future__ import print_function import os import os.path import sys def setup_parser(parser, completions=False): group = parser.add_mutually_exclusive_group(...
instinct-vfx/rez
src/rez/cli/bundle.py
Python
apache-2.0
1,729
# Copyright (c) 2012 OpenStack, 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 agreed to in wr...
citrix-openstack-build/swift
test/unit/common/middleware/test_list_endpoints.py
Python
apache-2.0
8,008
# 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...
caisq/tensorflow
tensorflow/contrib/autograph/pyct/static_analysis/cfg.py
Python
apache-2.0
15,704
import os import base64 from datetime import datetime from xos.config import Config from xos.logger import Logger, logging from synchronizers.base.steps import * from django.db.models import F, Q from core.models import * from django.db import reset_queries from synchronizers.base.ansible import * from generate.depende...
xmaruto/mcord
xos/synchronizers/base/syncstep.py
Python
apache-2.0
10,897
import os import math import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable def make_conv_bn_relu(in_channels, out_channels, kernel_size=3, stride=1, padding=1, groups=1): return [ nn.Conv2d(in_channels, out_channels, kernel_size=kernel_size, stride=stride,...
chicm/carvana
car-segment/net/imagenet/pyramidnet1.py
Python
apache-2.0
6,020
""" Protocol Buffer Breaking Change Detector This tool is used to detect "breaking changes" in protobuf files, to ensure proper backwards-compatibility in protobuf API updates. The tool can check for breaking changes of a single API by taking 2 .proto file paths as input (before and after) and outputting a bool `is_br...
envoyproxy/envoy
tools/api_proto_breaking_change_detector/detector.py
Python
apache-2.0
5,354
#!/usr/bin/env python ''' Appendix F. Grid Mappings --- Each recognized grid mapping is described in one of the sections below. Each section contains: the valid name that is used with the grid_mapping_name attribute; a list of the specific attributes that may be used to assign values to the mapping's parameters; the st...
webtrike/compliance-checker
compliance_checker/cf/appendix_f.py
Python
apache-2.0
2,157
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. import unittest from iptest.type_util import * from iptest import run_test class ComplexTest(unittest.TestCase...
slozier/ironpython2
Tests/test_complex.py
Python
apache-2.0
2,104
# # 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...
beevek/txamqp
src/txamqp/test/test_broker.py
Python
apache-2.0
6,431
#!/usr/bin/env python # Copyright 2002 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...
googlearchive/titan
titan/common/lib/google/apputils/datelib.py
Python
apache-2.0
15,413
# -*- encoding: utf-8 -*- # Copyright (c) 2016 Intel Corp # # Authors: Prudhvi Rao Shedimbi <prudhvi.rao.shedimbi@intel.com> # # 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.apa...
openstack/watcher
watcher/conf/glance_client.py
Python
apache-2.0
1,593
# Copyright (c) 2015 Red Hat, 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...
huntxu/neutron
neutron/tests/functional/agent/test_dhcp_agent.py
Python
apache-2.0
17,256
# -*- coding: utf-8 -*- # # Copyright 2019 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
tseaver/google-cloud-python
monitoring/tests/unit/gapic/v3/test_metric_service_client_v3.py
Python
apache-2.0
16,399
#!/usr/bin/env python import xml.etree.ElementTree as ET class brocade_aaa(object): """Auto generated class. """ def __init__(self, **kwargs): self._callback = kwargs.pop('callback') def aaa_config_aaa_authentication_login_first(self, **kwargs): """Auto Generated Code ...
BRCDcomm/pynos
pynos/versions/ver_7/ver_7_0_0/yang/brocade_aaa.py
Python
apache-2.0
91,486
import os import random import string import unittest import requests from tethys_dataset_services.engines import CkanDatasetEngine try: from tethys_dataset_services.tests.test_config import TEST_CKAN_DATASET_SERVICE except ImportError: print('ERROR: To perform tests, you must create a file in the "tests" pac...
tethysplatform/tethys_dataset_services
tethys_dataset_services/tests/e2e_tests/ckan_engine_e2e_tests.py
Python
bsd-2-clause
10,844
import setuptools setuptools.setup( name="sirius", version="0.5", author="", author_email="simon.pintarelli@cscs.ch", description="pySIRIUS", url="https://github.com/electronic_structure/SIRIUS", packages=['sirius'], install_requires=['mpi4py', 'voluptuous', 'numpy', 'h5py', 'scipy', 'P...
electronic-structure/sirius
python_module/setup.py
Python
bsd-2-clause
499
''' Copyright (c) 2013-2014, Joshua Pitts All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and t...
0x0mar/the-backdoor-factory
intel/WinIntelPE32.py
Python
bsd-3-clause
36,465
# -*- coding: utf-8 -*- """ Program for generating plantuml or dot format of a database tables by connection string \n\nDatabase connection string - http://goo.gl/3GpnE """ import operator import string from optparse import OptionParser from sqlalchemy import create_engine, MetaData from tsadisplay import describe, re...
Equitable/trump
docs/diagrams/tsadisplay/reflect.py
Python
bsd-3-clause
2,199
from __future__ import annotations import re import sys from typing import Any, Callable, TypeVar from pathlib import Path import numpy as np import numpy.typing as npt AR_f8: npt.NDArray[np.float64] AR_i8: npt.NDArray[np.int64] bool_obj: bool suppress_obj: np.testing.suppress_warnings FT = TypeVar("FT", bound=Call...
simongibbons/numpy
numpy/typing/tests/data/reveal/testing.py
Python
bsd-3-clause
8,824
# -*- coding: utf-8 -*- import logging, os, sys l = logging.getLogger(__name__) from django.conf import settings import json from django_lean.experiments.models import Experiment class ExperimentLoader(object): """ Loads the experiments from a file containing a list of experiment It will add new experime...
uhuramedia/django-lean
django_lean/experiments/loader.py
Python
bsd-3-clause
2,347
import sys import requests try: from .helper import * except SystemError: from helper import * def compareRequestsAndSelenium(url): html1 = str(requests.get(url).text) try: driver = webdriver.Firefox() driver.maximize_window() driver.get(url) html2 = str(driver.page...
bgarrels/sky
sky/legacy/comparison.py
Python
bsd-3-clause
685
""" Simple utility code for animations. """ # Author: Prabhu Ramachandran <prabhu at aerodotiitbdotacdotin> # Copyright (c) 2009, Enthought, Inc. # License: BSD Style. import types from functools import wraps try: from decorator import decorator HAS_DECORATOR = True except ImportError: HAS_DECORATOR = Fals...
liulion/mayavi
mayavi/tools/animator.py
Python
bsd-3-clause
7,087
# Copyright (C) 2010, 2012 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 an...
hgl888/crosswalk-android-extensions
build/idl-generator/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/views/printing.py
Python
bsd-3-clause
20,171
import pytest from diofant import Integer, SympifyError from diofant.core.operations import AssocOp, LatticeOp __all__ = () class MyMul(AssocOp): identity = Integer(1) def test_flatten(): assert MyMul(2, MyMul(4, 3)) == MyMul(2, 4, 3) class Join(LatticeOp): """Simplest possible Lattice class.""" ...
diofant/diofant
diofant/tests/core/test_operations.py
Python
bsd-3-clause
1,106
from nose.tools import eq_ from elasticutils import MLT from elasticutils.tests import ESTestCase class MoreLikeThisTest(ESTestCase): data = [ {'id': 1, 'foo': 'bar', 'tag': 'awesome'}, {'id': 2, 'foo': 'bar', 'tag': 'boring'}, {'id': 3, 'foo': 'bar', 'tag': 'awesome'}, {'id': 4, ...
mozilla/elasticutils
elasticutils/tests/test_mlt.py
Python
bsd-3-clause
3,116
""" Logistic Regression """ # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # Fabian Pedregosa <f@bianp.net> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Manoj Kumar <manojkumarsivaraj334@gmail.com> import numbers import warnings import numpy as np from scipy impo...
soulmachine/scikit-learn
sklearn/linear_model/logistic.py
Python
bsd-3-clause
38,054
# -*- coding: utf-8 -*- """ Tera Python SDK. It needs a libtera_c.so TODO(taocipian) __init__.py """ from ctypes import CFUNCTYPE, POINTER from ctypes import byref, cdll, string_at from ctypes import c_bool, c_char_p, c_void_p from ctypes import c_uint32, c_int32, c_int64, c_ubyte, c_uint64 class Status(object): ...
BaiduPS/tera
src/sdk/python/TeraSdk.py
Python
bsd-3-clause
39,743
#!/usr/bin/env python import sys import os.path import optparse import cascadenik # monkey with sys.path due to some weirdness inside cssutils sys.path.append(os.path.dirname(os.path.realpath(__file__))) from cssutils.tokenize2 import Tokenizer as cssTokenizer def main(filename): """ Given an input file containi...
mapnik/Cascadenik
cascadenik-style.py
Python
bsd-3-clause
1,717
from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from olympia.constants.applications import ( ANDROID, FIREFOX, SEAMONKEY, THUNDERBIRD) from olympia.constants.base import ( ADDON_DICT, ADDON_EXTENSION, ADDON_LPAPP, ADDON_PERSONA, ADDON_SEARCH, ADDON_SLUGS...
lavish205/olympia
src/olympia/constants/categories.py
Python
bsd-3-clause
12,242
import contextlib from directed_edge import Exporter, Item from .utils import ident, get_database @contextlib.contextmanager def get_exporter(target=None): if target is None: target = get_database() exporter = DjangoExporter(target) yield exporter exporter.finish() class DjangoExporter(Ex...
thread/django-directed-edge
django_directed_edge/export.py
Python
bsd-3-clause
813
"""Lite version of scipy.linalg. Notes ----- This module is a lite version of the linalg.py module in SciPy which contains high-level Python interface to the LAPACK library. The lite version only accesses the following LAPACK functions: dgesv, zgesv, dgeev, zgeev, dgesdd, zgesdd, dgelsd, zgelsd, dsyevd, zheevd, dgetr...
behzadnouri/numpy
numpy/linalg/linalg.py
Python
bsd-3-clause
78,778
from datetime import datetime, date, time from HTMLParser import HTMLParser import random import urllib2 from django.conf import settings from django.db import transaction from django.db.models import Q from django.utils import timezone from icalendar import Calendar import pytz from wprevents.events.models import Ev...
yvan-sraka/wprevents
wprevents/admin/event_importer.py
Python
bsd-3-clause
8,479
import sqlalchemy as sa from sqlalchemy_utils import get_query_entities from tests import TestCase class TestGetQueryEntities(TestCase): def create_models(self): class TextItem(self.Base): __tablename__ = 'text_item' id = sa.Column(sa.Integer, primary_key=True) type =...
tonyseek/sqlalchemy-utils
tests/functions/test_get_query_entities.py
Python
bsd-3-clause
3,353
# -*- coding: utf-8 -*- # # This file is part of Django appschema released under the MIT license. # See the LICENSE for more information. from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand from django.contrib.contenttypes.models import ContentType from ...
Scholr/scholr-roles
scholrroles/management/commands/update_roles.py
Python
bsd-3-clause
4,576
# encoding: utf-8 """ __init__.py Created by Thomas Mangin on 2010-01-15. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """
fugitifduck/exabgp
lib/exabgp/__init__.py
Python
bsd-3-clause
138
""" SOM-based learning functions for CFProjections. """ from math import ceil import param from imagen import PatternGenerator, Gaussian from holoviews import BoundingBox from topo.base.arrayutil import L2norm, array_argmax from topo.base.cf import CFPLearningFn ### JABHACKALERT: This class will be removed once th...
ioam/topographica
topo/learningfn/som.py
Python
bsd-3-clause
5,130
from unittest import mock from urllib.error import HTTPError, URLError import requests from azure.mgmt.cdn import CdnManagementClient from azure.mgmt.frontdoor import FrontDoorManagementClient from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from django.test.utils import overri...
jnns/wagtail
wagtail/contrib/frontend_cache/tests.py
Python
bsd-3-clause
22,580
"""Some system-specific info for cyclus.""" import sys import importlib from cyclus.lazyasd import lazyobject @lazyobject def PY_VERSION_TUPLE(): return sys.version_info[:3] @lazyobject def curio(): if PY_VERSION_TUPLE < (3, 5, 2): return None else: try: return importlib.imp...
hodger/cyclus
cyclus/system.py
Python
bsd-3-clause
1,065
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('main', '0012_auto_20160204_1503'), ] operations = [ migrations.AlterModelOptions( name='eventassignment', ...
blossomica/airmozilla
airmozilla/main/migrations/0013_auto_20160223_1757.py
Python
bsd-3-clause
1,622
#!/usr/bin/env python3 import unittest import logging from tests.test_source import SourceTestCase from dipper.sources.HGNC import HGNC logging.basicConfig(level=logging.WARNING) logger = logging.getLogger(__name__) class HGNCTestCase(SourceTestCase): def setUp(self): self.source = HGNC('rdf_graph', Tr...
TomConlin/dipper
tests/test_hgnc.py
Python
bsd-3-clause
580
# This file is not meant for public use and will be removed in SciPy v2.0.0. # Use the `scipy.io` namespace for importing the functions # included below. import warnings from . import _harwell_boeing __all__ = [ # noqa: F822 'MalformedHeader', 'hb_read', 'hb_write', 'HBInfo', 'HBFile', 'HBMatrixType', 'Fortr...
grlee77/scipy
scipy/io/harwell_boeing.py
Python
bsd-3-clause
892
from iRODSLibrary import iRODSLibrary __version__ = "0.0.4" class iRODSLibrary(iRODSLibrary): """ iRODSLibrary is a client keyword library that uses the python-irodsclient module from iRODS https://github.com/irods/python-irodsclient Examples: | Connect To Grid | iPlant | data.iplantcoll...
jerry57/Robotframework-iRODS-Library
src/iRODSLibrary/__init__.py
Python
bsd-3-clause
422
# # Author: Pearu Peterson, March 2002 # # w/ additions by Travis Oliphant, March 2002 # and Jake Vanderplas, August 2012 from __future__ import division, print_function, absolute_import from warnings import warn import numpy as np from numpy import atleast_1d, atleast_2d from .flinalg import get_flinalg...
Eric89GXL/scipy
scipy/linalg/basic.py
Python
bsd-3-clause
55,293
names = [ # NOQA 'Aan', 'Aalia', 'Aaliah', 'Aaliyah', 'Aaron', 'Aaryanna', 'Aavree', 'Abbie', 'Abbott', 'Abbra', 'Abby', 'Abe', 'Abel', 'Abelardo', 'Abeni', 'Abia', 'Abiba', 'Abie', 'Abigail', 'Abner', 'Abraham', 'Abram', 'Abrial', 'Abrianna', 'Abrienda', 'Abril', 'Abryl', 'Absolom', 'Abu', 'Acacia', 'Acadia', 'Ace', ...
jamespacileo/django-pure-pagination
example_project/core/names.py
Python
bsd-3-clause
54,755
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from django.contrib import admin from .models import * admin.site.register(MessageInWaiting) admin.site.register(ResponseInWaiting) admin.site.register(Template)
dimagi/rapidsms-contrib-apps-dev
training/admin.py
Python
bsd-3-clause
215
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
stonebig/bokeh
bokeh/embed/notebook.py
Python
bsd-3-clause
3,803
# encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license """ Sales module objects. """ from django.core.urlresolvers import reverse from django.db import models from treeio.core.models import Object, User, ModuleSetting from treeio.identities.models import Conta...
havard024/prego
sales/models.py
Python
mit
17,973
# 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 ...
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/operation_display.py
Python
mit
1,498
import datetime as dt import numpy as np import pandas as pd # QSTK Imports import QSTK.qstkutil.DataAccess as da import QSTK.qstkutil.qsdateutil as du def get_orders_list(s_file_path): l_columns = ["year", "month", "day", "sym", "type", "num"] df_orders_list = pd.read_csv(s_file_path, sep=',', header=None) ...
gdikos/qstk-on-ec2
market_sim.py
Python
mit
5,585
#!/usr/bin/env python # -*- coding: utf-8 -*- """ libG(oogle)Reader Copyright (C) 2010 Matt Behrens <askedrelic@gmail.com> http://asktherelic.com Python library for working with the unofficial Google Reader API. Unit tests for oauth and ClientAuthMethod in libgreader. """ try: import unittest2 as unittest exc...
askedrelic/libgreader
tests/test_auth.py
Python
mit
7,823
from .model import NetworkModel from .view import NetworkView from PyQt5.QtWidgets import QAction, QMenu from PyQt5.QtGui import QCursor, QDesktopServices from PyQt5.QtCore import pyqtSlot, QUrl, QObject from duniterpy.api import bma from duniterpy.documents import BMAEndpoint class NetworkController(QObject): ""...
ucoin-io/cutecoin
src/sakia/gui/navigation/network/controller.py
Python
mit
2,750
try: from setuptools import setup except ImportError: from distutils.core import setup setup( name='Unirest', version='1.1.7', author='Mashape', author_email='opensource@mashape.com', packages=['unirest'], url='https://github.com/Mashape/unirest-python', license='LICENSE', descr...
abhishekgahlot/unirest-python
setup.py
Python
mit
431
# encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license #-*- coding: utf-8 -*- import sys import utils sys.modules['piston.utils'] = utils from piston.resource import Resource class CsrfExemptResource(Resource): """A Custom Resource that is csrf exempt""...
nuwainfo/treeio
core/api/resource.py
Python
mit
815
# # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # """ Django settings for pdc project. Generated by 'django-admin startproject' using Django 1.8.1. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full lis...
xychu/product-definition-center
pdc/settings.py
Python
mit
10,354
#coding:utf-8 bind = 'unix:/var/run/gunicorn.sock' workers = 4 # you should change this user = 'root' # maybe you like error loglevel = 'debug' errorlog = '-' logfile = '/var/log/gunicorn/debug.log' timeout = 300 secure_scheme_headers = { 'X-SCHEME': 'https', } x_forwarded_for_header = 'X-FORWARDED-FOR'
chenke91/ckPermission
settings.py
Python
mit
313
# from . import *
benjaminjack/pinetree
tests/models/__init__.py
Python
mit
18
# 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 ...
SUSE/azure-sdk-for-python
azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_view_paged.py
Python
mit
874
""" libguestfs tools test utility functions. """ import logging from autotest.client import os_dep, utils from autotest.client.shared import error import propcan class LibguestfsCmdError(Exception): """ Error of libguestfs-tool command. """ def __init__(self, details=''): self.details = det...
rbbratta/virt-test
virttest/utils_libguestfs.py
Python
gpl-2.0
5,627
from Screens.Screen import Screen from Components.ConfigList import ConfigListScreen, ConfigList from Components.ActionMap import ActionMap from Components.Sources.StaticText import StaticText from Components.config import config, ConfigSubsection, ConfigBoolean, getConfigListEntry, ConfigSelection, ConfigYesNo, Config...
XTAv2/Enigma2
lib/python/Screens/InstallWizard.py
Python
gpl-2.0
5,974
# collect data about max memory usage of processes matching some patterns import psutil, re, operator, time, sys sampleTime=.5 # seconds # matching lines will be taken in account #cmdPattern='.*cc1plus.*src/([a-zA-Z0-9_-]\.cpp).*' cmdPattern=r'.*cc1plus.* (\S+/)?([^/ ]+\.cpp).*' # group in the pattern which identifies...
tarthy6/dozer-thesis
scripts/watch-mem-usage.py
Python
gpl-2.0
965
"""Service layer (domain model) of practice app """
effa/flocs
practice/services/__init__.py
Python
gpl-2.0
53
from enigma import eListboxPythonMultiContent, gFont, eEnv, getBoxType from boxbranding import getMachineBrand, getMachineName from Components.ActionMap import ActionMap from Components.Label import Label from Components.Pixmap import Pixmap from Components.MenuList import MenuList from Components.MultiContent import...
XTAv2/Enigma2
lib/python/Plugins/Extensions/ExtrasPanel/QuickMenu.py
Python
gpl-2.0
35,097
# # Signature/DSS.py : DSS.py # # =================================================================== # # Copyright (c) 2014, Legrandin <helderijs@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following condition...
Haynie-Research-and-Development/jarvis
deps/lib/python3.4/site-packages/Cryptodome/Signature/DSS.py
Python
gpl-2.0
15,276
#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # *************************************...
elijah513/ice
scripts/TestController.py
Python
gpl-2.0
3,512
# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions...
cattleprod/samsung-kernel-gt-i9100
external/webkit/WebKitTools/Scripts/webkitpy/style/filter.py
Python
gpl-2.0
11,910
# -*- coding: utf-8 -*- # Copyright 2007-2021 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
erh3cq/hyperspy
hyperspy/models/model2d.py
Python
gpl-3.0
9,161
""" Test of basic project saving and loading """ import mantidplottests from mantidplottests import * import shutil import numpy as np import re from PyQt4 import QtGui, QtCore class MantidPlotProjectSerialiseTest(unittest.TestCase): def setUp(self): self._project_name = "MantidPlotTestProject" s...
dymkowsk/mantid
MantidPlot/test/MantidPlotProjectSerialiseTest.py
Python
gpl-3.0
15,205
# vim: ts=4:sw=4:expandtab # BleachBit # Copyright (C) 2008-2015 Andrew Ziem # http://bleachbit.sourceforge.net # # 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 License...
uudiin/bleachbit
tests/TestWinapp.py
Python
gpl-3.0
11,482
# (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...
alvaroaleman/ansible
lib/ansible/executor/stats.py
Python
gpl-3.0
2,779
#!/usr/bin/python # -*- coding: utf-8 -*- # # Tuxemon # Copyright (C) 2014, William Edwards <shadowapex@gmail.com>, # Benjamin Bean <superman2k5@gmail.com> # # This file is part of Tuxemon. # # Tuxemon is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pu...
andrefbsantos/Tuxemon
tuxemon/core/components/log.py
Python
gpl-3.0
1,644
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import frappe from frappe import _ from frappe.utils import flt def get_context(context): context.no_cache = 1 context.show_sidebar = True context.doc = frappe.get_doc(frappe.form_dict.d...
mhbu50/erpnext
erpnext/templates/pages/material_request_info.py
Python
gpl-3.0
1,743
#! /usr/bin/env python3 """ services-wrapper A small tool which wraps around check-services.php and tries to guide the services process with a more modern approach with a Queue and workers. Based on the original version of poller-wrapper.py by Job Snijders Author: Neil Lathwo...
rasssta/librenms
services-wrapper.py
Python
gpl-3.0
14,784
from lib.testdata import CourseTestCase from exercise.cache.content import CachedContent from exercise.cache.points import CachedPoints from .models import Threshold class ThresholdTest(CourseTestCase): class MockCachedPoints: def __init__(self, total_data): self.data = total_data de...
teemulehtinen/a-plus
threshold/tests.py
Python
gpl-3.0
7,011
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2013 Star2Billing S.L. # # The Initia...
garyjs/Newfiesautodialer
newfies/dialer_campaign/admin.py
Python
mpl-2.0
9,353
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2011-2013 Serpent Consulting Services Pvt. Ltd. (<http://serpentcs.com>). # # This progr...
ovnicraft/openerp-restaurant
poi_pos_table_designer/controllers/__init__.py
Python
agpl-3.0
1,093
""" Django admin dashboard configuration. """ from config_models.admin import ConfigurationModelAdmin, KeyedConfigurationModelAdmin from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from common.djangoapps.xblock_django.models import XBlockConfiguration, XBlockStudioConfiguratio...
eduNEXT/edunext-platform
common/djangoapps/xblock_django/admin.py
Python
agpl-3.0
2,485
"""Deprecated import support. Auto-generated by import_shims/generate_shims.sh.""" # pylint: disable=redefined-builtin,wrong-import-position,wildcard-import,useless-suppression,line-too-long from import_shims.warn import warn_deprecated_import warn_deprecated_import('grades.exceptions', 'lms.djangoapps.grades.excepti...
eduNEXT/edunext-platform
import_shims/lms/grades/exceptions.py
Python
agpl-3.0
374
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
TheTimmy/spack
var/spack/repos/builtin/packages/r-leaflet/package.py
Python
lgpl-2.1
2,218
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
TheTimmy/spack
var/spack/repos/builtin/packages/saws/package.py
Python
lgpl-2.1
1,762
# 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 RGdsfmt(RPackage): """R Interface to CoreArray Genomic Data Structure (GDS) Files. ...
iulian787/spack
var/spack/repos/builtin/packages/r-gdsfmt/package.py
Python
lgpl-2.1
1,729
"""Test suite for the profile module.""" import sys import pstats import unittest from difflib import unified_diff from io import StringIO from test.support import run_unittest import profile from test.profilee import testfunc, timer class ProfileTest(unittest.TestCase): profilerclass = profile....
harmy/kbengine
kbe/res/scripts/common/Lib/test/test_profile.py
Python
lgpl-3.0
7,166
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
USGM/suds
tests/saxenc.py
Python
lgpl-3.0
1,896
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
brianrodri/oppia
core/controllers/recent_commits_test.py
Python
apache-2.0
6,058
import unittest from robotide.controller.filecontrollers import ResourceFileControllerFactory class ResourceFileControllerFactoryTestCase(unittest.TestCase): def setUp(self): namespace = lambda:0 project = lambda:0 self._resource_file_controller_factory = ResourceFileControllerFactory(nam...
fingeronthebutton/RIDE
utest/controller/test_resourcefilecontrollerfactory.py
Python
apache-2.0
1,771
import demowlcutils from demowlcutils import ppxml, WLC_login from pprint import pprint as pp from jnpr.wlc import WirelessLanController as WLC wlc = WLC(host='a', user='b', password='c') r = wlc.RpcMaker( target='vlan', name='Jeremy') # you can access the following attributes, refer to the jnpr.wlc.builder # file...
trmccart/py-jnprwlc
examples/maker.py
Python
apache-2.0
369
# # Copyright 2006 The Apache Software Foundation # # 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...
moreus/hadoop
hadoop-0.11.2/src/contrib/abacus/examples/pyAbacus/JythonAbacus.py
Python
apache-2.0
2,577
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ve...
sparkslabs/kamaelia_
Sketches/MPS/Random/MSChooser.py
Python
apache-2.0
3,281
from share.transform.chain import * # noqa class AgentIdentifier(Parser): uri = IRI(ctx) class WorkIdentifier(Parser): uri = IRI(ctx) class Tag(Parser): name = ctx class ThroughTags(Parser): tag = Delegate(Tag, ctx) class Person(Parser): given_name = ParseName(ctx.creator).first famil...
CenterForOpenScience/SHARE
share/transformers/com_biomedcentral.py
Python
apache-2.0
1,752
"""Test zha sensor.""" from unittest import mock import pytest import zigpy.zcl.clusters.general as general import zigpy.zcl.clusters.homeautomation as homeautomation import zigpy.zcl.clusters.measurement as measurement import zigpy.zcl.clusters.smartenergy as smartenergy from homeassistant.components.sensor import D...
titilambert/home-assistant
tests/components/zha/test_sensor.py
Python
apache-2.0
10,606
# 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): # Adding field 'VoterFile.voter_file_content' db.add_column('helios_voterfile', 'voter_file_content', self...
dmgawel/helios-server
helios/south_migrations/0007_auto__add_field_voterfile_voter_file_content__chg_field_voterfile_vote.py
Python
apache-2.0
11,336
# coding=utf-8 # Copyright 2016 The TF-Slim 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 require...
google-research/tf-slim
tf_slim/training/__init__.py
Python
apache-2.0
701
from __future__ import absolute_import from __future__ import print_function from django.core.management.base import BaseCommand import sys from zerver.lib.actions import do_deactivate_realm from zerver.models import get_realm class Command(BaseCommand): help = """Script to deactivate a realm.""" def add_a...
dwrpayne/zulip
zerver/management/commands/deactivate_realm.py
Python
apache-2.0
789
# 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...
TuSimple/mxnet
python/mxnet/contrib/onnx/_import/import_onnx.py
Python
apache-2.0
6,849
#!/usr/bin/env python3 # author: @netmanchris # This section imports required libraries import requests import json from pyhpeimc.plat.device import * HEADERS = {'Accept': 'application/json', 'Content-Type': 'application/json', 'Accept-encoding': 'application/json'} """ This section deals with HPE IMC Custom ...
HPNetworking/HP-Intelligent-Management-Center
build/lib/pyhpeimc/plat/groups.py
Python
apache-2.0
9,544