id stringlengths 1 8 | text stringlengths 6 1.05M | dataset_id stringclasses 1
value |
|---|---|---|
/django-pyc-1.1.0.tar.gz/django-pyc-1.1.0/test_project/settings.py |
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
}
}
# ... | PypiClean |
/OctoBot-Backtesting-1.9.1.tar.gz/OctoBot-Backtesting-1.9.1/octobot_backtesting/api/__init__.py |
from octobot_backtesting.api import data_file_converters
from octobot_backtesting.api import data_file
from octobot_backtesting.api import importer
from octobot_backtesting.api import backtesting
from octobot_backtesting.api import exchange_data_collector
from octobot_backtesting.api.data_file_converters import (
... | PypiClean |
/lucumaproject-1.1.6.tar.gz/lucumaproject-1.1.6/README.rst | A sample Python project
=======================
A sample project that exists as an aid to the `Python Packaging User Guide
<https://packaging.python.org>`_'s `Tutorial on Packaging and Distributing
Projects <https://packaging.python.org/en/latest/distributing.html>`_.
This projects does not aim to cover best practice... | PypiClean |
/django-bulma-form-templates-0.8.4.tar.gz/django-bulma-form-templates-0.8.4/README.md | ## Fork of [Django Bulma (timonweb)](https://github.com/timonweb/django-bulma)
This fork moves more functionality into the templates, instead of adding CSS in python code.
It is also more extensible, since templates can be included and blocks can be overriden.
For the added functionality, look at section [New Addit... | PypiClean |
/django-celery-fulldbresult-0.5.3.tar.gz/django-celery-fulldbresult-0.5.3/django_celery_fulldbresult/migrations/0001_initial.py | from __future__ import unicode_literals
from django.db import models, migrations
import djcelery.picklefield
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='TaskResultMeta',
fields=[
('id', models.Aut... | PypiClean |
/tm-vec-1.0.1.tar.gz/tm-vec-1.0.1/ipynb/.ipynb_checkpoints/repo_EMBED-checkpoint.ipynb | ```
import numpy as np
import pandas as pd
import torch
from torch.utils.data import Dataset
from embed_structure_model import trans_basic_block, trans_basic_block_Config
from tm_vec_utils import featurize_prottrans, embed_tm_vec
from transformers import T5EncoderModel, T5Tokenizer
import re
import gc
from sklearn.... | PypiClean |
/aws_audit-0.1.0-py3-none-any.whl/aws_audit/plugins/sns/snshandler.py | import json, os
# from botocore.exceptions import ClientError
# import boto3
from aws_audit.helper.common import CommonHelper
from aws_audit.utils.errors import classify_error
class snshandler :
def __init__(self, session, region, logger):
self.logger = logger
self.region = region
... | PypiClean |
/custom-awscli-1.27.51.tar.gz/custom-awscli-1.27.51/awscli/examples/route53domains/update-domain-nameservers.rst | **To update the name servers for a domain**
The following ``update-domain-nameservers`` command updates the name servers for a domain.
This command runs only in the ``us-east-1`` Region. If your default region is set to ``us-east-1``, you can omit the ``region`` parameter. ::
aws route53domains update-domain-na... | PypiClean |
/packagetest114-0.114.tar.gz/packagetest114-0.114/devdoo/stack.py |
import time
import uuid
from pack import Pack
from status import Status
class Stack:
"""Um pedido que entrou no sistema."""
def __init__(self, message, timeout, tries):
"""Cria um novo pedido com um número máximo de tentativas.
Depois disso, o pedido será considerado uma falha."""
... | PypiClean |
/terrascript_aws-1.0.5.tar.gz/terrascript_aws-1.0.5/src/terrascript_aws/glue/catalog_database.py | import terrascript.core as core
@core.schema
class Principal(core.Schema):
data_lake_principal_identifier: str | core.StringOut | None = core.attr(str, default=None)
def __init__(
self,
*,
data_lake_principal_identifier: str | core.StringOut | None = None,
):
super().__in... | PypiClean |
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/trans/migrations/0133_glossary_missing_files.py |
import os
from django.conf import settings
from django.db import migrations
from weblate.formats.ttkit import TBXFormat
from weblate.vcs.git import LocalRepository
def migrate_glossaries(apps, schema_editor):
"""
Removes automatically created glossaries for source language.
These were wrongly created ... | PypiClean |
/easyCrystallography-0.3.0.tar.gz/easyCrystallography-0.3.0/easyCrystallography/Components/Site.py |
from __future__ import annotations
__author__ = 'github.com/wardsimon'
__version__ = '0.1.0'
from typing import List, Union, ClassVar, TypeVar, Optional, Dict, TYPE_CHECKING
from easyCore import np
from easyCore.Objects.Variable import Descriptor, Parameter
from easyCore.Objects.ObjectClasses import BaseObj
from ea... | PypiClean |
/clawpack-5.9.0.tar.gz/clawpack-5.9.0/pyclaw/examples/euler_gravity_3d/rising_hot_sphere.py | from __future__ import absolute_import
from __future__ import print_function
import numpy as np
from mappedGrid import euler3d_mappedgrid as mg
from six.moves import range
try:
from mpi4py import MPI
mpiAvailable = True
except ImportError:
raise ImportError('mpi4py is not available')
mpiAvailable = Fal... | PypiClean |
/mr.bob-1.0.0.tar.gz/mr.bob-1.0.0/mrbob/rendering.py | from os import path
from shutil import copy2
import codecs
import fnmatch
import os
import re
import six
import stat
from jinja2 import Environment, StrictUndefined
jinja2_env = Environment(
block_start_string="{{%",
block_end_string="%}}",
variable_start_string="{{{",
variable_end_string="}}}",
... | PypiClean |
/spyne-custom-2.13.22.tar.gz/spyne-custom-2.13.22/spyne/protocol/_inbase.py |
from __future__ import print_function
import logging
logger = logging.getLogger(__name__)
import re
import pytz
import uuid
from math import modf
from time import strptime, mktime
from datetime import timedelta, time, datetime, date
from decimal import Decimal as D, InvalidOperation
from pytz import FixedOffset
t... | PypiClean |
/wad2023_program-1.3.0-py3-none-any.whl/wad2023_program/view.py | from rich import box
from rich.console import Console, Group
from rich.panel import Panel
from rich.table import Table
from .model import Session, Speaker
def speaker_text(speaker: Speaker) -> str:
"""Create a text for a speaker.
Returns a string in a default format for a speaker.
Args:
speaker... | PypiClean |
/cleanrl-1.2.0.tar.gz/cleanrl-1.2.0/cleanrl_utils/docker_queue.py | import argparse
import shlex
import time
import docker
parser = argparse.ArgumentParser(description="CleanRL Docker Submission")
# Common arguments
parser.add_argument("--exp-script", type=str, default="test1.sh", help="the file name of this experiment")
# parser.add_argument('--cuda', type=lambda x:bool(strtobool(x)... | PypiClean |
/fern_uberduck-0.0.6.tar.gz/fern_uberduck-0.0.6/src/uberduck/client.py |
import typing
import urllib.parse
from json.decoder import JSONDecodeError
import httpx
import pydantic
import typing_extensions
from .core.api_error import ApiError
from .core.jsonable_encoder import jsonable_encoder
from .core.remove_none_from_headers import remove_none_from_headers
from .environment import Uberdu... | PypiClean |
/neuro-flow-23.7.0.tar.gz/neuro-flow-23.7.0/src/neuro_flow/cli/live.py | import click
import neuro_sdk
from contextlib import AsyncExitStack
from typing import List, Optional, Sequence, Tuple
from neuro_flow.cli.click_types import (
LIVE_JOB,
LIVE_JOB_OR_ALL,
PROJECT,
LiveJobSuffixType,
)
from neuro_flow.cli.utils import argument, option, wrap_async
from neuro_flow.live_run... | PypiClean |
/ibm_wos_utils-4.7.2.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl/ibm_wos_utils/data_health/batch/utils/constants.py |
from enum import Enum
"""
Contains constants used for the Data Health monitor.
"""
class Metrics(Enum):
# Column based metrics
ABSENCE_COUNT = "absence_count"
EMPTY_STRINGS = "empty_strings"
UNIQUE_COLUMNS = "unique_columns"
# Collective metrics
CLASS_CONFUSION = "class_confusion"
DUPLI... | PypiClean |
/hescore-hpxml-7.0.2.tar.gz/hescore-hpxml-7.0.2/hescorehpxml/hpxml3.py | from .base import HPXMLtoHEScoreTranslatorBase
from collections import OrderedDict
from .exceptions import TranslationError
def convert_to_type(type_, value):
if value is None:
return value
else:
return type_(value)
class HPXML3toHEScoreTranslator(HPXMLtoHEScoreTranslatorBase):
SCHEMA_DI... | PypiClean |
/collective.renderfiletypes-2.0b4.tar.gz/collective.renderfiletypes-2.0b4/LICENSE.rst | collective.renderfiletypes Copyright 2020, Mikel Larreategi
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY ... | PypiClean |
/msgraph_beta_sdk-1.0.0a9-py3-none-any.whl/msgraph/generated/identity_governance/lifecycle_workflows/workflows/item/execution_scope/execution_scope_request_builder.py | from __future__ import annotations
from dataclasses import dataclass
from kiota_abstractions.get_path_parameters import get_path_parameters
from kiota_abstractions.method import Method
from kiota_abstractions.request_adapter import RequestAdapter
from kiota_abstractions.request_information import RequestInformation
fro... | PypiClean |
/tf_object_detection_api-0.1.tar.gz/tf_object_detection_api-0.1/object_detection/anchor_generators/multiscale_grid_anchor_generator.py | import tensorflow.compat.v1 as tf
from object_detection.anchor_generators import grid_anchor_generator
from object_detection.core import anchor_generator
from object_detection.core import box_list_ops
class MultiscaleGridAnchorGenerator(anchor_generator.AnchorGenerator):
"""Generate a grid of anchors for multiple ... | PypiClean |
/kolla-ansible-16.1.0.tar.gz/kolla-ansible-16.1.0/ansible/roles/keystone/files/fernet_rotate_cron_generator.py |
# 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
# distributed under t... | PypiClean |
/toil-vg-1.6.0.tar.gz/toil-vg-1.6.0/src/toil_vg/iostore.py | import sys, os, os.path, json, collections, logging, logging.handlers
import struct, socket, threading, tarfile, shutil
import tempfile
import functools
import random
import time
import dateutil
import traceback
import stat
from toil.realtimeLogger import RealtimeLogger
import datetime
# Need stuff for Amazon s3
try:... | PypiClean |
/py-pure-client-1.38.0.tar.gz/py-pure-client-1.38.0/pypureclient/flasharray/FA_2_24/models/policy_nfs_response.py | import pprint
import re
import six
import typing
from ....properties import Property
if typing.TYPE_CHECKING:
from pypureclient.flasharray.FA_2_24 import models
class PolicyNfsResponse(object):
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value... | PypiClean |
/ping_stat-1.0-py3-none-any.whl/ping_stat/utils/__init__.py | from inspy_logger import InspyLogger
import time
from ping3 import ping, verbose_ping
from ping_stat.logging import add_child as add_child_logger, PROG_NAME
from rich.logging import RichHandler
import inspect
from ping_stat.utils.decorators import validate_properties
from statistics import mean, median
try:
_ = L... | PypiClean |
/avalon-rl-1.0.2.tar.gz/avalon-rl-1.0.2/avalon/agent/common/envs.py | import warnings
from typing import Any
from typing import List
from typing import Tuple
from typing import cast
import gym
import numpy as np
from gym.wrappers import TimeLimit
from loguru import logger
from avalon.agent.common import wrappers
from avalon.agent.common.params import DmcEnvironmentParams
from avalon.ag... | PypiClean |
/reportlab2-3.6.11.tar.gz/reportlab2-3.6.11/tools/pythonpoint/styles/modern.py | __version__='3.3.0'
# style_modern.py
__doc__="""This is an example style sheet. You can create your own, and
have them loaded by the presentation. A style sheet is just a
dictionary, where they keys are style names and the values are
ParagraphStyle objects.
You must provide a function called "getParagraphStyles()" ... | PypiClean |
/alipay-sdk-python-pycryptodome-3.3.202.tar.gz/alipay-sdk-python-pycryptodome-3.3.202/alipay/aop/api/request/AlipayCommerceTransportEtcMediaGetRequest.py | import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayCommerceTransportEtcMediaGetModel import AlipayCommerceTransportEtcMediaGetModel
class AlipayCommerceTransportEtcMediaGetRequest(object):
def __init__(self, biz_model=... | PypiClean |
/nanome-jax-2.0.11.tar.gz/nanome-jax-2.0.11/src/nanome/xgboost/cs_eval_site.py | import argparse
import os.path
import warnings
import joblib
import math
import pandas as pd
from scipy import stats
from scipy.stats import PearsonRConstantInputWarning
from sklearn.metrics import mean_squared_error
from tqdm import tqdm
from nanome.common.global_config import logger, set_log_debug_level, set_log_in... | PypiClean |
/plainbox-0.38.0.tar.gz/plainbox-0.38.0/README.rst | PlainBox
========
PlainBox is a toolkit consisting of python3 library, development tools,
documentation and examples. It is targeted at developers working on testing or
certification applications and authors creating tests for such applications.
PlainBox can be used to both create simple and comprehensive test tools ... | PypiClean |
/fhir_types-0.2.4-py3-none-any.whl/fhir_types/FHIR_Dosage_DoseAndRate.py | from typing import Any, List, Literal, TypedDict
from .FHIR_CodeableConcept import FHIR_CodeableConcept
from .FHIR_Quantity import FHIR_Quantity
from .FHIR_Range import FHIR_Range
from .FHIR_Ratio import FHIR_Ratio
from .FHIR_string import FHIR_string
# Indicates how the medication is/was taken or should be taken by ... | PypiClean |
/accel-brain-base-1.1.0.tar.gz/accel-brain-base-1.1.0/accelbrainbase/observabledata/_mxnet/adversarialmodel/discriminativemodel/eb_discriminative_model.py | from accelbrainbase._mxnet._exception.init_deferred_error import InitDeferredError
from accelbrainbase.observabledata._mxnet.adversarialmodel.discriminative_model import DiscriminativeModel
from mxnet.gluon.block import HybridBlock
from mxnet import gluon
from mxnet import autograd
import numpy as np
import mxnet as m... | PypiClean |
/scikit-cache-0.1.2.tar.gz/scikit-cache-0.1.2/scikit_cache/components/estimators.py | import logging
from contextlib import contextmanager
from typing import Any
from ..resources import (
CacheKey,
ObjCacheMeta,
)
from ..utils import (
format_bytes_to_str,
hash_for_iterable,
)
estimator_logger = logging.getLogger('scikit_cache.estimator')
class EstimatorsMixin:
"""Mixin for cache... | PypiClean |
/pdb2pqr_htmd_propka30-0.0.4.tar.gz/pdb2pqr_htmd_propka30-0.0.4/pdb2pqr/src/quatfit.py | __date__ = "28 February 2006"
__author__ = "David Heisterberg, Jan Labanowski, Jens Erik Nielsen, Todd Dolinsky"
import math
from .utilities import *
def findCoordinates(numpoints, refcoords, defcoords, defatomcoords):
"""
Driver for the quaternion file. Provide the coordinates as inputs
and obta... | PypiClean |
/pulumi_azure_native-2.5.1a1693590910.tar.gz/pulumi_azure_native-2.5.1a1693590910/pulumi_azure_native/servicefabric/v20230701preview/getmanaged_az_resiliency_status.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from . import outputs
__all__ = [
'GetmanagedAzResiliencyStatusResult',
'AwaitableGetmanagedAzResiliencyStatusResult',
'getmanaged_az_resiliency_s... | PypiClean |
/pyorbit-package-10.0.7.tar.gz/pyorbit-package-10.0.7/pyorbit/models/gp_quasiperiodic_activity_common.py | from pyorbit.subroutines.common import *
from pyorbit.models.abstract_model import *
try:
import george
except:
pass
class GaussianProcess_QuasiPeriodicActivity_Common(AbstractModel):
''' Three parameters out of four are the same for all the datasets, since they are related to
the properties of the p... | PypiClean |
/opal-azure-cli-lab-0.1.10.tar.gz/opal-azure-cli-lab-0.1.10/HISTORY.rst | .. :changelog:
Release History
===============
0.1.7
+++++
* Fixed error: 'ObjectsOperations' object has no attribute 'get_current_user'
0.1.6
+++++
* Minor fixes
0.1.5
+++++
* Minor fixes
0.1.4
+++++
* Minor fixes
0.1.3
+++++
* Minor changes
0.1.2
+++++
* Minor changes
0.1.1
+++++
* Update azure-mgmt-devtestlab... | PypiClean |
/neo3-boa-1.0.1.tar.gz/neo3-boa-1.0.1/boa3/internal/model/imports/importsymbol.py | import ast
from typing import Dict
from boa3.internal.analyser.importanalyser import ImportAnalyser
from boa3.internal.model.builtin.builtincallable import IBuiltinCallable
from boa3.internal.model.method import Method
from boa3.internal.model.symbol import ISymbol
from boa3.internal.model.type.itype import IType
from... | PypiClean |
/neoteroi_auth-0.0.3.tar.gz/neoteroi_auth-0.0.3/neoteroi/auth/jwts/__init__.py | from typing import Any, Dict, Optional, Sequence
import jwt
from jwt.exceptions import InvalidIssuerError, InvalidTokenError
from ..jwks import JWK, JWKS, KeysProvider
from ..jwks.caching import CachingKeysProvider
from ..jwks.openid import AuthorityKeysProvider
from ..jwks.urls import URLKeysProvider
from ..utils im... | PypiClean |
/backtrader_lucidinvestor-1.9.7702-py3-none-any.whl/backtrader/filters/daysteps.py | from __future__ import (absolute_import, division, print_function,
unicode_literals)
class BarReplayer_Open(object):
'''
This filters splits a bar in two parts:
- ``Open``: the opening price of the bar will be used to deliver an
initial price bar in which the four compon... | PypiClean |
/betterlifepsi-0.6.8.tar.gz/betterlifepsi-0.6.8/psi/cli.py | import functools
import itertools
import logging
import math
import os
import random
import sys
import click
import flask_migrate
import psycopg2
from psi.app import create_app, init_all
from psi.app.utils import retry
from psi import MIGRATION_DIR
# Using flask's default `click` command line environment
applicatio... | PypiClean |
/pyftdc-0.3.5.tar.gz/pyftdc-0.3.5/pybind11/docs/advanced/cast/functional.rst | Functional
##########
The following features must be enabled by including :file:`pybind11/functional.h`.
Callbacks and passing anonymous functions
=========================================
The C++11 standard brought lambda functions and the generic polymorphic
function wrapper ``std::function<>`` to the C++ program... | PypiClean |
/proplot-0.9.7.tar.gz/proplot-0.9.7/docs/fonts.py |
# %% [raw] raw_mimetype="text/restructuredtext"
# .. _ug_fonts:
#
#
# Font selection
# ==============
#
# Proplot registers several new fonts and includes tools
# for adding your own fonts. These features are described below.
#
#
# %% [raw] raw_mimetype="text/restructuredtext"
# .. _ug_fonts_included:
#
# Included fon... | PypiClean |
/aifs_nni-1.9.5-py3-none-manylinux1_x86_64.whl/aifs_nni-1.9.5.data/data/nni/node_modules/lodash/fp/_mapping.js | exports.aliasToReal = {
// Lodash aliases.
'each': 'forEach',
'eachRight': 'forEachRight',
'entries': 'toPairs',
'entriesIn': 'toPairsIn',
'extend': 'assignIn',
'extendAll': 'assignInAll',
'extendAllWith': 'assignInAllWith',
'extendWith': 'assignInWith',
'first': 'head',
// Methods that are curr... | PypiClean |
/accelbyte_py_sdk-0.48.0.tar.gz/accelbyte_py_sdk-0.48.0/accelbyte_py_sdk/api/session/models/apimodels_create_configuration_template_request.py |
# template file: ags_py_codegen
# AccelByte Gaming Services Session Service (3.1.0)
# pylint: disable=duplicate-code
# pylint: disable=line-too-long
# pylint: disable=missing-function-docstring
# pylint: disable=missing-module-docstring
# pylint: disable=too-many-arguments
# pylint: disable=too-many-branches
# pylin... | PypiClean |
/uniohomeassistant-0.1.3.tar.gz/uniohomeassistant-0.1.3/homeassistant/components/calendar/__init__.py | from datetime import timedelta
import logging
import re
from typing import Dict, List, cast
from aiohttp import web
from homeassistant.components import http
from homeassistant.const import HTTP_BAD_REQUEST, STATE_OFF, STATE_ON
from homeassistant.helpers.config_validation import ( # noqa: F401
PLATFORM_SCHEMA,
... | PypiClean |
/sendbird_platform_sdk-0.0.16-py3-none-any.whl/sendbird_platform_sdk/model/gc_update_ban_by_id_response.py | import re # noqa: F401
import sys # noqa: F401
from sendbird_platform_sdk.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_ty... | PypiClean |
/pulumi_azure_nextgen-0.6.2a1613157620.tar.gz/pulumi_azure_nextgen-0.6.2a1613157620/pulumi_azure_nextgen/apimanagement/backend.py |
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
from . import outputs
from ._enums import *
from ._inputs import *
__all__ = ['Backend']
class Backend(pulumi.CustomResource):
def __init__(__self__,
... | PypiClean |
/azure-cli-2.51.0.tar.gz/azure-cli-2.51.0/azure/cli/command_modules/network/aaz/2017_03_09_profile/network/nic/ip_config/_list.py |
# pylint: skip-file
# flake8: noqa
from azure.cli.core.aaz import *
@register_command(
"network nic ip-config list",
)
class List(AAZCommand):
"""List the IP configurations of an NIC.
:example: List the IP configurations of an NIC.
az network nic ip-config list -g MyResourceGroup --nic-name MyN... | PypiClean |
/dna_audit_new3-0.1-py3-none-any.whl/aws_services/redshift/redshift_service.py | import collections
import itertools
import boto3
import botocore
from common.constants import application_constants
from common.utils import helper
from common.utils.initialize_logger import logger
class Redshift:
"""A class that checks the security settings of Amazon Redshift Cluster."""
def __init__(self... | PypiClean |
/wyze_sdk-2.0.0-py3-none-any.whl/wyze_sdk/api/devices/thermostats.py | from collections import defaultdict
from collections.abc import MutableMapping
from datetime import datetime
import itertools
import json
from typing import Optional, Sequence, Tuple, Union
from wyze_sdk.api.base import BaseClient
from wyze_sdk.models.devices import DeviceModels, DeviceProp, Thermostat
from wyze_sdk.m... | PypiClean |
/pyplis-1.4.3.tar.gz/pyplis-1.4.3/scripts/ex01_analysis_setup.py | from __future__ import (absolute_import, division)
from SETTINGS import check_version, IMG_DIR, OPTPARSE
import pyplis as pyplis
from datetime import datetime
from matplotlib.pyplot import show, close
# Check script version
check_version()
# SCRIPT FUNCTION DEFINITIONS
def create_dataset():
"""Initialize measu... | PypiClean |
/uthreads-1.0.tar.gz/uthreads-1.0/examples/support-uthreaded.py | # based on the example "chatserver.py" from http://twistedmatrix.com/projects/core/documentation/examples/chatserver.py
from twisted.protocols import basic
from twisted.internet import reactor
from twisted.internet.defer import Deferred
from twisted.python import failure
import datetime
import uthreads
def is_day_366... | PypiClean |
/silabs_mltk-0.18.0-1691186878-cp37-cp37m-win_amd64.whl/silabs_mltk-0.18.0.data/purelib/mltk/models/shared/kws_streaming/models/att_rnn.py |
"""BiRNN model with attention."""
from kws_streaming.layers import modes
from kws_streaming.layers import speech_features
from kws_streaming.layers.compat import tf
import kws_streaming.models.model_utils as utils
def model_parameters(parser_nn):
"""BiRNN attention model parameters."""
parser_nn.add_argument(
... | PypiClean |
/aws_sagemaker_remote-0.0.71-py3-none-any.whl/aws_sagemaker_remote/util/cloudformation.py | from aws_sagemaker_remote.util.logging_util import print_err
import time
def get_cloudformation_output(cloudformation, stack_name, output_key):
stack = get_cloudformation(
cloudformation=cloudformation, stack_name=stack_name)
if isinstance(output_key, str):
return get_stack_output(stack, outpu... | PypiClean |
/plaid-python-15.5.0.tar.gz/plaid-python-15.5.0/plaid/model/investments_auth_get_numbers.py | import re # noqa: F401
import sys # noqa: F401
from plaid.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
validate... | PypiClean |
/TimeEval-1.2.10-py3-none-any.whl/timeeval_experiments/algorithms/sarima.py | from durations import Duration
from typing import Any, Dict, Optional
from timeeval import Algorithm, TrainingType, InputDimensionality
from timeeval.adapters import DockerAdapter
from timeeval.params import ParameterConfig
_sarima_parameters: Dict[str, Dict[str, Any]] = {
"exhaustive_search": {
"defaultValue": "... | PypiClean |
/libervia_desktop-0.8.0b1-py3-none-any.whl/cagou/plugins/plugin_transfer_file.py |
# Cagou: desktop/mobile frontend for Salut à Toi XMPP client
# Copyright (C) 2016-2021 Jérôme Poisson (goffi@goffi.org)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3... | PypiClean |
/bubblewrap_cli-1.0.0-py3-none-any.whl/bubblewrap.py | class Bubbles:
def __init__(self):
pass
def get_rich_bubble(self, txt, bg_color="blue", fg_color="white", rich=True):
circle_style = f"[{bg_color}]"
circle_close = f"{circle_style[:1]}/{circle_style[1:]}"
body_open = f"[{fg_color} on {bg_color}]"
body_close = f"{body_op... | PypiClean |
/kde-material-you-colors-1.6.0b2.tar.gz/kde-material-you-colors-1.6.0b2/src/kde_material_you_colors/utils/color_utils.py | import operator
import numpy
import colorsys
import re
from . import math_utils
from material_color_utilities_python.utils.theme_utils import *
def hex2rgb(hex):
hex = hex.lstrip("#")
rgb = tuple(int(hex[i : i + 2], 16) for i in (0, 2, 4))
# print(f'{rgb} {type(rgb)}')
return rgb
def rgb2hex(r, g, b... | PypiClean |
/Products.PDFtoOCR-1.1.tar.gz/Products.PDFtoOCR-1.1/README.txt | Introduction
============
PDFtoOCR processes text in PDF documents using OCR. This is needed
when text cannot be extracted from a (scanned) PDF. PDFtoOCR uses content rules to
schedule the OCR processing. The processing cannot be done one the fly, for
example with a custom TextIndexNG plugin. Processing large PDF doc... | PypiClean |
/cpg-hail-0.2.90.tar.gz/cpg-hail-0.2.90/hail/ggplot/scale.py | import abc
from .geoms import FigureAttribute
from hail.context import get_reference
from .utils import categorical_strings_to_colors, continuous_nums_to_colors
class Scale(FigureAttribute):
def __init__(self, aesthetic_name):
self.aesthetic_name = aesthetic_name
@abc.abstractmethod
def transfo... | PypiClean |
/jupyros-0.7.0a0.tar.gz/jupyros-0.7.0a0/js/node_modules/caniuse-lite/data/regions/PE.js | module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0.00483,"41":0.00483,"42":0,"43":0,"44... | PypiClean |
/tulipcore-0.1.0a2.tar.gz/tulipcore-0.1.0a2/README.rst | tulipcore
=========
tulipcore_ is an alternative gevent_ core loop. It is based on asyncio_ a.k.a.
tulip, the async library for Python 3. With tulipcore_, you can run gevent_
code on top of asyncio_.
tulipcore_ is written and maintained by `Fantix King`_ and is licensed under
MIT license.
Install tulipcore
--------... | PypiClean |
/nuradiomc-2.1.8.tar.gz/nuradiomc-2.1.8/NuRadioReco/modules/iftElectricFieldReconstructor/iftElectricFieldReconstructor.py | import numpy as np
from NuRadioReco.utilities import units, fft, trace_utilities, bandpass_filter
import NuRadioReco.utilities.trace_utilities
import NuRadioReco.detector.antennapattern
import NuRadioReco.detector.RNO_G.analog_components
import NuRadioReco.detector.ARIANNA.analog_components
from NuRadioReco.framework.p... | PypiClean |
/Eggsac-0.1.0.tar.gz/Eggsac-0.1.0/eggsac/utils.py |
from __future__ import absolute_import
import ConfigParser
import datetime
import logging
import os
import re
import shutil
import subprocess
import sys
import tarfile
import tempfile
import virtualenv
import zipfile
_devnull = os.open(os.devnull, os.O_RDWR)
PYTHON_VERSION = sys.version[:3] # e.g., "2.7"
is_win = ... | PypiClean |
/jupyterhub-sdp-0.9.0.1.tar.gz/jupyterhub-sdp-0.9.0.1/share/jupyterhub/static/components/moment/moment.d.ts | declare function moment(inp?: moment.MomentInput, format?: moment.MomentFormatSpecification, strict?: boolean): moment.Moment;
declare function moment(inp?: moment.MomentInput, format?: moment.MomentFormatSpecification, language?: string, strict?: boolean): moment.Moment;
declare namespace moment {
type RelativeTime... | PypiClean |
/Transcrypt-3.7.16.tar.gz/Transcrypt-3.7.16/transcrypt/demos/parcel_demo/node_modules/snapdragon/lib/compiler.js | 'use strict';
var use = require('use');
var define = require('define-property');
var debug = require('debug')('snapdragon:compiler');
var utils = require('./utils');
/**
* Create a new `Compiler` with the given `options`.
* @param {Object} `options`
*/
function Compiler(options, state) {
debug('initializing', _... | PypiClean |
/atsim.potentials-0.4.1.tar.gz/atsim.potentials-0.4.1/atsim/potentials/_potential.py | from ._util import gradient
class Potential(object):
"""Class used to describe a potential to the :func:`~atsim.potentials.writePotentials()` function.
Potential objects encapsulate a python function or callable which is used by
the :meth:`~atsim.potentials.Potential.energy` method to calculate potential energy... | PypiClean |
/roboticstoolbox_python-1.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/roboticstoolbox/mobile/ParticleFilter.py | from collections import namedtuple
import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
from matplotlib import animation
import spatialmath.base as smb
"""
Monte-carlo based localisation for estimating vehicle pose based on
odometry and observations of known landmarks.
"""
# TODO: refactor this and... | PypiClean |
/azure_eventhub-5.11.4-py3-none-any.whl/azure/eventhub/_transport/_base.py | from __future__ import annotations
from typing import Tuple, Union, TYPE_CHECKING
from abc import ABC, abstractmethod
if TYPE_CHECKING:
try:
from uamqp import types as uamqp_types
except ImportError:
uamqp_types = None
class AmqpTransport(ABC): # pylint: disable=too-many-public-methods
"... | PypiClean |
/alipay_sdk_python-3.6.740-py3-none-any.whl/alipay/aop/api/domain/ContractOrderSendLogDTO.py | import json
from alipay.aop.api.constant.ParamConstants import *
class ContractOrderSendLogDTO(object):
def __init__(self):
self._files = None
self._log_id = None
self._remark = None
self._send_time = None
self._sender = None
self._status = None
@property
... | PypiClean |
/ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-el.js | /*
* ?
*/
Calendar._DN = new Array
("Κυριακή",
"Δευτέρα",
"Τρίτη",
"Τετάρτη",
"Πέμπτη",
"Παρασκευή",
"Σάββατο",
"Κυριακή");
Calendar._SDN = new Array
("Κυ",
"Δε",
"Tρ",
"Τε",
"Πε",
"Πα",
"Σα",
"Κυ");
Calendar._MN = new Array
("Ιανουάριος",
"Φεβρουάριος",
"Μάρτιος",
"Απρίλιος",
"Μάϊος",
"Ιούνιος"... | PypiClean |
/arun_test_package_1961-0.0.1.tar.gz/arun_test_package_1961-0.0.1/src/model_asset_hierarchy.py | import json
import time
from pathlib import Path
from typing import Dict
import pandas as pd
from cognite.client import CogniteClient
from cognite.client.data_classes import Asset, AssetUpdate
from pandas import DataFrame
import src.constants as const
from src.model.config import Config
from src.model.project import ... | PypiClean |
/genie.libs.conf-23.8-py3-none-any.whl/genie/libs/conf/interface/iosxe/yang/interface.py | __all__ = (
'Interface',
'PhysicalInterface',
'VirtualInterface',
'LoopbackInterface',
'EthernetInterface'
)
import re
import contextlib
import abc
import weakref
import string
from enum import Enum
from genie.decorator import managedattribute
from genie.conf.base import ConfigurableBase
from geni... | PypiClean |
/criteo_api_marketingsolutions_sdk-2023.7.0.230831-py3-none-any.whl/criteo_api_marketingsolutions_v2023_07/model/transparency_report_entity_message.py | import re # noqa: F401
import sys # noqa: F401
from criteo_api_marketingsolutions_v2023_07.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_... | PypiClean |
/au_nz_jobs-0.1.2.tar.gz/au_nz_jobs-0.1.2/au_nz_jobs/downloader/downloader.py | import requests
import json
import pandas as pd
import numpy as np
import re
import time
# naming convention:
# variables and fields in df and database: snake_case
# define the Job class: detailed information of a certain job
class Job:
SEEK_API_URL = "https://www.seek.com.au/api/chalice-search/search"
SEEK... | PypiClean |
/pakit-0.2.5.tar.gz/pakit-0.2.5/completion/pakit-bash.sh | word_in_array() {
local found needle word words
needle="$1"
shift
words=( ${@} )
found=0
for word in ${words[@]} ; do
if [ "$needle" = "$word" ]; then
found=1
break
fi
done
echo $found
}
_pakit() {
local cur prev prog split=false
cur=$(_get_cword "=")
prev="${COMP_WORDS[COMP... | PypiClean |
/collective.megaphone-2.1.5.zip/collective.megaphone-2.1.5/src/collective/megaphone/portlets/calltoaction.py | from zope.interface import implements
from zope.component import getMultiAdapter
from zope.cachedescriptors.property import Lazy as lazy_property
from zope.annotation.interfaces import IAnnotations
from plone.portlets.interfaces import IPortletDataProvider
from plone.app.portlets.portlets import base
from zope import... | PypiClean |
/nqm.iotdatabase-1.1.5.tar.gz/nqm.iotdatabase-1.1.5/nqm/iotdatabase/_datasetdata.py | import typing
import collections.abc
# ignore too-many-ancestors. We inherit from MutableMapping, which has tons.
# ignore invalid-name. We are copying the name from the JavaScript API.
#pylint: disable=locally-disabled, too-many-ancestors, invalid-name
class Object(collections.abc.MutableMapping):
"""An ``dict``... | PypiClean |
/tb-rest-client-3.5.tar.gz/tb-rest-client-3.5/tb_rest_client/models/models_pe/blob_entity_with_customer_info.py | # Copyright 2023. ThingsBoard
#
# 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 writi... | PypiClean |
/augustus_quant-1.0.0-py3-none-any.whl/augustus/system/components/match_engine.py | from collections import defaultdict, deque
import pandas as pd
from augustus.constants import ActionType
from augustus.system.metabase_env import augustusEnvBase
from augustus.system.models.base_log import TradeLogBase
from augustus.system.models.signals import SignalByTrigger
from augustus.utils.memo_for_cache impor... | PypiClean |
/xrt-1.6.0.zip/xrt-1.6.0/examples/withRaycing/09_Gratings/GratingFlexPES.py | # -*- coding: utf-8 -*-
__author__ = "Konstantin Klementiev"
__date__ = "08 Mar 2016"
import os, sys; sys.path.append(os.path.join('..', '..', '..')) # analysis:ignore
import numpy as np
import copy
#import matplotlib as mpl
import matplotlib.pyplot as plt
import xrt.backends.raycing as raycing
import xrt.backends.r... | PypiClean |
/dictionary_diff-0.0.2-py3-none-any.whl/dictionary_diff/dict_diff.py | from dictionary_diff.change import _Remove
def equivalent(dict1: dict, dict2: dict, equivalent_func) -> bool:
"""
:return: True if and only if all members of the dicts are
:func:`~dictionary_diff.diff.equivalent`
:rtype: bool
"""
if not len(dict1) == len(dict2):
return False
for k... | PypiClean |
/flaris-0.1.0-py3-none-any.whl/framework/rendering/font.py | from typing import Dict
import freetype
import glm # pytype: disable=import-error
import OpenGL.GL as gl
from framework import resource
from framework.rendering.character import Character
__all__ = ["Font"]
class Font: # pylint: disable=too-few-public-methods
"""Represents a font.
The character map is l... | PypiClean |
/nataili-0.3.4-py3-none-any.whl/annotator/uniformer/mmseg/datasets/builder.py | import copy
import platform
import random
from functools import partial
import numpy as np
from annotator.uniformer.mmcv.parallel import collate
from annotator.uniformer.mmcv.runner import get_dist_info
from annotator.uniformer.mmcv.utils import Registry, build_from_cfg
from annotator.uniformer.mmcv.utils.parrots_wrap... | PypiClean |
/gpcm-0.2.0.tar.gz/gpcm-0.2.0/experiments/paper/comparison_process.py | import matplotlib.pyplot as plt
import numpy as np
import wbml.out as out
from wbml.experiment import WorkingDirectory
from wbml.metric import smll, rmse
from wbml.plot import tex, tweak, pdfcrop
# Setup script.
tex()
wd = WorkingDirectory("_experiments", "comparison_process")
wd_results = WorkingDirectory("_experimen... | PypiClean |
/plone.patternslib-1.3.0-py3-none-any.whl/plone/patternslib/static/components/moment/src/lib/create/from-anything.js | import isArray from '../utils/is-array';
import isObject from '../utils/is-object';
import isObjectEmpty from '../utils/is-object-empty';
import isUndefined from '../utils/is-undefined';
import isNumber from '../utils/is-number';
import isDate from '../utils/is-date';
import map from '../utils/map';
import { createInva... | PypiClean |
/Tailbone-0.9.45.tar.gz/Tailbone-0.9.45/tailbone/views/batch/pricing.py | from __future__ import unicode_literals, absolute_import
import six
from rattail.db import model
from rattail.time import localtime
from webhelpers2.html import tags, HTML
from tailbone.views.batch import BatchMasterView
class PricingBatchView(BatchMasterView):
"""
Master view for pricing batches.
"""... | PypiClean |
/uk_postcodes_parsing-1.1.2-py3-none-any.whl/uk_postcodes_parsing/postcode_utils.py | import re
from typing import Union
# Tests for district
DISTRICT_SPLIT_REGEX = re.compile(r"^([a-z]{1,2}\d)([a-z])$", re.I)
# Tests for the unit section of a postcode
UNIT_REGEX = re.compile(r"[a-z]{2}$", re.I)
# Tests for the inward code section of a postcode
INCODE_REGEX = re.compile(r"\d[a-z]{2}$", re.I)
# Test... | PypiClean |
/bitmovin_api_sdk-1.171.0-py3-none-any.whl/bitmovin_api_sdk/models/streams_video_response.py |
from enum import Enum
from datetime import datetime
from six import string_types, iteritems
from bitmovin_api_sdk.common.poscheck import poscheck_model
from bitmovin_api_sdk.models.streams_ad_config_response import StreamsAdConfigResponse
from bitmovin_api_sdk.models.streams_content_protection_response import StreamsC... | PypiClean |
/cloudreactor-api-client-0.3.1.3.tar.gz/cloudreactor-api-client-0.3.1.3/cloudreactor_api_client/models/aws_ecs_execution_method.py | from typing import Any, Dict, List, Optional, Type, TypeVar, Union, cast
import attr
from ..models.aws_ecs_execution_method_tags import AwsEcsExecutionMethodTags
from ..models.aws_ecs_launch_type import AwsEcsLaunchType
from ..types import UNSET, Unset
T = TypeVar("T", bound="AwsEcsExecutionMethod")
@attr.s(auto_a... | PypiClean |
/zdppy_requests-0.1.3-py3-none-any.whl/zdppy_requests/user_agent.py | import random
agents = [
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) A... | PypiClean |
/hsbcore-1.0.0.tar.gz/hsbcore-1.0.0/betcore/horse/AA.py | import json,logging,re,socket,time
from random import random
from urllib import urlencode
from betcore.exception import UnknownTradeException, DownlineExcpetion
from betcore.browser import BaseBrowser
from betcore.horse.config import COMMENT_CHARS, LANG_MAP, COUNTRY_MAP, TOTE_MAP
from betcore.util import logging_timing... | PypiClean |
/django-je-0.0.1.tar.gz/django-je-0.0.1/django/db/backends/oracle/utils.py | import datetime
from .base import Database
class InsertVar:
"""
A late-binding cursor variable that can be passed to Cursor.execute
as a parameter, in order to receive the id of the row created by an
insert statement.
"""
types = {
"AutoField": int,
"BigAutoField": int,
... | PypiClean |
/xs_transformers-1.0.7-py3-none-any.whl/xs_transformers/models/layoutlm/__init__.py |
# Copyright 2020 The HuggingFace Team. 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 applicab... | PypiClean |
/polyaxon-schemas-0.6.0.tar.gz/polyaxon-schemas-0.6.0/polyaxon_schemas/ml/layers/noise.py | from __future__ import absolute_import, division, print_function
from marshmallow import fields, validate
from polyaxon_schemas.ml.layers.base import BaseLayerConfig, BaseLayerSchema
class GaussianNoiseSchema(BaseLayerSchema):
stddev = fields.Float()
@staticmethod
def schema_config():
return Ga... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.