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
electrumsv/devices/keepkey/keepkey.py
electrumsv/electrumsv
136
182554
# ElectrumSV - lightweight Bitcoin client # Copyright (C) 2015 <NAME> # Copyright (C) 2019-2020 The ElectrumSV Developers # # 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...
51
28
11
1
91
0
installation/migrations/dbschema.fixup-extensionroles.py
fekblom/critic
216
182560
<gh_stars>100-1000 # -*- mode: python; encoding: utf-8 -*- # # Copyright 2014 <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/...
0
0
0
0
0
0
pico/micropython/mini-oled-i2c-ssd1306-draw/main.py
leon-anavi/rpi-examples
126
182565
from machine import Pin, I2C import ssd1306 # using default address 0x3C sda=machine.Pin(4) scl=machine.Pin(5) i2c = I2C(0,sda=sda, scl=scl, freq=400000) display = ssd1306.SSD1306_I2C(128, 64, i2c) display.rect(0, 0, 128, 16, 1) display.fill_rect(0, 0, 100, 16, 1) for row in range(1, 4): for n in range(4): ...
0
0
0
0
0
0
tests/spot/sub_account/test_sub_account_transfer_sub_account_history.py
Banging12/binance-connector-python
512
182575
<filename>tests/spot/sub_account/test_sub_account_transfer_sub_account_history.py import responses from urllib.parse import urlencode from tests.util import random_str from tests.util import mock_http_response from binance.spot import Spot as Client mock_item = {"key_1": "value_1", "key_2": "value_2"} key = random_s...
0
0
0
0
0
0
data_loader.py
JohnGiorgi/PyTorch-Image-Retrieval
262
182599
<reponame>JohnGiorgi/PyTorch-Image-Retrieval # -*- coding: utf_8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from torch.utils.data import Dataset from torchvision import transforms, datasets from PIL import Image def train_data_loader(dat...
0
0
0
0
0
0
tests/test_human_digitalizer/test_deformers.py
JSssssss/iPERCore
2,223
182603
# Copyright (c) 2020-2021 impersonator.org authors (<NAME> and <NAME>). All rights reserved. import unittest import numpy as np import torch from tqdm import tqdm from iPERCore.tools.human_digitalizer import deformers from iPERCore.tools.human_digitalizer import renders from iPERCore.tools.human_digitalizer.bodynets...
0
0
0
0
0
0
third_party/chromite/lib/logdog_unittest.py
zipated/src
2,151
182604
# -*- coding: utf-8 -*- # Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for logdog.""" from __future__ import print_function import mock import os import time from chromite.lib import a...
0
0
0
0
0
0
tests/test_klee.py
acpaquette/deepstate
684
182614
from __future__ import print_function import deepstate_base import logrun class KleeTest(deepstate_base.DeepStateTestCase): def run_deepstate(self, deepstate): (r, output) = logrun.logrun([deepstate, "build/examples/Klee", "--klee"], "deepstate.out", 1800) self.assertEqual(r, 0) self....
0
0
0
0
0
0
cunumeric/_ufunc/floating.py
fduguet-nv/cunumeric
304
182625
<filename>cunumeric/_ufunc/floating.py<gh_stars>100-1000 # Copyright 2022 NVIDIA 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...
0
0
0
0
0
0
Tools/resourceCompiler/mayaExporter/workers/meshExporter.py
giordi91/SirEngineThe3rd
114
182686
#from maya import cmds import os from maya import cmds import json from maya.api import OpenMaya def get_dag_node( xform ): selectionList = OpenMaya.MSelectionList() try: selectionList.add( xform ) except: return None dagPath = OpenMaya.MDagPath() dagPath = selectionList.getDagPat...
0
0
0
0
0
0
pyxb/bundles/opengis/citygml/relief.py
eLBati/pyxb
123
182699
<gh_stars>100-1000 from pyxb.bundles.opengis.citygml.raw.relief import *
0
0
0
0
0
0
underworld/systems/sle/_eqnum.py
longgangfan/underworld2
116
182700
<filename>underworld/systems/sle/_eqnum.py ##~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~## ## ## ## This file forms part of the Underworld geophysics modelling application. ## ## ...
0
0
0
0
0
0
optuna/visualization/matplotlib/_pareto_front.py
masap/optuna
1,300
182768
from typing import Callable from typing import List from typing import Optional from typing import Sequence from optuna._experimental import experimental from optuna.study import Study from optuna.trial import FrozenTrial from optuna.visualization._pareto_front import _get_pareto_front_info from optuna.visualization._...
8
3
2
0
13
0
test/test_ecc.py
jvdsn/crypto-attacks
139
182780
<gh_stars>100-1000 import os import sys from random import getrandbits from random import randint from unittest import TestCase from sage.all import EllipticCurve from sage.all import GF path = os.path.dirname(os.path.dirname(os.path.realpath(os.path.abspath(__file__)))) if sys.path[1] != path: sys.path.insert(1,...
0
0
0
0
0
0
flextensor/examples/opt_conv_cpu.py
imxian/FlexTensor
135
182814
import time import os import timeit import torch import argparse from flextensor.examples import FUNC_TABLE from flextensor.test import test_graph_schedule_cpu_general_dx from flextensor.train import Entity, train_op_schedule_cpu_general_dx def run(batch_size, height, width, channel, kernel_size, output_channel, stri...
5
0
0
0
5
0
ch23-图像变换/23.1.4 为什么拉普拉斯算子是高通滤波器.py
makelove/OpenCV-Python-Tutorial
2,875
182823
<reponame>makelove/OpenCV-Python-Tutorial<filename>ch23-图像变换/23.1.4 为什么拉普拉斯算子是高通滤波器.py # -*- coding: utf-8 -*- # @Time : 2017/7/13 上午11:18 # @Author : play4fun # @File : 23.1.4 为什么拉普拉斯算子是高通滤波器.py # @Software: PyCharm """ 23.1.4 为什么拉普拉斯算子是高通滤波器.py: 从图像中我们就可以看出每一个算子允 些信号。从 些信息中我 们就可以知 些是 HPF 是 LPF """ impor...
0
0
0
0
0
0
services/migration_service/api/__init__.py
runsascoded/metaflow-service
103
182851
import os import shlex version_dict = { '0': 'v_1_0_1', '1': 'v_1_0_1', '20200603104139': '20200603104139', '20201002000616': '20201002000616', '20210202145952': '20210202145952', '20210260056859': 'latest' } latest = "latest" def make_goose_template(conn_str, command) -> object: return ...
0
2
0
0
2
0
test/run_tests.py
Lilith5th/Radiance
154
182859
#!/usr/bin/env python from __future__ import division, print_function, unicode_literals ''' run_tests.py - Run Radiance test suite 2013 - 2018 <NAME> Invocation: As script, call with -H for instructions. As module, see docstrings in class RadianceTests for instructions. ''' from __future__ import division, print_...
0
0
0
0
0
0
tartiflette/language/validators/query/argument_uniqueness.py
remorses/tartiflette-whl
530
182876
from tartiflette.language.validators.query.rule import ( June2018ReleaseValidationRule, ) from tartiflette.language.validators.query.utils import find_nodes_by_name from tartiflette.utils.errors import graphql_error_from_nodes class ArgumentUniqueness(June2018ReleaseValidationRule): """ This validator val...
0
1
3
0
4
0
examples/turbogears/depotexample/controllers/__init__.py
tcmike/depot
128
182882
<filename>examples/turbogears/depotexample/controllers/__init__.py # -*- coding: utf-8 -*- """Controllers for the depotexample application."""
0
0
0
0
0
0
tests/pyutils/test_natural_compare.py
closeio/graphql-core
590
182897
<filename>tests/pyutils/test_natural_compare.py from graphql.pyutils import natural_comparison_key key = natural_comparison_key def describe_natural_compare(): def handles_empty_strings(): assert key("") < key("a") assert key("") < key("1") def handles_strings_of_different_length(): ...
0
0
0
0
0
0
dataviz/politics_g7.py
Udzu/pudzu
119
182911
from pudzu.charts import * from pudzu.dates import * import dateparser # ------------- # G7 time chart # ------------- START = dateparser.parse('1 January 1960').date() END = datetime.date.today() def duration(d) -> object: return dateparser.parse(get_non(d, 'end', END.isoformat())).date() - max(STAR...
0
4
0
0
4
0
windows/winproxy/apis/shlwapi.py
IMULMUL/PythonForWindows
479
182921
import ctypes import windows import windows.generated_def as gdef from ..apiproxy import ApiProxy, NeededParameter, is_implemented from ..error import fail_on_zero class ShlwapiProxy(ApiProxy): APIDLL: str = "Shlwapi" default_error_check = staticmethod(fail_on_zero) @ShlwapiProxy() def StrStrIW(pszFirst, psz...
0
3
1
0
4
0
Beginner/Random Pair (RNDPAIR)/randompair.py
anishsingh42/CodeChef
127
182935
t = int(input()) while t: N = int(input()) A = list(map(int, input().split())) l = [] for i in range(N): for j in range(i+1, N): l.append(A[i]+A[j]) c = l.count(max(l)) print(c/len(l)) t = t-1
0
0
0
0
0
0
GPT2.py
wenhuchen/LogicNLG
141
183004
<gh_stars>100-1000 import argparse import logging from tqdm import trange import torch import torch.nn.functional as F import numpy as np from torch import nn from torch.autograd import Variable from transformers import GPT2Config from transformers import GPT2LMHeadModel, GPT2Tokenizer, BertTokenizer from DataLoader im...
0
0
0
0
0
0
maestro/container.py
kstaken/maestro
113
183005
from __future__ import annotations import os, sys from exceptions import ContainerError import utils, StringIO, logging import py_backend class Container: def __init__(self, name, state, config, mounts: object | None=None): self.log = logging.getLogger('maestro') self.state = state self.config =...
4
2
0
0
6
0
src/hammer-vlsi/hammer_vlsi/hooks.py
XiaoSanchez/hammer
138
183010
<gh_stars>100-1000 #!/usr/bin/env python3 # -*- coding: utf-8 -*- # # hooks.py # Classes and functions related to Hammer hooks. # # See LICENSE for licence details. from enum import Enum from typing import Callable, NamedTuple, Optional, TYPE_CHECKING __all__ = ['HammerStepFunction', 'HammerToolStep', 'HookLocatio...
0
0
0
0
0
0
blockchainetl/streaming/postgres_utils.py
zalam003/ethereum-etl
1,482
183068
<filename>blockchainetl/streaming/postgres_utils.py from sqlalchemy.dialects.postgresql import insert def create_insert_statement_for_table(table): insert_stmt = insert(table) primary_key_fields = [column.name for column in table.columns if column.primary_key] if primary_key_fields: insert_stmt =...
0
0
0
0
0
0
pygsp/filters/regular.py
jafluri/pygsp
341
183086
<filename>pygsp/filters/regular.py # -*- coding: utf-8 -*- from __future__ import division import numpy as np from . import Filter # prevent circular import in Python < 3.5 class Regular(Filter): r"""Design 2 filters with the regular construction (tight frame). This function creates a Parseval filter ban...
0
0
0
0
0
0
homeassistant/components/senz/const.py
jlmaners/core
30,023
183094
<reponame>jlmaners/core<gh_stars>1000+ """Constants for the nVent RAYCHEM SENZ integration.""" DOMAIN = "senz"
0
0
0
0
0
0
gtsfm/feature_extractor.py
swershrimpy/gtsfm
122
183117
<gh_stars>100-1000 """Extracts features and their descriptors from a single image. Authors: <NAME>, <NAME> """ from typing import Tuple from dask.delayed import Delayed from gtsfm.frontend.detector_descriptor.detector_descriptor_base import DetectorDescriptorBase class FeatureExtractor: """Wrapper for running ...
0
0
0
0
0
0
usaspending_api/disaster/v2/views/def_code/count.py
g4brielvs/usaspending-api
217
183131
from django.db.models import OuterRef, Q, Exists from rest_framework.request import Request from rest_framework.response import Response from usaspending_api.common.cache_decorator import cache_response from usaspending_api.disaster.v2.views.disaster_base import DisasterBase from usaspending_api.financial_activities.m...
1
1
1
0
3
0
builder/pylib/clean_cmd.py
alexa/aac-sdk
139
183149
<reponame>alexa/aac-sdk import subprocess from pylib.common import BaseHandler class BuilderHandler(BaseHandler): def run( self ): clean_packages = self.builder_configuration.find_packages( self.get_arg("pattern") ) self.log_info( "Cleaning cached builder data..." ) for next in clean_packa...
0
0
0
0
0
0
src/protocols/BLE/ble_replay_attack.py
QWERTSKIHACK/peniot
143
183193
import os from protocols.BLE.ble_device import BLEDevice class BLEReplayAttackHelper: """ This is the helper class which is used to perform BLE Replay attack. """ def __init__(self, file_path): self.file_path = file_path self.write_requests = {} self.run() def run(self): ...
0
0
0
0
0
0
tests/integration/test_integration.py
windies21/loopchain
105
183196
<reponame>windies21/loopchain import random import time import pytest from iconsdk.builder.transaction_builder import MessageTransactionBuilder from iconsdk.icon_service import IconService from iconsdk.providers.http_provider import HTTPProvider from iconsdk.signed_transaction import SignedTransaction from iconsdk.wal...
0
0
0
0
0
0
00_Miscellaneous/text-similarity-analysis/etl/modules/pipeline.py
bmjhit/tf-estimator-tutorials
685
183211
<reponame>bmjhit/tf-estimator-tutorials #!/usr/bin/python # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # ...
0
0
0
0
0
0
scripts/artifacts/deviceActivator.py
xperylabhub/iLEAPP
325
183221
import re import base64 import os from itertools import compress import xml.etree.ElementTree as ET from scripts.artifact_report import ArtifactHtmlReport from scripts.ilapfuncs import logfunc, tsv, logdevinfo, is_platform_windows def get_deviceActivator(files_found, report_folder, seeker): data_list = [] al...
0
0
0
0
0
0
tests/ti_deps/deps/test_not_previously_skipped_dep.py
npodewitz/airflow
8,092
183228
<reponame>npodewitz/airflow # # 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 (t...
0
0
0
0
0
0
setup.py
wilsonify/sampyl
308
183233
#!/usr/bin/env python import setuptools with open("README.md", "r") as fh: long_description = fh.read() classifiers = ['Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 2...
0
0
0
0
0
0
descarteslabs/common/proto/visualization/visualization_pb2.py
descarteslabs/descarteslabs-python
167
183243
<gh_stars>100-1000 # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: descarteslabs/common/proto/visualization/visualization.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from go...
0
0
0
0
0
0
cmds/target.py
r0ck3rt/metarget
295
183254
""" Target Commands """ def retrieve(args): pass def create(args): pass def start(args): pass def stop(args): pass def delete(args): pass
0
0
0
0
0
0
calvin/runtime/south/calvinlib/mathlib/Arithmetic.py
gabrielcercel/calvin-base
334
183262
<reponame>gabrielcercel/calvin-base # -*- coding: utf-8 -*- # Copyright (c) 2017 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
0
0
0
0
0
tests/files/named_numbers.py
cromulencellc/asn1tools
198
183280
<filename>tests/files/named_numbers.py<gh_stars>100-1000 EXPECTED = {'Foo': {'extensibility-implied': False, 'imports': {}, 'object-classes': {}, 'object-sets': {}, 'tags': 'AUTOMATIC', 'types': {'A': {'restricted-to': [('min', 'max')], 'type': 'Cons...
0
0
0
0
0
0
flit_core/flit_core/tests/test_versionno.py
ksunden/flit
1,642
183301
<reponame>ksunden/flit<filename>flit_core/flit_core/tests/test_versionno.py import pytest from flit_core.common import InvalidVersion from flit_core.versionno import normalise_version def test_normalise_version(): nv = normalise_version assert nv('4.3.1') == '4.3.1' assert nv('1.0b2') == '1.0b2' asser...
0
0
0
0
0
0
atp-auto-core-open/atp/views/ui_pageobject.py
rebecca1202/testAuto
130
183304
from flask import Blueprint from flask_restful import Resource from atp.utils.common import get_request_json, make_response, username_to_nickname from atp.views.wrappers import developer_check from atp.api.mysql_manager import UICasePageInfoManager, UICasePageObjectInfoManage pageobject = Blueprint('pageobject_inter...
0
4
0
0
4
0
EventBlank/Vendor/CocoaMarkdown/External/CommonMark/tools/makespec.py
studiostec/c7
318
183314
<gh_stars>100-1000 #!/usr/bin/env python3 import re import sys from subprocess import * from string import Template if len(sys.argv) == 2: specformat = sys.argv[1] if not (specformat in ["html", "markdown"]): sys.stderr.write("Format must be html or markdown\n") exit(1) else: sys.stderr.wri...
0
0
0
0
0
0
model-optimizer/mo/front/common/extractors/utils.py
monroid/openvino
2,406
183327
<filename>model-optimizer/mo/front/common/extractors/utils.py # Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np def layout_attrs(): return { 'spatial_dims': np.array([2, 3], dtype=np.int64), 'channel_dims': np.array([1], dtype=np.int64), ...
0
0
0
0
0
0
src/compas/datastructures/graph/__init__.py
funkchaser/compas
235
183329
from .graph import Graph # noqa: F401
0
0
0
0
0
0
tempest/tests/lib/services/network/test_qos_client.py
rishabh20111990/tempest
254
183337
<reponame>rishabh20111990/tempest # Copyright (c) 2019 Ericsson # # 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
tensorflow_graphics/projects/points_to_3Dobjects/transforms/preprocessor.py
Liang813/graphics
2,759
183372
# Copyright 2020 The TensorFlow 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
2
2
0
0
4
0
crabageprediction/venv/Lib/site-packages/pandas/tests/indexes/base_class/test_pickle.py
13rianlucero/CrabAgePrediction
28,899
183387
<filename>crabageprediction/venv/Lib/site-packages/pandas/tests/indexes/base_class/test_pickle.py from pandas import Index import pandas._testing as tm def test_pickle_preserves_object_dtype(): # GH#43188, GH#43155 don't infer numeric dtype index = Index([1, 2, 3], dtype=object) result = tm.round_trip_pi...
0
0
0
0
0
0
python/wtte/plots/misc.py
sandeepnair2812/Weibull-Time-To-Event-Recurrent-Neural-Network
727
183412
from __future__ import annotations from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import matplotlib.pyplot as plt from six.moves import xrange from wtte import transforms as tr def timeline_plot(padded, title: str='', cmap: str="jet", ...
8
2
0
0
10
0
pybingwallpaper/webutil.py
jing5460/pybingwallpaper
571
183416
<reponame>jing5460/pybingwallpaper #!/usr/bin/env python import gzip import ssl from io import BytesIO from . import log from .ntlmauth import HTTPNtlmAuthHandler from .py23 import get_moved_attr, import_moved _logger = log.getChild('webutil') Request = get_moved_attr('urllib2', 'urllib.request', 'Request') urlopen ...
0
0
0
0
0
0
docs/guide/functional.py
yacth/autogoal
157
183425
<filename>docs/guide/functional.py<gh_stars>100-1000 # # Functional API # AutoGOAL's functional API allows you to transform any Python callable (e.g., a method) # into an optimizable target. In contrast with the [class-based](/guide/cfg/) and [graph-based](/guide/graph/) APIs, # the functional API does not require to ...
0
0
0
0
0
0
djangoerp/menus/tests/test_signals.py
xarala221/django-erp
345
183430
<gh_stars>100-1000 #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals """This file is part of the django ERP project. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PART...
0
0
0
0
0
0
examples/face_detection/main.py
Ishticode/kornia
418
183480
"""Script that finds faces and blurs using FaceDetection and blurring APIs.""" import argparse import cv2 import numpy as np import torch import kornia as K from kornia.contrib import FaceDetector, FaceDetectorResult, FaceKeypoint def draw_keypoint(img: np.ndarray, det: FaceDetectorResult, kpt_type: FaceKeypoint) -...
8
2
0
0
10
0
torch_glow/tests/nodes/trig_ops_test.py
YaronBenAtar/glow
2,838
183481
# Copyright (c) Glow Contributors. See CONTRIBUTORS file. # # 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 ...
5
5
0
0
10
0
cannab/merge_oof.py
ktncktnc/SpaceNet_Off_Nadir_Solutions
164
183485
# -*- coding: utf-8 -*- import os os.environ["MKL_NUM_THREADS"] = "1" os.environ["NUMEXPR_NUM_THREADS"] = "1" os.environ["OMP_NUM_THREADS"] = "1" from os import path, makedirs import numpy as np np.random.seed(1) import random random.seed(1) import timeit import cv2 import pandas as pd from multiproce...
0
0
0
0
0
0
Modules/nonExecAnalyzer.py
A1S0N/Qu1cksc0pe
255
183510
#!/usr/bin/python3 import os import sys # Checking for puremagic try: import puremagic as pr except: print("Error: >puremagic< module not found.") sys.exit(1) # Checking for colorama try: from colorama import Fore, Style except: print("Error: >colorama< not found.") sys.exit(1) # Checking fo...
0
0
0
0
0
0
magma/uniquification.py
leonardt/magma
167
183523
from dataclasses import dataclass from enum import Enum, auto from magma.is_definition import isdefinition from magma.logging import root_logger from magma.passes import DefinitionPass _logger = root_logger() class MultipleDefinitionException(Exception): pass class UniquificationMode(Enum): WARN = auto()...
0
4
4
2
10
0
ca-majority.py
RachidStat/PyCX
176
183538
<filename>ca-majority.py import pycxsimulator from pylab import * width = 50 height = 50 numberOfStates = 2 r = 1 def initialize(): global time, config, nextConfig time = 0 config = zeros([height, width]) for x in range(width): for y in range(height): config[y...
0
0
0
0
0
0
PyFunceble/__init__.py
Centaurioun/PyFunceble
213
183545
# pylint: disable=invalid-name """ The tool to check the availability or syntax of domain, IP or URL. :: ██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗ ██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝ ██████╔╝ ╚████╔╝ █████╗ ██║ ...
17
17
0
0
34
0
perma_web/perma/migrations/0037_auto_20181004_1709.py
rachelaus/perma
317
183554
<gh_stars>100-1000 # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-10-04 17:09 from __future__ import unicode_literals from django.db import migrations, models def change_private_reason(apps, schema_editor): # Links labeled 'Private by policy' created prior to this deployment # were made privat...
0
0
0
0
0
0
integration/combination/test_intrinsic_function_support.py
hawflau/serverless-application-model
1,279
183562
from parameterized import parameterized from integration.helpers.base_test import BaseTest class TestIntrinsicFunctionsSupport(BaseTest): # test code definition uri object and serverless function properties support @parameterized.expand( [ "combination/intrinsics_code_definition_uri", ...
0
0
0
0
0
0
mythril/rpc/exceptions.py
mbeacom/mythril
166
183576
<gh_stars>100-1000 class EthJsonRpcError(Exception): pass class ConnectionError(EthJsonRpcError): pass class BadStatusCodeError(EthJsonRpcError): pass class BadJsonError(EthJsonRpcError): pass class BadResponseError(EthJsonRpcError): pass
0
0
0
0
0
0
stats/adjustscore.py
spiffcode/hostile-takeover
113
183580
from __future__ import annotations import os import config import basehandler import models import accounts import urllib import admin from google.appengine.api import users from google.appengine.ext import webapp from google.appengine.ext.webapp import template from google.appengine.ext import db class AdjustScore(b...
0
2
0
0
2
0
jupyter_py/backtest_pair.py
vdaytona/statistical-arbitrage-18-19
163
183602
<gh_stars>100-1000 import tensorflow as tf import backtrader as bt import backtrader.feeds as btfeeds import pandas as pd import warnings import glob import os import sys import uuid import itertools import json import argparse import pathlib import logging from grid_search_tools import GSTools from ptstrategy_cointeg...
0
0
0
0
0
0
openfda/drugsfda/pipeline.py
FDA/openfda
388
183669
#!/usr/local/bin/python ''' Pipeline for converting Drugs@FDA files to JSON and importing into Elasticsearch. ''' import glob import os import re from os.path import join import logging import arrow import luigi from openfda import common, config, parallel, index_util from openfda.annotation_table.pipeline import Com...
0
44
13
0
57
0
tests/test_knowbert.py
XuhuiZhou/kb
295
183672
<reponame>XuhuiZhou/kb<filename>tests/test_knowbert.py import unittest import torch from allennlp.common import Params from allennlp.data import Vocabulary, DatasetReader from allennlp.data.iterators import BasicIterator from allennlp.models import Model from kb.include_all import ModelArchiveFromParams from kb.k...
0
0
0
0
0
0
lisrd/datasets/utils/data_reader.py
liuyuzhenn/LISRD
225
183688
import csv import numpy as np import cv2 def resize_and_crop(image, img_size) -> object: """ Resize an image to the given img_size by first rescaling it and then applying a central crop to fit the given dimension. """ source_size = np.array(image.shape[:2], dtype=float) target_size = np.array(img_...
0
3
0
0
3
0
VMD 3D Pose Baseline Multi-Objects/applications/VmdWriter.py
kyapp69/OpenMMD
717
183698
# -*- coding: utf-8 -*- import struct from PyQt5.QtGui import QQuaternion, QVector3D class VmdBoneFrame(): def __init__(self, frame: int=0): self.name: str = '' self.frame = frame self.position = QVector3D(0, 0, 0) self.rotation = QQuaternion() def write(self, fout): f...
3
0
0
4
7
0
accounts/views.py
zx273983653/vulscan
582
183716
#coding=utf-8 from django.shortcuts import render # Create your views here. from django.contrib import auth #authenticate,login,logout #from django.contrib.auth import authenticate from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect #@login_required # 验证单一一个模块是否登录用...
0
2
0
0
2
0
src/hg/utils/otto/clinGen/processClinGenCnv.py
andypohl/kent
171
183760
#!/usr/bin/env python3 from __future__ import annotations """ Read GVF lines from stdin and write bed9+ lines to stdout """ import os,sys,re import argparse bed9Fields = ["chrom", "chromStart", "chromEnd", "name", "score", "strand", "thickStart", "thickEnd", "itemRgb"] # the following list of fields may not exi...
0
6
0
0
6
0
Python3/105.py
rakhi2001/ecom7
854
183782
__________________________________________________________________________________________________ sample 48 ms submission # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None import collections class Solution...
0
0
0
0
0
0
Python/150.EvaluateReversePolishNotation.py
shreyventure/LeetCode-Solutions
388
183804
#Time Complexity: O(n) #Space Complexity: O(1) #Speed: 84.65% #Memory: 84.34% class Solution: def evalRPN(self, tokens: List[str]) -> int: stack = [] for token in tokens: if token.isdigit() or token[1:].isdigit(): stack.append(int(token)) else: ...
1
1
0
0
2
0
vilya/views/api/v1/projects/files.py
mubashshirjamal/code
1,582
183824
<gh_stars>1000+ # -*- coding: utf-8 -*- from __future__ import absolute_import from vilya.views.api.utils import RestAPIUI class FilesUI(RestAPIUI): _q_exports = [] _q_methods = ['get'] def __init__(self, project): self.project = project def get(self, request): path = request.get_fo...
0
0
0
0
0
0
539 Minimum Time Difference.py
krishna13052001/LeetCode
872
183826
<filename>539 Minimum Time Difference.py #!/usr/bin/python3 """ Given a list of 24-hour clock time points in "Hour:Minutes" format, find the minimum minutes difference between any two time points in the list. Example 1: Input: ["23:59","00:00"] Output: 1 Note: The number of time points in the given list is at least 2 a...
0
0
0
0
0
0
epitran/test/test_spanish.py
dwijap/epitran
422
183841
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import unittest import epitran def assemble_ipa(xs) -> object: return ''.join([x[3] for x in xs]) class TestSpanish(unittest.TestCase): def setUp(self): self.epi = epitran.Epitran(u'spa-Latn') def _derivation(self...
0
1
0
0
1
0
math/flatten/python/flatten.py
bakuryuthem0/al-go-rithms
1,253
183891
def flatten(myList) -> object: newList = [] for item in myList: if type(item) == list: newList.extend(flatten(item)) else: newList.append(item) return newList def main(): myList1 = [1,2,3,[1,2],5,[3,4,5,6,7]] print(flatten(myList1)) myList2 = [1,[2,[3,[4,...
0
1
0
0
1
0
conx/datasets/_mnist.py
Calysto/conx
105
183928
import conx as cx import numpy as np from keras.datasets import mnist from keras.utils import (to_categorical, get_file) description = """ Original source: http://yann.lecun.com/exdb/mnist/ The MNIST dataset contains 70,000 images of handwritten digits (zero to nine) that have been size-normalized and centered in a s...
0
2
0
0
2
0
blacksheep/server/templating.py
skivis/BlackSheep
482
183938
<reponame>skivis/BlackSheep<gh_stars>100-1000 from dataclasses import asdict, is_dataclass from functools import lru_cache from typing import Any from jinja2 import Environment, PackageLoader, Template, select_autoescape from rodi import Container from blacksheep import Content, Response @lru_cache(1200) def templa...
0
0
0
0
0
0
scripts/registration/testRegistration.py
hz-ants/LabelFusion-docker2-
313
183939
<gh_stars>100-1000 """ Usage: drake-visualizer --script testRegistration.py """ from labelfusion.registration import GlobalRegistration globalRegistration = GlobalRegistration(view, measurementPanel) gr = globalRegistration # globalRegistration.testSuperPCS4()
0
0
0
0
0
0
nnvm/tests/python/unittest/test_symbol.py
mingwayzhang/tvm
286
183940
# 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 u...
0
0
0
0
0
0
22爬虫提高/day02/basic01.py
HaoZhang95/PythonAndMachineLearning
937
183942
import hashlib import json import random import re import time import requests headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36", "Referer": "http://fanyi.youdao.com/" } def test01() -> object: """36kr.com的内容是存放...
0
5
0
3
8
0
Python/if-else.py
bunny8469/Hello-World
133
183963
<gh_stars>100-1000 t=int(input()) if t>=1: print("bigger than 1") else: print("smaller than 1")
0
0
0
0
0
0
test/EntityExpanderTest.py
forslund/adapt
796
183969
<filename>test/EntityExpanderTest.py<gh_stars>100-1000 # Copyright 2018 Mycroft AI 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 # # U...
0
0
0
0
0
0
transformer-openai/datasets.py
fredriko/tweet-stance-prediction
109
183970
<reponame>fredriko/tweet-stance-prediction<gh_stars>100-1000 import os import csv import numpy as np import pandas as pd from pathlib import Path from tqdm import tqdm from sklearn.utils import shuffle from sklearn.model_selection import train_test_split seed = 3535999445 def _rocstories(path): with open(path, ...
0
0
0
0
0
0
tests/test_glove.py
muxgt/pycadl
398
184112
<reponame>muxgt/pycadl<gh_stars>100-1000 from cadl import glove from cadl.utils import exists from numpy.testing import run_module_suite def test_glove_exists(): assert(exists('http://nlp.stanford.edu/data/wordvecs/glove.6B.zip')) def test_glove_model(): model = glove.get_model() assert(model[0].shape ==...
0
0
0
0
0
0
apps/support/migrations/0003_qq.py
parekhpriyanshu/website
312
184147
# Generated by Django 2.0.8 on 2019-04-15 16:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ('support', '0002_banners_url'), ] operations: list[object] = [ migrations.CreateModel( name='QQ', ...
0
0
2
0
2
0
fun_network.py
YechengLyu/Learning-to-Segment-3D-Point-Clouds-in-2D-Image-Space
155
184168
<filename>fun_network.py import h5py import numpy as np import tensorflow as tf print(tf.version.VERSION) config = tf.compat.v1.ConfigProto() config.gpu_options.allow_growth = True config.gpu_options.per_process_gpu_memory_fraction = 0.7 sess= tf.compat.v1.Session(config=config) import tensorflow.keras as keras imp...
0
0
0
0
0
0
EventFilter/GEMRawToDigi/test/AMC13SpyReadout.py
Purva-Chaudhari/cmssw
852
184189
<reponame>Purva-Chaudhari/cmssw<gh_stars>100-1000 import FWCore.ParameterSet.Config as cms import FWCore.ParameterSet.VarParsing as VarParsing options = VarParsing.VarParsing ('analysis') options.parseArguments() process = cms.Process("AMC13SpyReadout") process.options = cms.untracked.PSet( wantSummary = cms.unt...
0
0
0
0
0
0
nzbhydra/__init__.py
Sparklingx/nzbhydra
674
184194
<reponame>Sparklingx/nzbhydra from os.path import dirname, abspath import thread configFile = None databaseFile = None databaseLock = thread.allocate_lock() urlBase = None def getBasePath(): try: basepath = dirname(dirname(abspath(__file__))) except NameError: # We are the main py2exe script, not a ...
0
0
0
0
0
0
examples/addons/contentview-custom-grpc.py
KarlParkinson/mitmproxy
24,939
184199
<reponame>KarlParkinson/mitmproxy<gh_stars>1000+ """ Add a custom version of the gRPC/protobuf content view, which parses protobuf messages based on a user defined rule set. """ from mitmproxy import contentviews from mitmproxy.contentviews.grpc import ViewGrpcProtobuf, ViewConfig, ProtoParser config: ViewConfig = Vi...
0
0
0
0
0
0
demo_app/demo/settings/__init__.py
A-tiantian/xadmin_bugfix
120
184271
from .base import * DEBUG = True if DEBUG is True: from .dev import * else: from .production import * # 站点名称 SITE_NAME = 'manage' # 后台首页 SITE_PAGE = '/%s/service/article/' % SITE_NAME
0
0
0
0
0
0
amadeus/namespaces/_location.py
minjikarin/amadeus-python
125
184275
<reponame>minjikarin/amadeus-python from amadeus.client.decorator import Decorator from amadeus.location._analytics import Analytics class Location(Decorator, object): def __init__(self, client): Decorator.__init__(self, client) self.analytics = Analytics(client)
0
0
0
0
0
0
Tools/python37/Lib/site-packages/keystone/systemz_const.py
xxroot/android_universal
207
184314
# For Keystone Engine. AUTO-GENERATED FILE, DO NOT EDIT [systemz_const.py] KS_ERR_ASM_SYSTEMZ_INVALIDOPERAND = 512 KS_ERR_ASM_SYSTEMZ_MISSINGFEATURE = 513 KS_ERR_ASM_SYSTEMZ_MNEMONICFAIL = 514
0
0
0
0
0
0
two_class/using_sklearn.py
wu546300070/weiboanalysis
685
184334
<reponame>wu546300070/weiboanalysis<gh_stars>100-1000 import random import numpy as np import matplotlib.pyplot as plt from pylab import mpl from sklearn.ensemble import AdaBoostClassifier from sklearn.metrics import zero_one_loss from sklearn.naive_bayes import MultinomialNB from sklearn.model_selection import train_...
0
0
0
0
0
0
random_bonus/gan_n_cgan_2d_example/gan_demo.py
wang420349864/dlcv_for_beginners
1,424
184346
<filename>random_bonus/gan_n_cgan_2d_example/gan_demo.py #!/usr/bin/env python # Generative Adversarial Networks (GAN) example with 2D samples in PyTorch. import os from skimage import io import torch import torch.nn as nn from torch.autograd import Variable from sampler import generate_lut, sample_2d from visualizer i...
0
0
0
0
0
0
packages/pyright-internal/src/tests/samples/subscript3.py
sasano8/pyright
4,391
184358
# This sample tests subscript forms specified in PEP 637 - # keyword and unpacked args. from typing import Any, Literal, Tuple, Union, overload class ClassA: @overload def __getitem__(self, index: int) -> int: ... @overload def __getitem__(self, index: Tuple[int, ...]) -> float: ... ...
0
0
0
0
0
0
neuroptica/settings.py
bendavidsteel/neuroptica
161
184365
import numba import numpy as np NP_COMPLEX = np.complex128 NUMBA_COMPLEX = numba.complex128 NP_FLOAT = np.float64 NUMBA_FLOAT = numba.float64
0
0
0
0
0
0