index
int64
0
731k
package
stringlengths
2
98
name
stringlengths
1
76
docstring
stringlengths
0
281k
code
stringlengths
4
8.19k
signature
stringlengths
2
42.8k
embed_func_code
listlengths
768
768
725,947
validator_collection.validators
numeric
Validate that ``value`` is a numeric value. :param value: The value to validate. :param allow_empty: If ``True``, returns :obj:`None <python:None>` if ``value`` is :obj:`None <python:None>`. If ``False``, raises an :class:`EmptyValueError <validator_collection.errors.EmptyValueError>` if ``v...
# -*- coding: utf-8 -*- # The lack of a module docstring for this module is **INTENTIONAL**. # The module is imported into the documentation using Sphinx's autodoc # extension, and its member function documentation is automatically incorporated # there as needed. import decimal as decimal_ import fractions import io ...
(value, allow_empty=False, minimum=None, maximum=None, **kwargs)
[ 0.03530561923980713, 0.0046048457734286785, 0.00770893320441246, 0.015979301184415817, -0.012394755147397518, -0.04832658916711807, 0.007466004695743322, -0.02293245680630207, -0.02688409388065338, -0.04806746542453766, 0.04396467283368111, 0.09708505123853683, 0.04040171951055527, 0.01662...
725,949
validator_collection.validators
path
Validate that ``value`` is a valid path-like object. :param value: The value to validate. :param allow_empty: If ``True``, returns :obj:`None <python:None>` if ``value`` is empty. If ``False``, raises a :class:`EmptyValueError <validator_collection.errors.EmptyValueError>` if ``value`` is em...
# -*- coding: utf-8 -*- # The lack of a module docstring for this module is **INTENTIONAL**. # The module is imported into the documentation using Sphinx's autodoc # extension, and its member function documentation is automatically incorporated # there as needed. import decimal as decimal_ import fractions import io ...
(value, allow_empty=False, **kwargs)
[ 0.03530561923980713, 0.0046048457734286785, 0.00770893320441246, 0.015979301184415817, -0.012394755147397518, -0.04832658916711807, 0.007466004695743322, -0.02293245680630207, -0.02688409388065338, -0.04806746542453766, 0.04396467283368111, 0.09708505123853683, 0.04040171951055527, 0.01662...
725,950
validator_collection.validators
path_exists
Validate that ``value`` is a path-like object that exists on the local filesystem. :param value: The value to validate. :param allow_empty: If ``True``, returns :obj:`None <python:None>` if ``value`` is empty. If ``False``, raises a :class:`EmptyValueError <validator_collection.errors.EmptyVal...
# -*- coding: utf-8 -*- # The lack of a module docstring for this module is **INTENTIONAL**. # The module is imported into the documentation using Sphinx's autodoc # extension, and its member function documentation is automatically incorporated # there as needed. import decimal as decimal_ import fractions import io ...
(value, allow_empty=False, **kwargs)
[ 0.03530561923980713, 0.0046048457734286785, 0.00770893320441246, 0.015979301184415817, -0.012394755147397518, -0.04832658916711807, 0.007466004695743322, -0.02293245680630207, -0.02688409388065338, -0.04806746542453766, 0.04396467283368111, 0.09708505123853683, 0.04040171951055527, 0.01662...
725,951
validator_collection.validators
string
Validate that ``value`` is a valid string. :param value: The value to validate. :type value: :class:`str <python:str>` / :obj:`None <python:None>` :param allow_empty: If ``True``, returns :obj:`None <python:None>` if ``value`` is empty. If ``False``, raises a :class:`EmptyValueError <validator...
# -*- coding: utf-8 -*- # The lack of a module docstring for this module is **INTENTIONAL**. # The module is imported into the documentation using Sphinx's autodoc # extension, and its member function documentation is automatically incorporated # there as needed. import decimal as decimal_ import fractions import io ...
(value, allow_empty=False, coerce_value=False, minimum_length=None, maximum_length=None, whitespace_padding=False, **kwargs)
[ 0.03530561923980713, 0.0046048457734286785, 0.00770893320441246, 0.015979301184415817, -0.012394755147397518, -0.04832658916711807, 0.007466004695743322, -0.02293245680630207, -0.02688409388065338, -0.04806746542453766, 0.04396467283368111, 0.09708505123853683, 0.04040171951055527, 0.01662...
725,952
validator_collection.validators
stringIO
Validate that ``value`` is a :class:`StringIO <python:io.StringIO>` object. :param value: The value to validate. :param allow_empty: If ``True``, returns :obj:`None <python:None>` if ``value`` is empty. If ``False``, raises a :class:`EmptyValueError <validator_collection.errors.EmptyValueError>` ...
# -*- coding: utf-8 -*- # The lack of a module docstring for this module is **INTENTIONAL**. # The module is imported into the documentation using Sphinx's autodoc # extension, and its member function documentation is automatically incorporated # there as needed. import decimal as decimal_ import fractions import io ...
(value, allow_empty=False, **kwargs)
[ 0.03530561923980713, 0.0046048457734286785, 0.00770893320441246, 0.015979301184415817, -0.012394755147397518, -0.04832658916711807, 0.007466004695743322, -0.02293245680630207, -0.02688409388065338, -0.04806746542453766, 0.04396467283368111, 0.09708505123853683, 0.04040171951055527, 0.01662...
725,953
validator_collection.validators
time
Validate that ``value`` is a valid :class:`time <python:datetime.time>`. .. caution:: This validator will **always** return the time as timezone naive (effectively UTC). If ``value`` has a timezone / UTC offset applied, the validator will coerce the value returned back to UTC. :param value:...
# -*- coding: utf-8 -*- # The lack of a module docstring for this module is **INTENTIONAL**. # The module is imported into the documentation using Sphinx's autodoc # extension, and its member function documentation is automatically incorporated # there as needed. import decimal as decimal_ import fractions import io ...
(value, allow_empty=False, minimum=None, maximum=None, coerce_value=True, **kwargs)
[ 0.03530561923980713, 0.0046048457734286785, 0.00770893320441246, 0.015979301184415817, -0.012394755147397518, -0.04832658916711807, 0.007466004695743322, -0.02293245680630207, -0.02688409388065338, -0.04806746542453766, 0.04396467283368111, 0.09708505123853683, 0.04040171951055527, 0.01662...
725,954
validator_collection.validators
timezone
Validate that ``value`` is a valid :class:`tzinfo <python:datetime.tzinfo>`. .. caution:: This does **not** verify whether the value is a timezone that actually exists, nor can it resolve timezone names (e.g. ``'Eastern'`` or ``'CET'``). For that kind of functionality, we recommend you utilize:...
# -*- coding: utf-8 -*- # The lack of a module docstring for this module is **INTENTIONAL**. # The module is imported into the documentation using Sphinx's autodoc # extension, and its member function documentation is automatically incorporated # there as needed. import decimal as decimal_ import fractions import io ...
(value, allow_empty=False, positive=True, **kwargs)
[ 0.03530561923980713, 0.0046048457734286785, 0.00770893320441246, 0.015979301184415817, -0.012394755147397518, -0.04832658916711807, 0.007466004695743322, -0.02293245680630207, -0.02688409388065338, -0.04806746542453766, 0.04396467283368111, 0.09708505123853683, 0.04040171951055527, 0.01662...
725,955
validator_collection.validators
url
Validate that ``value`` is a valid URL. .. note:: URL validation is...complicated. The methodology that we have adopted here is *generally* compliant with `RFC 1738 <https://tools.ietf.org/html/rfc1738>`_, `RFC 6761 <https://tools.ietf.org/html/rfc6761>`_, `RFC 2181 <https://tools.ie...
# -*- coding: utf-8 -*- # The lack of a module docstring for this module is **INTENTIONAL**. # The module is imported into the documentation using Sphinx's autodoc # extension, and its member function documentation is automatically incorporated # there as needed. import decimal as decimal_ import fractions import io ...
(value, allow_empty=False, allow_special_ips=False, **kwargs)
[ 0.03530561923980713, 0.0046048457734286785, 0.00770893320441246, 0.015979301184415817, -0.012394755147397518, -0.04832658916711807, 0.007466004695743322, -0.02293245680630207, -0.02688409388065338, -0.04806746542453766, 0.04396467283368111, 0.09708505123853683, 0.04040171951055527, 0.01662...
725,956
validator_collection.validators
uuid
Validate that ``value`` is a valid :class:`UUID <python:uuid.UUID>`. :param value: The value to validate. :param allow_empty: If ``True``, returns :obj:`None <python:None>` if ``value`` is empty. If ``False``, raises a :class:`EmptyValueError <validator_collection.errors.EmptyValueError>` if...
# -*- coding: utf-8 -*- # The lack of a module docstring for this module is **INTENTIONAL**. # The module is imported into the documentation using Sphinx's autodoc # extension, and its member function documentation is automatically incorporated # there as needed. import decimal as decimal_ import fractions import io ...
(value, allow_empty=False, **kwargs)
[ 0.03530561923980713, 0.0046048457734286785, 0.00770893320441246, 0.015979301184415817, -0.012394755147397518, -0.04832658916711807, 0.007466004695743322, -0.02293245680630207, -0.02688409388065338, -0.04806746542453766, 0.04396467283368111, 0.09708505123853683, 0.04040171951055527, 0.01662...
725,958
validator_collection.validators
variable_name
Validate that the value is a valid Python variable name. .. caution:: This function does **NOT** check whether the variable exists. It only checks that the ``value`` would work as a Python variable (or class, or function, etc.) name. :param value: The value to validate. :param allow_em...
# -*- coding: utf-8 -*- # The lack of a module docstring for this module is **INTENTIONAL**. # The module is imported into the documentation using Sphinx's autodoc # extension, and its member function documentation is automatically incorporated # there as needed. import decimal as decimal_ import fractions import io ...
(value, allow_empty=False, **kwargs)
[ 0.03530561923980713, 0.0046048457734286785, 0.00770893320441246, 0.015979301184415817, -0.012394755147397518, -0.04832658916711807, 0.007466004695743322, -0.02293245680630207, -0.02688409388065338, -0.04806746542453766, 0.04396467283368111, 0.09708505123853683, 0.04040171951055527, 0.01662...
725,960
pymediainfo
MediaInfo
An object containing information about a media file. :class:`MediaInfo` objects can be created by directly calling code from libmediainfo (in this case, the library must be present on the system): >>> pymediainfo.MediaInfo.parse("/path/to/file.mp4") Alternatively, objects may be created from Me...
class MediaInfo: """ An object containing information about a media file. :class:`MediaInfo` objects can be created by directly calling code from libmediainfo (in this case, the library must be present on the system): >>> pymediainfo.MediaInfo.parse("/path/to/file.mp4") Alternatively, object...
(xml: str, encoding_errors: str = 'strict')
[ 0.05679398402571678, -0.04564710333943367, -0.08349563181400299, 0.056921131908893585, 0.04138755425810814, -0.026553306728601456, -0.0007609174936078489, 0.07222159951925278, -0.023586455732584, -0.0004503254313021898, -0.018055399879813194, 0.0235652644187212, 0.014050153084099293, 0.032...
725,961
pymediainfo
__eq__
null
def __eq__(self, other): # type: ignore return self.tracks == other.tracks
(self, other)
[ 0.0054412889294326305, -0.01906386762857437, -0.06823763251304626, 0.06483091413974762, -0.05519574508070946, -0.04931141063570976, -0.0446314737200737, 0.07591135799884796, 0.06252535432577133, -0.0052434238605201244, 0.0036540513392537832, -0.06620736420154572, 0.06617295742034912, 0.055...
725,962
pymediainfo
__init__
null
def __init__(self, xml: str, encoding_errors: str = "strict"): xml_dom = ET.fromstring(xml.encode("utf-8", encoding_errors)) self.tracks = [] # This is the case for libmediainfo < 18.03 # https://github.com/sbraz/pymediainfo/issues/57 # https://github.com/MediaArea/MediaInfoLib/commit/575a9a32e6960e...
(self, xml: str, encoding_errors: str = 'strict')
[ 0.008959734812378883, 0.003349004779011011, -0.03776576370000839, 0.03301293030381203, -0.02835184894502163, 0.014827374368906021, -0.012212398461997509, 0.06918217986822128, 0.06364026665687561, 0.02958134561777115, 0.013451071456074715, 0.006193364970386028, 0.022094257175922394, 0.03952...
725,963
pymediainfo
_get_library_paths
null
@staticmethod def _get_library_paths(os_is_nt: bool) -> Tuple[str]: if os_is_nt: library_paths = ("MediaInfo.dll",) elif sys.platform == "darwin": library_paths = ("libmediainfo.0.dylib", "libmediainfo.dylib") else: library_paths = ("libmediainfo.so.0",) script_dir = os.path.dirn...
(os_is_nt: bool) -> Tuple[str]
[ 0.038524873554706573, -0.03708110377192497, -0.04762610048055649, 0.029149513691663742, 0.0390365906059742, 0.0063827382400631905, -0.01573525369167328, 0.039475202560424805, -0.02306375280022621, 0.0076346141286194324, 0.01918933540582657, 0.0406813882291317, -0.0236302949488163, -0.01631...
725,964
pymediainfo
_normalize_filename
null
@staticmethod def _normalize_filename(filename: Any) -> Any: if hasattr(os, "PathLike") and isinstance(filename, os.PathLike): return os.fspath(filename) if pathlib is not None and isinstance(filename, pathlib.PurePath): return str(filename) return filename
(filename: Any) -> Any
[ -0.016328606754541397, 0.04489247128367424, -0.002928938250988722, 0.040879737585783005, 0.0024698921479284763, -0.09530245512723923, 0.03715362399816513, 0.045680686831474304, 0.09078812599182129, -0.009485460817813873, 0.02801748737692833, -0.025007937103509903, -0.0003008991479873657, 0...
725,965
pymediainfo
_tracks
null
def _tracks(self, track_type: str) -> List[Track]: return [track for track in self.tracks if track.track_type == track_type]
(self, track_type: str) -> List[pymediainfo.Track]
[ -0.020798873156309128, -0.0133288549259305, -0.09608493745326996, 0.017576511949300766, -0.03086875006556511, 0.011681057512760162, 0.01108601875603199, 0.056903958320617676, 0.01173598412424326, -0.011809219606220722, 0.0219340231269598, -0.03372493386268616, 0.00480607757344842, -0.04771...
725,966
pymediainfo
to_data
Returns a dict representation of the object's :py:class:`Tracks <Track>`. :rtype: dict
def to_data(self) -> Dict[str, Any]: """ Returns a dict representation of the object's :py:class:`Tracks <Track>`. :rtype: dict """ return {"tracks": [_.to_data() for _ in self.tracks]}
(self) -> Dict[str, Any]
[ -0.04172525182366371, -0.0281415693461895, -0.0690029114484787, -0.006359884515404701, -0.028766529634594917, -0.005335134454071522, -0.04977620393037796, 0.0710248351097107, 0.025255726650357246, -0.006897533778101206, 0.03343534469604492, -0.0261931661516428, 0.012048856355249882, 0.0054...
725,967
pymediainfo
to_json
Returns a JSON representation of the object's :py:class:`Tracks <Track>`. :rtype: str
def to_json(self) -> str: """ Returns a JSON representation of the object's :py:class:`Tracks <Track>`. :rtype: str """ return json.dumps(self.to_data())
(self) -> str
[ -0.06842861324548721, -0.040190983563661575, -0.046704694628715515, 0.013651074841618538, -0.016024421900510788, -0.007020429242402315, -0.053842056542634964, 0.08329235017299652, 0.028133688494563103, -0.02395867556333542, 0.04466049745678902, -0.04490302875638008, 0.0038415302988141775, ...
725,968
pymediainfo
Track
An object associated with a media file track. Each :class:`Track` attribute corresponds to attributes parsed from MediaInfo's output. All attributes are lower case. Attributes that are present several times such as `Duration` yield a second attribute starting with `other_` which is a list of all alter...
class Track: """ An object associated with a media file track. Each :class:`Track` attribute corresponds to attributes parsed from MediaInfo's output. All attributes are lower case. Attributes that are present several times such as `Duration` yield a second attribute starting with `other_` which is...
(xml_dom_fragment: xml.etree.ElementTree.Element)
[ 0.04947818070650101, -0.005159143824130297, -0.05026354640722275, 0.015914034098386765, 0.014921991154551506, -0.035775575786828995, -0.007864013314247131, 0.05261965095996857, 0.008122357539832592, -0.006995975039899349, -0.017009416595101357, 0.01358893234282732, 0.06564022600650787, 0.0...
725,969
pymediainfo
__eq__
null
def __eq__(self, other): # type: ignore return self.__dict__ == other.__dict__
(self, other)
[ 0.052468687295913696, -0.025289122015237808, 0.004623557906597853, 0.04016297683119774, -0.04586997255682945, -0.05542919039726257, -0.04005597159266472, 0.027571920305490494, 0.04105469584465027, 0.00002821451380441431, -0.011610168032348156, -0.05571454018354416, 0.0613858662545681, 0.07...
725,970
pymediainfo
__getattribute__
null
def __getattribute__(self, name): # type: ignore try: return object.__getattribute__(self, name) except AttributeError: pass return None
(self, name)
[ 0.06251730024814606, -0.023942064493894577, 0.002380895894020796, 0.0341268889605999, 0.0023143424186855555, -0.06557446718215942, 0.07103614509105682, -0.017930787056684494, 0.0633760541677475, 0.00547026377171278, -0.0052040498703718185, 0.028974363580346107, 0.042250704020261765, 0.0056...
725,971
pymediainfo
__getstate__
null
def __getstate__(self): # type: ignore return self.__dict__
(self)
[ 0.024721140041947365, -0.04103274270892143, 0.010892525315284729, 0.002641573315486312, -0.00045819743536412716, -0.007743480149656534, 0.007004926912486553, 0.0055640689097344875, 0.05404577776789665, -0.0616578571498394, -0.03802415728569031, 0.027566608041524887, -0.02948775328695774, 0...
725,972
pymediainfo
__init__
null
def __init__(self, xml_dom_fragment: ET.Element): self.track_type = xml_dom_fragment.attrib["type"] repeated_attributes = [] for elem in xml_dom_fragment: node_name = elem.tag.lower().strip().strip("_") if node_name == "id": node_name = "track_id" node_value = elem.text ...
(self, xml_dom_fragment: xml.etree.ElementTree.Element)
[ 0.009912817738950253, 0.008744624443352222, -0.011537712998688221, 0.00716299656778574, -0.022517768666148186, -0.004119924735277891, -0.0008454979979433119, 0.060457613319158554, 0.0010263756848871708, 0.0018724746769294143, -0.022190866991877556, 0.02495991811156273, 0.040881961584091187, ...
725,973
pymediainfo
__repr__
null
def __repr__(self): # type: ignore return "<Track track_id='{}', track_type='{}'>".format(self.track_id, self.track_type)
(self)
[ -0.015485753305256367, -0.033949192613363266, 0.013328267261385918, 0.022252412512898445, 0.01130451075732708, -0.047571662813425064, -0.0008012562175281346, 0.05010358616709709, 0.030454423278570175, -0.03339644894003868, -0.02480216696858406, -0.015414430759847164, -0.021949293091893196, ...
725,974
pymediainfo
__setstate__
null
def __setstate__(self, state): # type: ignore self.__dict__ = state
(self, state)
[ -0.01673836261034012, 0.0051641506142914295, 0.024794965982437134, 0.012423898093402386, -0.0394817590713501, -0.015558489598333836, -0.029074210673570633, 0.03499119356274605, 0.024037733674049377, -0.04754716530442238, -0.057021379470825195, 0.05349936708807945, -0.0036474838852882385, 0...
725,975
pymediainfo
to_data
Returns a dict representation of the track attributes. Example: >>> sorted(track.to_data().keys())[:3] ['codec', 'codec_extensions_usually_used', 'codec_url'] >>> t.to_data()["file_size"] 5988 :rtype: dict
def to_data(self) -> Dict[str, Any]: """ Returns a dict representation of the track attributes. Example: >>> sorted(track.to_data().keys())[:3] ['codec', 'codec_extensions_usually_used', 'codec_url'] >>> t.to_data()["file_size"] 5988 :rtype: dict """ return self.__dict__
(self) -> Dict[str, Any]
[ -0.013800600543618202, -0.009955884888768196, -0.039456505328416824, -0.006753485184162855, -0.008845597505569458, -0.006620434112846851, -0.032959945499897, 0.033290278166532516, 0.0006962237530387938, -0.02464655041694641, -0.002470619510859251, -0.017516853287816048, 0.012827951461076736,...
725,984
penne.delegates
Attribute
Attribute for a geometry patch Each attribute is a view into a buffer that corresponds to a specific element of the mesh (e.g. position, normal, etc.). Attributes allow information for the vertices to be extracted from buffers Attributes: view (BufferViewID): View of the buffer storing the data ...
class Attribute(NoodleObject): """Attribute for a geometry patch Each attribute is a view into a buffer that corresponds to a specific element of the mesh (e.g. position, normal, etc.). Attributes allow information for the vertices to be extracted from buffers Attributes: view (BufferViewID): ...
(*, view: penne.delegates.BufferViewID, semantic: penne.delegates.AttributeSemantic, channel: Optional[int] = None, offset: Optional[int] = 0, stride: Optional[int] = 0, format: penne.delegates.Format, minimum_value: Optional[List[float]] = None, maximum_value: Optional[List[float]] = None, normalized: Optional[bool] =...
[ 0.044713426381349564, -0.010230432264506817, -0.023841198533773422, 0.028169458732008934, 0.014666004106402397, -0.04950670525431633, -0.043819159269332886, 0.00680538360029459, -0.027328846976161003, -0.009108125232160091, -0.013968474231660366, -0.0038855967577546835, -0.01782277226448059,...
725,987
pydantic.main
__delattr__
null
def __delattr__(self, item: str) -> Any: if item in self.__private_attributes__: attribute = self.__private_attributes__[item] if hasattr(attribute, '__delete__'): attribute.__delete__(self) # type: ignore return try: # Note: self.__pydantic_private__ can...
(self, item: str) -> Any
[ 0.054841604083776474, 0.0508728064596653, 0.026356441900134087, 0.02448028326034546, -0.031642161309719086, -0.10989969223737717, 0.0003182369109708816, 0.05101712420582771, 0.02778160199522972, 0.053903523832559586, 0.018797682598233223, 0.029838163405656815, 0.020114602521061897, 0.04304...
725,988
pydantic.main
__eq__
null
def __eq__(self, other: Any) -> bool: if isinstance(other, BaseModel): # When comparing instances of generic types for equality, as long as all field values are equal, # only require their generic origin types to be equal, rather than exact type equality. # This prevents headaches like MyGen...
(self, other: Any) -> bool
[ 0.02660025656223297, -0.024175161495804787, -0.025236140936613083, 0.07142661511898041, -0.023947808891534805, -0.06301456689834595, -0.02612660638988018, 0.002084065694361925, -0.008809913881123066, 0.01005088072270155, 0.023928863927721977, -0.055095117539167404, 0.07301808148622513, 0.0...
725,989
pydantic.main
__getattr__
null
def __getattr__(self, item: str) -> Any: private_attributes = object.__getattribute__(self, '__private_attributes__') if item in private_attributes: attribute = private_attributes[item] if hasattr(attribute, '__get__'): return attribute.__get__(self, type(self)) # type: ignore ...
(self, item: str) -> Any
[ 0.04892634227871895, -0.012844079174101353, 0.013164038769900799, 0.01568714529275894, 0.021007612347602844, -0.0917825996875763, 0.07360891997814178, -0.01512950286269188, 0.05093751475214958, 0.023768402636051178, 0.02607210911810398, 0.07064700871706009, 0.04581816866993904, 0.043587595...
725,991
pydantic.main
__init__
Create a new model by parsing and validating input data from keyword arguments. Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. `__init__` uses `__pydantic_self__` instead of the more common `self` for the first arg to ...
def __init__(__pydantic_self__, **data: Any) -> None: # type: ignore """Create a new model by parsing and validating input data from keyword arguments. Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. `__init__` uses `__pydantic_self...
(__pydantic_self__, **data: Any) -> NoneType
[ -0.007439626846462488, 0.01720326952636242, 0.03603612631559372, -0.0004565856943372637, -0.02046244591474533, -0.038887906819581985, 0.01899952068924904, 0.022240178659558296, 0.01935136318206787, -0.031351059675216675, -0.005657264497131109, 0.03385099768638611, 0.028184473514556885, 0.0...
725,992
pydantic.main
__iter__
So `dict(model)` works.
def __iter__(self) -> TupleGenerator: """So `dict(model)` works.""" yield from self.__dict__.items() extra = self.__pydantic_extra__ if extra: yield from extra.items()
(self) -> 'TupleGenerator'
[ 0.045464955270290375, -0.025877850130200386, -0.05257778987288475, -0.017362108454108238, -0.0020172393415123224, -0.01837184466421604, -0.0036301370710134506, 0.007720463909208775, 0.07470263540744781, -0.023983478546142578, 0.02359030582010746, 0.03243667259812355, 0.01685277186334133, 0...
725,995
pydantic.main
__repr_args__
null
def __repr_args__(self) -> _repr.ReprArgs: for k, v in self.__dict__.items(): field = self.model_fields.get(k) if field and field.repr: yield k, v pydantic_extra = self.__pydantic_extra__ if pydantic_extra is not None: yield from ((k, v) for k, v in pydantic_extra.items()...
(self) -> '_repr.ReprArgs'
[ 0.04628977179527283, -0.039923056960105896, 0.03748872131109238, -0.00840781070291996, 0.013248386792838573, -0.04070953279733658, 0.033987030386924744, -0.06602659076452255, 0.08366613835096359, -0.0006635896861553192, -0.015673356130719185, 0.032095737755298615, 0.03810666874051094, 0.03...
725,999
pydantic.main
__setattr__
null
def __setattr__(self, name: str, value: Any) -> None: if name in self.__class_vars__: raise AttributeError( f'{name!r} is a ClassVar of `{self.__class__.__name__}` and cannot be set on an instance. ' f'If you want to set a value on the class, use `{self.__class__.__name__}.{name} = v...
(self, name: str, value: Any) -> NoneType
[ 0.07589449733495712, -0.0006769386818632483, 0.02734832465648651, 0.030849063768982887, -0.03992004320025444, -0.01210753247141838, 0.016623681411147118, -0.018209651112556458, 0.011130806058645248, -0.028354061767458916, -0.018509438261389732, -0.00811359379440546, 0.06177549064159393, 0....
726,008
pydantic.main
model_copy
Returns a copy of the model. Args: update: Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data. deep: Set to `True` to make a deep copy of the model. Returns: New model inst...
def model_copy(self: Model, *, update: dict[str, Any] | None = None, deep: bool = False) -> Model: """Returns a copy of the model. Args: update: Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data. deep: Set...
(self: 'Model', *, update: 'dict[str, Any] | None' = None, deep: 'bool' = False) -> 'Model'
[ 0.011864308267831802, -0.030079340562224388, 0.030098585411906242, 0.017772406339645386, -0.061082422733306885, -0.04587917402386665, -0.0018222249345853925, -0.012951629236340523, 0.018186166882514954, -0.022015845403075218, -0.021284550428390503, -0.017069978639483452, -0.02097663655877113...
726,009
pydantic.main
model_dump
Usage docs: https://docs.pydantic.dev/dev-v2/usage/serialization/#modelmodel_dump Generate a dictionary representation of the model, optionally specifying which fields to include or exclude. Args: mode: The mode in which `to_python` should run. If mode is 'json', the dictio...
def model_dump( self, *, mode: Literal['json', 'python'] | str = 'python', include: IncEx = None, exclude: IncEx = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, round_trip: bool = False, warnings: bool =...
(self, *, mode: "Literal['json', 'python'] | str" = 'python', include: 'IncEx' = None, exclude: 'IncEx' = None, by_alias: 'bool' = False, exclude_unset: 'bool' = False, exclude_defaults: 'bool' = False, exclude_none: 'bool' = False, round_trip: 'bool' = False, warnings: 'bool' = True) -> 'dict[str, Any]'
[ 0.00512569909915328, -0.011735153384506702, 0.006771318148821592, -0.0342792347073555, 0.0325886532664299, -0.034513041377067566, -0.014720647595822811, -0.047120463103055954, -0.07604019343852997, -0.09805372357368469, -0.032642610371112823, 0.005399968940764666, -0.03230089694261551, 0.0...
726,010
pydantic.main
model_dump_json
Usage docs: https://docs.pydantic.dev/dev-v2/usage/serialization/#modelmodel_dump_json Generates a JSON representation of the model using Pydantic's `to_json` method. Args: indent: Indentation to use in the JSON output. If None is passed, the output will be compact. include: Fi...
def model_dump_json( self, *, indent: int | None = None, include: IncEx = None, exclude: IncEx = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, round_trip: bool = False, warnings: bool = True, ) -> str: ...
(self, *, indent: 'int | None' = None, include: 'IncEx' = None, exclude: 'IncEx' = None, by_alias: 'bool' = False, exclude_unset: 'bool' = False, exclude_defaults: 'bool' = False, exclude_none: 'bool' = False, round_trip: 'bool' = False, warnings: 'bool' = True) -> 'str'
[ -0.020796921104192734, -0.03276612237095833, 0.024166550487279892, -0.014154192060232162, 0.015803905203938484, -0.05064971745014191, -0.04685888811945915, -0.06581304222345352, -0.08634671568870544, -0.08711892366409302, -0.023411894217133522, -0.014092766679823399, -0.03273101896047592, ...
726,012
penne.delegates
AttributeSemantic
String indicating type of attribute, used in Attribute inside of geometry patch Takes value of either POSITION, NORMAL, TANGENT, TEXTURE, or COLOR
class AttributeSemantic(Enum): """String indicating type of attribute, used in Attribute inside of geometry patch Takes value of either POSITION, NORMAL, TANGENT, TEXTURE, or COLOR """ position = "POSITION" normal = "NORMAL" tangent = "TANGENT" texture = "TEXTURE" color = "COLOR"
(value, names=None, *, module=None, qualname=None, type=None, start=1)
[ 0.06730816513299942, -0.020019138231873512, -0.006751153618097305, -0.03612994775176048, 0.029568903148174286, -0.052028536796569824, -0.00904574990272522, -0.03243383392691612, -0.013838318176567554, -0.030011022463440895, -0.017587484791874886, 0.052346862852573395, -0.0019011107506230474,...
726,013
pydantic.main
BaseModel
usage docs: https://docs.pydantic.dev/2.0/usage/models/ A base class for creating Pydantic models. Attributes: __class_vars__: The names of classvars defined on the model. __private_attributes__: Metadata about the private attributes of the model. __signature__: The signature for insta...
class BaseModel(metaclass=_model_construction.ModelMetaclass): """usage docs: https://docs.pydantic.dev/2.0/usage/models/ A base class for creating Pydantic models. Attributes: __class_vars__: The names of classvars defined on the model. __private_attributes__: Metadata about the private a...
(**data: 'Any') -> 'None'
[ 0.015190592966973782, 0.00709456205368042, -0.001905021257698536, 0.0339309461414814, 0.026256324723362923, -0.02544325217604637, -0.012017622590065002, -0.022785888984799385, -0.02919132262468338, -0.04251779615879059, -0.003153138794004917, 0.035755403339862823, 0.04711860045790672, 0.05...
726,041
penne.delegates
BoundingBox
Axis-aligned bounding box Attributes: min (Vec3): Minimum point of bounding box max (Vec3): Maximum point of bounding box
class BoundingBox(NoodleObject): """Axis-aligned bounding box Attributes: min (Vec3): Minimum point of bounding box max (Vec3): Maximum point of bounding box """ min: Vec3 max: Vec3
(*, min: List[float], max: List[float], **extra_data: Any) -> None
[ 0.05836433172225952, -0.018624313175678253, -0.021360142156481743, 0.00008938742394093424, -0.04753383621573448, -0.03439057990908623, -0.05546867847442627, -0.030122311785817146, 0.0036031135823577642, -0.0223378948867321, -0.0030061202123761177, 0.0037394349928945303, -0.052986688911914825...
726,069
penne.delegates
Buffer
A buffer of bytes containing data for an image or a mesh. Bytes can be stored directly in the buffer with inline_bytes, or they can be stored in a URI with uri_bytes. The server should create a separate server to host the bytes, and there is support for this in the ByteServer class. To obtain these bytes, ...
class Buffer(Delegate): """A buffer of bytes containing data for an image or a mesh. Bytes can be stored directly in the buffer with inline_bytes, or they can be stored in a URI with uri_bytes. The server should create a separate server to host the bytes, and there is support for this in the ByteServer ...
(*, client: object = None, id: penne.delegates.BufferID, name: Optional[str] = 'Unnamed Buffer Delegate', signals: Optional[dict] = {}, size: int, inline_bytes: Optional[bytes] = None, uri_bytes: Optional[str] = None, **extra_data: Any) -> None
[ 0.028680279850959778, -0.08216413110494614, -0.07455770671367645, 0.015865100547671318, -0.024858692660927773, -0.0013274505035951734, -0.05397992581129074, 0.05820572003722191, -0.017720775678753853, -0.023793058469891548, 0.047880083322525024, -0.004260243382304907, -0.04339706897735596, ...
726,086
penne.delegates
__str__
null
def __str__(self): return f"{self.name} - {type(self).__name__} - {self.id.compact_str()}"
(self)
[ -0.024132899940013885, -0.028938734903931618, 0.0491301566362381, -0.0032197367399930954, 0.03291478380560875, -0.06126575544476509, 0.031186068430542946, -0.016120292246341705, 0.038031790405511856, -0.07143061608076096, -0.06741999089717865, -0.021920140832662582, -0.03464350476861, 0.01...
726,097
penne.delegates
on_new
null
def on_new(self, message: dict): pass
(self, message: dict)
[ 0.004075837321579456, 0.011006740853190422, -0.046173762530088425, -0.025585612282156944, 0.00355013576336205, -0.012432074174284935, 0.03274747356772423, 0.07644009590148926, 0.07021086663007736, 0.008248456753790379, -0.03480628877878189, -0.0395222045481205, -0.00526581471785903, 0.0115...
726,098
penne.delegates
on_remove
null
def on_remove(self, message: dict): pass
(self, message: dict)
[ 0.008463418111205101, 0.044584453105926514, -0.061943572014570236, -0.020173193886876106, -0.004416064824908972, -0.03310777246952057, 0.0006982213817536831, 0.10673145204782486, 0.08530379086732864, 0.01002726424485445, -0.006374051328748465, -0.04560158774256706, -0.024156976491212845, -...
726,099
penne.delegates
on_update
null
def on_update(self, message: dict): pass
(self, message: dict)
[ 0.023906046524643898, -0.008272125385701656, -0.08746200054883957, 0.0057478295639157295, 0.0051981136202812195, -0.04957118257880211, -0.013588977977633476, 0.0663880929350853, 0.05418000370264053, 0.007581681944429874, -0.02944718301296234, -0.07493727654218674, 0.0045736366882920265, 0....
726,100
penne.delegates
BufferID
ID specific to buffers
class BufferID(ID): """ID specific to buffers""" pass
(slot: int, gen: int)
[ 0.020789097994565964, -0.054723192006349564, -0.09037184715270996, 0.0009800702100619674, -0.007894141599535942, -0.020967697724699974, -0.008135252632200718, 0.057795118540525436, -0.026682913303375244, -0.049758099019527435, -0.03188018873333931, -0.015189971774816513, -0.04818641394376755...
726,101
penne.delegates
__key
null
def __key(self): return type(self), self.slot, self.gen
(self)
[ 0.04683989658951759, -0.03841421753168106, 0.008550344966351986, 0.01033435296267271, 0.01698892004787922, -0.027976693585515022, 0.014598778448998928, 0.010523500852286816, 0.026601072400808334, -0.02610240876674652, -0.021150173619389534, 0.0180894173681736, 0.04133741185069084, 0.030022...
726,102
penne.delegates
__eq__
null
def __eq__(self, other: object) -> bool: if type(other) is type(self): return self.__key() == other.__key() else: return False
(self, other: object) -> bool
[ 0.04320523515343666, -0.03159759193658829, -0.024863390251994133, 0.04522549733519554, -0.012777266092598438, -0.05635465309023857, -0.02310895174741745, 0.022258315235376358, 0.04777740314602852, -0.004833563696593046, -0.003531026653945446, -0.06092682480812073, 0.07825853675603867, 0.07...
726,104
penne.delegates
__hash__
null
def __hash__(self): return hash(self.__key())
(self)
[ 0.03845677524805069, -0.03350706025958061, 0.0042575947009027, 0.07154437154531479, -0.006866682320833206, -0.04812130704522133, -0.027483507990837097, -0.018540462478995323, 0.010780313983559608, -0.019714970141649246, -0.03377551957964897, -0.02790297567844391, 0.03761783987283707, 0.040...
726,106
namedtuple_ID
__new__
Create new instance of ID(slot, gen)
from builtins import function
(_cls, slot: ForwardRef('int'), gen: ForwardRef('int'))
[ 0.009955772198736668, -0.03445916250348091, 0.01939140446484089, 0.011548695154488087, 0.012475191615521908, 0.06147384271025658, -0.0008142399019561708, 0.00590031873434782, -0.012475191615521908, -0.024787839502096176, -0.015157154761254787, 0.03679978474974632, 0.006826814729720354, 0.0...
726,108
penne.delegates
__str__
null
def __str__(self): return f"{type(self).__name__}{self.compact_str()}"
(self)
[ -0.0037946482188999653, -0.026186492294073105, 0.0544925183057785, -0.008725982159376144, 0.00860633049160242, -0.08601202815771103, 0.022238006815314293, -0.01834079995751381, 0.051381587982177734, -0.06761994957923889, -0.043450433760881424, -0.02234056405723095, -0.03165625408291817, 0....
726,110
collections
_replace
Return a new ID object replacing specified fields with new values
def namedtuple(typename, field_names, *, rename=False, defaults=None, module=None): """Returns a new subclass of tuple with named fields. >>> Point = namedtuple('Point', ['x', 'y']) >>> Point.__doc__ # docstring for the new class 'Point(x, y)' >>> p = Point(11, y=22) #...
(self, /, **kwds)
[ 0.05422089621424675, 0.0014291696716099977, -0.015398981049656868, -0.035721518099308014, -0.03283742815256119, -0.033331841230392456, 0.0027939623687416315, 0.021527672186493874, 0.020961156114935875, -0.04614544287323952, -0.04219011962413788, 0.057187385857105255, 0.004506391007453203, ...
726,111
penne.delegates
compact_str
null
def compact_str(self): return f"|{self.slot}/{self.gen}|"
(self)
[ 0.05544816330075264, -0.004504134878516197, 0.041660163551568985, -0.028299951925873756, 0.0029369427356868982, -0.06650488823652267, 0.007963474839925766, -0.006713011767715216, 0.027181116864085197, -0.053802814334630966, -0.004082514904439449, 0.03425610437989235, -0.006713011767715216, ...
726,112
penne.delegates
BufferType
String indicating type of data stored in a buffer Used in BufferView. Takes value of either UNK, GEOMETRY, or IMAGE
class BufferType(str, Enum): """String indicating type of data stored in a buffer Used in BufferView. Takes value of either UNK, GEOMETRY, or IMAGE """ unknown = "UNK" geometry = "GEOMETRY" image = "IMAGE"
(value, names=None, *, module=None, qualname=None, type=None, start=1)
[ 0.04771918058395386, -0.07815484702587128, -0.10900743305683136, -0.026380103081464767, 0.014365026727318764, -0.04976591095328331, 0.015919027850031853, -0.002049101050943136, 0.0016937655163928866, -0.08224830776453018, -0.0026958114467561245, 0.043284595012664795, -0.06704942882061005, ...
726,113
penne.delegates
BufferView
A view into a buffer, specifying a subset of the buffer and how to interpret it. Attributes: id: ID for the buffer view name: Name of the buffer view source_buffer: Buffer that the view is referring to type: Type of the buffer view offset: Offset into the buffer in bytes ...
class BufferView(Delegate): """A view into a buffer, specifying a subset of the buffer and how to interpret it. Attributes: id: ID for the buffer view name: Name of the buffer view source_buffer: Buffer that the view is referring to type: Type of the buffer view offset: ...
(*, client: object = None, id: penne.delegates.BufferViewID, name: Optional[str] = 'Unnamed Buffer-View Delegate', signals: Optional[dict] = {}, source_buffer: penne.delegates.BufferID, type: penne.delegates.BufferType = <BufferType.unknown: 'UNK'>, offset: int, length: int, **extra_data: Any) -> None
[ 0.027701912447810173, -0.08149673789739609, -0.06986542791128159, 0.014132046140730381, -0.007807519286870956, -0.011767012067139149, 0.015285484492778778, 0.025685817003250122, -0.018183620646595955, -0.04381128028035164, 0.019647227600216866, 0.01658431440591812, -0.006285755895078182, 0...
726,144
penne.delegates
BufferViewID
ID specific to buffer views
class BufferViewID(ID): """ID specific to buffer views""" pass
(slot: int, gen: int)
[ 0.008175271563231945, -0.09086243063211441, -0.10408009588718414, -0.0032479886431246996, 0.012639844790101051, 0.0031667326111346483, 0.010463985614478588, 0.06363259255886078, -0.03613189980387688, -0.02323925867676735, -0.034940142184495926, 0.00422306265681982, -0.019230620935559273, 0...
726,156
penne.core
Client
Client for communicating with server Attributes: _url (string): address used to connect to server _loop (event loop): event loop used for network thread delegates (dict): map for delegate functions thread (thread object): network threa...
class Client(object): """Client for communicating with server Attributes: _url (string): address used to connect to server _loop (event loop): event loop used for network thread delegates (dict): map for delegate functions thread (thread objec...
(url: 'str', custom_delegate_hash: 'dict[Type[delegates.Delegate], Type[delegates.Delegate]]' = None, on_connected=None, strict=False, json=None)
[ -0.01305640209466219, -0.044860996305942535, -0.0601373054087162, -0.009053210727870464, 0.012319941073656082, 0.002555256709456444, -0.03997931256890297, 0.06956400722265244, -0.013750779442489147, -0.05395103245973587, -0.014224219135940075, 0.052015189081430435, -0.03776992857456207, 0....
726,157
penne.core
__enter__
Enter method for context manager Waits for 1 seconds for connection to be established, otherwise throws exception
def __enter__(self): """Enter method for context manager Waits for 1 seconds for connection to be established, otherwise throws exception """ self.thread.start() flag = self.connection_established.wait(timeout=1) if not flag: raise ConnectionError("Couldn't connect to server") self.i...
(self)
[ 0.02480628900229931, -0.05503551661968231, -0.016717679798603058, 0.042137712240219116, 0.02541087381541729, -0.03477277234196663, 0.005880959331989288, -0.010232135653495789, 0.009490146301686764, -0.062327172607183456, 0.00340536842122674, 0.00028998302877880633, 0.01026877760887146, 0.0...
726,158
penne.core
__exit__
Exit method for context manager
def __exit__(self, exc_type, exc_value, traceback): """Exit method for context manager""" self.shutdown() self.is_active = False
(self, exc_type, exc_value, traceback)
[ 0.0767199918627739, -0.02626974880695343, 0.017321936786174774, 0.022433748468756676, -0.01859774813055992, -0.05027899518609047, -0.01657699979841709, 0.0378119982779026, 0.005616999696940184, -0.02332424931228161, 0.00034035934368148446, -0.019145749509334564, 0.005154624581336975, -0.00...
726,159
penne.core
__init__
Constructor for the Client Class Args: url (string): address used to connect to server custom_delegate_hash (dict): map for new delegates to be used on client on_connected (Callable): callback function to run once client is set...
def __init__(self, url: str, custom_delegate_hash: dict[Type[delegates.Delegate], Type[delegates.Delegate]] = None, on_connected=None, strict=False, json=None): """Constructor for the Client Class Args: url (string): address used to connect to server custom_delegate_hash...
(self, url: str, custom_delegate_hash: Optional[dict[Type[penne.delegates.Delegate], Type[penne.delegates.Delegate]]] = None, on_connected=None, strict=False, json=None)
[ -0.03391704708337784, -0.04511682316660881, -0.062154777348041534, -0.006309802178293467, -0.003971551079303026, 0.012877754867076874, -0.05131244286894798, 0.09078966081142426, -0.009104780852794647, -0.03391704708337784, -0.004319061990827322, 0.06187677010893822, -0.05111386626958847, -...
726,160
penne.core
_log_json
null
def _log_json(self, message: list): json_message = json.dumps(message, default=default_json_encoder) formatted_message = f"{json_message}\n" with open(self.json, "a") as outfile: outfile.write(formatted_message)
(self, message: list)
[ -0.03896922245621681, 0.0016149643342942, -0.033087074756622314, 0.03506529703736305, 0.02785266377031803, -0.04551661014556885, -0.06634921580553055, 0.02289835549890995, 0.045411571860313416, -0.017488881945610046, -0.00013157144712749869, -0.029008086770772934, -0.028833022341132164, -0...
726,161
penne.core
_process_message
Prep message for handling Messages here are of form: [tag, {content}, tag, {content}, ...]
def _process_message(self, message): """Prep message for handling Messages here are of form: [tag, {content}, tag, {content}, ...] """ content = iter(message) for tag in content: try: handlers.handle(self, tag, next(content)) except Exception as e: if self.str...
(self, message)
[ 0.011201826855540276, 0.005304948426783085, -0.08681640028953552, 0.022367779165506363, -0.023784823715686798, -0.004596426151692867, 0.02457406371831894, 0.01612560823559761, 0.08602716028690338, -0.008515720255672932, 0.013022460043430328, 0.054672807455062866, -0.00800450798124075, -0.0...
726,162
penne.core
_run
Network thread for managing websocket connection
def _process_message(self, message): """Prep message for handling Messages here are of form: [tag, {content}, tag, {content}, ...] """ content = iter(message) for tag in content: try: handlers.handle(self, tag, next(content)) except Exception as e: if self.str...
(self)
[ 0.011201826855540276, 0.005304948426783085, -0.08681640028953552, 0.022367779165506363, -0.023784823715686798, -0.004596426151692867, 0.02457406371831894, 0.01612560823559761, 0.08602716028690338, -0.008515720255672932, 0.013022460043430328, 0.054672807455062866, -0.00800450798124075, -0.0...
726,163
penne.core
_start_communication_thread
Starts the communication thread for the client All communication is done with the server in this separate thread. That way, the main thread can be used for other code. For example, Orzo's window / gui has to run in the main thread, so this allows the client to be used in conjunction with the gu...
def _start_communication_thread(self): """Starts the communication thread for the client All communication is done with the server in this separate thread. That way, the main thread can be used for other code. For example, Orzo's window / gui has to run in the main thread, so this allows the client to be ...
(self)
[ -0.004934095311909914, -0.03571164235472679, -0.06956171989440918, -0.004881857894361019, 0.03928280621767044, 0.014626577496528625, 0.006634197663515806, 0.05672072619199753, -0.060443855822086334, -0.03502780199050903, 0.02777150087058544, 0.009436042048037052, -0.03025991842150688, -0.0...
726,164
penne.core
get_delegate
Getter to easily retrieve components from state Accepts multiple types of identifiers for flexibility Args: identifier (ID | str | dict): id, name, or context for the component Returns: Delegate (Delegate): delegate object from state Raises: TypeEr...
def get_delegate(self, identifier: Union[delegates.ID, str, Dict[str, delegates.ID]]) -> Type[delegates.Delegate]: """Getter to easily retrieve components from state Accepts multiple types of identifiers for flexibility Args: identifier (ID | str | dict): id, name, or context for the component R...
(self, identifier: Union[penne.delegates.ID, str, Dict[str, penne.delegates.ID]]) -> Type[penne.delegates.Delegate]
[ -0.01747789792716503, 0.010107027366757393, 0.05059097707271576, -0.04765007272362709, 0.02369474433362484, 0.008329455740749836, 0.01167985238134861, 0.002422056859359145, 0.009181015193462372, -0.016119126230478287, -0.02604002133011818, 0.02544439397752285, -0.0423266664147377, 0.036035...
726,165
penne.core
get_delegate_by_context
Get delegate object from a context object Contexts are of the form {"table": TableID}, {"entity": EntityID}, or {"plot": PlotID}. They are only applicable for tables, entities, and plots Args: context (dict): dict containing context Returns: Delegate (Delegate)...
def get_delegate_by_context(self, context: dict = None) -> delegates.Delegate: """Get delegate object from a context object Contexts are of the form {"table": TableID}, {"entity": EntityID}, or {"plot": PlotID}. They are only applicable for tables, entities, and plots Args: context (dict): dict ...
(self, context: Optional[dict] = None) -> penne.delegates.Delegate
[ -0.011374933645129204, 0.003276018425822258, 0.02246946655213833, -0.04508848115801811, 0.014066783711314201, -0.028133567422628403, 0.013543368317186832, 0.06247334182262421, 0.036975543946027756, -0.0020177189726382494, -0.00029485917184501886, 0.005467819515615702, -0.035704392939805984, ...
726,166
penne.core
get_delegate_id
Get a delegate's id from its name. Assumes names are unique, or returns the first match Args: name (str): name of method Returns: ID (ID): ID for the delegate Raises: KeyError: if no match is found
def get_delegate_id(self, name: str) -> Type[delegates.ID]: """Get a delegate's id from its name. Assumes names are unique, or returns the first match Args: name (str): name of method Returns: ID (ID): ID for the delegate Raises: KeyError: if no match is found """ if name...
(self, name: str) -> Type[penne.delegates.ID]
[ -0.004799587652087212, -0.025324320420622826, 0.019398903474211693, 0.02559780143201351, -0.05659228935837746, -0.019781775772571564, 0.013026800937950611, 0.041058581322431564, -0.0114314965903759, 0.0017297659069299698, -0.036974601447582245, 0.03392985090613365, 0.006850693374872208, 0....
726,167
penne.core
invoke_method
Invoke method on server Constructs a dictionary of arguments to use in send_message. The Dictionary follows the structure of an InvokeMethodMessage, but using a dictionary prevents from converting back and forth just before sending. Also implements callback functions attached t...
def invoke_method(self, method: Union[delegates.MethodID, str], args: list = None, context: dict[str, tuple] = None, callback=None): """Invoke method on server Constructs a dictionary of arguments to use in send_message. The Dictionary follows the structure of an InvokeMethodMessage, but ...
(self, method: Union[penne.delegates.MethodID, str], args: Optional[list] = None, context: Optional[dict[str, tuple]] = None, callback=None)
[ 0.07397650182247162, -0.027624843642115593, 0.049106694757938385, -0.00029580594855360687, 0.04627719521522522, -0.04251694306731224, -0.0023036214988678694, 0.0487343929708004, 0.01924803853034973, 0.0010703696170821786, -0.012574516236782074, 0.04370830953121185, 0.004202364012598991, -0...
726,168
penne.core
send_message
Send message to server Args: message_dict (dict): dict mapping message attribute to value kind (str): either 'invoke' or 'intro' to indicate type of client message
def send_message(self, message_dict: dict[str, Any], kind: str): """Send message to server Args: message_dict (dict): dict mapping message attribute to value kind (str): either 'invoke' or 'intro' to indicate type of client message """ # Construct message with ID from map and converted m...
(self, message_dict: dict[str, typing.Any], kind: str)
[ 0.006319761276245117, 0.0008997545810416341, -0.07056748867034912, -0.020505812019109726, -0.0020369775593280792, -0.04864879697561264, -0.010529753752052784, 0.07980846613645554, 0.0418517142534256, -0.03767035901546478, -0.01184716634452343, 0.025240860879421234, -0.055980484932661057, -...
726,169
penne.core
show_methods
Displays Available Methods to the User on the document Uses the document delegate's show_methods function to display
def show_methods(self): """Displays Available Methods to the User on the document Uses the document delegate's show_methods function to display """ self.state["document"].show_methods()
(self)
[ -0.023965103551745415, -0.05698530748486519, 0.06404028087854385, 0.0015557770384475589, 0.015673687681555748, 0.00010533315071370453, 0.013637198135256767, -0.009186926297843456, 0.010418819263577461, 0.050330355763435364, -0.000993242603726685, -0.013528101146221161, 0.038365986198186874, ...
726,170
penne.core
shutdown
Method for shutting down the client Closes websocket connection then blocks to finish all callbacks, joins thread as well
def shutdown(self): """Method for shutting down the client Closes websocket connection then blocks to finish all callbacks, joins thread as well """ asyncio.run_coroutine_threadsafe(self._socket.close(), self._loop) self.is_active = False self.thread.join()
(self)
[ -0.008029794320464134, -0.04911298304796219, -0.02459208108484745, -0.0042729186825454235, -0.03658561408519745, -0.03758210688829422, -0.015330012887716293, 0.04776059463620186, -0.016602324321866035, 0.0007612734916619956, -0.005832166876643896, -0.035393379628658295, -0.007246834225952625...
726,171
pydantic_extra_types.color
Color
Represents a color.
class Color(_repr.Representation): """ Represents a color. """ __slots__ = '_original', '_rgba' def __init__(self, value: ColorType) -> None: self._rgba: RGBA self._original: ColorType if isinstance(value, (tuple, list)): self._rgba = parse_tuple(value) ...
(value: 'ColorType') -> 'None'
[ -0.04130033776164055, -0.06895904988050461, -0.06366092711687088, -0.005684011150151491, 0.031267277896404266, -0.013266169466078281, -0.015498056076467037, -0.02066059783101082, -0.003731110133230686, -0.0180219653993845, 0.0016348049975931644, 0.00902662705630064, 0.07563385367393494, 0....
726,172
pydantic_extra_types.color
__eq__
null
def __eq__(self, other: Any) -> bool: return isinstance(other, Color) and self.as_rgb_tuple() == other.as_rgb_tuple()
(self, other: Any) -> bool
[ 0.023230940103530884, -0.07574458420276642, -0.03473105654120445, 0.055335428565740585, -0.03235294669866562, -0.0345713309943676, -0.013603144325315952, 0.05327676609158516, 0.038440197706222534, 0.017809204757213593, 0.022361334413290024, -0.04954987391829491, 0.08170760422945023, 0.0466...
726,173
pydantic_extra_types.color
__hash__
null
def __hash__(self) -> int: return hash(self.as_rgb_tuple())
(self) -> int
[ 0.02163168042898178, -0.08178835362195969, -0.02867056056857109, 0.06455168128013611, 0.0011234310222789645, -0.030593376606702805, -0.010644160211086273, 0.021563008427619934, -0.033683616667985916, -0.008382275700569153, 0.004738368093967438, -0.026730576530098915, 0.06211382523179054, 0...
726,174
pydantic_extra_types.color
__init__
null
def __init__(self, value: ColorType) -> None: self._rgba: RGBA self._original: ColorType if isinstance(value, (tuple, list)): self._rgba = parse_tuple(value) elif isinstance(value, str): self._rgba = parse_str(value) elif isinstance(value, Color): self._rgba = value._rgba ...
(self, value: Union[Tuple[int, int, int], Tuple[int, int, int, float], str, pydantic_extra_types.color.Color]) -> NoneType
[ 0.006971950177103281, -0.05013410374522209, -0.0417470782995224, 0.03952809050679207, -0.023901142179965973, -0.0067791990004479885, 0.0032579645048826933, 0.015514116734266281, -0.005039737094193697, 0.007004858925938606, 0.026289375498890877, 0.030783768743276596, 0.0163885485380888, 0.0...
726,177
pydantic_extra_types.color
__repr_args__
null
def __repr_args__(self) -> _repr.ReprArgs: return [(None, self.as_named(fallback=True))] + [('rgb', self.as_rgb_tuple())]
(self) -> '_repr.ReprArgs'
[ -0.011952010914683342, -0.06611128151416779, -0.009481074288487434, -0.011997769586741924, 0.025972288101911545, -0.013535240665078163, 0.029614631086587906, 0.009298042394220829, 0.08111993223428726, -0.0074494159780442715, 0.00150429701898247, 0.017351465299725533, 0.03521541878581047, 0...
726,181
pydantic_extra_types.color
__str__
null
def __str__(self) -> str: return self.as_named(fallback=True)
(self) -> str
[ 0.012214841321110725, -0.033538199961185455, 0.03741057962179184, -0.022038906812667847, 0.018974673002958298, -0.06131833419203758, 0.043067626655101776, -0.010615378618240356, 0.11994283646345139, -0.0794006735086441, -0.029867853969335556, 0.0028748230542987585, -0.028419919312000275, -...
726,182
pydantic_extra_types.color
_alpha_float
null
def _alpha_float(self) -> float: return 1 if self._rgba.alpha is None else self._rgba.alpha
(self) -> float
[ -0.016788272187113762, -0.04795666038990021, 0.009985237382352352, 0.0694236308336258, 0.06065107136964798, -0.013864085078239441, -0.013846883550286293, 0.011051705107092857, -0.05397704616189003, 0.027143333107233047, 0.0050958250649273396, -0.05831172317266464, 0.03249287232756615, -0.0...
726,183
pydantic_extra_types.color
as_hex
Returns the hexadecimal representation of the color. Hex string representing the color can be 3, 4, 6, or 8 characters depending on whether the string a "short" representation of the color is possible and whether there's an alpha channel. Returns: The hexadecimal representation of ...
def as_hex(self) -> str: """Returns the hexadecimal representation of the color. Hex string representing the color can be 3, 4, 6, or 8 characters depending on whether the string a "short" representation of the color is possible and whether there's an alpha channel. Returns: The hexadecimal repr...
(self) -> str
[ -0.03727685660123825, -0.050110481679439545, -0.03026658296585083, 0.02216211147606373, 0.030693132430315018, -0.019194798544049263, -0.015318747609853745, 0.005202068947255611, 0.0387234203517437, -0.018397334963083267, 0.039094336330890656, -0.04510314017534256, 0.06806271523237228, -0.0...
726,184
pydantic_extra_types.color
as_hsl
Color as an `hsl(<h>, <s>, <l>)` or `hsl(<h>, <s>, <l>, <a>)` string.
def as_hsl(self) -> str: """ Color as an `hsl(<h>, <s>, <l>)` or `hsl(<h>, <s>, <l>, <a>)` string. """ if self._rgba.alpha is None: h, s, li = self.as_hsl_tuple(alpha=False) # type: ignore return f'hsl({h * 360:0.0f}, {s:0.0%}, {li:0.0%})' else: h, s, li, a = self.as_hsl_tup...
(self) -> str
[ -0.05808110535144806, -0.07678519189357758, -0.023279840126633644, -0.004625888541340828, 0.01329885981976986, -0.01525859534740448, 0.031975600868463516, -0.007670315448194742, -0.02519400045275688, 0.003677922999486327, 0.022441254928708076, -0.0326683446764946, 0.080577053129673, -0.008...
726,185
pydantic_extra_types.color
as_hsl_tuple
Returns the color as an HSL or HSLA tuple. Args: alpha: Whether to include the alpha channel. - `None` (default): Include the alpha channel only if it's set (e.g. not `None`). - `True`: Always include alpha. - `False`: Always omit alpha. ...
def as_hsl_tuple(self, *, alpha: bool | None = None) -> HslColorTuple: """ Returns the color as an HSL or HSLA tuple. Args: alpha: Whether to include the alpha channel. - `None` (default): Include the alpha channel only if it's set (e.g. not `None`). - `True`: Always include ...
(self, *, alpha: Optional[bool] = None) -> Union[Tuple[float, float, float], Tuple[float, float, float, float]]
[ -0.05405542626976967, -0.05856615677475929, -0.033665455877780914, -0.03093334473669529, 0.026789341121912003, -0.008434699848294258, -0.0005919188261032104, 0.007678327150642872, -0.0177953839302063, -0.0006177042378112674, -0.0031698886305093765, -0.026715995743870735, 0.04936132952570915,...
726,186
pydantic_extra_types.color
as_named
Returns the name of the color if it can be found in `COLORS_BY_VALUE` dictionary, otherwise returns the hexadecimal representation of the color or raises `ValueError`. Args: fallback: If True, falls back to returning the hexadecimal representation of the color inste...
def as_named(self, *, fallback: bool = False) -> str: """ Returns the name of the color if it can be found in `COLORS_BY_VALUE` dictionary, otherwise returns the hexadecimal representation of the color or raises `ValueError`. Args: fallback: If True, falls back to returning the hexadecimal repre...
(self, *, fallback: bool = False) -> str
[ 0.01576578989624977, -0.07762739807367325, -0.06255341321229935, 0.014445905573666096, 0.020098650828003883, -0.02525075152516365, 0.033024415373802185, 0.01833273656666279, 0.07922946661710739, -0.06371854990720749, 0.018323633819818497, 0.0007464173249900341, 0.06670422106981277, -0.0727...
726,187
pydantic_extra_types.color
as_rgb
Color as an `rgb(<r>, <g>, <b>)` or `rgba(<r>, <g>, <b>, <a>)` string.
def as_rgb(self) -> str: """ Color as an `rgb(<r>, <g>, <b>)` or `rgba(<r>, <g>, <b>, <a>)` string. """ if self._rgba.alpha is None: return f'rgb({float_to_255(self._rgba.r)}, {float_to_255(self._rgba.g)}, {float_to_255(self._rgba.b)})' else: return ( f'rgba({float_to_255...
(self) -> str
[ -0.021980905905365944, -0.054836977273225784, -0.06859426200389862, 0.02736084721982479, 0.025016730651259422, -0.0356421135365963, 0.017071709036827087, 0.010269924998283386, 0.03744823858141899, -0.022787896916270256, 0.02390231378376484, -0.06363702565431595, 0.05172429978847504, 0.0083...
726,188
pydantic_extra_types.color
as_rgb_tuple
Returns the color as an RGB or RGBA tuple. Args: alpha: Whether to include the alpha channel. There are three options for this input: - `None` (default): Include alpha only if it's set. (e.g. not `None`) - `True`: Always include alpha. - `Fa...
def as_rgb_tuple(self, *, alpha: bool | None = None) -> ColorTuple: """ Returns the color as an RGB or RGBA tuple. Args: alpha: Whether to include the alpha channel. There are three options for this input: - `None` (default): Include alpha only if it's set. (e.g. not `None`) ...
(self, *, alpha: Optional[bool] = None) -> Union[Tuple[int, int, int], Tuple[int, int, int, float]]
[ -0.03300309181213379, -0.047410812228918076, -0.07368046045303345, -0.004768752958625555, 0.02239561453461647, -0.03233896940946579, 0.012452256865799427, 0.02305973507463932, 0.021860627457499504, -0.04095408692955971, 0.011788136325776577, -0.016796709969639778, 0.015311663039028645, 0.0...
726,189
pydantic_extra_types.color
original
Original value passed to `Color`.
def original(self) -> ColorType: """ Original value passed to `Color`. """ return self._original
(self) -> Union[Tuple[int, int, int], Tuple[int, int, int, float], str, pydantic_extra_types.color.Color]
[ 0.002133559202775359, -0.07920470088720322, 0.029212845489382744, 0.04620274156332016, -0.029789069667458534, -0.032705117017030716, 0.014117504470050335, 0.012388830073177814, 0.10176476836204529, -0.02397443912923336, -0.015881100669503212, -0.048891790211200714, 0.016177944839000702, 0....
726,190
penne.delegates
ColumnType
String indicating type of data stored in a column in a table Used in TableColumnInfo inside TableInitData. Takes value of either TEXT, REAL, or INTEGER
class ColumnType(str, Enum): """String indicating type of data stored in a column in a table Used in TableColumnInfo inside TableInitData. Takes value of either TEXT, REAL, or INTEGER """ text = "TEXT" real = "REAL" integer = "INTEGER"
(value, names=None, *, module=None, qualname=None, type=None, start=1)
[ 0.04511008411645889, -0.01018767710775137, -0.01384576316922903, -0.027975834906101227, 0.02609940618276596, -0.047574080526828766, 0.024753686040639877, 0.0021808736491948366, -0.03900695592164993, -0.09492071717977524, -0.01921917125582695, 0.060690123587846756, -0.019143356010317802, 0....
726,191
pydantic.config
ConfigDict
Usage docs: https://docs.pydantic.dev/2.0/usage/model_config/ A TypedDict for configuring Pydantic behaviour.
class ConfigDict(TypedDict, total=False): """Usage docs: https://docs.pydantic.dev/2.0/usage/model_config/ A TypedDict for configuring Pydantic behaviour. """ title: str | None """The title for the generated JSON schema, defaults to the model's name""" str_to_lower: bool """Whether to con...
null
[ 0.03871973231434822, -0.010456450283527374, 0.0029493169859051704, -0.0273179579526186, 0.04969707503914833, -0.03044331818819046, -0.02756875939667225, -0.04313768073916435, -0.03563295677304268, -0.06540104001760483, -0.019205527380108833, 0.008069022558629513, 0.027935313060879707, 0.03...
726,192
penne.delegates
Delegate
Parent class for all delegates Defines general methods that should be available for all delegates. In this context, a delegate refers to an object in a NOODLES scene that can be subclassed and extended by the user. For example, a user can create an implementation for a table that specifically suits the...
class Delegate(NoodleObject): """Parent class for all delegates Defines general methods that should be available for all delegates. In this context, a delegate refers to an object in a NOODLES scene that can be subclassed and extended by the user. For example, a user can create an implementation fo...
(*, client: object = None, id: penne.delegates.ID = None, name: Optional[str] = 'No-Name', signals: Optional[dict] = {}, **extra_data: Any) -> None
[ -0.05657374858856201, 0.0022021981421858072, -0.005362072493880987, -0.000601690320763737, -0.013832592405378819, -0.025617266073822975, -0.050759121775627136, 0.08835305273532867, 0.00736427865922451, -0.0015770801110193133, -0.021557999774813652, 0.020607180893421173, 0.006907153874635696,...
726,223
penne.delegates
DirectionalLight
Directional light information for a light delegate Attributes: range (float): Range of light, -1 defaults to infinite
class DirectionalLight(NoodleObject): """Directional light information for a light delegate Attributes: range (float): Range of light, -1 defaults to infinite """ range: float = -1.0
(*, range: float = -1.0, **extra_data: Any) -> None
[ 0.004315828904509544, -0.0019254119833931327, 0.02693154849112034, 0.015907051041722298, -0.00980385858565569, -0.03487538546323776, -0.05839689448475838, 0.04723677411675453, -0.08013588935136795, -0.004151139874011278, -0.0410754531621933, 0.030419087037444115, -0.0026301853358745575, 0....
726,251
penne.delegates
Document
Delegate for document Attributes: name (str): name will be "Document" methods_list (list[MethodID]): list of methods available on the document signals_list (list[SignalID]): list of signals available on the document
class Document(Delegate): """Delegate for document Attributes: name (str): name will be "Document" methods_list (list[MethodID]): list of methods available on the document signals_list (list[SignalID]): list of signals available on the document """ name: str = "Document" m...
(*, client: object = None, id: penne.delegates.ID = None, name: str = 'Document', signals: Optional[dict] = {}, methods_list: List[penne.delegates.MethodID] = [], signals_list: List[penne.delegates.SignalID] = [], client_view: Optional[penne.delegates.InjectedMethod] = None, **extra_data: Any) -> None
[ -0.02561638504266739, -0.04812101647257805, -0.017281334847211838, -0.0033571727108210325, 0.013465735130012035, -0.008154456503689289, -0.028190989047288895, 0.038118958473205566, 0.0307655930519104, 0.037100229412317276, 0.0004619006358552724, 0.013447212986648083, 0.0007154250633902848, ...
726,281
penne.delegates
on_update
Handler when update message is received Should update methods_list and signals_list Args: message (Message): update message with the new document's info
def on_update(self, message: dict): """Handler when update message is received Should update methods_list and signals_list Args: message (Message): update message with the new document's info """ if "methods_list" in message: self.methods_list = [MethodID(*element) for element in mes...
(self, message: dict)
[ 0.014383929781615734, -0.045251164585351944, -0.04902820661664009, -0.007269889581948519, -0.000053179115639068186, -0.03089473769068718, -0.002225429518148303, 0.016290785744786263, 0.04877151548862457, 0.058965861797332764, -0.033590007573366165, -0.048258133232593536, 0.018500173464417458...
726,282
penne.delegates
reset
Reset the document Called when document reset message is received. Will reset state, and clear methods and signals on document
def reset(self): """Reset the document Called when document reset message is received. Will reset state, and clear methods and signals on document """ self.client.state = {"document": self} self.methods_list = [] self.signals_list = []
(self)
[ -0.04717216640710831, 0.004617595113813877, 0.000881785701494664, -0.02261679247021675, -0.04480278864502907, -0.013704699464142323, -0.0530238151550293, 0.04056662693619728, 0.07316353172063828, 0.05176732689142227, -0.044479694217443466, -0.019475571811199188, 0.00010496447066543624, 0.0...
726,283
penne.delegates
show_methods
Show methods available on the document
def show_methods(self): """Show methods available on the document""" if not self.methods_list: message = "No methods available" else: message = f"-- Methods on Document --\n--------------------------------------\n" for method_id in self.methods_list: method = self.client....
(self)
[ -0.014724299311637878, -0.07988185435533524, 0.06383910030126572, -0.022035738453269005, 0.026830125600099564, -0.018836406990885735, 0.024709532037377357, -0.024562012404203415, 0.02738332375884056, 0.05989295244216919, -0.010298711247742176, -0.00837634690105915, 0.009865372441709042, -0...
726,284
penne.delegates
update_client_view
Notify the server of an area of interest for the client
def update_client_view(self, direction: Vec3, angle: float): """Notify the server of an area of interest for the client""" self.client_view(direction, angle)
(self, direction: List[float], angle: float)
[ -0.0020738192833960056, -0.0519622266292572, -0.034658465534448624, 0.019069798290729523, -0.0011791265569627285, 0.0212433822453022, -0.018560364842414856, 0.0660225972533226, -0.031737715005874634, 0.0011313671711832285, -0.006996221374720335, -0.020292438566684723, 0.011258482933044434, ...
726,285
penne.delegates
Entity
Container for other entities, possibly renderable, has associated methods and signals Can reference other entities, geometry, plots, and lights. It can be rendered, if it has a render rep. It may have associated methods and signals. The transform is relative to the parent entity. In other contexts it may b...
class Entity(Delegate): """Container for other entities, possibly renderable, has associated methods and signals Can reference other entities, geometry, plots, and lights. It can be rendered, if it has a render rep. It may have associated methods and signals. The transform is relative to the parent entity....
(*, client: object = None, id: penne.delegates.EntityID, name: Optional[str] = 'Unnamed Entity Delegate', signals: Optional[dict] = {}, parent: Optional[penne.delegates.EntityID] = None, transform: Optional[List[float]] = None, null_rep: Optional[Any] = None, text_rep: Optional[penne.delegates.TextRepresentation] = Non...
[ 0.017630361020565033, -0.08972000330686569, -0.036591313779354095, 0.01765887252986431, -0.007413305342197418, -0.03621114417910576, -0.042578984051942825, 0.03033752553164959, 0.012355508282780647, 0.008240173570811749, -0.008216413669288158, 0.00647713802754879, -0.026383763179183006, 0....
726,313
penne.delegates
on_new
null
def on_new(self, message: dict): # Inject methods and signals if applicable if self.methods_list: inject_methods(self, self.methods_list) if self.signals_list: inject_signals(self, self.signals_list)
(self, message: dict)
[ 0.014956512488424778, -0.023308850824832916, -0.006295155733823776, -0.032844290137290955, 0.005191517062485218, -0.013676292262971401, 0.03169650584459305, 0.04619390517473221, 0.04499314725399017, 0.06325174868106842, -0.017614075914025307, 0.019600624218583107, -0.005067909136414528, -0...
726,315
penne.delegates
on_update
null
def on_update(self, message: dict): # Inject methods and signals if applicable if self.methods_list: inject_methods(self, self.methods_list) if self.signals_list: inject_signals(self, self.signals_list)
(self, message: dict)
[ 0.03956679627299309, -0.03768763318657875, -0.04913660138845444, 0.003140636021271348, 0.011962256394326687, -0.04875380918383598, 0.0011342393700033426, 0.03643485903739929, 0.03580847010016441, 0.0642394945025444, -0.013824018649756908, -0.03180655464529991, 0.009395808912813663, -0.0167...
726,316
penne.delegates
request_set_position
Request to set the position of the entity Args: position (Vec3): Position to set
def request_set_position(self, position: Vec3): """Request to set the position of the entity Args: position (Vec3): Position to set """ self.set_position(position)
(self, position: List[float])
[ 0.026555391028523445, 0.021147558465600014, -0.08030543476343155, 0.012482934631407261, 0.006539502646774054, 0.01602480560541153, -0.06264791637659073, 0.02809308096766472, 0.030270036309957504, -0.009338444098830223, -0.010591057129204273, -0.060298189520835876, -0.012750734575092793, 0....
726,317
penne.delegates
request_set_rotation
Request to set the rotation of the entity Args: rotation (Vec4): Rotation to set
def request_set_rotation(self, rotation: Vec4): """Request to set the rotation of the entity Args: rotation (Vec4): Rotation to set """ self.set_rotation(rotation)
(self, rotation: List[float])
[ 0.040087826550006866, 0.026679139584302902, -0.01295078732073307, 0.03175923600792885, -0.013521001674234867, -0.02417365089058876, -0.06158319488167763, 0.04160840064287186, 0.003766873385757208, 0.024847541004419327, 0.01381474919617176, -0.0020724283531308174, -0.005525035783648491, 0.0...
726,318
penne.delegates
request_set_scale
Request to set the scale of the entity Args: scale (Vec3): Scale to set
def request_set_scale(self, scale: Vec3): """Request to set the scale of the entity Args: scale (Vec3): Scale to set """ self.set_scale(scale)
(self, scale: List[float])
[ 0.02789190784096718, -0.01688828319311142, -0.03119557537138462, 0.03826748952269554, -0.04308534041047096, 0.02056189440190792, -0.02813280001282692, -0.012543615885078907, 0.024089248850941658, 0.006375047378242016, -0.013008194044232368, 0.0017443196848034859, 0.004103775601834059, 0.01...