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
src/python/twitter/common/recordio/recordio.py
zhouyijiaren/commons
1,143
3215357
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
2
11
1
0
14
0
nonebot/plugins/single_session.py
xiaoheiyo/nonebot2
1,757
3215361
from typing import Dict, Optional from nonebot.typing import T_State from nonebot.matcher import Matcher from nonebot.adapters import Bot, Event from nonebot.message import (IgnoredException, run_preprocessor, run_postprocessor) _running_matcher: Dict[str, int] = {} @run_preprocessor as...
9
2
1
0
12
0
webspider/web/handlers/base.py
chem2099/webspider
256
3215365
# coding: utf-8 from tornado.escape import json_encode from tornado.web import RequestHandler from webspider import constants from webspider.exceptions import BaseException, ResourceNotFoundWebException from webspider.web.formatter import Formatter from webspider.utils.sql import remove_sessions class BaseApiHandler...
0
1
0
0
1
0
pandas/tests/indexes/timedeltas/test_formats.py
CJL89/pandas
603
3215370
import pytest import pandas as pd from pandas import Series, TimedeltaIndex class TestTimedeltaIndexRendering: @pytest.mark.parametrize("method", ["__repr__", "__str__"]) def test_representation(self, method): idx1 = TimedeltaIndex([], freq="D") idx2 = TimedeltaIndex(["1 days"], freq="D") ...
0
0
0
0
0
0
kornia/augmentation/random_generator/_2d/cutmix.py
Ishticode/kornia
418
3215380
<reponame>Ishticode/kornia from typing import Dict, Optional, Tuple, Union import torch from torch.distributions import Bernoulli, Beta, Uniform from kornia.augmentation.random_generator._2d.probability import random_prob_generator from kornia.augmentation.random_generator.base import RandomGeneratorBase from kornia....
0
0
0
0
0
0
examples/glyph-alpha.py
josh95117/freetype-py
242
3215383
<filename>examples/glyph-alpha.py #!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # # FreeType high-level python API - Copyright 2011-2015 <NAME> # Distributed under the terms of the new BSD license. # # ------------------------------------...
0
0
0
0
0
0
tests/runtimes/local/models/models_test.py
bbhunter/ostorlab
113
3215392
"""Tests for Models class.""" from ostorlab.runtimes.local.models import models def testModels_whenDatabaseDoesNotExist_DatabaseAndScanCreated(mocker, db_engine_path): """Test when database does not exists, scan is populated in a newly created database.""" mocker.patch.object(models, 'ENGINE_URL', db_engine_p...
0
0
0
0
0
0
tests/io/dask/bag/test_write.py
detritus3872/kartothek
171
3215395
import pickle import dask.bag as db import pytest from kartothek.io.dask.bag import store_bag_as_dataset from kartothek.io.testing.write import * # noqa def _store_dataframes(df_list, *args, **kwargs) -> object: bag = store_bag_as_dataset(db.from_sequence(df_list), *args, **kwargs) s = pickle.dumps(bag, pi...
0
2
0
0
2
0
tests/teams/scenarios/activity-update-and-delete/bots/__init__.py
Fl4v/botbuilder-python
388
3215414
<filename>tests/teams/scenarios/activity-update-and-delete/bots/__init__.py # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from .activity_update_and_delete_bot import ActivitiyUpdateAndDeleteBot __all__ = ["ActivitiyUpdateAndDeleteBot"]
0
0
0
0
0
0
src/test/integration/python_test_files/file_6_output.py
Sisyphus192/ai-docstring
297
3215440
<filename>src/test/integration/python_test_files/file_6_output.py def func1(a): pass def abc(a, b): """AI is creating summary for abc :param a: [description] :type a: [type] :param b: [description] :type b: [type] """ # force new line
0
0
0
0
0
0
model/trainer/helpers.py
cjy97/FEAT
330
3215446
<reponame>cjy97/FEAT import torch import torch.nn as nn import numpy as np import torch.optim as optim from torch.utils.data import DataLoader from model.dataloader.samplers import CategoriesSampler, RandomSampler, ClassSampler from model.models.protonet import ProtoNet from model.models.matchnet import MatchNet from m...
0
0
0
0
0
0
indy_node/server/request_handlers/read_req_handlers/rich_schema/abstract_rich_schema_read_req_handler.py
Rob-S/indy-node
627
3215447
<gh_stars>100-1000 from abc import abstractmethod from plenum.server.request_handlers.handler_interfaces.read_request_handler import ReadRequestHandler from plenum.common.exceptions import InvalidClientRequest from indy_common.config_util import getConfig from plenum.common.request import Request from plenum.server.da...
0
0
0
0
0
0
aphantasia/illustrip.py
rosivbus/aphantasia
579
3215450
# coding: UTF-8 from __future__ import annotations import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import warnings warnings.filterwarnings("ignore") import argparse import numpy as np import shutil import PIL import time from imageio import imread, imsave from googletrans import Translator import torch import torchvi...
6
7
0
0
13
0
sagemaker_batch_transform/tensorflow_open-images_jpg/code/inference.py
jerrypeng7773/amazon-sagemaker-examples
2,610
3215454
<filename>sagemaker_batch_transform/tensorflow_open-images_jpg/code/inference.py # Copyright 2019 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 loc...
0
0
0
0
0
0
tensorpack/tfutils/optimizer.py
kdatta/tensorpack
305
3215463
# -*- coding: utf-8 -*- # File: optimizer.py from __future__ import annotations from contextlib import contextmanager import tensorflow as tf from ..tfutils.common import get_tf_version_tuple from ..compat import tfv1 from ..utils.develop import HIDE_DOC from .gradproc import FilterNoneGrad, GradientProcessor __all...
8
13
0
0
21
0
tacker/sol_refactored/api/validator.py
h1r0mu/tacker
116
3215466
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation # 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/LICE...
1
3
0
0
4
0
kartothek/cli/__init__.py
jorisvandenbossche/kartothek
171
3215488
""" Kartothek CLI code. .. important:: This module does not contain any public APIs. Kartothek comes with a CLI tool named ``kartothek_cube``. To use it, create an YAML file that contains a dictionary of `storefact`_ stores (keys are names of the store and the values are dicts that contain the store config). ``Ka...
0
0
0
0
0
0
tests/unit/asset/universe/test_dynamic_universe.py
calumrussell/qstrader
2,220
3215496
<reponame>calumrussell/qstrader import pandas as pd import pytest import pytz from qstrader.asset.universe.dynamic import DynamicUniverse @pytest.mark.parametrize( 'asset_dates,dt,expected', [ ( { 'EQ:SPY': pd.Timestamp('1993-01-01 14:30:00', tz=pytz.utc), ...
0
0
0
0
0
0
InvenTree/InvenTree/validators.py
carlos-riquelme/InvenTree
656
3215500
""" Custom field validators for InvenTree """ from django.conf import settings from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from django.core.exceptions import FieldDoesNotExist from moneyed import CURRENCIES import common.models import re def validate_c...
0
3
0
0
3
0
examples/plots/Hodograph_Inset.py
gerritholl/MetPy
819
3215501
<filename>examples/plots/Hodograph_Inset.py # Copyright (c) 2016 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ Hodograph Inset =============== Layout a Skew-T plot with a hodograph inset into the plot. """ import matplotlib.pyplot as plt from ...
0
0
0
0
0
0
climetlab/plotting/backends/matplotlib/backend.py
pmaciel/climetlab
182
3215504
# (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 an intergovernmenta...
3
2
0
0
5
0
nemo_text_processing/inverse_text_normalization/fr/taggers/telephone.py
hamjam/NeMo
4,145
3215510
# Copyright (c) 2021, NVIDIA CORPORATION & 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. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
0
0
0
0
0
0
src/interactive/azext_interactive/azclishell/gather_commands.py
Mannan2812/azure-cli-extensions
207
3215542
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
1
3
0
8
12
0
server/app/services/base/views/messages.py
goodfree/ActorCloud
173
3215551
from flask import request, jsonify, g from sqlalchemy import or_ from sqlalchemy.exc import IntegrityError from actor_libs.database.orm import db from actor_libs.errors import ParameterInvalid, ReferencedError, APIException from app import auth from app.models import DictCode, Message from . import bp @bp.route('/me...
0
3
0
0
3
0
algs4/huffman.py
dumpmemory/algs4-py
230
3215592
<reponame>dumpmemory/algs4-py """ * Execution: python huffman.py - < input.txt (compress) * Execution: python huffman.py + < input.txt (expand) * Data files: https://algs4.cs.princeton.edu/55compression/abra.txt * https://algs4.cs.princeton.edu/55compression/tinytinyTale.txt * ...
0
0
0
0
0
0
tests/drivers/test_drivers_downsampling.py
EasyPost/biggraphite
125
3215625
#!/usr/bin/env python # Copyright 2018 Criteo # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
0
0
4
0
4
0
jaqs/data/basic/__init__.py
WestXu/JAQS
602
3215656
<reponame>WestXu/JAQS # encoding: utf-8 """ jaqs.data.basic module includes basic definitions of basic data types that are used across jaqs package. Basic data types: - `Instrument`: An Instrument represents a specific financial contract. - `InstManager`: InstManager query information of instruments from data server a...
0
0
0
0
0
0
time_series_detector/algorithm/xgboosting.py
alexanderqiu/Metis
1,367
3215658
<reponame>alexanderqiu/Metis<filename>time_series_detector/algorithm/xgboosting.py<gh_stars>1000+ #!/usr/bin/env python # -*- coding: UTF-8 -*- """ Tencent is pleased to support the open source community by making Metis available. Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. Licensed unde...
0
0
0
0
0
0
deep-rl/lib/python2.7/site-packages/OpenGL/raw/GLES3/_errors.py
ShujaKhalid/deep-rl
210
3215674
from OpenGL.platform import PLATFORM as _p from OpenGL.error import _ErrorChecker if _ErrorChecker: _error_checker = _ErrorChecker( _p, getattr(_p.GLES3,'glGetError',None) ) else: _error_checker = None
0
0
0
0
0
0
examples/django/oauth_app/migrations/0002_token_rotation.py
hirosassa/bolt-python
504
3215678
# Generated by Django 3.2.3 on 2021-07-15 23:44 from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ("oauth_app", "0001_initial"), ] operations: list[object] = [ migrations.AddField( "Sl...
0
0
2
0
2
0
flybirds/cli/create_project.py
ctripcorp/flybirds
183
3215702
# -*- coding: utf-8 -*- """ This module is used to create cli project. """ import os import platform import shutil import typer import flybirds.template as template import flybirds.utils.flybirds_log as log from flybirds.utils.file_helper import get_files_from_dir, \ get_paths_from_dir, \ replace_file_content...
0
5
0
0
5
0
env/lib/python3.8/site-packages/plotly/validators/mesh3d/_lighting.py
acrucetta/Chicago_COVI_WebApp
11,750
3215709
import _plotly_utils.basevalidators class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name: str="lighting", parent_name: str="mesh3d", **kwargs): super(LightingValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
2
0
0
0
2
0
dp/preprocess.py
ishine/DeepPhonemizer
135
3215730
<filename>dp/preprocess.py<gh_stars>100-1000 from collections import Counter from pathlib import Path from random import Random from typing import List, Tuple, Iterable import tqdm from dp.model.model import ModelType from dp.preprocessing.text import Preprocessor from dp.utils.io import read_config, pickle_binary fr...
0
0
0
0
0
0
lib/datasets/refvg.py
sibeiyang/sgmn
130
3215731
<filename>lib/datasets/refvg.py import os.path as osp from datasets.roidb import Roidb from datasets.refer import Refer from opt import parse_opt import json import io opt = parse_opt() opt = vars(opt) class Refvg(object): def __init__(self, split, model_method): self._dataset = 'refvg' self._im...
0
0
0
0
0
0
test/test_provider_collector.py
vlcinsky/nameko
3,425
3215741
<reponame>vlcinsky/nameko # coding: utf-8 import eventlet import pytest from nameko.extensions import ProviderCollector def test_provider_collector(): collector = ProviderCollector() provider1 = object() provider2 = object() collector.register_provider(provider1) collector.register_provider(pro...
0
0
0
0
0
0
awesome_gans/lsgan/lsgan_model.py
StevenJokess/Awesome-GANs
739
3215744
<gh_stars>100-1000 import tensorflow as tf import awesome_gans.modules as t tf.set_random_seed(777) # reproducibility class LSGAN: def __init__( self, s, batch_size=64, height=32, width=32, channel=3, n_classes=10, sample_num=10 * 10, samp...
0
0
0
0
0
0
projects/arcface/valid.py
KaiyuYue/torchshard
265
3215745
import argparse import os import random import shutil import time import warnings import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.distributed as dist import torch.optim import torch.multiprocessing as mp import torch.utils.da...
3
3
0
0
6
0
examples/basic/deleteMeshPoints.py
hadivafaii/vedo
836
3215764
"""Remove points and cells from a mesh which are closest to a specified point.""" from vedo import * pu = Mesh(dataurl+'apple.ply').c('lightgreen').bc('tomato').lw(0.1) pt = [1, 0.5, 1] ids = pu.closestPoint(pt, N=200, returnPointId=True) pu.deletePoints(ids, renamePoints=1) show(Point(pt), pu, __doc__, axes=1).clo...
0
0
0
0
0
0
examples/ported/texture_triangle.py
asnt/moderngl
916
3215782
<reponame>asnt/moderngl<gh_stars>100-1000 import numpy as np from PIL import Image import _simple_2d_example class Example(_simple_2d_example.Example): title = 'Texture Triangle' def __init__(self, **kwargs): super().__init__(**kwargs) # the shader program is inherited # self.prog =...
0
0
0
0
0
0
CamJam Edukit 3 - GPIO Zero/Code/7-pwm.py
nedcerneckis/EduKit3
132
3215789
# CamJam EduKit 3 - Robotics # Worksheet 7 - Controlling the motors with PWM import time # Import the Time library from gpiozero import CamJamKitRobot # Import the CamJam GPIO Zero Library robot = CamJamKitRobot() # Set the relative speeds of the two motors, between 0.0 and 1.0 motorspeed = 0.5 motorfo...
0
0
0
0
0
0
synapse/rest/client/room_upgrade_rest_servlet.py
mlakkadshaw/synapse
9,945
3215797
# Copyright 2016 OpenMarket 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 in writin...
5
2
0
0
7
0
kornia/feature/matching.py
saurabhya/kornia
418
3215816
<reponame>saurabhya/kornia<filename>kornia/feature/matching.py<gh_stars>100-1000 from typing import Optional, Tuple import torch import torch.nn as nn from kornia.testing import KORNIA_CHECK_SHAPE def match_nn( desc1: torch.Tensor, desc2: torch.Tensor, dm: Optional[torch.Tensor] = None ) -> Tuple[torch.Tensor, ...
0
0
0
0
0
0
packages/core/minos-microservice-networks/minos/networks/brokers/subscribers/queued/queues/__init__.py
minos-framework/minos-python
247
3215821
<filename>packages/core/minos-microservice-networks/minos/networks/brokers/subscribers/queued/queues/__init__.py from .abc import ( BrokerSubscriberQueue, BrokerSubscriberQueueBuilder, ) from .database import ( BrokerSubscriberQueueDatabaseOperationFactory, DatabaseBrokerSubscriberQueue, DatabaseBro...
0
0
0
0
0
0
boto3_type_annotations_with_docs/boto3_type_annotations/rds_data/__init__.py
cowboygneox/boto3_type_annotations
119
3215835
from boto3_type_annotations.rds_data.client import Client __all__ = ( 'Client' )
0
0
0
0
0
0
env/Lib/site-packages/tenacity/before.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
3,753
3215842
# Copyright 2016 <NAME> # Copyright 2016 <NAME> # Copyright 2013-2014 <NAME> # # 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...
4
3
0
0
7
0
tests/pipe_proc_tests/shuf.py
genematx/nmrglue
150
3215857
<gh_stars>100-1000 #! /usr/bin/env python """ Create files for shuf unit test """ import nmrglue.fileio.pipe as pipe import nmrglue.process.pipe_proc as p d, a = pipe.read("time_complex.fid") d, a = p.shuf(d, a, mode="ri2c") pipe.write("shuf1.glue", d, a, overwrite=True) d, a = pipe.read("time_complex.fid") d, a = p...
0
0
0
0
0
0
vendor/bundle/ruby/2.0.0/gems/pygments.rb-0.6.1/vendor/pygments-main/pygments/styles/vs.py
agent010101/agent010101.github.io
652
3215871
# -*- coding: utf-8 -*- """ pygments.styles.vs ~~~~~~~~~~~~~~~~~~ Simple style with MS Visual Studio colors. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Name, Co...
0
0
3
0
3
0
funboost/utils/mqtt_util.py
DJMIN/funboost
333
3215874
<gh_stars>100-1000 import urllib3 import json import nb_log import decorator_libs # https://www.cnblogs.com/YrRoom/p/14054282.html """ -p 18083 服务器启动端口 -p 1882 TCP端口 -p 8083 WS端口 -p 8084 WSS端口 -p 8883 SSL端口 """ """ 非常适合 前端订阅唯一uuid的topic 然后表单中带上这个topic名字请求python接口 -> 接口中发布任务到rabbitmq或redis消息队列 -> 后台消费进程执行任务消费,并将结果发布到...
0
0
0
0
0
0
tests/integrations/android_sdk/ADB/test_force_stop_app.py
pybee/briefcase
522
3215875
import subprocess from unittest.mock import MagicMock import pytest from briefcase.exceptions import BriefcaseCommandError, InvalidDeviceError from briefcase.integrations.android_sdk import ADB def test_force_stop_app(mock_sdk, capsys): """Invoking `force_stop_app()` calls `run()` with the appropriate param...
0
0
0
0
0
0
cerbrutus.py
mansz81/Cerbrutus
207
3215877
<gh_stars>100-1000 #!/usr/bin/env python3 import argparse import sys import Cerbrutus banner = """ \t================================================================ \t __ ___ ____ ____ ____ __ __ ______ __ __ _____ \t / ] / _]| \ | \ | \| | || || | |/ ___/ \t / / / [...
0
0
0
0
0
0
ros/ros_comm/rospy/src/rospy/impl/tcpros_base.py
numberen/apollo-platform
742
3215901
<reponame>numberen/apollo-platform<filename>ros/ros_comm/rospy/src/rospy/impl/tcpros_base.py # Software License Agreement (BSD License) # # Copyright (c) 2008, <NAME>, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
0
0
0
0
0
0
alipay/aop/api/domain/MergePayOrder.py
antopen/alipay-sdk-python-all
213
3215913
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import annotations import json from alipay.aop.api.constant.ParamConstants import * class MergePayOrder(object): def __init__(self): self._amount: None = None self._fail_reason: None = None self._fee: None = None self....
0
16
0
14
30
0
stingray/filters.py
Outflows-Legacy-Accretion-Surveys/stingray
133
3215932
<filename>stingray/filters.py import numpy as np import warnings import copy import numpy as np import numpy.random as ra from astropy import log from astropy.logger import AstropyUserWarning from .utils import njit __all__ = ['Window1D', 'Optimal1D'] class Window1D(object): """ Make a top hat filter (wind...
0
0
0
0
0
0
visualDet3D/evaluator/kitti_depth_prediction/evaluate_depth.py
jovialio/visualDet3D
250
3215966
<reponame>jovialio/visualDet3D import numpy as np from numba import jit import cv2 import os @jit(cache=True, nopython=True) def compute_errors(image_gt, image_pred): """ Compute Errors from two floating point image. init errors 1. mae 2. rmse 3. inverse mae 4. inverse rmse 5. log mae 6...
0
0
0
0
0
0
slack_sdk/web/client.py
renovate-testing/test-10090-2-python-slack-sdk
492
3215968
<gh_stars>100-1000 """A Python module for interacting with Slack's Web API.""" import json import os from io import IOBase from typing import Union, Sequence, Optional, Dict, Tuple, Any, List import slack_sdk.errors as e from slack_sdk.models.views import View from .base_client import BaseClient, SlackResponse from .i...
0
0
0
0
0
0
engine/matcher.py
songtebo/puppet
325
3215984
<gh_stars>100-1000 # -*- coding: utf-8 -*- # # Copyright 2017 Ricequant, 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 requ...
0
0
0
0
0
0
examples.py/Fisica/bubbles.py
timgates42/processing.py
1,224
3216008
""" * Buttons and bodies * * by <NAME> * * This example shows how to create a blob. """ from fisica import Fisica, FWorld, FPoly, FBlob world = None xPos = 0 circleCount = 20 hole = 50 topMargin = 50 bottomMargin = 300 sideMargin = 100 def setup(): global world size(400, 400) smooth() ...
0
0
0
0
0
0
pajbot/modules/basic/selftimeout.py
JoachimFlottorp/pajbot
128
3216027
<filename>pajbot/modules/basic/selftimeout.py from __future__ import annotations from typing import TYPE_CHECKING, Any import logging import random from pajbot.models.command import Command, CommandExample from pajbot.modules import BaseModule, ModuleSetting from pajbot.modules.basic import BasicCommandsModule if T...
0
0
0
0
0
0
cclib/parser/jaguarparser.py
rocfo/cclib
224
3216056
# -*- coding: utf-8 -*- # # Copyright (c) 2020, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Parser for Jaguar output files""" import re import numpy from cclib.parser import logfileparser from cclib.parser i...
0
4
0
0
4
0
fbpic/fields/spectral_transform/__init__.py
fractional-ray/fbpic
131
3216057
""" This file is part of the Fourier-Bessel Particle-In-Cell code (FB-PIC) It imports the SpectralTransformer object, so that this object can be used at a higher level. """ from .spectral_transformer import SpectralTransformer, cuda_installed __all__ = ['SpectralTransformer', 'cuda_installed']
0
0
0
0
0
0
checkov/arm/checks/SecurityCenterStandardPricing.py
antonblr/checkov
4,013
3216069
<reponame>antonblr/checkov<gh_stars>1000+ from checkov.common.models.enums import CheckResult, CheckCategories from checkov.arm.base_resource_check import BaseResourceCheck # https://docs.microsoft.com/en-us/azure/templates/microsoft.security/securitycontacts class SecurityCenterStandardPricing(BaseResourceCheck): ...
0
0
0
0
0
0
tests/data/bracketmatch.py
StarryInternet/black
16,110
3216086
for ((x in {}) or {})['a'] in x: pass pem_spam = lambda l, spam = { "x": 3 }: not spam.get(l.strip()) lambda x=lambda y={1: 3}: y['x':lambda y: {1: 2}]: x # output for ((x in {}) or {})["a"] in x: pass pem_spam = lambda l, spam={"x": 3}: not spam.get(l.strip()) lambda x=lambda y={1: 3}: y["x" : lambda y...
0
0
0
0
0
0
cvxpy/tests/test_suppfunc.py
QiuWJX/cvxpy
556
3216103
""" Copyright 2019, the cvxpy developers. 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, ...
0
12
0
0
12
0
Z - Tool Box/x2john/1password2john.py
dfirpaul/Active-Directory-Exploitation-Cheat-Sheet-1
1,290
3216110
#!/usr/bin/env python # Written by <NAME> <dhiru at openwall.com> in July 2012 for JtR project. # Copyright (c) 2012-2013, <NAME>. # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission...
2
8
6
5
21
0
lib/nltk/cluster/em.py
sreejithb/cows_and_bulls
101
3216119
<reponame>sreejithb/cows_and_bulls # Natural Language Toolkit: Expectation Maximization Clusterer # # Copyright (C) 2001-2016 NLTK Project # Author: <NAME> <<EMAIL>> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from __future__ import print_function, unicode_literals try: import numpy except ...
0
0
0
0
0
0
Pipeline/parsers/tikaparser.py
Yavari/ambar
1,963
3216124
<reponame>Yavari/ambar from jnius import autoclass import re import io from PIL import Image from parsers.contenttypeanalyzer import ContentTypeAnalyzer from parsers.ocrproxy import OCRProxy, OCRProxyResponse from parsers.fileparserresponse import FileParserResponse from parsers.binarystringparser import BinaryStringPa...
0
0
0
0
0
0
openhtf/util/logs.py
frankalicious/openhtf
372
3216126
<gh_stars>100-1000 # Copyright 2014 Google 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.apache.org/licenses/LICENSE-2.0 # Unless required by app...
0
0
0
0
0
0
my_test_bot.py
movermeyer/HackerNewsAPI
132
3216138
#!/usr/bin/env python from hn import HN, Story hn = HN() # a generator over 30 stories from top page top_iter = hn.get_stories(limit=30) # print top stories from homepage for story in top_iter: print(story.title.encode('utf-8')) # print('[{0}] "{1}" by {2}'.format(story.points, story.title, ...
0
0
0
0
0
0
ykdl/extractors/douyu/live.py
netlovehf/ykdl
1,153
3216140
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import annotations from ykdl.util.html import get_content, add_header from ykdl.util.match import match1, matchall from ykdl.extractor import VideoExtractor from ykdl.videoinfo import VideoInfo from ykdl.compact import urlencode from .util import get_h5enc...
1
3
3
0
7
0
desktop/core/ext-py/celery-4.2.1/t/unit/bin/test_base.py
maulikjs/hue
5,079
3216186
<gh_stars>1000+ from __future__ import absolute_import, unicode_literals import os import pytest from case import Mock, mock, patch from celery.bin.base import Command, Extensions, Option from celery.five import bytes_if_py2 class MyApp(object): user_options = {'preload': None} APP = MyApp() # <-- Used by t...
0
0
0
0
0
0
jpg_to_png/jpg_to_png.py
sonalimahajan12/Automation-scripts
496
3216208
# -*- coding: utf-8 -*- # import all prerequisites """ Created on Tue Aug 31 15:11:50 2021 @author: <NAME> """ import tkinter as tk from tkinter import filedialog as fd from PIL import Image from tkinter import messagebox root = tk.Tk() # title for the output window root.title('JPG to PNG and ViceVersa') # fun...
0
0
0
0
0
0
examples/defaultargs.py
quynhanh-ngx/pytago
206
3216280
<filename>examples/defaultargs.py def main(): a = increment(1) print(a) b = increment(a, 2) print(b) c = increment(a, decrement=True, amount=3) print(c) def increment(n: int, amount: int = 1, decrement: bool = False) -> int: if decrement: return n - amount return n + amount i...
0
0
0
0
0
0
model-optimizer/extensions/ops/sparse_segment_sqrtn.py
monroid/openvino
2,406
3216290
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np from mo.graph.graph import Node, Graph from mo.ops.op import Op class SparseSegmentSqrtN(Op): ''' The operation computes the sum along sparse segments of a tensor and divides it by the square root of N, where N ...
3
2
1
0
6
0
docs/Tutorials/NetlistParser/parse.py
mabrains/ALIGN-public
119
3216293
#!/usr/bin/env python from __future__ import annotations import re from collections import namedtuple from collections import OrderedDict import json Point = namedtuple('Point', ['x', 'y']) Rect = namedtuple('Rect', ['ll', 'ur']) Port = namedtuple('Port', ['port_nm', 'layer', 'rect']) Blockage = namedtuple('Blockage'...
0
18
0
13
31
0
setup.py
mknecht/plivoframework
151
3216294
from setuptools import find_packages import sys requires = ['gevent', 'flask', 'ujson', 'redis'] if sys.prefix == '/usr': etc_prefix = '/etc' else: etc_prefix = sys.prefix + '/etc' author = "Plivo Inc" author_email = "<EMAIL>" maintainer = "Plivo Inc" maintainer_email = "<EMAIL>" license = "MPL 1.1" setup_...
0
0
0
0
0
0
src/out/NIPS18evaluation/evaluationTreeLSTM/Dynet/treernnDynet.py
supunab/Lantern
158
3216307
from __future__ import annotations import dynet as dy import numpy as np import time def run(filename) -> object | tuple[object, object]: startTime = time.time() # read word embedding word_embedding_size = 300 word_embedding_file = "small_glove.txt" word_embedding = [] with open(word_embedding_file, '...
0
3
0
0
3
0
fury/convert.py
SunTzunami/fury
149
3216321
from __future__ import annotations import os from tempfile import TemporaryDirectory import numpy as np from fury.io import load_image def matplotlib_figure_to_numpy(fig, dpi: int=100, fname: object | None=None, flip_up_down: bool=True, transparent: bool=False) -> object: """Conve...
4
1
0
0
5
0
mango/modelstate.py
nhatminhbeo/mango-explorer
131
3216326
# # ⚠ Warning # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT # LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA...
9
18
0
12
39
0
script/translations/const.py
domwillcode/home-assistant
30,023
3216330
"""Translation constants.""" import pathlib CORE_PROJECT_ID = "130246255a974bd3b5e8a1.51616605" FRONTEND_PROJECT_ID = "3420425759f6d6d241f598.13594006" CLI_2_DOCKER_IMAGE = "2.5.1" INTEGRATIONS_DIR = pathlib.Path("homeassistant/components") FRONTEND_DIR = pathlib.Path("../frontend")
0
0
0
0
0
0
release/stubs.min/System/Runtime/InteropServices/__init___parts/TypeLibImportClassAttribute.py
htlcnn/ironpython-stubs
182
3216332
class TypeLibImportClassAttribute(Attribute,_Attribute): """ Specifies which System.Type exclusively uses an interface. This class cannot be inherited. TypeLibImportClassAttribute(importClass: Type) """ def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signatur...
0
0
0
0
0
0
icepyx/core/APIformatting.py
nsidc/icepyx
113
3216351
<gh_stars>100-1000 # Generate and format information for submitting to API (CMR and NSIDC) import datetime as dt import geopandas as gpd import pprint from shapely.geometry import Polygon from shapely.geometry.polygon import orient import fiona fiona.drvsupport.supported_drivers["LIBKML"] = "rw" # ------------------...
0
0
0
0
0
0
tests/st/ops/cpu/test_avgpool_grad_op.py
GuoSuiming/mindspore
3,200
3216352
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
0
1
0
0
1
0
xfel/command_line/cxi_plotcv.py
dperl-sol/cctbx_project
155
3216354
<filename>xfel/command_line/cxi_plotcv.py # # LIBTBX_SET_DISPATCHER_NAME cxi.plotcv # """Main idea: go through the integration log files and grep out the difference vectors between observed and predicted spot positions. Plot these "correction vectors", but do so separately for each ASIC tile, giving an independ...
0
0
0
0
0
0
radon/metrics.py
ddeka2910/radon
943
3216374
from __future__ import annotations '''Module holding functions related to miscellaneous metrics, such as Halstead metrics or the Maintainability Index. ''' import ast import collections import math from radon.raw import analyze from radon.visitors import ComplexityVisitor, HalsteadVisitor # Halstead metrics Halstead...
1
7
0
0
8
0
alex/applications/PublicTransportInfoCS/test_hdc_slu.py
michlikv/alex
184
3216394
<gh_stars>100-1000 # encoding: utf8 from __future__ import unicode_literals from unittest import TestCase from alex.applications.PublicTransportInfoCS.hdc_slu import PTICSHDCSLU from alex.applications.PublicTransportInfoCS.preprocessing import PTICSSLUPreprocessing from alex.components.asr.utterance import Utterance, ...
0
0
0
0
0
0
app/src/thirdparty/telemetry/value/string.py
ta2edchimp/big-rig
925
3216401
<filename>app/src/thirdparty/telemetry/value/string.py # 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. from telemetry import value as value_module from telemetry.value import list_of_string_values from tel...
0
0
0
0
0
0
tools/graph_generation/gen_bit_rate_stats.py
ddeadguyy/acl
929
3216411
<reponame>ddeadguyy/acl<filename>tools/graph_generation/gen_bit_rate_stats.py import numpy import os import sys # This script depends on a SJSON parsing package: # https://pypi.python.org/pypi/SJSON/1.1.0 # https://shelter13.net/projects/SJSON/ # https://bitbucket.org/Anteru/sjson/src import sjson if __name__ == "__m...
0
0
0
0
0
0
reagent/net_builder/quantile_dqn/quantile.py
BerenLuthien/ReAgent
1,156
3216457
<reponame>BerenLuthien/ReAgent<gh_stars>1000+ #!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. from typing import List from reagent.core.dataclasses import dataclass, field from reagent.core.parameters import NormalizationData, param_hash from reagent.models.base import M...
0
0
0
0
0
0
tests/fizzbuzz.py
alles-fliebt/pipelines
353
3216481
<reponame>alles-fliebt/pipelines from multiprocessing import Process, Queue from fizzbuzz_utils import fizzbuzz as fizzbuzz from fizzbuzz_utils import printer as printer from fizzbuzz_utils import even as even from fizzbuzz_utils import numbers as numbers class PLPipeSentinel: pass def pl_run_numbers(pl_stream, pl_out_...
0
0
0
0
0
0
src/python/lib/mesos/recordio.py
zagrev/mesos
4,537
3216488
<reponame>zagrev/mesos # 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 # "L...
0
0
0
0
0
0
qiskit/quantum_info/operators/dihedral/polynomial.py
Roshan-Thomas/qiskit-terra
1,599
3216496
<filename>qiskit/quantum_info/operators/dihedral/polynomial.py<gh_stars>1000+ # This code is part of Qiskit. # # (C) Copyright IBM 2019, 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 a...
0
0
0
0
0
0
lib/cherrypy/test/test_iterator.py
0x20Man/Watcher3
320
3216511
<filename>lib/cherrypy/test/test_iterator.py import six import cherrypy from cherrypy.test import helper class IteratorBase(object): created = 0 datachunk = 'butternut squash' * 256 @classmethod def incr(cls): cls.created += 1 @classmethod def decr(cls): cls.created -= 1 c...
0
0
0
0
0
0
hypernets/utils/param_tuning.py
wyq-1997/Hypernets
1,080
3216513
<filename>hypernets/utils/param_tuning.py # -*- coding:utf-8 -*- __author__ = 'yangjian' """ """ import copy import time import pandas as pd from hypernets.conf import configure, Configurable, String, Int as cfg_int from hypernets.core import TrialHistory, Trial, EarlyStoppingError from hypernets.core.ops import Iden...
0
0
0
0
0
0
backend/src/baserow/contrib/database/apps.py
lucastm/baserow
839
3216525
<filename>backend/src/baserow/contrib/database/apps.py from django.apps import AppConfig from baserow.core.registries import ( plugin_registry, application_type_registry, ) from baserow.core.trash.registries import trash_item_type_registry from baserow.ws.registries import page_registry class DatabaseConfig(...
0
0
0
0
0
0
corehq/blobs/tests/test_util.py
dimagilg/commcare-hq
471
3216535
<gh_stars>100-1000 import gzip import os import random import tempfile import uuid from io import BytesIO from unittest import TestCase import corehq.blobs.util as mod from corehq.blobs.exceptions import GzipStreamError class TestRandomUrlId(TestCase): sample_size = 100 def setUp(self): self.ids = ...
0
0
0
0
0
0
src/falconpy/malquery.py
CrowdStrike/falconpy
111
3216542
<filename>src/falconpy/malquery.py """Falcon MalQuery API Interface Class _______ __ _______ __ __ __ | _ .----.-----.--.--.--.--| | _ | |_.----|__| |--.-----. |. 1___| _| _ | | | | _ | 1___| _| _| | <| -__| |. |___|__| |_____|________|_____|____ |____|...
0
0
0
0
0
0
modules/dbnd-airflow-monitor/test_dbnd_airflow_monitor/runtime_syncer/test_multiserver.py
busunkim96/dbnd
224
3216551
import time import uuid import pytest from click.testing import CliRunner from mock import patch from airflow_monitor.common.base_component import BaseMonitorComponent from airflow_monitor.common.config_data import AirflowServerConfig from airflow_monitor.config import AirflowMonitorConfig from airflow_monitor.multi...
0
3
0
2
5
0
salt/moin/configs/jython.py
ammaraskar/psf-salt
103
3216568
# -*- coding: iso-8859-1 -*- # IMPORTANT! This encoding (charset) setting MUST be correct! If you live in a # western country and you don't know that you use utf-8, you probably want to # use iso-8859-1 (or some other iso charset). If you use utf-8 (a Unicode # encoding) you MUST use: coding: utf-8 # That setting must ...
0
0
0
0
0
0
troposphere/iotevents.py
pierretr/troposphere
4,573
3216571
# Copyright (c) 2012-2019, <NAME> <<EMAIL>> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 4.3.0 from troposphere import Tags from . import AWSObject, AWSProperty from .validators import boolean, integer class C...
0
0
24
0
24
0
siamese_tracking/run_video.py
Robert-JunWang/SiamDW
772
3216574
<reponame>Robert-JunWang/SiamDW # ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by <NAME> and <NAME> # Email: <EMAIL> # Detail: test siamese on a specific video (provide init bbox and video file) # -------------------...
0
0
0
0
0
0