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 -*- # Copyright 2020 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...
googleapis/python-aiplatform
samples/generated_samples/aiplatform_generated_aiplatform_v1_vizier_service_complete_trial_sync.py
Python
apache-2.0
1,480
# 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...
girving/tensorflow
tensorflow/python/keras/optimizer_v2/adagrad.py
Python
apache-2.0
4,793
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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.apach...
yamt/neutron
quantum/tests/unit/test_servicetype.py
Python
apache-2.0
20,304
# -*- coding: utf-8 -*- __author__ = 'M.Novikov' from sys import maxsize class Address: def __init__(self, id=None, first_name=None, middle_name=None, last_name=None, nickname=None, title=None, company=None, address=None, tel_home=None, tel_mobile=None, tel_work=None, tel_fax=N...
NovikovMA/python_training
model/address.py
Python
apache-2.0
2,625
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
QISKit/qiskit-sdk-py
qiskit/providers/basicaer/basicaerjob.py
Python
apache-2.0
4,441
#!/usr/bin/env python # # Copyright 2016 timercrack # # 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...
timercrack/pydatacoll
pydatacoll/utils/__init__.py
Python
apache-2.0
755
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Li...
bernard357/shellbot
shellbot/stores/sqlite.py
Python
apache-2.0
5,489
# 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...
shakamunyi/sahara
sahara/service/edp/api.py
Python
apache-2.0
8,394
# Copyright (c) 2014 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...
shakamunyi/sahara
sahara/tests/unit/plugins/vanilla/hadoop2/test_validation.py
Python
apache-2.0
4,497
import do_test if __name__ == '__main__': do_test.EXTRACTOR = 'boilerpipe' do_test.test()
muggot/python-goose
tests/suite/bp_test.py
Python
apache-2.0
100
# coding=utf-8 # Copyright 2019 The Interval Bound Propagation Authors. # # 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 ...
deepmind/interval-bound-propagation
examples/train.py
Python
apache-2.0
10,867
######################################################################## # amara/xslt/expressions/avt.py """ Implementation of XSLT attribute value templates """ from amara.xpath import datatypes from amara.xpath.expressions import expression from amara.xslt import XsltError from amara.xslt.expressions import _avt _p...
zepheira/amara
lib/xslt/expressions/avt.py
Python
apache-2.0
1,540
# coding=utf-8 ############################################################################### ## ## Copyright 2011-2013 Tavendo GmbH ## ## 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 Lic...
mogui/AutobahnTestSuite
autobahntestsuite/autobahntestsuite/case/case6_x_x.py
Python
apache-2.0
15,655
# Copyright 2018 The TensorFlow Hub 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 app...
tensorflow/hub
tensorflow_hub/compressed_module_resolver.py
Python
apache-2.0
3,271
import os from faker import Faker import pytest from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.select import Select from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from wheel.signatures...
dmchu/selenium_gr_5
tests/day_6/hw_day_6_task_12.py
Python
apache-2.0
3,837
#!/urs/bin/python import os import graphviz # from gk_node import GKNode # from gk_link import GKLink class GKGraphic(object): """Manage graphic""" def __init__(self, label=None): self.m_label = label self.m_nodes_list = [] self.m_link_list = [] def add_link(self, link): "...
terranum-ch/GraphLink
graphlink/core/gk_graphic.py
Python
apache-2.0
1,424
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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 ...
kdart/pycopia
XML/pycopia/XML/DTD.py
Python
apache-2.0
8,510
# Copyright (c) 2014 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 applicable law or agreed to ...
rmadapur/networking-brocade
networking_brocade/vdx/tests/unit/ml2/drivers/brocade/test_brocade_l3_plugin.py
Python
apache-2.0
2,112
# Copyright 2020 Google # # 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 or agreed to in writing, soft...
quantumlib/ReCirq
recirq/hfvqe/analysis_test.py
Python
apache-2.0
6,819
from model.contact import Contact import re from fixture.group import GroupHelper __author__ = 'Max' class ContactHelper: def __init__(self, app): self.app = app def change_field_value(self,field_name,text): wd = self.app.wd if text is None: wd.find_element_by_name(field_...
mihushynmaksym/Python_Training
fixture/contact.py
Python
apache-2.0
3,371
import os import sys from unittest import TestCase from pkg_resources import DistributionNotFound from apsconnectcli.apsconnect import ( GITHUB_RELEASES_PAGE, bin_version, get_version, get_latest_version, main, APSConnectUtil, ) if sys.version_info >= (3,): from unittest.mock import patch...
ingrammicro/apsconnect-cli
tests/test_apsconnect_internals.py
Python
apache-2.0
4,800
# This is helper cell that defines code checking (testing) function Check() # Please run it once, but you do not need to understand it. import re import sys import jinja2 from IPython.core import display from prog_edu_assistant_tools.magics import report, autotest, CaptureOutput from google.colab import _message as goo...
google/prog-edu-assistant
python/colab/preamble.py
Python
apache-2.0
4,093
import mock from pantsmud.driver import hook from spacegame.core import hook_types from spacegame.universe.star_system import StarSystem from spacegame.universe.universe import Universe from tests.unit.util import UnitTestCase class StarSystemUnitTestCase(UnitTestCase): def setUp(self): UnitTestCase.setUp...
ecdavis/spacegame
tests/unit/test_star_system.py
Python
apache-2.0
3,976
# Copyright 2018 The Cirq Developers # # 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 or agreed to in ...
quantumlib/Cirq
cirq-google/cirq_google/line/placement/optimization.py
Python
apache-2.0
4,663
import logging from sevenbridges.meta.resource import Resource from sevenbridges.meta.fields import HrefField, StringField from sevenbridges.meta.transformer import Transform logger = logging.getLogger(__name__) class User(Resource): """ Central resource for managing users. """ _URL = { 'me'...
sbg/sevenbridges-python
sevenbridges/models/user.py
Python
apache-2.0
2,815
# Copyright (c) 2014 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 ...
rdo-management/neutron
neutron/db/l3_dvr_db.py
Python
apache-2.0
31,991
# Copyright 2020 DeepMind Technologies Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
deepmind/dm_robotics
py/moma/sensors/robotiq_gripper_sensor_test.py
Python
apache-2.0
1,597
# Common functions used in this project import os def get_integration_folder(): """ returns the integration test folder """ return os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) def get_config_folder(): """ returns the config folder """ return os.path.join(get_i...
cloudfoundry-community/splunk-firehose-nozzle
testing/integration/lib/helper.py
Python
apache-2.0
507
lines = open('line.txt', 'r').readlines() lines_set = set(lines) out = open('workfile.txt', 'w') for line in lines_set: out.write(line)
miller-tamil/research_on_email_marketting
web1_ads/Line_separator.py
Python
apache-2.0
144
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2017 Ricequant, 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 r...
xclxxl414/rqalpha
tests/mod/sys_accounts/test_account_model.py
Python
apache-2.0
2,003
from distutils.core import setup setup( name = 'threadurl', version = '0.0.1', py_modules = ['threadurl'], author = 'renanvicente', author_email = 'renanvice@gmail.com', url = 'http://github.com/renanvicente/threadurl', description = 'A simple way to send a lot of requests using t...
renanvicente/threadurl
setup.py
Python
apache-2.0
332
# coding=utf-8 # Copyright 2021 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 ...
google/feedloader
appengine/initiator/main.py
Python
apache-2.0
8,653
# Copyright 2022 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ This module provides affiliations of the current user """ import logging import traceback from myuw.dao import log_err from myuw.dao.exceptions import IndeterminateCampusException from myuw.dao.enrollment import ( get_main_...
uw-it-aca/myuw
myuw/dao/affiliation.py
Python
apache-2.0
7,365
# Copyright (c) 2012 - 2014 EMC 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 # # Unle...
jumpstarter-io/cinder
cinder/volume/drivers/emc/emc_vmax_common.py
Python
apache-2.0
94,140
# Copyright 2020 The FedLearner 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...
bytedance/fedlearner
fedlearner/model/tree/trainer.py
Python
apache-2.0
21,533
# -*- coding: utf-8 -*- import pytest from numpy import array from numpy.testing import assert_array_almost_equal from gdal2mbtiles.constants import (EPSG_WEB_MERCATOR, EPSG3857_EXTENTS) from gdal2mbtiles.gdal import SpatialReference @pytest.fixture def epsg_3857_from_proj4(): ...
ecometrica/gdal2mbtiles
tests/test_spatial_reference.py
Python
apache-2.0
1,178
# 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...
petewarden/tensorflow
tensorflow/compiler/tests/stateful_random_ops_test.py
Python
apache-2.0
17,958
# -*- coding: utf-8 -*- # Copyright (C) 2010-2014 Tobias Weber <tobi-weber@gmx.de> # # 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 ...
tobi-weber/levitas
src/levitas/middleware/redirectMiddleware.py
Python
apache-2.0
1,326
from syft import TensorBase import syft import unittest import numpy as np import math # Here's our "unit tests". class DimTests(unittest.TestCase): def testDimOne(self): t = TensorBase(np.array([1, 2, 3])) self.assertTrue(t.dim() == 1) def testView(self): t = TensorBase([1.0, 2.0, 3....
aradhyamathur/PySyft
tests/test_tensor.py
Python
apache-2.0
32,231
import bambu_cron bambu_cron.autodiscover() class CronMiddleware(object): def process_request(self, *args, **kwargs): bambu_cron.site.run()
iamsteadman/bambu-cron
bambu_cron/middleware.py
Python
apache-2.0
152
import urllib2 import json #Get json data from Weather Underground by using IP address f = urllib2.urlopen('http://api.wunderground.com/api/***KEY***/conditions/forecast/hourly/q/autoip.json') json_string = f.read() parsed_json = json.loads(json_string) #Current Location and Observation Time location = parse...
doktorinjh/WeatherPane
WU_Bridge_GitHub.py
Python
apache-2.0
4,290
# Copyright 2018 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
tensorflow/profiler-ui
server/server.py
Python
apache-2.0
2,149
import logging from datetime import datetime from flask import request from dino import environ from dino.exceptions import NoSuchRoomException from dino.rest.resources.base import BaseResource from dino.utils import b64d from dino.utils.decorators import timeit logger = logging.getLogger(__name__) class JoinsInRo...
thenetcircle/dino
dino/rest/resources/joins.py
Python
apache-2.0
2,089
from trollius import subprocess from trollius import test_utils import trollius as asyncio import os import signal import sys import warnings from trollius import BrokenPipeError, ConnectionResetError, ProcessLookupError from trollius import From, Return from trollius import base_subprocess from trollius import test_su...
haypo/trollius
tests/test_subprocess.py
Python
apache-2.0
18,416
#!/usr/bin/env python3 """canteenie.py: A small python script that prints today's canteen/mensa menu for FAU on console.""" import requests import datetime import argparse from lxml import html from colorama import Fore, Style import textwrap import xmascc # command line arguments parser = argparse.ArgumentParser(de...
dreieinhalb/canteenie
archive/canteenie_v1.py
Python
apache-2.0
3,987
# Copyright (c) 2015-2016 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 applicable law or agree...
openstack/storlets
storlets/agent/daemon/files.py
Python
apache-2.0
6,334
# =============================================================================== # Copyright 2015 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/licenses...
UManPychron/pychron
pychron/dvc/share.py
Python
apache-2.0
4,172
# 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...
keras-team/keras
keras/feature_column/dense_features_test.py
Python
apache-2.0
43,567
# Copyright 2017 Calico 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 or agreed to in writing, sof...
calico/basenji
basenji/dataset.py
Python
apache-2.0
29,864
# # Copyright (c) SAS Institute 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 w...
sassoftware/conary
conary_test/cvctest/buildtest/sourcetest.py
Python
apache-2.0
65,334
# Copyright 2014 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 required by applicable ...
prasanna08/oppia
core/controllers/reader_test.py
Python
apache-2.0
102,089
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
ismail-s/warehouse
tests/unit/i18n/test_init.py
Python
apache-2.0
1,632
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from bs4 import BeautifulSoup as bs from sasila.system_normal.spider.spider_core import SpiderCore from sasila.system_normal.pipeline.console_pipeline import ConsolePipeline from sasila.system_normal.processor.base_processor import BaseProcessor from sasila.sys...
DarkSand/Sasila
sasila/system_normal/processor/car_processor.py
Python
apache-2.0
5,995
__author__ = 'Ehsan' from mininet.node import CPULimitedHost from mininet.topo import Topo from mininet.net import Mininet from mininet.log import setLogLevel, info from mininet.node import RemoteController from mininet.cli import CLI """ Instructions to run the topo: 1. Go to directory where this fil is. 2. ru...
kulawczukmarcin/mypox
mininet_scripts/simple_net.py
Python
apache-2.0
1,695
# Copyright 2020 The Matrix.org Foundation C.I.C. # # 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...
matrix-org/synapse
synapse/config/redis.py
Python
apache-2.0
1,857
# Copyright 2017-present Adtran, 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...
opencord/voltha
voltha/adapters/adtran_olt/download.py
Python
apache-2.0
21,112
from pysys.constants import * from xpybuild.xpybuild_basetest import XpybuildBaseTest class PySysTest(XpybuildBaseTest): def execute(self): msg = self.xpybuild(shouldFail=False, args=[], buildfile='root.xpybuild.py') self.startProcess(self.output+'/build-output/test', [], stdout='test.out', stderr='test.err') ...
xpybuild/xpybuild
tests/correctness/targets/CCompilationNoIncludes/run.py
Python
apache-2.0
468
#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Netius System # Copyright (c) 2008-2020 Hive Solutions Lda. # # This file is part of Hive Netius System. # # Hive Netius System is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by the Apache # Foun...
hivesolutions/netius
src/netius/middleware/annoyer.py
Python
apache-2.0
2,721
import datetime from ...place import Place from ...spec import Spec from .city import City from .village import Village from .structure import Structure from .restaurant import Restaurant class Province(Place): """Provinces exist within territories, and can contain cities, villages, and structures Attributes allo...
Jerad-M/ubfs
classes/custom/place/province.py
Python
apache-2.0
1,469
# -*- coding: utf-8 -*- """ urwintranet.ui ~~~~~~~~~~~~ """
jespino/urwintranet
urwintranet/ui/__init__.py
Python
apache-2.0
62
# Copyright 2013-present Barefoot Networks, 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 agre...
p4lang/p4c-bm
p4c_bm/gen_json.py
Python
apache-2.0
61,832
# Copyright (c) 2018 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 app...
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/xpu/test_reshape2_op_xpu.py
Python
apache-2.0
6,221
# Copyright 2019 PerfKitBenchmarker 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...
GoogleCloudPlatform/PerfKitBenchmarker
tests/providers/aws/aws_vpc_endpoint_test.py
Python
apache-2.0
4,139
""" 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 this ...
arenadata/ambari
ambari-server/src/main/resources/stacks/BigInsights/4.0/services/KAFKA/package/scripts/kafka_broker.py
Python
apache-2.0
4,270
# 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...
cxxgtxy/tensorflow
tensorflow/python/eager/remote_test.py
Python
apache-2.0
24,106
''' Preprocess URA merged data. Update log: (date / version / author : comments) 2020-06-06 / 1.0.0 / Du Jiang : Creation ''' from com.djs.learn.ura import PreprocessData __data_type = 0 __base_file_name = "URA_CondoEcTrans_M" __input_file_path = "../../../../../Temp/{0}.csv".format(__base_file_name) argv = ["-d", ...
djsilenceboy/LearnTest
Python_Test/PyDataMiningSample/com/djs/learn/test/ura/TestPreprocessTransactionData2.py
Python
apache-2.0
518
import cherrypy import copy import functools import inspect import os.path import sys from types import StringTypes import tangelo.util def content_type(t=None): r = cherrypy.response.headers['Content-type'] if t is not None: cherrypy.response.headers['Content-type'] = t return r def header(h...
mathstuf/tangelo
tangelo/tangelo/__init__.py
Python
apache-2.0
9,092
# 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 applicab...
brain-research/wip-constrained-extractor
shared_util.py
Python
apache-2.0
6,945
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
UnrememberMe/pants
src/python/pants/pantsd/pants_daemon.py
Python
apache-2.0
15,867
import unittest import tempfile import os import shutil import cwltool.expression as expr import cwltool.factory import cwltool.pathmapper import cwltool.process import cwltool.workflow from .util import get_data from cwltool.main import main class TestListing(unittest.TestCase): def test_missing_enable_ext(self)...
chapmanb/cwltool
tests/test_ext.py
Python
apache-2.0
5,706
# coding=utf-8 from multiprocessing import Process import unittest from unittest import TestCase from .. import SharedCacheServer, SharedCache, Memoize import time __author__ = 'matheus2740' class MemoizeTests(TestCase): def setUp(self): pass def tearDown(self): fun.remove_local_namespaces(...
s1mbi0se/s1ipc
s1ipc/sharedcache/tests/memoize_tests.py
Python
apache-2.0
1,191
import copy import datetime import itertools import json import re import time import functools from elasticsearch import (Elasticsearch, NotFoundError, RequestError, TransportError, ElasticsearchException) from elasticsearch import helpers from elasticsearch.serializer import JSONSerializer...
biothings/biothings.api
biothings/utils/es.py
Python
apache-2.0
46,432
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2016 Kitware 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 cop...
sutartmelson/girder
tests/cases/routetable_test.py
Python
apache-2.0
6,390
import os import hashlib from string import ascii_letters import logging from time import time, strftime import subprocess from tempfile import NamedTemporaryFile import json from mimetypes import guess_type import pathlib from unidecode import unidecode import pycdstar from pycdstar.resource import Bitstream log =...
clld/pycdstar
src/pycdstar/media.py
Python
apache-2.0
6,924
"""Config flow for OwnTracks.""" import secrets from homeassistant import config_entries from homeassistant.const import CONF_WEBHOOK_ID from .const import DOMAIN # pylint: disable=unused-import from .helper import supports_encryption CONF_SECRET = "secret" CONF_CLOUDHOOK = "cloudhook" class OwnTracksFlow(config_...
partofthething/home-assistant
homeassistant/components/owntracks/config_flow.py
Python
apache-2.0
2,860
# -*- coding: utf-8 -*- """This module implements a class that...""" from __future__ import print_function, unicode_literals import collections import pprint from npfl103.io.document import Document __version__ = "0.0.1" __author__ = "Jan Hajic jr." class DocumentVectorizer: """The DocumentVectorizer class tra...
hajicj/FEL-NLP-IR_2016
npfl103/io/vectorization.py
Python
apache-2.0
3,709
# Copyright 2013 Cloudbase Solutions Srl # 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 applicabl...
gabriel-samfira/jrunner
jrunner/jobqueue/workers/__init__.py
Python
apache-2.0
1,084
import subprocess import tempfile import random import os import shutil import re import chirc.replies as replies from chirc.client import ChircClient from chirc.types import ReplyTimeoutException import pytest import time class IRCSession(): def __init__(self, chirc_exe = None, msg_timeout = 0.1, randomize...
loosecannon93/chittyrc
tests/chirc/tests/common.py
Python
apache-2.0
28,644
import contextlib import itertools import math import os.path import pickle import shutil import sys import tempfile import warnings from contextlib import ExitStack from io import BytesIO from pathlib import Path from typing import Optional import numpy as np import pandas as pd import pytest from pandas.errors impor...
jhamman/xarray
xarray/tests/test_backends.py
Python
apache-2.0
172,910
# Copyright 2013 Rackspace Hosting # 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...
plumgrid/plumgrid-nova
nova/tests/api/openstack/compute/plugins/v3/test_instance_actions.py
Python
apache-2.0
12,710
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the Less Frequently Used (LFU) Windows Registry plugin.""" import unittest from dfdatetime import filetime as dfdatetime_filetime from dfwinreg import definitions as dfwinreg_definitions from dfwinreg import fake as dfwinreg_fake from plaso.formatters import win...
dc3-plaso/plaso
tests/parsers/winreg_plugins/lfu.py
Python
apache-2.0
7,326
#! /usr/bin/env python import os import glob def addSubFold(file_path): file_name = os.path.basename(file_path) file_dir = os.path.dirname(file_path) sub_fold = file_dir + "/" + file_name[0:5] if not os.path.exists(sub_fold): os.makedirs(sub_fold) return sub_fold + "/" + file_name def cha...
simba518/CollisionHandle
script/rename.py
Python
apache-2.0
1,061
from __future__ import absolute_import from __future__ import division from __future__ import print_function import fnmatch import os import subprocess import sys import tempfile import time import psutil import ray class RayTestTimeoutException(Exception): """Exception used to identify timeouts from test util...
ujvl/ray-ng
python/ray/tests/utils.py
Python
apache-2.0
4,953
from great_expectations.rule_based_profiler.domain_builder.domain_builder import ( # isort:skip DomainBuilder, ) from great_expectations.rule_based_profiler.domain_builder.table_domain_builder import ( # isort:skip TableDomainBuilder, ) from great_expectations.rule_based_profiler.domain_builder.column_domain_...
great-expectations/great_expectations
great_expectations/rule_based_profiler/domain_builder/__init__.py
Python
apache-2.0
990
""" Based on this example -> https://github.com/open-power/pdbg/blob/master/.build.sh TEMPDIR=`mktemp -d ${HOME}/pdbgobjXXXXXX` RUN_TMP="docker run --rm=true --user=${USER} -w ${TEMPDIR} -v ${HOME}:${HOME} -t ${CONTAINER}" ${RUN_TMP} ${SRCDIR}/configure --host=arm-linux-gnueabi ${RUN_TMP} make rm -rf ${TEMPDIR} "...
litex-hub/lxbe-tool
lxbe_tool/providers/docker.py
Python
apache-2.0
323
import json import os import jinja2 from mlabns.util import message def _get_jinja_environment(): current_dir = os.path.dirname(__file__) templates_dir = os.path.join(current_dir, '../templates') return jinja2.Environment(loader=jinja2.FileSystemLoader(templates_dir), exten...
m-lab/mlab-ns
server/mlabns/util/util.py
Python
apache-2.0
2,015
# Copyright 2020 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...
quantumlib/OpenFermion-FQE
src/fqe/fqe_ops/fqe_ops_utils.py
Python
apache-2.0
2,752
# Copyright 2021 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, ...
google/mipnerf
internal/vis.py
Python
apache-2.0
5,130
#!/usr/bin/env python from __future__ import print_function from future.standard_library import install_aliases install_aliases() from urllib.parse import urlparse, urlencode from urllib.request import urlopen, Request from urllib.error import HTTPError from os.path import splitext import json import os ...
andrewpx1/apiai-weather-webhook-sample-master
lovepx.py
Python
apache-2.0
1,716
__author__ = 'Mario' import wx import wx.xrc ########################################################################### ## Class MainPanel ########################################################################### class MainPanel ( wx.Panel ): def __init__( self, parent ): wx.Panel.__init__ ( self, pa...
marioharper182/OptionsPricing
Accelerate/pnlEuropean.py
Python
apache-2.0
3,084
import standard_play import behavior import skills import tactics import robocup import constants import main import enum class OurCornerKick(standard_play.StandardPlay): MinChipRange = 0.3 MaxChipRange = 3.0 ChipperPower = 0.5 TargetSegmentWidth = 1.5 MaxKickSpeed = 0.5 MaxKickAccel = 0.5 ...
JNeiger/robocup-software
soccer/gameplay/plays/restarts/our_corner_kick.py
Python
apache-2.0
3,158
#!/usr/bin/env python # # Copyright 2017 Google 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 o...
googlecreativelab/beat-blender
main.py
Python
apache-2.0
859
from common import * DEBUG = True MONGODB_SETTINGS = { 'HOST': '127.0.0.1', 'PORT': 27017, 'DB': 'myhoard_dev', 'USERNAME': 'myhoard', 'PASSWORD': 'myh0@rd', } # Logging LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'root': { 'level': 'NOTSET', 'handlers...
blstream/myHoard_Python
myhoard/settings/dev.py
Python
apache-2.0
1,018
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License. import json from azurelinuxagent.common.protocol.restapi import ExtensionStatus from azurelinuxagent.ga.exthandlers import parse_ext_status from tests.tools import * class TestExtHandlers(AgentTestCase): def test_par...
andyliuliming/WALinuxAgent
tests/ga/test_exthandlers.py
Python
apache-2.0
2,603
from distutils.core import setup setup(name = "pstor", version = "0.01", description = "Encrypted storage manager", author = "Roman Rader", author_email = "antigluk@gmail.com", packages=["pstor","pstor.commands","pstor.helpers","pstor.commands.providers"], scripts=['pstor/pstor'], ...
rrader/pstor
setup.py
Python
apache-2.0
358
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import scipy.signal from ray.rllib.policy.sample_batch import SampleBatch from ray.rllib.utils.annotations import DeveloperAPI def discount(x, gamma): return scipy.signal.lfilter([1], [...
atumanov/ray
python/ray/rllib/evaluation/postprocessing.py
Python
apache-2.0
2,480
#!/usr/bin/env python # take a large pcap and dump the data into a CSV so it can be analysed by something like R. # # This version we want to know what the source IP is, what the protocol is and based on those # peices of info run a function to grab that data and write a line to a CSV file # # Ignore all traffic sourc...
dleecefft/pcapstats
pbin/parseL4Info.py
Python
apache-2.0
5,615
# -*- coding: utf-8 -*- from __future__ import unicode_literals from server.models import * from django.db import models, migrations import plistlib def enable_plugins(apps, schema_editor): Machine = apps.get_model("server", "Machine") InstalledUpdate = apps.get_model("server", "InstalledUpdate") Report...
erikng/sal
server/migrations/0030_auto_20160212_1810.py
Python
apache-2.0
788
"""Test the TcEx Threat Intel Module.""" # standard library import os from .ti_helpers import TestThreatIntelligence, TIHelper class TestIntrustionSetGroups(TestThreatIntelligence): """Test TcEx Instrusion Set Groups.""" group_type = 'Intrusion Set' owner = os.getenv('TC_OWNER') ti = None ti_hel...
ThreatConnect-Inc/tcex
tests/api/tc/v2/threat_intelligence/test_intrusion_set_interface.py
Python
apache-2.0
2,914
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the output modules CLI arguments helper.""" import argparse import unittest from plaso.cli import tools from plaso.cli.helpers import output_modules from plaso.lib import errors from tests.cli import test_lib as cli_test_lib class OutputModulesArgumentsHe...
kiddinn/plaso
tests/cli/helpers/output_modules.py
Python
apache-2.0
2,511