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
PyObjCTest/test_nspathcell.py
Khan/pyobjc-framework-Cocoa
132
3273645
<gh_stars>100-1000 from PyObjCTools.TestSupport import * from AppKit import * class TestNSPathCell (TestCase): def testConstants(self): self.assertEqual(NSPathStyleStandard, 0) self.assertEqual(NSPathStyleNavigationBar, 1) self.assertEqual(NSPathStylePopUp, 2) def testMethods(self): ...
0
0
0
0
0
0
spokestack/tts/lite/__init__.py
spokestack/spokestack-python
139
3273722
<gh_stars>100-1000 """ Spokestack-Lite Speech Synthesizer This module contains the SpeechSynthesizer class used to convert text to speech using local TTS models trained on the Spokestack platform. A SpeechSynthesizer instance can be passed to the TextToSpeechManager for playback. Example: This example assumes tha...
0
0
0
0
0
0
experiment_impact_tracker/gpu/exceptions.py
ANarayan/experiment-impact-tracker
202
3273725
class GPUAttributeAssertionError(Exception): pass
0
0
0
0
0
0
architectures/arch.py
chengshuai1992/Tricks-of-Semi-supervisedDeepLeanring-Pytorch
356
3273731
<reponame>chengshuai1992/Tricks-of-Semi-supervisedDeepLeanring-Pytorch #!coding:utf-8 from functools import wraps from architectures.lenet import LeNet from architectures.vgg import VGG11, VGG13, VGG16, VGG19 from architectures.resnet import ResNet18, ResNet34, ResNet50, ResNet101, ResNet152 from architectures.preact_...
0
0
0
0
0
0
test/util.py
glowatsk/txtorcon
180
3273766
<reponame>glowatsk/txtorcon import tempfile import shutil class TempDir(object): ''' This is a simple context manager that handles creating and cleaning up a tempdir. See also: https://gist.github.com/meejah/6430613 ''' def __enter__(self, *args): self.dir_name = tempfile.mkdtemp()...
0
0
0
0
0
0
Note-6 A3CNet/Note-6.3 强化学习选股-SH50指数增强/agent/access.py
summerRainn/DeepLearningNotes
345
3273774
<filename>Note-6 A3CNet/Note-6.3 强化学习选股-SH50指数增强/agent/access.py import tensorflow as tf from agent.forward import ActorNet, CriticNet LEARNING_RATE = 1e-3 DECAY_RATE = 0.99 class Access(object): def __init__(self, batch_size, state_size, action_size): with tf.variable_scope('Access'): # plac...
0
0
0
0
0
0
tests/base.py
mubashshirjamal/code
1,582
3273791
# encoding: UTF-8 from __future__ import annotations import os import glob import unittest import webtest import socket from vilya.libs.rdstore import rds from vilya.libs.gyt import clear_memoizer from vilya.libs.store import store from vilya.models.user import User from vilya.models.api_key import ApiKey from vilya...
8
4
1
0
13
0
tests/python/pypackageexample/example/__init__.py
mgaitan/sphinx-autoapi
197
3273813
from . import foo def module_level_method(foo, bar): """A module level method""" pass
0
0
0
0
0
0
heron/tools/tracker/tests/python/tracker_unittest.py
wromansky/incubator-heron
3,348
3273839
<filename>heron/tools/tracker/tests/python/tracker_unittest.py<gh_stars>1000+ # 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 #...
0
0
0
0
0
0
terrascript/google_beta/__init__.py
hugovk/python-terrascript
507
3273878
<reponame>hugovk/python-terrascript<filename>terrascript/google_beta/__init__.py # terrascript/google_beta/__init__.py import terrascript class google_beta(terrascript.Provider): pass
0
0
0
0
0
0
azbankgateways/urls.py
lordmahyar/az-iranian-bank-gateways
196
3273892
from django.urls import path from . import default_settings as settings from .apps import AZIranianBankGatewaysConfig from .views import callback_view, go_to_bank_gateway, sample_payment_view, sample_result_view app_name = AZIranianBankGatewaysConfig.name _urlpatterns = [ path('callback/', callback_view, name='ca...
0
1
0
0
1
0
python/037 Sudoku Solver.py
allandproust/leetcode-share
156
3273926
<gh_stars>100-1000 ''' Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '.'. You may assume that there will be only one unique solution. A sudoku puzzle... ...and its solution numbers marked in red. ''' class Solution(object): def solveSudoku(se...
0
0
0
0
0
0
scripts/make_submission_file.py
Irlirion/ocp
242
3273930
""" Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import argparse import glob import os import numpy as np def write_is2re_relaxations(paths, filename, hybrid): import ase.io from ...
0
0
0
0
0
0
dojo/db_migrations/0110_auth_v2_migrate_user_roles.py
mtcolman/django-DefectDojo
1,772
3273941
<reponame>mtcolman/django-DefectDojo<filename>dojo/db_migrations/0110_auth_v2_migrate_user_roles.py from django.core.management import call_command from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('dojo', '0109_group_user_role'), ] def migrate_users(apps,...
0
0
0
0
0
0
ch05/myproject_virtualenv/src/django-myproject/myproject/apps/news/views.py
PacktPublishing/Django-3-Web-Development-Cookbook
159
3273992
from django.views.generic import ListView, DetailView from .models import Article class ArticleList(ListView): model = Article paginate_by: int = 10 class ArticleDetail(DetailView): model = Article context_object_name: str = "article"
0
0
2
0
2
0
robonet/video_prediction/layers/dnaflow_rnn_cell.py
russellmendonca/RoboNet
140
3274007
<filename>robonet/video_prediction/layers/dnaflow_rnn_cell.py import tensorflow as tf from robonet.video_prediction import ops, flow_ops from robonet.video_prediction.ops import dense, conv2d, flatten, tile_concat, pad2d from robonet.video_prediction.rnn_ops import BasicConv2DLSTMCell, Conv2DGRUCell from robonet.video_...
0
0
0
0
0
0
vilya/models/utils/__init__.py
mubashshirjamal/code
1,582
3274035
# -*- coding: utf-8 -*- import json import uuid import re from datetime import datetime, date from time import mktime from vilya.libs.text import trunc_utf8 from vilya.models.consts import DOUBAN_EMAIL class CJsonEncoder(json.JSONEncoder): def default(self, obj) -> object: if isinstance(obj, datetime):...
0
14
0
0
14
0
blender/arm/logicnode/input/LN_sensor_coords.py
onelsonic/armory
2,583
3274065
from arm.logicnode.arm_nodes import * class SensorCoordsNode(ArmLogicTreeNode): """TO DO.""" bl_idname: str = 'LNSensorCoordsNode' bl_label: str = 'Sensor Coords' arm_section: str = 'sensor' arm_version: int = 1 def arm_init(self, context): self.add_output('ArmVectorSocket', 'Coords')
0
0
4
0
4
0
Chapter03/form_window.py
trappn/Mastering-GUI-Programming-with-Python
138
3274077
<reponame>trappn/Mastering-GUI-Programming-with-Python<gh_stars>100-1000 import sys from PyQt5 import QtWidgets as qtw from PyQt5 import QtCore as qtc class FormWindow(qtw.QWidget): submitted = qtc.pyqtSignal([str], [int, str]) def __init__(self): super().__init__() self.setLayout(qtw.QVBoxL...
0
0
0
0
0
0
avionics/servo/firmware/generate_r22_param.py
leozz37/makani
1,178
3274106
<reponame>leozz37/makani<filename>avionics/servo/firmware/generate_r22_param.py #!/usr/bin/python # Copyright 2020 Makani Technologies LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
0
0
0
0
0
0
vendor/github.com/google/certificate-transparency/python/ct/cert_analysis/ip_addresses.py
weltonrodrigo/origin
220
3274120
from ct.crypto import cert from observation import Observation class IpAddressObservation(Observation): def __init__(self, description, *args, **kwargs): super(IpAddressObservation, self).__init__( "IPAddres: " + description, *args, **kwargs) class IPv6(IpAddressObservation): def __in...
0
2
0
0
2
0
tests/sparseml/keras/optim/test_mask_pruning.py
clementpoiret/sparseml
922
3274133
<reponame>clementpoiret/sparseml<gh_stars>100-1000 # Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.ap...
0
0
0
0
0
0
vaeseq/util.py
charlesincharge/vae-seq
161
3274144
<gh_stars>100-1000 # Copyright 2018 Google, Inc., # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
0
0
0
0
0
0
rj_gameplay/tests/stp/tactic/test_pass_or_shoot.py
xiaoqingyu0113/robocup-software
200
3274202
def test_pass_or_shoot(): ...
0
0
0
0
0
0
src/hg/encode3/importEncode2/encodeCvToDb/splitAntibodyModel.py
andypohl/kent
171
3274205
class AbTarget(models.Model): """ Describes where an antibody is thought to bind. """ term = models.CharField("term", primaryKey=True, max_length=255) # A relatively short label, no more than a few words deprecated = models.CharField("deprecated", max_length=255, blank=True) # If non-empty, the reason why thi...
0
0
0
0
0
0
koalixcrm/crm/rest/product_rest.py
Cataldir/koalixcrm
290
3274238
from rest_framework import serializers from koalixcrm.accounting.accounting.product_category import ProductCategory from koalixcrm.accounting.rest.product_categorie_rest import ProductCategoryMinimalJSONSerializer from koalixcrm.crm.product.product_type import ProductType from koalixcrm.crm.product.tax import Tax from...
0
2
2
0
4
0
cle/backends/macho/__init__.py
Atipriya/cle
317
3274267
<reponame>Atipriya/cle from .macho import MachO
0
0
0
0
0
0
costcla/utils/__init__.py
eldrin/CostSensitiveClassification
195
3274270
__author__ = 'al' #TODO: Add train, validation and test to cross_validation
0
0
0
0
0
0
tests/st/ops/graph_kernel/test_batchnorm.py
PowerOlive/mindspore
3,200
3274374
# 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...
1
2
0
0
3
0
homeassistant/components/zestimate/__init__.py
domwillcode/home-assistant
30,023
3274394
"""The zestimate component."""
0
0
0
0
0
0
tools/tacacsrc2gpg.py
jccardonar/trigger
380
3274398
#!/usr/bin/env python # -*- coding: utf-8 -*- """ tacacsrc2gpg.py - Converts clear-text .tacacsrc to GPG-encrypted .tacacsrc.gpg Intended for use when migrating from clear-text .tacacsrc to GPG. """ import os import pwd import socket import sys from trigger.tacacsrc import Tacacsrc, get_device_password, convert_tac...
0
0
0
0
0
0
tests/unit/cfngin/hooks/test_command.py
avosper-intellaegis/runway
134
3274403
"""Tests for runway.cfngin.hooks.command.""" from __future__ import annotations # pylint: disable=no-self-use # pyright: basic import os import unittest from subprocess import PIPE from typing import ( TYPE_CHECKING, Any, ContextManager, List, Optional, Tuple, Type, Union, ) import moc...
9
17
0
1
27
0
test/run/t470.py
timmartin/skulpt
2,671
3274429
<filename>test/run/t470.py<gh_stars>1000+ def helper(got,expect): if got == expect: print True else: print False, expect, got print "\nstr.find" helper('hello world'.find('l',-2),9) helper('hello world'.find('l',4,6),-1) helper('hello world'.find('o',2,5),4) helper('hello world'.find('o',2,-5),4) helper('hello...
0
0
0
0
0
0
mmselfsup/models/necks/relative_loc_neck.py
mitming/mmselfsup
355
3274440
<filename>mmselfsup/models/necks/relative_loc_neck.py<gh_stars>100-1000 # Copyright (c) OpenMMLab. All rights reserved. import torch.nn as nn from mmcv.cnn import build_norm_layer from mmcv.runner import BaseModule from ..builder import NECKS @NECKS.register_module() class RelativeLocNeck(BaseModule): """The nec...
0
0
0
0
0
0
examples/setup.py
amCap1712/sphinx-click
165
3274443
from setuptools import find_packages, setup setup( name='sphinx_click_examples', packages=find_packages('.'), install_requires=['click'], )
0
0
0
0
0
0
scripts/gen_icache_tb.py
programmerjake/microwatt
514
3274459
#!/usr/bin/python3 b = bytearray() for i in range(0x100): b = b + i.to_bytes(4, 'little') f = open('icache_test.bin', 'w+b') f.write(b) f.close()
0
0
0
0
0
0
menpo3d/correspond/correspond_test.py
apapaion/menpo3d
134
3274469
<reponame>apapaion/menpo3d import menpo.io as mio import menpo3d.io as m3dio import numpy as np from menpo3d.correspond import solve_pnp_landmarks def test_solvepnp(): template = m3dio.import_builtin_asset.template_ply() image = mio.import_builtin_asset.lenna_png() # Comes from running 100 times and taki...
0
0
0
0
0
0
.config/ranger/plugins/extract.py
HenrikStanley/.dotfiles
357
3274470
<gh_stars>100-1000 import os from ranger.api.commands import * from ranger.core.loader import CommandLoader class extract(Command): """:extract Extract selected files to current or specified directory. """ def execute(self): cwd = self.fm.thisdir owd = cwd.path files = cwd.ge...
0
0
0
0
0
0
recipes/Python/360698_Extending_pythprolog_syntax/recipe-360698.py
tdiprima/code
2,023
3274523
<reponame>tdiprima/code # # pythologic2.py # # Add logic programming (Prolog) syntax and *resolution* into Python. # # (c) 2004 <NAME> # after (c) 2004 <NAME> # and AIMA examples # import string import copy class Struct: def __init__(self, database, head, subs): """ The head and subs are essenti...
0
0
0
0
0
0
tf2onnx/onnx_opset/traditionalml.py
gcunhase/tensorflow-onnx
1,473
3274547
<reponame>gcunhase/tensorflow-onnx # SPDX-License-Identifier: Apache-2.0 """ traditional ml """ import logging logger = logging.getLogger(__name__)
0
0
0
0
0
0
boto3_type_annotations_with_docs/boto3_type_annotations/lambda_/paginator.py
cowboygneox/boto3_type_annotations
119
3274572
<filename>boto3_type_annotations_with_docs/boto3_type_annotations/lambda_/paginator.py from typing import Dict from botocore.paginate import Paginator class ListAliases(Paginator): def paginate(self, FunctionName: str, FunctionVersion: str = None, PaginationConfig: Dict = None) -> Dict: """ Create...
0
0
0
0
0
0
bikeshed/pyg.py
saschanaz/bikeshed
775
3274617
<gh_stars>100-1000 import re from pygments import token from pygments import style from pygments import formatters # dark text = "#657b83" bg = "#002b36" # light # text = "#839496" # bg = "#fdf6e3" # both yellow = "#b58900" orange = "#cb4b16" red = "#dc322f" magenta = "#d33682" violet = "#6c71c4" blue = "#268bd2" c...
0
0
0
0
0
0
summary.py
chaohuaM/deeplabv3-plus-pytorch
120
3274629
#--------------------------------------------# # 该部分代码用于看网络结构 #--------------------------------------------# import torch from torchsummary import summary from nets.deeplabv3_plus import DeepLab if __name__ == "__main__": # 需要使用device来指定网络在GPU还是CPU运行 device = torch.device('cuda' if torch.cuda.is_...
0
0
0
0
0
0
python/graph_algorithms/Dijkstra's_Shortest_Path_Implementation_using_Adjacency_List.py
jigneshoo7/AlgoBook
191
3274666
<reponame>jigneshoo7/AlgoBook class Node_Distance : def __init__(self, name, dist) : self.name = name self.dist = dist class Graph : def __init__(self, node_count) : self.adjlist = {} self.node_count = node_count def Add_Into_Adjlist(self, src, node_dist) : if src...
0
0
0
0
0
0
pyvista/core/filters/unstructured_grid.py
eino/pyvista
1,107
3274676
"""Filters module with a class to manage filters/algorithms for unstructured grid datasets.""" from functools import wraps from pyvista import abstract_class from pyvista.core.filters.data_set import DataSetFilters from pyvista.core.filters.poly_data import PolyDataFilters @abstract_class class UnstructuredGridFilte...
0
2
0
0
2
0
CommonRequestSingleton.py
jxhsjxhs/DDNS
278
3274680
''' 获取阿里云Common Request请求类 单实例 Created By <NAME> on 2018/5/26 ''' from aliyunsdkcore.request import CommonRequest class CommonRequestSing: #私有类变量 __request: None = None #该修饰符将实例方法变成类方法 #,因为类方法无法操作私有的类变量,所以使用实例方法进行操作,再进行转换为类方法 @classmethod def getInstance(self) -> object: if self.__requ...
0
1
1
0
2
0
sandbox/util_music.py
Nijta/project-NN-Pytorch-scripts
150
3274691
#!/usr/bin/env python """ util_music.py Utilities for music applications """ from __future__ import absolute_import from __future__ import print_function import sys import numpy as np import torch import torch.nn as torch_nn import torch.nn.functional as torch_nn_func import sandbox.dynamic_prog as nii_dy __autho...
8
9
0
2
19
0
parsers/__init__.py
nikisweeting/security-growler
828
3274693
from __future__ import annotations from settings import WATCHED_SOURCES from parsers import default PARSERS = {} for source, parsers in WATCHED_SOURCES.items(): parsers = [parsers] if type(parsers) == str else parsers parser_modules = [] for module_name in parsers: if module_name: try:...
1
2
0
0
3
0
data/kg/prepare_data_for_transx.py
lushishuai/A-recommendation-system-with-fusion-relation-extraction
390
3274726
<gh_stars>100-1000 def prepare_data(kg_in, triple_out, relation_out, entity_out): relation2index = {} entity2index = {} relation_list = [] entity_list = [] reader_kg = open(kg_in, encoding='utf-8') writer_triple = open(triple_out, 'w', encoding='utf-8') writer_relation = open(relation_out, ...
0
0
0
0
0
0
src/c3nav/mapdata/management/commands/cleangeometries.py
johnjohndoe/c3nav
132
3274729
from django.core.management.base import BaseCommand from django.db import transaction from c3nav.mapdata.models.geometry.base import GeometryMixin from c3nav.mapdata.utils.models import get_submodels class Command(BaseCommand): help: str = 'clean-up/fix all geometries in the database' def handle(self, *args...
0
0
1
0
1
0
profiles/views/common.py
Sispheor/squest
112
3274744
from django.contrib.auth.decorators import login_required from django.shortcuts import render from profiles.models import Token @login_required def profile(request) -> object: tokens = Token.objects.filter(user=request.user) context = { 'tokens': tokens, 'current_tab': 'details' } if ...
0
1
0
0
1
0
tests/nn/fc_test.py
claycurry34/e3nn
385
3274767
import torch import pytest from e3nn.nn import FullyConnectedNet from e3nn.util.test import assert_auto_jitable @pytest.mark.parametrize('act', [None, torch.tanh]) @pytest.mark.parametrize('var_in, var_out, out_act', [(1, 1, False), (1, 1, True), (0.1, 10.0, False), (0.1, 0.05, True)]) def test_variance(act, var_in,...
0
0
0
0
0
0
nn_pruning/tests/test_quantization.py
ebell495/nn_pruning
250
3274775
import unittest from transformers import AutoModelForQuestionAnswering, AutoTokenizer from nn_pruning.modules.quantization import ( prepare_qat, prepare_static, quantize, ) class TestQuantization(unittest.TestCase): def _test_quantization(self, prepare_fn): model_name = "bert-base-uncased" ...
0
0
0
0
0
0
tests/test_packages/test_skills/test_fetch_beacon/test_behaviours.py
devjsc/agents-aea
126
3274784
<filename>tests/test_packages/test_skills/test_fetch_beacon/test_behaviours.py<gh_stars>100-1000 # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # y...
0
0
0
0
0
0
utils/mqtt-test/publisher.py
chemetc/maskcam
179
3274860
import json import random import time from datetime import datetime, timezone from broker import connect_mqtt_broker def publish(client): while True: time.sleep(1) # Test topic test_topic = "test" test_result = client.publish( test_topic, json.dumps( ...
0
0
0
0
0
0
photutils/utils/_misc.py
rosteen/photutils
167
3274894
<reponame>rosteen/photutils<gh_stars>100-1000 # Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module provides tools to return the installed astropy and photutils versions. """ from datetime import datetime, timezone import sys def _get_version_info(): """ Return a dictionary of the in...
0
0
0
0
0
0
pkl_conversion/run_conversion.py
opcheese/GANInterface
208
3274907
# Copyright (c) 2019, NVIDIA Corporation. All rights reserved. # # This work is made available under the Nvidia Source Code License-NC. # To view a copy of this license, visit # https://nvlabs.github.io/stylegan2/license.html import argparse import numpy as np import PIL.Image #import dnnlib #import dnnlib.tflib as tf...
0
1
0
0
1
0
src/config.py
baajur/tensorflow-DSMM
231
3274944
<filename>src/config.py DATA_DIR = "../data" TRAIN_FILE = DATA_DIR + "/train.csv" TEST_FILE = DATA_DIR + "/test.csv" TRAIN_FEATURES_FILE = DATA_DIR + "/train_features.npy" TEST_FEATURES_FILE = DATA_DIR + "/test_features.npy" QUESTION_FILE = DATA_DIR + "/question.csv" WORD_EMBEDDING_FILE = DATA_DIR + "/word_embed....
0
0
0
0
0
0
tg/migrations/0002_auto_20180402_0255.py
horacexd/clist
166
3275013
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-04-02 02:55 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ('tg', '0001_initial'), ] operations: list[object] = [ migr...
0
0
2
0
2
0
zipline/utils/calendars.py
leonarduschen/zipline
14,525
3275022
# flake8: noqa # reexport trading_calendars for backwards compat from trading_calendars import ( clear_calendars, deregister_calendar, get_calendar, register_calendar, register_calendar_alias, register_calendar_type, TradingCalendar, )
0
0
0
0
0
0
SimGeneral/MixingModule/python/ecalDigitizer_Ph2_cfi.py
ckamtsikis/cmssw
852
3275024
<filename>SimGeneral/MixingModule/python/ecalDigitizer_Ph2_cfi.py import FWCore.ParameterSet.Config as cms from SimCalorimetry.EcalSimProducers.ecalDigiParameters_Ph2_cff import * from SimCalorimetry.EcalSimProducers.apdSimParameters_cff import * from SimCalorimetry.EcalSimProducers.ecalSimParameterMap_cff import * fr...
0
0
0
0
0
0
qiskit/utils/run_circuits.py
t-imamichi/qiskit-core
1,456
3275031
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
28
6
0
0
34
0
check/validate/apps/gstwebrtc.py
siddhya/gstwebrtc-demos
451
3275032
<filename>check/validate/apps/gstwebrtc.py # Copyright (c) 2020, <NAME> <<EMAIL>> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option...
0
0
0
0
0
0
src/mcedit2/editortools/move.py
elcarrion06/mcedit2
673
3275040
from __future__ import annotations """ move """ from __future__ import absolute_import, division, print_function import logging from PySide import QtGui from mcedit2.command import SimpleRevisionCommand from mcedit2.editortools import EditorTool from mcedit2.imports import PendingImportNode, PendingImport from m...
1
5
3
3
12
0
sdk/cognitiveservices/azure-cognitiveservices-search-videosearch/azure/cognitiveservices/search/videosearch/_video_search_client.py
rsdoherty/azure-sdk-for-python
2,728
3275050
<reponame>rsdoherty/azure-sdk-for-python # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsof...
0
0
0
0
0
0
palindrome.py
aayushishere/Hactoberfest2020
266
3275098
#check if a word is a palindrome while True: x = 0 list= input("enter numbers to check if its a palindrome: ") first_check = (list[:]) second_check = (list[::-1]) if first_check == second_check: print( list + " is a palindrome") else: print(list + " is not a palindrome please") ...
0
0
0
0
0
0
scripts/monitoring/ops-zagg-heartbeater.py
fahlmant/openshift-tools
164
3275102
#!/usr/bin/env python2 # vim: expandtab:tabstop=4:shiftwidth=4 # # Copyright 2015 Red Hat 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/license...
0
0
0
0
0
0
loss/make_loss.py
WesleyZhang1991/Google_Landmark_Retrieval_2021_2nd_Place_Solution
150
3275103
<filename>loss/make_loss.py<gh_stars>100-1000 # encoding: utf-8 """ @author: liaoxingyu @contact: <EMAIL> """ import torch.nn.functional as F import torch from .softmax_loss import CrossEntropyLabelSmooth, LabelSmoothingCrossEntropy from .triplet_loss import TripletLoss def make_loss(cfg, num_classes): # modifie...
0
0
0
0
0
0
Technical_Indicators/b_indicator.py
vhn0912/Finance
441
3275109
<reponame>vhn0912/Finance<filename>Technical_Indicators/b_indicator.py import numpy as np import pandas as pd import matplotlib.pyplot as plt import warnings warnings.filterwarnings("ignore") import yfinance as yf yf.pdr_override() import datetime as dt # input symbol = 'AAPL' start = dt.date.today() - dt.timedelta(d...
0
0
0
0
0
0
play-1.2.4/python/Lib/site-packages/Rpyc/Channel.py
AppSecAI-TEST/restcommander
550
3275126
from threading import RLock import struct class Channel(object): """ a channel transfers frames over a stream. a frame is any blob of data, up to 4GB in size. it is made of a type field (byte), a sequence number (dword), and a length field (dword), followed by raw data. at the end of the frame, a ...
0
5
2
1
8
0
calamari_ocr/test/test_train_consistency.py
jacektl/calamari
922
3275142
<reponame>jacektl/calamari import unittest from math import log10, floor from tensorflow import keras from calamari_ocr.ocr.scenario import CalamariScenario from calamari_ocr.test.test_train_file import uw3_trainer_params def round_sig(x, sig=6): return round(x, sig - int(floor(log10(abs(x)))) - 1) class Test...
0
0
0
0
0
0
tests/dbus/network/test_network_manager.py
peddamat/home-assistant-supervisor-test
597
3275144
<filename>tests/dbus/network/test_network_manager.py<gh_stars>100-1000 """Test NetwrokInterface.""" from unittest.mock import AsyncMock import pytest from supervisor.dbus.network import NetworkManager from supervisor.exceptions import HostNotSupportedError from tests.const import TEST_INTERFACE # pylint: disable=pr...
0
0
0
0
0
0
test/run/t456.py
timmartin/skulpt
2,671
3275157
<filename>test/run/t456.py ctr = 0 def f(): global ctr ctr += 1 return ctr lst = range(4) lst[f()] += 3 print lst
0
0
0
0
0
0
tests/test_time.py
basnijholt/HASS-data-detective
128
3275161
<gh_stars>100-1000 """Tests for time helper.""" from datetime import datetime from time import time as builtin_time import pytest from detective import time def test_sqlalch_datetime(): # a datetime string should return a datetime result = time.sqlalch_datetime('2018-12-05 10:36:44.900394') assert resul...
0
0
0
0
0
0
2019/06/14/Getting Started With Flask-SQLAlchemy [2019]/flask_sqlalchemy_intro/app.py
kenjitagawa/youtube_video_code
492
3275173
from datetime import datetime from flask import Flask from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///db.sqlite3' db = SQLAlchemy(app) class User(db.Model): id = db.Column(db.Int...
0
2
0
0
2
0
players_on_court/players_on_court.py
airalcorn2/NBA_Tutorials
123
3275190
<filename>players_on_court/players_on_court.py import json import pandas as pd import urllib3 pd.set_option('display.max_columns', 500) pd.set_option('display.width', 1000) header_data = { 'Connection': 'keep-alive', 'Accept': 'application/json, text/plain, */*', 'x-nba-stats-token': 'true', 'User-A...
0
0
0
0
0
0
apps/policies/forms.py
seanlefevre/openduty
145
3275194
<filename>apps/policies/forms.py from django import forms from apps.policies.models import SchedulePolicy class SchedulePolicyForm(forms.ModelForm): name = forms.CharField( required=True, label='Policy name', widget=forms.TextInput( attrs={'type': 'text', 'class': "form-control...
0
0
0
0
0
0
mcpipy/turtledonut.py
wangtt03/raspberryjammod
338
3275198
<filename>mcpipy/turtledonut.py # # Code by <NAME> and under the MIT license # from mineturtle import * t = Turtle() t.pendelay(0) radius = 20 circumference = 2 * radius * pi t.penwidth(10) t.penblock(block.GLASS) for i in range(90): t.go(circumference/90.) t.left(4) t.penwidth(7) t.penblock(b...
0
0
0
0
0
0
test/python/test_api.py
XinChCh/singa
2,354
3275230
# # 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...
12
18
0
0
30
0
kivy/tests/test_lang_pre_process_and_post_process.py
Galland/kivy
13,889
3275232
from __future__ import annotations import unittest import textwrap from collections import defaultdict class TrackCallbacks(object): kv_pre_events: list[object] = [] '''Stores values added during the pre event dispatched callbacks. ''' kv_applied_events: list[object] = [] '''Stores values added ...
2
2
16
0
20
0
finance_ml/multiprocessing/utils.py
BTETON/finance_ml
446
3275241
from __future__ import annotations import time from datetime import datetime import sys from copy import deepcopy import multiprocessing as mp import multiprocessing.pool from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor from concurrent.futures import _base from concurrent.futures.process import _g...
2
4
0
0
6
0
RecoPixelVertexing/PixelLowPtUtilities/python/StripSubClusterShapeFilter_cfi.py
ckamtsikis/cmssw
852
3275257
<gh_stars>100-1000 import FWCore.ParameterSet.Config as cms StripSubClusterShapeFilterParams = cms.PSet( maxNSat = cms.uint32(3), trimMaxADC = cms.double(30.), trimMaxFracTotal = cms.double(0.15), trimMaxFracNeigh = cms.double(0.25), maxTrimmedSizeDiffPos = cms.double(0.7), maxTrimmedSizeDiffNe...
0
0
0
0
0
0
viosock/vioconnect.py
kostyanf14/kvm-guest-drivers-windows
982
3275261
#!/usr/bin/python import socket import os, os.path import time from collections import deque with open('viosock.inf') as f: read_data = f.read() client = socket.socket(socket.AF_VSOCK, socket.SOCK_STREAM) client.connect((3,401)) client.send(read_data.encode('utf-8')) packet = client.recv(65536) if packet: p...
0
0
0
0
0
0
plato/samplers/modality_iid.py
cuiboyuan/plato
135
3275287
""" Samples data from a dataset, biased across modalities in an independent and identically distributed (IID) fashion. Thus, all modalities of one sample are utilized as the input. There is no difference between the train sampler and test sampler. """ import numpy as np from plato.samplers import base cla...
0
2
0
0
2
0
fuzz/make_seed.py
networkException/pam-u2f
449
3275291
#!/usr/bin/env python3 # append the 1 byte the fuzzer needs to decide which format to choose, # 1 byte for debug or not and then 4 bytes for the srandom() seed. # run this script and then merge the generated seeds to the corpus. # Note: this has already been done with the existing corpus. This # script is included in ...
0
0
0
0
0
0
tests/NeuronCSVDataTranslatorTest.py
marcodafonseca/PyOpenWorm
118
3275298
from __future__ import absolute_import from __future__ import print_function try: from unittest.mock import patch except ImportError: from mock import patch import os import tempfile import shutil from os.path import join as p from rdflib.term import URIRef from owmeta.data_trans.neuron_data import NeuronCSVDa...
0
2
0
0
2
0
flexxamples/testers/minsize.py
tbnorth/flexx
1,662
3275370
<gh_stars>1000+ """ Test minsize property. """ from flexx import flx class Tester(flx.Widget): def init(self): super().init() with flx.VBox(): flx.Label(text='You should see 5 pairs of buttons') with flx.HFix(): # Use minsize in CSS of button widget wi...
0
0
0
0
0
0
python/mxnet/gluon/probability/distributions/exp_family.py
pioy/incubator-mxnet
211
3275420
<filename>python/mxnet/gluon/probability/distributions/exp_family.py # 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 u...
0
0
0
0
0
0
add-ons/electriceye-response/raw-source/S3_Put_Lifecycle_Playbook.py
kbhagi/ElectricEye
442
3275431
#This file is part of ElectricEye. #SPDX-License-Identifier: Apache-2.0 #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 un...
0
0
0
0
0
0
video_auto/制作GIF视频/utils/video_utils.py
liusongtao99/tools_python
130
3275462
#!/usr/bin/env python # encoding: utf-8 """ @version: v1.0 @author: xag @license: Apache Licence @contact: <EMAIL> @site: http://www.xingag.top @software: PyCharm @file: video_utils.py @time: 5/28/19 21:08 @description:视频工具类 """ from moviepy.editor import * from utils.math_utils import * def pics_to_v...
0
0
0
0
0
0
lwp/exceptions.py
cocoy/LXC-Web-Panel
237
3275553
<reponame>cocoy/LXC-Web-Panel<gh_stars>100-1000 class LxcConfigFileNotComplete(Exception): pass class ContainerNotExists(Exception): pass class ContainerAlreadyExists(Exception): pass class ContainerDoesntExists(Exception): pass class ContainerAlreadyRunning(Exception): pass class Containe...
0
0
0
0
0
0
src/sims4communitylib/dialogs/option_dialogs/common_multi_pane_choose_option_dialog.py
velocist/TS4CheatsInfo
118
3275561
""" The Sims 4 Community Library is licensed under the Creative Commons Attribution 4.0 International public license (CC BY 4.0). https://creativecommons.org/licenses/by/4.0/ https://creativecommons.org/licenses/by/4.0/legalcode Copyright (c) COLONOLNUTTY """ from pprint import pformat import sims4.commands from typi...
22
6
3
0
31
0
angr/knowledge_plugins/xrefs/__init__.py
Kyle-Kyle/angr
6,132
3275580
from .xref_types import XRefType from .xref import XRef from .xref_manager import XRefManager
0
0
0
0
0
0
appscan/navigation_views.py
zx273983653/vulscan
582
3275599
<reponame>zx273983653/vulscan<filename>appscan/navigation_views.py #coding=utf-8 #导入公共函数库 from function import * #导入数据库模型 from appscan.models import navigation,navigation_url # Create your views here. import sys reload(sys) sys.setdefaultencoding("utf-8") def index(request): #navigation = navigation.objects.fiter(...
0
0
0
0
0
0
mayan/apps/messaging/api_views.py
atitaya1412/Mayan-EDMS
343
3275640
from mayan.apps.rest_api import generics from .permissions import ( permission_message_create, permission_message_delete, permission_message_edit, permission_message_view ) from .serializers import MessageSerializer class APIMessageDetailView(generics.RetrieveUpdateDestroyAPIView): """ delete: Delete...
0
4
5
0
9
0
dojo/db_migrations/0035_push_all_issues_help_text_rename_gh_fields.py
mtcolman/django-DefectDojo
1,772
3275650
# Generated by Django 2.2.10 on 2020-03-10 19:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ('dojo', '0034_add_github_support'), ] operations: list[object] = [ migrations.AlterField( model_name='jir...
0
0
2
0
2
0
glucosetracker/accounts/models.py
arhanair/glucose-tracker-monitor
134
3275690
<gh_stars>100-1000 from django.db import models from django.conf import settings from django.contrib.auth.models import User from timezone_field import TimeZoneField from core.models import TimeStampedModel from glucoses.models import Category, Unit class UserSettings(TimeStampedModel): """ Model to store a...
0
0
0
0
0
0
tools/aircraft/update_optd_aircraft.py
mtrampont/opentraveldata
208
3275699
#!/usr/bin/env python from bs4 import BeautifulSoup import requests target_file = "../../opentraveldata/optd_aircraft.csv" sep = '^' header = ['iata_code', 'manufacturer', 'model', 'iata_group', 'iata_category', 'icao_code', 'nb_engines', 'aircraf...
0
2
0
0
2
0
src/numbers_parser/exceptions.py
jessie-murray/numbers-parser
110
3275707
class NumbersError(Exception): """Base class for other exceptions""" pass class UnsupportedError(NumbersError): """Raised for unsupported file format features""" pass class NotImplementedError(NumbersError): """Raised for missing Protobufs""" pass class FileError(NumbersError): """R...
0
0
0
0
0
0
moya/context/modifiers.py
moyaproject/moya
129
3275718
from __future__ import annotations from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from ..versioning import Version, VersionSpec from ..url import URL, get_domain, urlencode from ..compat import ( text_type, py2bytes, string_types, in...
4
179
0
0
183
0