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
micropsi_core/tests/test_node_netapi.py
joschabach/micropsi2
119
3239239
<filename>micropsi_core/tests/test_node_netapi.py<gh_stars>100-1000 #!/usr/local/bin/python # -*- coding: utf-8 -*- """ Tests for netapi, i.e. the interface native modules will be developed against """ import pytest from micropsi_core import runtime as micropsi def prepare(fixed_nodenet): nodenet = micropsi.get...
0
0
0
0
0
0
cauliflowervest/client/duplicity/client.py
isabella232/cauliflowervest
292
3239274
<reponame>isabella232/cauliflowervest # 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 # # ...
0
0
0
0
0
0
paddlespeech/s2t/utils/bleu_score.py
jerryuhoo/PaddleSpeech
1,379
3239301
# 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 appli...
1
4
0
1
6
0
rtd_change_default_version.py
akirayou/cmdstanpy
101
3239340
<filename>rtd_change_default_version.py import sys import requests # This scrip accepts 4 arguments in order: # Project name in readthedocs, readthedocs username, readthedocs password and version in readthedocs to set as default. # Example: # python3 change_default_version.py cmdstanpy snick secretpassword sta...
0
0
0
0
0
0
src/masonite/filesystem/__init__.py
cercos/masonite
1,816
3239348
from .Storage import Storage from .File import File from .UploadedFile import UploadedFile
0
0
0
0
0
0
moonlight/evaluation/musicxml_test.py
lithomas1/moonlight
288
3239351
# 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
2
0
0
2
0
codalab/apps/health/migrations/0003_auto__add_field_healthsettings_threshold.py
AIMultimediaLab/AI4Media-EaaS-prototype-Py2-public
333
3239364
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'HealthSettings.threshold' db.add_column(u'health_healthse...
0
0
2
0
2
0
pydocx/openxml/wordprocessing/sdt_content_block.py
botzill/pydocx
127
3239365
# coding: utf-8 from __future__ import ( absolute_import, print_function, unicode_literals, ) from pydocx.models import XmlModel, XmlCollection from pydocx.openxml.wordprocessing.paragraph import Paragraph from pydocx.openxml.wordprocessing.table import Table from pydocx.openxml.wordprocessing.inserted_run...
0
0
1
0
1
0
autovizwidget/autovizwidget/utils/constants.py
sciserver/sparkmagic
1,141
3239407
HOME_PATH = "~/.autovizwidget" CONFIG_FILE = "config.json" GRAPH_RENDER_EVENT = "notebookGraphRender" GRAPH_TYPE = "GraphType"
0
0
0
0
0
0
algorithms/Python/strings/add_string.py
vivekthedev/DSA
247
3239428
<gh_stars>100-1000 """ Given two non-negative integers, num1 and num2 represented as string, return the sum of num1 and num2 as a string. You must solve the problem without using any built-in library for handling large integers (such as BigInteger). You must also not convert the inputs to integers directly. Time: O...
0
0
0
0
0
0
aliyun/log/es_migration/index_logstore_mappings.py
topdown618/aliyun-log-python-sdk
130
3239438
#!/usr/bin/env python # encoding: utf-8 # Copyright (C) Alibaba Cloud Computing # All rights reserved. from __future__ import annotations import json import re from .util import split_and_strip class IndexLogstoreMappings(object): def __init__(self, index_lst: object | None=None, logstore_index_mappings: obj...
2
6
0
2
10
0
transistor/persistence/newt_db/collections.py
awesome-archive/transistor
232
3239459
# -*- coding: utf-8 -*- """ transistor.persistence.newt_db.collections ~~~~~~~~~~~~ This module implements container classes for storing python objects in newt.db. :copyright: Copyright (C) 2018 by BOM Quote Limited :license: The MIT License, see LICENSE for more details. ~~~~~~~~~~~~ """ import newt.db class Spider...
0
3
0
0
3
0
example/app.py
Qrbaker/aioauth-client
141
3239469
<filename>example/app.py """Aioauth-client example. Requirements: aioauth-client asgi-tools uvicorn Run the example with uvicorn: $ uvicorn --port 5000 example.app:app """ from asgi_tools import App, ResponseRedirect import html from pprint import pformat from .config import CREDENTIALS from aioau...
0
0
0
0
0
0
DQM/RPCMonitorClient/python/RPCDcsInfoClient_cfi.py
ckamtsikis/cmssw
852
3239482
import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDHarvester import DQMEDHarvester rpcDcsInfoClient = DQMEDHarvester("RPCDcsInfoClient", dcsInfoFolder = cms.untracked.string("RPC/DCSInfo"), dqmProvInfoFolder = cms.untracked.string("In...
0
0
0
0
0
0
src/Functions/Utils/Download.py
yepcn/javsdt
1,064
3239483
<gh_stars>1000+ # -*- coding:utf-8 -*- import requests from PIL import Image # 下载图片,无返回 # 参数: 图片地址,存放路径,代理 def download_pic(url, path, proxy): for retry in range(5): try: if proxy: rqs = requests.get(url, proxies=proxy, stream=True, timeout=(6, 10)) with open(pa...
0
0
0
0
0
0
ast/testdata/string.py
MaxTurchin/pycopy-lib
126
3239497
b"foo" "foo" "foo" "bar" b"foo" b"bar" r"\nfoo\s" rb"\nfoo\s" "a\\b\'b\"b" "a\sb" "a\x01b" "a\0" "a\00" "a\000" "a\0000" b"\x90" """foo bar""" """\ foo bar """ "a\u007fb" "a\U0000007fb" b"a\u007fb" b"a\U0000007fb"
0
0
0
0
0
0
python/dgl/geometry/__init__.py
ketyi/dgl
9,516
3239511
"""The ``dgl.geometry`` package contains geometry operations: * Farthest point sampling for point cloud sampling * Neighbor matching module for graclus pooling .. note:: This package is experimental and the interfaces may be subject to changes in future releases. """ from .fps import * from .edge_coarsening ...
0
0
0
0
0
0
src/probflow/models/continuous_model.py
chiragnagpal/probflow
134
3239516
<reponame>chiragnagpal/probflow import matplotlib.pyplot as plt import numpy as np from probflow.data import DataGenerator, make_generator from probflow.utils.casting import to_numpy from probflow.utils.plotting import plot_by, plot_dist from .model import Model class ContinuousModel(Model): """Abstract base cl...
0
0
0
0
0
0
datasets/gsm8k/gsm8k.py
leondz/datasets
3,395
3239517
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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
2
1
0
3
0
diffxpy/api/fit.py
adkinsrs/diffxpy
111
3239548
<filename>diffxpy/api/fit.py from diffxpy.fit import model, residuals, partition
0
0
0
0
0
0
contrib/stack/topsStack/looks_withDEM.py
vincentschut/isce2
1,133
3239556
#!/usr/bin/env python3 from __future__ import annotations import isce import argparse import os import looks def createParser() -> object: ''' Create command line parser. ''' parser = argparse.ArgumentParser(description='Take integer number of looks.', epilog = ''' Example: looks.py -i ...
2
2
0
0
4
0
linuxScanner.py
janmashat/vulners-scanner
224
3239564
<gh_stars>100-1000 #!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'videns' import inspect import pkgutil import json import os try: import urllib.request as urllib2 except ImportError: import urllib2 import scanModules VULNERS_LINKS = {'pkgChecker':'https://vulners.com/api/v3/audit/audit/', ...
0
0
0
0
0
0
airtest/core/android/cap_methods/screen_proxy.py
Aracoix/Airtest
6,140
3239585
<gh_stars>1000+ # -*- coding: utf-8 -*- from collections import OrderedDict from airtest.core.error import AdbError, ScreenError from airtest.core.android.cap_methods.base_cap import BaseCap from airtest.utils.logger import get_logger LOGGING = get_logger(__name__) class ScreenProxy(object): """ Perform scr...
0
0
0
0
0
0
academicstoday_project/landpage/sitemaps.py
LeeDoona/EasyGrading
146
3239587
from django.contrib import sitemaps from django.core.urlresolvers import reverse class StaticViewSitemap(sitemaps.Sitemap): priority: float = 0.5 changefreq: str = 'monthly' def items(self) -> list[str]: return ['landpage','robots','humans','google_plus_verify','terms','privacy',] def...
0
2
2
0
4
0
tests/test_plugins_global_metadata.py
lemon24/reader
205
3239595
from reader._plugins import global_metadata def test_plugin(make_reader, db_path): reader = make_reader(db_path, plugins=[global_metadata.init_reader]) reader = make_reader(db_path, plugins=[global_metadata.init_reader]) reader.update_feeds() assert dict(reader.get_global_metadata()) == {} asser...
0
0
0
0
0
0
pywraps/py_segment.py
fengjixuchui/src
1,160
3239603
#<pycode_BC695(py_segment)> CSS_NOAREA=CSS_NORANGE SEGDEL_KEEP=SEGMOD_KEEP SEGDEL_KEEP0=SEGMOD_KEEP0 SEGDEL_PERM=SEGMOD_KILL SEGDEL_SILENT=SEGMOD_SILENT def del_segment_cmt(s, rpt): set_segment_cmt(s, "", rpt) ask_selector=sel2para # In 7.0, those were renamed # - get_true_segm_name -> get_segm_name # - get_segm...
0
0
0
0
0
0
windows/native_exec/__init__.py
sogeti-esec-lab/LKD
102
3239616
<reponame>sogeti-esec-lab/LKD<gh_stars>100-1000 from .native_function import generate_callback_stub, create_function __all__ = ["generate_callback_stub", "create_function"]
0
0
0
0
0
0
tartiflette/types/helpers/reduce_type.py
remorses/tartiflette-whl
530
3239629
from typing import Union from tartiflette.types.list import GraphQLList from tartiflette.types.non_null import GraphQLNonNull __all__ = ("reduce_type",) def reduce_type( gql_type: Union[str, "GraphQLList", "GraphQLNonNull"] ) -> Union[str, "GraphQLType"]: """ Unwraps the GraphQL type and to return the i...
1
1
0
0
2
0
server/migrations/0075_machine_activity.py
nathandarnell/sal
215
3239640
<filename>server/migrations/0075_machine_activity.py # Generated by Django 1.10 on 2018-06-22 21:32 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('server', '0074_merge_20180621_1250'), ] operations = [ migrations.AddField( ...
0
0
0
0
0
0
simpletransformers/experimental/classification/__init__.py
manueltonneau/simpletransformers
488
3239649
from simpletransformers.experimental.classification.classification_model import ClassificationModel from simpletransformers.experimental.classification.multi_label_classification_model import ( MultiLabelClassificationModel, )
0
0
0
0
0
0
python/oneflow/framework/docstr/array_ops.py
zzk0/oneflow
3,285
3239708
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
0
0
0
0
0
0
modules/collectd/files/usr/lib/collectd/python/redis_queues.py
camdesgov/govuk-puppet
130
3239750
<gh_stars>100-1000 # 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; only version 2 of the License is applicable. # # This program is distributed in the hope that it will be useful, but # WITHOUT ...
0
0
0
0
0
0
dirtorch/datasets/landmarks18.py
dongan-beta/deep-image-retrieval
253
3239752
import os from .generic import ImageListLabels, ImageList DB_ROOT = os.environ['DB_ROOT'] class Landmarks18_train(ImageListLabels): def __init__(self): ImageListLabels.__init__(self, os.path.join(DB_ROOT, 'landmarks18/lists/train.txt'), os.path.join(DB_ROOT, 'landmarks18/'...
0
0
0
0
0
0
sciwx/demo/markdown_demo.py
dada1437903138/imagepy
1,178
3239768
import sys, wx sys.path.append('../../') from sciwx.text import MDPad, MDNoteBook, MDFrame, MDNoteFrame mdstr ='''## Markdown Test ### Title 1. paragraph 1 2. paragraph 2 ''' def md_pad_test(): frame = wx.Frame(None, title='Text Pad') mdpad = MDPad(frame) mdpad.set_cont(mdstr) frame.Show() def md_fr...
0
0
0
0
0
0
sporco/cupy/dictlrn/__init__.py
vishalbelsare/sporco
217
3239771
<gh_stars>100-1000 # -*- coding: utf-8 -*- # Copyright (C) 2018-2019 by <NAME> <<EMAIL>> # All rights reserved. BSD 3-clause License. # This file is part of the SPORCO package. Details of the copyright # and user license can be found in the 'LICENSE.txt' file distributed # with the package. """Construct variant of dic...
0
0
0
0
0
0
src/IDA/grap/idagrap/patterns/cryptography/stream/rc4/RC4.py
AirbusCyber/grap
171
3239782
<gh_stars>100-1000 #!/usr/bin/env python from idagrap.modules.Module import ModuleCryptoStream from .set_key.RC4SetKey import RC4_SET_KEY CRYPTO_STREAM_RC4 = ModuleCryptoStream( patterns=[RC4_SET_KEY], name="RC4", author=["<NAME>"], description="RC4 Stream Cipher." )
0
0
0
0
0
0
running_modes/create_model/logging/base_create_model_logger.py
lilleswing/Reinvent-1
183
3239826
<gh_stars>100-1000 import json import os import logging from abc import ABC, abstractmethod from dacite import from_dict from running_modes.configurations import GeneralConfigurationEnvelope, CreateModelConfiguration from running_modes.configurations.logging.create_model_log_configuration import CreateModelLoggerConfi...
0
0
0
0
0
0
frappe-bench/env/lib/python2.7/site-packages/faker/providers/person/nl_NL/__init__.py
ibrahmm22/library-management
412
3239850
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as PersonProvider class Provider(PersonProvider): # conforming to http://nl.wikipedia.org/wiki/Achternaam#Naamswijziging and # http://en.wikipedia.org/wiki/Dutch_name#Dutch_naming_law_.28surnames.29 # by adding a "-" between ...
0
0
4
0
4
0
nn_meter/ir_converters/onnx_converter/constants.py
kaleid-liner/nn-Meter
164
3239869
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. CONV_TYPE = "Conv" BN_TYPE = "BatchNormalization" SLICE_TYPE = "Slice" CONCAT_TYPE = "Concat" MAXPOOL_TYPE = "MaxPool" AVGPOOL_TYPE = "AveragePool" RELU_TYPE = "Relu" ADD_TYPE = "Add" FC_TYPE = "Gemm" RESHAPE_TYPE = "Reshape" GAP_TYPE = "GlobalAve...
0
0
0
0
0
0
peering/apps.py
schiederme/peering-manager
173
3239920
<filename>peering/apps.py from django.apps import AppConfig class PeeringConfig(AppConfig): name = "peering" def ready(self): import peering.signals
0
0
0
0
0
0
rstbx/viewer/calibration.py
dperl-sol/cctbx_project
155
3239924
from __future__ import annotations from __future__ import absolute_import, division, print_function from six.moves import range from scitbx.array_family import flex import math from six.moves import cPickle as pickle class sb_wrapper: def __init__(self,working_phil): self.working_phil = working_phil self...
0
3
0
0
3
0
aps/sse/bss/tcn.py
ishine/aps
117
3239933
<gh_stars>100-1000 # Copyright 2018 <NAME> # License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import torch as th import torch.nn as nn import torch.nn.functional as tf from typing import Optional, Union, List from aps.sse.base import SSEBase, MaskNonLinear, tf_masking from aps.transform.enh import TFT...
0
0
0
0
0
0
awsprocesscreds/compat.py
jcooter/awsprocesscreds
136
3239968
import six if six.PY3: from html import escape else: from cgi import escape
0
0
0
0
0
0
mapchete/cli/default/convert.py
ashutoshkumarjha/mapchete
161
3239969
<filename>mapchete/cli/default/convert.py<gh_stars>100-1000 import click from rasterio.dtypes import dtype_ranges from rasterio.enums import Resampling from rasterio.rio.options import creation_options import tilematrix import tqdm import mapchete from mapchete import commands from mapchete.cli import options from map...
0
0
0
0
0
0
cloudbaseinit/plugins/windows/azureguestagent.py
andia10240/cloudbase-init
160
3239999
<gh_stars>100-1000 # Copyright (c) 2017 Cloudbase Solutions Srl # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
0
0
0
0
0
0
challenges/Childs_Game/poller/for-release/machine.py
pingjuiliao/cb-multios
473
3240021
from generator.actions import Actions import random import string import struct import numpy as np import math import datetime as dt MAX_NAME = 20 MAX_DESC = 200 def random_word(max_size: int=7, min_size: int=3) -> object: characters = string.letters max_size = max_size if max_size >= min_size else min_size ...
6
4
0
7
17
0
__scraping__/fundamentus.com.br - requests, pandas, json/main.py
whitmans-max/python-examples
140
3240024
# author: https://blog.furas.pl # date: 2020.07.16 # link: https://stackoverflow.com/questions/62921395/pandas-include-key-to-json-file/ import requests import pandas as pd import json url = 'http://www.fundamentus.com.br/resultado.php' headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit...
0
0
0
0
0
0
pkg/cli/init-templates/predict.py
VictorXLR/cog
354
3240046
<reponame>VictorXLR/cog # Prediction interface for Cog ⚙️ # Reference: https://github.com/replicate/cog/blob/main/docs/python.md import cog # import torch class Predictor(cog.Predictor): def setup(self): """Load the model into memory to make running multiple predictions efficient""" # self.model = tor...
0
0
0
0
0
0
src/PythonicBlackBone/BlackBone.py
Inori/Blackbone
3,576
3240049
<gh_stars>1000+ import ctypes as c from ctypes import wintypes as w import enum # Github : x544D class PythonicBlackBone(): class DataTypes(enum.Enum): BOOL = 0 INT16 = 1 INT32 = 2 INT64 = 3 FLOAT = 4 DOUBLE = 5 LONG = 6 ULONG =...
0
0
0
0
0
0
src/base/tag.py
grischard/OSMDeepOD
156
3240070
<filename>src/base/tag.py class Tag: def __init__(self, key, value): self.key = key self.value = value def __str__(self): return self.key + "=" + self.value
0
0
0
0
0
0
src/aria2p/cli/commands/add_metalink.py
jamesdarke/gwader
309
3240074
"""Command to add metalinks.""" import sys from typing import List from aria2p.api import API from aria2p.utils import read_lines def add_metalinks( api: API, metalink_files: List[str] = None, from_file: str = None, options: dict = None, position: int = None, ) -> int: """ Add metalink s...
5
1
0
0
6
0
egs2/slurp_entity/asr1/local/evaluation/util.py
texpomru13/espnet
5,053
3240077
<gh_stars>1000+ import json import logging import os import tabulate from typing import Dict, Any, Tuple from progress.bar import Bar logging.basicConfig( format="%(asctime)s - %(levelname)s - %(name)s - %(message)s", datefmt="%m/%d/%Y %H:%M:%S", level=logging.INFO, ) logger = logging.getLogger(__name...
0
0
0
0
0
0
mysql2pgsql/__init__.py
asvedr/py-mysql2pgsql
275
3240098
from __future__ import absolute_import from .mysql2pgsql import Mysql2Pgsql __version__ = '0.1.6'
0
0
0
0
0
0
ldap2pg/manager.py
dalibo/ldap2pg
151
3240099
from __future__ import annotations from __future__ import unicode_literals import logging from .ldap import LDAPEntry, LDAPError, RDNError from .format import AttributesMap from .privilege import Acl from .role import ( CommentError, RoleOptions, RoleSet, ) from .utils import UserError, decode_value, lowe...
7
7
0
0
14
0
packages/@aws-cdk-containers/ecs-service-extensions/lib/extensions/assign-public-ip/lambda/test/test_cleanup_resource_handler.py
RichiCoder1/aws-cdk
6,159
3240119
<reponame>RichiCoder1/aws-cdk import unittest import unittest.mock as mock from lib.cleanup_resource_handler import CleanupResourceHandler from lib.route53 import Route53RecordSetLocator class TestCleanupResourceHandler(unittest.TestCase): def test_handler_rejects_invalid_properties(self): handler = Clea...
0
0
0
0
0
0
support/django/custom_db_backends/vitess/features.py
shichao-an/vitess
8,672
3240124
<filename>support/django/custom_db_backends/vitess/features.py<gh_stars>1000+ from django.db.backends.mysql.features import DatabaseFeatures as MysqlBaseDatabaseFeatures class DatabaseFeatures(MysqlBaseDatabaseFeatures): supports_transactions = False uses_savepoints = False supports_foreign_keys = False
0
0
0
0
0
0
conf.py
sblondon/uwsgi-docs
406
3240130
<gh_stars>100-1000 import sys, os extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'uWSGI' copyright = u'2012-2016, uWSGI' version = '2.0' release = '2.0' exclude_patterns = ['_build'] pygments_style = 'sphinx' html_theme = 'default' html_static_path = ['_static'] h...
0
0
0
0
0
0
flybirds/core/plugin/plugins/default/ui_driver/poco/poco_attr.py
LinuxSuRen/flybirds
183
3240181
<gh_stars>100-1000 # -*- coding: utf-8 -*- """ Get element attributes """ import flybirds.core.plugin.plugins.default.ui_driver.poco.poco_ele as poco_ele from flybirds.core.plugin.plugins.default.ui_driver.poco import poco_manage def get_ele_attr( poco, selector_str, optional, attr_nam...
0
0
0
0
0
0
unittests/test_apiv2_notifications.py
santos0santos0/django-DefectDojo
249
3240182
from rest_framework.test import APITestCase, APIClient from django.urls import reverse from rest_framework.authtoken.models import Token class NotificationsTest(APITestCase): """ Test the metadata APIv2 endpoint. """ fixtures: list[str] = ['dojo_testdata.json'] def setUp(self): token = To...
0
2
1
0
3
0
tests/pyccel/scripts/runtest_module_init2.py
dina-fouad/pyccel
206
3240214
# pylint: disable=missing-function-docstring, missing-module-docstring/ from module_init2 import x def f(): def module_init2__init(): print(123) def module_init2__free(): print(456) module_init2__init() print(x) module_init2__free() if __name__ == '__main__': f()
0
0
0
0
0
0
alipay/aop/api/domain/AlipayUserPartnerPrivilegeSyncModel.py
antopen/alipay-sdk-python-all
213
3240248
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import annotations import json from alipay.aop.api.constant.ParamConstants import * class AlipayUserPartnerPrivilegeSyncModel(object): def __init__(self): self._biz_time: None = None self._current_count: None = None self._grad...
0
11
0
9
20
0
naszilla/nas_benchmarks.py
naszilla/naszilla
112
3240311
<gh_stars>100-1000 import numpy as np import pickle import sys import os from nasbench import api from nas_201_api import NASBench201API as API import nasbench301 as nb from naszilla.nas_bench_101.cell_101 import Cell101 from naszilla.nas_bench_201.cell_201 import Cell201 from naszilla.nas_bench_301.cell_301 import C...
0
0
0
0
0
0
mmocr/models/textrecog/encoders/positional_encoding.py
Jessmin/TableMASTER-mmocr
206
3240319
import math import torch import torch.nn.functional as F from torch import nn from mmocr.models.builder import ENCODERS from .base_encoder import BaseEncoder @ENCODERS.register_module() class PositionalEncoding(BaseEncoder): """ Implement the PE function. """ def __init__(self, d_model, dropout: float=0., m...
2
1
0
0
3
0
simon/__init__.py
hcyrnd/simon
199
3240353
<gh_stars>100-1000 from .simon import Simon __version__ = '0.1.1'
0
0
0
0
0
0
tests/test_visitors/test_ast/test_exceptions/test_except_block_expression.py
cdhiraj40/wemake-python-styleguide
1,931
3240366
<gh_stars>1000+ import pytest from wemake_python_styleguide.violations.best_practices import ( NonTrivialExceptViolation, ) from wemake_python_styleguide.visitors.ast.exceptions import ( WrongExceptHandlerVisitor, ) use_complex_expression = """ try: ... except ValueError or TypeError: ... """ use_nam...
0
0
0
0
0
0
flexget/plugins/operate/log_filter.py
astrotee/Flexget
1,322
3240405
from loguru import logger from flexget import log, plugin from flexget.config_schema import register_config_key from flexget.event import event logger = logger.bind(name='log_filter') class MyFilter: def __init__(self, config): self.config = config def __call__(self, record) -> bool: for fi...
0
2
0
0
2
0
taskflow/conductors/backends/impl_nonblocking.py
JonasMie/taskflow
299
3240426
# -*- coding: utf-8 -*- # 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...
6
1
0
0
7
0
tests/typing/container.py
whysage/python-dependency-injector
1,997
3240431
<filename>tests/typing/container.py from dependency_injector import providers class Container: ... # Test 1: to check the return type provider1 = providers.Container(Container) var1: Container = provider1() # Test 2: to check the getattr provider2 = providers.Container(Container) attr: providers.Provider = pro...
0
0
0
0
0
0
tests/arybo/app.py
Liblor/arybo
223
3240453
<gh_stars>100-1000 from arybo.lib import MBA, simplify from arybo.tools import is_app_inversible, app_inverse import unittest class AppTest(unittest.TestCase): def setUp(self): mba = MBA(4) mba.use_esf = False self.X = mba.var('X') def test_app1(self): X = self.X A = (...
0
0
0
0
0
0
riemann/tests/test_utils.py
sturmianseq/riemann
118
3240463
import unittest import riemann from .. import utils from . import helpers class TestUtils(unittest.TestCase): def setUp(self): pass def tearDown(self): riemann.select_network('bitcoin_main') def test_i2le(self): self.assertEqual(utils.i2le(0), b'\x00') self.assertEqual(u...
0
0
0
0
0
0
ext/sst/sst/example.py
hyu-iot/gem5
765
3240506
<filename>ext/sst/sst/example.py # Copyright (c) 2021 The Regents of the University of California # 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 a...
0
0
0
0
0
0
quantdsl/domain/services/schwartzsmith_old.py
johnbywater/quantdsl
269
3240516
from __future__ import division # Schwartz Smith two factor model. # http://indices.riskamerica.cl/papers/Short%20Long%20Variations%20Commodity.pdf # This implementation follows "Calibration Techniques in Energy Markets" by <NAME> (September 13, 2011) # http://www.mathworks.co.uk/matlabcentral/fileexchange/31381-calib...
0
0
0
0
0
0
cleverhans/tf2/attacks/fast_gradient_method.py
xu-weizhen/cleverhans
4,333
3240576
from __future__ import annotations """The Fast Gradient Method attack.""" import numpy as np import tensorflow as tf from cleverhans.tf2.utils import optimize_linear, compute_gradient def fast_gradient_method( model_fn, x, eps, norm, loss_fn: object | None=None, clip_min: object | None=None,...
6
1
0
0
7
0
examples/autosar3/package/phys_integer_type.py
SHolzmann/autosar
199
3240590
import autosar ws = autosar.workspace() package=ws.createPackage("DataType", role="DataType") package.createSubPackage('DataTypeSemantics', role='CompuMethod') package.createSubPackage('DataTypeUnits', role='Unit') BatteryCurrent_T = package.createIntegerDataType('BatteryCurrent_T', min=0, max=65535, offset=-1...
0
0
0
0
0
0
k2/python/host/tests/rmepsilon_test.py
EmreOzkose/k2
491
3240622
<reponame>EmreOzkose/k2 #!/usr/bin/env python3 # # Copyright 2020 Xiaomi Corporation (author: <NAME>) # # See ../../../LICENSE for clarification regarding multiple authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You m...
0
0
0
0
0
0
tools/strict_enum_value_checker/strict_enum_value_checker_test.py
zealoussnow/chromium
14,668
3240632
#!/usr/bin/env python # 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 __future__ import annotations import difflib import os import re import unittest from strict_enum_value_checker import StrictEnum...
6
12
4
7
29
0
segmentation/models/resnet_block.py
dataflowr/evaluating_bdl
110
3240648
# code-checked # server-checked from __future__ import annotations import torch.nn as nn from torch.nn import functional as F import torch import os import sys import functools BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(BASE_DIR, '../inplace_abn')) from bn import I...
6
2
1
0
9
0
time_series_transform/stock_transform/stock_transfromer.py
allen-chiang/Time-Series-Transformer
128
3240657
from __future__ import annotations import collections from time_series_transform import io from time_series_transform.stock_transform.base import Stock, Portfolio from time_series_transform.transform_core_api.time_series_transformer import Time_Series_Transformer from time_series_transform.transform_core_api.base impor...
50
11
0
0
61
0
milk/tests/test_kmeans.py
luispedro/milk
284
3240714
<gh_stars>100-1000 import numpy as np import milk.unsupervised from milk.unsupervised.kmeans import assign_centroids, repeated_kmeans def test_kmeans(): np.random.seed(132) features = np.r_[np.random.rand(20,3)-.5,.5+np.random.rand(20,3)] def test_distance(dist, kwargs={}): centroids, _ = milk.unsu...
0
0
0
0
0
0
falkon/kernels/kernel.py
mohamad-amin/falkon
130
3240718
import dataclasses from abc import ABC, abstractmethod from typing import Optional, Any, Dict, Union import torch from falkon.sparse import SparseTensor from falkon.mmv_ops.fmm import fmm from falkon.mmv_ops.fmmv import fdmmv, fmmv from falkon.utils.helpers import check_same_dtype, check_sparse, check_same_device fro...
52
15
0
1
68
0
test_pixel.py
Ghazalmg/slimevolleygym
572
3240749
""" Human vs AI in pixel observation environment Note that for multiagent mode, otherObs's image is horizontally flipped Performance, 100,000 frames in 144.839 seconds, or 690 fps. """ import gym import slimevolleygym from time import sleep from pyglet.window import key from gym.envs.classic_control import renderin...
0
0
0
0
0
0
microraiden/examples/ticker_proxy.py
andrevmatos/microraiden
417
3240763
<filename>microraiden/examples/ticker_proxy.py<gh_stars>100-1000 import logging import click import os from microraiden.click_helpers import main, pass_app from microraiden.proxy import PaywalledProxy from microraiden.make_helpers import make_paywalled_proxy from microraiden.proxy.resources import PaywalledProxyUrl ...
0
0
0
0
0
0
deploy/products/beta/gen.py
hzhangse/codis
9,866
3240774
#!/usr/bin/env python3 import json proxy = { "dc1": [ "10.4.10.200", "10.4.10.201", ], "dc2":[ "10.2.16.200", "10.2.16.201", "10.2.16.202", ], } proxy_list = [] for dc, ip_list in proxy.items(): for ip in...
0
0
0
0
0
0
tests/java/org/python/indexer/data/testfileload.py
jeff5/jython-whinchat
577
3240776
<reponame>jeff5/jython-whinchat<filename>tests/java/org/python/indexer/data/testfileload.py # Smoke test for loading a file. # Don't put any imports in here. foo = "bar"
0
0
0
0
0
0
poloniex/__init__.py
maxim5/time_series_machine_learning
311
3240781
<reponame>maxim5/time_series_machine_learning<filename>poloniex/__init__.py #!/usr/bin/env python from __future__ import absolute_import __author__ = 'maxim' from .api import AVAILABLE_PERIODS from .fetch_data import get_all_tickers_list, update_ticker, update_selected, update_all, get_latest_data
0
0
0
0
0
0
src/ddpg/actor_net_bn.py
jimkon/Deep-Reinforcement-Learning-in-Large-Discrete-Action-Spaces
154
3240794
import tensorflow as tf import math import batch_norm import numpy as np LEARNING_RATE = 0.0001 TAU = 0.001 BATCH_SIZE = 64 N_HIDDEN_1 = 400 N_HIDDEN_2 = 300 class ActorNet_bn: """ Actor Network Model with Batch Normalization of DDPG Algorithm """ def __init__(self, num_states, num_actions): tf.rese...
0
2
0
1
3
0
odps/compat.py
wjsi/aliyun-odps-python-sdk
412
3240834
# -*- coding: utf-8 -*- # Copyright 1999-2017 Alibaba Group Holding 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 require...
7
10
0
0
17
0
spartan/examples/sklearn/neighbors/__init__.py
GabrielWen/spartan
156
3240843
from .unsupervised import NearestNeighbors
0
0
0
0
0
0
components/iscesys/DataManager/Dem3Manager.py
vincentschut/isce2
1,133
3240845
<reponame>vincentschut/isce2 #!/usr/bin/env python3 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Copyright 2012 California Institute of Technology. ALL RIGHTS RESERVED. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compl...
0
0
0
0
0
0
titus/titus/lib/stat/sample.py
jmilleralpine/hadrian
127
3240847
<reponame>jmilleralpine/hadrian #!/usr/bin/env python # Copyright (C) 2014 Open Data ("Open Data" refers to # one or more of the following companies: Open Data Partners LLC, # Open Data Research LLC, or Open Data Capital LLC.) # # This file is part of Hadrian. # Licensed under the Apache License, Version 2.0 (the "L...
0
0
0
0
0
0
transformations/replace_financial_amounts/rates.py
raft001/NL-Augmenter
583
3240875
from forex_python.converter import CurrencyRates, RatesNotAvailableError from forex_python.bitcoin import BtcConverter import sys # Those default exchange rates below are those used against 1 USD as of August 2021. EXCHANGE_RATES = { "EUR_to_USD": 1.19, "GBP_to_USD": 1.39, "JPY_to_USD": 0.0092, "CNY_t...
0
0
0
0
0
0
docs/source/ext.py
adamchainz/django-postgres-metrics
113
3240887
<reponame>adamchainz/django-postgres-metrics<gh_stars>100-1000 # Copyright (C) 2020 <NAME> # Copyright (C) 2020 Crate.IO GmbH # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either vers...
0
0
0
0
0
0
ch04_linear/code/params_ci.py
wellszhao/intro_ds_wy_course
146
3240901
<filename>ch04_linear/code/params_ci.py # -*- coding: UTF-8 -*- """ 此脚本用于展示如何正确理解参数的置信区间 """ import numpy as np import statsmodels.api as sm import matplotlib.pyplot as plt import pandas as pd def generate_data(): """ 随机生成数据 """ # Python2和Python3的range并不兼容,所以使用list(range(xx, xx)) x = np.array(lis...
0
0
0
0
0
0
awx/api/urls/system_job.py
DamoR25/awxnew
11,396
3240904
# Copyright (c) 2017 Ansible, Inc. # All Rights Reserved. from django.conf.urls import url from awx.api.views import SystemJobList, SystemJobDetail, SystemJobCancel, SystemJobNotificationsList, SystemJobEventsList urls = [ url(r'^$', SystemJobList.as_view(), name='system_job_list'), url(r'^(?P<pk>[0-9]+)/$'...
0
0
0
0
0
0
api/tests/opentrons/algorithms/test_dfs.py
mrod0101/opentrons
235
3240906
"""Test the DFS module. Generic testing of a depth first search algorithm. """ from pathlib import Path import pytest import json import os from opentrons.algorithms import dfs, types from pytest_lazyfixture import lazy_fixture # type: ignore[import] @pytest.fixture def int_named_graph() -> dfs.DFS[int]: """I...
6
7
0
0
13
0
IndicNLP/indicnlp/transliterate/acronym_transliterator.py
Adityashar/Sanskrit-Machine-Translation
432
3240925
<reponame>Adityashar/Sanskrit-Machine-Translation # -*- coding: utf-8 -*- # # Copyright (c) 2013-present, <NAME> # All rights reserved. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # #Program to transliterate acronyms fro...
0
0
0
0
0
0
dialogue-engine/test/programytest/aiml_tests/star_tests/test_star_aiml.py
cotobadesign/cotoba-agent-oss
104
3240942
<filename>dialogue-engine/test/programytest/aiml_tests/star_tests/test_star_aiml.py """ Copyright (c) 2020 COTOBA DESIGN, Inc. 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 without restriction, ...
0
0
0
0
0
0
src/human_body_prior/tools/model_loader.py
antic11d/human_body_prior
412
3240946
<reponame>antic11d/human_body_prior # -*- coding: utf-8 -*- # # Copyright (C) 2019 Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG), # acting on behalf of its Max Planck Institute for Intelligent Systems and the # Max Planck Institute for Biological Cybernetics. All rights reserved. # # Max-Planck-Ge...
0
0
0
0
0
0
advisor_server/suggestion/algorithm/quasi_random_search.py
silvery107/advisor
1,498
3240948
<filename>advisor_server/suggestion/algorithm/quasi_random_search.py<gh_stars>1000+ from suggestion.algorithm.base_chocolate_algorithm import BaseChocolateAlgorithm class QuasiRandomSearchAlgorithm(BaseChocolateAlgorithm): """ Get the new suggested trials with quasi random search algorithm. """ def __init__(...
0
0
0
0
0
0
mvpa2/base/report_dummy.py
nno/PyMVPA
227
3240958
# 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
1
0
0
1
0