id
stringlengths
1
8
text
stringlengths
6
1.05M
dataset_id
stringclasses
1 value
/PyChunkedGraph-0.1.113.tar.gz/PyChunkedGraph-0.1.113/pychunkedgraph/ingest/ran_ingestion.py
import numpy as np import cloudvolume import collections import itertools import re import time import zstandard as zstd import numpy.lib.recfunctions as rfn import networkx as nx import logging from multiwrapper import multiprocessing_utils as mu from pychunkedgraph.ingest import ingestionmanager, ingestion_utils as ...
PypiClean
/msgraph_beta_sdk-1.0.0a9-py3-none-any.whl/msgraph/generated/contacts/item/direct_reports/graph_user/graph_user_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
/tencentcloud-python-sdk-3.0.960.tar.gz/tencentcloud-python-sdk-3.0.960/tencentcloud/iss/v20230517/models.py
import warnings from tencentcloud.common.abstract_model import AbstractModel class AIConfig(AbstractModel): """AI分析配置 """ def __init__(self): r""" :param _DetectType: AI 分析类型。可选值为 Facemask(口罩识别)、Chefhat(厨师帽识别)、Smoking(抽烟检测)、Chefcloth(厨师服识别)、PhoneCall(接打电话识别)、Pet(宠物识别)、Body(人体识别)和Car(车辆...
PypiClean
/jai_sdk-0.24.0-py3-none-any.whl/jai/utilities/image.py
import re from base64 import b64decode, b64encode from io import BytesIO from itertools import chain from pathlib import Path from typing import List, Tuple, Union import pandas as pd from PIL import Image from tqdm.auto import tqdm __all__ = ["read_image"] def encode_image(image) -> str: img_file = BytesIO() ...
PypiClean
/Nitrous-0.9.3-py3-none-any.whl/turbogears/i18n/data/pt.py
languages={'vi': 'vietnamita', 'el': 'grego', 'eo': 'esperanto', 'en': u'ingl\xeas', 'zh': u'chin\xeas', 'af': u'afric\xe2ner', 'sw': u'sua\xedli', 'ca': u'catal\xe3o', 'am': u'am\xe1rico', 'gu': 'guzarate', 'sv': 'sueco', 'cs': 'tcheco', 'ar': u'ar\xe1bico', 'mk': u'maced\xf4nio', 'ga': u'irland\xeas', 'eu': 'basco',...
PypiClean
/job_offer_classifier-0.0.8.tar.gz/job_offer_classifier-0.0.8/CONTRIBUTING.md
# How to contribute ## How to get started Before anything else, please install the git hooks that run automatic scripts during each commit and merge to strip the notebooks of superfluous metadata (and avoid merge conflicts). After cloning the repository, run the following command inside it: ``` nbdev_install_git_hook...
PypiClean
/qiskit_terra-0.25.1-cp38-abi3-win32.whl/qiskit/circuit/library/basis_change/qft.py
from typing import Optional import warnings import numpy as np from qiskit.circuit import QuantumCircuit, QuantumRegister, CircuitInstruction from ..blueprintcircuit import BlueprintCircuit class QFT(BlueprintCircuit): r"""Quantum Fourier Transform Circuit. The Quantum Fourier Transform (QFT) on :math:`n` ...
PypiClean
/pyjackson-0.0.28.tar.gz/pyjackson-0.0.28/ci/bootstrap.py
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import os import sys from os.path import abspath from os.path import dirname from os.path import exists from os.path import join from os.path import normpath try: from os.path import samefile excep...
PypiClean
/scikit-learn-3way-split-0.0.1.tar.gz/scikit-learn-3way-split-0.0.1/sklearn/decomposition/_fastica.py
import warnings import numpy as np from scipy import linalg from ..base import BaseEstimator, TransformerMixin from ..exceptions import ConvergenceWarning from ..utils import check_array, as_float_array, check_random_state from ..utils.validation import check_is_fitted from ..utils.validation import FLOAT_DTYPES _...
PypiClean
/pulumi_azure_native-2.5.1a1693590910.tar.gz/pulumi_azure_native-2.5.1a1693590910/pulumi_azure_native/dbformysql/v20180601privatepreview/get_virtual_network_rule.py
import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ = [ 'GetVirtualNetworkRuleResult', 'AwaitableGetVirtualNetworkRuleResult', 'get_virtual_network_rule', 'get_virtual_network_rule_outpu...
PypiClean
/pythreejs-2.4.2.tar.gz/pythreejs-2.4.2/docs/source/api/materials/ShaderMaterial_autogen.rst
.. py:currentmodule:: pythreejs ShaderMaterial ==================================================== .. Use autoclass to fill any memebers not manually specified. This ensures it picks up any members in overridden classes. .. autohastraits:: ShaderMaterial() :members: :undoc-members: Inherits :py:cl...
PypiClean
/python-perfrepo-1.tar.gz/python-perfrepo-1/perfrepo/PerfRepoRESTAPI.py
__author__ = """ olichtne@redhat.com (Ondrej Lichtner) """ import requests import logging from perfrepo.PerfRepoObject import PerfRepoObject from perfrepo.PerfRepoMetric import PerfRepoMetric from perfrepo.PerfRepoReport import PerfRepoReport from perfrepo.PerfRepoTest import PerfRepoTest from perfrepo.PerfRepoTestExe...
PypiClean
/asm.cmsui-0.1.18.tar.gz/asm.cmsui-0.1.18/src/asm/cmsui/static/tinymce/plugins/xhtmlxtras/js/attributes.js
function init() { tinyMCEPopup.resizeToInnerSize(); var inst = tinyMCEPopup.editor; var dom = inst.dom; var elm = inst.selection.getNode(); var f = document.forms[0]; var onclick = dom.getAttrib(elm, 'onclick'); setFormValue('title', dom.getAttrib(elm, 'title')); setFormValue('id', dom.getAttrib(elm, 'id')); ...
PypiClean
/hyperh2v3-0.9.2.tar.gz/hyperh2v3-0.9.2/hyper/packages/rfc3986/misc.py
import re # These are enumerated for the named tuple used as a superclass of # URIReference URI_COMPONENTS = ['scheme', 'authority', 'path', 'query', 'fragment'] important_characters = { 'generic_delimiters': ":/?#[]@", 'sub_delimiters': "!$&'()*+,;=", # We need to escape the '*' in this case 're_sub_...
PypiClean
/holoviews_samap-2.0.0.tar.gz/holoviews_samap-2.0.0/holoviews_samap/plotting/bokeh/element.py
import warnings from types import FunctionType import param import numpy as np import bokeh import bokeh.plotting from bokeh.core.properties import value from bokeh.document.events import ModelChangedEvent from bokeh.models import ( ColorBar, ColorMapper, Legend, Renderer, Title, tools ) from bokeh.models.axes i...
PypiClean
/benchling_api_client-2.0.207-py3-none-any.whl/benchling_api_client/v2/stable/models/dna_sequence_bulk_create.py
from typing import Any, cast, Dict, List, Optional, Type, TypeVar, Union import attr from ..extensions import NotPresentError from ..models.custom_fields import CustomFields from ..models.dna_annotation import DnaAnnotation from ..models.dna_sequence_part import DnaSequencePart from ..models.fields import Fields from...
PypiClean
/qudi_iqo_modules-0.4.0-py3-none-any.whl/qudi/logic/nv_calculator_logic.py
from PySide2 import QtCore import numpy as np from qudi.core.module import LogicBase from qudi.util.mutex import Mutex from qudi.core.connector import Connector from qudi.core.statusvariable import StatusVar from scipy.constants import physical_constants class NVCalculatorLogic(LogicBase): """ This is the Lo...
PypiClean
/vioneta-2023.7.3.tar.gz/vioneta-2023.7.3/homeassistant/components/litejet/scene.py
import logging from typing import Any from pylitejet import LiteJet, LiteJetError from homeassistant.components.scene import Scene from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers.entity...
PypiClean
/packages/pmagg/ui/legend_setting.py
from PySide2 import QtWidgets from .linestyles import * class Window(QtWidgets.QDialog): def __init__(self, event, canvas): super().__init__() self.setWindowTitle('Legend Setting') self.legends = [] self.event_legend = event self.legend = event.artist self.canvas = ...
PypiClean
/apache_airflow_client-2.7.0rc1-py3-none-any.whl/airflow_client/client/model/relative_delta.py
import re # noqa: F401 import sys # noqa: F401 from airflow_client.client.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
/space_escape_raksoiv-0.4.0-py3-none-any.whl/space_escape/scenes/menu/menu.py
from pygame.mixer import Sound from space_escape.core.game_objects import Background, Cursor from space_escape.core.scene import Scene from space_escape.core.path import get_asset_path from .main_menu import MainMenu from .highscore import HighScore class Menu(Scene): def clear(self): self.background_so...
PypiClean
/nlp_tools-1.0.tar.gz/nlp_tools-1.0/nlp_tools/tasks/labeling/cascade_model.py
from typing import Dict, Any from tensorflow import keras import tensorflow as tf import numpy as np from nlp_tools.layers import L, KConditionalRandomField from nlp_tools.tasks.labeling.abc_model import ABCLabelingModel from nlp_tools.logger import logger from nlp_tools.layers.pool_layer import PoolerInputLayer fro...
PypiClean
/microcosm-dynamodb-1.1.0.tar.gz/microcosm-dynamodb-1.1.0/microcosm_dynamodb/loaders/conventions.py
from os import environ from credstash import paddedInt from microcosm.loaders import load_from_dict from microcosm_dynamodb.loaders.encrypted import EncryptedDynamoDBLoader def load_from_dynamodb(environment=None): """ Fluent shorthand for the whole brevity thing. """ if environment is None: ...
PypiClean
/secimtools-22.3.23.tar.gz/secimtools-22.3.23/scripts/log_and_glog_transformation.py
import os import logging import argparse from argparse import RawDescriptionHelpFormatter # Impot add-on libraries import numpy as np import pandas as pd import math # Impot local data libraries from secimtools.dataManager import logger as sl from secimtools.dataManager.interface import wideToDesign def getOptions()...
PypiClean
/opentelemetry-container-distro-0.2.0.tar.gz/opentelemetry-container-distro-0.2.0/src/opentelemetry_container_distro/__init__.py
import os from importlib.metadata import version from typing import List, Optional from unittest import mock from opentelemetry.environment_variables import OTEL_TRACES_EXPORTER from opentelemetry.instrumentation.distro import BaseDistro # type: ignore from opentelemetry.sdk._configuration import _OTelSDKConfigurator...
PypiClean
/bicleaner-ai-2.3.2.tar.gz/bicleaner-ai-2.3.2/src/bicleaner_ai/models_util.py
from contextlib import redirect_stdout import logging import sys from tensorflow.keras.losses import SparseCategoricalCrossentropy, BinaryCrossentropy from tensorflow.keras.optimizers import Adam from sklearn.metrics import matthews_corrcoef import tensorflow as tf import numpy as np def calibrate_output(y_true, y_pr...
PypiClean
/cancat-2.9.5.2-py3-none-any.whl/cancatlib/envi/__init__.py
import types import struct import logging import platform import contextlib from cancatlib.envi.exc import * logger = logging.getLogger(__name__) # TODO: move into const.py # Parsed Opcode Formats ARCH_DEFAULT = 0 << 16 # arch 0 is whatever the mem object has as default ARCH_I386 = 1 << 16 ARCH_AMD64 ...
PypiClean
/haystack_bio-0.4.0.tar.gz/haystack_bio-0.4.0/README.md
HAYSTACK ======== Epigenetic Variability and Motif Analysis Pipeline -------------------------------------------------- **Current version**: 0.3 Summary ------- Haystack is a suite of computational tools to study epigenetic variability, cross-cell-type plasticity of chromatin states and transcription factors ...
PypiClean
/psyneulink-0.14.0.0.tar.gz/psyneulink-0.14.0.0/Scripts/Models (Under Development)/Adaptive Replay Model.py
import numpy as np from psyneulink import * stim_size = 10 context_size = 2 num_actions = 4 rpe_size = 1 # def ExepctedValueCalc(variable): # variable[] # ********************************************************************************************* # PERCEPTUAL AND ACTION MECHANISMS # *...
PypiClean
/azure-quantum-0.25.222596b1.tar.gz/azure-quantum-0.25.222596b1/azure/quantum/_client/_quantum_client.py
from copy import deepcopy from typing import TYPE_CHECKING from azure.core import PipelineClient from msrest import Deserializer, Serializer from . import models from ._configuration import QuantumClientConfiguration from .operations import JobsOperations, ProvidersOperations, QuotasOperations, StorageOperations if...
PypiClean
/mindsponge_ascend-1.0.0rc1-py3-none-any.whl/mindsponge/toolkits/__main__.py
import argparse from . import tools def _mytest(subparsers): """ :param subparsers: :return: """ mytest = subparsers.add_parser("test", help="test the basic function of Xponge") mytest.add_argument("-o", metavar="test", default="test", help="the prefix for the output files") mytest.add_ar...
PypiClean
/mtools-legacy-1.7.0.5.tar.gz/mtools-legacy-1.7.0.5/INSTALL.md
Installation Instructions for mtools ==================================== ### Python You need to have Python 3.6 or newer installed in order to use mtools. Older versions of Python are not supported. To check your Python version, run `python --version` on the command line. ### mtools Installation #### Installation...
PypiClean
/piglab-0.2.5-py3-none-any.whl/machinelearning/models/pigface/facenet.py
# MIT License # # Copyright (c) 2016 David Sandberg # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, me...
PypiClean
/ought-ice-0.5.0.tar.gz/ought-ice-0.5.0/ice/recipes/abstract_qa.py
from dataclasses import dataclass from typing import Optional from ice.recipe import recipe @dataclass class Abstract: title: str authors: list[str] year: Optional[int] text: str DEFAULT_ABSTRACTS = [ Abstract( title="Association Between Cigarette Smoking Prevalence and Income Level: A ...
PypiClean
/ql-2.3.0.tar.gz/ql-2.3.0/src/quill/scan/address/paths.py
from enum import Enum, IntEnum from ...fold import ns_path from ...manifest.namings import alias_df from .routing import routing_df __all__ = ["AddressPath"] class AddressPart(str): def __new__(cls, *args, **kw): return super().__new__(cls, *args, **kw) class NameSpaceString(AddressPart): pass c...
PypiClean
/qc.statusmessage-1.0b3.tar.gz/qc.statusmessage-1.0b3/qc/statusmessage/message.py
from binascii import b2a_base64, a2b_base64 from UserList import UserList import simplejson as json # maximum length of a single message MAX_LENGTH=600 # the various types of messages STRING_TYPE = 1 # just a string MSGID_TYPE = 2 # a message id which needs to be translated ALL_TYPES = (STRING_TYPE, MSGID_T...
PypiClean
/vns_web3-0.0.2.tar.gz/vns_web3-0.0.2/vns_web3/web3/middleware/exception_retry_request.py
from typing import ( TYPE_CHECKING, Any, Callable, Collection, Type, ) from requests.exceptions import ( ConnectionError, HTTPError, Timeout, TooManyRedirects, ) from web3.types import ( RPCEndpoint, RPCResponse, ) if TYPE_CHECKING: from web3 import Web3 # noqa: F401 ...
PypiClean
/msgraph_beta_sdk-1.0.0a9-py3-none-any.whl/msgraph/generated/on_premises_publishing_profiles/item/connector_groups/item/connector_group_item_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
/wheeltennis-1.2.0.tar.gz/wheeltennis-1.2.0/README.md
Wheeltennis: a wheelchair tennis data processing package ======================================================== Essential data analysis scripts to analyse wheelchair tennis field data which means: * Standardised field testing * Wheeling match performance * Visualisation of IMUs * More in future (?) Prerequisites -...
PypiClean
/cupy_cuda11x-12.2.0-cp38-cp38-win_amd64.whl/cupyx/scipy/sparse/linalg/_norm.py
import numpy import cupy import cupyx.scipy.sparse def _sparse_frobenius_norm(x): if cupy.issubdtype(x.dtype, cupy.complexfloating): sqnorm = abs(x).power(2).sum() else: sqnorm = x.power(2).sum() return cupy.sqrt(sqnorm) def norm(x, ord=None, axis=None): """Norm of a cupy.scipy.spma...
PypiClean
/django-reportengine-0.3.1.tar.gz/django-reportengine-0.3.1/reportengine/outputformats.py
from django.core.exceptions import ImproperlyConfigured from django.shortcuts import render_to_response from django.template.context import RequestContext from django.http import HttpResponse from django.utils.encoding import smart_unicode import csv from cStringIO import StringIO from xml.etree import ElementTree as E...
PypiClean
/pylid-2019.10.16.8.44.1.324752.tar.gz/pylid-2019.10.16.8.44.1.324752/README.md
# Pylid ![logo](https://www.qaviton.com/wp-content/uploads/logo-svg.svg) [![version](https://img.shields.io/pypi/v/pylid.svg)](https://pypi.python.org/pypi) [![license](https://img.shields.io/pypi/l/pylid.svg)](https://pypi.python.org/pypi) [![open issues](https://img.shields.io/github/issues/yehonadav/pylid)](http...
PypiClean
/temul_toolkit-0.1.7-py3-none-any.whl/temul/example_data.py
import os from hyperspy.io import load my_path = os.path.dirname(__file__) example_MoS2_vesta_xyz = None def path_to_example_data_MoS2_vesta_xyz(): """ Get the path of the vesta xyz file for bilayer MoS2 Example ------- >>> import temul.example_data as example_data >>> path_vesta_file = ex...
PypiClean
/scitools_iris-3.7.0-py3-none-any.whl/iris/analysis/_interpolation.py
"""A collection of helpers for interpolation.""" from collections import namedtuple from itertools import product import operator import numpy as np from numpy.lib.stride_tricks import as_strided import numpy.ma as ma from iris.coords import AuxCoord, DimCoord import iris.util _DEFAULT_DTYPE = np.float16 Extrapol...
PypiClean
/comt-2.6.4.tar.gz/comt-2.6.4/src/cm/media/js/lib/yui/yui3-3.15.0/build/datatype-date-math/datatype-date-math.js
YUI.add('datatype-date-math', function (Y, NAME) { /** * Date Math submodule. * * @module datatype-date * @submodule datatype-date-math * @for Date */ var LANG = Y.Lang; Y.mix(Y.namespace("Date"), { /** * Checks whether a native JavaScript Date contains a valid value. * @for Date * @method i...
PypiClean
/odoo12_addon_purchase_order_approval_block-12.0.1.0.1-py3-none-any.whl/odoo/addons/purchase_order_approval_block/README.rst
.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License LGPL-3 ============================= Purchase Order Approval Block ============================= This module allows you to block the approval of an RFQ when an Approval B...
PypiClean
/azure-mgmt-fluidrelay-1.1.0b1.zip/azure-mgmt-fluidrelay-1.1.0b1/azure/mgmt/fluidrelay/operations/_fluid_relay_containers_operations.py
import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, map_error, ) from azure.core.paging import I...
PypiClean
/Newsroom-1.0-py3-none-any.whl/newsroom/static/dist/user_profile_js.172f2ff380ad41f3bfea.js
webpackJsonp([8],{ /***/ 107: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.modalReducer = modalReducer; var _actions = __webpack_require__(15); function modalReducer(state, action) { switch (action.type) { ...
PypiClean
/rostspace-0.1.1-py3-none-any.whl/src/visualization/pdb.py
import dash_bio as dashbio from .base import * representation_options = [ {"label": "backbone", "value": "backbone"}, {"label": "ball+stick", "value": "ball+stick"}, {"label": "cartoon", "value": "cartoon"}, {"label": "hyperball", "value": "hyperball"}, {"label": "licorice", "value": "licorice"},...
PypiClean
/PyVBMC-1.0.1-py3-none-any.whl/pyvbmc/priors/trapezoidal.py
from textwrap import indent import numpy as np from pyvbmc.formatting import full_repr from pyvbmc.priors import Prior, tile_inputs class Trapezoidal(Prior): """Multivariate trapezoidal prior. A prior distribution represented by a density with external bounds ``a`` and ``b`` and internal points ``u`` a...
PypiClean
/ftm-columnstore-0.1.1.tar.gz/ftm-columnstore-0.1.1/ftm_columnstore/driver.py
import logging from functools import lru_cache from typing import Any, Iterable, Iterator, Optional import pandas as pd from clickhouse_driver import Client, errors from . import settings log = logging.getLogger(__name__) def table_exists(e: Exception, table: str) -> bool: if f"Table default.{table} already ex...
PypiClean
/msgraph_beta_sdk-1.0.0a9-py3-none-any.whl/msgraph/generated/users/item/notifications/item/notification_item_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
/radish-bdd-1.0.0a3.tar.gz/radish-bdd-1.0.0a3/src/radish/parser/__main__.py
import sys from pathlib import Path import click import colorful as cf from radish.config import Config from radish.terrain import world from radish.parser.core import FeatureFileParser from radish.errors import RadishError from radish.logger import enable_radish_debug_mode_click_hook, logger def expand_feature_fil...
PypiClean
/yahoo-finance-data-0.0.9.tar.gz/yahoo-finance-data-0.0.9/yfd/ScraperSpecificTools.py
import datetime import time import yfd.GeneralPurposeTools as GeneralPurposeTools import random import collections s_splitString = '*1*!*2*1*!*3*2*1*!' #All patterns that are not acceptable as inputs. #Determines if input is NOT acceptable. def ViaNegativa(queryString, \ tabooPatterns=[r'\((\d)\)']): ...
PypiClean
/FinQuant-0.6.2-py3-none-any.whl/finquant/asset.py
import numpy as np import pandas as pd from finquant.data_types import FLOAT, INT from finquant.returns import daily_returns, historical_mean_return from finquant.type_utilities import type_validation class Asset: """ Parent class representing a generic financial asset. :param data: Historical price dat...
PypiClean
/labml-nn-0.4.135.tar.gz/labml-nn-0.4.135/labml_nn/transformers/knn/build_index.py
from typing import Optional import faiss import numpy as np import torch from labml import experiment, monit, lab from labml.utils.pytorch import get_modules from labml_nn.transformers.knn.train_model import Configs def load_experiment(run_uuid: str, checkpoint: Optional[int] = None): """ Load a saved exper...
PypiClean
/cosmo_utils-0.1.64.tar.gz/cosmo_utils-0.1.64/astropy_helpers/astropy_helpers/extern/numpydoc/numpydoc.py
from __future__ import division, absolute_import, print_function import sys import re import pydoc import sphinx import inspect import collections if sphinx.__version__ < '1.0.1': raise RuntimeError("Sphinx 1.0.1 or newer is required") from .docscrape_sphinx import get_doc_object, SphinxDocString if sys.version...
PypiClean
/django-easy-rest-3.1.tar.gz/django-easy-rest-3.1/easy_rest/views/api_views.py
import json from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status as http_status from django.conf import settings from .debugger import DebugHandler, DebugCache import inspect class RestApiView(APIView): """ this is the main api view of the dja...
PypiClean
/stadtradeln-data-0.0.2rc2.tar.gz/stadtradeln-data-0.0.2rc2/src/stadtradeln_data_manager/cli_utils.py
import numpy as np import pathlib from stadtradeln_data_tools.constants import default_cache_dir, data_urls from stadtradeln_data_tools.status import Status from stadtradeln_data_tools.dataset_downloader import DownloadResult, download_dataset from stadtradeln_data_tools.dataset_extractor import ExtractResult, extract_...
PypiClean
/arangopipe-0.0.70.0.2.tar.gz/arangopipe-0.0.70.0.2/arangopipe_frontend/app/public/ace/autocomplete.js
define(function(require, exports, module) { "use strict"; var HashHandler = require("./keyboard/hash_handler").HashHandler; var AcePopup = require("./autocomplete/popup").AcePopup; var util = require("./autocomplete/util"); var lang = require("./lib/lang"); var dom = require("./lib/dom"); var snippetManager = require(...
PypiClean
/eth_account_n-0.0.2-py3-none-any.whl/eth_account/account.py
from collections.abc import ( Mapping, ) import json import os from typing import ( Optional, Tuple, TypeVar, Union, cast, ) import warnings from cytoolz import ( dissoc, ) from eth_keyfile import ( create_keyfile_json, decode_keyfile_json, ) from eth_keys import ( KeyAPI, k...
PypiClean
/cognitivefactory_interactive_clustering-0.5.4-py3-none-any.whl/cognitivefactory/interactive_clustering/constraints/abstract.py
# ============================================================================== # IMPORTS : # ============================================================================== from abc import ABC, abstractmethod # To define an abstract class. from typing import List, Optional, Tuple # To type Python code (mypy). # =...
PypiClean
/nltk-ma-0.0.6.tar.gz/nltk-ma-0.0.6/nltkma/corpus/reader/plaintext.py
import nltkma.data from nltkma.tokenize import * from nltkma.corpus.reader.util import * from nltkma.corpus.reader.api import * class PlaintextCorpusReader(CorpusReader): """ Reader for corpora that consist of plaintext documents. Paragraphs are assumed to be split using blank lines. Sentences and word...
PypiClean
/mera_tvm_host_only-1.3.1-cp36-cp36m-manylinux_2_27_x86_64.whl/tvm/topi/image/grid_sample.py
"""affine_grid and grid_sample operator""" from tvm import te, tir def affine_grid(data, target_shape): """affine_grid operator that generates 2D sampling grid. This operation is described in https://arxiv.org/pdf/1506.02025.pdf. It generates a uniform sampling grid within the target shape and normalizes...
PypiClean
/MarkDo-0.3.0.tar.gz/MarkDo-0.3.0/markdo/static/bower/codemirror/mode/smalltalk/smalltalk.js
CodeMirror.defineMode('smalltalk', function(config, modeConfig) { var specialChars = /[+\-/\\*~<>=@%|&?!.:;^]/; var keywords = /true|false|nil|self|super|thisContext/; var Context = function(tokenizer, parent) { this.next = tokenizer; this.parent = parent; }; var Token = function(name, context, eos) { thi...
PypiClean
/bashdoctest-0.1.2.tar.gz/bashdoctest-0.1.2/CONTRIBUTING.rst
.. highlight:: shell ============ Contributing ============ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. You can contribute in many ways: Types of Contributions ---------------------- Report Bugs ~~~~~~~~~~~ Report bugs at https://github.com...
PypiClean
/bzr-2.7.0.tar.gz/bzr-2.7.0/bzrlib/chunk_writer.py
from __future__ import absolute_import import zlib from zlib import Z_FINISH, Z_SYNC_FLUSH class ChunkWriter(object): """ChunkWriter allows writing of compressed data with a fixed size. If less data is supplied than fills a chunk, the chunk is padded with NULL bytes. If more data is supplied, then the w...
PypiClean
/spanner-orm-fork-0.1.10.tar.gz/spanner-orm-fork-0.1.10/README.md
# Google Cloud Spanner ORM This is a lightweight ORM written in Python and built on top of Cloud Spanner. ## Getting started ### How to install Make sure that Python 3.7 is the default version of python for your environment, then run: ```pip install git+https://github.com/google/python-spanner-orm#egg=spanner_orm``...
PypiClean
/tencentcloud-sdk-python-3.0.973.tar.gz/tencentcloud-sdk-python-3.0.973/tencentcloud/trro/v20220325/models.py
import warnings from tencentcloud.common.abstract_model import AbstractModel class BatchDeleteDevicesRequest(AbstractModel): """BatchDeleteDevices请求参数结构体 """ def __init__(self): r""" :param _ProjectId: 目标删除设备所属项目ID :type ProjectId: str :param _DeviceIds: 目标删除设备的设备ID数组 ...
PypiClean
/interactions-fastapi-0.0.1.tar.gz/interactions-fastapi-0.0.1/README.md
# FastAPI wrapper for interactions.py An Extension library to add Fast API for your interactions.py bot . ## Installation ``pip install git+https://github.com/Damego/interactions-fastapi.git`` ## Examples ```python import interactions from interactions.ext.api import setup client = interactions.Client(...) api =...
PypiClean
/symro-0.0.2.tar.gz/symro-0.0.2/core/mat/metaentity.py
from abc import ABC, abstractmethod from typing import Dict, List, Union import symro.core.constants as const from symro.core.mat.entity import Entity from symro.core.mat.state import State from symro.core.mat.setn import BaseSetNode, CompoundSetNode from symro.core.mat.lexprn import RelationalOperationNode from symro...
PypiClean
/pulumi_azure_nextgen-0.6.2a1613157620.tar.gz/pulumi_azure_nextgen-0.6.2a1613157620/pulumi_azure_nextgen/botservice/v20171201/get_channel.py
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetChannelResult', 'AwaitableGetChannelResult', 'get_channel', ] @pulumi.output_type class GetChannelResult: """ Bo...
PypiClean
/pandeia.engine-3.0.tar.gz/pandeia.engine-3.0/pandeia/engine/helpers/bit/pyetc_util.py
import os, pprint, re, sys import numpy as np from numpy import nan, inf, NaN, Inf from collections import OrderedDict import ast class mock_log: """ Mock up a "log" pkg that simply matches what the old pyetc code needs. The intent is to NOT bring in any more pyetc code than necessary. """ def __init_...
PypiClean
/openpeerpower_frontend-20210523.2-py3-none-any.whl/opp_frontend/frontend_es5/chunk.20d72da7da776c75e31b.js
(self.webpackChunkopenpeerpower_frontend=self.webpackChunkopenpeerpower_frontend||[]).push([[3075],{96151:function(e,t,r){"use strict";r.d(t,{T:function(){return n},y:function(){return i}});var n=function(e){requestAnimationFrame((function(){return setTimeout(e,0)}))},i=function(){return new Promise((function(e){n(e)})...
PypiClean
/gmmvi-1.1.tar.gz/gmmvi-1.1/docs/source/optimization/Modules/sample_selector/classes.rst
.. _sample-selector: SampleSelector ============== .. inheritance-diagram:: gmmvi.optimization.gmmvi_modules.sample_selector.SampleSelector gmmvi.optimization.gmmvi_modules.sample_selector.VipsSampleSelector gmmvi.optimization.gmmvi_modules.sample_selector.LinSampleSelector :parts: -4 .. autoclass:: gmmvi.optimi...
PypiClean
/rpi_ws281x_hub-1.0.3-py3-none-any.whl/rpi_ws281x_hub/api.py
from typing import Optional, Callable, Any, List from threading import Thread from timeit import default_timer as timer import time import logging import json from os import path import asyncio import uvicorn import click from fastapi import FastAPI, WebSocket, WebSocketDisconnect, Response, Query from fastapi.respo...
PypiClean
/plone.app.z3cform-4.3.0.tar.gz/plone.app.z3cform-4.3.0/plone/app/z3cform/interfaces.py
from plone.app.textfield.widget import IRichTextWidget as patextfield_IRichTextWidget from plone.schema.interfaces import IFormLayer from z3c.form.interfaces import IRadioWidget from z3c.form.interfaces import ISelectWidget as IBaseSelectWidget from z3c.form.interfaces import ISingleCheckBoxWidget from z3c.form.interfa...
PypiClean
/effect-edc-0.1.37.tar.gz/effect-edc-0.1.37/effect_ae/form_validators/ae_initial.py
from django import forms from edc_adverse_event.choices import AE_GRADE, STUDY_DRUG_RELATIONSHIP from edc_adverse_event.constants import ( DEFINITELY_RELATED, DISCHARGED, INPATIENT, POSSIBLY_RELATED, PROBABLY_RELATED, ) from edc_adverse_event.form_validators import AeInitialFormValidator as FormVali...
PypiClean
/image_rename-0.2.0-py3-none-any.whl/image_rename/template/plugins/default_panels.py
import image_rename from image_rename import template from image_rename.template.node import PanelBase from image_rename.core import ImageRenameApp, Event from image_rename.api.tkmixins import TreeMixin import tkinter as tk from tkinter.font import Font from tkinter import ttk from pathlib import Path from typing impor...
PypiClean
/distributions_tomsloni-0.1.tar.gz/distributions_tomsloni-0.1/distributions_tomsloni/Gaussiandistribution.py
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Gaussian(Distribution): """ Gaussian distribution class for calculating and visualizing a Gaussian distribution. Attributes: mean (float) representing the mean value of the distribution stdev (float) representing ...
PypiClean
/python_generators-0.0.0-py3-none-any.whl/tay_say_test/__init__.py
__author__ = 'Ruan Herculano' import random def print_lyric(): album_taylor_swift = set() add_tim_mcgraw(album_taylor_swift) print(random.choice(tuple(album_taylor_swift))) def add_tim_mcgraw(album_taylor_swift): # "Tim McGraw" album_taylor_swift.add('He said the way my blue eyes shined, put tho...
PypiClean
/gridworks_atn-0.4.0.tar.gz/gridworks_atn-0.4.0/src/gwatn/types/ps_regprices_gnode/r_regp_sync/r_regp_sync_1_0_0.py
import datetime import time import uuid from typing import Any from typing import Dict from typing import List from typing import Optional from typing import Tuple from gridworks.errors import * import gwatn.types.hack_test_dummy as test_dummy from gwatn.types.hack_type_base import HackTypeBase from gwatn.types.hack...
PypiClean
/autoreduce_webapp-21.1.4.tar.gz/autoreduce_webapp-21.1.4/autoreduce_webapp/autoreduce_django/migrations/0001_initial.py
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name='Cache', fields=[ ('id', models.AutoField(auto_created=True, pri...
PypiClean
/eden_python-0.2.0-py3-none-any.whl/eden/client.py
import requests import json import time from .data_handlers import Encoder, Decoder class Client(object): """ Can be used to send requests to a hosted eden block on some remote (or local) server. Args: url (str): URL which is printed on your eden block host. username (str, optional): Used...
PypiClean
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_en-ws.js
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); return (i == -1) ? 0 : n.length - i - 1; } function getVF(n, opt_pre...
PypiClean
/datasette-surveys-1.1.8.tar.gz/datasette-surveys-1.1.8/datasette_surveys/static/lib/ace-builds/src-min/theme-idle_fingers.js
define("ace/theme/idle_fingers",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-idle-fingers",t.cssText=".ace-idle-fingers .ace_gutter {background: #3b3b3b;color: rgb(153,153,153)}.ace-idle-fingers .ace_print-margin {width: 1px;background: #3b3b3b}.ace-idle-fingers {background-c...
PypiClean
/Keras_JukeBox-0.0.3.tar.gz/Keras_JukeBox-0.0.3/keras_jukebox/jukebox_backend.py
from tensorflow.keras.callbacks import Callback from tensorflow.keras import backend as K import threading, sys, json, os import numpy as np import paho.mqtt.client as mqtt from PyQt5 import QtCore, QtGui, QtWidgets from keras_jukebox.utils import red_print, green_print, yellow_print, cyan_print class JukeBoxCallb...
PypiClean
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/lorem/ru_RU/__init__.py
from typing import Dict from .. import Provider as LoremProvider class Provider(LoremProvider): """Implement lorem provider for ``ru_RU`` locale.""" word_list = ( "войти", "монета", "вскинуть", "желание", "экзамен", "налоговый", "вытаскивать", ...
PypiClean
/cubric-mrs-0.2.2.tar.gz/cubric-mrs-0.2.2/cubric_mrs/press.py
import argparse import numpy as np import pyx import suspect import os from cubric_mrs import voxel, table # define some useful global parameters voxel_outline_color = pyx.color.rgb(1, 1, 0) voxel_outline_width = pyx.style.linewidth(1.0) plot_linewidth = pyx.style.linewidth(0.01) simple_plot_color = pyx.color.rgb(0, ...
PypiClean
/k2hr3_osnl-1.0.6.tar.gz/k2hr3_osnl-1.0.6/k2hr3_osnl/cfg.py
"""Parses a config file and stores configurations.""" from __future__ import (absolute_import, division, print_function, unicode_literals) import logging from pathlib import Path from typing import List, Set, Dict, Tuple, Optional # noqa: pylint: disable=unused-import from oslo_config import ...
PypiClean
/schemaorg_types-0.4.0.tar.gz/schemaorg_types-0.4.0/schemaorg_types/Mosque.py
from __future__ import annotations from datetime import * from time import * from typing import * from pydantic import * class Mosque(BaseModel): """A mosque. References: https://schema.org/Mosque Note: Model Depth 5 Attributes: potentialAction: (Optional[Union[List[Union[st...
PypiClean
/ampel-ztf-archive-0.8.0a0.tar.gz/ampel-ztf-archive-0.8.0a0/ampel/ztf/archive/server/models.py
from typing import List, Dict, Any, Literal, Optional from pydantic import BaseModel, Field class StreamDescription(BaseModel): resume_token: str chunk_size: int chunks: int class Topic(BaseModel): description: str = Field(..., description="Informative string for this topic") candids: List[int] ...
PypiClean
/confine-controller-1.0.2.tar.gz/confine-controller-1.0.2/controller/apps/tinc/migrations/0012_auto__chg_field_tincaddress_island__chg_field_host_island.py
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ("nodes", "0007_auto__add_island"), ) def forwards(self, orm): # Changing field 'TincAddress.isla...
PypiClean
/ruyaml-1.0.0a0.tar.gz/ruyaml-1.0.0a0/_test/roundtrip.py
from __future__ import print_function """ helper routines for testing round trip of commented YAML data """ import sys import textwrap from pathlib import Path enforce = object() def dedent(data): try: position_of_first_newline = data.index('\n') for idx in range(position_of_first_newline): ...
PypiClean
/wille-2.3.zip/wille-2.3/doc/deploy.rst
Deploying Wille =============== Running on a (Linux) Server --------------------------- While Wille is designed to primarily run on a local machine, it may be deployed into a server as well. A notable drawback in Wille is that it does not support any standard server interface such as WSGI, therefore requiring us to m...
PypiClean
/openquake.engine-3.17.1-py3-none-any.whl/openquake/hazardlib/gsim/zhao_2016.py
import numpy as np from openquake.baselib.general import CallableDict from openquake.hazardlib.gsim.base import GMPE, CoeffsTable from openquake.hazardlib import const from openquake.hazardlib.imt import PGA, SA CONSTANTS = {"m_c": 7.1, "xcro": 2.0, "xinto": 10.0, # Used in subduction Inter...
PypiClean
/ducted-1.0.tar.gz/ducted-1.0/duct/outputs/elasticsearch.py
import time import json import datetime from twisted.internet import reactor, defer, task from twisted.python import log try: from OpenSSL import SSL from twisted.internet import ssl except: SSL=None from duct.protocol import elasticsearch from duct.objects import Output class ElasticSearch(Output): ...
PypiClean
/convo_nlu2-2.0.0.tar.gz/convo_nlu2-2.0.0/convo/core/actions/forms.py
from enum import Enum from typing import Text, List, Optional, Union, Any, Dict, Tuple, Set import logging import json from convo.core.actions import action from convo.core.actions.loops import LoopAction from convo.core.channels import OutputChannel from convo.shared.core.domain import Domain from convo.core.actions...
PypiClean
/tensorflow_cpu_test_package-2.11.0rc0-cp38-cp38-win_amd64.whl/tensorflow/python/ops/parallel_for/pfor.py
"""Compiled parallel-for loop.""" # pylint: disable=missing-docstring,g-direct-tensorflow-import import collections import string import sys import traceback import numpy as np from functools import partial from tensorflow.compiler.tf2xla.python import xla from tensorflow.core.framework import full_type_pb2 from ten...
PypiClean
/uncertainty_baselines-0.0.7.tar.gz/uncertainty_baselines-0.0.7/README.md
# Uncertainty Baselines [![Travis](https://travis-ci.org/google/uncertainty-baselines.svg?branch=master)](https://travis-ci.org/google/uncertainty-baselines) Uncertainty Baselines is a set of common benchmarks for uncertainty calibration and robustness research. ## Installation Uncertainty Baselines can be installed ...
PypiClean