code
stringlengths
114
1.05M
path
stringlengths
3
312
quality_prob
float64
0.5
0.99
learning_prob
float64
0.2
1
filename
stringlengths
3
168
kind
stringclasses
1 value
from typing import List import numpy as np from scipy.interpolate import InterpolatedUnivariateSpline from qp.quantile_pdf_constructors.abstract_pdf_constructor import AbstractQuantilePdfConstructor class CdfSplineDerivative(AbstractQuantilePdfConstructor): """Implements an interpolation algorithm based on a lis...
/qp_prob-0.8.3-py3-none-any.whl/qp/quantile_pdf_constructors/cdf_spline_derivative.py
0.962568
0.849909
cdf_spline_derivative.py
pypi
from typing import List import numpy as np from qp.quantile_pdf_constructors.abstract_pdf_constructor import AbstractQuantilePdfConstructor from qp.utils import evaluate_hist_multi_x_multi_y class PiecewiseConstant(AbstractQuantilePdfConstructor): """This constructor takes the input quantiles and locations, and ...
/qp_prob-0.8.3-py3-none-any.whl/qp/quantile_pdf_constructors/piecewise_constant.py
0.940524
0.77109
piecewise_constant.py
pypi
from typing import List import numpy as np from qp.quantile_pdf_constructors.abstract_pdf_constructor import AbstractQuantilePdfConstructor from qp.utils import interpolate_multi_x_multi_y class PiecewiseLinear(AbstractQuantilePdfConstructor): """This constructor takes the input quantiles and locations, and calc...
/qp_prob-0.8.3-py3-none-any.whl/qp/quantile_pdf_constructors/piecewise_linear.py
0.959771
0.806586
piecewise_linear.py
pypi
from typing import List import numpy as np from scipy.interpolate import interp1d from qp.quantile_pdf_constructors.abstract_pdf_constructor import AbstractQuantilePdfConstructor class DualSplineAverage(AbstractQuantilePdfConstructor): """Implementation of the "area-under-the-curve" using the average of the ...
/qp_prob-0.8.3-py3-none-any.whl/qp/quantile_pdf_constructors/dual_spline_average.py
0.962116
0.828002
dual_spline_average.py
pypi
from typing import List class AbstractQuantilePdfConstructor(): """Abstract class to define an interface for concrete PDF Constructor classes """ def __init__(self, quantiles:List[float], locations: List[List[float]]) -> None: """Constructor to instantiate this class. Parameters -...
/qp_prob-0.8.3-py3-none-any.whl/qp/quantile_pdf_constructors/abstract_pdf_constructor.py
0.938145
0.848219
abstract_pdf_constructor.py
pypi
import logging import numpy as np class Brier: """Brier score based on https://en.wikipedia.org/wiki/Brier_score#Original_definition_by_Brier Parameters ---------- prediction: NxM array, float Predicted probability for N celestial objects to have a redshift in one of M bins. The s...
/qp_prob-0.8.3-py3-none-any.whl/qp/metrics/brier.py
0.942909
0.803482
brier.py
pypi
import logging import numpy as np from scipy import stats import qp from qp.metrics.metrics import calculate_outlier_rate from qp.metrics.array_metrics import quick_anderson_ksamp DEFAULT_QUANTS = np.linspace(0, 1, 100) class PIT(): """PIT(qp_ens, true_vals, eval_grid=DEFAULT_QUANTS) Probability Integral Tran...
/qp_prob-0.8.3-py3-none-any.whl/qp/metrics/pit.py
0.905176
0.574007
pit.py
pypi
from smtplib import SMTP from qp.mail.rfc822_mailbox import rfc822_mailbox from qp.pub.common import get_publisher import socket class Email(object): max_header_recipients = 10 def __init__(self): self.set_subject('') self.set_body('') webmaster = self.get_webmaster_address() ...
/qp-1.1.tar.gz/qp-1.1/mail/send.py
0.412175
0.17205
send.py
pypi
import re rfc822_specials_re = re.compile(r'[\(\)\<\>\@\,\;\:\\\"\.\[\]]') class RFC822Mailbox: """ In RFC 822, a "mailbox" is either a bare e-mail address or a bare e-mail address coupled with a chunk of text, most often someone's name. Eg. the following are all "mailboxes" in the RFC 822 grammar: ...
/qp-1.1.tar.gz/qp-1.1/mail/rfc822_mailbox.py
0.752922
0.330498
rfc822_mailbox.py
pypi
from datetime import datetime, timedelta from durus.persistent import Persistent from qp.lib.spec import specify, spec, either, add_getters from qp.pub.common import get_request, get_publisher from qp.pub.user import User class Session (Persistent): """ Class attribute: lease_time: timedelta The ...
/qp-1.1.tar.gz/qp-1.1/pub/session.py
0.800926
0.224937
session.py
pypi
from durus.persistent import Persistent from durus.persistent_dict import PersistentDict from durus.persistent_set import PersistentSet from md5 import md5 from qp.lib.spec import require, specify, spec, add_getters, sequence, either from qp.pub.common import get_publisher from qp.lib.util import randbytes class Permi...
/qp-1.1.tar.gz/qp-1.1/pub/user.py
0.625324
0.319294
user.py
pypi
import sys from qp.pub.common import get_request, get_path, redirect, not_found, get_path from qp.pub.common import get_response class Directory (object): """ Subclasses of this class define the publishing traversal through one '/' of a url. Usually, this involves overriding get_exports() and providi...
/qp-1.1.tar.gz/qp-1.1/fill/directory.py
0.52683
0.416263
directory.py
pypi
from datetime import datetime from durus.btree import BTree from durus.persistent import Persistent from durus.persistent_dict import PersistentDict from qp.lib.spec import require, get_spec_problems, anything, mapping, spec from qp.lib.spec import either class Keyed (object): """ An item with an int key used ...
/qp-1.1.tar.gz/qp-1.1/lib/keep.py
0.865466
0.40539
keep.py
pypi
from datetime import datetime from durus.client_storage import ClientStorage from durus.connection import Connection from durus.file_storage import FileStorage from durus.run_durus import stop_durus from durus.storage_server import wait_for_server, StorageServer from logging import StreamHandler, Formatter, getLogger f...
/qp-1.1.tar.gz/qp-1.1/lib/site.py
0.460289
0.218795
site.py
pypi
import re from types import FunctionType, MethodType def format_spec(spec): """ Returns the canonical string representation of the spec. """ if spec is None: return 'None' if type(spec) is tuple: return '(%s)' % ', '.join(map(format_spec, spec)) if type(spec) is list: re...
/qp-1.1.tar.gz/qp-1.1/lib/spec.py
0.713432
0.254191
spec.py
pypi
"Oh, you think darkness is your ally. But you merely adopted the dark; I was born in it, molded by it. I didn't see the light until I was already a man, by then it was nothing to me but BLINDING! The shadows betray you, because they belong to me!" -Bane (Dark Knight) .///` `.--::::::-...
/qpbane-1.0.1.tar.gz/qpbane-1.0.1/README.md
0.417865
0.876264
README.md
pypi
<!-- # <img src="https://user-images.githubusercontent.com/89252165/153070064-4d3fb42e-a5f9-40fd-b856-755d58a52687.svg" width="32"> qpcr --> # <img src="./docs/source/qpcr_tiny.svg" width="25"> qpcr ### A python module to analyse qPCR data on single-datasets or high-throughput [![DOI](https://zenodo.org/badge/3982449...
/qpcr-4.0.0.tar.gz/qpcr-4.0.0/README.md
0.563138
0.955817
README.md
pypi
# Decorating datafiles This notebook gives an example how to decorate your irregular or Big Table datafiles. It makes use of the provided example data in the `Example Data` directory. 1 - Decorating an "irregular" datafile --- An "irregular" datafile stores it's assays in separate tables that are either above one a...
/qpcr-4.0.0.tar.gz/qpcr-4.0.0/Examples/8_decorating_datafiles.ipynb
0.86094
0.984811
8_decorating_datafiles.ipynb
pypi
Welcome to ``qpcr``. This python package is designed for user friendly and easy analysis of qPCR data. ``qpcr`` offers a variety of methods to automate your qPCR data analysis and thus replace labour and time consuming Excel sessions with just a few lines of code. Read on to learn about the basics of ``qpcr``. There ar...
/qpcr-4.0.0.tar.gz/qpcr-4.0.0/docs/source/gettingstarted.rst
0.826957
0.89616
gettingstarted.rst
pypi
# Decorating datafiles This notebook gives an example how to decorate your irregular or Big Table datafiles. It makes use of the provided example data in the `Example Data` directory. 1 - Decorating an "irregular" datafile --- An "irregular" datafile stores it's assays in separate tables that are either above one a...
/qpcr-4.0.0.tar.gz/qpcr-4.0.0/docs/source/tutorials/8_decorating_datafiles.ipynb
0.86094
0.984811
8_decorating_datafiles.ipynb
pypi
from docutils.statemachine import ViewList from docutils.parsers.rst import Directive from sphinx.util.nodes import nested_parse_with_titles from docutils import nodes from qpformat.file_formats import formats_dict, SeriesData class Base(Directive): required_arguments = 0 optional_arguments = 0 def gene...
/qpformat-0.14.4.tar.gz/qpformat-0.14.4/docs/extensions/qpformat_readers.py
0.480966
0.330417
qpformat_readers.py
pypi
r"""Conversion of external file formats to .npy files Sometimes the data recorded are not in a file format supported by qpformat or it is not feasible to implement a reader class for a very unique data set. In this example, QPI data, stored as a tuple of files ("\*_intensity.txt" and "\*_phase.txt") with commas as dec...
/qpformat-0.14.4.tar.gz/qpformat-0.14.4/examples/convert_txt2npy.py
0.71602
0.509032
convert_txt2npy.py
pypi
r"""Conversion of external file formats to qpimage .h5 files Sometimes the data recorded are not in a file format supported by qpformat or it is not feasible to implement a reader class for a very unique data set. In this example, QPI data, stored as a tuple of files ("\*_intensity.txt" and "\*_phase.txt") with commas...
/qpformat-0.14.4.tar.gz/qpformat-0.14.4/examples/convert_txt2h5.py
0.729038
0.528594
convert_txt2h5.py
pypi
from urllib import response from pydantic import BaseModel import pickle import requests from requests.models import Response class Solver: """ Solver class connects to QpiAI-Opt's cloud server, and run the solver on the passed problem. Initialize Solver class with problem and access token :type pro...
/qpiai_opt_api-1.0.1-py3-none-any.whl/qpiai_opt/solver/solver.py
0.584034
0.227169
solver.py
pypi
from copy import copy from typing import Optional, Union from proton import Message from qpid_bow import Priority from qpid_bow.exc import UnroutableMessage def decode_message(data: bytes) -> Message: """Utility method to decode message from bytes. Args: data: Raw AMQP data in bytes. Returns:...
/qpid-bow-1.1.1.tar.gz/qpid-bow-1.1.1/qpid_bow/message.py
0.933764
0.283533
message.py
pypi
from datetime import timedelta from logging import getLogger from typing import Optional from warnings import warn from proton import Message from qpid_bow import ReconnectStrategy, RunState from qpid_bow.receiver import ( Receiver, ReceiveCallback, ) logger = getLogger() class RemoteProcedure(Receiver): ...
/qpid-bow-1.1.1.tar.gz/qpid-bow-1.1.1/qpid_bow/remote_procedure.py
0.92385
0.182899
remote_procedure.py
pypi
from asyncio import Event as AsyncioEvent from enum import Enum, auto from logging import getLogger from typing import Optional, Type from proton import Connection from proton.handlers import MessagingHandler from proton.reactor import Container, Backoff, EventBase from qpid_bow.config import ( config, get_u...
/qpid-bow-1.1.1.tar.gz/qpid-bow-1.1.1/qpid_bow/__init__.py
0.894598
0.199717
__init__.py
pypi
class MessageCorrupt(Exception): """Corrupt.""" pass class UnroutableMessage(Exception): """Origin message has no reply-to address.""" pass class RetriableMessage(Exception): """Release message back to the queue.""" pass class ObjectNotFound(Exception): """No object found.""" def _...
/qpid-bow-1.1.1.tar.gz/qpid-bow-1.1.1/qpid_bow/exc.py
0.904698
0.319135
exc.py
pypi
from collections import defaultdict from datetime import timedelta from typing import ( MutableMapping, Optional, ) from proton import Message from qpid_bow.management import create_QMF2_query from qpid_bow.remote_procedure import RemoteProcedure def get_sessions(server_url: Optional[str] = None) -> dict: ...
/qpid-bow-1.1.1.tar.gz/qpid-bow-1.1.1/qpid_bow/management/session.py
0.917354
0.225331
session.py
pypi
from collections import defaultdict from copy import copy from datetime import timedelta from enum import Enum from logging import getLogger from typing import ( MutableMapping, Optional, Set, Tuple, ) from uuid import ( NAMESPACE_URL, uuid5, ) from proton import Message from qpid_bow.managem...
/qpid-bow-1.1.1.tar.gz/qpid-bow-1.1.1/qpid_bow/management/exchange.py
0.8936
0.166472
exchange.py
pypi
from datetime import timedelta from typing import ( Optional, Tuple, ) from qpid_bow.management import ( create_QMF2_method_invoke, get_broker_id, get_object, handle_QMF2_exception, ) from qpid_bow.remote_procedure import RemoteProcedure def reroute_queue(queue_name: str, exchange_name: str, ...
/qpid-bow-1.1.1.tar.gz/qpid-bow-1.1.1/qpid_bow/management/queue.py
0.913225
0.185855
queue.py
pypi
from datetime import timedelta from typing import Optional from proton import Message from qpid_bow.management import ( EXCHANGE_ID_PREFIX, create_QMF2_query, ) from qpid_bow.remote_procedure import RemoteProcedure def queue_statistics(queue_name: Optional[str] = None, include_autodele...
/qpid-bow-1.1.1.tar.gz/qpid-bow-1.1.1/qpid_bow/management/statistics.py
0.914054
0.347703
statistics.py
pypi
from datetime import timedelta from typing import Any, Mapping, Optional from proton import Message from qpid_bow.exc import ( ObjectNotFound, QMF2Exception, ) from qpid_bow.remote_procedure import RemoteProcedure QUEUE_ID_PREFIX = 'org.apache.qpid.broker:queue:' EXCHANGE_ID_PREFIX = 'org.apache.qpid.broker:...
/qpid-bow-1.1.1.tar.gz/qpid-bow-1.1.1/qpid_bow/management/__init__.py
0.922062
0.33112
__init__.py
pypi
import dom from cStringIO import StringIO class Visitor: def descend(self, node): for child in node.children: child.dispatch(self) def node(self, node): self.descend(node) def leaf(self, leaf): pass class Identity: def descend(self, node): result = [] for child in node.children: ...
/qpid-python-1.36.0.tar.gz/qpid-python-1.36.0/mllib/transforms.py
0.467818
0.239405
transforms.py
pypi
import sgmllib, xml.sax.handler from dom import * class Parser: def __init__(self): self.tree = Tree() self.node = self.tree self.nodes = [] def line(self, id, lineno, colno): while self.nodes: n = self.nodes.pop() n._line(id, lineno, colno) def add(self, node): self.node.add(n...
/qpid-python-1.36.0.tar.gz/qpid-python-1.36.0/mllib/parsers.py
0.437103
0.193909
parsers.py
pypi
import struct FIRST_SEG = 0x08 LAST_SEG = 0x04 FIRST_FRM = 0x02 LAST_FRM = 0x01 class Frame: HEADER = "!2BHxBH4x" HEADER_SIZE = struct.calcsize(HEADER) MAX_PAYLOAD = 65535 - struct.calcsize(HEADER) def __init__(self, flags, type, track, channel, payload): if len(payload) > Frame.MAX_PAYLOAD: rais...
/qpid-python-1.36.0.tar.gz/qpid-python-1.36.0/qpid/framing.py
0.507324
0.183703
framing.py
pypi
import datetime, string from packer import Packer from datatypes import serial, timestamp, RangedSet, Struct, UUID from ops import Compound, PRIMITIVE, COMPOUND class CodecException(Exception): pass def direct(t): return lambda x: t def map_str(s): for c in s: if ord(c) >= 0x80: return "vbin16" retu...
/qpid-python-1.36.0.tar.gz/qpid-python-1.36.0/qpid/codec010.py
0.415373
0.168309
codec010.py
pypi
from qpid.codec010 import StringCodec from qpid.ops import PRIMITIVE def codec(name): type = PRIMITIVE[name] def encode(x): sc = StringCodec() sc.write_primitive(type, x) return sc.encoded def decode(x): sc = StringCodec(x) return sc.read_primitive(type) return encode, decode # XXX: ne...
/qpid-python-1.36.0.tar.gz/qpid-python-1.36.0/qpid/messaging/message.py
0.678647
0.170888
message.py
pypi
import matplotlib import matplotlib.pylab as plt import numpy as np import qpimage # load the experimental data edata = np.load("./data/hologram_cell.npz") # create QPImage instance qpi = qpimage.QPImage(data=edata["data"], bg_data=edata["bg_data"], which_data="raw-oah", ...
/qpimage-0.9.1.tar.gz/qpimage-0.9.1/examples/hologram_cell.py
0.733261
0.67077
hologram_cell.py
pypi
import subprocess from qplay_cli.api_clients.volume_api import VolumeAPIClient from ec2_metadata import ec2_metadata VALID_DATASET_TYPES = ["NSE_EQ", "NSE_OPT", "NSE_FUT", "NSE_MARKET_DATA", "MARKET_DATA"] class Volume: """Commands for listing attached volumes. """ def __init__(self): pass ...
/qplay_cli-1.1.12-py3-none-any.whl/qplay_cli/dataset/volume.py
0.501953
0.19063
volume.py
pypi
# [Bootstrap](https://getbootstrap.com/) [![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com/) ![Bower version](https://img.shields.io/bower/v/bootstrap.svg) [![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap) [![Build Stat...
/qpod_hub-2021.10.11-py3-none-any.whl/qpod/base/static/components/bootstrap/README.md
0.716913
0.908982
README.md
pypi
export declare type Locale = { weekdays: { shorthand: [string, string, string, string, string, string, string]; longhand: [string, string, string, string, string, string, string]; }; months: { shorthand: [string, string, string, string, string, string, string, string, string, string,...
/qpod_hub-2021.10.11-py3-none-any.whl/qpod/base/static/components/flatpickr/dist/types/locale.d.ts
0.719876
0.545528
locale.d.ts
pypi
# Quasi-Periodic Parallel WaveGAN (QPPWG) [![](https://img.shields.io/pypi/v/qppwg)](https://pypi.org/project/qppwg/) ![](https://img.shields.io/pypi/pyversions/qppwg) ![](https://img.shields.io/pypi/l/qppwg) This is official [QPPWG](https://arxiv.org/abs/2005.08654) PyTorch implementation. QPPWG is a non-autoregre...
/qppwg-0.1.2.tar.gz/qppwg-0.1.2/README.md
0.678007
0.923523
README.md
pypi
import abc import typing as ty class RoutineWrapper(abc.ABC): """Wrapper around the framework-specific routine type. This class should be subclassed and implemented by each framework. It helps providing a unique API for all the frameworks that can then be used by the main qprof library to profile th...
/qprof_interfaces-1.0.1-py3-none-any.whl/qprof_interfaces/RoutineWrapper.py
0.853119
0.479626
RoutineWrapper.py
pypi
from qat.lang.AQASM.gates import ParamGate, PredefGate, Gate from ._interfaces import interfaces class RoutineWrapper(interfaces.RoutineWrapper): def __init__(self, gate: ParamGate, linking_set=None, _parent_controls: int = 0): super().__init__() self._gate = gate self._number_of_control...
/qprof_myqlm-1.0.1-py3-none-any.whl/qprof_qat/RoutineWrapper.py
0.855836
0.162746
RoutineWrapper.py
pypi
# Getting started ## How to Build You must have Python ```2 >=2.7.9``` or Python ```3 >=3.4``` installed on your system to install and run this SDK. This SDK package depends on other Python packages like nose, jsonpickle etc. These dependencies are defined in the ```requirements.txt``` file that comes with the SDK....
/qpruvcheig-1.1.tar.gz/qpruvcheig-1.1/README.md
0.665193
0.947332
README.md
pypi
import asyncio from typing import Any, Callable, Coroutine, Dict, Iterable, Optional, Tuple from aiolimiter import AsyncLimiter def get_limiter(max_qps: float): time_period = 0.1 max_rate = max_qps * time_period if max_rate < 1: time_period = time_period / max_rate max_rate = 1 return...
/qps_limit-1.2.5-py3-none-any.whl/qps_limit/run.py
0.832509
0.347011
run.py
pypi
.. _Quadratic programming: ********************* Quadratic programming ********************* Primal problem ============== A quadratic program is defined in standard form as: .. math:: \begin{split}\begin{array}{ll} \underset{x}{\mbox{minimize}} & \frac{1}{2} x^T P x + q^T x \\ \mbo...
/qpsolvers-3.5.0.tar.gz/qpsolvers-3.5.0/doc/quadratic-programming.rst
0.929304
0.872944
quadratic-programming.rst
pypi
from os.path import basename import numpy as np import scipy.sparse from IPython import get_ipython from numpy.linalg import norm from scipy.sparse import csc_matrix from qpsolvers import dense_solvers, solve_qp, sparse_solvers n = 500 M = scipy.sparse.lil_matrix(scipy.sparse.eye(n)) for i in range(1, n - 1): M[...
/qpsolvers-3.5.0.tar.gz/qpsolvers-3.5.0/examples/benchmark_sparse_problem.py
0.538498
0.427397
benchmark_sparse_problem.py
pypi
# QP solvers benchmark [![Build](https://img.shields.io/github/actions/workflow/status/stephane-caron/qpsolvers_benchmark/ci.yml?branch=main)](https://github.com/stephane-caron/qpsolvers_benchmark/actions) [![PyPI version](https://img.shields.io/pypi/v/qpsolvers_benchmark)](https://pypi.org/project/qpsolvers_benchmark...
/qpsolvers_benchmark-1.0.0.tar.gz/qpsolvers_benchmark-1.0.0/README.md
0.548674
0.937498
README.md
pypi
import matplotlib import matplotlib.pylab as plt import numpy as np import qpimage import qpsphere # load the experimental data edata = np.load("./data/hologram_cell.npz") # create QPImage instance qpi = qpimage.QPImage(data=edata["data"], bg_data=edata["bg_data"], which_da...
/qpsphere-0.5.3.tar.gz/qpsphere-0.5.3/examples/cell_edge.py
0.657209
0.59514
cell_edge.py
pypi
import matplotlib.pylab as plt import qpsphere # run simulation with averaged Mie model r = 5e-6 n = 1.360 med = 1.333 c = (125, 133) qpi = qpsphere.simulate(radius=r, sphere_index=n, medium_index=med, wavelength=550e-9, g...
/qpsphere-0.5.3.tar.gz/qpsphere-0.5.3/examples/imagefit_rytov_sc.py
0.778649
0.628208
imagefit_rytov_sc.py
pypi
from compiler import misc, syntax from compiler import pycodegen from compiler.ast import AssName, Assign, Return, AugAssign, List, Getattr from compiler.ast import Function, From, Module, Stmt, Name, CallFunc, Discard from compiler.consts import OP_ASSIGN from compiler.transformer import Transformer from imp import ge...
/qpy-1.1.tar.gz/qpy-1.1/compile.py
0.428233
0.244084
compile.py
pypi
def html_escape_string(s): """(basestring) -> basestring Replace characters '&', '<', '>', '"' with HTML entities. The type of the result is either str or unicode. """ if not isinstance(s, basestring): raise TypeError, 'string object required' s = s.replace("&", "&amp;") s = s.replac...
/qpy-1.1.tar.gz/qpy-1.1/c8.py
0.726426
0.2084
c8.py
pypi
qpyson: Thin Commandline Tool to Explore, Transform, and Munge JSON using Python ================================================================================ The JSON querying tool, [jq](https://stedolan.github.io/jq/), is a really powerful tool. However, it’s sometimes a bit involved and has a learning curve that...
/qpyson-0.3.0.tar.gz/qpyson-0.3.0/README.md
0.838746
0.753716
README.md
pypi
from typing import List from qqbot.model.inline_keyboard import InlineKeyboard from qqbot.model.member import User, Member class MessageGet: def __init__(self, data=None): self.message: Message = Message() if data: self.__dict__ = data class Message: def __init__(self, data=None...
/qq-bot-0.8.5.tar.gz/qq-bot-0.8.5/qqbot/model/message.py
0.558809
0.196152
message.py
pypi
from json import loads from .api import BotAPI from .types import forum class _Text: def __init__(self, data): self.text = data.get("text", None) def __repr__(self): return str(self.__dict__) class _Image: def __init__(self, data): self.plat_image = self._PlatImage(data.get("pl...
/qq_botpy-1.1.2-py3-none-any.whl/botpy/forum.py
0.513912
0.218899
forum.py
pypi
import asyncio import traceback from types import TracebackType from typing import Any, Callable, Coroutine, Dict, List, Tuple, Optional, Union, Type from . import logging from .api import BotAPI from .connection import ConnectionSession from .flags import Intents from .gateway import BotWebSocket from .http import Bo...
/qq_botpy-1.1.2-py3-none-any.whl/botpy/client.py
0.589362
0.156105
client.py
pypi
from typing import Callable, overload, Optional, Any, Type, ClassVar, Dict, Iterator, Tuple, TypeVar __all__ = ("Intents", "Permission") BF = TypeVar("BF", bound="BaseFlags") def fill_with_flags(*, inverted: bool = False) -> Callable[[Type[BF]], Type[BF]]: def decorator(cls: Type[BF]) -> Type[BF]: # fmt...
/qq_botpy-1.1.2-py3-none-any.whl/botpy/flags.py
0.782413
0.178741
flags.py
pypi
import re from collections import deque from functools import lru_cache from io import TextIOBase from itertools import dropwhile from pathlib import Path from typing import Iterable, Iterator, Optional, TextIO, Union, cast import ujson import yaml from .message import Message, MessageBuilder BRACKETS_REGEX = re.com...
/qq_chat_history-1.1.4.tar.gz/qq_chat_history-1.1.4/qq_chat_history/body.py
0.871625
0.175962
body.py
pypi
from backtester.trading_system_parameters import TradingSystemParameters from backtester.features.feature import Feature from backtester.dataSource.yahoo_data_source import YahooStockDataSource from backtester.timeRule.custom_time_rule import CustomTimeRule from backtester.executionSystem.simple_execution_system import...
/qq_training_wheels-0.0.1-py3-none-any.whl/qq_training_wheels/momentum_trading.py
0.725843
0.242553
momentum_trading.py
pypi
from __future__ import annotations from typing import TYPE_CHECKING from . import abc from .enum import AudioStatusType, try_enum if TYPE_CHECKING: from .types.audio import ( StartAudioControl as StartAudioControlPayload, PauseAudioControl as PauseAudioControlPayload, ResumeAudioControl ...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/audio.py
0.846292
0.263593
audio.py
pypi
from __future__ import annotations import datetime from typing import TYPE_CHECKING, Optional from .member import Member from .types.schedule import Schedule as SchedulePayload __all__ = ('Schedule',) if TYPE_CHECKING: from .abc import GuildChannel from .state import ConnectionState from .guild import G...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/schedule.py
0.706292
0.299112
schedule.py
pypi
from __future__ import annotations import io import os from typing import Any, Literal, Optional, TYPE_CHECKING, Tuple, Union from . import utils from .error import QQException __all__ = ( 'Asset', ) if TYPE_CHECKING: ValidStaticFormatTypes = Literal['webp', 'jpeg', 'jpg', 'png'] ValidAssetFormatTypes ...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/asset.py
0.795618
0.22194
asset.py
pypi
from __future__ import annotations from typing import Any, Iterator, List, Optional, TYPE_CHECKING, Tuple from .asset import Asset, AssetMixin from .partial_emoji import _EmojiTag, PartialEmoji from .user import User from .utils import MISSING __all__ = ( 'Emoji', ) if TYPE_CHECKING: from .types.emoji impo...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/emoji.py
0.897141
0.157331
emoji.py
pypi
from __future__ import annotations import io import os from typing import Optional, TYPE_CHECKING, Union __all__ = ( 'File', ) class File: r"""用于 :meth:`abc.Messageable.send` 的参数对象,用于发送文件对象。 .. note:: 文件对象是一次性的,不能在多个 :meth:`abc.Messageable.send` 中重复使用。 Attributes ----------- fp: ...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/file.py
0.673406
0.286319
file.py
pypi
from __future__ import annotations import asyncio import datetime from typing import TYPE_CHECKING, Iterable, Optional, List, overload, Callable, TypeVar, Type, Tuple, Union from . import abc, utils from .enum import ChannelType, try_enum from .error import ClientException from .mixins import Hashable from .object i...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/channel.py
0.816443
0.190272
channel.py
pypi
from __future__ import annotations from typing import Type, TypeVar, List, TYPE_CHECKING, Any, Union __all__ = ( 'AllowedMentions', ) if TYPE_CHECKING: from .types.message import AllowedMentions as AllowedMentionsPayload from .member import Member from .role import Role class _FakeBool: def __...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/mention.py
0.808635
0.336018
mention.py
pypi
from __future__ import annotations from typing import Any, Dict, List, Optional, TypeVar, Union, TYPE_CHECKING from .colour import Colour from .mixins import Hashable from .utils import MISSING __all__ = ( 'Role', ) if TYPE_CHECKING: from .types.role import ( Role as RolePayload, ) from .gu...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/role.py
0.857455
0.210888
role.py
pypi
import array import asyncio import collections.abc import datetime import json import re import sys from bisect import bisect_left from inspect import isawaitable as _isawaitable, signature as _signature from operator import attrgetter from typing import Any, Callable, TypeVar, overload, Optional, Iterable, List, TYPE...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/utils.py
0.599016
0.323327
utils.py
pypi
from __future__ import annotations from typing import Any, TYPE_CHECKING, Optional, Type, TypeVar, Dict, List from .abc import * from .asset import Asset if TYPE_CHECKING: from .channel import DMChannel from .guild import Guild from .message import Message from .state import ConnectionState fro...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/user.py
0.803714
0.162081
user.py
pypi
from __future__ import annotations from typing import Type, Optional, Any, TypeVar, Callable, overload, Iterator, Tuple, ClassVar, Dict __all__ = ( 'Intents', ) FV = TypeVar('FV', bound='flag_value') BF = TypeVar('BF', bound='BaseFlags') class flag_value: def __init__(self, func: Callable[[Any], int]): ...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/flags.py
0.843734
0.200871
flags.py
pypi
from __future__ import annotations import re from typing import Any, Dict, Optional, TYPE_CHECKING, Type, TypeVar, Union, Tuple from .asset import AssetMixin from .error import InvalidArgument __all__ = ( 'PartialEmoji', ) if TYPE_CHECKING: from .state import ConnectionState from .types.message import ...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/partial_emoji.py
0.791338
0.227073
partial_emoji.py
pypi
from __future__ import annotations from typing import Callable, Any, ClassVar, Dict, Iterator, Set, TYPE_CHECKING, Tuple, Type, TypeVar, Optional from .flags import BaseFlags, flag_value, fill_with_flags, alias_flag_value __all__ = ( 'Permissions', 'PermissionOverwrite', ) # A permission alias works like ...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/permissions.py
0.8067
0.375163
permissions.py
pypi
import colorsys import random from typing import ( Any, Optional, Tuple, Type, TypeVar, Union, ) __all__ = ( 'Colour', 'Color', ) CT = TypeVar('CT', bound='Colour') class Colour: """ 代表 QQ 颜色。这个类类似于(红、绿、蓝):class:`tuple` 。 这个有一个别名叫做 Color。 .. container:: operations ...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/colour.py
0.840521
0.381796
colour.py
pypi
from __future__ import annotations from typing import Optional, Any, TYPE_CHECKING, List, Callable, Type, Tuple, Union from qq.error import ClientException, QQException from ... import Role if TYPE_CHECKING: from inspect import Parameter from .converter import Converter from .context import Context ...
/qq.py-1.3.4.tar.gz/qq.py-1.3.4/qq/ext/commands/errors.py
0.791499
0.153232
errors.py
pypi
<h1 style="text-align:center">qqman for Python</h1> ![Install with pypi or anaconda](https://img.shields.io/badge/version-v1.0.6-green) If you want to check out the source code or have any issues please leave a comment at my [github](https://github.com/satchellhong/qqman) repository. <br> This library is inspired by ...
/qqman-1.0.6.tar.gz/qqman-1.0.6/README.md
0.474144
0.912084
README.md
pypi
import array import bisect import struct import socket from typing import Tuple, Union __all__ = ('QQwry',) def int3(data, offset): return data[offset] + (data[offset + 1] << 8) + \ (data[offset + 2] << 16) def int4(data, offset): return data[offset] + (data[offset + 1] << 8) + \ (dat...
/qqwry-linux-python3-0.0.7.tar.gz/qqwry-linux-python3-0.0.7/qqwry/src/qqwry.py
0.546012
0.336331
qqwry.py
pypi
import array import bisect import struct import socket import logging from typing import Tuple, Union __all__ = ('QQwry',) logger = logging.getLogger(__name__) def int3(data, offset): return data[offset] + (data[offset+1] << 8) + \ (data[offset+2] << 16) def int4(data, offset): return data[offse...
/qqwry-py3-1.2.1.tar.gz/qqwry-py3-1.2.1/qqwry/qqwry.py
0.476092
0.228587
qqwry.py
pypi
# Author: Nixawk """ QQWry is a binary file which contains ip-related locations information. This module search it and get location information from it. Usage: >>> from qqwry import QQwry >>> qqWry = QQwry('qqwry.dat') >>> qqWry.ip_location('8.8.8.8') ... Note: pleaes get qqwry ip database fro...
/qqwry-1.0.tar.gz/qqwry-1.0/qqwry.py
0.538983
0.33208
qqwry.py
pypi
from qr_code_generator.wrapper import QrGenerator import argparse def main(): """Main entry function, parses arguments, creates an instance of the wrapper and requests QR codes.""" parser = create_parser() args = parser.parse_args() # When an API token is explicitly specified, set it. Else, initializ...
/qr_code_generator_api-0.1.2.tar.gz/qr_code_generator_api-0.1.2/qr_code_generator/__main__.py
0.687
0.174164
__main__.py
pypi
from qr_code_generator.errors import * from qr_code_generator.helpers import Config, Options, load_yaml import requests import os import json import time class QrGenerator: """ QRGenerator Class, which wraps the API of qr-code-generator.com Parameters ---------- token : str API Access To...
/qr_code_generator_api-0.1.2.tar.gz/qr_code_generator_api-0.1.2/qr_code_generator/wrapper.py
0.745954
0.162579
wrapper.py
pypi
from abc import abstractmethod from typing import List from dataclasses import dataclass class QRDTO: @abstractmethod def to_dict(self): return self.__dict__.copy() def OneOfQRDTO(*variants): class OneOfDTO: __variants = variants def __init__(self, *args, **kwargs): s...
/qr_server-1.1.14.tar.gz/qr_server-1.1.14/qr_server/dto_converter.py
0.804636
0.308659
dto_converter.py
pypi
import datetime import jwt from abc import abstractmethod from .Server import * class ITokenManager(IQRManager): @staticmethod def get_name() -> str: return "token_manager" @abstractmethod def load_config(self, config: IQRConfig): """define tokenizing parameters""" @abstractmetho...
/qr_server-1.1.14.tar.gz/qr_server-1.1.14/qr_server/TokenManager.py
0.586523
0.155303
TokenManager.py
pypi
from qr_image_indexer.qr_generator import load_text_file, print_struct_outline, unpack_data, generate_qr_code_structure from qr_image_indexer.photo_sorter import sort_directory from qr_image_indexer.write_pdf_fpf2 import build_pdf_report import argparse def main(): parser = argparse.ArgumentParser() mutual_ex...
/qrImageIndexer-0.5.0-py3-none-any.whl/qr_image_indexer/__main__.py
0.574037
0.240106
__main__.py
pypi
from io import TextIOWrapper from turtle import fillcolor import qrcode from PIL import Image from typing import Dict, List, Tuple from os import path from csv import reader def build_qr(data : str) -> Image.Image: """ Build a QR code with selected settings. Will use maximum error correction; this should r...
/qrImageIndexer-0.5.0-py3-none-any.whl/qr_image_indexer/qr_generator.py
0.828696
0.530784
qr_generator.py
pypi
from fpdf import FPDF from typing import Dict, List, Tuple from PIL.Image import Image from qrcode.image.pil import PilImage from math import ceil from copy import copy import io TARGET_ROWS_PER_PAGE = 6 def build_pdf_report(data_struct : Dict[str, Tuple[Dict, Image]], path: str, repeat_headings : bool = False, order...
/qrImageIndexer-0.5.0-py3-none-any.whl/qr_image_indexer/write_pdf_fpf2.py
0.763924
0.361503
write_pdf_fpf2.py
pypi
import requests class QRadarAPIClient: """" The parent class for a QRadar API endpoints providing a constructor and several classmethods. """ def __init__(self, baseurl: str, header: dict, verify: bool = True): self._baseurl = baseurl self._header = header self._verify = verif...
/qradar-api-0.0.6.tar.gz/qradar-api-0.0.6/src/qradar/api/client.py
0.823293
0.374448
client.py
pypi
from typing import List from .qradarmodel import QRadarModel class Logsource(QRadarModel): def __init__(self, *, id: int = None, name: str = None, description: str = None, type_id: int = None, protocol_type_id: int = None, protocol_parameters: List = None, enabled: bool = None, gateway: str = None, ...
/qradar-api-0.0.6.tar.gz/qradar-api-0.0.6/src/qradar/models/log_source.py
0.744935
0.163245
log_source.py
pypi
# ********************************************************************* # +++ IMPORTS # ********************************************************************* import math from PyQt5 import QtWidgets, QtCore, QtGui # ********************************************************************* # +++ CLASS # *****************...
/qradial_menu-0.1.2.tar.gz/qradial_menu-0.1.2/qradial_menu/qradial_menu.py
0.516108
0.245334
qradial_menu.py
pypi
import random import psutil from pyquil.quil import Program from pyquil import get_qc from pyquil.gates import H, CNOT BPF = 53 # Number of bits in a float RECIP_BPF = 2**-BPF def start_servers(): """Checks if servers are running, if not starts them.""" import os try: os.system("gnome-termi...
/qrandom_NoahGWood-1.0.0-py3-none-any.whl/qrandom/qrandom.py
0.61832
0.432962
qrandom.py
pypi
__author__ = "Ryan Galloway <ryan@rsgalloway.com>" __version__ = "0.1.1" # --------------------------------------------------------------------------------------------- # SUMMARY # --------------------------------------------------------------------------------------------- """The QRangeSlider class implements a hor...
/qrangeslider-0.1.1.tar.gz/qrangeslider-0.1.1/qrangeslider.py
0.474388
0.178669
qrangeslider.py
pypi
from __future__ import absolute_import, unicode_literals, division import io import math from PIL import Image, ImageDraw, ImageSequence from segno import consts __version__ = '2.1.0' def write_pil(qrcode, scale=1, border=None, dark='#000', light='#fff', finder_dark=False, finder_light=False, ...
/qrcode-artistic-2.1.0.tar.gz/qrcode-artistic-2.1.0/qrcode_artistic.py
0.941095
0.422683
qrcode_artistic.py
pypi
import qrcode import argparse import sys import pathlib def generate_qr_code( data, output_file: str = "qrcode.png", version=1, error_correction=qrcode.constants.ERROR_CORRECT_H, box_size=10, border=4, ): """ Generates a QR code based on the provided parameters and saves it as an image...
/qrcode-cli-0.1.0.tar.gz/qrcode-cli-0.1.0/QR Generator/qr.py
0.531939
0.51068
qr.py
pypi
import math from typing import Optional from PIL import Image, ImageDraw, ImageFilter from qrcode_styled.base.image import BaseStyledImage, CORNERS, DOT_MASK, SQUARE_MASK from .figures.corner import Corner, ExtraRoundedCornerSquare from .figures.dot import Dot, ExtraRoundedDot __all__ = [ 'PilStyledImage', ] c...
/qrcode_styled-0.2.2.tar.gz/qrcode_styled-0.2.2/qrcode_styled/pil/image.py
0.848706
0.164181
image.py
pypi
from qrcode_styled.types import num from .base import Figure __all__ = [ 'Dot', 'RoundedDot', 'ExtraRoundedDot', ] class Dot(Figure): def draw(self, x: num, y: num, size: num, color=None, top=0, right=0, bottom=0, left=0): raise NotImplementedError def _basic_dot(self, x, y, size, color,...
/qrcode_styled-0.2.2.tar.gz/qrcode_styled-0.2.2/qrcode_styled/pil/figures/dot.py
0.753376
0.501282
dot.py
pypi
import math from typing import Union from PIL import Image from qrcode import constants from qrcode.image.base import BaseImage __all__ = [ 'BaseStyledImage', 'SQUARE_MASK', 'DOT_MASK', 'CORNERS', ] _ERROR_CORRECTION_PERCENTS = { constants.ERROR_CORRECT_L: 0.07, constants.ERROR_CORRECT_M: 0.1...
/qrcode_styled-0.2.2.tar.gz/qrcode_styled-0.2.2/qrcode_styled/base/image.py
0.780579
0.321127
image.py
pypi
from lxml import etree as d from qrcode_styled.types import num from .base import Figure __all__ = [ 'Dot', 'ExtraRoundedDot', ] class Dot(Figure): def draw(self, x: num, y: num, size: num, top=0, right=0, bottom=0, left=0): raise NotImplementedError def _basic_dot(self, x, y, size, rotatio...
/qrcode_styled-0.2.2.tar.gz/qrcode_styled-0.2.2/qrcode_styled/svg/figures/dot.py
0.729134
0.432842
dot.py
pypi
from typing import TYPE_CHECKING, List import qrcode.image.base from qrcode.compat.pil import Image, ImageDraw from qrcode.image.styles.colormasks import QRColorMask from qrcode.image.styles.moduledrawers import SquareModuleDrawer from qrcode.image.styles.moduledrawers.base import QRModuleDrawer if TYPE_CHECKING: ...
/qrcode-xcolor-0.1.1.tar.gz/qrcode-xcolor-0.1.1/qrcode_xcolor/__init__.py
0.8586
0.319307
__init__.py
pypi
============================= Pure python QR Code generator ============================= Generate QR codes. For a standard install (which will include pillow_ for generating images), run:: pip install qrcode[pil] .. _pillow: https://pypi.python.org/pypi/Pillow What is a QR Code? ================== A Quick R...
/qrcode-7.3.1.tar.gz/qrcode-7.3.1/README.rst
0.908853
0.651923
README.rst
pypi