max_stars_repo_path
string
max_stars_repo_name
string
max_stars_count
int64
id
string
content
string
add_param_types
int64
add_return_types
int64
add_class_field_types
int64
add_instance_field_types
int64
add_total
int64
add_error
int64
src/cfnlint/rules/outputs/LimitName.py
tomislacker/cfn-python-lint
1,134
3248051
<gh_stars>1000+ """ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0 """ from cfnlint.rules import CloudFormationLintRule from cfnlint.rules.common import name_limit class LimitName(CloudFormationLintRule): """Check if maximum Output name size limit is exceeded""" ...
0
0
0
0
0
0
pa-to-es/node_tracker.py
avmi/community
305
3248056
''' Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0 This walks all of the combinations of metrics, dimensions, and aggregations. METRICS - contains descriptions of the metric to be pulled and the dimensions for that metric. See also the docs here: https://opendist...
0
1
0
1
2
0
contrib/opencensus-ext-gevent/opencensus/ext/gevent/geventcompatibility.py
Flared/opencensus-python
650
3248084
import logging import gevent.monkey def patch_opencensus(event): # Switch from the default runtime context using ContextVar to one # using thread locals. Needed until gevent supports ContextVar. # See https://github.com/gevent/gevent/issues/1407 import opencensus.common.runtime_context as runtime_con...
0
0
0
0
0
0
Geometry/DTGeometryBuilder/python/dtGeometry_cfi.py
ckamtsikis/cmssw
852
3248085
<filename>Geometry/DTGeometryBuilder/python/dtGeometry_cfi.py<gh_stars>100-1000 import FWCore.ParameterSet.Config as cms # # This cfi should be included to build the DT geometry model. # # GF would like to have a shorter name (e.g. DTGeometry), but since originally # there was no name, replace statements in other conf...
0
0
0
0
0
0
recursion_dynamic/matrix_mult/test_find_min_cost.py
rubenparedes0796/interactive-coding-challenges
27,173
3248101
import unittest class TestMatrixMultiplicationCost(unittest.TestCase): def test_find_min_cost(self): matrix_mult_cost = MatrixMultiplicationCost() self.assertRaises(TypeError, matrix_mult_cost.find_min_cost, None) self.assertEqual(matrix_mult_cost.find_min_cost([]), 0) matrices = ...
0
0
0
0
0
0
scale/job/migrations/0031_auto_20170822_1544.py
kaydoh/scale
121
3248116
<filename>scale/job/migrations/0031_auto_20170822_1544.py # -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-08-22 19:44 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Mig...
0
0
0
0
0
0
exercises/fr/solution_03_06.py
Jette16/spacy-course
2,085
3248121
<filename>exercises/fr/solution_03_06.py import spacy # Définis le composant personnalisé def length_component(doc): # Obtiens la longueur du doc doc_length = len(doc) print(f"Ce document comporte {doc_length} tokens.") # Retourne le doc return doc # Charge le petit modèle français nlp = spacy.lo...
0
0
0
0
0
0
Legacy/qstkmodels/StrategyDataModel.py
elxavicio/QSTK
339
3248155
<filename>Legacy/qstkmodels/StrategyDataModel.py import tables as pt #@UnresolvedImport import time class StrategyDataModel(pt.IsDescription): symbol = pt.StringCol(30) #30 char string; Ticker exchange = pt.StringCol(10) #10 char string; NYSE, NASDAQ, etc. adj_high = pt.Float32C...
0
0
0
0
0
0
tools/perf/benchmarks/v8.py
sarang-apps/darshan_browser
575
3248168
# Copyright 2014 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. from core import perf_benchmark from core import platforms import page_sets from telemetry import story from telemetry import benchmark from telemetry.timel...
0
3
2
0
5
0
examples/text_correction/ernie-csc/sighan_evaluate.py
JeremyZhao1998/PaddleNLP
7,091
3248204
# Copyright (c) 2021 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...
0
0
0
0
0
0
pulsar/apps/test/cov.py
PyCN/pulsar
1,410
3248211
<gh_stars>1000+ import os import sys from asyncio import new_event_loop import coverage from coverage.report import Reporter from pulsar.apps.http import HttpClient from pulsar.utils.system import json from pulsar.utils.version import gitrepo COVERALLS_URL = 'https://coveralls.io/api/v1/jobs' class CoverallsRepor...
0
0
0
0
0
0
alipay/aop/api/domain/AlipayUserCharityCommonwealCreateModel.py
snowxmas/alipay-sdk-python-all
213
3248216
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import annotations import json from alipay.aop.api.constant.ParamConstants import * class AlipayUserCharityCommonwealCreateModel(object): def __init__(self): self._biz_time: None = None self._ext_info: None = None self._numeri...
0
9
0
7
16
0
igibson/utils/vr_log_converter.py
mamadbiabon/iGibson
360
3248217
import argparse import pathlib import h5py from tqdm import tqdm if __name__ == "__main__": parser = argparse.ArgumentParser(description="VR state saving and replay demo") parser.add_argument("--input", required=True, type=str, help="Input file to convert to time ordered hdf5") parser.add_argument("--outp...
0
0
0
0
0
0
client/verta/verta/registry/stage_change/_stage_change.py
vishalbelsare/modeldb
835
3248230
<filename>client/verta/verta/registry/stage_change/_stage_change.py # -*- coding: utf-8 -*- import abc from verta.external import six from verta._protos.public.registry import StageService_pb2 @six.add_metaclass(abc.ABCMeta) class _StageChange(object): """Base class for registry stage changes. Not for external...
0
0
0
0
0
0
Python/Algorithm/Variable.py
piovezan/SOpt
148
3248233
a = int(input('Digite um numero: ')) b = int(input('Digite outro numero: ')) c = a - b if c > 0: print(f'O numero {c} é maior que Zero') #https://pt.stackoverflow.com/q/414121/101
0
0
0
0
0
0
pwncat/modules/linux/implant/passwd.py
Mitul16/pwncat
1,454
3248268
<reponame>Mitul16/pwncat #!/usr/bin/env python3 import crypt import pwncat from pwncat.facts import Implant, ImplantType from pwncat.modules import Status, Argument, ModuleFailed from pwncat.platform.linux import Linux from pwncat.modules.implant import ImplantModule class PasswdImplant(Implant): """Implant trac...
0
0
0
0
0
0
plenario/api/validator.py
vforgione/plenario
109
3248282
<reponame>vforgione/plenario import json import re from collections import namedtuple from datetime import datetime, timedelta import sqlalchemy from dateutil import parser from marshmallow import fields, Schema from marshmallow.fields import Field from marshmallow.validate import Range, OneOf, ValidationError from sq...
0
0
0
0
0
0
ding/utils/autolog/__init__.py
sailxjx/DI-engine
464
3248283
<reponame>sailxjx/DI-engine from .base import TimeMode from .data import RangedData, TimeRangedData from .model import LoggedModel from .time_ctl import BaseTime, NaturalTime, TickTime, TimeProxy from .value import LoggedValue if __name__ == "__main__": pass
0
0
0
0
0
0
venv/Lib/site-packages/cffi/pkgconfig.py
arnoyu-hub/COMP0016miemie
640
3248327
<gh_stars>100-1000 # pkg-config, https://www.freedesktop.org/wiki/Software/pkg-config/ integration for cffi import sys, os, subprocess from .error import PkgConfigError def merge_flags(cfg1, cfg2): """Merge values from cffi config flags cfg2 to cf1 Example: merge_flags({"libraries": ["one"...
0
0
0
0
0
0
pycrypto/lib/Crypto/IO/PEM.py
netlabcode/PyExpose
126
3248379
# -*- coding: ascii -*- # # Util/PEM.py : Privacy Enhanced Mail utilities # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, pe...
3
2
0
0
5
0
src/privacyraven/models/victim.py
suhacker1/PrivacyRaven
121
3248396
<reponame>suhacker1/PrivacyRaven import os import pytorch_lightning as pl import torch from torch import nn from torch.nn import functional as F from torch.utils.data import DataLoader, Dataset, random_split from torchvision import datasets, models, transforms from torchvision.datasets import MNIST from privacyraven....
0
0
0
0
0
0
challenge_1/python/tavery321/src/c1.py
rchicoli/2017-challenges
271
3248436
<reponame>rchicoli/2017-challenges<gh_stars>100-1000 string = "Hello" print(string[::-1])
0
0
0
0
0
0
protonfixes/gamefixes/242920.py
Sirmentio/protonfixes
213
3248456
""" Game fix for Banished """ # pylint: disable=C0103 from protonfixes import util def main(): """ Install xact and override """ print('Applying fixes for Banished') # If not already installed, install xact if not util.checkinstalled('xact'): util.protontricks('xact') # Set xaudio2_...
0
0
0
0
0
0
gallery/gridder/profile.py
XuesongDing/fatiando
179
3248481
<reponame>XuesongDing/fatiando<gh_stars>100-1000 """ Extracting a profile from spacial data ======================================== The function :func:`fatiando.gridder.profile` can be used to extract a profile of data from a map. It interpolates the data onto the profile points so you can specify the profile in any ...
0
0
0
0
0
0
perma_web/perma/settings/utils/post_processing.py
rachelaus/perma
317
3248502
### settings post-checks # here we do stuff that should be checked or fixed after ALL settings from any source are loaded # this is called by __init__.py from celery.schedules import crontab from celery.task.control import inspect as celery_inspect def post_process_settings(settings): # check secret key asse...
0
0
0
0
0
0
实践案例/B13-AI对联生成案例/src/service/app.py
microsoft/ai-edu
11,094
3248518
from flask import Flask from flask import request from up2down_model.up2down_model import up2down app = Flask(__name__) @app.route('/',methods=['GET']) def get_couplet_down() -> object: couplet_up = request.args.get('upper','') couplet_down = up2down.get_down_couplet([couplet_up]) return couplet_up + "...
0
1
0
0
1
0
baseline/aro.py
LLLjun/learn-to-cluster
620
3248536
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import numpy as np from functools import partial from tqdm import tqdm from utils import build_knns, knns2ordered_nbrs, Timer """ paper: https://arxiv.org/pdf/1604.00989.pdf original code https://github.com/varun-suresh/Clustering To run `aro`: 1. pip install p...
0
9
0
0
9
0
examples/rotation_example.py
JNDanielson/mplstereonet
120
3248550
""" As an exmaple of basic functionality, let's plot a plane, the pole to the plane, and a rake along the plane. """ import matplotlib.pyplot as plt import mplstereonet fig = plt.figure() # An un-rotated axes ax1 = fig.add_subplot(121, projection='stereonet') # Rotated 30 degrees clockwise from North ax2 = fig.add_s...
0
0
0
0
0
0
tests/integration/core/test_validator.py
QueoLda/django-oscar
4,639
3248554
from django.contrib.flatpages.models import FlatPage from django.core.exceptions import ValidationError from django.test import TestCase, override_settings from django.utils.translation import activate from oscar.core.validators import ( ExtendedURLValidator, URLDoesNotExistValidator) class TestExtendedURLValida...
0
0
0
0
0
0
bibliopixel/layout/geometry/index_ops.py
rec/leds
253
3248560
<filename>bibliopixel/layout/geometry/index_ops.py """These are operations that transform an x, y matrix index.""" def reflect_x(x, y, matrix): """Reflect the index vertically.""" return matrix.columns - 1 - x, y def reflect_y(x, y, matrix): """Reflect the index horizontally.""" return x, matrix.row...
0
0
0
0
0
0
exercises/ja/solution_03_14_03.py
Jette16/spacy-course
2,085
3248581
<filename>exercises/ja/solution_03_14_03.py<gh_stars>1000+ from spacy.lang.ja import Japanese nlp = Japanese() people = ["デヴィッド・ボウイ", "アンゲラ・メルケル", "レディー・ガガ"] # PhraseMatcherのパターンのリストを作成 patterns = list(nlp.pipe(people))
0
0
0
0
0
0
neo/Network/Mixins.py
volekerb/neo-python
387
3248599
<gh_stars>100-1000 from neo.Core.Mixins import VerifiableMixin class InventoryMixin(VerifiableMixin): def __init__(self): super(InventoryMixin, self).__init__() self.InventoryType = None def Verify(self): pass
0
0
0
0
0
0
pure_pagination/__init__.py
ekinertac/django-pure-pagination
657
3248612
from pure_pagination.paginator import Paginator, EmptyPage, InvalidPage, PageNotAnInteger from pure_pagination.mixins import PaginationMixin
0
0
0
0
0
0
chainercv/links/model/resnet/__init__.py
souravsingh/chainercv
1,600
3248624
from chainercv.links.model.resnet.resblock import Bottleneck # NOQA from chainercv.links.model.resnet.resblock import ResBlock # NOQA from chainercv.links.model.resnet.resnet import ResNet # NOQA from chainercv.links.model.resnet.resnet import ResNet101 # NOQA from chainercv.links.model.resnet.resnet import ResNet1...
0
0
0
0
0
0
setup.py
oxu2/flyingsquid
269
3248632
<gh_stars>100-1000 from setuptools import setup if __name__ == "__main__": setup(name='flyingsquid', version='0.0.0a0', description='Weak supervision with triplet methods', url='https://github.com/HazyResearch/flyingsquid', author='<NAME>', author_email='<EMAIL>', ...
0
0
0
0
0
0
example_training.py
dangkunal/chars2vec
152
3248645
import chars2vec dim = 50 path_to_model = 'path/to/model/directory' X_train = [('mecbanizing', 'mechanizing'), # similar words, target is equal 0 ('dicovery', 'dis7overy'), # similar words, target is equal 0 ('prot$oplasmatic', 'prtoplasmatic'), # similar words, target is equal 0 ('...
0
0
0
0
0
0
demos/unet/unet_demo_utils.py
tdml13/NiftyNet
1,403
3248653
<gh_stars>1000+ import os import nibabel as nib import pandas as pd import numpy as np import matplotlib.pyplot as plt from skimage.io import imread import re def dice_score(gt, img): """Calculate the dice score for evaluation purposes""" gt, img = [x > 0 for x in (gt, img)] num = 2 * np.sum(gt & img) ...
0
0
0
0
0
0
test/test_coordinator.py
minhaz1/iris
694
3248658
from gevent import spawn, monkey, sleep, socket monkey.patch_all() import pytest # noqa zk_address = ('localhost', 2181) zk_url = '%s:%s' % zk_address class TestFailover(): @classmethod def setup_class(cls): cls.instances = {} @classmethod def teardown_class(cls): for instance in c...
0
0
0
0
0
0
integrator_rnn_tutorial/integrator.py
dmcnamee/computation-thru-dynamics
327
3248673
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
3
1
0
0
4
0
scripts/platformio/build_full_image.py
markbirss/epaper_templates
209
3248678
#!/usr/bin/python3 from pathlib import Path Import("env") SOURCE_START_LOCATION = 0x10000 def create_full_bin(source, target, env): firmware_file = target[0].get_abspath() full_image_filename = env.subst("$BUILD_DIR/${PROGNAME}-full.bin") parts = [] # Will contain 3 parts outside of the main firmw...
0
0
0
0
0
0
tests/test_list.py
theosech/ec
290
3248691
import unittest class TestListMain(unittest.TestCase): def test_imports(self): try: from dreamcoder.domains.list.main import ( retrieveJSONTasks, list_features, isListFunction, isIntFunction, train_necessary, ...
0
0
0
0
0
0
px/nmt/utils/iterator_utils_test.py
cclauss/active-qa
327
3248725
# 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, ...
0
0
0
0
0
0
aiida/orm/utils/node.py
azadoks/aiida-core
180
3248757
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
1
5
0
0
6
0
deepmath/deephol/prover_runner.py
LaudateCorpus1/deepmath
830
3248790
"""Simple runner for the prover. Iterate over the tasks sequentially. This runner can run the prover on a set of tasks without the overhead of starting a distributed job. """ from __future__ import absolute_import from __future__ import division # Import Type Annotations from __future__ import print_function import...
3
1
0
0
4
0
testing/gen_feature_space_samples.py
alitrack/dtreeviz
1,905
3248803
<filename>testing/gen_feature_space_samples.py import numpy as np import pandas as pd import graphviz import graphviz.backend from numpy.distutils.system_info import f2py_info from sklearn import tree from sklearn.datasets import load_boston, load_iris, load_wine, load_digits, load_breast_cancer, load_diabetes, fetch_m...
0
0
0
0
0
0
dace/transformation/dataflow/map_dim_shuffle.py
jnice-81/dace
227
3248811
<reponame>jnice-81/dace # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. """ Implements the map-dim shuffle transformation. """ from dace import registry from dace.sdfg import SDFG from dace.sdfg import nodes from dace.sdfg import utils as sdutil from dace.transformation import transformatio...
0
0
0
0
0
0
ue4docker/test.py
meetakshay99/ue4-docker
579
3248850
from .infrastructure import DockerUtils, GlobalConfiguration, Logger from container_utils import ContainerUtils, ImageUtils import docker, os, platform, sys def test(): # Create our logger to generate coloured output on stderr logger = Logger(prefix="[{} test] ".format(sys.argv[0])) # Create our Docker ...
0
0
0
0
0
0
mindspore/offline_debug/dump_analyzer.py
mindspore-ai/mindspore
3,200
3248856
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
12
5
0
0
17
0
fairseq/generate_or_copy.py
Mahasweta-usc/helo_word
117
3248863
############################################################################### # CUSTOM MODULE FOR GEC ############################################################################### #!/usr/bin/env python3 -u # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under th...
0
1
0
0
1
0
src/evaluation/export_predictions.py
vijay120/bran
120
3248878
from __future__ import annotations from termcolor import colored import time from src.feed_dicts import * import sys def export_predictions(sess, model, FLAGS, positive_test_batcher, negative_test_batcher, string_int_maps, out_file, threshold_map: object | None=None): ''' export hard dec...
1
0
0
0
1
0
examples/web.py
JumpingYang001/tornadis
138
3248880
<reponame>JumpingYang001/tornadis from tornado.ioloop import IOLoop from tornado.web import RequestHandler, Application, url import tornado.gen import tornadis import logging logging.basicConfig(level=logging.WARNING) POOL = tornadis.ClientPool(max_size=15) class HelloHandler(RequestHandler): @tornado.gen.corou...
0
0
0
0
0
0
utils/prepare_for_doc_test.py
dctelus/transformers
8,028
3248937
<filename>utils/prepare_for_doc_test.py # coding=utf-8 # Copyright 2022 The HuggingFace Inc. team. # # 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/LICEN...
0
0
0
0
0
0
Contents/Libraries/Shared/plex/objects/library/video.py
jippo015/Sub-Zero.bundle
1,553
3248939
<reponame>jippo015/Sub-Zero.bundle from plex.objects.core.base import Property from plex.objects.directory import Directory from plex.objects.library.extra.director import Director from plex.objects.library.extra.writer import Writer from plex.objects.library.media import Media from plex.objects.mixins.session import S...
0
0
0
0
0
0
app/youtubedl.py
salesforcedoc/deezer-downloader
298
3248947
<reponame>salesforcedoc/deezer-downloader<filename>app/youtubedl.py import re from shlex import quote from subprocess import Popen, PIPE from configuration import config youtube_dl_cmd = config["youtubedl"]["command"] + " -x --audio-format mp3 --audio-quality 0 {video_url} -o '{destination_dir}/%(title)s.%(ext)s'" c...
0
0
0
0
0
0
nvtabular/inference/triton/data_conversions.py
thibaultcharrin/NVTabular
124
3248950
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions a...
2
6
0
0
8
0
app-tracing/x-ray/python-flask-app/app.py
doi-t/aws-workshop-for-kubernetes
2,236
3248959
from __future__ import annotations import os import socket import os from flask import Flask, request #https://docs.aws.amazon.com/xray-sdk-for-python/latest/reference/basic.html # #Lets try to use AWS X-ray for metrics / logging if available to us try: from aws_xray_sdk.core import xray_recorder from aws_xray...
1
5
0
0
6
0
lib/project_time_metrics.py
Rehzende/project-dev-kpis
113
3248985
from dateutil.rrule import * from prometheus_client import Histogram from company_jira import jira from util import * from jira_util import * PROJECT_TIME_HISTOGRAM = Histogram( 'project_time_days', 'Lead time in days.', ['project', 'metric'], buckets=[ 0.5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12,...
1
2
0
0
3
0
tests/test_predicate.py
ajhynes7/datatest
277
3248997
<gh_stars>100-1000 #!/usr/bin/env python # -*- coding: utf-8 -*- from . import _unittest as unittest import cmath import decimal import math import re try: import numpy except ImportError: numpy = False from datatest._vendor.predicate import ( _check_type, _check_callable, _check_wildcard, _ch...
0
0
0
0
0
0
cogdl/utils/__init__.py
li-ziang/cogdl
1,072
3249062
from .utils import * from .evaluator import * from .sampling import * from .graph_utils import * from .spmm_utils import * from .transform import *
0
0
0
0
0
0
config/custom_components/scheduler/store.py
LRvdLinden/homeassistant-config
288
3249100
import logging import secrets from collections import OrderedDict from typing import MutableMapping, cast import attr from homeassistant.core import (callback, HomeAssistant) from homeassistant.loader import bind_hass from homeassistant.const import ( ATTR_NAME, CONF_CONDITIONS, ) from . import...
7
13
1
1
22
0
fbzmq/py/setup.py
dgrnbrg-meta/fbzmq
263
3249124
<reponame>dgrnbrg-meta/fbzmq #!/usr/bin/env python3 # # Copyright (c) 2014-present, Facebook, Inc. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # from __future__ import absolute_import, division, print_function import os from subprocess...
0
0
0
0
0
0
src/ebonite/runtime/client/__init__.py
koskotG/ebonite
270
3249147
<filename>src/ebonite/runtime/client/__init__.py<gh_stars>100-1000 from .base import BaseClient __all__ = ['BaseClient']
0
0
0
0
0
0
python/tvm/relay/transform/flexible_shape.py
shengxinhu/tvm
4,640
3249150
# 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...
11
4
0
0
15
0
tests/test_integration.py
AvanDavad/jaxfg
120
3249168
<reponame>AvanDavad/jaxfg """Simple pose graph tests. Could use cleanup/refactoring.""" from typing import Tuple import jax_dataclasses from jax import numpy as jnp from overrides import overrides import jaxfg @jax_dataclasses.pytree_dataclass class VariableValue: a: jaxfg.hints.Array b: jaxfg.hints.Scalar...
0
0
0
0
0
0
lib/servers/__init__.py
v1stra/krbrelayx
598
3249185
<gh_stars>100-1000 from .httprelayserver import HTTPKrbRelayServer from .smbrelayserver import SMBRelayServer
0
0
0
0
0
0
Python/Collection/SliceCopy.py
piovezan/SOpt
148
3249270
bS = v[:] bS = bubbleSort(v) #https://pt.stackoverflow.com/q/412454/101
0
0
0
0
0
0
muzero/atari/env.py
DionysisChristopoulos/google-research
23,901
3249295
# coding=utf-8 # Copyright 2021 The Google Research 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 by applicab...
13
12
0
3
28
0
config/custom_components/virtual/sensor.py
LRvdLinden/homeassistant-config
288
3249307
from __future__ import annotations """ This component provides support for a virtual sensor. """ import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.sensor import DOMAIN from homeassistant.const import ATTR_ENTITY_ID from homeassistant.helpers.c...
1
5
0
0
6
0
sdk/powerbiembedded/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/__init__.py
rsdoherty/azure-sdk-for-python
2,728
3249309
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
0
0
0
0
0
0
doge/config/config.py
zhu327/doge
163
3249313
# coding: utf-8 from io import open import yaml from doge.common.exceptions import ( ReferCfgError, RegistryCfgError, ServiceCfgError, ) from doge.common.url import URL class Config: def __init__(self, name: str) -> None: self.name = name self.cfg = self.config_from_file(name) ...
2
5
0
0
7
0
trove/tests/scenario/groups/instance_delete_group.py
a4913994/openstack_trove
244
3249329
<gh_stars>100-1000 # Copyright 2015 Tesora 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 # # U...
0
0
0
0
0
0
tests/test_measures.py
darrenreger/zEpid
101
3249332
import pytest import numpy as np import pandas as pd import numpy.testing as npt import pandas.testing as pdt from scipy.stats import logistic import zepid as ze from zepid import (RiskRatio, RiskDifference, OddsRatio, NNT, IncidenceRateRatio, IncidenceRateDifference, Sensitivity, Specificity, Diagn...
2
7
0
0
9
0
apps/tests/TestNetwork/test.py
mtaghiza/tinyos-main-1
1,053
3249351
from TOSSIM import * from tinyos.tossim.TossimApp import * from random import * import sys #n = NescApp("TestNetwork", "app.xml") #t = Tossim(n.variables.variables()) t = Tossim([]) r = t.radio() f = open("sparse-grid.txt", "r") lines = f.readlines() for line in lines: s = line.split() if (len(s) > 0): if s[0...
0
0
0
0
0
0
src/test/make_tests_product.py
jestinepaul/pycryptodome
5,079
3249354
"""Make unit test for product() in modexp.c""" from common import counter, make_main, split64 def make_test(a, b): # Turn a[], b[] and the result into arrays of 64-bit words result = split64(a*b) a = split64(a) b = split64(b) # Pad the output vector with as many padding zeroes as needed # ...
0
0
0
0
0
0
L1Trigger/L1CaloTrigger/python/Phase1L1TJetCalibrator_9x9Jets_cfi.py
Purva-Chaudhari/cmssw
852
3249359
import FWCore.ParameterSet.Config as cms calibration = cms.VPSet( cms.PSet( etaMax = cms.double(0.435), etaMin = cms.double(0), l1tCalibrationFactors = cms.vdouble( 1.26146717329, 1.26146717329, 1.26146717329, 1.26146717329, 1.26146717329, 1.26146717329, 1.2614671732...
0
0
0
0
0
0
plugins/DNSDetection/__init__.py
ebsa491/whichCDN
163
3249395
#!/usr/bin/env python """ DNSDetection plugin performs CDN detection through nslookup results. """ from plugins.DNSDetection.behaviors import detect
0
0
0
0
0
0
dapr/proto/__init__.py
willtsai/python-sdk
125
3249445
# -*- coding: utf-8 -*- """ Copyright 2021 The Dapr 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 by applicable law or agreed...
1
0
0
0
1
0
benchmarks/mstress/mstress_cleanup.py
kristi/qfs
358
3249447
#!/usr/bin/env python # # $Id$ # # Copyright 2012,2016 Quantcast 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-...
0
0
0
0
0
0
src/ADR_solver.py
shushu-qin/deeponet
140
3249554
from __future__ import absolute_import from __future__ import division from __future__ import print_function import matplotlib.pyplot as plt import numpy as np def solve_ADR(xmin, xmax, tmin, tmax, k, v, g, dg, f, u0, Nx, Nt) -> tuple[object, object, object]: """Solve 1D u_t = (k(x) u_x)_x - v(x) u...
0
1
0
0
1
0
docs/tutorials/helloworld.py
sharkguto/arsenic
281
3249555
<reponame>sharkguto/arsenic import asyncio import sys from arsenic import get_session, keys, browsers, services if sys.platform.startswith("win"): GECKODRIVER = "./geckodriver.exe" else: GECKODRIVER = "./geckodriver" async def hello_world(): service = services.Geckodriver(binary=GECKODRIVER) browser...
0
0
0
0
0
0
scripts/geodata/log.py
Fillr/libpostal
3,489
3249561
import logging import sys def log_to_file(f, level=logging.INFO): handler = logging.StreamHandler(f) formatter = logging.Formatter('%(asctime)s %(levelname)s [%(name)s]: %(message)s') handler.setFormatter(formatter) logging.root.addHandler(handler) logging.root.setLevel(level)
0
0
0
0
0
0
regexploit/ast/categories.py
CrackerCat/regexploit
592
3249570
import sys import unicodedata from enum import Enum, auto from typing import Set class Category(Enum): DIGIT = auto() NOT_DIGIT = auto() WORD = auto() NOT_WORD = auto() SPACE = auto() NOT_SPACE = auto() @property def is_positive(self) -> bool: return not self.name.startswith("...
3
5
0
0
8
0
stdlib_tests/test_bisect.py
jacebrowning/voc
850
3249577
<gh_stars>100-1000 import bisect print(bisect.bisect([1, 5, 9, 10], 7)) print(bisect.bisect([1, 5, 9, 10], 10))
0
0
0
0
0
0
testbed/test_multiple_callbacks/test_gevent.py
isaaczinda/opentracing-python
795
3249585
<reponame>isaaczinda/opentracing-python<filename>testbed/test_multiple_callbacks/test_gevent.py from __future__ import print_function import random import gevent from opentracing.mocktracer import MockTracer from opentracing.scope_managers.gevent import GeventScopeManager from ..testcase import OpenTracingTestCase f...
0
0
0
0
0
0
caffe-grid/src/main/python/com/yahoo/ml/caffe/tools/Vocab.py
gridgentoo/CaffeOnSpark
1,436
3249591
''' Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. Please see LICENSE file in the project root for terms. ''' from com.yahoo.ml.caffe.ConversionUtil import wrapClass from com.yahoo.ml.caffe.RegisterContext import registerContext from pyspark.sql import DataFrame,SQLContext class Vocab: ...
0
0
0
0
0
0
Codes/gracekoo/interview_4.py
liuxiaohui1221/algorithm
256
3249597
# -*- coding: utf-8 -*- # @Time: 2020/5/10 22:47 # @Author: GraceKoo # @File: interview_4.py # @Desc: https://leetcode-cn.com/problems/zhong-jian-er-cha-shu-lcof/ from __future__ import annotations class TreeNode: def __init__(self, x): self.val = x self.left: None = None self.right: None ...
0
1
0
2
3
0
tests/test_main.py
mandiant/flare-floss
145
3249624
<gh_stars>100-1000 # Copyright (C) 2020 Mandiant, Inc. All Rights Reserved. import pytest import fixtures from fixtures import exefile import floss.main def test_main_help(): for help_str in ("-h", "-H"): # via https://medium.com/python-pandemonium/testing-sys-exit-with-pytest-10c6e5f7726f with ...
0
0
0
0
0
0
greykite/sklearn/transform/column_selector.py
CaduceusInc/greykite
1,503
3249634
<reponame>CaduceusInc/greykite # BSD 2-CLAUSE LICENSE # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # Redistributions of source code must retain the above copyright notice, this # list of conditions and the following ...
0
0
0
0
0
0
sleap/diagnostic.py
preeti98/sleap
156
3249662
<gh_stars>100-1000 """ Outputs diagnostic information to help with debugging SLEAP installation. """ print_to_screen = False output_text = "" def print_(text=""): global output_text if print_to_screen: print(f"{text}") else: output_text += f"{text}\n" def header(text): print_(f"\n==...
0
0
0
0
0
0
terrascript/data/jianyuan/sentry.py
mjuenema/python-terrascript
507
3249667
<reponame>mjuenema/python-terrascript<filename>terrascript/data/jianyuan/sentry.py # terrascript/data/jianyuan/sentry.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:26:49 UTC) import terrascript class sentry_key(terrascript.Data): pass class sentry_organization(terrascript.Data): pass _...
0
0
0
0
0
0
StackApp/env/lib/python2.7/site-packages/flask_api/negotiation.py
jonathanmusila/StackOverflow-Lite
555
3249673
# coding: utf8 from __future__ import unicode_literals from flask import request from flask_api import exceptions from flask_api.mediatypes import MediaType, parse_accept_header class BaseNegotiation(object): def select_parser(self, parsers): msg = '`select_parser()` method must be implemented for class "...
0
2
0
0
2
0
apps/layerSwap.py
TommyZihao/MMGEN-FaceStylor
122
3249713
import argparse import os import sys import cv2 import mmcv import torch import torchvision.transforms as transforms from torchvision import utils from demo.utils import normal_image # yapf: enable # yapf: disable sys.path.append(os.path.abspath(os.path.join(__file__, '../..'))) # isort:skip # noqa import agilegan...
0
3
0
0
3
0
osf/migrations/0188_deleted_field_mig.py
gaybro8777/osf.io
628
3249731
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-06-27 20:29 from __future__ import unicode_literals from django.db import migrations import osf.utils.fields class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ('osf', '0187_remove_outdated_contributor_permissions'...
0
0
2
0
2
0
services/core/DNP3Agent/dnp3/outstation.py
rmay-intwine/volttron
406
3249738
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright 2018, SLAC / 8minutenergy / Kisensum. # # 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://...
0
12
3
8
23
0
etl/parsers/etw/Microsoft_Windows_WinJson.py
IMULMUL/etl-parser
104
3249744
# -*- coding: utf-8 -*- """ Microsoft-Windows-WinJson GUID : 4637124c-1d40-4b4d-892f-2aaecf24ff06 """ from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct from etl.utils import WString, CString, SystemTime, Guid from etl.dtyp import Sid from etl.par...
0
0
0
0
0
0
reference/NumpyDL-master/tests/test_layers/test_recurrent.py
code4bw/deep-np
186
3249754
<reponame>code4bw/deep-np # -*- coding: utf-8 -*- import pytest import numpy as np from npdl.layers import Recurrent from npdl.layers import GRU from npdl.layers import LSTM class PrevLayer: def __init__(self, out_shape): self.out_shape = out_shape def test_Recurrent(): for seq in (True, False): ...
0
0
0
0
0
0
dm_pix/_src/patch.py
SupreethRao99/dm_pix
219
3249797
# Copyright 2021 DeepMind Technologies Limited. 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 ...
5
1
0
0
6
0
peering/migrations/0055_auto_20191110_1312.py
schiederme/peering-manager
173
3249841
# Generated by Django 2.2.6 on 2019-11-10 12:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [("peering", "0054_auto_20191031_2241")] operations: list[object] = [ migrations.AddField( model_name="directpeeringsessi...
0
0
2
0
2
0
pyocd/target/builtin/target_LPC845.py
majorlin/pyOCD
276
3249857
<filename>pyocd/target/builtin/target_LPC845.py # pyOCD debugger # Copyright (c) 2021 NXP # SPDX-License-Identifier: Apache-2.0 # # 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://...
0
0
0
0
0
0
_cockroach-split-ranges.py
rboixaderg/guillotina
173
3249887
<reponame>rboixaderg/guillotina import argparse import asyncio import asyncpg parser = argparse.ArgumentParser() parser.add_argument("--connection", default="postgresql://root@localhost:26257/guillotina?sslmode=disable") parser.add_argument("--segments", type=int, default=50) async def run(): args = parser.pars...
0
0
0
0
0
0