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
# 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 Bml(CMakePackage): """The basic matrix library (bml) is a collection of various matrix dat...
rspavel/spack
var/spack/repos/builtin/packages/bml/package.py
Python
lgpl-2.1
1,909
# Copyright (C) 2006-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
nischu7/paramiko
paramiko/hostkeys.py
Python
lgpl-2.1
12,117
""" Tests outgoing calls created with InitialAudio and/or InitialVideo, and exposing the initial contents of incoming calls as values of InitialAudio and InitialVideo """ import operator from servicetest import ( assertContains, assertEquals, assertLength, wrap_channel, EventPattern, call_async, make_channel_...
jku/telepathy-gabble
tests/twisted/jingle/initial-audio-video.py
Python
lgpl-2.1
7,213
"Conferencing code" # XXX A relatively simple enhancement to this would be to store the # volumes for each source in the conference, and use an exponential # decay type algorithm to determine the "loudest". from shtoom.doug.source import Source from twisted.internet.task import LoopingCall from twisted.python impor...
braams/shtoom
shtoom/doug/conferencing.py
Python
lgpl-2.1
8,770
#!/usr/bin/python """Test of Dojo combo box presentation.""" from macaroon.playback import * import utils sequence = MacroSequence() sequence.append(PauseAction(5000)) sequence.append(KeyComboAction("Tab")) sequence.append(KeyComboAction("Tab")) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComb...
pvagner/orca
test/keystrokes/firefox/aria_combobox_dojo.py
Python
lgpl-2.1
4,695
import __builtin__ import etcd from etcd import Client import importlib import inspect import maps from mock import MagicMock from mock import patch import os import pkgutil import pytest import yaml from tendrl.commons import objects import tendrl.commons.objects.node_context as node from tendrl.commons import Tendr...
r0h4n/commons
tendrl/commons/tests/test_init.py
Python
lgpl-2.1
17,194
############################################################################## # 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...
skosukhin/spack
var/spack/repos/builtin/packages/scons/package.py
Python
lgpl-2.1
1,645
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library ...
FedoraScientific/salome-paravis
test/VisuPrs/StreamLines/F7.py
Python
lgpl-2.1
1,521
# -*- coding: utf-8 -*- from __future__ import absolute_import import re from collections import OrderedDict from uuid import uuid4 from warnings import warn from numpy import object as np_object from numpy import array, inf, isinf from six import string_types from cobra.core import Metabolite, Model, Reaction from...
zakandrewking/cobrapy
cobra/io/mat.py
Python
lgpl-2.1
11,174
#!/usr/bin/env python # coding: utf8 from nose.tools import assert_equal from nose import SkipTest #lines above are inserted automatically by pythoscope. Line below overrides them from Goulib.tests import * from Goulib.interval import * class TestInInterval: def test_in_interval(self): assert...
goulu/Goulib
tests/test_Goulib_interval.py
Python
lgpl-3.0
8,146
''' Created on Feb 26, 2015 @author: Akshat ''' import pandas as pd import matplotlib.pyplot as plt import matplotlib.gridspec as mgrid import ntpath class PrbLogAgg: ''' classdocs ''' dataFrame = {} csv = [] def __init__(self, output_directory, csvFilePath): s...
R-daneel-olivaw/CPET
module2/ProbeLogAggregator.py
Python
lgpl-3.0
3,096
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "downloadmusic.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
irvingprog/gmusic
manage.py
Python
lgpl-3.0
256
"""Contain the socket handler for players""" from game import Game from websocket import WebSocketHandler from zone import Zone import errcode class AdminWs(WebSocketHandler): """The socket handler for websocket""" def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self....
mdl29/tidutyzef
serveur/adminws.py
Python
lgpl-3.0
2,061
#!/usr/bin/env python """pypozyx.definitions.bitmasks - contains all bitmasks used in Pozyx functionality, such as interrupt flags.""" # Bit mask for POZYX_ST_RESULT POZYX_ST_RESULT_ACC = 0x01 POZYX_ST_RESULT_MAGN = 0x02 POZYX_ST_RESULT_GYR = 0x04 POZYX_ST_RESULT_MCU = 0x08 POZYX_ST_RESULT_PRES = 0x10 POZYX_ST_RESULT_...
laurentva/Pozyx-Python-library
pypozyx/definitions/bitmasks.py
Python
lgpl-3.0
939
#!/usr/bin/env python """ Tests for CANtact interfaces """ import unittest import can from can.interfaces import cantact class CantactTest(unittest.TestCase): def test_bus_creation(self): bus = can.Bus(channel=0, bustype="cantact", _testing=True) self.assertIsInstance(bus, cantact.CantactBus) ...
hardbyte/python-can
test/test_cantact.py
Python
lgpl-3.0
2,119
# This file is generated from pydcs_export.lua class Weapons: AB_250_2___144_x_SD_2__250kg_CBU_with_HE_submunitions = {"clsid": "{AB_250_2_SD_2}", "name": "AB 250-2 - 144 x SD-2, 250kg CBU with HE submunitions", "weight": 280} AB_250_2___17_x_SD_10A__250kg_CBU_with_10kg_Frag_HE_submunitions = {"clsid": "{AB_2...
pydcs/dcs
dcs/weapons_data.py
Python
lgpl-3.0
212,933
# -*- coding: utf-8 -*- from django import forms class StagiaireForms(forms.Form): _choix = ( (1, 'Stagiaire'), (2, 'Classe'),) choisir = forms.ChoiceField(choices =_choix, widget = forms.RadioSelect, required = True, initial = '1', label = '') chercher = forms.CharField(max_length=100, required=False, label = '')...
hetica/webeni
main/forms.py
Python
lgpl-3.0
531
# -*- coding: utf-8 -*- # # Django Diário documentation build configuration file, created by # sphinx-quickstart v0.5.2. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable (module imp...
marinho/django-diario
docs/conf.py
Python
lgpl-3.0
6,174
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # # This file is part of the E-Cell System # # Copyright (C) 1996-2016 Keio University # Copyright (C) 2008-2016 RIKEN # Copyright (C) 2005-2009 The Molecular Sciences Institute # #:::::::::::::::::::::::::::::::::::::::...
ecell/ecell3
ecell/frontend/model-editor/ecell/ui/model_editor/NestedListEditor.py
Python
lgpl-3.0
4,695
/*Owner & Copyrights: Vance King Saxbe. A.*/from GoldSaxEngineChinaMarkets import goldsaxenginechinamarkets goldsaxenginechinamarkets.start() /*email to provide support at vancekingsaxbe@powerdominionenterprise.com, businessaffairs@powerdominionenterprise.com, For donations please write to fundraising@powerdominionen...
VanceKingSaxbeA/GoldSaxEngineChinaMarkets
goldsaxenginestart.py
Python
lgpl-3.0
334
# coding=utf-8 # Copyright © 2016 Computational Molecular Biology Group, # Freie Universität Berlin (GER) # # This file is part of ReaDDy. # # ReaDDy is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Softwar...
chrisfroe/readdy
wrappers/python/src/python/readdy/examples/chain_decay.py
Python
lgpl-3.0
4,956
# Copyright (C) 2015 by Clearcode <http://clearcode.cc> # and associates (see AUTHORS). # This file is part of matchbox. # matchbox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of ...
ClearcodeHQ/matchbox
src/matchbox/__init__.py
Python
lgpl-3.0
925
import pandas as pd import os # -*- coding: utf-8 -*- from flutype.data_management.fill_master import Master import numpy as np def print_full(x): pd.set_option('display.max_rows', len(x)) print(x) pd.reset_option('display.max_rows') def extract_peptide_batch(ma): gal_lig_fix = ma.read_gal_ligand("170...
janekg89/flutype_webapp
flutype/gal-file.py
Python
lgpl-3.0
5,034
# -*- coding: utf-8 -*- from __future__ import print_function, absolute_import, division from builtins import str import sys import unittest import re import os dirname = os.path.dirname(__file__) sys.path.insert(0, os.path.join(dirname, '..', '..', '..')) import uuid from SpiffWorkflow.serializer.dict import Dictiona...
knipknap/SpiffWorkflow
tests/SpiffWorkflow/serializer/dictTest.py
Python
lgpl-3.0
2,803
# Copyright (c) 2012 CNRS # Author: Florent Lamiraux # # This file is part of hpp-corbaserver. # hpp-corbaserver is free software: you can redistribute it # and/or modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation, either version # 3 of the License, or (at...
humanoid-path-planner/hpp-corbaserver
src/hpp/__init__.py
Python
lgpl-3.0
1,269
# -*- coding: utf-8 -*- # # This file is part of Glances. # # Copyright (C) 2016 Nicolargo <nicolas@nicolargo.com> # # Glances is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
velocyno/glances
glances/ports_list.py
Python
lgpl-3.0
5,667
from __future__ import division from __future__ import print_function #!/usr/bin/python # program to plot SEVIRI observations # usage from command line # $ python plot_msg.py # # pass arguments to overwrite time, rgb, area given in the script # $ python plot_msg.py year month day hour min rgb area # year month...
meteoswiss-mdr/monti-pytroll
scripts/plot_msg_minus_cosmo.py
Python
lgpl-3.0
20,832
# -*- coding: utf-8 -*- # Copyright (c) 2010-2013 by Yaco Sistemas <goinnn@gmail.com> # 2015 by Pablo Martín <goinnn@gmail.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundatio...
django-inplaceedit/django-inplaceedit
testing/testing/unusual_fields/admin.py
Python
lgpl-3.0
1,048
""" Common definitions/constants used throughout the manager. """ from typing import Final from ai.backend.common.types import SlotName, SlotTypes INTRINSIC_SLOTS: Final = { SlotName('cpu'): SlotTypes('count'), SlotName('mem'): SlotTypes('bytes'), }
lablup/sorna-manager
src/ai/backend/manager/defs.py
Python
lgpl-3.0
262
#!/usr/env python import os import sys import shutil import tempfile if os.name != 'nt': print 'Windows only!' sys.exit(1) if not len(sys.argv) == 3: print 'USAGE: %s PortablePythonDir output-dir' % sys.argv[0] print ' Example: D:\yCanta>..\PortablePython\Python-Portable.exe windows-build.py d:\PortablePyth...
yCanta/yCanta
windows-build.py
Python
unlicense
2,677
#!/usr/bin/env python """Ninja build configurator for foundation library""" import sys import os import copy sys.path.insert(0, os.path.join('build', 'ninja')) import generator generator = generator.Generator(project = 'rpmalloc', variables = {'bundleidentifier': 'com.rampantpixels.rpmalloc.$(binname)', 'nowarning...
rampantpixels/rpmalloc-benchmark
configure.py
Python
unlicense
14,222
import unittest import json from bitmovin import Bitmovin, Response, SFTPInput from bitmovin.errors import BitmovinApiError from tests.bitmovin import BitmovinTestCase class SFTPInputTests(BitmovinTestCase): @classmethod def setUpClass(cls): super().setUpClass() @classmethod def tearDownClas...
bitmovin/bitmovin-python
tests/bitmovin/services/inputs/sftp_input_service_tests.py
Python
unlicense
6,702
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: errors.py import mcl.status ERR_SUCCESS = mcl.status.MCL_SUCCESS ERR_INVALID_PARAM = mcl.status.framework.ERR_START ERR_MARSHAL_FAILED = mcl.status.f...
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/mca/file/cmd/grep/errors.py
Python
unlicense
1,026
from kivy.uix.stacklayout import StackLayout from kivy.uix.behaviors import DragBehavior from kivy.uix.modalview import ModalView from kivy.core.window import Window from kivy.uix.button import Button from kivy.uix.label import Label from kivy.lang import Builder from kivy.clock import Clock from kivy.uix.stencilview i...
Bakterija/log_fruit
src/app_modules/widgets/find_bar.py
Python
unlicense
724
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "Lice...
m3z/HT
setup.py
Python
apache-2.0
3,693
#!/usr/env python3 try: import numpypy as np except: import numpy as np try: import cPickle as pickle except ImportError: import pickle #import ipdb ## Tri Diagonal Matrix Algorithm(a.k.a Thomas algorithm) solver def TDMAsolver(a, b, c, d): ''' TDMA solver, a b c d can be NumPy array type or Py...
cphyc/MHD_simulation
python/simul.py
Python
apache-2.0
9,256
# 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, s...
googleapis/python-test-utils
tests/unit/resources/bad_package/setup.py
Python
apache-2.0
1,256
# Copyright 2016 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 or agreed to in writing, ...
google/mobly
mobly/controllers/attenuator.py
Python
apache-2.0
5,038
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
moto-timo/robotframework
src/robot/utils/__init__.py
Python
apache-2.0
3,555
__author__ = 'himanshu' # TrayIcon class TrayIcon(Exception): pass
chennan47/OSF-Offline
osfoffline/exceptions/tray_icon_exceptions.py
Python
apache-2.0
73
######## # Copyright (c) 2013 GigaSpaces Technologies Ltd. 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...
CloudifySource/cloudify-aws
setup.py
Python
apache-2.0
1,176
from __future__ import absolute_import import os import socket import random import string import time import uuid import pytest from . import unittest from kafka import SimpleClient, create_message from kafka.client_async import KafkaClient from kafka.errors import ( LeaderNotAvailableError, KafkaTimeoutError, ...
Yelp/kafka-python
test/testutil.py
Python
apache-2.0
6,084
# Copyright 2014-2015 University of Chicago # # 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 ...
globus/globus-release-tools
share/python/repo/__init__.py
Python
apache-2.0
17,563
# Copyright 2021 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
web_console_v2/api/test/fedlearner_webconsole/job/metrics_test.py
Python
apache-2.0
3,305
# -*- coding: utf-8 -*- from __future__ import division, print_function import finufft from finufft import interface import numpy as np import pytest __all__ = [ "test_nufft1d1", "test_nufft1d2", "test_nufft1d3", ] def test_nufft1d1(seed=42, iflag=1): np.random.seed(seed) ms = int(1e3) n = int(2e...
dfm/python-finufft
tests/test_1d.py
Python
apache-2.0
1,814
""" This module handles parsing the AWS Billing Reports (stored on S3 in .zip or just plain .csv format) and creating metrics to be sent to the WF proxy. """ import ConfigParser import datetime import io import os import sys import time import traceback import zipfile import logging.config import dateutil from wave...
wavefrontHQ/wavefront-collector
wavefront/awsbilling.py
Python
apache-2.0
17,443
# 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 ...
sslavic/kafka
tests/kafkatest/tests/client/client_compatibility_produce_consume_test.py
Python
apache-2.0
4,454
# Copyright 2014-2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
mitchellrj/touchdown
touchdown/aws/cloudfront/streaming_distribution.py
Python
apache-2.0
6,002
#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib import urllib2 import re import json class Spider: def __init__(self): self.url = 'http://brand.efu.com.cn/' self.user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36' self.h...
xinghalo/DMInAction
src/spider/BrandSpider/brand1.py
Python
apache-2.0
2,854
# coding=utf-8 from typing import List import networkx as nx import pyisemail from fuzzywuzzy import fuzz from recordclass import recordclass import pandas as pd import saapy.util as su from .lexeme import cleanup_proper_name def connect_actors(actor_frame, connectivity_sets, connectivity_column): """ :para...
ashapochka/saapy
saapy/analysis/actor.py
Python
apache-2.0
11,608
# Copyright 2017 Mycroft AI 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 writi...
Dark5ide/mycroft-core
mycroft/configuration/config.py
Python
apache-2.0
8,223
import json import datetime from django.core.files.base import ContentFile from django.core.exceptions import ValidationError from django.utils.timezone import utc from ..models import AgentProfile from ..exceptions import IDNotFoundError, ParamError from ..utils import etag class AgentProfileManager(): def __...
adlnet/ADL_LRS
lrs/managers/AgentProfileManager.py
Python
apache-2.0
5,034
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt """Monkey-patching to add multiprocessing support for coverage.py""" import multiprocessing import multiprocessing.process import os from coverage import env from...
blueyed/coveragepy
coverage/multiproc.py
Python
apache-2.0
3,478
# -*- encoding: utf-8 -*- from inspect import isgenerator from .testcase import DatatableViewTestCase from .test_app import models from ..exceptions import ColumnError from ..datatables import Datatable, ValuesDatatable from ..views import DatatableJSONResponseMixin, DatatableView from .. import columns class Datatab...
doganmeh/django-datatable-view
datatableview/tests/test_datatables.py
Python
apache-2.0
29,048
# 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...
zhreshold/mxnet
tests/python/unittest/test_extensions.py
Python
apache-2.0
7,787
import sys sys.path.insert(1, "../../") import h2o, tests def headers(): headers = h2o.import_file(h2o.locate("smalldata/airlines/allyears2k_headers_only.csv")) headers_and = h2o.import_file(h2o.locate("smalldata/airlines/allyears2k.zip")) headers_and.setNames(headers.names) print headers.na...
tarasane/h2o-3
h2o-py/tests/testdir_misc/pyunit_headers.py
Python
apache-2.0
570
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
google/struct2tensor
struct2tensor/ops/struct2tensor_ops_test.py
Python
apache-2.0
30,777
# -*- coding: utf-8 -*- # Copyright 2022 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-orchestration-airflow
google/cloud/orchestration/airflow/service_v1beta1/services/environments/async_client.py
Python
apache-2.0
45,966
#_*_coding: utf-8 _*_ #__author__ = 'Alihanniba' import urllib.request # from urllib.request import urlopen import urllib.error import re import os import taobaotool import time class Spider: def __init__(self): self.siteUrl = 'http://mm.taobao.com/json/request_top_list.htm' self.tool = taobaotool...
alihanniba/tornado-awesome
scrapy/taobaomm.py
Python
apache-2.0
3,677
__author__ = 'bharathramh' EMAIL_VERIFICATION_EXPIRATION_DAYS = 1 FORGOT_PASSWORD_EXPIRATION_DAYS = 1
bharathramh92/easy-ecom
accounts/constants.py
Python
apache-2.0
102
# -*- coding: utf-8 -*- """ test. """ import torndb import unittest from ..views import case class PrimesTestCase(unittest.TestCase): """Tests for `primes.py`.""" def test_is_five_prime(self): """""" self.assertTrue(case.is_prime(2), msg='断言出错') class WidgetTestCase(unittest.TestCase):...
BetterTomorrowPy/Luxury
luxury/apis/tests/test_unittest.py
Python
apache-2.0
518
import argparse import sys import logging import os import csv class ReadItem: def __init__(self, sequence, totalCount): self.Sequence = sequence self.TotalCount = totalCount self.SampleMap = {} class AnnotationItem: def __init__(self, sequence, totalCount, category, counts): self.Sequence = seque...
shengqh/ngsperl
lib/SmallRNA/updateShortReadParentCount.py
Python
apache-2.0
7,328
# Copyright (c) 2016 Mirantis, Inc. # Copyright (c) 2016 AT&T Corp # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
openstack/murano
murano/tests/unit/api/v1/test_static_actions.py
Python
apache-2.0
5,261
import logging import datetime import mediacloud.api import re from server import mc from server.auth import is_user_logged_in from server.util.csv import SOURCE_LIST_CSV_METADATA_PROPS logger = logging.getLogger(__name__) TOPIC_MEDIA_INFO_PROPS = ['media_id', 'name', 'url'] TOPIC_MEDIA_PROPS = ['story_count', 'me...
mitmedialab/MediaCloud-Web-Tools
server/views/topics/__init__.py
Python
apache-2.0
3,391
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import sorl.thumbnail.fields class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='WebpageSnapshot', fields=[ ...
mattaustin/django-thummer
thummer/migrations/0001_initial.py
Python
apache-2.0
1,008
__author__ = "shikun" import pickle import os from common import operateFile from common.variable import Constants def write_pickle(dict_data, path="data.pickle"): read = read_pickle(path) result = [] if len(read) > 0: read.append(dict_data) result = read else: result.append(di...
pqpo/appiumn_auto_re-develope
common/basePickle.py
Python
apache-2.0
885
import itertools import re import mock # noqa import pytest from awx.main.models import (AdHocCommand, Credential, CredentialType, Job, JobTemplate, Inventory, InventorySource, Project, WorkflowJobNode) from awx.main.utils import decrypt_field from awx.api.ver...
wwitzel3/awx
awx/main/tests/functional/api/test_credential.py
Python
apache-2.0
59,080
__author__ = "UShareSoft" from texttable import Texttable from ussclicore.argumentParser import ArgumentParser, ArgumentParserError from ussclicore.cmd import Cmd, CoreGlobal from uforgecli.utils import org_utils from ussclicore.utils import printer from ussclicore.utils import generics_utils from uforgecli.utils.ufor...
pedrolegold/uforge-cli
src/uforgecli/commands/subscription/subscription.py
Python
apache-2.0
29,418
#! /usr/bin/env python # encoding: utf-8 from __future__ import absolute_import from .base import AuthenticationMixinBase from . import GrantFailed # We need to get urlencode from urllib.parse in Python 3, but fall back to # urllib in Python 2 try: from urllib.parse import urlencode except ImportError: from ...
gabrielgisoldo/vimeo.py
vimeo/auth/authorization_code.py
Python
apache-2.0
1,613
# coding: utf-8 """ Wavefront REST API Documentation <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the W...
wavefrontHQ/python-client
wavefront_api_client/models/response_status.py
Python
apache-2.0
5,837
#!/usr/bin/env python # # Copyright 2016 Major Hayden # # 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...
major/arksearch
arksearch/arksearch.py
Python
apache-2.0
3,170
# Copyright 2011 Nicholas Bray # # 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...
ncbray/pystream
bin/tests/shape/test_shape_examples.py
Python
apache-2.0
8,509
""" Generic interchange document structures. """ STYLE_TYPE_INT = 'int' STYLE_TYPE_FLOAT = 'float' STYLE_TYPE_CDATA = 'cdata' STYLE_TYPE_BOOLEAN = 'boolean' STYLE_TYPES = ( STYLE_TYPE_INT, STYLE_TYPE_FLOAT, STYLE_TYPE_CDATA, STYLE_TYPE_BOOLEAN ) class Style(object): def __init__(self, types): ...
groboclown/py-book-selfpub
src/selfpub/text.py
Python
apache-2.0
10,783
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
openstack/neutron-lib
neutron_lib/tests/unit/api/definitions/test_port.py
Python
apache-2.0
793
#!/usr/bin/python ############################################################################################## # Copyright (C) 2014 Pier Luigi Ventre - (Consortium GARR and University of Rome "Tor Vergata") # Copyright (C) 2014 Giuseppe Siracusano, Stefano Salsano - (CNIT and University of Rome "Tor Vergata") # www....
netgroup/Dreamer-Mininet-Deployer
deployer_configuration_utils.py
Python
apache-2.0
1,593
from .tensor import * from .math import *
cypherai/PySyft
syft/__init__.py
Python
apache-2.0
42
import sys import click from globus_cli.termio import FORMAT_SILENT, formatted_print from ..services.transfer import CustomTransferClient def transfer_task_wait_with_io( transfer_client: CustomTransferClient, meow, heartbeat, polling_interval, timeout, task_id, timeout_exit_code, ) -> N...
globus/globus-cli
src/globus_cli/commands/_common.py
Python
apache-2.0
2,720
""" :author: yoram@ignissoft.com """ import getpass from random import randint from stcrestclient import stchttp class StcRestWrapper(object): def __init__(self, logger, server, port=80, user_name=getpass.getuser(), session_name=None): """ Init STC REST client. :param server: STC REST API serv...
shmir/PyTestCenter
testcenter/api/stc_rest.py
Python
apache-2.0
3,868
# -*- coding: utf-8 -*- # # Copyright 2014-2021 BigML # # 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 ...
jaor/python
bigml/predicates.py
Python
apache-2.0
2,025
"""Implementation of the WebSocket protocol. `WebSockets <http://dev.w3.org/html5/websockets/>`_ allow for bidirectional communication between the browser and server. WebSockets are supported in the current versions of all major browsers, although older versions that do not support WebSockets are still in use (refer ...
obsh/tornado
tornado/websocket.py
Python
apache-2.0
41,216
# 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...
toddpalino/kafka-tools
kafka/tools/protocol/responses/describe_acls_v0.py
Python
apache-2.0
1,614
from collections import namedtuple from cytomine.models._utilities.pattern_matching import resolve_pattern class TestPatternMatching: def get_fake_type(self): return namedtuple("fakeobj", ["lst", "atomstr", "atomfloat"]) def test_no_iterable_pattern(self): fake = self.get_fake_type()(lst=1, ...
cytomine/Cytomine-python-client
cytomine/tests/test_pattern_matching.py
Python
apache-2.0
1,106
# 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...
airbnb/superset
superset/db_engine_specs/bigquery.py
Python
apache-2.0
8,436
#!/usr/bin/env python2 import numpy as np import pdb from random import sample from time import time import heapq import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt import sys, os from eft_calculator import EFT_calculator, Water import tools def load_coordinates(name): lines = open('test...
yangjincai/Xq2EFT
testAndOutputGrids.py
Python
apache-2.0
6,139
from optparse import OptionParser import sys from os.path import expanduser, abspath import sunburnt import dist_job_mgr.client as djm QUERY_TERM="datablox" def run_query(addresses): master = addresses[0] si = sunburnt.SolrInterface("http://%s:8983/solr" % master) resp = si.query(QUERY_TERM).execute() ...
mpi-sws-rse/datablox
scripts/solr_test.py
Python
apache-2.0
1,268
# Copyright 2018 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 or agreed to in writing, ...
google/burst-denoising
kpn_data_provider.py
Python
apache-2.0
21,051
""" 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 ...
radicalbit/ambari
ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_windows.py
Python
apache-2.0
3,411
# Copyright 2013 Canonical Ltd # 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...
HybridF5/jacket
jacket/api/compute/metadata/vendordata_json.py
Python
apache-2.0
2,141
import collections import mui4py.mui4py_mod as mui4py_mod from mui4py.config import get_default_config from mui4py.types import map_type, get_float_type_str, get_int_type_str, get_io_type_str import re import numpy as np class CppClass(object): def __init__(self, config=None, args=(), kwargs={}): self._cpp...
yhtang/MUI
wrappers/Python/mui4py/common.py
Python
apache-2.0
4,086
# -*- coding: utf-8 -*- from rest_framework import serializers from accesslog.models import AccessLog, DaySummary, MonthSummary class SourceSerializer(serializers.Serializer): source = serializers.CharField(max_length=200) total = serializers.IntegerField() time_min = serializers.DateTimeField() tim...
skitazaki/django-access-dashboard
src/accesslog/serializers.py
Python
apache-2.0
1,315
# Copyright 2015 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...
blowmage/gcloud-python
regression/pubsub.py
Python
apache-2.0
4,859
# -*- encoding: utf-8 -*- # Copyright (c) 2015 b<>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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
b-com/watcher-metering
watcher_metering/agent/agent.py
Python
apache-2.0
5,245
''' Created on 2016年9月16日 @author: Administrator ''' import calendar #返回year的日历 def getYear(year): return calendar.calendar(year) #返回year-month的日历 def getMonth(year, month): return calendar.month(year, month) #返回某年某月的第一天是星期几(从0开始, 0是星期一,6是星期日)和该月天数 def getMonthRange(year, month): return calendar.monthra...
egassem/python_study
src/com/xiaobei/util/CalenderUtils.py
Python
apache-2.0
763
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from numpy.testing import assert_approx_equal, assert_allclose, assert_array_equal from UliEngineering.SignalProcessing.Utils import * from parameterized import parameterized import concurrent.futures import numpy as np import datetime import unittest unstairMethods = [ ...
ulikoehler/UliEngineering
tests/SignalProcessing/TestUtils.py
Python
apache-2.0
6,677
""" Module for managing Windows Updates using the Windows Update Agent. List updates on the system using the following functions: - :py:func:`win_wua.available <salt.modules.win_wua.available>` - :py:func:`win_wua.list <salt.modules.win_wua.list_>` This is an easy way to find additional information about updates ava...
saltstack/salt
salt/modules/win_wua.py
Python
apache-2.0
39,211
""" Get WHOIS information for a given host. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.whois/ """ from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeass...
jamespcole/home-assistant
homeassistant/components/whois/sensor.py
Python
apache-2.0
4,299
#!/usr/bin/env python # -*- coding: utf-8 -*- from solution import Solution from solution import TreeNode def constructOne(s): if s == '#': return None else: return TreeNode(int(s)) def createTree(tree): q = [] root = constructOne(tree[0]); q.append(root); idx = 1; while ...
zhlinh/leetcode
0094.Binary Tree Inorder Traversal/test.py
Python
apache-2.0
874
''' HMMPowerSupplyMap ''' from Products.DataCollector.plugins.CollectorPlugin import ( SnmpPlugin, GetTableMap, GetMap ) from DeviceDefine import HMMSTATUS, HMMPRESENCE, HMMPOWERMODE, HMMLOCATION class HMMPowerSupplyMap(SnmpPlugin): ''' HMMPowerSupplyMap ''' relname = 'hmmpowerSup...
Wuguanping/Server_Manage_Plugin
Zenoss_Plugin/ZenPacks/community/HuaweiServer/modeler/plugins/community/snmp/HMMPowerSupplyMap.py
Python
apache-2.0
4,621
# -*- 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...
googleads/google-ads-python
google/ads/googleads/v9/services/services/geo_target_constant_service/transports/base.py
Python
apache-2.0
4,445
# Copyright 2018 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 or agreed to in writing, ...
tensorflow/model-analysis
tensorflow_model_analysis/evaluators/legacy_aggregate_test.py
Python
apache-2.0
10,171