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
addons/googledrive/apps.py
gaybro8777/osf.io
628
3221951
<gh_stars>100-1000 from addons.base.apps import BaseAddonAppConfig, generic_root_folder from addons.googledrive.settings import MAX_UPLOAD_SIZE googledrive_root_folder = generic_root_folder('googledrive') class GoogleDriveAddonConfig(BaseAddonAppConfig): name = 'addons.googledrive' label = 'addons_googledriv...
0
0
0
0
0
0
_CI/scripts/_initialize_template.py
tljdebrouwer/toonapilib
127
3221985
import os import sys import logging # This is the main prefix used for logging LOGGER_BASENAME = '''_CI._initialize_template''' LOGGER = logging.getLogger(LOGGER_BASENAME) LOGGER.addHandler(logging.NullHandler()) def add_ci_directory_to_path(): current_file_path = os.path.dirname(os.path.abspath(__file__)) ...
0
0
0
0
0
0
pivotedcsv2libsvm.py
no-brand/phraug
233
3221986
<filename>pivotedcsv2libsvm.py<gh_stars>100-1000 #!/usr/bin/env python """ Convert pivoted CSV file to libsvm format. Works only with numeric variables. Expecting no labels and no headers. If present, headers can be skipped with argv[3] == 1. Example call: python pivotedlibsvm2csv.py pivoted.csv output.txt format: ro...
0
0
0
0
0
0
airflow/providers/slack/hooks/slack.py
ChaseKnowlden/airflow
15,947
3221997
# # 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...
6
3
0
0
9
0
python/Scripts/translateshader.py
BrianSharpe/MaterialX
973
3222039
<filename>python/Scripts/translateshader.py #!/usr/bin/env python ''' Generate a baked translated version of each material in the input document, using the ShaderTranslator class in the MaterialXShaderGen library and the TextureBaker class in the MaterialXRenderGlsl library. ''' import sys, os, argparse import Materia...
0
0
0
0
0
0
tests/unit/test_signature.py
icon-project/loopchain
105
3222054
import os import random import tempfile import unittest from asn1crypto import keys from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import ec from loopchain.crypto.signature import Signer, SignVerifier, lo...
0
2
0
0
2
0
tests/apps/courses/test_cms_toolbars.py
Bodyhealer/richie
174
3222057
from __future__ import annotations """ Test suite of the toolbar extension for organization pages """ from random import choice from django.contrib.auth.models import AnonymousUser, Permission from django.test.utils import override_settings from cms.api import create_page from cms.test_utils.testcases import CMSTestC...
0
1
0
0
1
0
synthesis/src/randomize/randomizer.py
hyunynim/DIST-Renderer
176
3222072
<gh_stars>100-1000 import os, sys import random import numpy as np import yaml sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..')) from common.geometry import View, PointLight, Lighting from common.utils.io_utils import read_from_stat_file class Randomizer(object): def __ini...
0
0
0
0
0
0
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
dan-zheng/llvm-project
765
3222083
<reponame>dan-zheng/llvm-project<gh_stars>100-1000 """ Test lldb data formatter subsystem. """ from __future__ import print_function import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class PyObjectSynthProviderTestCase(TestBase): mydi...
0
0
0
0
0
0
others_problems/problem_2.py
loftwah/Daily-Coding-Problem
129
3222089
"""Given a real number n, find the square root of n. For example, given n = 9, return 3. """ def square_root(x) -> object: return x**(1/2)
0
1
0
0
1
0
setup.py
Sandbergo/learn2branch
248
3222101
from setuptools import setup, find_packages setup( name="learn2branch", version="1.0.0", author="<NAME>, <NAME>, <NAME>, <NAME>, <NAME>", install_requires=["numpy", "scipy"], packages=["learn2branch"], package_dir={"learn2branch": "."}, )
0
0
0
0
0
0
jaxfg/sparse/_linear_solve.py
AvanDavad/jaxfg
120
3222137
import abc from typing import Dict, Hashable, NamedTuple import jax import jax.experimental.host_callback as hcb import jax_dataclasses import numpy as onp import sksparse from jax import numpy as jnp from overrides import EnforceOverrides, overrides from .. import hints from ._sparse_matrix import SparseCooMatrix ...
17
8
6
0
31
0
timesketch/api/v1/resources/timeline.py
rushattac/timesketch
1,810
3222152
# Copyright 2020 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...
0
8
0
0
8
0
python_toolbox/monkeypatch_copyreg.py
hboshnak/python_toolbox
119
3222158
<gh_stars>100-1000 # Copyright 2009-2017 <NAME>. # This program is distributed under the MIT license. '''This module monkey-patches the pickling dispatch table using `copyreg`.''' # todo: alters global state, yuck! Maybe check before if it's already set to # something? import copyreg import types from python_toolbo...
0
0
0
0
0
0
deps/libgdal/gyp-formats/adrg.gyp
jimgambale/node-gdal
462
3222169
<filename>deps/libgdal/gyp-formats/adrg.gyp<gh_stars>100-1000 { "includes": [ "../common.gypi" ], "targets": [ { "target_name": "libgdal_adrg_frmt", "type": "static_library", "sources": [ "../gdal/frmts/adrg/adrgdataset.cpp", "../gdal/frmts/adrg/srpdataset.cpp" ], "include_dirs": [ ".....
0
0
0
0
0
0
tests/test_pymaybe.py
ekampf/PyMaybe
191
3222170
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import annotations """ test_pymaybe ---------------------------------- Tests for `pymaybe` module. """ import sys import unittest import doctest from pymaybe import maybe, Something, Nothing PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 ...
1
1
0
0
2
0
egs/wsj/s5/steps/dict/prons_to_lexicon.py
LanceaKing/kaldi
116
3222171
#!/usr/bin/env python # Copyright 2016 <NAME> # 2016 <NAME> # Apache 2.0. # we're using python 3.x style print but want it to work in python 2.x, from __future__ import annotations from __future__ import print_function from collections import defaultdict import argparse import sys class StrToBoolAction(a...
4
6
0
0
10
0
mlflow/tracking/utils.py
freefrag/mlflow
1,825
3222172
<reponame>freefrag/mlflow from __future__ import print_function import os import sys import warnings import entrypoints from six.moves import urllib from mlflow.exceptions import MlflowException from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.store import DEFAULT_LOCAL_FILE_AND_ARTIFACT_...
0
0
0
0
0
0
locations/spiders/goldsgym.py
davidchiles/alltheplaces
297
3222195
import json import re from urllib.parse import urlparse import scrapy from scrapy.selector import Selector from locations.items import GeojsonPointItem from locations.hours import OpeningHours class GoldsGymSpider(scrapy.Spider): name: str = "goldsgym" item_attributes: dict[str,str] = { 'brand': "Gold's Gym"...
0
2
4
0
6
0
REDSI_1160929_1161573/boost_1_67_0/libs/mpi/test/python/skeleton_content_test.py
Wultyc/ISEP_1718_2A2S_REDSI_TrabalhoGrupo
198
3222224
<reponame>Wultyc/ISEP_1718_2A2S_REDSI_TrabalhoGrupo # Copyright (C) 2006 <NAME> <<EMAIL>g.gregor -at- gmail.com>. # Use, modification and distribution is subject to the Boost Software # License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # Test skeleto...
0
0
0
0
0
0
pyntcloud/scalar_fields/xyz.py
bernssolg/pyntcloud-master
1,142
3222254
<gh_stars>1000+ import numpy as np from .base import ScalarField from ..geometry.coord_systems import ( cartesian_to_spherical, cartesian_to_cylindrical) from ..ransac import ( single_fit, RANSAC_MODELS, RANSAC_SAMPLERS) class XYZScalarField(ScalarField): def extract_info(self): self....
0
0
0
0
0
0
facets_atlasmaker/convert.py
winnerineast/facets
7,209
3222258
<filename>facets_atlasmaker/convert.py """Image conversion classes and methods. Methods for converting images as well as for creating a default image for use upon image retrieval/conversion failures. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from ...
0
0
0
0
0
0
packages/syft/src/syft/proto/grid/messages/success_resp_message_pb2.py
vishalbelsare/PySyft
8,428
3222263
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/grid/messages/success_resp_message.proto """Generated protocol buffer code.""" # third party from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from googl...
0
0
0
0
0
0
batchflow/models/base.py
analysiscenter/dataset
101
3222292
<reponame>analysiscenter/dataset<filename>batchflow/models/base.py """ Contains a base model class""" from abc import ABC, abstractmethod class BaseModel(ABC): """ Base interface for models. """ @property def default_name(self): """ Placeholder for model name. """ return self.__class__.__n...
0
0
0
0
0
0
venv/lib/python3.6/site-packages/django/utils/duration.py
xiegudong45/typeidea
5,079
3222294
import datetime def _get_duration_components(duration) -> tuple[object, object, object, object, object]: days = duration.days seconds = duration.seconds microseconds = duration.microseconds minutes = seconds // 60 seconds = seconds % 60 hours = minutes // 60 minutes = minutes % 60 r...
0
3
0
0
3
0
allure-pytest/src/helper.py
bhumikapaharia/allure-python
558
3222297
<gh_stars>100-1000 # -*- coding: utf-8 -*- from __future__ import unicode_literals import pytest import allure_commons from allure_pytest.utils import ALLURE_DESCRIPTION_MARK, ALLURE_DESCRIPTION_HTML_MARK from allure_pytest.utils import ALLURE_LABEL_MARK, ALLURE_LINK_MARK class AllureTitleHelper(object): @allure...
0
0
0
0
0
0
fmriprep/interfaces/tests/conftest.py
dlinhardt/fmriprep
349
3222324
<reponame>dlinhardt/fmriprep<filename>fmriprep/interfaces/tests/conftest.py import pytest from pathlib import Path @pytest.fixture(scope="module") def data_dir(): return Path(__file__).parent / "data"
0
0
0
0
0
0
Pymoe/Kitsu/__init__.py
XVicarious/PyMoe
243
3222331
from .anime import * from .user import * from .library import * from .manga import * from .drama import * from .auth import * from .mappings import * class Kitsu: """ :ivar KitsuAnime anime: Instance interface for the Kitsu Anime endpoints :ivar KitsuUser user: Instance interface for the Kitsu Use...
0
0
0
0
0
0
venv/Lib/site-packages/easygui/boxes/button_box.py
xinkangli/graphical-user-interface
413
3222343
<gh_stars>100-1000 """ .. moduleauthor:: easygui developers and <NAME> .. default-domain:: py .. highlight:: python Version |release| """ import os import re try: from . import global_state from . import utils as ut from .text_box import textbox except (SystemError, ValueError, ImportError): import ...
0
0
0
0
0
0
tools/Sikuli/WaitForStringAllScenariosOK.sikuli/Exit1C.py
marmyshev/vanessa-automation
296
3222382
type(Key.F4, KeyModifier.ALT) exit(0)
0
0
0
0
0
0
absl/copts/copts.py
plant-os/abseil-cpp
2,219
3222399
"""Abseil compiler options. This is the source of truth for Abseil compiler options. To modify Abseil compilation options: (1) Edit the appropriate list in this file based on the platform the flag is needed on. (2) Run `<path_to_absl>/copts/generate_copts.py`. The generated copts are consumed by configure...
0
0
0
0
0
0
mmaction/utils/decorators.py
kiyoon/Video-Swin-Transformer
648
3222429
<filename>mmaction/utils/decorators.py from types import MethodType def import_module_error_func(module_name): """When a function is imported incorrectly due to a missing module, raise an import error when the function is called.""" def decorate(func): def new_func(*args, **kwargs): ...
0
0
0
0
0
0
tyadmin_api_cli/adapters/django_celery_beat_ty_admin.py
a24zlab/django-antd-tyadmin
308
3222434
<gh_stars>100-1000 from django.http import JsonResponse from tyadmin_api.custom import MtyCustomExecView class PeriodicTask_task(MtyCustomExecView): def get(self, request, *args, **kwargs): from django_celery_beat.admin import TaskSelectWidget ret = {} for one in TaskSelectWidget().choice...
0
0
0
0
0
0
dashboard/dashboard/graph_csv.py
ravitejavalluri/catapult
2,151
3222457
<gh_stars>1000+ # Copyright 2015 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. """Downloads a single time series as CSV.""" import csv import logging import StringIO from dashboard.common import datastore_hooks from da...
0
0
0
0
0
0
datumaro/cli/commands/validate.py
IRDonch/datumaro
237
3222505
# Copyright (C) 2020-2021 Intel Corporation # # SPDX-License-Identifier: MIT from ..contexts.project import build_validate_parser as build_parser from ..contexts.project import get_validate_sensitive_args as get_sensitive_args __all__ = [ 'build_parser', 'get_sensitive_args', ]
0
0
0
0
0
0
packages/vaex-jupyter/vaex/jupyter/__init__.py
sethvargo/vaex
337
3222511
# -*- coding: utf-8 -*- from __future__ import annotations import os import logging import time from .utils import debounced, flush, gather, kernel_tick, interactive_selection, interactive_cleanup # noqa import vaex import IPython.display base_path = os.path.dirname(__file__) logger = logging.getLogger("vaex.jupyter...
34
15
0
1
50
0
ddtrace/ext/consul.py
p7g/dd-trace-py
308
3222514
<reponame>p7g/dd-trace-py APP = "consul" SERVICE = "consul" CMD = "consul.command" KEY = "consul.key"
0
0
0
0
0
0
tracardi/process_engine/action/v1/pro/scheduler/proto/stubs/scheduler_pb2_grpc.py
DawidekZagajnik/tracardi
153
3222536
<filename>tracardi/process_engine/action/v1/pro/scheduler/proto/stubs/scheduler_pb2_grpc.py<gh_stars>100-1000 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc import scheduler_pb2 as scheduler__pb2 class Serv...
0
0
0
0
0
0
venv/Lib/site-packages/matplotlib/tri/__init__.py
arnoyu-hub/COMP0016miemie
353
3222579
""" Unstructured triangular grid functions. """ from .triangulation import * from .tricontour import * from .tritools import * from .trifinder import * from .triinterpolate import * from .trirefine import * from .tripcolor import * from .triplot import *
0
0
0
0
0
0
ch05/05_01.py
leeseedong/book-cryptocurrency
121
3222591
import pybithumb tickers = pybithumb.get_tickers() print(tickers) print(len(tickers)) print(type(tickers))
0
0
0
0
0
0
tensorflow/contrib/learn/python/learn/dataframe/queues/feeding_queue_runner.py
connectthefuture/tensorflow
101
3222594
<gh_stars>100-1000 # Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
0
0
0
0
0
0
rust/voxel/scripts/convert.py
kelas/k210-sdk-stuff
130
3222597
<gh_stars>100-1000 #!/usr/bin/env python3 ''' Convert map from set of PNG files to native format for inclusion. Example maps can be found here: https://github.com/s-macke/VoxelSpace/tree/master/maps ''' import sys from PIL import Image import struct def rgb565(r, g, b): '''Truncate RGB888 color to RGB565''' r...
0
0
0
0
0
0
packages/plugins/minos-database-aiopg/minos/plugins/aiopg/operations.py
minos-framework/minos-python
247
3222617
from typing import ( Any, Union, ) from psycopg2.sql import ( Composable, ) from minos.common import ( DatabaseOperation, ) class AiopgDatabaseOperation(DatabaseOperation): """Aiopg Database Operation class.""" def __init__(self, query: Union[str, Composable], parameters: dict[str, Any] = N...
2
0
0
0
2
0
Python/hw.py
saurabhcommand/Hello-world
1,428
3222635
<gh_stars>1000+ print ("Hello World") user= ("My name is Qas") print (user)
0
0
0
0
0
0
opal_server/pubsub.py
gdmarsh/opal
367
3222671
<reponame>gdmarsh/opal from fastapi import APIRouter, Depends, WebSocket from fastapi_websocket_pubsub import PubSubEndpoint from opal_common.confi.confi import load_conf_if_none from opal_common.config import opal_common_config from opal_common.logger import logger from opal_common.authentication.signer import JWTSig...
0
0
0
0
0
0
code/tools/idl/setup.py
antonand03/hello-my-friend
5,411
3222672
<filename>code/tools/idl/setup.py from setuptools import setup, find_packages setup( name='xpidl', version='1.0', description='Parser and header generator for xpidl files.', author='Mozilla Foundation', license='MPL 2.0', packages=find_packages(), install_requires=['ply>=3.6,<4.0'], ur...
0
0
0
0
0
0
tensorflow/contrib/timeseries/python/timeseries/estimators_test.py
M155K4R4/Tensorflow
522
3222674
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
0
5
0
0
5
0
plugins/modules/oci_healthchecks_http_probe_result_facts.py
slmjy/oci-ansible-collection
108
3222703
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
0
2
0
0
2
0
docs/samples/started/newway/newway/tests/test_thecode.py
cecedille1/paver
270
3222709
<reponame>cecedille1/paver<gh_stars>100-1000 from newway.thecode import * def test_the_function(): output = powerful_function_and_new_too() assert output == 2, "Doh! Got %s instead" % (output)
0
0
0
0
0
0
vendor/github.com/elastic/beats/filebeat/scripts/generate_field_docs.py
luckydonald/dockbeat
201
3222719
#!/usr/bin/env python """ This script generates markdown documentation from the fields yml file. Usage: python generate_field_docs.py file.yml file.asciidoc """ import sys import yaml SECTIONS = [ ("env", "Common"), ("log", "Log File Content"), ] def document_fields(output, section, level=3): if "anc...
0
0
0
0
0
0
src/basset_sample.py
shtoneyan/Basset
248
3222739
<filename>src/basset_sample.py #!/usr/bin/env python from optparse import OptionParser import gzip import random import sys ################################################################################ # basset_sample.py # # Sample sequences from an existing dataset of sequences as BED file and # activity table. ##...
0
0
0
0
0
0
alphapy/globals.py
aborodya/AlphaPy
559
3222758
<gh_stars>100-1000 ################################################################################ # # Package : AlphaPy # Module : globals # Created : July 11, 2013 # # Copyright 2020 ScottFree Analytics LLC # <NAME> & <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use...
0
0
0
0
0
0
benchmark/alpa/inspect_prof_database.py
yf225/alpa
114
3222763
<gh_stars>100-1000 """Inspect and edit a profiling database.""" import argparse from alpa import DeviceCluster, ProfilingResultDatabase from alpa.util import run_cmd if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--filename", type=str, default="prof_database.pkl") args...
0
0
0
0
0
0
pyplots/numpy_intro_10.py
junghun73/Learning
419
3222780
import numpy as np x = np.linspace(-1, 1, 2000) y = np.cos(x) + 0.3*np.random.rand(2000) p = np.polynomial.Chebyshev.fit(x, y, 90) t = np.linspace(-1, 1, 200) plt.plot(x, y, 'r.') plt.plot(t, p(t), 'k-', lw=3) plt.show()
0
0
0
0
0
0
tests/components/guardian/test_diagnostics.py
MrDelik/core
30,023
3222787
<gh_stars>1000+ """Test Guardian diagnostics.""" from homeassistant.components.diagnostics import REDACTED from homeassistant.components.guardian import ( DATA_PAIRED_SENSOR_MANAGER, DOMAIN, PairedSensorManager, ) from tests.components.diagnostics import get_diagnostics_for_config_entry async def test_en...
0
0
0
0
0
0
python-packages/order_utils/src/zero_ex/order_utils/__init__.py
Beovolytics-Inc/0x-monorepo
1,075
3222794
r"""Order utilities for 0x applications. Setup ----- Install the package with pip:: pip install 0x-order-utils Some methods require the caller to pass in a `Web3.BaseProvider`:code: object. For local testing one may construct such a provider pointing at an instance of `ganache-cli <https://www.npmjs.com/package...
19
10
8
0
37
0
color_tracker/utils/helpers.py
LahavPadan/Color-Tracker
150
3222801
from typing import List, Tuple, Union import cv2 import numpy as np from scipy import optimize from color_tracker.utils.tracker_object import TrackedObject def crop_out_polygon_convex(image: np.ndarray, point_array: np.ndarray) -> np.ndarray: """ Crops out a convex polygon given from a list of points from a...
22
10
0
0
32
0
tests/samplers/test_tfrecord_samplers.py
thesinepainter/similarity
706
3222813
import numpy as np import tensorflow as tf from tensorflow_similarity.samplers import TFRecordDatasetSampler def _int64_feature(value) -> object: """Returns an int64_list from a bool / enum / int / uint.""" return tf.train.Feature(int64_list=tf.train.Int64List(value=[value])) def to_tfrecord(sid, value) ->...
0
3
0
0
3
0
edward/models/random_variables.py
xiangze/edward
5,200
3222850
from __future__ import absolute_import from __future__ import division from __future__ import print_function import inspect as _inspect from edward.models.random_variable import RandomVariable as _RandomVariable from tensorflow.contrib import distributions as _distributions # Automatically generate random variable c...
0
0
0
0
0
0
tests/conftest.py
iamjli/pyranges
299
3222859
<reponame>iamjli/pyranges<filename>tests/conftest.py<gh_stars>100-1000 import pytest import pandas as pd from pyranges import PyRanges def pytest_configure(config): config.addinivalue_line( "markers", "bedtools: tests rely on", ) config.addinivalue_line( "markers", "explore: functionalit...
0
0
0
0
0
0
care/facility/tests/test_patient_sample_api.py
gigincg/care
189
3222877
<gh_stars>100-1000 import datetime from django.utils.timezone import make_aware from freezegun import freeze_time from rest_framework import status from care.facility.api.serializers.patient_sample import PatientSampleSerializer from care.facility.models import PatientSample from care.utils.tests.test_base import Tes...
0
0
0
0
0
0
FWCore/MessageService/test/bug75836b_cfg.py
ckamtsikis/cmssw
852
3222879
import FWCore.ParameterSet.Config as cms process = cms.Process("MERGE") process.source = cms.Source("EmptySource") process.doit = cms.EDAnalyzer ("IntTestAnalyzer", valueMustMatch = cms.untracked.int32(90), moduleLabel = cms.untracked.InputTag("missing")) process.maxEvents = cms.untracked.PSet(input = cms.untrac...
0
0
0
0
0
0
ch05/myproject_virtualenv/src/django-myproject/myproject/urls.py
PacktPublishing/Django-3-Web-Development-Cookbook
159
3222885
<reponame>PacktPublishing/Django-3-Web-Development-Cookbook<filename>ch05/myproject_virtualenv/src/django-myproject/myproject/urls.py from django.contrib import admin from django.conf.urls.i18n import i18n_patterns from django.urls import include, path from django.conf import settings from django.conf.urls.static impor...
0
0
0
0
0
0
src/weresync/utils.py
xlotlu/weresync
206
3222889
# Copyright 2016 <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 in writing, softw...
3
1
0
0
4
0
tests/integration/test_evaluate.py
schiotz/nequip
153
3222929
import pytest import tempfile import pathlib import yaml import subprocess import os import textwrap import shutil import numpy as np import ase.io import torch from nequip.data import AtomicDataDict from test_train import ConstFactorModel, IdentityModel # noqa @pytest.fixture( scope="module", params=[ ...
1
3
0
0
4
0
alipay/aop/api/response/AlipayMarketingMaterialImageUploadResponse.py
snowxmas/alipay-sdk-python-all
213
3222933
<reponame>snowxmas/alipay-sdk-python-all #!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayMarketingMaterialImageUploadResponse(AlipayResponse): def __init__(self): super(AlipayMarketingMaterialImageUploadResponse, sel...
0
0
0
0
0
0
tests/test_tensor/test_tensor_tebd.py
cbwang2016/quimb
264
3222938
<filename>tests/test_tensor/test_tensor_tebd.py import pytest from pytest import approx import numpy as np import quimb as qu import quimb.tensor as qtn from quimb.tensor.tensor_1d_tebd import OTOC_local class TestTEBD: def test_setup_and_sweep(self): n = 10 H_int = qu.ham_heis(n=2, cyclic=False...
0
0
0
0
0
0
SimTracker/TrackerMaterialAnalysis/python/trackingMaterialAnalyser_ForPhaseI_cff.py
ckamtsikis/cmssw
852
3222944
import FWCore.ParameterSet.Config as cms # Analyze and plot the tracking material from SimTracker.TrackerMaterialAnalysis.trackingMaterialAnalyser_ForPhaseI_cfi import *
0
0
0
0
0
0
rnntutor/lib/python2.7/site-packages/ipykernel/connect.py
lucaskingjade/RNNTutorial
652
3222975
<reponame>lucaskingjade/RNNTutorial<filename>rnntutor/lib/python2.7/site-packages/ipykernel/connect.py<gh_stars>100-1000 """Connection file-related utilities for the kernel """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import absolute_import i...
0
0
0
0
0
0
tests/contrib/checks/test_sequential_value.py
jdaviscooke/goodtables-py
243
3222991
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals from goodtables import validate # Validate def test_check_sequential_value(log): source = [ ['row', 'index2', 'index3'], [2...
0
0
0
0
0
0
utils.py
greed1sland/PythonProgrammingPuzzles
814
3223019
import json import logging import inspect import io import os my_path = os.path.dirname(__file__) def check_hashseed(desired_seed: int = 0) -> bool: if os.environ.get('PYTHONHASHSEED') != desired_seed: info(f"Ideally set PYTHONHASHSEED={desired_seed} for perfect reproducibility") return False ...
5
12
0
0
17
0
inceptor/signers/SigThief.py
pwnmeow/inceptor
743
3223028
<reponame>pwnmeow/inceptor<filename>inceptor/signers/SigThief.py #!/usr/bin/env python3 # LICENSE: BSD-3 # Copyright: <NAME> @midnite_runr # Adapted by klezVirus @klezVirus import argparse import os.path import sys import struct import shutil import io import tempfile from pathlib import Path from config.Config impor...
0
0
0
0
0
0
tests/test_decorators.py
sghill/hubcommander
1,286
3223040
<filename>tests/test_decorators.py import json from hubcommander.bot_components.decorators import hubcommander_command, format_help_text, auth from hubcommander.bot_components.slack_comm import WORKING_COLOR from hubcommander.bot_components.parse_functions import ParseException def test_hubcommander_command_required...
0
0
0
0
0
0
tests/test_tensorflow_7.py
ankitshah009/MMdnn
3,442
3223046
from __future__ import absolute_import from __future__ import print_function import os import sys from conversion_imagenet import TestModels def get_test_table() -> dict[str,dict[str,list[object]]]: return { 'tensorflow' : { # Cannot run on Travis since it seems to consume too much memory. ...
0
1
0
0
1
0
src/tests/ftest/util/telemetry_utils.py
daos-stack/daos
429
3223068
#!/usr/bin/python from __future__ import annotations """ (C) Copyright 2021 Intel Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent """ from logging import getLogger from ClusterShell.NodeSet import NodeSet class TelemetryUtils(): # pylint: disable=too-many-nested-blocks """Defines a object used to v...
7
7
47
0
61
0
models/msdnet_layers.py
Advitya17/MSDNet-GCN
144
3223108
from __future__ import absolute_import from __future__ import unicode_literals from __future__ import print_function from __future__ import division import math import torch import torch.nn as nn class _DynamicInputDenseBlock(nn.Module): def __init__(self, conv_modules, debug): super(_DynamicInputDenseB...
4
13
0
1
18
0
tests/test_swarmspawner.py
consideRatio/dockerspawner
364
3223116
"""Tests for SwarmSpawner""" import pytest from jupyterhub.tests.mocking import public_url from jupyterhub.tests.test_api import add_user from jupyterhub.tests.test_api import api_request from jupyterhub.utils import url_path_join from tornado.httpclient import AsyncHTTPClient from dockerspawner import SwarmSpawner #...
0
0
0
0
0
0
usaspending_api/database_scripts/tests/test_custom_sql_functions.py
g4brielvs/usaspending-api
217
3223120
<filename>usaspending_api/database_scripts/tests/test_custom_sql_functions.py import pytest import urllib from django.db import connection from model_mommy import mommy URLENCODE_FUNCTION_NAME = "urlencode" @pytest.fixture() def add_fun_awards(db): generated_unique_award_ids = [ "CONT_IDV_ABCDEFG_01234...
0
0
0
0
0
0
montydb/types/bson_.py
bobuk/montydb
478
3223156
<gh_stars>100-1000 import warnings from .bson import init, bson_used # noqa from .bson import * # noqa warnings.warn( "montydb.types.bson_ is deprecated; import montydb.types.bson instead", DeprecationWarning )
0
0
0
0
0
0
mango/constants.py
nhatminhbeo/mango-explorer
131
3223181
# # ⚠ Warning # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT # LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA...
0
4
10
0
14
0
utils/utils.py
HanKunChai/faster-rcnn-keras
282
3223203
import numpy as np from PIL import Image #---------------------------------------------------------# # 将图像转换成RGB图像,防止灰度图在预测时报错。 # 代码仅仅支持RGB图像的预测,所有其它类型的图像都会转化成RGB #---------------------------------------------------------# def cvtColor(image) -> object: if len(np.shape(image)) == 3 and np.shape(image)[...
1
4
0
0
5
0
kinto/core/storage/postgresql/migrator.py
taus-semmle/kinto
4,618
3223209
""" A helper class to run migrations using a series of SQL files. """ import logging import os logger = logging.getLogger(__name__) class MigratorMixin: """Mixin to allow the running of migrations. Your class must provide a `client` attribute (a PostgreSQLClient), as well as override some class attribu...
1
1
4
0
6
0
src/conv_onet/training.py
xiaobaishu0097/convolutional_occupancy_networks
446
3223210
from __future__ import annotations import os from tqdm import trange import torch from torch.nn import functional as F from torch import distributions as dist from src.common import ( compute_iou, make_3d_grid, add_key, ) from src.utils import visualize as vis from src.training import BaseTrainer class Trainer(Bas...
5
3
0
0
8
0
utils/ring/third_party/fiat/make_curve25519_tables.py
maybeTomorrow/crust
2,151
3223247
#!/usr/bin/env python # coding=utf-8 # The MIT License (MIT) # # Copyright (c) 2015-2016 the fiat-crypto authors (see the AUTHORS file). # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software with...
0
9
0
0
9
0
access_undenied_aws/cli.py
JonHolman/access-undenied-aws
109
3223269
<reponame>JonHolman/access-undenied-aws from __future__ import annotations import logging from typing import IO import boto3 import click import click_log import colorlog import json from access_undenied_aws import analysis from access_undenied_aws import common from access_undenied_aws import logger from access_und...
0
0
0
0
0
0
tests/server_with_remote_id_test.py
authorizon/fastapi_websocket_pubsub
125
3223278
from __future__ import annotations import os import sys from fastapi_websocket_rpc import logger from fastapi_websocket_rpc.rpc_channel import RpcChannel # Add parent path to use local src as package for tests sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))) import asyncio fr...
4
3
0
0
7
0
recipes/Python/580714_Form_actilike_html_forms/recipe-580714.py
tdiprima/code
2,023
3223286
<filename>recipes/Python/580714_Form_actilike_html_forms/recipe-580714.py<gh_stars>1000+ # Version: 0.2 # Author: <NAME> try: import Tkinter as tk import ttk except ImportError: import tkinter as tk import tkinter.ttk as ttk class Base_Form(object): """Base class of all forms""" def __init__(...
0
0
0
0
0
0
nginx/tests/test_e2e.py
tdimnet/integrations-core
663
3223295
# (C) Datadog, Inc. 2019-present # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import pytest from datadog_checks.nginx import Nginx from . import common @pytest.mark.e2e @pytest.mark.skipif(common.USING_VTS, reason="Non-VTS test") def test_e2e(dd_agent_check, instance): aggregator ...
0
0
0
0
0
0
scripts/test.py
j-cube/oidn
1,206
3223309
#!/usr/bin/env python3 ## Copyright 2009-2021 Intel Corporation ## SPDX-License-Identifier: Apache-2.0 from __future__ import annotations import sys import shutil from glob import glob from shutil import which import argparse from common import * MODEL_VERSION='v1.4.0' # Parse the command-line arguments parser = a...
2
2
0
0
4
0
lexicon/providers/aliyun.py
nextgens/lexicon
1,184
3223310
from __future__ import annotations """Module provider for Aliyun""" import base64 import datetime import hmac import logging import random import sys import time from hashlib import sha1 import requests from six.moves import urllib from lexicon.exceptions import AuthenticationError from lexicon.providers.base import ...
15
10
0
0
25
0
2020/CVE-2020-7471/vultarget/vul_app/urls.py
hjyuan/reapoc
421
3223332
<reponame>hjyuan/reapoc from django.urls import path from vul_app import views urlpatterns = [ path('setupdb/', views.setupDB, name = 'setupDB'), path('', views.index, name = 'index'), ]
0
0
0
0
0
0
sgp4/__init__.py
wolverine-radar-company/python-sgp4
237
3223362
<reponame>wolverine-radar-company/python-sgp4 # -*- coding: utf-8 -*- """Track Earth satellites given TLE data, using up-to-date 2020 SGP4 routines. This Python package computes the position and velocity of an earth-orbiting satellite, given the satellite's TLE orbital elements from a source like `CelesTrak <https://c...
0
0
0
0
0
0
tests/unit/line_arg_parser/test_lexer.py
asaak-co/python-bigquery
384
3223372
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
0
1
0
0
1
0
tests/java/org/python/indexer/data/class2.py
jeff5/jython-whinchat
577
3223374
<gh_stars>100-1000 def hi(msg): print msg
0
0
0
0
0
0
models/ClassicNetwork/blocks/DaNet.py
Dou-Yu-xuan/deep-learning-visal
150
3223378
<reponame>Dou-Yu-xuan/deep-learning-visal import torch import torch.nn as nn import torch.nn.functional as F class _PositionAttentionModule(nn.Module): """ Position attention module""" def __init__(self, in_channels, **kwargs): super(_PositionAttentionModule, self).__init__() self.con...
0
0
0
0
0
0
django_su/backends.py
marknotfound/django-su
123
3223437
# -*- coding: utf-8 -*- from __future__ import annotations from django.contrib.auth import get_user_model User = get_user_model() class SuBackend(object): supports_inactive_user: bool = False def authenticate(self, request: object | None=None, su: bool=False, user_id: object | None=None, **kwargs) -> objec...
3
2
1
0
6
0
froide/georegion/migrations/0002_auto_20180409_1007.py
xenein/froide
198
3223441
<gh_stars>100-1000 # -*- coding: utf-8 -*- # Generated by Django 1.11.9 on 2018-04-09 08:07 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("georegion", "0001_initial_squashed_0004_...
0
0
0
0
0
0
cities/managers.py
mazurbeam/django-cities
530
3223447
<reponame>mazurbeam/django-cities from django.contrib.gis.db import models class AlternativeNameManager(models.Manager): def get_queryset(self): return super(AlternativeNameManager, self).get_queryset().exclude(kind='link')
0
0
0
0
0
0
run_gui.py
ThatcherT/rlbot
160
3223460
from rlbot_gui import gui # This is a useful way to start up RLBotGUI directly from your bot project. You can use it to # arrange a match with the settings you like, and if you have a good IDE like PyCharm, # you can do breakpoint debugging on your bot. if __name__ == '__main__': gui.start()
0
0
0
0
0
0
stillbox_eval/depth_evaluation_utils.py
ZephyrII/competitive_colaboration
357
3223486
<gh_stars>100-1000 import numpy as np import json from path import Path from scipy.misc import imread from tqdm import tqdm class test_framework_stillbox(object): def __init__(self, root, test_files, seq_length=3, min_depth=1e-3, max_depth=80, step=1): self.root = root self.min_depth, self.max_dep...
0
0
0
0
0
0