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
tests/components/lateral_erosion/test_node_finder.py
scottrdavid/landlab
257
150445
<filename>tests/components/lateral_erosion/test_node_finder.py import numpy as np import pytest from landlab import RasterModelGrid from landlab.components.lateral_erosion.node_finder import angle_finder @pytest.mark.parametrize( "node_1,node_2", [(12, 8), (13, 3), (8, 2), (3, 1), (6, 2), (11, 1), (12, 6), (...
0
0
0
0
0
0
mmdet/models/roi_heads/bbox_heads/obb/gv_bbox_head.py
vpeopleonatank/OBBDetection
274
150473
<reponame>vpeopleonatank/OBBDetection<filename>mmdet/models/roi_heads/bbox_heads/obb/gv_bbox_head.py import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules.utils import _pair from mmdet.core import (auto_fp16, build_bbox_coder, force_fp32, multi_apply, multicla...
0
0
0
0
0
0
src/dialogs/apiviewer.py
goncaloperes/Scraping_Facepager
430
150504
from __future__ import annotations from PySide2.QtCore import * from PySide2.QtGui import * from PySide2.QtWidgets import * import os import shutil from tempfile import TemporaryDirectory import sys import re import json from widgets.textviewer import * from urllib.parse import urlparse import requests import threadin...
11
13
0
8
32
0
api/tacticalrmm/automation/migrations/0006_delete_policyexclusions.py
infinite8co/tacticalrmm
903
150507
<filename>api/tacticalrmm/automation/migrations/0006_delete_policyexclusions.py # Generated by Django 3.1.2 on 2020-11-02 19:13 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("automation", "0005_auto_20200922_1344"), ] operations = [ migrations...
0
0
0
0
0
0
tools/android/instrumentation_test_check_test.py
jobechoi/bazel
16,989
150544
# Copyright 2017 The Bazel 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 la...
0
0
0
0
0
0
facebook_business/adobjects/instagraminsightsresult.py
MyrikLD/facebook-python-business-sdk
576
150570
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
3
1
26
1
31
0
smug_saliency/mnist_models/mnist_constants.py
DionysisChristopoulos/google-research
23,901
150580
<reponame>DionysisChristopoulos/google-research # coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lice...
0
0
0
0
0
0
governance-at-scale-account-factory/account-creation-shared/v4/src/handler.py
RichMerritt/aws-service-catalog-products
137
150603
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import json, logging, time from urllib.request import Request, urlopen from betterboto import client as betterboto_client import os logger = logging.getLogger() logger.setLevel(logging.INFO) def handler(e...
0
0
0
0
0
0
alipay/aop/api/domain/AlipaySecurityDataAlibabaSecuritydataSendModel.py
antopen/alipay-sdk-python-all
213
150641
<filename>alipay/aop/api/domain/AlipaySecurityDataAlibabaSecuritydataSendModel.py #!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipaySecurityDataAlibabaSecuritydataSendModel(object): def __init__(self): self._biz_content_value = Non...
0
0
0
0
0
0
strings/string_fundamental/python/isogram.py
avi-pal/al-go-rithms
1,253
150663
<reponame>avi-pal/al-go-rithms<gh_stars>1000+ """ AAn isogram is a word that has no repeating letters, consecutive or non-consecutive. For example "something" and "brother" are isograms, where as "nothing" and "sister" are not. Below method compares the length of the string with the length (or size) of the set of t...
0
0
0
0
0
0
salt/grains/junos.py
babs/salt
9,425
150681
from __future__ import annotations """ Grains for junos. NOTE this is a little complicated--junos can only be accessed via salt-proxy-minion. Thus, some grains make sense to get them from the minion (PYTHONPATH), but others don't (ip_interfaces) """ import logging import salt.utils.platform __proxyenabled__ = ["jun...
1
5
0
0
6
0
onnxmltools/convert/coreml/operator_converters/ArrayFeatureExtractor.py
xhochy/onnxmltools
623
150693
# SPDX-License-Identifier: Apache-2.0 from ....proto import onnx_proto from ...common._registration import register_converter def convert_array_feature_extractor(scope, operator, container): op_type = 'ArrayFeatureExtractor' attrs = {'name': operator.full_name} target_indexes = operator.raw_operator.arr...
0
0
0
0
0
0
omega_miya/plugins/maybe/__init__.py
rinrini001/omega-miya
120
150698
import datetime import random from nonebot import CommandGroup, logger from nonebot.plugin.export import export from nonebot.typing import T_State from nonebot.adapters.cqhttp.bot import Bot from nonebot.adapters.cqhttp.event import GroupMessageEvent from nonebot.adapters.cqhttp.permission import GROUP from nonebot.ada...
18
0
0
0
18
0
setup.py
ponty/pyscreenshot
416
150700
<reponame>ponty/pyscreenshot<filename>setup.py import os.path from setuptools import setup NAME = "pyscreenshot" # get __version__ __version__ = None exec(open(os.path.join(NAME, "about.py")).read()) VERSION = __version__ URL = "https://github.com/ponty/pyscreenshot" DESCRIPTION = "python screenshot" LONG_DESCRIPT...
0
0
0
0
0
0
scripts/dataset_size.py
CandyHuiZhang/Semantic-Segmentation-for-Aerial-Satellite-Images-with-Convolutional-Neural-Networks-including-an-
276
150721
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import glob import re import sys import numpy as np if 'linux' in sys.platform: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt else: import matplotlib.pyplot as plt def get_args() -> object: parser = argparse...
0
2
0
0
2
0
TopQuarkAnalysis/Configuration/python/patRefSel_outputModule_cff.py
ckamtsikis/cmssw
852
150738
<reponame>ckamtsikis/cmssw import FWCore.ParameterSet.Config as cms from TopQuarkAnalysis.Configuration.patRefSel_outputModule_cfi import out outpath = cms.EndPath( out )
0
0
0
0
0
0
src/graph_notebook/neptune/gremlin/graphsonV3d0_MapType_objectify_patch.py
Sam-Martin/graph-notebook
378
150741
""" Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 """ from gremlin_python.structure.io.graphsonV3d0 import MapType from graph_notebook.neptune.gremlin.hashable_dict_patch import HashableDict # Original code from Tinkerpop 3.4.1 # # class MapType(_GraphSONTypeI...
0
1
0
0
1
0
wasm/tests/test_exec_mode.py
dbrgn/RustPython
11,058
150767
<gh_stars>1000+ def test_eval_mode(wdriver): assert wdriver.execute_script("return window.rp.pyEval('1+1')") == 2 def test_exec_mode(wdriver): assert wdriver.execute_script("return window.rp.pyExec('1+1')") is None def test_exec_single_mode(wdriver): assert wdriver.execute_script("return window.rp.pyExe...
0
0
0
0
0
0
lib/tracker/lighttrack.py
Kevoen/LightTrack
221
150771
<reponame>Kevoen/LightTrack<gh_stars>100-1000 import os import cv2 import yaml import numpy as np import torch import torch.nn.functional as F from lib.utils.utils import load_yaml, im_to_torch, get_subwindow_tracking, make_scale_pyramid, python2round class Lighttrack(object): def __init__(self, info, even=0): ...
0
0
0
0
0
0
opendatatools/common/string_util.py
solider245/OpenData
1,179
150775
<reponame>solider245/OpenData # encoding: UTF-8 def remove_chinese(str): s = "" for w in str: if w >= u'\u4e00' and w <= u'\u9fa5': continue s += w return s def remove_non_numerical(s): f = '' for i in range(len(s)): try: f = float(s[:i+1]) e...
0
0
0
0
0
0
bert-distillation-multimetric/squad_distillation_abstract_clis/a_run_squad_w_distillation_cli.py
meghanaravikumar/sigopt-examples
213
150799
<reponame>meghanaravikumar/sigopt-examples<filename>bert-distillation-multimetric/squad_distillation_abstract_clis/a_run_squad_w_distillation_cli.py import argparse from distilbert_run_and_hpo_configurations.distilbert_squad_run_parameters import RunParameters, get_default_run_parameters from distilbert_run_and_hpo_co...
0
0
0
0
0
0
setup.py
eegemberdiev/probablepeople
505
150840
try: from setuptools import setup except ImportError: raise ImportError("setuptools module required, please go to https://pypi.python.org/pypi/setuptools and follow the instructions for installing setuptools") setup( version='0.5.4', url='https://github.com/datamade/probablepeople', description='P...
0
0
0
0
0
0
openvqa/utils/make_mask.py
AcceptedDoge/openvqa
274
150854
# -------------------------------------------------------- # OpenVQA # Written by <NAME> https://github.com/cuiyuhao1996 # -------------------------------------------------------- import torch # Masking the sequence mask def make_mask(feature) -> object: return (torch.sum( torch.abs(feature), dim...
0
1
0
0
1
0
angr/engines/pcode/arch/ArchPcode_z180_LE_16_default.py
matthewpruett/angr
6,132
150858
<reponame>matthewpruett/angr ### ### This file was automatically generated ### from archinfo.arch import register_arch, Endness, Register from .common import ArchPcode class ArchPcode_z180_LE_16_default(ArchPcode): name = 'z180:LE:16:default' pcode_arch = 'z180:LE:16:default' description = 'Zilog Z180' ...
0
0
0
0
0
0
mmdet/core/bbox/__init__.py
vpeopleonatank/OBBDetection
274
150865
from .assigners import (AssignResult, BaseAssigner, CenterRegionAssigner, MaxIoUAssigner) from .builder import build_assigner, build_bbox_coder, build_sampler from .coder import (BaseBBoxCoder, DeltaXYWHBBoxCoder, PseudoBBoxCoder, TBLRBBoxCoder) from .iou_calculators import B...
0
0
0
0
0
0
utils/stringUtils.py
fsanges/glTools
165
150896
import math def stripSuffix(name,delineator: str='_') -> object: ''' Return the portion of name minus the last element separated by the name delineator. Useful for determining a name prefix from an existing object name. @param name: String name to strip the suffix from @type name: str @param delineator: String d...
3
3
0
0
6
0
tests/rules/test_IAMRolesOverprivilegedRule.py
lpmi-13/cfripper
360
150923
import pytest from pycfmodel.model.cf_model import CFModel from cfripper.model.enums import RuleGranularity, RuleMode, RuleRisk from cfripper.model.result import Failure from cfripper.rules.iam_roles import IAMRolesOverprivilegedRule from tests.utils import compare_lists_of_failures, get_cfmodel_from @pytest.fixture...
0
6
0
0
6
0
Training/MOOC Tensorflow 2.0/BeiDa/class2/p4_where.py
church06/Pythons
177
150986
<reponame>church06/Pythons<gh_stars>100-1000 import tensorflow as tf a = tf.constant([1, 2, 3, 1, 1]) b = tf.constant([0, 1, 3, 4, 5]) c = tf.where(tf.greater(a, b), a, b) # 若a>b,返回a对应位置的元素,否则返回b对应位置的元素 print("c:", c)
0
0
0
0
0
0
uflow/data/flow_data_test.py
deepneuralmachine/google-research
23,901
151010
<reponame>deepneuralmachine/google-research<filename>uflow/data/flow_data_test.py # coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at ...
0
0
0
0
0
0
retro/examples/discretizer.py
MatPoliquin/retro
2,706
151040
""" Define discrete action spaces for Gym Retro environments with a limited set of button combos """ import gym import numpy as np import retro class Discretizer(gym.ActionWrapper): """ Wrap a gym environment and make it use discrete actions. Args: combos: ordered list of lists of valid button co...
0
1
0
1
2
0
backend/accounts/management/commands/load.py
aibek79/Django-React-knboard
665
151045
from django.conf import settings from django.core import management from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help: str = "Helpful command to load all fixtures" def handle(self, *args, **options): if not settings.DEBUG: raise CommandErro...
0
0
1
0
1
0
allennlp/fairness/adversarial_bias_mitigator.py
alle-pawols/allennlp
11,433
151047
<gh_stars>1000+ """ A Model wrapper to adversarially mitigate biases in predictions produced by a pretrained model for a downstream task. The documentation and explanations are heavily based on: <NAME>., <NAME>., & <NAME>. (2018). [Mitigating Unwanted Biases with Adversarial Learning] (https://api.semanticscholar.org/...
0
0
0
0
0
0
src/page/showreview.py
fekblom/critic
216
151091
# -*- mode: python; encoding: utf-8 -*- # # Copyright 2012 <NAME>, Opera Software ASA # # 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 # # Unl...
6
13
2
1
22
0
src/compas_plotters/artists/__init__.py
funkchaser/compas
235
151095
<gh_stars>100-1000 """ ******************************************************************************** compas_plotters.artists ******************************************************************************** .. currentmodule:: compas_plotters.artists Primitive Artists ================= .. autosummary:: :toctre...
0
0
0
0
0
0
PyEngine3D/App/SceneManager.py
ubuntunux/PyEngine3D
121
151145
<gh_stars>100-1000 import copy from collections import OrderedDict import os import glob import math import numpy as np from PyEngine3D.Common import logger from PyEngine3D.Common.Constants import * from PyEngine3D.Render import CollisionActor, StaticActor, SkeletonActor, AxisGizmo from PyEngine3D.Render import Camer...
0
0
0
0
0
0
libraries/botframework-streaming/tests/test_header_serializer.py
andreikop/botbuilder-python
388
151171
<filename>libraries/botframework-streaming/tests/test_header_serializer.py from typing import List from unittest import TestCase from uuid import uuid4, UUID import pytest from botframework.streaming.payloads import HeaderSerializer from botframework.streaming.payloads.models import Header, PayloadTypes from botframew...
0
0
0
0
0
0
src/graph_notebook/static_resources/install.py
Sam-Martin/graph-notebook
378
151178
<gh_stars>100-1000 """ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 """ import os import site from shutil import copy2 from os.path import join as pjoin files = [ 'datatables.css', 'datatables.js' ] def main(): sitepackages = site.getsitepackages...
0
0
0
0
0
0
tests/widget_styles/test_floodgauge.py
dmalves/ttkbootstrap
406
151198
<filename>tests/widget_styles/test_floodgauge.py import tkinter as tk import ttkbootstrap as ttk from random import choice from ttkbootstrap import utility utility.enable_high_dpi_awareness() root = tk.Tk() root.geometry('500x500') root.title('ttkbootstrap') style = ttk.Style() def change_style(): theme = choice(...
0
0
0
0
0
0
alipay/aop/api/response/MybankCreditLoanapplyQrcodeCreateResponse.py
antopen/alipay-sdk-python-all
213
151209
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class MybankCreditLoanapplyQrcodeCreateResponse(AlipayResponse): def __init__(self): super(MybankCreditLoanapplyQrcodeCreateResponse, self).__init__() self._encrypt_token: ...
0
2
0
2
4
0
webservices/decoders.py
18F/openFEC
246
151216
<gh_stars>100-1000 import json election_types = { 'GR': 'General runoff', 'SG': 'Special election general', 'SGR': 'Special election general runoff', 'C': 'Convention', 'SPR': 'Special primary runoff', 'SC': 'Special convention', 'PR': 'Primary runoff', 'G': 'General election', '...
0
0
0
0
0
0
dash_docs/chapters/dash_datatable/interactivity/examples/interactivity_row_ids.py
joelostblom/dash-docs
379
151235
import dash from dash.dependencies import Input, Output import dash_table import dash_core_components as dcc import dash_html_components as html import pandas as pd df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/gapminder2007.csv') # add an id column and set it as the index # in this case t...
0
1
0
0
1
0
src/probflow/distributions/multivariate_normal.py
chiragnagpal/probflow
134
151246
<reponame>chiragnagpal/probflow from probflow.utils.base import BaseDistribution from probflow.utils.settings import get_backend from probflow.utils.validation import ensure_tensor_like class MultivariateNormal(BaseDistribution): r"""The multivariate Normal distribution. The `multivariate normal distribu...
0
0
0
0
0
0
scripts/python/rheatrace/enhanced_systrace/systrace_capturer.py
cjztool/btrace
1,007
151256
#!/usr/bin/env python # Copyright (C) 2021 ByteDance 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...
0
5
0
0
5
0
models/vision/classification/datasets.py
piyushghai/deep-learning-models
129
151297
import horovod.tensorflow as hvd import os import tensorflow as tf from preprocessing import resnet_preprocessing, imagenet_preprocessing, darknet_preprocessing import functools def create_dataset(data_dir, batch_size, preprocessing: str='resnet', validation: bool=False) -> object: filenames = [os.path.join(data_d...
2
4
0
0
6
0
website/content/ChapterFour/pytool/WordCount.py
sohaoo/LeetCode-Go
25,030
151300
<reponame>sohaoo/LeetCode-Go<filename>website/content/ChapterFour/pytool/WordCount.py<gh_stars>1000+ from collections import defaultdict import glob import os def str_count2(str): count_zh = count_dg = 0 for s in str: # 中文字符范围 if '\u4e00' <= s <= '\u9fff': count_zh += 1 if ...
0
0
0
0
0
0
judge/statistics_in_paper.py
zwangab91/ctw-baseline
333
151309
<reponame>zwangab91/ctw-baseline<filename>judge/statistics_in_paper.py # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import bisect import codecs import json import matplotlib.pyplot as plt im...
0
0
0
0
0
0
mitreattack/__init__.py
wetkind/mitreattack-python
137
151322
from .attackToExcel import * from .navlayers import * from .collections import *
0
0
0
0
0
0
tests/model_permalink/tests.py
MikeAmy/django
5,079
151325
<reponame>MikeAmy/django<gh_stars>1000+ from django.test import SimpleTestCase, override_settings from .models import Guitarist @override_settings(ROOT_URLCONF='model_permalink.urls') class PermalinkTests(SimpleTestCase): def test_permalink(self): g = Guitarist(name='<NAME>', slug='adrienmoignard') ...
0
0
0
0
0
0
src/tasks/challenge/round1/tests/test_mini_tasks.py
general-ai-challenge/Round1
107
151331
# Copyright (c) 2017-present, GoodAI # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE_CHALLENGE file in the root directory of this source tree. from __future__ import annotations import re import unittest import core.environment as environment import core.seri...
1
10
5
4
20
0
datasets/dialog_systems/dialog-bAbI/utils.py
chetanchougle/chatbot2
246
151364
<gh_stars>100-1000 DATA_SOURCE = 'data/dialog-bAbI-tasks/dialog-babi-candidates.txt' DATA_SOURCE_TASK6 = 'data/dialog-bAbI-tasks/dialog-babi-task6-dstc2-candidates.txt' DATA_DIR = 'dialog-bAbI-tasks/dialog-babi-candidates.txt' STOP_WORDS=set(["a","an","the"]) import re import os from itertools import chain from six....
0
0
0
0
0
0
tools/mo/openvino/tools/mo/back/ReduceMerge.py
ryanloney/openvino-1
1,127
151369
<filename>tools/mo/openvino/tools/mo/back/ReduceMerge.py # Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import logging as log import numpy as np from openvino.tools.mo.ops.ReduceOps import reduce_map from openvino.tools.mo.back.replacement import BackReplacementPattern from openvin...
0
0
0
0
0
0
blacksheep/testing/client.py
q0w/BlackSheep
420
151372
<gh_stars>100-1000 from typing import Optional from blacksheep.contents import Content from blacksheep.server.application import Application from blacksheep.server.responses import Response from blacksheep.testing.simulator import AbstractTestSimulator, TestSimulator from .helpers import CookiesType, HeadersType, Que...
0
0
0
0
0
0
desktop/core/ext-py/docutils-0.14/test/test_readers/test_pep/test_inline_markup.py
kokosing/hue
5,079
151374
#! /usr/bin/env python # $Id: test_inline_markup.py 7793 2015-02-17 14:55:01Z milde $ # Author: <NAME> <<EMAIL>> # Copyright: This module has been placed in the public domain. """ Tests for inline markup in PEPs (readers/pep.py). """ from __init__ import DocutilsTestSupport def suite() -> object: s = DocutilsT...
0
1
0
0
1
0
courses/backend/django-for-everybody/Web Application Technologies and Django/resources/dj4e-samples/bookone/apps.py
Nahid-Hassan/fullstack-software-development
297
151410
from django.apps import AppConfig class BookoneConfig(AppConfig): name: str = 'bookone'
0
0
1
0
1
0
combo/models/cluster_comb.py
vishalbelsare/combo
611
151412
# -*- coding: utf-8 -*- from __future__ import annotations """A collection of combination methods for clustering """ # Author: <NAME> <<EMAIL>> # License: BSD 2 clause import numpy as np from sklearn.utils import check_array from sklearn.utils.validation import check_is_fitted from numpy.testing import assert_equal ...
7
6
0
0
13
0
wagtailmenus/migrations/0014_auto_20160423_1339.py
pierremanceaux/wagtailmenus
329
151433
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-23 12:39 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ('wagtailmenus', '0013_auto_20160423_1124'), ] operations: list...
0
0
2
0
2
0
ktrain/text/ner/anago/__init__.py
RobWillison/ktrain
1,013
151441
<gh_stars>1000+ from .tagger import Tagger from .trainer import Trainer from .wrapper import Sequence
0
0
0
0
0
0
tcfcli/common/user_config.py
tencentyun/scfcli
103
151455
# -*- coding: utf-8 -*- from __future__ import annotations import os import platform from tcfcli.common.user_exceptions import * home = os.path.expanduser('~') _USER_CONFIG_FILE = home + '/.tcli_config.ini' version = platform.python_version() if version >= '3': from configparser import ConfigParser else: fro...
1
9
7
9
26
0
ioflo/aid/test/test_timing.py
BradyHammond/ioflo
128
151457
# -*- coding: utf-8 -*- """ Unit Test Template """ from __future__ import absolute_import, division, print_function import sys import unittest import os import datetime from ioflo.aid.sixing import * from ioflo.aid.odicting import odict from ioflo.test import testing from ioflo.aid.consoling import getConsole consol...
0
0
0
0
0
0
python/src/nnabla/utils/converter/supported_info.py
daniel-falk/nnabla
2,792
151467
# Copyright 2018,2019,2020,2021 Sony 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 applicable law or a...
0
0
0
0
0
0
indra/sources/geneways/processor.py
zebulon2/indra
136
151473
from __future__ import annotations """ This module provides an input processor for information extracted using the Geneways software suite, converting extraction data in Geneways format into INDRA statements. See publication: Rzhetsky, Andrey, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME> et al. "GeneWays: a system f...
1
3
0
3
7
0
reviewboard/admin/tests/test_change_form_fieldset.py
seekingalpha/reviewboard
921
151478
<filename>reviewboard/admin/tests/test_change_form_fieldset.py """Unit tests for reviewboard.admin.forms.change_form.ChangeFormFieldset.""" from __future__ import unicode_literals from django.contrib.admin.helpers import AdminForm from django.contrib.auth.models import User from reviewboard.admin import admin_site f...
0
0
0
0
0
0
utildialog/confirmdialog.py
dragondjf/QMarkdowner
115
151488
#!/usr/bin/python # -*- coding: utf-8 -*- import os from qframer.qt import QtGui from qframer.qt import QtCore from basedialog import BaseDialog class ConfirmDialog(BaseDialog): def __init__(self, text, styleoptions, parent=None): super(ConfirmDialog, self).__init__(styleoptions, parent) ...
0
0
0
0
0
0
tests/py/test_sync_npm.py
kant/gratipay.com
517
151491
<reponame>kant/gratipay.com # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from gratipay.testing import Harness from gratipay import sync_npm class ProcessDocTests(Harness): def test_returns_None_if_no_name(self): assert sync_npm.process_doc({...
0
0
0
0
0
0
examples/plot_normalize.py
mewbak/hypertools
1,681
151518
<reponame>mewbak/hypertools<gh_stars>1000+ # -*- coding: utf-8 -*- """ ============================= Normalizing your features ============================= Often times its useful to normalize (z-score) you features before plotting, so that they are on the same scale. Otherwise, some features will be weighted more he...
0
0
0
0
0
0
modules/api/functional_test/live_tests/internal/color_test.py
slandry90/vinyldns
333
151522
<reponame>slandry90/vinyldns import pytest from hamcrest import * from vinyldns_python import VinylDNSClient def test_color(shared_zone_test_context): """ Tests that the color endpoint works appropriately """ client = shared_zone_test_context.ok_vinyldns_client result = client.color() assert...
0
0
0
0
0
0
scrapy/douban_login/douban_login/spiders/douban.py
dengwei1999/spider_python
762
151526
<filename>scrapy/douban_login/douban_login/spiders/douban.py # -*- coding: utf-8 -*- import scrapy from urllib import request from PIL import Image import ssl # 使用Scrapy登录豆瓣网 # 验证码识别可以通过手动输入【PIL】和自动识别 class DoubanSpider(scrapy.Spider): name = 'douban' allowed_domains = ['douban.com'] # 默认首先请求这个地址【GET】,然...
0
0
0
0
0
0
tests/pylon_tests/emulated/calltest.py
matt-phair/pypylon
358
151529
from pylonemutestcase import PylonEmuTestCase from pypylon import pylon import unittest class CallTestSuite(PylonEmuTestCase): # Tests that you can set the GainRaw parameter of the camera def test_gain_raw(self): cam = self.create_first() cam.Open() # Set GainRaw to min value (192) ...
0
0
0
0
0
0
app/migrations/0002_fermentationprofile_notes.py
fossabot/fermentrack
114
151543
# Generated by Django 3.0.6 on 2020-11-05 16:16 from django.db import migrations, models class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ('app', '0001_squashed_0009_auto_20180709_0256'), ] operations: list[object] = [ migrations.AddField( model...
0
0
2
0
2
0
pes/PES/main.py
git163/Cornell-MOE
218
151586
from __future__ import annotations import functools import warnings import numpy as np import numpy.linalg as npla import sys, os import time from PES.compute_covariance import * from PES.initial_sample import * from PES.hyper_samples import * from PES.utilities import * from PES.sample_minimum import * fro...
9
0
0
0
9
0
sdks/python/apache_beam/io/gcp/experimental/spannerio_read_it_test.py
ajothomas/beam
5,279
151603
# # 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 us...
0
1
5
0
6
0
external/CoAPthon/coapthon/layers/requestlayer.py
iconnect-iot/intel-device-resource-mgt-lib
237
151627
<filename>external/CoAPthon/coapthon/layers/requestlayer.py from coapthon.messages.response import Response from coapthon import defines __author__ = '<NAME>' class RequestLayer(object): """ Class to handle the Request/Response layer """ def __init__(self, server): self._server = server ...
0
0
0
0
0
0
janitor/functions/move.py
vishalbelsare/pyjanitor
674
151640
import pandas_flavor as pf import pandas as pd from typing import Union @pf.register_dataframe_method def move( df: pd.DataFrame, source: Union[int, str], target: Union[int, str], position: str = "before", axis: int = 0, ) -> pd.DataFrame: """ Move column or row to a position adjacent to ...
5
1
0
0
6
0
v2/utils/functional.py
oxygenman/DanceRevolution
209
151647
# This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this open-source project. """ Define the functions to load data. """ import os import json import argparse import numpy as np def load_data(data_dir, interval: int=100, data_type: str='2D') -> tuple[...
4
4
0
0
8
0
pwnlib/gdb_api_bridge.py
tkmikan/pwntools
8,966
151670
<gh_stars>1000+ """GDB Python API bridge.""" import gdb import socket from threading import Condition import time from rpyc.core.protocol import Connection from rpyc.core.service import Service from rpyc.lib import spawn from rpyc.lib.compat import select_error from rpyc.utils.server import ThreadedServer class Ser...
0
0
0
0
0
0
rl_coach/environments/robosuite_environment.py
JohnnyPeng18/coach
1,960
151672
<reponame>JohnnyPeng18/coach # # Copyright (c) 2020 Intel 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 b...
0
0
0
0
0
0
kornia/losses/lovasz_softmax.py
YanivHollander/kornia
418
151685
<reponame>YanivHollander/kornia from typing import List import torch import torch.nn as nn from torch import Tensor from kornia.testing import KORNIA_CHECK_SHAPE # based on: # https://github.com/bermanmaxim/LovaszSoftmax def lovasz_softmax_loss(pred: Tensor, target: Tensor) -> Tensor: r"""Criterion that comput...
0
0
0
0
0
0
setup.py
antoniogois/entmax
298
151705
from distutils.core import setup from entmax import __version__ setup(name='entmax', version=__version__, url="https://github.com/deep-spin/entmax", author="<NAME>, <NAME>, <NAME>", author_email="<EMAIL>", description=("The entmax mapping and its loss, a family of sparse " ...
0
0
0
0
0
0
src/two_heads/RangePadding2D.py
lilin-hitcrt/OverlapNet
441
151799
#!/usr/bin/env python3 # Developed by <NAME> and <NAME> # This file is covered by the LICENSE file in the root of this project. # Brief: A custom keras padding layer. # pad([1 2 3 4], 2) -> [3, 4, 1, 2, 3, 4, 1] import numpy as np from keras.layers import Layer from keras.models import Sequential import keras.ba...
0
2
0
0
2
0
dashboard/dashboard/pinpoint/models/task.py
Martijnve23/catapult
1,894
151820
<gh_stars>1000+ # Copyright 2019 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 print_function from __future__ import division from __future__ import absolute_import import collections import funct...
0
0
0
0
0
0
examples/ssd/callbacks.py
rsketine/neon
4,415
151829
<filename>examples/ssd/callbacks.py<gh_stars>1000+ import numpy as np from neon.callbacks.callbacks import Callback from neon import logger from inference import get_boxes from util.voc_eval import voc_eval as voc_eval from util.util import plot_image as plot_image import os """ We include two callbacks that can be act...
0
0
0
0
0
0
platypush/backend/joystick.py
RichardChiang/platypush
228
151881
<gh_stars>100-1000 import time from platypush.backend import Backend from platypush.message.event.joystick import JoystickEvent class JoystickBackend(Backend): """ This backend will listen for events from a joystick device and post a JoystickEvent whenever a new event is captured. Triggers: ...
0
0
0
0
0
0
analysis/aero/aero_ssam.py
leozz37/makani
1,178
151884
# Copyright 2020 Makani Technologies 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...
0
2
0
0
2
0
tests/test_packages/test_skills/test_simple_service_registration/test_dialogues.py
bryanchriswhite/agents-aea
126
151885
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the ...
0
0
0
0
0
0
ds2/disjointsets/__init__.py
aslisabanci/datastructures
159
151934
<gh_stars>100-1000 from ds2.disjointsets.disjointsets import ( DisjointSetsMapping, DisjointSetsLabels, DisjointSetsForest, DisjointSetsPathCompression, ...
0
0
0
0
0
0
tests/integration/testdata/buildcmd/Provided/main.py
renanmontebelo/aws-sam-cli
2,959
151950
import requests def handler(event, context) -> object: return requests.__version__
0
1
0
0
1
0
pyleus/cli/commands/run_subcommand.py
earthmine/pyleus
166
151958
<gh_stars>100-1000 """Sub-command base class for commands able to run a topology, as local or submit, starting either from a jar or from a pyleus topology source directory. Args: TOPOLOGY_JAR - The path to the Pyleus jar to run. """ from __future__ import absolute_import from pyleus.cli.commands.subcommand import...
0
0
0
0
0
0
vyapp/plugins/pdb.py
iogf/vy
927
151977
<gh_stars>100-1000 """ Overview ======== This module implements a wrapper around python debugger it is possible to easily debug python applications. It is possible to set breakpoints, run code step by step, remove break points, check variable values etc. Key-Commands ============ Namespace: pdb Mode: PYTHON Event...
0
0
0
0
0
0
tests/unit/test_hideable_query.py
rehee/try_discuz
1,140
151978
from flask_login import login_user from flaskbb.forum.models import Topic def test_guest_user_cannot_see_hidden_posts(guest, topic, user, request_context): topic.hide(user) login_user(guest) assert Topic.query.filter(Topic.id == topic.id).first() is None def ...
0
0
0
0
0
0
tests/inputs/oneof_default_value_serialization/test_oneof_default_value_serialization.py
DK99/python-betterproto
708
152005
<filename>tests/inputs/oneof_default_value_serialization/test_oneof_default_value_serialization.py import pytest import datetime import betterproto from tests.output_betterproto.oneof_default_value_serialization import ( Test, Message, NestedMessage, ) def assert_round_trip_serialization_works(message: T...
0
0
0
0
0
0
src/utils/utlis.py
vishalsingh17/CNN-Visualizer
6,207
152015
<filename>src/utils/utlis.py import tensorflow as tf from json import dump assert(int(tf.__version__.split('.')[0]) == 2) def convert_h5_to_json(model_h5_file, model_json_file): """ Helper function to convert tf2 stored model h5 file to a customized json format. Args: model_h5_file(string): ...
0
0
0
0
0
0
tests/test_subtract.py
josemolinagarcia/maya-math-nodes
148
152021
# Copyright (c) 2018 <NAME> et al. All rights reserved. # Use of this source code is governed by an MIT license that can be found in the LICENSE file. from node_test_case import NodeTestCase class TestSubtract(NodeTestCase): def test_subtract(self): self.create_node('Subtract', {'input1': 10.0, 'input2': ...
0
0
0
0
0
0
setup.py
DanNixon/PlayMusicCL
134
152036
<reponame>DanNixon/PlayMusicCL<gh_stars>100-1000 from setuptools import setup setup( name='playmusiccl', version='0.6.2', entry_points = { 'console_scripts': ['playmusiccl=playmusiccl:run'], }, description='Text based command line client for Google Play Music', classifiers=[ 'Li...
0
0
0
0
0
0
sleepypuppy/__init__.py
soffensive/sleepy-puppy
952
152049
<gh_stars>100-1000 from logging import Formatter from logging.handlers import RotatingFileHandler from flask import Flask, redirect, request, abort, send_from_directory from flask.ext import login from flask.ext.bcrypt import Bcrypt from flask.ext.restful import Api from flask.ext.admin import Admin from flask.ext.mail...
0
0
0
0
0
0
setup/release.py
gamechanger/dusty
421
152080
import os import tarfile from github3 import login token = os.getenv('GITHUB_TOKEN') gh = login(token=token) repo = gh.repository('gamechanger', 'dusty') version = os.getenv('VERSION') prerelease = os.getenv('PRERELEASE') == 'true' release_name = version release = repo.create_release(version, name=release_name, pre...
0
0
0
0
0
0
caffe2/python/tutorials/py_gen/Image_Pre-Processing_Pipeline.py
AIHGF/caffe2
585
152089
######################################################### # # DO NOT EDIT THIS FILE. IT IS GENERATED AUTOMATICALLY. # # PLEASE LOOK INTO THE README FOR MORE INFORMATION. # # ######################################################### # coding: utf-8 # # Image Loading and Preprocessing # # In this tutorial we're g...
0
0
0
0
0
0
tests/L0/run_optimizers/test_lamb.py
Muflhi01/apex
6,523
152101
from __future__ import annotations import unittest import os import torch from torch.optim import Optimizer import apex from apex.multi_tensor_apply import multi_tensor_applier from itertools import product class RefLAMB(Optimizer): r"""Implements Lamb algorithm. It has been proposed in `Large Batch Optimiza...
10
4
0
0
14
0
sample/pytorch/unit_test/gpt_unit_test.py
dujiangsu/FasterTransformer
777
152104
<gh_stars>100-1000 # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
0
0
0
0
0
0
fias/models/__init__.py
xiva-wgt/django-fias
108
152122
<gh_stars>100-1000 # coding: utf-8 from __future__ import unicode_literals, absolute_import from .version import Status, Version from .socrbase import SocrBase from .normdoc import * from .addrobj import AddrObj from .house import House, HouseInt from .landmark import LandMark from .room import * from .stead import * ...
0
0
0
0
0
0
climpred/graphics.py
pangeo-data/climpred
104
152142
<filename>climpred/graphics.py import warnings from collections import OrderedDict import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import xarray as xr from xarray.coding.times import infer_calendar_name from .checks import DimensionError from .constants import CLIMPRED_DIMS from .metrics i...
0
0
0
0
0
0