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
atlas/foundations_contrib/src/foundations_contrib/option.py
DeepLearnI/atlas
296
3343262
<filename>atlas/foundations_contrib/src/foundations_contrib/option.py def Option(value): from foundations_contrib.something import Something from foundations_contrib.nothing import Nothing if isinstance(value, Nothing) or isinstance(value, Something): return value return Nothing() if value i...
0
0
0
0
0
0
utils/__init__.py
collector-m/UniTrack
240
3343318
<filename>utils/__init__.py from collections import defaultdict, deque import datetime import time import torch import errno import os import pdb import sys from . import visualize from . import box from . import meter from . import log import numpy as np from torch import nn from torch.nn import functional as F d...
0
0
0
0
0
0
dtreeviz/models/spark_decision_tree.py
alitrack/dtreeviz
1,905
3343327
<reponame>alitrack/dtreeviz<filename>dtreeviz/models/spark_decision_tree.py<gh_stars>1000+ from abc import ABC from collections import defaultdict from typing import List, Mapping import numpy as np import pyspark from dtreeviz.models.shadow_decision_tree import ShadowDecTree from pyspark.ml.classification import De...
0
0
0
0
0
0
test/debug/test_handles.py
steve-s/hpy
476
3343342
import pytest @pytest.fixture def hpy_abi() -> str: return "debug" def make_leak_module(compiler) -> object: # for convenience return compiler.make_module(""" HPyDef_METH(leak, "leak", leak_impl, HPyFunc_O) static HPy leak_impl(HPyContext *ctx, HPy self, HPy arg) { HPy_D...
0
2
0
0
2
0
src/socketio/exceptions.py
flocko-motion/python-socketio
2,977
3343416
class SocketIOError(Exception): pass class ConnectionError(SocketIOError): pass class ConnectionRefusedError(ConnectionError): """Connection refused exception. This exception can be raised from a connect handler when the connection is not accepted. The positional arguments provided with the exc...
0
0
0
3
3
0
sample/Python/kabusapi_regulations.py
HolyMartianEmpire/kabusapi
212
3343444
import urllib.request import json import pprint url = 'http://localhost:18080/kabusapi/regulations/9433@1' req = urllib.request.Request(url, method='GET') req.add_header('Content-Type', 'application/json') req.add_header('X-API-KEY', '43e7cc3611fd476db35e93c36a3f77ef') try: with urllib.request.urlopen(req) as res...
0
0
0
0
0
0
Packs/CommonScripts/Scripts/CompareIncidentsLabels/CompareIncidentsLabels.py
diCagri/content
799
3343454
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import traceback try: inc1 = demisto.args().get('incident_id_1') inc2 = demisto.args().get('incident_id_2') res = demisto.executeCommand("getIncidents", {'id': inc1}) if any(is_error(entry) for entry in...
0
0
0
0
0
0
containerregistry/client/v1/docker_session_.py
suomitekai/fairing
334
3343471
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
4
0
1
5
0
airflow/providers/apache/druid/hooks/druid.py
ChaseKnowlden/airflow
15,947
3343487
# # 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...
0
0
0
0
0
0
external/lemonade/dist/lemonade/parse.py
almartin82/bayeslite
964
3343508
<reponame>almartin82/bayeslite ''' Input file parser for the LEMON parser generator. ''' from ccruft import * from error import * from struct import * from table import * from sys import exit MAXRHS = 1000 ( INITIALIZE, WAITING_FOR_DECL_OR_RULE, WAITING_FOR_DECL_KEYWORD, WAITING_FOR_DECL_ARG, ...
0
0
0
0
0
0
data_conversions/prepare_partseg_data.py
mateoKutnjak/PointCNN
1,310
3343514
#!/usr/bin/python3 '''Prepare Data for ShapeNet Segmentation Task.''' from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import h5py import argparse import numpy as np from datetime import datetime sys.path.append(os.path.dirname(os.path....
0
0
0
0
0
0
backends/bmv2/run-bmv2-test.py
boxiang-yu/p4c_hash
487
3343519
#!/usr/bin/env python3 # 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 b...
1
9
0
17
27
0
torchmetrics/functional/audio/snr.py
stancld/metrics
769
3343525
# Copyright The PyTorch Lightning 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/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
8
3
0
0
11
0
tests/storage/psql_dos/migrations/sqlalchemy_branch/test_migrate_to_head.py
mkrack/aiida-core
153
3343537
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
1
0
0
0
1
0
AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/pydocgui.pyw
CEOALT1/RefindPlusUDK
2,757
3343539
# Note: this file must not be named pydoc.pyw, lest it just end up # importing itself (Python began allowing import of .pyw files # between 2.2a1 and 2.2a2). import pydoc if __name__ == '__main__': pydoc.gui()
0
0
0
0
0
0
run.py
happy-jihye/Cartoon-StyleGAN
244
3343547
<reponame>happy-jihye/Cartoon-StyleGAN import os import torch import argparse from argparse import Namespace def prepare_data(dataset_folder, zip_file=None, target_size=256): # Unzip if zip_file is not None: os.system(f'unzip {zip_file} -d "/{zip_file}"') os.system(f'rm {zip_file}') #...
0
0
0
0
0
0
guillotina/tests/test_cors.py
rboixaderg/guillotina
173
3343553
<gh_stars>100-1000 from copy import deepcopy from guillotina import cors from guillotina._settings import app_settings from guillotina.response import HTTPUnauthorized from guillotina.tests.utils import get_mocked_request import pytest pytestmark = pytest.mark.asyncio @pytest.mark.app_settings({"cors": {"allow_ori...
0
0
0
0
0
0
tests/lib/test_priority_mux.py
bogdanvuk/pygears
120
3343574
<filename>tests/lib/test_priority_mux.py import pytest from pygears import Intf from pygears.lib import priority_mux from pygears.lib.delay import delay_rng from pygears.lib.verif import directed, drv, verif from pygears.sim import sim from pygears.typing import Int, Queue, Tuple, Uint from pygears.util.test_utils imp...
0
0
0
0
0
0
docs/source/example/sample3.py
BSathvik/neo-python
387
3343609
from __future__ import annotations from boa.interop.Neo.Storage import Get,Put,Delete,GetContext def Main(operation, addr, value) -> bool | object: if not is_valid_addr(addr): return False ctx = GetContext() if operation == 'add': balance = Get(ctx, addr) new_balance = balance + value ...
0
2
0
0
2
0
Python/klampt/plan/robotcspace.py
smeng9/Klampt
238
3343615
<gh_stars>100-1000 from .cspace import CSpace from .. import robotsim from ..model import collide from .cspaceutils import EmbeddedCSpace import math import random class RobotCSpace(CSpace): """A basic robot cspace that allows collision free motion. Args: robot (RobotModel): the robot that's moving. ...
0
0
0
0
0
0
sanic_crudvue/__init__.py
truexin1292/SanicCRUD-vue
393
3343617
<filename>sanic_crudvue/__init__.py from sanic_crudvue.crud import crud_bp __all__ =['crud_bp']
0
0
0
0
0
0
mlcomp/worker/executors/__init__.py
sUeharaE4/mlcomp
166
3343652
<gh_stars>100-1000 # flake8: noqa from .base import StepWrap, Executor
0
0
0
0
0
0
stellar_sdk/xdr/signer.py
MartinThoma/py-stellar-base
341
3343659
<reponame>MartinThoma/py-stellar-base # This is an automatically generated file. # DO NOT EDIT or your changes may be overwritten import base64 from xdrlib import Packer, Unpacker from .signer_key import SignerKey from .uint32 import Uint32 __all__ = ["Signer"] class Signer: """ XDR Source Code --------...
0
0
0
0
0
0
build_files/buildbot/worker_test.py
gunslingster/CSC581-assignement1
365
3343677
<filename>build_files/buildbot/worker_test.py<gh_stars>100-1000 # ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or ...
0
0
0
0
0
0
recipes/Python/299777_Simplified_Mutable_Instances/recipe-299777.py
tdiprima/code
2,023
3343699
class MutableInstance(dict): def __init__(self): self.__dict__ = self # This makes common tasks easier, not by much but conceptually it unifies things Foo = MutableInstance() Foo.x = 5 assert Foo['x'] == 5 Foo.y = 7 assert Foo.keys() == ['x', 'y'] assert Foo.values() == [5, 7] # And now you can pass it to anythin...
0
0
0
0
0
0
py/demo/dashboard_purple.py
swt2c/wave
3,013
3343714
from h2o_wave import ui, data, Q from .common import global_nav from .synthetic_data import * async def show_purple_dashboard(q: Q): q.page['meta'] = ui.meta_card(box='', layouts=[ ui.layout( breakpoint='xs', zones=[ ui.zone('header'), ui.zone('title...
1
0
0
0
1
0
examples/hp_search_benchmarks/darts_cifar10_pytorch/operations.py
gh-determined-ai/determined
1,729
3343746
# From DARTS repo: https://github.com/quark0/darts # commit: <PASSWORD> import torch import torch.nn as nn OPS = { "none": lambda C, stride, affine: Zero(stride), "avg_pool_3x3": lambda C, stride, affine: nn.AvgPool2d( 3, stride=stride, padding=1, count_include_pad=False ), "max_pool_3x3": lamb...
4
6
0
0
10
0
Lib/objc/_SAObjects.py
snazari/Pyto
701
3343749
<filename>Lib/objc/_SAObjects.py<gh_stars>100-1000 """ Classes from the 'SAObjects' framework. """ try: from rubicon.objc import ObjCClass except ValueError: def ObjCClass(name): return None def _Class(name): try: return ObjCClass(name) except NameError: return None SAClass...
0
0
0
0
0
0
explainer/backprop.py
jhammelman/visual-attribution
146
3343758
from __future__ import annotations import numpy as np from torch.autograd import Variable, Function import torch import types class VanillaGradExplainer(object): def __init__(self, model): self.model = model def _backprop(self, inp, ind) -> object: output = self.model(inp) if ind is N...
9
14
0
0
23
0
Algo and DSA/LeetCode-Solutions-master/Python/day-of-the-year.py
Sourav692/FAANG-Interview-Preparation
3,269
3343768
# Time: O(1) # Space: O(1) class Solution(object): def __init__(self) -> object: def dayOfMonth(M) -> object: return (28 if (M == 2) else 31-(M-1)%7%2) self.__lookup = [0]*12 for M in xrange(1, len(self.__lookup)): self.__lookup[M] += self.__lookup[M-1]+dayOfMonth(...
0
5
0
0
5
0
fountain/data_generator.py
tzano/fountain
108
3343814
<gh_stars>100-1000 # -*- coding: utf-8 -*- """Main module.""" import io import itertools import json import logging import re import yaml from .core.utterance import Utterance from .core.slot import Slot from .core.entity import Entity from .resources.builtin import FOUNTAIN_BUILTIN, RESOURCES from .resources.const...
0
0
0
0
0
0
tea/build.py
corinneherzog/tea-lang
218
3343824
<reponame>corinneherzog/tea-lang<filename>tea/build.py from typing import Union import pandas as pd from tea.runtimeDataStructures.dataset import Dataset from tea.ast import (Variable, DataType, Literal, Relate, Relationship) from collections import OrderedDict from pathlib import Path iv_identifier = 'independent ...
0
0
0
0
0
0
redun/tests/test_utils.py
cclauss/redun
303
3343841
<gh_stars>100-1000 import os import pickle import sys from collections import defaultdict, namedtuple from contextlib import contextmanager from enum import Enum from typing import DefaultDict, Generator, NamedTuple import pytest from redun.tests.utils import use_tempdir from redun.utils import ( MultiMap, Pr...
0
0
0
0
0
0
utils/dataset/joint_ctc_attention.py
sundogrd/tensorflow_end2end_speech_recognition
351
3343851
<reponame>sundogrd/tensorflow_end2end_speech_recognition #! /usr/bin/env python # -*- coding: utf-8 -*- """Base class for laoding dataset for the Jont CTC-Attention model. In this class, all data will be loaded at once. You can use the multi-GPU version. """ from __future__ import absolute_import from __future_...
0
0
0
0
0
0
maigret.py
noi4eg/maigret
1,156
3343873
<filename>maigret.py #!/usr/bin/env python3 import asyncio import sys from maigret.maigret import main def run(): try: loop = asyncio.get_event_loop() loop.run_until_complete(main()) except KeyboardInterrupt: print('Maigret is interrupted.') sys.exit(1) if __name__ == "__mai...
0
0
0
0
0
0
setup.py
didichuxing/delta
1,442
3343879
<filename>setup.py from setuptools import setup from setuptools import find_packages from setuptools import Extension from datetime import date import os import sys from glob import glob import tensorflow as tf from absl import logging logging.set_verbosity(logging.INFO) TF_INCLUDE, TF_CFLAG = tf.sysconfig.get_compi...
0
0
0
0
0
0
lottery/branch/base.py
chenw23/open_lth
509
3343887
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import abc import argparse from dataclasses import dataclass, field, make_dataclass, fields import inspect from typing import List from cli im...
7
10
11
0
28
0
node_modules/bcrypto/binding.gyp
pradyuman-verma/bcoin
2,816
3343890
<filename>node_modules/bcrypto/binding.gyp<gh_stars>1000+ { "variables": { "with_secp256k1%": "true" }, "targets": [ { "target_name": "torsion", "type": "static_library", "sources": [ "./deps/torsion/src/aead.c", "./deps/torsion/src/asn1.c", "./deps/torsion/src/ci...
0
0
0
0
0
0
goodsbrand/filter.py
wh8983298/GreaterWMS
1,063
3343915
<filename>goodsbrand/filter.py from django_filters import FilterSet from .models import ListModel class Filter(FilterSet): class Meta: model = ListModel fields = { "id": ['exact', 'iexact', 'gt', 'gte', 'lt', 'lte', 'isnull', 'in', 'range'], "goods_brand": ['exact', 'iexact'...
0
0
0
0
0
0
jikexueyuan/python/trainer/check_captcha.py
LeWeis/captcha-break
772
3343919
<reponame>LeWeis/captcha-break # coding=utf-8 from __future__ import print_function from gen.gen_captcha import gen_dataset, load_templates import cPickle as pickle from PIL import Image import numpy as np from gen.utils import vec2str def check_dataset(dataset, labels, index): data = np.uint8(dataset[index]).resha...
0
0
0
0
0
0
sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_internal/rsa_key.py
vincenttran-msft/azure-sdk-for-python
2,728
3343929
<filename>sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_internal/rsa_key.py # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import uuid from cryptography.exceptions import InvalidSignature from cryptog...
0
0
0
0
0
0
odo/compatibility.py
farukht/odo
844
3343956
<filename>odo/compatibility.py from __future__ import absolute_import, division, print_function import sys import itertools import os PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 ON_TRAVIS_CI = 'TRAVIS_PYTHON_VERSION' in os.environ if sys.version_info[0] >= 3: unicode = str map = map ran...
0
0
0
0
0
0
sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_models.py
rsdoherty/azure-sdk-for-python
2,728
3343971
# 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 may ...
0
0
120
71
191
0
apps/UDPEcho/util/Listener.py
mtaghiza/tinyos-main-1
1,053
3343990
<filename>apps/UDPEcho/util/Listener.py import socket import UdpReport import re import sys import time import threading port = 7000 stats = {} class PrintStats(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.daemon = True def run(self): while True: ...
0
0
0
0
0
0
sdk/python/pulumi_aws/route53/__init__.py
alexbowers/pulumi-aws
260
3343993
<reponame>alexbowers/pulumi-aws # coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from .. import _utilities import typing # Export this package's modules as members: from ._enums import...
0
0
0
0
0
0
sdk/python/pulumi_azure/siterecovery/replication_policy.py
aangelisc/pulumi-azure
109
3343996
<filename>sdk/python/pulumi_azure/siterecovery/replication_policy.py # coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing im...
0
0
0
0
0
0
backend/www/ping.py
sleepingAnt/viewfinder
645
3343997
# Copyright 2013 Viewfinder Inc. All Rights Reserved. from __future__ import annotations """Ping handler. Logs ping request and response to INFO. May send back a message to the client based on the value of the fields in the ping request (eg: notice of newer version). The message is composed of: - title: required st...
0
2
0
0
2
0
wolframclient/utils/logger.py
jldohmann/WolframClientForPython
358
3343998
<reponame>jldohmann/WolframClientForPython from __future__ import absolute_import, print_function, unicode_literals import logging from wolframclient.utils import six from wolframclient.utils.encoding import force_text if six.PY2: def setup_logging_to_file(path, level=None): logging.basicConfig( ...
0
0
0
0
0
0
python-modules/twisted/twisted/test/test_cooperator.py
stormtheh4ck3r/python-for-android
267
3344003
<reponame>stormtheh4ck3r/python-for-android # Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE for details. """ This module contains tests for L{twisted.internet.task.Cooperator} and related functionality. """ from twisted.internet import reactor, defer, task from twisted.trial import unittest cl...
0
0
0
0
0
0
python/tink/signature/_signature_key_manager_test.py
Baha-sk/tink
12,366
3344023
<reponame>Baha-sk/tink # 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...
0
0
0
0
0
0
alphashape/cli.py
chrstnbwnkl/alphashape
106
3344025
<filename>alphashape/cli.py # -*- coding: utf-8 -*- """Console script for alphashape.""" import os import sys import click import click_log import logging import shapely import geopandas import alphashape # Setup Logging LOGGER = logging.getLogger(__name__) click_log.basic_config(LOGGER) @click.command() @click.ar...
0
0
0
0
0
0
vispy/visuals/graphs/layouts/circular.py
3DAlgoLab/vispy
2,617
3344031
# -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Circular Layout =============== This module contains several graph layouts which rely heavily on circles. """ import numpy as np from ..util import _strai...
1
0
0
0
1
0
SimCalorimetry/Configuration/python/SimCalorimetry_EcalSelectiveReadoutProducers_setBeamcom09_cff.py
ckamtsikis/cmssw
852
3344049
import FWCore.ParameterSet.Config as cms def customise(process) -> object: # ECAL TPG with 2009 beam commissioning TTF thresholds process.EcalTrigPrimESProducer.DatabaseFile = cms.untracked.string('TPG_beamv0_MC.txt.gz') # ECAL SRP settings for 2009 beam commissioning process.simEcalDigis.ecalD...
0
1
0
0
1
0
lib/rucio/common/schema/__init__.py
rcarpa/rucio
187
3344051
<gh_stars>100-1000 # Copyright 2017-2020 CERN for the benefit of the ATLAS collaboration. # # 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 # #...
0
0
0
0
0
0
sklearn/cluster/_agglomerative.py
MaiRajborirug/scikit-learn
199
3344071
<filename>sklearn/cluster/_agglomerative.py """Hierarchical Agglomerative Clustering These routines perform some hierarchical agglomerative clustering of some input data. Authors : <NAME>, <NAME>, <NAME>, <NAME> License: BSD 3 clause """ import warnings from heapq import heapify, heappop, heappush, heappush...
0
0
0
0
0
0
tasks/cmake.py
vladcorneci/golden-gate
262
3344074
# Copyright 2017-2020 Fitbit, Inc # SPDX-License-Identifier: Apache-2.0 from __future__ import annotations import os import sys import subprocess def build(ctx, build_dir, profile, toolchain_file: object | None=None, generator: object | None=None, tests: bool=False, debug: bool=False, coverage: bool=False, ...
11
0
0
0
11
0
tests/aggregate/test_with_ondelete_cascade.py
jarkkorantala/sqlalchemy-utils
879
3344091
<reponame>jarkkorantala/sqlalchemy-utils<gh_stars>100-1000 import pytest import sqlalchemy as sa from sqlalchemy_utils.aggregates import aggregated @pytest.fixture def Thread(Base): class Thread(Base): __tablename__ = 'thread' id = sa.Column(sa.Integer, primary_key=True) name = sa.Column(...
0
0
0
0
0
0
examples/gcharttestapp/GChartExample02.py
takipsizad/pyjs
739
3344093
<reponame>takipsizad/pyjs from GChartTestAppUtil import rnd from pyjamas.chart.HovertextChunk import formatAsHovertext from pyjamas.chart.GChart import GChart from pyjamas.chart import AnnotationLocation from pyjamas.chart import SymbolType from pyjamas.ui.Button import Button groupLabels = [ \ "<html>2004<br><small...
0
0
0
0
0
0
algorithms/largest-permutation.py
gajubadge11/HackerRank-1
340
3344099
#!/bin/python3 import sys def largestPermutation(k, arr) -> object: maxcur = max(arr) positions = {} for ind in range(len(arr)): positions[arr[ind]] = ind for ind in range(len(arr)): if k == 0: break if arr[ind] == maxcur: maxcur -...
0
1
0
0
1
0
ryu/services/protocols/bgp/info_base/ipv6fs.py
w180112/ryu
975
3344111
# Copyright (C) 2017 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
0
3
1
1
5
0
opentpod/object_detector/views.py
cnguyen123/OpenTPOD
111
3344155
<gh_stars>100-1000 import json import os import shutil import django_rq import sendfile from cvat.apps.authentication import auth from cvat.apps.authentication.decorators import login_required from cvat.apps.engine.models import Task from django.conf import settings from django.db.models import Q from django.http impo...
0
0
0
0
0
0
webdriver/tests/interface/interface.py
meyerweb/wpt
14,668
3344160
def test_navigator_webdriver_active(session): assert session.execute_script("return navigator.webdriver") is True
0
0
0
0
0
0
mode/examples/Demos/Graphics/Tentacles/Tentacles.pyde
timgates42/processing.py
1,224
3344210
<reponame>timgates42/processing.py<gh_stars>1000+ '''A sketch inspired by (a radical misinterpretation of) the math from the JS1K segment of <NAME>' "Making Things With Maths" video. Really, everything is mine except the math in `segment.py`. See also http://acko.net/blog/js1k-demo-the-making-of Implemented in Process...
0
0
0
0
0
0
lagom/context_based.py
meadsteve/lagom
109
3344217
<reponame>meadsteve/lagom import logging from contextlib import ExitStack from copy import copy from typing import ( Collection, Union, Type, TypeVar, Optional, cast, ContextManager, Iterator, Generator, ) from lagom import Container from lagom.definitions import ConstructionWithCon...
0
0
0
0
0
0
tests/techniques/test_train_policy_gradient_historic.py
alphagamatoe/AlphaToe
172
3344232
from unittest import TestCase from games.tic_tac_toe import TicTacToeGameSpec from techniques.create_positions_set import create_positions_set class TestCreatePositionsSet(TestCase): def setUp(self): self._game_spec = TicTacToeGameSpec() def test_create_positions(self): number_of_positions =...
0
0
0
0
0
0
analytical/templatetags/chartbeat.py
qyl2021/project
454
3344252
<reponame>qyl2021/project """ Chartbeat template tags and filters. """ import json import re from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.template import Library, Node, TemplateSyntaxError from analytical.utils import disable_html, get_required_setting, is_inte...
0
0
0
0
0
0
src/bindings/python/tests/test_ngraph/test_pooling.py
artkuli/openvino
1,127
3344297
<gh_stars>1000+ # -*- coding: utf-8 -*- # Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np import pytest import openvino.runtime.opset8 as ov from tests.runtime import get_runtime @pytest.fixture() def ndarray_1x1x4x4(): return np.arange(11, 27, dtype=np.float32...
0
0
0
0
0
0
diagrams/saas/social.py
bry-c/diagrams
17,037
3344300
<reponame>bry-c/diagrams # This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _Saas class _Social(_Saas): _type = "social" _icon_dir = "resources/saas/social" class Facebook(_Social): _icon = "facebook.png" class Twitter(_Social): _icon = "twitter.png" # Aliases
0
0
0
0
0
0
3rdParty/V8/v7.9.317/third_party/icu/source/data/buildtool/test/__main__.py
rajeev02101987/arangodb
12,278
3344317
# Copyright (C) 2018 and later: Unicode, Inc. and others. # License & terms of use: http://www.unicode.org/copyright.html import unittest from . import filtration_test def load_tests(loader, tests, pattern) -> object: suite = unittest.TestSuite() suite.addTest(filtration_test.suite) return suite if __na...
0
1
0
0
1
0
tools/Vitis-AI-Runtime/VART/vart/trace/vaitrace/writer/parser/dpu_mc_parser/dpuv4e.py
hito0512/Vitis-AI
848
3344333
# Copyright 2021 Xilinx 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, sof...
1
0
4
1
6
0
build.py
OlegJakushkin/QttpServer
114
3344367
#!/usr/bin/env python # source https://github.com/libuv/libuv/blob/master/gyp_uv.py import glob import platform import os import subprocess import sys try: import multiprocessing.synchronize gyp_parallel_support = True except ImportError: gyp_parallel_support = False CC = os.environ.get('CC', 'cc') scri...
0
0
0
0
0
0
mne/io/nirx/__init__.py
stevemats/mne-python
1,953
3344373
"""fNIRS module for conversion to FIF.""" # Author: <NAME> <<EMAIL>> # # License: BSD-3-Clause from .nirx import read_raw_nirx
0
0
0
0
0
0
terrascript/provider/AviatrixSystems/aviatrix.py
mjuenema/python-terrascript
507
3344385
# terrascript/provider/AviatrixSystems/aviatrix.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:12:12 UTC) import terrascript class aviatrix(terrascript.Provider): """Terraform Aviatrix provider""" __description__: str = "Terraform Aviatrix provider" __namespace__: str = "AviatrixSyste...
0
0
7
0
7
0
SimGeneral/MixingModule/python/stripDigitizer_cfi.py
ckamtsikis/cmssw
852
3344393
import FWCore.ParameterSet.Config as cms from CalibTracker.SiStripESProducers.SiStripGainSimESProducer_cfi import * from SimGeneral.MixingModule.SiStripSimParameters_cfi import SiStripSimBlock stripDigitizer = cms.PSet( SiStripSimBlock, accumulatorType = cms.string("SiStripDigitizer"), hitsProducer = cms....
0
0
0
0
0
0
extratools/segmenttree.py
chuanconggao/extratools
150
3344400
<reponame>chuanconggao/extratools #! /usr/bin/env python3 from toolz.itertoolz import partition_all class SegmentTreeNode(object): def __init__(self, keyrange, default=None): self.keyrange = keyrange self.value = default self.children = [] self.parent = None class SegmentTree(obj...
0
0
0
0
0
0
parl/remote/tests/cluster_status_test.py
lp2333/PARL
3,172
3344412
# 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...
1
1
0
1
3
0
measure_map.py
lichen13911031848/Faster_RCNN
178
3344425
import os import cv2 import numpy as np import sys import pickle from optparse import OptionParser import time from keras_frcnn import config import keras_frcnn.resnet as nn from keras import backend as K from keras.layers import Input from keras.models import Model from keras_frcnn import roi_helpers from keras_frcnn ...
0
2
0
0
2
0
tech_project/lib/python2.7/site-packages/phonenumbers/shortdata/region_KZ.py
priyamshah112/Project-Descripton-Blog
2,424
3344444
"""Auto-generated file, do not edit by hand. KZ metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_KZ = PhoneMetadata(id='KZ', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='[134]\\d{2,4}', possible_length=(3, 4, ...
0
0
0
0
0
0
markovify/text.py
richdevboston/markovify
3,141
3344466
from __future__ import annotations import re import json import random from .splitters import split_into_sentences from .chain import Chain, BEGIN from unidecode import unidecode DEFAULT_MAX_OVERLAP_RATIO = 0.7 DEFAULT_MAX_OVERLAP_TOTAL = 15 DEFAULT_TRIES = 10 class ParamError(Exception): pass class Text: ...
12
17
0
0
29
0
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_06_01_preview/models/_models.py
rsdoherty/azure-sdk-for-python
2,728
3344487
<gh_stars>1000+ # 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...
0
0
0
0
0
0
common/params.py
wolterhv/openpilot
171
3344490
from common.params_pyx import Params, UnknownKeyName, put_nonblocking # pylint: disable=no-name-in-module, import-error assert Params assert UnknownKeyName assert put_nonblocking if __name__ == "__main__": import sys from common.params_pyx import keys # pylint: disable=no-name-in-module, import-error params = P...
0
0
0
0
0
0
novaclient/v2/images.py
klmitch/python-novaclient
199
3344498
# Copyright 2010 <NAME> # # 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 i...
0
4
1
0
5
0
pendulum/locales/nb/locale.py
seandstewart/pendulum
5,049
3344504
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .custom import translations as custom_translations """ nb locale file. It has been generated automatically and must not be modified directly. """ locale = { "plural": lambda n: "one" if (n == n and ((n == 1))) else "other", "ordinal": la...
0
0
0
0
0
0
rlalgos/sac/agent.py
Purple-PI/rlstructures
281
3344506
# # Copyright (c) Facebook, Inc. and its affiliates. # # 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 annotations import torch import torch.nn as nn # import rlstructures.logging as logging from rlstructures import ...
6
11
1
0
18
0
venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_vendor/chardet/sbcharsetprober.py
xiegudong45/typeidea
18,636
3344519
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
2
4
4
5
15
0
doc/examples/smellit.py
nno/PyMVPA
227
3344529
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the PyMVPA package for the # copyright and license terms....
0
0
0
0
0
0
salt_sproxy/_roster/pillar.py
network-shark/salt-sproxy
107
3344563
<gh_stars>100-1000 # -*- coding: utf-8 -*- ''' Load the list of devices from the Pillar. Simply configure the ``roster`` option to point to this module, while making sure that the data is available. As the Pillar is data associated with a specific Minion ID, you may need to ensure that the Pillar is correctly associat...
0
0
0
0
0
0
tests/pytests/integration/modules/grains/conftest.py
babs/salt
9,425
3344567
import attr import pytest import salt.defaults.events @attr.s(kw_only=True, frozen=True, slots=True) class PillarRefreshComplete: event_listener = attr.ib() minion_id = attr.ib() def __call__(self, start_time): expected_tag = salt.defaults.events.MINION_PILLAR_REFRESH_COMPLETE event_patte...
0
1
0
0
1
0
snownlp/normal/pinyin.py
lymsum/hello-world
5,478
3344580
# -*- coding: utf-8 -*- from __future__ import unicode_literals import codecs from ..utils.trie import Trie class PinYin(object): def __init__(self, fname): self.handle = Trie() fr = codecs.open(fname, 'r', 'utf-8') for line in fr: words = line.split() self.handl...
0
1
0
0
1
0
pcapkit/vendor/ipx/__init__.py
chellvs/PyPCAPKit
131
3344587
<gh_stars>100-1000 # -*- coding: utf-8 -*- # pylint: disable=unused-import, wrong-import-position """IPX vendor crawler for constant enumerations.""" ############################################################################### import sys path = sys.path.pop(0) ######################################################...
0
0
0
0
0
0
sert/math_utils.py
cvangysel/SERT
107
3344605
<gh_stars>100-1000 import numpy as np import scipy def entropy(pk, *args, **kwargs): """Proxy for scipy.stats.entropy, with normalized Shannon entropy.""" if 'normalize' in kwargs: normalize = kwargs['normalize'] del kwargs['normalize'] else: normalize = False e = scipy.stats....
0
0
0
0
0
0
im2mesh/r2n2/training.py
FooVizDevs/occupancy_networks
801
3344630
from __future__ import annotations import os from tqdm import trange import numpy as np import torch import torch.nn.functional as F from im2mesh.training import BaseTrainer from im2mesh.common import compute_iou from im2mesh.utils import visualize as vis from im2mesh.utils.voxels import VoxelGrid class Trainer(BaseT...
5
3
0
0
8
0
applications/UmatApplication/tests/test_UmatApplication.py
lkusch/Kratos
778
3344656
# import Kratos import KratosMultiphysics # Import Kratos "wrapper" for unittests import KratosMultiphysics.KratosUnittest as KratosUnittest # Import the tests o test_classes to create the suits: from test_J2_plasticity import TestJ2Plasticity def AssembleTestSuites() -> object: # Suites to run suites = K...
0
1
0
0
1
0
rl/agent/actor_critic.py
AsimKhan2019/OpenAI-Lab
340
3344659
<gh_stars>100-1000 import numpy as np from rl.agent.dqn import DQN from rl.util import logger class ActorCritic(DQN): ''' Actor Critic algorithm. The actor's policy is adjusted in the direction that will lead to better actions, guided by the critic Implementation adapted from http://www.rage....
0
0
0
0
0
0
mpf/tests/test_BallDeviceAutoManualPlunger.py
Scottacus64/mpf
163
3344667
<filename>mpf/tests/test_BallDeviceAutoManualPlunger.py from mpf.tests.MpfTestCase import MpfTestCase from unittest.mock import MagicMock class TestBallDeviceAutoManualPlunger(MpfTestCase): def get_config_file(self): return 'test_ball_device_auto_manual_plunger.yaml' def get_machine_path(self): ...
0
0
0
0
0
0
tests/routing/test_Bills.py
paradiseng/jasmin
750
3344699
# pylint: disable=W0401,W0611 from twisted.trial.unittest import TestCase from jasmin.routing.Bills import SubmitSmBill, SubmitSmRespBill, InvalidBillKeyError, InvalidBillValueError from jasmin.routing.jasminApi import User, Group class BillsTestCase(TestCase): def setUp(self): self.group = Group(1) ...
0
0
0
0
0
0
env/Lib/site-packages/markupsafe/_constants.py
aammjian/cotton
6,989
3344716
<gh_stars>1000+ # -*- coding: utf-8 -*- """ markupsafe._constants ~~~~~~~~~~~~~~~~~~~~~ :copyright: 2010 Pallets :license: BSD-3-Clause """ HTML_ENTITIES = { "AElig": 198, "Aacute": 193, "Acirc": 194, "Agrave": 192, "Alpha": 913, "Aring": 197, "Atilde": 195, "Auml": 196, "Beta": 91...
0
0
0
0
0
0
mandy/mandy/spiders/Mandy.py
abhimangalms/scrapy-spiders
114
3344720
# *-* coding: utf-8 *-* from scrapy.spider import Spider from scrapy.selector import Selector from scrapy.crawler import Crawler from scrapy.http import Request from scrapy import log, signals from scrapy.utils.project import get_project_settings from twisted.internet import reactor from datetime import d...
0
0
0
0
0
0
python/src/main/python/pygw/statistics/binning_strategy/composite_binning_strategy.py
radiant-maxar/geowave
280
3344743
<gh_stars>100-1000 # # Copyright (c) 2013-2020 Contributors to the Eclipse Foundation # # See the NOTICE file distributed with this work for additional information regarding copyright # ownership. All rights reserved. This program and the accompanying materials are made available # under the terms of the Apache Licens...
0
0
0
0
0
0
qa/rpc-tests/parallel_rpc.py
MONIMAKER365/BitcoinUnlimited
535
3344751
<reponame>MONIMAKER365/BitcoinUnlimited #!/usr/bin/env python3.8 # Copyright (c) 2015-2018 The Bitcoin Unlimited developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import test_framework.loginit # This is a template to make ...
0
0
0
0
0
0