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
indra/sources/geneways/geneways_symbols_parser.py
pupster90/indra
136
3277753
<filename>indra/sources/geneways/geneways_symbols_parser.py from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import codecs class GenewaysSymbols(object): """Parser for the Geneways symbol table. Once parsed, provides a mapping from gene symbol names to Ent...
0
0
0
0
0
0
tests/test_metrics.py
oijkn/alerta
1,233
3277757
import time import unittest from alerta.app import create_app, db from alerta.models.metrics import Gauge, Timer class MetricsTestCase(unittest.TestCase): def setUp(self): self.app = create_app() self.client = self.app.test_client() def tearDown(self): db.destroy() def test_met...
0
0
0
0
0
0
alipay/aop/api/response/AlipayCommerceTransportWorldCarddataApplyResponse.py
antopen/alipay-sdk-python-all
213
3277771
<reponame>antopen/alipay-sdk-python-all<filename>alipay/aop/api/response/AlipayCommerceTransportWorldCarddataApplyResponse.py #!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.WorldBaseRPCResponseInfo import WorldBaseR...
0
0
0
0
0
0
sampling_free/modeling/generalized_rcnn/rpn/paa/paa.py
ChenJoya/sampling-free
266
3277776
<filename>sampling_free/modeling/generalized_rcnn/rpn/paa/paa.py import math import torch from torch import nn from sampling_free.layers import Scale, DFConv2d from ..anchor_generator import make_anchor_generator_paa from ..atss.atss import BoxCoder from .inference import make_paa_postprocessor from .loss import mak...
0
0
0
0
0
0
pytouch/sensors/gelsight.py
Pandinosaurus/PyTouch
149
3277797
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. from __future__ import annotations from torchvision import transforms from .base import SensorBase class GelsightSensorDefaults: SCALES: list[int] = [64, 64] MEANS: list[float] = [0.485, 0.456, 0.406] STDS: list[float] = [0.229, 0.2...
2
2
3
0
7
0
alex/components/asr/base.py
oplatek/alex
184
3277852
<gh_stars>100-1000 #!/usr/bin/env python # -*- coding: utf-8 -*- # This code is PEP8-compliant. See http://www.python.org/dev/peps/pep-0008. from __future__ import unicode_literals from alex.components.asr.exceptions import ASRException from alex.utils.audio import load_wav from alex.components.hub.messages import Fra...
0
0
0
0
0
0
redun/bcoding.py
cclauss/redun
303
3277857
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import annotations """ From: https://github.com/flying-sheep/bcode/blob/master/bcoding.py Main change made here is to explicitly safeguard against encoding bools as they derive from int. Formatting and linting changes were also applied. Original Lic...
2
7
0
0
9
0
android_env/wrappers/discrete_action_wrapper.py
majacQ/android_env
768
3277875
<filename>android_env/wrappers/discrete_action_wrapper.py # coding=utf-8 # Copyright 2021 DeepMind Technologies 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 License at # # http://www.apa...
0
0
0
0
0
0
eve_sqlalchemy/examples/simple/app.py
Alan01252/eve-sqlalchemy
126
3277882
from eve import Eve from eve_sqlalchemy import SQL from eve_sqlalchemy.examples.simple.tables import Base, Invoices, People from eve_sqlalchemy.validation import ValidatorSQL app = Eve(validator=ValidatorSQL, data=SQL) # bind SQLAlchemy db = app.data.driver Base.metadata.bind = db.engine db.Model = Base db.create_al...
0
0
0
0
0
0
pillow/join-in-rows-and-columns/main-pillow.py
whitmans-max/python-examples
140
3277893
#!/usr/bin/env python3 #!/usr/bin/env python3 # date: 2019.11.26 # from PIL import Image img1 = Image.open('square-1.png') img2 = Image.open('square-2.png') img3 = Image.open('square-3.png') img4 = Image.open('square-4.png') w1, h1 = img1.size w2, h2 = img1.size w3, h3 = img1.size w4, h4 = img1.size w = max(w1,...
0
0
0
0
0
0
odps/ml/expr/models/pmml.py
Emersonxuelinux/aliyun-odps-python-sdk
412
3277933
<gh_stars>100-1000 #!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2017 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.or...
0
0
0
0
0
0
examples/cgt_theano_feedforward_comparison.py
rohanraja/cgt_distributed
698
3278023
<gh_stars>100-1000 import cgt, numpy as np from cgt import nn from example_utils import fetch_dataset import time try: import theano.tensor as TT, theano, theano.tensor.signal.downsample #pylint: disable=F0401 have_theano=True except ImportError: have_theano=False # ========================================...
0
0
0
0
0
0
bert/fairseq/optim/lr_scheduler/exp_lr_scheduler.py
changhaowu/macaron-net
140
3278089
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from __future__ import annotations...
1
2
0
0
3
0
utils/match_helper.py
jiangwei221/image-matching-benchmark
271
3278140
<gh_stars>100-1000 # Copyright 2020 Google LLC, University of Victoria, Czech Technical University # # 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/LICE...
0
0
0
0
0
0
v2/musegan/musegan/presets/discriminator/baseline.py
tai271828/musegan
1,119
3278170
"""Network architecture of the baseline discriminator """ NET_D = {} NET_D['pitch_time_private'] = None NET_D['time_pitch_private'] = None NET_D['merged_private'] = None NET_D['shared'] = None NET_D['onset'] = None NET_D['chroma'] = None NET_D['merged'] = [ ('conv3d', (128, (1, 1, 12), (1, 1, 12)), None, 'lr...
0
0
0
0
0
0
review/migrations/0002_interview.py
yazdanv/backend
232
3278224
<reponame>yazdanv/backend # Generated by Django 2.1.5 on 2019-04-19 12:20 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
0
0
0
0
0
0
docs/_mocked_modules/ctypes/__init__.py
dgelessus/rubicon-objc
136
3278256
<filename>docs/_mocked_modules/ctypes/__init__.py """Bare minimum mock version of ctypes. This shadows the real ctypes module when building the documentation, so that :mod:`rubicon.objc` can be imported by Sphinx autodoc even when no Objective-C runtime is available. This module only emulates enough of ctypes to make...
0
0
0
0
0
0
samples/RDStoS3/setup/RDStoS3Sample.py
pushpeshg/data-pipeline-samples
277
3278260
<filename>samples/RDStoS3/setup/RDStoS3Sample.py from SetupPipelineDefinition import SetupPipelineDefinitionHelper import boto3 import re import time class RDStoS3Sample(object): def __init__(self): self.s3_bucket_path = "s3://your/s3/bucket/path" self.s3_bucket = "" self.customer_provide...
0
0
0
0
0
0
src/skiptracer/plugins/base.py
EdwardDantes/skiptracer
912
3278265
from __future__ import annotations """Base Scraping Class""" from __future__ import print_function from __future__ import absolute_import from lxml import etree from bs4 import BeautifulSoup from . import proxygrabber from dotenv import dotenv_values import requests import random import requests import json # monkey p...
0
6
0
3
9
0
src/web/reactionforms/twilio-sms-notification/__init__.py
anderson-attilio/runbook
155
3278295
"""Reactions form class for Twilio SMS Notification.""" from wtforms import SelectField, TextField from wtforms.validators import DataRequired, Regexp from ..base import BaseReactForm class ReactForm(BaseReactForm): title: str = "Twilio: Send SMS" description: str = """ <P> This reaction is des...
0
0
2
0
2
0
test.3.py
phasorhand/PyTorchText
1,136
3278310
#encoding:utf-8 # from torch.utils import data ''' 专门为multimodel而写 生成pth ''' import torch as t import numpy as np from config import opt import models import json import fire import csv import tqdm from torch.autograd import Variable def load_data(type_: str='char') -> tuple[tuple[object, object], tuple[object, object...
1
2
0
0
3
0
scrapli-apps/ssh-scrapli.py
caputomarcos/network-programmability-stream
120
3278313
from concurrent.futures import ThreadPoolExecutor from datetime import datetime import logging from typing import Dict, Any, cast from pathlib import Path import shutil from scrapli import Scrapli from scrapli.driver import NetworkDriver from constants import USERNAME, PASSWORD, DEVICES # logging.basicConfig(level="...
2
1
0
0
3
0
src/hammer-vlsi/technology/sky130/extra/sram-cache-gen.py
httpsgithu/hammer
138
3278318
<gh_stars>100-1000 #!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Script to generate the ASAP7 dummy SRAM cache. # # See LICENSE for licence details. import sys import re from typing import List def main(args: List[str]) -> int: if len(args) != 3: print("Usage: ./sram-cache-gen.py list-of-srams-1-p...
0
0
0
0
0
0
tools/metrics/ukm/xml_validations_test.py
zealoussnow/chromium
14,668
3278332
# 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. import unittest import xml_validations from xml.dom import minidom class UkmXmlValidationTest(unittest.TestCase): def toUkmConfig(self, xml_string) -> o...
0
1
0
0
1
0
bookwyrm/views/admin/link_domains.py
mouse-reeve/fedireads
270
3278346
<reponame>mouse-reeve/fedireads """ Manage link domains""" from django.contrib.auth.decorators import login_required, permission_required from django.shortcuts import get_object_or_404, redirect from django.template.response import TemplateResponse from django.utils.decorators import method_decorator from django.views ...
0
0
0
0
0
0
stix_shifter_modules/trendmicro_vision_one/stix_transmission/query_connector.py
pyromaneact/stix-shifter
129
3278359
from __future__ import annotations from stix_shifter_utils.modules.base.stix_transmission.base_connector import BaseQueryConnector class QueryConnector(BaseQueryConnector): def __init__(self, api_client): self.api_client = api_client def create_query_connection(self, query) -> dict[str,bool | object]...
0
1
0
0
1
0
recipes/wmf_images.py
cockcrow/python-mammoth
557
3278369
from __future__ import annotations import io import os import shutil import subprocess import tempfile # An example of how to use LibreOffice and ImageMagick to convert WMF images to # PNGs. # # libreoffice_wmf_conversion uses LibreOffice to convert the image to a PNG. # This normally creates an image with a large am...
1
4
0
0
5
0
src/hammer-vlsi/sram_generator/mocksram_generator.py
XiaoSanchez/hammer
138
3278407
<reponame>XiaoSanchez/hammer #!/usr/bin/env python3 # -*- coding: utf-8 -*- # # mocksram_generator.py # Mock SRAM Generator tool for testing. # # See LICENSE for licence details. from hammer_vlsi import HammerSRAMGeneratorTool, DummyHammerTool, \ SRAMParameters, MMMCCorner from hammer_tech import ExtraLibra...
0
0
0
0
0
0
zentral/contrib/monolith/migrations/0036_enrollment_taxonomies.py
arubdesu/zentral
634
3278429
<filename>zentral/contrib/monolith/migrations/0036_enrollment_taxonomies.py # -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-09-19 11:03 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('inventory', '004...
0
0
0
0
0
0
tools/minicluster/client.py
bopopescu/peloton
617
3278441
<filename>tools/minicluster/client.py import json import logging from peloton_client.client import PelotonClient import print_utils log = logging.getLogger(__name__) class PelotonClientWrapper(PelotonClient): """ Wrapper on the standard Peloton client to patch certain parts of the data retrieved from Zo...
0
0
0
0
0
0
python/test/mapreduce/datastore_range_iterators_test.py
Batterii/appengine-mapreduce
228
3278492
#!/usr/bin/env python # pylint: disable=g-bad-name import os import unittest from google.appengine.ext import ndb from google.appengine.api import datastore from google.appengine.api import namespace_manager from google.appengine.ext import db from google.appengine.ext import key_range from google.appengine.ext i...
0
9
0
0
9
0
simulation/decai/simulation/data/featuremapping/hashing/token_hash.py
boost-entropy-python/0xDeCA10B
445
3278497
<gh_stars>100-1000 from abc import ABC, abstractmethod class TokenHash(ABC): """ Hashes token to unsigned integers. Useful for sparse representation. """ @abstractmethod def hash(self, text: str) -> int: raise NotImplementedError
0
0
0
0
0
0
python/app/plugins/http/Phpstudy/Phpstudy_Backdoor_Rce.py
taomujian/linbing
351
3278518
#!/usr/bin/env python3 import re from app.lib.utils.request import request from app.lib.utils.encode import urlencode, base64encode from app.lib.utils.common import get_capta, get_useragent class Phpstudy_Backdoor_Rce_BaseVerify: def __init__(self, url): self.info: dict[str,str] = { 'name': 'P...
0
2
0
3
5
0
myutils.py
around-star/FLAVR
223
3278564
<reponame>around-star/FLAVR<gh_stars>100-1000 # from https://github.com/myungsub/CAIN/blob/master/utils.py, # but removed the errenous normalization and quantization steps from computing the PSNR. from pytorch_msssim import ssim_matlab as calc_ssim import math import os import torch import shutil def init_meters(lo...
0
0
0
0
0
0
rest-service/manager_rest/test/endpoints/test_plugins.py
ilan-WS/cloudify-manager
124
3278581
######### # Copyright (c) 2015 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
0
0
0
0
0
0
SimGeneral/TrackingAnalysis/python/simHitTPAssociation_cfi.py
ckamtsikis/cmssw
852
3278647
import FWCore.ParameterSet.Config as cms simHitTPAssocProducer = cms.EDProducer("SimHitTPAssociationProducer", simHitSrc = cms.VInputTag(cms.InputTag('g4SimHits','MuonDTHits'), cms.InputTag('g4SimHits','MuonCSCHits'), cms.InputTag('g4SimHits','MuonRPCHits'), ...
0
0
0
0
0
0
tests/serializers/test_abstract_serializer.py
next-franciscoalgaba/python-benedict
365
3278653
# -*- coding: utf-8 -*- from benedict.serializers import AbstractSerializer import unittest class abstract_serializer_test_case(unittest.TestCase): def test_decode_abstract(self): s = AbstractSerializer() with self.assertRaises(NotImplementedError): s.decode('') def test_encode...
0
2
0
0
2
0
src/fonduer/packaging/__init__.py
annelhote/fonduer
379
3278668
"""Fonduer's packaging module.""" from fonduer.packaging.fonduer_model import FonduerModel, log_model, save_model __all__ = [ "FonduerModel", "save_model", "log_model", ]
0
0
0
0
0
0
cellrank/tl/kernels/_cytotrace_kernel.py
WeilerP/cellrank
172
3278681
from typing import Any from typing_extensions import Literal from enum import auto from anndata import AnnData from cellrank import logging as logg from cellrank._key import Key from cellrank.tl._enum import ModeEnum from cellrank.ul._docs import d, inject_docs from cellrank.tl._utils import _correlation_test_helper ...
16
2
0
0
18
0
pyEX/stocks/logo.py
adamklaff/pyEX
335
3278717
# ***************************************************************************** # # Copyright (c) 2020, the pyEX authors. # # This file is part of the pyEX library, distributed under the terms of # the Apache License 2.0. The full license can be found in the LICENSE file. # from io import BytesIO import requests from...
8
3
0
0
11
0
models/__init__.py
mli0603/GwcNet
236
3278732
from models.gwcnet import GwcNet_G, GwcNet_GC from models.loss import model_loss __models__ = { "gwcnet-g": GwcNet_G, "gwcnet-gc": GwcNet_GC }
0
0
0
0
0
0
neural/LightCNN/__init__.py
Hengle/face-nn
319
3278739
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: penghuailiang # @Date : 2019-10-04 """ light cnn 用来生成256维人脸特征 """
0
0
0
0
0
0
cartoframes/viz/kuviz.py
CartoDB/cartoframes
236
3278762
<reponame>CartoDB/cartoframes import copy from warnings import filterwarnings from carto.kuvizs import KuvizManager from ..data.clients.auth_api_client import AuthAPIClient from ..exceptions import PublishError from ..utils.logger import log from ..utils.utils import get_credentials filterwarnings('ignore', category...
0
0
0
0
0
0
setup.py
PMBio/scLVM
107
3278775
"""scLVM - single cell latent variable model See: https://github.com/PMBio/scLVM """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description...
0
0
0
0
0
0
tests/conftest.py
ai-mocap/hypercorn
264
3278788
from __future__ import annotations import pytest from _pytest.monkeypatch import MonkeyPatch import hypercorn.config from hypercorn.typing import HTTPScope @pytest.fixture(autouse=True) def _time(monkeypatch: MonkeyPatch) -> None: monkeypatch.setattr(hypercorn.config, "time", lambda: 5000) @pytest.fixture(nam...
1
2
0
0
3
0
atp-auto-core-open/atp/views/api_product_line.py
rebecca1202/testAuto
130
3278815
# -*- coding:utf-8 -*- import json import time from flask import Blueprint, request from flask_restful import Resource from atp.api.comm_log import logger from atp.api.mysql_manager import ( ApiCompanyInfoManager, ApiSystemInfoManager, ApiIntfInfoManager, ApiTestcaseInfoManager, ApiProjectIntfRelationManager...
0
5
0
0
5
0
tests/pup/basic/1k.py
cschlack/pybricks-micropython
115
3278848
# SPDX-License-Identifier: MIT # Copyright (c) 2020 The Pybricks Authors # """ # Hardware Module: Any hub. # # Description: Creates a ~1k .mpy file and allocates a ~1k chunk of memory # """ _ = """ 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF 0123456789ABCDEF0123456789ABCDEF0123456...
0
0
0
0
0
0
core/bbreg/utils/gmm.py
hehewa/CAT
743
3278849
<gh_stars>100-1000 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np from functools import reduce from detectron.core.config import cfg from scipy.stats import norm from scipy.optimize import basinho...
0
0
0
0
0
0
tests/unit/controllers/test_list.py
senstb/aws-elastic-beanstalk-cli
110
3278855
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
0
0
0
0
0
0
torchfunc/performance/__init__.py
itsjoshthedeveloper/torchfunc
210
3278871
<reponame>itsjoshthedeveloper/torchfunc<filename>torchfunc/performance/__init__.py r""" **This package allows you to get info and tips about performance of your neural networks.** Following functions should be considered as general recommendations. For specific/customized tips, use specific submodules. """ import ty...
0
0
0
0
0
0
moldesign/helpers/pdb.py
Autodesk/molecular-design-toolkit
147
3278881
<gh_stars>100-1000 from __future__ import print_function, absolute_import, division from future.builtins import * from future import standard_library standard_library.install_aliases() # Copyright 2017 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except ...
0
0
0
0
0
0
test-framework/test-suites/integration/tests/remove/test_remove_host_storage_controller.py
knutsonchris/stacki
123
3278909
import json from textwrap import dedent class TestRemoveHostStorageController: def test_no_args(self, host): result = host.run('stack remove host storage controller') assert result.rc == 255 assert result.stderr == dedent('''\ error - "host" argument is required {host ...} {slot=integer} [adapter=integer...
0
0
0
0
0
0
test/python/tests/test_nobh.py
bh107/bohrium
236
3278914
import util class test_bincount: def init(self): for dtype in util.TYPES.SIGNED_INT: for shape in util.gen_shapes(1, 100, min_ndim=1, iters=5): cmd = "R = bh.random.RandomState(42); " cmd += "a=R.random_integers(0, high=100, size=%d, dtype=%s, bohrium=BH);" % (s...
0
3
0
0
3
0
Chapter2/ex_2_37.py
zxjzxj9/PyTorchIntroduction
205
3278916
<reponame>zxjzxj9/PyTorchIntroduction<gh_stars>100-1000 """ 该代码可以直接使用 python ex_2_37.py 运行(需要安装TensorBoard) (#号及其后面内容为注释,可以忽略) 结合ex_2_20.py中定义的LinearModel模型 """ from sklearn.datasets import load_boston from torch.utils.tensorboard import SummaryWriter import torch import torch.nn as nn from ex_2_20 import Li...
0
0
0
0
0
0
servers/experimental/hdaudio/wav2c.py
nuta/resea
221
3278925
<filename>servers/experimental/hdaudio/wav2c.py #!/usr/bin/env python3 from scipy.io import wavfile import argparse import matplotlib.pyplot as plt import numpy as np import sys import subprocess def generate_c_file(left, right): text = "" text += "#ifndef __SOUND_DATA_H__\n" text += "#define __SOUND_DATA_...
0
0
0
0
0
0
opendeep/models/tests/prototype_mnist.py
vitruvianscience/OpenDeep
252
3278956
from __future__ import print_function # third party libraries from theano.tensor import matrix, lvector from opendeep.log.logger import config_root_logger from opendeep.models import Prototype, Dense, Softmax from opendeep.optimization import AdaDelta from opendeep.optimization.loss import Neg_LL from opendeep.data imp...
0
0
0
0
0
0
keystone/identity/backends/ldap/models.py
ferag/keystone
615
3278957
<gh_stars>100-1000 # Copyright (C) 2011 OpenStack Foundation # # 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
temboardui/model/alembic/versions/20200325_2dcd5b518ab5cf_alerting.py
missmoiselle/temboard
294
3278965
"""alerting Revision ID: cd5b518ab5cf Revises: <PASSWORD> Create Date: 2020-03-25 16:56:26.929549 """ import os.path from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = '<PASSWORD>' branch_labels = None depends_on = None def sqlfile(name) -> ...
0
1
0
0
1
0
3D-Reconstruction-Kinect/Kinect_setup.py
Gopalbhavesh/3D-IWGAN
192
3279024
import os import sys import numpy as np import random from tqdm import tqdm import matplotlib.pyplot as plt from scipy import ndimage from mpl_toolkits.mplot3d import Axes3D from multiprocessing import Pool import matplotlib.pyplot as plt from glob import glob from PIL import Image, ImageOps import time import psuti...
0
0
0
0
0
0
Piano_In_The_Key_Of_Lime/NeoPixelAll/code.py
gamblor21/Adafruit_Learning_System_Guides
665
3279062
<reponame>gamblor21/Adafruit_Learning_System_Guides from adafruit_circuitplayground import cp while True: cp.pixels.fill((0, 0, 3))
0
0
0
0
0
0
tuia/util.py
fossabot/QTAF
452
3279148
#-*- coding: utf-8 -* # # Tencent is pleased to support the open source community by making QTA available. # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # Licensed under the BSD 3-Clause License (the "License"); you may not use this # file except in compliance with the License. You may o...
0
0
0
0
0
0
test/test_api.py
jhcross/sacrebleu
256
3279167
<reponame>jhcross/sacrebleu # Copyright 2017 Amazon.com, Inc. or its affiliates. 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. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # ...
0
0
0
0
0
0
cloudbio/custom/system.py
glebkuznetsov/cloudbiolinux
122
3279168
<reponame>glebkuznetsov/cloudbiolinux<filename>cloudbio/custom/system.py """ Install system programs not available from packages. """ import os from fabric.api import cd from cloudbio.custom import shared from cloudbio.custom.shared import _if_not_installed, _get_install, _configure_make from cloudbio.fabutils import...
0
0
0
0
0
0
examples/paper_generation_code/2020-08-10-down_fmri_data.py
CoMind-Technologies/deepinterpolation
178
3279180
<filename>examples/paper_generation_code/2020-08-10-down_fmri_data.py<gh_stars>100-1000 from urllib.request import urlretrieve import os import requests import numpy as np base_preproc_path = 'https://openneuro.org/crn/datasets/ds001246/snapshots/1.2.1/files/derivatives:preproc-spm:output:sub-{:02d}:ses-perceptionTrai...
0
0
0
0
0
0
CompressionAutoEncoder/src/dataset.py
DLR-RM/SingleViewReconstruction
190
3279212
<gh_stars>100-1000 from itertools import product import h5py import glob import os import random import tensorflow as tf import numpy as np class Dataset: def __init__(self, config): """ Args: config: The configuration config. """ self.config = config.data self...
0
0
0
0
0
0
sympy/series/formal.py
ianmasc/sympy
603
3279221
<gh_stars>100-1000 """Formal Power Series""" from collections import defaultdict from sympy import oo, zoo, nan from sympy.core.add import Add from sympy.core.compatibility import iterable from sympy.core.expr import Expr from sympy.core.function import Derivative, Function, expand from sympy.core.mul import Mul from...
0
0
0
0
0
0
python/GafferSceneUITest/VisualiserTest.py
ddesmond/gaffer
561
3279224
<reponame>ddesmond/gaffer ########################################################################## # # Copyright (c) 2020, Cinesite VFX Ltd. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: #...
0
0
0
0
0
0
docs/src/db_ormar.py
jakemanger/fastapi-users
1,172
3279226
import databases import sqlalchemy from fastapi_users.db import OrmarBaseUserModel, OrmarUserDatabase from .models import UserDB DATABASE_URL = "sqlite:///test.db" metadata = sqlalchemy.MetaData() database = databases.Database(DATABASE_URL) class UserModel(OrmarBaseUserModel): class Meta: tablename: str...
0
0
1
0
1
0
dcdownloader/utils.py
dev-techmoe/python-dcdownloader
173
3279233
<reponame>dev-techmoe/python-dcdownloader<gh_stars>100-1000 import re, os, traceback from dcdownloader import config, title def decode_packed_codes(code): def encode_base_n(num, n, table=None): FULL_TABLE = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' if not table: t...
0
0
0
0
0
0
mmdet3d/utils/logger.py
Guangyun-Xu/mmdetection3d
2,216
3279250
# Copyright (c) OpenMMLab. All rights reserved. from __future__ import annotations import logging from mmcv.utils import get_logger def get_root_logger(log_file: object | None=None, log_level=logging.INFO, name: str='mmdet3d') -> object: """Get root logger and add a keyword filter to it. The logger will be i...
2
1
0
0
3
0
ssd_utils.py
henritomas/ssd_kerasV2
154
3279258
from __future__ import annotations """Some utils for SSD.""" import numpy as np import tensorflow as tf class BBoxUtility(object): """Utility class to do some stuff with bounding boxes and priors. # Arguments num_classes: Number of classes including background. priors: Priors and variances, ...
8
7
0
0
15
0
venv/Lib/site-packages/imageio/plugins/ffmpeg.py
amelliaaas/tugastkc4
1,026
3279268
<filename>venv/Lib/site-packages/imageio/plugins/ffmpeg.py # -*- coding: utf-8 -*- # imageio is distributed under the terms of the (new) BSD License. """Read/Write video using FFMPEG Backend Library: https://github.com/imageio/imageio-ffmpeg .. note:: To use this plugin you have to install its backend:: ...
0
0
0
0
0
0
examples/IBM8/models/vgg_low.py
wdlctc/QPytorch-FP9
172
3279275
from __future__ import annotations """ VGG model definition ported from https://github.com/pytorch/vision/blob/master/torchvision/models/vgg.py """ import math import torch.nn as nn import torchvision.transforms as transforms from qtorch import FloatingPoint from qtorch.quant import Quantizer __all__ = ["VGG1...
5
2
5
0
12
0
machin/frame/algorithms/utils.py
lorenzosteccanella/machin
287
3279327
<filename>machin/frame/algorithms/utils.py from machin.utils.logging import default_logger from machin.model.nets.base import static_module_wrapper import inspect import torch import torch.nn as nn def soft_update(target_net: nn.Module, source_net: nn.Module, update_rate) -> None: """ Soft update target netwo...
0
0
0
0
0
0
Python/naive_bayes.py
PushpneetSingh/Hello-world
1,428
3279350
<reponame>PushpneetSingh/Hello-world import scipy as sp import numpy as np # Do the bayes thing def bayes_single(data, v): sigma = sp.var(data) mu = sp.average(data) return sp.e ** (-1 * (v - mu) ** 2 / (2 * sigma)) / np.sqrt(2 * sp.pi * sigma) # Do a bayes on an array of arrays def bayes(data, v, P_c):...
0
0
0
0
0
0
homeassistant/components/overkiz/lock.py
MrDelik/core
30,023
3279360
"""Support for Overkiz locks.""" from __future__ import annotations from typing import Any from pyoverkiz.enums import OverkizCommand, OverkizCommandParam, OverkizState from homeassistant.components.lock import LockEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform f...
5
4
1
0
10
0
bitcoinetl/jobs/export_all.py
BTCGPU/bitcoin-etl
274
3279361
# MIT License # # Copyright (c) 2018 <NAME>, <NAME>, <EMAIL>, <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 restriction, including without limitation the rights # to use, ...
0
2
0
0
2
0
tools/minimize.py
sweco-seskvi/ol2
166
3279372
<filename>tools/minimize.py # Minimal Python Minimizer # Copyright 2008, <NAME> # Released under the MIT License # # Taken from: http://svn.crschmidt.net/personal/python/minimize.py # $Id: minimize.py 6 2008-01-03 06:33:35Z crschmidt $ # # Permission is hereby granted, free of charge, to any person obtaining a copy # o...
0
0
0
0
0
0
disentanglement_lib/utils/resources.py
jboilard1994/disentanglement_lib
1,280
3279375
# coding=utf-8 # Copyright 2018 The DisentanglementLib 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 # # Un...
0
1
0
0
1
0
lingvo/tasks/car/detection_3d_metrics_test.py
Harshs27/lingvo
2,611
3279380
<filename>lingvo/tasks/car/detection_3d_metrics_test.py # Lint as: python3 # Copyright 2019 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
nuplan/database/nuplan_db/tests/test_nuplandb.py
motional/nuplan-devkit
128
3279404
import pickle import unittest from nuplan.database.common.db import Table from nuplan.database.nuplan_db.nuplandb import NuPlanDB from nuplan.database.tests.nuplan_db_test_utils import get_test_nuplan_db class TestNuPlanDB(unittest.TestCase): """Test main nuPlan database class.""" def setUp(self) -> None: ...
0
3
1
0
4
0
deep learning/GAN/main_train.py
sugatoray/data-science-learning
358
3279407
from __future__ import annotations import argparse import sys import os import yaml from pathlib import Path from datetime import datetime from dcgan import DCGan sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir)) from tmp_load_data import load_celeba_tfdataset def main(_: object | None=None): ...
1
0
0
0
1
0
tensorflow/python/ops/linalg_grad.py
ryorda/tensorflow-viennacl
522
3279458
<reponame>ryorda/tensorflow-viennacl # 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 # # http://www.apache.org/licenses/LICEN...
0
0
0
0
0
0
data/__init__.py
Kalana304/realtime-action-detection
322
3279460
#from .voc0712 import VOCDetection, AnnotationTransform, detection_collate, VOC_CLASSES from __future__ import annotations from .ucf24 import UCF24Detection, AnnotationTransform, detection_collate, CLASSES from .config import * import cv2 import numpy as np def base_transform(image, size, mean) -> object: x = cv2...
2
2
0
0
4
0
tests/unit/objects/test_batchrequest.py
varunbheemaiah/python-quickbooks
234
3279488
import unittest from quickbooks.objects.batchrequest import Fault, FaultError, BatchItemResponse, BatchItemRequest class FaultTests(unittest.TestCase): def test__repr__(self): fault = Fault() fault.type = "test" fault.original_object = 100 fault.Error.append("error") self...
0
0
0
0
0
0
backend/tf_cpn/network.py
zju-3dv/multi-person3dpose
391
3279490
<reponame>zju-3dv/multi-person3dpose import tensorflow as tf import tensorflow.contrib.slim as slim import sys, os import argparse import numpy as np from functools import partial from .cpn_config import cfg from tfflat.base import ModelDesc, Trainer from tfflat.utils import mem_info from nets.basemodel import resnet...
0
0
0
0
0
0
tools/memory/print_memory_map.py
sohumango/arm-trusted-firmware
1,408
3279492
#!/usr/bin/env python3 # # Copyright (c) 2019-2020, Arm Limited. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # import re import os import sys import operator # List of folder/map to parse bl_images = ['bl1', 'bl2', 'bl31'] # List of symbols to search for blx_symbols = ['__BL1_RAM_START__', '__BL1_...
0
0
0
0
0
0
nltk/lm/api.py
Bharat123rox/nltk
9,747
3279508
# Natural Language Toolkit: Language Models # # Copyright (C) 2001-2021 NLTK Project # Authors: <NAME> <<EMAIL>> # URL: <https://www.nltk.org/> # For license information, see LICENSE.TXT from __future__ import annotations """Language Model Interface.""" import random from abc import ABCMeta, abstractmethod from bisect...
10
9
0
0
19
0
examples_and_tutorials/grid/tasks.py
ali-senguel/fairo
669
3279510
<reponame>ali-senguel/fairo import numpy as np from droidlet.task.task import Task class Move(Task): def __init__(self, agent, task_data): super(Move, self).__init__(agent) self.target = task_data["target"] def step(self, agent): super().step(agent) if self.finished: ...
0
0
0
0
0
0
python_scripts/setup.py
ZhengGuoDeveloper/steem
2,189
3279519
<filename>python_scripts/setup.py from setuptools import setup setup( name='steemdebugnode', version='0.1', description='A wrapper for launching and interacting with a Steem Debug Node', url='http://github.com/steemit/steem', author='Steemit, Inc.', author_email='<EMAIL>', lic...
0
0
0
0
0
0
reid/dist_metric.py
Tianyu97/Person-Re-identification-Research-Based-on-Deep-Learning
1,341
3279524
<reponame>Tianyu97/Person-Re-identification-Research-Based-on-Deep-Learning from __future__ import absolute_import import torch from .evaluators import extract_features from .metric_learning import get_metric class DistanceMetric(object): def __init__(self, algorithm='euclidean', *args, **kwargs): super...
0
0
0
0
0
0
dbcArchives/2021/000_0-sds-3-x-projects/student-project-19_group-Featuring/development/FundamentalMatrix_dev_25images.py
r-e-x-a-g-o-n/scalable-data-science
138
3279540
# Databricks notebook source # MAGIC %md # MAGIC ## Problem formulation # MAGIC A common problem in computer vision is estimating the fundamental matrix based on a image pair. The fundamental matrix relates corresponding points in stereo geometry, and is useful as a pre-processing step for example when one wants to pe...
0
3
0
0
3
0
Python/SystemsProgramming/subprocess_environment.py
Gjacquenot/training-material
115
3279558
#!/usr/bin/env python from argparse import ArgumentParser import subprocess import os if __name__ == '__main__': arg_parser = ArgumentParser(description='experiment with subprocess ' 'enrironments') arg_parser.add_argument('value', nargs='?', ...
0
0
0
0
0
0
climetlab/sources/url_pattern.py
iacopoff/climetlab
182
3279582
<gh_stars>100-1000 # (C) Copyright 2020 ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status as ...
0
0
0
0
0
0
tests/test_docs.py
legoktm/mwparserfromhell
481
3279605
<filename>tests/test_docs.py<gh_stars>100-1000 # Copyright (C) 2012-2020 <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 restriction, including without limitation t...
0
0
0
0
0
0
telemetry/telemetry/timeline/process.py
ravitejavalluri/catapult
925
3279613
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import telemetry.timeline.counter as tracing_counter import telemetry.timeline.event as event_module import telemetry.timeline.event_container as event_conta...
0
7
0
5
12
0
sample/android-resize-images.py
lamby/wand
472
3279643
#!/usr/bin/env python # Python MagickWand bindings can be obtained # from https://github.com/emcconville/wand from wand.image import Image import os import re # Android - Supporting multiple screens # http://developer.android.com/guide/practices/screens_support.html MANIFEST = ( # dpi, ratio ('h', .75), # ...
0
0
0
0
0
0
workflows/pipe-common/scripts/mount_storage.py
GrKolychev/cloud-pipeline
126
3279657
<gh_stars>100-1000 # Copyright 2017-2021 EPAM Systems, Inc. (https://www.epam.com/) # # 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
specification/scripts/test_entity_db.py
ChristophHaag/OpenXR-Docs
226
3279707
#!/usr/bin/python3 -i # # Copyright (c) 2018-2019 Collabora, Ltd. # # SPDX-License-Identifier: Apache-2.0 # # Author(s): <NAME> <<EMAIL>> import pytest from check_spec_links import XREntityDatabase @pytest.fixture def db() -> object: ret = XREntityDatabase() # print(ret.getEntityJson()) return ret ...
0
1
0
0
1
0
modules/ui/align.py
timfjord/sublime_debugger
225
3279710
from __future__ import annotations from ..typecheck import * from . html import span, click, alignable from . layout import Layout class spacer (span): def __init__(self, width: int|None = None, min: int|None = None): super().__init__(width, None, None) self.flex_width = width self.flex_width_min = min def r...
6
5
0
0
11
0