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
codes/python/1-basics/automatic_differentiation.py
agnes-yang/TensorFlow-Course
7,040
3240964
# -*- coding: utf-8 -*- """automatic_differentiation.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1ibfKtpxC_hIhZlPbefCoqpAS7jTdyiFw ## Automatic Differentiation The [automatic differentiation](https://en.wikipedia.org/wiki/Automatic_different...
0
0
0
0
0
0
localstack/utils/server/multiserver.py
matt-mercer/localstack
31,928
3240975
<reponame>matt-mercer/localstack from localstack.services import motoserver def get_moto_server_port(): # TODO: deprecated, remove return motoserver.get_moto_server().port
0
0
0
0
0
0
Z - Tool Box/BeRoot/Linux/beroot.py
dfirpaul/Active-Directory-Exploitation-Cheat-Sheet-1
1,290
3241011
<filename>Z - Tool Box/BeRoot/Linux/beroot.py<gh_stars>1000+ #!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import time from beroot.run import run if __name__ == '__main__': banner = ''' |====================================================================| | ...
0
0
0
0
0
0
tests/st/func/debugger/stream_operator/test_graph_runs_operator.py
mindspore-ai/mindinsight
216
3241052
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
0
1
0
0
1
0
pymtl3/stdlib/stream/SinkRTL.py
jbrzozo24/pymtl3
152
3241061
<gh_stars>100-1000 """ ======================================================================== SinkRTL ======================================================================== Test sinks with RTL interfaces. Author : <NAME> Date : Feb 12, 2021 """ from pymtl3 import * from .ifcs import RecvIfcRTL class PyMTLTest...
0
0
0
0
0
0
addons/Sprytile-6b68d00/sprytile_preview.py
trisadmeslek/V-Sekai-Blender-tools
733
3241093
<reponame>trisadmeslek/V-Sekai-Blender-tools preview_verts = None preview_uvs = None preview_is_quads = False def set_preview_data(verts, uvs, is_quads=True): """ Set the preview data for SprytileGUI to draw :param verts: :param uvs: :param is_quads: :return: """ global preview_verts, p...
0
0
0
0
0
0
learning_algorithm/gradient_boosting_blending.py
Bermuhz/DataMiningCompetitionFirstPrize
128
3241116
from sklearn.ensemble import GradientBoostingClassifier from commons import variables from commons import tools from scipy.stats import mode def learn(x, y, test_x) -> object: # set sample weight weight_list = [] for j in range(len(y)): if y[j] == "0": weight_list.append(variables.we...
0
1
0
0
1
0
test/test_dynamic_texts.py
Tyler887/console-menu
230
3241138
<gh_stars>100-1000 from base_test_case import BaseTestCase from consolemenu import ConsoleMenu from consolemenu.items import MenuItem, SubmenuItem title_text = "title" subtitle_text = "subtitle" item_title_text = "itemtext" submenu_title_text = "mysub" count = 0 def menu_title(): return title_text def menu_sub...
0
0
0
0
0
0
tests/base/test_velocity.py
feudalism/spatialmath-python
183
3241153
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Apr 10 14:19:04 2020 @author: corkep """ import numpy as np import numpy.testing as nt import unittest from math import pi import math from scipy.linalg import logm, expm from spatialmath.base.transforms3d import * from spatialmath.base.numeric impo...
0
2
0
0
2
0
utils/downloader.py
JeffersonQin/lightnovel_epub
116
3241164
from __future__ import annotations import sys import requests import os import unicodedata import re import click import traceback from utils import echo def _download_file(url, dir, headers) -> object: echo.push_subroutine(sys._getframe().f_code.co_name) echo.clog(f'start downloading: {url} => {dir}') ret = 0 t...
3
6
0
0
9
0
validation_tests/analytical_exact/carrier_greenspan_transient/plot_results.py
samcom12/anuga_core
136
3241171
<filename>validation_tests/analytical_exact/carrier_greenspan_transient/plot_results.py """ Quick plot of the Carrier-Greenspan outputs """ import anuga.utilities.plot_utils as util import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as pyplot from analytical_cg_transient import * p_st = util.ge...
0
0
0
0
0
0
Examples/AppKit/Todo/CalendarMatrix.py
Khan/pyobjc-framework-Cocoa
132
3241178
from Cocoa import * gNumDaysInMonth = ( 0, 31, 28, 31, 30, 21, 30, 31, 31, 30, 31, 30, 31 ) def isLeap(year) -> object: return (((year % 4) == 0 and ((year % 100) != 0)) or (year % 400) == 0) class CalendarMatrix (NSMatrix): lastMonthButton = objc.IBOutlet() monthName = objc.IBOutlet() nextMonthButto...
0
3
1
0
4
0
ceph_deploy/tests/util.py
weisongf/ceph-deploy
353
3241189
<gh_stars>100-1000 def generate_ips(start_ip, end_ip): start = list(map(int, start_ip.split("."))) end = list(map(int, end_ip.split("."))) temp = start ip_range = [] ip_range.append(start_ip) while temp != end: start[3] += 1 for i in (3, 2, 1): if temp[i] == 256: ...
0
0
0
0
0
0
metakernel/magics/blockly_magic.py
StephanRempel/metakernel
276
3241202
<gh_stars>100-1000 # Copyright (c) Metakernel Development Team. # Distributed under the terms of the Modified BSD License. # @author ChrisJaunes from metakernel import Magic, option from IPython.display import IFrame, Javascript class BlocklyMagic(Magic): @option( '-o', '--page_from_origin', action='sto...
0
0
0
0
0
0
Packs/HealthCheck/Scripts/HealthCheckGetLargestInputsAndOutputsInIncidents/HealthCheckGetLargestInputsAndOutputsInIncidents.py
diCagri/content
799
3241224
<reponame>diCagri/content import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 THRESHOLDS = { 'numberofincidentsIObiggerthan10mb': 1, 'numberofincidentsIObiggerthan1mb': 10, } def find_largest_input_or_output(all_args_list, is_table_result) -> dict: if is_table_resul...
0
0
0
0
0
0
examples/pxScene2d/external/libnode-v6.9.0/deps/v8/tools/verify_source_deps.py
madanagopaltcomcast/pxCore
5,964
3241236
#!/usr/bin/env python # Copyright 2015 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Script to print potentially missing source dependencies based on the actual .h and .cc files in the source tree and which files a...
0
0
0
0
0
0
pyts/approximation/tests/test_sax.py
Pandinosaurus/pyts
1,217
3241237
<reponame>Pandinosaurus/pyts<filename>pyts/approximation/tests/test_sax.py<gh_stars>1000+ """Testing for Symbolic Aggregate Approximation.""" # Author: <NAME> <<EMAIL>> # License: BSD-3-Clause import numpy as np import pytest import re from pyts.approximation import SymbolicAggregateApproximation X = np.arange(30)....
0
0
0
0
0
0
Athos/ONNXCompiler/onnx_run_tf.py
krantikiran68/EzPC
221
3241238
""" Authors: <NAME>. Copyright: Copyright (c) 2020 Microsoft Research 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, including without limitation the rights to use,...
0
1
0
0
1
0
2D/model.py
SHREC-DOE-UF/unet
244
3241264
# # -*- coding: utf-8 -*- # # Copyright (c) 2019 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 by app...
12
8
0
5
25
0
common/utils/__init__.py
ashok-arjun/Transfer-Learning-Library
1,474
3241278
<gh_stars>1000+ from .logger import CompleteLogger from .meter import * from .data import ForeverDataIterator __all__ = ['metric', 'analysis', 'meter', 'data', 'logger']
0
0
0
0
0
0
examples/Serverless_Deployment_Preference.py
compose-x/troposphere
4,573
3241282
# Converted from s3_processor located at: # https://github.com/awslabs/serverless-application-model/blob/dbc54b5d0cd31bf5cebd16d765b74aee9eb34641/examples/2016-10-31/s3_processor/template.yaml from troposphere import Template from troposphere.serverless import DeploymentPreference, Function t = Template() t.set_desc...
0
0
0
0
0
0
274 H-Index.py
ChiFire/legend_LeetCode
872
3241285
from __future__ import annotations """ Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. According to the definition of h-index on Wikipedia: "A scientist has index h if h of his/her N papers have at least h citations each, and ...
0
3
0
0
3
0
examples/tensorflow/common/object_detection/datasets/builder.py
MaximProshin/nncf
136
3241288
<reponame>MaximProshin/nncf """ Copyright (c) 2022 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 by applicabl...
0
0
0
0
0
0
mlcomp/db/models/report.py
sUeharaE4/mlcomp
166
3241295
<filename>mlcomp/db/models/report.py<gh_stars>100-1000 import sys import sqlalchemy as sa from sqlalchemy import ForeignKey from sqlalchemy.orm import relationship from mlcomp.db.models.base import Base from mlcomp.utils.misc import now class ReportSeries(Base): __tablename__ = 'report_series' id = sa.Colu...
0
0
0
0
0
0
calvin/runtime/south/transports/lib/twisted/twisted_transport.py
gabrielcercel/calvin-base
334
3241308
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # 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 ...
10
10
0
5
25
0
bitcoin_arbitrage/monitor/update/__init__.py
MoustaphaLo/CryptocurrencyArbitrageBot
212
3241309
<filename>bitcoin_arbitrage/monitor/update/__init__.py from abc import ABC, abstractmethod from typing import List, Optional from bitcoin_arbitrage.monitor.exchange import Exchange from bitcoin_arbitrage.monitor.spread_detection import Spread class UpdateAction(ABC): def __init__(self, spread_threshold: Optional...
0
0
0
0
0
0
tests/test_joback.py
andr1976/thermo
380
3241316
# -*- coding: utf-8 -*- '''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2017, <NAME> <<EMAIL>> 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...
0
0
0
0
0
0
avalanche/models/utils.py
PRISHIta123/avalanche
810
3241328
from avalanche.models.dynamic_modules import MultiTaskModule import torch.nn as nn def avalanche_forward(model, x, task_labels) -> object: if isinstance(model, MultiTaskModule): return model(x, task_labels) else: # no task labels return model(x) class FeatureExtractorBackbone(nn.Module): ...
0
4
0
1
5
0
tests/language_model_predict_test.py
davidgolub/QuestionGeneration
117
3241341
from models.language_model import LanguageModel import torch from torch import nn from torch import optim from torch.autograd import variable from helpers import torch_utils config = {} config['vocab_size'] = 25 config['hidden_size'] = 50 config['embedding_size'] = 10 config['num_layers'] = 1 config['dropout'] =...
0
0
0
0
0
0
benchmarks/image_segmentation/tensorflow/unet/inference/fp32/unet_infer.py
ashahba/models
357
3241393
# # -*- coding: utf-8 -*- # # Copyright (c) 2019 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 by app...
0
0
0
0
0
0
jorldy/test/core/env/test_nes_env.py
Kyushik/JORLDY
300
3241403
<reponame>Kyushik/JORLDY<filename>jorldy/test/core/env/test_nes_env.py from .utils import check_env from core.env.nes import SuperMarioBros def test_super_mario_bros(MockAgent): env = SuperMarioBros() agent = MockAgent(env.state_size, env.action_size, env.action_type) check_env(env, agent)
0
0
0
0
0
0
smda/utility/PeFileLoader.py
williballenthin/smda
142
3241426
<filename>smda/utility/PeFileLoader.py import struct import logging import lief lief.logging.disable() LOG = logging.getLogger(__name__) class PeFileLoader(object): BITNESS_MAP = {0x14c: 32, 0x8664: 64} @staticmethod def isCompatible(data): return data[:2] == b"MZ" @staticmethod def ...
0
0
0
0
0
0
maml/utils/_stats.py
anooptp/maml
161
3241437
<filename>maml/utils/_stats.py<gh_stars>100-1000 """ Utils for describers """ import logging from collections import Counter from functools import partial from typing import List, Optional, Tuple import numpy as np logging.basicConfig() logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) def _add_al...
0
0
0
0
0
0
paypal/admin.py
izi-ecommerce/izi-paypal
111
3241534
from paypal.express.admin import * # noqa F403 from paypal.payflow.admin import * # noqa F403
0
0
0
0
0
0
old/temp/deep_heatmaps_model_primary_net.py
konatasick/face-of-art
220
3241552
from __future__ import annotations import scipy.io import scipy.misc from glob import glob import os import numpy as np from ops import * import tensorflow as tf from tensorflow import contrib from menpo_functions import * from logging_functions import * from data_loading_functions import * class DeepHeatmapsModel(ob...
57
6
0
10
73
0
nuplan/planning/scenario_builder/abstract_scenario_builder.py
motional/nuplan-devkit
128
3241590
import abc from typing import List, Type from nuplan.common.maps.abstract_map_factory import AbstractMapFactory from nuplan.planning.scenario_builder.abstract_scenario import AbstractScenario from nuplan.planning.scenario_builder.scenario_filter import ScenarioFilter from nuplan.planning.utils.multithreading.worker_po...
2
3
0
0
5
0
python/paddle/fluid/tests/unittests/test_reader_reset.py
zmxdream/Paddle
17,085
3241615
<filename>python/paddle/fluid/tests/unittests/test_reader_reset.py # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http...
0
0
0
0
0
0
data_collection/gazette/spiders/pa_belem.py
kaiocp/querido-diario
454
3241622
<filename>data_collection/gazette/spiders/pa_belem.py import datetime from urllib.parse import urlencode import scrapy from gazette.items import Gazette from gazette.spiders.base import BaseGazetteSpider class PaBelemSpider(BaseGazetteSpider): TERRITORY_ID = "1501402" name = "pa_belem" allowed_domains =...
0
0
0
0
0
0
test/test_utils.py
deepu-james/sast-scan
131
3241630
import lib.utils as utils def test_get_workspace(): d = utils.get_workspace( {"repositoryUri": "https://github.com/AppThreat/WebGoat", "branch": "develop"} ) assert d == "https://github.com/AppThreat/WebGoat/blob/develop" d = utils.get_workspace({"repositoryUri": "", "branch": "develop"}) ...
0
0
0
0
0
0
recipes/eabase/all/conanfile.py
rockandsalt/conan-center-index
562
3241641
<gh_stars>100-1000 import os from conans import ConanFile, CMake, tools class EABaseConan(ConanFile): name = "eabase" description = "EABase is a small set of header files that define platform-independent data types and platform feature macros. " topics = ("conan", "eabase", "config",) license = "BSD-3...
0
0
0
0
0
0
ArduinoSketch/configSelector.py
adamb314/ServoProject
127
3241650
#!/usr/bin/env python3 from __future__ import annotations import os import gi gi.require_version("Gtk", "3.0") from gi.repository import GLib, Gtk class ConfigSelectWindow(Gtk.Window): """docstring for ConfigSelectWindow""" def __init__(self): Gtk.Window.__init__(self, title="Config Selector", default_...
0
2
0
0
2
0
aiida/backends/djsite/db/migrations/0016_code_sub_class_of_data.py
azadoks/aiida-core
180
3241690
<gh_stars>100-1000 # -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
0
0
0
0
0
0
binding.gyp
dangerdak/propel
2,946
3241732
# Copyright 2018 Propel http://propel.site/. 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 applicab...
0
0
0
0
0
0
main/testtools/source/bridgetest/pyuno/core.py
Grosskopf/openoffice
679
3241752
#************************************************************** # # 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 y...
0
3
0
0
3
0
grab/spider/__init__.py
dimichxp/grab
2,266
3241757
from grab.spider.base import Spider # noqa from grab.spider.data import Data # noqa from grab.spider.task import Task # noqa from grab.spider.error import * # noqa pylint: disable=wildcard-import
0
0
0
0
0
0
src/c3nav/mapdata/utils/mpl.py
johnjohndoe/c3nav
132
3241793
<reponame>johnjohndoe/c3nav from abc import ABC, abstractmethod import numpy as np from matplotlib.path import Path from shapely.geometry import GeometryCollection, MultiPolygon, Polygon from c3nav.mapdata.utils.geometry import assert_multipolygon class MplPathProxy(ABC): @abstractmethod def intersects_path...
0
0
0
0
0
0
Face-Emotions-Recognition/Eye-Blink-Counter/EyeBlinkCount.py
swapnilgarg7/Face-X
175
3241799
<reponame>swapnilgarg7/Face-X import cv2 import numpy as np face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') # face cascade eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml') # eye cascade cap = cv2.VideoCapture(0) # capturing the video c=0 while True: ret,img = cap.read() ...
0
0
0
0
0
0
recipes/Python/305297_MS_SQL_Server_Database_Mover/recipe-305297.py
tdiprima/code
2,023
3241809
# dbmove.py - M.Keranen (<EMAIL>) [11/24/03] # ---------------------------------------------------------------------------------------- # Automate the process of moving databases from one SQL Server to another. # Assumes current login has administrator access to $ shares on source and target servers. # ----------------...
0
0
0
0
0
0
plugin/AssemblerSPAdes/bin/SPAdes-2.5.1-Linux/share/spades/rectangles/fastaparser.py
konradotto/TS
125
3241824
<reponame>konradotto/TS<gh_stars>100-1000 ############################################################################ # Copyright (c) 2011-2013 Saint-Petersburg Academic University # All Rights Reserved # See file LICENSE for details. ############################################################################ import...
0
0
0
0
0
0
tests/absa/test_loads.py
SurajDonthi/Aspect-Based-Sentiment-Analysis
351
3241831
import pytest from aspect_based_sentiment_analysis import ( load, load_examples, LabeledExample, Sentiment ) from aspect_based_sentiment_analysis.loads import NotFound def test_load(): nlp = load('absa/classifier-rest-0.2') text = ("We are great fans of Slack, but we wish the subscriptions " ...
0
0
0
0
0
0
allenact_plugins/__init__.py
klemenkotar/dcrl
187
3241886
<filename>allenact_plugins/__init__.py try: from allenact_plugins._version import __version__ except ModuleNotFoundError: __version__ = None
0
0
0
0
0
0
src/genie/libs/parser/nxos/tests/ShowFabricpathIsisAdjacency/cli/equal/golden_output1_expected.py
balmasea/genieparser
204
3241887
<reponame>balmasea/genieparser<gh_stars>100-1000 expected_output = { "domain": { "default": { "interfaces": { "Port-channel1": { "hold_time": "00:00:28", "level": 1, "snpa": "N/A", "state": "UP", ...
0
0
0
0
0
0
tests/runtime-trace-tests/cases/loop_continue_break.py
jaydeetay/pxt
977
3241892
<reponame>jaydeetay/pxt a = 1 for i in range(10): a += 1 continue print(a) b = 1 for j in range(10): b += 1 break print(b)
0
0
0
0
0
0
pymodbus/server/reactive/default_config.py
vmacari/pymodbus
1,125
3241944
<reponame>vmacari/pymodbus """ Copyright (c) 2020 by RiptideIO All rights reserved. """ DEFUALT_CONFIG = { "tcp": { "handler": "ModbusConnectedRequestHandler", "allow_reuse_address": True, "allow_reuse_port": True, "backlog": 20, "ignore_missing_slaves": False }, "serial": { "handler": "M...
0
0
0
0
0
0
tools/onnx2daq/python/onnx2daq/__main__.py
Anon-Artist/DNNLibrary
199
3241993
import argparse import onnx import onnxsim import onnx2daq def main(): parser = argparse.ArgumentParser() parser.add_argument('input_model', help='Input ONNX model') parser.add_argument('output_model', help='Output daq model') parser.add_argument('table_file', nargs='?', help='Table file for 8-bit qu...
0
0
0
0
0
0
DaPy/__init__.py
huihui7987/DaPy
552
3242000
# user/bin/python ######################################### # Author : <NAME> # Email : <EMAIL> # created : 2017-11-01 # Last modified : 2020-02-04 # Filename : DaPy.__init__.py # Description : initial file for DaPy #####################################...
0
0
0
0
0
0
pythran/tests/g webb/average_position.py
davidbrochart/pythran
1,647
3242018
<reponame>davidbrochart/pythran #pythran export average_position(str:(float,float) dict, str:(float,float) dict) #runas d = {"e":(1.,2.) } ; e = {"d":(2.,1.) } ; average_position(e,d) def average_position(pos1,pos2): pos_avg={} for k in pos1: if k in pos2: pos_avg[k]=((pos1[k][0]+pos2[k][0])/2,(pos1[k][1]+pos2[...
0
0
0
0
0
0
tensorflow_io/python/experimental/color_ops.py
lgeiger/io
558
3242030
<filename>tensorflow_io/python/experimental/color_ops.py # Copyright 2020 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.apach...
0
0
0
0
0
0
libcity/data/dataset/hgcn_dataset.py
moghadas76/test_bigcity
221
3242053
<filename>libcity/data/dataset/hgcn_dataset.py import os from libcity.data.dataset import TrafficStatePointDataset from sklearn.cluster import SpectralClustering import torch import numpy as np class HGCNDataset(TrafficStatePointDataset): def __init__(self, config): super().__init__(config) self....
0
0
0
0
0
0
leetcode.com/python/947_Most_Stones_Removed_with_Same_Row_or_Column.py
vansh-tiwari/coding-interview-gym
713
3242076
<reponame>vansh-tiwari/coding-interview-gym # Source: https://tinyurl.com/sxyzxkr # Approach 1: DFS class Solution(object): def removeStones(self, stones): """ :type stones: List[List[int]] :rtype: int """ if len(stones) < 2: return 0 disJointSetCount, vis...
0
0
0
0
0
0
src/genie/libs/parser/iosxe/tests/ShowPlatformSoftwareFedSwitchActiveIfmMappingsLpn/cli/equal/golden_output_expected.py
balmasea/genieparser
204
3242117
<gh_stars>100-1000 expected_output = { "interfaces":{ "AppGigabitEthernet1/0/1":{ "active":"Y", "asic":1, "if_id":"0x00000055", "lpn":77, "port":38 }, "AppGigabitEthernet1/0/2":{ "active":"Y", "asic":0, "if_id":"0x00000056", ...
0
0
0
0
0
0
pygithub3/services/issues/labels.py
minichate/python-github3
107
3242130
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import annotations from pygithub3.services.base import Service class Labels(Service): """ Consume `Labels API <http://developer.github.com/v3/issues/labels>`_ """ def list(self, user: object | None=None, repo: object | None=None) -> object:...
22
11
0
0
33
0
programl/util/py/init_app.py
drakesvoboda/ProGraML
169
3242142
<reponame>drakesvoboda/ProGraML import sys from pathlib import Path from absl import app, flags from programl import PROGRAML_VERSION flags.DEFINE_boolean( "version", False, "Print the version information and exit.", ) FLAGS = flags.FLAGS def init_app(argv, unrecognized_flags_okay: bool = False): "...
0
0
0
0
0
0
social/backends/docker.py
raccoongang/python-social-auth
1,987
3242143
from social_core.backends.docker import DockerOAuth2
0
0
0
0
0
0
scripts/jiri/find_unused.py
allansrc/fuchsia
210
3242162
#!/usr/bin/env python3.8 # Copyright 2021 The Fuchsia Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Attempts to find unused jiri projects. For each project in a given jiri manifest file, do the following: 1. Attempt to break incom...
0
2
0
0
2
0
alipay/aop/api/domain/AlipayDataAiserviceCloudbusScheduletaskshiftAddModel.py
antopen/alipay-sdk-python-all
213
3242173
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import annotations import json from alipay.aop.api.constant.ParamConstants import * class AlipayDataAiserviceCloudbusScheduletaskshiftAddModel(object): def __init__(self): self._app_version: None = None self._city_code: None = None ...
0
12
0
10
22
0
nucleoatac/NucleosomeCalling.py
RavelBio/NucleoATAC
101
3242182
<gh_stars>100-1000 """ Script with classes and functions for nucleosome calling. @author: <NAME>, Greenleaf Lab, Stanford University """ import numpy as np from scipy import optimize, signal from copy import copy from bisect import bisect_left import pyximport; pyximport.install(setup_args={"include_dirs":np.get_incl...
0
0
0
0
0
0
scripts/tests/test_embargo_registrations.py
gaybro8777/osf.io
628
3242234
<filename>scripts/tests/test_embargo_registrations.py # -*- coding: utf-8 -*- from datetime import timedelta from django.utils import timezone from nose.tools import * # noqa from tests.base import OsfTestCase from osf.models import NodeLog from osf_tests.factories import RegistrationFactory, UserFactory from scri...
0
0
0
0
0
0
umap/managers.py
EndevelCZ/umap
761
3242240
from django.db.models import Manager class PublicManager(Manager): def get_queryset(self) -> object: return super(PublicManager, self).get_queryset().filter( share_status=self.model.PUBLIC)
0
1
0
0
1
0
scale.app/scripts/gcc2org.py
f4rsh/SCALe
239
3242248
#!/usr/bin/env python # Script takes a GCC or G++ text output file and extracts its # diagnostic information # # The only argument indicates the file containing the input. # The data should be produced from a build process using make and # gcc/g++. A suitable command to generate the text data is: # # make 2>&! > make...
0
0
0
0
0
0
consolemenu/items/function_item.py
Tyler887/console-menu
230
3242255
from __future__ import annotations from consolemenu.items import ExternalItem class FunctionItem(ExternalItem): """ A menu item to call a Python function """ def __init__(self, text, function, args: object | None=None, kwargs: object | None=None, menu: object | None=None, should_exit: bool=False): ...
4
1
0
3
8
0
tensorflow/python/training/quantize_training.py
EricRemmerswaal/tensorflow
190,993
3242258
<filename>tensorflow/python/training/quantize_training.py<gh_stars>1000+ # Copyright 2015 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 # # ...
0
0
0
0
0
0
ros/src/airsim_tutorial_pkgs/scripts/multi_drone_json_creator.py
altay13/AirSim
6,115
3242259
<reponame>altay13/AirSim # import airsim import json import numpy as np import pdb # todo expose airsimsettings.hpp via pybind11? this should be done for the full API *some*day class Position(): def __init__(self, x, y, z): self.x = x self.y = y self.z = z class Rotation(): def __init_...
0
0
0
0
0
0
GPT2-HarryPotter-Training/transformers/data/processors/__init__.py
AbdullahAmer86/maskrCNN
3,255
3242280
from .utils import InputExample, InputFeatures, DataProcessor from .glue import glue_output_modes, glue_processors, glue_tasks_num_labels, glue_convert_examples_to_features from .squad import squad_convert_examples_to_features, SquadFeatures, SquadExample, SquadV1Processor, SquadV2Processor from .xnli import xnli_outpu...
0
0
0
0
0
0
project/app/models.py
johnebehr/fastapi-sqlmodel-alembic
134
3242298
<reponame>johnebehr/fastapi-sqlmodel-alembic from typing import Optional from sqlmodel import SQLModel, Field class SongBase(SQLModel): name: str artist: str year: Optional[int] = None class Song(SongBase, table=True): id: int = Field(default=None, primary_key=True) class SongCreate(SongBase): ...
0
0
0
0
0
0
util/response.py
bnbwebexpertise/linkr
124
3242300
<gh_stars>100-1000 import flask def success(data={}, status_code=200): """ Factory method for creating a successful Flask response. :param data: JSON data to package with the response. :param status_code: Optional HTTP status code. :return: A tuple of (response object, status code) with the input...
0
0
0
0
0
0
cryptol-remote-api/python/tests/cryptol/test_AES.py
GaloisInc/cryptol
773
3242326
<filename>cryptol-remote-api/python/tests/cryptol/test_AES.py import unittest from pathlib import Path import unittest import cryptol from cryptol.single_connection import * from cryptol.bitvector import BV class TestAES(unittest.TestCase): def test_AES(self): connect(verify=False) load_file(str(P...
0
0
0
0
0
0
lib/python/treadmill/api/model/__init__.py
vrautela/treadmill
133
3242362
<gh_stars>100-1000 """API data models"""
0
0
0
0
0
0
h2o-py/tests/testdir_misc/pyunit_time_comparisons.py
ahmedengu/h2o-3
6,098
3242418
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import datetime import h2o import pandas as pd import numpy as np from tests import pyunit_utils def test_date_comparisons(): dfpd = pd.DataFrame({"date": pd.date_range("1/1/2011", p...
0
0
0
0
0
0
tests/components/brother/test_diagnostics.py
MrDelik/core
30,023
3242427
<filename>tests/components/brother/test_diagnostics.py<gh_stars>1000+ """Test Brother diagnostics.""" from datetime import datetime import json from unittest.mock import Mock, patch from homeassistant.util.dt import UTC from tests.common import load_fixture from tests.components.brother import init_integration from t...
0
0
0
0
0
0
src/thenewboston/base_classes/fetch_primary_validator_config.py
achalpatel/thenewboston-python
122
3242442
<reponame>achalpatel/thenewboston-python from django.core.exceptions import ValidationError from django.core.management import CommandParser from thenewboston.argparser.validators import decimal_validator from thenewboston.base_classes.initialize_node import InitializeNode from thenewboston.constants.network import PR...
0
0
0
0
0
0
audiomate/corpus/validation/__init__.py
CostanzoPablo/audiomate
133
3242466
<gh_stars>100-1000 """ This module contains functions for validating a corpus on different properties. e.g. if the length of the utterance is to short for its corresponding transcription. :py:class:`audiomate.corpus.validation.Validator` is the base class for performing validations. It can be extended to implement val...
0
0
0
0
0
0
vnpy/gateway/uft/__init__.py
funrunskypalace/vnpy
323
3242476
<gh_stars>100-1000 from .uft_gateway import UftGateway
0
0
0
0
0
0
lib/view_ansi.py
goznalo-git/rate.sx
903
3242500
<reponame>goznalo-git/rate.sx # vim: encoding=utf-8 """ visualization of data for ANSI terminal """ import sys import os import locale from terminaltables import WindowsTable # Other useful tables: # GithubFlavoredMarkdownTable, SingleTable, DoubleTable, PorcelainTable from colorama import Fore, Style from termcolo...
0
0
0
0
0
0
program_synthesis/karel/scripts/list_jobs.py
kavigupta/program_synthesis
123
3242502
<reponame>kavigupta/program_synthesis import glob, re, os for logdir in glob.glob( 'logdirs/20180211/karel-lgrl-ref-edit-m12-sgd-cl1-lr0.1-lds100k-ldr0.5'): for ckpt in sorted(glob.glob(logdir + '/checkpoint-????????')): ckpt_number = int(ckpt[-8:]) cm100 = ckpt_number - 100 if (cm10...
0
0
0
0
0
0
deepgrow/ignite/train_3d.py
tommydino93/tutorials
535
3242516
import argparse import distutils.util import logging import sys import train def strtobool(val) -> object: return bool(distutils.util.strtobool(val)) if __name__ == "__main__": # Single GPU (it will also export) # python train_3d.py # # Multi GPU (run export separate) # python -m torch.dist...
0
1
0
0
1
0
cocoval_predjson_generation.py
RaphaelWag/YOLOS
486
3242571
<reponame>RaphaelWag/YOLOS # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import argparse import datetime import json import random import time from pathlib import Path import os import numpy as np import torch import torch.nn as nn from torch.utils.data import DataLoader, DistributedSampler im...
0
0
0
0
0
0
imagepy/menus/Image/Adjust/brightcons_plg.py
dada1437903138/imagepy
1,178
3242598
<reponame>dada1437903138/imagepy """ Created on Sun Nov 27 00:56:00 2016 @author: yxl """ import numpy as np from sciapp.action import Filter #from imagepy.ui.widgets import HistCanvas class Plugin(Filter): title = 'Bright And Constract' note = ['all', 'auto_msk', 'auto_snap', 'not_channel', 'preview']...
0
0
0
0
0
0
lore/stores/s3.py
timgates42/lore
1,549
3242599
<filename>lore/stores/s3.py import os import pickle import lore.io from lore.stores.base import Base from lore.util import timer # TODO class S3(Base): pass
0
0
0
0
0
0
snippets/ch04/transformers.py
kratunko/atap
360
3242603
#!/usr/bin/env python3 from __future__ import annotations import os import nltk import gensim import unicodedata from loader import CorpusLoader from nltk.corpus import wordnet as wn from nltk.stem.wordnet import WordNetLemmatizer from sklearn.base import BaseEstimator, TransformerMixin from gensim.matutils import sp...
4
5
0
2
11
0
pre/seq.py
simonwsw/deep_soli
103
3242607
<gh_stars>100-1000 import os, re import numpy as np import h5py from op import Operation class Seq: def __init__(self): pass # get files in label directories def get_h5(self, file_dir): return [os.path.join(file_dir, f) for f in os.listdir(file_dir) if os.path.isfi...
0
0
0
0
0
0
scripts/todo.py
slamer59/awesome-panel
179
3242617
<gh_stars>100-1000 def _to_plot(data): gridstyle = {"xgrid_line_color": None} curve_opts = opts.Curve( # pylint: disable=no-member line_width=4, responsive=True, color=get_color_cycle(), ) group_by = [] if len(data.ElementName.unique()) > 1: group_by.append(...
0
0
0
0
0
0
rj_gameplay/stp/testing.py
RoboJackets/robocup-software
200
3242672
from stp.rc import Robot, WorldState, GameInfo, Field, Ball, GamePeriod, GameState, GameRestart import numpy as np RobotId = int def generate_test_robot(robot_id: RobotId, is_ours: bool = True, pose: np.ndarray = np.array([0.0, 0.0, 0.0]), twist...
11
6
0
0
17
0
src/oci/data_integration/models/object_metadata.py
Manny27nyc/oci-python-sdk
249
3242689
<gh_stars>100-1000 # coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LIC...
0
0
0
0
0
0
fhir/resources/STU3/tests/test_coverage.py
cstoltze/fhir.resources
144
3242691
<gh_stars>100-1000 # -*- coding: utf-8 -*- """ Profile: http://hl7.org/fhir/StructureDefinition/Coverage Release: STU3 Version: 3.0.2 Revision: 11917 Last updated: 2019-10-24T11:53:00+11:00 """ from pydantic.validators import bytes_validator # noqa: F401 from .. import fhirtypes # noqa: F401 from .. import coverage ...
0
0
0
0
0
0
framework/boards/NRF51822DK.py
leeeastwood/Haiway
162
3242693
#!/bin/false # This file is part of Espruino, a JavaScript interpreter for Microcontrollers # # Copyright (C) 2013 <NAME> <<EMAIL>> # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.o...
0
1
0
0
1
0
m2-modified/ims/common/agentless-system-crawler/crawler/plugins/systems/dockerinspect_container_crawler.py
CCI-MOC/ABMI
108
3242694
<reponame>CCI-MOC/ABMI from utils.dockerutils import exec_dockerinspect from icrawl_plugin import IContainerCrawler import logging logger = logging.getLogger('crawlutils') class DockerinspectContainerCrawler(IContainerCrawler): def get_feature(self): return 'dockerinspect' def crawl(self, containe...
0
0
0
0
0
0
alipay/aop/api/domain/KoubeiSalesKbassetStuffOrdersresultSyncModel.py
snowxmas/alipay-sdk-python-all
213
3242724
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import annotations import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AccessOrdersFeedBack import AccessOrdersFeedBack class KoubeiSalesKbassetStuffOrdersresultSyncModel(object): def __init__(self): se...
0
3
0
1
4
0
services/metadata_service/api/utils.py
Netflix/metaflow-service
103
3242730
<reponame>Netflix/metaflow-service import json from functools import wraps import pkg_resources import collections from aiohttp import web from multidict import MultiDict from services.utils import get_traceback_str version = pkg_resources.require("metadata_service")[0].version METADATA_SERVICE_VERSION = version MET...
0
0
0
0
0
0
stock_prediction_numpy.py
ngeorgieff/stock-prediction-deep-neural-learning
145
3242793
# Copyright 2020 <NAME>. 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 agree...
0
7
0
0
7
0