code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
#!C:\ImageScript\ProgramData\SystemFiles\Python\python.exe # $Id: rst2xetex.py 7847 2015-03-17 17:30:47Z milde $ # Author: Guenter Milde # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing Lua/XeLaTeX code. """ try: import locale locale....
kenshay/ImageScript
ProgramData/SystemFiles/Python/Scripts/rst2xetex.py
Python
gpl-3.0
911
# -*- encoding: utf-8 -*- def is_assignable_integer(expr): r'''Is true when `expr` is equivalent to an integer and can be written without recourse to ties. :: >>> for n in range(0, 16 + 1): ... print('%s\t%s' % (n, mathtools.is_assignable_integer(n))) ... 0 False ...
mscuthbert/abjad
abjad/tools/mathtools/is_assignable_integer.py
Python
gpl-3.0
835
#!/usr/bin/python # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
roadmapper/ansible
lib/ansible/modules/cloud/amazon/ec2_asg_info.py
Python
gpl-3.0
13,876
import sys import unittest from test.support import run_unittest L = [ ('0', 0), ('1', 1), ('9', 9), ('10', 10), ('99', 99), ('100', 100), ('314', 314), (' 314', 314), ('314 ', 314), (' \t\t 314 \t\t ', 314), (repr(sys.maxsize...
mancoast/CPythonPyc_test
fail/314_test_int.py
Python
gpl-3.0
12,101
# -*- coding: utf-8 -*- """This module contains forms used in the judge app.""" from django import forms from django.utils.translation import ugettext_lazy as _ from .models import Submission, PrintRequest class SubmissionForm(forms.ModelForm): """Submission creation form class.""" source = forms.CharFiel...
Czocher/zebra-supervisor
judge/forms.py
Python
gpl-3.0
2,423
#!/bin/env python ''' nsot ==== Ansible Dynamic Inventory to pull hosts from NSoT, a flexible CMDB by Dropbox Features -------- * Define host groups in form of NSoT device attribute criteria * All parameters defined by the spec as of 2015-09-05 are supported. + ``--list``: Returns JSON hash of host groups -> ho...
eerorika/ansible
contrib/inventory/nsot.py
Python
gpl-3.0
9,862
#! /usr/bin/env python3 import getopt import os import os.path import re import socket import subprocess import sys import threading import time import tokenize import io import linecache from code import InteractiveInterpreter from platform import python_version, system try: from tkinter import * except ImportE...
TNT-Samuel/Coding-Projects
DNS Server/Source/Lib/site-packages/idlexlib/idlefork/idlelib/PyShell.py
Python
gpl-3.0
58,870
# telepathy-mixer - a MXit connection manager for Telepathy # # Copyright (C) 2008 Ralf Kistner <ralf.kistner@gmail.com> # # Adapted from telepathy-butterfly, # Copyright (C) 2006-2007 Ali Sabil <ali.sabil@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the...
detrout/telepathy-mixer
mixer/channel/contact_list.py
Python
gpl-3.0
12,479
#!/usr/bin/python #NoSQLMap Copyright 2014 Russell Butturini #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, or #(at your option) any later version. #This program...
xujun10110/NoSQLMap
nsmmongo.py
Python
gpl-3.0
10,706
from clatoolkit.models import UnitOffering from models import al2_classifier as c class ActiveLearning_Squared(object): def __init__(self, unit_id): self.classification_models = UnitOffering.get_al_classifiers() def train_(construct): for model_id in self.classification_models: c...
kojiagile/CLAtoolkit
clatoolkit_project/dashboard/active_learning_squared.py
Python
gpl-3.0
573
#!/usr/bin/env python # # ELBE - Debian Based Embedded Rootfilesystem Builder # Copyright (C) 2013 Linutronix GmbH # # This file is part of ELBE. # # ELBE 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, eithe...
kennethlyn/elbe
elbepack/dbaction.py
Python
gpl-3.0
11,087
# -*- coding: utf-8 -*- from lxml import objectify import urlparse import openerp from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment.tests.common import PaymentAcquirerCommon from openerp.addons.payment_buckaroo.controllers.main import BuckarooController from opener...
akhmadMizkat/odoo
addons/payment_buckaroo/tests/test_buckaroo.py
Python
gpl-3.0
8,131
# Django Imports from django.apps import AppConfig # Implementation class MyConfig(AppConfig): name = 'ava.gather.abstract' label = 'ava_gather_abstract'
alzeih/ava
ava_core/gather/gather_abstract/apps.py
Python
gpl-3.0
165
#! /usr/bin/env python3 import pytest from ws.client.api import LoginFailed # TODO: pytest attribute #@attr(speed="slow") @pytest.mark.skip(reason="The api fixture was removed.") class test_site: """ Tests intended mostly for detecting changes in the ArchWiki configuration. """ props_data = { "gene...
kynikos/wiki-scripts
tests/with_api/test_site.py
Python
gpl-3.0
30,199
python from spec.python import db_connection from spec.browser import conftest import time, operator from selenium import webdriver from selenium.webdriver.common.keys import Keys from sam.models.datasources import Datasources browser = conftest.get_browser() host = "http://localhost:8080/" browser.get(host + "metadata...
JoePelz/SAM
spec/browser/manual.py
Python
gpl-3.0
323
# 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/. from configman import Namespace, RequiredConfig from configman.converters import class_converter from functools import ...
KaiRo-at/socorro
socorro/external/fs/fs_new_crash_source.py
Python
mpl-2.0
1,974
# -*- coding: utf-8 -*- # Copyright (c) 2015 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of CKAN Data Requests Extension. # CKAN Data Requests Extension 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 F...
keitaroinc/ckanext-datarequests
ckanext/datarequests/auth.py
Python
agpl-3.0
2,561
# -*- coding: UTF-8 -*- logger.info("Loading 30 objects to table vatless_accountinvoice...") # fields: voucher_ptr, project, partner, payment_term, match, bank_account, your_ref, due_date, amount loader.save(create_vatless_accountinvoice(1,116,220,None,u'',1,u'',date(2014,6,21),'10.00')) loader.save(create_vatless_acco...
lino-framework/welfare
lino_welfare/projects/gerd/tests/dumps/18.8.0/vatless_accountinvoice.py
Python
agpl-3.0
3,064
# Generated by Django 2.0.2 on 2018-05-21 16:37 from django.db import migrations import news.models import snippets.models import wagtail.core.blocks import wagtail.core.fields class Migration(migrations.Migration): dependencies = [ ('news', '0029_pressindex_mentions'), ] operations = [ ...
openstax/openstax-cms
news/migrations/0030_auto_20180521_1137.py
Python
agpl-3.0
765
""" Unit test tasks """ import os import sys from paver.easy import sh, task, cmdopts, needs, call_task from pavelib.utils.test import suites from pavelib.utils.envs import Env from optparse import make_option try: from pygments.console import colorize except ImportError: colorize = lambda color, text: text #...
sameetb-cuelogic/edx-platform-test
pavelib/tests.py
Python
agpl-3.0
8,641
# encoding: utf-8 # HTML preview of the dimensions and table (will be moved to a function in databakersolo) import io, os, collections, re, warnings, csv, datetime import databaker.constants from databaker.jupybakeutils import ConversionSegment template = databaker.constants.template try: import pandas except Impor...
scraperwiki/databaker
databaker/jupybakecsv.py
Python
agpl-3.0
15,056
""" Miscellaneous waffle switches that both LMS and Studio need to access """ from edx_toggles.toggles import LegacyWaffleSwitchNamespace # Namespace WAFFLE_NAMESPACE = u'course_experience' # Switches # .. toggle_name: course_experience.enable_about_sidebar_html # .. toggle_implementation: WaffleSwitch # .. toggle_...
eduNEXT/edunext-platform
openedx/features/course_experience/waffle.py
Python
agpl-3.0
1,160
''' Gmvault: a tool to backup and restore your gmail account. Copyright (C) <since 2011> <guillaume Aubert (guillaume dot aubert at gmail do com)> This program 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 Fr...
gaubert/gmvault
src/sandbox/gmvault_multiprocess.py
Python
agpl-3.0
77,477
from datetime import datetime from django.db import models from django.conf import settings from model_utils import Choices class AutoCreatedField(models.DateTimeField): """ A DateTimeField that automatically populates itself at object creation. By default, sets editable=False, default=datetime.now....
mzdaniel/oh-mainline
vendor/packages/django-model-utils/model_utils/fields.py
Python
agpl-3.0
8,099
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.conf import s...
shoopio/shoop
shuup/simple_cms/admin_module/form_parts.py
Python
agpl-3.0
1,537
# -*- encoding: utf-8 -*- import decimal_precision as dp from osv import fields, osv from tools.translate import _ class sale_order(osv.osv): _inherit = 'sale.order' def onchange_partner_id(self, cr, uid, ids, part, shop_id=False, fiscal_operation_category_id=False): result = super(sale_order, self)...
proge/openerp-pt_br
l10n_br_sale/sale.py
Python
agpl-3.0
21,649
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from datetime import datetime start_2019_2020 = datetime(2019, 6, 2) end_2019_2020 = datetime(2020, 6, 1) def add_year(apps, schema_editor): StudentClubYear = apps.get_model('core', 'StudentClubYear') St...
enjaz/enjaz
core/migrations/0017_add_2019_2020_years.py
Python
agpl-3.0
893
#!/usr/bin/python import sys import os try: import py.test except ImportError: print('Unable to import py.test. Is py.test installed?') sys.exit(1) # Find oz prefix = '.' for i in range(0,3): if os.path.isdir(os.path.join(prefix, 'oz')): sys.path.insert(0, prefix) break else: ...
clalancette/oz
tests/ozutil/test_ozutil.py
Python
lgpl-2.1
15,051
from twisted.internet import protocol from twisted.internet import reactor class Echo(protocol.Protocol): def dataReceived(self, data): self.transport.write(data) def main(): factory = protocol.ServerFactory() #定义一个factory factory.protocol = Echo #定义protocol,Echo reactor.listenTCP(1234...
XiaJieCom/change
stu103151/days10/EchoServer.py
Python
lgpl-2.1
431
#!/usr/bin/python # # Visulization model of Chris's MAX-NC mill, as modified to 5-axis # # Copyright 2007 John Kasunich # Derived from a work by John Kasunich, Jeff Epler, and Chris Radek # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Publ...
bmwiedemann/linuxcnc-mirror
src/hal/user_comps/vismach/max5gui.py
Python
lgpl-2.1
5,032
from IPython import display from IPython import get_ipython from IPython.core.extensions import ExtensionManager import ROOT import utils def iPythonize(): utils.setStyle() for capture in utils.captures: capture.register() ExtensionManager(get_ipython()).load_extension("ROOTaaS.iPyROOT.cppmagic") Exten...
sbinet/cxx-root
bindings/pyroot/ROOTaaS/iPyROOT/__init__.py
Python
lgpl-2.1
1,023
# -*- coding: utf-8 -*- # # CORE documentation build configuration file, created by # sphinx-quickstart on Mon Aug 17 18:19:40 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
igemsoftware/SYSU-Software-2015
docs/conf.py
Python
lgpl-3.0
9,502
import sys def setup(core, object): return #Abstract Painting of Golden Petals 1
agry/NGECore2
scripts/object/tangible/painting/painting_bestine_golden_flower_01.py
Python
lgpl-3.0
85
from setuptools import setup, find_packages setup( name='servant', packages=find_packages(exclude=['test', 'examples', 'examples.*']), version = '0.1.4', description = 'A library for building services', author='Brian Zambrano', author_email='brianz@clearcareonline.com', url='https://github....
clearcare/servant
setup.py
Python
lgpl-3.0
922
"""Tests for Actors""" import unittest import os import pymunk from helper import * import serge.actor import serge.visual import serge.world import serge.zone class TestActor(unittest.TestCase): """Tests for the Actor""" def setUp(self): """Set up the tests""" serge.visual.Register.clearIt...
smmosquera/serge
test/testactor.py
Python
lgpl-3.0
39,793
''' (*)~--------------------------------------------------------------------------- Pupil - eye tracking platform Copyright (C) 2012-2017 Pupil Labs Distributed under the terms of the GNU Lesser General Public License (LGPL v3.0). See COPYING and COPYING.LESSER for license details. -----------------------------------...
teamCarel/EyeTracker
src/shared_modules/plugin.py
Python
lgpl-3.0
11,827
# Copyright (c) 2019 PaddlePaddle 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 appli...
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/npu/test_collective_base_npu.py
Python
apache-2.0
8,034
# # Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. # import uuid import svc_monitor.services.loadbalancer.drivers.abstract_driver as abstract_driver from vnc_api.vnc_api import ServiceTemplate, ServiceInstance, ServiceInstanceType from vnc_api.vnc_api import ServiceScaleOutType, ServiceInstanceInterf...
tcpcloud/contrail-controller
src/config/svc-monitor/svc_monitor/services/loadbalancer/drivers/ha_proxy/driver.py
Python
apache-2.0
18,327
#!/usr/bin/env python import itertools import urllib import requests import datetime as datetime import logging logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.INFO) def get_scenarios(): """ Creates a list of all the combinations of transaction_costs, transaction_sizes, fal...
alexwoolford/backtesting_the_dow
prototype/run_scenarios_using_api.py
Python
apache-2.0
3,370
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import sqlite3 from pathlib import Path from textwrap import dedent from pants.base.build_environment import get_buildroot from pants.testutil.pants_integration_test import PantsResult, r...
jsirois/pants
src/python/pants/backend/python/goals/coverage_py_integration_test.py
Python
apache-2.0
7,550
"""General utilities.""" import csv import datetime import json import sys from timeit import default_timer class Timer: """A context manager that times execution.""" def __enter__(self): self.start = default_timer() return self def __exit__(self, *args): self.end = default_tim...
elastic/examples
Machine Learning/Query Optimization/qopt/util.py
Python
apache-2.0
1,366
# Copyright 2017 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
dhermes/gcloud-python
datastore/google/cloud/datastore/_gapic.py
Python
apache-2.0
1,784
"""Test songpal media_player.""" from datetime import timedelta import logging from songpal import ( ConnectChange, ContentChange, PowerChange, SongpalException, VolumeChange, ) from homeassistant.components import media_player, songpal from homeassistant.components.songpal.const import SET_SOUND_...
nkgilley/home-assistant
tests/components/songpal/test_media_player.py
Python
apache-2.0
9,770
#! /usr/bin/env python # -*- coding: utf-8 -*- from app import (app, logging) from flask import (make_response, request) # globals from app import settings from app import AfricasTalkingGateway, AfricasTalkingGatewayException username = "IanJuma" apikey = "19d19757b8fa132c676109af3f79c246bffcb0835098d3eef5ce42dd84e...
AfricasTalkingLtd/Outreach
content/tutorials/python/intermediate/octopus/app/api/voice.py
Python
apache-2.0
4,809
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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...
apporc/nova
nova/tests/unit/api/ec2/test_apirequest.py
Python
apache-2.0
3,521
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
cloudera/hue
apps/hbase/src/hbase/views.py
Python
apache-2.0
5,062
# -*- coding: utf-8 -*- # # django-powerdns-manager documentation build configuration file, created by # sphinx-quickstart on Sun Nov 14 09:50:21 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerat...
kumina/django-powerdns-manager
docs/conf.py
Python
apache-2.0
8,532
# =============================================================================== # Copyright 2013 Jake Ross # # 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/licens...
USGSDenverPychron/pychron
pychron/database/orms/isotope/spec.py
Python
apache-2.0
1,874
# Copyright 2017 Capital One Services, 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...
Sutto/cloud-custodian
tests/test_sqs.py
Python
apache-2.0
16,249
''' This file holds all of the forms for the cleaning and validation of the parameters being used for friend requests. Created on Dec 20, 2013 @author: Andrew Oberlin, Jake Gregg ''' from django import forms from rememerme.games.models import GameMember from rememerme.games.rest.exceptions import ...
rememerme/marketplace-api
rememerme/marketplace/rest/phrase_decks/forms.py
Python
apache-2.0
4,031
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from absl import app from absl.testing import absltest from grr_response_server.databases import db_foreman_rules_test from grr_response_server.databases import mem_test_base from grr.t...
dunkhong/grr
grr/server/grr_response_server/databases/mem_foreman_rules_test.py
Python
apache-2.0
552
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Core iPOPO implementation :author: Thomas Calmant :copyright: Copyright 2016, Thomas Calmant :license: Apache License 2.0 :version: 0.6.4 .. Copyright 2016 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not...
isandlaTech/cohorte-devtools
qualifier/deploy/cohorte-home/repo/pelix/ipopo/core.py
Python
apache-2.0
44,963
from a10sdk.common.A10BaseClass import A10BaseClass class Network(A10BaseClass): """This class does not support CRUD Operations please use parent. :param broadcast: {"default": 0, "not-list": ["non-broadcast", "point-to-point", "point-to-multipoint"], "type": "number", "description": "Specify OSPF broad...
amwelch/a10sdk-python
a10sdk/core/interface/interface_trunk_ip_ospf_ospf_global.py
Python
apache-2.0
9,395
#!/usr/bin/env python """End to end tests for lib.flows.general.memory.""" import os from grr.client.components.rekall_support import rekall_types as rdf_rekall_types from grr.endtoend_tests import base from grr.lib import aff4 from grr.lib import config_lib from grr.lib import flow_runner class AbstractTestAnalyze...
pidydx/grr
grr/endtoend_tests/memory.py
Python
apache-2.0
8,572
# 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 ...
apache/libcloud
libcloud/test/compute/test_gogrid.py
Python
apache-2.0
11,318
# 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...
eadgarchen/tensorflow
tensorflow/python/data/ops/dataset_ops.py
Python
apache-2.0
67,494
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # FOMOD Designer documentation build configuration file, created by # sphinx-quickstart on Thu Jun 9 19:41:15 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in th...
GandaG/fomod-editor
docs/source/conf.py
Python
apache-2.0
10,461
# # Copyright 2013 IBM # # 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, softw...
pkilambi/ceilometer
ceilometer/dispatcher/__init__.py
Python
apache-2.0
1,954
options = dict( model_extensions=[ 'h2o.model.extensions.ScoringHistoryGLM', ], ) deprecated_params = dict(Lambda='lambda_') def update_param(name, param): if name == 'distribution': param['values'].remove('custom') return param return None # param untouched def class_extens...
h2oai/h2o-3
h2o-bindings/bin/custom/python/gen_gam.py
Python
apache-2.0
2,745
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 OpenStack 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...
wallnerryan/quantum_migrate
quantum/db/migration/alembic_migrations/versions/38335592a0dc_nvp_portmap.py
Python
apache-2.0
1,827
""" Auto-generated class for VMDiskInfo """ from . import client_support class VMDiskInfo(object): """ auto-generated. don't touch. """ @staticmethod def create(readIops, readThroughput, writeIops, writeThroughput): """ :type readIops: int :type readThroughput: int ...
zero-os/0-orchestrator
pyclient/zeroos/orchestrator/client/VMDiskInfo.py
Python
apache-2.0
3,104
import testtools from oslo_log import log from tempest.api.compute import base import tempest.api.compute.limits.test_absolute_limits as AbsoluteLimitsTest import tempest.api.compute.limits.test_absolute_limits_negative as AbsoluteLimitsNegativeTest from tempest.common.utils import data_utils from tempest.common impor...
HybridF5/tempest_debug
tempest/api/hybrid_cloud/compute/limits/test_limits_operations.py
Python
apache-2.0
1,851
# =============================================================================== # Copyright 2016 ross # # 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/LICE...
USGSDenverPychron/pychron
pychron/data_mapper/sources/usgs_vsc_source.py
Python
apache-2.0
7,123
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file...
petrutlucian94/nova_dev
nova/network/floating_ips.py
Python
apache-2.0
32,050
from flask_wtf import FlaskForm from wtforms import BooleanField, SelectField, StringField, SubmitField from wtforms.validators import URL, DataRequired class WebDiffBuilds(FlaskForm): control_baseurl = StringField('Control_BaseURL', validators=[DataRequired(), URL()]) test_b...
rdo-infra/ci-config
ci-scripts/infra-setup/roles/rrcockpit/files/compare_rpms/forms.py
Python
apache-2.0
1,120
"""The tests for the camera component.""" import asyncio import base64 import io from unittest.mock import patch, mock_open, PropertyMock import pytest from homeassistant.setup import setup_component, async_setup_component from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_ENTITY_PICTURE, EVENT_HOMEAS...
Cinntax/home-assistant
tests/components/camera/test_init.py
Python
apache-2.0
13,097
# Copyright (C) 2011 Nippon Telegraph and Telephone Corporation. # # 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...
serendipiddy/Network-Visualization-and-Performance-Prediction
simple_switch_13_lldp.py
Python
apache-2.0
5,071
from __future__ import division """ Author: Keith Bourgoin, Emmett Butler """ __license__ = """ Copyright 2015 Parse.ly, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.o...
wikimedia/operations-debs-python-pykafka
pykafka/connection.py
Python
apache-2.0
8,178
# Copyright 2016-2017 Capital One Services, 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 ...
scotwk/cloud-custodian
tests/test_cli.py
Python
apache-2.0
18,824
from slamon.agent.handlers import TaskHandler @TaskHandler("wait", 1) def wait_task_handler(input_params): """ Agent for prototyping. Will wait for approximately the specified timeout, with slight random factor. """ import time import random timeout = float(input_params['time']) - 0.5 + r...
SLAMon/SLAMon
slamon/agent/handlers/wait_task_handler.py
Python
apache-2.0
388
# # Copyright (c) 2006-2019, RT-Thread Development Team # # SPDX-License-Identifier: Apache-2.0 # # Change Logs: # Date Author Notes # 2019-03-21 Bernard the first version # 2019-04-15 armink fix project update error # import os import sys import glob from utils import * from utils ...
FlyLu/rt-thread
tools/eclipse.py
Python
apache-2.0
12,996
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
queria/my-tempest
tempest/api/compute/servers/test_list_servers_negative.py
Python
apache-2.0
6,720
from cryptography.hazmat.primitives.ciphers.modes import CBC from cryptography.hazmat.primitives.ciphers.modes import ECB # Insecure mode mode = ECB(iv) # Secure cipher and mode cipher = AES.new(key, blockalgo.MODE_CTR, iv) # Secure mode mode = CBC(iv)
chair6/bandit
examples/cipher-modes.py
Python
apache-2.0
257
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
djkonro/client-python
kubernetes/client/models/v1_subject_access_review_status.py
Python
apache-2.0
5,495
# Copyright (c) 2011 OpenStack 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 applicab...
Juniper/nova
nova/tests/unit/virt/libvirt/fake_libvirt_utils.py
Python
apache-2.0
3,837
# -*- coding: utf-8 -*- """Extensions module. Each extension is initialized in the app factory located in app.py.""" from flask_bcrypt import Bcrypt from flask_caching import Cache from flask_debugtoolbar import DebugToolbarExtension from flask_jwt_extended import JWTManager from flask_login import LoginManager from fl...
OpenEdgeComputing/elijah-openstack
cloudlet-gateway/caas/extensions.py
Python
apache-2.0
618
## @file # This file is used to create/update/query/erase table for dec datas # # Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distri...
google/google-ctf
third_party/edk2/BaseTools/Source/Python/Table/TableDec.py
Python
apache-2.0
4,956
# -*- 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...
goose3/goose
tests/test_article.py
Python
apache-2.0
1,063
# Copyright 2017 Mario Graff Guerrero # 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 wri...
mgraffg/EvoDAG
EvoDAG/tests/test_function_selection.py
Python
apache-2.0
3,005
# -*- coding: utf-8 -*- import pytest from fixture.application import Application from model.group import Group @pytest.fixture() def app(request): fixture = Application() request.addfinalizer(fixture.destroy) return fixture def test_add_group(app): app.session.login(username="admin",password="secre...
Manolaru/Python_train
Les_2/Task_7/test/test_add_group.py
Python
apache-2.0
614
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
KaranToor/MA450
google-cloud-sdk/lib/surface/compute/backend_services/describe.py
Python
apache-2.0
2,085
from hazelcast.serialization.bits import * from hazelcast.protocol.client_message import ClientMessage from hazelcast.protocol.custom_codec import * from hazelcast.util import ImmutableLazyDataList from hazelcast.protocol.codec.replicated_map_message_type import * REQUEST_TYPE = REPLICATEDMAP_CONTAINSKEY RESPONSE_TYPE...
cangencer/hazelcast-python-client
hazelcast/protocol/codec/replicated_map_contains_key_codec.py
Python
apache-2.0
1,154
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
crobby/sahara
sahara/service/engine.py
Python
apache-2.0
11,510
def setup_solr_hdfs_support(): import params # Create a home directory for solr user params.HdfsResource( params.solr_hdfs_home_directory, type="directory", action="create_on_execute", owner=params.solr_config_user ) params.HdfsResource(params.solr_hdfs_directory, ...
alexryndin/ambari
ambari-server/src/main/resources/stacks/ADH/1.4/services/SOLR/package/scripts/setup_solr_hdfs_support.py
Python
apache-2.0
493
import sys if sys.version_info[0:2] < (2, 7) or \ sys.version_info[0:2] in ( (3, 0), (3, 1) ): try: import unittest2 as unittest except ImportError: import unittest else: import unittest from pysmi.parser.smi import parserFactory from pysmi.codegen.pysnmp import PySnmpCodeGen from pysmi.c...
shreesundara/netsnmp
tests/test_objecttype_smiv2_pysnmp.py
Python
bsd-2-clause
16,981
import warnings from matplotlib.testing.decorators import image_comparison, cleanup from matplotlib.cbook import MatplotlibDeprecationWarning import matplotlib.pyplot as plt import numpy as np from nose.tools import assert_raises from cycler import cycler @image_comparison(baseline_images=['color_cycle_basic'], rem...
unnikrishnankgs/va
venv/lib/python3.5/site-packages/matplotlib/tests/test_cycles.py
Python
bsd-2-clause
8,086
#!/usr/bin/env python """Common datastore definitions""" __author__ = 'Michael Meisinger' from putil.logging import log from pyon.core.exception import BadRequest from pyon.util.containers import get_safe, named_any, DotDict class DataStore(object): """ Common definitions and base class for data stores ...
crchemist/scioncc
src/pyon/datastore/datastore_common.py
Python
bsd-2-clause
11,201
from sympy import Order, S, log, limit from sympy.core.basic import Basic from sympy.core import Add, Mul, Pow from sympy.logic.boolalg import And from sympy.core.expr import AtomicExpr, Expr from sympy.core.numbers import _sympifyit, oo from sympy.core.sympify import _sympify from sympy.sets.sets import (Interval, Int...
rahuldan/sympy
sympy/calculus/util.py
Python
bsd-3-clause
33,609
import json import logging import time import re from datetime import datetime from functools import wraps from django.conf import settings from django.contrib import messages from django.contrib.auth.models import User from django.core.cache import cache from django.core.exceptions import PermissionDenied from django...
safwanrahman/kitsune
kitsune/wiki/views.py
Python
bsd-3-clause
62,318
"""NDG OAuth 2.0 Short-lived credential service client app example """ __author__ = "Philip Kershaw" __date__ = "24/08/12" __copyright__ = "(C) 2012 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc.ac.uk" __revision__ = "$Id$"
cedadev/ndg_oauth
ndg_oauth_client/ndg/oauth/client/examples/slcs/__init__.py
Python
bsd-3-clause
320
from __future__ import print_function, division from sympy.core.basic import Basic from sympy.core.mul import Mul from sympy.core.singleton import S, Singleton from sympy.core.symbol import Dummy, Symbol from sympy.core.compatibility import (range, integer_types, with_metaclass, i...
Gadal/sympy
sympy/series/sequences.py
Python
bsd-3-clause
26,678
""" The main QuerySet implementation. This provides the public API for the ORM. """ from collections import deque, OrderedDict import copy import sys import warnings from django.conf import settings from django.core import exceptions from django.db import (connections, router, transaction, IntegrityError, DJANGO_...
iambibhas/django
django/db/models/query.py
Python
bsd-3-clause
77,504
""" Gevent versions of RPC client, service and load-balancer Authors: * Brian Granger * Alexander Glyzov Example ------- To create a simple service:: from netcall.green import GreenRPCService echo = GreenRPCService() @echo.task def echo(self, s): return s echo = Echo() echo.bind(...
srault95/netcall
netcall/green/__init__.py
Python
bsd-3-clause
1,399
# coding: utf-8 # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Test matmul replacement. """ from __future__ import (absolute_import, unicode_literals, division, print_function) import numpy as np import pytest from ..core.multiarray import matmul, GE1P10 def test_import...
kelle/astropy
astropy/utils/compat/numpy/tests/test_matmul.py
Python
bsd-3-clause
1,947
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Compares the text output to the expected text output while ignoring positions and sizes of elements/text. If the output doesn't match, returns F...
amyvmiwei/chromium
webkit/tools/layout_tests/test_types/simplified_text_diff.py
Python
bsd-3-clause
4,760
#! /usr/bin/env python # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) 2011-2015, Michigan State University. # Copyright (C) 2015, The Regents of the University of California. # # Redistribution and use in source and binary forms, with or without # modification, are permitted pro...
souravsingh/khmer
sandbox/sweep-out-reads-with-contigs.py
Python
bsd-3-clause
2,537
# coding: utf-8 import webapp2 import logging from importlib import import_module class CronHandler(webapp2.RequestHandler): def get(self, task_name): # self.response.write('Cron') try: job = import_module('.jobs.{0}'.format(task_name), __name__) job.run() self....
paulsnar/edaemon
application/cron/__init__.py
Python
bsd-3-clause
568
# Copyright (c) 2014, Facebook, Inc. All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # __version__ = '0.7.1'
pshuff/sparts
sparts/__init__.py
Python
bsd-3-clause
310
# -*- coding: utf-8 -*- from django.contrib.admin.widgets import * class RangeSelectionForm(forms.Form): """ Form which allows to select the Range in which the work item can be registered and which define which range of work items are loaded from the database and shown to the user """ from_da...
dario61081/koalixcrm
koalixcrm/crm/views/range_selection_form.py
Python
bsd-3-clause
1,964
from local_tests import * from blip_tests import *
jtrain/django-cloud-media
cloud_media/tests/tests.py
Python
bsd-3-clause
51