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 |
|---|---|---|---|---|---|---|
726,319 | penne.delegates | show_methods | Show methods available on the entity | def show_methods(self):
"""Show methods available on the entity"""
if self.methods_list is None:
message = "No methods available"
else:
message = f"-- Methods on {self.name} --\n--------------------------------------\n"
for method_id in self.methods_list:
method = self.cl... | (self) | [
0.0036487148609012365,
-0.10654522478580475,
0.06400061398744583,
-0.0274813212454319,
0.022484716027975082,
-0.05819573625922203,
0.024229854345321655,
-0.027499690651893616,
0.05893053114414215,
0.02625053934752941,
-0.027205772697925568,
-0.008987457491457462,
-0.010755556635558605,
-0.... |
726,320 | penne.delegates | EntityID | ID specific to entities | class EntityID(ID):
"""ID specific to entities"""
pass
| (slot: int, gen: int) | [
-0.003106937278062105,
-0.041891686618328094,
-0.041148677468299866,
0.027420656755566597,
0.012719647027552128,
-0.04224550351500511,
0.007819309830665588,
0.0052718427032232285,
0.0224495567381382,
-0.04337771236896515,
-0.04355461895465851,
-0.011463603936135769,
-0.02407710626721382,
0... |
726,333 | penne.delegates | Format | String indicating format of byte data for an attribute
Used in Attribute inside of geometry patch. Takes value of either U8, U16, U32, U8VEC4, U16VEC2,
VEC2, VEC3, VEC4, MAT3, or MAT4
| class Format(Enum):
"""String indicating format of byte data for an attribute
Used in Attribute inside of geometry patch. Takes value of either U8, U16, U32, U8VEC4, U16VEC2,
VEC2, VEC3, VEC4, MAT3, or MAT4
"""
u8 = "U8"
u16 = "U16"
u32 = "U32"
u8vec4 = "U8VEC4"
u16vec2 = "U16VEC2"... | (value, names=None, *, module=None, qualname=None, type=None, start=1) | [
0.06395520269870758,
-0.040432270616292953,
-0.03294282779097557,
-0.02666885405778885,
0.005648363381624222,
-0.08308099210262299,
0.008615541271865368,
-0.03857331722974777,
-0.009013250470161438,
-0.03106599859893322,
0.0030342077370733023,
0.03437279164791107,
-0.013164618983864784,
0.... |
726,334 | penne.delegates | Geometry | Represents geometry in the scene and can be used for meshes
This is more of a collection of patches, but each patch will contain the geometry information to render a mesh.
The patch references buffer views and buffers for each attribute, and a material to use for rendering. Instances
are stored in a separa... | class Geometry(Delegate):
"""Represents geometry in the scene and can be used for meshes
This is more of a collection of patches, but each patch will contain the geometry information to render a mesh.
The patch references buffer views and buffers for each attribute, and a material to use for rendering. Ins... | (*, client: object = None, id: penne.delegates.GeometryID, name: Optional[str] = 'Unnamed Geometry Delegate', signals: Optional[dict] = {}, patches: List[penne.delegates.GeometryPatch], **extra_data: Any) -> None | [
0.032557036727666855,
-0.03914286196231842,
-0.023162005469202995,
0.006990461144596338,
-0.039254482835531235,
0.004864951595664024,
-0.06265833973884583,
0.04747746139764786,
0.0015743653057143092,
-0.00549748819321394,
0.01591574028134346,
-0.01377627719193697,
-0.06455595046281815,
0.0... |
726,365 | penne.delegates | GeometryID | ID specific to geometries | class GeometryID(ID):
"""ID specific to geometries"""
pass
| (slot: int, gen: int) | [
0.02611752599477768,
-0.041515693068504333,
-0.03346744552254677,
0.03910645842552185,
-0.011644645594060421,
-0.03172162175178528,
0.0007425207877531648,
0.036278221756219864,
0.013835655525326729,
-0.019518312066793442,
-0.025349363684654236,
0.0009132841951213777,
-0.05977701395750046,
... |
726,377 | penne.delegates | GeometryPatch | Geometry patch for a mesh
Principle object used in geometry delegates. A geometry patch combines vertex data from attributes and index data
from indices.
Attributes:
attributes (List[Attribute]): List of attributes storing vertex data for the mesh
vertex_count (int): Number of vertices in the m... | class GeometryPatch(NoodleObject):
"""Geometry patch for a mesh
Principle object used in geometry delegates. A geometry patch combines vertex data from attributes and index data
from indices.
Attributes:
attributes (List[Attribute]): List of attributes storing vertex data for the mesh
verte... | (*, attributes: List[penne.delegates.Attribute], vertex_count: int, indices: Optional[penne.delegates.Index] = None, type: penne.delegates.PrimitiveType, material: penne.delegates.MaterialID, **extra_data: Any) -> None | [
0.05101371183991432,
-0.03008892573416233,
-0.02485772967338562,
0.03215085715055466,
-0.04356784746050835,
-0.03627471998333931,
-0.0584595762193203,
0.04085678979754448,
-0.006004421040415764,
-0.005760998465120792,
0.004099998157471418,
-0.03409823775291443,
-0.06991475075483322,
0.0188... |
726,405 | penne.delegates | ID | Base class for all ID's
Each ID is composed of a slot and a generation, resulting in a tuple like id ex. (0, 0). Both are positive
integers that are filled in increasing order. Slots are taken first, but once the slot is freed, it can be used
with a new generation. For example, a method is created -> (0, 0... | class ID(NamedTuple):
"""Base class for all ID's
Each ID is composed of a slot and a generation, resulting in a tuple like id ex. (0, 0). Both are positive
integers that are filled in increasing order. Slots are taken first, but once the slot is freed, it can be used
with a new generation. For example,... | (slot: int, gen: int) | [
0.059714425355196,
-0.00035185174783691764,
-0.03183094784617424,
0.00869788695126772,
0.020221803337335587,
-0.03637053444981575,
-0.03272809833288193,
0.030000757426023483,
-0.007060585077852011,
-0.0627647414803505,
-0.04597005993127823,
0.03976177051663399,
0.016839539632201195,
0.0555... |
726,417 | penne.delegates | Image | An image, can be used for a texture
Like a buffer, an image can be stored in a URI to reduce the size of messages. To obtain the bytes, you would
have to make an HTTP request to the URI.
Attributes:
id: ID for the image
name: Name of the image
buffer_source: Buffer that the image i... | class Image(Delegate):
"""An image, can be used for a texture
Like a buffer, an image can be stored in a URI to reduce the size of messages. To obtain the bytes, you would
have to make an HTTP request to the URI.
Attributes:
id: ID for the image
name: Name of the image
buffer_s... | (*, client: object = None, id: penne.delegates.ImageID, name: Optional[str] = 'Unnamed Image Delegate', signals: Optional[dict] = {}, buffer_source: Optional[penne.delegates.BufferID] = None, uri_source: Optional[str] = None, **extra_data: Any) -> None | [
0.015710048377513885,
-0.09657707065343857,
-0.03394749015569687,
0.02134881727397442,
-0.022938011214137077,
-0.00860175397247076,
-0.05027981474995613,
0.04300398379564285,
0.03546009585261345,
0.01290502492338419,
0.05142863094806671,
0.035613272339105606,
0.008754929527640343,
0.076319... |
726,448 | penne.delegates | ImageID | ID specific to images | class ImageID(ID):
"""ID specific to images"""
pass
| (slot: int, gen: int) | [
0.010776683688163757,
-0.0890682190656662,
-0.06730074435472488,
0.027584029361605644,
0.013372723013162613,
-0.03761133924126625,
-0.0022737642284482718,
0.024622224271297455,
0.01941230520606041,
0.006539163179695606,
-0.0045296866446733475,
0.03577359393239021,
-0.00772120850160718,
0.0... |
726,460 | penne.delegates | Index | Index for a geometry patch
The index is a view into a buffer that corresponds to the indices of the mesh. The index allows the mesh to
connect vertices and render triangles, lines, or points.
Attributes:
view (BufferViewID): View of the buffer storing the data
count (int): Number of indice... | class Index(NoodleObject):
"""Index for a geometry patch
The index is a view into a buffer that corresponds to the indices of the mesh. The index allows the mesh to
connect vertices and render triangles, lines, or points.
Attributes:
view (BufferViewID): View of the buffer storing the data
... | (*, view: penne.delegates.BufferViewID, count: int, offset: Optional[int] = 0, stride: Optional[int] = 0, format: penne.delegates.IndexFormat, **extra_data: Any) -> None | [
0.024532224982976913,
-0.0691247507929802,
-0.04899203032255173,
0.03153884783387184,
0.0007055277819745243,
-0.005979164037853479,
-0.06264317035675049,
0.01843990571796894,
-0.029836978763341904,
-0.024532224982976913,
-0.009432685561478138,
-0.027211759239435196,
-0.029619719833135605,
... |
726,488 | penne.delegates | IndexFormat | String indicating format of byte data for an index
Used in Index inside of geometry patch. Takes value of either U8, U16, or U32
| class IndexFormat(str, Enum):
"""String indicating format of byte data for an index
Used in Index inside of geometry patch. Takes value of either U8, U16, or U32
"""
u8 = "U8"
u16 = "U16"
u32 = "U32"
| (value, names=None, *, module=None, qualname=None, type=None, start=1) | [
0.027556095272302628,
-0.05880066379904747,
-0.04784268140792847,
-0.021951770409941673,
0.01305288728326559,
-0.03824549913406372,
-0.01213972270488739,
-0.02034030295908451,
-0.005841569975018501,
-0.07194307446479797,
0.014449493028223515,
0.01583714596927166,
-0.022399399429559708,
-0.... |
726,489 | penne.delegates | InjectedMethod | Class for representing injected method in delegate
The context is automatically set when invoked. This object is callable and is what is actually called when the
injected method is called.
Attributes:
method (Callable): method to be called
injected (bool): attribute marking method as injec... | class InjectedMethod(object):
"""Class for representing injected method in delegate
The context is automatically set when invoked. This object is callable and is what is actually called when the
injected method is called.
Attributes:
method (Callable): method to be called
injected (boo... | (method_obj) -> 'None' | [
0.025062326341867447,
-0.046778157353401184,
0.041285544633865356,
-0.00339196203276515,
0.045468661934137344,
-0.005319833289831877,
0.018060151487588882,
0.012749412097036839,
0.02915450558066368,
0.024116577580571175,
0.027481257915496826,
0.007297719828784466,
0.019515149295330048,
0.0... |
726,490 | penne.delegates | __call__ | null | def __call__(self, *args, **kwargs):
self.method(*args, **kwargs)
| (self, *args, **kwargs) | [
0.010046436451375484,
-0.07386229187250137,
0.012847105041146278,
0.02994232065975666,
-0.02146323025226593,
-0.03655429556965828,
-0.024323852732777596,
0.021223418414592743,
0.08886770904064178,
0.019253527745604515,
0.0019538304768502712,
0.01849983073771,
0.05827447026968002,
-0.006355... |
726,491 | penne.delegates | __init__ | null | def __init__(self, method_obj) -> None:
self.method = method_obj
self.injected = True
| (self, method_obj) -> NoneType | [
0.019340794533491135,
-0.05648135393857956,
0.03656916692852974,
-0.024362128227949142,
-0.010146558284759521,
-0.016492486000061035,
0.010986332781612873,
0.04096716269850731,
0.009904148988425732,
0.0375734306871891,
0.012622595764696598,
0.033227380365133286,
0.004138271789997816,
-0.00... |
726,492 | penne.delegates | InstanceSource | Source of instances for a geometry patch
Attributes:
view (BufferViewID): View of mat4
stride (int): Stride for buffer, defaults to tightly packed
bb (BoundingBox): Bounding box of instances
| class InstanceSource(NoodleObject):
"""Source of instances for a geometry patch
Attributes:
view (BufferViewID): View of mat4
stride (int): Stride for buffer, defaults to tightly packed
bb (BoundingBox): Bounding box of instances
"""
view: BufferViewID
stride: Optional[int] ... | (*, view: penne.delegates.BufferViewID, stride: Optional[int] = 0, bb: Optional[penne.delegates.BoundingBox] = None, **extra_data: Any) -> None | [
0.07208174467086792,
-0.07878271490335464,
-0.027266670018434525,
-0.016095293685793877,
-0.04413016885519028,
-0.01910332776606083,
-0.021602310240268707,
0.019936323165893555,
0.009884861297905445,
-0.007098959758877754,
-0.04294546693563461,
-0.02460108883678913,
-0.045351892709732056,
... |
726,520 | penne.delegates | Invoke | null | class Invoke(NoodleObject):
id: SignalID
context: Optional[InvokeIDType] = None # if empty - document
signal_data: List[Any]
| (*, id: penne.delegates.SignalID, context: Optional[penne.delegates.InvokeIDType] = None, signal_data: List[Any], **extra_data: Any) -> None | [
0.022999905049800873,
-0.03720572963356972,
-0.008963198401033878,
-0.013066509738564491,
0.013636167161166668,
-0.01837144047021866,
-0.023462751880288124,
0.032559461891651154,
0.02262606844305992,
-0.010431845672428608,
-0.024655470624566078,
0.04379238933324814,
-0.04008961841464043,
0... |
726,548 | penne.delegates | InvokeIDType | Context for invoking a signal
Attributes:
entity (Optional[EntityID]): Entity to invoke signal on
table (Optional[TableID]): Table to invoke signal on
plot (Optional[PlotID]): Plot to invoke signal on
| class InvokeIDType(NoodleObject):
"""Context for invoking a signal
Attributes:
entity (Optional[EntityID]): Entity to invoke signal on
table (Optional[TableID]): Table to invoke signal on
plot (Optional[PlotID]): Plot to invoke signal on
"""
entity: Optional[EntityID] = None
... | (*, entity: Optional[penne.delegates.EntityID] = None, table: Optional[penne.delegates.TableID] = None, plot: Optional[penne.delegates.PlotID] = None, **extra_data: Any) -> None | [
0.023003634065389633,
-0.017551906406879425,
0.01637418009340763,
0.007080598268657923,
0.015528878197073936,
-0.02813243865966797,
-0.018074283376336098,
-0.014056720770895481,
0.014997001737356186,
-0.015319926664233208,
-0.01671610027551651,
0.03517979383468628,
-0.010704003274440765,
0... |
726,576 | penne.delegates | Light | Represents a light in the scene
For these purposes, a light is just a couple of properties like color, intensity, and light type. The entity
that stores the light will dictate position and direction with its transform. The client application is then
responsible for using this information to render the ligh... | class Light(Delegate):
"""Represents a light in the scene
For these purposes, a light is just a couple of properties like color, intensity, and light type. The entity
that stores the light will dictate position and direction with its transform. The client application is then
responsible for using this ... | (*, client: object = None, id: penne.delegates.LightID, name: Optional[str] = 'Unnamed Light Delegate', signals: Optional[dict] = {}, color: Optional[pydantic_extra_types.color.Color] = Color('white', rgb=(255, 255, 255)), intensity: Optional[float] = 1.0, point: Optional[penne.delegates.PointLight] = None, spot: Optio... | [
0.006344255991280079,
-0.062460415065288544,
-0.006879970896989107,
0.06515882909297943,
-0.0053422702476382256,
-0.012351209297776222,
-0.038888949900865555,
0.043134987354278564,
-0.06178580969572067,
0.015317483805119991,
-0.015793675556778908,
0.031507983803749084,
0.019930586218833923,
... |
726,607 | penne.delegates | LightID | ID specific to lights | class LightID(ID):
"""ID specific to lights"""
pass
| (slot: int, gen: int) | [
0.017228471115231514,
-0.0786256194114685,
-0.01118999533355236,
0.04443745315074921,
-0.009532550349831581,
-0.0397786870598793,
-0.01034783385694027,
0.05877211317420006,
-0.048666175454854965,
-0.006468516308814287,
-0.0619257390499115,
0.039707012474536896,
-0.001327076111920178,
0.042... |
726,619 | penne.delegates | LinkedMethod | Class linking target delegate and method's delegate
Make a cleaner function call in injected method, it's like setting the context automatically
This is what actually gets called for the injected method
Attributes:
_obj_delegate (Delegate):
delegate method is being linked to
_m... | class LinkedMethod(object):
"""Class linking target delegate and method's delegate
Make a cleaner function call in injected method, it's like setting the context automatically
This is what actually gets called for the injected method
Attributes:
_obj_delegate (Delegate):
delegate m... | (object_delegate: 'Delegate', method_delegate: 'Method') | [
-0.0064374469220638275,
-0.02737588807940483,
0.03057069703936577,
0.028810683637857437,
-0.008623117581009865,
-0.02222975715994835,
-0.022172365337610245,
0.042393408715724945,
0.055593520402908325,
0.022344540804624557,
0.0061600529588758945,
0.0007167996373027563,
0.047635193914175034,
... |
726,620 | penne.delegates | __call__ | null | def __call__(self, *args, **kwargs):
callback = kwargs.pop("callback", None)
self._method_delegate.invoke(self._obj_delegate, list(args), callback=callback)
| (self, *args, **kwargs) | [
-0.00474723381921649,
-0.03327030688524246,
0.0055891298688948154,
0.04044625535607338,
-0.010481822304427624,
-0.0263588298112154,
-0.013690723106265068,
0.07063108682632446,
0.061603844165802,
0.014501763507723808,
0.009274076670408249,
0.041892025619745255,
0.03207137808203697,
-0.04023... |
726,621 | penne.delegates | __init__ | null | def __init__(self, object_delegate: Delegate, method_delegate: Method):
self._obj_delegate = object_delegate
self._method_delegate = method_delegate
| (self, object_delegate: penne.delegates.Delegate, method_delegate: penne.delegates.Method) | [
-0.03179255500435829,
-0.00802338682115078,
0.05323841795325279,
-0.00978232454508543,
-0.062494002282619476,
-0.026788517832756042,
-0.01765521429479122,
0.09676975756883621,
0.0018271312583237886,
0.03066382370889187,
0.009307317435741425,
0.05511963367462158,
0.007285009603947401,
0.028... |
726,622 | penne.delegates | MagFilterTypes | Options for magnification filter type
Used in Sampler. Takes value of either NEAREST or LINEAR
| class MagFilterTypes(Enum):
"""Options for magnification filter type
Used in Sampler. Takes value of either NEAREST or LINEAR
"""
nearest = "NEAREST"
linear = "LINEAR"
| (value, names=None, *, module=None, qualname=None, type=None, start=1) | [
0.07681834697723389,
-0.04860084131360054,
0.013727923855185509,
-0.03677705302834511,
-0.0014553050277754664,
-0.03460089862346649,
-0.02575119212269783,
-0.0463884137570858,
-0.03721228614449501,
0.02203359082341194,
-0.01829785481095314,
0.06256451457738876,
-0.010690371505916119,
0.069... |
726,623 | penne.delegates | Material | A material that can be applied to a mesh.
The material is a collection of textures and factors that are used to render the mesh.
Attributes:
id: ID for the material
name: Name of the material
pbr_info: Information for physically based rendering
normal_texture: Texture for norma... | class Material(Delegate):
"""A material that can be applied to a mesh.
The material is a collection of textures and factors that are used to render the mesh.
Attributes:
id: ID for the material
name: Name of the material
pbr_info: Information for physically based rendering
... | (*, client: object = None, id: penne.delegates.MaterialID, name: Optional[str] = 'Unnamed Material Delegate', signals: Optional[dict] = {}, pbr_info: Optional[penne.delegates.PBRInfo] = PBRInfo(base_color=Color('white', rgb=(255, 255, 255)), base_color_texture=None, metallic=1.0, roughness=1.0, metal_rough_texture=None... | [
0.058099254965782166,
-0.037614356726408005,
-0.02376619167625904,
0.014432121999561787,
-0.027251405641436577,
-0.022246045991778374,
-0.061065394431352615,
0.04727284610271454,
-0.02613910287618637,
0.0032001864165067673,
0.022116277366876602,
0.04052487760782242,
-0.03448136895895004,
0... |
726,654 | penne.delegates | MaterialID | ID specific to materials | class MaterialID(ID):
"""ID specific to materials"""
pass
| (slot: int, gen: int) | [
0.053050510585308075,
-0.015272117219865322,
-0.013315049931406975,
0.005290198605507612,
0.013655789196491241,
-0.04987027868628502,
-0.017858242616057396,
0.029303593561053276,
0.006867210380733013,
-0.00695457961410284,
-0.04728415235877037,
0.03966556861996651,
-0.013821789994835854,
0... |
726,666 | penne.delegates | Method | A method that clients can request the server to call.
Attributes:
id: ID for the method
name: Name of the method
doc: Documentation for the method
return_doc: Documentation for the return value
arg_doc: Documentation for the arguments
| class Method(Delegate):
"""A method that clients can request the server to call.
Attributes:
id: ID for the method
name: Name of the method
doc: Documentation for the method
return_doc: Documentation for the return value
arg_doc: Documentation for the arguments
"""
... | (*, client: object = None, id: penne.delegates.MethodID, name: str, signals: Optional[dict] = {}, doc: Optional[str] = None, return_doc: Optional[str] = None, arg_doc: List[penne.delegates.MethodArg] = [], **extra_data: Any) -> None | [
0.02023307979106903,
-0.05729887634515762,
0.005772157572209835,
-0.012464853934943676,
0.015104359947144985,
-0.03747910261154175,
-0.025098787620663643,
0.04027829319238663,
0.03824934735894203,
-0.018842875957489014,
-0.004370213486254215,
0.024234607815742493,
0.019331326708197594,
0.0... |
726,683 | penne.delegates | __str__ | Custom string representation for methods | def __str__(self) -> str:
"""Custom string representation for methods"""
rep = f"{self.name}:\n\t{self.doc}\n\tReturns: {self.return_doc}\n\tArgs:"
for arg in self.arg_doc:
rep += f"\n\t\t{arg.name}: {arg.doc}"
return rep
| (self) -> str | [
-0.02037280984222889,
-0.043525390326976776,
0.06349586695432663,
-0.03701487183570862,
0.012499833479523659,
-0.07296903431415558,
0.0028392088133841753,
-0.0009086839854717255,
0.04502500593662262,
-0.020427672192454338,
-0.012097498401999474,
0.020153352990746498,
-0.00609904108569026,
... |
726,689 | penne.delegates | invoke | Invoke this delegate's method
Args:
on_delegate (Delegate):
delegate method is being invoked on
used to get context
args (list, optional):
args for the method
callback (function):
function to be called when com... | def invoke(self, on_delegate: Delegate, args=None, callback=None):
"""Invoke this delegate's method
Args:
on_delegate (Delegate):
delegate method is being invoked on
used to get context
args (list, optional):
args for the method
callback (function):
... | (self, on_delegate: penne.delegates.Delegate, args=None, callback=None) | [
0.006966098211705685,
-0.03929003328084946,
-0.0028541958890855312,
0.01828102581202984,
0.009220226667821407,
-0.028076961636543274,
-0.003775332821533084,
0.06557786464691162,
0.013985338620841503,
0.015995897352695465,
-0.015234187245368958,
0.02556154876947403,
0.0029848378617316484,
-... |
726,698 | penne.delegates | MethodArg | Argument for a method
Attributes:
name (str): Name of argument
doc (str): Documentation for argument
editor_hint (str): Hint for editor, refer to message spec for hint options
| class MethodArg(NoodleObject):
"""Argument for a method
Attributes:
name (str): Name of argument
doc (str): Documentation for argument
editor_hint (str): Hint for editor, refer to message spec for hint options
"""
name: str
doc: Optional[str] = None
editor_hint: Optional... | (*, name: str, doc: Optional[str] = None, editor_hint: Optional[str] = None, **extra_data: Any) -> None | [
0.010837206616997719,
0.006855078507214785,
0.059568267315626144,
-0.009646204300224781,
0.02694755047559738,
-0.045676279813051224,
0.011264512315392494,
0.028111277148127556,
0.030293265357613564,
-0.027383947744965553,
0.027674879878759384,
0.010109877213835716,
-0.018428705632686615,
0... |
726,726 | penne.delegates | MethodException | Exception raised when invoking a method
Will be sent as part of a reply message
Attributes:
code (int): error code
message (str): error message
data (Any): data associated with the error
| class MethodException(NoodleObject):
"""Exception raised when invoking a method
Will be sent as part of a reply message
Attributes:
code (int): error code
message (str): error message
data (Any): data associated with the error
"""
code: int
message: Optional[str] = None... | (*, code: int, message: Optional[str] = None, data: Optional[Any] = None, **extra_data: Any) -> None | [
0.004652189556509256,
-0.0071799419820308685,
0.05882769078016281,
0.011461644433438778,
-0.008713476359844208,
-0.09551995992660522,
-0.026206085458397865,
0.030858274549245834,
0.03802414610981941,
-0.017980337142944336,
0.049260687083005905,
0.025905942544341087,
0.03130848705768585,
0.... |
726,754 | penne.delegates | MethodID | ID specific to methods | class MethodID(ID):
"""ID specific to methods"""
pass
| (slot: int, gen: int) | [
0.021588435396552086,
-0.03933892771601677,
0.031023381277918816,
-0.011629325337707996,
-0.00034897972363978624,
-0.05643199011683464,
0.015698257833719254,
0.030668016523122787,
0.012908640317618847,
-0.010527693666517735,
-0.03452372923493385,
0.026883376762270927,
0.022849980741739273,
... |
726,766 | penne.delegates | MinFilterTypes | Options for minification filter type
Used in Sampler. Takes value of either NEAREST, LINEAR, or LINEAR_MIPMAP_LINEAR
| class MinFilterTypes(Enum):
"""Options for minification filter type
Used in Sampler. Takes value of either NEAREST, LINEAR, or LINEAR_MIPMAP_LINEAR
"""
nearest = "NEAREST"
linear = "LINEAR"
linear_mipmap_linear = "LINEAR_MIPMAP_LINEAR"
| (value, names=None, *, module=None, qualname=None, type=None, start=1) | [
0.04092371091246605,
-0.058219071477651596,
-0.006758893374353647,
-0.04699745774269104,
0.0000040281024666910525,
-0.03327597677707672,
0.0004536791529972106,
-0.050886135548353195,
-0.0444050058722496,
0.003328523598611355,
-0.022424712777137756,
0.03153533115983009,
-0.0034187964629381895... |
726,768 | penne.delegates | NoodleObject | Parent Class for all noodle objects | class NoodleObject(BaseModel):
"""Parent Class for all noodle objects"""
model_config = ConfigDict(arbitrary_types_allowed=True, use_enum_values=True, extra="allow", frozen=False)
| (**extra_data: Any) -> None | [
0.022739386186003685,
-0.0030614258721470833,
-0.02661227434873581,
-0.009078234434127808,
0.004018121398985386,
-0.054736822843551636,
-0.03749324753880501,
0.008515743538737297,
0.017206689342856407,
-0.056212205439805984,
-0.035667456686496735,
0.02130088582634926,
-0.029931893572211266,
... |
726,796 | penne.delegates | PBRInfo | Physically based rendering information for a material
Attributes:
base_color (Optional[RGBA]): Base color of material
base_color_texture (Optional[TextureRef]): Texture to use for base color
metallic (Optional[float]): Metallic value of material
roughness (Optional[float]): Roughness val... | class PBRInfo(NoodleObject):
"""Physically based rendering information for a material
Attributes:
base_color (Optional[RGBA]): Base color of material
base_color_texture (Optional[TextureRef]): Texture to use for base color
metallic (Optional[float]): Metallic value of material
roughn... | (*, base_color: Optional[pydantic_extra_types.color.Color] = Color('white', rgb=(255, 255, 255)), base_color_texture: Optional[penne.delegates.TextureRef] = None, metallic: Optional[float] = 1.0, roughness: Optional[float] = 1.0, metal_rough_texture: Optional[penne.delegates.TextureRef] = None, **extra_data: Any) -> No... | [
0.04868582636117935,
-0.03544403985142708,
-0.06535645574331284,
0.0467914342880249,
-0.0031541595235466957,
-0.05539196729660034,
-0.03633440285921097,
-0.016888488084077835,
-0.04122192785143852,
-0.01860291138291359,
0.011678915470838547,
0.03883499652147293,
0.013829047791659832,
0.019... |
726,824 | penne.delegates | Plot | An abstract plot object.
Attributes:
id: ID for the plot
name: Name of the plot
table: Table to plot
simple_plot: Simple plot to render
url_plot: URL for plot to render
methods_list: List of methods attached to the plot
signals_list: List of signals attached ... | class Plot(Delegate):
"""An abstract plot object.
Attributes:
id: ID for the plot
name: Name of the plot
table: Table to plot
simple_plot: Simple plot to render
url_plot: URL for plot to render
methods_list: List of methods attached to the plot
signals_li... | (*, client: object = None, id: penne.delegates.PlotID, name: Optional[str] = 'Unnamed Plot Delegate', signals: Optional[dict] = {}, table: Optional[penne.delegates.TableID] = None, simple_plot: Optional[str] = None, url_plot: Optional[str] = None, methods_list: Optional[List[penne.delegates.MethodID]] = None, signals_l... | [
-0.011757255531847477,
-0.06068380922079086,
-0.020389163866639137,
0.025021374225616455,
-0.01923576183617115,
-0.022565744817256927,
-0.05874906852841377,
0.03607170656323433,
0.0060879141092300415,
0.026342203840613365,
0.008943513035774231,
0.029821012169122696,
0.029151296243071556,
0... |
726,856 | penne.delegates | PlotID | ID specific to plots | class PlotID(ID):
"""ID specific to plots"""
pass
| (slot: int, gen: int) | [
0.018169855698943138,
-0.04541601240634918,
-0.03302668780088425,
0.03345807269215584,
-0.010344566777348518,
0.007009975146502256,
-0.02902345359325409,
0.04962630942463875,
-0.01996440999209881,
0.015115663409233093,
-0.023777836933732033,
0.006104070693254471,
0.0197918564081192,
0.0378... |
726,868 | penne.delegates | PointLight | Point light information for a light delegate
Attributes:
range (float): Range of light, -1 defaults to infinite
| class PointLight(NoodleObject):
"""Point 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.014991850592195988,
-0.045119062066078186,
0.031074365600943565,
0.03744614124298096,
-0.013422824442386627,
-0.02187068946659565,
-0.04603751376271248,
0.03373405709862709,
-0.06658792495727539,
0.011088420636951923,
-0.04465983435511589,
0.011050151661038399,
-0.012657446786761284,
0.0... |
726,896 | penne.delegates | PrimitiveType | String indicating type of primitive used in a geometry patch
Takes value of either POINTS, LINES, LINE_LOOP, LINE_STRIP, TRIANGLES, or TRIANGLE_STRIP
| class PrimitiveType(Enum):
"""String indicating type of primitive used in a geometry patch
Takes value of either POINTS, LINES, LINE_LOOP, LINE_STRIP, TRIANGLES, or TRIANGLE_STRIP
"""
points = "POINTS"
lines = "LINES"
line_loop = "LINE_LOOP"
line_strip = "LINE_STRIP"
triangles = "TRIANG... | (value, names=None, *, module=None, qualname=None, type=None, start=1) | [
0.04733460396528244,
-0.05800255015492439,
-0.037302494049072266,
-0.019092800095677376,
0.000005273639544611797,
-0.040305063128471375,
-0.015207124873995781,
0.00630539283156395,
-0.009511075913906097,
-0.06022798269987106,
0.013405583798885345,
0.014721415005624294,
-0.05249195545911789,
... |
726,897 | penne.delegates | RenderRepresentation | Render representation for an entity
Attributes:
mesh (GeometryID): Mesh to render
instances (Optional[InstanceSource]): Source of instances for mesh
| class RenderRepresentation(NoodleObject):
"""Render representation for an entity
Attributes:
mesh (GeometryID): Mesh to render
instances (Optional[InstanceSource]): Source of instances for mesh
"""
mesh: GeometryID
instances: Optional[InstanceSource] = None
| (*, mesh: penne.delegates.GeometryID, instances: Optional[penne.delegates.InstanceSource] = None, **extra_data: Any) -> None | [
0.039722539484500885,
-0.0419376902282238,
-0.03666262701153755,
0.007640393916517496,
-0.0002173499669879675,
0.00674870191141963,
-0.025342829525470734,
0.021325523033738136,
-0.009949407540261745,
0.013694514520466328,
0.021644653752446175,
0.015937823802232742,
-0.07794328033924103,
0.... |
726,925 | penne.delegates | Reply | Reply message sent from server in response to method invocation
Will either contain resulting data, or an exception
Attributes:
invoke_id (str): id of the invoke message that this is a reply to
result (Any): result of the method invocation
method_exception (MethodException): exception ... | class Reply(NoodleObject):
"""Reply message sent from server in response to method invocation
Will either contain resulting data, or an exception
Attributes:
invoke_id (str): id of the invoke message that this is a reply to
result (Any): result of the method invocation
method_excep... | (*, invoke_id: str, result: Optional[Any] = None, method_exception: Optional[penne.delegates.MethodException] = None, **extra_data: Any) -> None | [
0.01767347753047943,
0.021757805719971657,
0.04021782428026199,
-0.03182173892855644,
0.0012840516865253448,
-0.06565246731042862,
-0.021738851442933083,
0.0506039522588253,
0.03341377153992653,
-0.00469555426388979,
0.030021222308278084,
0.041317086666822433,
0.0003349313628859818,
0.0241... |
726,953 | penne.delegates | Sampler | A sampler to use for a texture
A sampler specifies how to take portions of an image and apply them to a mesh.
Attributes:
id: ID for the sampler
name: Name of the sampler
mag_filter: Magnification filter
min_filter: Minification filter
wrap_s: Wrap mode for S
wrap_t: ... | class Sampler(Delegate):
"""A sampler to use for a texture
A sampler specifies how to take portions of an image and apply them to a mesh.
Attributes:
id: ID for the sampler
name: Name of the sampler
mag_filter: Magnification filter
min_filter: Minification filter
wrap_s:... | (*, client: object = None, id: penne.delegates.SamplerID, name: Optional[str] = 'Unnamed Sampler Delegate', signals: Optional[dict] = {}, mag_filter: Optional[penne.delegates.MagFilterTypes] = <MagFilterTypes.linear: 'LINEAR'>, min_filter: Optional[penne.delegates.MinFilterTypes] = <MinFilterTypes.linear_mipmap_linear:... | [
0.018827537074685097,
-0.07037302106618881,
0.0099691953510046,
-0.009689107537269592,
-0.03812979534268379,
0.0199383907020092,
-0.05275128409266472,
0.0444721020758152,
-0.05028272047638893,
0.019634567201137543,
0.0014407860580831766,
0.08043716102838516,
0.0038286454509943724,
0.064334... |
726,984 | penne.delegates | SamplerID | ID specific to samplers | class SamplerID(ID):
"""ID specific to samplers"""
pass
| (slot: int, gen: int) | [
0.01383699756115675,
-0.03541923314332962,
-0.028248362243175507,
0.015003134496510029,
-0.004390418529510498,
0.0006303883856162429,
-0.013958833180367947,
0.0333828441798687,
-0.02650785818696022,
0.027795830741524696,
-0.0613701306283474,
0.04598408564925194,
-0.0010774800321087241,
0.0... |
726,996 | penne.delegates | SamplerMode | String options for sampler mode
Used in Sampler. Takes value of either CLAMP_TO_EDGE, MIRRORED_REPEAT, or REPEAT
| class SamplerMode(Enum):
"""String options for sampler mode
Used in Sampler. Takes value of either CLAMP_TO_EDGE, MIRRORED_REPEAT, or REPEAT
"""
clamp_to_edge = "CLAMP_TO_EDGE"
mirrored_repeat = "MIRRORED_REPEAT"
repeat = "REPEAT"
| (value, names=None, *, module=None, qualname=None, type=None, start=1) | [
0.04580225795507431,
-0.05123012512922287,
-0.02888665162026882,
-0.0581078976392746,
0.014973100274801254,
-0.00828121230006218,
-0.0022341147996485233,
-0.019016116857528687,
-0.03388698026537895,
-0.014926629140973091,
-0.032790254801511765,
0.06825726479291916,
0.006510649807751179,
0.... |
726,997 | penne.delegates | Selection | Selection of rows in a table
Attributes:
name (str): Name of selection
rows (List[int]): List of rows to select
row_ranges (List[SelectionRange]): List of ranges of rows to select
| class Selection(NoodleObject):
"""Selection of rows in a table
Attributes:
name (str): Name of selection
rows (List[int]): List of rows to select
row_ranges (List[SelectionRange]): List of ranges of rows to select
"""
name: str
rows: Optional[List[int]] = None
row_ranges... | (*, name: str, rows: Optional[List[int]] = None, row_ranges: Optional[List[penne.delegates.SelectionRange]] = None, **extra_data: Any) -> None | [
0.02280345931649208,
-0.02169795148074627,
-0.0010569085134193301,
-0.03481415659189224,
-0.043283477425575256,
-0.0002714000584091991,
-0.01429666392505169,
-0.009912103414535522,
-0.025126902386546135,
-0.030616970732808113,
-0.003145547118037939,
0.03020474687218666,
-0.04253397881984711,... |
727,025 | penne.delegates | SelectionRange | Range of rows to select in a table
Attributes:
key_from_inclusive (int): First row to select
key_to_exclusive (int): Where to end selection, exclusive
| class SelectionRange(NoodleObject):
"""Range of rows to select in a table
Attributes:
key_from_inclusive (int): First row to select
key_to_exclusive (int): Where to end selection, exclusive
"""
key_from_inclusive: int
key_to_exclusive: int
| (*, key_from_inclusive: int, key_to_exclusive: int, **extra_data: Any) -> None | [
0.02442530356347561,
-0.012463300488889217,
-0.03144347295165062,
-0.023301705718040466,
-0.029386423528194427,
0.007160780020058155,
-0.023232560604810715,
-0.03272264823317528,
-0.05410559102892876,
-0.05586877837777138,
-0.013777046464383602,
0.037441760301589966,
-0.011054481379687786,
... |
727,053 | penne.delegates | Signal | A signal that the server can send to update clients.
Attributes:
id: ID for the signal
name: Name of the signal
doc: Documentation for the signal
arg_doc: Documentation for the arguments
| class Signal(Delegate):
"""A signal that the server can send to update clients.
Attributes:
id: ID for the signal
name: Name of the signal
doc: Documentation for the signal
arg_doc: Documentation for the arguments
"""
id: SignalID
name: str
doc: Optional[str] = N... | (*, client: object = None, id: penne.delegates.SignalID, name: str, signals: Optional[dict] = {}, doc: Optional[str] = None, arg_doc: List[penne.delegates.MethodArg] = [], **extra_data: Any) -> None | [
-0.004390934482216835,
-0.024513153359293938,
0.02948629856109619,
-0.02185957133769989,
-0.0019983043894171715,
-0.03778105974197388,
-0.03425532206892967,
0.08543418347835541,
0.006262823008000851,
-0.019428668543696404,
-0.022880179807543755,
0.027519308030605316,
0.02078329399228096,
0... |
727,084 | penne.delegates | SignalID | ID specific to signals | class SignalID(ID):
"""ID specific to signals"""
pass
| (slot: int, gen: int) | [
-0.0005392480525188148,
-0.01944330893456936,
-0.0062843551859259605,
0.009148770943284035,
-0.0019215458305552602,
-0.04465017095208168,
-0.02433885633945465,
0.06152418628334999,
0.02168276160955429,
-0.0290781632065773,
-0.05197613313794136,
0.033053625375032425,
0.015493886545300484,
0... |
727,096 | penne.delegates | SpotLight | Spotlight information for a light delegate
Attributes:
range (float): Range of light, -1 defaults to infinite
inner_cone_angle_rad (float): Inner cone angle of light
outer_cone_angle_rad (float): Outer cone angle of light
| class SpotLight(NoodleObject):
"""Spotlight information for a light delegate
Attributes:
range (float): Range of light, -1 defaults to infinite
inner_cone_angle_rad (float): Inner cone angle of light
outer_cone_angle_rad (float): Outer cone angle of light
"""
range: float = -1.0... | (*, range: float = -1.0, inner_cone_angle_rad: float = 0.0, outer_cone_angle_rad: float = 0.7853981633974483, **extra_data: Any) -> None | [
0.03396585211157799,
-0.07327333837747574,
0.032978810369968414,
0.012454145587980747,
-0.02049563266336918,
-0.024676045402884483,
-0.05620332434773445,
0.05480985343456268,
-0.05736454948782921,
0.00950753502547741,
-0.03803014010190964,
0.023301929235458374,
-0.005375507287681103,
0.016... |
727,124 | penne.delegates | Table | Object to store tabular data.
Note that this delegate doesn't store any actual data. Delegates are meant to subclass and add functionality to
this class. For the client to receive the actual data, they must subscribe to the table. The client will have
access to certain injected methods that allow them to i... | class Table(Delegate):
"""Object to store tabular data.
Note that this delegate doesn't store any actual data. Delegates are meant to subclass and add functionality to
this class. For the client to receive the actual data, they must subscribe to the table. The client will have
access to certain injecte... | (*, client: object = None, id: penne.delegates.TableID, name: Optional[str] = 'Unnamed Table Delegate', signals: Optional[dict] = {}, meta: Optional[str] = None, methods_list: Optional[List[penne.delegates.MethodID]] = None, signals_list: Optional[List[penne.delegates.SignalID]] = None, tbl_subscribe: Optional[penne.de... | [
0.0012923660688102245,
-0.044518209993839264,
-0.02651631087064743,
-0.017697812989354134,
-0.010916692204773426,
-0.04901868477463722,
-0.046788718551397324,
0.05720873922109604,
-0.03659169748425484,
-0.06207411736249924,
-0.05428951233625412,
0.02379980869591236,
-0.00353753543458879,
0... |
727,131 | penne.delegates | __init__ | Override init to link default values with methods | def __init__(self, **kwargs):
"""Override init to link default values with methods"""
super().__init__(**kwargs)
self.signals = {
"noo::tbl_reset": self._reset_table,
"noo::tbl_rows_removed": self._remove_rows,
"noo::tbl_updated": self._update_rows,
"noo::tbl_selection_update... | (self, **kwargs) | [
-0.0619606152176857,
-0.011001366190612316,
0.039267297834157944,
-0.030155444517731667,
-0.034183844923973083,
-0.03619804233312607,
-0.051371678709983826,
0.0661424770951271,
0.0299827978014946,
-0.04327651485800743,
-0.03259166702628136,
0.06591228395700455,
0.034356489777565,
0.0186840... |
727,145 | penne.delegates | _on_table_init | Creates table from server response info
Args:
init_info (Message Obj):
Server response to subscribe which has columns, keys, data,
and possibly selections
| def _on_table_init(self, init_info: dict, callback=None):
"""Creates table from server response info
Args:
init_info (Message Obj):
Server response to subscribe which has columns, keys, data,
and possibly selections
"""
init = TableInitData(**init_info)
logging.info... | (self, init_info: dict, callback=None) | [
-0.0026121786795556545,
0.02332906424999237,
-0.024554021656513214,
-0.08205395191907883,
0.019142264500260353,
0.01456238143146038,
0.010960637591779232,
0.07751977443695068,
-0.04625590145587921,
0.020513487979769707,
0.013410555198788643,
0.05598244071006775,
0.007834251038730145,
-0.04... |
727,146 | penne.delegates | _remove_rows | Removes rows from table
Method is linked to 'tbl_rows_removed' signal
Args:
keys (list): list of keys corresponding to rows to be removed
| def _remove_rows(self, keys: List[int]):
"""Removes rows from table
Method is linked to 'tbl_rows_removed' signal
Args:
keys (list): list of keys corresponding to rows to be removed
"""
logging.info(f"Removed Rows: {keys}...\n")
| (self, keys: List[int]) | [
-0.03700931370258331,
-0.0012878658017143607,
-0.071087546646595,
-0.01040004100650549,
-0.03383103013038635,
-0.013543006964027882,
-0.035190630704164505,
0.09217014163732529,
0.033442575484514236,
-0.03079400770366192,
-0.04915740713477135,
0.024207904934883118,
0.015070347115397453,
-0.... |
727,147 | penne.delegates | _reset_table | Reset dataframe and selections to blank objects
Method is linked to 'tbl_reset' signal
| def _reset_table(self, init_info: dict = None):
"""Reset dataframe and selections to blank objects
Method is linked to 'tbl_reset' signal
"""
self.selections = {}
if init_info:
init = TableInitData(**init_info)
logging.info(f"Table Reset and Initialized with cols: {init.columns} and ... | (self, init_info: Optional[dict] = None) | [
0.006002672016620636,
0.005251219496130943,
0.01389291975647211,
-0.07138796150684357,
-0.057539768517017365,
-0.03052327409386635,
-0.012497366406023502,
0.02515575662255287,
-0.023420261219143867,
0.010180388577282429,
-0.039612267166376114,
0.003292076289653778,
-0.0016471564304083586,
... |
727,148 | penne.delegates | _update_rows | Update rows in table
Method is linked to 'tbl_updated' signal
Args:
keys (list):
list of keys to update
rows (list):
list of rows containing the values for each new row
| def _update_rows(self, keys: List[int], rows: list):
"""Update rows in table
Method is linked to 'tbl_updated' signal
Args:
keys (list):
list of keys to update
rows (list):
list of rows containing the values for each new row
"""
logging.info(f"Updated Rows...... | (self, keys: List[int], rows: list) | [
-0.013991225510835648,
-0.05287136510014534,
-0.07188958674669266,
0.02705087512731552,
-0.030232295393943787,
-0.01497553288936615,
-0.023183953016996384,
0.05705466866493225,
0.013885763473808765,
-0.012734475545585155,
-0.0546993650496006,
-0.01958068460226059,
0.025908375158905983,
0.0... |
727,149 | penne.delegates | _update_selection | Change selection in delegate's state to new selection object
Method is linked to 'tbl_selection_updated' signal
Args:
selection (Selection):
obj with new selections to replace obj with same name
| def _update_selection(self, selection: dict):
"""Change selection in delegate's state to new selection object
Method is linked to 'tbl_selection_updated' signal
Args:
selection (Selection):
obj with new selections to replace obj with same name
"""
self.selections.setdefault(sele... | (self, selection: dict) | [
-0.003542076563462615,
-0.04750964418053627,
-0.018908696249127388,
0.03127953037619591,
-0.06470897793769836,
-0.021217213943600655,
-0.004991508089005947,
0.05364219471812248,
0.014379773288965225,
-0.0234376210719347,
-0.009242881089448929,
-0.005661154631525278,
0.00527787022292614,
0.... |
727,157 | penne.delegates | on_new | Handler when create message is received
Args:
message (Message): create message with the table's info
| def on_new(self, message: dict):
"""Handler when create message is received
Args:
message (Message): create message with the table's info
"""
# Check contents
methods = self.methods_list
signals = self.signals_list
# Inject methods and signals if applicable
if methods:
in... | (self, message: dict) | [
0.002328796312212944,
0.004424039274454117,
-0.011444113217294216,
-0.09572093188762665,
-0.003480843035504222,
-0.049225855618715286,
-0.006005015689879656,
0.07258118689060211,
0.009369081817567348,
0.020876074209809303,
-0.036290593445301056,
0.048255711793899536,
-0.009656531736254692,
... |
727,159 | penne.delegates | on_update | Handler when update message is received
Args:
message (Message): update message with the new table's info
| def on_update(self, message: dict):
"""Handler when update message is received
Args:
message (Message): update message with the new table's info
"""
# Inject methods and signals if applicable
if self.methods_list:
inject_methods(self, self.methods_list)
if self.signals_list:... | (self, message: dict) | [
0.016101105138659477,
-0.03588397055864334,
-0.053517673164606094,
-0.042807094752788544,
0.003492389339953661,
-0.07497406750917435,
-0.020681286230683327,
0.05115712061524391,
0.004348971880972385,
0.03292446956038475,
-0.043828826397657394,
-0.03653576597571373,
-0.001955385785549879,
0... |
727,160 | penne.delegates | relink_signals | Relink the signals for built-in methods
Injecting signals adds them as keys which map to None. The signals must be relinked after injecting.
These should always be linked, along with whatever is injected.
| def relink_signals(self):
"""Relink the signals for built-in methods
Injecting signals adds them as keys which map to None. The signals must be relinked after injecting.
These should always be linked, along with whatever is injected.
"""
self.signals["noo::tbl_reset"] = self._reset_table
self.si... | (self) | [
-0.07252448052167892,
-0.01873549073934555,
0.042672231793403625,
0.02245328575372696,
-0.03043830394744873,
-0.02448616921901703,
-0.061902206391096115,
0.050437480211257935,
0.05340438708662987,
-0.019870974123477936,
-0.039925090968608856,
0.005164621863514185,
0.03824017941951752,
0.02... |
727,161 | penne.delegates | request_clear | Clear the table
User endpoint for interacting with table and invoking method
Args:
callback (function, optional): callback function called when complete
| def request_clear(self, callback=None):
"""Clear the table
User endpoint for interacting with table and invoking method
Args:
callback (function, optional): callback function called when complete
"""
self.tbl_clear(callback=callback)
| (self, callback=None) | [
-0.043507110327482224,
0.011894389986991882,
-0.010409676469862461,
-0.032997339963912964,
-0.012219692580401897,
-0.014063072390854359,
-0.08587983250617981,
0.052215203642845154,
0.00759455980733037,
-0.02455615997314453,
-0.025306858122348785,
-0.025323539972305298,
-0.0037430627271533012... |
727,162 | penne.delegates | request_insert | Add rows to end of table
User endpoint for interacting with table and invoking method
For input, row list is list of rows. Also note that tables have
nine columns by default (x, y, z, r, g, b, sx, sy, sz).
x, y, z -> coordinates
r, g, b -> color values [0, 1]
sx, sy, sz ... | def request_insert(self, row_list: List[List[int]], callback=None):
"""Add rows to end of table
User endpoint for interacting with table and invoking method
For input, row list is list of rows. Also note that tables have
nine columns by default (x, y, z, r, g, b, sx, sy, sz).
x, y, z -> coordinates
... | (self, row_list: List[List[int]], callback=None) | [
-0.003154319478198886,
-0.01047506369650364,
-0.07014843821525574,
-0.0023124113213270903,
-0.005664159543812275,
0.02456284500658512,
-0.044732335954904556,
0.02937375009059906,
-0.060345083475112915,
-0.014795800670981407,
-0.0011329452972859144,
0.009009099565446377,
-0.03207875043153763,... |
727,163 | penne.delegates | request_remove | Remove rows from table by their keys
User endpoint for interacting with table and invoking method
Args:
keys (list):
list of keys for rows to be removed
callback (function, optional):
callback function called when complete
| def request_remove(self, keys: List[int], callback=None):
"""Remove rows from table by their keys
User endpoint for interacting with table and invoking method
Args:
keys (list):
list of keys for rows to be removed
callback (function, optional):
callback function calle... | (self, keys: List[int], callback=None) | [
-0.023870134726166725,
0.013350801542401314,
-0.08333096653223038,
-0.02131323330104351,
-0.03878253325819969,
0.009910138323903084,
-0.049868158996105194,
0.09568646550178528,
0.0309402234852314,
-0.01901373825967312,
-0.019425587728619576,
0.0015176240121945739,
-0.011102787218987942,
-0... |
727,164 | penne.delegates | request_update | Update the table using a DataFrame
User endpoint for interacting with table and invoking method
Args:
keys (list[int]):
list of keys to update
rows (list[list[int]]):
list of new rows to update with
callback (function, optional):
... | def request_update(self, keys: List[int], rows: List[List[int]], callback=None):
"""Update the table using a DataFrame
User endpoint for interacting with table and invoking method
Args:
keys (list[int]):
list of keys to update
rows (list[list[int]]):
list of new rows ... | (self, keys: List[int], rows: List[List[int]], callback=None) | [
0.01707484945654869,
-0.06546960026025772,
-0.07811634242534637,
0.015476538799703121,
-0.04541648179292679,
-0.0017806317191570997,
-0.03615850582718849,
0.04733794555068016,
-0.025468165054917336,
-0.009074562229216099,
-0.03502309322357178,
-0.035372450947761536,
-0.0037927126977592707,
... |
727,165 | penne.delegates | request_update_selection | Update a selection object in the table
User endpoint for interacting with table and invoking method
Args:
name (str):
name of the selection object to be updated
keys (list):
list of keys to be in new selection
callback (function, opti... | def request_update_selection(self, name: str, keys: List[int], callback=None):
"""Update a selection object in the table
User endpoint for interacting with table and invoking method
Args:
name (str):
name of the selection object to be updated
keys (list):
list of keys... | (self, name: str, keys: List[int], callback=None) | [
0.008559527806937695,
-0.05418432876467705,
-0.08928966522216797,
0.010146553628146648,
-0.014612770639359951,
0.007640267722308636,
0.0002554253733251244,
0.02698809653520584,
0.016728803515434265,
-0.0037008903454989195,
-0.006317746825516224,
-0.04062090069055557,
-0.009383393451571465,
... |
727,166 | penne.delegates | show_methods | Show methods available on the table | def show_methods(self):
"""Show methods available on the table"""
if self.methods_list is None:
message = "No methods available"
else:
message = f"-- Methods on {self.name} --\n--------------------------------------\n"
for method_id in self.methods_list:
method = self.cli... | (self) | [
-0.0009469707729294896,
-0.09094540029764175,
0.06781080365180969,
-0.053727298974990845,
0.015323502942919731,
-0.05166364833712578,
0.011730218306183815,
0.0003190510906279087,
0.0216321162879467,
0.02291737124323845,
-0.03088233433663845,
0.01917021907866001,
0.003697372041642666,
-0.02... |
727,167 | penne.delegates | subscribe | Subscribe to this delegate's table
Calls on_table_init as callback
Args:
callback (Callable): function to be called after table is subscribed to and initialized
Raises:
Exception: Could not subscribe to table
| def subscribe(self, callback: Callable = None):
"""Subscribe to this delegate's table
Calls on_table_init as callback
Args:
callback (Callable): function to be called after table is subscribed to and initialized
Raises:
Exception: Could not subscribe to table
"""
try:
#... | (self, callback: Optional[Callable] = None) | [
-0.06471392512321472,
0.02270117774605751,
0.012046831659972668,
-0.003994234371930361,
0.012184247374534607,
0.0018631363054737449,
0.008904578164219856,
0.05925391986966133,
0.005056920927017927,
-0.018606171011924744,
0.007090682163834572,
0.039392679929733276,
0.03433575853705406,
-0.0... |
727,168 | penne.delegates | TableColumnInfo | Information about a column in a table
Attributes:
name (str): Name of column
type (ColumnType): Type data in the column
| class TableColumnInfo(NoodleObject):
"""Information about a column in a table
Attributes:
name (str): Name of column
type (ColumnType): Type data in the column
"""
name: str
type: ColumnType
| (*, name: str, type: penne.delegates.ColumnType, **extra_data: Any) -> None | [
0.020785124972462654,
0.025553924962878227,
0.035395510494709015,
-0.034388553351163864,
0.05247579142451286,
-0.053995728492736816,
-0.006621221546083689,
0.024774957448244095,
-0.04651004448533058,
-0.03902435675263405,
-0.028232812881469727,
0.008487893268465996,
-0.0007670927443541586,
... |
727,196 | penne.delegates | TableID | ID specific to tables | class TableID(ID):
"""ID specific to tables"""
pass
| (slot: int, gen: int) | [
-0.007687895093113184,
-0.0011481060646474361,
-0.023121090605854988,
-0.01239954587072134,
0.005665461998432875,
-0.026848020032048225,
0.00025956580066122115,
0.0332067608833313,
-0.02494039759039879,
-0.03991876542568207,
-0.05560366064310074,
0.019623782485723495,
-0.025540944188833237,
... |
727,208 | penne.delegates | TableInitData | Init data to create a table
Attributes:
columns (List[TableColumnInfo]): List of column information
keys (List[int]): List of column indices that are keys
data (List[List[Any]]): List of rows of data
selections (Optional[List[Selection]]): List of selections to apply to table
| class TableInitData(NoodleObject):
"""Init data to create a table
Attributes:
columns (List[TableColumnInfo]): List of column information
keys (List[int]): List of column indices that are keys
data (List[List[Any]]): List of rows of data
selections (Optional[List[Selection]]): L... | (*, columns: List[penne.delegates.TableColumnInfo], keys: List[int], data: List[List[Any]], selections: Optional[List[penne.delegates.Selection]] = None, **extra_data: Any) -> None | [
0.02076667547225952,
-0.014247813262045383,
-0.007704553660005331,
-0.008831691928207874,
-0.012715685181319714,
-0.02545088715851307,
-0.001630935468710959,
-0.007772865239530802,
-0.043797384947538376,
-0.02617303654551506,
-0.0001443993824068457,
0.03456558287143707,
-0.012696167454123497... |
727,236 | penne.delegates | TextRepresentation | Text representation for an entity
Attributes:
txt (str): Text to display
font (str): Font to use
height (Optional[float]): Height of text
width (Optional[float]): Width of text
| class TextRepresentation(NoodleObject):
"""Text representation for an entity
Attributes:
txt (str): Text to display
font (str): Font to use
height (Optional[float]): Height of text
width (Optional[float]): Width of text
"""
txt: str
font: Optional[str] = "Arial"
... | (*, txt: str, font: Optional[str] = 'Arial', height: Optional[float] = 0.25, width: Optional[float] = -1.0, **extra_data: Any) -> None | [
0.04624965414404869,
-0.019349344074726105,
0.027081822976469994,
-0.0011787036200985312,
0.027245184406638145,
-0.05739458650350571,
-0.05078749358654022,
0.02259843796491623,
0.06806758046150208,
-0.007605418097227812,
0.012197710573673248,
0.0056405337527394295,
-0.04730243235826492,
0.... |
727,264 | penne.delegates | Texture | A texture, can be used for a material
This is like a wrapping paper that is applied to a mesh. The image specifies the pattern, and
the sampler specifies which part of the image should be applied to each part of the mesh.
Attributes:
id: ID for the texture
name: Name of the texture
... | class Texture(Delegate):
"""A texture, can be used for a material
This is like a wrapping paper that is applied to a mesh. The image specifies the pattern, and
the sampler specifies which part of the image should be applied to each part of the mesh.
Attributes:
id: ID for the texture
n... | (*, client: object = None, id: penne.delegates.TextureID, name: Optional[str] = 'Unnamed Texture Delegate', signals: Optional[dict] = {}, image: penne.delegates.ImageID, sampler: Optional[penne.delegates.SamplerID] = None, **extra_data: Any) -> None | [
0.024851011112332344,
-0.045193735510110855,
0.007834073156118393,
0.0029008244164288044,
-0.032925281673669815,
-0.0007373313419520855,
-0.06119446083903313,
0.07061751931905746,
0.005122634116560221,
-0.003402001690119505,
0.04293959215283394,
0.06777212768793106,
0.0021040213759988546,
... |
727,295 | penne.delegates | TextureID | ID specific to textures | class TextureID(ID):
"""ID specific to textures"""
pass
| (slot: int, gen: int) | [
0.01572195068001747,
-0.07619719952344894,
-0.04523760452866554,
0.014708499424159527,
-0.015596390701830387,
-0.014726436696946621,
-0.02952462248504162,
0.04986540228128433,
-0.004251115024089813,
-0.01842149905860424,
-0.002279144711792469,
0.04735419526696205,
-0.018475310876965523,
0.... |
727,307 | penne.delegates | TextureRef | Reference to a texture
Attributes:
texture (TextureID): Texture to reference
transform (Optional[Mat3]): Transform to apply to texture
texture_coord_slot (Optional[int]): Texture coordinate slot to use
| class TextureRef(NoodleObject):
"""Reference to a texture
Attributes:
texture (TextureID): Texture to reference
transform (Optional[Mat3]): Transform to apply to texture
texture_coord_slot (Optional[int]): Texture coordinate slot to use
"""
texture: TextureID
transform: Opti... | (*, texture: penne.delegates.TextureID, transform: Optional[List[float]] = [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0], texture_coord_slot: Optional[int] = 0.0, **extra_data: Any) -> None | [
0.040970802307128906,
-0.06256606429815292,
-0.017447391524910927,
0.012283716350793839,
-0.023532815277576447,
0.002659433986991644,
-0.048119060695171356,
0.05383766442537308,
-0.012923297472298145,
-0.018181027844548225,
0.016224663704633713,
0.03630562499165535,
-0.012885674834251404,
... |
727,335 | penne.delegates | WebRepresentation | Web page with a given URL rendered as a plane
Attributes:
source (str): URL for entity
height (Optional[float]): Height of plane
width (Optional[float]): Width of plane
| class WebRepresentation(NoodleObject):
"""Web page with a given URL rendered as a plane
Attributes:
source (str): URL for entity
height (Optional[float]): Height of plane
width (Optional[float]): Width of plane
"""
source: str
height: Optional[float] = .5
width: Optional... | (*, source: str, height: Optional[float] = 0.5, width: Optional[float] = 0.5, **extra_data: Any) -> None | [
-0.005695838946849108,
-0.003632850479334593,
-0.0581979937851429,
-0.011898376978933811,
0.007831213064491749,
-0.0016863574273884296,
-0.05247953534126282,
0.014440920203924179,
-0.044480931013822556,
0.041295964270830154,
0.03930536285042763,
0.0560988113284111,
-0.003033407498151064,
0... |
727,365 | pydantic.functional_validators | field_validator | Usage docs: https://docs.pydantic.dev/dev-v2/usage/validators/#field-validators
Decorate methods on the class indicating that they should be used to validate fields.
Args:
__field: The first field the `field_validator` should be called on; this is separate
from `fields` to ensure an error ... | def field_validator(
__field: str,
*fields: str,
mode: FieldValidatorModes = 'after',
check_fields: bool | None = None,
) -> Callable[[Any], Any]:
"""Usage docs: https://docs.pydantic.dev/dev-v2/usage/validators/#field-validators
Decorate methods on the class indicating that they should be used... | (__field: str, *fields: str, mode: Literal['before', 'after', 'wrap', 'plain'] = 'after', check_fields: Optional[bool] = None) -> Callable[[Any], Any] | [
0.04346055909991264,
0.00042495341040194035,
0.004834645893424749,
0.03047706000506878,
0.02651367522776127,
0.014428281225264072,
0.043772947043180466,
-0.05607310310006142,
-0.013686367310583591,
0.0026894393377006054,
0.03229279816150665,
0.0008297726162709296,
0.09223166853189468,
0.00... |
727,366 | penne.delegates | get_context | Helper to get context from delegate
Args:
delegate (Delegate): delegate to get context for, can be Entity, Table, or Plot
Returns:
context (dict): context for delegate, None if not found indicating document
| def get_context(delegate: Delegate):
"""Helper to get context from delegate
Args:
delegate (Delegate): delegate to get context for, can be Entity, Table, or Plot
Returns:
context (dict): context for delegate, None if not found indicating document
"""
if isinstance(delegate, Entit... | (delegate: penne.delegates.Delegate) | [
-0.027764972299337387,
-0.022369276732206345,
0.05505439266562462,
-0.00722474604845047,
-0.02169252745807171,
-0.008797728456556797,
0.047116316854953766,
0.0700891837477684,
0.04422641918063164,
0.003589509753510356,
-0.0005658622249029577,
-0.03579450026154518,
-0.03252050280570984,
-0.... |
727,368 | penne.delegates | inject_methods | Inject methods into a delegate class
Idea is to inject a method that is from the server to put into a delegate.
Now it looks like the delegate has an instance method that actually calls what
is on the server. Context, is automatically taken care of. This should mostly be
called on_new or on_update for ... | def inject_methods(delegate: Delegate, methods: List[MethodID]):
"""Inject methods into a delegate class
Idea is to inject a method that is from the server to put into a delegate.
Now it looks like the delegate has an instance method that actually calls what
is on the server. Context, is automatically ... | (delegate: penne.delegates.Delegate, methods: List[penne.delegates.MethodID]) | [
-0.027734458446502686,
-0.04180004820227623,
0.019349202513694763,
-0.033486925065517426,
-0.037075452506542206,
-0.015219690278172493,
0.004294062498956919,
0.05554104968905449,
0.04237709939479828,
0.06762302666902542,
-0.035218074917793274,
0.014967231079936028,
0.0005223879124969244,
0... |
727,369 | penne.delegates | inject_signals | Method to inject signals into delegate
Idea is to inject a signal that is from the server to put into a delegate. These signals are stored in a dict
that can be used to map the signal name to a callable response that handles the signal and its args.
Args:
delegate (Delegate):
delegate ... | def inject_signals(delegate: Delegate, signals: List[SignalID]):
"""Method to inject signals into delegate
Idea is to inject a signal that is from the server to put into a delegate. These signals are stored in a dict
that can be used to map the signal name to a callable response that handles the signal and... | (delegate: penne.delegates.Delegate, signals: List[penne.delegates.SignalID]) | [
-0.07558563351631165,
-0.058297429233789444,
-0.004701258148998022,
-0.015396734699606895,
-0.04839234799146652,
0.021345265209674835,
-0.0324016734957695,
0.07280782610177994,
0.02211281843483448,
0.04338498413562775,
-0.03231029957532883,
0.07452567666769028,
-0.03994927182793617,
0.0166... |
727,371 | pydantic.functional_validators | model_validator | Decorate model methods for validation purposes.
Args:
mode: A required string literal that specifies the validation mode.
It can be one of the following: 'wrap', 'before', or 'after'.
Returns:
A decorator that can be used to decorate a function to be used as a model validator.
| def model_validator(
*,
mode: Literal['wrap', 'before', 'after'],
) -> Any:
"""Decorate model methods for validation purposes.
Args:
mode: A required string literal that specifies the validation mode.
It can be one of the following: 'wrap', 'before', or 'after'.
Returns:
... | (*, mode: Literal['wrap', 'before', 'after']) -> Any | [
0.07679063081741333,
0.0031703361310064793,
0.00825077760964632,
-0.01766079105436802,
0.0447535514831543,
-0.018863938748836517,
0.025643715634942055,
-0.014016222208738327,
0.01093370746821165,
-0.0199704822152853,
-0.00182557781226933,
-0.024133196100592613,
0.0418730266392231,
0.000482... |
727,376 | openunmix | umx |
Open Unmix 2-channel/stereo BiLSTM Model trained on MUSDB18
Args:
targets (str): select the targets for the source to be separated.
a list including: ['vocals', 'drums', 'bass', 'other'].
If you don't pick them all, you probably want to
activate the `res... | def umx(
targets=None,
residual=False,
niter=1,
device="cpu",
pretrained=True,
wiener_win_len=300,
filterbank="torch",
):
"""
Open Unmix 2-channel/stereo BiLSTM Model trained on MUSDB18
Args:
targets (str): select the targets for the source to be separated.
... | (targets=None, residual=False, niter=1, device='cpu', pretrained=True, wiener_win_len=300, filterbank='torch') | [
-0.0016341304872184992,
-0.03508790209889412,
-0.010603487491607666,
-0.00026982088456861675,
0.004243690054863691,
0.0017661002930253744,
-0.061913348734378815,
-0.00918509904295206,
-0.020270561799407005,
0.007766710128635168,
-0.014082900248467922,
0.02260241098701954,
-0.0000192396200873... |
727,377 | openunmix | umx_spec | null | def umx_spec(targets=None, device="cpu", pretrained=True):
from .model import OpenUnmix
# set urls for weights
target_urls = {
"bass": "https://zenodo.org/records/3370486/files/bass-646024d3.pth",
"drums": "https://zenodo.org/records/3370486/files/drums-5a48008b.pth",
"other": "http... | (targets=None, device='cpu', pretrained=True) | [
0.061404600739479065,
-0.05660678446292877,
-0.038010600954294205,
-0.04005618020892143,
-0.01978633925318718,
-0.008912221528589725,
-0.043403495103120804,
-0.016327450051903725,
-0.07148373126983643,
0.041952989995479584,
0.007652329746633768,
0.027578141540288925,
-0.0329524390399456,
0... |
727,378 | openunmix | umxhq |
Open Unmix 2-channel/stereo BiLSTM Model trained on MUSDB18-HQ
Args:
targets (str): select the targets for the source to be separated.
a list including: ['vocals', 'drums', 'bass', 'other'].
If you don't pick them all, you probably want to
activate the `... | def umxhq(
targets=None,
residual=False,
niter=1,
device="cpu",
pretrained=True,
wiener_win_len=300,
filterbank="torch",
):
"""
Open Unmix 2-channel/stereo BiLSTM Model trained on MUSDB18-HQ
Args:
targets (str): select the targets for the source to be separated.
... | (targets=None, residual=False, niter=1, device='cpu', pretrained=True, wiener_win_len=300, filterbank='torch') | [
-0.002838154323399067,
-0.06760629266500473,
-0.06818848103284836,
-0.034512683749198914,
-0.008841942995786667,
-0.00021149708481971174,
-0.049012742936611176,
0.010897785425186157,
-0.045483242720365524,
-0.0030200874898582697,
0.0085144629701972,
0.027835745364427567,
0.013917872682213783... |
727,379 | openunmix | umxhq_spec | null | def umxhq_spec(targets=None, device="cpu", pretrained=True):
from .model import OpenUnmix
# set urls for weights
target_urls = {
"bass": "https://zenodo.org/records/3370489/files/bass-8d85a5bd.pth",
"drums": "https://zenodo.org/records/3370489/files/drums-9619578f.pth",
"other": "ht... | (targets=None, device='cpu', pretrained=True) | [
0.05820789933204651,
-0.07432758063077927,
-0.07491777092218399,
-0.052711717784404755,
-0.025728777050971985,
-0.008691531606018543,
-0.04164557531476021,
-0.0070684971287846565,
-0.07938111573457718,
0.03991188108921051,
0.012043649330735207,
0.02777601219713688,
-0.03207336366176605,
0.... |
727,380 | openunmix | umxl |
Open Unmix Extra (UMX-L), 2-channel/stereo BLSTM Model trained on a private dataset
of ~400h of multi-track audio.
Args:
targets (str): select the targets for the source to be separated.
a list including: ['vocals', 'drums', 'bass', 'other'].
If you don't pick them... | def umxl(
targets=None,
residual=False,
niter=1,
device="cpu",
pretrained=True,
wiener_win_len=300,
filterbank="torch",
):
"""
Open Unmix Extra (UMX-L), 2-channel/stereo BLSTM Model trained on a private dataset
of ~400h of multi-track audio.
Args:
targets (str): sel... | (targets=None, residual=False, niter=1, device='cpu', pretrained=True, wiener_win_len=300, filterbank='torch') | [
-0.0089234858751297,
-0.033013228327035904,
-0.02741309627890587,
0.006770648993551731,
0.0033738489728420973,
-0.013991144485771656,
-0.05640524625778198,
-0.0239428523927927,
-0.046563707292079926,
0.013229159638285637,
0.011558301746845245,
-0.010952386073768139,
0.017479751259088516,
0... |
727,381 | openunmix | umxl_spec | null | def umxl_spec(targets=None, device="cpu", pretrained=True):
from .model import OpenUnmix
# set urls for weights
target_urls = {
"bass": "https://zenodo.org/records/5069601/files/bass-2ca1ce51.pth",
"drums": "https://zenodo.org/records/5069601/files/drums-69e0ebd4.pth",
"other": "htt... | (targets=None, device='cpu', pretrained=True) | [
0.06611879914999008,
-0.05059428513050079,
-0.04940295219421387,
-0.04787656292319298,
-0.026041721925139427,
-0.01866106316447258,
-0.04407919943332672,
-0.017795488238334656,
-0.08376537263393402,
0.03765718638896942,
0.014482101425528526,
0.01074988953769207,
-0.024720091372728348,
0.04... |
727,382 | openunmix | umxse |
Open Unmix Speech Enhancemennt 1-channel BiLSTM Model
trained on the 28-speaker version of Voicebank+Demand
(Sampling rate: 16kHz)
Args:
targets (str): select the targets for the source to be separated.
a list including: ['speech', 'noise'].
If you don't pick th... | def umxse(targets=None, residual=False, niter=1, device="cpu", pretrained=True, filterbank="torch", wiener_win_len=300):
"""
Open Unmix Speech Enhancemennt 1-channel BiLSTM Model
trained on the 28-speaker version of Voicebank+Demand
(Sampling rate: 16kHz)
Args:
targets (str): select the tar... | (targets=None, residual=False, niter=1, device='cpu', pretrained=True, filterbank='torch', wiener_win_len=300) | [
-0.0052090659737586975,
-0.05610187351703644,
0.011005586013197899,
-0.012281463481485844,
-0.006374795455485582,
0.012556832283735275,
-0.0443895049393177,
-0.02432427369058132,
0.011427818797528744,
0.012171315960586071,
0.008196821436285973,
0.012437505647540092,
0.016724085435271263,
0... |
727,383 | openunmix | umxse_spec | null | def umxse_spec(targets=None, device="cpu", pretrained=True):
target_urls = {
"speech": "https://zenodo.org/records/3786908/files/speech_f5e0d9f9.pth",
"noise": "https://zenodo.org/records/3786908/files/noise_04a6fc2d.pth",
}
from .model import OpenUnmix
if targets is None:
targ... | (targets=None, device='cpu', pretrained=True) | [
0.0542677640914917,
-0.05978278070688248,
0.004131666850298643,
-0.04180382564663887,
-0.000726143887732178,
-0.012123845517635345,
-0.04242886230349541,
-0.01941285841166973,
-0.0053909290581941605,
0.04253916069865227,
0.015589114278554916,
0.020093044266104698,
-0.02742801606655121,
0.0... |
727,414 | d8s_lists.iterables | cycle | Cycle through the iterable as much as needed. | def cycle(iterable: Iterable[Any], length: Optional[int] = None) -> Iterator[Any]:
"""Cycle through the iterable as much as needed."""
full_cycle = itertools.cycle(iterable)
if length:
for index, item in enumerate(full_cycle):
yield item
if index == length - 1:
... | (iterable: Iterable[Any], length: Optional[int] = None) -> Iterator[Any] | [
-0.01792985387146473,
-0.027719449251890182,
-0.052494924515485764,
-0.0325610414147377,
-0.0449044443666935,
0.04940907657146454,
-0.00974525697529316,
0.020217640325427055,
0.03286253288388252,
0.001780127757228911,
-0.006295843981206417,
-0.0031412714160978794,
0.02821602299809456,
0.05... |
727,418 | d8s_lists.iterables | duplicates | Find duplicates in the given iterable. | def duplicates(iterable: Sequence) -> Iterator[Sequence]:
"""Find duplicates in the given iterable."""
for item in iterable:
if iterable.count(item) > 1:
yield item
| (iterable: Sequence) -> Iterator[Sequence] | [
-0.03570118173956871,
-0.07076358050107956,
-0.02150588110089302,
0.004999407567083836,
-0.0011123348958790302,
0.030342455953359604,
0.000562821514904499,
0.026633935049176216,
0.07381556928157806,
-0.00015304308908525854,
-0.017007745802402496,
-0.02578221634030342,
-0.005735788960009813,
... |
727,419 | d8s_lists.iterables | flatten | Flatten all items in the iterable so that they are all items in the same list. | def flatten(iterable: Iterable[Any], level: int = None, **kwargs) -> Iterator[Any]:
"""Flatten all items in the iterable so that they are all items in the same list."""
import more_itertools
return more_itertools.collapse(iterable, levels=level, **kwargs)
| (iterable: Iterable[Any], level: Optional[int] = None, **kwargs) -> Iterator[Any] | [
-0.07659907639026642,
-0.029114019125699997,
0.03307848051190376,
-0.015831300988793373,
-0.00429852120578289,
-0.023804472759366035,
0.007597077637910843,
-0.0204948540776968,
0.04902482405304909,
0.04739656299352646,
-0.02651234157383442,
-0.018087858334183693,
-0.012902201153337955,
0.0... |
727,421 | d8s_lists.iterables | iterable_all_items_of_types | Return True if all items in the iterable are of a type given in item_types. Otherwise, return False. | def iterable_all_items_of_types(iterable: Iterable[Any], item_types: Iterable[type]) -> bool:
"""Return True if all items in the iterable are of a type given in item_types. Otherwise, return False."""
for i in iterable:
if type(i) not in item_types:
return False
return True
| (iterable: Iterable[Any], item_types: Iterable[type]) -> bool | [
0.00008822400559438393,
-0.01854897290468216,
-0.07272811979055405,
0.006880182772874832,
-0.009852421469986439,
0.010999118909239769,
-0.03276801481842995,
-0.006013279780745506,
-0.0016867914237082005,
0.044400110840797424,
0.013879621401429176,
0.03085991181433201,
0.039079438894987106,
... |
727,422 | d8s_lists.iterables | iterable_count | Count each item in the iterable. | def iterable_count(iterable: Iterable[Any]) -> Dict[Any, int]:
"""Count each item in the iterable."""
counter: Counter = Counter()
counter.update(iterable)
count = dict_sort_by_values(counter)
return count
| (iterable: Iterable[Any]) -> Dict[Any, int] | [
-0.032876886427402496,
-0.05486395210027695,
-0.054310817271471024,
0.011589880101382732,
0.0583210363984108,
0.035573411732912064,
-0.01804598793387413,
0.031148342415690422,
0.04027504846453667,
-0.013214710168540478,
-0.03826994076371193,
0.004401302430778742,
-0.00345924636349082,
-0.0... |
727,423 | d8s_lists.iterables | iterable_has_all_items_of_type | Return whether or not all iterable in iterable are of the type specified by the type_arg. | def iterable_has_all_items_of_type(iterable: Iterable[Any], type_arg: type) -> bool:
"""Return whether or not all iterable in iterable are of the type specified by the type_arg."""
for i in iterable:
if type(i) != type_arg:
return False
return True
| (iterable: Iterable[Any], type_arg: type) -> bool | [
-0.015245801769196987,
-0.014357521198689938,
-0.06856078654527664,
0.015708070248365402,
-0.005764762405306101,
0.025125661864876747,
-0.018155375495553017,
-0.006743683945387602,
-0.0019487796816974878,
0.009852667339146137,
0.0183729138225317,
0.018998336046934128,
0.042927537113428116,
... |
727,424 | d8s_lists.iterables | iterable_has_mixed_types | Return whether or not the iterable has items with two or more types. | def iterable_has_mixed_types(iterable: Iterable[Any]) -> bool:
"""Return whether or not the iterable has items with two or more types."""
return len(tuple(deduplicate(types(iterable)))) >= 2
| (iterable: Iterable[Any]) -> bool | [
-0.01844768598675728,
0.00871287565678358,
-0.033952903002500534,
0.05166056752204895,
0.009391228668391705,
0.020808707922697067,
-0.03407623991370201,
0.005990652367472649,
0.002114347880706191,
0.022271132096648216,
0.037459198385477066,
0.016729777678847313,
0.02857893705368042,
-0.034... |
727,425 | d8s_lists.iterables | iterable_has_single_item | Return whether the iterable has a single item in it. | def iterable_has_single_item(iterable: Iterable[Any]) -> bool:
"""Return whether the iterable has a single item in it."""
iterable = deduplicate(iterable)
result = len(tuple(iterable)) == 1
return result
| (iterable: Iterable[Any]) -> bool | [
-0.005117151420563459,
-0.045168355107307434,
-0.052943531423807144,
0.033722568303346634,
0.027267364785075188,
0.008706389926373959,
-0.01463722251355648,
0.01093045249581337,
0.022891568019986153,
0.009429662488400936,
0.00010870274127228186,
-0.0017697568982839584,
-0.0076757268980145454... |
727,426 | d8s_lists.iterables | iterable_has_single_type | Return whether or not the iterable has items of only one type. | def iterable_has_single_type(iterable: Iterable[Any]) -> bool:
"""Return whether or not the iterable has items of only one type."""
return len(tuple(deduplicate(types(iterable)))) == 1
| (iterable: Iterable[Any]) -> bool | [
-0.014058934524655342,
-0.0055574458092451096,
-0.041162241250276566,
0.02521911822259426,
0.01971149444580078,
0.02425890788435936,
-0.014865148812532425,
0.01654098741710186,
0.005403449758887291,
0.025871338322758675,
0.010335853323340416,
-0.005811086390167475,
0.02434949390590191,
-0.... |
727,427 | d8s_lists.iterables | iterable_item_index | Find the given item in the iterable. Return -1 if the item is not found. | def iterable_item_index(iterable: Sequence, item: Any) -> int:
"""Find the given item in the iterable. Return -1 if the item is not found."""
try:
return iterable.index(item)
except ValueError:
return -1
| (iterable: Sequence, item: Any) -> int | [
0.02247016131877899,
-0.03993159905076027,
-0.017262818291783333,
0.03920619934797287,
-0.005604586564004421,
-0.04314408823847771,
0.021917473524808884,
0.03077773004770279,
0.037029996514320374,
-0.05361058935523033,
-0.03758268058300018,
0.013912155292928219,
-0.01029378641396761,
-0.04... |
727,428 | d8s_lists.iterables | iterable_item_indexes | Find the given item in the iterable. Return -1 if the item is not found. | def iterable_item_indexes(iterable: Iterable[Any], item: Any) -> Iterator[int]:
"""Find the given item in the iterable. Return -1 if the item is not found."""
indexes = (index for index, value in enumerate(iterable) if value == item)
return indexes
| (iterable: Iterable[Any], item: Any) -> Iterator[int] | [
0.0033978624269366264,
-0.0644296333193779,
-0.02040916681289673,
0.023980772122740746,
0.009509616531431675,
-0.022485272958874702,
0.007143208757042885,
0.05236007273197174,
0.028432082384824753,
-0.047820791602134705,
-0.02756997011601925,
0.009993454441428185,
-0.015174919739365578,
-0... |
727,429 | d8s_lists.iterables | iterable_item_of_types | Return True if the iterable has any item that is of the item_types. Otherwise, return False. | def iterable_item_of_types(iterable: Iterable[Any], item_types: Iterable[type]) -> bool:
"""Return True if the iterable has any item that is of the item_types. Otherwise, return False."""
for i in iterable:
if type(i) in item_types:
return True
return False
| (iterable: Iterable[Any], item_types: Iterable[type]) -> bool | [
0.011226601898670197,
-0.04191264510154724,
-0.07035337388515472,
0.006165503524243832,
0.004358294419944286,
0.022161129862070084,
-0.015735497698187828,
0.012522680684924126,
0.003308652900159359,
0.04173010215163231,
0.023986592888832092,
0.04260632395744324,
0.03855379298329353,
0.0072... |
727,430 | d8s_lists.iterables | iterable_replace | Replace all instances of the old_value with the new_value in the given iterable. | def iterable_replace(iterable: Iterable[Any], old_value: Any, new_value: Any) -> Iterator[Any]:
"""Replace all instances of the old_value with the new_value in the given iterable."""
for value in iterable:
if value == old_value:
yield new_value
else:
yield value
| (iterable: Iterable[Any], old_value: Any, new_value: Any) -> Iterator[Any] | [
0.043824758380651474,
-0.06540002673864365,
-0.06720978766679764,
-0.018629956990480423,
-0.06298699975013733,
-0.005340587813407183,
-0.009625478647649288,
0.03960196673870087,
0.1068117618560791,
-0.008219360373914242,
-0.04989280179142952,
-0.03225644305348396,
-0.0003360045957379043,
0... |
727,431 | d8s_lists.iterables | iterable_sort_by_length | . | def iterable_sort_by_length(iterable: Iterable[Any], **kwargs) -> List[Any]:
"""."""
sorted_list = sorted(iterable, key=lambda x: len(x), **kwargs) # pylint: disable=W0108
return sorted_list
| (iterable: Iterable[Any], **kwargs) -> List[Any] | [
-0.056277740746736526,
0.012699377723038197,
-0.030106132850050926,
-0.042506907135248184,
0.05473203584551811,
0.0606689527630806,
0.03370692580938339,
0.034023091197013855,
0.04500111564993858,
-0.016423122957348824,
-0.022904548794031143,
-0.03829134628176689,
0.04612526670098305,
-0.02... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.