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
util/secscan/__init__.py
ibazulic/quay
2,027
197629
<filename>util/secscan/__init__.py # NOTE: This objects are used directly in the external-notification-data and vulnerability-service # on the frontend, so be careful with changing their existing keys. PRIORITY_LEVELS = { "Unknown": { "title": "Unknown", "value": "Unknown", "index": 5, ...
0
0
0
0
0
0
native_client/tools/test_lib.py
zipated/src
2,151
197658
<filename>native_client/tools/test_lib.py #!/usr/bin/python # Copyright (c) 2011 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Testing Library For Nacl. """ import atexit import difflib import os import re impo...
0
0
0
0
0
0
tests/admin_scripts/app_raising_warning/models.py
ni-ning/django
61,676
197663
from django.core import checks from django.db import models class ModelRaisingMessages(models.Model): @classmethod def check(self, **kwargs) -> list[object]: return [checks.Warning('A warning')]
0
1
0
0
1
0
tests/test_exception_handling.py
lv-cha/zipline-chinese
606
197696
<filename>tests/test_exception_handling.py # # Copyright 2013 Quantopian, 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 re...
0
0
0
0
0
0
components/policy/tools/template_writers/writers/mock_writer.py
sarang-apps/darshan_browser
575
197699
<reponame>sarang-apps/darshan_browser #!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from template_writer import TemplateWriter class MockWriter(TemplateWriter): '''Helper cl...
0
0
0
0
0
0
python/perspective/perspective/table/table.py
datalayer-externals/perspective
2,436
197711
################################################################################ # # Copyright (c) 2019, the Perspective Authors. # # This file is part of the Perspective library, distributed under the terms of # the Apache License 2.0. The full license can be found in the LICENSE file. # from __future__ import annot...
13
12
0
3
28
0
aws_gate/session.py
ckornacker/aws-gate
369
197715
from __future__ import annotations import logging from aws_gate.constants import AWS_DEFAULT_PROFILE, AWS_DEFAULT_REGION from aws_gate.decorators import ( plugin_version, plugin_required, valid_aws_profile, valid_aws_region, ) from aws_gate.query import query_instance from aws_gate.session_common impor...
1
0
0
1
2
0
examples/viterbi_wikipedia_example.py
careyjiang/tensorflow_hmm
325
197721
<gh_stars>100-1000 """ An example using both tensorflow and numpy implementations of viterbi replicating example on wikipedia """ from __future__ import print_function __author__ = '<NAME> <<EMAIL>>' import tensorflow as tf import numpy as np from tensorflow_hmm import HMMNumpy, HMMTensorflow def dptable(V, pathS...
0
0
0
0
0
0
cherrypy/scaffold/__init__.py
duper51/cherrypy
1,822
197760
from __future__ import annotations """<MyProject>, a CherryPy application. Use this as a base for creating new CherryPy applications. When you want to make a new app, copy and paste this folder to some other location (maybe site-packages) and rename it to the name of your project, then tweak as desired. Even before a...
3
3
0
0
6
0
solutions/problem_261.py
ksvr444/daily-coding-problem
1,921
197774
<reponame>ksvr444/daily-coding-problem from queue import Queue class Node: def __init__(self, char, count): self.ch = char self.ct = count self.lt = None self.rt = None def __repr__(self): return "{}=>[ct={},lt={},rt={}]".format(self.ch, self.ct, self.lt, self.rt) de...
0
0
0
0
0
0
pkgs/build-support/vm/windows/cygwin-iso/mkclosure.py
peanutbutter144/nixpkgs
201
197820
<reponame>peanutbutter144/nixpkgs<gh_stars>100-1000 # Ugliest Python code I've ever written. -- aszlig import sys def get_plist(path): in_pack = False in_str = False current_key = None buf = "" packages = {} package_name = None package_attrs = {} with open(path, 'r') as setup: f...
0
0
0
0
0
0
applications/ConvectionDiffusionApplication/test_examples/square.gid/rotatingcone_PureConvection_build_reference.py
lkusch/Kratos
778
197831
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 import sys kratos_benchmarking_path = '../../../../benchmarking' sys.path.append(kratos_benchmarking_path) import benchmarking print("Building reference data for rotatingcone_PureConve...
0
0
0
0
0
0
fund/closed_end_fund.py
cogitate3/stock
3,401
197862
# -*- coding: utf-8 -*- # website: http://30daydo.com # @Time : 2020/8/3 19:01 # @File : closed_end_fund.py # 抓取封闭式基金数据 from __future__ import annotations import datetime import requests import sys sys.path.append('..') from configure.settings import DBSelector from common.BaseService import BaseService from configu...
0
4
0
1
5
0
saas/api/subscriptions.py
kaiserho/djaodjin-saas
383
197868
# Copyright (c) 2021, DjaoDjin inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
3
12
2
0
17
0
eval/model_lc.py
xvdp/MemDPC
160
197870
<gh_stars>100-1000 import math import numpy as np import sys sys.path.append('../') from backbone.select_backbone import select_resnet from backbone.convrnn import ConvGRU import torch import torch.nn as nn import torch.nn.functional as F class LC(nn.Module): '''Linear Classifier''' def __init__(self, sample_...
0
0
0
0
0
0
questions/excel-sheet-column-number/Solution.py
marcus-aurelianus/leetcode-solutions
141
197871
""" Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 ... Example 1: Input: "A" Output: 1 Example 2: Input: "AB" Output: 28 Example 3: Input: "ZY" Output: 701 """ class Solutio...
1
1
0
0
2
0
bagpy/bagreader.py
jmscslgroup/rosbagpy
107
197883
<reponame>jmscslgroup/rosbagpy #!/usr/bin/env python # coding: utf-8 # Author : <NAME> # Initial Date: March 2, 2020 # About: bagreader class to read ros bagfile and extract relevant data # License: MIT License # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and ...
0
0
0
0
0
0
modules/audio_processing/test/py_quality_assessment/quality_assessment/export.py
gaoxiaoyang/webrtc
2,151
197914
# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project au...
0
13
3
1
17
0
courses/backend/django-for-everybody/Web Application Technologies and Django/resources/dj4e-samples/cats/meow.py
Nahid-Hassan/fullstack-software-development
297
197915
<reponame>Nahid-Hassan/fullstack-software-development import random from random import randrange breedstr = '''Persian Siamese Sphinx Burmese Tabby Manx''' namestr='''Bella Kitty Lily Lilly Charlie Lucy Leo Milo Jack Nala Sam Simba Chloe Baby Sadie Ziggy Princess Salem Sophie Shadow Izzy Cleo Boots Loki Daisy Cooper ...
0
0
0
0
0
0
vega/modules/loss/mean_loss.py
jie311/vega
724
197945
<gh_stars>100-1000 # -*- coding: utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANT...
0
0
0
0
0
0
vlcp/service/sdn/plugins/networkvxlandriver.py
hubo1016/vlcp
252
197947
<reponame>hubo1016/vlcp from vlcp.server.module import Module, publicapi from vlcp.event.runnable import RoutineContainer from vlcp.utils.networkmodel import PhysicalNetworkMap, PhysicalNetwork,\ VXLANEndpointSet from vlcp.config.config import defaultconfig from vlcp.utils.networkplugin import createphysicalnetwork...
0
0
0
0
0
0
tests/openbb_terminal/stocks/sector_industry_analysis/test_stockanalysis_model.py
tehcoderer/GamestonkTerminal
255
197948
<reponame>tehcoderer/GamestonkTerminal # IMPORTATION STANDARD import pandas as pd import numpy as np # IMPORTATION THIRDPARTY import pytest # IMPORTATION INTERNAL from openbb_terminal.stocks.sector_industry_analysis import stockanalysis_model @pytest.mark.vcr @pytest.mark.parametrize( "stocks, finance_key, sa_k...
0
0
0
0
0
0
Hackerrank/Practice/Python/15.numpy/15.Linear Algebra.py
kushagra1212/Competitive-Programming
994
197952
<filename>Hackerrank/Practice/Python/15.numpy/15.Linear Algebra.py import numpy n=int(input()) numpy.set_printoptions(legacy='1.13') arr1=([list(map(float,input().split()))for _ in range(n)]) print (numpy.linalg.det(arr1))
0
0
0
0
0
0
Contrib/LEF/CreateFps.py
kazuyaujihara/rdkit
1,609
197988
# # Copyright (c) 2009, Novartis Institutes for BioMedical Research Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyri...
0
1
0
0
1
0
backend/django/core/migrations/0023_trainingset_celery_task_id.py
RTIInternational/SMART
185
198014
<filename>backend/django/core/migrations/0023_trainingset_celery_task_id.py # -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-10-27 19:13 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("core", "0022_dat...
0
0
0
0
0
0
tests/recipes/test_libcurl.py
ht-thomas/python-for-android
6,278
198025
import unittest from tests.recipes.recipe_lib_test import BaseTestForMakeRecipe class TestLibcurlRecipe(BaseTestForMakeRecipe, unittest.TestCase): """ An unittest for recipe :mod:`~pythonforandroid.recipes.libcurl` """ recipe_name: str = "libcurl" sh_command_calls: list[str] = ["./configure"]
0
0
2
0
2
0
jiant/tasks/lib/templates/multiple_choice.py
go-inoue/jiant
1,108
198047
<reponame>go-inoue/jiant from abc import ABC import numpy as np import torch from dataclasses import dataclass from typing import List from jiant.tasks.core import ( Task, TaskTypes, BaseExample, BaseTokenizedExample, BaseDataRow, BatchMixin, ) from jiant.tasks.lib.templates.shared import ( ...
0
0
0
0
0
0
pypeln/task/api/flat_map_task_test.py
quarckster/pypeln
1,281
198072
<filename>pypeln/task/api/flat_map_task_test.py import asyncio import sys import time import typing as tp from unittest import TestCase import cytoolz as cz import hypothesis as hp from hypothesis import strategies as st import pypeln as pl MAX_EXAMPLES = 10 T = tp.TypeVar("T") @hp.given(nums=st.lists(st.integers(...
0
0
0
0
0
0
widgy/contrib/form_builder/forms.py
IndiumTechnology/django-widgy
168
198081
<gh_stars>100-1000 from django import forms import phonenumbers class PhoneNumberField(forms.CharField): """ A USA or international phone number field. Normalizes its value to a common US format '(303) 555-5555' for US phone numbers, and an international format for others -- '+86 10 6944 5464'. Also s...
0
0
0
0
0
0
taming/data/sflckr.py
fuzzbuck/taming-transformers
2,492
198084
from __future__ import annotations import os import numpy as np import cv2 import albumentations from PIL import Image from torch.utils.data import Dataset class SegmentationBase(Dataset): def __init__(self, data_csv, data_root, segmentation_root, size: object | None=None, random...
8
2
0
1
11
0
var/spack/repos/builtin/packages/psi4/package.py
LiamBindle/spack
2,360
198119
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from __future__ import annotations import os from spack import * class Psi4(CMakePackage): """Psi4 is an open-sourc...
0
1
2
0
3
0
plugin.video.fanfilm/resources/lib/resolvers/vk.py
mrknow/filmkodi
105
198155
<filename>plugin.video.fanfilm/resources/lib/resolvers/vk.py<gh_stars>100-1000 # -*- coding: utf-8 -*- ''' FanFilm Add-on Copyright (C) 2015 lambda This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Sof...
0
0
0
0
0
0
tensorflow/python/eager/graph_only_ops_test.py
PaulWang1905/tensorflow
848
198156
# Copyright 2017 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/LICENSE-2.0 # # Unless required by applica...
0
0
0
0
0
0
ranger/verify_ranger.py
deep2064/initialization-actions
426
198165
"""verify_ranger.py: this script runs tests on node running ranger admin Test logic: 1. Testing ranger admin UI: Default ranger admin port is set to 6080. This test validates if ranger admin is available on this port. 2. Testing hdfs. By default user has permissions to list content of its user directory on hdfs. This...
0
1
0
0
1
0
tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_spm_half_cell.py
manjunathnilugal/PyBaMM
330
198173
<reponame>manjunathnilugal/PyBaMM<gh_stars>100-1000 # # Tests for the half-cell lithium-ion SPM model # import pybamm import unittest from tests import BaseIntegrationTestLithiumIonHalfCell class TestSPMHalfCell(BaseIntegrationTestLithiumIonHalfCell, unittest.TestCase): def setUp(self): self.model = pybam...
0
0
0
0
0
0
exps/search-transformable.py
shashank3959/NAS-Projects
923
198183
<reponame>shashank3959/NAS-Projects ################################################## # Copyright (c) <NAME> [GitHub D-X-Y], 2019 # ####################################################################### # Network Pruning via Transformable Architecture Search, NeurIPS 2019 # ###########################################...
0
0
0
0
0
0
srsly/tests/ruamel_yaml/test_api_change.py
Hirni-Meshram2/srsly
255
198207
# coding: utf-8 from __future__ import print_function """ testing of anchors and the aliases referring to them """ import sys import textwrap import pytest from pathlib import Path class TestNewAPI: def test_duplicate_keys_00(self): from srsly.ruamel_yaml import YAML from srsly.ruamel_yaml.cons...
0
2
0
0
2
0
MyTest_MulClsLungInf_UNet.py
yxn-coder/Inf-Net
273
198221
# -*- coding: utf-8 -*- """Preview Code for 'Inf-Net: Automatic COVID-19 Lung Infection Segmentation from CT Scans' submit to Transactions on Medical Imaging, 2020. First Version: Created on 2020-05-13 (@author: <NAME>) """ import os import numpy as np from Code.utils.dataloader_MulClsLungInf_UNet import LungDataset...
0
0
0
0
0
0
sapd_layers.py
qwoprocks/SAPD
104
198233
from __future__ import annotations from tensorflow.keras.layers import Layer # from keras.layers import Layer import tensorflow as tf from util_graphs import trim_padding_boxes, normalize_boxes, shrink_and_project_boxes from losses import focal, iou class MetaSelectInput(Layer): def __init__(self, strides: tuple[...
12
30
0
0
42
0
tools/gen_esp_err_to_name.py
cablelabs/esp-idf
8,747
198245
<reponame>cablelabs/esp-idf<filename>tools/gen_esp_err_to_name.py #!/usr/bin/env python # # Copyright 2018 Espressif Systems (Shanghai) PTE 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...
0
0
0
0
0
0
tests/python/unittest/test_tir_usmp_utils.py
XiaoSong9905/tvm
4,640
198255
<reponame>XiaoSong9905/tvm # 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 ...
0
0
0
0
0
0
coremltools/converters/onnx/_graph_viz.py
LaudateCorpus1/coremltools
11,356
198290
<filename>coremltools/converters/onnx/_graph_viz.py import os def _shape_notation(int_shape): X = ["S", "B", "C", "H", "W"] return [X[i] for i in int_shape] def plot_graph(graph, graph_img_path="graph.png", show_coreml_mapped_shapes=False): """ Plot graph using pydot It works in two steps: ...
0
0
0
0
0
0
src/clusto/commands/pool.py
thekad/clusto
216
198311
<filename>src/clusto/commands/pool.py #!/usr/bin/env python # -*- mode: python; sh-basic-offset: 4; indent-tabs-mode: nil; coding: utf-8 -*- # vim: tabstop=4 softtabstop=4 expandtab shiftwidth=4 fileencoding=utf-8 import sys import clusto from clusto import drivers from clusto import script_helper class Pool(script...
0
0
0
0
0
0
tests/test_init.py
chainer/chainerui
185
198314
from mock import MagicMock import pytest from six import string_types from sqlalchemy.exc import OperationalError from chainerui.database import db from tests.helpers import assert_json_api @pytest.fixture(autouse=True, scope='function') def setup_mock_db(): # not setup database db._initialized = True m...
0
0
0
0
0
0
asteval/asteval.py
sthagen/asteval
125
198352
#!/usr/bin/env python from __future__ import annotations """Safe(ish) evaluation of mathematical expression using Python's ast module. This module provides an Interpreter class that compiles a restricted set of Python expressions and statements to Python's AST representation, and then executes that representation usin...
38
46
0
12
96
0
lhotse/bin/modes/validate.py
rosrad/lhotse
353
198358
from pathlib import Path import click from lhotse.bin.modes.cli_base import cli from lhotse.utils import Pathlike @cli.command(name="validate") @click.argument("manifest", type=click.Path(exists=True, dir_okay=False)) @click.option( "--read-data/--dont-read-data", default=False, help="Should the audio/f...
8
0
0
0
8
0
RNN/Cell.py
wangjiangtao-NJPI/MachineLearning
1,107
198366
import tensorflow as tf import tensorflow.contrib.layers as layers from tensorflow.contrib.rnn import LSTMStateTuple class LSTMCell(tf.contrib.rnn.BasicRNNCell): def __call__(self, x, state, scope: str="LSTM") -> tuple[object, object]: with tf.variable_scope(scope): s_old, h_old = state ...
1
2
0
0
3
0
migration/migrator/migrations/course/20180729161731_update_old_merged_thread.py
elihschiff/Submitty
411
198372
<gh_stars>100-1000 def up(config, database, semester, course): database.execute("UPDATE threads SET deleted = false WHERE merged_thread_id <> -1")
0
0
0
0
0
0
TaobaoCrawler(new)/test/postman测试.py
Twentyfour2021/ECommerceCrawlers
3,469
198382
import requests url = "https://h5api.m.taobao.com/h5/mtop.alimama.union.sem.landing.pc.items/1.0/?jsv=2.4.0&appKey=12574478&t=1582716745850&sign=1b91fff529136fed287df8f0056cecd6&api=mtop.alimama.union.sem.landing.pc.items&v=1.0&AntiCreep=true&dataType=jsonp&type=jsonp&ecode=0&callback=mtopjsonp2&data=%7B%22keyword%22%...
0
0
0
0
0
0
venv/lib/python3.6/site-packages/django/contrib/postgres/functions.py
xiegudong45/typeidea
5,079
198389
<reponame>xiegudong45/typeidea from django.db.models import DateTimeField, Func class TransactionNow(Func): template = 'CURRENT_TIMESTAMP' def __init__(self, output_field=None, **extra): if output_field is None: output_field = DateTimeField() super(TransactionNow, self).__init__(o...
0
0
0
0
0
0
基础教程/A1-Python与基础知识/算法第一步/ExampleCodes/chapter16/16-7.py
microsoft/ai-edu
11,094
198394
<filename>基础教程/A1-Python与基础知识/算法第一步/ExampleCodes/chapter16/16-7.py def recursion_test(depth): print("recursion depth:", depth) if depth < 996: recursion_test(depth + 1) else: print("exit recursion") return # 下面是 代码16-5,重复出现,不要出现在代码示例里: recursion_test(1)
0
0
0
0
0
0
tests/test_compileall.py
xtuzy/enaml
1,080
198397
<reponame>xtuzy/enaml # -*- coding: utf-8 -*- #------------------------------------------------------------------------------ # Copyright (c) 2013-2018, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. #--...
0
0
0
0
0
0
anchore/cli/system.py
berez23/anchore
401
198398
<reponame>berez23/anchore import sys import os import re import json import getpass import click import yaml import time import shutil from anchore.cli.common import anchore_print, anchore_print_err from anchore.util import contexts from anchore import anchore_utils, anchore_auth, anchore_feeds config = {} @click.gr...
0
0
0
0
0
0
Hackerank/Python/Breaking the records.py
abdzitter/Daily-Coding-DS-ALGO-Practice
289
198416
<reponame>abdzitter/Daily-Coding-DS-ALGO-Practice #!/bin/python3 import math import os import random import re import sys # # Complete the 'breakingRecords' function below. # # The function is expected to return an INTEGER_ARRAY. # The function accepts INTEGER_ARRAY scores as parameter. # def breakingRecords(scores)...
0
0
0
0
0
0
ST-TR/code/st_gcn/net/st_gcn.py
sharanramjee/st-ctr
173
198417
from __future__ import annotations import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np import math import tqdm from .temporal_transformer_windowed import tcn_unit_attention_block from .temporal_transformer import tcn_unit_attention from .gcn_attenti...
22
3
0
6
31
0
app/backend/src/couchers/migrations/versions/80d30951919d_phone_verifications.py
foormea/couchers
226
198426
<gh_stars>100-1000 """Phone verifications Revision ID: 80d30951919d Revises: <KEY> Create Date: 2021-05-30 22:13:30.713179 """ import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = "80d30951919d" down_revision = "<KEY>" branch_la...
0
0
0
0
0
0
graphql_compiler/tests/snapshot_tests/test_query_pagination.py
kensho-technologies/graphql-compiler
521
198436
<gh_stars>100-1000 # Copyright 2019-present Kensho Technologies, LLC. import datetime from typing import Tuple import unittest from graphql import print_ast import pytest from .. import test_input_data from ...cost_estimation.analysis import analyze_query_string from ...cost_estimation.statistics import LocalStatisti...
0
0
0
0
0
0
dd_1/Part 1/Section 09 - Modules, Packages and Namespaces/08 - structuring_package_imports/common/models/posts/__init__.py
Rebell-Leader/bg
3,266
198441
# posts from .posts import * from .post import * __all__ = (posts.__all__ + post.__all__)
0
0
0
0
0
0
src/tensorrt/tensorrt-3.0.4/examples-pyhon/lite_examples/tf_lite_engine.py
aimuch/AIEnvConfig
250
198447
<reponame>aimuch/AIEnvConfig # # Copyright 1993-2017 NVIDIA Corporation. All rights reserved. # # NOTICE TO LICENSEE: # # This source code and/or documentation ("Licensed Deliverables") are # subject to NVIDIA intellectual property rights under U.S. and # international Copyright laws. # # These Licensed Deliverables c...
0
0
0
0
0
0
nsz/SolidCompressor.py
teknoraver/nsz
418
198448
<reponame>teknoraver/nsz<gh_stars>100-1000 from nsz.nut import Print from os import remove from pathlib import Path from traceback import format_exc from nsz.SectionFs import isNcaPacked, sortedFs from nsz.Fs import factory, Ticket, Pfs0, Hfs0, Nca, Type, Xci from zstandard import FLUSH_FRAME, COMPRESSOBJ_FLUSH_FINISH,...
0
0
0
0
0
0
stellar/__init__.py
kevinjqiu/stellar
932
198465
from . import app from . import command from . import config from . import models from . import operations __version__ = app.__version__
0
0
0
0
0
0
blackmamba/lib/rope/base/oi/type_hinting/interfaces.py
oz90210/blackmamba
463
198481
class ITypeHintingFactory(object): def make_param_provider(self): """ :rtype: rope.base.oi.type_hinting.providers.interfaces.IParamProvider """ raise NotImplementedError def make_return_provider(self): """ :rtype: rope.base.oi.type_hinting.providers.interfaces.I...
0
0
0
0
0
0
validate/validator.py
oymo/protoc-gen-validate
11,628
198490
<gh_stars>1000+ import re from functools import lru_cache from validate_email import validate_email import ipaddress try: import urlparse except ImportError: import urllib.parse as urlparse import uuid import struct from jinja2 import Template import time import sys printer = "" # Well known regex mapping. re...
0
0
0
0
0
0
robonet/video_prediction/training/data_filter.py
russellmendonca/RoboNet
140
198492
<reponame>russellmendonca/RoboNet<filename>robonet/video_prediction/training/data_filter.py from robonet.video_prediction.training.trainable_interface import VPredTrainable import numpy as np class BalancedCamFilter(VPredTrainable): def _default_hparams(self): params = super()._default_hparams() ...
0
0
0
0
0
0
lldb/test/API/lang/objc/objc-new-syntax/ObjCNewSyntaxTest.py
LaudateCorpus1/llvm-project
605
198502
"""Test that the Objective-C syntax for dictionary/array literals and indexing works""" import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class ObjCNewSyntaxTest(TestBase): mydir = TestBase.compute_mydir(__file__) def target(self) ...
0
1
0
0
1
0
head/head_def.py
wangxianliang/FaceX-Zoo
1,329
198508
<reponame>wangxianliang/FaceX-Zoo """ @author: <NAME> @date: 20201019 @contact: <EMAIL> """ import sys import yaml sys.path.append('../../') from head.AdaCos import AdaCos from head.AdaM_Softmax import Adam_Softmax from head.AM_Softmax import AM_Softmax from head.ArcFace import ArcFace from head.CircleLoss import...
0
0
0
0
0
0
homeassistant/components/logentries/__init__.py
MrDelik/core
30,023
198520
"""Support for sending data to Logentries webhook endpoint.""" import json import logging import requests import voluptuous as vol from homeassistant.const import CONF_TOKEN, EVENT_STATE_CHANGED from homeassistant.core import HomeAssistant from homeassistant.helpers import state as state_helper import homeassistant.h...
2
2
0
0
4
0
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_batch_norm.py
2742195759/Paddle
17,085
198551
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
7
13
0
0
20
0
face_alignment/__init__.py
NovemberJoy/VTuber_Unity
669
198556
# -*- coding: utf-8 -*- __author__ = """<NAME>""" __email__ = '<EMAIL>' __version__ = '1.0.0' from .api import FaceAlignment, LandmarksType, NetworkSize
0
0
0
0
0
0
src/storage-preview/azext_storage_preview/_client_factory.py
ravithanneeru/azure-cli-extensions
207
198578
<filename>src/storage-preview/azext_storage_preview/_client_factory.py # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information....
0
0
0
0
0
0
flask_mongoengine/json.py
joaoTrevizoli/flask-mongoengine
675
198593
from bson import json_util from flask.json import JSONEncoder from mongoengine.base import BaseDocument from mongoengine.queryset import QuerySet def _make_encoder(superclass) -> object: class MongoEngineJSONEncoder(superclass): """ A JSONEncoder which provides serialization of MongoEngine ...
0
2
0
0
2
0
demo/credit_card_demo/unzip_utils.py
sungkyu-kim/keras-anomaly-detection
370
198602
<reponame>sungkyu-kim/keras-anomaly-detection import zipfile def unzip(path_to_zip_file, directory_to_extract_to): zip_ref = zipfile.ZipFile(path_to_zip_file, 'r') zip_ref.extractall(directory_to_extract_to) zip_ref.close()
0
0
0
0
0
0
tests/shared/nlu/training_data/test_lookup_tables_parser.py
fintzd/rasa
9,701
198603
import pytest import rasa.shared.nlu.training_data.lookup_tables_parser as lookup_tables_parser def test_add_item_to_lookup_tables(): lookup_item_title = "additional_currencies" lookup_examples = ["Peso", "Euro", "Dollar"] lookup_tables = [] for example in lookup_examples: lookup_tables_par...
0
0
0
0
0
0
v1/download.py
williamsdoug/timeseries_fastai
161
198610
from pathlib import Path from typing import Union import os import shutil import requests from fastprogress.fastprogress import progress_bar import zipfile PathOrStr = Union[Path,str] LOCAL_PATH = Path.cwd() DATA_PATH = Path.home()/'tmp' UCR_LINK = 'http://www.timeseriesclassification.com/Downloads/Archives/Univariat...
16
7
0
0
23
0
tf3d/instance_segmentation/metric.py
deepneuralmachine/google-research
23,901
198623
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
6
1
0
0
7
0
maro/cli/grass/image.py
yangboz/maro
598
198624
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from maro.cli.utils.details_validity_wrapper import check_details_validity from maro.cli.utils.operation_lock_wrapper import operation_lock @check_details_validity @operation_lock def push_image( cluster_name: str, image_name: str, image_p...
5
0
0
0
5
0
skyline/validate_settings_test.py
datastreaming/skyline-1
396
198629
<filename>skyline/validate_settings_test.py<gh_stars>100-1000 import logging import sys import os.path from logging.handlers import TimedRotatingFileHandler, MemoryHandler sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)) sys.path.insert(0, os.path.dirname(__file__)) if True: ...
0
0
0
0
0
0
tensor2tensor/models/research/similarity_transformer.py
jaseweir/tensor2tensor
12,921
198639
<filename>tensor2tensor/models/research/similarity_transformer.py # coding=utf-8 # Copyright 2021 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www...
0
0
0
0
0
0
snips_nlu/dataset/__init__.py
CharlyBlavier/snips-nlu-Copy
3,764
198653
from snips_nlu.dataset.dataset import Dataset from snips_nlu.dataset.entity import Entity from snips_nlu.dataset.intent import Intent from snips_nlu.dataset.utils import ( extract_intent_entities, extract_utterance_entities, get_dataset_gazetteer_entities, get_text_from_chunks) from snips_nlu.dataset.validation...
0
0
0
0
0
0
apps/batch/models.py
crazypenguin/devops
300
198655
<gh_stars>100-1000 from django.db import models # Create your models here. class BatchCmdLog(models.Model): TYPE_CHOICES = ( (1, '命令'), (2, '脚本'), (3, '上传文件'), (4, 'playbook'), (5, 'module'), ) user = models.CharField(max_length=64, verbose_name='操作人') hosts = ...
0
0
0
0
0
0
python/eggroll/core/command/commands.py
liszekei/eggroll
209
198659
# Copyright (c) 2019 - now, Eggroll Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
0
1
25
0
26
0
pontoon/checks/management/commands/run_checks.py
foss4/pontoon
1,145
198667
from celery import ( group, signature, ) from django.core.management.base import BaseCommand from pontoon.base.models import Translation from pontoon.checks import DB_FORMATS from pontoon.checks.tasks import check_translations class Command(BaseCommand): help: str = "Run checks on all translations" ...
0
0
1
0
1
0
openstackclient/tests/functional/identity/v3/test_idp.py
cloudification-io/python-openstackclient
262
198668
# 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 in writing, software # d...
0
0
0
0
0
0
gamestonk_terminal/stocks/options/payoff_controller.py
elan17/GamestonkTerminal
1,835
198694
<filename>gamestonk_terminal/stocks/options/payoff_controller.py """ Payoff Controller Module """ __docformat__ = "numpy" import argparse from typing import List, Dict from prompt_toolkit.completion import NestedCompleter from gamestonk_terminal.rich_config import console from gamestonk_terminal import feature_flags a...
0
0
0
0
0
0
tools/android/customtabs_benchmark/scripts/run_benchmark.py
zipated/src
2,151
198725
<reponame>zipated/src #!/usr/bin/env python # # Copyright 2015 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. """Loops Custom Tabs tests and outputs the results into a CSV file.""" import copy import json import logging ...
0
0
0
0
0
0
flexget/plugins/cli/doc.py
Jeremiad/Flexget
1,322
198739
from __future__ import annotations import sys from loguru import logger from flexget import options from flexget.event import event from flexget.plugin import plugins from flexget.terminal import console logger = logger.bind(name='doc') def trim(docstring) -> object | str: if not docstring: return '' ...
0
1
0
0
1
0
src/olympia/addons/migrations/0018_auto_20200803_1311.py
osamamagdy/addons-server
843
198771
<filename>src/olympia/addons/migrations/0018_auto_20200803_1311.py # Generated by Django 2.2.14 on 2020-08-03 13:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('addons', '0017_addonreviewerflags_notified_about_expiring_delayed_rejections'), ] ...
0
0
0
0
0
0
data-processing/common/s2_data.py
hhchi13/scholarphi
285
198774
<filename>data-processing/common/s2_data.py<gh_stars>100-1000 import logging import os.path from typing import Optional from common import directories def get_s2_id(arxiv_id: str) -> Optional[str]: s2_id_path = os.path.join( directories.arxiv_subdir("s2-metadata", arxiv_id), "s2_id" ) if not os.p...
0
0
0
0
0
0
examples/get_video_thumbnail.py
xDeathzone117x/ffm
6,824
198776
#!/usr/bin/env python from __future__ import unicode_literals, print_function import argparse import ffmpeg import sys parser = argparse.ArgumentParser(description='Generate video thumbnail') parser.add_argument('in_filename', help='Input filename') parser.add_argument('out_filename', help='Output filename') parser.a...
0
0
0
0
0
0
homeassistant/components/orangepi_gpio/__init__.py
domwillcode/home-assistant
22,481
198796
"""Support for controlling GPIO pins of a Orange Pi.""" import logging from OPi import GPIO from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP from .const import PIN_MODES _LOGGER = logging.getLogger(__name__) DOMAIN = "orangepi_gpio" async def async_setup(hass, config) -> bool:...
0
2
0
0
2
0
courses/backend/django-for-everybody/Web Application Technologies and Django/resources/dj4e-samples/crispy/forms.py
Nahid-Hassan/fullstack-software-development
297
198804
from django import forms from django.core.exceptions import ValidationError from django.core import validators class BasicForm(forms.Form): title = forms.CharField(validators=[ validators.MinLengthValidator(2, "Please enter 2 or more characters") ]) mileage = forms.IntegerField() purchase_date ...
0
0
0
0
0
0
crits/indicators/forms.py
dutrow/crits
738
198805
from django import forms from django.conf import settings from crits.campaigns.campaign import Campaign from crits.core.forms import ( add_bucketlist_to_form, add_ticket_to_form, SourceInForm) from crits.core import form_consts from crits.core.widgets import CalWidget from crits.core.handlers import get_ite...
0
0
8
0
8
0
visualize.py
ForkedReposBak/ba-dls-deepspeech
517
198814
r""" Use this script to visualize the output of a trained speech-model. Usage: python visualize.py /path/to/audio /path/to/training/json.json \ /path/to/model """ from __future__ import absolute_import, division, print_function import argparse import matplotlib matplotlib.use('Agg') import matplotlib.pyplo...
0
1
0
0
1
0
book/src/ch07/src/generators_pythonic_4.py
rmariano/Clean-code-in-Python
133
198833
"""Clean Code in Python - Chapter 7: Generators, Iterators, and Asynchronous Programming > Idiomatic Iteration: simplifying loops """ import unittest from log import logger def search_nested_bad(array, desired_value) -> object: """Example of an iteration in a nested loop.""" coords = None for i, row in...
0
2
0
0
2
0
REST/python/Runbooks/run-runbook.py
gdesai1234/OctopusDeploy-Api
199
198863
import json import requests octopus_server_uri = 'https://your.octopus.app/api' octopus_api_key = 'API-YOURAPIKEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri) -> object: response = requests.get(uri, headers=headers) response.raise_for_status() return json.loads(response....
0
2
0
0
2
0
weibo_analysis_and_visualization/LDA.py
ChanDanchen/weibo
421
198864
<gh_stars>100-1000 ''' 使用senti_pre.py形成的content2.pkl进行LDA主题模型分析,生成'LDA_total.csv' 为tree.py做准备 ''' from jieba import analyse import jieba from gensim import corpora, models import pickle import csv jieba.add_word('中国') f = open("./key_words2.txt", 'r', encoding='UTF-8-sig') s = f.read() s = s.replace('\n', ';') s = s...
0
0
0
0
0
0
mmcls/models/utils/augment/builder.py
YuxinZou/mmclassification
1,190
198870
<reponame>YuxinZou/mmclassification # Copyright (c) OpenMMLab. All rights reserved. from mmcv.utils import Registry, build_from_cfg AUGMENT = Registry('augment') def build_augment(cfg, default_args=None): return build_from_cfg(cfg, AUGMENT, default_args)
0
0
0
0
0
0
messagegenerator.py
Smiddie31/aws-health-aware
142
198876
import json import boto3 from datetime import datetime, timedelta from botocore.exceptions import ClientError import os import time def get_message_for_slack(event_details, event_type, affected_accounts, affected_entities, slack_webhook) -> object: message = "" summary = "" if slack_webhook == "webhook": ...
0
13
0
0
13
0
krsh/cmd/cmd_configure.py
riiid/krsh
133
198880
<gh_stars>100-1000 # Copyright 2021 AIOps Squad, Riiid 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 applicabl...
0
0
0
0
0
0
tools/metamask2hashcat.py
Masha/hashcat
13,663
198897
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Gabriele 'matrix' Gristina # Version: 1.0 # Date: Thu 12 Aug 2021 06:44:14 PM CEST # License: MIT # Extract metamask vault from browser and save to file, then you can use this tool # reference: https://metamask.zendesk.com/hc/en-us/articles/360018766351-How-to-u...
0
0
0
0
0
0