blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
721
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
57
| license_type
stringclasses 2
values | repo_name
stringlengths 5
91
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 321
values | visit_date
timestamp[ns]date 2016-08-12 09:31:09
2023-09-06 10:45:07
| revision_date
timestamp[ns]date 2010-09-28 14:01:40
2023-09-06 06:22:19
| committer_date
timestamp[ns]date 2010-09-28 14:01:40
2023-09-06 06:22:19
| github_id
int64 426
681M
| star_events_count
int64 101
243k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 23
values | gha_event_created_at
timestamp[ns]date 2012-06-28 18:51:49
2023-09-14 21:59:16
⌀ | gha_created_at
timestamp[ns]date 2008-02-11 22:55:26
2023-08-10 11:14:58
⌀ | gha_language
stringclasses 147
values | src_encoding
stringclasses 26
values | language
stringclasses 2
values | is_vendor
bool 2
classes | is_generated
bool 2
classes | length_bytes
int64 6
10.2M
| extension
stringclasses 115
values | filename
stringlengths 3
113
| content
stringlengths 6
10.2M
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e14e6360e6ba194840800c3540808f29098f228b
|
0ad5557b4264f5d0387aa8c5a01e0946bb6e1b5f
|
/hack/jinja2/cdi-j2.py
|
c336bcf81b114ee091117842b7b6e43e37d70b63
|
[
"Apache-2.0"
] |
permissive
|
kubevirt/hyperconverged-cluster-operator
|
ad4127a956bb01ede5979778282853fc4931b54a
|
24336013a2d554b465e6a2e18c4935980924f103
|
refs/heads/main
| 2023-08-31T19:15:39.442851
| 2023-08-31T12:46:04
| 2023-08-31T12:46:04
| 173,346,239
| 125
| 157
|
Apache-2.0
| 2023-09-14T13:40:06
| 2019-03-01T17:59:51
|
Go
|
UTF-8
|
Python
| false
| false
| 1,530
|
py
|
cdi-j2.py
|
#!/bin/env python
import sys
import os
from jinja2 import Environment, FileSystemLoader
j2FilePath = sys.argv[1]
dockerPrefix = sys.argv[2]
operatorImage = sys.argv[3]
dockerTag = sys.argv[4]
controllerImage = sys.argv[5]
importerImage = sys.argv[6]
clonerImage = sys.argv[7]
apiserverImage = sys.argv[8]
uploadproxyImage = sys.argv[9]
uploadserverImage = sys.argv[10]
cdiNamespace = "cdi"
pullPolicy = "IfNotPresent"
verbosity = "1"
env = Environment(loader=FileSystemLoader(os.path.dirname(j2FilePath)),
trim_blocks=True)
template = env.get_template("cdi-operator.yaml.j2")
rendered_template = template.render(docker_prefix=dockerPrefix,
operator_image=operatorImage,
docker_tag=dockerTag,
controller_image=controllerImage,
importer_image=importerImage,
cloner_image=clonerImage,
apiserver_image=apiserverImage,
uploadproxy_image=uploadproxyImage,
uploadserver_image=uploadserverImage,
cdi_namespace=cdiNamespace,
pull_policy=pullPolicy,
verbosity=verbosity
)
cdi = open(os.path.dirname(j2FilePath) + "/cdi-operator.yaml", "w")
cdi.write(rendered_template)
cdi.close()
|
efadccb0af1089e558bddf9956f3d1d29f61dc94
|
83da171ef6c1f8201a88534737c9e753247afee1
|
/fm_testing_tool/functions.py
|
74848cff902ef95cebe4a7b8db3ddca864a699bc
|
[
"BSD-3-Clause"
] |
permissive
|
OasisLMF/OasisLMF
|
7bb691eb08f11641887257fe154d5356509707c5
|
23e704c335629ccd010969b1090446cfa3f384d5
|
refs/heads/main
| 2023-08-25T12:14:44.449756
| 2023-08-23T10:08:17
| 2023-08-23T10:08:17
| 117,560,568
| 122
| 53
|
BSD-3-Clause
| 2023-09-14T09:37:17
| 2018-01-15T15:12:25
|
Python
|
UTF-8
|
Python
| false
| false
| 7,580
|
py
|
functions.py
|
# Note that only the currently used fields are shown unless show_all is set to True.
import os
import pandas as pd
import anytree
from anytree.search import find
from anytree.exporter import DotExporter
import collections
PolicyTuple = collections.namedtuple('PolicyTuple', 'layer_id agg_id calc_rules')
CalcRuleTuple = collections.namedtuple('CalcRuleTuple', 'policytc_id calcrule_id is_step trig_start trig_end')
def load_df(path, required_file=None):
if path:
return pd.read_csv(path)
else:
if required_file:
raise FileNotFoundError(f"Required File does not exist: {required_file}")
else:
return None
def create_fm_tree(fm_programme_df, fm_policytc_df, fm_profile_df, fm_summary_df):
missing_node_link = False
def get_policy_tc(agg_id, level_id):
policytc = fm_policytc_df.loc[
(fm_policytc_df['agg_id'] == agg_id) & (fm_policytc_df['level_id'] == level_id)
]
policy_list = []
for _, policy in policytc.iterrows():
# Find calc_rule
profile = fm_profile_df.loc[fm_profile_df.policytc_id == policy.policytc_id]
calc_rules = []
for _, step in profile.iterrows():
trig_start = step.trigger_start if hasattr(step, 'trigger_start') else 0
trig_end = step.trigger_end if hasattr(step, 'trigger_end') else 0
is_step_rule = (trig_end > 0 or trig_start > 0)
calc_rules.append(CalcRuleTuple(
policytc_id=int(policy.policytc_id),
calcrule_id=int(step.calcrule_id),
is_step=is_step_rule,
trig_start=trig_start,
trig_end=trig_end,
))
policy_list.append(
PolicyTuple(
layer_id=int(policy.layer_id),
agg_id=int(policy.agg_id),
calc_rules=calc_rules,
)
)
return len(policytc), policy_list
level_ids = sorted(list(fm_programme_df.level_id.unique()), reverse=True)
root = anytree.Node('Insured Loss', agg_id=1, level_id=max(level_ids) + 1, policy_tc=None)
for level in level_ids:
agg_id_idxs = list(fm_programme_df[fm_programme_df.level_id == level].drop_duplicates(subset=['level_id', 'to_agg_id'], keep="first").index)
for node_idx in agg_id_idxs:
node_info = fm_programme_df.iloc[node_idx]
layer_max, policy_list = get_policy_tc(node_info.to_agg_id, node_info.level_id)
# Set parent node as root or find based on level/agg ids
if level == max(level_ids):
parent_node = root
else:
try:
matched_id = fm_programme_df.loc[(fm_programme_df.level_id == level + 1) &
(fm_programme_df.from_agg_id == node_info.to_agg_id)].to_agg_id.item()
parent_node = find(root, filter_=lambda node: node.level_id == level + 1 and node.agg_id == matched_id)
except ValueError:
missing_node_link = True
print('Missing node link: agg_id={}, level_id={}'.format(node_info.to_agg_id, level + 1))
# Set node names based on attrs in FM files
if level >= 3:
node_name = "policy term {} \nlevel: {}".format(
node_info.to_agg_id,
node_info.level_id
)
elif level == 2:
node_name = "loc term {} ".format(node_info.to_agg_id)
else:
node_name = "cov term {}".format(node_info.to_agg_id)
for policy in policy_list:
node_name += "\n\nlayer_id: {}".format(policy.layer_id)
for rule in policy.calc_rules:
if rule.is_step:
node_name += "\n policytc_id {}: step_rule:{}, start:{} end:{}".format(
rule.policytc_id,
rule.calcrule_id,
rule.trig_start,
rule.trig_end
)
else:
node_name += "\npolicytc_id: {} \ncalc_rule: {}".format(
rule.policytc_id,
rule.calcrule_id,
)
# Create Node in FM tree
node = anytree.Node(
node_name,
agg_id=node_info.to_agg_id,
level_id=level,
parent=parent_node,
layer_max=layer_max,
policy_tc=policy_list,
)
# Add item level data
item_agg_idx = list(fm_summary_df[['agg_id']].drop_duplicates().index)
for item in item_agg_idx:
item_info = fm_summary_df.iloc[item]
matched_id = fm_programme_df.loc[(fm_programme_df.level_id == 1) & (fm_programme_df.from_agg_id == item_info.agg_id)].to_agg_id.item()
parent_node = find(root, filter_=lambda node: node.level_id == 1 and node.agg_id == matched_id)
node_name = "\n".join([
"item {}\n".format(int(item_info.agg_id)),
"locnumber: {}".format(item_info.locnumber),
"accnumber: {}".format(item_info.accnumber),
"polnumber: {}".format(item_info.polnumber),
"portnumber: {}".format(item_info.portnumber),
"cov_type: {}".format(item_info.coverage_type_id),
"peril_id: {}".format(item_info.peril_id),
"tiv: {}".format(item_info.tiv),
])
node = anytree.Node(
node_name,
agg_id=item_info.agg_id,
level_id=0,
parent=parent_node,
locnumber=item_info.locnumber,
accnumber=item_info.accnumber,
polnumber=item_info.polnumber,
portnumber=item_info.polnumber,
tiv=item_info.tiv,
coverage_id=item_info.coverage_id,
coverage_type=item_info.coverage_type_id,
peril_id=item_info.peril_id,
)
return root, missing_node_link
def render_fm_tree(root_node, filename='tree.png'):
# Function to format nodes in FM tree
def format_box(node):
# https://graphviz.org/doc/info/shapes.html
if node.level_id == 0:
# Item Level Node
return "fixedsize=false, shape=rect, fillcolor=lightgrey, style=filled"
else:
if not node.policy_tc:
# Error? missing policy_tc entry for this Node
return "fixedsize=false, shape=ellipse, fillcolor=pink, style=filled"
elif len(node.policy_tc) > 1:
# Node with multiple layers
return "fixedsize=false, shape=rect, fillcolor=orange, style=filled"
else:
# Cov or loc nodes
return "fixedsize=false, shape=ellipse, fillcolor=lightblue, style=filled"
# Function to add weighted 'by layer number' edges
def layered_edge(node, child):
# https://anytree.readthedocs.io/en/latest/tricks/weightededges.html
if hasattr(child, 'layer_max'):
if child.layer_max > 1:
return 'dir=back, style=bold, label=" {} Layers"'.format(child.layer_max)
return "dir=back"
# Render tree to png
dot_data = DotExporter(
root_node,
edgeattrfunc=layered_edge,
nodeattrfunc=format_box)
dot_data.to_picture(filename)
|
1ca4380ce6bcc1c40b641cf2bcf07a3c5a9c9b64
|
607dc8df19fc5248f6289cdda97857b5d58ca16f
|
/examples/1_basics/6_priors.py
|
218bd8f46022a365dc3ea406cccf0b25c7cd24e6
|
[
"BSD-3-Clause",
"LicenseRef-scancode-philippe-de-muyter",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
automl/SMAC3
|
7dce243a33023c52d6819deff966f7b502e90ed0
|
541ee7e0383b491b86d1a23dcff669f2efad616d
|
refs/heads/main
| 2023-08-31T17:36:06.067579
| 2023-08-01T13:02:51
| 2023-08-01T13:02:51
| 65,900,469
| 943
| 259
|
NOASSERTION
| 2023-09-11T02:36:57
| 2016-08-17T10:58:05
|
Python
|
UTF-8
|
Python
| false
| false
| 6,177
|
py
|
6_priors.py
|
"""
User Priors over the Optimum
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Example for optimizing a Multi-Layer Perceptron (MLP) setting priors over the optimum on the
hyperparameters. These priors are derived from user knowledge (from previous runs on similar
tasks, common knowledge or intuition gained from manual tuning). To create the priors, we make
use of the Normal and Beta Hyperparameters, as well as the "weights" property of the
``CategoricalHyperparameter``. This can be integrated into the optimiztion for any SMAC facade,
but we stick with the hyperparameter optimization facade here. To incorporate user priors into the
optimization, you have to change the acquisition function to ``PriorAcquisitionFunction``.
"""
import warnings
import numpy as np
from ConfigSpace import (
BetaIntegerHyperparameter,
CategoricalHyperparameter,
Configuration,
ConfigurationSpace,
NormalFloatHyperparameter,
UniformIntegerHyperparameter,
)
from sklearn.datasets import load_digits
from sklearn.exceptions import ConvergenceWarning
from sklearn.model_selection import StratifiedKFold, cross_val_score
from sklearn.neural_network import MLPClassifier
from smac import HyperparameterOptimizationFacade, Scenario
from smac.acquisition.function import PriorAcquisitionFunction
__copyright__ = "Copyright 2021, AutoML.org Freiburg-Hannover"
__license__ = "3-clause BSD"
digits = load_digits()
class MLP:
@property
def configspace(self) -> ConfigurationSpace:
# Build Configuration Space which defines all parameters and their ranges.
# To illustrate different parameter types,
# we use continuous, integer and categorical parameters.
cs = ConfigurationSpace()
# We do not have an educated belief on the number of layers beforehand
# As such, the prior on the HP is uniform
n_layer = UniformIntegerHyperparameter(
"n_layer",
lower=1,
upper=5,
)
# We believe the optimal network is likely going to be relatively wide,
# And place a Beta Prior skewed towards wider networks in log space
n_neurons = BetaIntegerHyperparameter(
"n_neurons",
lower=8,
upper=256,
alpha=4,
beta=2,
log=True,
)
# We believe that ReLU is likely going to be the optimal activation function about
# 60% of the time, and thus place weight on that accordingly
activation = CategoricalHyperparameter(
"activation",
["logistic", "tanh", "relu"],
weights=[1, 1, 3],
default_value="relu",
)
# Moreover, we believe ADAM is the most likely optimizer
optimizer = CategoricalHyperparameter(
"optimizer",
["sgd", "adam"],
weights=[1, 2],
default_value="adam",
)
# We do not have an educated opinion on the batch size, and thus leave it as-is
batch_size = UniformIntegerHyperparameter(
"batch_size",
16,
512,
default_value=128,
)
# We place a log-normal prior on the learning rate, so that it is centered on 10^-3,
# with one unit of standard deviation per multiple of 10 (in log space)
learning_rate_init = NormalFloatHyperparameter(
"learning_rate_init",
lower=1e-5,
upper=1.0,
mu=np.log(1e-3),
sigma=np.log(10),
log=True,
)
# Add all hyperparameters at once:
cs.add_hyperparameters([n_layer, n_neurons, activation, optimizer, batch_size, learning_rate_init])
return cs
def train(self, config: Configuration, seed: int = 0) -> float:
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=ConvergenceWarning)
classifier = MLPClassifier(
hidden_layer_sizes=[config["n_neurons"]] * config["n_layer"],
solver=config["optimizer"],
batch_size=config["batch_size"],
activation=config["activation"],
learning_rate_init=config["learning_rate_init"],
random_state=seed,
max_iter=5,
)
# Returns the 5-fold cross validation accuracy
cv = StratifiedKFold(n_splits=5, random_state=seed, shuffle=True) # to make CV splits consistent
score = cross_val_score(classifier, digits.data, digits.target, cv=cv, error_score="raise")
return 1 - np.mean(score)
if __name__ == "__main__":
mlp = MLP()
default_config = mlp.configspace.get_default_configuration()
# Define our environment variables
scenario = Scenario(mlp.configspace, n_trials=40)
# We also want to include our default configuration in the initial design
initial_design = HyperparameterOptimizationFacade.get_initial_design(
scenario,
additional_configs=[default_config],
)
# We define the prior acquisition function, which conduct the optimization using priors over the optimum
acquisition_function = PriorAcquisitionFunction(
acquisition_function=HyperparameterOptimizationFacade.get_acquisition_function(scenario),
decay_beta=scenario.n_trials / 10, # Proven solid value
)
# We only want one config call (use only one seed in this example)
intensifier = HyperparameterOptimizationFacade.get_intensifier(
scenario,
max_config_calls=1,
)
# Create our SMAC object and pass the scenario and the train method
smac = HyperparameterOptimizationFacade(
scenario,
mlp.train,
initial_design=initial_design,
acquisition_function=acquisition_function,
intensifier=intensifier,
overwrite=True,
)
incumbent = smac.optimize()
# Get cost of default configuration
default_cost = smac.validate(default_config)
print(f"Default cost: {default_cost}")
# Let's calculate the cost of the incumbent
incumbent_cost = smac.validate(incumbent)
print(f"Default cost: {incumbent_cost}")
|
9c618c9347b8f15d5110a3bdab3f99e99b36b8d3
|
f14bd0618e08e81078afb4afee1990179543c994
|
/tests/python/headland_generator/const_hl_test.py
|
d636e0dfc29620c58df67f047e0c02267d1761a7
|
[
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
Fields2Cover/Fields2Cover
|
5fc35c3848b384fd08b44f4e5354dcfc4254fab9
|
f75aaab695275ecae389d4740d136875e01d5ece
|
refs/heads/main
| 2023-09-03T10:14:51.088651
| 2023-08-21T11:10:56
| 2023-08-21T11:10:56
| 501,080,115
| 237
| 46
|
BSD-3-Clause
| 2023-08-02T14:29:29
| 2022-06-08T03:01:32
|
C++
|
UTF-8
|
Python
| false
| false
| 1,238
|
py
|
const_hl_test.py
|
#==============================================================================
# Copyright (C) 2021-2022 Wageningen University - All Rights Reserved
# Author: Gonzalo Mier
# BSD-3 License
#==============================================================================
import pytest
import fields2cover as f2c
def near(a, b):
assert pytest.approx(a) == pytest.approx(b)
def test_fields2cover_hl_const_gen_emptyArea():
rand = f2c.Random();
field = rand.generateRandField(5, 1e3);
near(field.getArea(), 1e3);
hl_gen = f2c.HG_Const_gen();
no_hl = hl_gen.generateHeadlands(field.field, 1e2);
near(no_hl.getArea(), 0);
def test_fields2cover_hl_const_gen_borderArea():
rand = f2c.Random();
field = rand.generateRandField(5, 1e5);
hl_gen = f2c.HG_Const_gen();
no_hl = hl_gen.generateHeadlands(field.field, 1.0);
assert field.getArea() > 0;
near(field.getArea(), 1e5);
assert (no_hl.getArea() < 1e5 * 0.99);
assert (no_hl.getArea() > 1e5 * 0.9);
assert (no_hl.getArea() / field.getArea() > 0.9);
assert (no_hl.getArea() / field.getArea() < 1.0);
extra_hl = hl_gen.generateHeadlands(field.field, -10.0);
assert (field.getArea() < extra_hl.getArea());
|
bbc967df51575926c623a509eb4a9fa9e7b09484
|
db43055180800e54526affb7941fc77e0226c4b3
|
/city_scrapers/spiders/chi_animal.py
|
382c0e1112474d84f1c4744a8a45fccfca5e70ca
|
[
"MIT"
] |
permissive
|
City-Bureau/city-scrapers
|
53724d4e973d71ec331cd9749e350c460aa6fb9d
|
611fce6a2705446e25a2fc33e32090a571eb35d1
|
refs/heads/main
| 2023-08-15T01:06:49.336847
| 2023-07-01T20:39:28
| 2023-07-01T20:39:28
| 97,890,025
| 308
| 366
|
MIT
| 2023-09-07T07:30:12
| 2017-07-21T00:45:13
|
Python
|
UTF-8
|
Python
| false
| false
| 2,440
|
py
|
chi_animal.py
|
import re
from datetime import timedelta
from city_scrapers_core.constants import ADVISORY_COMMITTEE
from city_scrapers_core.items import Meeting
from city_scrapers_core.spiders import CityScrapersSpider
from dateutil.parser import parse as dateparse
class ChiAnimalSpider(CityScrapersSpider):
name = "chi_animal"
agency = "Chicago Animal Care and Control"
timezone = "America/Chicago"
start_urls = [
"https://www.chicago.gov/city/en/depts/cacc/supp_info/public_notice.html"
]
def parse(self, response):
"""
`parse` should always `yield` Meeting items.
Change the `_parse_title`, `_parse_start`, etc methods to fit your scraping
needs.
"""
for item in response.css(".page-description ul li"):
start_str = "".join(item.xpath(".//text()").extract()).strip()
dt_matches = [
m[0]
for m in re.findall(
r"([A-Z][a-z]{2,9},? \d\d?,? \d{4}( - \d\d?:?\d?\d?\s?[apm]{2}?))", # noqa
start_str.replace(".", ""),
)
]
if not len(dt_matches) > 0:
continue
dt_str = dt_matches[-1]
try:
start_dt = dateparse(dt_str)
except ValueError:
continue
meeting = Meeting(
title="Advisory Board",
description="",
classification=ADVISORY_COMMITTEE,
start=start_dt,
end=start_dt + timedelta(hours=3),
time_notes="Estimated 3 hour duration",
all_day=False,
location={
"name": "David R. Lee Animal Care Center",
"address": "2741 S. Western Ave, Chicago, IL 60608",
},
links=self._parse_links(item, response),
source=response.url,
)
meeting["id"] = self._get_id(meeting)
meeting["status"] = self._get_status(meeting, text=start_str)
yield meeting
def _parse_links(self, item, response):
links = []
for link in item.css("a"):
links.append(
{
"title": " ".join(link.css("*::text").extract()).strip(),
"href": response.urljoin(link.attrib["href"]),
}
)
return links
|
01eb00063b50a3a06afb3cfb4e1e812bd4494a60
|
113d5a8590a578817e1cfdbebb24584931630e9a
|
/tikz/pi/create.py
|
a9695854b8ba65c84f85f1464bf7aa37f24116e0
|
[
"MIT"
] |
permissive
|
MartinThoma/LaTeX-examples
|
17f0d147269035b8e0e454964c76521cf26cf899
|
6d517700348d86e21c874c131582f0e74da342dc
|
refs/heads/master
| 2023-08-23T01:27:57.441809
| 2022-03-25T14:05:36
| 2022-03-25T14:05:36
| 5,351,405
| 1,492
| 452
|
MIT
| 2023-03-02T18:51:55
| 2012-08-09T05:02:14
|
TeX
|
UTF-8
|
Python
| false
| false
| 796
|
py
|
create.py
|
#!/usr/bin/env python
"""Create a data.csv file."""
import csv
try:
# import version included with old SymPy
from sympy.mpmath import mp
except ImportError:
# import newer version
from mpmath import mp
mp.dps = 1000 # set number of digits
pi = mp.pi
print(pi)
# Split pi in groups of two digits
pi = str(pi)[2:]
split_pi = []
for i in range(0, len(pi), 2):
part = pi[i:i + 2]
if len(part) != 2:
continue
split_pi.append(part)
# Representation of pi
data = [("x", "y", "color")] # header
for e1, e2 in zip(split_pi, split_pi[1:]):
tuple_date = (int(e1), int(e2), "c{}".format(int(int(e1) / 10)))
data.append(tuple_date)
# Write data to csv
with open('data.csv', 'w') as fp:
writer = csv.writer(fp, delimiter=',')
writer.writerows(data)
|
bdb63042c30748abae1dadc08002f89628ca4928
|
975b2d421d3661e6770b601929d5f11d981d8985
|
/msgraph/generated/models/security/ediscovery_review_tag.py
|
546f9d9883f171ced24a507ea5793312fcea9a2e
|
[
"MIT"
] |
permissive
|
microsoftgraph/msgraph-sdk-python
|
a7c551b85daadeebf76ec4ae12668664ea639b42
|
27de7ccbe688d7614b2f6bde0fdbcda4bc5cc949
|
refs/heads/main
| 2023-09-03T21:45:27.989672
| 2023-08-31T06:22:18
| 2023-08-31T06:22:18
| 534,665,999
| 135
| 18
|
MIT
| 2023-09-14T11:04:11
| 2022-09-09T14:00:17
|
Python
|
UTF-8
|
Python
| false
| false
| 2,996
|
py
|
ediscovery_review_tag.py
|
from __future__ import annotations
from dataclasses import dataclass, field
from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
if TYPE_CHECKING:
from .child_selectability import ChildSelectability
from .tag import Tag
from .tag import Tag
@dataclass
class EdiscoveryReviewTag(Tag):
# The OdataType property
odata_type: Optional[str] = "#microsoft.graph.security.ediscoveryReviewTag"
# Indicates whether a single or multiple child tags can be associated with a document. Possible values are: One, Many. This value controls whether the UX presents the tags as checkboxes or a radio button group.
child_selectability: Optional[ChildSelectability] = None
# Returns the tags that are a child of a tag.
child_tags: Optional[List[EdiscoveryReviewTag]] = None
# Returns the parent tag of the specified tag.
parent: Optional[EdiscoveryReviewTag] = None
@staticmethod
def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> EdiscoveryReviewTag:
"""
Creates a new instance of the appropriate class based on discriminator value
Args:
parse_node: The parse node to use to read the discriminator value and create the object
Returns: EdiscoveryReviewTag
"""
if not parse_node:
raise TypeError("parse_node cannot be null.")
return EdiscoveryReviewTag()
def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]:
"""
The deserialization information for the current model
Returns: Dict[str, Callable[[ParseNode], None]]
"""
from .child_selectability import ChildSelectability
from .tag import Tag
from .child_selectability import ChildSelectability
from .tag import Tag
fields: Dict[str, Callable[[Any], None]] = {
"childSelectability": lambda n : setattr(self, 'child_selectability', n.get_enum_value(ChildSelectability)),
"childTags": lambda n : setattr(self, 'child_tags', n.get_collection_of_object_values(EdiscoveryReviewTag)),
"parent": lambda n : setattr(self, 'parent', n.get_object_value(EdiscoveryReviewTag)),
}
super_fields = super().get_field_deserializers()
fields.update(super_fields)
return fields
def serialize(self,writer: SerializationWriter) -> None:
"""
Serializes information the current object
Args:
writer: Serialization writer to use to serialize this model
"""
if not writer:
raise TypeError("writer cannot be null.")
super().serialize(writer)
writer.write_enum_value("childSelectability", self.child_selectability)
writer.write_collection_of_object_values("childTags", self.child_tags)
writer.write_object_value("parent", self.parent)
|
d7b25ef2bb6ef70cd245cfc722bd48e61727153d
|
5d7be5902f2136b5ca229776e0274a7d45328d22
|
/code/exampleStrats/alwaysCooperate.py
|
68752fd4c559a8d242bd0428fb290460c3f606a6
|
[
"MIT"
] |
permissive
|
carykh/PrisonersDilemmaTournament
|
c207be62369329423fefb9d6283ee134fa983e1c
|
7ccf50a9c0e3155463f060d2bf857f98adf29746
|
refs/heads/main
| 2023-06-12T03:55:08.041052
| 2021-05-25T04:39:39
| 2021-05-25T04:39:39
| 364,188,537
| 247
| 203
|
MIT
| 2021-06-01T04:30:02
| 2021-05-04T08:25:16
|
Python
|
UTF-8
|
Python
| false
| false
| 49
|
py
|
alwaysCooperate.py
|
def strategy(history, memory):
return 1, None
|
44a31419e73d02decff91391b25a1cbe7a75a22a
|
2066e9e86a81291ef25029a37719a10d519c6545
|
/tools/openwebtext/remove_group_duplicates.py
|
44b62d62c19f35ef555507f7a07fc2bb73c8ca51
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
NVIDIA/Megatron-LM
|
143cd64258191390a369442b705d5b348083c685
|
99b044bff07f8e5d48b45223ed4bb11bd4e884e6
|
refs/heads/main
| 2023-09-04T05:57:16.169810
| 2023-08-30T18:25:58
| 2023-08-30T18:25:58
| 176,982,014
| 6,315
| 1,136
|
NOASSERTION
| 2023-09-14T11:34:29
| 2019-03-21T16:15:52
|
Python
|
UTF-8
|
Python
| false
| false
| 1,977
|
py
|
remove_group_duplicates.py
|
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
import json
import time
import sys
if __name__ == '__main__':
url_filename = sys.argv[1]
data_filename = sys.argv[2]
output_filename = sys.argv[3]
urls = set()
with open(url_filename, 'r') as f:
for line in f:
myjson = json.loads(line)
for key in myjson:
this_urls = myjson[key]
for i in range(1, len(this_urls)):
urls.add(this_urls[i])
print('will be removing {} urls'.format(len(urls)), flush=True)
written_docs = 0
removed_docs = 0
removed_chars = 0
start_time = time.time()
with open(output_filename, 'wb') as fout:
with open(data_filename, 'r') as fin:
for line in fin:
try:
myjson = json.loads(line)
url = myjson['url']
if url in urls:
print('removing', myjson)
removed_docs += 1
removed_chars += len(myjson['text'])
continue
myjson = json.dumps(myjson, ensure_ascii=False)
fout.write(myjson.encode('utf-8'))
fout.write('\n'.encode('utf-8'))
written_docs += 1
if written_docs % 10000 == 0:
print(' [PROCESSED] time (s): {:.2f} | written: {} '
'| removed: {} (char: {})'.format(
time.time() - start_time,
written_docs, removed_docs, removed_chars))
except Exception as e:
print('[SKIPPING]', line, e)
print(' [PROCESSED] time (s): {:.2f} | written: {} '
'| removed: {} (char: {})'.format(
time.time() - start_time,
written_docs, removed_docs, removed_chars))
print('done :-)')
|
f5ddafd24cf46667158470b60df6ec5bbd7c4c79
|
ffdc77394c5b5532b243cf3c33bd584cbdc65cb7
|
/tests/ut/python/parallel/test_concat.py
|
8146091bceee19e01e2d3ac7f258e1267d3a6c6f
|
[
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MPL-1.0",
"OpenSSL",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause-Open-MPI",
"MIT",
"MPL-2.0-no-copyleft-exception",
"NTP",
"BSD-3-Clause",
"GPL-1.0-or-later",
"0BSD",
"MPL-2.0",
"LicenseRef-scancode-free-unknown",
"AGPL-3.0-only",
"Libpng",
"MPL-1.1",
"IJG",
"GPL-2.0-only",
"BSL-1.0",
"Zlib",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-python-cwi",
"BSD-2-Clause",
"LicenseRef-scancode-gary-s-brown",
"LGPL-2.1-only",
"LicenseRef-scancode-other-permissive",
"Python-2.0",
"LicenseRef-scancode-mit-nagy",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense"
] |
permissive
|
mindspore-ai/mindspore
|
ca7d5bb51a3451c2705ff2e583a740589d80393b
|
54acb15d435533c815ee1bd9f6dc0b56b4d4cf83
|
refs/heads/master
| 2023-07-29T09:17:11.051569
| 2023-07-17T13:14:15
| 2023-07-17T13:14:15
| 239,714,835
| 4,178
| 768
|
Apache-2.0
| 2023-07-26T22:31:11
| 2020-02-11T08:43:48
|
C++
|
UTF-8
|
Python
| false
| false
| 5,624
|
py
|
test_concat.py
|
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
import numpy as np
import mindspore as ms
from mindspore import context, Tensor, Parameter
from mindspore.common.api import _cell_graph_executor
from mindspore.nn import Cell, TrainOneStepCell, Momentum
from mindspore.ops import operations as P
def setup_function():
context.set_auto_parallel_context(dataset_strategy="full_batch")
class Net(Cell):
def __init__(self, weight, weight2, strategy1=None, strategy2=None, is_parameter=True):
super().__init__()
self.concat = P.Concat(axis=0).shard(strategy1)
if is_parameter:
self.weight = Parameter(weight, "w1")
else:
self.weight = weight
self.mul = P.Mul().shard(strategy2)
self.weight2 = Parameter(weight2, "w2")
def construct(self, x, b):
out = self.concat((self.weight, self.weight2))
out = self.mul(x, out)
return out
class Net2(Cell):
def __init__(self, weight, strategy1=None, strategy2=None, axis=0):
super().__init__()
self.mul = P.Mul().shard(strategy1)
self.concat = P.Concat(axis=axis).shard(strategy2)
self.weight = Parameter(weight, "w")
def construct(self, x, b):
out = self.mul(x, b)
out = self.concat((out, self.weight))
return out
class Net3(Cell):
def __init__(self, weight, weight2, weight3, strategy1=None, strategy2=None, is_parameter=True):
super().__init__()
self.concat = P.Concat(axis=0).shard(strategy1)
if is_parameter:
self.weight = Parameter(weight, "w1")
else:
self.weight = weight
self.mul = P.Mul().shard(strategy2)
self.weight2 = Parameter(weight2, "w2")
self.weight3 = Parameter(weight3, "w3")
def construct(self, x, b):
out = self.concat((self.weight, self.weight2, self.weight3))
out = self.mul(x, out)
return out
_x = Tensor(np.ones([128, 64, 32]), dtype=ms.float32)
_w1 = Tensor(np.ones([96, 64, 32]), dtype=ms.float32)
_w2 = Tensor(np.ones([32, 64, 32]), dtype=ms.float32)
_w3 = Tensor(np.ones([128, 16, 32]), dtype=ms.float32)
_b = Tensor(np.ones([128, 64, 32]), dtype=ms.float32)
w1 = Tensor(np.ones([48, 64, 32]), dtype=ms.float32)
w2 = Tensor(np.ones([16, 64, 32]), dtype=ms.float32)
w3 = Tensor(np.ones([64, 64, 32]), dtype=ms.float32)
def compile_net(net):
optimizer = Momentum(net.trainable_params(), learning_rate=0.1, momentum=0.9)
train_net = TrainOneStepCell(net, optimizer)
train_net.set_train()
_cell_graph_executor.compile(train_net, _x, _b)
context.reset_auto_parallel_context()
def test_concat_parameter():
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=8, global_rank=0)
strategy1 = ((1, 4, 2), (1, 4, 2))
strategy2 = ((1, 4, 2), (1, 4, 2))
net = Net(_w1, _w2, strategy1, strategy2, is_parameter=True)
compile_net(net)
def test_concat_parameter_no_full_split():
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=8, global_rank=0)
strategy1 = ((1, 2, 2), (1, 2, 2))
strategy2 = ((1, 4, 2), (1, 4, 2))
net = Net(_w1, _w2, strategy1, strategy2, is_parameter=True)
compile_net(net)
def test_concat_tensor_and_parameter():
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=8, global_rank=0)
strategy1 = ((1, 2, 2), (1, 2, 2))
strategy2 = ((1, 4, 2), (1, 4, 2))
net = Net(_w1, _w2, strategy1, strategy2, is_parameter=False)
compile_net(net)
def test_concat_output():
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=8, global_rank=0)
strategy1 = ((2, 2, 2), (2, 2, 2))
strategy2 = ((1, 4, 2), (1, 4, 2))
net = Net2(_w1, strategy1, strategy2)
compile_net(net)
def test_concat_output_no_full_split():
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=8, global_rank=0)
strategy1 = ((2, 2, 2), (2, 2, 2))
strategy2 = ((1, 2, 2), (1, 2, 2))
net = Net2(_w1, strategy1, strategy2)
compile_net(net)
def test_concat_no_strategy():
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=8, global_rank=0)
strategy1 = ((2, 2, 2), (2, 2, 2))
strategy2 = None
net = Net2(_w3, strategy1, strategy2, axis=1)
compile_net(net)
def test_concat_auto_parallel():
context.set_auto_parallel_context(parallel_mode="auto_parallel", device_num=8, global_rank=0)
net = Net2(_w2)
compile_net(net)
def test_concat_auto_parallel2():
context.set_auto_parallel_context(parallel_mode="auto_parallel", device_num=8, global_rank=0)
strategy1 = None
strategy2 = None
net = Net2(_w3, strategy1, strategy2, axis=1)
compile_net(net)
def test_concat_auto_parallel_3_tensor():
context.set_auto_parallel_context(parallel_mode="auto_parallel", device_num=8, global_rank=0)
net = Net3(w1, w2, w3)
compile_net(net)
|
669fb95d0a7ccb62d7552650a84bb9bbb2c0efa0
|
9ba214bbcdb58f5134b96bd41f5f54b60faf77a4
|
/avalanche/benchmarks/datasets/core50/core50.py
|
cefce9fb52d0e635da691655ca72d0bbf96a6909
|
[
"MIT"
] |
permissive
|
ContinualAI/avalanche
|
aedc55059d7b952beb50898f213b9c66953cb764
|
deb2b3e842046f48efc96e55a16d7a566e022c72
|
refs/heads/master
| 2023-08-08T23:26:10.835875
| 2023-08-02T14:39:40
| 2023-08-02T14:39:40
| 245,145,949
| 1,424
| 270
|
MIT
| 2023-09-04T04:17:05
| 2020-03-05T11:32:13
|
Python
|
UTF-8
|
Python
| false
| false
| 9,620
|
py
|
core50.py
|
################################################################################
# Copyright (c) 2021 ContinualAI. #
# Copyrights licensed under the MIT License. #
# See the accompanying LICENSE file for terms. #
# #
# Date: 10-10-2020 #
# Author: Vincenzo Lomonaco #
# E-mail: contact@continualai.org #
# Website: www.continualai.org #
################################################################################
""" CORe50 Pytorch Dataset """
import glob
import os
import pickle as pkl
from pathlib import Path
from typing import List, Optional, Tuple, Union
from warnings import warn
from torchvision.datasets.folder import default_loader
from torchvision.transforms import ToTensor
from avalanche.benchmarks.datasets.core50 import core50_data
from avalanche.benchmarks.datasets import default_dataset_location
from avalanche.benchmarks.datasets.downloadable_dataset import (
DownloadableDataset,
)
class CORe50Dataset(DownloadableDataset):
"""CORe50 Pytorch Dataset"""
def __init__(
self,
root: Optional[Union[str, Path]] = None,
*,
train=True,
transform=None,
target_transform=None,
loader=default_loader,
download=True,
mini=False,
object_level=True,
):
"""Creates an instance of the CORe50 dataset.
:param root: root for the datasets data. Defaults to None, which
means that the default location for 'core50' will be used.
:param train: train or test split.
:param transform: eventual transformations to be applied.
:param target_transform: eventual transformation to be applied to the
targets.
:param loader: the procedure to load the instance from the storage.
:param download: boolean to automatically download data. Default to
True.
:param mini: boolean to use the 32x32 version instead of the 128x128.
Default to False.
:param object_level: if the classification is objects based or
category based: 50 or 10 way classification problem. Default to True
(50-way object classification problem)
"""
if root is None:
root = default_dataset_location("core50")
super(CORe50Dataset, self).__init__(root, download=download, verbose=True)
self.train = train # training set or test set
self.transform = transform
self.target_transform = target_transform
self.loader = loader
self.object_level = object_level
self.mini = mini
# any scenario and run is good here since we want just to load the
# train images and targets with no particular order
self._scen = "ni"
self._run = 0
self._nbatch = 8
# Download the dataset and initialize metadata
self._load_dataset()
def __getitem__(self, index):
"""
Args:
index (int): Index
Returns:
tuple: (sample, target) where target is class_index of the target
class.
"""
target = self.targets[index]
if self.mini:
bp = "core50_32x32"
else:
bp = "core50_128x128"
img = self.loader(str(self.root / bp / self.paths[index]))
if self.transform is not None:
img = self.transform(img)
if self.target_transform is not None:
target = self.target_transform(target)
return img, target
def __len__(self):
return len(self.targets)
def _download_dataset(self) -> None:
data2download: List[Tuple[str, str, str]] = core50_data.data
if self.mini:
data2download = list(data2download)
data2download[0] = core50_data.extra_data[1]
for name in data2download:
if self.verbose:
print("Downloading " + name[1] + "...")
file = self._download_file(name[1], name[0], name[2])
if name[1].endswith(".zip"):
if self.verbose:
print(f"Extracting {name[0]}...")
extract_root = self._extract_archive(file)
if self.verbose:
print("Extraction completed!")
def _load_metadata(self) -> bool:
if self.mini:
bp = "core50_32x32"
else:
bp = "core50_128x128"
if not (self.root / bp).exists():
return False
if not (self.root / "batches_filelists").exists():
return False
with open(self.root / "paths.pkl", "rb") as f:
self.train_test_paths = pkl.load(f)
if self.verbose:
print("Loading labels...")
with open(self.root / "labels.pkl", "rb") as f:
self.all_targets = pkl.load(f)
self.train_test_targets = []
for i in range(self._nbatch + 1):
self.train_test_targets += self.all_targets[self._scen][self._run][i]
if self.verbose:
print("Loading LUP...")
with open(self.root / "LUP.pkl", "rb") as f:
self.LUP = pkl.load(f)
if self.verbose:
print("Loading labels names...")
with open(self.root / "labels2names.pkl", "rb") as f:
self.labels2names = pkl.load(f)
self.idx_list = []
if self.train:
for i in range(self._nbatch):
self.idx_list += self.LUP[self._scen][self._run][i]
else:
self.idx_list = self.LUP[self._scen][self._run][-1]
self.paths = []
self.targets = []
for idx in self.idx_list:
self.paths.append(self.train_test_paths[idx])
div = 1
if not self.object_level:
div = 5
self.targets.append(self.train_test_targets[idx] // div)
with open(self.root / "labels2names.pkl", "rb") as f:
self.labels2names = pkl.load(f)
if not (self.root / "NIC_v2_79_cat").exists():
self._create_cat_filelists()
return True
def _download_error_message(self) -> str:
all_urls = [name_url[1] for name_url in core50_data.data]
base_msg = (
"[CORe50] Error downloading the dataset!\n"
"You should download data manually using the following links:\n"
)
for url in all_urls:
base_msg += url
base_msg += "\n"
base_msg += "and place these files in " + str(self.root)
return base_msg
def _create_cat_filelists(self):
"""Generates corresponding filelists with category-wise labels. The
default one are based on the object-level labels from 0 to 49."""
for k, v in core50_data.scen2dirs.items():
orig_root_path = os.path.join(self.root, v)
root_path = os.path.join(self.root, v[:-1] + "_cat")
if not os.path.exists(root_path):
os.makedirs(root_path)
for run in range(10):
cur_path = os.path.join(root_path, "run" + str(run))
orig_cur_path = os.path.join(orig_root_path, "run" + str(run))
if not os.path.exists(cur_path):
os.makedirs(cur_path)
for file in glob.glob(os.path.join(orig_cur_path, "*.txt")):
o_filename = file
_, d_filename = os.path.split(o_filename)
orig_f = open(o_filename, "r")
dst_f = open(os.path.join(cur_path, d_filename), "w")
for line in orig_f:
path, label = line.split(" ")
new_label = self._objlab2cat(int(label), k, run)
dst_f.write(path + " " + str(new_label) + "\n")
orig_f.close()
dst_f.close()
def _objlab2cat(self, label, scen, run):
"""Mapping an object label into its corresponding category label
based on the scenario."""
if scen == "nc":
return core50_data.name2cat[self.labels2names["nc"][run][label][:-1]]
else:
return int(label) // 5
def CORe50(*args, **kwargs):
warn(
"Dataset CORe50 has been renamed CORe50Dataset to prevent confusion "
"with the CORe50 classic benchmark",
DeprecationWarning,
2,
)
return CORe50Dataset(*args, **kwargs)
if __name__ == "__main__":
# this litte example script can be used to visualize the first image
# leaded from the dataset.
from torch.utils.data.dataloader import DataLoader
import matplotlib.pyplot as plt
from torchvision import transforms
import torch
train_data = CORe50Dataset(transform=ToTensor())
test_data = CORe50Dataset(train=False, transform=ToTensor())
print("train size: ", len(train_data))
print("Test size: ", len(test_data))
print(train_data.labels2names)
dataloader = DataLoader(train_data, batch_size=1)
for batch_data in dataloader:
x, y = batch_data
plt.imshow(transforms.ToPILImage()(torch.squeeze(x)))
plt.show()
print(x.size())
print(len(y))
break
__all__ = ["CORe50Dataset", "CORe50"]
|
9952dd9f1c4ad9ddcbf502f5d50ba45c467d021b
|
bce455fd7aecea25000fe07c7814e8b85beb91e7
|
/hooks/clang_format.py
|
f2f60f6da8f974125acbfc1ba7dc1be5e02a1bf5
|
[
"Apache-2.0"
] |
permissive
|
pocc/pre-commit-hooks
|
766b563ce8ae3d6a07736d79b810c987b98bfbf7
|
336fdd7c3cab698ead0b1c95157b9e74d3906b62
|
refs/heads/master
| 2023-08-17T11:36:22.005965
| 2021-12-29T07:06:50
| 2021-12-29T07:12:35
| 182,405,929
| 269
| 63
|
Apache-2.0
| 2023-08-14T15:28:22
| 2019-04-20T12:54:26
|
Python
|
UTF-8
|
Python
| false
| false
| 938
|
py
|
clang_format.py
|
#!/usr/bin/env python3
"""Wrapper script for clang-format"""
import sys
from typing import List
from hooks.utils import FormatterCmd
class ClangFormatCmd(FormatterCmd):
"""Class for the ClangFormat command."""
command = "clang-format"
lookbehind = "clang-format version "
def __init__(self, args: List[str]):
super().__init__(self.command, self.lookbehind, args)
self.check_installed()
self.parse_args(args)
self.set_diff_flag()
self.edit_in_place = "-i" in self.args
def run(self):
"""Run clang-format. Error if diff is incorrect."""
for filename in self.files:
self.compare_to_formatted(filename)
if self.returncode != 0:
sys.stdout.buffer.write(self.stderr)
sys.exit(self.returncode)
def main(argv: List[str] = sys.argv):
cmd = ClangFormatCmd(argv)
cmd.run()
if __name__ == "__main__":
main()
|
91cc3144b7f7b8d5531d59ddc87f521a6011a263
|
e5e0d729f082999a9bec142611365b00f7bfc684
|
/tensorflow/python/training/tracking/layer_utils.py
|
b83b0f84f91edfd58fe37b18ae1eab056df5faf1
|
[
"Apache-2.0"
] |
permissive
|
NVIDIA/tensorflow
|
ed6294098c7354dfc9f09631fc5ae22dbc278138
|
7cbba04a2ee16d21309eefad5be6585183a2d5a9
|
refs/heads/r1.15.5+nv23.03
| 2023-08-16T22:25:18.037979
| 2023-08-03T22:09:23
| 2023-08-03T22:09:23
| 263,748,045
| 763
| 117
|
Apache-2.0
| 2023-07-03T15:45:19
| 2020-05-13T21:34:32
|
C++
|
UTF-8
|
Python
| false
| false
| 4,065
|
py
|
layer_utils.py
|
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Utilities related to layer/model functionality."""
# TODO(b/110718070): Move these functions back to tensorflow/python/keras/utils
# once __init__ files no longer require all of tf.keras to be imported together.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow.python.util import object_identity
def is_layer(obj):
"""Implicit check for Layer-like objects."""
# TODO(b/110718070): Replace with isinstance(obj, base_layer.Layer).
return hasattr(obj, "_is_layer") and not isinstance(obj, type)
def has_weights(obj):
"""Implicit check for Layer-like objects."""
# TODO(b/110718070): Replace with isinstance(obj, base_layer.Layer).
has_weight = (hasattr(type(obj), "trainable_weights")
and hasattr(type(obj), "non_trainable_weights"))
return has_weight and not isinstance(obj, type)
def filter_empty_layer_containers(layer_list):
"""Filter out empty Layer-like containers and uniquify."""
# TODO(b/130381733): Make this an attribute in base_layer.Layer.
existing = object_identity.ObjectIdentitySet()
to_visit = layer_list[::-1]
filtered = []
while to_visit:
obj = to_visit.pop()
if obj in existing:
continue
existing.add(obj)
if is_layer(obj):
filtered.append(obj)
elif hasattr(obj, "layers"):
# Trackable data structures will not show up in ".layers" lists, but
# the layers they contain will.
to_visit.extend(obj.layers[::-1])
return filtered
def gather_trainable_weights(trainable, sub_layers, extra_variables):
"""Lists the trainable weights for an object with sub-layers.
Args:
trainable: Whether the object collecting the variables is trainable.
sub_layers: A flat list of Layer objects owned by this object, to collect
variables from.
extra_variables: Any extra variables to include. Their `.trainable` property
is used to categorize them.
Returns:
A list of collected trainable weights/variables.
"""
if not trainable:
return []
weights = []
for layer in sub_layers:
weights += layer.trainable_weights
trainable_extra_variables = [
v for v in extra_variables if v.trainable]
return weights + trainable_extra_variables
def gather_non_trainable_weights(trainable, sub_layers, extra_variables):
"""Lists the non-trainable weights for an object with sub-layers.
Args:
trainable: Whether the object collecting the variables is trainable.
sub_layers: A flat list of Layer objects owned by this object, to collect
variables from.
extra_variables: Any extra variables to include. Their `.trainable` property
is used to categorize them.
Returns:
A list of collected non-trainable weights/variables.
"""
trainable_extra_variables = []
non_trainable_extra_variables = []
for v in extra_variables:
if v.trainable:
trainable_extra_variables.append(v)
else:
non_trainable_extra_variables.append(v)
weights = []
for layer in sub_layers:
weights += layer.non_trainable_weights
if not trainable:
trainable_weights = []
for layer in sub_layers:
trainable_weights += layer.trainable_weights
return (trainable_weights + trainable_extra_variables
+ weights + non_trainable_extra_variables)
return weights + non_trainable_extra_variables
|
28e68d76da3888406b920a7f67a81231104951e0
|
cfa35dc2ea93ee0eceb2399a9e6112e987579c09
|
/stonesoup/sensormanager/reward.py
|
5b1fb1f24a0fb52abbbb069fbcc02978ff884df1
|
[
"LicenseRef-scancode-proprietary-license",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"Python-2.0",
"LicenseRef-scancode-secret-labs-2011"
] |
permissive
|
dstl/Stone-Soup
|
227e6a9e6fbdceca14af3f0259f311ec74095597
|
f24090cc919b3b590b84f965a3884ed1293d181d
|
refs/heads/main
| 2023-09-01T14:33:14.626428
| 2023-09-01T11:35:46
| 2023-09-01T11:35:46
| 98,420,803
| 315
| 126
|
MIT
| 2023-09-14T14:55:34
| 2017-07-26T12:34:28
|
Python
|
UTF-8
|
Python
| false
| false
| 5,818
|
py
|
reward.py
|
from abc import ABC
import copy
import datetime
from typing import Mapping, Sequence, Set
import numpy as np
from ..types.detection import TrueDetection
from ..base import Base, Property
from ..predictor.kalman import KalmanPredictor
from ..updater.kalman import ExtendedKalmanUpdater
from ..types.track import Track
from ..types.hypothesis import SingleHypothesis
from ..sensor.sensor import Sensor
from ..sensor.action import Action
class RewardFunction(Base, ABC):
"""
The reward function base class.
A reward function is a callable used by a sensor manager to determine the best choice of
action(s) for a sensor or group of sensors to take. For a given configuration of sensors
and actions the reward function calculates a metric to evaluate how useful that choice
of actions would be with a particular objective or objectives in mind.
The sensor manager algorithm compares this metric for different possible configurations
and chooses the appropriate sensing configuration to use at that time step.
"""
def __call__(self, config: Mapping[Sensor, Sequence[Action]], tracks: Set[Track],
metric_time: datetime.datetime, *args, **kwargs):
"""
A method which returns a reward metric based on information about the state of the
system, sensors and possible actions they can take. This requires a mapping of
sensors to action(s) to be evaluated by reward function, a set of tracks at given
time and the time at which the actions would be carried out until.
Returns
-------
: float
Calculated metric
"""
raise NotImplementedError
class UncertaintyRewardFunction(RewardFunction):
"""A reward function which calculates the potential reduction in the uncertainty of track estimates
if a particular action is taken by a sensor or group of sensors.
Given a configuration of sensors and actions, a metric is calculated for the potential
reduction in the uncertainty of the tracks that would occur if the sensing configuration
were used to make an observation. A larger value indicates a greater reduction in
uncertainty.
"""
predictor: KalmanPredictor = Property(doc="Predictor used to predict the track to a new state")
updater: ExtendedKalmanUpdater = Property(doc="Updater used to update "
"the track to the new state.")
method_sum: bool = Property(default=True, doc="Determines method of calculating reward."
"Default calculates sum across all targets."
"Otherwise calculates mean of all targets.")
def __call__(self, config: Mapping[Sensor, Sequence[Action]], tracks: Set[Track],
metric_time: datetime.datetime, *args, **kwargs):
"""
For a given configuration of sensors and actions this reward function calculates the
potential uncertainty reduction of each track by
computing the difference between the covariance matrix norms of the prediction
and the posterior assuming a predicted measurement corresponding to that prediction.
This requires a mapping of sensors to action(s)
to be evaluated by reward function, a set of tracks at given time and the time at which
the actions would be carried out until.
The metric returned is the total potential reduction in uncertainty across all tracks.
Returns
-------
: float
Metric of uncertainty for given configuration
"""
# Reward value
config_metric = 0
predicted_sensors = list()
memo = {}
# For each sensor in the configuration
for sensor, actions in config.items():
predicted_sensor = copy.deepcopy(sensor, memo)
predicted_sensor.add_actions(actions)
predicted_sensor.act(metric_time)
if isinstance(sensor, Sensor):
predicted_sensors.append(predicted_sensor) # checks if its a sensor
# Create dictionary of predictions for the tracks in the configuration
predicted_tracks = set()
for track in tracks:
predicted_track = copy.copy(track)
predicted_track.append(self.predictor.predict(predicted_track, timestamp=metric_time))
predicted_tracks.add(predicted_track)
for sensor in predicted_sensors:
# Assumes one detection per track
detections = {detection.groundtruth_path: detection
for detection in sensor.measure(predicted_tracks, noise=False)
if isinstance(detection, TrueDetection)}
for predicted_track, detection in detections.items():
# Generate hypothesis based on prediction/previous update and detection
hypothesis = SingleHypothesis(predicted_track.state, detection)
# Do the update based on this hypothesis and store covariance matrix
update = self.updater.update(hypothesis)
previous_cov_norm = np.linalg.norm(predicted_track.covar)
update_cov_norm = np.linalg.norm(update.covar)
# Replace prediction with update
predicted_track.append(update)
# Calculate metric for the track observation and add to the metric
# for the configuration
metric = previous_cov_norm - update_cov_norm
config_metric += metric
if self.method_sum is False and len(detections) != 0:
config_metric /= len(detections)
# Return value of configuration metric
return config_metric
|
12972c0c3d04bf3863f87c84435ab170558a2fd5
|
e70ccd8d27af13e1568e2d1d6f3d918df2b72e3f
|
/src/qrl/__init__.py
|
cdd2fb84459b5eae8e75f9c6985de01e007d403a
|
[
"MIT"
] |
permissive
|
theQRL/QRL
|
21be76cdea5134ae8f8b83a334f3a569ca85ab14
|
7600ec054edecc22f0b86b76b8e00f11a161486a
|
refs/heads/master
| 2023-08-16T23:58:58.566589
| 2023-08-01T17:45:29
| 2023-08-01T17:45:29
| 71,055,814
| 462
| 215
|
MIT
| 2023-08-01T17:45:31
| 2016-10-16T14:32:40
|
Python
|
UTF-8
|
Python
| false
| false
| 147
|
py
|
__init__.py
|
# -*- coding: utf-8 -*-
__all__ = ['core', 'crypto']
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
|
831562cf531b92e4979bf47892952b947f8fe301
|
ffdc77394c5b5532b243cf3c33bd584cbdc65cb7
|
/tests/ut/python/parallel/test_parallel_mirror_group.py
|
36eb2fbee2d36f9d3599957c12c49a49a769784f
|
[
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MPL-1.0",
"OpenSSL",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause-Open-MPI",
"MIT",
"MPL-2.0-no-copyleft-exception",
"NTP",
"BSD-3-Clause",
"GPL-1.0-or-later",
"0BSD",
"MPL-2.0",
"LicenseRef-scancode-free-unknown",
"AGPL-3.0-only",
"Libpng",
"MPL-1.1",
"IJG",
"GPL-2.0-only",
"BSL-1.0",
"Zlib",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-python-cwi",
"BSD-2-Clause",
"LicenseRef-scancode-gary-s-brown",
"LGPL-2.1-only",
"LicenseRef-scancode-other-permissive",
"Python-2.0",
"LicenseRef-scancode-mit-nagy",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense"
] |
permissive
|
mindspore-ai/mindspore
|
ca7d5bb51a3451c2705ff2e583a740589d80393b
|
54acb15d435533c815ee1bd9f6dc0b56b4d4cf83
|
refs/heads/master
| 2023-07-29T09:17:11.051569
| 2023-07-17T13:14:15
| 2023-07-17T13:14:15
| 239,714,835
| 4,178
| 768
|
Apache-2.0
| 2023-07-26T22:31:11
| 2020-02-11T08:43:48
|
C++
|
UTF-8
|
Python
| false
| false
| 9,492
|
py
|
test_parallel_mirror_group.py
|
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
""" test group info """
import os
import numpy as np
import mindspore.nn as nn
from mindspore import Tensor, Parameter
from mindspore.common.api import _cell_graph_executor
from mindspore.nn import TrainOneStepCell
from mindspore.nn.wrap.cell_wrapper import _VirtualDatasetCell
from mindspore.nn.optim import Momentum
from mindspore.ops import operations as P
from mindspore import context
from mindspore.train.serialization import restore_group_info_list
def setup_function():
context.set_auto_parallel_context(dataset_strategy="full_batch")
class Net3(nn.Cell):
"""Net definition"""
def __init__(self, strategy1, strategy2, strategy3):
super(Net3, self).__init__()
self.fc1 = P.MatMul().shard(strategy1)
self.fc2 = P.MatMul().shard(strategy2)
self.fc3 = P.MatMul().shard(strategy3)
self.p1 = Parameter(Tensor(np.ones([48, 64]).astype(np.float32)), name="weight1")
self.p2 = Parameter(Tensor(np.ones([64, 16]).astype(np.float32)), name="weight2", parallel_optimizer=False)
self.p3 = Parameter(Tensor(np.ones([16, 16]).astype(np.float32)), name="weight3")
def construct(self, x, y):
x = self.fc1(x, self.p1)
x = self.fc2(x, self.p2)
z = x - y
z = self.fc3(z, self.p3)
return z
def auto_parallel_compile_net(strategy1=None, strategy2=None, strategy3=None):
context.set_context(mode=context.GRAPH_MODE)
inputs = Tensor(np.ones([32, 48]).astype(np.float32))
label = Tensor(np.zeros([32, 16]).astype(np.float32))
net = Net3(strategy1, strategy2, strategy3)
auto_parallel = context.get_auto_parallel_context("parallel_mode") in ["semi_auto_parallel", "auto_parallel"]
if auto_parallel:
net = _VirtualDatasetCell(net)
optimizer = Momentum(net.trainable_params(), learning_rate=0.1, momentum=0.9)
train_network = TrainOneStepCell(net, optimizer).set_comm_fusion(4)
train_network.set_train()
_cell_graph_executor.compile(train_network, inputs, label, phase="train")
def test_mirror_group():
"""
Feature: save and load mirror group
Description: semi-auto parallel, disable parallel optimizer.
Expectation: group info list match expectation value.
"""
os.environ['GROUP_INFO_FILE'] = "./test_mirror_group.pb"
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel",
device_num=32, enable_parallel_optimizer=False)
auto_parallel_compile_net(((8, 1), (1, 4)), ((32, 1), (1, 1)), ((8, 4), (4, 1)))
group_info_list = restore_group_info_list("./test_mirror_group.pb")
assert group_info_list == [0, 4, 8, 12, 16, 20, 24, 28]
context.reset_auto_parallel_context()
del os.environ['GROUP_INFO_FILE']
def test_mirror_group_auto_parallel():
"""
Feature: save and load mirror group
Description: auto parallel, disable parallel optimizer.
Expectation: group info list match expectation value.
"""
os.environ['GROUP_INFO_FILE'] = "./test_mirror_group_auto_parallel.pb"
context.set_auto_parallel_context(parallel_mode="auto_parallel",
device_num=32, enable_parallel_optimizer=False)
auto_parallel_compile_net(((8, 1), (1, 4)), ((32, 1), (1, 1)), ((8, 4), (4, 1)))
group_info_list = restore_group_info_list("./test_mirror_group_auto_parallel.pb")
assert group_info_list == [0, 4, 8, 12, 16, 20, 24, 28]
context.reset_auto_parallel_context()
del os.environ['GROUP_INFO_FILE']
def test_data_parallel_group():
"""
Feature: save and load mirror group
Description: data parallel , disable parallel optimizer.
Expectation: group info list match expectation value.
"""
os.environ['GROUP_INFO_FILE'] = "./test_data_parallel_group.pb"
context.set_auto_parallel_context(parallel_mode="data_parallel", dataset_strategy="data_parallel",
device_num=32, enable_parallel_optimizer=False)
auto_parallel_compile_net(((8, 1), (1, 4)), ((32, 1), (1, 1)), ((8, 4), (4, 1)))
group_info_list = restore_group_info_list("./test_data_parallel_group.pb")
assert group_info_list == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31]
context.reset_auto_parallel_context()
del os.environ['GROUP_INFO_FILE']
def test_mirror_group_parallel_optimizer():
"""
Feature: save and load mirror group
Description: semi-auto parallel, enable parallel optimizer.
Expectation: group info list match expectation value.
"""
os.environ['GROUP_INFO_FILE'] = "./test_mirror_group_parallel_optimizer.pb"
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=32,
parallel_optimizer_config={"parallel_optimizer_threshold": 1},
enable_parallel_optimizer=True)
auto_parallel_compile_net(((8, 1), (1, 4)), ((32, 1), (1, 1)), ((8, 4), (4, 1)))
group_info_list = restore_group_info_list("./test_mirror_group_parallel_optimizer.pb")
assert group_info_list == [0]
context.reset_auto_parallel_context()
del os.environ['GROUP_INFO_FILE']
def test_mirror_group_parallel_optimizer_not_full_shard():
"""
Feature: save and load mirror group
Description: semi-auto parallel, enable parallel optimizer but not fully shard.
Expectation: group info list match expectation value.
"""
os.environ['GROUP_INFO_FILE'] = "./test_mirror_group_parallel_optimizer_not_full_shard.pb"
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=32,
parallel_optimizer_config={"parallel_optimizer_threshold": 2},
enable_parallel_optimizer=True, optimizer_weight_shard_size=2)
auto_parallel_compile_net(((8, 1), (1, 4)), ((32, 1), (1, 1)), ((8, 4), (4, 1)))
group_info_list = restore_group_info_list("./test_mirror_group_parallel_optimizer_not_full_shard.pb")
assert group_info_list == [0, 8, 16, 24]
context.reset_auto_parallel_context()
del os.environ['GROUP_INFO_FILE']
def test_pipeline_split_stage0_mirror_group():
"""
Feature: save and load mirror group
Description: semi-auto parallel, pipeline parallel.
Expectation: group info list match expectation value.
"""
import mindspore as ms
from mindspore.train import Model
from .test_pipeline_split import PipelineCell, PipelineSplit, DatasetLenet
os.environ['GROUP_INFO_FILE'] = "./test_pipeline_split_stage0_mirror_group.pb"
context.set_auto_parallel_context(device_num=64, global_rank=0, pipeline_stages=2)
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", dataset_strategy="data_parallel")
data = Tensor(np.ones([32, 64]), dtype=ms.float32)
label = Tensor(np.ones([64, 64]), dtype=ms.float32)
strategy1 = ((4, 1), (1, 8))
strategy2 = ((4, 1), (1, 1))
net = PipelineCell(PipelineSplit(strategy1, strategy2), 4)
params = net.network.cell.block[0].trainable_params()
dataset = DatasetLenet(data, label, 3)
optimizer = nn.Lamb(params, learning_rate=0.01)
model = Model(net, optimizer=optimizer)
model.train(2, dataset, dataset_sink_mode=False)
group_info_list = restore_group_info_list("./test_pipeline_split_stage0_mirror_group.pb")
assert group_info_list == [0, 8, 16, 24]
del os.environ['GROUP_INFO_FILE']
def test_pipeline_split_stage1_mirror_group():
"""
Feature: save and load mirror group
Description: semi-auto parallel, pipeline parallel.
Expectation: group info list match expectation value.
"""
import mindspore as ms
from mindspore.train import Model
from .test_pipeline_split import PipelineCell, PipelineSplit, DatasetLenet
os.environ['GROUP_INFO_FILE'] = "./test_pipeline_split_stage1_mirror_group.pb"
context.set_auto_parallel_context(device_num=64, global_rank=63, pipeline_stages=2)
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", dataset_strategy="data_parallel")
data = Tensor(np.ones([32, 64]), dtype=ms.float32)
label = Tensor(np.ones([64, 64]), dtype=ms.float32)
strategy1 = ((4, 1), (1, 8))
strategy2 = ((4, 1), (1, 1))
net = PipelineCell(PipelineSplit(strategy1, strategy2), 4)
params = net.network.cell.block[1].trainable_params()
dataset = DatasetLenet(data, label, 3)
optimizer = nn.Lamb(params, learning_rate=0.01)
model = Model(net, optimizer=optimizer)
model.train(2, dataset, dataset_sink_mode=False)
group_info_list = restore_group_info_list("./test_pipeline_split_stage1_mirror_group.pb")
assert group_info_list == [39, 47, 55, 63]
del os.environ['GROUP_INFO_FILE']
|
9497f0970b34389a87d0f666c63ad26349f4d89a
|
2cfe6bb4a509c33c32ffde9edbc0f992bc6218ad
|
/examples/example_preprocessor.py
|
a2c1003aea4409e579453ce62b667d8b43c73a66
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
PyHDI/Pyverilog
|
7b0c642f58b809b106c689fbfa51f337fda956c2
|
81838bc463d17148ef6872af34eb27585ee349ba
|
refs/heads/develop
| 2023-08-05T23:09:47.258312
| 2022-12-23T14:16:24
| 2022-12-23T14:16:24
| 14,871,471
| 527
| 161
|
Apache-2.0
| 2023-05-15T12:05:26
| 2013-12-02T18:53:03
|
Python
|
UTF-8
|
Python
| false
| false
| 1,441
|
py
|
example_preprocessor.py
|
from __future__ import absolute_import
from __future__ import print_function
import sys
import os
from optparse import OptionParser
# the next line can be removed after installation
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import pyverilog
from pyverilog.vparser.preprocessor import preprocess
def main():
INFO = "Verilog Preprocessor"
VERSION = pyverilog.__version__
USAGE = "Usage: python example_preprocessor.py file ..."
def showVersion():
print(INFO)
print(VERSION)
print(USAGE)
sys.exit()
optparser = OptionParser()
optparser.add_option("-v", "--version", action="store_true", dest="showversion",
default=False, help="Show the version")
optparser.add_option("-I", "--include", dest="include", action="append",
default=[], help="Include path")
optparser.add_option("-D", dest="define", action="append",
default=[], help="Macro Definition")
(options, args) = optparser.parse_args()
filelist = args
if options.showversion:
showVersion()
for f in filelist:
if not os.path.exists(f):
raise IOError("file not found: " + f)
if len(filelist) == 0:
showVersion()
text = preprocess(filelist, include=options.include, define=options.define)
print(text)
if __name__ == '__main__':
main()
|
27d5aabd4fef34d44bf8a1525f4e5b53fa70f0bd
|
d594f3926f6379ef7c382c608cb211f507240420
|
/csunplugged/at_home/migrations/0013_auto_20220520_0506.py
|
527022ff8abe08e016136a578caa8e617ba639f4
|
[
"LicenseRef-scancode-secret-labs-2011",
"MIT",
"OFL-1.1",
"LGPL-2.0-or-later",
"AGPL-3.0-only",
"CC-BY-4.0",
"Apache-2.0",
"BSD-3-Clause",
"CC-BY-SA-4.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
uccser/cs-unplugged
|
0b9151f84dd490d5b90771a3706327a623d39edc
|
363e281ff17cefdef0ec61078b1718eef2eaf71a
|
refs/heads/develop
| 2023-08-25T08:45:29.833025
| 2023-08-22T02:58:35
| 2023-08-22T02:58:35
| 66,315,075
| 200
| 41
|
MIT
| 2023-09-14T02:15:40
| 2016-08-22T23:16:40
|
Python
|
UTF-8
|
Python
| false
| false
| 691
|
py
|
0013_auto_20220520_0506.py
|
# Generated by Django 3.2.11 on 2022-05-20 05:06
import django.contrib.postgres.indexes
import django.contrib.postgres.search
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('at_home', '0012_auto_20210929_2238'),
]
operations = [
migrations.AddField(
model_name='activity',
name='search_vector',
field=django.contrib.postgres.search.SearchVectorField(null=True),
),
migrations.AddIndex(
model_name='activity',
index=django.contrib.postgres.indexes.GinIndex(fields=['search_vector'], name='at_home_act_search__0470ab_gin'),
),
]
|
c6497b73ed2d1e9aa567fe2189bcc65ccafba8f3
|
6416b746ee71d897789eab1e450000831674dbd0
|
/src/otx/api/utils/shape_factory.py
|
b27eacb987173123a85e925d80ab16e1fdbd3442
|
[
"Apache-2.0"
] |
permissive
|
openvinotoolkit/training_extensions
|
c921f83ad52311af96ff45ae0b88d0aecddd855b
|
80454808b38727e358e8b880043eeac0f18152fb
|
refs/heads/develop
| 2023-08-31T06:29:07.229339
| 2023-08-31T01:57:26
| 2023-08-31T01:57:26
| 154,843,614
| 397
| 230
|
Apache-2.0
| 2023-09-14T06:17:01
| 2018-10-26T14:02:29
|
Python
|
UTF-8
|
Python
| false
| false
| 7,691
|
py
|
shape_factory.py
|
"""This module implements helpers for converting shape entities."""
# Copyright (C) 2021-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
from otx.api.entities.shapes.ellipse import Ellipse
from otx.api.entities.shapes.polygon import Point, Polygon
from otx.api.entities.shapes.rectangle import Rectangle
from otx.api.entities.shapes.shape import ShapeEntity
class ShapeFactory:
"""Helper class converting between shape types."""
@staticmethod
def shape_as_rectangle(shape: ShapeEntity) -> Rectangle:
"""Get the outer-fitted rectangle representation of the shape.
`media_width` and `media_height` are the width and height of the media in
which the shape is expressed.
Example:
Let's assume a DatasetItem `dataset_item`.
To obtain the shapes inside the full annotation as rectangles, one could call:
>>> from otx.api.entities.dataset_item import DatasetItem
>>> from otx.api.entities.image import NullImage
>>> from otx.api.entities.annotation_scene import NullAnnotationScene
>>> dataset_item = DatasetItem(media=NullImage(),
>>> annotation=NullAnnotationScene())
>>> rectangles = [ShapeFactory.shape_as_rectangle(shape,
>>> dataset_item.media.width, dataset_item.media.height) for shape
... in dataset_item.annotation_scene.shapes]
To obtain the shapes inside the dataset item (note that dataset item can have
roi), one should call:
>>> rectangles = [ShapeFactory.shape_as_rectangle(shape) for shape in
>>> dataset_item.get_annotations()]
Since the shapes in the first call come from annotation directly, this means
they are expressed in the media coordinate system. Therefore,
dataset_item.media.width and dataset_item.media.height are passed.
While in the second call, the shapes come from denormalization results wrt.
dataset_item.roi and therefore expressed inside the roi. In this case,
dataset_item.width and dataset_item.height are passed.
Converting Ellipse to rectangle
>>> height = 240
>>> width = 480
>>> rectangle = Rectangle(x1=0.375, y1=0.25, x2=0.625, y2=0.75,
... labels=[]) # a square of 120 x 120 pixels at the center of the image
>>> ellipse = Ellipse(x1=0.5, y1=0.5, x2=0.625, y2=0.56125,
... labels=[]) # an ellipse of radius 60 pixels (x2 is wrt width) at the
center of the image
>>> ellipse_as_rectangle = ShapeFactory.shape_as_rectangle(ellipse) # get the
fitted rectangle for the ellipse
>>> str(rectangle) == str(ellipse_as_rectangle)
True
Converting triangle to rectangle
>>> points = [Point(x=0.5, y=0.25), Point(x=0.375, y=0.75),
>>> Point(x=0.625, y=0.75)]
>>> triangle = Polygon(points=points, labels=[])
>>> triangle_as_rectangle = ShapeFactory.shape_as_rectangle(triangle)
>>> str(triangle_as_rectangle) == str(rectangle)
True
Args:
shape (ShapeEntity): the shape to convert to rectangle
Returns:
Rectangle: bounding box of the shape
"""
if isinstance(shape, Rectangle):
return shape
if isinstance(shape, Ellipse):
x1 = shape.x1
y1 = shape.y1
x2 = shape.x2
y2 = shape.y2
elif isinstance(shape, Polygon):
x1 = shape.min_x
x2 = shape.max_x
y1 = shape.min_y
y2 = shape.max_y
else:
raise NotImplementedError(f"Conversion of a {type(shape)} to a rectangle is not implemented yet: {shape}")
new_shape = Rectangle(x1=x1, y1=y1, x2=x2, y2=y2)
return new_shape
@staticmethod
def shape_as_polygon(shape: ShapeEntity) -> Polygon:
"""Return a shape converted as polygon.
For a rectangle, a polygon will be constructed with a point in each corner.
For a ellipse, 360 points will be made. Otherwise, the original shape will be returned.
The width/height for the parent need to be specified to make sure the aspect ratio is maintained.
Args:
shape (ShapeEntity): the shape to convert to polygon.
Returns:
Polygon: the polygon representation of the shape.
Raises:
NotImplementedError: if the shape is not a rectangle or ellipse.
"""
if isinstance(shape, Polygon):
new_shape = shape
elif isinstance(shape, Rectangle):
points = [
Point(x=shape.x1, y=shape.y1),
Point(x=shape.x2, y=shape.y1),
Point(x=shape.x2, y=shape.y2),
Point(x=shape.x1, y=shape.y2),
Point(x=shape.x1, y=shape.y1),
]
new_shape = Polygon(points=points)
elif isinstance(shape, Ellipse):
coordinates = shape.get_evenly_distributed_ellipse_coordinates()
points = [Point(x=point[0], y=point[1]) for point in coordinates]
new_shape = Polygon(points=points)
else:
raise NotImplementedError(f"Conversion of a {type(shape)} to a polygon is not implemented yet: " f"{shape}")
return new_shape
@staticmethod
def shape_as_ellipse(shape: ShapeEntity) -> Ellipse:
"""Returns the inner-fitted ellipse for a given shape.
Args:
shape (ShapeEntity): Shape to convert.
Returns:
Ellipse: Ellipse representation of the shape.
Raises:
NotImplementedError: If the shape is not a rectangle or polygon.
"""
if isinstance(shape, Ellipse):
return shape
if isinstance(shape, Rectangle):
x1 = shape.x1
x2 = shape.x2
y1 = shape.y1
y2 = shape.y2
elif isinstance(shape, Polygon):
x1 = shape.min_x
x2 = shape.max_x
y1 = shape.min_y
y2 = shape.max_y
else:
raise NotImplementedError(f"Conversion of a {type(shape)} to an ellipse is not implemented yet: {shape}")
return Ellipse(x1=x1, y1=y1, x2=x2, y2=y2)
@staticmethod
def shape_produces_valid_crop(shape: ShapeEntity, media_width: int, media_height: int) -> bool:
"""Check if crop is valid.
Checks if the shape produces a valid crop based on the image width and height,
regardless of the contents of the image.
Args:
shape (ShapeEntity): Shape to check
media_width (int): Width of the image
media_height (int): Height of the image
Returns:
bool: True if the shape produces a valid crop, False otherwise
"""
is_valid = True
try:
shape_as_rectangle = ShapeFactory.shape_as_rectangle(shape=shape)
except ValueError:
# Thrown if the resulting bounding box is invalid
return False
# The min and max are to handle out-of-bounds coordinates
x1 = min(max(round(shape_as_rectangle.x1 * media_width), 0), media_width)
x2 = min(max(round(shape_as_rectangle.x2 * media_width), 0), media_width)
y1 = min(max(round(shape_as_rectangle.y1 * media_height), 0), media_height)
y2 = min(max(round(shape_as_rectangle.y2 * media_height), 0), media_height)
if x1 == x2 or y1 == y2:
is_valid = False
return is_valid
|
6b4b7f63bab8bedfc3b12af5087eb44b41914f44
|
ffdc77394c5b5532b243cf3c33bd584cbdc65cb7
|
/tests/ut/python/dataset/test_eager_vision.py
|
9f8760d9e2b7847baef9840518f5aa9b45b4351a
|
[
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MPL-1.0",
"OpenSSL",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause-Open-MPI",
"MIT",
"MPL-2.0-no-copyleft-exception",
"NTP",
"BSD-3-Clause",
"GPL-1.0-or-later",
"0BSD",
"MPL-2.0",
"LicenseRef-scancode-free-unknown",
"AGPL-3.0-only",
"Libpng",
"MPL-1.1",
"IJG",
"GPL-2.0-only",
"BSL-1.0",
"Zlib",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-python-cwi",
"BSD-2-Clause",
"LicenseRef-scancode-gary-s-brown",
"LGPL-2.1-only",
"LicenseRef-scancode-other-permissive",
"Python-2.0",
"LicenseRef-scancode-mit-nagy",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense"
] |
permissive
|
mindspore-ai/mindspore
|
ca7d5bb51a3451c2705ff2e583a740589d80393b
|
54acb15d435533c815ee1bd9f6dc0b56b4d4cf83
|
refs/heads/master
| 2023-07-29T09:17:11.051569
| 2023-07-17T13:14:15
| 2023-07-17T13:14:15
| 239,714,835
| 4,178
| 768
|
Apache-2.0
| 2023-07-26T22:31:11
| 2020-02-11T08:43:48
|
C++
|
UTF-8
|
Python
| false
| false
| 22,701
|
py
|
test_eager_vision.py
|
# Copyright 2020-2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Test Eager Support for Vision ops in Dataset"""
import cv2
import numpy as np
from PIL import Image
import pytest
from mindspore import log as logger
from mindspore import Tensor
import mindspore.dataset.transforms as transforms
import mindspore.dataset.vision as vision
def test_eager_decode_c():
"""
Feature: Decode op
Description: Test eager support for Decode Cpp implementation
Expectation: Output image size from op is correct
"""
img = np.fromfile("../data/dataset/apple.jpg", dtype=np.uint8)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.shape))
img = vision.Decode()(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.shape))
assert img.shape == (2268, 4032, 3)
fp = open("../data/dataset/apple.jpg", "rb")
img2 = fp.read()
img2 = vision.Decode()(img2)
logger.info("Image.type: {}, Image.shape: {}".format(
type(img2), img2.shape))
assert img2.shape == (2268, 4032, 3)
def test_eager_decode_py():
"""
Feature: Decode op
Description: Test eager support for Decode Python implementation
Expectation: Output image size from op is correct
"""
img = np.fromfile("../data/dataset/apple.jpg", dtype=np.uint8)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
img = vision.Decode(to_pil=True)(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
assert img.size == (4032, 2268)
fp = open("../data/dataset/apple.jpg", "rb")
img2 = fp.read()
img2 = vision.Decode(to_pil=True)(img2)
logger.info("Image.type: {}, Image.shape: {}".format(
type(img2), img2.size))
assert img2.size == (4032, 2268)
def test_eager_resize_c():
"""
Feature: Resize op
Description: Test eager support for Resize C++ implementation
Expectation: Output image size from op is correct
"""
img = cv2.imread("../data/dataset/apple.jpg")
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.shape))
img = vision.Resize(size=(64, 32))(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.shape))
assert img.shape == (64, 32, 3)
def test_eager_resize_py():
"""
Feature: Resize op
Description: Test eager support for Resize Python implementation
Expectation: Output image info from op is correct
"""
img = Image.open("../data/dataset/apple.jpg").convert("RGB")
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
img = vision.Resize(size=(96, 64))(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
assert img.size == (64, 96)
def test_eager_rescale():
"""
Feature: Rescale op
Description: Test eager support for Rescale op
Expectation: Output image info from op is correct
"""
img = cv2.imread("../data/dataset/apple.jpg")
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.shape))
pixel = img[0][0][0]
rescale_factor = 0.5
img = vision.Rescale(rescale=rescale_factor, shift=0)(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.shape))
pixel_rescaled = img[0][0][0]
assert pixel * rescale_factor == pixel_rescaled
def test_eager_normalize_hwc():
"""
Feature: Normalize op
Description: Test eager support for Normalize with HWC shape
Expectation: Output image info from op is correct
"""
img = Image.open("../data/dataset/apple.jpg").convert("RGB")
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
pixel = img.getpixel((0, 0))[0]
mean_vec = [100, 100, 100]
std_vec = [2, 2, 2]
img = vision.Normalize(mean=mean_vec, std=std_vec, is_hwc=True)(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.shape))
pixel_normalized = img[0][0][0]
assert (pixel - mean_vec[0]) / std_vec[0] == pixel_normalized
def test_eager_normalize_chw():
"""
Feature: Normalize op
Description: Test eager support for Normalize with CHW shape
Expectation: Output image info from op is correct
"""
img = Image.open("../data/dataset/apple.jpg").convert("RGB")
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
pixel = img.getpixel((0, 0))[0]
img = vision.ToTensor()(img)
mean_vec = [.100, .100, .100]
std_vec = [.2, .2, .2]
img = vision.Normalize(mean=mean_vec, std=std_vec, is_hwc=False)(img)
pixel_normalized = img[0][0][0]
assert (pixel / 255 - mean_vec[0]) / \
std_vec[0] == pytest.approx(pixel_normalized, 0.0001)
def test_eager_resize_totensor_normalize_py():
"""
Feature: Eager Support
Description: Test eager support for this sequence of Python ops: Resize, ToTensor and Normalize
Expectation: Output image info from op is correct
"""
img = Image.open("../data/dataset/apple.jpg").convert("RGB")
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
img = vision.Resize(size=(96, 64))(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
assert img.size == (64, 96)
pixel = img.getpixel((0, 0))[0]
img = vision.ToTensor()(img)
mean_vec = [.100, .100, .100]
std_vec = [.2, .2, .2]
img = vision.Normalize(mean=mean_vec, std=std_vec, is_hwc=False)(img)
pixel_normalized = img[0][0][0]
assert img.size == 64 * 96 * 3
assert (pixel / 255 - mean_vec[0]) / std_vec[0] == pytest.approx(pixel_normalized, 0.0001)
def test_eager_compose_py():
"""
Feature: Eager Support
Description: Test eager support for this sequence of Python ops: Resize, Compose with ToTensor and Normalize
Expectation: Output image info from op is correct
"""
img = Image.open("../data/dataset/apple.jpg").convert("RGB")
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
img = vision.Resize(size=(96, 64))(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
assert img.size == (64, 96)
pixel = img.getpixel((0, 0))[0]
mean_vec = [.100, .100, .100]
std_vec = [.2, .2, .2]
transform = transforms.Compose([
vision.ToTensor(),
vision.Normalize(mean=mean_vec, std=std_vec, is_hwc=False)])
# Convert to NumPy array
img = np.array(img)
output_size = 64 * 96 * 3
assert img.size == output_size
# Use Compose to apply transformation with ToTensor and Normalize
# Note: Output of Compose is a NumPy array
img = transform(img)
assert img.size == output_size
assert isinstance(img, np.ndarray)
pixel_normalized = img[0][0][0]
assert (pixel / 255 - mean_vec[0]) / std_vec[0] == pytest.approx(pixel_normalized, 0.0001)
def test_eager_hwc2chw():
"""
Feature: HWC2CHW op
Description: Test eager support for HWC2CHW op
Expectation: Output image size from op is correct
"""
img = cv2.imread("../data/dataset/apple.jpg")
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.shape))
channel = img.shape
img = vision.HWC2CHW()(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.shape))
channel_swapped = img.shape
assert channel == (channel_swapped[1],
channel_swapped[2], channel_swapped[0])
def test_eager_pad_c():
"""
Feature: Pad op
Description: Test eager support for Pad Cpp implementation
Expectation: Output image size info from op is correct
"""
img = cv2.imread("../data/dataset/apple.jpg")
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.shape))
img = vision.Resize(size=(32, 32))(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.shape))
shape_org = img.shape
pad = 4
img = vision.Pad(padding=pad)(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.shape))
shape_padded = img.shape
assert shape_padded == (
shape_org[0] + 2 * pad, shape_org[1] + 2 * pad, shape_org[2])
def test_eager_pad_py():
"""
Feature: Pad op
Description: Test eager support for Pad Python implementation
Expectation: Output image size info from op is correct
"""
img = Image.open("../data/dataset/apple.jpg").convert("RGB")
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
img = vision.Resize(size=(32, 32))(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
size = img.size
pad = 4
img = vision.Pad(padding=pad)(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
size_padded = img.size
assert size_padded == (size[0] + 2 * pad, size[1] + 2 * pad)
def test_eager_cutout_hwc_pil():
"""
Feature: CutOut op
Description: Test eager support for CutOut with HWC shape and PIL input
Expectation: Output image size info from op is correct
"""
img = Image.open("../data/dataset/apple.jpg").convert("RGB")
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
img = vision.Resize(size=(32, 32))(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
size = img.size
img = vision.CutOut(2, 4)(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.shape))
size_cutout = img.shape
assert (size_cutout[0], size_cutout[1]) == size
def test_eager_cutout_chw_pil():
"""
Feature: CutOut op
Description: Test eager support for CutOut with CHW shape and PIL input
Expectation: Receive non-None output image from op
"""
img = Image.open("../data/dataset/apple.jpg").convert("RGB")
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
img = vision.Resize(size=(32, 32))(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
img = vision.ToTensor()(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
img = vision.CutOut(2, 4, is_hwc=False)(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
assert img is not None
def test_eager_cutout_hwc_cv():
"""
Feature: CutOut op
Description: Test eager support for CutOut with HWC shape and CV input
Expectation: Output image size info from op is correct
"""
img = cv2.imread("../data/dataset/apple.jpg")
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
img = vision.Resize(size=(32, 32))(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
size = img.size
img = vision.CutOut(2, 4)(img)
logger.info("Image.type: {}, Image.shape: {}".format(type(img), img.size))
size_cutout = img.size
assert size_cutout == size
def test_eager_exceptions_decode():
"""
Feature: Decode op
Description: Exception eager support test for Decode
Expectation: Error input image is detected
"""
with pytest.raises(TypeError) as error_info:
img = "../data/dataset/apple.jpg"
_ = vision.Decode()(img)
assert "The type of the encoded image should be <class 'numpy.ndarray'>" in str(error_info.value)
with pytest.raises(TypeError) as error_info:
img = np.array(["a", "b", "c"])
_ = vision.Decode()(img)
assert "The data type of the encoded image can not be <class 'numpy.str_'>" in str(error_info.value)
def test_eager_exceptions_resize():
"""
Feature: Resize op
Description: Exception eager support test for Resize Python implementation
Expectation: Error input image is detected
"""
try:
img = cv2.imread("../data/dataset/apple.jpg")
_ = vision.Resize(size=(-32, 32))(img)
assert False
except ValueError as e:
assert "not within the required interval" in str(e)
def test_eager_exceptions_normalize():
"""
Feature: Normalize op
Description: Exception eager support test for Normalize Python implementation
Expectation: Error input image is detected
"""
try:
img = Image.open("../data/dataset/apple.jpg").convert("RGB")
mean_vec = [.100, .100, .100]
std_vec = [.2, .2, .2]
_ = vision.Normalize(mean=mean_vec, std=std_vec, is_hwc=False)(img)
assert False
except RuntimeError as e:
assert "Normalize: number of channels does not match the size of mean and std vectors" in str(
e)
def test_eager_exceptions_pad():
"""
Feature: Pad
Description: Test Pad with invalid input of string
Expectation: Raise TypeError
"""
try:
img = "../data/dataset/apple.jpg"
_ = vision.Pad(padding=4)(img)
except TypeError as e:
assert "Input should be NumPy or PIL image, got <class 'str'>." in str(e)
def test_eager_invalid_image_randomadjustsharpness():
"""
Feature: RandomAdjustSharpness op
Description: Exception eager support test for RandomAdjustSharpness op with invalid image input type
Expectation: Error input image is detected
"""
def test_config(my_input, error_type, error_msg):
with pytest.raises(error_type) as error_info:
_ = vision.RandomAdjustSharpness(degree=0.5, prob=1)(my_input)
assert error_msg in str(error_info.value)
my_input = np.random.rand(128, 128, 3)
test_config((10,), TypeError, "Input should be NumPy or PIL image, got <class 'tuple'>.")
test_config(10, TypeError, "Input should be NumPy or PIL image, got <class 'int'>.")
test_config(Tensor(my_input), TypeError,
"Input should be NumPy or PIL image, got <class 'mindspore.common.tensor.Tensor'>.")
def test_eager_invalid_image_hwc2chw():
"""
Feature: HWC2CHW op
Description: Exception eager support test for HWC2CHW op with invalid image input type
Expectation: Error input image is detected
"""
def test_config(my_input, error_type, error_msg):
with pytest.raises(error_type) as error_info:
_ = vision.HWC2CHW()(my_input)
assert error_msg in str(error_info.value)
my_input = np.random.randn(64, 32, 3).astype(np.int32).tolist()
test_config(my_input, TypeError, "Input should be NumPy or PIL image, got <class 'list'>.")
test_config(Tensor(my_input), TypeError,
"Input should be NumPy or PIL image, got <class 'mindspore.common.tensor.Tensor'>.")
def test_eager_invalid_image_invert():
"""
Feature: Invert op
Description: Exception eager support test for Invert op with invalid image type
Expectation: Error input image is detected
"""
def test_config(my_input, error_type, error_msg):
with pytest.raises(error_type) as error_info:
_ = vision.Invert()(my_input)
assert error_msg in str(error_info.value)
test_config((10,), TypeError, "Input should be NumPy or PIL image, got <class 'tuple'>.")
test_config(10, TypeError, "Input should be NumPy or PIL image, got <class 'int'>.")
def test_eager_invalid_image_pad():
"""
Feature: Pad op
Description: Exception eager support test for Pad op with invalid image input type
Expectation: Error input image is detected
"""
def test_config(my_input, error_type, error_msg):
with pytest.raises(error_type) as error_info:
_ = vision.Pad(padding=10)(my_input)
assert error_msg in str(error_info.value)
my_input = np.random.randn(64, 32, 3).astype(np.int32).tolist()
test_config(my_input, TypeError, "Input should be NumPy or PIL image, got <class 'list'>.")
test_config(Tensor(my_input), TypeError,
"Input should be NumPy or PIL image, got <class 'mindspore.common.tensor.Tensor'>.")
def test_eager_invalid_image_randomcrop():
"""
Feature: RandomCrop op
Description: Exception eager support test for RandomCrop op with invalid image input type
Expectation: Error input image is detected
"""
def test_config(my_input, error_type, error_msg):
with pytest.raises(error_type) as error_info:
_ = vision.RandomCrop(size=200)(my_input)
assert error_msg in str(error_info.value)
my_input = np.random.randint(0, 255, (987, 654, 3)).astype(np.uint8).tolist()
test_config(my_input, TypeError, "Input should be NumPy or PIL image, got <class 'list'>.")
def test_eager_invalid_image_randomhorizontalflip():
"""
Feature: RandomHorizontalFlip op
Description: Exception eager support test for RandomHorizontalFlip op with invalid image input type
Expectation: Error input image is detected
"""
def test_config(my_input, error_type, error_msg):
with pytest.raises(error_type) as error_info:
_ = vision.RandomHorizontalFlip(prob=1)(my_input)
assert error_msg in str(error_info.value)
img = cv2.imread("../data/dataset/apple.jpg")
my_input = img.tolist()
test_config(my_input, TypeError, "Input should be NumPy or PIL image, got <class 'list'>.")
def test_eager_invalid_image_randomsolarize():
"""
Feature: RandomSolarize op
Description: Exception eager support test for RandomSolarize op with invalid image input type
Expectation: Error input image is detected
"""
def test_config(my_input, error_type, error_msg):
with pytest.raises(error_type) as error_info:
_ = vision.RandomSolarize(threshold=(0, 120))(my_input)
assert error_msg in str(error_info.value)
my_input = np.random.randint(0, 255, (500, 600, 3)).astype(np.uint8).tolist()
test_config(my_input, TypeError, "Input should be NumPy or PIL image, got <class 'list'>.")
def test_eager_invalid_image_cutout():
"""
Feature: CutOut op
Description: Exception eager support test for CutOut op with invalid image input type
Expectation: Error input image is detected
"""
def test_config(my_input, error_type, error_msg):
with pytest.raises(error_type) as error_info:
_ = vision.CutOut(length=120, num_patches=1)(my_input)
assert error_msg in str(error_info.value)
my_input = np.random.randn(60, 50)
test_config(my_input, RuntimeError, "CutOut: shape is invalid.")
test_config(1, TypeError, "Input should be NumPy or PIL image, got <class 'int'>.")
test_config(1.0, TypeError, "Input should be NumPy or PIL image, got <class 'float'>.")
test_config((10, 20), TypeError, "Input should be NumPy or PIL image, got <class 'tuple'>.")
test_config([10, 20, 30], TypeError, "Input should be NumPy or PIL image, got <class 'list'>.")
def test_eager_invalid_image_randomcolor():
"""
Feature: RandomColor op
Description: Exception eager support test for RandomColor op with invalid image input type
Expectation: Error input image is detected
"""
def test_config(my_input, error_type, error_msg):
with pytest.raises(error_type) as error_info:
_ = vision.RandomColor(degrees=(0.2, 0.3))(my_input)
assert error_msg in str(error_info.value)
my_input = np.random.randn(1280, 1280, 3)
test_config(None, TypeError, "Input should be NumPy or PIL image, got <class 'NoneType'>.")
test_config(1, TypeError, "Input should be NumPy or PIL image, got <class 'int'>.")
test_config(1.0, TypeError, "Input should be NumPy or PIL image, got <class 'float'>.")
test_config((10, 20), TypeError, "Input should be NumPy or PIL image, got <class 'tuple'>.")
test_config([10, 20, 30], TypeError, "Input should be NumPy or PIL image, got <class 'list'>.")
test_config(Tensor(my_input), TypeError,
"Input should be NumPy or PIL image, got <class 'mindspore.common.tensor.Tensor'>.")
def test_eager_invalid_image_randomsharpness():
"""
Feature: RandomSharpness op
Description: Exception eager support test for RandomSharpness op with invalid image input type
Expectation: Error input image is detected
"""
def test_config(my_input, error_type, error_msg):
with pytest.raises(error_type) as error_info:
_ = vision.RandomSharpness(degrees=(0.2, 0.3))(my_input)
assert error_msg in str(error_info.value)
my_input = np.random.randn(1280, 1280, 3)
test_config(None, TypeError, "Input should be NumPy or PIL image, got <class 'NoneType'>.")
test_config(1, TypeError, "Input should be NumPy or PIL image, got <class 'int'>.")
test_config(1.0, TypeError, "Input should be NumPy or PIL image, got <class 'float'>.")
test_config((10, 20), TypeError, "Input should be NumPy or PIL image, got <class 'tuple'>.")
test_config([10, 20, 30], TypeError, "Input should be NumPy or PIL image, got <class 'list'>.")
test_config(Tensor(my_input), TypeError,
"Input should be NumPy or PIL image, got <class 'mindspore.common.tensor.Tensor'>.")
if __name__ == '__main__':
test_eager_decode_c()
test_eager_decode_py()
test_eager_resize_c()
test_eager_resize_py()
test_eager_rescale()
test_eager_normalize_hwc()
test_eager_normalize_chw()
test_eager_resize_totensor_normalize_py()
test_eager_compose_py()
test_eager_hwc2chw()
test_eager_pad_c()
test_eager_pad_py()
test_eager_cutout_hwc_pil()
test_eager_cutout_chw_pil()
test_eager_cutout_hwc_cv()
test_eager_exceptions_decode()
test_eager_exceptions_resize()
test_eager_exceptions_normalize()
test_eager_exceptions_pad()
test_eager_invalid_image_randomadjustsharpness()
test_eager_invalid_image_hwc2chw()
test_eager_invalid_image_invert()
test_eager_invalid_image_pad()
test_eager_invalid_image_randomcrop()
test_eager_invalid_image_randomhorizontalflip()
test_eager_invalid_image_randomsolarize()
test_eager_invalid_image_cutout()
test_eager_invalid_image_randomcolor()
test_eager_invalid_image_randomsharpness()
|
2e3dd4f72a2a4e86eeb389cf885fd48ec83f8cb7
|
0351ff5888ba1bec6b8643ea0b4fb4aa2d805b53
|
/biggraphite/cli/command_clean.py
|
10aacf2174e45529065eff5b3e38690cd15a5e7f
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
criteo/biggraphite
|
aa71ca2105df0da92d41c5894f191e4cc54f7a2e
|
1f647ada6b3f2b2f3fb4e59d326f73a2c891fc30
|
refs/heads/master
| 2022-12-11T04:00:28.341918
| 2021-10-01T09:07:29
| 2021-10-01T09:07:29
| 57,889,412
| 129
| 43
|
Apache-2.0
| 2022-11-04T19:39:42
| 2016-05-02T12:42:07
|
Python
|
UTF-8
|
Python
| false
| false
| 6,255
|
py
|
command_clean.py
|
#!/usr/bin/env python
# Copyright 2016 Criteo
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Clean Command."""
import logging
import os
import sys
import time
import progressbar
from biggraphite import metadata_cache
from biggraphite.cli import command
from prometheus_client import write_to_textfile, REGISTRY
_DEV_NULL = open(os.devnull, "w")
class CommandClean(command.BaseCommand):
"""Clean BigGraphite metric metadata from old metrics."""
NAME = "clean"
HELP = "Clean the metric metadata."
def __init__(self):
"""Constructor."""
self.pbar = None
self.metrics_file_path = ""
def add_arguments(self, parser):
"""Add custom arguments."""
parser.add_argument("--clean-cache", help="clean cache", action="store_true")
parser.add_argument(
"--clean-backend", help="clean backend", action="store_true"
)
parser.add_argument(
"--clean-corrupted", help="clean corrupted metrics", action="store_true"
)
parser.add_argument(
"--quiet",
action="store_const",
default=False,
const=True,
help="Show no output unless there are problems.",
)
parser.add_argument(
"--max-age",
help="Specify the age of metrics in seconds to evict"
" (ie: 3600 to delete older than one hour metrics)",
type=int,
default=3 * 24 * 60 * 60,
action="store",
)
parser.add_argument(
"--metrics-file-path",
help="Dump metrics in file",
type=str,
default="",
action="store"
)
command.add_sharding_arguments(parser)
command.add_clean_arguments(parser)
def run(self, accessor, opts, on_progress=None):
"""Run some cleanups.
See command.BaseCommand
"""
out_fd = sys.stderr
if opts.quiet:
out_fd = _DEV_NULL
self.metrics_file_path = opts.metrics_file_path
if self.pbar is None:
start_key = -1 * 2**63
end_key = 2**63 - 1
if opts.start_key is not None:
start_key = int(opts.start_key)
if opts.end_key is not None:
end_key = int(opts.end_key)
widgets = [
progressbar.Variable('token', format='(current: {formatted_value})'),
' ',
progressbar.Percentage(),
' ',
progressbar.SimpleProgress(
format='(%s)' % progressbar.SimpleProgress.DEFAULT_FORMAT
),
' ',
progressbar.Bar(),
' ',
progressbar.Timer(),
' ',
progressbar.AdaptiveETA(),
]
# max_value = end_key - start_key
self.pbar = progressbar.ProgressBar(
widgets=widgets,
fd=out_fd,
redirect_stderr=False,
min_value=0,
max_value=end_key - start_key)
self.pbar.start()
if on_progress is None:
def _on_progress(total, done, token):
self.pbar.update(total, token=token)
if self.metrics_file_path != "":
write_to_textfile(self.metrics_file_path, REGISTRY)
on_progress = _on_progress
accessor.connect()
if opts.clean_cache:
if opts.storage_dir:
settings = {"path": opts.storage_dir, "ttl": opts.max_age}
logging.info("Cleaning cache from %s", settings)
with metadata_cache.DiskCache(accessor, settings) as cache:
cache.clean()
else:
logging.error("Cannot clean disk cache because storage_dir" " is empty")
if opts.clean_backend:
logging.info("Cleaning backend, removing things before %d", opts.max_age)
accessor.clean(
max_age=opts.max_age,
shard=opts.shard,
nshards=opts.nshards,
start_key=opts.start_key,
end_key=opts.end_key,
callback_on_progress=on_progress,
disable_clean_directories=opts.disable_clean_directories,
disable_clean_metrics=opts.disable_clean_metrics,
)
if opts.clean_corrupted:
# Remove corrupt metrics.
now = time.time()
def callback(metric, done, total):
# TODO: Probably worth removing old metrics here
# instead of in the driver... The index doesn't work
# well anyway.
if metric.updated_on:
delta = now - time.mktime(metric.updated_on.timetuple())
else:
delta = now
if delta > opts.max_age:
logging.info("Removing %s (%s)" % (metric.name, delta))
accessor.delete_metric(metric.name)
on_progress(done, total)
def errback(metric):
logging.info("Removing %s" % metric)
accessor.delete_metric(metric)
logging.info("Cleaning corrupted metrics")
accessor.map(
callback,
shard=opts.shard,
nshards=opts.nshards,
start_key=opts.start_key,
end_key=opts.end_key,
errback=errback,
)
self.pbar.finish()
# Final metric dump
if self.metrics_file_path != "":
write_to_textfile(self.metrics_file_path, REGISTRY)
|
d0fcc0cbcd0fd778f84dc09620d4b0598a9e6901
|
f487532281c1c6a36a5c62a29744d8323584891b
|
/sdk/python/pulumi_azure/datafactory/managed_private_endpoint.py
|
3848ffa92265d7057583663ac80b94a158342619
|
[
"BSD-3-Clause",
"MPL-2.0",
"Apache-2.0"
] |
permissive
|
pulumi/pulumi-azure
|
a8f8f21c46c802aecf1397c737662ddcc438a2db
|
c16962e5c4f5810efec2806b8bb49d0da960d1ea
|
refs/heads/master
| 2023-08-25T00:17:05.290397
| 2023-08-24T06:11:55
| 2023-08-24T06:11:55
| 103,183,737
| 129
| 57
|
Apache-2.0
| 2023-09-13T05:44:10
| 2017-09-11T20:19:15
|
Java
|
UTF-8
|
Python
| false
| false
| 21,259
|
py
|
managed_private_endpoint.py
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = ['ManagedPrivateEndpointArgs', 'ManagedPrivateEndpoint']
@pulumi.input_type
class ManagedPrivateEndpointArgs:
def __init__(__self__, *,
data_factory_id: pulumi.Input[str],
target_resource_id: pulumi.Input[str],
fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
subresource_name: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a ManagedPrivateEndpoint resource.
:param pulumi.Input[str] data_factory_id: The ID of the Data Factory on which to create the Managed Private Endpoint. Changing this forces a new resource to be created.
:param pulumi.Input[str] target_resource_id: The ID of the Private Link Enabled Remote Resource which this Data Factory Private Endpoint should be connected to. Changing this forces a new resource to be created.
:param pulumi.Input[Sequence[pulumi.Input[str]]] fqdns: Fully qualified domain names. Changing this forces a new resource to be created.
> **NOTE:** Possible values are listed in [documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-overview#dns-configuration).
:param pulumi.Input[str] name: Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created.
:param pulumi.Input[str] subresource_name: Specifies the sub resource name which the Data Factory Private Endpoint is able to connect to. Changing this forces a new resource to be created.
"""
pulumi.set(__self__, "data_factory_id", data_factory_id)
pulumi.set(__self__, "target_resource_id", target_resource_id)
if fqdns is not None:
pulumi.set(__self__, "fqdns", fqdns)
if name is not None:
pulumi.set(__self__, "name", name)
if subresource_name is not None:
pulumi.set(__self__, "subresource_name", subresource_name)
@property
@pulumi.getter(name="dataFactoryId")
def data_factory_id(self) -> pulumi.Input[str]:
"""
The ID of the Data Factory on which to create the Managed Private Endpoint. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "data_factory_id")
@data_factory_id.setter
def data_factory_id(self, value: pulumi.Input[str]):
pulumi.set(self, "data_factory_id", value)
@property
@pulumi.getter(name="targetResourceId")
def target_resource_id(self) -> pulumi.Input[str]:
"""
The ID of the Private Link Enabled Remote Resource which this Data Factory Private Endpoint should be connected to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "target_resource_id")
@target_resource_id.setter
def target_resource_id(self, value: pulumi.Input[str]):
pulumi.set(self, "target_resource_id", value)
@property
@pulumi.getter
def fqdns(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Fully qualified domain names. Changing this forces a new resource to be created.
> **NOTE:** Possible values are listed in [documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-overview#dns-configuration).
"""
return pulumi.get(self, "fqdns")
@fqdns.setter
def fqdns(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "fqdns", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="subresourceName")
def subresource_name(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the sub resource name which the Data Factory Private Endpoint is able to connect to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "subresource_name")
@subresource_name.setter
def subresource_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "subresource_name", value)
@pulumi.input_type
class _ManagedPrivateEndpointState:
def __init__(__self__, *,
data_factory_id: Optional[pulumi.Input[str]] = None,
fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
subresource_name: Optional[pulumi.Input[str]] = None,
target_resource_id: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering ManagedPrivateEndpoint resources.
:param pulumi.Input[str] data_factory_id: The ID of the Data Factory on which to create the Managed Private Endpoint. Changing this forces a new resource to be created.
:param pulumi.Input[Sequence[pulumi.Input[str]]] fqdns: Fully qualified domain names. Changing this forces a new resource to be created.
> **NOTE:** Possible values are listed in [documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-overview#dns-configuration).
:param pulumi.Input[str] name: Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created.
:param pulumi.Input[str] subresource_name: Specifies the sub resource name which the Data Factory Private Endpoint is able to connect to. Changing this forces a new resource to be created.
:param pulumi.Input[str] target_resource_id: The ID of the Private Link Enabled Remote Resource which this Data Factory Private Endpoint should be connected to. Changing this forces a new resource to be created.
"""
if data_factory_id is not None:
pulumi.set(__self__, "data_factory_id", data_factory_id)
if fqdns is not None:
pulumi.set(__self__, "fqdns", fqdns)
if name is not None:
pulumi.set(__self__, "name", name)
if subresource_name is not None:
pulumi.set(__self__, "subresource_name", subresource_name)
if target_resource_id is not None:
pulumi.set(__self__, "target_resource_id", target_resource_id)
@property
@pulumi.getter(name="dataFactoryId")
def data_factory_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the Data Factory on which to create the Managed Private Endpoint. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "data_factory_id")
@data_factory_id.setter
def data_factory_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "data_factory_id", value)
@property
@pulumi.getter
def fqdns(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Fully qualified domain names. Changing this forces a new resource to be created.
> **NOTE:** Possible values are listed in [documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-overview#dns-configuration).
"""
return pulumi.get(self, "fqdns")
@fqdns.setter
def fqdns(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "fqdns", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="subresourceName")
def subresource_name(self) -> Optional[pulumi.Input[str]]:
"""
Specifies the sub resource name which the Data Factory Private Endpoint is able to connect to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "subresource_name")
@subresource_name.setter
def subresource_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "subresource_name", value)
@property
@pulumi.getter(name="targetResourceId")
def target_resource_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the Private Link Enabled Remote Resource which this Data Factory Private Endpoint should be connected to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "target_resource_id")
@target_resource_id.setter
def target_resource_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "target_resource_id", value)
class ManagedPrivateEndpoint(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
data_factory_id: Optional[pulumi.Input[str]] = None,
fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
subresource_name: Optional[pulumi.Input[str]] = None,
target_resource_id: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Manages a Data Factory Managed Private Endpoint.
## Example Usage
```python
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_factory = azure.datafactory.Factory("exampleFactory",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
managed_virtual_network_enabled=True)
example_account = azure.storage.Account("exampleAccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
account_kind="BlobStorage",
account_tier="Standard",
account_replication_type="LRS")
example_managed_private_endpoint = azure.datafactory.ManagedPrivateEndpoint("exampleManagedPrivateEndpoint",
data_factory_id=example_factory.id,
target_resource_id=example_account.id,
subresource_name="blob")
```
## Import
Data Factory Managed Private Endpoint can be imported using the `resource id`, e.g.
```sh
$ pulumi import azure:datafactory/managedPrivateEndpoint:ManagedPrivateEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.DataFactory/factories/example/managedVirtualNetworks/default/managedPrivateEndpoints/endpoint1
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] data_factory_id: The ID of the Data Factory on which to create the Managed Private Endpoint. Changing this forces a new resource to be created.
:param pulumi.Input[Sequence[pulumi.Input[str]]] fqdns: Fully qualified domain names. Changing this forces a new resource to be created.
> **NOTE:** Possible values are listed in [documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-overview#dns-configuration).
:param pulumi.Input[str] name: Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created.
:param pulumi.Input[str] subresource_name: Specifies the sub resource name which the Data Factory Private Endpoint is able to connect to. Changing this forces a new resource to be created.
:param pulumi.Input[str] target_resource_id: The ID of the Private Link Enabled Remote Resource which this Data Factory Private Endpoint should be connected to. Changing this forces a new resource to be created.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: ManagedPrivateEndpointArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Manages a Data Factory Managed Private Endpoint.
## Example Usage
```python
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_factory = azure.datafactory.Factory("exampleFactory",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
managed_virtual_network_enabled=True)
example_account = azure.storage.Account("exampleAccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
account_kind="BlobStorage",
account_tier="Standard",
account_replication_type="LRS")
example_managed_private_endpoint = azure.datafactory.ManagedPrivateEndpoint("exampleManagedPrivateEndpoint",
data_factory_id=example_factory.id,
target_resource_id=example_account.id,
subresource_name="blob")
```
## Import
Data Factory Managed Private Endpoint can be imported using the `resource id`, e.g.
```sh
$ pulumi import azure:datafactory/managedPrivateEndpoint:ManagedPrivateEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.DataFactory/factories/example/managedVirtualNetworks/default/managedPrivateEndpoints/endpoint1
```
:param str resource_name: The name of the resource.
:param ManagedPrivateEndpointArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(ManagedPrivateEndpointArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
data_factory_id: Optional[pulumi.Input[str]] = None,
fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
subresource_name: Optional[pulumi.Input[str]] = None,
target_resource_id: Optional[pulumi.Input[str]] = None,
__props__=None):
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = ManagedPrivateEndpointArgs.__new__(ManagedPrivateEndpointArgs)
if data_factory_id is None and not opts.urn:
raise TypeError("Missing required property 'data_factory_id'")
__props__.__dict__["data_factory_id"] = data_factory_id
__props__.__dict__["fqdns"] = fqdns
__props__.__dict__["name"] = name
__props__.__dict__["subresource_name"] = subresource_name
if target_resource_id is None and not opts.urn:
raise TypeError("Missing required property 'target_resource_id'")
__props__.__dict__["target_resource_id"] = target_resource_id
super(ManagedPrivateEndpoint, __self__).__init__(
'azure:datafactory/managedPrivateEndpoint:ManagedPrivateEndpoint',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
data_factory_id: Optional[pulumi.Input[str]] = None,
fqdns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
subresource_name: Optional[pulumi.Input[str]] = None,
target_resource_id: Optional[pulumi.Input[str]] = None) -> 'ManagedPrivateEndpoint':
"""
Get an existing ManagedPrivateEndpoint resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] data_factory_id: The ID of the Data Factory on which to create the Managed Private Endpoint. Changing this forces a new resource to be created.
:param pulumi.Input[Sequence[pulumi.Input[str]]] fqdns: Fully qualified domain names. Changing this forces a new resource to be created.
> **NOTE:** Possible values are listed in [documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-overview#dns-configuration).
:param pulumi.Input[str] name: Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created.
:param pulumi.Input[str] subresource_name: Specifies the sub resource name which the Data Factory Private Endpoint is able to connect to. Changing this forces a new resource to be created.
:param pulumi.Input[str] target_resource_id: The ID of the Private Link Enabled Remote Resource which this Data Factory Private Endpoint should be connected to. Changing this forces a new resource to be created.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _ManagedPrivateEndpointState.__new__(_ManagedPrivateEndpointState)
__props__.__dict__["data_factory_id"] = data_factory_id
__props__.__dict__["fqdns"] = fqdns
__props__.__dict__["name"] = name
__props__.__dict__["subresource_name"] = subresource_name
__props__.__dict__["target_resource_id"] = target_resource_id
return ManagedPrivateEndpoint(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="dataFactoryId")
def data_factory_id(self) -> pulumi.Output[str]:
"""
The ID of the Data Factory on which to create the Managed Private Endpoint. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "data_factory_id")
@property
@pulumi.getter
def fqdns(self) -> pulumi.Output[Sequence[str]]:
"""
Fully qualified domain names. Changing this forces a new resource to be created.
> **NOTE:** Possible values are listed in [documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-overview#dns-configuration).
"""
return pulumi.get(self, "fqdns")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="subresourceName")
def subresource_name(self) -> pulumi.Output[Optional[str]]:
"""
Specifies the sub resource name which the Data Factory Private Endpoint is able to connect to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "subresource_name")
@property
@pulumi.getter(name="targetResourceId")
def target_resource_id(self) -> pulumi.Output[str]:
"""
The ID of the Private Link Enabled Remote Resource which this Data Factory Private Endpoint should be connected to. Changing this forces a new resource to be created.
"""
return pulumi.get(self, "target_resource_id")
|
8a3fa06daa3e454e257d5ac5eb773cb0916a5d79
|
704976ea552111c6a5af9cd7cb62b9d9abaf3996
|
/pypy/objspace/std/test/test_setstrategies.py
|
1088d8c734cb348fdbe86ccf222f729d02453262
|
[
"BSD-3-Clause"
] |
permissive
|
mesalock-linux/mesapy
|
4f02c5819ce7f2f6e249d34840f1aa097577645d
|
ed546d59a21b36feb93e2309d5c6b75aa0ad95c9
|
refs/heads/mesapy2.7
| 2023-08-16T21:33:02.239581
| 2019-08-13T10:29:43
| 2019-08-13T18:06:45
| 136,080,721
| 396
| 33
|
NOASSERTION
| 2020-04-01T03:05:18
| 2018-06-04T20:45:17
|
Python
|
UTF-8
|
Python
| false
| false
| 6,034
|
py
|
test_setstrategies.py
|
from pypy.objspace.std.setobject import W_SetObject
from pypy.objspace.std.setobject import (
BytesIteratorImplementation, BytesSetStrategy, EmptySetStrategy,
IntegerIteratorImplementation, IntegerSetStrategy, ObjectSetStrategy,
UnicodeIteratorImplementation, UnicodeSetStrategy)
from pypy.objspace.std.listobject import W_ListObject
class TestW_SetStrategies:
def wrapped(self, l):
return W_ListObject(self.space, [self.space.wrap(x) for x in l])
def test_from_list(self):
s = W_SetObject(self.space, self.wrapped([1,2,3,4,5]))
assert s.strategy is self.space.fromcache(IntegerSetStrategy)
s = W_SetObject(self.space, self.wrapped([1,"two",3,"four",5]))
assert s.strategy is self.space.fromcache(ObjectSetStrategy)
s = W_SetObject(self.space)
assert s.strategy is self.space.fromcache(EmptySetStrategy)
s = W_SetObject(self.space, self.wrapped([]))
assert s.strategy is self.space.fromcache(EmptySetStrategy)
s = W_SetObject(self.space, self.wrapped(["a", "b"]))
assert s.strategy is self.space.fromcache(BytesSetStrategy)
s = W_SetObject(self.space, self.wrapped([u"a", u"b"]))
assert s.strategy is self.space.fromcache(UnicodeSetStrategy)
def test_switch_to_object(self):
s = W_SetObject(self.space, self.wrapped([1,2,3,4,5]))
s.add(self.space.wrap("six"))
assert s.strategy is self.space.fromcache(ObjectSetStrategy)
s1 = W_SetObject(self.space, self.wrapped([1,2,3,4,5]))
s2 = W_SetObject(self.space, self.wrapped(["six", "seven"]))
s1.update(s2)
assert s1.strategy is self.space.fromcache(ObjectSetStrategy)
def test_switch_to_unicode(self):
s = W_SetObject(self.space, self.wrapped([]))
s.add(self.space.wrap(u"six"))
assert s.strategy is self.space.fromcache(UnicodeSetStrategy)
def test_symmetric_difference(self):
s1 = W_SetObject(self.space, self.wrapped([1,2,3,4,5]))
s2 = W_SetObject(self.space, self.wrapped(["six", "seven"]))
s1.symmetric_difference_update(s2)
assert s1.strategy is self.space.fromcache(ObjectSetStrategy)
def test_intersection(self):
s1 = W_SetObject(self.space, self.wrapped([1,2,3,4,5]))
s2 = W_SetObject(self.space, self.wrapped([4,5, "six", "seven"]))
s3 = s1.intersect(s2)
skip("for now intersection with ObjectStrategy always results in another ObjectStrategy")
assert s3.strategy is self.space.fromcache(IntegerSetStrategy)
def test_clear(self):
s1 = W_SetObject(self.space, self.wrapped([1,2,3,4,5]))
s1.clear()
assert s1.strategy is self.space.fromcache(EmptySetStrategy)
def test_remove(self):
s1 = W_SetObject(self.space, self.wrapped([1]))
self.space.call_method(s1, 'remove', self.space.wrap(1))
assert s1.strategy is self.space.fromcache(EmptySetStrategy)
def test_union(self):
s1 = W_SetObject(self.space, self.wrapped([1,2,3,4,5]))
s2 = W_SetObject(self.space, self.wrapped([4,5,6,7]))
s3 = W_SetObject(self.space, self.wrapped([4,'5','6',7]))
s4 = s1.descr_union(self.space, [s2])
s5 = s1.descr_union(self.space, [s3])
assert s4.strategy is self.space.fromcache(IntegerSetStrategy)
assert s5.strategy is self.space.fromcache(ObjectSetStrategy)
def test_discard(self):
class FakeInt(object):
def __init__(self, value):
self.value = value
def __hash__(self):
return hash(self.value)
def __eq__(self, other):
if other == self.value:
return True
return False
s1 = W_SetObject(self.space, self.wrapped([1,2,3,4,5]))
s1.descr_discard(self.space, self.space.wrap("five"))
skip("currently not supported")
assert s1.strategy is self.space.fromcache(IntegerSetStrategy)
set_discard__Set_ANY(self.space, s1, self.space.wrap(FakeInt(5)))
assert s1.strategy is self.space.fromcache(ObjectSetStrategy)
def test_has_key(self):
class FakeInt(object):
def __init__(self, value):
self.value = value
def __hash__(self):
return hash(self.value)
def __eq__(self, other):
if other == self.value:
return True
return False
s1 = W_SetObject(self.space, self.wrapped([1,2,3,4,5]))
assert not s1.has_key(self.space.wrap("five"))
skip("currently not supported")
assert s1.strategy is self.space.fromcache(IntegerSetStrategy)
assert s1.has_key(self.space.wrap(FakeInt(2)))
assert s1.strategy is self.space.fromcache(ObjectSetStrategy)
def test_iter(self):
space = self.space
s = W_SetObject(space, self.wrapped([1,2]))
it = s.iter()
assert isinstance(it, IntegerIteratorImplementation)
assert space.unwrap(it.next()) == 1
assert space.unwrap(it.next()) == 2
#
s = W_SetObject(space, self.wrapped(["a", "b"]))
it = s.iter()
assert isinstance(it, BytesIteratorImplementation)
assert space.unwrap(it.next()) == "a"
assert space.unwrap(it.next()) == "b"
#
s = W_SetObject(space, self.wrapped([u"a", u"b"]))
it = s.iter()
assert isinstance(it, UnicodeIteratorImplementation)
assert space.unwrap(it.next()) == u"a"
assert space.unwrap(it.next()) == u"b"
def test_listview(self):
space = self.space
s = W_SetObject(space, self.wrapped([1,2]))
assert sorted(space.listview_int(s)) == [1, 2]
#
s = W_SetObject(space, self.wrapped(["a", "b"]))
assert sorted(space.listview_bytes(s)) == ["a", "b"]
#
s = W_SetObject(space, self.wrapped([u"a", u"b"]))
assert sorted(space.listview_unicode(s)) == [u"a", u"b"]
|
13f04cab29128cd237a248eaf5f90de24492369f
|
23cb4636462e4cd85f0ab238684b37f75a176396
|
/src/gerrit/review/review.py
|
c701fdef8e8a476b5b5c208cbfcf9cd61eb2a486
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
SAP/InfraBox
|
0c4489de996438b332f1cea70e767ba3ff906117
|
481f23d5fce7c9654bc0b0a5a54d4c77b728adf0
|
refs/heads/master
| 2023-08-14T17:58:39.147263
| 2023-07-24T07:12:50
| 2023-07-24T07:12:50
| 126,344,645
| 275
| 81
|
Apache-2.0
| 2023-09-12T05:52:12
| 2018-03-22T14:06:46
|
Python
|
UTF-8
|
Python
| false
| false
| 6,459
|
py
|
review.py
|
import json
import select
import urllib
import time
import os
import psycopg2
import paramiko
from pyinfraboxutils import get_logger, get_env, get_root_url
from pyinfraboxutils.db import connect_db
from pyinfraboxutils.leader import elect_leader, is_leader, is_active
logger = get_logger("gerrit")
def execute_sql(conn, stmt, params): # pragma: no cover
c = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
c.execute(stmt, params)
result = c.fetchall()
c.close()
return result
def main():
get_env('INFRABOX_VERSION')
get_env('INFRABOX_DATABASE_DB')
get_env('INFRABOX_DATABASE_USER')
get_env('INFRABOX_DATABASE_PASSWORD')
get_env('INFRABOX_DATABASE_HOST')
get_env('INFRABOX_DATABASE_PORT')
get_env('INFRABOX_GERRIT_PORT')
get_env('INFRABOX_GERRIT_HOSTNAME')
get_env('INFRABOX_GERRIT_USERNAME')
get_env('INFRABOX_GERRIT_KEY_FILENAME')
cluster_name = get_env('INFRABOX_CLUSTER_NAME')
conn = connect_db()
conn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT)
logger.info("Connected to database")
elect_leader(conn, 'gerrit-review' ,cluster_name)
curs = conn.cursor()
curs.execute("LISTEN job_update;")
logger.info("Waiting for job updates")
while True:
if not is_active(conn, cluster_name):
logger.info("cluster is inactive or disabled, sleeping")
time.sleep(5)
continue
is_leader(conn, 'gerrit-review', cluster_name)
curs.execute('commit;')
while conn.notifies:
notify = conn.notifies.pop(0)
logger.debug("got notify: %s" % notify.payload)
handle_job_update(conn, json.loads(notify.payload))
time.sleep(3)
def handle_job_update_retry(conn, update):
for _ in xrange(0, 3):
try:
handle_job_update(conn, update)
return
except:
logger.exception("Exception occured")
logger.error('Failed to set review multiple times. Restarting')
def execute_ssh_cmd(client, cmd):
_, stdout, stderr = client.exec_command(cmd)
err = stderr.read()
if err:
logger.error(err)
out = stdout.read()
if out:
logger.error(out)
def handle_job_update(conn, event):
if event['type'] != 'UPDATE':
return
job_id = event['job_id']
c = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
c.execute('''
SELECT id, state, name, project_id, build_id
FROM job
WHERE id = %s
''', [job_id])
job = c.fetchone()
c.close()
if not job:
return
project_id = job['project_id']
build_id = job['build_id']
c = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
c.execute('''
SELECT id, name, type
FROM project
WHERE id = %s
''', [project_id])
project = c.fetchone()
c.close()
if not project:
return
if project['type'] != 'gerrit':
return
c = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
c.execute('''
SELECT id, build_number, restart_counter, commit_id
FROM build
WHERE id = %s
''', [build_id])
build = c.fetchone()
c.close()
project_name = project['name']
project_id = project['id']
job_state = job['state']
job_name = job['name']
commit_sha = build['commit_id']
build_id = build['id']
build_number = build['build_number']
build_restart_counter = build['restart_counter']
if job_state in ('queued', 'scheduled', 'running'):
return
gerrit_port = int(get_env('INFRABOX_GERRIT_PORT'))
gerrit_hostname = get_env('INFRABOX_GERRIT_HOSTNAME')
gerrit_username = get_env('INFRABOX_GERRIT_USERNAME')
gerrit_key_filename = get_env('INFRABOX_GERRIT_KEY_FILENAME')
ha_mode = os.environ.get('INFRABOX_HA_ENABLED') == 'true'
if ha_mode:
dashboard_url = get_root_url('global')
else:
dashboard_url = execute_sql(conn, '''
SELECT root_url
FROM cluster
WHERE name = 'master'
''', [])[0]['root_url']
client = paramiko.SSHClient()
client.load_system_host_keys()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect(username=gerrit_username,
hostname=gerrit_hostname,
port=gerrit_port,
key_filename=gerrit_key_filename)
client.get_transport().set_keepalive(60)
project_name_quote = urllib.quote_plus(project_name).replace('+', '%20')
build_url = "%s/dashboard/#/project/%s/build/%s/%s" % (dashboard_url,
project_name_quote,
build_number,
build_restart_counter)
c = conn.cursor()
c.execute('''
SELECT count(*)
FROM build
WHERE build_number = %s
AND restart_counter > %s
AND project_id = %s''', [build_number, build_restart_counter, project_id])
newer_builds = c.fetchone()[0]
c.close()
update_vote = True
if newer_builds > 0:
update_vote = False
c = conn.cursor()
c.execute('''
SELECT state, count(*)
FROM job
WHERE build_id = %s
AND restarted = false
GROUP BY state''', [build_id])
states = c.fetchall()
c.close()
vote = None
if len(states) == 1 and states[0][0] == 'finished':
# all finished
vote = "+1"
message = "Build finished: %s" % build_url
else:
for s in states:
if s[0] in ('running', 'scheduled', 'queued'):
# still some running
vote = "0"
message = "Build running: %s" % build_url
break
elif s[0] != 'finished':
# not successful
vote = "-1"
message = "Build failed: %s" % build_url
if (job_name == 'Create Jobs' and vote == '0') or vote in ('-1', '+1'):
logger.info('Setting InfraBox=%s for sha=%s', vote, commit_sha)
cmd = 'gerrit review --project %s -m "%s" ' % (project_name, message)
if update_vote:
cmd += '--label InfraBox=%s ' % vote
cmd += commit_sha
execute_ssh_cmd(client, cmd)
client.close()
if __name__ == "__main__":
main()
|
0ce7b90f0647a608b56b30a2505356a0ba4adb59
|
5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d
|
/alipay/aop/api/domain/AlipayIserviceIsresourceUserquerybyclvuidsQueryModel.py
|
4c6385f7efc7ee14b8318de1e09808c3352e454f
|
[
"Apache-2.0"
] |
permissive
|
alipay/alipay-sdk-python-all
|
8bd20882852ffeb70a6e929038bf88ff1d1eff1c
|
1fad300587c9e7e099747305ba9077d4cd7afde9
|
refs/heads/master
| 2023-08-27T21:35:01.778771
| 2023-08-23T07:12:26
| 2023-08-23T07:12:26
| 133,338,689
| 247
| 70
|
Apache-2.0
| 2023-04-25T04:54:02
| 2018-05-14T09:40:54
|
Python
|
UTF-8
|
Python
| false
| false
| 3,649
|
py
|
AlipayIserviceIsresourceUserquerybyclvuidsQueryModel.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayIserviceIsresourceUserquerybyclvuidsQueryModel(object):
def __init__(self):
self._clv_user_ids = None
self._query_role = None
self._query_skill_group = None
self._query_user_resource = None
self._tnt_inst_id = None
@property
def clv_user_ids(self):
return self._clv_user_ids
@clv_user_ids.setter
def clv_user_ids(self, value):
if isinstance(value, list):
self._clv_user_ids = list()
for i in value:
self._clv_user_ids.append(i)
@property
def query_role(self):
return self._query_role
@query_role.setter
def query_role(self, value):
self._query_role = value
@property
def query_skill_group(self):
return self._query_skill_group
@query_skill_group.setter
def query_skill_group(self, value):
self._query_skill_group = value
@property
def query_user_resource(self):
return self._query_user_resource
@query_user_resource.setter
def query_user_resource(self, value):
self._query_user_resource = value
@property
def tnt_inst_id(self):
return self._tnt_inst_id
@tnt_inst_id.setter
def tnt_inst_id(self, value):
self._tnt_inst_id = value
def to_alipay_dict(self):
params = dict()
if self.clv_user_ids:
if isinstance(self.clv_user_ids, list):
for i in range(0, len(self.clv_user_ids)):
element = self.clv_user_ids[i]
if hasattr(element, 'to_alipay_dict'):
self.clv_user_ids[i] = element.to_alipay_dict()
if hasattr(self.clv_user_ids, 'to_alipay_dict'):
params['clv_user_ids'] = self.clv_user_ids.to_alipay_dict()
else:
params['clv_user_ids'] = self.clv_user_ids
if self.query_role:
if hasattr(self.query_role, 'to_alipay_dict'):
params['query_role'] = self.query_role.to_alipay_dict()
else:
params['query_role'] = self.query_role
if self.query_skill_group:
if hasattr(self.query_skill_group, 'to_alipay_dict'):
params['query_skill_group'] = self.query_skill_group.to_alipay_dict()
else:
params['query_skill_group'] = self.query_skill_group
if self.query_user_resource:
if hasattr(self.query_user_resource, 'to_alipay_dict'):
params['query_user_resource'] = self.query_user_resource.to_alipay_dict()
else:
params['query_user_resource'] = self.query_user_resource
if self.tnt_inst_id:
if hasattr(self.tnt_inst_id, 'to_alipay_dict'):
params['tnt_inst_id'] = self.tnt_inst_id.to_alipay_dict()
else:
params['tnt_inst_id'] = self.tnt_inst_id
return params
@staticmethod
def from_alipay_dict(d):
if not d:
return None
o = AlipayIserviceIsresourceUserquerybyclvuidsQueryModel()
if 'clv_user_ids' in d:
o.clv_user_ids = d['clv_user_ids']
if 'query_role' in d:
o.query_role = d['query_role']
if 'query_skill_group' in d:
o.query_skill_group = d['query_skill_group']
if 'query_user_resource' in d:
o.query_user_resource = d['query_user_resource']
if 'tnt_inst_id' in d:
o.tnt_inst_id = d['tnt_inst_id']
return o
|
3385ba5bbfa5f542d695a8fbf72d5dbcdb21e1c9
|
5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d
|
/alipay/aop/api/domain/EnterpriseOpenRuleRelationInfo.py
|
88c8cc013217f6b623a48000325c99ba0969100e
|
[
"Apache-2.0"
] |
permissive
|
alipay/alipay-sdk-python-all
|
8bd20882852ffeb70a6e929038bf88ff1d1eff1c
|
1fad300587c9e7e099747305ba9077d4cd7afde9
|
refs/heads/master
| 2023-08-27T21:35:01.778771
| 2023-08-23T07:12:26
| 2023-08-23T07:12:26
| 133,338,689
| 247
| 70
|
Apache-2.0
| 2023-04-25T04:54:02
| 2018-05-14T09:40:54
|
Python
|
UTF-8
|
Python
| false
| false
| 2,973
|
py
|
EnterpriseOpenRuleRelationInfo.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class EnterpriseOpenRuleRelationInfo(object):
def __init__(self):
self._enterprise_id = None
self._gmt_create = None
self._gmt_modified = None
self._owner_id = None
self._standard_id = None
@property
def enterprise_id(self):
return self._enterprise_id
@enterprise_id.setter
def enterprise_id(self, value):
self._enterprise_id = value
@property
def gmt_create(self):
return self._gmt_create
@gmt_create.setter
def gmt_create(self, value):
self._gmt_create = value
@property
def gmt_modified(self):
return self._gmt_modified
@gmt_modified.setter
def gmt_modified(self, value):
self._gmt_modified = value
@property
def owner_id(self):
return self._owner_id
@owner_id.setter
def owner_id(self, value):
self._owner_id = value
@property
def standard_id(self):
return self._standard_id
@standard_id.setter
def standard_id(self, value):
self._standard_id = value
def to_alipay_dict(self):
params = dict()
if self.enterprise_id:
if hasattr(self.enterprise_id, 'to_alipay_dict'):
params['enterprise_id'] = self.enterprise_id.to_alipay_dict()
else:
params['enterprise_id'] = self.enterprise_id
if self.gmt_create:
if hasattr(self.gmt_create, 'to_alipay_dict'):
params['gmt_create'] = self.gmt_create.to_alipay_dict()
else:
params['gmt_create'] = self.gmt_create
if self.gmt_modified:
if hasattr(self.gmt_modified, 'to_alipay_dict'):
params['gmt_modified'] = self.gmt_modified.to_alipay_dict()
else:
params['gmt_modified'] = self.gmt_modified
if self.owner_id:
if hasattr(self.owner_id, 'to_alipay_dict'):
params['owner_id'] = self.owner_id.to_alipay_dict()
else:
params['owner_id'] = self.owner_id
if self.standard_id:
if hasattr(self.standard_id, 'to_alipay_dict'):
params['standard_id'] = self.standard_id.to_alipay_dict()
else:
params['standard_id'] = self.standard_id
return params
@staticmethod
def from_alipay_dict(d):
if not d:
return None
o = EnterpriseOpenRuleRelationInfo()
if 'enterprise_id' in d:
o.enterprise_id = d['enterprise_id']
if 'gmt_create' in d:
o.gmt_create = d['gmt_create']
if 'gmt_modified' in d:
o.gmt_modified = d['gmt_modified']
if 'owner_id' in d:
o.owner_id = d['owner_id']
if 'standard_id' in d:
o.standard_id = d['standard_id']
return o
|
2b74fce58dddd3b0ec51fd304a75b3fd56e3c55d
|
9ed3b16b3da72e4c47a04f2f2e3ef395e9fd9f20
|
/contrib/pigz/template.py
|
d68ab3187de604f3c3aec43447b3ec51de131fc5
|
[
"BSD-2-Clause"
] |
permissive
|
chimera-linux/cports
|
fdae59dc25856942be3041e10e3533dbf8f883c3
|
714680161cd719dd047452c95fbb9b447bc23a86
|
refs/heads/master
| 2023-09-03T19:30:40.720670
| 2023-09-03T15:07:40
| 2023-09-03T15:07:40
| 374,000,317
| 118
| 37
|
BSD-2-Clause
| 2023-09-14T20:31:08
| 2021-06-05T02:07:34
|
Python
|
UTF-8
|
Python
| false
| false
| 601
|
py
|
template.py
|
pkgname = "pigz"
pkgver = "2.8"
pkgrel = 0
build_style = "makefile"
make_check_target = "test"
makedepends = ["zlib-devel"]
pkgdesc = "Parallel implementation of gzip"
maintainer = "psykose <alice@ayaya.dev>"
license = "Zlib"
url = "https://github.com/madler/pigz"
source = f"https://zlib.net/pigz/pigz-{pkgver}.tar.gz"
sha256 = "eb872b4f0e1f0ebe59c9f7bd8c506c4204893ba6a8492de31df416f0d5170fd0"
hardening = ["vis", "cfi"]
def do_install(self):
self.install_bin("pigz")
self.install_bin("unpigz")
self.install_man("pigz.1")
self.install_link("pigz.1", "usr/share/man/man1/unpigz.1")
|
6fcb715425340fbbe5878e93a98a8b0b061d0364
|
3c41443364da8b44c74dce08ef94a1acd1b66b3e
|
/addons/forward/tests/test_models.py
|
3a544a2f12cccf342d62a6565c3694d837f535ce
|
[
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer",
"AGPL-3.0-only",
"LGPL-2.0-or-later",
"LicenseRef-scancode-proprietary-license",
"MPL-1.1",
"CPAL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause",
"Apache-2.0"
] |
permissive
|
CenterForOpenScience/osf.io
|
71d9540be7989f7118a33e15bc4a6ce2d2492ac1
|
a3e0a0b9ddda5dd75fc8248d58f3bcdeece0323e
|
refs/heads/develop
| 2023-09-04T03:21:14.970917
| 2023-08-31T14:49:20
| 2023-08-31T14:49:20
| 10,199,599
| 683
| 390
|
Apache-2.0
| 2023-09-14T17:07:52
| 2013-05-21T15:53:37
|
Python
|
UTF-8
|
Python
| false
| false
| 1,732
|
py
|
test_models.py
|
# -*- coding: utf-8 -*-
import unittest
from nose.tools import assert_raises, assert_equal
import pytest
from django.core.exceptions import ValidationError
from osf_tests.factories import ProjectFactory, RegistrationFactory
from addons.forward.tests.factories import ForwardSettingsFactory
pytestmark = pytest.mark.django_db
class TestNodeSettings(unittest.TestCase):
def setUp(self):
super(TestNodeSettings, self).setUp()
self.node = ProjectFactory()
self.settings = ForwardSettingsFactory(owner=self.node)
self.node.save()
def test_forward_registered(self):
registration = RegistrationFactory(project=self.node)
assert registration.has_addon('forward')
forward = registration.get_addon('forward')
assert_equal(forward.url, 'http://frozen.pizza.reviews/')
@pytest.mark.enable_implicit_clean
class TestSettingsValidation(unittest.TestCase):
def setUp(self):
super(TestSettingsValidation, self).setUp()
self.settings = ForwardSettingsFactory()
def test_validate_url_bad(self):
self.settings.url = 'badurl'
with assert_raises(ValidationError):
self.settings.save()
def test_validate_url_good(self):
self.settings.url = 'http://frozen.pizza.reviews/'
try:
self.settings.save()
except ValidationError:
assert 0
def test_label_sanitary(self):
self.settings.label = 'safe'
try:
self.settings.save()
except ValidationError:
assert False
def test_label_unsanitary(self):
self.settings.label = 'un<br />safe'
with assert_raises(ValidationError):
self.settings.save()
|
9f2758b283c2326d32563799d596b10578cd3c3d
|
23eafaa60b66769190227c80ac1b087697c72ed8
|
/common/devpi_common/types.py
|
145b875f233df25dbb8f90ba5f00960265d4b6df
|
[
"MIT"
] |
permissive
|
devpi/devpi
|
fe4d76f2ab57da3a766a9e13c51cd4f229598083
|
56c266744ddfd182d46ca480b787ab44a6ee4692
|
refs/heads/main
| 2023-09-04T02:57:22.075986
| 2023-08-06T10:32:46
| 2023-08-06T10:32:46
| 86,787,680
| 760
| 148
| null | 2023-09-09T19:53:10
| 2017-03-31T06:51:39
|
Python
|
UTF-8
|
Python
| false
| false
| 4,861
|
py
|
types.py
|
from __future__ import absolute_import, unicode_literals
from lazy import lazy as cached_property # noqa
from types import FunctionType
import hashlib
import operator
# re-introduced for 2.0 series but not used anymore
def propmapping(name, convert=None):
if convert is None:
def fget(self):
return self._mapping.get(name)
else:
def fget(self):
x = self._mapping.get(name)
if x is not None:
x = convert(x)
return x
fget.__name__ = name
return property(fget)
def canraise(Error):
def wrap(func):
func.Error = Error
return func
return wrap
class CompareMixin(object):
def _cmp(self, other, op):
return op(self.cmpval, other.cmpval)
def __lt__(self, other):
return self._cmp(other, operator.lt)
def __le__(self, other):
return self._cmp(other, operator.le)
def __eq__(self, other):
return self._cmp(other, operator.eq)
def __ne__(self, other):
return self._cmp(other, operator.ne)
def __ge__(self, other):
return self._cmp(other, operator.ge)
def __gt__(self, other):
return self._cmp(other, operator.gt)
class lazydecorator:
"""
lazy decorators: remove global state from your app, e.g. Bottle and Flask.
A lazy decorator takes the place of another decorator, but just memoizes
decoration parameters and lets you choose when to apply the actual decorator. This means that you are not tied to apply decorators like the typical
flask/bottle ``@app.route("/index")`` at import time and thus don't
need to create a global ``app`` object.
Example usage in a module.py:
from lazydecorator import lazydecorator
route = lazydecorator()
class MyServer:
@route("/index")
def index(self):
pass
The lazydecorator "route" instance returns the same ``index`` function it
receives but sets an attribute to remember the ``("/index")`` parameter.
Later, after importing the ``module`` you can then apply your ``@app.route``
decorator like this::
def create_app():
app = Bottle()
import module
myserver = module.MyServer()
module.route.discover_and_call(myserver, app.route)
# The app.route decorator is called with the bound
# ``myserver.index`` method
order of registrations is preserved.
(c) holger krekel, 2013, License: MIT
"""
def __init__(self):
self.attrname = "_" + hex(id(self))
self.num = 0
def __call__(self, *args, **kwargs):
def decorate(func):
try:
num, siglist = getattr(func, self.attrname)
except AttributeError:
siglist = []
func.__dict__[self.attrname] = (self.num, siglist)
self.num += 1
siglist.append((args, kwargs))
return func
return decorate
def discover(self, obj):
decitems = []
if isinstance(obj, dict):
def iter():
for name in obj:
yield name, obj[name]
else:
def iter():
for name in dir(obj):
yield name, getattr(obj, name)
for name, func in iter():
func_orig = func
if not isinstance(func, FunctionType):
try:
func = func.__func__
except AttributeError:
continue
try:
num, siglist = getattr(func, self.attrname)
except AttributeError:
continue
decitems.append((num, func_orig, siglist))
decitems.sort()
l = []
for num, func_orig, siglist in decitems:
for args, kwargs in siglist:
l.append((func_orig, args, kwargs))
return l
def discover_and_call(self, obj, dec):
for func, args, kwargs in self.discover(obj):
newfunc = dec(*args, **kwargs)(func)
assert newfunc == func
# BBB for Python 2.7
try:
basestring
except NameError:
basestring = str
try:
unicode
except NameError:
unicode = str
def ensure_unicode(x):
if isinstance(x, unicode):
return x
if not isinstance(x, basestring):
return unicode(x)
return x.decode("utf8")
def parse_hash_spec(fragment):
""" Return (hashtype, hash_value) from parsing a given X=Y fragment.
X must be a supported algorithm by the python hashlib module."""
parts = fragment.split("=", 1)
if len(parts) == 2:
algoname, hash_value = parts
algo = getattr(hashlib, algoname, None)
if algo is not None:
return algo, hash_value
return None, None
|
a7b8cef4b51056009da205b20cbb44bee5995f25
|
b54db4f80d50fac2e880fa32312d5e39fd71cdf0
|
/torchelie/nn/utils.py
|
87ee5010620d13acbf03daa8762e15d42083ca16
|
[
"MIT"
] |
permissive
|
Vermeille/Torchelie
|
91fde0145d67a3b50472db4f1429937fe277e45b
|
3b09ea9a4cfa195aa78dcac676aab1c43815bd53
|
refs/heads/master
| 2023-08-17T08:26:44.549037
| 2023-08-14T15:49:16
| 2023-08-14T15:49:16
| 196,767,053
| 124
| 14
|
MIT
| 2023-08-21T12:22:42
| 2019-07-13T21:14:50
|
Python
|
UTF-8
|
Python
| false
| false
| 12,318
|
py
|
utils.py
|
import warnings
from collections import OrderedDict
from typing import Any, TypeVar, Callable, Tuple
import torch
import torch.nn as nn
from torch.nn import Module
from torchelie.utils import kaiming_gain, kaiming, fast_zero_grad
from torch.nn.parameter import Parameter
def patch_repr(m: nn.Module):
import types
base_repr = m.extra_repr
def show_hooks(self: nn.Module):
return base_repr() + ' hooks:' + ','.join([
v.name if hasattr(v, 'name') else v.__class__.__name__
for v in self._forward_pre_hooks.values()
])
m.extra_repr = types.MethodType(show_hooks, m)
return m
class WeightLambda:
"""
Apply a lambda function as a hook to the weight matrix of a layer before
a forward pass.
Don't use it directly, use the functions :code:`weight_lambda()` and
:code:`remove_weight_lambda()` instead.
Args:
hook_name (str): an identifier for that WeightLambda hook, such as
'l2normalize', 'weight_norm', etc.
name (str): the name of the module's parameter to apply the hook on
function (Callable): a function of the form
:code:`(torch.Tensor) -> torch.Tensor` that takes applies the
desired computation to the module's parameter.
"""
name: str
def __init__(self, hook_name: str, name: str, function) -> None:
self.name = name
self.hook_name = hook_name
self.fun = function
@staticmethod
def apply(module, hook_name: str, name: str, function) -> 'WeightLambda':
fn = WeightLambda(hook_name, name, function)
weight = getattr(module, name)
# remove w from parameter list
del module._parameters[name]
module.register_parameter(name + '_g', Parameter(weight.data))
with torch.no_grad():
setattr(module, name, fn.fun(getattr(module, name + '_g')))
# recompute weight before every forward()
module.register_forward_pre_hook(fn)
patch_repr(module)
return fn
def remove(self, module: Module) -> None:
weight = self.fun(module)
delattr(module, self.name)
del module._parameters[self.name + '_g']
setattr(module, self.name, Parameter(weight.data))
def __call__(self, module: Module, inputs: Any) -> None:
setattr(module, self.name, self.fun(getattr(module, self.name + '_g')))
def weight_lambda(
module: Module,
hook_name: str,
function,
name: str = 'weight',
) -> Module:
"""
Apply :code:`function()` to :code:`getattr(module, name)` on each forward
pass.
Allows to implement things such as weight normalization, or equalized
learning rate weight scaling.
Args:
module (nn.Module): the module to hook on
hook_name (str): an identifier for that WeightLambda hook, such as
'l2normalize', 'weight_norm', etc.
function (Callable): a function of the form
:code:`(torch.Tensor) -> torch.Tensor` that takes applies the
desired computation to the module's parameter.
name (str): the name of the module's parameter to apply the hook on.
Default: 'weight'.
Returns:
the module with the hook
"""
WeightLambda.apply(module, hook_name, name, function)
return module
def remove_weight_lambda(module: Module,
hook_name: str,
name: str = 'weight') -> Module:
"""
Remove the hook :code:`hook_name` applied on member :code:`name` of
:code:`module`.
Args:
module (nn.Module): the module on which the hook has to be removed
hook_name (str): an identifier for that WeightLambda hook, such as
'l2normalize', 'weight_norm', etc.
name (str): the name of the module's parameter the hook is applied on.
Default: 'weight'.
"""
for k, hook in module._forward_pre_hooks.items():
if (isinstance(hook, WeightLambda) and hook.name == name
and hook.hook_name == hook_name):
hook.remove(module)
del module._forward_pre_hooks[k]
return module
raise ValueError("weight_lambda of '{}' not found in {}".format(
hook_name, module))
def weight_scale(module: Module,
name: str = 'weight',
scale: float = 0) -> Module:
"""
Multiply :code:`getattr(module, name)` by :code:`scale` on forward pass
as a hook. Used to implement equalized LR for StyleGAN
"""
return weight_lambda(module, 'scale', lambda w: w * scale, name)
def remove_weight_scale(module: Module, name: str = 'weight') -> Module:
"""
Remove a weight_scale hook previously applied on
:code:`getattr(module, name)`.
"""
return remove_weight_lambda(module, 'scale', name)
@torch.no_grad()
def remove_batchnorm(m: nn.Sequential) -> None:
"""
Remove BatchNorm in Sequentials / CondSeqs in a smart way, restoring biases
in the preceding layer.
"""
ms = list(m._modules.items())
# transfer biases from BN to previous conv / Linear / Whatever
for (name1, mod1), (name2, mod2) in zip(ms[:-1], ms[1:]):
if isinstance(mod2, (nn.BatchNorm1d, nn.BatchNorm2d, nn.BatchNorm3d)):
if mod1.bias is not None:
continue
if mod2.bias is not None:
with torch.no_grad():
mod1.bias = mod2.bias
else:
out_ch = len(mod2.running_mean)
with torch.no_grad():
mod1.bias = nn.Parameter(torch.zeros(out_ch))
# remove bn
for name, mod in ms:
if isinstance(mod, (nn.BatchNorm1d, nn.BatchNorm2d, nn.BatchNorm3d)):
delattr(m, name)
T_Module = TypeVar('T_Module', bound=nn.Module)
@torch.no_grad()
def edit_model(m: T_Module, f: Callable[[nn.Module], nn.Module]) -> nn.Module:
"""
Allow to edit any part of a model by recursively editing its modules.
For instance, in order to delete all dropout layers and change relus into
leakyrelus
::
def make_leaky_no_dropout(m):
if isinstance(m, nn.ReLU):
return nn.LeakyReLU(inplace=True)
if isinstance(m, nn.Dropout2d):
return nn.Identity()
return m
model = edit_model(model, make_leaky_no_dropout)
Args:
m (nn.Module): the model to edit
f (Callabble: nn.Module -> nn.Module): a mapping function applied to
all modules and submodules
Returns:
The edited model.
"""
for name, mod in m._modules.items():
m._modules[name] = edit_model(mod, f)
m._modules[name] = f(mod)
return f(m)
@torch.no_grad()
def weight_norm_and_equal_lr(m: T_Module,
leak: float = 0.,
mode: str = 'fan_in',
init_gain: float = 1.,
lr_gain: float = 1.,
name: str = 'weight') -> T_Module:
"""
Set weight norm and equalized learning rate like demodulated convs in
StyleGAN2 for module m.
The weight matrix is initialized for a leaky relu nonlinearity of slope a.
An extra gain can be specified, as well as a differential learning rate
multiplier.
See StyleGAN2 paper for more info.
"""
kai_gain = kaiming_gain(m, a=leak, mode=mode)
gain = kai_gain * init_gain * lr_gain
def do_it(w):
w = w * gain
shape = w.shape
w_flat = w.view(w.shape[0], -1)
w_flat = w_flat / w_flat.norm(dim=1, keepdim=True)
return w_flat.view(*shape)
m.weight.data.normal_(0., 1. / lr_gain)
weight_lambda(m, 'norm_equal_lr', do_it, name=name)
return m
@torch.no_grad()
def remove_weight_norm_and_equal_lr(module: Module,
name: str = 'weight') -> Module:
"""
Remove a weight_norm_and_equal_lr hook previously applied on
:code:`getattr(module, name)`.
"""
return remove_weight_lambda(module, 'norm_equal_lr', name)
@torch.no_grad()
def insert_after(base: nn.Sequential, key: str, new: nn.Module,
name: str) -> nn.Sequential:
"""
Insert module :code:`new` with name :code:`name` after element :code:`key`
in sequential :code:`base` and return the new sequence.
"""
modules_list = list(base._modules.items())
found = -1
for i, (nm, m) in enumerate(modules_list):
if nm == key:
found = i
break
assert found != -1
modules_list.insert(found + 1, (name, new))
base._modules = OrderedDict(modules_list)
return base
@torch.no_grad()
def insert_before(base: nn.Sequential, key: str, new: nn.Module,
name: str) -> nn.Sequential:
"""
Insert module :code:`new` with name :code:`name` before element :code:`key`
in sequential :code:`base` and return the new sequence.
"""
modules_list = list(base._modules.items())
found = -1
for i, (nm, m) in enumerate(modules_list):
if nm == key:
found = i
break
assert found != -1
modules_list.insert(found, (name, new))
base._modules = OrderedDict(modules_list)
return base
@torch.no_grad()
def make_leaky(net: nn.Module, leak: float = 0.2) -> nn.Module:
"""
Change all relus into leaky relus for modules and submodules of net.
"""
def do_it(m: nn.Module) -> nn.Module:
if isinstance(m, nn.ReLU):
return nn.LeakyReLU(leak, m.inplace)
return m
return edit_model(net, do_it)
@torch.no_grad()
def net_to_equal_lr(net: nn.Module,
leak: float = 0.,
mode: str = 'fan_in') -> T_Module:
"""
Set all Conv2d, ConvTransposed2d and Linear of :code:`net` to equalized
learning rate, initialized with :func:`torchelie.utils.kaiming` and
:code:`dynamic=True`.
Returns:
:code:`net`.
"""
for m in net.modules():
if isinstance(m, (nn.Conv2d, nn.ConvTranspose2d, nn.Linear)):
kaiming(m, a=leak, mode=mode, dynamic=True)
return net
@torch.no_grad()
def net_to_weight_norm_and_equal_lr(net: T_Module,
leak: float = 0.,
mode: str = 'fan_in',
init_gain: float = 1.,
lr_gain: float = 1.) -> T_Module:
"""
Set all Conv2d, ConvTransposed2d and Linear of :code:`net` to equalized
learning rate and weight normalization, initialized with
:func:`torchelie.utils.weight_norm_and_equal_lr`.
Returns:
:code:`net`.
"""
for m in net.modules():
if isinstance(m, (nn.Conv2d, nn.ConvTranspose2d, nn.Linear)):
weight_norm_and_equal_lr(m,
leak=leak,
mode=mode,
init_gain=init_gain,
lr_gain=lr_gain)
return net
def receptive_field_for(net: nn.Module,
input_size: Tuple[int, int, int]) -> Tuple[int, int]:
"""
Compute the receptive field of :code:`net` using a backward pass.
.. warning::
Make sure the net does not have any normalization operation: mean /
std operations impact the whole volume and make the calculation
invalid. (BatchNorm is okay in eval mode)
Args:
input_size (Tuple[int, int, int]): a (C, H, W) volume size that the
model can accept. Note that the receptive field calculation is
bounded by this size.
Returns:
height and width receptive fields.
"""
device = next(iter(net.parameters())).device
input = torch.randn(1, *input_size, requires_grad=True, device=device)
net.eval()
out = net(input)
net.train()
if out.dim() == 2:
out.mean().backward()
elif out.dim() == 4:
out[:, :, out.shape[2] // 2, out.shape[3] // 2].mean().backward()
fast_zero_grad(net)
has_grad = torch.nonzero(input.grad[0, 0])
recep_field = has_grad.max(dim=0).values - has_grad.min(dim=0).values + 1
return recep_field[0].item(), recep_field[1].item()
|
5ab9a28330b472145e84c5abea43d897d731d679
|
7f620e7902c0b9ccb1fcfd1427acd5936ea33814
|
/mlrun/api/utils/events/iguazio.py
|
aa535d7e856dcecb5fd06288fdc1c60d31efa5d9
|
[
"Apache-2.0"
] |
permissive
|
mlrun/mlrun
|
2074c230070129ce3becb211b92c90b29a2ce850
|
b5fe0c05ae7f5818a4a5a5a40245c851ff9b2c77
|
refs/heads/development
| 2023-09-06T00:09:21.546135
| 2023-09-05T19:38:13
| 2023-09-05T19:38:13
| 205,706,595
| 1,093
| 229
|
Apache-2.0
| 2023-09-14T14:14:10
| 2019-09-01T16:59:19
|
Python
|
UTF-8
|
Python
| false
| false
| 8,798
|
py
|
iguazio.py
|
# Copyright 2023 Iguazio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import typing
import igz_mgmt.schemas.events
import mlrun.api.utils.clients.iguazio
import mlrun.api.utils.events.base as base_events
import mlrun.common.schemas
from mlrun.utils import logger
PROJECT_AUTH_SECRET_CREATED = "Security.Project.AuthSecret.Created"
PROJECT_AUTH_SECRET_UPDATED = "Security.Project.AuthSecret.Updated"
PROJECT_SECRET_CREATED = "Security.Project.Secret.Created"
PROJECT_SECRET_UPDATED = "Security.Project.Secret.Updated"
PROJECT_SECRET_DELETED = "Security.Project.Secret.Deleted"
class Client(base_events.BaseEventClient):
def __init__(self, access_key: str = None, verbose: bool = None):
self.access_key = (
access_key
or mlrun.mlconf.events.access_key
or mlrun.mlconf.get_v3io_access_key()
)
self.verbose = verbose if verbose is not None else mlrun.mlconf.events.verbose
self.source = "mlrun-api"
def emit(self, event: igz_mgmt.Event):
try:
logger.debug("Emitting event", event=event)
mlrun.api.utils.clients.iguazio.Client().emit_manual_event(
self.access_key, event
)
except Exception as exc:
if self.verbose:
logger.warning(
"Failed to emit event",
event=event,
exc_info=exc,
)
def generate_auth_secret_event(
self,
username: str,
secret_name: str,
action: mlrun.common.schemas.AuthSecretEventActions,
) -> igz_mgmt.Event:
"""
Generate an auth secret event
:param username: username
:param secret_name: secret name
:param action: preformed action
:return: event object to emit
"""
if action == mlrun.common.schemas.SecretEventActions.created:
return self._generate_auth_secret_created_event(username, secret_name)
elif action == mlrun.common.schemas.SecretEventActions.updated:
return self._generate_auth_secret_updated_event(username, secret_name)
else:
raise mlrun.errors.MLRunInvalidArgumentError(f"Unsupported action {action}")
def generate_project_secret_event(
self,
project: str,
secret_name: str,
secret_keys: typing.List[str] = None,
action: mlrun.common.schemas.SecretEventActions = mlrun.common.schemas.SecretEventActions.created,
) -> igz_mgmt.Event:
"""
Generate a project secret event
:param project: project name
:param secret_name: secret name
:param secret_keys: secret keys, optional, only relevant for created/updated events
:param action: preformed action
:return: event object to emit
"""
if action == mlrun.common.schemas.SecretEventActions.created:
return self._generate_project_secret_created_event(
project, secret_name, secret_keys
)
elif action == mlrun.common.schemas.SecretEventActions.updated:
return self._generate_project_secret_updated_event(
project, secret_name, secret_keys
)
elif action == mlrun.common.schemas.SecretEventActions.deleted:
return self._generate_project_secret_deleted_event(project, secret_name)
else:
raise mlrun.errors.MLRunInvalidArgumentError(f"Unsupported action {action}")
def _generate_auth_secret_created_event(
self, username: str, secret_name: str
) -> igz_mgmt.Event:
return igz_mgmt.Event(
source=self.source,
kind=PROJECT_AUTH_SECRET_CREATED,
description=f"User {username} created secret {secret_name}",
parameters_text=[
igz_mgmt.schemas.events.ParametersText(name="username", value=username),
igz_mgmt.schemas.events.ParametersText(
name="secret_name", value=secret_name
),
],
severity=igz_mgmt.constants.EventSeverity.info,
classification=igz_mgmt.constants.EventClassification.security,
system_event=False,
visibility=igz_mgmt.constants.EventVisibility.external,
)
def _generate_auth_secret_updated_event(
self, username: str, secret_name: str
) -> igz_mgmt.Event:
return igz_mgmt.Event(
source=self.source,
kind=PROJECT_AUTH_SECRET_UPDATED,
description=f"User {username} updated secret {secret_name}",
parameters_text=[
igz_mgmt.schemas.events.ParametersText(name="username", value=username),
igz_mgmt.schemas.events.ParametersText(
name="secret_name", value=secret_name
),
],
severity=igz_mgmt.constants.EventSeverity.info,
classification=igz_mgmt.constants.EventClassification.security,
system_event=False,
visibility=igz_mgmt.constants.EventVisibility.external,
)
def _generate_project_secret_created_event(
self, project: str, secret_name: str, secret_keys: typing.List[str]
) -> igz_mgmt.Event:
normalized_secret_keys = self._list_to_string(secret_keys)
return igz_mgmt.Event(
source=self.source,
kind=PROJECT_SECRET_CREATED,
parameters_text=[
igz_mgmt.schemas.events.ParametersText(
name="project_name", value=project
),
igz_mgmt.schemas.events.ParametersText(
name="secret_name", value=secret_name
),
igz_mgmt.schemas.events.ParametersText(
name="secret_keys", value=normalized_secret_keys
),
],
description=f"Project {project} secret created",
severity=igz_mgmt.constants.EventSeverity.info,
classification=igz_mgmt.constants.EventClassification.security,
system_event=False,
visibility=igz_mgmt.constants.EventVisibility.external,
)
def _generate_project_secret_updated_event(
self,
project: str,
secret_name: str,
secret_keys: typing.List[str],
) -> igz_mgmt.Event:
normalized_secret_keys = self._list_to_string(secret_keys)
return igz_mgmt.Event(
source=self.source,
kind=PROJECT_SECRET_UPDATED,
description=f"Project {project} secret updated",
parameters_text=[
igz_mgmt.schemas.events.ParametersText(
name="project_name", value=project
),
igz_mgmt.schemas.events.ParametersText(
name="secret_name", value=secret_name
),
igz_mgmt.schemas.events.ParametersText(
name="secret_keys", value=normalized_secret_keys
),
],
severity=igz_mgmt.constants.EventSeverity.info,
classification=igz_mgmt.constants.EventClassification.security,
system_event=False,
visibility=igz_mgmt.constants.EventVisibility.external,
)
def _generate_project_secret_deleted_event(
self, project: str, secret_name: str
) -> igz_mgmt.Event:
return igz_mgmt.Event(
source=self.source,
kind=PROJECT_SECRET_DELETED,
description=f"Project {project} secret deleted",
parameters_text=[
igz_mgmt.schemas.events.ParametersText(
name="project_name", value=project
),
igz_mgmt.schemas.events.ParametersText(
name="secret_name", value=secret_name
),
],
severity=igz_mgmt.constants.EventSeverity.info,
classification=igz_mgmt.constants.EventClassification.security,
system_event=False,
visibility=igz_mgmt.constants.EventVisibility.external,
)
@staticmethod
def _list_to_string(list_to_convert: typing.List[str]) -> str:
return ", ".join(list_to_convert)
|
b2710f4500af29d89ee8dd653037155dc1e8c097
|
0f72450fe0eb3238a0faf876b8b63b2a47d76166
|
/aiohttp_devtools/cli.py
|
db06d1456ef280bc57b0bcd02e1d14428ad6074a
|
[
"MIT"
] |
permissive
|
aio-libs/aiohttp-devtools
|
5503bc8687c40569f0a85bd0641e318f25410c31
|
22c395b8e6a57fef7dca483db4dfca80ca61576c
|
refs/heads/master
| 2023-09-01T02:08:43.771864
| 2023-08-30T22:46:41
| 2023-08-30T22:46:41
| 68,917,117
| 240
| 61
|
MIT
| 2023-09-07T22:24:26
| 2016-09-22T12:03:09
|
Python
|
UTF-8
|
Python
| false
| false
| 5,611
|
py
|
cli.py
|
import sys
import traceback
from typing import Any
import click
from aiohttp.web import run_app
from . import __version__
from .exceptions import AiohttpDevException
from .logs import main_logger, setup_logging
from .runserver import INFER_HOST
from .runserver import runserver as _runserver
from .runserver import serve_static
_dir_existing = click.Path(exists=True, dir_okay=True, file_okay=False)
_file_dir_existing = click.Path(exists=True, dir_okay=True, file_okay=True)
_dir_may_exist = click.Path(dir_okay=True, file_okay=False, writable=True, resolve_path=True)
@click.group()
@click.version_option(__version__, "-V", "--version", prog_name="aiohttp-devtools")
def cli() -> None:
pass
verbose_help = 'Enable verbose output.'
livereload_help = ('Whether to inject livereload.js into html page footers to autoreload on changes. '
'env variable AIO_LIVERELOAD')
browser_cache_help = ("When disabled (the default), sends no-cache headers to "
"disable browser caching.")
@cli.command()
@click.argument('path', type=_dir_existing, required=True)
@click.option('--livereload/--no-livereload', envvar='AIO_LIVERELOAD', default=True, help=livereload_help)
@click.option('-p', '--port', default=8000, type=int)
@click.option('-v', '--verbose', is_flag=True, help=verbose_help)
@click.option("--browser-cache/--no-browser-cache", envvar="AIO_BROWSER_CACHE", default=False,
help=browser_cache_help)
def serve(path: str, livereload: bool, port: int, verbose: bool, browser_cache: bool) -> None:
"""
Serve static files from a directory.
"""
setup_logging(verbose)
run_app(**serve_static(static_path=path, livereload=livereload, port=port,
browser_cache=browser_cache))
static_help = "Path of static files to serve, if excluded static files aren't served. env variable: AIO_STATIC_STATIC"
root_help = ('Root directory project used to qualify other paths. '
'This can be used to watch a parent directory for changes in a more complex application. '
'env variable: AIO_ROOT')
static_url_help = 'URL path to serve static files from, default "/static/". env variable: AIO_STATIC_URL'
shutdown_by_url_help = ("The development server will be stopped via a request to an endpoint that is "
"added to the server, instead of via signals (this is the default on Windows). "
"env variable: AIO_SHUTDOWN_BY_URL")
host_help = ('host used when referencing livereload and static files, if blank host is taken from the request header '
'with default of localhost. env variable AIO_HOST')
app_factory_help = ('name of the app factory to create an aiohttp.web.Application with, if missing default app-factory '
'names are tried. This can be either a function with signature '
'"def create_app(loop): -> Application" or "def create_app(): -> Application" '
'or just an instance of aiohttp.Application. env variable AIO_APP_FACTORY')
port_help = 'Port to serve app from, default 8000. env variable: AIO_PORT'
aux_port_help = 'Port to serve auxiliary app (reload and static) on, default port + 1. env variable: AIO_AUX_PORT'
# defaults are all None here so default settings are defined in one place: DEV_DICT validation
@cli.command()
@click.argument('app-path', envvar='AIO_APP_PATH', type=_file_dir_existing, required=False)
@click.option('-s', '--static', 'static_path', envvar='AIO_STATIC_PATH', type=_dir_existing, help=static_help)
@click.option('--root', 'root_path', envvar='AIO_ROOT', type=_dir_existing, help=root_help)
@click.option('--static-url', envvar='AIO_STATIC_URL', help=static_url_help)
@click.option("--shutdown-by-url/--no-shutdown-by-url", default=sys.platform.startswith("win32"),
envvar="AIO_SHUTDOWN_BY_URL", help=shutdown_by_url_help)
@click.option('--livereload/--no-livereload', envvar='AIO_LIVERELOAD', default=None, help=livereload_help)
@click.option('--host', default=INFER_HOST, help=host_help)
@click.option('--app-factory', 'app_factory_name', envvar='AIO_APP_FACTORY', help=app_factory_help)
@click.option('-p', '--port', 'main_port', envvar='AIO_PORT', type=click.INT, help=port_help)
@click.option('--aux-port', envvar='AIO_AUX_PORT', type=click.INT, help=aux_port_help)
@click.option('-v', '--verbose', is_flag=True, help=verbose_help)
@click.option("--browser-cache/--no-browser-cache", envvar="AIO_BROWSER_CACHE", default=None,
help=browser_cache_help)
@click.argument('project_args', nargs=-1)
def runserver(**config: Any) -> None:
"""
Run a development server for an aiohttp apps.
Takes one argument "app-path" which should be a path to either a directory containing a recognized default file
("app.py" or "main.py") or to a specific file. Defaults to the environment variable "AIO_APP_PATH" or ".".
The app path is run directly, see the "--app-factory" option for details on how an app is loaded from a python
module.
"""
active_config = {k: v for k, v in config.items() if v is not None}
setup_logging(config['verbose'])
# Rewrite argv for the application.
sys.argv[1:] = active_config.pop('project_args')
try:
run_app(**_runserver(**active_config))
except AiohttpDevException as e:
if config['verbose']:
tb = click.style(traceback.format_exc().strip('\n'), fg='white', dim=True)
main_logger.warning('AiohttpDevException traceback:\n%s', tb)
main_logger.error('Error: %s', e)
sys.exit(2)
|
a76be3a7a15779dd4232089520b3a3bb49e55113
|
8d77f3b72dc52b85ee0c4ef6ba06f63a6920841f
|
/fx2ait/fx2ait/test/converters/test_ait_gelu.py
|
444d885d274bab2cb1573a673177fd7b8d717bb6
|
[
"Apache-2.0"
] |
permissive
|
facebookincubator/AITemplate
|
b643c217e1d15f7f17dab1eb1cc6855eab664b97
|
c60dc19788217556ba12ea378c02b9fd0aea9ffe
|
refs/heads/main
| 2023-08-28T18:22:15.828008
| 2023-08-28T14:43:41
| 2023-08-28T14:43:41
| 514,321,895
| 4,065
| 334
|
Apache-2.0
| 2023-09-14T04:53:57
| 2022-07-15T15:40:58
|
Python
|
UTF-8
|
Python
| false
| false
| 2,063
|
py
|
test_ait_gelu.py
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import torch
from fx2ait.acc_tracer import acc_ops
from fx2ait.tools.common_fx2ait import AITTestCase
from parameterized import parameterized
class TestGeluConverter(AITTestCase):
def test_gelu(self):
class TestModule(torch.nn.Module):
def forward(self, x: torch.Tensor) -> torch.Tensor:
return torch.nn.functional.gelu(x)
inputs = [torch.randn(3, 10, 20).cuda().half()]
model = TestModule().cuda().half()
self.run_test(model, inputs, expected_ops={acc_ops.gelu})
def test_fast_gelu(self):
class TestModule(torch.nn.Module):
def forward(self, x: torch.Tensor) -> torch.Tensor:
return torch.nn.functional.gelu(x, approximate="tanh")
inputs = [torch.randn(3, 10, 20).cuda().half()]
model = TestModule().cuda().half()
self.run_test(model, inputs, expected_ops={acc_ops.gelu})
@parameterized.expand(
[
("none"),
("tanh"),
]
)
def test_gelu_module(self, name):
class TestModule(torch.nn.Module):
def __init__(self):
super().__init__()
self.gelu = torch.nn.GELU(approximate=name)
def forward(self, x):
return self.gelu(x)
inputs = [torch.randn(3, 10, 20).cuda().half()]
model = TestModule().cuda().half()
self.run_test(model, inputs, expected_ops={acc_ops.gelu})
|
ba4aadf78aa268df2d5b2cbdb93e08e5939d35db
|
3d51ca27b37f9ae01eeefe05fd4905681faff441
|
/setup.py
|
4ffbee296089aff6dcbebf36db33285f03b2c59a
|
[
"MIT"
] |
permissive
|
denisenkom/pytds
|
513466a72b87d982188b2606ac1fadc48ac916ea
|
9bebbe4e3539a2bd6d0011581882a0a1a30350c1
|
refs/heads/master
| 2023-09-01T12:07:28.152217
| 2023-08-27T18:22:48
| 2023-08-27T18:22:48
| 6,725,332
| 164
| 57
|
MIT
| 2023-06-22T23:47:51
| 2012-11-16T17:28:20
|
Python
|
UTF-8
|
Python
| false
| false
| 994
|
py
|
setup.py
|
import os
import setuptools
from setuptools import setup
import version
requirements = list(open(os.path.join(os.path.dirname(__file__), 'requirements.txt'), 'r').readlines())
print(setuptools.find_packages('src'))
setup(name='python-tds',
version=version.get_git_version(),
description='Python DBAPI driver for MSSQL using pure Python TDS (Tabular Data Stream) protocol implementation',
author='Mikhail Denisenko',
author_email='denisenkom@gmail.com',
url='https://github.com/denisenkom/pytds',
license="MIT",
packages=['pytds'],
package_dir={'': 'src'},
classifiers=[
'Development Status :: 4 - Beta',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
zip_safe=True,
install_requires=requirements,
)
|
5a4f4b1fe7916a9ba2a44c30cffae018cfeb9742
|
808edf89a9c4d08ed636ff37141f0affe0c7deb9
|
/yalign/__init__.py
|
142a2c61167e96b0cf0354d67b3542929eb6edd6
|
[] |
no_license
|
machinalis/yalign
|
bf88b93140274f5d6d7614e506f3bf861b239fde
|
e063b4f62d043476492bb0add06f60a90f7f025f
|
refs/heads/develop
| 2021-01-17T10:32:27.984333
| 2015-08-14T19:48:23
| 2015-08-14T19:48:23
| 12,383,081
| 101
| 32
| null | 2016-05-19T16:07:19
| 2013-08-26T15:46:31
|
Python
|
UTF-8
|
Python
| false
| false
| 2,567
|
py
|
__init__.py
|
# -*- coding: utf-8 -*-
"""
Examples of how to use the yalign API:
.. code-block:: python
# Load a model from model that was saved to a folder eg.. en-es:
from yalign import YalignModel
model = YalignModel.load('en-es')
# Align text
from yalign import text_to_document
english_text = \"""Virginia's eyes filled with tears and she hid her head in her hands.
The Duke rose and kissed his wife lovingly.\"""
spanish_text = \"""¿No tiene ningún lugar donde pueda dormir?
Los ojos de Virginia se llenaron de lágrimas y óculto su rostro entre los manos.\"""
english_sentences = text_to_document(english_text, 'en')
spanish_sentences = text_to_document(spanish_text, 'es')
pairs = model.align(english_sentences, spanish_sentences)
# Align html
from yalign import html_to_document
english_html = \"""<html><body><p>
Virginia's eyes filled with tears and she hid her head in her hands.
The Duke rose and kissed his wife lovingly."
</p></body></html>\"""
spanish_html = \"""<html><body><p>
¿No tiene ningún lugar donde pueda dormir?
Los ojos de Virginia se llenaron de lágrimas y óculto su rostro entre los manos.
</p></body></html>\"""
english_sentences = html_to_document(english_html, 'en')
spanish_sentences = html_to_document(spanish_html, 'es')
pairs = model.align(english_sentences, spanish_sentences)
# Align srt
from yalign import srt_to_document
english_srt = \"""1\\n00:00:49,160 --> 00:00:50,992\\n
<i>Virginia's eyes filled with tears and she hid her head in her hands.</i>\\n\\n
2\\n00:00:51,734 --> 00:00:53,577\\n
<i>The Duke rose and kissed his wife lovingly.</i>\"""
spanish_srt = \"""1\\n00:00:49,160 --> 00:00:50,992\\n
<i>¿No tiene ningún lugar donde pueda dormir?</i>\\n\\n
2\\n00:00:51,734 --> 00:00:53,577\\n
<i>Los ojos de Virginia se llenaron de lágrimas y óculto su rostro entre los manos.</i>\"""
english_sentences = srt_to_document(english_srt, 'en')
spanish_sentences = srt_to_document(spanish_srt, 'es')
pairs = model.align(english_sentences, spanish_sentences)
"""
from yalignmodel import YalignModel, basic_model
from input_conversion import html_to_document, text_to_document, srt_to_document
|
71262e027e299bfb0748d2e0f56fc18ae42be740
|
45dc95e5487723baf1114000962e0138034db678
|
/archive/unintended_ml_bias/new_madlibber/word_helper.py
|
a1d6e73d6a6da4bea0464585422a0ddb32f42021
|
[
"MIT",
"Apache-2.0",
"CC-BY-4.0"
] |
permissive
|
conversationai/unintended-ml-bias-analysis
|
4a86348b9e720f1270767490f2a742f70490e630
|
97b110b029f9cd8372bae4b1919486c046f0a768
|
refs/heads/main
| 2023-09-04T18:25:53.084052
| 2023-08-14T22:38:13
| 2023-08-14T22:38:13
| 90,418,308
| 340
| 113
|
Apache-2.0
| 2023-08-14T22:38:15
| 2017-05-05T21:36:46
|
Jupyter Notebook
|
UTF-8
|
Python
| false
| false
| 1,345
|
py
|
word_helper.py
|
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
class WordHelper(object):
def __init__(self, format_helper):
self.format_helper = format_helper
self.word_category_words = {}
def add_word(self, word_category, word):
self.word_category_words.setdefault(word_category, set([]))
self.word_category_words[word_category].add(word)
def get_template_element_words(self, template_element):
template_element_word_categories = (
self.format_helper.decompose_template_element(template_element))
words = self.word_category_words[template_element_word_categories[0]]
for tewc in template_element_word_categories[1:]:
words = words.intersection(self.word_category_words[tewc])
return words
@property
def word_categories(self):
return self.word_category_words.keys()
|
79f358749f08ec29d767acf192b31b30e565ac50
|
5354d3a2ab53b7a1b76ac4b8fab3976cd7e3460e
|
/dearpygui/_dearpygui.pyi
|
f10ed2de2e70aef407e5aaa1a51663379b981287
|
[
"MIT"
] |
permissive
|
hoffstadt/DearPyGui
|
810e53f733e1eedd9622becd6577c73a38446bd8
|
1fe2f6c34037ed529c987b9fc4d13e2ac757508b
|
refs/heads/master
| 2023-08-31T14:48:34.407217
| 2023-08-30T01:21:59
| 2023-08-30T01:21:59
| 267,649,918
| 11,144
| 871
|
MIT
| 2023-09-10T11:20:55
| 2020-05-28T17:12:57
|
C++
|
UTF-8
|
Python
| false
| false
| 109,017
|
pyi
|
_dearpygui.pyi
|
from typing import List, Any, Callable, Union, Tuple
from dearpygui._dearpygui import *
##########################################################
# This file is generated automatically by mvPythonParser #
##########################################################
# ~ Dear PyGui Version: master
def add_2d_histogram_series(x : Union[List[float], Tuple[float, ...]], y : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='', xbins: int ='', ybins: int ='', xmin_range: float ='', xmax_range: float ='', ymin_range: float ='', ymax_range: float ='', density: bool ='', outliers: bool ='') -> Union[int, str]:
"""Adds a 2d histogram series."""
...
def add_3d_slider(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: Union[List[float], Tuple[float, ...]] ='', max_x: float ='', max_y: float ='', max_z: float ='', min_x: float ='', min_y: float ='', min_z: float ='', scale: float ='') -> Union[int, str]:
"""Adds a 3D box slider."""
...
def add_alias(alias : str, item : Union[int, str]) -> None:
"""Adds an alias."""
...
def add_area_series(x : Union[List[float], Tuple[float, ...]], y : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='', fill: Union[List[int], Tuple[int, ...]] ='', contribute_to_bounds: bool ='') -> Union[int, str]:
"""Adds an area series to a plot."""
...
def add_bar_series(x : Union[List[float], Tuple[float, ...]], y : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='', weight: float ='', horizontal: bool ='') -> Union[int, str]:
"""Adds a bar series to a plot."""
...
def add_bool_value(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', source: Union[int, str] ='', default_value: bool ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a bool value."""
...
def add_button(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', small: bool ='', arrow: bool ='', direction: int ='') -> Union[int, str]:
"""Adds a button."""
...
def add_candle_series(dates : Union[List[float], Tuple[float, ...]], opens : Union[List[float], Tuple[float, ...]], closes : Union[List[float], Tuple[float, ...]], lows : Union[List[float], Tuple[float, ...]], highs : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='', bull_color: Union[List[int], Tuple[int, ...]] ='', bear_color: Union[List[int], Tuple[int, ...]] ='', weight: float ='', tooltip: bool ='', time_unit: int ='') -> Union[int, str]:
"""Adds a candle series to a plot."""
...
def add_char_remap(source : int, target : int, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Remaps a character."""
...
def add_checkbox(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: bool ='') -> Union[int, str]:
"""Adds a checkbox."""
...
def add_child_window(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', border: bool ='', autosize_x: bool ='', autosize_y: bool ='', no_scrollbar: bool ='', horizontal_scrollbar: bool ='', menubar: bool ='') -> Union[int, str]:
"""Adds an embedded child window. Will show scrollbars when items do not fit."""
...
def add_clipper(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', delay_search: bool ='') -> Union[int, str]:
"""Helper to manually clip large list of items. Increases performance by not searching or drawing widgets outside of the clipped region."""
...
def add_collapsing_header(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', closable: bool ='', default_open: bool ='', open_on_double_click: bool ='', open_on_arrow: bool ='', leaf: bool ='', bullet: bool ='') -> Union[int, str]:
"""Adds a collapsing header to add items to. Must be closed with the end command."""
...
def add_color_button(default_value : Union[List[int], Tuple[int, ...]] ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', no_alpha: bool ='', no_border: bool ='', no_drag_drop: bool ='') -> Union[int, str]:
"""Adds a color button."""
...
def add_color_edit(default_value : Union[List[int], Tuple[int, ...]] ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', no_alpha: bool ='', no_picker: bool ='', no_options: bool ='', no_small_preview: bool ='', no_inputs: bool ='', no_tooltip: bool ='', no_label: bool ='', no_drag_drop: bool ='', alpha_bar: bool ='', alpha_preview: int ='', display_mode: int ='', display_type: int ='', input_mode: int ='') -> Union[int, str]:
"""Adds an RGBA color editor. Left clicking the small color preview will provide a color picker. Click and draging the small color preview will copy the color to be applied on any other color widget."""
...
def add_color_picker(default_value : Union[List[int], Tuple[int, ...]] ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', no_alpha: bool ='', no_side_preview: bool ='', no_small_preview: bool ='', no_inputs: bool ='', no_tooltip: bool ='', no_label: bool ='', alpha_bar: bool ='', display_rgb: bool ='', display_hsv: bool ='', display_hex: bool ='', picker_mode: int ='', alpha_preview: int ='', display_type: int ='', input_mode: int ='') -> Union[int, str]:
"""Adds an RGB color picker. Right click the color picker for options. Click and drag the color preview to copy the color and drop on any other color widget to apply. Right Click allows the style of the color picker to be changed."""
...
def add_color_value(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', source: Union[int, str] ='', default_value: Union[List[float], Tuple[float, ...]] ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a color value."""
...
def add_colormap(colors : List[Union[List[int], Tuple[int, ...]]], qualitative : bool, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', show: bool ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a legend that pairs colors with normalized value 0.0->1.0. Each color will be This is typically used with a heat series. (ex. [[0, 0, 0, 255], [255, 255, 255, 255]] will be mapped to a soft transition from 0.0-1.0)"""
...
def add_colormap_button(default_value : Union[List[int], Tuple[int, ...]] ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='') -> Union[int, str]:
"""Adds a button that a color map can be bound to."""
...
def add_colormap_registry(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', show: bool ='') -> Union[int, str]:
"""Adds a colormap registry."""
...
def add_colormap_scale(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', colormap: Union[int, str] ='', min_scale: float ='', max_scale: float ='') -> Union[int, str]:
"""Adds a legend that pairs values with colors. This is typically used with a heat series. """
...
def add_colormap_slider(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: float ='') -> Union[int, str]:
"""Adds a color slider that a color map can be bound to."""
...
def add_combo(items : Union[List[str], Tuple[str, ...]] ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: str ='', popup_align_left: bool ='', no_arrow_button: bool ='', no_preview: bool ='', height_mode: int ='') -> Union[int, str]:
"""Adds a combo dropdown that allows a user to select a single option from a drop down window. All items will be shown as selectables on the dropdown."""
...
def add_custom_series(x : Union[List[float], Tuple[float, ...]], y : Union[List[float], Tuple[float, ...]], channel_count : int, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', callback: Callable ='', show: bool ='', y1: Any ='', y2: Any ='', y3: Any ='', tooltip: bool ='') -> Union[int, str]:
"""Adds a custom series to a plot. New in 1.6."""
...
def add_date_picker(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: dict ='', level: int ='') -> Union[int, str]:
"""Adds a data picker."""
...
def add_double4_value(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', source: Union[int, str] ='', default_value: Any ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a double value."""
...
def add_double_value(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', source: Union[int, str] ='', default_value: float ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a double value."""
...
def add_drag_double(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: float ='', format: str ='', speed: float ='', min_value: float ='', max_value: float ='', no_input: bool ='', clamped: bool ='') -> Union[int, str]:
"""Adds drag for a single double value. Useful when drag float is not accurate enough. Directly entry can be done with double click or CTRL+Click. Min and Max alone are a soft limit for the drag. Use clamped keyword to also apply limits to the direct entry modes."""
...
def add_drag_doublex(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: Any ='', size: int ='', format: str ='', speed: float ='', min_value: float ='', max_value: float ='', no_input: bool ='', clamped: bool ='') -> Union[int, str]:
"""Adds drag input for a set of double values up to 4. Useful when drag float is not accurate enough. Directly entry can be done with double click or CTRL+Click. Min and Max alone are a soft limit for the drag. Use clamped keyword to also apply limits to the direct entry modes."""
...
def add_drag_float(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: float ='', format: str ='', speed: float ='', min_value: float ='', max_value: float ='', no_input: bool ='', clamped: bool ='') -> Union[int, str]:
"""Adds drag for a single float value. Directly entry can be done with double click or CTRL+Click. Min and Max alone are a soft limit for the drag. Use clamped keyword to also apply limits to the direct entry modes."""
...
def add_drag_floatx(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: Union[List[float], Tuple[float, ...]] ='', size: int ='', format: str ='', speed: float ='', min_value: float ='', max_value: float ='', no_input: bool ='', clamped: bool ='') -> Union[int, str]:
"""Adds drag input for a set of float values up to 4. Directly entry can be done with double click or CTRL+Click. Min and Max alone are a soft limit for the drag. Use clamped keyword to also apply limits to the direct entry modes."""
...
def add_drag_int(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: int ='', format: str ='', speed: float ='', min_value: int ='', max_value: int ='', no_input: bool ='', clamped: bool ='') -> Union[int, str]:
"""Adds drag for a single int value. Directly entry can be done with double click or CTRL+Click. Min and Max alone are a soft limit for the drag. Use clamped keyword to also apply limits to the direct entry modes."""
...
def add_drag_intx(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: Union[List[int], Tuple[int, ...]] ='', size: int ='', format: str ='', speed: float ='', min_value: int ='', max_value: int ='', no_input: bool ='', clamped: bool ='') -> Union[int, str]:
"""Adds drag input for a set of int values up to 4. Directly entry can be done with double click or CTRL+Click. Min and Max alone are a soft limit for the drag. Use clamped keyword to also apply limits to the direct entry modes."""
...
def add_drag_line(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', callback: Callable ='', show: bool ='', default_value: Any ='', color: Union[List[int], Tuple[int, ...]] ='', thickness: float ='', show_label: bool ='', vertical: bool ='') -> Union[int, str]:
"""Adds a drag line to a plot."""
...
def add_drag_payload(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', show: bool ='', drag_data: Any ='', drop_data: Any ='', payload_type: str ='') -> Union[int, str]:
"""User data payload for drag and drop operations."""
...
def add_drag_point(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', callback: Callable ='', show: bool ='', default_value: Any ='', color: Union[List[int], Tuple[int, ...]] ='', thickness: float ='', show_label: bool ='') -> Union[int, str]:
"""Adds a drag point to a plot."""
...
def add_draw_layer(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', perspective_divide: bool ='', depth_clipping: bool ='', cull_mode: int ='') -> Union[int, str]:
"""New in 1.1. Creates a layer useful for grouping drawlist items."""
...
def add_draw_node(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='') -> Union[int, str]:
"""New in 1.1. Creates a drawing node to associate a transformation matrix. Child node matricies will concatenate."""
...
def add_drawlist(width : int, height : int, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='') -> Union[int, str]:
"""Adds a drawing canvas."""
...
def add_dynamic_texture(width : int, height : int, default_value : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a dynamic texture."""
...
def add_error_series(x : Union[List[float], Tuple[float, ...]], y : Union[List[float], Tuple[float, ...]], negative : Union[List[float], Tuple[float, ...]], positive : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='', contribute_to_bounds: bool ='', horizontal: bool ='') -> Union[int, str]:
"""Adds an error series to a plot."""
...
def add_file_dialog(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', callback: Callable ='', show: bool ='', default_path: str ='', default_filename: str ='', file_count: int ='', modal: bool ='', directory_selector: bool ='', min_size: Union[List[int], Tuple[int, ...]] ='', max_size: Union[List[int], Tuple[int, ...]] ='', cancel_callback: Callable ='') -> Union[int, str]:
"""Displays a file or directory selector depending on keywords. Displays a file dialog by default. Callback will be ran when the file or directory picker is closed. The app_data arguemnt will be populated with information related to the file and directory as a dictionary."""
...
def add_file_extension(extension : str, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', custom_text: str ='', color: Union[List[int], Tuple[int, ...]] ='') -> Union[int, str]:
"""Creates a file extension filter option in the file dialog."""
...
def add_filter_set(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', delay_search: bool ='') -> Union[int, str]:
"""Helper to parse and apply text filters (e.g. aaaaa[, bbbbb][, ccccc])"""
...
def add_float4_value(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', source: Union[int, str] ='', default_value: Union[List[float], Tuple[float, ...]] ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a float4 value."""
...
def add_float_value(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', source: Union[int, str] ='', default_value: float ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a float value."""
...
def add_float_vect_value(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', source: Union[int, str] ='', default_value: Union[List[float], Tuple[float, ...]] ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a float vect value."""
...
def add_font(file : str, size : int, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds font to a font registry."""
...
def add_font_chars(chars : Union[List[int], Tuple[int, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds specific font characters to a font."""
...
def add_font_range(first_char : int, last_char : int, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a range of font characters to a font."""
...
def add_font_range_hint(hint : int, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a range of font characters (mvFontRangeHint_ constants)."""
...
def add_font_registry(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', show: bool ='') -> Union[int, str]:
"""Adds a font registry."""
...
def add_group(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', horizontal: bool ='', horizontal_spacing: float ='', xoffset: float ='') -> Union[int, str]:
"""Creates a group that other widgets can belong to. The group allows item commands to be issued for all of its members."""
...
def add_handler_registry(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', show: bool ='') -> Union[int, str]:
"""Adds a handler registry."""
...
def add_heat_series(x : Union[List[float], Tuple[float, ...]], rows : int, cols : int, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='', scale_min: float ='', scale_max: float ='', bounds_min: Any ='', bounds_max: Any ='', format: str ='', contribute_to_bounds: bool ='') -> Union[int, str]:
"""Adds a heat series to a plot."""
...
def add_histogram_series(x : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='', bins: int ='', bar_scale: float ='', min_range: float ='', max_range: float ='', cumlative: bool ='', density: bool ='', outliers: bool ='', contribute_to_bounds: bool ='') -> Union[int, str]:
"""Adds a histogram series to a plot."""
...
def add_hline_series(x : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='') -> Union[int, str]:
"""Adds an infinite horizontal line series to a plot."""
...
def add_image(texture_tag : Union[int, str], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', tint_color: Union[List[float], Tuple[float, ...]] ='', border_color: Union[List[float], Tuple[float, ...]] ='', uv_min: Union[List[float], Tuple[float, ...]] ='', uv_max: Union[List[float], Tuple[float, ...]] ='') -> Union[int, str]:
"""Adds an image from a specified texture. uv_min and uv_max represent the normalized texture coordinates of the original image that will be shown. Using range (0.0,0.0)->(1.0,1.0) for texture coordinates will generally display the entire texture."""
...
def add_image_button(texture_tag : Union[int, str], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', frame_padding: int ='', tint_color: Union[List[float], Tuple[float, ...]] ='', background_color: Union[List[float], Tuple[float, ...]] ='', uv_min: Union[List[float], Tuple[float, ...]] ='', uv_max: Union[List[float], Tuple[float, ...]] ='') -> Union[int, str]:
"""Adds an button with a texture. uv_min and uv_max represent the normalized texture coordinates of the original image that will be shown. Using range (0.0,0.0)->(1.0,1.0) texture coordinates will generally display the entire texture"""
...
def add_image_series(texture_tag : Union[int, str], bounds_min : Union[List[float], Tuple[float, ...]], bounds_max : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='', uv_min: Union[List[float], Tuple[float, ...]] ='', uv_max: Union[List[float], Tuple[float, ...]] ='', tint_color: Union[List[int], Tuple[int, ...]] ='') -> Union[int, str]:
"""Adds an image series to a plot."""
...
def add_input_double(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: float ='', format: str ='', min_value: float ='', max_value: float ='', step: float ='', step_fast: float ='', min_clamped: bool ='', max_clamped: bool ='', on_enter: bool ='', readonly: bool ='') -> Union[int, str]:
"""Adds input for an double. Useful when input float is not accurate enough. +/- buttons can be activated by setting the value of step."""
...
def add_input_doublex(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: Any ='', format: str ='', min_value: float ='', max_value: float ='', size: int ='', min_clamped: bool ='', max_clamped: bool ='', on_enter: bool ='', readonly: bool ='') -> Union[int, str]:
"""Adds multi double input for up to 4 double values. Useful when input float mulit is not accurate enough."""
...
def add_input_float(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: float ='', format: str ='', min_value: float ='', max_value: float ='', step: float ='', step_fast: float ='', min_clamped: bool ='', max_clamped: bool ='', on_enter: bool ='', readonly: bool ='') -> Union[int, str]:
"""Adds input for an float. +/- buttons can be activated by setting the value of step."""
...
def add_input_floatx(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: Union[List[float], Tuple[float, ...]] ='', format: str ='', min_value: float ='', max_value: float ='', size: int ='', min_clamped: bool ='', max_clamped: bool ='', on_enter: bool ='', readonly: bool ='') -> Union[int, str]:
"""Adds multi float input for up to 4 float values."""
...
def add_input_int(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: int ='', min_value: int ='', max_value: int ='', step: int ='', step_fast: int ='', min_clamped: bool ='', max_clamped: bool ='', on_enter: bool ='', readonly: bool ='') -> Union[int, str]:
"""Adds input for an int. +/- buttons can be activated by setting the value of step."""
...
def add_input_intx(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: Union[List[int], Tuple[int, ...]] ='', min_value: int ='', max_value: int ='', size: int ='', min_clamped: bool ='', max_clamped: bool ='', on_enter: bool ='', readonly: bool ='') -> Union[int, str]:
"""Adds multi int input for up to 4 integer values."""
...
def add_input_text(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: str ='', hint: str ='', multiline: bool ='', no_spaces: bool ='', uppercase: bool ='', tab_input: bool ='', decimal: bool ='', hexadecimal: bool ='', readonly: bool ='', password: bool ='', scientific: bool ='', on_enter: bool ='') -> Union[int, str]:
"""Adds input for text."""
...
def add_int4_value(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', source: Union[int, str] ='', default_value: Union[List[int], Tuple[int, ...]] ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a int4 value."""
...
def add_int_value(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', source: Union[int, str] ='', default_value: int ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a int value."""
...
def add_item_activated_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]:
"""Adds a activated handler."""
...
def add_item_active_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]:
"""Adds a active handler."""
...
def add_item_clicked_handler(button : int ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]:
"""Adds a clicked handler."""
...
def add_item_deactivated_after_edit_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]:
"""Adds a deactivated after edit handler."""
...
def add_item_deactivated_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]:
"""Adds a deactivated handler."""
...
def add_item_double_clicked_handler(button : int ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]:
"""Adds a double click handler."""
...
def add_item_edited_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]:
"""Adds an edited handler."""
...
def add_item_focus_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]:
"""Adds a focus handler."""
...
def add_item_handler_registry(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', show: bool ='') -> Union[int, str]:
"""Adds an item handler registry."""
...
def add_item_hover_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]:
"""Adds a hover handler."""
...
def add_item_resize_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]:
"""Adds a resize handler."""
...
def add_item_toggled_open_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]:
"""Adds a togged open handler."""
...
def add_item_visible_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]:
"""Adds a visible handler."""
...
def add_key_down_handler(key : int ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', callback: Callable ='', show: bool ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a key down handler."""
...
def add_key_press_handler(key : int ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', callback: Callable ='', show: bool ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a key press handler."""
...
def add_key_release_handler(key : int ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', callback: Callable ='', show: bool ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a key release handler."""
...
def add_knob_float(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: float ='', min_value: float ='', max_value: float ='') -> Union[int, str]:
"""Adds a knob that rotates based on change in x mouse position."""
...
def add_line_series(x : Union[List[float], Tuple[float, ...]], y : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='') -> Union[int, str]:
"""Adds a line series to a plot."""
...
def add_listbox(items : Union[List[str], Tuple[str, ...]] ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: str ='', num_items: int ='') -> Union[int, str]:
"""Adds a listbox. If height is not large enough to show all items a scroll bar will appear."""
...
def add_loading_indicator(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', style: int ='', circle_count: int ='', speed: float ='', radius: float ='', thickness: float ='', color: Union[List[int], Tuple[int, ...]] ='', secondary_color: Union[List[int], Tuple[int, ...]] ='') -> Union[int, str]:
"""Adds a rotating animated loading symbol."""
...
def add_menu(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='') -> Union[int, str]:
"""Adds a menu to an existing menu bar."""
...
def add_menu_bar(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', show: bool ='', delay_search: bool ='') -> Union[int, str]:
"""Adds a menu bar to a window."""
...
def add_menu_item(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: bool ='', shortcut: str ='', check: bool ='') -> Union[int, str]:
"""Adds a menu item to an existing menu. Menu items act similar to selectables and has a bool value. When placed in a menu the checkmark will reflect its value."""
...
def add_mouse_click_handler(button : int ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', callback: Callable ='', show: bool ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a mouse click handler."""
...
def add_mouse_double_click_handler(button : int ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', callback: Callable ='', show: bool ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a mouse double click handler."""
...
def add_mouse_down_handler(button : int ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', callback: Callable ='', show: bool ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a mouse down handler."""
...
def add_mouse_drag_handler(button : int ='', threshold : float ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', callback: Callable ='', show: bool ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a mouse drag handler."""
...
def add_mouse_move_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', callback: Callable ='', show: bool ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a mouse move handler."""
...
def add_mouse_release_handler(button : int ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', callback: Callable ='', show: bool ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a mouse release handler."""
...
def add_mouse_wheel_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', callback: Callable ='', show: bool ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a mouse wheel handler."""
...
def add_node(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', draggable: bool ='') -> Union[int, str]:
"""Adds a node to a node editor."""
...
def add_node_attribute(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', attribute_type: int ='', shape: int ='', category: str ='') -> Union[int, str]:
"""Adds a node attribute to a node."""
...
def add_node_editor(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', callback: Callable ='', show: bool ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', delink_callback: Callable ='', menubar: bool ='', minimap: bool ='', minimap_location: int ='') -> Union[int, str]:
"""Adds a node editor."""
...
def add_node_link(attr_1 : Union[int, str], attr_2 : Union[int, str], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', show: bool ='') -> Union[int, str]:
"""Adds a node link between 2 node attributes."""
...
def add_pie_series(x : float, y : float, radius : float, values : Union[List[float], Tuple[float, ...]], labels : Union[List[str], Tuple[str, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='', format: str ='', angle: float ='', normalize: bool ='') -> Union[int, str]:
"""Adds an pie series to a plot."""
...
def add_plot(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', no_title: bool ='', no_menus: bool ='', no_box_select: bool ='', no_mouse_pos: bool ='', no_highlight: bool ='', no_child: bool ='', query: bool ='', crosshairs: bool ='', anti_aliased: bool ='', equal_aspects: bool ='', use_local_time: bool ='', use_ISO8601: bool ='', use_24hour_clock: bool ='', pan_button: int ='', pan_mod: int ='', fit_button: int ='', context_menu_button: int ='', box_select_button: int ='', box_select_mod: int ='', box_select_cancel_button: int ='', query_button: int ='', query_mod: int ='', query_toggle_mod: int ='', horizontal_mod: int ='', vertical_mod: int ='') -> Union[int, str]:
"""Adds a plot which is used to hold series, and can be drawn to with draw commands."""
...
def add_plot_annotation(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='', default_value: Any ='', offset: Union[List[float], Tuple[float, ...]] ='', color: Union[List[int], Tuple[int, ...]] ='', clamped: bool ='') -> Union[int, str]:
"""Adds an annotation to a plot."""
...
def add_plot_axis(axis : int, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', payload_type: str ='', drop_callback: Callable ='', show: bool ='', no_gridlines: bool ='', no_tick_marks: bool ='', no_tick_labels: bool ='', log_scale: bool ='', invert: bool ='', lock_min: bool ='', lock_max: bool ='', time: bool ='') -> Union[int, str]:
"""Adds an axis to a plot."""
...
def add_plot_legend(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', payload_type: str ='', drop_callback: Callable ='', show: bool ='', location: int ='', horizontal: bool ='', outside: bool ='') -> Union[int, str]:
"""Adds a plot legend to a plot."""
...
def add_progress_bar(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', overlay: str ='', default_value: float ='') -> Union[int, str]:
"""Adds a progress bar."""
...
def add_radio_button(items : Union[List[str], Tuple[str, ...]] ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: str ='', horizontal: bool ='') -> Union[int, str]:
"""Adds a set of radio buttons. If items keyword is empty, nothing will be shown."""
...
def add_raw_texture(width : int, height : int, default_value : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', format: int ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a raw texture."""
...
def add_scatter_series(x : Union[List[float], Tuple[float, ...]], y : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='') -> Union[int, str]:
"""Adds a scatter series to a plot."""
...
def add_selectable(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: bool ='', span_columns: bool ='', disable_popup_close: bool ='') -> Union[int, str]:
"""Adds a selectable. Similar to a button but can indicate its selected state."""
...
def add_separator(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='') -> Union[int, str]:
"""Adds a horizontal line separator."""
...
def add_series_value(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', source: Union[int, str] ='', default_value: Any ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a plot series value."""
...
def add_shade_series(x : Union[List[float], Tuple[float, ...]], y1 : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='', y2: Any ='') -> Union[int, str]:
"""Adds a shade series to a plot."""
...
def add_simple_plot(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: Union[List[float], Tuple[float, ...]] ='', overlay: str ='', histogram: bool ='', autosize: bool ='', min_scale: float ='', max_scale: float ='') -> Union[int, str]:
"""Adds a simple plot for visualization of a 1 dimensional set of values."""
...
def add_slider_double(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: float ='', vertical: bool ='', no_input: bool ='', clamped: bool ='', min_value: float ='', max_value: float ='', format: str ='') -> Union[int, str]:
"""Adds slider for a single double value. Useful when slider float is not accurate enough. Directly entry can be done with double click or CTRL+Click. Min and Max alone are a soft limit for the slider. Use clamped keyword to also apply limits to the direct entry modes."""
...
def add_slider_doublex(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: Any ='', size: int ='', no_input: bool ='', clamped: bool ='', min_value: float ='', max_value: float ='', format: str ='') -> Union[int, str]:
"""Adds multi slider for up to 4 double values. Usueful for when multi slide float is not accurate enough. Directly entry can be done with double click or CTRL+Click. Min and Max alone are a soft limit for the slider. Use clamped keyword to also apply limits to the direct entry modes."""
...
def add_slider_float(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: float ='', vertical: bool ='', no_input: bool ='', clamped: bool ='', min_value: float ='', max_value: float ='', format: str ='') -> Union[int, str]:
"""Adds slider for a single float value. Directly entry can be done with double click or CTRL+Click. Min and Max alone are a soft limit for the slider. Use clamped keyword to also apply limits to the direct entry modes."""
...
def add_slider_floatx(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: Union[List[float], Tuple[float, ...]] ='', size: int ='', no_input: bool ='', clamped: bool ='', min_value: float ='', max_value: float ='', format: str ='') -> Union[int, str]:
"""Adds multi slider for up to 4 float values. Directly entry can be done with double click or CTRL+Click. Min and Max alone are a soft limit for the slider. Use clamped keyword to also apply limits to the direct entry modes."""
...
def add_slider_int(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: int ='', vertical: bool ='', no_input: bool ='', clamped: bool ='', min_value: int ='', max_value: int ='', format: str ='') -> Union[int, str]:
"""Adds slider for a single int value. Directly entry can be done with double click or CTRL+Click. Min and Max alone are a soft limit for the slider. Use clamped keyword to also apply limits to the direct entry modes."""
...
def add_slider_intx(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: Union[List[int], Tuple[int, ...]] ='', size: int ='', no_input: bool ='', clamped: bool ='', min_value: int ='', max_value: int ='', format: str ='') -> Union[int, str]:
"""Adds multi slider for up to 4 int values. Directly entry can be done with double click or CTRL+Click. Min and Max alone are a soft limit for the slider. Use clamped keyword to also apply limits to the direct entry modes."""
...
def add_spacer(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='') -> Union[int, str]:
"""Adds a spacer item that can be used to help with layouts or can be used as a placeholder item."""
...
def add_stage(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='') -> Union[int, str]:
"""Adds a stage."""
...
def add_stair_series(x : Union[List[float], Tuple[float, ...]], y : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='') -> Union[int, str]:
"""Adds a stair series to a plot."""
...
def add_static_texture(width : int, height : int, default_value : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a static texture."""
...
def add_stem_series(x : Union[List[float], Tuple[float, ...]], y : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='') -> Union[int, str]:
"""Adds a stem series to a plot."""
...
def add_string_value(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', source: Union[int, str] ='', default_value: str ='', parent: Union[int, str] ='') -> Union[int, str]:
"""Adds a string value."""
...
def add_subplots(rows : int, columns : int, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', row_ratios: Union[List[float], Tuple[float, ...]] ='', column_ratios: Union[List[float], Tuple[float, ...]] ='', no_title: bool ='', no_menus: bool ='', no_resize: bool ='', no_align: bool ='', link_rows: bool ='', link_columns: bool ='', link_all_x: bool ='', link_all_y: bool ='', column_major: bool ='') -> Union[int, str]:
"""Adds a collection of plots."""
...
def add_tab(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drop_callback: Callable ='', show: bool ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', closable: bool ='', no_tooltip: bool ='', order_mode: bool ='') -> Union[int, str]:
"""Adds a tab to a tab bar."""
...
def add_tab_bar(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', reorderable: bool ='') -> Union[int, str]:
"""Adds a tab bar."""
...
def add_tab_button(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', no_reorder: bool ='', leading: bool ='', trailing: bool ='', no_tooltip: bool ='') -> Union[int, str]:
"""Adds a tab button to a tab bar."""
...
def add_table(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', header_row: bool ='', clipper: bool ='', inner_width: int ='', policy: int ='', freeze_rows: int ='', freeze_columns: int ='', sort_multi: bool ='', sort_tristate: bool ='', resizable: bool ='', reorderable: bool ='', hideable: bool ='', sortable: bool ='', context_menu_in_body: bool ='', row_background: bool ='', borders_innerH: bool ='', borders_outerH: bool ='', borders_innerV: bool ='', borders_outerV: bool ='', no_host_extendX: bool ='', no_host_extendY: bool ='', no_keep_columns_visible: bool ='', precise_widths: bool ='', no_clip: bool ='', pad_outerX: bool ='', no_pad_outerX: bool ='', no_pad_innerX: bool ='', scrollX: bool ='', scrollY: bool ='', no_saved_settings: bool ='') -> Union[int, str]:
"""Adds a table."""
...
def add_table_cell(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', height: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', filter_key: str ='') -> Union[int, str]:
"""Adds a table."""
...
def add_table_column(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', enabled: bool ='', init_width_or_weight: float ='', default_hide: bool ='', default_sort: bool ='', width_stretch: bool ='', width_fixed: bool ='', no_resize: bool ='', no_reorder: bool ='', no_hide: bool ='', no_clip: bool ='', no_sort: bool ='', no_sort_ascending: bool ='', no_sort_descending: bool ='', no_header_width: bool ='', prefer_sort_ascending: bool ='', prefer_sort_descending: bool ='', indent_enable: bool ='', indent_disable: bool ='') -> Union[int, str]:
"""Adds a table column."""
...
def add_table_row(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', height: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', filter_key: str ='') -> Union[int, str]:
"""Adds a table row."""
...
def add_template_registry(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='') -> Union[int, str]:
"""Adds a template registry."""
...
def add_text(default_value : str ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', wrap: int ='', bullet: bool ='', color: Union[List[int], Tuple[int, ...]] ='', show_label: bool ='') -> Union[int, str]:
"""Adds text. Text can have an optional label that will display to the right of the text."""
...
def add_text_point(x : float, y : float, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='', x_offset: int ='', y_offset: int ='', vertical: bool ='') -> Union[int, str]:
"""Adds a label series to a plot."""
...
def add_texture_registry(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', show: bool ='') -> Union[int, str]:
"""Adds a dynamic texture."""
...
def add_theme(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='') -> Union[int, str]:
"""Adds a theme."""
...
def add_theme_color(target : int ='', value : Union[List[int], Tuple[int, ...]] ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', category: int ='') -> Union[int, str]:
"""Adds a theme color."""
...
def add_theme_component(item_type : int ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', enabled_state: bool ='') -> Union[int, str]:
"""Adds a theme component."""
...
def add_theme_style(target : int ='', x : float ='', y : float ='', *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', category: int ='') -> Union[int, str]:
"""Adds a theme style."""
...
def add_time_picker(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: dict ='', hour24: bool ='') -> Union[int, str]:
"""Adds a time picker."""
...
def add_tooltip(parent : Union[int, str], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', show: bool ='') -> Union[int, str]:
"""Adds a tooltip window."""
...
def add_tree_node(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', default_open: bool ='', open_on_double_click: bool ='', open_on_arrow: bool ='', leaf: bool ='', bullet: bool ='', selectable: bool ='') -> Union[int, str]:
"""Adds a tree node to add items to."""
...
def add_value_registry(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='') -> Union[int, str]:
"""Adds a value registry."""
...
def add_viewport_drawlist(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', show: bool ='', filter_key: str ='', delay_search: bool ='', front: bool ='') -> Union[int, str]:
"""A container that is used to present draw items or layers directly to the viewport. By default this will draw to the back of the viewport. Layers and draw items should be added to this widget as children."""
...
def add_viewport_menu_bar(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', show: bool ='', delay_search: bool ='') -> Union[int, str]:
"""Adds a menubar to the viewport."""
...
def add_vline_series(x : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='') -> Union[int, str]:
"""Adds an infinite vertical line series to a plot."""
...
def add_window(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', delay_search: bool ='', min_size: Union[List[int], Tuple[int, ...]] ='', max_size: Union[List[int], Tuple[int, ...]] ='', menubar: bool ='', collapsed: bool ='', autosize: bool ='', no_resize: bool ='', no_title_bar: bool ='', no_move: bool ='', no_scrollbar: bool ='', no_collapse: bool ='', horizontal_scrollbar: bool ='', no_focus_on_appearing: bool ='', no_bring_to_front_on_focus: bool ='', no_close: bool ='', no_background: bool ='', modal: bool ='', popup: bool ='', no_saved_settings: bool ='', no_open_over_existing_popup: bool ='', no_scroll_with_mouse: bool ='', on_close: Callable ='') -> Union[int, str]:
"""Creates a new window for following items to be added to."""
...
def apply_transform(item : Union[int, str], transform : Any) -> None:
"""New in 1.1. Applies a transformation matrix to a layer."""
...
def bind_colormap(item : Union[int, str], source : Union[int, str]) -> None:
"""Sets the color map for widgets that accept it."""
...
def bind_font(font : Union[int, str]) -> Union[int, str]:
"""Binds a global font."""
...
def bind_item_font(item : Union[int, str], font : Union[int, str]) -> None:
"""Sets an item's font."""
...
def bind_item_handler_registry(item : Union[int, str], handler_registry : Union[int, str]) -> None:
"""Binds an item handler registry to an item."""
...
def bind_item_theme(item : Union[int, str], theme : Union[int, str]) -> None:
"""Binds a theme to an item."""
...
def bind_theme(theme : Union[int, str]) -> None:
"""Binds a global theme."""
...
def capture_next_item(callback : Callable, *, user_data: Any ='') -> None:
"""Captures the next item."""
...
def clear_selected_links(node_editor : Union[int, str]) -> None:
"""Clears a node editor's selected links."""
...
def clear_selected_nodes(node_editor : Union[int, str]) -> None:
"""Clears a node editor's selected nodes."""
...
def configure_app(*, docking: bool ='', docking_space: bool ='', load_init_file: str ='', init_file: str ='', auto_save_init_file: bool ='', device: int ='', auto_device: bool ='', allow_alias_overwrites: bool ='', manual_alias_management: bool ='', skip_required_args: bool ='', skip_positional_args: bool ='', skip_keyword_args: bool ='', wait_for_input: bool ='', manual_callback_management: bool ='', **kwargs) -> None:
"""Configures app."""
...
def configure_item(item : Union[int, str], **kwargs) -> None:
"""Configures an item."""
...
def configure_viewport(item : Union[int, str], **kwargs) -> None:
"""Configures a viewport."""
...
def create_context() -> None:
"""Creates the Dear PyGui context."""
...
def create_fps_matrix(eye : Union[List[float], Tuple[float, ...]], pitch : float, yaw : float) -> Any:
"""New in 1.1. Create a 'first person shooter' matrix."""
...
def create_lookat_matrix(eye : Union[List[float], Tuple[float, ...]], target : Union[List[float], Tuple[float, ...]], up : Union[List[float], Tuple[float, ...]]) -> Any:
"""New in 1.1. Creates a 'Look at matrix'."""
...
def create_orthographic_matrix(left : float, right : float, bottom : float, top : float, zNear : float, zFar : float) -> Any:
"""New in 1.1. Creates an orthographic matrix."""
...
def create_perspective_matrix(fov : float, aspect : float, zNear : float, zFar : float) -> Any:
"""New in 1.1. Creates a perspective matrix."""
...
def create_rotation_matrix(angle : float, axis : Union[List[float], Tuple[float, ...]]) -> Any:
"""New in 1.1. Applies a transformation matrix to a layer."""
...
def create_scale_matrix(scales : Union[List[float], Tuple[float, ...]]) -> Any:
"""New in 1.1. Applies a transformation matrix to a layer."""
...
def create_translation_matrix(translation : Union[List[float], Tuple[float, ...]]) -> Any:
"""New in 1.1. Creates a translation matrix."""
...
def create_viewport(*, title: str ='', small_icon: str ='', large_icon: str ='', width: int ='', height: int ='', x_pos: int ='', y_pos: int ='', min_width: int ='', max_width: int ='', min_height: int ='', max_height: int ='', resizable: bool ='', vsync: bool ='', always_on_top: bool ='', decorated: bool ='', clear_color: Union[List[float], Tuple[float, ...]] ='', disable_close: bool ='') -> None:
"""Creates a viewport. Viewports are required."""
...
def delete_item(item : Union[int, str], *, children_only: bool ='', slot: int ='') -> None:
"""Deletes an item.."""
...
def destroy_context() -> None:
"""Destroys the Dear PyGui context."""
...
def does_alias_exist(alias : str) -> bool:
"""Checks if an alias exist."""
...
def does_item_exist(item : Union[int, str]) -> bool:
"""Checks if an item exist.."""
...
def draw_arrow(p1 : Union[List[float], Tuple[float, ...]], p2 : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', color: Union[List[int], Tuple[int, ...]] ='', thickness: float ='', size: int ='') -> Union[int, str]:
"""Adds an arrow."""
...
def draw_bezier_cubic(p1 : Union[List[float], Tuple[float, ...]], p2 : Union[List[float], Tuple[float, ...]], p3 : Union[List[float], Tuple[float, ...]], p4 : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', color: Union[List[int], Tuple[int, ...]] ='', thickness: float ='', segments: int ='') -> Union[int, str]:
"""Adds a cubic bezier curve."""
...
def draw_bezier_quadratic(p1 : Union[List[float], Tuple[float, ...]], p2 : Union[List[float], Tuple[float, ...]], p3 : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', color: Union[List[int], Tuple[int, ...]] ='', thickness: float ='', segments: int ='') -> Union[int, str]:
"""Adds a quadratic bezier curve."""
...
def draw_circle(center : Union[List[float], Tuple[float, ...]], radius : float, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', color: Union[List[int], Tuple[int, ...]] ='', fill: Union[List[int], Tuple[int, ...]] ='', thickness: float ='', segments: int ='') -> Union[int, str]:
"""Adds a circle"""
...
def draw_ellipse(pmin : Union[List[float], Tuple[float, ...]], pmax : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', color: Union[List[int], Tuple[int, ...]] ='', fill: Union[List[int], Tuple[int, ...]] ='', thickness: float ='', segments: int ='') -> Union[int, str]:
"""Adds an ellipse."""
...
def draw_image(texture_tag : Union[int, str], pmin : Union[List[float], Tuple[float, ...]], pmax : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', uv_min: Union[List[float], Tuple[float, ...]] ='', uv_max: Union[List[float], Tuple[float, ...]] ='', color: Union[List[int], Tuple[int, ...]] ='') -> Union[int, str]:
"""Adds an image (for a drawing)."""
...
def draw_image_quad(texture_tag : Union[int, str], p1 : Union[List[float], Tuple[float, ...]], p2 : Union[List[float], Tuple[float, ...]], p3 : Union[List[float], Tuple[float, ...]], p4 : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', uv1: Union[List[float], Tuple[float, ...]] ='', uv2: Union[List[float], Tuple[float, ...]] ='', uv3: Union[List[float], Tuple[float, ...]] ='', uv4: Union[List[float], Tuple[float, ...]] ='', color: Union[List[int], Tuple[int, ...]] ='') -> Union[int, str]:
"""Adds an image (for a drawing)."""
...
def draw_line(p1 : Union[List[float], Tuple[float, ...]], p2 : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', color: Union[List[int], Tuple[int, ...]] ='', thickness: float ='') -> Union[int, str]:
"""Adds a line."""
...
def draw_polygon(points : List[List[float]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', color: Union[List[int], Tuple[int, ...]] ='', fill: Union[List[int], Tuple[int, ...]] ='', thickness: float ='') -> Union[int, str]:
"""Adds a polygon."""
...
def draw_polyline(points : List[List[float]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', closed: bool ='', color: Union[List[int], Tuple[int, ...]] ='', thickness: float ='') -> Union[int, str]:
"""Adds a polyline."""
...
def draw_quad(p1 : Union[List[float], Tuple[float, ...]], p2 : Union[List[float], Tuple[float, ...]], p3 : Union[List[float], Tuple[float, ...]], p4 : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', color: Union[List[int], Tuple[int, ...]] ='', fill: Union[List[int], Tuple[int, ...]] ='', thickness: float ='') -> Union[int, str]:
"""Adds a quad."""
...
def draw_rectangle(pmin : Union[List[float], Tuple[float, ...]], pmax : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', color: Union[List[int], Tuple[int, ...]] ='', color_upper_left: Union[List[int], Tuple[int, ...]] ='', color_upper_right: Union[List[int], Tuple[int, ...]] ='', color_bottom_right: Union[List[int], Tuple[int, ...]] ='', color_bottom_left: Union[List[int], Tuple[int, ...]] ='', fill: Union[List[int], Tuple[int, ...]] ='', multicolor: bool ='', rounding: float ='', thickness: float ='') -> Union[int, str]:
"""Adds a rectangle."""
...
def draw_text(pos : Union[List[float], Tuple[float, ...]], text : str, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', color: Union[List[int], Tuple[int, ...]] ='', size: float ='') -> Union[int, str]:
"""Adds text (drawlist)."""
...
def draw_triangle(p1 : Union[List[float], Tuple[float, ...]], p2 : Union[List[float], Tuple[float, ...]], p3 : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', color: Union[List[int], Tuple[int, ...]] ='', fill: Union[List[int], Tuple[int, ...]] ='', thickness: float ='') -> Union[int, str]:
"""Adds a triangle."""
...
def empty_container_stack() -> None:
"""Emptyes the container stack."""
...
def fit_axis_data(axis : Union[int, str]) -> None:
"""Sets the axis boundaries max/min in the data series currently on the plot."""
...
def focus_item(item : Union[int, str]) -> None:
"""Focuses an item."""
...
def generate_uuid() -> Union[int, str]:
"""Generate a new UUID."""
...
def get_active_window() -> Union[int, str]:
"""Returns the active window."""
...
def get_alias_id(alias : str) -> Union[int, str]:
"""Returns the ID associated with an alias."""
...
def get_aliases() -> Union[List[str], Tuple[str, ...]]:
"""Returns all aliases."""
...
def get_all_items() -> Union[List[int], Tuple[int, ...]]:
"""Returns all items."""
...
def get_app_configuration() -> dict:
"""Returns app configuration."""
...
def get_axis_limits(axis : Union[int, str]) -> Union[List[float], Tuple[float, ...]]:
"""Get the specified axis limits."""
...
def get_callback_queue() -> Any:
"""New in 1.2. Returns and clears callback queue."""
...
def get_clipboard_text() -> str:
"""New in 1.3. Gets the clipboard text."""
...
def get_colormap_color(colormap : Union[int, str], index : int) -> Union[List[int], Tuple[int, ...]]:
"""Returns a color from a colormap given an index >= 0. (ex. 0 will be the first color in the color list of the color map) Modulo will be performed against the number of items in the color list."""
...
def get_delta_time() -> float:
"""Returns time since last frame."""
...
def get_drawing_mouse_pos() -> Union[List[int], Tuple[int, ...]]:
"""Returns mouse position in drawing."""
...
def get_file_dialog_info(file_dialog : Union[int, str]) -> dict:
"""Returns information related to the file dialog. Typically used while the file dialog is in use to query data about the state or info related to the file dialog."""
...
def get_frame_count() -> int:
"""Returns frame count."""
...
def get_frame_rate() -> float:
"""Returns the average frame rate across 120 frames."""
...
def get_global_font_scale() -> float:
"""Returns global font scale."""
...
def get_item_alias(item : Union[int, str]) -> str:
"""Returns an item's alias."""
...
def get_item_configuration(item : Union[int, str]) -> dict:
"""Returns an item's configuration."""
...
def get_item_info(item : Union[int, str]) -> dict:
"""Returns an item's information."""
...
def get_item_state(item : Union[int, str]) -> dict:
"""Returns an item's state."""
...
def get_item_types() -> dict:
"""Returns an item types."""
...
def get_mouse_drag_delta() -> float:
"""Returns mouse drag delta."""
...
def get_mouse_pos(*, local: bool ='') -> Union[List[int], Tuple[int, ...]]:
"""Returns mouse position."""
...
def get_platform() -> int:
"""New in 1.6. Returns platform constant."""
...
def get_plot_mouse_pos() -> Union[List[int], Tuple[int, ...]]:
"""Returns mouse position in plot."""
...
def get_plot_query_area(plot : Union[int, str]) -> Union[List[float], Tuple[float, ...]]:
"""Returns the last/current query area of the plot. (Requires plot 'query' kwarg to be enabled)"""
...
def get_selected_links(node_editor : Union[int, str]) -> List[List[str]]:
"""Returns a node editor's selected links."""
...
def get_selected_nodes(node_editor : Union[int, str]) -> Union[List[int], Tuple[int, ...]]:
"""Returns a node editor's selected nodes."""
...
def get_text_size(text : str, *, wrap_width: float ='', font: Union[int, str] ='') -> Union[List[float], Tuple[float, ...]]:
"""Returns width/height of text with specified font (must occur after 1st frame)."""
...
def get_total_time() -> float:
"""Returns total time since Dear PyGui has started."""
...
def get_value(item : Union[int, str]) -> Any:
"""Returns an item's value."""
...
def get_values(items : Union[List[int], Tuple[int, ...]]) -> Any:
"""Returns values of a list of items."""
...
def get_viewport_configuration(item : Union[int, str]) -> dict:
"""Returns a viewport's configuration."""
...
def get_windows() -> Union[List[int], Tuple[int, ...]]:
"""Returns all windows."""
...
def get_x_scroll(item : Union[int, str]) -> float:
"""Undocumented"""
...
def get_x_scroll_max(item : Union[int, str]) -> float:
"""Undocumented"""
...
def get_y_scroll(item : Union[int, str]) -> float:
"""Undocumented"""
...
def get_y_scroll_max(item : Union[int, str]) -> float:
"""Undocumented"""
...
def highlight_table_cell(table : Union[int, str], row : int, column : int, color : Union[List[int], Tuple[int, ...]]) -> None:
"""Highlight specified table cell."""
...
def highlight_table_column(table : Union[int, str], column : int, color : Union[List[int], Tuple[int, ...]]) -> None:
"""Highlight specified table column."""
...
def highlight_table_row(table : Union[int, str], row : int, color : Union[List[int], Tuple[int, ...]]) -> None:
"""Highlight specified table row."""
...
def is_dearpygui_running() -> bool:
"""Checks if Dear PyGui is running"""
...
def is_key_down(key : int) -> bool:
"""Checks if key is down."""
...
def is_key_pressed(key : int) -> bool:
"""Checks if key is pressed."""
...
def is_key_released(key : int) -> bool:
"""Checks if key is released."""
...
def is_mouse_button_clicked(button : int) -> bool:
"""Checks if mouse button is clicked."""
...
def is_mouse_button_double_clicked(button : int) -> bool:
"""Checks if mouse button is double clicked."""
...
def is_mouse_button_down(button : int) -> bool:
"""Checks if mouse button is down."""
...
def is_mouse_button_dragging(button : int, threshold : float) -> bool:
"""Checks if mouse button is down and dragging."""
...
def is_mouse_button_released(button : int) -> bool:
"""Checks if mouse button is released."""
...
def is_plot_queried(plot : Union[int, str]) -> bool:
"""Returns true if the plot is currently being queried. (Requires plot 'query' kwarg to be enabled)"""
...
def is_table_cell_highlighted(table : Union[int, str], row : int, column : int) -> bool:
"""Checks if a table cell is highlighted."""
...
def is_table_column_highlighted(table : Union[int, str], column : int) -> bool:
"""Checks if a table column is highlighted."""
...
def is_table_row_highlighted(table : Union[int, str], row : int) -> bool:
"""Checks if a table row is highlighted."""
...
def is_viewport_ok() -> bool:
"""Checks if a viewport has been created and shown."""
...
def last_container() -> Union[int, str]:
"""Returns the last container item added."""
...
def last_item() -> Union[int, str]:
"""Returns the last item added."""
...
def last_root() -> Union[int, str]:
"""Returns the last root added (registry or window)."""
...
def load_image(file : str, *, gamma: float ='', gamma_scale_factor: float ='') -> Any:
"""Loads an image. Returns width, height, channels, mvBuffer"""
...
def lock_mutex() -> None:
"""Locks render thread mutex."""
...
def maximize_viewport() -> None:
"""Maximizes the viewport."""
...
def minimize_viewport() -> None:
"""Minimizes a viewport."""
...
def move_item(item : Union[int, str], *, parent: Union[int, str] ='', before: Union[int, str] ='') -> None:
"""Moves an item to a new location."""
...
def move_item_down(item : Union[int, str]) -> None:
"""Moves an item down."""
...
def move_item_up(item : Union[int, str]) -> None:
"""Moves an item up."""
...
def output_frame_buffer(file : str ='', *, callback: Callable ='') -> Any:
"""Outputs frame buffer as a png if file is specified or through the second argument of a callback if specified. Render loop must have been started."""
...
def pop_container_stack() -> Union[int, str]:
"""Pops the top item off the parent stack and return its ID."""
...
def push_container_stack(item : Union[int, str]) -> bool:
"""Pushes an item onto the container stack."""
...
def remove_alias(alias : str) -> None:
"""Removes an alias."""
...
def render_dearpygui_frame() -> None:
"""Render a single Dear PyGui frame."""
...
def reorder_items(container : Union[int, str], slot : int, new_order : Union[List[int], Tuple[int, ...]]) -> None:
"""Reorders an item's children."""
...
def reset_axis_ticks(axis : Union[int, str]) -> None:
"""Removes the manually set axis ticks and applies the default axis ticks"""
...
def reset_pos(item : Union[int, str]) -> None:
"""Resets an item's position after using 'set_item_pos'."""
...
def sample_colormap(colormap : Union[int, str], t : float) -> Union[List[int], Tuple[int, ...]]:
"""Returns a color from a colormap given t between 0.0-1.0."""
...
def save_image(file : str, width : int, height : int, data : Any, *, components: int ='', quality: int ='') -> None:
"""Saves an image. Possible formats: png, bmp, tga, hdr, jpg."""
...
def save_init_file(file : str) -> None:
"""Save dpg.ini file."""
...
def set_axis_limits(axis : Union[int, str], ymin : float, ymax : float) -> None:
"""Sets limits on the axis for pan and zoom."""
...
def set_axis_limits_auto(axis : Union[int, str]) -> None:
"""Removes all limits on specified axis."""
...
def set_axis_ticks(axis : Union[int, str], label_pairs : Any) -> None:
"""Replaces axis ticks with 'label_pairs' argument."""
...
def set_clip_space(item : Union[int, str], top_left_x : float, top_left_y : float, width : float, height : float, min_depth : float, max_depth : float) -> None:
"""New in 1.1. Set the clip space for depth clipping and 'viewport' transformation."""
...
def set_clipboard_text(text : str) -> None:
"""New in 1.3. Sets the clipboard text."""
...
def set_exit_callback(callback : Callable, *, user_data: Any ='') -> str:
"""Sets a callback to run on last frame."""
...
def set_frame_callback(frame : int, callback : Callable, *, user_data: Any ='') -> str:
"""Sets a callback to run on first frame."""
...
def set_global_font_scale(scale : float) -> None:
"""Sets global font scale."""
...
def set_item_alias(item : Union[int, str], alias : str) -> None:
"""Sets an item's alias."""
...
def set_item_children(item : Union[int, str], source : Union[int, str], slot : int) -> None:
"""Sets an item's children."""
...
def set_primary_window(window : Union[int, str], value : bool) -> None:
"""Sets the primary window."""
...
def set_table_row_color(table : Union[int, str], row : int, color : Union[List[int], Tuple[int, ...]]) -> None:
"""Set table row color."""
...
def set_value(item : Union[int, str], value : Any) -> None:
"""Set's an item's value."""
...
def set_viewport_resize_callback(callback : Callable, *, user_data: Any ='') -> str:
"""Sets a callback to run on viewport resize."""
...
def set_x_scroll(item : Union[int, str], value : float) -> None:
"""Undocumented"""
...
def set_y_scroll(item : Union[int, str], value : float) -> None:
"""Undocumented"""
...
def setup_dearpygui() -> None:
"""Sets up Dear PyGui"""
...
def show_imgui_demo() -> None:
"""Shows the imgui demo."""
...
def show_implot_demo() -> None:
"""Shows the implot demo."""
...
def show_item_debug(item : Union[int, str]) -> None:
"""Shows an item's debug window"""
...
def show_tool(tool : Union[int, str]) -> str:
"""Shows a built in tool."""
...
def show_viewport(*, minimized: bool ='', maximized: bool ='') -> None:
"""Shows the main viewport."""
...
def split_frame(*, delay: int ='') -> None:
"""Waits one frame."""
...
def stop_dearpygui() -> None:
"""Stops Dear PyGui"""
...
def toggle_viewport_fullscreen() -> None:
"""Toggle viewport fullscreen mode.."""
...
def top_container_stack() -> Union[int, str]:
"""Returns the item on the top of the container stack."""
...
def unhighlight_table_cell(table : Union[int, str], row : int, column : int) -> None:
"""Unhighlight specified table cell."""
...
def unhighlight_table_column(table : Union[int, str], column : int) -> None:
"""Unhighlight specified table column."""
...
def unhighlight_table_row(table : Union[int, str], row : int) -> None:
"""Unhighlight specified table row."""
...
def unlock_mutex() -> None:
"""Unlocks render thread mutex"""
...
def unset_table_row_color(table : Union[int, str], row : int) -> None:
"""Remove user set table row color."""
...
def unstage(item : Union[int, str]) -> None:
"""Unstages an item."""
...
mvGraphicsBackend_D3D11=0
mvGraphicsBackend_D3D12=0
mvGraphicsBackend_VULKAN=0
mvGraphicsBackend_METAL=0
mvGraphicsBackend_OPENGL=0
mvMouseButton_Left=0
mvMouseButton_Right=0
mvMouseButton_Middle=0
mvMouseButton_X1=0
mvMouseButton_X2=0
mvKey_0=0
mvKey_1=0
mvKey_2=0
mvKey_3=0
mvKey_4=0
mvKey_5=0
mvKey_6=0
mvKey_7=0
mvKey_8=0
mvKey_9=0
mvKey_A=0
mvKey_B=0
mvKey_C=0
mvKey_D=0
mvKey_E=0
mvKey_F=0
mvKey_G=0
mvKey_H=0
mvKey_I=0
mvKey_J=0
mvKey_K=0
mvKey_L=0
mvKey_M=0
mvKey_N=0
mvKey_O=0
mvKey_P=0
mvKey_Q=0
mvKey_R=0
mvKey_S=0
mvKey_T=0
mvKey_U=0
mvKey_V=0
mvKey_W=0
mvKey_X=0
mvKey_Y=0
mvKey_Z=0
mvKey_Back=0
mvKey_Tab=0
mvKey_Clear=0
mvKey_Return=0
mvKey_Shift=0
mvKey_Control=0
mvKey_Alt=0
mvKey_Pause=0
mvKey_Capital=0
mvKey_Escape=0
mvKey_Spacebar=0
mvKey_Prior=0
mvKey_Next=0
mvKey_End=0
mvKey_Home=0
mvKey_Left=0
mvKey_Up=0
mvKey_Right=0
mvKey_Down=0
mvKey_Select=0
mvKey_Print=0
mvKey_Execute=0
mvKey_PrintScreen=0
mvKey_Insert=0
mvKey_Delete=0
mvKey_Help=0
mvKey_LWin=0
mvKey_RWin=0
mvKey_Apps=0
mvKey_Sleep=0
mvKey_NumPad0=0
mvKey_NumPad1=0
mvKey_NumPad2=0
mvKey_NumPad3=0
mvKey_NumPad4=0
mvKey_NumPad5=0
mvKey_NumPad6=0
mvKey_NumPad7=0
mvKey_NumPad8=0
mvKey_NumPad9=0
mvKey_Multiply=0
mvKey_Add=0
mvKey_Separator=0
mvKey_Subtract=0
mvKey_Decimal=0
mvKey_Divide=0
mvKey_F1=0
mvKey_F2=0
mvKey_F3=0
mvKey_F4=0
mvKey_F5=0
mvKey_F6=0
mvKey_F7=0
mvKey_F8=0
mvKey_F9=0
mvKey_F10=0
mvKey_F11=0
mvKey_F12=0
mvKey_F13=0
mvKey_F14=0
mvKey_F15=0
mvKey_F16=0
mvKey_F17=0
mvKey_F18=0
mvKey_F19=0
mvKey_F20=0
mvKey_F21=0
mvKey_F22=0
mvKey_F23=0
mvKey_F24=0
mvKey_F25=0
mvKey_NumLock=0
mvKey_ScrollLock=0
mvKey_LShift=0
mvKey_RShift=0
mvKey_LControl=0
mvKey_RControl=0
mvKey_LMenu=0
mvKey_RMenu=0
mvKey_Browser_Back=0
mvKey_Browser_Forward=0
mvKey_Browser_Refresh=0
mvKey_Browser_Stop=0
mvKey_Browser_Search=0
mvKey_Browser_Favorites=0
mvKey_Browser_Home=0
mvKey_Volume_Mute=0
mvKey_Volume_Down=0
mvKey_Volume_Up=0
mvKey_Media_Next_Track=0
mvKey_Media_Prev_Track=0
mvKey_Media_Stop=0
mvKey_Media_Play_Pause=0
mvKey_Launch_Mail=0
mvKey_Launch_Media_Select=0
mvKey_Launch_App1=0
mvKey_Launch_App2=0
mvKey_Colon=0
mvKey_Plus=0
mvKey_Comma=0
mvKey_Minus=0
mvKey_Period=0
mvKey_Slash=0
mvKey_Tilde=0
mvKey_Open_Brace=0
mvKey_Backslash=0
mvKey_Close_Brace=0
mvKey_Quote=0
mvAll=0
mvTool_About=0
mvTool_Debug=0
mvTool_Doc=0
mvTool_ItemRegistry=0
mvTool_Metrics=0
mvTool_Style=0
mvTool_Font=0
mvFontAtlas=0
mvAppUUID=0
mvInvalidUUID=0
mvDir_None=0
mvDir_Left=0
mvDir_Right=0
mvDir_Up=0
mvDir_Down=0
mvComboHeight_Small=0
mvComboHeight_Regular=0
mvComboHeight_Large=0
mvComboHeight_Largest=0
mvPlatform_Windows=0
mvPlatform_Apple=0
mvPlatform_Linux=0
mvColorEdit_AlphaPreviewNone=0
mvColorEdit_AlphaPreview=0
mvColorEdit_AlphaPreviewHalf=0
mvColorEdit_uint8=0
mvColorEdit_float=0
mvColorEdit_rgb=0
mvColorEdit_hsv=0
mvColorEdit_hex=0
mvColorEdit_input_rgb=0
mvColorEdit_input_hsv=0
mvPlotColormap_Default=0
mvPlotColormap_Deep=0
mvPlotColormap_Dark=0
mvPlotColormap_Pastel=0
mvPlotColormap_Paired=0
mvPlotColormap_Viridis=0
mvPlotColormap_Plasma=0
mvPlotColormap_Hot=0
mvPlotColormap_Cool=0
mvPlotColormap_Pink=0
mvPlotColormap_Jet=0
mvPlotColormap_Twilight=0
mvPlotColormap_RdBu=0
mvPlotColormap_BrBG=0
mvPlotColormap_PiYG=0
mvPlotColormap_Spectral=0
mvPlotColormap_Greys=0
mvColorPicker_bar=0
mvColorPicker_wheel=0
mvTabOrder_Reorderable=0
mvTabOrder_Fixed=0
mvTabOrder_Leading=0
mvTabOrder_Trailing=0
mvTimeUnit_Us=0
mvTimeUnit_Ms=0
mvTimeUnit_S=0
mvTimeUnit_Min=0
mvTimeUnit_Hr=0
mvTimeUnit_Day=0
mvTimeUnit_Mo=0
mvTimeUnit_Yr=0
mvDatePickerLevel_Day=0
mvDatePickerLevel_Month=0
mvDatePickerLevel_Year=0
mvCullMode_None=0
mvCullMode_Back=0
mvCullMode_Front=0
mvFontRangeHint_Default=0
mvFontRangeHint_Japanese=0
mvFontRangeHint_Korean=0
mvFontRangeHint_Chinese_Full=0
mvFontRangeHint_Chinese_Simplified_Common=0
mvFontRangeHint_Cyrillic=0
mvFontRangeHint_Thai=0
mvFontRangeHint_Vietnamese=0
mvNode_PinShape_Circle=0
mvNode_PinShape_CircleFilled=0
mvNode_PinShape_Triangle=0
mvNode_PinShape_TriangleFilled=0
mvNode_PinShape_Quad=0
mvNode_PinShape_QuadFilled=0
mvNode_Attr_Input=0
mvNode_Attr_Output=0
mvNode_Attr_Static=0
mvPlotBin_Sqrt=0
mvPlotBin_Sturges=0
mvPlotBin_Rice=0
mvPlotBin_Scott=0
mvXAxis=0
mvYAxis=0
mvPlotMarker_None=0
mvPlotMarker_Circle=0
mvPlotMarker_Square=0
mvPlotMarker_Diamond=0
mvPlotMarker_Up=0
mvPlotMarker_Down=0
mvPlotMarker_Left=0
mvPlotMarker_Right=0
mvPlotMarker_Cross=0
mvPlotMarker_Plus=0
mvPlotMarker_Asterisk=0
mvPlot_Location_Center=0
mvPlot_Location_North=0
mvPlot_Location_South=0
mvPlot_Location_West=0
mvPlot_Location_East=0
mvPlot_Location_NorthWest=0
mvPlot_Location_NorthEast=0
mvPlot_Location_SouthWest=0
mvPlot_Location_SouthEast=0
mvNodeMiniMap_Location_BottomLeft=0
mvNodeMiniMap_Location_BottomRight=0
mvNodeMiniMap_Location_TopLeft=0
mvNodeMiniMap_Location_TopRight=0
mvTable_SizingFixedFit=0
mvTable_SizingFixedSame=0
mvTable_SizingStretchProp=0
mvTable_SizingStretchSame=0
mvFormat_Float_rgba=0
mvFormat_Float_rgb=0
mvThemeCat_Core=0
mvThemeCat_Plots=0
mvThemeCat_Nodes=0
mvThemeCol_Text=0
mvThemeCol_TextDisabled=0
mvThemeCol_WindowBg=0
mvThemeCol_ChildBg=0
mvThemeCol_Border=0
mvThemeCol_PopupBg=0
mvThemeCol_BorderShadow=0
mvThemeCol_FrameBg=0
mvThemeCol_FrameBgHovered=0
mvThemeCol_FrameBgActive=0
mvThemeCol_TitleBg=0
mvThemeCol_TitleBgActive=0
mvThemeCol_TitleBgCollapsed=0
mvThemeCol_MenuBarBg=0
mvThemeCol_ScrollbarBg=0
mvThemeCol_ScrollbarGrab=0
mvThemeCol_ScrollbarGrabHovered=0
mvThemeCol_ScrollbarGrabActive=0
mvThemeCol_CheckMark=0
mvThemeCol_SliderGrab=0
mvThemeCol_SliderGrabActive=0
mvThemeCol_Button=0
mvThemeCol_ButtonHovered=0
mvThemeCol_ButtonActive=0
mvThemeCol_Header=0
mvThemeCol_HeaderHovered=0
mvThemeCol_HeaderActive=0
mvThemeCol_Separator=0
mvThemeCol_SeparatorHovered=0
mvThemeCol_SeparatorActive=0
mvThemeCol_ResizeGrip=0
mvThemeCol_ResizeGripHovered=0
mvThemeCol_ResizeGripActive=0
mvThemeCol_Tab=0
mvThemeCol_TabHovered=0
mvThemeCol_TabActive=0
mvThemeCol_TabUnfocused=0
mvThemeCol_TabUnfocusedActive=0
mvThemeCol_DockingPreview=0
mvThemeCol_DockingEmptyBg=0
mvThemeCol_PlotLines=0
mvThemeCol_PlotLinesHovered=0
mvThemeCol_PlotHistogram=0
mvThemeCol_PlotHistogramHovered=0
mvThemeCol_TableHeaderBg=0
mvThemeCol_TableBorderStrong=0
mvThemeCol_TableBorderLight=0
mvThemeCol_TableRowBg=0
mvThemeCol_TableRowBgAlt=0
mvThemeCol_TextSelectedBg=0
mvThemeCol_DragDropTarget=0
mvThemeCol_NavHighlight=0
mvThemeCol_NavWindowingHighlight=0
mvThemeCol_NavWindowingDimBg=0
mvThemeCol_ModalWindowDimBg=0
mvPlotCol_Line=0
mvPlotCol_Fill=0
mvPlotCol_MarkerOutline=0
mvPlotCol_MarkerFill=0
mvPlotCol_ErrorBar=0
mvPlotCol_FrameBg=0
mvPlotCol_PlotBg=0
mvPlotCol_PlotBorder=0
mvPlotCol_LegendBg=0
mvPlotCol_LegendBorder=0
mvPlotCol_LegendText=0
mvPlotCol_TitleText=0
mvPlotCol_InlayText=0
mvPlotCol_XAxis=0
mvPlotCol_XAxisGrid=0
mvPlotCol_YAxis=0
mvPlotCol_YAxisGrid=0
mvPlotCol_YAxis2=0
mvPlotCol_YAxisGrid2=0
mvPlotCol_YAxis3=0
mvPlotCol_YAxisGrid3=0
mvPlotCol_Selection=0
mvPlotCol_Query=0
mvPlotCol_Crosshairs=0
mvNodeCol_NodeBackground=0
mvNodeCol_NodeBackgroundHovered=0
mvNodeCol_NodeBackgroundSelected=0
mvNodeCol_NodeOutline=0
mvNodeCol_TitleBar=0
mvNodeCol_TitleBarHovered=0
mvNodeCol_TitleBarSelected=0
mvNodeCol_Link=0
mvNodeCol_LinkHovered=0
mvNodeCol_LinkSelected=0
mvNodeCol_Pin=0
mvNodeCol_PinHovered=0
mvNodeCol_BoxSelector=0
mvNodeCol_BoxSelectorOutline=0
mvNodeCol_GridBackground=0
mvNodeCol_GridLine=0
mvNodesCol_GridLinePrimary=0
mvNodesCol_MiniMapBackground=0
mvNodesCol_MiniMapBackgroundHovered=0
mvNodesCol_MiniMapOutline=0
mvNodesCol_MiniMapOutlineHovered=0
mvNodesCol_MiniMapNodeBackground=0
mvNodesCol_MiniMapNodeBackgroundHovered=0
mvNodesCol_MiniMapNodeBackgroundSelected=0
mvNodesCol_MiniMapNodeOutline=0
mvNodesCol_MiniMapLink=0
mvNodesCol_MiniMapLinkSelected=0
mvNodesCol_MiniMapCanvas=0
mvNodesCol_MiniMapCanvasOutline=0
mvStyleVar_Alpha=0
mvStyleVar_WindowPadding=0
mvStyleVar_WindowRounding=0
mvStyleVar_WindowBorderSize=0
mvStyleVar_WindowMinSize=0
mvStyleVar_WindowTitleAlign=0
mvStyleVar_ChildRounding=0
mvStyleVar_ChildBorderSize=0
mvStyleVar_PopupRounding=0
mvStyleVar_PopupBorderSize=0
mvStyleVar_FramePadding=0
mvStyleVar_FrameRounding=0
mvStyleVar_FrameBorderSize=0
mvStyleVar_ItemSpacing=0
mvStyleVar_ItemInnerSpacing=0
mvStyleVar_IndentSpacing=0
mvStyleVar_CellPadding=0
mvStyleVar_ScrollbarSize=0
mvStyleVar_ScrollbarRounding=0
mvStyleVar_GrabMinSize=0
mvStyleVar_GrabRounding=0
mvStyleVar_TabRounding=0
mvStyleVar_ButtonTextAlign=0
mvStyleVar_SelectableTextAlign=0
mvPlotStyleVar_LineWeight=0
mvPlotStyleVar_Marker=0
mvPlotStyleVar_MarkerSize=0
mvPlotStyleVar_MarkerWeight=0
mvPlotStyleVar_FillAlpha=0
mvPlotStyleVar_ErrorBarSize=0
mvPlotStyleVar_ErrorBarWeight=0
mvPlotStyleVar_DigitalBitHeight=0
mvPlotStyleVar_DigitalBitGap=0
mvPlotStyleVar_PlotBorderSize=0
mvPlotStyleVar_MinorAlpha=0
mvPlotStyleVar_MajorTickLen=0
mvPlotStyleVar_MinorTickLen=0
mvPlotStyleVar_MajorTickSize=0
mvPlotStyleVar_MinorTickSize=0
mvPlotStyleVar_MajorGridSize=0
mvPlotStyleVar_MinorGridSize=0
mvPlotStyleVar_PlotPadding=0
mvPlotStyleVar_LabelPadding=0
mvPlotStyleVar_LegendPadding=0
mvPlotStyleVar_LegendInnerPadding=0
mvPlotStyleVar_LegendSpacing=0
mvPlotStyleVar_MousePosPadding=0
mvPlotStyleVar_AnnotationPadding=0
mvPlotStyleVar_FitPadding=0
mvPlotStyleVar_PlotDefaultSize=0
mvPlotStyleVar_PlotMinSize=0
mvNodeStyleVar_GridSpacing=0
mvNodeStyleVar_NodeCornerRounding=0
mvNodeStyleVar_NodePadding=0
mvNodeStyleVar_NodeBorderThickness=0
mvNodeStyleVar_LinkThickness=0
mvNodeStyleVar_LinkLineSegmentsPerLength=0
mvNodeStyleVar_LinkHoverDistance=0
mvNodeStyleVar_PinCircleRadius=0
mvNodeStyleVar_PinQuadSideLength=0
mvNodeStyleVar_PinTriangleSideLength=0
mvNodeStyleVar_PinLineThickness=0
mvNodeStyleVar_PinHoverRadius=0
mvNodeStyleVar_PinOffset=0
mvNodesStyleVar_MiniMapPadding=0
mvNodesStyleVar_MiniMapOffset=0
mvInputText=0
mvButton=0
mvRadioButton=0
mvTabBar=0
mvTab=0
mvImage=0
mvMenuBar=0
mvViewportMenuBar=0
mvMenu=0
mvMenuItem=0
mvChildWindow=0
mvGroup=0
mvSliderFloat=0
mvSliderInt=0
mvFilterSet=0
mvDragFloat=0
mvDragInt=0
mvInputFloat=0
mvInputInt=0
mvColorEdit=0
mvClipper=0
mvColorPicker=0
mvTooltip=0
mvCollapsingHeader=0
mvSeparator=0
mvCheckbox=0
mvListbox=0
mvText=0
mvCombo=0
mvPlot=0
mvSimplePlot=0
mvDrawlist=0
mvWindowAppItem=0
mvSelectable=0
mvTreeNode=0
mvProgressBar=0
mvSpacer=0
mvImageButton=0
mvTimePicker=0
mvDatePicker=0
mvColorButton=0
mvFileDialog=0
mvTabButton=0
mvDrawNode=0
mvNodeEditor=0
mvNode=0
mvNodeAttribute=0
mvTable=0
mvTableColumn=0
mvTableRow=0
mvDrawLine=0
mvDrawArrow=0
mvDrawTriangle=0
mvDrawImageQuad=0
mvDrawCircle=0
mvDrawEllipse=0
mvDrawBezierCubic=0
mvDrawBezierQuadratic=0
mvDrawQuad=0
mvDrawRect=0
mvDrawText=0
mvDrawPolygon=0
mvDrawPolyline=0
mvDrawImage=0
mvDragFloatMulti=0
mvDragIntMulti=0
mvSliderFloatMulti=0
mvSliderIntMulti=0
mvInputIntMulti=0
mvInputFloatMulti=0
mvDragPoint=0
mvDragLine=0
mvAnnotation=0
mvLineSeries=0
mvScatterSeries=0
mvStemSeries=0
mvStairSeries=0
mvBarSeries=0
mvErrorSeries=0
mvVLineSeries=0
mvHLineSeries=0
mvHeatSeries=0
mvImageSeries=0
mvPieSeries=0
mvShadeSeries=0
mvLabelSeries=0
mvHistogramSeries=0
mv2dHistogramSeries=0
mvCandleSeries=0
mvAreaSeries=0
mvColorMapScale=0
mvSlider3D=0
mvKnobFloat=0
mvLoadingIndicator=0
mvNodeLink=0
mvTextureRegistry=0
mvStaticTexture=0
mvDynamicTexture=0
mvStage=0
mvDrawLayer=0
mvViewportDrawlist=0
mvFileExtension=0
mvPlotLegend=0
mvPlotAxis=0
mvHandlerRegistry=0
mvKeyDownHandler=0
mvKeyPressHandler=0
mvKeyReleaseHandler=0
mvMouseMoveHandler=0
mvMouseWheelHandler=0
mvMouseClickHandler=0
mvMouseDoubleClickHandler=0
mvMouseDownHandler=0
mvMouseReleaseHandler=0
mvMouseDragHandler=0
mvHoverHandler=0
mvActiveHandler=0
mvFocusHandler=0
mvVisibleHandler=0
mvEditedHandler=0
mvActivatedHandler=0
mvDeactivatedHandler=0
mvDeactivatedAfterEditHandler=0
mvToggledOpenHandler=0
mvClickedHandler=0
mvDoubleClickedHandler=0
mvDragPayload=0
mvResizeHandler=0
mvFont=0
mvFontRegistry=0
mvTheme=0
mvThemeColor=0
mvThemeStyle=0
mvThemeComponent=0
mvFontRangeHint=0
mvFontRange=0
mvFontChars=0
mvCharRemap=0
mvValueRegistry=0
mvIntValue=0
mvFloatValue=0
mvFloat4Value=0
mvInt4Value=0
mvBoolValue=0
mvStringValue=0
mvDoubleValue=0
mvDouble4Value=0
mvColorValue=0
mvFloatVectValue=0
mvSeriesValue=0
mvRawTexture=0
mvSubPlots=0
mvColorMap=0
mvColorMapRegistry=0
mvColorMapButton=0
mvColorMapSlider=0
mvTemplateRegistry=0
mvTableCell=0
mvItemHandlerRegistry=0
mvInputDouble=0
mvInputDoubleMulti=0
mvDragDouble=0
mvDragDoubleMulti=0
mvSliderDouble=0
mvSliderDoubleMulti=0
mvCustomSeries=0
mvReservedUUID_0=0
mvReservedUUID_1=0
mvReservedUUID_2=0
mvReservedUUID_3=0
mvReservedUUID_4=0
mvReservedUUID_5=0
mvReservedUUID_6=0
mvReservedUUID_7=0
mvReservedUUID_8=0
mvReservedUUID_9=0
|
f805b69949806f1cf6f9e105f8856ea3ade789ee
|
6f36df6219f8e50374068bb4b3e1a5387c7a2f34
|
/fipy/meshes/builders/grid3DBuilder.py
|
464f24fa715785fccb59b1857d50ecb9c82f4bfc
|
[
"NIST-PD"
] |
permissive
|
usnistgov/fipy
|
0a3db715fea452ae710eea3999d9cd42dfe76fe7
|
fdc17193bc293da7511be9021e6d4766757e1966
|
refs/heads/master
| 2023-08-31T21:59:36.611448
| 2023-06-27T16:28:58
| 2023-06-27T16:28:58
| 23,316,495
| 444
| 171
|
NOASSERTION
| 2023-09-06T19:21:19
| 2014-08-25T14:27:58
|
Python
|
UTF-8
|
Python
| false
| false
| 8,698
|
py
|
grid3DBuilder.py
|
from __future__ import unicode_literals
__docformat__ = 'restructuredtext'
__all__ = []
from fipy.meshes.builders.abstractGridBuilder import _AbstractGridBuilder
from fipy.tools import numerix
from fipy.tools import vector
from fipy.tools.dimensions.physicalField import PhysicalField
from fipy.meshes.builders.utilityClasses import (_UniformNumPts,
_DOffsets,
_UniformOrigin,
_NonuniformNumPts)
class _Grid3DBuilder(_AbstractGridBuilder):
def buildGridData(self, *args, **kwargs):
super(_Grid3DBuilder, self).buildGridData(*args, **kwargs)
self.numberOfHorizontalRows = self.spatialDict["numHorizontalRows"]
self.numberOfVerticalColumns = self.spatialDict["numVerticalCols"]
self.numberOfLayersDeep = self.spatialDict["numLayersDeep"]
def _calcShape(self):
return (self.ns[0], self.ns[1], self.ns[2])
def _calcPhysicalShape(self):
"""Return physical dimensions of `Grid3D`
"""
from fipy.tools.dimensions.physicalField import PhysicalField
return PhysicalField(value = (self.ns[0] * self.ds[0] * self.scale,
self.ns[1] * self.ds[1] * self.scale,
self.ns[2] * self.ds[2] * self.scale))
def _calcMeshSpacing(self):
return numerix.array((self.ds[0], self.ds[1], self.ds[2]))[..., numerix.newaxis]
@property
def _specificGridData(self):
return [self.numberOfXYFaces,
self.numberOfXZFaces,
self.numberOfYZFaces,
self.numberOfHorizontalRows,
self.numberOfVerticalColumns,
self.numberOfLayersDeep]
@staticmethod
def createVertices(dx, dy, dz, nx, ny, nz,
numVertices, numHorizRows, numVertCols):
x = _AbstractGridBuilder.calcVertexCoordinates(dx, nx)
x = numerix.resize(x, (numVertices,))
y = _AbstractGridBuilder.calcVertexCoordinates(dy, ny)
y = numerix.repeat(y, numVertCols)
y = numerix.resize(y, (numVertices,))
z = _AbstractGridBuilder.calcVertexCoordinates(dz, nz)
z = numerix.repeat(z, numHorizRows * numVertCols)
z = numerix.resize(z, (numVertices,))
return numerix.array((x, y, z))
@staticmethod
def createFaces(nx, ny, nz):
"""
XY faces are first, then XZ faces, then YZ faces
"""
## do the XY faces
v1 = numerix.arange((nx + 1) * (ny))
v1 = vector.prune(v1, nx + 1, nx)
v1 = _Grid3DBuilder._repeatWithOffset(v1, (nx + 1) * (ny + 1), nz + 1)
v2 = v1 + 1
v3 = v1 + (nx + 2)
v4 = v1 + (nx + 1)
XYFaces = numerix.array((v1, v2, v3, v4))
## do the XZ faces
v1 = numerix.arange((nx + 1) * (ny + 1))
v1 = vector.prune(v1, nx + 1, nx)
v1 = _Grid3DBuilder._repeatWithOffset(v1, (nx + 1) * (ny + 1), nz)
v2 = v1 + 1
v3 = v1 + ((nx + 1)*(ny + 1)) + 1
v4 = v1 + ((nx + 1)*(ny + 1))
XZFaces = numerix.array((v1, v2, v3, v4))
## do the YZ faces
v1 = numerix.arange((nx + 1) * ny)
v1 = _Grid3DBuilder._repeatWithOffset(v1, (nx + 1) * (ny + 1), nz)
v2 = v1 + (nx + 1)
v3 = v1 + ((nx + 1)*(ny + 1)) + (nx + 1)
v4 = v1 + ((nx + 1)*(ny + 1))
YZFaces = numerix.array((v1, v2, v3, v4))
numberOfXYFaces = (nx * ny * (nz + 1))
numberOfXZFaces = (nx * (ny + 1) * nz)
numberOfYZFaces = ((nx + 1) * ny * nz)
numberOfFaces = numberOfXYFaces + numberOfXZFaces + numberOfYZFaces
return ([numberOfXYFaces, numberOfXZFaces, numberOfYZFaces, numberOfFaces],
numerix.concatenate((XYFaces, XZFaces, YZFaces), axis=1))
@staticmethod
def createCells(nx, ny, nz, numXYFaces, numXZFaces, numYZFaces):
"""
cells = (front face, back face, left face, right face, bottom face, top face)
front and back faces are YZ faces
left and right faces are XZ faces
top and bottom faces are XY faces
"""
## front and back faces
frontFaces = numerix.arange(numYZFaces)
frontFaces = vector.prune(frontFaces, nx + 1, nx)
frontFaces = frontFaces + numXYFaces + numXZFaces
backFaces = frontFaces + 1
## left and right faces
leftFaces = numerix.arange(nx * ny)
leftFaces = _Grid3DBuilder._repeatWithOffset(leftFaces, nx * (ny + 1), nz)
leftFaces = numerix.ravel(leftFaces)
leftFaces = leftFaces + numXYFaces
rightFaces = leftFaces + nx
## bottom and top faces
bottomFaces = numerix.arange(nx * ny * nz)
topFaces = bottomFaces + (nx * ny)
return numerix.array((frontFaces, backFaces, leftFaces,
rightFaces, bottomFaces, topFaces))
@staticmethod
def _repeatWithOffset(array, offset, reps):
a = numerix.fromfunction(lambda rnum, x: array + (offset * rnum),
(reps, numerix.size(array))).astype('l')
return numerix.ravel(a)
def _packOverlap(self, first, second):
return {'left': 0, 'right': 0, 'bottom' : 0, 'top' : 0,
'front': first, 'back': second}
def _packOffset(self, arg):
return (0, 0, arg)
class _NonuniformGrid3DBuilder(_Grid3DBuilder):
def __init__(self):
self.NumPtsCalcClass = _NonuniformNumPts
super(_NonuniformGrid3DBuilder, self).__init__()
def buildGridData(self, *args, **kwargs):
super(_NonuniformGrid3DBuilder, self).buildGridData(*args, **kwargs)
([self.Xoffset, self.Yoffset, self.Zoffset],
self.ds) = _DOffsets.calcDOffsets(self.ds,
self.ns,
self.offset)
self.vertices = _Grid3DBuilder.createVertices(self.ds[0], self.ds[1],
self.ds[2],
self.ns[0], self.ns[1],
self.ns[2],
self.numberOfVertices,
self.numberOfHorizontalRows,
self.numberOfVerticalColumns) \
+ ((self.Xoffset,), (self.Yoffset,), (self.Zoffset,))
numFacesList, self.faces = _Grid3DBuilder.createFaces(self.ns[0],
self.ns[1],
self.ns[2])
self.numberOfXYFaces = numFacesList[0]
self.numberOfXZFaces = numFacesList[1]
self.numberOfYZFaces = numFacesList[2]
self.numberOfFaces = numFacesList[3]
self.cells = _Grid3DBuilder.createCells(self.ns[0],
self.ns[1],
self.ns[2],
self.numberOfXYFaces,
self.numberOfXZFaces,
self.numberOfYZFaces)
@property
def _specificGridData(self):
return super(_NonuniformGrid3DBuilder, self)._specificGridData \
+ [self.vertices,
self.faces,
self.cells,
self.Xoffset, self.Yoffset, self.Zoffset]
class _UniformGrid3DBuilder(_Grid3DBuilder):
def __init__(self):
self.NumPtsCalcClass = _UniformNumPts
super(_UniformGrid3DBuilder, self).__init__()
def buildGridData(self, ds, ns, overlap, communicator, origin):
super(_UniformGrid3DBuilder, self).buildGridData(ds, ns, overlap,
communicator)
self.origin = _UniformOrigin.calcOrigin(origin,
self.offset, self.ds, self.scale)
self.numberOfXYFaces = self.ns[0] * self.ns[1] * (self.ns[2] + 1)
self.numberOfXZFaces = self.ns[0] * (self.ns[1] + 1) * self.ns[2]
self.numberOfYZFaces = (self.ns[0] + 1) * self.ns[1] * self.ns[2]
self.numberOfFaces = self.numberOfXYFaces + self.numberOfXZFaces \
+ self.numberOfYZFaces
@property
def _specificGridData(self):
return super(_UniformGrid3DBuilder, self)._specificGridData \
+ [self.origin]
|
155e430999723f5257efcc7d7069ee4363d763f6
|
f80ef3a3cf859b13e8af8433af549b6b1043bf6e
|
/pyobjc-framework-InstantMessage/PyObjCTest/test_imavmanager.py
|
82e413751bb18c4284c339dc3db44cdab79a3239
|
[
"MIT"
] |
permissive
|
ronaldoussoren/pyobjc
|
29dc9ca0af838a56105a9ddd62fb38ec415f0b86
|
77b98382e52818690449111cd2e23cd469b53cf5
|
refs/heads/master
| 2023-09-01T05:15:21.814504
| 2023-06-13T20:00:17
| 2023-06-13T20:00:17
| 243,933,900
| 439
| 49
| null | 2023-06-25T02:49:07
| 2020-02-29T08:43:12
|
Python
|
UTF-8
|
Python
| false
| false
| 2,024
|
py
|
test_imavmanager.py
|
import InstantMessage
from PyObjCTools.TestSupport import TestCase, min_os_level
import objc
class TestIMAVManagerHelper(InstantMessage.NSObject):
def getPixelBufferPixelFormat_(self, _):
return 10
def renderIntoPixelBuffer_forTime_(self, buf, time):
return False
def getOpenGLBufferContext_pixelFormat_(self, ctx, fmt):
pass
def renderIntoOpenGLBuffer_onScreen_forTime_(self, buffer, screen, time):
return False
class TestIMAVManager(TestCase):
@min_os_level("10.5")
def testConstants(self):
self.assertIsInstance(InstantMessage.IMAVManagerStateChangedNotification, str)
self.assertIsInstance(
InstantMessage.IMAVManagerURLToShareChangedNotification, str
)
self.assertEqual(InstantMessage.IMAVInactive, 0)
self.assertEqual(InstantMessage.IMAVRequested, 1)
self.assertEqual(InstantMessage.IMAVShuttingDown, 2)
self.assertEqual(InstantMessage.IMAVStartingUp, 3)
self.assertEqual(InstantMessage.IMAVPending, 4)
self.assertEqual(InstantMessage.IMAVRunning, 5)
self.assertEqual(InstantMessage.IMVideoOptimizationDefault, 0)
self.assertEqual(InstantMessage.IMVideoOptimizationStills, 1 << 0)
self.assertEqual(InstantMessage.IMVideoOptimizationReplacement, 1 << 1)
def testInformalProtocol(self):
# self.assert_( hasattr(protocols, 'IMVideoDataSource') )
# self.assert_( isinstance(protocols.IMVideoDataSource, objc.informal_protocol) )
self.assertArgIsOut(TestIMAVManagerHelper.getPixelBufferPixelFormat_, 0)
self.assertArgHasType(
TestIMAVManagerHelper.getPixelBufferPixelFormat_, 0, b"o^" + objc._C_UINT
)
self.assertResultIsBOOL(TestIMAVManagerHelper.renderIntoPixelBuffer_forTime_)
self.assertArgIsIn(TestIMAVManagerHelper.renderIntoPixelBuffer_forTime_, 1)
self.assertResultIsBOOL(
TestIMAVManagerHelper.renderIntoOpenGLBuffer_onScreen_forTime_
)
|
e01bf01e77bb6c6dc713e31081b145f57e3fc568
|
fd3f800821299f64ff59844eea2797a216c9c42a
|
/hulearn/experimental/interactive.py
|
35df5dcd69b9c7d84e1d7c7f7760cd8757f5191f
|
[
"MIT"
] |
permissive
|
koaning/human-learn
|
336da4b36a0c818861f1d0a0034cbbbc6cd9d6ed
|
6c7501aba5faf7be1b6f4daae98b30a7a35cad5d
|
refs/heads/master
| 2023-04-06T00:11:07.673197
| 2023-03-31T03:35:41
| 2023-03-31T03:35:41
| 278,844,314
| 741
| 54
|
MIT
| 2023-03-31T03:22:55
| 2020-07-11T11:03:11
|
Jupyter Notebook
|
UTF-8
|
Python
| false
| false
| 9,734
|
py
|
interactive.py
|
import os
import uuid
import random
import pathlib
from string import Template
from pkg_resources import resource_filename
from clumper import Clumper
from IPython.core.display import HTML
from bokeh.models import ColumnDataSource
from bokeh.plotting import figure, show
from bokeh.models import PolyDrawTool, PolyEditTool
from bokeh.layouts import row
from bokeh.models.widgets import Div
from bokeh.io import output_notebook
def color_dot(name, color):
dot = f"<span style='height: 15px; width: 15px; background-color: {color}; border-radius: 50%; display: inline-block;'></span>"
return f"<p>{dot} {name}</p>"
class InteractiveCharts:
"""
This tool allows you to interactively "draw" a model.
Arguments:
dataf: the dataframe to make a single interactive chart for
labels: the labels to be drawn, if `str` we assume a column from the dataframe is chosen, if `list` we
color: you can manually override the color of the dots to be determined by a column in a dataframe.
This setting is useful when you want to input a list of labels but still want to color the dots based on a column value.
Usage:
```python
from sklego.datasets import load_penguins
from hulearn.experimental.interactive import InteractiveCharts
df = load_penguins(as_frame=True)
charts = InteractiveCharts(df, labels="species")
```
"""
def __init__(self, dataf, labels, color=None):
output_notebook()
self.dataf = dataf
self.labels = labels
self.charts = []
self.color = color
def add_chart(self, x, y, size=5, alpha=0.5, width=400, height=400, legend=True):
"""
Generate an interactive chart to a cell.
The supported actions include:
- Add patch or multi-line: Double tap to add the first vertex, then use tap to add each subsequent vertex,
to finalize the draw action double tap to insert the final vertex or press the <<esc> key.
- Move patch or ulti-line: Tap and drag an existing patch/multi-line, the point will be dropped once
you let go of the mouse button.
- Delete patch or multi-line: Tap a patch/multi-line to select it then press <<backspace>> key while
the mouse is within the plot area.
Arguments:
x: the column from the dataset to place on the x-axis
y: the column from the dataset to place on the y-axis
size: the size of the drawn points
alpha: the alpha (see-through-ness) of the drawn points
width: the width of the chart
height: the height of the chart
legend: show a legend as well
Usage:
```python
from sklego.datasets import load_penguins
from hulearn.experimental.interactive import InteractiveCharts
df = load_penguins(as_frame=True)
charts = InteractiveCharts(df, labels="species")
# Next notebook cell
charts.add_chart(x="bill_length_mm", y="bill_depth_mm")
# Next notebook cell
charts.add_chart(x="flipper_length_mm", y="body_mass_g")
# After drawing a model, export the data
json_data = charts.data()
```
"""
chart = SingleInteractiveChart(
dataf=self.dataf.copy(),
labels=self.labels,
x=x,
y=y,
size=size,
alpha=alpha,
width=width,
height=height,
color=self.color,
legend=legend,
)
self.charts.append(chart)
chart.show()
def data(self):
return [c.data for c in self.charts]
def to_json(self, path):
return Clumper(self.data).write_json(path, indent=2)
class SingleInteractiveChart:
"""
Create a single chart that you can drawn on.
Consider using `InteractiveChart` instead if you plan on drawing many charts.
Arguments:
dataf: the dataframe to make a single interactive chart for
labels: the labels to be drawn, if `str` we assume a column from the dataframe is chosen, if `list` we
assume that the labels are not in the dataset
x: the column from the dataset to place on the x-axis
y: the column from the dataset to place on the y-axis
size: the size of the drawn points
alpha: the alpha (see-through-ness) of the drawn points
width: the width of the chart
height: the height of the chart
color: you can manually override the color of the dots to be determined by a column
in a dataframe. This setting is useful when you want to input a list of labels but
still want to color the dots based on a column value.
legend: show a legend as well
"""
def __init__(
self,
dataf,
labels,
x,
y,
size=5,
alpha=0.5,
width=400,
height=400,
color=None,
legend=True,
):
self.uuid = str(uuid.uuid4())[:10]
self.x = x
self.y = y
self.plot = figure(width=width, height=height, title=f"{x} vs. {y}")
self.color_column = labels if isinstance(labels, str) else color
self._colors = ["red", "blue", "green", "purple", "cyan"]
self.legend = legend
if isinstance(labels, str):
self.labels = list(dataf[labels].unique())
d = {k: col for k, col in zip(self.labels, self._colors)}
dataf = dataf.assign(color=[d[lab] for lab in dataf[labels]])
self.source = ColumnDataSource(data=dataf)
else:
if not self.color_column:
dataf = dataf.assign(color=["gray" for _ in range(dataf.shape[0])])
else:
color_labels = list(dataf[self.color_column].unique())
d = {k: col for k, col in zip(color_labels, self._colors)}
dataf = dataf.assign(color=[d[lab] for lab in dataf[self.color_column]])
self.source = ColumnDataSource(data=dataf)
self.labels = labels
if len(self.labels) > 5:
raise ValueError("We currently only allow for 5 classes max.")
self.plot.circle(
x=x, y=y, color="color", source=self.source, size=size, alpha=alpha
)
# Create all the tools for drawing
self.poly_patches = {}
self.poly_draw = {}
for k, col in zip(self.labels, self._colors):
self.poly_patches[k] = self.plot.patches(
[], [], fill_color=col, fill_alpha=0.4, line_alpha=0.0
)
icon_path = pathlib.Path(resource_filename("hulearn", f"images/{col}.png"))
self.poly_draw[k] = PolyDrawTool(
renderers=[self.poly_patches[k]], custom_icon=icon_path
)
c = self.plot.circle([], [], size=5, color="black")
edit_tool = PolyEditTool(
renderers=list(self.poly_patches.values()), vertex_renderer=c
)
self.plot.add_tools(*self.poly_draw.values(), edit_tool)
self.plot.toolbar.active_tap = self.poly_draw[self.labels[0]]
def app(self, doc):
html = "<ul style='width:100px'>"
for k, col in zip(self.labels, self._colors):
html += f"<li>{color_dot(name=k, color=col)}</li>"
html += "</ul>"
if self.legend:
doc.add_root(row(Div(text=html), self.plot))
else:
doc.add_root(self.plot)
def show(self):
show(self.app)
def _replace_xy(self, data):
new_data = {}
new_data[self.x] = data["xs"]
new_data[self.y] = data["ys"]
return new_data
@property
def data(self):
return {
"chart_id": self.uuid,
"x": self.x,
"y": self.y,
"polygons": {
k: self._replace_xy(v.data_source.data)
for k, v in self.poly_patches.items()
},
}
def _random_string():
"""Generates a random HTML id for d3 charts."""
return "".join([random.choice("qwertyuiopasdfghjklzxcvbnm") for _ in range(6)])
def parallel_coordinates(dataf, label, height=200):
"""
Creates an interactive parallel coordinates chart to help with classification tasks.
Arguments:
dataf: the dataframe to render
label: the column that represents the label, will be used for coloring
height: the height of the chart, in pixels
Usage:
```python
from hulearn.datasets import load_titanic
from hulearn.experimental.interactive import parallel_coordinates
df = load_titanic(as_frame=True)
parallel_coordinates(df, label="survived", height=200)
```
"""
t = Template(
pathlib.Path(
resource_filename(
"hulearn", os.path.join("static", "parcoords", "template.html")
)
).read_text()
)
d3_blob_path = resource_filename(
"hulearn", os.path.join("static", "parcoords", "d3.min.js")
)
css_blob_path = resource_filename(
"hulearn", os.path.join("static", "parcoords", "d3.parcoords.css")
)
js_blob_path = resource_filename(
"hulearn", os.path.join("static", "parcoords", "d3.parcoords.js")
)
json_data = dataf.rename(columns={label: "label"}).to_json(orient="records")
rendered = t.substitute(
{
"data": json_data,
"id": _random_string(),
"style": pathlib.Path(css_blob_path).read_text(),
"d3_blob": pathlib.Path(d3_blob_path).read_text(),
"parcoords_stuff": pathlib.Path(js_blob_path).read_text(),
"height": f"{height}px",
}
)
return HTML(rendered)
|
8d6368fa805131155858b3d2a75ca2c4baf2329b
|
2dd26e031162e75f37ecb1f7dd7f675eeb634c63
|
/examples/asr/quantization/speech_to_text_calibrate.py
|
264806c7b1ba0f68dc8bc8e92db2a7def127e575
|
[
"Apache-2.0"
] |
permissive
|
NVIDIA/NeMo
|
1b001fa2ae5d14defbfd02f3fe750c5a09e89dd1
|
c20a16ea8aa2a9d8e31a98eb22178ddb9d5935e7
|
refs/heads/main
| 2023-08-21T15:28:04.447838
| 2023-08-21T00:49:36
| 2023-08-21T00:49:36
| 200,722,670
| 7,957
| 1,986
|
Apache-2.0
| 2023-09-14T18:49:54
| 2019-08-05T20:16:42
|
Python
|
UTF-8
|
Python
| false
| false
| 6,301
|
py
|
speech_to_text_calibrate.py
|
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Script for calibrating a pretrained ASR model for quantization
"""
from argparse import ArgumentParser
import torch
from omegaconf import open_dict
from nemo.collections.asr.models import EncDecCTCModel
from nemo.utils import logging
try:
from pytorch_quantization import calib
from pytorch_quantization import nn as quant_nn
from pytorch_quantization import quant_modules
from pytorch_quantization.tensor_quant import QuantDescriptor
except ImportError:
raise ImportError(
"pytorch-quantization is not installed. Install from "
"https://github.com/NVIDIA/TensorRT/tree/master/tools/pytorch-quantization."
)
try:
from torch.cuda.amp import autocast
except ImportError:
from contextlib import contextmanager
@contextmanager
def autocast(enabled=None):
yield
can_gpu = torch.cuda.is_available()
def main():
parser = ArgumentParser()
parser.add_argument(
"--asr_model", type=str, default="QuartzNet15x5Base-En", required=True, help="Pass: 'QuartzNet15x5Base-En'",
)
parser.add_argument("--dataset", type=str, required=True, help="path to evaluation data")
parser.add_argument("--batch_size", type=int, default=256)
parser.add_argument(
"--dont_normalize_text",
default=False,
action='store_false',
help="Turn off trasnscript normalization. Recommended for non-English.",
)
parser.add_argument('--num_calib_batch', default=1, type=int, help="Number of batches for calibration.")
parser.add_argument('--calibrator', type=str, choices=["max", "histogram"], default="max")
parser.add_argument('--percentile', nargs='+', type=float, default=[99.9, 99.99, 99.999, 99.9999])
parser.add_argument("--amp", action="store_true", help="Use AMP in calibration.")
parser.set_defaults(amp=False)
args = parser.parse_args()
torch.set_grad_enabled(False)
# Initialize quantization
quant_desc_input = QuantDescriptor(calib_method=args.calibrator)
quant_nn.QuantConv2d.set_default_quant_desc_input(quant_desc_input)
quant_nn.QuantConvTranspose2d.set_default_quant_desc_input(quant_desc_input)
quant_nn.QuantLinear.set_default_quant_desc_input(quant_desc_input)
if args.asr_model.endswith('.nemo'):
logging.info(f"Using local ASR model from {args.asr_model}")
asr_model_cfg = EncDecCTCModel.restore_from(restore_path=args.asr_model, return_config=True)
with open_dict(asr_model_cfg):
asr_model_cfg.encoder.quantize = True
asr_model = EncDecCTCModel.restore_from(restore_path=args.asr_model, override_config_path=asr_model_cfg)
else:
logging.info(f"Using NGC cloud ASR model {args.asr_model}")
asr_model_cfg = EncDecCTCModel.from_pretrained(model_name=args.asr_model, return_config=True)
with open_dict(asr_model_cfg):
asr_model_cfg.encoder.quantize = True
asr_model = EncDecCTCModel.from_pretrained(model_name=args.asr_model, override_config_path=asr_model_cfg)
asr_model.setup_test_data(
test_data_config={
'sample_rate': 16000,
'manifest_filepath': args.dataset,
'labels': asr_model.decoder.vocabulary,
'batch_size': args.batch_size,
'normalize_transcripts': args.dont_normalize_text,
'shuffle': True,
}
)
asr_model.preprocessor.featurizer.dither = 0.0
asr_model.preprocessor.featurizer.pad_to = 0
if can_gpu:
asr_model = asr_model.cuda()
asr_model.eval()
# Enable calibrators
for name, module in asr_model.named_modules():
if isinstance(module, quant_nn.TensorQuantizer):
if module._calibrator is not None:
module.disable_quant()
module.enable_calib()
else:
module.disable()
for i, test_batch in enumerate(asr_model.test_dataloader()):
if can_gpu:
test_batch = [x.cuda() for x in test_batch]
if args.amp:
with autocast():
_ = asr_model(input_signal=test_batch[0], input_signal_length=test_batch[1])
else:
_ = asr_model(input_signal=test_batch[0], input_signal_length=test_batch[1])
if i >= args.num_calib_batch:
break
# Save calibrated model(s)
model_name = args.asr_model.replace(".nemo", "") if args.asr_model.endswith(".nemo") else args.asr_model
if not args.calibrator == "histogram":
compute_amax(asr_model, method="max")
asr_model.save_to(F"{model_name}-max-{args.num_calib_batch*args.batch_size}.nemo")
else:
for percentile in args.percentile:
print(F"{percentile} percentile calibration")
compute_amax(asr_model, method="percentile")
asr_model.save_to(F"{model_name}-percentile-{percentile}-{args.num_calib_batch*args.batch_size}.nemo")
for method in ["mse", "entropy"]:
print(F"{method} calibration")
compute_amax(asr_model, method=method)
asr_model.save_to(F"{model_name}-{method}-{args.num_calib_batch*args.batch_size}.nemo")
def compute_amax(model, **kwargs):
for name, module in model.named_modules():
if isinstance(module, quant_nn.TensorQuantizer):
if module._calibrator is not None:
if isinstance(module._calibrator, calib.MaxCalibrator):
module.load_calib_amax()
else:
module.load_calib_amax(**kwargs)
print(F"{name:40}: {module}")
if can_gpu:
model.cuda()
if __name__ == '__main__':
main() # noqa pylint: disable=no-value-for-parameter
|
46d0626d7a064390245549a41628aabd74bb323c
|
35b6013c1943f37d1428afd2663c8aba0a02628d
|
/functions/memorystore/redis/main.py
|
aa91b2924c243062e2b1a504503f512e6093df4c
|
[
"Apache-2.0"
] |
permissive
|
GoogleCloudPlatform/python-docs-samples
|
d2a251805fbeab15d76ed995cf200727f63f887d
|
44e819e713c3885e38c99c16dc73b7d7478acfe8
|
refs/heads/main
| 2023-08-28T12:52:01.712293
| 2023-08-28T11:18:28
| 2023-08-28T11:18:28
| 35,065,876
| 7,035
| 7,593
|
Apache-2.0
| 2023-09-14T20:20:56
| 2015-05-04T23:26:13
|
Jupyter Notebook
|
UTF-8
|
Python
| false
| false
| 1,009
|
py
|
main.py
|
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# [START functions_memorystore_redis]
import os
import functions_framework
import redis
redis_host = os.environ.get("REDISHOST", "localhost")
redis_port = int(os.environ.get("REDISPORT", 6379))
redis_client = redis.StrictRedis(host=redis_host, port=redis_port)
@functions_framework.http
def visit_count(request):
value = redis_client.incr("visits", 1)
return f"Visit count: {value}"
# [END functions_memorystore_redis]
|
0f7bf0ff6db0083fe8d50f4a25ae9be5699ca126
|
a63d907ad63ba6705420a6fb2788196d1bd3763c
|
/src/api/datahub/databus/tests/modules/clean_views_test.py
|
adbcec5e9ee9e638284e05325544f3233f1856ef
|
[
"MIT"
] |
permissive
|
Tencent/bk-base
|
a38461072811667dc2880a13a5232004fe771a4b
|
6d483b4df67739b26cc8ecaa56c1d76ab46bd7a2
|
refs/heads/master
| 2022-07-30T04:24:53.370661
| 2022-04-02T10:30:55
| 2022-04-02T10:30:55
| 381,257,882
| 101
| 51
|
NOASSERTION
| 2022-04-02T10:30:56
| 2021-06-29T06:10:01
|
Python
|
UTF-8
|
Python
| false
| false
| 28,563
|
py
|
clean_views_test.py
|
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
--------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
from __future__ import print_function
import json
import httpretty as hp
import pytest
from common.api.base import DataResponse
from datahub.access.tests.utils import delete, get, post, put
from datahub.databus.api import MetaApi, StoreKitApi # noqa
from datahub.databus.models import DatabusChannel # noqa
from datahub.databus.tests.fixture.channel_fixture import ( # noqa
add_channel,
del_clean_info,
)
from datahub.databus.tests.fixture.clean_factors_fixture import ( # noqa
add_clean_factors,
)
from datahub.databus.tests.fixture.clean_fixture import add_clean # noqa
from datahub.databus.tests.mock_api import result_table
from datahub.databus.tests.mock_api.meta import get_inland_tag_ok
from datahub.databus.tests.mock_api.result_table import get_databus_old_ok
from datahub.pizza_settings import META_API_URL
from django.db.backends.dummy.base import ignore
from datahub.databus import model_manager
JSON_CONF = (
'{"extract": {"args": [], "next": {"subtype": "assign_obj", "next": null, "type": "assign", "assign": '
'[{"assign_to": "utc_time", "type": "string", "key": "_utctime_"}, {"assign_to": "gseindex", "type":'
' "long", "key": "_gseindex_"}], "label": "label02"}, "result": "json_data", "label": "json_data", "type":'
' "fun", "method": "from_json"}, "conf": {"timestamp_len": 0, "encoding": "UTF8", "time_format": '
'"yyyy-MM-dd HH:mm:ss", "timezone": 0, "output_field_name": "timestamp", "time_field_name": "utc_time"}}'
)
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_channel")
def test_create_failed(mocker):
PARAMS = {
"raw_data_id": 42,
"json_config": "{}",
"pe_config": "",
"bk_biz_id": 2,
"clean_config_name": "output",
"result_table_name": "output",
"result_table_name_alias": "清洗表测试",
"description": u"清洗测试",
"bk_username": "admin",
"fields": [
{
"field_name": "timestamp",
"field_alias": "时间戳",
"field_type": "timestamp",
"is_dimension": False,
"field_index": 1,
},
{
"field_name": "field1",
"field_alias": "字段1",
"field_type": "long",
"is_dimension": False,
"field_index": 2,
},
{
"field_name": "field2",
"field_alias": "字段2",
"field_type": "long",
"is_dimension": False,
"field_index": 3,
},
],
}
hp.enable()
mocker.patch(
"datahub.databus.api.MetaApi.data_processings.create",
return_value=DataResponse({"result": True}),
)
mocker.patch(
"datahub.databus.api.StoreKitApi.result_tables.create",
return_value=DataResponse({"result": True}),
)
mocker.patch(
"datahub.databus.api.MetaApi.result_tables.retrieve",
return_value=DataResponse({"result": True, "data": {"bk_biz_id": 2, "count_freq": 1}}),
)
mocker.patch(
"datahub.databus.api.MetaApi.data_processings.delete",
return_value=DataResponse({"result": True}),
)
mocker.patch(
"datahub.databus.channel.filter_clusters_by_geog_area",
return_value=model_manager.get_inner_channel_by_priority("inner"),
)
get_inland_tag_ok()
res = post("/v3/databus/cleans/", PARAMS)
assert not res["result"]
assert res["code"] == "1570014"
assert res["message"] == u"清洗配置错误"
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_channel", "del_clean_info")
def test_create_success(mocker):
inner_channels = model_manager.get_inner_channel_by_priority("kafka")
assert inner_channels
mocker.patch(
"datahub.databus.channel.filter_clusters_by_geog_area",
return_value=inner_channels[0],
)
hp.enable()
get_inland_tag_ok()
result_table.get_2_output_ok()
PARAMS = {
"raw_data_id": 42,
"json_config": "{}",
"pe_config": "",
"bk_biz_id": 2,
"clean_config_name": "output",
"result_table_name": "output",
"result_table_name_alias": "清洗表测试",
"description": u"清洗测试",
"bk_username": "admin",
"fields": [
{
"field_name": "timestamp",
"field_alias": "时间戳",
"field_type": "timestamp",
"is_dimension": False,
"field_index": 1,
},
{
"field_name": "field1",
"field_alias": "字段1",
"field_type": "long",
"is_dimension": False,
"field_index": 2,
},
{
"field_name": "field2",
"field_alias": "字段2",
"field_type": "long",
"is_dimension": False,
"field_index": 3,
},
],
}
mocker.patch(
"datahub.databus.api.MetaApi.data_processings.create",
return_value=DataResponse({"result": True}),
)
mocker.patch(
"datahub.databus.api.StoreKitApi.result_tables.create",
return_value=DataResponse({"result": True}),
)
mocker.patch(
"datahub.databus.api.MetaApi.data_processings.delete",
return_value=DataResponse({"result": True}),
)
PARAMS["json_config"] = JSON_CONF
res = post("/v3/databus/cleans/", PARAMS)
print(res)
assert res["result"]
assert res["data"]["processing_id"] == "2_output"
assert res["data"]["raw_data_id"] == 42
assert (
res["data"]["json_config"]
== '{"extract": {"args": [], "next": {"subtype": "assign_obj", "next": null, "type": "assign", "assign": '
'[{"assign_to": "utc_time", "type": "string", "key": "_utctime_"}, {"assign_to": "gseindex", "type": '
'"long", "key": "_gseindex_"}], "label": "label02"}, "result": "json_data", "label": "json_data", "type": '
'"fun", "method": "from_json"}, "conf": {"timestamp_len": 0, "encoding": "UTF8", "time_format": "yyyy-MM-dd '
'HH:mm:ss", "timezone": 0, "output_field_name": "timestamp", "time_field_name": "utc_time"}}'
)
assert res["data"]["result_table_id"] == "2_output"
assert res["data"]["status"] == "stopped"
assert res["data"]["status_display"] == u"stopped"
assert res["data"]["result_table"]["result_table_id"] == "2_output"
PARAMS["json_config"] = "not a json"
res = post("/v3/databus/cleans/", PARAMS)
assert res["result"] is False
assert res["code"] == "1570014"
assert res["message"] == u"清洗配置错误"
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_channel", "del_clean_info")
@ignore
def test_create_rt_error(mocker):
hp.enable()
get_inland_tag_ok()
result_table.get_2_output_ok()
result_table.post_2_output_ok()
inner_channels = model_manager.get_inner_channel_by_priority("kafka")
assert inner_channels
mocker.patch(
"datahub.databus.channel.filter_clusters_by_geog_area",
return_value=inner_channels[0],
)
mocker.patch(
"datahub.databus.api.MetaApi.data_processings.create",
return_value=DataResponse({"result": False, "message": "failed to create data processing"}),
)
PARAMS = {
"raw_data_id": 42,
"json_config": JSON_CONF,
"pe_config": "",
"bk_biz_id": 2,
"clean_config_name": "output",
"result_table_name": "output",
"result_table_name_alias": "清洗表测试",
"description": u"清洗测试",
"bk_username": "admin",
"fields": [
{
"field_name": "timestamp",
"field_alias": "时间戳",
"field_type": "timestamp",
"is_dimension": False,
"field_index": 1,
},
{
"field_name": "field1",
"field_alias": "字段1",
"field_type": "long",
"is_dimension": False,
"field_index": 2,
},
{
"field_name": "field2",
"field_alias": "字段2",
"field_type": "long",
"is_dimension": False,
"field_index": 3,
},
],
}
res = post("/v3/databus/cleans/", PARAMS)
print(res)
assert not res["result"]
assert res["message"] == u"创建DataProcessing失败:failed to create data processing"
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_channel", "del_clean_info")
def test_create_no_usable_inner_channel(mocker):
hp.enable()
get_inland_tag_ok()
result_table.get_2_output_ok()
PARAMS = {
"raw_data_id": 42,
"json_config": JSON_CONF,
"pe_config": "",
"bk_biz_id": 2,
"clean_config_name": "output",
"result_table_name": "output",
"result_table_name_alias": "清洗表测试",
"description": u"清洗测试",
"bk_username": "admin",
"fields": [
{
"field_name": "timestamp",
"field_alias": "时间戳",
"field_type": "timestamp",
"is_dimension": False,
"field_index": 1,
},
{
"field_name": "field1",
"field_alias": "字段1",
"field_type": "long",
"is_dimension": False,
"field_index": 2,
},
{
"field_name": "field2",
"field_alias": "字段2",
"field_type": "long",
"is_dimension": False,
"field_index": 3,
},
],
}
mocker.patch(
"datahub.databus.api.MetaApi.data_processings.create",
return_value=DataResponse({"result": True}),
)
mocker.patch(
"datahub.databus.api.StoreKitApi.result_tables.create",
return_value=DataResponse({"result": True}),
)
mocker.patch(
"datahub.databus.api.MetaApi.data_processings.delete",
return_value=DataResponse({"result": True}),
)
mocker.patch(
"datahub.databus.common_helper.add_task_log",
return_value=DataResponse({"result": True}),
)
res = post("/v3/databus/cleans/", PARAMS)
assert not res["result"]
assert res["message"] == u"没有可用的inner channel,请先初始化inner channel的信息"
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_channel", "del_clean_info")
def test_create_storage_failed(mocker):
inner_channels = model_manager.get_inner_channel_by_priority("kafka")
assert inner_channels
mocker.patch(
"datahub.databus.channel.filter_clusters_by_geog_area",
return_value=inner_channels[0],
)
hp.enable()
get_inland_tag_ok()
result_table.get_2_output_ok()
PARAMS = {
"raw_data_id": 42,
"json_config": JSON_CONF,
"pe_config": "",
"bk_biz_id": 2,
"clean_config_name": "output",
"result_table_name": "output",
"result_table_name_alias": "清洗表测试",
"description": "清洗测试",
"bk_username": "admin",
"fields": [
{
"field_name": "timestamp",
"field_alias": "时间戳",
"field_type": "timestamp",
"is_dimension": False,
"field_index": 1,
},
{
"field_name": "field1",
"field_alias": "字段1",
"field_type": "long",
"is_dimension": False,
"field_index": 2,
},
{
"field_name": "field2",
"field_alias": "字段2",
"field_type": "long",
"is_dimension": False,
"field_index": 3,
},
],
}
mocker.patch(
"datahub.databus.api.MetaApi.data_processings.create",
return_value=DataResponse({"result": True}),
)
mocker.patch(
"datahub.databus.api.StoreKitApi.result_tables.create",
return_value=DataResponse({"result": False, "message": "failed to create storage"}),
)
mocker.patch(
"datahub.databus.api.MetaApi.data_processings.delete",
return_value=DataResponse({"result": True}),
)
res = post("/v3/databus/cleans/", PARAMS)
assert not res["result"]
assert res["message"] == u"创建ResultTable的存储失败:failed to create storage"
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_channel", "del_clean_info")
def test_create_data_not_found_error(mocker):
inner_channels = model_manager.get_inner_channel_by_priority("kafka")
assert inner_channels
mocker.patch(
"datahub.databus.channel.filter_clusters_by_geog_area",
return_value=inner_channels[0],
)
hp.enable()
get_inland_tag_ok()
result_table.get_2_output_ok()
PARAMS = {
"raw_data_id": 42,
"json_config": JSON_CONF,
"pe_config": "",
"bk_biz_id": 2,
"clean_config_name": "output",
"result_table_name": "output",
"result_table_name_alias": "清洗表测试",
"description": u"清洗测试",
"bk_username": "admin",
"fields": [
{
"field_name": "timestamp",
"field_alias": "时间戳",
"field_type": "timestamp",
"is_dimension": False,
"field_index": 1,
},
{
"field_name": "field1",
"field_alias": "字段1",
"field_type": "long",
"is_dimension": False,
"field_index": 2,
},
{
"field_name": "field2",
"field_alias": "字段2",
"field_type": "long",
"is_dimension": False,
"field_index": 3,
},
],
}
mocker.patch(
"datahub.databus.api.MetaApi.data_processings.create",
return_value=DataResponse({"result": True}),
)
mocker.patch(
"datahub.databus.api.StoreKitApi.result_tables.create",
return_value=DataResponse({"result": True}),
)
mocker.patch(
"datahub.databus.api.MetaApi.result_tables.retrieve",
return_value=DataResponse({"result": False}),
)
mocker.patch(
"datahub.databus.api.MetaApi.data_processings.delete",
return_value=DataResponse({"result": True}),
)
res = post("/v3/databus/cleans/", PARAMS)
assert not res["result"]
assert res["message"] == u"对象不存在:result_table[id=2_output]"
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_channel", "add_clean")
def test_retrieve_success(mocker):
"""dataid存在"""
_clean_success_parpare(mocker)
res = get("/v3/databus/cleans/2_output/")
assert res["result"]
assert res["data"]["processing_id"] == "2_output"
assert res["data"]["raw_data_id"] == 42
assert res["data"]["json_config"] == "test_json_config"
assert res["data"]["result_table_id"] == "2_output"
assert res["data"]["status"] == "stopped"
assert res["data"]["status_display"] == u"stopped"
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_clean", "add_channel")
def test_retrieve_data_not_found(mocker):
"""dataid不存在"""
mocker.patch(
"datahub.databus.api.MetaApi.result_tables.retrieve",
return_value=DataResponse({"result": False}),
)
res = get("/v3/databus/cleans/2_output/")
assert not res["result"]
assert res["message"] == u"对象不存在:result_table[id=2_output]"
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_clean", "add_channel")
def test_update_success(mocker):
"""dataid存在"""
_clean_success_parpare(mocker)
PARAMS = {
"raw_data_id": 42,
"json_config": JSON_CONF,
"pe_config": "",
"bk_biz_id": 2,
"clean_config_name": "output",
"result_table_name": "output",
"result_table_name_alias": "清洗表测试",
"description": u"清洗测试",
"bk_username": "admin",
"fields": [
{
"field_name": "timestamp",
"field_alias": "时间戳",
"field_type": "timestamp",
"is_dimension": False,
"field_index": 1,
},
{
"field_name": "field1",
"field_alias": "字段1",
"field_type": "long",
"is_dimension": False,
"field_index": 2,
},
{
"field_name": "field2",
"field_alias": "字段2",
"field_type": "long",
"is_dimension": False,
"field_index": 3,
},
],
}
mocker.patch(
"datahub.databus.api.MetaApi.result_tables.update",
return_value=DataResponse({"result": True}),
)
res = put("/v3/databus/cleans/2_output/", PARAMS)
assert res["result"]
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_clean", "add_channel")
def test_update_update_rt_error(mocker):
"""dataid存在"""
_clean_success_parpare(mocker)
PARAMS = {
"raw_data_id": 42,
"json_config": JSON_CONF,
"pe_config": "",
"bk_biz_id": 2,
"clean_config_name": "output",
"result_table_name": "output",
"result_table_name_alias": "清洗表测试",
"description": u"清洗测试",
"bk_username": "admin",
"fields": [
{
"field_name": "timestamp",
"field_alias": "时间戳",
"field_type": "timestamp",
"is_dimension": False,
"field_index": 1,
},
{
"field_name": "field1",
"field_alias": "字段1",
"field_type": "long",
"is_dimension": False,
"field_index": 2,
},
{
"field_name": "field2",
"field_alias": "字段2",
"field_type": "long",
"is_dimension": False,
"field_index": 3,
},
],
}
mocker.patch(
"datahub.databus.api.MetaApi.result_tables.update",
return_value=DataResponse({"result": False, "message": "failed"}),
)
res = put("/v3/databus/cleans/2_output/", PARAMS)
assert not res["result"]
assert res["message"] == u"更新ResultTable失败:failed"
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_clean", "add_channel")
def test_destroy_not_support(mocker):
"""dataid存在"""
_clean_success_parpare(mocker)
mocker.patch(
"datahub.databus.api.MetaApi.data_processings.delete",
return_value=DataResponse({"result": True, "data": {}}),
)
mocker.patch(
"datahub.databus.api.StoreKitApi.result_tables.delete",
return_value=DataResponse({"result": True, "data": {}}),
)
res = delete("/v3/databus/cleans/2_output/")
assert not res["result"]
assert res["message"] == "暂不支持删除存在下游存储/计算节点的清洗任务"
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_clean", "add_channel")
def test_destroy_success(mocker):
"""dataid存在"""
_clean_success_parpare(mocker)
hp.register_uri(
hp.GET,
META_API_URL + "result_tables/2_output/",
body=json.dumps(
{
"errors": {},
"message": "ok",
"code": "1500200",
"result": True,
"data": {
"bk_biz_id": 2,
"project_id": 2331,
"result_table_id": "2_output",
"result_table_name": "output",
"result_table_name_alias": "output_alias",
"processing_type": "clean",
"sensitivity": "output_alias",
"created_by": "committer",
"created_at": "2018-09-19 17:03:50",
"updated_by": None,
"updated_at": "2018-09-19 17:03:50",
"description": "输出",
"concurrency": 0,
"data_processing": {
"project_id": 1,
"processing_id": "xxx",
"processing_name": "xxx",
"processing_type": "xxx",
"created_by ": "xxx",
"created_at": "xxx",
"updated_by": "xxx",
"updated_at": "xxx",
"description": "xxx",
},
"count_freq": 3600,
"tags": {"manage": {"geog_area": [{"code": "inland"}]}},
"fields": [
{
"id": 13730,
"result_table_id": "2_output",
"field_index": 1,
"field_name": "timestamp",
"field_alias": "时间",
"description": "",
"field_type": "timestamp",
"is_dimension": 0,
"origins": "",
"created_by": None,
"created_at": None,
"updated_by": None,
"updated_at": None,
}
],
"storages": {
"kafka": {
"id": 1000,
"storage_channel_id": 1000,
"result_table_id": "xxx",
"storage_cluster": {},
"storage_channel": {
"id": 1000,
"cluster_name": "xxx",
"cluster_type": "kafka",
"cluster_role": "inner",
"cluster_domain": "xxx",
"cluster_backup_ips": "xxx",
"cluster_port": 2432,
"zk_domain": "127.0.0.1",
"zk_port": 3481,
"zk_root_path": "/abc/defg",
"priority": 234,
"attribute": "bkdata",
"description": "sdfdsf",
},
"physical_table_name": "xxx",
"expires": "xxx",
"storage_config": "{}",
"priority": 1,
"description": "xxx",
"created_by": None,
"created_at": None,
"updated_by": None,
"updated_at": None,
}
},
},
}
),
)
mocker.patch(
"datahub.databus.api.MetaApi.data_processings.delete",
return_value=DataResponse({"result": True, "data": {}}),
)
mocker.patch(
"datahub.databus.api.StoreKitApi.result_tables.delete",
return_value=DataResponse({"result": True, "data": {}}),
)
res = delete("/v3/databus/cleans/2_output/")
assert not res["result"]
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_channel")
def test_destroy_processing_not_found(mocker):
"""dataid存在"""
mocker.patch(
"datahub.databus.api.MetaApi.data_processings.delete",
return_value=DataResponse({"result": True, "data": {}}),
)
mocker.patch(
"datahub.databus.api.StoreKitApi.result_tables.delete",
return_value=DataResponse({"result": True, "data": {}}),
)
res = delete("/v3/databus/cleans/2_output/")
assert not res["result"]
assert res["message"] == u"找不到清洗process id: 2_output"
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_clean", "add_channel")
def test_list(mocker):
"""dataid存在"""
res = get("/v3/databus/cleans/?raw_data_id=42")
assert res["result"]
assert len(res["data"]) == 2
assert res["data"][0]["processing_id"] == "2_output"
assert res["data"][0]["raw_data_id"] == 42
assert res["data"][0]["json_config"] == "test_json_config"
assert res["data"][0]["status"] == "stopped"
assert res["data"][0]["status_display"] == u"stopped"
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_clean_factors")
def test_factors():
"""dataid存在"""
res = get("/v3/databus/cleans/factors/")
assert res["result"]
assert res["data"][0]["factor_alias"] == u"Json反序列化"
assert res["data"][0]["factor_name"] == "from_json"
@pytest.mark.httpretty
@pytest.mark.django_db
def test_time_formats():
"""dataid存在"""
res = get("/v3/databus/cleans/time_formats/")
assert res["result"]
@pytest.mark.httpretty
@pytest.mark.django_db
def test_list_errors():
res = get("/v3/databus/cleans/list_errors/")
assert res["result"]
assert "AccessByIndexFailedError" in res["data"]
assert "AssignNodeNeededError" in res["data"]
assert "BadJsonListError" in res["data"]
assert "NotListDataError" in res["data"]
assert "TypeConversionError" in res["data"]
@pytest.mark.httpretty
@pytest.mark.django_db
def test_get_processing_id_not_found():
"""业务ID不为数字"""
res = get("/v3/databus/cleans/99999/")
assert not res["result"]
assert res["message"] == u"对象不存在:databus_clean[processing_id=99999]"
@pytest.mark.httpretty
@pytest.mark.django_db
@pytest.mark.usefixtures("add_clean", "add_channel")
def test_search_data_id_not_found():
"""dataid不存在"""
res = get("/v3/databus/cleans/?raw_data_id=99999")
assert res["result"]
def _clean_success_parpare(mocker):
inner_channels = model_manager.get_inner_channel_by_priority("kafka")
assert inner_channels
mocker.patch(
"datahub.databus.channel.filter_clusters_by_geog_area",
return_value=inner_channels[0],
)
hp.enable()
get_inland_tag_ok()
result_table.get_2_output_ok()
result_table.get_2_output_storage_ok()
get_databus_old_ok()
|
d0b201e2caa59e7e1141463598062c3c16ce55a8
|
5bfd50a215f3db21cd93c69a93a50382fa3268dc
|
/pylibs/numpy_db/__init__.py
|
ca8f078786eee21927615ad46cc8f55429a36d54
|
[
"BSD-2-Clause-Views"
] |
permissive
|
leoshine/Spherical_Regression
|
95097e5730f077de8c02ddafabc965b55032e389
|
d19bc2f6f52982d4d58f5ddabe4231381d7facd7
|
refs/heads/master
| 2021-09-26T09:13:56.466686
| 2021-09-13T15:06:47
| 2021-09-13T15:06:47
| 177,441,335
| 152
| 19
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 263
|
py
|
__init__.py
|
"""
@Author : Shuai Liao
"""
from basic.common import is_py3
if is_py3: # python3
from .numpy_db_py3 import npy_table, npy_db, dtype_summary, reorder_dtype
else: # python2
from .numpy_db import npy_table, npy_db, dtype_summary, reorder_dtype
|
f26521436ca769c652a4be718ebb1fbaf9ee6252
|
7766096d6b2032562304e4b20190256ac2a5023e
|
/xbox/webapi/api/provider/achievements/__init__.py
|
106bcbac4fbfcc1637d02814969c7df8554fb5dd
|
[
"MIT"
] |
permissive
|
OpenXbox/xbox-webapi-python
|
c9d47be15cebc258ced7afde1ead70b5cd2d7a8c
|
398320c7777475959e4f8c6716297735be04aac4
|
refs/heads/master
| 2023-03-16T23:02:06.051438
| 2022-11-12T15:28:50
| 2022-11-12T15:28:50
| 125,562,423
| 166
| 55
|
MIT
| 2022-11-15T13:31:11
| 2018-03-16T19:43:18
|
Python
|
UTF-8
|
Python
| false
| false
| 4,709
|
py
|
__init__.py
|
"""
Achievements
Get Xbox 360 and Xbox One Achievement data
"""
from xbox.webapi.api.provider.achievements.models import (
Achievement360ProgressResponse,
Achievement360Response,
AchievementResponse,
RecentProgressResponse,
)
from xbox.webapi.api.provider.baseprovider import BaseProvider
class AchievementsProvider(BaseProvider):
ACHIEVEMENTS_URL = "https://achievements.xboxlive.com"
HEADERS_GAME_360_PROGRESS = {"x-xbl-contract-version": "1"}
HEADERS_GAME_PROGRESS = {"x-xbl-contract-version": "2"}
async def get_achievements_detail_item(
self, xuid, service_config_id, achievement_id, **kwargs
) -> AchievementResponse:
"""
Get achievement detail for specific item
Args:
xuid (str): Xbox User Id
service_config_id (str): Service Config Id
achievement_id (str): Achievement Id
Returns:
:class:`AchievementResponse`: Achievement Response
"""
url = f"{self.ACHIEVEMENTS_URL}/users/xuid({xuid})/achievements/{service_config_id}/{achievement_id}"
resp = await self.client.session.get(
url, headers=self.HEADERS_GAME_PROGRESS, **kwargs
)
resp.raise_for_status()
return AchievementResponse(**resp.json())
async def get_achievements_xbox360_all(
self, xuid, title_id, **kwargs
) -> Achievement360Response:
"""
Get all achievements for specific X360 title Id
Args:
xuid (str): Xbox User Id
title_id (str): Xbox 360 Title Id
Returns:
:class:`Achievement360Response`: Achievement 360 Response
"""
url = f"{self.ACHIEVEMENTS_URL}/users/xuid({xuid})/titleachievements?"
params = {"titleId": title_id}
resp = await self.client.session.get(
url, params=params, headers=self.HEADERS_GAME_360_PROGRESS, **kwargs
)
resp.raise_for_status()
return Achievement360Response(**resp.json())
async def get_achievements_xbox360_earned(
self, xuid, title_id, **kwargs
) -> Achievement360Response:
"""
Get earned achievements for specific X360 title id
Args:
xuid (str): Xbox User Id
title_id (str): Xbox 360 Title Id
Returns:
:class:`Achievement360Response`: Achievement 360 Response
"""
url = f"{self.ACHIEVEMENTS_URL}/users/xuid({xuid})/achievements?"
params = {"titleId": title_id}
resp = await self.client.session.get(
url, params=params, headers=self.HEADERS_GAME_360_PROGRESS, **kwargs
)
resp.raise_for_status()
return Achievement360Response(**resp.json())
async def get_achievements_xbox360_recent_progress_and_info(
self, xuid, **kwargs
) -> Achievement360ProgressResponse:
"""
Get recent achievement progress and information
Args:
xuid (str): Xbox User Id
Returns:
:class:`Achievement360Response`: Achievement 360 Response
"""
url = f"{self.ACHIEVEMENTS_URL}/users/xuid({xuid})/history/titles"
resp = await self.client.session.get(
url, headers=self.HEADERS_GAME_360_PROGRESS, **kwargs
)
resp.raise_for_status()
return Achievement360ProgressResponse(**resp.json())
async def get_achievements_xboxone_gameprogress(
self, xuid, title_id, **kwargs
) -> AchievementResponse:
"""
Get gameprogress for Xbox One title
Args:
xuid (str): Xbox User Id
title_id (str): Xbox One Title Id
Returns:
:class:`AchievementResponse`: Achievement Response
"""
url = f"{self.ACHIEVEMENTS_URL}/users/xuid({xuid})/achievements?"
params = {"titleId": title_id}
resp = await self.client.session.get(
url, params=params, headers=self.HEADERS_GAME_PROGRESS, **kwargs
)
resp.raise_for_status()
return AchievementResponse(**resp.json())
async def get_achievements_xboxone_recent_progress_and_info(
self, xuid, **kwargs
) -> RecentProgressResponse:
"""
Get recent achievement progress and information
Args:
xuid (str): Xbox User Id
Returns:
:class:`RecentProgressResponse`: Recent Progress Response
"""
url = f"{self.ACHIEVEMENTS_URL}/users/xuid({xuid})/history/titles"
resp = await self.client.session.get(
url, headers=self.HEADERS_GAME_PROGRESS, **kwargs
)
resp.raise_for_status()
return RecentProgressResponse(**resp.json())
|
60b5c3e2b0671e069d2e87d4e243ae058c7f0c52
|
6deafbf6257a5c30f084c3678712235c2c31a686
|
/Toolz/sqlmap/thirdparty/odict/odict.py
|
9b7e9d7be27c931b4000ead40e601aa2d481b2cc
|
[
"Unlicense",
"LicenseRef-scancode-generic-cla",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-proprietary-license",
"GPL-2.0-only",
"LicenseRef-scancode-commercial-license",
"LicenseRef-scancode-other-permissive"
] |
permissive
|
thezakman/CTF-Heaven
|
53fcb4a72afa821ad05d8cc3b309fb388f958163
|
4b52a2178922f1502ab00fa8fc156d35e1dc653f
|
refs/heads/master
| 2023-04-05T18:20:54.680378
| 2023-03-21T13:47:45
| 2023-03-21T13:47:45
| 167,290,879
| 182
| 24
|
Unlicense
| 2022-11-29T21:41:30
| 2019-01-24T02:44:24
|
Python
|
UTF-8
|
Python
| false
| false
| 46,249
|
py
|
odict.py
|
# odict.py
# An Ordered Dictionary object
# Copyright (C) 2005 Nicola Larosa, Michael Foord
# E-mail: nico AT tekNico DOT net, fuzzyman AT voidspace DOT org DOT uk
# This software is licensed under the terms of the BSD license.
# http://www.voidspace.org.uk/python/license.shtml
# Basically you're free to copy, modify, distribute and relicense it,
# So long as you keep a copy of the license with it.
# Documentation at http://www.voidspace.org.uk/python/odict.html
# For information about bugfixes, updates and support, please join the
# Pythonutils mailing list:
# http://groups.google.com/group/pythonutils/
# Comments, suggestions and bug reports welcome.
"""A dict that keeps keys in insertion order"""
from __future__ import generators
__author__ = ('Nicola Larosa <nico-NoSp@m-tekNico.net>,'
'Michael Foord <fuzzyman AT voidspace DOT org DOT uk>')
__docformat__ = "restructuredtext en"
__version__ = '0.2.2'
__all__ = ['OrderedDict', 'SequenceOrderedDict']
import sys
INTP_VER = sys.version_info[:2]
if INTP_VER < (2, 2):
raise RuntimeError("Python v.2.2 or later required")
import types, warnings
class _OrderedDict(dict):
"""
A class of dictionary that keeps the insertion order of keys.
All appropriate methods return keys, items, or values in an ordered way.
All normal dictionary methods are available. Update and comparison is
restricted to other OrderedDict objects.
Various sequence methods are available, including the ability to explicitly
mutate the key ordering.
__contains__ tests:
>>> d = OrderedDict(((1, 3),))
>>> 1 in d
1
>>> 4 in d
0
__getitem__ tests:
>>> OrderedDict(((1, 3), (3, 2), (2, 1)))[2]
1
>>> OrderedDict(((1, 3), (3, 2), (2, 1)))[4]
Traceback (most recent call last):
KeyError: 4
__len__ tests:
>>> len(OrderedDict())
0
>>> len(OrderedDict(((1, 3), (3, 2), (2, 1))))
3
get tests:
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.get(1)
3
>>> d.get(4) is None
1
>>> d.get(4, 5)
5
>>> d
OrderedDict([(1, 3), (3, 2), (2, 1)])
has_key tests:
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.has_key(1)
1
>>> d.has_key(4)
0
"""
def __init__(self, init_val=(), strict=False):
"""
Create a new ordered dictionary. Cannot init from a normal dict,
nor from kwargs, since items order is undefined in those cases.
If the ``strict`` keyword argument is ``True`` (``False`` is the
default) then when doing slice assignment - the ``OrderedDict`` you are
assigning from *must not* contain any keys in the remaining dict.
>>> OrderedDict()
OrderedDict([])
>>> OrderedDict({1: 1})
Traceback (most recent call last):
TypeError: undefined order, cannot get items from dict
>>> OrderedDict({1: 1}.items())
OrderedDict([(1, 1)])
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d
OrderedDict([(1, 3), (3, 2), (2, 1)])
>>> OrderedDict(d)
OrderedDict([(1, 3), (3, 2), (2, 1)])
"""
self.strict = strict
dict.__init__(self)
if isinstance(init_val, OrderedDict):
self._sequence = init_val.keys()
dict.update(self, init_val)
elif isinstance(init_val, dict):
# we lose compatibility with other ordered dict types this way
raise TypeError('undefined order, cannot get items from dict')
else:
self._sequence = []
self.update(init_val)
### Special methods ###
def __delitem__(self, key):
"""
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> del d[3]
>>> d
OrderedDict([(1, 3), (2, 1)])
>>> del d[3]
Traceback (most recent call last):
KeyError: 3
>>> d[3] = 2
>>> d
OrderedDict([(1, 3), (2, 1), (3, 2)])
>>> del d[0:1]
>>> d
OrderedDict([(2, 1), (3, 2)])
"""
if isinstance(key, types.SliceType):
# FIXME: efficiency?
keys = self._sequence[key]
for entry in keys:
dict.__delitem__(self, entry)
del self._sequence[key]
else:
# do the dict.__delitem__ *first* as it raises
# the more appropriate error
dict.__delitem__(self, key)
self._sequence.remove(key)
def __eq__(self, other):
"""
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d == OrderedDict(d)
True
>>> d == OrderedDict(((1, 3), (2, 1), (3, 2)))
False
>>> d == OrderedDict(((1, 0), (3, 2), (2, 1)))
False
>>> d == OrderedDict(((0, 3), (3, 2), (2, 1)))
False
>>> d == dict(d)
False
>>> d == False
False
"""
if isinstance(other, OrderedDict):
# FIXME: efficiency?
# Generate both item lists for each compare
return (self.items() == other.items())
else:
return False
def __lt__(self, other):
"""
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> c = OrderedDict(((0, 3), (3, 2), (2, 1)))
>>> c < d
True
>>> d < c
False
>>> d < dict(c)
Traceback (most recent call last):
TypeError: Can only compare with other OrderedDicts
"""
if not isinstance(other, OrderedDict):
raise TypeError('Can only compare with other OrderedDicts')
# FIXME: efficiency?
# Generate both item lists for each compare
return (self.items() < other.items())
def __le__(self, other):
"""
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> c = OrderedDict(((0, 3), (3, 2), (2, 1)))
>>> e = OrderedDict(d)
>>> c <= d
True
>>> d <= c
False
>>> d <= dict(c)
Traceback (most recent call last):
TypeError: Can only compare with other OrderedDicts
>>> d <= e
True
"""
if not isinstance(other, OrderedDict):
raise TypeError('Can only compare with other OrderedDicts')
# FIXME: efficiency?
# Generate both item lists for each compare
return (self.items() <= other.items())
def __ne__(self, other):
"""
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d != OrderedDict(d)
False
>>> d != OrderedDict(((1, 3), (2, 1), (3, 2)))
True
>>> d != OrderedDict(((1, 0), (3, 2), (2, 1)))
True
>>> d == OrderedDict(((0, 3), (3, 2), (2, 1)))
False
>>> d != dict(d)
True
>>> d != False
True
"""
if isinstance(other, OrderedDict):
# FIXME: efficiency?
# Generate both item lists for each compare
return not (self.items() == other.items())
else:
return True
def __gt__(self, other):
"""
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> c = OrderedDict(((0, 3), (3, 2), (2, 1)))
>>> d > c
True
>>> c > d
False
>>> d > dict(c)
Traceback (most recent call last):
TypeError: Can only compare with other OrderedDicts
"""
if not isinstance(other, OrderedDict):
raise TypeError('Can only compare with other OrderedDicts')
# FIXME: efficiency?
# Generate both item lists for each compare
return (self.items() > other.items())
def __ge__(self, other):
"""
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> c = OrderedDict(((0, 3), (3, 2), (2, 1)))
>>> e = OrderedDict(d)
>>> c >= d
False
>>> d >= c
True
>>> d >= dict(c)
Traceback (most recent call last):
TypeError: Can only compare with other OrderedDicts
>>> e >= d
True
"""
if not isinstance(other, OrderedDict):
raise TypeError('Can only compare with other OrderedDicts')
# FIXME: efficiency?
# Generate both item lists for each compare
return (self.items() >= other.items())
def __repr__(self):
"""
Used for __repr__ and __str__
>>> r1 = repr(OrderedDict((('a', 'b'), ('c', 'd'), ('e', 'f'))))
>>> r1
"OrderedDict([('a', 'b'), ('c', 'd'), ('e', 'f')])"
>>> r2 = repr(OrderedDict((('a', 'b'), ('e', 'f'), ('c', 'd'))))
>>> r2
"OrderedDict([('a', 'b'), ('e', 'f'), ('c', 'd')])"
>>> r1 == str(OrderedDict((('a', 'b'), ('c', 'd'), ('e', 'f'))))
True
>>> r2 == str(OrderedDict((('a', 'b'), ('e', 'f'), ('c', 'd'))))
True
"""
return '%s([%s])' % (self.__class__.__name__, ', '.join(
['(%r, %r)' % (key, self[key]) for key in self._sequence]))
def __setitem__(self, key, val):
"""
Allows slice assignment, so long as the slice is an OrderedDict
>>> d = OrderedDict()
>>> d['a'] = 'b'
>>> d['b'] = 'a'
>>> d[3] = 12
>>> d
OrderedDict([('a', 'b'), ('b', 'a'), (3, 12)])
>>> d[:] = OrderedDict(((1, 2), (2, 3), (3, 4)))
>>> d
OrderedDict([(1, 2), (2, 3), (3, 4)])
>>> d[::2] = OrderedDict(((7, 8), (9, 10)))
>>> d
OrderedDict([(7, 8), (2, 3), (9, 10)])
>>> d = OrderedDict(((0, 1), (1, 2), (2, 3), (3, 4)))
>>> d[1:3] = OrderedDict(((1, 2), (5, 6), (7, 8)))
>>> d
OrderedDict([(0, 1), (1, 2), (5, 6), (7, 8), (3, 4)])
>>> d = OrderedDict(((0, 1), (1, 2), (2, 3), (3, 4)), strict=True)
>>> d[1:3] = OrderedDict(((1, 2), (5, 6), (7, 8)))
>>> d
OrderedDict([(0, 1), (1, 2), (5, 6), (7, 8), (3, 4)])
>>> a = OrderedDict(((0, 1), (1, 2), (2, 3)), strict=True)
>>> a[3] = 4
>>> a
OrderedDict([(0, 1), (1, 2), (2, 3), (3, 4)])
>>> a[::1] = OrderedDict([(0, 1), (1, 2), (2, 3), (3, 4)])
>>> a
OrderedDict([(0, 1), (1, 2), (2, 3), (3, 4)])
>>> a[:2] = OrderedDict([(0, 1), (1, 2), (2, 3), (3, 4), (4, 5)])
Traceback (most recent call last):
ValueError: slice assignment must be from unique keys
>>> a = OrderedDict(((0, 1), (1, 2), (2, 3)))
>>> a[3] = 4
>>> a
OrderedDict([(0, 1), (1, 2), (2, 3), (3, 4)])
>>> a[::1] = OrderedDict([(0, 1), (1, 2), (2, 3), (3, 4)])
>>> a
OrderedDict([(0, 1), (1, 2), (2, 3), (3, 4)])
>>> a[:2] = OrderedDict([(0, 1), (1, 2), (2, 3), (3, 4)])
>>> a
OrderedDict([(0, 1), (1, 2), (2, 3), (3, 4)])
>>> a[::-1] = OrderedDict([(0, 1), (1, 2), (2, 3), (3, 4)])
>>> a
OrderedDict([(3, 4), (2, 3), (1, 2), (0, 1)])
>>> d = OrderedDict([(0, 1), (1, 2), (2, 3), (3, 4)])
>>> d[:1] = 3
Traceback (most recent call last):
TypeError: slice assignment requires an OrderedDict
>>> d = OrderedDict([(0, 1), (1, 2), (2, 3), (3, 4)])
>>> d[:1] = OrderedDict([(9, 8)])
>>> d
OrderedDict([(9, 8), (1, 2), (2, 3), (3, 4)])
"""
if isinstance(key, types.SliceType):
if not isinstance(val, OrderedDict):
# FIXME: allow a list of tuples?
raise TypeError('slice assignment requires an OrderedDict')
keys = self._sequence[key]
# NOTE: Could use ``range(*key.indices(len(self._sequence)))``
indexes = range(len(self._sequence))[key]
if key.step is None:
# NOTE: new slice may not be the same size as the one being
# overwritten !
# NOTE: What is the algorithm for an impossible slice?
# e.g. d[5:3]
pos = key.start or 0
del self[key]
newkeys = val.keys()
for k in newkeys:
if k in self:
if self.strict:
raise ValueError('slice assignment must be from '
'unique keys')
else:
# NOTE: This removes duplicate keys *first*
# so start position might have changed?
del self[k]
self._sequence = (self._sequence[:pos] + newkeys +
self._sequence[pos:])
dict.update(self, val)
else:
# extended slice - length of new slice must be the same
# as the one being replaced
if len(keys) != len(val):
raise ValueError('attempt to assign sequence of size %s '
'to extended slice of size %s' % (len(val), len(keys)))
# FIXME: efficiency?
del self[key]
item_list = zip(indexes, val.items())
# smallest indexes first - higher indexes not guaranteed to
# exist
item_list.sort()
for pos, (newkey, newval) in item_list:
if self.strict and newkey in self:
raise ValueError('slice assignment must be from unique'
' keys')
self.insert(pos, newkey, newval)
else:
if key not in self:
self._sequence.append(key)
dict.__setitem__(self, key, val)
def __getitem__(self, key):
"""
Allows slicing. Returns an OrderedDict if you slice.
>>> b = OrderedDict([(7, 0), (6, 1), (5, 2), (4, 3), (3, 4), (2, 5), (1, 6)])
>>> b[::-1]
OrderedDict([(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1), (7, 0)])
>>> b[2:5]
OrderedDict([(5, 2), (4, 3), (3, 4)])
>>> type(b[2:4])
<class '__main__.OrderedDict'>
"""
if isinstance(key, types.SliceType):
# FIXME: does this raise the error we want?
keys = self._sequence[key]
# FIXME: efficiency?
return OrderedDict([(entry, self[entry]) for entry in keys])
else:
return dict.__getitem__(self, key)
__str__ = __repr__
def __setattr__(self, name, value):
"""
Implemented so that accesses to ``sequence`` raise a warning and are
diverted to the new ``setkeys`` method.
"""
if name == 'sequence':
warnings.warn('Use of the sequence attribute is deprecated.'
' Use the keys method instead.', DeprecationWarning)
# NOTE: doesn't return anything
self.setkeys(value)
else:
# FIXME: do we want to allow arbitrary setting of attributes?
# Or do we want to manage it?
object.__setattr__(self, name, value)
def __getattr__(self, name):
"""
Implemented so that access to ``sequence`` raises a warning.
>>> d = OrderedDict()
>>> d.sequence
[]
"""
if name == 'sequence':
warnings.warn('Use of the sequence attribute is deprecated.'
' Use the keys method instead.', DeprecationWarning)
# NOTE: Still (currently) returns a direct reference. Need to
# because code that uses sequence will expect to be able to
# mutate it in place.
return self._sequence
else:
# raise the appropriate error
raise AttributeError("OrderedDict has no '%s' attribute" % name)
def __deepcopy__(self, memo):
"""
To allow deepcopy to work with OrderedDict.
>>> from copy import deepcopy
>>> a = OrderedDict([(1, 1), (2, 2), (3, 3)])
>>> a['test'] = {}
>>> b = deepcopy(a)
>>> b == a
True
>>> b is a
False
>>> a['test'] is b['test']
False
"""
from copy import deepcopy
return self.__class__(deepcopy(self.items(), memo), self.strict)
### Read-only methods ###
def copy(self):
"""
>>> OrderedDict(((1, 3), (3, 2), (2, 1))).copy()
OrderedDict([(1, 3), (3, 2), (2, 1)])
"""
return OrderedDict(self)
def items(self):
"""
``items`` returns a list of tuples representing all the
``(key, value)`` pairs in the dictionary.
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.items()
[(1, 3), (3, 2), (2, 1)]
>>> d.clear()
>>> d.items()
[]
"""
return zip(self._sequence, self.values())
def keys(self):
"""
Return a list of keys in the ``OrderedDict``.
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.keys()
[1, 3, 2]
"""
return self._sequence[:]
def values(self, values=None):
"""
Return a list of all the values in the OrderedDict.
Optionally you can pass in a list of values, which will replace the
current list. The value list must be the same len as the OrderedDict.
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.values()
[3, 2, 1]
"""
return [self[key] for key in self._sequence]
def iteritems(self):
"""
>>> ii = OrderedDict(((1, 3), (3, 2), (2, 1))).iteritems()
>>> ii.next()
(1, 3)
>>> ii.next()
(3, 2)
>>> ii.next()
(2, 1)
>>> ii.next()
Traceback (most recent call last):
StopIteration
"""
def make_iter(self=self):
keys = self.iterkeys()
while True:
key = keys.next()
yield (key, self[key])
return make_iter()
def iterkeys(self):
"""
>>> ii = OrderedDict(((1, 3), (3, 2), (2, 1))).iterkeys()
>>> ii.next()
1
>>> ii.next()
3
>>> ii.next()
2
>>> ii.next()
Traceback (most recent call last):
StopIteration
"""
return iter(self._sequence)
__iter__ = iterkeys
def itervalues(self):
"""
>>> iv = OrderedDict(((1, 3), (3, 2), (2, 1))).itervalues()
>>> iv.next()
3
>>> iv.next()
2
>>> iv.next()
1
>>> iv.next()
Traceback (most recent call last):
StopIteration
"""
def make_iter(self=self):
keys = self.iterkeys()
while True:
yield self[keys.next()]
return make_iter()
### Read-write methods ###
def clear(self):
"""
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.clear()
>>> d
OrderedDict([])
"""
dict.clear(self)
self._sequence = []
def pop(self, key, *args):
"""
No dict.pop in Python 2.2, gotta reimplement it
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.pop(3)
2
>>> d
OrderedDict([(1, 3), (2, 1)])
>>> d.pop(4)
Traceback (most recent call last):
KeyError: 4
>>> d.pop(4, 0)
0
>>> d.pop(4, 0, 1)
Traceback (most recent call last):
TypeError: pop expected at most 2 arguments, got 3
"""
if len(args) > 1:
raise TypeError('pop expected at most 2 arguments, got %s' %
(len(args) + 1))
if key in self:
val = self[key]
del self[key]
else:
try:
val = args[0]
except IndexError:
raise KeyError(key)
return val
def popitem(self, i=-1):
"""
Delete and return an item specified by index, not a random one as in
dict. The index is -1 by default (the last item).
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.popitem()
(2, 1)
>>> d
OrderedDict([(1, 3), (3, 2)])
>>> d.popitem(0)
(1, 3)
>>> OrderedDict().popitem()
Traceback (most recent call last):
KeyError: 'popitem(): dictionary is empty'
>>> d.popitem(2)
Traceback (most recent call last):
IndexError: popitem(): index 2 not valid
"""
if not self._sequence:
raise KeyError('popitem(): dictionary is empty')
try:
key = self._sequence[i]
except IndexError:
raise IndexError('popitem(): index %s not valid' % i)
return (key, self.pop(key))
def setdefault(self, key, defval = None):
"""
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.setdefault(1)
3
>>> d.setdefault(4) is None
True
>>> d
OrderedDict([(1, 3), (3, 2), (2, 1), (4, None)])
>>> d.setdefault(5, 0)
0
>>> d
OrderedDict([(1, 3), (3, 2), (2, 1), (4, None), (5, 0)])
"""
if key in self:
return self[key]
else:
self[key] = defval
return defval
def update(self, from_od):
"""
Update from another OrderedDict or sequence of (key, value) pairs
>>> d = OrderedDict(((1, 0), (0, 1)))
>>> d.update(OrderedDict(((1, 3), (3, 2), (2, 1))))
>>> d
OrderedDict([(1, 3), (0, 1), (3, 2), (2, 1)])
>>> d.update({4: 4})
Traceback (most recent call last):
TypeError: undefined order, cannot get items from dict
>>> d.update((4, 4))
Traceback (most recent call last):
TypeError: cannot convert dictionary update sequence element "4" to a 2-item sequence
"""
if isinstance(from_od, OrderedDict):
for key, val in from_od.items():
self[key] = val
elif isinstance(from_od, dict):
# we lose compatibility with other ordered dict types this way
raise TypeError('undefined order, cannot get items from dict')
else:
# FIXME: efficiency?
# sequence of 2-item sequences, or error
for item in from_od:
try:
key, val = item
except TypeError:
raise TypeError('cannot convert dictionary update'
' sequence element "%s" to a 2-item sequence' % item)
self[key] = val
def rename(self, old_key, new_key):
"""
Rename the key for a given value, without modifying sequence order.
For the case where new_key already exists this raise an exception,
since if new_key exists, it is ambiguous as to what happens to the
associated values, and the position of new_key in the sequence.
>>> od = OrderedDict()
>>> od['a'] = 1
>>> od['b'] = 2
>>> od.items()
[('a', 1), ('b', 2)]
>>> od.rename('b', 'c')
>>> od.items()
[('a', 1), ('c', 2)]
>>> od.rename('c', 'a')
Traceback (most recent call last):
ValueError: New key already exists: 'a'
>>> od.rename('d', 'b')
Traceback (most recent call last):
KeyError: 'd'
"""
if new_key == old_key:
# no-op
return
if new_key in self:
raise ValueError("New key already exists: %r" % new_key)
# rename sequence entry
value = self[old_key]
old_idx = self._sequence.index(old_key)
self._sequence[old_idx] = new_key
# rename internal dict entry
dict.__delitem__(self, old_key)
dict.__setitem__(self, new_key, value)
def setitems(self, items):
"""
This method allows you to set the items in the dict.
It takes a list of tuples - of the same sort returned by the ``items``
method.
>>> d = OrderedDict()
>>> d.setitems(((3, 1), (2, 3), (1, 2)))
>>> d
OrderedDict([(3, 1), (2, 3), (1, 2)])
"""
self.clear()
# FIXME: this allows you to pass in an OrderedDict as well :-)
self.update(items)
def setkeys(self, keys):
"""
``setkeys`` all ows you to pass in a new list of keys which will
replace the current set. This must contain the same set of keys, but
need not be in the same order.
If you pass in new keys that don't match, a ``KeyError`` will be
raised.
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.keys()
[1, 3, 2]
>>> d.setkeys((1, 2, 3))
>>> d
OrderedDict([(1, 3), (2, 1), (3, 2)])
>>> d.setkeys(['a', 'b', 'c'])
Traceback (most recent call last):
KeyError: 'Keylist is not the same as current keylist.'
"""
# FIXME: Efficiency? (use set for Python 2.4 :-)
# NOTE: list(keys) rather than keys[:] because keys[:] returns
# a tuple, if keys is a tuple.
kcopy = list(keys)
kcopy.sort()
self._sequence.sort()
if kcopy != self._sequence:
raise KeyError('Keylist is not the same as current keylist.')
# NOTE: This makes the _sequence attribute a new object, instead
# of changing it in place.
# FIXME: efficiency?
self._sequence = list(keys)
def setvalues(self, values):
"""
You can pass in a list of values, which will replace the
current list. The value list must be the same len as the OrderedDict.
(Or a ``ValueError`` is raised.)
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.setvalues((1, 2, 3))
>>> d
OrderedDict([(1, 1), (3, 2), (2, 3)])
>>> d.setvalues([6])
Traceback (most recent call last):
ValueError: Value list is not the same length as the OrderedDict.
"""
if len(values) != len(self):
# FIXME: correct error to raise?
raise ValueError('Value list is not the same length as the '
'OrderedDict.')
self.update(zip(self, values))
### Sequence Methods ###
def index(self, key):
"""
Return the position of the specified key in the OrderedDict.
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.index(3)
1
>>> d.index(4)
Traceback (most recent call last):
ValueError: list.index(x): x not in list
"""
return self._sequence.index(key)
def insert(self, index, key, value):
"""
Takes ``index``, ``key``, and ``value`` as arguments.
Sets ``key`` to ``value``, so that ``key`` is at position ``index`` in
the OrderedDict.
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.insert(0, 4, 0)
>>> d
OrderedDict([(4, 0), (1, 3), (3, 2), (2, 1)])
>>> d.insert(0, 2, 1)
>>> d
OrderedDict([(2, 1), (4, 0), (1, 3), (3, 2)])
>>> d.insert(8, 8, 1)
>>> d
OrderedDict([(2, 1), (4, 0), (1, 3), (3, 2), (8, 1)])
"""
if key in self:
# FIXME: efficiency?
del self[key]
self._sequence.insert(index, key)
dict.__setitem__(self, key, value)
def reverse(self):
"""
Reverse the order of the OrderedDict.
>>> d = OrderedDict(((1, 3), (3, 2), (2, 1)))
>>> d.reverse()
>>> d
OrderedDict([(2, 1), (3, 2), (1, 3)])
"""
self._sequence.reverse()
def sort(self, *args, **kwargs):
"""
Sort the key order in the OrderedDict.
This method takes the same arguments as the ``list.sort`` method on
your version of Python.
>>> d = OrderedDict(((4, 1), (2, 2), (3, 3), (1, 4)))
>>> d.sort()
>>> d
OrderedDict([(1, 4), (2, 2), (3, 3), (4, 1)])
"""
self._sequence.sort(*args, **kwargs)
if INTP_VER >= (2, 7):
from collections import OrderedDict
else:
OrderedDict = _OrderedDict
class Keys(object):
# FIXME: should this object be a subclass of list?
"""
Custom object for accessing the keys of an OrderedDict.
Can be called like the normal ``OrderedDict.keys`` method, but also
supports indexing and sequence methods.
"""
def __init__(self, main):
self._main = main
def __call__(self):
"""Pretend to be the keys method."""
return self._main._keys()
def __getitem__(self, index):
"""Fetch the key at position i."""
# NOTE: this automatically supports slicing :-)
return self._main._sequence[index]
def __setitem__(self, index, name):
"""
You cannot assign to keys, but you can do slice assignment to re-order
them.
You can only do slice assignment if the new set of keys is a reordering
of the original set.
"""
if isinstance(index, types.SliceType):
# FIXME: efficiency?
# check length is the same
indexes = range(len(self._main._sequence))[index]
if len(indexes) != len(name):
raise ValueError('attempt to assign sequence of size %s '
'to slice of size %s' % (len(name), len(indexes)))
# check they are the same keys
# FIXME: Use set
old_keys = self._main._sequence[index]
new_keys = list(name)
old_keys.sort()
new_keys.sort()
if old_keys != new_keys:
raise KeyError('Keylist is not the same as current keylist.')
orig_vals = [self._main[k] for k in name]
del self._main[index]
vals = zip(indexes, name, orig_vals)
vals.sort()
for i, k, v in vals:
if self._main.strict and k in self._main:
raise ValueError('slice assignment must be from '
'unique keys')
self._main.insert(i, k, v)
else:
raise ValueError('Cannot assign to keys')
### following methods pinched from UserList and adapted ###
def __repr__(self): return repr(self._main._sequence)
# FIXME: do we need to check if we are comparing with another ``Keys``
# object? (like the __cast method of UserList)
def __lt__(self, other): return self._main._sequence < other
def __le__(self, other): return self._main._sequence <= other
def __eq__(self, other): return self._main._sequence == other
def __ne__(self, other): return self._main._sequence != other
def __gt__(self, other): return self._main._sequence > other
def __ge__(self, other): return self._main._sequence >= other
# FIXME: do we need __cmp__ as well as rich comparisons?
def __cmp__(self, other): return cmp(self._main._sequence, other)
def __contains__(self, item): return item in self._main._sequence
def __len__(self): return len(self._main._sequence)
def __iter__(self): return self._main.iterkeys()
def count(self, item): return self._main._sequence.count(item)
def index(self, item, *args): return self._main._sequence.index(item, *args)
def reverse(self): self._main._sequence.reverse()
def sort(self, *args, **kwds): self._main._sequence.sort(*args, **kwds)
def __mul__(self, n): return self._main._sequence*n
__rmul__ = __mul__
def __add__(self, other): return self._main._sequence + other
def __radd__(self, other): return other + self._main._sequence
## following methods not implemented for keys ##
def __delitem__(self, i): raise TypeError('Can\'t delete items from keys')
def __iadd__(self, other): raise TypeError('Can\'t add in place to keys')
def __imul__(self, n): raise TypeError('Can\'t multiply keys in place')
def append(self, item): raise TypeError('Can\'t append items to keys')
def insert(self, i, item): raise TypeError('Can\'t insert items into keys')
def pop(self, i=-1): raise TypeError('Can\'t pop items from keys')
def remove(self, item): raise TypeError('Can\'t remove items from keys')
def extend(self, other): raise TypeError('Can\'t extend keys')
class Items(object):
"""
Custom object for accessing the items of an OrderedDict.
Can be called like the normal ``OrderedDict.items`` method, but also
supports indexing and sequence methods.
"""
def __init__(self, main):
self._main = main
def __call__(self):
"""Pretend to be the items method."""
return self._main._items()
def __getitem__(self, index):
"""Fetch the item at position i."""
if isinstance(index, types.SliceType):
# fetching a slice returns an OrderedDict
return self._main[index].items()
key = self._main._sequence[index]
return (key, self._main[key])
def __setitem__(self, index, item):
"""Set item at position i to item."""
if isinstance(index, types.SliceType):
# NOTE: item must be an iterable (list of tuples)
self._main[index] = OrderedDict(item)
else:
# FIXME: Does this raise a sensible error?
orig = self._main.keys[index]
key, value = item
if self._main.strict and key in self and (key != orig):
raise ValueError('slice assignment must be from '
'unique keys')
# delete the current one
del self._main[self._main._sequence[index]]
self._main.insert(index, key, value)
def __delitem__(self, i):
"""Delete the item at position i."""
key = self._main._sequence[i]
if isinstance(i, types.SliceType):
for k in key:
# FIXME: efficiency?
del self._main[k]
else:
del self._main[key]
### following methods pinched from UserList and adapted ###
def __repr__(self): return repr(self._main.items())
# FIXME: do we need to check if we are comparing with another ``Items``
# object? (like the __cast method of UserList)
def __lt__(self, other): return self._main.items() < other
def __le__(self, other): return self._main.items() <= other
def __eq__(self, other): return self._main.items() == other
def __ne__(self, other): return self._main.items() != other
def __gt__(self, other): return self._main.items() > other
def __ge__(self, other): return self._main.items() >= other
def __cmp__(self, other): return cmp(self._main.items(), other)
def __contains__(self, item): return item in self._main.items()
def __len__(self): return len(self._main._sequence) # easier :-)
def __iter__(self): return self._main.iteritems()
def count(self, item): return self._main.items().count(item)
def index(self, item, *args): return self._main.items().index(item, *args)
def reverse(self): self._main.reverse()
def sort(self, *args, **kwds): self._main.sort(*args, **kwds)
def __mul__(self, n): return self._main.items()*n
__rmul__ = __mul__
def __add__(self, other): return self._main.items() + other
def __radd__(self, other): return other + self._main.items()
def append(self, item):
"""Add an item to the end."""
# FIXME: this is only append if the key isn't already present
key, value = item
self._main[key] = value
def insert(self, i, item):
key, value = item
self._main.insert(i, key, value)
def pop(self, i=-1):
key = self._main._sequence[i]
return (key, self._main.pop(key))
def remove(self, item):
key, value = item
try:
assert value == self._main[key]
except (KeyError, AssertionError):
raise ValueError('ValueError: list.remove(x): x not in list')
else:
del self._main[key]
def extend(self, other):
# FIXME: is only a true extend if none of the keys already present
for item in other:
key, value = item
self._main[key] = value
def __iadd__(self, other):
self.extend(other)
## following methods not implemented for items ##
def __imul__(self, n): raise TypeError('Can\'t multiply items in place')
class Values(object):
"""
Custom object for accessing the values of an OrderedDict.
Can be called like the normal ``OrderedDict.values`` method, but also
supports indexing and sequence methods.
"""
def __init__(self, main):
self._main = main
def __call__(self):
"""Pretend to be the values method."""
return self._main._values()
def __getitem__(self, index):
"""Fetch the value at position i."""
if isinstance(index, types.SliceType):
return [self._main[key] for key in self._main._sequence[index]]
else:
return self._main[self._main._sequence[index]]
def __setitem__(self, index, value):
"""
Set the value at position i to value.
You can only do slice assignment to values if you supply a sequence of
equal length to the slice you are replacing.
"""
if isinstance(index, types.SliceType):
keys = self._main._sequence[index]
if len(keys) != len(value):
raise ValueError('attempt to assign sequence of size %s '
'to slice of size %s' % (len(name), len(keys)))
# FIXME: efficiency? Would be better to calculate the indexes
# directly from the slice object
# NOTE: the new keys can collide with existing keys (or even
# contain duplicates) - these will overwrite
for key, val in zip(keys, value):
self._main[key] = val
else:
self._main[self._main._sequence[index]] = value
### following methods pinched from UserList and adapted ###
def __repr__(self): return repr(self._main.values())
# FIXME: do we need to check if we are comparing with another ``Values``
# object? (like the __cast method of UserList)
def __lt__(self, other): return self._main.values() < other
def __le__(self, other): return self._main.values() <= other
def __eq__(self, other): return self._main.values() == other
def __ne__(self, other): return self._main.values() != other
def __gt__(self, other): return self._main.values() > other
def __ge__(self, other): return self._main.values() >= other
def __cmp__(self, other): return cmp(self._main.values(), other)
def __contains__(self, item): return item in self._main.values()
def __len__(self): return len(self._main._sequence) # easier :-)
def __iter__(self): return self._main.itervalues()
def count(self, item): return self._main.values().count(item)
def index(self, item, *args): return self._main.values().index(item, *args)
def reverse(self):
"""Reverse the values"""
vals = self._main.values()
vals.reverse()
# FIXME: efficiency
self[:] = vals
def sort(self, *args, **kwds):
"""Sort the values."""
vals = self._main.values()
vals.sort(*args, **kwds)
self[:] = vals
def __mul__(self, n): return self._main.values()*n
__rmul__ = __mul__
def __add__(self, other): return self._main.values() + other
def __radd__(self, other): return other + self._main.values()
## following methods not implemented for values ##
def __delitem__(self, i): raise TypeError('Can\'t delete items from values')
def __iadd__(self, other): raise TypeError('Can\'t add in place to values')
def __imul__(self, n): raise TypeError('Can\'t multiply values in place')
def append(self, item): raise TypeError('Can\'t append items to values')
def insert(self, i, item): raise TypeError('Can\'t insert items into values')
def pop(self, i=-1): raise TypeError('Can\'t pop items from values')
def remove(self, item): raise TypeError('Can\'t remove items from values')
def extend(self, other): raise TypeError('Can\'t extend values')
class SequenceOrderedDict(OrderedDict):
"""
Experimental version of OrderedDict that has a custom object for ``keys``,
``values``, and ``items``.
These are callable sequence objects that work as methods, or can be
manipulated directly as sequences.
Test for ``keys``, ``items`` and ``values``.
>>> d = SequenceOrderedDict(((1, 2), (2, 3), (3, 4)))
>>> d
SequenceOrderedDict([(1, 2), (2, 3), (3, 4)])
>>> d.keys
[1, 2, 3]
>>> d.keys()
[1, 2, 3]
>>> d.setkeys((3, 2, 1))
>>> d
SequenceOrderedDict([(3, 4), (2, 3), (1, 2)])
>>> d.setkeys((1, 2, 3))
>>> d.keys[0]
1
>>> d.keys[:]
[1, 2, 3]
>>> d.keys[-1]
3
>>> d.keys[-2]
2
>>> d.keys[0:2] = [2, 1]
>>> d
SequenceOrderedDict([(2, 3), (1, 2), (3, 4)])
>>> d.keys.reverse()
>>> d.keys
[3, 1, 2]
>>> d.keys = [1, 2, 3]
>>> d
SequenceOrderedDict([(1, 2), (2, 3), (3, 4)])
>>> d.keys = [3, 1, 2]
>>> d
SequenceOrderedDict([(3, 4), (1, 2), (2, 3)])
>>> a = SequenceOrderedDict()
>>> b = SequenceOrderedDict()
>>> a.keys == b.keys
1
>>> a['a'] = 3
>>> a.keys == b.keys
0
>>> b['a'] = 3
>>> a.keys == b.keys
1
>>> b['b'] = 3
>>> a.keys == b.keys
0
>>> a.keys > b.keys
0
>>> a.keys < b.keys
1
>>> 'a' in a.keys
1
>>> len(b.keys)
2
>>> 'c' in d.keys
0
>>> 1 in d.keys
1
>>> [v for v in d.keys]
[3, 1, 2]
>>> d.keys.sort()
>>> d.keys
[1, 2, 3]
>>> d = SequenceOrderedDict(((1, 2), (2, 3), (3, 4)), strict=True)
>>> d.keys[::-1] = [1, 2, 3]
>>> d
SequenceOrderedDict([(3, 4), (2, 3), (1, 2)])
>>> d.keys[:2]
[3, 2]
>>> d.keys[:2] = [1, 3]
Traceback (most recent call last):
KeyError: 'Keylist is not the same as current keylist.'
>>> d = SequenceOrderedDict(((1, 2), (2, 3), (3, 4)))
>>> d
SequenceOrderedDict([(1, 2), (2, 3), (3, 4)])
>>> d.values
[2, 3, 4]
>>> d.values()
[2, 3, 4]
>>> d.setvalues((4, 3, 2))
>>> d
SequenceOrderedDict([(1, 4), (2, 3), (3, 2)])
>>> d.values[::-1]
[2, 3, 4]
>>> d.values[0]
4
>>> d.values[-2]
3
>>> del d.values[0]
Traceback (most recent call last):
TypeError: Can't delete items from values
>>> d.values[::2] = [2, 4]
>>> d
SequenceOrderedDict([(1, 2), (2, 3), (3, 4)])
>>> 7 in d.values
0
>>> len(d.values)
3
>>> [val for val in d.values]
[2, 3, 4]
>>> d.values[-1] = 2
>>> d.values.count(2)
2
>>> d.values.index(2)
0
>>> d.values[-1] = 7
>>> d.values
[2, 3, 7]
>>> d.values.reverse()
>>> d.values
[7, 3, 2]
>>> d.values.sort()
>>> d.values
[2, 3, 7]
>>> d.values.append('anything')
Traceback (most recent call last):
TypeError: Can't append items to values
>>> d.values = (1, 2, 3)
>>> d
SequenceOrderedDict([(1, 1), (2, 2), (3, 3)])
>>> d = SequenceOrderedDict(((1, 2), (2, 3), (3, 4)))
>>> d
SequenceOrderedDict([(1, 2), (2, 3), (3, 4)])
>>> d.items()
[(1, 2), (2, 3), (3, 4)]
>>> d.setitems([(3, 4), (2 ,3), (1, 2)])
>>> d
SequenceOrderedDict([(3, 4), (2, 3), (1, 2)])
>>> d.items[0]
(3, 4)
>>> d.items[:-1]
[(3, 4), (2, 3)]
>>> d.items[1] = (6, 3)
>>> d.items
[(3, 4), (6, 3), (1, 2)]
>>> d.items[1:2] = [(9, 9)]
>>> d
SequenceOrderedDict([(3, 4), (9, 9), (1, 2)])
>>> del d.items[1:2]
>>> d
SequenceOrderedDict([(3, 4), (1, 2)])
>>> (3, 4) in d.items
1
>>> (4, 3) in d.items
0
>>> len(d.items)
2
>>> [v for v in d.items]
[(3, 4), (1, 2)]
>>> d.items.count((3, 4))
1
>>> d.items.index((1, 2))
1
>>> d.items.index((2, 1))
Traceback (most recent call last):
ValueError: list.index(x): x not in list
>>> d.items.reverse()
>>> d.items
[(1, 2), (3, 4)]
>>> d.items.reverse()
>>> d.items.sort()
>>> d.items
[(1, 2), (3, 4)]
>>> d.items.append((5, 6))
>>> d.items
[(1, 2), (3, 4), (5, 6)]
>>> d.items.insert(0, (0, 0))
>>> d.items
[(0, 0), (1, 2), (3, 4), (5, 6)]
>>> d.items.insert(-1, (7, 8))
>>> d.items
[(0, 0), (1, 2), (3, 4), (7, 8), (5, 6)]
>>> d.items.pop()
(5, 6)
>>> d.items
[(0, 0), (1, 2), (3, 4), (7, 8)]
>>> d.items.remove((1, 2))
>>> d.items
[(0, 0), (3, 4), (7, 8)]
>>> d.items.extend([(1, 2), (5, 6)])
>>> d.items
[(0, 0), (3, 4), (7, 8), (1, 2), (5, 6)]
"""
def __init__(self, init_val=(), strict=True):
OrderedDict.__init__(self, init_val, strict=strict)
self._keys = self.keys
self._values = self.values
self._items = self.items
self.keys = Keys(self)
self.values = Values(self)
self.items = Items(self)
self._att_dict = {
'keys': self.setkeys,
'items': self.setitems,
'values': self.setvalues,
}
def __setattr__(self, name, value):
"""Protect keys, items, and values."""
if not '_att_dict' in self.__dict__:
object.__setattr__(self, name, value)
else:
try:
fun = self._att_dict[name]
except KeyError:
OrderedDict.__setattr__(self, name, value)
else:
fun(value)
if __name__ == '__main__':
if INTP_VER < (2, 3):
raise RuntimeError("Tests require Python v.2.3 or later")
# turn off warnings for tests
warnings.filterwarnings('ignore')
# run the code tests in doctest format
import doctest
m = sys.modules.get('__main__')
globs = m.__dict__.copy()
globs.update({
'INTP_VER': INTP_VER,
})
doctest.testmod(m, globs=globs)
|
4f79a0e3b19f47cc21558d07ec95539ce7030e31
|
d6971b685e1a4e819eb820ec51d03b077a80c177
|
/protect_archiver/downloader/download_file.py
|
01197c8ec63332de8b07615cdc757db9d21bbb65
|
[
"MIT"
] |
permissive
|
danielfernau/unifi-protect-video-downloader
|
620063329198f0ac3990bf55aaabfedd64fdd3e2
|
ee683c2d8bbcc80ef8e6a02628b5fed85cba74af
|
refs/heads/master
| 2023-08-31T13:50:55.714195
| 2023-08-27T16:25:16
| 2023-08-27T16:25:16
| 214,804,592
| 188
| 22
|
MIT
| 2023-09-12T14:27:38
| 2019-10-13T11:00:51
|
Python
|
UTF-8
|
Python
| false
| false
| 6,701
|
py
|
download_file.py
|
# file downloader
import json
import logging
import os
import time
from typing import Any
import requests
from protect_archiver.errors import Errors
from protect_archiver.utils import format_bytes
def download_file(client: Any, query: str, filename: str) -> None:
exit_code = 1
retry_delay = max(client.download_wait, 3)
uri = f"{client.session.authority}{client.session.base_path}{query}"
# skip downloading files that already exist on disk if argument --skip-existing-files is present
# TODO(dcramer): sanity check on filesize would be valuable here
if bool(client.skip_existing_files) and os.path.exists(filename):
logging.info(
f"File {filename} already exists on disk and argument '--skip-existing-files' "
"is present - skipping download \n"
)
client.files_skipped += 1
return # skip the download
for retry_num in range(client.max_retries):
# make the GET request to retrieve the video file or snapshot
try:
start = time.monotonic()
response = (
requests.get(
uri,
cookies={"TOKEN": client.session.get_api_token()},
verify=client.verify_ssl,
timeout=client.download_timeout,
stream=True,
)
if client.session.__class__.__name__ == "UniFiOSClient"
else requests.get(
uri,
headers={"Authorization": f"Bearer {client.session.get_api_token()}"},
verify=client.verify_ssl,
timeout=client.download_timeout,
stream=True,
)
)
if response.status_code == 401:
# invalid current api token - we special case this
# as we dont want to retry on consecutive auth failures
# TODO: refactor this
start = time.monotonic()
response = (
requests.get(
uri,
cookies={"TOKEN": client.session.get_api_token(force=True)},
verify=client.verify_ssl,
timeout=client.download_timeout,
stream=True,
)
if client.session.__class__.__name__ == "UniFiOSClient"
else requests.get(
uri,
headers={
"Authorization": f"Bearer {client.session.get_api_token(force=True)}"
},
verify=client.verify_ssl,
timeout=client.download_timeout,
stream=True,
)
)
# write file to disk if response.status_code is 200,
# otherwise log error and then either exit or skip the download
if response.status_code != 200:
try:
data = json.loads(response.content)
except Exception:
data = None
error_message = data.get("error") or data or "(no information available)"
# TODO
logging.exception(
f"Download failed with status {response.status_code} {response.reason}:\n"
f"{error_message}"
)
client.files_failed += 1
# if response.status_code == 401:
# cls = Errors.AuthorizationFailed
# else:
# cls = Errors.DownloadFailed
# raise cls(
# f"Download failed with status {response.status_code} {response.reason}:\n{error_message}"
# )
else:
total_bytes = int(response.headers.get("content-length") or 0)
cur_bytes = 0
if not total_bytes:
with open(filename, "wb") as fp:
content = response.content
cur_bytes = len(content)
total_bytes = cur_bytes
fp.write(content)
else:
# skip download if remote file is smaller than 300b
if total_bytes < 300:
logging.warning(
"File is smaller than 300 bytes (empty video clip) - skipping download"
)
client.files_skipped += 1
return
with open(filename, "wb") as fp:
for chunk in response.iter_content(None):
cur_bytes += len(chunk)
fp.write(chunk)
# TODO
# done = int(50 * cur_bytes / total_bytes)
# sys.stdout.write("\r[%s%s] %sps" % ('=' * done, ' ' * (50-done),
# format_bytes(cur_bytes//(time.monotonic() - start))))
# print('')
elapsed = time.monotonic() - start
logging.info(
f"Download successful after {int(elapsed)}s ({format_bytes(cur_bytes)}, "
f"{format_bytes(int(cur_bytes // elapsed))}ps)"
)
client.files_downloaded += 1
client.bytes_downloaded += cur_bytes
except requests.exceptions.RequestException as request_exception:
# clean up
if os.path.exists(filename):
os.remove(filename)
logging.exception(f"Download failed: {request_exception}")
exit_code = 5
except Errors.DownloadFailed:
# clean up
if os.path.exists(filename):
os.remove(filename)
logging.exception(
f"Download failed with status {response.status_code} {response.reason}"
)
exit_code = 4
else:
return
logging.warning(f"Retrying in {retry_delay} second(s)...")
time.sleep(retry_delay)
if not client.ignore_failed_downloads:
logging.info(
"To skip failed downloads and continue with next file, add argument"
" '--ignore-failed-downloads'"
)
client.print_download_stats()
raise Errors.ProtectError(exit_code)
else:
logging.info(
"Argument '--ignore-failed-downloads' is present, continue downloading files..."
)
client.files_skipped += 1
|
fbed69811a67f0f9fcf5b82324910155eaac91b5
|
ba5eabcf0e3880a4cc86e9222fcb2ecd5f53b103
|
/experimental/tools/get_examples.py
|
a2a17e8912cab8758bab37ce0ca2d8dfb01467d3
|
[
"BSD-3-Clause"
] |
permissive
|
aseprite/skia
|
d2b63003610c796594e81deea093eb6b13704838
|
478f512f7a84658167d9f83f35d42fb0903b4a37
|
refs/heads/aseprite-m102
| 2023-08-24T00:47:30.288547
| 2023-02-28T20:21:26
| 2023-03-03T18:12:59
| 45,053,736
| 139
| 51
|
BSD-3-Clause
| 2023-03-03T18:14:21
| 2015-10-27T16:20:42
|
C++
|
UTF-8
|
Python
| false
| false
| 3,718
|
py
|
get_examples.py
|
#! /usr/bin/env python
# Copyright 2020 Google LLC.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''
get_examples.py: Populate docs/examples/ from the list of named fiddles.
'''
import os
import re
import sys
if sys.version_info[0] < 3:
from urllib2 import urlopen
from HTMLParser import HTMLParser
def unescape(v): return HTMLParser().unescape(v)
else:
from urllib.request import urlopen
from html.parser import HTMLParser
from html import unescape
def cxx_bool(v): return 'true' if v else 'false'
assert os.pardir == '..' and '/' in [os.sep, os.altsep]
def parse_fiddle_sk(x):
class FiddleSk(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
self.attrs = {}
def handle_starttag(self, tag, attrs):
if tag == 'fiddle-sk':
self.attrs = dict(attrs)
fiddle = FiddleSk()
fiddle.feed(x)
return fiddle.attrs
def process_fiddle(name):
if name == 'MAD_Magazine_Oct_1985':
return
filename = 'docs/examples/%s.cpp' % name
if os.path.exists(filename):
return
url = 'https://fiddle.skia.org/c/@' + name
content = urlopen(url).read()
regex = (r'(<fiddle-sk\s[^>]*>)\s*<textarea-numbers-sk>\s*'
r'<textarea [^>]*>(.*)</textarea>')
match = re.search(regex, content.decode('utf-8'), flags=re.S)
if not match:
sys.stderr.write('error: %s\n' % url)
keys = parse_fiddle_sk(match.group(1))
code = unescape(match.group(2))
width = keys.get('width', '256')
height = keys.get('height', '256')
source_image = keys.get('source', 256)
duration = keys.get('duration', '0')
textonly = 'textonly' in keys
srgb = not textonly and 'srgb' in keys
f16 = srgb and 'f16' in keys
offscreen = 'offscreen' in keys
sys.stdout.write('Writing to: %s\n' % filename)
sys.stdout.flush()
with open(filename, 'w') as o:
o.write('// Copyright 2020 Google LLC.\n'
'// Use of this source code is governed by a BSD-style'
' license that can be found in the LICENSE file.\n'
'#include "tools/fiddle/examples.h"\n')
if offscreen:
o.write('REGISTER_FIDDLE(')
o.write(', '.join([name,
width,
height,
cxx_bool(textonly),
source_image,
duration,
cxx_bool(srgb),
cxx_bool(f16),
cxx_bool(offscreen),
keys.get('offscreen_width', '64'),
keys.get('offscreen_height', '64'),
keys.get('offscreen_sample_count', '0'),
keys.get('offscreen_texturable', 'false'),
keys.get('offscreen_mipmap', 'false')]))
elif srgb:
o.write('REG_FIDDLE_SRGB(')
o.write(', '.join([name, width, height, cxx_bool(textonly),
source_image, duration, cxx_bool(f16)]))
elif duration:
o.write('REG_FIDDLE_ANIMATED(')
o.write(', '.join([name, width, height, cxx_bool(textonly),
source_image, duration]))
else:
o.write('REG_FIDDLE(')
o.write(', '.join([name, width, height, cxx_bool(textonly),
source_image]))
o.write(') {\n')
o.write(code)
o.write('\n} // END FIDDLE\n')
def main():
os.chdir(os.path.dirname(__file__) + '/../..')
for line in urlopen('https://fiddle.skia.org/named/'):
line_match = re.search(r'/c/@([A-Za-z0-9_-]*)', line.decode('utf-8'))
if not line_match:
continue
name = line_match.group(1)
process_fiddle(name)
if __name__ == '__main__':
main()
|
4488086405f2e64d628a5da0c05877ecff78d072
|
620323fc090cebaf7aca456ff3f7fbbe1e210394
|
/PySvn_examples/common.py
|
dc845bc8ed7b03c25640e8c4501b271185b39dc6
|
[
"CC-BY-4.0"
] |
permissive
|
gil9red/SimplePyScripts
|
bd2733372728bf9b9f00570e90316fa12116516b
|
773c2c9724edd8827a1dbd91694d780e03fcb05a
|
refs/heads/master
| 2023-08-31T04:26:09.120173
| 2023-08-30T17:22:59
| 2023-08-30T17:22:59
| 22,650,442
| 157
| 46
| null | 2023-09-08T17:51:33
| 2014-08-05T16:19:52
|
Python
|
UTF-8
|
Python
| false
| false
| 827
|
py
|
common.py
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "ipetrash"
# SOURCE: https://github.com/dsoprea/PySvn
import os
from collections import defaultdict
import svn.local
import svn.remote
def get_log_list(url__or__file_name: str, revision_from=None, limit=None) -> list:
if os.path.exists(url__or__file_name):
repo = svn.local.LocalClient(url__or__file_name)
else:
repo = svn.remote.RemoteClient(url__or__file_name)
return list(repo.log_default(revision_from=revision_from, limit=limit))
def get_log_list_by_author(url__or__file_name: str, log_list: list = None) -> dict:
if not log_list:
log_list = get_log_list(url__or__file_name)
author_by_log = defaultdict(list)
for log in log_list:
author_by_log[log.author].append(log)
return author_by_log
|
5cb7c75979f332b14e97075f1ed68fce2f6145a4
|
55bfe899250607e99aa6ed20c5d688200ce4225f
|
/mini_ros/src/servo_calibration
|
24e8b4506b361900bee8d90aca1f789fa698c698
|
[
"MIT"
] |
permissive
|
OpenQuadruped/spot_mini_mini
|
96aef59505721779aa543aab347384d7768a1f3e
|
c7e4905be176c63fa0e68a09c177b937e916fa60
|
refs/heads/spot
| 2022-10-21T04:14:29.882620
| 2022-10-05T21:33:53
| 2022-10-05T21:33:53
| 251,706,548
| 435
| 125
|
MIT
| 2022-09-02T07:06:56
| 2020-03-31T19:13:59
|
C++
|
UTF-8
|
Python
| false
| false
| 1,556
|
servo_calibration
|
#!/usr/bin/env python
"""
DESCRIPTION:
SUBSCRIBERS:
"""
from __future__ import division
import rospy
from mini_ros.srv import CalibServo, CalibServoResponse
from mini_ros.msg import JointPulse
import numpy as np
import sys
import rospkg
rospack = rospkg.RosPack()
sys.path.append(rospack.get_path('mini_ros') + '/../')
sys.path.append('../../')
class ServoCalibrator():
def __init__(self):
rospy.init_node('ServoCalibrator', anonymous=True)
self.serv = rospy.Service('servo_calibrator', CalibServo,
self.calib_service_cb)
self.jp_pub = rospy.Publisher('spot/pulse', JointPulse, queue_size=1)
def calib_service_cb(self, req):
""" Requests a servo to be moved to a certain position
Args: req
Returns: response
"""
try:
jp_msg = JointPulse()
jp_msg.servo_num = req.servo_num
jp_msg.servo_pulse = req.servo_pulse
self.jp_pub.publish(jp_msg)
response = "Servo Command Sent."
except rospy.ROSInterruptException:
response = "FAILED to send Servo Command"
return CalibServoResponse(response)
def main():
""" The main() function. """
srv_calib = ServoCalibrator()
rospy.loginfo(
"Use The servo_calibrator service (Pulse Width Unit is us (nominal ~500-2500))."
)
while not rospy.is_shutdown():
rospy.spin()
if __name__ == '__main__':
try:
main()
except rospy.ROSInterruptException:
pass
|
|
b0e0c1c47d94bbe6b31e44d9b0065e3a76c9f377
|
c6fde526e288e404495abf992fb71634ab857270
|
/mat2py.py
|
d3584e4d0441685cd752934dbc1d93844440a91f
|
[
"LicenseRef-scancode-proprietary-license",
"MIT"
] |
permissive
|
Tandon-A/emotic
|
75b4d47924bed24d899820356b17b20775982dc4
|
862a1cad48256efeb32fb6ec66046d9a9bd51758
|
refs/heads/master
| 2022-07-21T08:18:55.674878
| 2022-07-12T17:21:24
| 2022-07-12T17:21:24
| 252,577,010
| 113
| 53
|
MIT
| 2023-03-26T02:25:21
| 2020-04-02T22:20:12
|
Python
|
UTF-8
|
Python
| false
| false
| 11,412
|
py
|
mat2py.py
|
import argparse
import csv
import cv2
import numpy as np
import os
from scipy.io import loadmat
class emotic_train:
def __init__(self, filename, folder, image_size, person):
self.filename = filename
self.folder = folder
self.im_size = []
self.bbox = []
self.cat = []
self.cont = []
self.gender = person[3][0]
self.age = person[4][0]
self.cat_annotators = 0
self.cont_annotators = 0
self.set_imsize(image_size)
self.set_bbox(person[0])
self.set_cat(person[1])
self.set_cont(person[2])
self.check_cont()
def set_imsize(self, image_size):
image_size = np.array(image_size).flatten().tolist()[0]
row = np.array(image_size[0]).flatten().tolist()[0]
col = np.array(image_size[1]).flatten().tolist()[0]
self.im_size.append(row)
self.im_size.append(col)
def validate_bbox(self, bbox):
x1, y1, x2, y2 = bbox
x1 = min(self.im_size[0], max(0, x1))
x2 = min(self.im_size[0], max(0, x2))
y1 = min(self.im_size[1], max(0, y1))
y2 = min(self.im_size[1], max(0, y2))
return [int(x1), int(y1), int(x2), int(y2)]
def set_bbox(self, person_bbox):
self.bbox = self.validate_bbox(np.array(person_bbox).flatten().tolist())
def set_cat(self, person_cat):
cat = np.array(person_cat).flatten().tolist()
cat = np.array(cat[0]).flatten().tolist()
self.cat = [np.array(c).flatten().tolist()[0] for c in cat]
self.cat_annotators = 1
def set_cont(self, person_cont):
cont = np.array(person_cont).flatten().tolist()[0]
self.cont = [np.array(c).flatten().tolist()[0] for c in cont]
self.cont_annotators = 1
def check_cont(self):
for c in self.cont:
if np.isnan(c):
self.cont_annotators = 0
break
class emotic_test:
def __init__(self, filename, folder, image_size, person):
self.filename = filename
self.folder = folder
self.im_size = []
self.bbox = []
self.cat = []
self.cat_annotators = 0
self.comb_cat = []
self.cont_annotators = 0
self.cont = []
self.comb_cont = []
self.gender = person[5][0]
self.age = person[6][0]
self.set_imsize(image_size)
self.set_bbox(person[0])
self.set_cat(person[1])
self.set_comb_cat(person[2])
self.set_cont(person[3])
self.set_comb_cont(person[4])
self.check_cont()
def set_imsize(self, image_size):
image_size = np.array(image_size).flatten().tolist()[0]
row = np.array(image_size[0]).flatten().tolist()[0]
col = np.array(image_size[1]).flatten().tolist()[0]
self.im_size.append(row)
self.im_size.append(col)
def validate_bbox(self, bbox):
x1, y1, x2, y2 = bbox
x1 = min(self.im_size[0], max(0, x1))
x2 = min(self.im_size[0], max(0, x2))
y1 = min(self.im_size[1], max(0, y1))
y2 = min(self.im_size[1], max(0, y2))
return [int(x1), int(y1), int(x2), int(y2)]
def set_bbox(self, person_bbox):
self.bbox = self.validate_bbox(np.array(person_bbox).flatten().tolist())
def set_cat(self, person_cat):
self.cat_annotators = len(person_cat[0])
for ann in range(self.cat_annotators):
ann_cat = person_cat[0][ann]
ann_cat = np.array(ann_cat).flatten().tolist()
ann_cat = np.array(ann_cat[0]).flatten().tolist()
ann_cat = [np.array(c).flatten().tolist()[0] for c in ann_cat]
self.cat.append(ann_cat)
def set_comb_cat(self, person_comb_cat):
if self.cat_annotators != 0:
self.comb_cat = [np.array(c).flatten().tolist()[0] for c in person_comb_cat[0]]
else:
self.comb_cat = []
def set_comb_cont(self, person_comb_cont):
if self.cont_annotators != 0:
comb_cont = [np.array(c).flatten().tolist()[0] for c in person_comb_cont[0]]
self.comb_cont = [np.array(c).flatten().tolist()[0] for c in comb_cont[0]]
else:
self.comb_cont = []
def set_cont(self, person_cont):
self.cont_annotators = len(person_cont[0])
for ann in range(self.cont_annotators):
ann_cont = person_cont[0][ann]
ann_cont = np.array(ann_cont).flatten().tolist()
ann_cont = np.array(ann_cont[0]).flatten().tolist()
ann_cont = [np.array(c).flatten().tolist()[0] for c in ann_cont]
self.cont.append(ann_cont)
def check_cont(self):
for c in self.comb_cont:
if np.isnan(c):
self.cont_annotators = 0
break
def cat_to_one_hot(y_cat):
'''
One hot encode a categorical label.
:param y_cat: Categorical label.
:return: One hot encoded categorical label.
'''
one_hot_cat = np.zeros(26)
for em in y_cat:
one_hot_cat[cat2ind[em]] = 1
return one_hot_cat
def prepare_data(data_mat, data_path_src, save_dir, dataset_type='train', generate_npy=False, debug_mode=False):
'''
Prepare csv files and save preprocessed data in npy files.
:param data_mat: Mat data object for a label.
:param data_path_src: Path of the parent directory containing the emotic images folders (mscoco, framesdb, emodb_small, ade20k)
:param save_dir: Path of the directory to save the csv files and the npy files (if generate_npy files is True)
:param dataset_type: Type of the dataset (train, val or test). Variable used in the name of csv files and npy files.
:param generate_npy: If True the data is preprocessed and saved in npy files. Npy files are later used for training.
'''
data_set = list()
if generate_npy:
context_arr = list()
body_arr = list()
cat_arr = list()
cont_arr = list()
to_break = 0
path_not_exist = 0
cat_cont_zero = 0
idx = 0
for ex_idx, ex in enumerate(data_mat[0]):
nop = len(ex[4][0])
for person in range(nop):
if dataset_type == 'train':
et = emotic_train(ex[0][0],ex[1][0],ex[2],ex[4][0][person])
else:
et = emotic_test(ex[0][0],ex[1][0],ex[2],ex[4][0][person])
try:
image_path = os.path.join(data_path_src,et.folder,et.filename)
if not os.path.exists(image_path):
path_not_exist += 1
print ('path not existing', ex_idx, image_path)
continue
else:
context = cv2.cvtColor(cv2.imread(image_path),cv2.COLOR_BGR2RGB)
body = context[et.bbox[1]:et.bbox[3],et.bbox[0]:et.bbox[2]].copy()
context_cv = cv2.resize(context, (224,224))
body_cv = cv2.resize(body, (128,128))
except Exception as e:
to_break += 1
if debug_mode == True:
print ('breaking at idx=%d, %d due to exception=%r' %(ex_idx, idx, e))
continue
if (et.cat_annotators == 0 or et.cont_annotators == 0):
cat_cont_zero += 1
continue
data_set.append(et)
if generate_npy == True:
context_arr.append(context_cv)
body_arr.append(body_cv)
if dataset_type == 'train':
cat_arr.append(cat_to_one_hot(et.cat))
cont_arr.append(np.array(et.cont))
else:
cat_arr.append(cat_to_one_hot(et.comb_cat))
cont_arr.append(np.array(et.comb_cont))
if idx % 1000 == 0 and debug_mode==False:
print (" Preprocessing data. Index = ", idx)
elif idx % 20 == 0 and debug_mode==True:
print (" Preprocessing data. Index = ", idx)
idx = idx + 1
# for debugging purposes
if debug_mode == True and idx >= 104:
print (' ######## Breaking data prep step', idx, ex_idx, ' ######')
print (to_break, path_not_exist, cat_cont_zero)
cv2.imwrite(os.path.join(save_dir, 'context1.png'), context_arr[-1])
cv2.imwrite(os.path.join(save_dir, 'body1.png'), body_arr[-1])
break
print (to_break, path_not_exist, cat_cont_zero)
csv_path = os.path.join(save_dir, "%s.csv" %(dataset_type))
with open(csv_path, 'w') as csvfile:
filewriter = csv.writer(csvfile, delimiter=',', dialect='excel')
row = ['Index', 'Folder', 'Filename', 'Image Size', 'BBox', 'Categorical_Labels', 'Continuous_Labels', 'Gender', 'Age']
filewriter.writerow(row)
for idx, ex in enumerate(data_set):
if dataset_type == 'train':
row = [idx, ex.folder, ex.filename, ex.im_size, ex.bbox, ex.cat, ex.cont, ex.gender, ex.age]
else:
row = [idx, ex.folder, ex.filename, ex.im_size, ex.bbox, ex.comb_cat, ex.comb_cont, ex.gender, ex.age]
filewriter.writerow(row)
print ('wrote file ', csv_path)
if generate_npy == True:
context_arr = np.array(context_arr)
body_arr = np.array(body_arr)
cat_arr = np.array(cat_arr)
cont_arr = np.array(cont_arr)
print (len(data_set), context_arr.shape, body_arr.shape)
np.save(os.path.join(save_dir,'%s_context_arr.npy' %(dataset_type)), context_arr)
np.save(os.path.join(save_dir,'%s_body_arr.npy' %(dataset_type)), body_arr)
np.save(os.path.join(save_dir,'%s_cat_arr.npy' %(dataset_type)), cat_arr)
np.save(os.path.join(save_dir,'%s_cont_arr.npy' %(dataset_type)), cont_arr)
print (context_arr.shape, body_arr.shape, cat_arr.shape, cont_arr.shape)
print ('completed generating %s data files' %(dataset_type))
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('--data_dir', type=str, required=True, help='Path to Emotic data and annotations')
parser.add_argument('--save_dir_name', type=str, default='emotic_pre', help='Directory name in which preprocessed data will be stored')
parser.add_argument('--label', type=str, default='all', choices=['train', 'val', 'test', 'all'])
parser.add_argument('--generate_npy', action='store_true', help='Generate npy files')
parser.add_argument('--debug_mode', action='store_true', help='Debug mode. Will only save a small subset of the data')
# Generate args
args = parser.parse_args()
return args
if __name__ == '__main__':
args = parse_args()
ann_path_src = os.path.join(args.data_dir, 'Annotations','Annotations.mat')
data_path_src = os.path.join(args.data_dir, 'emotic')
save_path = os.path.join(args.data_dir, args.save_dir_name)
if not os.path.exists(save_path):
os.makedirs(save_path)
cat = ['Affection', 'Anger', 'Annoyance', 'Anticipation', 'Aversion', 'Confidence', 'Disapproval', 'Disconnection',
'Disquietment', 'Doubt/Confusion', 'Embarrassment', 'Engagement', 'Esteem', 'Excitement', 'Fatigue', 'Fear',
'Happiness', 'Pain', 'Peace', 'Pleasure', 'Sadness', 'Sensitivity', 'Suffering', 'Surprise', 'Sympathy', 'Yearning']
cat2ind = {}
ind2cat = {}
for idx, emotion in enumerate(cat):
cat2ind[emotion] = idx
ind2cat[idx] = emotion
print ('loading Annotations')
mat = loadmat(ann_path_src)
if args.label.lower() == 'all':
labels = ['train', 'val', 'test']
else:
labels = [args.label.lower()]
for label in labels:
data_mat = mat[label]
print ('starting label ', label)
prepare_data(data_mat, data_path_src, save_path, dataset_type=label, generate_npy=args.generate_npy, debug_mode=args.debug_mode)
|
0a3503dc54eac3feafc59f3fd70e8a267672aa3f
|
9af35e5c4f685a7acdc47917b3c528f4cc019b9d
|
/tests/updaters/test_updaters.py
|
20e2136ac1f64150372f909c63b12eca48f38d7a
|
[
"BSD-3-Clause"
] |
permissive
|
mggg/GerryChain
|
7855acd762613fc2c0386760fa90f461ba65f566
|
04ff4f9e8454f5a2216ac6a1c7309dae481ac067
|
refs/heads/main
| 2023-07-22T11:40:33.832836
| 2023-04-29T02:18:00
| 2023-04-29T02:18:00
| 136,683,696
| 115
| 56
|
NOASSERTION
| 2023-07-06T23:12:31
| 2018-06-09T02:22:44
|
Python
|
UTF-8
|
Python
| false
| false
| 9,282
|
py
|
test_updaters.py
|
import math
import networkx
import pytest
from gerrychain import MarkovChain
from gerrychain.constraints import Validator, no_vanishing_districts
from gerrychain.graph import Graph
from gerrychain.partition import Partition
from gerrychain.proposals import propose_random_flip
from gerrychain.random import random
from gerrychain.updaters import (Election, Tally, boundary_nodes, cut_edges,
cut_edges_by_part, exterior_boundaries,
exterior_boundaries_as_a_set,
interior_boundaries, perimeter)
from gerrychain.updaters.election import ElectionResults
@pytest.fixture
def graph_with_d_and_r_cols(graph_with_random_data_factory):
return graph_with_random_data_factory(["D", "R"])
def random_assignment(graph, num_districts):
assignment = {node: random.choice(range(num_districts)) for node in graph.nodes}
# Make sure that there are cut edges:
while len(set(assignment.values())) == 1:
assignment = {node: random.choice(range(num_districts)) for node in graph.nodes}
return assignment
@pytest.fixture
def partition_with_election(graph_with_d_and_r_cols):
graph = graph_with_d_and_r_cols
assignment = random_assignment(graph, 3)
parties_to_columns = {
"D": {node: graph.nodes[node]["D"] for node in graph.nodes},
"R": {node: graph.nodes[node]["R"] for node in graph.nodes},
}
election = Election("Mock Election", parties_to_columns)
updaters = {"Mock Election": election, "cut_edges": cut_edges}
return Partition(graph, assignment, updaters)
@pytest.fixture
def chain_with_election(partition_with_election):
return MarkovChain(
propose_random_flip,
Validator([no_vanishing_districts]),
lambda x: True,
partition_with_election,
total_steps=10,
)
def test_Partition_can_update_stats():
graph = networkx.complete_graph(3)
assignment = {0: 1, 1: 1, 2: 2}
graph.nodes[0]["stat"] = 1
graph.nodes[1]["stat"] = 2
graph.nodes[2]["stat"] = 3
updaters = {"total_stat": Tally("stat", alias="total_stat")}
partition = Partition(Graph.from_networkx(graph), assignment, updaters)
assert partition["total_stat"][2] == 3
flip = {1: 2}
new_partition = partition.flip(flip)
assert new_partition["total_stat"][2] == 5
def test_tally_multiple_columns(graph_with_d_and_r_cols):
graph = graph_with_d_and_r_cols
updaters = {"total": Tally(["D", "R"], alias="total")}
assignment = {i: 1 if i in range(4) else 2 for i in range(9)}
partition = Partition(graph, assignment, updaters)
expected_total_in_district_one = sum(
graph.nodes[i]["D"] + graph.nodes[i]["R"] for i in range(4)
)
assert partition["total"][1] == expected_total_in_district_one
def test_vote_totals_are_nonnegative(partition_with_election):
partition = partition_with_election
assert all(count >= 0 for count in partition["Mock Election"].totals.values())
def test_vote_proportion_updater_returns_percentage_or_nan(partition_with_election):
partition = partition_with_election
election_view = partition["Mock Election"]
# The first update gives a percentage
assert all(
is_percentage_or_nan(value)
for party_percents in election_view.percents_for_party.values()
for value in party_percents.values()
)
def test_vote_proportion_returns_nan_if_total_votes_is_zero(three_by_three_grid):
election = Election("Mock Election", ["D", "R"], alias="election")
graph = three_by_three_grid
for node in graph.nodes:
for col in election.columns:
graph.nodes[node][col] = 0
updaters = {"election": election}
assignment = random_assignment(graph, 3)
partition = Partition(graph, assignment, updaters)
assert all(
math.isnan(value)
for party_percents in partition["election"].percents_for_party.values()
for value in party_percents.values()
)
def is_percentage_or_nan(value):
return (0 <= value and value <= 1) or math.isnan(value)
def test_vote_proportion_updater_returns_percentage_or_nan_on_later_steps(
chain_with_election
):
for partition in chain_with_election:
election_view = partition["Mock Election"]
assert all(
is_percentage_or_nan(value)
for party_percents in election_view.percents_for_party.values()
for value in party_percents.values()
)
def test_vote_proportion_field_has_key_for_each_district(partition_with_election):
partition = partition_with_election
for percents in partition["Mock Election"].percents_for_party.values():
assert set(percents.keys()) == set(partition.parts)
def test_vote_proportions_sum_to_one(partition_with_election):
partition = partition_with_election
election_view = partition["Mock Election"]
for part in partition.parts:
total_percent = sum(
percents[part] for percents in election_view.percents_for_party.values()
)
assert abs(1 - total_percent) < 0.001
def test_election_result_has_a_cute_str_method():
election = Election(
"2008 Presidential", {"Democratic": [3, 1, 2], "Republican": [1, 2, 1]}
)
results = ElectionResults(
election,
{"Democratic": {0: 3, 1: 1, 2: 2}, "Republican": {0: 1, 1: 2, 2: 1}},
[0, 1, 2],
)
expected = (
"Election Results for 2008 Presidential\n"
"0:\n"
" Democratic: 0.75\n"
" Republican: 0.25\n"
"1:\n"
" Democratic: 0.3333\n"
" Republican: 0.6667\n"
"2:\n"
" Democratic: 0.6667\n"
" Republican: 0.3333"
)
assert str(results) == expected
def test_exterior_boundaries_as_a_set(three_by_three_grid):
graph = three_by_three_grid
for i in [0, 1, 2, 3, 5, 6, 7, 8]:
graph.nodes[i]["boundary_node"] = True
graph.nodes[4]["boundary_node"] = False
assignment = {0: 1, 1: 1, 2: 2, 3: 1, 4: 1, 5: 2, 6: 2, 7: 2, 8: 2}
updaters = {
"exterior_boundaries_as_a_set": exterior_boundaries_as_a_set,
"boundary_nodes": boundary_nodes,
}
partition = Partition(graph, assignment, updaters)
result = partition["exterior_boundaries_as_a_set"]
assert result[1] == {0, 1, 3} and result[2] == {2, 5, 6, 7, 8}
# 112 111
# 112 -> 121
# 222 222
flips = {4: 2, 2: 1, 5: 1}
new_partition = Partition(parent=partition, flips=flips)
result = new_partition["exterior_boundaries_as_a_set"]
assert result[1] == {0, 1, 2, 3, 5} and result[2] == {6, 7, 8}
def test_exterior_boundaries(three_by_three_grid):
graph = three_by_three_grid
for i in [0, 1, 2, 3, 5, 6, 7, 8]:
graph.nodes[i]["boundary_node"] = True
graph.nodes[i]["boundary_perim"] = 2
graph.nodes[4]["boundary_node"] = False
assignment = {0: 1, 1: 1, 2: 2, 3: 1, 4: 1, 5: 2, 6: 2, 7: 2, 8: 2}
updaters = {
"exterior_boundaries": exterior_boundaries,
"boundary_nodes": boundary_nodes,
}
partition = Partition(graph, assignment, updaters)
result = partition["exterior_boundaries"]
assert result[1] == 6 and result[2] == 10
# 112 111
# 112 -> 121
# 222 222
flips = {4: 2, 2: 1, 5: 1}
new_partition = Partition(parent=partition, flips=flips)
result = new_partition["exterior_boundaries"]
assert result[1] == 10 and result[2] == 6
def test_perimeter(three_by_three_grid):
graph = three_by_three_grid
for i in [0, 1, 2, 3, 5, 6, 7, 8]:
graph.nodes[i]["boundary_node"] = True
graph.nodes[i]["boundary_perim"] = 1
graph.nodes[4]["boundary_node"] = False
for edge in graph.edges:
graph.edges[edge]["shared_perim"] = 1
assignment = {0: 1, 1: 1, 2: 2, 3: 1, 4: 1, 5: 2, 6: 2, 7: 2, 8: 2}
updaters = {
"exterior_boundaries": exterior_boundaries,
"interior_boundaries": interior_boundaries,
"cut_edges_by_part": cut_edges_by_part,
"boundary_nodes": boundary_nodes,
"perimeter": perimeter,
}
partition = Partition(graph, assignment, updaters)
# 112
# 112
# 222
result = partition["perimeter"]
assert result[1] == 3 + 4 # 3 nodes + 4 edges
assert result[2] == 5 + 4 # 5 nodes + 4 edges
def reject_half_of_all_flips(partition):
if partition.parent is None:
return True
return random.random() > 0.5
def test_elections_match_the_naive_computation(partition_with_election):
chain = MarkovChain(
propose_random_flip,
Validator([no_vanishing_districts, reject_half_of_all_flips]),
lambda x: True,
partition_with_election,
total_steps=100,
)
for partition in chain:
election_view = partition["Mock Election"]
expected_party_totals = {
"D": expected_tally(partition, "D"),
"R": expected_tally(partition, "R"),
}
assert expected_party_totals == election_view.totals_for_party
def expected_tally(partition, column):
return {
part: sum(partition.graph.nodes[node][column] for node in nodes)
for part, nodes in partition.parts.items()
}
|
2c9687e1c225a3898f85b99a42a983a7499d0f6c
|
554718851656376ad2bceb282de30459167ffeb2
|
/smdebug/core/tfevent/util.py
|
ac923eb054733497ef393fdb00c4275c1f16b319
|
[
"Apache-2.0"
] |
permissive
|
awslabs/sagemaker-debugger
|
d6ae6a6177a6cb457972772e2b3021e8a9dcc621
|
37ecf0aaeb24ab2adbe7f0ad664d0e50fa4154f2
|
refs/heads/master
| 2023-09-05T05:20:02.458427
| 2023-04-20T20:48:11
| 2023-04-20T20:48:11
| 222,554,670
| 162
| 89
|
Apache-2.0
| 2023-08-23T14:31:27
| 2019-11-18T22:12:36
|
Python
|
UTF-8
|
Python
| false
| false
| 2,187
|
py
|
util.py
|
# Third Party
import numpy as np
# First Party
from smdebug.core.logger import get_logger
from smdebug.exceptions import SMDebugTypeError
# Local
from .proto.tensor_pb2 import TensorProto
from .proto.tensor_shape_pb2 import TensorShapeProto
logger = get_logger()
# hash value of ndarray.dtype is not the same as np.float class
# so we need to convert the type classes below to np.dtype object
_NP_DATATYPE_TO_PROTO_DATATYPE = {
np.dtype(np.float16): "DT_HALF",
np.dtype(np.float32): "DT_FLOAT",
np.dtype(np.float64): "DT_DOUBLE",
np.dtype(np.int32): "DT_INT32",
np.dtype(np.int64): "DT_INT64",
np.dtype(np.uint8): "DT_UINT8",
np.dtype(np.uint16): "DT_UINT16",
np.dtype(np.uint32): "DT_UINT32",
np.dtype(np.uint64): "DT_UINT64",
np.dtype(np.int8): "DT_INT8",
np.dtype(np.int16): "DT_INT16",
np.dtype(np.complex64): "DT_COMPLEX64",
np.dtype(np.complex128): "DT_COMPLEX128",
np.dtype(bool): "DT_BOOL",
np.dtype([("qint8", "i1")]): "DT_QINT8",
np.dtype([("quint8", "u1")]): "DT_QUINT8",
np.dtype([("qint16", "<i2")]): "DT_QINT16",
np.dtype([("quint16", "<u2")]): "DT_UINT16",
np.dtype([("qint32", "<i4")]): "DT_INT32",
}
def _get_proto_dtype(npdtype):
if hasattr(npdtype, "kind"):
if npdtype.kind == "U" or npdtype.kind == "O" or npdtype.kind == "S":
return False, "DT_STRING"
try:
return True, _NP_DATATYPE_TO_PROTO_DATATYPE[npdtype]
except KeyError:
raise SMDebugTypeError(f"Numpy Datatype: {np.dtype(npdtype)} is currently not supported")
def make_tensor_proto(nparray_data, tag):
(isnum, dtype) = _get_proto_dtype(nparray_data.dtype)
dimensions = [
TensorShapeProto.Dim(size=d, name="{0}_{1}".format(tag, d)) for d in nparray_data.shape
]
tps = TensorShapeProto(dim=dimensions)
if isnum:
tensor_proto = TensorProto(
dtype=dtype, tensor_content=nparray_data.tostring(), tensor_shape=tps
)
else:
tensor_proto = TensorProto(tensor_shape=tps)
for s in nparray_data:
sb = bytes(s, encoding="utf-8")
tensor_proto.string_val.append(sb)
return tensor_proto
|
2411e197d24d57ff36611d239a4d48a374101fba
|
1652fa9949b64cc3d45a0bb86d86892a282ad678
|
/pmdarima/compat/statsmodels.py
|
cd4db486445f2d5ecaf88dc04c09587d27cf0ac1
|
[
"MIT"
] |
permissive
|
alkaline-ml/pmdarima
|
2e19f7a9f25b395ce6f000de2d0575138bcddc9a
|
1bb0ef5246c4e34712ef3e7843cf51a64b62bf0a
|
refs/heads/master
| 2023-08-10T20:19:23.041170
| 2023-07-03T18:08:53
| 2023-07-03T18:08:53
| 86,715,491
| 1,018
| 160
|
MIT
| 2023-08-07T13:28:03
| 2017-03-30T14:58:30
|
Python
|
UTF-8
|
Python
| false
| false
| 1,872
|
py
|
statsmodels.py
|
# -*- coding: utf-8 -*-
#
# Handle inconsistencies in the statsmodels API versions
from collections.abc import Iterable
from packaging.version import Version
import statsmodels as sm
__all__ = [
'bind_df_model'
]
_sm_version = sm.__version__
def bind_df_model(model_fit, arima_results):
"""Set model degrees of freedom.
Older versions of statsmodels don't handle this issue. Sets the
model degrees of freedom in place if not already present.
Parameters
----------
model_fit : ARMA, ARIMA or SARIMAX
The fitted model.
arima_results : ModelResultsWrapper
The results wrapper.
"""
if not hasattr(arima_results, 'df_model'):
df_model = model_fit.k_exog + model_fit.k_trend + \
model_fit.k_ar + model_fit.k_ma + \
model_fit.k_seasonal_ar + model_fit.k_seasonal_ma
setattr(arima_results, 'df_model', df_model)
def check_seasonal_order(order):
"""Check the seasonal order
Statsmodels 0.11.0 introduced a check for seasonal order == 1 that can
raise a ValueError, but some of our old defaults allow for m == 1 in an
otherwise null seasonal order.
Parameters
----------
order : tuple
The existing seasonal order
"""
# If order[0] is an iterable, but not a string then we don't perform check.
# Otherwise we perform the check and override order if it satisfies check.
# See issue#370: https://github.com/alkaline-ml/pmdarima/issues/370
if isinstance(order[0], Iterable) and not isinstance(order[0], str):
return order
else:
if sum(order[:3]) == 0 and order[-1] == 1:
order = (0, 0, 0, 0)
# user's order may be invalid, but we'll let statsmodels' validation
# handle that.
return order
def _use_sm13():
return Version(sm.__version__) >= Version("0.13.0")
|
7c1b3006764e98d9d79a31c552956a72ef67a388
|
bb33e6be8316f35decbb2b81badf2b6dcf7df515
|
/source/res/scripts/client/skeletons/gui/platform/controller.py
|
859b8616ada7e122140627f3838dde2d6a3d7e95
|
[] |
no_license
|
StranikS-Scan/WorldOfTanks-Decompiled
|
999c9567de38c32c760ab72c21c00ea7bc20990c
|
d2fe9c195825ececc728e87a02983908b7ea9199
|
refs/heads/1.18
| 2023-08-25T17:39:27.718097
| 2022-09-22T06:49:44
| 2022-09-22T06:49:44
| 148,696,315
| 103
| 39
| null | 2022-09-14T17:50:03
| 2018-09-13T20:49:11
|
Python
|
UTF-8
|
Python
| false
| false
| 279
|
py
|
controller.py
|
# Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/skeletons/gui/platform/controller.py
class IPlatformRequestController(object):
def init(self):
raise NotImplementedError
def fini(self):
raise NotImplementedError
|
3b2217f41cadf9e80ece2c40961dc0ffb9de193e
|
83b8b30ebb633eecd29ca0a7a20cc43a293c9333
|
/tests/float/true_value.py
|
4c8d2e5c8212de6fd8f7d7031b2bc4f1e6109c58
|
[
"MIT",
"GPL-1.0-or-later"
] |
permissive
|
adafruit/circuitpython
|
430ec895149d1eb814b505db39b4977a35ee88a7
|
506dca71b0cbb7af749bb51f86b01021db5483b3
|
refs/heads/main
| 2023-08-21T16:30:46.781068
| 2023-08-20T00:39:44
| 2023-08-20T00:39:44
| 66,166,069
| 3,806
| 1,560
|
MIT
| 2023-09-14T19:23:51
| 2016-08-20T20:10:40
|
C
|
UTF-8
|
Python
| false
| false
| 104
|
py
|
true_value.py
|
# Test true-ish value handling
if not 0.0:
print("float 0")
if not 0 + 0j:
print("complex 0")
|
919eef358ab27783f0e016d2009f1a63c837745f
|
88ae8695987ada722184307301e221e1ba3cc2fa
|
/third_party/ffmpeg/tools/python/convert_from_tensorflow.py
|
38e64c1c941a06a31996a8fdda85cc60364811ac
|
[
"LGPL-2.1-only",
"LGPL-3.0-only",
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LGPL-2.1-or-later",
"GPL-3.0-or-later",
"LGPL-3.0-or-later",
"IJG",
"LicenseRef-scancode-other-permissive",
"MIT",
"GPL-2.0-or-later",
"Apache-2.0",
"GPL-3.0-only",
"BSD-3-Clause"
] |
permissive
|
iridium-browser/iridium-browser
|
71d9c5ff76e014e6900b825f67389ab0ccd01329
|
5ee297f53dc7f8e70183031cff62f37b0f19d25f
|
refs/heads/master
| 2023-08-03T16:44:16.844552
| 2023-07-20T15:17:00
| 2023-07-23T16:09:30
| 220,016,632
| 341
| 40
|
BSD-3-Clause
| 2021-08-13T13:54:45
| 2019-11-06T14:32:31
| null |
UTF-8
|
Python
| false
| false
| 25,895
|
py
|
convert_from_tensorflow.py
|
# Copyright (c) 2019 Guo Yejun
#
# This file is part of FFmpeg.
#
# FFmpeg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# FFmpeg is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with FFmpeg; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# ==============================================================================
import tensorflow as tf
import numpy as np
import sys, struct
import convert_header as header
__all__ = ['convert_from_tensorflow']
class Operand(object):
IOTYPE_INPUT = 1
IOTYPE_OUTPUT = 2
IOTYPE_INTERMEDIATE = IOTYPE_INPUT | IOTYPE_OUTPUT
DTYPE_FLOAT = 1
DTYPE_UINT8 = 4
index = 0
def __init__(self, name, dtype, dims):
self.name = name
self.dtype = dtype
self.dims = dims
self.iotype = 0
self.used_count = 0
self.index = Operand.index
Operand.index = Operand.index + 1
self.iotype2str = {Operand.IOTYPE_INPUT: 'in', Operand.IOTYPE_OUTPUT: 'out', Operand.IOTYPE_INTERMEDIATE: 'inout'}
self.dtype2str = {Operand.DTYPE_FLOAT: 'DT_FLOAT', Operand.DTYPE_UINT8: 'DT_UINT8'}
def add_iotype(self, iotype):
self.iotype = self.iotype | iotype
if iotype == Operand.IOTYPE_INPUT:
self.used_count = self.used_count + 1
def __str__(self):
return "{}: (name: {}, iotype: {}, dtype: {}, dims: {}, used_count: {})".format(self.index,
self.name, self.iotype2str[self.iotype], self.dtype2str[self.dtype],
self.dims, self.used_count)
def __lt__(self, other):
return self.index < other.index
class TFConverter:
def __init__(self, graph_def, nodes, outfile, dump4tb):
self.graph_def = graph_def
self.nodes = nodes
self.outfile = outfile
self.dump4tb = dump4tb
self.layer_number = 0
self.output_names = []
self.name_node_dict = {}
self.edges = {}
self.conv_activations = {'Relu':0, 'Tanh':1, 'Sigmoid':2, 'None':3, 'LeakyRelu':4}
self.conv_paddings = {'VALID':0, 'SAME':1}
self.pool_paddings = {'VALID':0, 'SAME':1}
self.converted_nodes = set()
self.conv2d_scope_names = set()
self.conv2d_scopename_inputname_dict = {}
self.dense_scope_names = set()
self.dense_scopename_inputname_dict = {}
self.op2code = {'Conv2D':1, 'DepthToSpace':2, 'MirrorPad':3, 'Maximum':4,
'MathBinary':5, 'MathUnary':6, 'AvgPool':7, 'MatMul':8}
self.mathbin2code = {'Sub':0, 'Add':1, 'Mul':2, 'RealDiv':3, 'Minimum':4, 'FloorMod':5}
self.mathun2code = {'Abs':0, 'Sin':1, 'Cos':2, 'Tan':3, 'Asin':4,
'Acos':5, 'Atan':6, 'Sinh':7, 'Cosh':8, 'Tanh':9, 'Asinh':10,
'Acosh':11, 'Atanh':12, 'Ceil':13, 'Floor':14, 'Round':15,
'Exp':16}
self.mirrorpad_mode = {'CONSTANT':0, 'REFLECT':1, 'SYMMETRIC':2}
self.name_operand_dict = {}
def add_operand(self, name, type):
node = self.name_node_dict[name]
if name not in self.name_operand_dict:
dtype = node.attr['dtype'].type
if dtype == 0:
dtype = node.attr['T'].type
dims = [-1,-1,-1,-1]
if 'shape' in node.attr:
dims[0] = node.attr['shape'].shape.dim[0].size
dims[1] = node.attr['shape'].shape.dim[1].size
dims[2] = node.attr['shape'].shape.dim[2].size
dims[3] = node.attr['shape'].shape.dim[3].size
operand = Operand(name, dtype, dims)
self.name_operand_dict[name] = operand;
self.name_operand_dict[name].add_iotype(type)
return self.name_operand_dict[name].index
def dump_for_tensorboard(self):
graph = tf.get_default_graph()
tf.import_graph_def(self.graph_def, name="")
tf.summary.FileWriter('/tmp/graph', graph)
print('graph saved, run "tensorboard --logdir=/tmp/graph" to see it')
def get_conv2d_params(self, conv2d_scope_name):
knode = self.name_node_dict[conv2d_scope_name + '/kernel']
bnode = self.name_node_dict[conv2d_scope_name + '/bias']
if conv2d_scope_name + '/dilation_rate' in self.name_node_dict:
dnode = self.name_node_dict[conv2d_scope_name + '/dilation_rate']
else:
dnode = None
# the BiasAdd name is possible be changed into the output name,
# if activation is None, and BiasAdd.next is the last op which is Identity
if conv2d_scope_name + '/BiasAdd' in self.edges:
anode = self.edges[conv2d_scope_name + '/BiasAdd'][0]
if anode.op not in self.conv_activations:
anode = None
else:
anode = None
return knode, bnode, dnode, anode
def get_dense_params(self, dense_scope_name):
knode = self.name_node_dict[dense_scope_name + '/kernel']
bnode = self.name_node_dict.get(dense_scope_name + '/bias')
# the BiasAdd name is possible be changed into the output name,
# if activation is None, and BiasAdd.next is the last op which is Identity
anode = None
if bnode:
if dense_scope_name + '/BiasAdd' in self.edges:
anode = self.edges[dense_scope_name + '/BiasAdd'][0]
if anode.op not in self.conv_activations:
anode = None
else:
anode = None
return knode, bnode, anode
def dump_complex_conv2d_to_file(self, node, f):
assert(node.op == 'Conv2D')
self.layer_number = self.layer_number + 1
self.converted_nodes.add(node.name)
scope_name = TFConverter.get_scope_name(node.name)
#knode for kernel, bnode for bias, dnode for dilation, anode for activation
knode, bnode, dnode, anode = self.get_conv2d_params(scope_name)
if dnode is not None:
dilation = struct.unpack('i', dnode.attr['value'].tensor.tensor_content[0:4])[0]
else:
dilation = 1
if anode is not None:
activation = anode.op
else:
activation = 'None'
padding = node.attr['padding'].s.decode("utf-8")
# conv2d with dilation > 1 generates tens of nodes, not easy to parse them, so use this tricky method.
if dilation > 1 and scope_name + '/stack' in self.name_node_dict:
if self.name_node_dict[scope_name + '/stack'].op == "Const":
padding = 'SAME'
padding = self.conv_paddings[padding]
ktensor = knode.attr['value'].tensor
filter_height = ktensor.tensor_shape.dim[0].size
filter_width = ktensor.tensor_shape.dim[1].size
in_channels = ktensor.tensor_shape.dim[2].size
out_channels = ktensor.tensor_shape.dim[3].size
kernel = np.frombuffer(ktensor.tensor_content, dtype=np.float32)
kernel = kernel.reshape(filter_height, filter_width, in_channels, out_channels)
kernel = np.transpose(kernel, [3, 0, 1, 2])
has_bias = 1
np.array([self.op2code[node.op], dilation, padding, self.conv_activations[activation], in_channels, out_channels, filter_height, has_bias], dtype=np.uint32).tofile(f)
kernel.tofile(f)
btensor = bnode.attr['value'].tensor
if btensor.tensor_shape.dim[0].size == 1:
bias = struct.pack("f", btensor.float_val[0])
else:
bias = btensor.tensor_content
f.write(bias)
input_name = self.conv2d_scopename_inputname_dict[scope_name]
input_operand_index = self.add_operand(input_name, Operand.IOTYPE_INPUT)
if anode is not None:
output_operand_index = self.add_operand(anode.name, Operand.IOTYPE_OUTPUT)
else:
output_operand_index = self.add_operand(self.edges[bnode.name][0].name, Operand.IOTYPE_OUTPUT)
np.array([input_operand_index, output_operand_index], dtype=np.uint32).tofile(f)
def dump_dense_to_file(self, node, f):
assert(node.op == 'MatMul')
self.layer_number = self.layer_number + 1
self.converted_nodes.add(node.name)
scope_name = TFConverter.get_scope_name(node.name)
#knode for kernel, bnode for bias, anode for activation
knode, bnode, anode = self.get_dense_params(scope_name.split('/')[0])
if bnode is not None:
has_bias = 1
btensor = bnode.attr['value'].tensor
if btensor.tensor_shape.dim[0].size == 1:
bias = struct.pack("f", btensor.float_val[0])
else:
bias = btensor.tensor_content
else:
has_bias = 0
if anode is not None:
activation = anode.op
else:
activation = 'None'
ktensor = knode.attr['value'].tensor
in_channels = ktensor.tensor_shape.dim[0].size
out_channels = ktensor.tensor_shape.dim[1].size
if in_channels * out_channels == 1:
kernel = np.float32(ktensor.float_val[0])
else:
kernel = np.frombuffer(ktensor.tensor_content, dtype=np.float32)
kernel = kernel.reshape(in_channels, out_channels)
kernel = np.transpose(kernel, [1, 0])
np.array([self.op2code[node.op], self.conv_activations[activation], in_channels, out_channels, has_bias], dtype=np.uint32).tofile(f)
kernel.tofile(f)
if has_bias:
f.write(bias)
input_name = self.dense_scopename_inputname_dict[scope_name.split('/')[0]]
input_operand_index = self.add_operand(input_name, Operand.IOTYPE_INPUT)
if anode is not None:
output_operand_index = self.add_operand(anode.name, Operand.IOTYPE_OUTPUT)
else:
if bnode is not None:
output_operand_index = self.add_operand(self.edges[bnode.name][0].name, Operand.IOTYPE_OUTPUT)
else:
output_operand_index = self.add_operand(self.edges[scope_name+'/concat_1'][0].name, Operand.IOTYPE_OUTPUT)
np.array([input_operand_index, output_operand_index], dtype=np.uint32).tofile(f)
def dump_simple_conv2d_to_file(self, node, f):
assert(node.op == 'Conv2D')
self.layer_number = self.layer_number + 1
self.converted_nodes.add(node.name)
node0 = self.name_node_dict[node.input[0]]
node1 = self.name_node_dict[node.input[1]]
if node0.op == 'Const':
knode = node0
input_name = node.input[1]
else:
knode = node1
input_name = node.input[0]
ktensor = knode.attr['value'].tensor
filter_height = ktensor.tensor_shape.dim[0].size
filter_width = ktensor.tensor_shape.dim[1].size
in_channels = ktensor.tensor_shape.dim[2].size
out_channels = ktensor.tensor_shape.dim[3].size
if filter_height * filter_width * in_channels * out_channels == 1:
kernel = np.float32(ktensor.float_val[0])
else:
kernel = np.frombuffer(ktensor.tensor_content, dtype=np.float32)
kernel = kernel.reshape(filter_height, filter_width, in_channels, out_channels)
kernel = np.transpose(kernel, [3, 0, 1, 2])
has_bias = 0
dilation = 1
padding = node.attr['padding'].s.decode("utf-8")
np.array([self.op2code[node.op], dilation, self.conv_paddings[padding], self.conv_activations['None'],
in_channels, out_channels, filter_height, has_bias], dtype=np.uint32).tofile(f)
kernel.tofile(f)
input_operand_index = self.add_operand(input_name, Operand.IOTYPE_INPUT)
output_operand_index = self.add_operand(node.name, Operand.IOTYPE_OUTPUT)
np.array([input_operand_index, output_operand_index], dtype=np.uint32).tofile(f)
def dump_depth2space_to_file(self, node, f):
assert(node.op == 'DepthToSpace')
self.layer_number = self.layer_number + 1
block_size = node.attr['block_size'].i
np.array([self.op2code[node.op], block_size], dtype=np.uint32).tofile(f)
self.converted_nodes.add(node.name)
input_operand_index = self.add_operand(node.input[0], Operand.IOTYPE_INPUT)
output_operand_index = self.add_operand(node.name, Operand.IOTYPE_OUTPUT)
np.array([input_operand_index, output_operand_index], dtype=np.uint32).tofile(f)
def dump_mirrorpad_to_file(self, node, f):
assert(node.op == 'MirrorPad')
self.layer_number = self.layer_number + 1
mode = node.attr['mode'].s
mode = self.mirrorpad_mode[mode.decode("utf-8")]
np.array([self.op2code[node.op], mode], dtype=np.uint32).tofile(f)
pnode = self.name_node_dict[node.input[1]]
self.converted_nodes.add(pnode.name)
paddings = pnode.attr['value'].tensor.tensor_content
f.write(paddings)
self.converted_nodes.add(node.name)
input_operand_index = self.add_operand(node.input[0], Operand.IOTYPE_INPUT)
output_operand_index = self.add_operand(node.name, Operand.IOTYPE_OUTPUT)
np.array([input_operand_index, output_operand_index], dtype=np.uint32).tofile(f)
def dump_maximum_to_file(self, node, f):
assert(node.op == 'Maximum')
self.layer_number = self.layer_number + 1
ynode = self.name_node_dict[node.input[1]]
y = ynode.attr['value'].tensor.float_val[0]
np.array([self.op2code[node.op]], dtype=np.uint32).tofile(f)
np.array([y], dtype=np.float32).tofile(f)
self.converted_nodes.add(node.name)
input_operand_index = self.add_operand(node.input[0], Operand.IOTYPE_INPUT)
output_operand_index = self.add_operand(node.name, Operand.IOTYPE_OUTPUT)
np.array([input_operand_index, output_operand_index], dtype=np.uint32).tofile(f)
def dump_mathbinary_to_file(self, node, f):
self.layer_number = self.layer_number + 1
self.converted_nodes.add(node.name)
i0_node = self.name_node_dict[node.input[0]]
i1_node = self.name_node_dict[node.input[1]]
np.array([self.op2code['MathBinary'], self.mathbin2code[node.op]], dtype=np.uint32).tofile(f)
if i0_node.op == 'Const':
scalar = i0_node.attr['value'].tensor.float_val[0]
np.array([1], dtype=np.uint32).tofile(f) # broadcast: 1
np.array([scalar], dtype=np.float32).tofile(f)
np.array([0], dtype=np.uint32).tofile(f) # broadcast: 0
input_operand_index = self.add_operand(i1_node.name, Operand.IOTYPE_INPUT)
np.array([input_operand_index], dtype=np.uint32).tofile(f)
elif i1_node.op == 'Const':
scalar = i1_node.attr['value'].tensor.float_val[0]
np.array([0], dtype=np.uint32).tofile(f)
input_operand_index = self.add_operand(i0_node.name, Operand.IOTYPE_INPUT)
np.array([input_operand_index], dtype=np.uint32).tofile(f)
np.array([1], dtype=np.uint32).tofile(f)
np.array([scalar], dtype=np.float32).tofile(f)
else:
np.array([0], dtype=np.uint32).tofile(f)
input_operand_index = self.add_operand(i0_node.name, Operand.IOTYPE_INPUT)
np.array([input_operand_index], dtype=np.uint32).tofile(f)
np.array([0], dtype=np.uint32).tofile(f)
input_operand_index = self.add_operand(i1_node.name, Operand.IOTYPE_INPUT)
np.array([input_operand_index], dtype=np.uint32).tofile(f)
output_operand_index = self.add_operand(node.name, Operand.IOTYPE_OUTPUT)
np.array([output_operand_index], dtype=np.uint32).tofile(f)
def dump_mathunary_to_file(self, node, f):
self.layer_number = self.layer_number + 1
self.converted_nodes.add(node.name)
i0_node = self.name_node_dict[node.input[0]]
np.array([self.op2code['MathUnary'], self.mathun2code[node.op]], dtype=np.uint32).tofile(f)
input_operand_index = self.add_operand(i0_node.name, Operand.IOTYPE_INPUT)
np.array([input_operand_index], dtype=np.uint32).tofile(f)
output_operand_index = self.add_operand(node.name, Operand.IOTYPE_OUTPUT)
np.array([output_operand_index],dtype=np.uint32).tofile(f)
def dump_avg_pool_to_file(self, node, f):
assert(node.op == 'AvgPool')
self.layer_number = self.layer_number + 1
self.converted_nodes.add(node.name)
node0 = self.name_node_dict[node.input[0]]
strides = node.attr['strides']
# Tensorflow do not support pooling strides in batch dimension and
# current native NN do not support pooling strides in channel dimension, added assert() here.
assert(strides.list.i[1]==strides.list.i[2])
assert(strides.list.i[0]==1)
assert(strides.list.i[3]==1)
strides = strides.list.i[1]
filter_node = node.attr['ksize']
input_name = node.input[0]
# Tensorflow do not support pooling ksize in batch dimension and channel dimension.
assert(filter_node.list.i[0]==1)
assert(filter_node.list.i[3]==1)
filter_height = filter_node.list.i[1]
filter_width = filter_node.list.i[2]
padding = node.attr['padding'].s.decode("utf-8")
np.array([self.op2code[node.op], strides, self.pool_paddings[padding], filter_height],
dtype=np.uint32).tofile(f)
input_operand_index = self.add_operand(input_name, Operand.IOTYPE_INPUT)
output_operand_index = self.add_operand(node.name, Operand.IOTYPE_OUTPUT)
np.array([input_operand_index, output_operand_index],dtype=np.uint32).tofile(f)
def dump_layers_to_file(self, f):
for node in self.nodes:
if node.name in self.converted_nodes:
continue
# conv2d with dilation generates very complex nodes, so handle it in special
if self.in_conv2d_scope(node.name):
if node.op == 'Conv2D':
self.dump_complex_conv2d_to_file(node, f)
continue
if self.in_dense_scope(node.name):
if node.op == 'MatMul':
self.dump_dense_to_file(node, f)
continue
if node.op == 'Conv2D':
self.dump_simple_conv2d_to_file(node, f)
continue
if node.name in self.output_names:
input_name = self.id_different_scope_dict[node.name]
if TFConverter.get_scope_name(input_name)!=TFConverter.get_scope_name(node.name):
continue
if node.op == 'AvgPool':
self.dump_avg_pool_to_file(node, f)
elif node.op == 'DepthToSpace':
self.dump_depth2space_to_file(node, f)
elif node.op == 'MirrorPad':
self.dump_mirrorpad_to_file(node, f)
elif node.op == 'Maximum':
self.dump_maximum_to_file(node, f)
elif node.op in self.mathbin2code:
self.dump_mathbinary_to_file(node, f)
elif node.op in self.mathun2code:
self.dump_mathunary_to_file(node, f)
def dump_operands_to_file(self, f):
operands = sorted(self.name_operand_dict.values())
for operand in operands:
#print('{}'.format(operand))
np.array([operand.index, len(operand.name)], dtype=np.uint32).tofile(f)
f.write(operand.name.encode('utf-8'))
np.array([operand.iotype, operand.dtype], dtype=np.uint32).tofile(f)
np.array(operand.dims, dtype=np.uint32).tofile(f)
def dump_to_file(self):
with open(self.outfile, 'wb') as f:
f.write(header.str.encode('utf-8'))
np.array([header.major, header.minor], dtype=np.uint32).tofile(f)
self.dump_layers_to_file(f)
self.dump_operands_to_file(f)
np.array([self.layer_number, len(self.name_operand_dict)], dtype=np.uint32).tofile(f)
def generate_name_node_dict(self):
for node in self.nodes:
self.name_node_dict[node.name] = node
def generate_output_names(self):
used_names = []
for node in self.nodes:
for input in node.input:
used_names.append(input)
for node in self.nodes:
if node.name not in used_names:
self.output_names.append(node.name)
def remove_identity(self):
self.id_different_scope_dict = {}
id_nodes = []
id_dict = {}
for node in self.nodes:
if node.op == 'Identity':
name = node.name
input = node.input[0]
id_nodes.append(node)
# do not change the output name
if name in self.output_names:
self.name_node_dict[input].name = name
self.name_node_dict[name] = self.name_node_dict[input]
del self.name_node_dict[input]
self.id_different_scope_dict[name] = input
else:
id_dict[name] = input
for idnode in id_nodes:
self.nodes.remove(idnode)
for node in self.nodes:
for i in range(len(node.input)):
input = node.input[i]
if input in id_dict:
node.input[i] = id_dict[input]
def generate_edges(self):
for node in self.nodes:
for input in node.input:
if input in self.edges:
self.edges[input].append(node)
else:
self.edges[input] = [node]
@staticmethod
def get_scope_name(name):
index = name.rfind('/')
if index == -1:
return ""
return name[0:index]
def in_conv2d_scope(self, name):
inner_scope = TFConverter.get_scope_name(name)
if inner_scope == "":
return False;
for scope in self.conv2d_scope_names:
index = inner_scope.find(scope)
if index == 0:
return True
return False
def in_dense_scope(self, name):
inner_scope = TFConverter.get_scope_name(name)
if inner_scope == "":
return False;
for scope in self.dense_scope_names:
index = inner_scope.find(scope)
if index == 0:
return True
return False
def generate_sub_block_op_scope_info(self):
# mostly, conv2d/dense is a sub block in graph, get the scope name
for node in self.nodes:
if node.op == 'Conv2D':
scope = TFConverter.get_scope_name(node.name)
# for the case tf.nn.conv2d is called directly
if scope == '':
continue
# for the case tf.nn.conv2d is called within a scope
if scope + '/kernel' not in self.name_node_dict:
continue
self.conv2d_scope_names.add(scope)
elif node.op == 'MatMul':
scope = TFConverter.get_scope_name(node.name)
# for the case tf.nn.dense is called directly
if scope == '':
continue
# for the case tf.nn.dense is called within a scope
if scope + '/kernel' not in self.name_node_dict and scope.split('/Tensordot')[0] + '/kernel' not in self.name_node_dict:
continue
self.dense_scope_names.add(scope.split('/Tensordot')[0])
# get the input name to the conv2d/dense sub block
for node in self.nodes:
scope = TFConverter.get_scope_name(node.name)
if scope in self.conv2d_scope_names:
if node.op == 'Conv2D' or node.op == 'Shape':
for inp in node.input:
if TFConverter.get_scope_name(inp) != scope:
self.conv2d_scopename_inputname_dict[scope] = inp
elif scope in self.dense_scope_names:
if node.op == 'MatMul' or node.op == 'Shape':
for inp in node.input:
if TFConverter.get_scope_name(inp) != scope:
self.dense_scopename_inputname_dict[scope] = inp
elif scope.split('/Tensordot')[0] in self.dense_scope_names:
if node.op == 'Transpose':
for inp in node.input:
if TFConverter.get_scope_name(inp).find(scope)<0 and TFConverter.get_scope_name(inp).find(scope.split('/')[0])<0:
self.dense_scopename_inputname_dict[scope.split('/Tensordot')[0]] = inp
def run(self):
self.generate_name_node_dict()
self.generate_output_names()
self.remove_identity()
self.generate_edges()
self.generate_sub_block_op_scope_info()
if self.dump4tb:
self.dump_for_tensorboard()
self.dump_to_file()
def convert_from_tensorflow(infile, outfile, dump4tb):
with open(infile, 'rb') as f:
# read the file in .proto format
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
nodes = graph_def.node
converter = TFConverter(graph_def, nodes, outfile, dump4tb)
converter.run()
|
340d061d231bd8187d2d62f3ed348c0a680f41db
|
7cec63f4dd6d944d834783b7f764460ba6a8a8cb
|
/gengine/app/route.py
|
fcea80d85052fec62239afbcc54a8fd91cb20742
|
[
"MIT",
"ZPL-2.1",
"Apache-2.0",
"BSD-3-Clause-Modification",
"LGPL-2.0-or-later"
] |
permissive
|
ActiDoo/gamification-engine
|
a8e51e795fd9d36d228885e19f263d7ffcb979c6
|
b82a900f2f4a43cea463853e36d6f8237c7f255e
|
refs/heads/master
| 2023-08-30T14:28:57.095777
| 2022-02-11T11:10:15
| 2022-02-11T11:10:15
| 31,541,379
| 413
| 130
|
MIT
| 2023-02-15T22:54:16
| 2015-03-02T13:28:17
|
Python
|
UTF-8
|
Python
| false
| false
| 1,183
|
py
|
route.py
|
from pyramid_swagger_spec.namespace import create_api_namespace
from pyramid_swagger_spec.swagger import create_swagger_view
api_route = create_api_namespace(namespace="api")
def config_routes(config):
config.add_route('get_progress', '/progress/{subject_id}')
config.add_route('increase_value', '/increase_value/{variable_name}/{subject_id}')
config.add_route('increase_value_with_key', '/increase_value/{variable_name}/{subject_id}/{key}')
config.add_route('increase_multi_values', '/increase_multi_values')
config.add_route('add_or_update_subject', '/add_or_update_subject/{subject_id}')
config.add_route('delete_subject', '/delete_subject/{subject_id}')
config.add_route('get_achievement_level', '/achievement/{achievement_id}/level/{level}')
config.add_route('auth_login', '/auth/login')
config.add_route('change_password', '/auth/change_password')
config.add_route('register_device', '/register_device/{subject_id}')
config.add_route('get_messages', '/messages/{subject_id}')
config.add_route('read_messages', '/read_messages/{subject_id}')
create_swagger_view(config, namespace="api", title="Admin Api", version="0.1")
|
8822e459ac4fdfcd72345c9d10644d5002045ea9
|
689a78e08c957abc02ea5f89fb657b1f78f88b6e
|
/det3d/models/readers/dynamic_voxel_encoder.py
|
5cfc476d97534af83ee55e386104bfeed871fd14
|
[
"MIT",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
tianweiy/CenterPoint
|
2bb9a7def8d4bf87b66af2e3b671736eae6fa275
|
d3a248fa56db2601860d576d5934d00fee9916eb
|
refs/heads/master
| 2023-08-30T23:11:49.528882
| 2022-10-24T13:09:52
| 2022-10-24T13:09:52
| 274,006,091
| 1,692
| 476
|
MIT
| 2023-05-06T10:30:06
| 2020-06-22T00:32:05
|
Python
|
UTF-8
|
Python
| false
| false
| 4,505
|
py
|
dynamic_voxel_encoder.py
|
from det3d.core.utils.scatter import scatter_mean
from torch.nn import functional as F
from ..registry import READERS
from torch import nn
import numpy as np
import torch
def voxelization(points, pc_range, voxel_size):
keep = (points[:, 0] >= pc_range[0]) & (points[:, 0] <= pc_range[3]) & \
(points[:, 1] >= pc_range[1]) & (points[:, 1] <= pc_range[4]) & \
(points[:, 2] >= pc_range[2]) & (points[:, 2] <= pc_range[5])
points = points[keep, :]
coords = ((points[:, [2, 1, 0]] - pc_range[[2, 1, 0]]) / voxel_size[[2, 1, 0]]).to(torch.int64)
unique_coords, inverse_indices = coords.unique(return_inverse=True, dim=0)
voxels = scatter_mean(points, inverse_indices, dim=0)
return voxels, unique_coords
def voxelization_virtual(points, pc_range, voxel_size):
# current one is hard coded for nuScenes
# TODO: fix those magic number
keep = (points[:, 0] >= pc_range[0]) & (points[:, 0] <= pc_range[3]) & \
(points[:, 1] >= pc_range[1]) & (points[:, 1] <= pc_range[4]) & \
(points[:, 2] >= pc_range[2]) & (points[:, 2] <= pc_range[5])
points = points[keep, :]
real_points_mask = points[:, -2] == 1
painted_points_mask = points[:, -2] == 0
virtual_points_mask = points[:, -2] == -1
# remove zero padding for real points
real_points = points[real_points_mask][:, [0, 1, 2, 3, -1]]
painted_point = points[painted_points_mask]
virtual_point = points[virtual_points_mask]
padded_points = torch.zeros(len(points), 22, device=points.device, dtype=points.dtype)
# real points will occupy channels 0 to 4 and -1
padded_points[:len(real_points), :5] = real_points
padded_points[:len(real_points), -1] = 1
# painted points will occupy channels 5 to 21
padded_points[len(real_points):len(real_points)+len(painted_point), 5:19] = painted_point[:, :-2]
padded_points[len(real_points):len(real_points)+len(painted_point), 19] = painted_point[:, -1]
padded_points[len(real_points):len(real_points)+len(painted_point), 20] = 1
padded_points[len(real_points):len(real_points)+len(painted_point), 21] = 0
# virtual points will occupy channels 5 to 21
padded_points[len(real_points)+len(painted_point):, 5:19] = virtual_point[:, :-2]
padded_points[len(real_points)+len(painted_point):, 19] = virtual_point[:, -1]
padded_points[len(real_points)+len(painted_point):, 20] = 0
padded_points[len(real_points)+len(painted_point):, 21] = 0
points_xyz = torch.cat([real_points[:, :3], painted_point[:, :3], virtual_point[:, :3]], dim=0)
coords = ((points_xyz[:, [2, 1, 0]] - pc_range[[2, 1, 0]]) / voxel_size[[2, 1, 0]]).to(torch.int64)
unique_coords, inverse_indices = coords.unique(return_inverse=True, dim=0)
voxels = scatter_mean(padded_points, inverse_indices, dim=0)
indicator = voxels[:, -1]
mix_mask = (indicator > 0) * (indicator < 1)
# remove index
voxels = voxels[:, :-1]
voxels[mix_mask, :5] = voxels[mix_mask, :5] / indicator[mix_mask].unsqueeze(-1)
voxels[mix_mask, 5:] = voxels[mix_mask, 5:] / (1-indicator[mix_mask].unsqueeze(-1))
return voxels, unique_coords
@READERS.register_module
class DynamicVoxelEncoder(nn.Module):
def __init__(
self, pc_range, voxel_size, virtual=False
):
super(DynamicVoxelEncoder, self).__init__()
self.pc_range = torch.tensor(pc_range)
self.voxel_size = torch.tensor(voxel_size)
self.shape = torch.round((self.pc_range[3:] - self.pc_range[:3]) / self.voxel_size)
self.shape_np = self.shape.numpy().astype(np.int32)
self.virtual = virtual
@torch.no_grad()
def forward(self, points):
# points list[torch.Tensor]
coors = []
voxels = []
for res in points:
if self.virtual:
voxel, coor = voxelization_virtual(res, self.pc_range.to(res.device), self.voxel_size.to(res.device))
else:
voxel, coor = voxelization(res, self.pc_range.to(res.device), self.voxel_size.to(res.device))
voxels.append(voxel)
coors.append(coor)
coors_batch = []
for i in range(len(voxels)):
coor_pad = F.pad(coors[i], (1, 0), mode='constant', value=i)
coors_batch.append(coor_pad)
coors_batch = torch.cat(coors_batch, dim=0)
voxels_batch = torch.cat(voxels, dim=0)
return voxels_batch, coors_batch, self.shape_np
|
e12817d8bfffe26552d18090dd2a5d43c46e6599
|
49201afc8c3515d9f5cb569f45cd34ba291e84ca
|
/autobahntestsuite/autobahntestsuite/case/case5_15.py
|
398e5bcc7087f2432312b44a52b46bddffa02352
|
[
"Apache-2.0"
] |
permissive
|
crossbario/autobahn-testsuite
|
2f3fe9a46a806550dddb23ed7bc98a94c47d5bd8
|
09cfbf74b0c8e335c6fc7df88e5c88349ca66879
|
refs/heads/master
| 2023-09-06T01:16:06.357182
| 2022-11-02T18:00:25
| 2022-11-02T18:00:25
| 3,762,517
| 718
| 74
|
Apache-2.0
| 2022-01-26T11:07:29
| 2012-03-19T09:59:18
|
Python
|
UTF-8
|
Python
| false
| false
| 1,812
|
py
|
case5_15.py
|
###############################################################################
##
## Copyright (c) Crossbar.io Technologies GmbH
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
###############################################################################
from case import Case
class Case5_15(Case):
DESCRIPTION = """Send text Message fragmented into 2 fragments, then Continuation Frame with FIN = false where there is nothing to continue, then unfragmented Text Message, all sent in one chop."""
EXPECTATION = """The connection is failed immediately, since there is no message to continue."""
def onOpen(self):
fragments = ["fragment1", "fragment2", "fragment3", "fragment4"]
self.expected[Case.OK] = [("message", ''.join(fragments[:2]), False)]
self.expected[Case.NON_STRICT] = []
self.expectedClose = {"closedByMe":False,"closeCode":[self.p.CLOSE_STATUS_CODE_PROTOCOL_ERROR],"requireClean":False}
self.p.sendFrame(opcode = 1, fin = False, payload = fragments[0])
self.p.sendFrame(opcode = 0, fin = True, payload = fragments[1])
self.p.sendFrame(opcode = 0, fin = False, payload = fragments[2])
self.p.sendFrame(opcode = 1, fin = True, payload = fragments[3])
self.p.killAfter(1)
|
b128196c998d3ae31a8cbfbe6543af07808645a9
|
c470a6e3154791ccabb0c0ab6f8141be37410599
|
/tests/conftest.py
|
66211452de9862c4b37547d1de2421bc9027cf36
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
frgfm/torch-cam
|
ea20605eeb5cf5390f555e93aaa6158d152d64b4
|
dee2e74a50790c9027cfb1e9f380d53ea95fbfee
|
refs/heads/main
| 2023-07-24T01:29:49.694051
| 2023-07-13T02:26:09
| 2023-07-13T02:26:09
| 249,513,553
| 1,480
| 166
|
Apache-2.0
| 2023-07-13T02:26:11
| 2020-03-23T18:34:51
|
Python
|
UTF-8
|
Python
| false
| false
| 2,201
|
py
|
conftest.py
|
from io import BytesIO
import pytest
import requests
import torch
from PIL import Image
from torch import nn
from torchvision.transforms.functional import normalize, resize, to_tensor
@pytest.fixture(scope="session")
def mock_img_tensor():
try:
# Get a dog image
URL = "https://www.woopets.fr/assets/races/000/066/big-portrait/border-collie.jpg"
response = requests.get(URL, timeout=5)
# Forward an image
pil_img = Image.open(BytesIO(response.content), mode="r").convert("RGB")
img_tensor = normalize(
to_tensor(resize(pil_img, (224, 224))), [0.485, 0.456, 0.406], [0.229, 0.224, 0.225]
).unsqueeze(0)
except ConnectionError:
img_tensor = torch.rand((1, 3, 224, 224))
img_tensor.requires_grad_(True)
return img_tensor
@pytest.fixture(scope="session")
def mock_video_tensor():
return torch.rand((1, 3, 8, 16, 16), requires_grad=True)
@pytest.fixture(scope="session")
def mock_video_model():
model = nn.Sequential(
nn.Sequential(
nn.Conv3d(3, 8, 3, padding=1),
nn.ReLU(),
nn.Conv3d(8, 16, 3, padding=1),
nn.ReLU(),
nn.AdaptiveAvgPool3d((1, 1, 1)),
),
nn.Flatten(1),
nn.Linear(16, 1),
)
for p in model:
p.requires_grad_(False)
return model
@pytest.fixture(scope="session")
def mock_img_model():
model = nn.Sequential(
nn.Sequential(
nn.Conv2d(3, 8, 3, padding=1),
nn.ReLU(),
nn.Conv2d(8, 16, 3, padding=1),
nn.ReLU(),
nn.AdaptiveAvgPool2d((1, 1)),
),
nn.Flatten(1),
nn.Linear(16, 1),
)
for p in model:
p.requires_grad_(False)
return model
@pytest.fixture(scope="session")
def mock_fullyconv_model():
model = nn.Sequential(
nn.Sequential(
nn.Conv2d(3, 8, 3, padding=1),
nn.ReLU(),
nn.Conv2d(8, 16, 3, padding=1),
nn.ReLU(),
nn.AdaptiveAvgPool2d((1, 1)),
),
nn.Conv2d(16, 1, 1),
nn.Flatten(1),
)
for p in model:
p.requires_grad_(False)
return model
|
6830d2616af7913db48bbfc73f14d6facc7907d7
|
d05c946e345baa67e7894ee33ca21e24b8d26028
|
/machine-learning/nlp/tokenization-stemming-lemmatization/wordnet_lemmatizer.py
|
9a709d060a173e751c521cba3238856c109b2d1e
|
[
"MIT"
] |
permissive
|
x4nth055/pythoncode-tutorials
|
327255550812f84149841d56f2d13eaa84efd42e
|
d6ba5d672f7060ba88384db5910efab1768c7230
|
refs/heads/master
| 2023-09-01T02:36:58.442748
| 2023-08-19T14:04:34
| 2023-08-19T14:04:34
| 199,449,624
| 1,858
| 2,055
|
MIT
| 2023-08-25T20:41:56
| 2019-07-29T12:35:40
|
Jupyter Notebook
|
UTF-8
|
Python
| false
| false
| 394
|
py
|
wordnet_lemmatizer.py
|
from nltk.stem import WordNetLemmatizer
word_lst = []
def lemmatizer(file):
lem_lst = []
lem = WordNetLemmatizer()
f = open(file, 'r')
for l in f:
word_lst.append(l.strip())
w = lem.lemmatize(str(l.strip()))
lem_lst.append(w)
return lem_lst
lem_lst = lemmatizer('reviews.txt')
for i in range(len(word_lst)):
print(word_lst[i]+"-->"+lem_lst[i])
|
eeed5d5e5e4bdebe57adcaa0b0a0546eb9dc054b
|
1157d52932c29b87cdceeb03c4598c91113fce21
|
/py/jupyterlite-core/jupyterlite_core/addons/base.py
|
bacd9c75d6363a84692661d9f757bd813456efff
|
[
"BSD-3-Clause"
] |
permissive
|
jupyterlite/jupyterlite
|
b32282040e4956fd6dd90d62289b4dfcf541b0fd
|
fa5f44ff3f0eec2c75cada62fa659f13c9f26ab0
|
refs/heads/main
| 2023-09-01T18:13:20.490421
| 2023-08-24T18:32:23
| 2023-08-24T18:32:23
| 352,160,885
| 1,991
| 203
|
BSD-3-Clause
| 2023-09-14T13:53:44
| 2021-03-27T19:36:52
|
TypeScript
|
UTF-8
|
Python
| false
| false
| 13,904
|
py
|
base.py
|
import email.utils
import json
import os
import shutil
import tarfile
import tempfile
import time
import zipfile
from pathlib import Path
from typing import Any, Dict, Generator, List
from traitlets import Bool, Instance
from traitlets.config import LoggingConfigurable
from ..constants import (
DISABLED_EXTENSIONS,
EXTENSION_TAR,
EXTENSION_ZIP,
FEDERATED_EXTENSIONS,
JSON_FMT,
JUPYTER_CONFIG_DATA,
JUPYTERLITE_IPYNB,
JUPYTERLITE_JSON,
JUPYTERLITE_METADATA,
LITE_PLUGIN_SETTINGS,
MOD_DIRECTORY,
MOD_FILE,
SETTINGS_OVERRIDES,
SOURCEMAP_IGNORE_PATTERNS,
SOURCEMAPS,
UTF8,
)
from ..manager import LiteManager
from ..optional import has_optional_dependency
class BaseAddon(LoggingConfigurable):
"""A base class for addons to the JupyterLite build chain
Subclassing this is optional, but provides some useful utilities
"""
manager: LiteManager = Instance(LiteManager)
ignore_sys_prefix: bool = Bool(False)
def __init__(self, manager, *args, **kwargs):
kwargs["parent"] = manager
kwargs["manager"] = manager
super().__init__(*args, **kwargs)
@property
def log(self):
return self.manager.log
def task(self, **task):
"""Ensure a ``doit`` task is well-formed.
- Task names may not include the ``=`` character
- arbitrarily replace with ``--``
"""
task["name"] = task["name"].replace("=", "--")
return task
def copy_one(self, src, dest):
"""copy one Path (a file or folder)"""
if self.manager.no_sourcemaps and self.is_ignored_sourcemap(src.name):
return
if dest.is_dir():
shutil.rmtree(dest)
elif dest.exists():
dest.unlink()
if not dest.parent.exists():
self.log.debug(f"creating folder {dest.parent}")
dest.parent.mkdir(parents=True)
self.maybe_timestamp(dest.parent)
copytree_kwargs = {}
if self.manager.no_sourcemaps:
copytree_kwargs["ignore"] = SOURCEMAP_IGNORE_PATTERNS
if src.is_dir():
shutil.copytree(src, dest, **copytree_kwargs)
else:
shutil.copy2(src, dest)
self.maybe_timestamp(dest)
def fetch_one(self, url, dest):
"""fetch one file
TODO: enable other backends, auth, etc.
"""
import urllib.request
if dest.exists():
self.log.info(f"[lite][fetch] already downloaded {dest.name}, skipping...")
return
if not dest.parent.exists():
dest.parent.mkdir(parents=True)
with tempfile.TemporaryDirectory() as td:
tdp = Path(td)
with urllib.request.urlopen(url) as response:
tmp_dest = tdp / dest.name
with tmp_dest.open("wb") as fd:
shutil.copyfileobj(response, fd)
last_modified = response.headers.get("Last-Modified")
if last_modified:
epoch_time = time.mktime(email.utils.parsedate(last_modified))
os.utime(tmp_dest, (epoch_time, epoch_time))
shutil.copy2(tmp_dest, dest)
def maybe_timestamp(self, path):
if not path.exists() or self.manager.source_date_epoch is None:
return
if path.is_dir():
for p in path.rglob("*"):
self.timestamp_one(p)
self.timestamp_one(path)
def timestamp_one(self, path):
"""adjust the timestamp to be --source-date-epoch for files newer than then
see https://reproducible-builds.org/specs/source-date-epoch
"""
stat = path.stat()
sde = self.manager.source_date_epoch
if stat.st_mtime > sde:
cls = self.__class__.__name__
self.log.debug(
f"[lite][base] <{cls}> set time to source_date_epoch {sde} on {path}"
)
os.utime(path, (sde, sde))
return
return
def delete_one(self, *src):
"""delete... somethings"""
for src_dir in src:
if src_dir.is_dir():
shutil.rmtree(src_dir)
elif src_dir.exists():
src_dir.unlink()
def validate_one_json_file(self, validator, path=None, data=None, selector=[]):
if path:
loaded = json.loads(path.read_text(**UTF8))
else:
loaded = data
if selector:
for sel in selector:
selected = loaded.get(sel, {})
else:
selected = loaded
if validator is None:
# just checking if the JSON is well-formed
return True
if isinstance(validator, Path):
validator = self.get_validator(validator)
if validator is None:
return True
validator.validate(selected)
def get_validator(self, schema_path, klass=None):
if klass is None:
if not has_optional_dependency(
"jsonschema", "only checking JSON well-formedness: {error}"
):
return None
from jsonschema import Draft7Validator
klass = Draft7Validator
schema = json.loads(schema_path.read_text(**UTF8))
return klass(schema)
def merge_one_jupyterlite(self, out_path, in_paths):
"""write the ``out_path`` with the merge content of ``in_paths``, where
all are valid ``jupyter-lite.*`` files.
"""
self.log.debug(f"[lite][config][merge] {out_path}")
config = None
for in_path in in_paths:
self.log.debug(f"[lite][config][merge] . {in_path}")
in_config = None
try:
in_config = json.loads(in_path.read_text(**UTF8))
if out_path.name == JUPYTERLITE_IPYNB:
in_config = in_config["metadata"].get(JUPYTERLITE_METADATA)
except:
pass
if not in_config:
continue
if not config:
config = in_config
continue
for k, v in in_config.items():
self.log.debug(f"""[lite][config] ... updating {k} => {v}?""")
if k == JUPYTER_CONFIG_DATA:
config[k] = self.merge_jupyter_config_data(config.get(k) or {}, v)
else:
if config.get(k) != v:
self.log.debug(f"""[lite][config] ..... {k} updated""")
config[k] = v
if config and JUPYTER_CONFIG_DATA in config:
self.dedupe_federated_extensions(config[JUPYTER_CONFIG_DATA])
if out_path.name == JUPYTERLITE_IPYNB:
if out_path.exists():
doc_path = out_path
else:
for in_path in in_paths:
if in_path.name == JUPYTERLITE_IPYNB and in_path.exists():
doc_path = in_path
break
doc = json.loads(doc_path.read_text(**UTF8))
doc["metadata"][JUPYTERLITE_METADATA] = config
out_path.write_text(json.dumps(doc, **JSON_FMT), **UTF8)
else:
out_path.write_text(json.dumps(config, **JSON_FMT), **UTF8)
print("MERGED", out_path, "from", in_paths)
def merge_jupyter_config_data(self, config, in_config):
"""merge well-known ``jupyter-config-data`` fields"""
self.log.debug(f"""[lite][config][merge] ..... {config}""")
self.log.debug(f"""[lite][config][merge] ..... {in_config}""")
config = config or {}
in_config = in_config or {}
for k, v in in_config.items():
if k in [DISABLED_EXTENSIONS, FEDERATED_EXTENSIONS]:
config[k] = [*config.get(k, []), *v]
elif k in [SETTINGS_OVERRIDES]:
config[k] = config.get(k, {})
for pkg, pkg_config in v.items():
config[k][pkg] = config[k].get(pkg, {})
config[k][pkg].update(pkg_config)
else:
config[k] = v
self.log.debug(f"""[lite][config][merge] ..... {config}""")
return config
def dedupe_federated_extensions(self, config):
"""update a federated_extension list in-place, ensuring unique names.
.. todo::
best we can do, for now.
"""
if FEDERATED_EXTENSIONS not in config:
return
named = {}
for ext in config[FEDERATED_EXTENSIONS]:
named[ext["name"]] = ext
config[FEDERATED_EXTENSIONS] = sorted(named.values(), key=lambda x: x["name"])
def is_ignored_sourcemap(self, path_name: str):
is_ignored = False
if self.manager.no_sourcemaps:
for map_ext in SOURCEMAPS:
if path_name.endswith(map_ext):
is_ignored = True
break
return is_ignored
def is_sys_prefix_ignored(self):
return self.ignore_sys_prefix
@property
def should_use_libarchive_c(self):
"""should libarchive-c be used (if available)?"""
if self.manager.no_libarchive:
return False
return has_optional_dependency(
"libarchive",
"install libarchive-c for better perfomance when working with archives: {error}",
)
def extract_one(self, archive: Path, dest: Path):
"""extract the contents of an archive to a path."""
if dest.exists():
shutil.rmtree(dest)
dest.mkdir(parents=True)
if self.should_use_libarchive_c:
import libarchive
old_cwd = os.getcwd()
os.chdir(str(dest))
try:
libarchive.extract_file(str(archive))
finally:
os.chdir(old_cwd)
return
if archive.name.endswith(EXTENSION_ZIP):
with zipfile.ZipFile(archive) as zf:
zf.extractall(dest)
elif archive.name.endswith(EXTENSION_TAR):
mode = "r:bz2" if archive.name.endswith(".bz2") else "r:gz"
with tarfile.open(archive, mode) as tf:
self.safe_extract_all(tf, dest)
else:
raise ValueError(f"Unrecognized archive format {archive.name}")
for path in [dest, *dest.rglob("*")]:
path.chmod(MOD_DIRECTORY if path.is_dir() else MOD_FILE)
def is_within_directory(self, directory, target):
abs_directory = os.path.abspath(directory)
abs_target = os.path.abspath(target)
prefix = os.path.commonprefix([abs_directory, abs_target])
return prefix == abs_directory
def safe_extract_all(self, tar, path=".", members=None, *, numeric_owner=False):
for member in tar.getmembers():
member_path = os.path.join(path, member.name)
if not self.is_within_directory(path, member_path):
raise Exception("Attempted Path Traversal in Tar File")
tar.extractall(path, members, numeric_owner=numeric_owner)
def hash_all(self, hashfile: Path, root: Path, paths: List[Path]):
from hashlib import sha256
lines = [
" ".join(
[sha256(p.read_bytes()).hexdigest(), p.relative_to(root).as_posix()]
)
for p in sorted(paths)
]
hashfile.write_text("\n".join(lines))
def get_lite_config_paths(self) -> Generator[Path, None, None]:
"""Yield all config paths that exist in the ``lite_dir``."""
for app in [None, *self.manager.apps]:
app_dir = self.manager.lite_dir / app if app else self.manager.output_dir
for path_name in [JUPYTERLITE_JSON, JUPYTERLITE_IPYNB]:
config_path = app_dir / path_name
if config_path.exists():
yield config_path
def get_output_config_paths(self) -> Generator[Path, None, None]:
"""Yield all config paths that _might_ exist in the ``output_dir``."""
for app in [None, *self.manager.apps]:
app_dir = self.manager.output_dir / app if app else self.manager.output_dir
for path_name in [JUPYTERLITE_JSON, JUPYTERLITE_IPYNB]:
config_path = app_dir / path_name
yield config_path
def get_lite_plugin_settings(
self, config_path: Path, plugin_id: str
) -> Dict[str, Any]:
"""Get the plugin settings from a config path.
The keys follow the JupyterLab settings naming convention, of module and
identifier e.g.
@jupyterlite/contents:plugin
"""
if not config_path.exists():
return {}
config = json.loads(config_path.read_text(**UTF8))
# if a notebook, look in the top-level metadata (which must exist)
if config_path.name == JUPYTERLITE_IPYNB:
config = config["metadata"].get(JUPYTERLITE_METADATA, {})
return (
config.get(JUPYTER_CONFIG_DATA, {})
.get(LITE_PLUGIN_SETTINGS, {})
.get(plugin_id, {})
)
def set_lite_plugin_settings(
self, config_path: Path, plugin_id: str, settings: Dict[str, Any]
) -> None:
"""Overwrite the plugin settings for a single plugin in a config path."""
whole_file = config = json.loads(config_path.read_text(**UTF8))
if config_path.name == JUPYTERLITE_IPYNB:
config = whole_file["metadata"][JUPYTERLITE_METADATA]
config.setdefault(JUPYTER_CONFIG_DATA, {}).setdefault(
LITE_PLUGIN_SETTINGS, {}
).update({plugin_id: settings})
config_path.write_text(json.dumps(whole_file, **JSON_FMT), **UTF8)
self.log.debug("%s wrote settings in %s: %s", plugin_id, config_path, settings)
self.maybe_timestamp(config_path)
|
247e8288dffe795e52beb5bb397db4b4204f78be
|
0e4860fecfdd34a3255003cc8c8df086c14083dd
|
/python/source_code/source_code_of_lp3thw/ex24.py
|
7199b4deb93651333b6727fdcfeedd7fb5c3af17
|
[] |
no_license
|
anzhihe/learning
|
503ab9a58f280227011da5eaa4b14b46c678e6f3
|
66f7f801e1395207778484e1543ea26309d4b354
|
refs/heads/master
| 2023-08-08T11:42:11.983677
| 2023-07-29T09:19:47
| 2023-07-29T09:19:47
| 188,768,643
| 1,443
| 617
| null | 2023-08-24T02:10:34
| 2019-05-27T04:04:10
|
Python
|
UTF-8
|
Python
| false
| false
| 2,149
|
py
|
ex24.py
|
print("Let's practice everything.")
print('You\'d need to know \'bout escape with \\ that do:') #反斜杠是用来转换意义的\'是把单引号的公式功能注释掉,只保留纯意义上的字符,免得造成引用混乱。
print("You'd need to know about escape with \\ that do:")
print('\n newlines and \t tabs.')
poem = """
\tThe lovely world
with logic so firmly planted
cannot discern \n the needs of love
nor comprehend passion from intuition
and requires an explanation
\n\twhere there is none.
"""
# 上面可以看到\t这个转意字符的作用是在一段文字前面加一个tab
print("-------------")
print(poem)
print("-------------")
five = 10 - 2 + 3 - 6
print(f"This should be five: {five}")
def secret_formula(started):#这里started算是函数的一个种子。
jelly_beans = started * 500
jars = jelly_beans / 1000
crates = jars /100
return jelly_beans, jars, crates #一个函数返回多个变量。
start_point = 10000 #设置好种子的数值;注意这里将started这个参数替换为了start_point,具体叫啥名字都行.
beans, jars, crates = secret_formula(start_point) #将种子通过函数计算的结果分别赋予了3个变量,只不过这里新起了个变量名beans就是函数里的jelly_beans。
# remember that this is another way to format a string
print("With a starting point of: {}".format(start_point))#在字符串中引用变量的方法2.
# it's just like with an f"" string
print(f"We'd have {beans} beans, {jars} jars, and {crates} crates")
start_point = start_point / 10
print("We can also do that this way:")
formula = secret_formula(start_point)
# this is an easy way to apply a list to a format string
print ("We'd have {} beans, {} jars, and {} crates.".format(*formula))#在字符串中可以这样引用一组格式的变量。变量数要相等?
print ("We'd have {} beans, {} jars, and 23 crates.".format(*formula))#减少变量测试,结果是前两个{}可以有效承接变量。
# print ("We'd have {} beans, {} jars, and {} crates,and {} crazy.".format(*formula))#增加变量测试。结果是增加的{}无法有效承接变量。
|
d086c7fa1a3c490aaa69566f4cb65aaf5b55e069
|
493d86071bb96ef33a38623a144fe55e49a0aa44
|
/socceraction/data/opta/parsers/whoscored.py
|
0a8402914d0c2c7576da8179f11aa0fcb13dfb1b
|
[
"MIT"
] |
permissive
|
ML-KULeuven/socceraction
|
3b8d2411333114436239850d02278785ea0ed83b
|
1261a31cf99d0c9a819b67f568549aa47df83f08
|
refs/heads/master
| 2023-08-31T02:25:42.349813
| 2023-08-30T08:53:01
| 2023-08-30T08:53:01
| 194,881,505
| 517
| 131
|
MIT
| 2023-09-14T09:46:42
| 2019-07-02T14:38:30
|
Python
|
UTF-8
|
Python
| false
| false
| 18,167
|
py
|
whoscored.py
|
"""JSON parser for WhoScored feeds."""
import json # type: ignore
import re
from datetime import datetime, timedelta
from typing import Any, Dict, Optional, Tuple
from ...base import MissingDataError
from .base import OptaParser, _get_end_x, _get_end_y, assertget
def _position_mapping(formation: str, x: float, y: float) -> str:
if x == 0 and y == 5:
return "GK"
return "Unknown"
class WhoScoredParser(OptaParser):
"""Extract data from a JSON data stream scraped from WhoScored.
Parameters
----------
path : str
Path of the data file.
competition_id : int
ID of the competition to which the provided data file belongs. If
None, this information is extracted from a field 'competition_id' in
the JSON.
season_id : int
ID of the season to which the provided data file belongs. If None,
this information is extracted from a field 'season_id' in the JSON.
game_id : int
ID of the game to which the provided data file belongs. If None, this
information is extracted from a field 'game_id' in the JSON.
"""
def __init__( # noqa: C901
self,
path: str,
competition_id: Optional[int] = None,
season_id: Optional[int] = None,
game_id: Optional[int] = None,
) -> None:
with open(path, encoding="utf-8") as fh:
self.root = json.load(fh)
if competition_id is None:
try:
competition_id = int(assertget(self.root, "competition_id"))
except AssertionError as e:
raise MissingDataError(
"""Could not determine the competition id. Add it to the
file path or include a field 'competition_id' in the
JSON."""
) from e
self.competition_id = competition_id
if season_id is None:
try:
season_id = int(assertget(self.root, "season_id"))
except AssertionError as e:
raise MissingDataError(
"""Could not determine the season id. Add it to the file
path or include a field 'season_id' in the JSON."""
) from e
self.season_id = season_id
if game_id is None:
try:
game_id = int(assertget(self.root, "game_id"))
except AssertionError as e:
raise MissingDataError(
"""Could not determine the game id. Add it to the file
path or include a field 'game_id' in the JSON."""
) from e
self.game_id = game_id
def _get_period_id(self, event: Dict[str, Any]) -> int:
period = assertget(event, "period")
period_id = int(assertget(period, "value"))
return period_id
def _get_period_milliseconds(self, event: Dict[str, Any]) -> int:
period_minute_limits = assertget(self.root, "periodMinuteLimits")
period_id = self._get_period_id(event)
if period_id == 16: # Pre-match
return 0
if period_id == 14: # Post-game
return 0
minute = int(assertget(event, "minute"))
period_minute = minute
if period_id > 1:
period_minute = minute - period_minute_limits[str(period_id - 1)]
period_second = period_minute * 60 + int(event.get("second", 0))
return period_second * 1000
def extract_games(self) -> Dict[int, Dict[str, Any]]:
"""Return a dictionary with all available games.
Returns
-------
dict
A mapping between game IDs and the information available about
each game in the data stream.
"""
team_home = assertget(self.root, "home")
team_away = assertget(self.root, "away")
game_dict = dict(
# Fields required by the base schema
game_id=self.game_id,
season_id=self.season_id,
competition_id=self.competition_id,
game_day=None, # Cannot be determined from the data stream
game_date=datetime.strptime(
assertget(self.root, "startTime"), "%Y-%m-%dT%H:%M:%S"
), # Dates are UTC
home_team_id=int(assertget(team_home, "teamId")),
away_team_id=int(assertget(team_away, "teamId")),
# Optional fields
home_score=int(assertget(assertget(self.root["home"], "scores"), "running")),
away_score=int(assertget(assertget(self.root["away"], "scores"), "running")),
duration=int(self.root.get("expandedMaxMinute"))
if "expandedMaxMinute" in self.root
else None,
referee=self.root.get("referee", {}).get("name"),
venue=self.root.get("venueName"),
attendance=int(self.root.get("attendance")) if "attendance" in self.root else None,
home_manager=team_home.get("managerName"),
away_manager=team_away.get("managerName"),
)
return {self.game_id: game_dict}
def extract_teams(self) -> Dict[int, Dict[str, Any]]:
"""Return a dictionary with all available teams.
Returns
-------
dict
A mapping between team IDs and the information available about
each team in the data stream.
"""
teams = {}
for side in [self.root["home"], self.root["away"]]:
team_id = int(assertget(side, "teamId"))
teams[team_id] = dict(
# Fields required by the base schema
team_id=team_id,
team_name=assertget(side, "name"),
)
return teams
def extract_players(self) -> Dict[Tuple[int, int], Dict[str, Any]]:
"""Return a dictionary with all available players.
Returns
-------
dict
A mapping between (game ID, player ID) tuples and the information
available about each player in the data stream.
"""
game_id = self.game_id
player_gamestats = self.extract_playergamestats()
players = {}
for team in [self.root["home"], self.root["away"]]:
team_id = int(assertget(team, "teamId"))
for p in team["players"]:
player_id = int(assertget(p, "playerId"))
players[(game_id, player_id)] = dict(
# Fields required by the base schema
game_id=game_id,
team_id=team_id,
player_id=player_id,
player_name=assertget(p, "name"),
is_starter=bool(p.get("isFirstEleven", False)),
minutes_played=player_gamestats[(game_id, player_id)]["minutes_played"],
jersey_number=player_gamestats[(game_id, player_id)]["jersey_number"],
# Fields required by the opta schema
starting_position=player_gamestats[(game_id, player_id)]["position_code"],
# Optional fields
# WhoScored retrieves player details for the current date,
# not for the game date. Hence, we do not innclude this
# info.
# age=int(p["age"]),
# height=float(p.get("height", float("NaN"))),
# weight=float(p.get("weight", float("NaN"))),
)
return players
def extract_events(self) -> Dict[Tuple[int, int], Dict[str, Any]]:
"""Return a dictionary with all available events.
Returns
-------
dict
A mapping between (game ID, event ID) tuples and the information
available about each event in the data stream.
"""
events = {}
time_start_str = assertget(self.root, "startTime")
time_start = datetime.strptime(time_start_str, "%Y-%m-%dT%H:%M:%S")
for attr in self.root["events"]:
event_id = int(assertget(attr, "id" if "id" in attr else "eventId"))
eventtype = attr.get("type", {})
start_x = float(assertget(attr, "x"))
start_y = float(assertget(attr, "y"))
minute = int(assertget(attr, "expandedMinute"))
second = int(attr.get("second", 0))
qualifiers = {
int(q["type"]["value"]): q.get("value", True) for q in attr.get("qualifiers", [])
}
end_x = attr.get("endX") or _get_end_x(qualifiers) or start_x
end_y = attr.get("endY") or _get_end_y(qualifiers) or start_y
events[(self.game_id, event_id)] = dict(
# Fields required by the base schema
game_id=self.game_id,
event_id=event_id,
period_id=self._get_period_id(attr),
team_id=int(assertget(attr, "teamId")),
player_id=int(attr.get("playerId")) if "playerId" in attr else None,
type_id=int(assertget(eventtype, "value")),
# type_name=assertget(eventtype, "displayName"), # added in the opta loader
# Fields required by the opta schema
# Timestamp is not availe in the data stream. The returned
# timestamp is not accurate, but sufficient for camptability
# with the other Opta data streams.
timestamp=(time_start + timedelta(seconds=(minute * 60 + second))),
minute=minute,
second=second,
outcome=bool(attr["outcomeType"].get("value")) if "outcomeType" in attr else None,
start_x=start_x,
start_y=start_y,
end_x=end_x,
end_y=end_y,
qualifiers=qualifiers,
# Optional fields
related_player_id=int(attr.get("relatedPlayerId"))
if "relatedPlayerId" in attr
else None,
touch=bool(attr.get("isTouch", False)),
goal=bool(attr.get("isGoal", False)),
shot=bool(attr.get("isShot", False)),
# assist=bool(attr.get('assist')) if "assist" in attr else None,
# keypass=bool(attr.get('keypass')) if "keypass" in attr else None,
)
return events
def extract_substitutions(self) -> Dict[Tuple[int, int], Dict[str, Any]]:
"""Return a dictionary with all substitution events.
Returns
-------
dict
A mapping between (game ID, player ID) tuples and the information
available about each substitution in the data stream.
"""
subs = {}
subonevents = [e for e in self.root["events"] if e["type"].get("value") == 19]
for e in subonevents:
sub_id = int(assertget(e, "playerId"))
sub = dict(
game_id=self.game_id,
team_id=int(assertget(e, "teamId")),
period_id=self._get_period_id(e),
period_milliseconds=self._get_period_milliseconds(e),
player_in_id=int(assertget(e, "playerId")),
player_out_id=int(assertget(e, "relatedPlayerId")),
)
subs[(self.game_id, sub_id)] = sub
return subs
def extract_positions(self) -> Dict[Tuple[int, int, int], Dict[str, Any]]: # noqa: C901
"""Return a dictionary with each player's position during a game.
Returns
-------
dict
A mapping between (game ID, player ID, epoch ID) tuples and the
information available about each player's position in the data stream.
"""
positions = {}
for t in [self.root["home"], self.root["away"]]:
team_id = int(assertget(t, "teamId"))
for f in assertget(t, "formations"):
fpositions = assertget(f, "formationPositions")
playersIds = assertget(f, "playerIds")
formation = assertget(f, "formationName")
period_end_minutes = assertget(self.root, "periodEndMinutes")
period_minute_limits = assertget(self.root, "periodMinuteLimits")
start_minute = int(assertget(f, "startMinuteExpanded"))
end_minute = int(assertget(f, "endMinuteExpanded"))
for period_id in sorted(period_end_minutes.keys()):
if period_end_minutes[period_id] > start_minute:
break
period_id = int(period_id)
period_minute = start_minute
if period_id > 1:
period_minute = start_minute - period_minute_limits[str(period_id - 1)]
for i, p in enumerate(fpositions):
player_id = int(playersIds[i])
x = float(assertget(p, "vertical"))
y = float(assertget(p, "horizontal"))
position_code = _position_mapping(formation, x, y)
positions[(self.game_id, player_id, start_minute)] = dict(
game_id=self.game_id,
team_id=team_id,
player_id=player_id,
period_id=period_id,
period_milliseconds=(period_minute * 60 * 1000),
start_milliseconds=(start_minute * 60 * 1000),
end_milliseconds=(end_minute * 60 * 1000),
formation_scheme=formation,
player_position=position_code,
player_position_x=x,
player_position_y=y,
)
return positions
def extract_teamgamestats(self) -> Dict[Tuple[int, int], Dict[str, Any]]:
"""Return some aggregated statistics of each team in a game.
Returns
-------
list(dict)
A dictionary with aggregated team statistics for each team.
"""
teams_gamestats = {}
teams = [self.root["home"], self.root["away"]]
for team in teams:
team_id = int(assertget(team, "teamId"))
statsdict = {}
for name in team["stats"]:
if isinstance(team["stats"][name], dict):
statsdict[_camel_to_snake(name)] = sum(team["stats"][name].values())
scores = assertget(team, "scores")
teams_gamestats[(self.game_id, team_id)] = dict(
game_id=self.game_id,
team_id=team_id,
side=assertget(team, "field"),
score=assertget(scores, "fulltime"),
shootout_score=scores.get("penalty"),
**{k: statsdict[k] for k in statsdict if not k.endswith("Success")},
)
return teams_gamestats
def extract_playergamestats(self) -> Dict[Tuple[int, int], Dict[str, Any]]: # noqa: C901
"""Return some aggregated statistics of each player in a game.
Returns
-------
dict(dict)
A dictionary with aggregated team statistics for each player.
"""
players_gamestats = {}
for team in [self.root["home"], self.root["away"]]:
team_id = int(assertget(team, "teamId"))
red_cards = {
e["playerId"]: e["expandedMinute"]
for e in team.get("incidentEvents", [])
if "cardType" in e
and e["cardType"]["displayName"] in ["Red", "SecondYellow"]
and "playerId" in e # not defined if a coach receives a red card
}
for player in team["players"]:
statsdict = {
_camel_to_snake(name): sum(stat.values())
for name, stat in player["stats"].items()
}
stats = [k for k in statsdict if not k.endswith("success")]
player_id = int(assertget(player, "playerId"))
p = dict(
game_id=self.game_id,
team_id=team_id,
player_id=player_id,
is_starter=bool(player.get("isFirstEleven", False)),
position_code=player.get("position", None),
jersey_number=int(player.get("shirtNo", 0)),
mvp=bool(player.get("isManOfTheMatch", False)),
**{k: statsdict[k] for k in stats},
)
if "subbedInExpandedMinute" in player:
p["minute_start"] = player["subbedInExpandedMinute"]
if "subbedOutExpandedMinute" in player:
p["minute_end"] = player["subbedOutExpandedMinute"]
if player_id in red_cards:
p["minute_end"] = red_cards[player_id]
# Did not play
p["minutes_played"] = 0
# Played the full game
if p["is_starter"] and "minute_end" not in p:
p["minute_start"] = 0
p["minute_end"] = self.root["expandedMaxMinute"]
p["minutes_played"] = self.root["expandedMaxMinute"]
# Started but substituted out
elif p["is_starter"] and "minute_end" in p:
p["minute_start"] = 0
p["minutes_played"] = p["minute_end"]
# Substitud in and played the remainder of the game
elif "minute_start" in p and "minute_end" not in p:
p["minute_end"] = self.root["expandedMaxMinute"]
p["minutes_played"] = self.root["expandedMaxMinute"] - p["minute_start"]
# Substitud in and out
elif "minute_start" in p and "minute_end" in p:
p["minutes_played"] = p["minute_end"] - p["minute_start"]
players_gamestats[(self.game_id, player_id)] = p
return players_gamestats
def _camel_to_snake(name: str) -> str:
s1 = re.sub("(.)([A-Z][a-z]+)", r"\1_\2", name)
return re.sub("([a-z0-9])([A-Z])", r"\1_\2", s1).lower()
|
c9868a39bba2bcf30ff7a5b55684a9b37dea48f5
|
f2c1c86b1eedf46e62834644758a44e16dde6119
|
/keepercommander/sox/sox_data.py
|
601b57221d4d7729fb5f012a10e47658517329b4
|
[
"MIT"
] |
permissive
|
Keeper-Security/Commander
|
8ba7e3dbe2a75ca524546e0714ed180c714a01e2
|
06cb3af20a5c115b09d7276d5f618545278e5351
|
refs/heads/master
| 2023-08-30T19:28:58.166103
| 2023-08-25T19:17:36
| 2023-08-25T20:14:29
| 41,707,343
| 201
| 90
|
MIT
| 2023-09-11T19:05:15
| 2015-09-01T00:19:47
|
Python
|
UTF-8
|
Python
| false
| false
| 10,461
|
py
|
sox_data.py
|
import logging
from typing import Iterable, Dict, Set, List, Optional
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePrivateKey
from . import sox_types, sqlite_storage, storage_types
from .sox_types import RecordPermissions, SharedFolder
from .. import crypto, utils
from ..error import Error
from ..params import KeeperParams
class RebuildTask:
def __init__(self, is_full_sync, load_compliance_data=False, load_aging_data=False):
# type: (bool, bool, bool) -> None
self.is_full_sync = is_full_sync # type: bool
self.load_compliance_data = load_compliance_data # type: bool
self.records = set() # type: Set[str]
self.load_aging_data = load_aging_data # type: bool
def update_records(self, record_ids): # type: (Iterable[str]) -> None
if self.is_full_sync:
return
self.records.update(record_ids)
def get_ec_private_key(params): # type: (KeeperParams) -> EllipticCurvePrivateKey
tree_key = params.enterprise['unencrypted_tree_key']
ecc_key = utils.base64_url_decode(params.enterprise['keys']['ecc_encrypted_private_key'])
ecc_key = crypto.decrypt_aes_v2(ecc_key, tree_key)
return crypto.load_ec_private_key(ecc_key)
def clear_lookup(lookup, uids=None): # type: (dict, Optional[Iterable]) -> None
if uids:
[lookup.pop(k) for k in uids]
else:
lookup.clear()
class SoxData:
def __init__(self, params, storage, no_cache=False):
# type: (KeeperParams, sqlite_storage.SqliteSoxStorage, Optional[bool]) -> None
self.storage = storage # type: sqlite_storage.SqliteSoxStorage
self._records = {} # type: Dict[str, sox_types.Record]
self._users = {} # type: Dict[int, sox_types.EnterpriseUser]
self._teams = {} # type: Dict[str, sox_types.Team]
self._shared_folders = {} # type: Dict[str, sox_types.SharedFolder]
self.ec_private_key = get_ec_private_key(params)
self.tree_key = params.enterprise.get('unencrypted_tree_key', b'')
task = RebuildTask(True)
self.rebuild_data(task, no_cache)
def get_records(self, record_ids=None):
return self._records if record_ids is None else {uid: self._records.get(uid) for uid in record_ids}
def get_user(self, uid): # type: (int) -> sox_types.EnterpriseUser
return self._users.get(uid)
def get_users(self, user_ids=None):
return self._users if user_ids is None else {uid: self.get_user(uid) for uid in user_ids}
def get_team(self, team_uid):
return self._teams.get(team_uid)
def get_teams(self, team_uids=None):
return self._teams if team_uids is None else {uid: self.get_team(uid) for uid in team_uids}
def get_user_records(self, user_uids=None):
if user_uids:
users = set()
for uid in user_uids:
user = self.get_user(uid)
if user:
users.add(user)
else:
users = self._users.values()
recs = set()
for user in users:
for r_uid in user.records:
recs.add(sox_types.UserRecord(user.user_uid, self._records.get(r_uid)))
return recs
def get_shared_folders(self, sf_uids=None):
return self._shared_folders if sf_uids is None else {uid: self._shared_folders.get(uid) for uid in sf_uids}
def get_record_sfs(self, record_uid):
get_ruids = lambda sf: [rp.record_uid for rp in sf.record_permissions]
return [sf.folder_uid for sf in self._shared_folders.values() if record_uid in get_ruids(sf)]
def get_record_owner(self, rec_uid):
owner = None
if rec_uid in self._records:
for user in self._users.values():
if rec_uid in user.records:
owner = user
break
return owner
def clear_records(self, uids=None):
clear_lookup(self._records, uids)
def clear_users(self, uids=None):
clear_lookup(self._users, uids)
def clear_teams(self, uids=None):
clear_lookup(self._teams, uids)
def clear_shared_folders(self, uids=None):
clear_lookup(self._shared_folders, uids)
def clear_all(self):
self.clear_records()
self.clear_users()
self.clear_teams()
self.clear_shared_folders()
@property
def record_count(self): # type: () -> int
return len(self._records)
def rebuild_data(self, changes, no_cache=False): # type: (RebuildTask, Optional[bool]) -> None
def decrypt(data): # type: (bytes) -> str
decrypted = ''
try:
decrypted_bytes = crypto.decrypt_aes_v1(data, self.tree_key) if data else b''
decrypted = decrypted_bytes.decode()
except Error as e:
logging.info(f'Error decrypting data: type = {type(data)}, value = {data}, message = {e.message}')
return decrypted
def link_record_permissions(store, record_lookup):
links = store.get_record_permissions().get_all_links()
for link in links:
record = record_lookup.get(link.record_uid)
if record:
record.user_permissions.update({link.user_uid: link.permissions})
else:
logging.info(f'record (uid = {link.record_uid}) not found')
return record_lookup
def load_records(store, changes):
# type: (sqlite_storage.SqliteSoxStorage, RebuildTask) -> Dict[str, sox_types.Record]
entities = [] # type: List[storage_types.StorageRecord]
if changes.records:
for uid in changes.records:
entity = store.records.get_entity(uid)
if entity:
entities.append(entity)
else:
entities.extend(store.records.get_all())
record_lookup = {}
for entity in entities:
record = self._records.get(entity.record_uid) or sox_types.Record()
record.update_properties(entity, self.ec_private_key)
record_lookup[record.record_uid] = record
record_lookup = link_record_aging(store, record_lookup)
return link_record_permissions(store, record_lookup) if changes.load_compliance_data else record_lookup
def link_record_aging(store, record_lookup):
for aging in store.record_aging.get_all():
record = record_lookup.get(aging.record_uid)
if record:
record.created = aging.created
record.last_pw_change = aging.last_pw_change
return record_lookup
def link_user_records(store, user_lookup):
links = store.get_user_record_links().get_all_links()
for link in links:
user = user_lookup.get(link.user_uid)
if user:
user.records.append(link.record_uid)
else:
logging.info(f'user (uid = {link.user_uid} not found')
return user_lookup
def load_users(store): # type: (sqlite_storage.SqliteSoxStorage) -> Dict[int, sox_types.EnterpriseUser]
users = [sox_types.EnterpriseUser.load(eu, decrypt_fn=decrypt) for eu in store.users.get_all()]
u_lookup = {user.user_uid: user for user in users}
return link_user_records(store, u_lookup)
def load_teams(store):
teams = [sox_types.Team.load(entity) for entity in store.teams.get_all()]
team_lookup = {team.team_uid: team for team in teams}
return link_team_users(store, team_lookup)
def link_team_users(store, team_lookup):
links = store.get_team_user_links().get_all_links()
for link in links:
team = team_lookup.get(link.team_uid)
team.users.append(link.user_uid)
return team_lookup
def load_shared_folders(store):
sf_lookup = dict() # type: Dict[str, SharedFolder]
sf_lookup = link_sf_records(store, sf_lookup)
sf_lookup = link_sf_users(store, sf_lookup)
sf_lookup = link_sf_teams(store, sf_lookup)
return sf_lookup
def link_sf_records(store, folder_lookup):
sf_record_links = store.get_sf_record_links().get_all_links()
for link in sf_record_links:
folder = folder_lookup[link.folder_uid] if link.folder_uid in folder_lookup \
else SharedFolder(link.folder_uid)
folder.update_record_permissions(RecordPermissions(link.record_uid, link.permissions))
folder_lookup[link.folder_uid] = folder
return folder_lookup
def link_sf_users(store, folder_lookup):
sf_user_links = store.get_sf_user_links().get_all_links()
for link in sf_user_links:
folder = folder_lookup[link.folder_uid] if link.folder_uid in folder_lookup \
else SharedFolder(link.folder_uid)
folder.users.add(link.user_uid)
folder_lookup[link.folder_uid] = folder
return folder_lookup
def link_sf_teams(store, folder_lookup):
sf_team_links = store.get_sf_team_links().get_all_links()
for link in sf_team_links:
folder = folder_lookup[link.folder_uid] if link.folder_uid in folder_lookup \
else SharedFolder(link.folder_uid)
folder.teams.add(link.team_uid)
folder_lookup[link.folder_uid] = folder
return folder_lookup
if changes.is_full_sync:
self.clear_all()
if changes.load_aging_data:
self.clear_records(changes.records)
if changes.load_compliance_data:
self._teams.update(load_teams(self.storage))
self._shared_folders.update(load_shared_folders(self.storage))
self._records.update(load_records(self.storage, changes))
if changes.is_full_sync or changes.load_compliance_data:
self._users.update(load_users(self.storage))
if no_cache:
self.storage.delete_db()
|
fcca6753296f24de4cc71a61e2be34829b07372c
|
fd61eb5dec053682ffd3d4887cbab1b56c564365
|
/examples/input_format/check_results.py
|
28d29a5d7c2541d07ffcc521145038ccc789b2cc
|
[
"Apache-2.0"
] |
permissive
|
crs4/pydoop
|
f6a0cc5687891a893fc806e4c5405d238aa6e286
|
c7233b3a9feceb6055ea4b23213f273daed65e58
|
refs/heads/develop
| 2023-08-20T22:35:11.500338
| 2022-01-20T16:25:51
| 2022-01-20T16:25:51
| 10,475,304
| 214
| 64
|
Apache-2.0
| 2022-01-20T16:19:10
| 2013-06-04T09:37:11
|
Python
|
UTF-8
|
Python
| false
| false
| 1,436
|
py
|
check_results.py
|
# BEGIN_COPYRIGHT
#
# Copyright 2009-2022 CRS4.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# END_COPYRIGHT
import sys
import logging
logging.basicConfig(level=logging.INFO)
import pydoop.hadut as hadut
import pydoop.test_support as pts
def get_res(output_dir):
all_data = hadut.collect_output(output_dir)
return pts.parse_mr_output(all_data, vtype=int)
def check(measured_res, expected_res):
res = pts.compare_counts(measured_res, expected_res)
if res:
return "ERROR: %s" % res
else:
return "OK."
def main(argv):
logger = logging.getLogger("main")
logger.setLevel(logging.INFO)
input_dir = argv[1]
output_dir = argv[2]
logger.info("checking results")
lwc = pts.LocalWordCount(input_dir)
measured_res = get_res(output_dir)
expected_res = lwc.expected_output
logger.info(check(measured_res, expected_res))
if __name__ == "__main__":
main(sys.argv)
|
612be4a446f33b7edb7285d1092c7f50aac68682
|
3eb3c4046b17e265930aaf89fa93f41896f243cb
|
/spynnaker_integration_tests/test_spike_source/test_variable_rate.py
|
6fef421f97f9b97b836cf279f96386c0da6c9dae
|
[
"Apache-2.0"
] |
permissive
|
SpiNNakerManchester/sPyNNaker
|
b177613a114cfc7e7687ec36c1f72a2f07f66977
|
891cfb3046f66185fd8df52d270380fa94c32eab
|
refs/heads/master
| 2023-09-01T11:28:21.252266
| 2023-08-17T08:07:43
| 2023-08-17T08:07:43
| 20,801,613
| 101
| 53
|
Apache-2.0
| 2023-09-14T18:39:29
| 2014-06-13T11:07:19
|
Python
|
UTF-8
|
Python
| false
| false
| 10,024
|
py
|
test_variable_rate.py
|
# Copyright (c) 2017 The University of Manchester
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import pyNN.spiNNaker as p
from spynnaker.pyNN.models.spike_source.spike_source_poisson_vertex import (
DURATION_FOREVER)
from spinnaker_testbase import BaseTestCase
import scipy
import numpy
def array(value):
return numpy.array(value).reshape(-1)
def variable_rate_options():
""" Test the various options that can be passed to a variable rate Poisson
"""
p.setup(1.0)
n_neurons = 2
run_time = 20000
seed = 0
pops = list()
pops.append(
p.Population(n_neurons, p.extra_models.SpikeSourcePoissonVariable(
rates=[10, 20, 50],
starts=[0, 5000, 10000]),
label="pop_a",
additional_parameters={"seed": seed}))
pops.append(
p.Population(n_neurons, p.extra_models.SpikeSourcePoissonVariable(
rates=[[1, 2, 5], [10, 20, 50]],
starts=[0, 5000, 10000]),
label="pop_b",
additional_parameters={"seed": seed}))
pops.append(
p.Population(n_neurons, p.extra_models.SpikeSourcePoissonVariable(
rates=[10, 20, 50],
starts=[100, 6000, 12000],
durations=[5000, 5000, 5000]),
label="pop_c",
additional_parameters={"seed": seed}))
pops.append(
p.Population(n_neurons, p.extra_models.SpikeSourcePoissonVariable(
rates=[[1, 2, 5], [10, 20, 50]],
starts=[0, 5000, 10000],
durations=[5000, 4000, 3000]),
label="pop_d",
additional_parameters={"seed": seed}))
pops.append(
p.Population(n_neurons, p.extra_models.SpikeSourcePoissonVariable(
rates=[[1, 2, 5], [10, 20, 50]],
starts=[[0, 5000, 10000], [1000, 6000, 11000]],
durations=[4000, 3000, 2000]),
label="pop_e",
additional_parameters={"seed": seed}))
pops.append(
p.Population(n_neurons, p.extra_models.SpikeSourcePoissonVariable(
rates=[[1, 2, 5], [10, 20, 50]],
starts=[[0, 5000, 10000], [1000, 6000, 11000]],
durations=[[4000, 3000, 2000], [3000, 2000, 1000]]),
label="pop_f",
additional_parameters={"seed": seed}))
pops.append(
p.Population(n_neurons, p.extra_models.SpikeSourcePoissonVariable(
rates=[[1, 2, 5], [10, 50]],
starts=[[0, 1000, 2000], [2000, 3000]]),
label="pop_g",
additional_parameters={"seed": seed}))
pops.append(
p.Population(n_neurons, p.SpikeSourcePoisson(rate=1),
label="pop_h", additional_parameters={"seed": seed}))
pops.append(
p.Population(n_neurons, p.SpikeSourcePoisson(rate=1, start=100),
label="pop_i", additional_parameters={"seed": seed}))
pops.append(
p.Population(n_neurons, p.SpikeSourcePoisson(rate=[1, 10]),
label="pop_j", additional_parameters={"seed": seed + 1}))
pops.append(
p.Population(
n_neurons, p.SpikeSourcePoisson(rate=1, start=[0, 5000]),
label="pop_k",
additional_parameters={"seed": seed}))
pops.append(
p.Population(
n_neurons, p.SpikeSourcePoisson(rate=1, start=10, duration=5000),
label="pop_l",
additional_parameters={"seed": seed}))
pops.append(
p.Population(n_neurons, p.SpikeSourcePoisson(
rate=[1, 10], start=[0, 5000], duration=5000),
label="pop_m",
additional_parameters={"seed": seed}))
pops.append(
p.Population(n_neurons, p.SpikeSourcePoisson(
rate=[1, 10], start=[0, 5000], duration=[5000, 8000]),
label="pop_n",
additional_parameters={"seed": seed}))
pops.append(
p.Population(n_neurons, p.SpikeSourcePoisson(
rate=1, duration=5000), label="pop_o"))
for pop in pops:
pop.record("spikes")
p.run(run_time)
all_spikes = list()
for pop in pops:
all_spikes.append(pop.get_data("spikes").segments[0].spiketrains)
p.end()
for pop, spikes in zip(pops, all_spikes):
print("")
print("==============================")
print(pop.label)
if isinstance(pop.celltype, p.SpikeSourcePoisson):
names = ["rate", "start", "duration"]
else:
names = ["rates", "starts", "durations"]
for i in range(n_neurons):
output = ""
values = []
for name in names:
output += "{}: {{}}; ".format(name)
values.append(pop.get(name)[i])
print(output.format(*values))
print(spikes[i])
# Check the rates
rates, starts, durations = (
array(values[0]), array(values[1]), array(values[2]))
ends = list()
for j, (start, duration) in enumerate(zip(starts, durations)):
if duration == DURATION_FOREVER and (j + 1) >= len(starts):
ends.append(run_time)
elif duration == DURATION_FOREVER:
ends.append(starts[j + 1])
else:
ends.append(start + duration)
for rate, start, end in zip(rates, starts, ends):
rate_spikes = spikes[i][(spikes[i] >= start) &
(spikes[i] < end)]
expected = (rate / 1000.0) * (end - start)
tolerance = scipy.stats.poisson.ppf(0.99, expected) - expected
n_spikes = len(rate_spikes)
print("Received {} spikes, expected {} spikes"
" (with tolerance {}) for rate {}"
" for duration {}".format(
n_spikes, expected, tolerance, rate, (end - start)))
assert n_spikes >= (expected - tolerance)
assert n_spikes <= (expected + tolerance)
def variable_rate_reset():
""" Test the ways of changing rates and ensure that they don't change the\
results
"""
p.setup(1.0)
pop = p.Population(100, p.extra_models.SpikeSourcePoissonVariable(
rates=[1, 10, 100], starts=[0, 1000, 2000]),
additional_parameters={"seed": 0})
pop_2 = p.Population(100, p.SpikeSourcePoisson(rate=1),
additional_parameters={"seed": 0, "max_rate": 100})
pop.record("spikes")
pop_2.record("spikes")
p.run(1000)
spikes_pop_2_1 = pop_2.get_data("spikes")
nump = [s.magnitude for s in spikes_pop_2_1.segments[0].spiketrains]
numpy.savetxt("spikesp2_1.txt", nump[0])
pop_2.set(rate=10)
p.run(1000)
spikes_pop_2_2 = pop_2.get_data("spikes")
nump = [s.magnitude for s in spikes_pop_2_2.segments[0].spiketrains]
numpy.savetxt("spikesp2_2.txt", nump[0])
pop_2.set(rate=100)
p.run(1000)
p.reset()
p.run(3000)
spikes_pop = pop.get_data("spikes")
spikes_pop_2 = pop_2.get_data("spikes")
p.end()
spikes_1 = [s.magnitude for s in spikes_pop.segments[0].spiketrains]
spikes_2 = [s.magnitude for s in spikes_pop.segments[1].spiketrains]
spikes_p_2 = [s.magnitude for s in spikes_pop_2.segments[0].spiketrains]
print(spikes_1)
numpy.savetxt("spikes1.txt", spikes_1[0])
print(spikes_2)
numpy.savetxt("spikes2.txt", spikes_2[0])
print(spikes_p_2)
numpy.savetxt("spikesp2.txt", spikes_p_2[0])
for s1, s2, s3 in zip(spikes_1, spikes_2, spikes_p_2):
assert numpy.array_equal(s1, s2)
assert numpy.array_equal(s2, s3)
def variable_rate_100us():
""" Test that the source works at 0.1ms timesteps
"""
rates = [1, 10, 100]
starts = [0, 1000, 1500]
ends = [1000, 1500, 2000]
p.setup(0.1)
pop = p.Population(100, p.extra_models.SpikeSourcePoissonVariable(
rates=rates, starts=starts),
additional_parameters={"seed": 0})
pop.record("spikes")
run_time = 2000
p.run(run_time)
spikes = pop.get_data("spikes").segments[0].spiketrains
p.end()
n_spikes = dict()
for i in range(len(spikes)):
for rate, start, end in zip(rates, starts, ends):
rate_spikes = spikes[i][(spikes[i] >= start) &
(spikes[i] < end)]
if (rate, start, end) not in n_spikes:
n_spikes[rate, start, end] = len(rate_spikes)
else:
n_spikes[rate, start, end] += len(rate_spikes)
for rate, start, end in n_spikes:
expected = (rate / 1000.0) * (end - start)
tolerance = scipy.stats.poisson.ppf(0.99, expected) - expected
n_spikes_rate = n_spikes[rate, start, end] / 100.0
print("Received {} spikes, expected {} spikes"
" (with tolerance {}) for rate {}"
" for duration {}".format(
n_spikes_rate, expected, tolerance, rate, (end - start)))
assert n_spikes_rate >= (expected - tolerance)
assert n_spikes_rate <= (expected + tolerance)
class TestCreatePoissons(BaseTestCase):
def test_variable_rate_options(self):
self.runsafe(variable_rate_options)
def test_rate_reset(self):
self.runsafe(variable_rate_reset)
def test_variable_rate_100us(self):
self.runsafe(variable_rate_100us)
if __name__ == '__main__':
variable_rate_options()
# variable_rate_reset()
# variable_rate_100us()
|
15d2d0b66715168e6c7cde3727efab4e5d463456
|
5a6ccde5f37cc86b6fc0812b2bf40f42eab23906
|
/B-set/122B.Lucky Substring.py
|
34eaef77113a06c4337241dc23ea6db8d714e6ab
|
[] |
no_license
|
Waqar-107/Codeforces
|
23f2b1edffb85f6f020107f03e09a455d3e6e792
|
f0d2f25aa6a09c06083b82c39cdf3288ec2eecba
|
refs/heads/master
| 2023-03-09T07:55:46.583363
| 2023-03-04T09:57:44
| 2023-03-04T09:57:44
| 82,915,896
| 196
| 138
| null | 2023-02-11T22:06:20
| 2017-02-23T10:29:34
|
C++
|
UTF-8
|
Python
| false
| false
| 241
|
py
|
122B.Lucky Substring.py
|
#from dust i have come dust i will be
n=input()
f=0
s=0
for i in range(len(n)):
if n[i]=='4':
f+=1
elif n[i]=='7':
s+=1
if f==0 and s==0:
print(-1)
else:
if s>f:
print(7)
else:
print(4)
|
9ae105ea29d607d99f24efbb79322845726c7755
|
49b58731978b930bf90b6c5a69c99c56081d282f
|
/loophole/polar/pb/pftp_notification_pb2.py
|
06c8a143ad3d0b0eb0c8599682670eeb497037a4
|
[
"MIT"
] |
permissive
|
rsc-dev/loophole
|
e12c4c82479f0680792863b1708fc46fae2d96e9
|
f9389c73f06b419c97ad32847346663a30d80225
|
refs/heads/master
| 2021-08-19T03:13:29.839236
| 2021-01-12T17:34:32
| 2021-01-12T17:34:32
| 50,019,628
| 158
| 20
|
MIT
| 2020-05-12T06:57:36
| 2016-01-20T09:33:47
|
Python
|
UTF-8
|
Python
| false
| true
| 57,591
|
py
|
pftp_notification_pb2.py
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pftp/pftp_notification.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
import types_pb2 as types__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='pftp/pftp_notification.proto',
package='protocol',
syntax='proto2',
serialized_pb=_b('\n\x1cpftp/pftp_notification.proto\x12\x08protocol\x1a\x0btypes.proto\"P\n\x1ePbPFtpFilesystemModifiedParams\x12 \n\x06\x61\x63tion\x18\x01 \x02(\x0e\x32\x10.protocol.Action\x12\x0c\n\x04path\x18\x02 \x02(\t\"*\n\x15PbPFtpInactivityAlert\x12\x11\n\tcountdown\x18\x01 \x02(\r\"1\n\x1bPbPFtpTrainingSessionStatus\x12\x12\n\ninprogress\x18\x01 \x02(\x08\"D\n\x1aPbPFtpAutoSyncStatusParams\x12\x11\n\tsucceeded\x18\x01 \x02(\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"F\n\x1dPbPFtpPolarShellMessageParams\x12\x17\n\x0fpolarShellMsgId\x18\x01 \x02(\r\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\t\"H\n\x14PbPftpPnsDHAttribute\x12\x30\n\x04type\x18\x01 \x02(\x0e\x32\".protocol.PbPftpPnsDHAttributeType\"n\n\x1fPbPftpPnsDHNotificationResponse\x12\x17\n\x0fnotification_id\x18\x01 \x02(\r\x12\x32\n\nattributes\x18\x02 \x03(\x0b\x32\x1e.protocol.PbPftpPnsDHAttribute\"H\n\x0ePbPftpPnsState\x12\x1d\n\x15notifications_enabled\x18\x01 \x02(\x08\x12\x17\n\x0fpreview_enabled\x18\x02 \x01(\x08\"u\n\x19PbPftpStartGPSMeasurement\x12\x1e\n\x10minimum_interval\x18\x01 \x01(\r:\x04\x31\x30\x30\x30\x12\x13\n\x08\x61\x63\x63uracy\x18\x02 \x01(\r:\x01\x32\x12\x10\n\x08latitude\x18\x03 \x01(\x01\x12\x11\n\tlongitude\x18\x04 \x01(\x01\"B\n\x19PbInitializeSessionParams\x12%\n\x1duses_attribute_level_response\x18\x01 \x01(\x08\"4\n\x1fPbFirmwareUpdateAvailableParams\x12\x11\n\tmandatory\x18\x01 \x02(\x08\"X\n\x1fPbPFtpSimulateButtonPressParams\x12\x18\n\x06\x62utton\x18\x01 \x02(\x0e\x32\x08.Buttons\x12\x1b\n\x05state\x18\x02 \x02(\x0e\x32\x0c.ButtonState\"3\n\x13PbPFtpTouchPosition\x12\x0b\n\x03pos\x18\x01 \x02(\r\x12\x0f\n\x07max_pos\x18\x02 \x01(\r\"\xa2\x02\n\x1fPbPFtpSimulateTouchScreenParams\x12I\n\x05state\x18\x01 \x02(\x0e\x32:.protocol.PbPFtpSimulateTouchScreenParams.PbPFtpTouchState\x12,\n\x05x_pos\x18\x02 \x01(\x0b\x32\x1d.protocol.PbPFtpTouchPosition\x12,\n\x05y_pos\x18\x03 \x01(\x0b\x32\x1d.protocol.PbPFtpTouchPosition\"X\n\x10PbPFtpTouchState\x12\x15\n\x11TOUCH_STATE_START\x10\x00\x12\x18\n\x14TOUCH_STATE_POSITION\x10\x01\x12\x13\n\x0fTOUCH_STATE_END\x10\x02\">\n\x14PbPFtpStopSyncParams\x12\x11\n\tcompleted\x18\x01 \x02(\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"i\n\x18PbPFtpFactoryResetParams\x12\r\n\x05sleep\x18\x01 \x02(\x08\x12!\n\x13\x64o_factory_defaults\x18\x02 \x01(\x08:\x04true\x12\x1b\n\x0cota_fwupdate\x18\x03 \x01(\x08:\x05\x66\x61lse\",\n\x19PbPFtpStartAutosyncParams\x12\x0f\n\x07timeout\x18\x01 \x02(\r\"s\n\x14PbPftpPnsHDAttribute\x12\x30\n\x04type\x18\x01 \x02(\x0e\x32\".protocol.PbPftpPnsHDAttributeType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\t\x12\x1b\n\x13\x61ttribute_full_size\x18\x03 \x01(\r\"\xb9\x02\n\x17PbPftpPnsHDNotification\x12\x17\n\x0fnotification_id\x18\x01 \x02(\r\x12\x34\n\x0b\x63\x61tegory_id\x18\x02 \x02(\x0e\x32\x1f.protocol.PbPftpPnsHDCategoryID\x12 \n\x06\x61\x63tion\x18\x03 \x02(\x0e\x32\x10.protocol.Action\x12$\n\nissue_time\x18\x04 \x02(\x0b\x32\x10.PbLocalDateTime\x12\'\n\x1fnew_same_category_notifications\x18\x05 \x01(\r\x12*\n\"unread_same_category_notifications\x18\x06 \x01(\r\x12\x32\n\nattributes\x18\x07 \x03(\x0b\x32\x1e.protocol.PbPftpPnsHDAttribute\"\x9c\x01\n\x13PbPFtpGPSDataParams\x12\x10\n\x08latitude\x18\x01 \x02(\x01\x12\x11\n\tlongitude\x18\x02 \x02(\x01\x12\r\n\x05speed\x18\x03 \x01(\x02\x12\x10\n\x08\x64istance\x18\x04 \x01(\x02\x12\x10\n\x08\x61ltitude\x18\x05 \x01(\x02\x12\x18\n\x10satellite_amount\x18\x06 \x01(\r\x12\x13\n\x0btime_offset\x18\x07 \x01(\r*\xe7\x02\n\x1bPbPFtpDevToHostNotification\x12\x17\n\x13\x46ILESYSTEM_MODIFIED\x10\x00\x12\x17\n\x13INTERNAL_TEST_EVENT\x10\x01\x12\n\n\x06IDLING\x10\x02\x12\x12\n\x0e\x42\x41TTERY_STATUS\x10\x03\x12\x14\n\x10INACTIVITY_ALERT\x10\x04\x12\x1b\n\x17TRAINING_SESSION_STATUS\x10\x05\x12\x11\n\rSYNC_REQUIRED\x10\x07\x12\x13\n\x0f\x41UTOSYNC_STATUS\x10\x08\x12 \n\x1cPNS_DH_NOTIFICATION_RESPONSE\x10\t\x12\x10\n\x0cPNS_SETTINGS\x10\n\x12\x19\n\x15START_GPS_MEASUREMENT\x10\x0b\x12\x18\n\x14STOP_GPS_MEASUREMENT\x10\x0c\x12\x19\n\x15KEEP_BACKGROUND_ALIVE\x10\r\x12\x17\n\x13POLAR_SHELL_DH_DATA\x10\x0e*/\n\x06\x41\x63tion\x12\x0b\n\x07\x43REATED\x10\x00\x12\x0b\n\x07UPDATED\x10\x01\x12\x0b\n\x07REMOVED\x10\x02*\xa2\x01\n\x18PbPftpPnsDHAttributeType\x12\x12\n\x0eUNKNOWN_ACTION\x10\x01\x12\x13\n\x0fPOSITIVE_ACTION\x10\x02\x12\x13\n\x0fNEGATIVE_ACTION\x10\x03\x12\x10\n\x0c\x43LEAR_ACTION\x10\x04\x12\x0c\n\x08\x41_ACTION\x10\x05\x12\x0c\n\x08\x42_ACTION\x10\x06\x12\x0c\n\x08\x43_ACTION\x10\x07\x12\x0c\n\x08\x44_ACTION\x10\x08*\x94\x03\n\x1bPbPFtpHostToDevNotification\x12\x0e\n\nSTART_SYNC\x10\x00\x12\r\n\tSTOP_SYNC\x10\x01\x12\t\n\x05RESET\x10\x02\x12\x18\n\x14LOCK_PRODUCTION_DATA\x10\x03\x12\x12\n\x0eTERMINATE_SYNC\x10\x04\x12\x0e\n\nKEEP_ALIVE\x10\x05\x12\x12\n\x0eSTART_AUTOSYNC\x10\x06\x12\x17\n\x13PNS_HD_NOTIFICATION\x10\x07\x12\x16\n\x12INITIALIZE_SESSION\x10\x08\x12\x15\n\x11TERMINATE_SESSION\x10\t\x12\x19\n\x15SIMULATE_BUTTON_PRESS\x10\n\x12\x19\n\x15SIMULATE_TOUCH_SCREEN\x10\x0b\x12\x10\n\x0cREQUEST_SYNC\x10\x0c\x12\x1d\n\x19\x46IRMWARE_UPDATE_AVAILABLE\x10\r\x12\x0c\n\x08GPS_DATA\x10\x0e\x12\x0c\n\x08GPS_LOST\x10\x0f\x12\x15\n\x11GPS_NO_PERMISSION\x10\x10\x12\x17\n\x13POLAR_SHELL_HD_DATA\x10\x11*\xf9\x03\n\x15PbPftpPnsHDCategoryID\x12\x15\n\x11\x43\x41TEGORY_ID_OTHER\x10\x00\x12\x15\n\x11\x43\x41TEGORY_ID_POLAR\x10\x01\x12\x1c\n\x18\x43\x41TEGORY_ID_INCOMINGCALL\x10\x02\x12\x1a\n\x16\x43\x41TEGORY_ID_MISSEDCALL\x10\x03\x12\x19\n\x15\x43\x41TEGORY_ID_VOICEMAIL\x10\x04\x12\x16\n\x12\x43\x41TEGORY_ID_SOCIAL\x10\x05\x12\x18\n\x14\x43\x41TEGORY_ID_SCHEDULE\x10\x06\x12\x15\n\x11\x43\x41TEGORY_ID_EMAIL\x10\x07\x12\x14\n\x10\x43\x41TEGORY_ID_NEWS\x10\x08\x12 \n\x1c\x43\x41TEGORY_ID_HEALTHANDFITNESS\x10\t\x12\"\n\x1e\x43\x41TEGORY_ID_BUSINESSANDFINANCE\x10\n\x12\x18\n\x14\x43\x41TEGORY_ID_LOCATION\x10\x0b\x12\x1d\n\x19\x43\x41TEGORY_ID_ENTERTAINMENT\x10\x0c\x12\x15\n\x11\x43\x41TEGORY_ID_ALARM\x10\r\x12\x15\n\x11\x43\x41TEGORY_ID_PROMO\x10\x0e\x12\x1e\n\x1a\x43\x41TEGORY_ID_RECOMMENDATION\x10\x0f\x12\x16\n\x12\x43\x41TEGORY_ID_STATUS\x10\x10\x12\x19\n\x15\x43\x41TEGORY_ID_TRANSPORT\x10\x11*\xf4\x01\n\x18PbPftpPnsHDAttributeType\x12\t\n\x05TITLE\x10\x00\x12\x0c\n\x08SUBTITLE\x10\x01\x12\x0b\n\x07MESSAGE\x10\x02\x12\x19\n\x15POSITIVE_ACTION_LABEL\x10\x03\x12\x19\n\x15NEGATIVE_ACTION_LABEL\x10\x04\x12\x14\n\x10\x41PPLICATION_NAME\x10\x05\x12\x16\n\x12\x43LEAR_ACTION_LABEL\x10\x06\x12\x12\n\x0e\x41_ACTION_LABEL\x10\x07\x12\x12\n\x0e\x42_ACTION_LABEL\x10\x08\x12\x12\n\x0e\x43_ACTION_LABEL\x10\t\x12\x12\n\x0e\x44_ACTION_LABEL\x10\n')
,
dependencies=[types__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_PBPFTPDEVTOHOSTNOTIFICATION = _descriptor.EnumDescriptor(
name='PbPFtpDevToHostNotification',
full_name='protocol.PbPFtpDevToHostNotification',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='FILESYSTEM_MODIFIED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='INTERNAL_TEST_EVENT', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='IDLING', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='BATTERY_STATUS', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='INACTIVITY_ALERT', index=4, number=4,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='TRAINING_SESSION_STATUS', index=5, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SYNC_REQUIRED', index=6, number=7,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='AUTOSYNC_STATUS', index=7, number=8,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PNS_DH_NOTIFICATION_RESPONSE', index=8, number=9,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PNS_SETTINGS', index=9, number=10,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='START_GPS_MEASUREMENT', index=10, number=11,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='STOP_GPS_MEASUREMENT', index=11, number=12,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='KEEP_BACKGROUND_ALIVE', index=12, number=13,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='POLAR_SHELL_DH_DATA', index=13, number=14,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=2121,
serialized_end=2480,
)
_sym_db.RegisterEnumDescriptor(_PBPFTPDEVTOHOSTNOTIFICATION)
PbPFtpDevToHostNotification = enum_type_wrapper.EnumTypeWrapper(_PBPFTPDEVTOHOSTNOTIFICATION)
_ACTION = _descriptor.EnumDescriptor(
name='Action',
full_name='protocol.Action',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='CREATED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='UPDATED', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='REMOVED', index=2, number=2,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=2482,
serialized_end=2529,
)
_sym_db.RegisterEnumDescriptor(_ACTION)
Action = enum_type_wrapper.EnumTypeWrapper(_ACTION)
_PBPFTPPNSDHATTRIBUTETYPE = _descriptor.EnumDescriptor(
name='PbPftpPnsDHAttributeType',
full_name='protocol.PbPftpPnsDHAttributeType',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='UNKNOWN_ACTION', index=0, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='POSITIVE_ACTION', index=1, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='NEGATIVE_ACTION', index=2, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CLEAR_ACTION', index=3, number=4,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='A_ACTION', index=4, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='B_ACTION', index=5, number=6,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='C_ACTION', index=6, number=7,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='D_ACTION', index=7, number=8,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=2532,
serialized_end=2694,
)
_sym_db.RegisterEnumDescriptor(_PBPFTPPNSDHATTRIBUTETYPE)
PbPftpPnsDHAttributeType = enum_type_wrapper.EnumTypeWrapper(_PBPFTPPNSDHATTRIBUTETYPE)
_PBPFTPHOSTTODEVNOTIFICATION = _descriptor.EnumDescriptor(
name='PbPFtpHostToDevNotification',
full_name='protocol.PbPFtpHostToDevNotification',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='START_SYNC', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='STOP_SYNC', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='RESET', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='LOCK_PRODUCTION_DATA', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='TERMINATE_SYNC', index=4, number=4,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='KEEP_ALIVE', index=5, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='START_AUTOSYNC', index=6, number=6,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PNS_HD_NOTIFICATION', index=7, number=7,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='INITIALIZE_SESSION', index=8, number=8,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='TERMINATE_SESSION', index=9, number=9,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SIMULATE_BUTTON_PRESS', index=10, number=10,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SIMULATE_TOUCH_SCREEN', index=11, number=11,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='REQUEST_SYNC', index=12, number=12,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='FIRMWARE_UPDATE_AVAILABLE', index=13, number=13,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='GPS_DATA', index=14, number=14,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='GPS_LOST', index=15, number=15,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='GPS_NO_PERMISSION', index=16, number=16,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='POLAR_SHELL_HD_DATA', index=17, number=17,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=2697,
serialized_end=3101,
)
_sym_db.RegisterEnumDescriptor(_PBPFTPHOSTTODEVNOTIFICATION)
PbPFtpHostToDevNotification = enum_type_wrapper.EnumTypeWrapper(_PBPFTPHOSTTODEVNOTIFICATION)
_PBPFTPPNSHDCATEGORYID = _descriptor.EnumDescriptor(
name='PbPftpPnsHDCategoryID',
full_name='protocol.PbPftpPnsHDCategoryID',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_OTHER', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_POLAR', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_INCOMINGCALL', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_MISSEDCALL', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_VOICEMAIL', index=4, number=4,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_SOCIAL', index=5, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_SCHEDULE', index=6, number=6,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_EMAIL', index=7, number=7,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_NEWS', index=8, number=8,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_HEALTHANDFITNESS', index=9, number=9,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_BUSINESSANDFINANCE', index=10, number=10,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_LOCATION', index=11, number=11,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_ENTERTAINMENT', index=12, number=12,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_ALARM', index=13, number=13,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_PROMO', index=14, number=14,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_RECOMMENDATION', index=15, number=15,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_STATUS', index=16, number=16,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CATEGORY_ID_TRANSPORT', index=17, number=17,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=3104,
serialized_end=3609,
)
_sym_db.RegisterEnumDescriptor(_PBPFTPPNSHDCATEGORYID)
PbPftpPnsHDCategoryID = enum_type_wrapper.EnumTypeWrapper(_PBPFTPPNSHDCATEGORYID)
_PBPFTPPNSHDATTRIBUTETYPE = _descriptor.EnumDescriptor(
name='PbPftpPnsHDAttributeType',
full_name='protocol.PbPftpPnsHDAttributeType',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='TITLE', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBTITLE', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='MESSAGE', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='POSITIVE_ACTION_LABEL', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='NEGATIVE_ACTION_LABEL', index=4, number=4,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='APPLICATION_NAME', index=5, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CLEAR_ACTION_LABEL', index=6, number=6,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='A_ACTION_LABEL', index=7, number=7,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='B_ACTION_LABEL', index=8, number=8,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='C_ACTION_LABEL', index=9, number=9,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='D_ACTION_LABEL', index=10, number=10,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=3612,
serialized_end=3856,
)
_sym_db.RegisterEnumDescriptor(_PBPFTPPNSHDATTRIBUTETYPE)
PbPftpPnsHDAttributeType = enum_type_wrapper.EnumTypeWrapper(_PBPFTPPNSHDATTRIBUTETYPE)
FILESYSTEM_MODIFIED = 0
INTERNAL_TEST_EVENT = 1
IDLING = 2
BATTERY_STATUS = 3
INACTIVITY_ALERT = 4
TRAINING_SESSION_STATUS = 5
SYNC_REQUIRED = 7
AUTOSYNC_STATUS = 8
PNS_DH_NOTIFICATION_RESPONSE = 9
PNS_SETTINGS = 10
START_GPS_MEASUREMENT = 11
STOP_GPS_MEASUREMENT = 12
KEEP_BACKGROUND_ALIVE = 13
POLAR_SHELL_DH_DATA = 14
CREATED = 0
UPDATED = 1
REMOVED = 2
UNKNOWN_ACTION = 1
POSITIVE_ACTION = 2
NEGATIVE_ACTION = 3
CLEAR_ACTION = 4
A_ACTION = 5
B_ACTION = 6
C_ACTION = 7
D_ACTION = 8
START_SYNC = 0
STOP_SYNC = 1
RESET = 2
LOCK_PRODUCTION_DATA = 3
TERMINATE_SYNC = 4
KEEP_ALIVE = 5
START_AUTOSYNC = 6
PNS_HD_NOTIFICATION = 7
INITIALIZE_SESSION = 8
TERMINATE_SESSION = 9
SIMULATE_BUTTON_PRESS = 10
SIMULATE_TOUCH_SCREEN = 11
REQUEST_SYNC = 12
FIRMWARE_UPDATE_AVAILABLE = 13
GPS_DATA = 14
GPS_LOST = 15
GPS_NO_PERMISSION = 16
POLAR_SHELL_HD_DATA = 17
CATEGORY_ID_OTHER = 0
CATEGORY_ID_POLAR = 1
CATEGORY_ID_INCOMINGCALL = 2
CATEGORY_ID_MISSEDCALL = 3
CATEGORY_ID_VOICEMAIL = 4
CATEGORY_ID_SOCIAL = 5
CATEGORY_ID_SCHEDULE = 6
CATEGORY_ID_EMAIL = 7
CATEGORY_ID_NEWS = 8
CATEGORY_ID_HEALTHANDFITNESS = 9
CATEGORY_ID_BUSINESSANDFINANCE = 10
CATEGORY_ID_LOCATION = 11
CATEGORY_ID_ENTERTAINMENT = 12
CATEGORY_ID_ALARM = 13
CATEGORY_ID_PROMO = 14
CATEGORY_ID_RECOMMENDATION = 15
CATEGORY_ID_STATUS = 16
CATEGORY_ID_TRANSPORT = 17
TITLE = 0
SUBTITLE = 1
MESSAGE = 2
POSITIVE_ACTION_LABEL = 3
NEGATIVE_ACTION_LABEL = 4
APPLICATION_NAME = 5
CLEAR_ACTION_LABEL = 6
A_ACTION_LABEL = 7
B_ACTION_LABEL = 8
C_ACTION_LABEL = 9
D_ACTION_LABEL = 10
_PBPFTPSIMULATETOUCHSCREENPARAMS_PBPFTPTOUCHSTATE = _descriptor.EnumDescriptor(
name='PbPFtpTouchState',
full_name='protocol.PbPFtpSimulateTouchScreenParams.PbPFtpTouchState',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='TOUCH_STATE_START', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='TOUCH_STATE_POSITION', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='TOUCH_STATE_END', index=2, number=2,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=1221,
serialized_end=1309,
)
_sym_db.RegisterEnumDescriptor(_PBPFTPSIMULATETOUCHSCREENPARAMS_PBPFTPTOUCHSTATE)
_PBPFTPFILESYSTEMMODIFIEDPARAMS = _descriptor.Descriptor(
name='PbPFtpFilesystemModifiedParams',
full_name='protocol.PbPFtpFilesystemModifiedParams',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='action', full_name='protocol.PbPFtpFilesystemModifiedParams.action', index=0,
number=1, type=14, cpp_type=8, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='path', full_name='protocol.PbPFtpFilesystemModifiedParams.path', index=1,
number=2, type=9, cpp_type=9, label=2,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=55,
serialized_end=135,
)
_PBPFTPINACTIVITYALERT = _descriptor.Descriptor(
name='PbPFtpInactivityAlert',
full_name='protocol.PbPFtpInactivityAlert',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='countdown', full_name='protocol.PbPFtpInactivityAlert.countdown', index=0,
number=1, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=137,
serialized_end=179,
)
_PBPFTPTRAININGSESSIONSTATUS = _descriptor.Descriptor(
name='PbPFtpTrainingSessionStatus',
full_name='protocol.PbPFtpTrainingSessionStatus',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='inprogress', full_name='protocol.PbPFtpTrainingSessionStatus.inprogress', index=0,
number=1, type=8, cpp_type=7, label=2,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=181,
serialized_end=230,
)
_PBPFTPAUTOSYNCSTATUSPARAMS = _descriptor.Descriptor(
name='PbPFtpAutoSyncStatusParams',
full_name='protocol.PbPFtpAutoSyncStatusParams',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='succeeded', full_name='protocol.PbPFtpAutoSyncStatusParams.succeeded', index=0,
number=1, type=8, cpp_type=7, label=2,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='description', full_name='protocol.PbPFtpAutoSyncStatusParams.description', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=232,
serialized_end=300,
)
_PBPFTPPOLARSHELLMESSAGEPARAMS = _descriptor.Descriptor(
name='PbPFtpPolarShellMessageParams',
full_name='protocol.PbPFtpPolarShellMessageParams',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='polarShellMsgId', full_name='protocol.PbPFtpPolarShellMessageParams.polarShellMsgId', index=0,
number=1, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='data', full_name='protocol.PbPFtpPolarShellMessageParams.data', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=302,
serialized_end=372,
)
_PBPFTPPNSDHATTRIBUTE = _descriptor.Descriptor(
name='PbPftpPnsDHAttribute',
full_name='protocol.PbPftpPnsDHAttribute',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='type', full_name='protocol.PbPftpPnsDHAttribute.type', index=0,
number=1, type=14, cpp_type=8, label=2,
has_default_value=False, default_value=1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=374,
serialized_end=446,
)
_PBPFTPPNSDHNOTIFICATIONRESPONSE = _descriptor.Descriptor(
name='PbPftpPnsDHNotificationResponse',
full_name='protocol.PbPftpPnsDHNotificationResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='notification_id', full_name='protocol.PbPftpPnsDHNotificationResponse.notification_id', index=0,
number=1, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='attributes', full_name='protocol.PbPftpPnsDHNotificationResponse.attributes', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=448,
serialized_end=558,
)
_PBPFTPPNSSTATE = _descriptor.Descriptor(
name='PbPftpPnsState',
full_name='protocol.PbPftpPnsState',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='notifications_enabled', full_name='protocol.PbPftpPnsState.notifications_enabled', index=0,
number=1, type=8, cpp_type=7, label=2,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='preview_enabled', full_name='protocol.PbPftpPnsState.preview_enabled', index=1,
number=2, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=560,
serialized_end=632,
)
_PBPFTPSTARTGPSMEASUREMENT = _descriptor.Descriptor(
name='PbPftpStartGPSMeasurement',
full_name='protocol.PbPftpStartGPSMeasurement',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='minimum_interval', full_name='protocol.PbPftpStartGPSMeasurement.minimum_interval', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=True, default_value=1000,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='accuracy', full_name='protocol.PbPftpStartGPSMeasurement.accuracy', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=True, default_value=2,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='latitude', full_name='protocol.PbPftpStartGPSMeasurement.latitude', index=2,
number=3, type=1, cpp_type=5, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='longitude', full_name='protocol.PbPftpStartGPSMeasurement.longitude', index=3,
number=4, type=1, cpp_type=5, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=634,
serialized_end=751,
)
_PBINITIALIZESESSIONPARAMS = _descriptor.Descriptor(
name='PbInitializeSessionParams',
full_name='protocol.PbInitializeSessionParams',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='uses_attribute_level_response', full_name='protocol.PbInitializeSessionParams.uses_attribute_level_response', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=753,
serialized_end=819,
)
_PBFIRMWAREUPDATEAVAILABLEPARAMS = _descriptor.Descriptor(
name='PbFirmwareUpdateAvailableParams',
full_name='protocol.PbFirmwareUpdateAvailableParams',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='mandatory', full_name='protocol.PbFirmwareUpdateAvailableParams.mandatory', index=0,
number=1, type=8, cpp_type=7, label=2,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=821,
serialized_end=873,
)
_PBPFTPSIMULATEBUTTONPRESSPARAMS = _descriptor.Descriptor(
name='PbPFtpSimulateButtonPressParams',
full_name='protocol.PbPFtpSimulateButtonPressParams',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='button', full_name='protocol.PbPFtpSimulateButtonPressParams.button', index=0,
number=1, type=14, cpp_type=8, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='state', full_name='protocol.PbPFtpSimulateButtonPressParams.state', index=1,
number=2, type=14, cpp_type=8, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=875,
serialized_end=963,
)
_PBPFTPTOUCHPOSITION = _descriptor.Descriptor(
name='PbPFtpTouchPosition',
full_name='protocol.PbPFtpTouchPosition',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='pos', full_name='protocol.PbPFtpTouchPosition.pos', index=0,
number=1, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='max_pos', full_name='protocol.PbPFtpTouchPosition.max_pos', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=965,
serialized_end=1016,
)
_PBPFTPSIMULATETOUCHSCREENPARAMS = _descriptor.Descriptor(
name='PbPFtpSimulateTouchScreenParams',
full_name='protocol.PbPFtpSimulateTouchScreenParams',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='state', full_name='protocol.PbPFtpSimulateTouchScreenParams.state', index=0,
number=1, type=14, cpp_type=8, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='x_pos', full_name='protocol.PbPFtpSimulateTouchScreenParams.x_pos', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='y_pos', full_name='protocol.PbPFtpSimulateTouchScreenParams.y_pos', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
_PBPFTPSIMULATETOUCHSCREENPARAMS_PBPFTPTOUCHSTATE,
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=1019,
serialized_end=1309,
)
_PBPFTPSTOPSYNCPARAMS = _descriptor.Descriptor(
name='PbPFtpStopSyncParams',
full_name='protocol.PbPFtpStopSyncParams',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='completed', full_name='protocol.PbPFtpStopSyncParams.completed', index=0,
number=1, type=8, cpp_type=7, label=2,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='description', full_name='protocol.PbPFtpStopSyncParams.description', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=1311,
serialized_end=1373,
)
_PBPFTPFACTORYRESETPARAMS = _descriptor.Descriptor(
name='PbPFtpFactoryResetParams',
full_name='protocol.PbPFtpFactoryResetParams',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='sleep', full_name='protocol.PbPFtpFactoryResetParams.sleep', index=0,
number=1, type=8, cpp_type=7, label=2,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='do_factory_defaults', full_name='protocol.PbPFtpFactoryResetParams.do_factory_defaults', index=1,
number=2, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=True,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='ota_fwupdate', full_name='protocol.PbPFtpFactoryResetParams.ota_fwupdate', index=2,
number=3, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=1375,
serialized_end=1480,
)
_PBPFTPSTARTAUTOSYNCPARAMS = _descriptor.Descriptor(
name='PbPFtpStartAutosyncParams',
full_name='protocol.PbPFtpStartAutosyncParams',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='timeout', full_name='protocol.PbPFtpStartAutosyncParams.timeout', index=0,
number=1, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=1482,
serialized_end=1526,
)
_PBPFTPPNSHDATTRIBUTE = _descriptor.Descriptor(
name='PbPftpPnsHDAttribute',
full_name='protocol.PbPftpPnsHDAttribute',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='type', full_name='protocol.PbPftpPnsHDAttribute.type', index=0,
number=1, type=14, cpp_type=8, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='data', full_name='protocol.PbPftpPnsHDAttribute.data', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='attribute_full_size', full_name='protocol.PbPftpPnsHDAttribute.attribute_full_size', index=2,
number=3, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=1528,
serialized_end=1643,
)
_PBPFTPPNSHDNOTIFICATION = _descriptor.Descriptor(
name='PbPftpPnsHDNotification',
full_name='protocol.PbPftpPnsHDNotification',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='notification_id', full_name='protocol.PbPftpPnsHDNotification.notification_id', index=0,
number=1, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='category_id', full_name='protocol.PbPftpPnsHDNotification.category_id', index=1,
number=2, type=14, cpp_type=8, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='action', full_name='protocol.PbPftpPnsHDNotification.action', index=2,
number=3, type=14, cpp_type=8, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='issue_time', full_name='protocol.PbPftpPnsHDNotification.issue_time', index=3,
number=4, type=11, cpp_type=10, label=2,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='new_same_category_notifications', full_name='protocol.PbPftpPnsHDNotification.new_same_category_notifications', index=4,
number=5, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='unread_same_category_notifications', full_name='protocol.PbPftpPnsHDNotification.unread_same_category_notifications', index=5,
number=6, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='attributes', full_name='protocol.PbPftpPnsHDNotification.attributes', index=6,
number=7, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=1646,
serialized_end=1959,
)
_PBPFTPGPSDATAPARAMS = _descriptor.Descriptor(
name='PbPFtpGPSDataParams',
full_name='protocol.PbPFtpGPSDataParams',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='latitude', full_name='protocol.PbPFtpGPSDataParams.latitude', index=0,
number=1, type=1, cpp_type=5, label=2,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='longitude', full_name='protocol.PbPFtpGPSDataParams.longitude', index=1,
number=2, type=1, cpp_type=5, label=2,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='speed', full_name='protocol.PbPFtpGPSDataParams.speed', index=2,
number=3, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='distance', full_name='protocol.PbPFtpGPSDataParams.distance', index=3,
number=4, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='altitude', full_name='protocol.PbPFtpGPSDataParams.altitude', index=4,
number=5, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='satellite_amount', full_name='protocol.PbPFtpGPSDataParams.satellite_amount', index=5,
number=6, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='time_offset', full_name='protocol.PbPFtpGPSDataParams.time_offset', index=6,
number=7, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=1962,
serialized_end=2118,
)
_PBPFTPFILESYSTEMMODIFIEDPARAMS.fields_by_name['action'].enum_type = _ACTION
_PBPFTPPNSDHATTRIBUTE.fields_by_name['type'].enum_type = _PBPFTPPNSDHATTRIBUTETYPE
_PBPFTPPNSDHNOTIFICATIONRESPONSE.fields_by_name['attributes'].message_type = _PBPFTPPNSDHATTRIBUTE
_PBPFTPSIMULATEBUTTONPRESSPARAMS.fields_by_name['button'].enum_type = types__pb2._BUTTONS
_PBPFTPSIMULATEBUTTONPRESSPARAMS.fields_by_name['state'].enum_type = types__pb2._BUTTONSTATE
_PBPFTPSIMULATETOUCHSCREENPARAMS.fields_by_name['state'].enum_type = _PBPFTPSIMULATETOUCHSCREENPARAMS_PBPFTPTOUCHSTATE
_PBPFTPSIMULATETOUCHSCREENPARAMS.fields_by_name['x_pos'].message_type = _PBPFTPTOUCHPOSITION
_PBPFTPSIMULATETOUCHSCREENPARAMS.fields_by_name['y_pos'].message_type = _PBPFTPTOUCHPOSITION
_PBPFTPSIMULATETOUCHSCREENPARAMS_PBPFTPTOUCHSTATE.containing_type = _PBPFTPSIMULATETOUCHSCREENPARAMS
_PBPFTPPNSHDATTRIBUTE.fields_by_name['type'].enum_type = _PBPFTPPNSHDATTRIBUTETYPE
_PBPFTPPNSHDNOTIFICATION.fields_by_name['category_id'].enum_type = _PBPFTPPNSHDCATEGORYID
_PBPFTPPNSHDNOTIFICATION.fields_by_name['action'].enum_type = _ACTION
_PBPFTPPNSHDNOTIFICATION.fields_by_name['issue_time'].message_type = types__pb2._PBLOCALDATETIME
_PBPFTPPNSHDNOTIFICATION.fields_by_name['attributes'].message_type = _PBPFTPPNSHDATTRIBUTE
DESCRIPTOR.message_types_by_name['PbPFtpFilesystemModifiedParams'] = _PBPFTPFILESYSTEMMODIFIEDPARAMS
DESCRIPTOR.message_types_by_name['PbPFtpInactivityAlert'] = _PBPFTPINACTIVITYALERT
DESCRIPTOR.message_types_by_name['PbPFtpTrainingSessionStatus'] = _PBPFTPTRAININGSESSIONSTATUS
DESCRIPTOR.message_types_by_name['PbPFtpAutoSyncStatusParams'] = _PBPFTPAUTOSYNCSTATUSPARAMS
DESCRIPTOR.message_types_by_name['PbPFtpPolarShellMessageParams'] = _PBPFTPPOLARSHELLMESSAGEPARAMS
DESCRIPTOR.message_types_by_name['PbPftpPnsDHAttribute'] = _PBPFTPPNSDHATTRIBUTE
DESCRIPTOR.message_types_by_name['PbPftpPnsDHNotificationResponse'] = _PBPFTPPNSDHNOTIFICATIONRESPONSE
DESCRIPTOR.message_types_by_name['PbPftpPnsState'] = _PBPFTPPNSSTATE
DESCRIPTOR.message_types_by_name['PbPftpStartGPSMeasurement'] = _PBPFTPSTARTGPSMEASUREMENT
DESCRIPTOR.message_types_by_name['PbInitializeSessionParams'] = _PBINITIALIZESESSIONPARAMS
DESCRIPTOR.message_types_by_name['PbFirmwareUpdateAvailableParams'] = _PBFIRMWAREUPDATEAVAILABLEPARAMS
DESCRIPTOR.message_types_by_name['PbPFtpSimulateButtonPressParams'] = _PBPFTPSIMULATEBUTTONPRESSPARAMS
DESCRIPTOR.message_types_by_name['PbPFtpTouchPosition'] = _PBPFTPTOUCHPOSITION
DESCRIPTOR.message_types_by_name['PbPFtpSimulateTouchScreenParams'] = _PBPFTPSIMULATETOUCHSCREENPARAMS
DESCRIPTOR.message_types_by_name['PbPFtpStopSyncParams'] = _PBPFTPSTOPSYNCPARAMS
DESCRIPTOR.message_types_by_name['PbPFtpFactoryResetParams'] = _PBPFTPFACTORYRESETPARAMS
DESCRIPTOR.message_types_by_name['PbPFtpStartAutosyncParams'] = _PBPFTPSTARTAUTOSYNCPARAMS
DESCRIPTOR.message_types_by_name['PbPftpPnsHDAttribute'] = _PBPFTPPNSHDATTRIBUTE
DESCRIPTOR.message_types_by_name['PbPftpPnsHDNotification'] = _PBPFTPPNSHDNOTIFICATION
DESCRIPTOR.message_types_by_name['PbPFtpGPSDataParams'] = _PBPFTPGPSDATAPARAMS
DESCRIPTOR.enum_types_by_name['PbPFtpDevToHostNotification'] = _PBPFTPDEVTOHOSTNOTIFICATION
DESCRIPTOR.enum_types_by_name['Action'] = _ACTION
DESCRIPTOR.enum_types_by_name['PbPftpPnsDHAttributeType'] = _PBPFTPPNSDHATTRIBUTETYPE
DESCRIPTOR.enum_types_by_name['PbPFtpHostToDevNotification'] = _PBPFTPHOSTTODEVNOTIFICATION
DESCRIPTOR.enum_types_by_name['PbPftpPnsHDCategoryID'] = _PBPFTPPNSHDCATEGORYID
DESCRIPTOR.enum_types_by_name['PbPftpPnsHDAttributeType'] = _PBPFTPPNSHDATTRIBUTETYPE
PbPFtpFilesystemModifiedParams = _reflection.GeneratedProtocolMessageType('PbPFtpFilesystemModifiedParams', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPFILESYSTEMMODIFIEDPARAMS,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPFtpFilesystemModifiedParams)
))
_sym_db.RegisterMessage(PbPFtpFilesystemModifiedParams)
PbPFtpInactivityAlert = _reflection.GeneratedProtocolMessageType('PbPFtpInactivityAlert', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPINACTIVITYALERT,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPFtpInactivityAlert)
))
_sym_db.RegisterMessage(PbPFtpInactivityAlert)
PbPFtpTrainingSessionStatus = _reflection.GeneratedProtocolMessageType('PbPFtpTrainingSessionStatus', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPTRAININGSESSIONSTATUS,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPFtpTrainingSessionStatus)
))
_sym_db.RegisterMessage(PbPFtpTrainingSessionStatus)
PbPFtpAutoSyncStatusParams = _reflection.GeneratedProtocolMessageType('PbPFtpAutoSyncStatusParams', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPAUTOSYNCSTATUSPARAMS,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPFtpAutoSyncStatusParams)
))
_sym_db.RegisterMessage(PbPFtpAutoSyncStatusParams)
PbPFtpPolarShellMessageParams = _reflection.GeneratedProtocolMessageType('PbPFtpPolarShellMessageParams', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPPOLARSHELLMESSAGEPARAMS,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPFtpPolarShellMessageParams)
))
_sym_db.RegisterMessage(PbPFtpPolarShellMessageParams)
PbPftpPnsDHAttribute = _reflection.GeneratedProtocolMessageType('PbPftpPnsDHAttribute', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPPNSDHATTRIBUTE,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPftpPnsDHAttribute)
))
_sym_db.RegisterMessage(PbPftpPnsDHAttribute)
PbPftpPnsDHNotificationResponse = _reflection.GeneratedProtocolMessageType('PbPftpPnsDHNotificationResponse', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPPNSDHNOTIFICATIONRESPONSE,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPftpPnsDHNotificationResponse)
))
_sym_db.RegisterMessage(PbPftpPnsDHNotificationResponse)
PbPftpPnsState = _reflection.GeneratedProtocolMessageType('PbPftpPnsState', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPPNSSTATE,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPftpPnsState)
))
_sym_db.RegisterMessage(PbPftpPnsState)
PbPftpStartGPSMeasurement = _reflection.GeneratedProtocolMessageType('PbPftpStartGPSMeasurement', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPSTARTGPSMEASUREMENT,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPftpStartGPSMeasurement)
))
_sym_db.RegisterMessage(PbPftpStartGPSMeasurement)
PbInitializeSessionParams = _reflection.GeneratedProtocolMessageType('PbInitializeSessionParams', (_message.Message,), dict(
DESCRIPTOR = _PBINITIALIZESESSIONPARAMS,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbInitializeSessionParams)
))
_sym_db.RegisterMessage(PbInitializeSessionParams)
PbFirmwareUpdateAvailableParams = _reflection.GeneratedProtocolMessageType('PbFirmwareUpdateAvailableParams', (_message.Message,), dict(
DESCRIPTOR = _PBFIRMWAREUPDATEAVAILABLEPARAMS,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbFirmwareUpdateAvailableParams)
))
_sym_db.RegisterMessage(PbFirmwareUpdateAvailableParams)
PbPFtpSimulateButtonPressParams = _reflection.GeneratedProtocolMessageType('PbPFtpSimulateButtonPressParams', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPSIMULATEBUTTONPRESSPARAMS,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPFtpSimulateButtonPressParams)
))
_sym_db.RegisterMessage(PbPFtpSimulateButtonPressParams)
PbPFtpTouchPosition = _reflection.GeneratedProtocolMessageType('PbPFtpTouchPosition', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPTOUCHPOSITION,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPFtpTouchPosition)
))
_sym_db.RegisterMessage(PbPFtpTouchPosition)
PbPFtpSimulateTouchScreenParams = _reflection.GeneratedProtocolMessageType('PbPFtpSimulateTouchScreenParams', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPSIMULATETOUCHSCREENPARAMS,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPFtpSimulateTouchScreenParams)
))
_sym_db.RegisterMessage(PbPFtpSimulateTouchScreenParams)
PbPFtpStopSyncParams = _reflection.GeneratedProtocolMessageType('PbPFtpStopSyncParams', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPSTOPSYNCPARAMS,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPFtpStopSyncParams)
))
_sym_db.RegisterMessage(PbPFtpStopSyncParams)
PbPFtpFactoryResetParams = _reflection.GeneratedProtocolMessageType('PbPFtpFactoryResetParams', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPFACTORYRESETPARAMS,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPFtpFactoryResetParams)
))
_sym_db.RegisterMessage(PbPFtpFactoryResetParams)
PbPFtpStartAutosyncParams = _reflection.GeneratedProtocolMessageType('PbPFtpStartAutosyncParams', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPSTARTAUTOSYNCPARAMS,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPFtpStartAutosyncParams)
))
_sym_db.RegisterMessage(PbPFtpStartAutosyncParams)
PbPftpPnsHDAttribute = _reflection.GeneratedProtocolMessageType('PbPftpPnsHDAttribute', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPPNSHDATTRIBUTE,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPftpPnsHDAttribute)
))
_sym_db.RegisterMessage(PbPftpPnsHDAttribute)
PbPftpPnsHDNotification = _reflection.GeneratedProtocolMessageType('PbPftpPnsHDNotification', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPPNSHDNOTIFICATION,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPftpPnsHDNotification)
))
_sym_db.RegisterMessage(PbPftpPnsHDNotification)
PbPFtpGPSDataParams = _reflection.GeneratedProtocolMessageType('PbPFtpGPSDataParams', (_message.Message,), dict(
DESCRIPTOR = _PBPFTPGPSDATAPARAMS,
__module__ = 'pftp.pftp_notification_pb2'
# @@protoc_insertion_point(class_scope:protocol.PbPFtpGPSDataParams)
))
_sym_db.RegisterMessage(PbPFtpGPSDataParams)
# @@protoc_insertion_point(module_scope)
|
85942eb1b7371982901a1430e8db1aa584403300
|
fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be
|
/studio/modules/service-data-dts-parent/service-data-dts/src/main/shell/chunjun-python3.py
|
497ee593a19d96ebf7d9979515466c1997d00a15
|
[
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] |
permissive
|
alldatacenter/alldata
|
7bc7713c9f1d56ad6b8e59ea03206d1073b7e047
|
8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6
|
refs/heads/master
| 2023-08-05T07:32:25.442740
| 2023-08-03T13:17:24
| 2023-08-03T13:17:24
| 213,321,771
| 774
| 250
|
Apache-2.0
| 2023-09-06T17:35:32
| 2019-10-07T07:36:18
| null |
UTF-8
|
Python
| false
| false
| 916
|
py
|
chunjun-python3.py
|
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
import os
import signal
import subprocess
import time
import re
import socket
import json
from optparse import OptionParser
from optparse import OptionGroup
from string import Template
import codecs
import platform
def printCopyright():
print ('''
AllDataDC (%s), From AllDataDC !
AllDataDC All Rights Reserved.
''')
sys.stdout.flush()
if __name__ == "__main__":
printCopyright()
abs_file=sys.path[0]
json_file=sys.argv[1]
log_name=sys.argv[2]
startCommand = "java -cp %s/lib/* com.dtstack.chunjun.client.Launcher -mode local -jobType sync -job %s -chunjunDistDir %s/chunjun-dist -flinkConfDir %s/flinkconf > %s/%s" %(abs_file,json_file,abs_file,abs_file,abs_file,log_name)
print(startCommand)
child_process = subprocess.Popen(startCommand, shell=True)
(stdout, stderr) = child_process.communicate()
sys.exit(child_process.returncode)
|
6bbc39de051f79ebf8f0279ed7a8b9624be2d313
|
e0cc314aa73c0a965a2022f19900df3ccc8c9f43
|
/tests/test_event_trace.py
|
3004c67472680eef073ce30f2de0131392adc0df
|
[
"BSD-3-Clause"
] |
permissive
|
hakril/PythonForWindows
|
21823e743ee4ae7ff99e376378357833f2e19d26
|
82d0c5cc5c9b4d569dca2c755f26b947e3ff74f5
|
refs/heads/master
| 2023-06-08T03:25:50.354768
| 2023-05-26T07:31:06
| 2023-05-26T07:31:06
| 49,235,784
| 568
| 111
|
BSD-3-Clause
| 2023-01-30T12:04:03
| 2016-01-07T22:54:33
|
Python
|
UTF-8
|
Python
| false
| false
| 1,028
|
py
|
test_event_trace.py
|
import collections
import os
import windows
import windows.generated_def as gdef
TASK_SCHEDULER_PROVIDER = "047311A9-FA52-4A68-A1E4-4E289FBB8D17"
EVENT_ID_COUNT = collections.Counter()
def show(event):
EVENT_ID_COUNT.update([event.id])
def test_etw_trace_open_with_guid():
trace = windows.system.etw.open_trace("PFW_test_etw_1", guid="42424242-4242-4242-4242-000000001234")
def test_etw_trace_registration_and_processing():
EVENT_ID_COUNT.clear()
# RealTime Test
trace = windows.system.etw.open_trace("PFW_test_etw_2", logfile="pfw_test_trace.etl")
trace.start()
trace.enable(TASK_SCHEDULER_PROVIDER, 0xff, 0xff)
# Scheduler code that generate event
windows.system.task_scheduler(r"\Microsoft\Windows\Chkdsk")["SyspartRepair"]
# End of scheduler code
trace.stop()
trace.process(show)
# Task scheduler generate event id 10,11,12
assert EVENT_ID_COUNT[10] >= 1
assert EVENT_ID_COUNT[11] >= 1
assert EVENT_ID_COUNT[12] >= 1
os.unlink("pfw_test_trace.etl")
|
e3d7e8ff5259cfa161b88c9a3dc5f0184af84be6
|
fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be
|
/ai/mmdetection/mmdet/models/task_modules/samplers/score_hlr_sampler.py
|
0227585b92329625d053f1e9f8c161fd02af8aef
|
[
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] |
permissive
|
alldatacenter/alldata
|
7bc7713c9f1d56ad6b8e59ea03206d1073b7e047
|
8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6
|
refs/heads/master
| 2023-08-05T07:32:25.442740
| 2023-08-03T13:17:24
| 2023-08-03T13:17:24
| 213,321,771
| 774
| 250
|
Apache-2.0
| 2023-09-06T17:35:32
| 2019-10-07T07:36:18
| null |
UTF-8
|
Python
| false
| false
| 12,663
|
py
|
score_hlr_sampler.py
|
# Copyright (c) OpenMMLab. All rights reserved.
from typing import Union
import torch
from mmcv.ops import nms_match
from mmengine.structures import InstanceData
from numpy import ndarray
from torch import Tensor
from mmdet.registry import TASK_UTILS
from mmdet.structures.bbox import bbox2roi
from ..assigners import AssignResult
from .base_sampler import BaseSampler
from .sampling_result import SamplingResult
@TASK_UTILS.register_module()
class ScoreHLRSampler(BaseSampler):
r"""Importance-based Sample Reweighting (ISR_N), described in `Prime Sample
Attention in Object Detection <https://arxiv.org/abs/1904.04821>`_.
Score hierarchical local rank (HLR) differentiates with RandomSampler in
negative part. It firstly computes Score-HLR in a two-step way,
then linearly maps score hlr to the loss weights.
Args:
num (int): Total number of sampled RoIs.
pos_fraction (float): Fraction of positive samples.
context (:obj:`BaseRoIHead`): RoI head that the sampler belongs to.
neg_pos_ub (int): Upper bound of the ratio of num negative to num
positive, -1 means no upper bound. Defaults to -1.
add_gt_as_proposals (bool): Whether to add ground truth as proposals.
Defaults to True.
k (float): Power of the non-linear mapping. Defaults to 0.5
bias (float): Shift of the non-linear mapping. Defaults to 0.
score_thr (float): Minimum score that a negative sample is to be
considered as valid bbox. Defaults to 0.05.
iou_thr (float): IoU threshold for NMS match. Defaults to 0.5.
"""
def __init__(self,
num: int,
pos_fraction: float,
context,
neg_pos_ub: int = -1,
add_gt_as_proposals: bool = True,
k: float = 0.5,
bias: float = 0,
score_thr: float = 0.05,
iou_thr: float = 0.5,
**kwargs) -> None:
super().__init__(
num=num,
pos_fraction=pos_fraction,
neg_pos_ub=neg_pos_ub,
add_gt_as_proposals=add_gt_as_proposals)
self.k = k
self.bias = bias
self.score_thr = score_thr
self.iou_thr = iou_thr
self.context = context
# context of cascade detectors is a list, so distinguish them here.
if not hasattr(context, 'num_stages'):
self.bbox_roi_extractor = context.bbox_roi_extractor
self.bbox_head = context.bbox_head
self.with_shared_head = context.with_shared_head
if self.with_shared_head:
self.shared_head = context.shared_head
else:
self.bbox_roi_extractor = context.bbox_roi_extractor[
context.current_stage]
self.bbox_head = context.bbox_head[context.current_stage]
@staticmethod
def random_choice(gallery: Union[Tensor, ndarray, list],
num: int) -> Union[Tensor, ndarray]:
"""Randomly select some elements from the gallery.
If `gallery` is a Tensor, the returned indices will be a Tensor;
If `gallery` is a ndarray or list, the returned indices will be a
ndarray.
Args:
gallery (Tensor or ndarray or list): indices pool.
num (int): expected sample num.
Returns:
Tensor or ndarray: sampled indices.
"""
assert len(gallery) >= num
is_tensor = isinstance(gallery, torch.Tensor)
if not is_tensor:
if torch.cuda.is_available():
device = torch.cuda.current_device()
else:
device = 'cpu'
gallery = torch.tensor(gallery, dtype=torch.long, device=device)
perm = torch.randperm(gallery.numel(), device=gallery.device)[:num]
rand_inds = gallery[perm]
if not is_tensor:
rand_inds = rand_inds.cpu().numpy()
return rand_inds
def _sample_pos(self, assign_result: AssignResult, num_expected: int,
**kwargs) -> Union[Tensor, ndarray]:
"""Randomly sample some positive samples.
Args:
assign_result (:obj:`AssignResult`): Bbox assigning results.
num_expected (int): The number of expected positive samples
Returns:
Tensor or ndarray: sampled indices.
"""
pos_inds = torch.nonzero(assign_result.gt_inds > 0).flatten()
if pos_inds.numel() <= num_expected:
return pos_inds
else:
return self.random_choice(pos_inds, num_expected)
def _sample_neg(self, assign_result: AssignResult, num_expected: int,
bboxes: Tensor, feats: Tensor,
**kwargs) -> Union[Tensor, ndarray]:
"""Sample negative samples.
Score-HLR sampler is done in the following steps:
1. Take the maximum positive score prediction of each negative samples
as s_i.
2. Filter out negative samples whose s_i <= score_thr, the left samples
are called valid samples.
3. Use NMS-Match to divide valid samples into different groups,
samples in the same group will greatly overlap with each other
4. Rank the matched samples in two-steps to get Score-HLR.
(1) In the same group, rank samples with their scores.
(2) In the same score rank across different groups,
rank samples with their scores again.
5. Linearly map Score-HLR to the final label weights.
Args:
assign_result (:obj:`AssignResult`): result of assigner.
num_expected (int): Expected number of samples.
bboxes (Tensor): bbox to be sampled.
feats (Tensor): Features come from FPN.
Returns:
Tensor or ndarray: sampled indices.
"""
neg_inds = torch.nonzero(assign_result.gt_inds == 0).flatten()
num_neg = neg_inds.size(0)
if num_neg == 0:
return neg_inds, None
with torch.no_grad():
neg_bboxes = bboxes[neg_inds]
neg_rois = bbox2roi([neg_bboxes])
bbox_result = self.context._bbox_forward(feats, neg_rois)
cls_score, bbox_pred = bbox_result['cls_score'], bbox_result[
'bbox_pred']
ori_loss = self.bbox_head.loss(
cls_score=cls_score,
bbox_pred=None,
rois=None,
labels=neg_inds.new_full((num_neg, ),
self.bbox_head.num_classes),
label_weights=cls_score.new_ones(num_neg),
bbox_targets=None,
bbox_weights=None,
reduction_override='none')['loss_cls']
# filter out samples with the max score lower than score_thr
max_score, argmax_score = cls_score.softmax(-1)[:, :-1].max(-1)
valid_inds = (max_score > self.score_thr).nonzero().view(-1)
invalid_inds = (max_score <= self.score_thr).nonzero().view(-1)
num_valid = valid_inds.size(0)
num_invalid = invalid_inds.size(0)
num_expected = min(num_neg, num_expected)
num_hlr = min(num_valid, num_expected)
num_rand = num_expected - num_hlr
if num_valid > 0:
valid_rois = neg_rois[valid_inds]
valid_max_score = max_score[valid_inds]
valid_argmax_score = argmax_score[valid_inds]
valid_bbox_pred = bbox_pred[valid_inds]
# valid_bbox_pred shape: [num_valid, #num_classes, 4]
valid_bbox_pred = valid_bbox_pred.view(
valid_bbox_pred.size(0), -1, 4)
selected_bbox_pred = valid_bbox_pred[range(num_valid),
valid_argmax_score]
pred_bboxes = self.bbox_head.bbox_coder.decode(
valid_rois[:, 1:], selected_bbox_pred)
pred_bboxes_with_score = torch.cat(
[pred_bboxes, valid_max_score[:, None]], -1)
group = nms_match(pred_bboxes_with_score, self.iou_thr)
# imp: importance
imp = cls_score.new_zeros(num_valid)
for g in group:
g_score = valid_max_score[g]
# g_score has already sorted
rank = g_score.new_tensor(range(g_score.size(0)))
imp[g] = num_valid - rank + g_score
_, imp_rank_inds = imp.sort(descending=True)
_, imp_rank = imp_rank_inds.sort()
hlr_inds = imp_rank_inds[:num_expected]
if num_rand > 0:
rand_inds = torch.randperm(num_invalid)[:num_rand]
select_inds = torch.cat(
[valid_inds[hlr_inds], invalid_inds[rand_inds]])
else:
select_inds = valid_inds[hlr_inds]
neg_label_weights = cls_score.new_ones(num_expected)
up_bound = max(num_expected, num_valid)
imp_weights = (up_bound -
imp_rank[hlr_inds].float()) / up_bound
neg_label_weights[:num_hlr] = imp_weights
neg_label_weights[num_hlr:] = imp_weights.min()
neg_label_weights = (self.bias +
(1 - self.bias) * neg_label_weights).pow(
self.k)
ori_selected_loss = ori_loss[select_inds]
new_loss = ori_selected_loss * neg_label_weights
norm_ratio = ori_selected_loss.sum() / new_loss.sum()
neg_label_weights *= norm_ratio
else:
neg_label_weights = cls_score.new_ones(num_expected)
select_inds = torch.randperm(num_neg)[:num_expected]
return neg_inds[select_inds], neg_label_weights
def sample(self, assign_result: AssignResult, pred_instances: InstanceData,
gt_instances: InstanceData, **kwargs) -> SamplingResult:
"""Sample positive and negative bboxes.
This is a simple implementation of bbox sampling given candidates,
assigning results and ground truth bboxes.
Args:
assign_result (:obj:`AssignResult`): Assigning results.
pred_instances (:obj:`InstanceData`): Instances of model
predictions. It includes ``priors``, and the priors can
be anchors or points, or the bboxes predicted by the
previous stage, has shape (n, 4). The bboxes predicted by
the current model or stage will be named ``bboxes``,
``labels``, and ``scores``, the same as the ``InstanceData``
in other places.
gt_instances (:obj:`InstanceData`): Ground truth of instance
annotations. It usually includes ``bboxes``, with shape (k, 4),
and ``labels``, with shape (k, ).
Returns:
:obj:`SamplingResult`: Sampling result.
"""
gt_bboxes = gt_instances.bboxes
priors = pred_instances.priors
gt_labels = gt_instances.labels
gt_flags = priors.new_zeros((priors.shape[0], ), dtype=torch.uint8)
if self.add_gt_as_proposals and len(gt_bboxes) > 0:
priors = torch.cat([gt_bboxes, priors], dim=0)
assign_result.add_gt_(gt_labels)
gt_ones = priors.new_ones(gt_bboxes.shape[0], dtype=torch.uint8)
gt_flags = torch.cat([gt_ones, gt_flags])
num_expected_pos = int(self.num * self.pos_fraction)
pos_inds = self.pos_sampler._sample_pos(
assign_result, num_expected_pos, bboxes=priors, **kwargs)
num_sampled_pos = pos_inds.numel()
num_expected_neg = self.num - num_sampled_pos
if self.neg_pos_ub >= 0:
_pos = max(1, num_sampled_pos)
neg_upper_bound = int(self.neg_pos_ub * _pos)
if num_expected_neg > neg_upper_bound:
num_expected_neg = neg_upper_bound
neg_inds, neg_label_weights = self.neg_sampler._sample_neg(
assign_result, num_expected_neg, bboxes=priors, **kwargs)
sampling_result = SamplingResult(
pos_inds=pos_inds,
neg_inds=neg_inds,
priors=priors,
gt_bboxes=gt_bboxes,
assign_result=assign_result,
gt_flags=gt_flags)
return sampling_result, neg_label_weights
|
cdc39c7e95f2f06e7e51559c460507a39a3164e4
|
0225a1fb4e8bfd022a992a751c9ae60722f9ca0d
|
/tools/python/airmaps/instruments/storage.py
|
e62b3da68a4ee819e665d0a00e47198d985e5c77
|
[
"Apache-2.0"
] |
permissive
|
organicmaps/organicmaps
|
fb2d86ea12abf5aab09cd8b7c55d5d5b98f264a1
|
76016d6ce0be42bfb6ed967868b9bd7d16b79882
|
refs/heads/master
| 2023-08-16T13:58:16.223655
| 2023-08-15T20:16:15
| 2023-08-15T20:16:15
| 324,829,379
| 6,981
| 782
|
Apache-2.0
| 2023-09-14T21:30:12
| 2020-12-27T19:02:26
|
C++
|
UTF-8
|
Python
| false
| false
| 749
|
py
|
storage.py
|
import logging
import webdav.client as wc
from airmaps.instruments import settings
logger = logging.getLogger("airmaps")
WD_OPTIONS = {
"webdav_hostname": settings.WD_HOST,
"webdav_login": settings.WD_LOGIN,
"webdav_password": settings.WD_PASSWORD,
}
def wd_fetch(src, dst):
logger.info(f"Fetch form {src} to {dst} with options {WD_OPTIONS}.")
client = wc.Client(WD_OPTIONS)
client.download_sync(src, dst)
def wd_publish(src, dst):
logger.info(f"Publish form {src} to {dst} with options {WD_OPTIONS}.")
client = wc.Client(WD_OPTIONS)
tmp = f"{dst[:-1]}__/" if dst[-1] == "/" else f"{dst}__"
client.upload_sync(local_path=src, remote_path=tmp)
client.move(remote_path_from=tmp, remote_path_to=dst)
|
21d6e4d9bcd17cc7a63b254564f92c62f8c0a09b
|
17e2a3a1d962d6528ee1efa45c253a198afd2537
|
/pyproj/__init__.py
|
99640abec0980a014a93018768a079fed5db425e
|
[
"MIT",
"LicenseRef-scancode-us-govt-public-domain"
] |
permissive
|
pyproj4/pyproj
|
21f63a51c5fef66f2a1e0cf49f06dc47293f1bf5
|
8e5f683f58a42933972daf48a9cd0d6dfede87f5
|
refs/heads/main
| 2023-09-01T01:07:41.428675
| 2023-08-31T17:59:33
| 2023-08-31T17:59:33
| 28,607,354
| 649
| 150
|
MIT
| 2023-09-09T02:08:56
| 2014-12-29T21:38:25
|
Python
|
UTF-8
|
Python
| false
| false
| 2,925
|
py
|
__init__.py
|
"""
Python interface to PROJ (https://proj.org),
cartographic projections and coordinate transformations library.
Download: http://python.org/pypi/pyproj
Requirements: Python 3.9+.
Contact: Jeffrey Whitaker <jeffrey.s.whitaker@noaa.gov>
Copyright (c) 2006-2018, Jeffrey Whitaker.
Copyright (c) 2019-2023, Open source contributors.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
import warnings
import pyproj.network
from pyproj._datadir import ( # noqa: F401 pylint: disable=unused-import
_pyproj_global_context_initialize,
set_use_global_context,
)
from pyproj._show_versions import ( # noqa: F401 pylint: disable=unused-import
show_versions,
)
from pyproj.crs import CRS # noqa: F401 pylint: disable=unused-import
from pyproj.database import ( # noqa: F401 pylint: disable=unused-import
get_authorities,
get_codes,
get_units_map,
)
from pyproj.exceptions import ( # noqa: F401 pylint: disable=unused-import
DataDirError,
ProjError,
)
from pyproj.geod import ( # noqa: F401 pylint: disable=unused-import
Geod,
geodesic_version_str,
pj_ellps,
)
from pyproj.list import ( # noqa: F401 pylint: disable=unused-import
get_ellps_map,
get_prime_meridians_map,
get_proj_operations_map,
)
from pyproj.proj import Proj, pj_list # noqa: F401 pylint: disable=unused-import
from pyproj.transformer import ( # noqa: F401 pylint: disable=unused-import
Transformer,
itransform,
proj_version_str,
transform,
)
__version__ = "3.6.1.dev0"
__all__ = [
"Proj",
"Geod",
"CRS",
"Transformer",
"transform",
"itransform",
"pj_ellps",
"pj_list",
"get_ellps_map",
"get_prime_meridians_map",
"get_proj_operations_map",
"get_units_map",
"show_versions",
]
__proj_version__ = proj_version_str
try:
_pyproj_global_context_initialize()
except DataDirError as err:
warnings.warn(str(err))
pyproj.network.set_ca_bundle_path()
|
c7a99536179415a287eebc5d764e4504f3e5b419
|
e7f2a8c466c14b9821e59740ed0407107e1254a4
|
/tests/integration_tests/core/test_cli_response.py
|
ffa78d9b6d1034721632fd2291c657eb77aa3469
|
[
"LicenseRef-scancode-generic-cla",
"Apache-2.0",
"MIT"
] |
permissive
|
RasaHQ/rasa
|
4a31134308a9a4d8824fe7faef02526accdd0f19
|
50857610bdf0c26dc61f3203a6cbb4bcf193768c
|
refs/heads/main
| 2023-08-28T01:53:56.981600
| 2023-08-25T10:20:49
| 2023-08-25T10:20:49
| 70,908,208
| 13,167
| 3,739
|
Apache-2.0
| 2023-09-14T09:54:40
| 2016-10-14T12:27:49
|
Python
|
UTF-8
|
Python
| false
| false
| 5,446
|
py
|
test_cli_response.py
|
from pathlib import Path
import pytest
from typing import Callable
import shutil
from _pytest.pytester import Pytester
from _pytest.pytester import RunResult
from _pytest.fixtures import FixtureRequest
# NOTE this will be extended to test cli logs at process run to validate log level
@pytest.fixture
def run(pytester: Pytester) -> Callable[..., RunResult]:
def do_run(*args):
args = [shutil.which("rasa")] + list(args)
return pytester.run(*args)
return do_run
def test_rasa_validate_debug_no_errors(
run: Callable[..., RunResult], request: FixtureRequest
):
# Test captures the subprocess output for the command run
# validates that the data in 'data/test/test_integration' throws no cli errors
# in 'debug' mode
test_data_dir = Path(request.config.rootdir, "data", "test", "test_integration")
test_config_dir = Path(request.config.rootdir, "data", "test_config")
source_file = (test_data_dir).absolute()
domain_file = (test_data_dir / "domain.yml").absolute()
config_file = (test_config_dir / "config_unique_assistant_id.yml").absolute()
result = run(
"data",
"validate",
"--data",
str(source_file),
"-d",
str(domain_file),
"-c",
str(config_file),
"--debug",
)
assert result.ret == 0
assert "DEBUG" in str(result.stderr)
output_text = "".join(result.outlines)
assert "Rasa Open Source reports anonymous usage telemetry"
"to help improve the product" in output_text
assert "for all its users." in output_text
assert "If you'd like to opt-out,"
"you can use `rasa telemetry disable`." in output_text
assert "To learn more, check out"
"https://rasa.com/docs/rasa/telemetry/telemetry." in output_text
def test_rasa_validate_debug_with_errors(
run: Callable[..., RunResult], request: FixtureRequest
):
# Test captures the subprocess output for the command run
# validates that the data in 'data/test/test_integration_incorrect'
# throws cli errors about intent "greet"
# in 'debug' mode
err = (
"UserWarning: The intent 'greet' is listed in the domain file, "
"but is not found in the NLU training data."
)
test_data_dir = Path(request.config.rootdir, "data", "test", "test_integration_err")
test_config_dir = Path(request.config.rootdir, "data", "test_config")
source_file = (test_data_dir).absolute()
domain_file = (test_data_dir / "domain.yml").absolute()
config_file = (test_config_dir / "config_unique_assistant_id.yml").absolute()
result = run(
"data",
"validate",
"--data",
str(source_file),
"-d",
str(domain_file),
"-c",
str(config_file),
"--fail-on-warnings",
"--debug",
)
assert result.ret == 1
assert err in str(result.stderr)
def test_rasa_validate_verbose_no_errors(
run: Callable[..., RunResult], request: FixtureRequest
):
# Test captures the subprocess output for the command run
# and validates that the data in 'data/test/test_integration' throws no cli errors
# in 'verbose' mode
test_data_dir = Path(request.config.rootdir, "data", "test", "test_integration")
test_config_dir = Path(request.config.rootdir, "data", "test_config")
source_file = (test_data_dir).absolute()
domain_file = (test_data_dir / "domain.yml").absolute()
config_file = (test_config_dir / "config_unique_assistant_id.yml").absolute()
result = run(
"data",
"validate",
"--data",
str(source_file),
"-d",
str(domain_file),
"-c",
str(config_file),
"--verbose",
)
assert result.ret == 0
assert "INFO" in str(result.stderr)
output_text = "".join(result.outlines)
assert "Rasa Open Source reports anonymous usage telemetry"
"to help improve the product" in output_text
assert "for all its users." in output_text
assert "If you'd like to opt-out,"
"you can use `rasa telemetry disable`." in output_text
assert "To learn more, check out"
"https://rasa.com/docs/rasa/telemetry/telemetry." in output_text
def test_rasa_validate_quiet_no_errors(
run: Callable[..., RunResult], request: FixtureRequest
):
# Test captures the subprocess output for the command run
# and validates that the data in 'data/test/test_integration' throws no cli errors
# in 'quiet' mode
test_data_dir = Path(request.config.rootdir, "data", "test", "test_integration")
test_config_dir = Path(request.config.rootdir, "data", "test_config")
source_file = (test_data_dir).absolute()
domain_file = (test_data_dir / "domain.yml").absolute()
config_file = (test_config_dir / "config_unique_assistant_id.yml").absolute()
result = run(
"data",
"validate",
"--data",
str(source_file),
"-d",
str(domain_file),
"-c",
str(config_file),
"--quiet",
)
assert result.ret == 0
output_text = "".join(result.outlines)
assert "Rasa Open Source reports anonymous usage telemetry"
"to help improve the product" in output_text
assert "for all its users." in output_text
assert "If you'd like to opt-out,"
"you can use `rasa telemetry disable`." in output_text
assert "To learn more, check out"
"https://rasa.com/docs/rasa/telemetry/telemetry." in output_text
|
3b4d241a918e31da50366044b5dde731b7289175
|
11cd362cdd78c2fc48042ed203614b201ac94aa6
|
/desktop/core/ext-py3/eventlet-0.30.2/eventlet/green/urllib2.py
|
c53ecbb91220dcdf2b883db63f61e8398ecc6c03
|
[
"CC-BY-3.0",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"ZPL-2.0",
"Unlicense",
"LGPL-3.0-only",
"CC0-1.0",
"LicenseRef-scancode-other-permissive",
"CNRI-Python",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-2.0-or-later",
"Python-2.0",
"GPL-3.0-only",
"CC-BY-4.0",
"LicenseRef-scancode-jpython-1.1",
"AFL-2.1",
"JSON",
"WTFPL",
"MIT",
"LicenseRef-scancode-generic-exception",
"LicenseRef-scancode-jython",
"GPL-3.0-or-later",
"LicenseRef-scancode-python-cwi",
"BSD-3-Clause",
"LGPL-3.0-or-later",
"Zlib",
"LicenseRef-scancode-free-unknown",
"Classpath-exception-2.0",
"LicenseRef-scancode-proprietary-license",
"GPL-1.0-or-later",
"LGPL-2.0-or-later",
"MPL-2.0",
"ISC",
"GPL-2.0-only",
"ZPL-2.1",
"BSL-1.0",
"Apache-2.0",
"LGPL-2.0-only",
"LicenseRef-scancode-public-domain",
"Xnet",
"BSD-2-Clause"
] |
permissive
|
cloudera/hue
|
b42343d0e03d2936b5a9a32f8ddb3e9c5c80c908
|
dccb9467675c67b9c3399fc76c5de6d31bfb8255
|
refs/heads/master
| 2023-08-31T06:49:25.724501
| 2023-08-28T20:45:00
| 2023-08-28T20:45:00
| 732,593
| 5,655
| 2,244
|
Apache-2.0
| 2023-09-14T03:05:41
| 2010-06-21T19:46:51
|
JavaScript
|
UTF-8
|
Python
| false
| false
| 488
|
py
|
urllib2.py
|
from eventlet import patcher
from eventlet.green import ftplib
from eventlet.green import httplib
from eventlet.green import socket
from eventlet.green import ssl
from eventlet.green import time
from eventlet.green import urllib
patcher.inject(
'urllib2',
globals(),
('httplib', httplib),
('socket', socket),
('ssl', ssl),
('time', time),
('urllib', urllib))
FTPHandler.ftp_open = patcher.patch_function(FTPHandler.ftp_open, ('ftplib', ftplib))
del patcher
|
6025186c0befb1c8cca1ce0ba367b51e96e24a64
|
6c8cf2992477c4113bc161fac04f693fd8e49491
|
/src/chapter-2/test_xml_report.py
|
f0f05872f8534b8d16a2addf4b1dfcb63c061e0a
|
[
"MIT"
] |
permissive
|
luizyao/pytest-chinese-doc
|
19899b049ad066ef8724b6a08cec82cfab8a42fa
|
d513071630f2b08593688cc82c83df3fcd641efd
|
refs/heads/5.1.3
| 2021-09-28T21:38:28.224366
| 2021-09-25T09:24:56
| 2021-09-25T09:24:56
| 211,014,806
| 344
| 83
|
MIT
| 2021-09-25T09:24:57
| 2019-09-26T06:21:08
|
Python
|
UTF-8
|
Python
| false
| false
| 1,136
|
py
|
test_xml_report.py
|
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
'''
Author: Luiz Yao (luizyao@163.com)
Created Date: 2019-09-27 14:44:24
-----
Last Modified: 2019-09-27 16:18:35
Modified By: Luiz Yao (luizyao@163.com)
-----
THIS PROGRAM IS FREE SOFTWARE, IS LICENSED UNDER MIT.
A short and simple permissive license with conditions
only requiring preservation of copyright and license notices.
Copyright © 2019 Yao Meng
-----
HISTORY:
Date By Comments
---------- -------- ---------------------------------------------------------
'''
import pytest
@pytest.fixture(scope="session")
def log_global_env_facts(record_testsuite_property):
record_testsuite_property("EXECUTOR", "luizyao")
record_testsuite_property("LOCATION", "NJ")
def test_record_property(record_property):
record_property("test_id", 10010)
assert 1
@pytest.mark.test_id(10010)
def test_record_property1():
assert 1
def test_record_property2(record_xml_attribute):
record_xml_attribute('test_id', 10010)
record_xml_attribute('classname', 'custom_classname')
assert 1
def test_record_property3(log_global_env_facts):
assert 1
|
7dd39fa0f99d69680a8925fdd8d9526ca5884cac
|
6f0ceee714bccf2a89c34a06aabd3bcb781a2fa4
|
/docs/tutorial_utils/data/oxford_102_flower_dataset.py
|
0dcae2209c6e340e850cdcd631e16c99f45dcbc4
|
[
"Apache-2.0",
"MIT",
"Unlicense",
"BSL-1.0",
"NCSA",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause",
"OFL-1.0",
"BSD-2-Clause-Views",
"Zlib"
] |
permissive
|
yajiedesign/mxnet
|
5a495fd06dd1730c17d2d27d7e46c8a770847f17
|
8e5a16cf673db5aceb48d2cf7a0fc1abd0ee5e51
|
refs/heads/master
| 2021-03-30T22:37:18.603396
| 2020-10-23T06:40:17
| 2020-10-23T06:40:17
| 43,763,550
| 214
| 59
|
Apache-2.0
| 2020-06-01T23:31:15
| 2015-10-06T16:36:40
|
C++
|
UTF-8
|
Python
| false
| false
| 6,165
|
py
|
oxford_102_flower_dataset.py
|
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
"""
This scripts downloads and prepares the Oxford 102 Category Flower Dataset for training
Dataset is from: http://www.robots.ox.ac.uk/~vgg/data/flowers/102/index.html
Script is modified from: https://github.com/Arsey/keras-transfer-learning-for-oxford102
"""
import glob
import os
import tarfile
from shutil import copyfile
import numpy as np
from mxnet import gluon
from scipy.io import loadmat
label_names = [
'pink primrose',
'hard-leaved pocket orchid',
'canterbury bells',
'sweet pea',
'english marigold',
'tiger lily',
'moon orchid',
'bird of paradise',
'monkshood',
'globe thistle',
'snapdragon',
"colt's foot",
'king protea',
'spear thistle',
'yellow iris',
'globe-flower',
'purple coneflower',
'peruvian lily',
'balloon flower',
'giant white arum lily',
'fire lily',
'pincushion flower',
'fritillary',
'red ginger',
'grape hyacinth',
'corn poppy',
'prince of wales feathers',
'stemless gentian',
'artichoke',
'sweet william',
'carnation',
'garden phlox',
'love in the mist',
'mexican aster',
'alpine sea holly',
'ruby-lipped cattleya',
'cape flower',
'great masterwort',
'siam tulip',
'lenten rose',
'barbeton daisy',
'daffodil',
'sword lily',
'poinsettia',
'bolero deep blue',
'wallflower',
'marigold',
'buttercup',
'oxeye daisy',
'common dandelion',
'petunia',
'wild pansy',
'primula',
'sunflower',
'pelargonium',
'bishop of llandaff',
'gaura',
'geranium',
'orange dahlia',
'pink-yellow dahlia?',
'cautleya spicata',
'japanese anemone',
'black-eyed susan',
'silverbush',
'californian poppy',
'osteospermum',
'spring crocus',
'bearded iris',
'windflower',
'tree poppy',
'gazania',
'azalea',
'water lily',
'rose',
'thorn apple',
'morning glory',
'passion flower',
'lotus',
'toad lily',
'anthurium',
'frangipani',
'clematis',
'hibiscus',
'columbine',
'desert-rose',
'tree mallow',
'magnolia',
'cyclamen',
'watercress',
'canna lily',
'hippeastrum ',
'bee balm',
'ball moss',
'foxglove',
'bougainvillea',
'camellia',
'mallow',
'mexican petunia',
'bromelia',
'blanket flower',
'trumpet creeper',
'blackberry lily'
]
def download_data():
data_url = 'http://www.robots.ox.ac.uk/~vgg/data/flowers/102/'
image_file_name = '102flowers.tgz'
label_file_name = 'imagelabels.mat'
setid_file_name = 'setid.mat'
global data_path, image_path, label_path, setid_path
image_path = os.path.join(data_path, image_file_name)
label_path = os.path.join(data_path, label_file_name)
setid_path = os.path.join(data_path, setid_file_name)
# download the dataset into current directory
if not os.path.exists(data_path):
os.mkdir(data_path)
if not os.path.isfile(image_path):
gluon.utils.download(url=data_url + image_file_name, path=data_path)
if not os.path.exists(os.path.join(data_path, 'jpg')):
print("Extracting downloaded dataset...")
tarfile.open(image_path).extractall(path=data_path)
if not os.path.isfile(label_path):
gluon.utils.download(url=data_url + label_file_name, path=data_path)
if not os.path.isfile(setid_path):
gluon.utils.download(url=data_url + setid_file_name, path=data_path)
def prepare_data():
# Read .mat file containing training, testing, and validation sets.
global data_path, image_path, label_path, setid_path, label_names
setid = loadmat(setid_path)
idx_train = setid['trnid'][0] - 1
idx_test = setid['tstid'][0] - 1
idx_valid = setid['valid'][0] - 1
# Read .mat file containing image labels.
image_labels = loadmat(label_path)['labels'][0]
# Subtract one to get 0-based labels
image_labels -= 1
# convert label from number to flower names
image_labels = [label_names[i] for i in image_labels]
# extracted images are stored in folder 'jpg'
files = sorted(glob.glob(os.path.join(data_path, 'jpg', '*.jpg')))
file_label_pairs = np.array([i for i in zip(files, image_labels)])
# move files from extracted folder to train, test, valid
move_files('train', file_label_pairs[idx_test, :])
move_files('test', file_label_pairs[idx_train, :])
move_files('valid', file_label_pairs[idx_valid, :])
def move_files(dir_name, file_label_pairs):
data_segment_dir = os.path.join(data_path, dir_name)
if not os.path.exists(data_segment_dir):
os.mkdir(data_segment_dir)
for label in label_names:
class_dir = os.path.join(data_segment_dir, label)
if not os.path.exists(class_dir):
os.mkdir(class_dir)
for file, label in file_label_pairs:
src = str(file)
dst = os.path.join(data_path, dir_name, label, src.split(os.sep)[-1])
copyfile(src, dst)
def generate_synset():
with open('synset.txt', 'w') as f:
# Gluon Dataset API will load synset in sorted order
for label in sorted(label_names):
f.write(label.strip() + '\n')
f.close()
def get_data(dir_name):
global data_path
data_path = dir_name
download_data()
prepare_data()
generate_synset()
|
068c53f4784bd37cf81af0caed7a39409f968214
|
f1c2e4b3147af77e23306f841610aafd6db1c6b0
|
/submarine-sdk/pysubmarine/submarine/ml/pytorch/optimizer.py
|
08e1ca2e73fb6241a2f8cd62d76a97eefc8ed953
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"BSD-2-Clause",
"GPL-2.0-only",
"LicenseRef-scancode-public-domain",
"MIT",
"CDDL-1.1",
"Classpath-exception-2.0"
] |
permissive
|
apache/submarine
|
a2927f5f4f7f5faff4701139f2f0f88a98195e7f
|
0c10613f39b707d5e446c515c12fa28295c8052e
|
refs/heads/master
| 2023-08-30T14:35:43.145942
| 2023-08-20T00:19:54
| 2023-08-24T23:50:49
| 209,459,144
| 663
| 269
|
Apache-2.0
| 2023-09-03T09:05:06
| 2019-09-19T04:00:17
|
Java
|
UTF-8
|
Python
| false
| false
| 1,161
|
py
|
optimizer.py
|
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from torch import optim
class OptimizerKey:
ADAM = "adam"
ADAGRAD = "adagrad"
SGD = "sgd"
def get_optimizer(key):
key = key.lower()
if key == OptimizerKey.ADAM:
return optim.Adam
if key == OptimizerKey.ADAGRAD:
return optim.Adagrad
if key == OptimizerKey.SGD:
return optim.SGD
raise ValueError("Invalid optimizer_key:", key)
|
630c6c69dbc81a3170307e629e68f5743e30e22a
|
df35f22365bb3cd74b0629eae37ac79c594e7f1f
|
/tests/sqlsklearn/lexer.py
|
2707789415d50e6c20c9915825d992b22ea3dd9b
|
[
"Apache-2.0"
] |
permissive
|
lqkweb/sqlflow
|
187e90e54acf4d4adb96b8bd6703c6a78979a39d
|
cda23539270873a5c307c85f52ba1981894e3892
|
refs/heads/master
| 2023-02-21T16:38:18.851615
| 2022-08-01T09:52:06
| 2022-08-01T09:52:06
| 142,440,517
| 154
| 33
|
Apache-2.0
| 2023-02-15T19:38:07
| 2018-07-26T12:52:17
|
Python
|
UTF-8
|
Python
| false
| false
| 1,355
|
py
|
lexer.py
|
# coding=utf-8
import ply.lex as lex
# List of token names.
reversed = (
# 基本操作
'LOAD', 'SAVE', 'TRAIN', 'RUN', 'OVERWRITE', 'CONNECT', 'SET',
# 数据源
'PARQUET', 'CSV', 'JSON', 'MLSQL',
# sklearn算法
'SKLEARN', 'KNN', 'LR',
# pandas and numpy
'PD', 'NP',
)
tokens = reversed + (
# Symbol
'ID', 'NUMBER', 'STRING',
)
# Regular expression rules for simple tokens
literals = ['(', ')', ',', ';', '.']
# A string containing ignored characters (spaces and tabs)
t_ignore = ' \t'
# Ignore note
t_ignore_note = r'\/\*.*?\*/'
def t_ID(t):
r'[a-zA-Z_][a-zA-Z_0-9]*'
t.type = 'ID' if t.value.upper() not in reversed else t.value.upper() # Check for reserved words
return t
def t_NUMBER(t):
r'\d+'
t.value = float(t.value)
return t
def t_STRING(t):
r'(\'|").*?(\'|")'
t.value = t.value[1: -1]
return t
def t_newline(t):
r'\n+'
t.lexer.lineno += len(t.value)
# Error handling rule
def t_error(t):
print("LexError [%s, %s]: Illegal character '%s'." % (
t.lexer.lineno, t.lexer.lexpos, t.value[0]))
lexer = lex.lex(debug=1)
if __name__ == '__main__':
data = input('Lexer > ')
# lexer = lex.lex()
# lexer.input(data)
# while True:
# tok = lexer.token()
# if not tok:
# break
# print(tok)
|
1eb69258ee7f473e6506b9f895f74b395b58abed
|
f0f07a94d3876779d27c6b01e2c08c08391fbafb
|
/tensorflow_model_analysis/extractors/tflite_predict_extractor_test.py
|
1dad50b6d7c56eb8cbff8c0a67742155ec8bce5e
|
[
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] |
permissive
|
tensorflow/model-analysis
|
4ec2f637a657d49aa503f2f047bed45b82c93f7b
|
ee0d8eff562bfe068a3ffdc4da0472cc90adaf41
|
refs/heads/master
| 2023-08-18T22:51:47.404027
| 2023-08-17T22:39:56
| 2023-08-17T22:40:27
| 126,528,713
| 1,200
| 313
|
Apache-2.0
| 2023-08-14T20:18:27
| 2018-03-23T19:08:49
|
Python
|
UTF-8
|
Python
| false
| false
| 6,983
|
py
|
tflite_predict_extractor_test.py
|
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for tflite predict extractor."""
import itertools
import os
import tempfile
from absl.testing import parameterized
import apache_beam as beam
from apache_beam.testing import util
import tensorflow as tf
from tensorflow_model_analysis import constants
from tensorflow_model_analysis.api import model_eval_lib
from tensorflow_model_analysis.eval_saved_model import testutil
from tensorflow_model_analysis.extractors import features_extractor
from tensorflow_model_analysis.extractors import tflite_predict_extractor
from tensorflow_model_analysis.proto import config_pb2
from tfx_bsl.tfxio import test_util
from google.protobuf import text_format
from tensorflow_metadata.proto.v0 import schema_pb2
_TF_MAJOR_VERSION = int(tf.version.VERSION.split('.')[0])
_MULTI_MODEL_CASES = [False, True]
_MULTI_OUTPUT_CASES = [False, True]
# Equality op not supported in TF1. See b/242088810
_BYTES_FEATURE_CASES = [False] if _TF_MAJOR_VERSION < 2 else [False, True]
class TFLitePredictExtractorTest(testutil.TensorflowModelAnalysisTest,
parameterized.TestCase):
@parameterized.parameters(
itertools.product(_MULTI_MODEL_CASES, _MULTI_OUTPUT_CASES,
_BYTES_FEATURE_CASES))
def testTFlitePredictExtractorWithKerasModel(self, multi_model, multi_output,
use_bytes_feature):
input1 = tf.keras.layers.Input(shape=(1,), name='input1')
input2 = tf.keras.layers.Input(shape=(1,), name='input2')
input3 = tf.keras.layers.Input(shape=(1,), name='input3', dtype=tf.string)
inputs = [input1, input2, input3]
if use_bytes_feature:
input_layer = tf.keras.layers.concatenate(
[inputs[0], inputs[1],
tf.cast(inputs[2] == 'a', tf.float32)])
else:
input_layer = tf.keras.layers.concatenate([inputs[0], inputs[1]])
output_layers = {}
output_layers['output1'] = (
tf.keras.layers.Dense(1, activation=tf.nn.sigmoid,
name='output1')(input_layer))
if multi_output:
output_layers['output2'] = (
tf.keras.layers.Dense(1, activation=tf.nn.sigmoid,
name='output2')(input_layer))
model = tf.keras.models.Model(inputs, output_layers)
model.compile(
optimizer=tf.keras.optimizers.Adam(lr=.001),
loss=tf.keras.losses.binary_crossentropy,
metrics=['accuracy'])
train_features = {
'input1': [[0.0], [1.0]],
'input2': [[1.0], [0.0]],
'input3': [[b'a'], [b'b']]
}
labels = {'output1': [[1], [0]]}
if multi_output:
labels['output2'] = [[1], [0]]
example_weights = {'output1': [1.0, 0.5]}
if multi_output:
example_weights['output2'] = [1.0, 0.5]
dataset = tf.data.Dataset.from_tensor_slices(
(train_features, labels, example_weights))
dataset = dataset.shuffle(buffer_size=1).repeat().batch(2)
model.fit(dataset, steps_per_epoch=1)
converter = tf.compat.v2.lite.TFLiteConverter.from_keras_model(model)
tflite_model = converter.convert()
tflite_model_dir = tempfile.mkdtemp()
with tf.io.gfile.GFile(os.path.join(tflite_model_dir, 'tflite'), 'wb') as f:
f.write(tflite_model)
model_specs = [config_pb2.ModelSpec(name='model1', model_type='tf_lite')]
if multi_model:
model_specs.append(
config_pb2.ModelSpec(name='model2', model_type='tf_lite'))
eval_config = config_pb2.EvalConfig(model_specs=model_specs)
eval_shared_models = [
self.createTestEvalSharedModel(
model_name='model1',
eval_saved_model_path=tflite_model_dir,
model_type='tf_lite')
]
if multi_model:
eval_shared_models.append(
self.createTestEvalSharedModel(
model_name='model2',
eval_saved_model_path=tflite_model_dir,
model_type='tf_lite'))
schema = text_format.Parse(
"""
feature {
name: "input1"
type: FLOAT
}
feature {
name: "input2"
type: FLOAT
}
feature {
name: "input3"
type: BYTES
}
feature {
name: "non_model_feature"
type: INT
}
""", schema_pb2.Schema())
tfx_io = test_util.InMemoryTFExampleRecord(
schema=schema, raw_record_column_name=constants.ARROW_INPUT_COLUMN)
feature_extractor = features_extractor.FeaturesExtractor(eval_config)
predictor = tflite_predict_extractor.TFLitePredictExtractor(
eval_config=eval_config, eval_shared_model=eval_shared_models)
examples = [
self._makeExample(
input1=0.0, input2=1.0, input3=b'a', non_model_feature=0),
self._makeExample(
input1=1.0, input2=0.0, input3=b'b', non_model_feature=1),
]
with beam.Pipeline() as pipeline:
# pylint: disable=no-value-for-parameter
result = (
pipeline
| 'Create' >> beam.Create([e.SerializeToString() for e in examples],
reshuffle=False)
| 'BatchExamples' >> tfx_io.BeamSource(batch_size=2)
| 'InputsToExtracts' >> model_eval_lib.BatchedInputsToExtracts()
| feature_extractor.stage_name >> feature_extractor.ptransform
| predictor.stage_name >> predictor.ptransform)
# pylint: enable=no-value-for-parameter
def check_result(got):
try:
self.assertLen(got, 1)
got = got[0]
self.assertIn(constants.PREDICTIONS_KEY, got)
for model in ('model1', 'model2') if multi_model else (''):
per_model_result = got[constants.PREDICTIONS_KEY]
if model:
self.assertIn(model, per_model_result)
per_model_result = per_model_result[model]
for output in ('Identity', 'Identity_1') if multi_output else (''):
per_output_result = per_model_result
if output:
self.assertIn(output, per_output_result)
per_output_result = per_output_result[output]
self.assertLen(per_output_result, 2)
except AssertionError as err:
raise util.BeamAssertException(err)
util.assert_that(result, check_result, label='result')
if __name__ == '__main__':
tf.compat.v1.enable_v2_behavior()
tf.test.main()
|
1653c9421bd06a911859196cf021f891b5d73806
|
0db19410e9751790af8ce4a0a9332293e379c02f
|
/mmpose/models/backbones/__init__.py
|
cb2498560a34afca0f3218eb9fb3d9a5dce04f33
|
[
"Apache-2.0"
] |
permissive
|
open-mmlab/mmpose
|
2c9986521d35eee35d822fb255e8e68486026d94
|
537bd8e543ab463fb55120d5caaa1ae22d6aaf06
|
refs/heads/main
| 2023-08-30T19:44:21.349410
| 2023-07-04T13:18:22
| 2023-07-04T13:18:22
| 278,003,645
| 4,037
| 1,171
|
Apache-2.0
| 2023-09-14T09:44:55
| 2020-07-08T06:02:55
|
Python
|
UTF-8
|
Python
| false
| false
| 1,365
|
py
|
__init__.py
|
# Copyright (c) OpenMMLab. All rights reserved.
from .alexnet import AlexNet
from .cpm import CPM
from .hourglass import HourglassNet
from .hourglass_ae import HourglassAENet
from .hrformer import HRFormer
from .hrnet import HRNet
from .litehrnet import LiteHRNet
from .mobilenet_v2 import MobileNetV2
from .mobilenet_v3 import MobileNetV3
from .mspn import MSPN
from .pvt import PyramidVisionTransformer, PyramidVisionTransformerV2
from .regnet import RegNet
from .resnest import ResNeSt
from .resnet import ResNet, ResNetV1d
from .resnext import ResNeXt
from .rsn import RSN
from .scnet import SCNet
from .seresnet import SEResNet
from .seresnext import SEResNeXt
from .shufflenet_v1 import ShuffleNetV1
from .shufflenet_v2 import ShuffleNetV2
from .swin import SwinTransformer
from .tcn import TCN
from .v2v_net import V2VNet
from .vgg import VGG
from .vipnas_mbv3 import ViPNAS_MobileNetV3
from .vipnas_resnet import ViPNAS_ResNet
__all__ = [
'AlexNet', 'HourglassNet', 'HourglassAENet', 'HRNet', 'MobileNetV2',
'MobileNetV3', 'RegNet', 'ResNet', 'ResNetV1d', 'ResNeXt', 'SCNet',
'SEResNet', 'SEResNeXt', 'ShuffleNetV1', 'ShuffleNetV2', 'CPM', 'RSN',
'MSPN', 'ResNeSt', 'VGG', 'TCN', 'ViPNAS_ResNet', 'ViPNAS_MobileNetV3',
'LiteHRNet', 'V2VNet', 'HRFormer', 'PyramidVisionTransformer',
'PyramidVisionTransformerV2', 'SwinTransformer'
]
|
8cbc63958624b597ded5c618e93ea6165ab257b5
|
010279e2ba272d09e9d2c4e903722e5faba2cf7a
|
/contrib/python/Pygments/py3/pygments/styles/zenburn.py
|
35d5ec5279212a29d8b41680b53c56e1c14a230a
|
[
"Apache-2.0",
"BSD-2-Clause"
] |
permissive
|
catboost/catboost
|
854c1a1f439a96f1ae6b48e16644be20aa04dba2
|
f5042e35b945aded77b23470ead62d7eacefde92
|
refs/heads/master
| 2023-09-01T12:14:14.174108
| 2023-09-01T10:01:01
| 2023-09-01T10:22:12
| 97,556,265
| 8,012
| 1,425
|
Apache-2.0
| 2023-09-11T03:32:32
| 2017-07-18T05:29:04
|
Python
|
UTF-8
|
Python
| false
| false
| 2,148
|
py
|
zenburn.py
|
"""
pygments.styles.zenburn
~~~~~~~~~~~~~~~~~~~~~~~
Low contrast color scheme Zenburn.
See: https://kippura.org/zenburnpage/
https://github.com/jnurmine/Zenburn
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Token, Name, Operator, Keyword, Generic, Comment, \
Number, String, Literal, Punctuation, Error
class ZenburnStyle(Style):
"""
Low contrast Zenburn style.
"""
background_color = '#3f3f3f'
highlight_color = '#484848'
line_number_color = '#5d6262'
line_number_background_color = '#353535'
line_number_special_color = '#7a8080'
line_number_special_background_color = '#353535'
styles = {
Token: '#dcdccc',
Error: '#e37170 bold',
Keyword: '#efdcbc',
Keyword.Type: '#dfdfbf bold',
Keyword.Constant: '#dca3a3',
Keyword.Declaration: '#f0dfaf',
Keyword.Namespace: '#f0dfaf',
Name: '#dcdccc',
Name.Tag: '#e89393 bold',
Name.Entity: '#cfbfaf',
Name.Constant: '#dca3a3',
Name.Class: '#efef8f',
Name.Function: '#efef8f',
Name.Builtin: '#efef8f',
Name.Builtin.Pseudo: '#dcdccc',
Name.Attribute: '#efef8f',
Name.Exception: '#c3bf9f bold',
Literal: '#9fafaf',
String: '#cc9393',
String.Doc: '#7f9f7f',
String.Interpol: '#dca3a3 bold',
Number: '#8cd0d3',
Number.Float: '#c0bed1',
Operator: '#f0efd0',
Punctuation: '#f0efd0',
Comment: '#7f9f7f italic',
Comment.Preproc: '#dfaf8f bold',
Comment.PreprocFile: '#cc9393',
Comment.Special: '#dfdfdf bold',
Generic: '#ecbcbc bold',
Generic.Emph: '#ffffff bold',
Generic.Output: '#5b605e bold',
Generic.Heading: '#efefef bold',
Generic.Deleted: '#c3bf9f bg:#313c36',
Generic.Inserted: '#709080 bg:#313c36 bold',
Generic.Traceback: '#80d4aa bg:#2f2f2f bold',
Generic.Subheading: '#efefef bold',
}
|
9ccbc3ceff8810653816e645b7a55b385218aea3
|
365d3b4afb3bf5daf48dddbf9f86103dc613d993
|
/server/protocols/ructf_tcp.py
|
fcf85ef7618972deb4ecd1ec330f189010be822b
|
[
"MIT"
] |
permissive
|
DestructiveVoice/DestructiveFarm
|
af228fbcaf2d6d138e54537aee61cc6420e0e69d
|
69cc5821a16fc38e6670e666bc0c8d5ee311e57a
|
refs/heads/master
| 2022-05-29T09:48:53.569376
| 2022-03-17T13:19:26
| 2022-03-17T13:19:26
| 140,931,924
| 234
| 91
|
NOASSERTION
| 2022-05-24T17:40:31
| 2018-07-14T09:01:37
|
CSS
|
UTF-8
|
Python
| false
| false
| 2,489
|
py
|
ructf_tcp.py
|
import socket
from server import app
from server.models import FlagStatus, SubmitResult
RESPONSES = {
FlagStatus.QUEUED: ['timeout', 'game not started', 'try again later', 'game over', 'is not up',
'no such flag'],
FlagStatus.ACCEPTED: ['accepted', 'congrat'],
FlagStatus.REJECTED: ['bad', 'wrong', 'expired', 'unknown', 'your own',
'too old', 'not in database', 'already submitted', 'invalid flag'],
}
# The RuCTF checksystem adds a signature to all correct flags. It returns
# "invalid flag" verdict if the signature is invalid and "no such flag" verdict if
# the signature is correct but the flag was not found in the checksystem database.
#
# The latter situation happens if a checker puts the flag to the service before putting it
# to the checksystem database. We should resent the flag later in this case.
READ_TIMEOUT = 5
APPEND_TIMEOUT = 0.05
BUFSIZE = 4096
def recvall(sock):
sock.settimeout(READ_TIMEOUT)
chunks = [sock.recv(BUFSIZE)]
sock.settimeout(APPEND_TIMEOUT)
while True:
try:
chunk = sock.recv(BUFSIZE)
if not chunk:
break
chunks.append(chunk)
except socket.timeout:
break
sock.settimeout(READ_TIMEOUT)
return b''.join(chunks)
def submit_flags(flags, config):
sock = socket.create_connection((config['SYSTEM_HOST'], config['SYSTEM_PORT']),
READ_TIMEOUT)
greeting = recvall(sock)
if b'Enter your flags' not in greeting:
raise Exception('Checksystem does not greet us: {}'.format(greeting))
unknown_responses = set()
for item in flags:
sock.sendall(item.flag.encode() + b'\n')
response = recvall(sock).decode().strip()
if response:
response = response.splitlines()[0]
response = response.replace('[{}] '.format(item.flag), '')
response_lower = response.lower()
for status, substrings in RESPONSES.items():
if any(s in response_lower for s in substrings):
found_status = status
break
else:
found_status = FlagStatus.QUEUED
if response not in unknown_responses:
unknown_responses.add(response)
app.logger.warning('Unknown checksystem response (flag will be resent): %s', response)
yield SubmitResult(item.flag, found_status, response)
sock.close()
|
27b5dbc3ad2de9e3476ae268f864e42c5e0d693b
|
79f1522bc9da6586037f2d8df5a0d9a76df1c2ce
|
/evue/elements/progress.py
|
bc099a3b9421559b0d0a1f08275cf110d44fd749
|
[
"Apache-2.0"
] |
permissive
|
scriptiot/evue
|
824d531af42f63e7c8e684bfddbce74705b44608
|
6f1b57babd1a0d63d64b0963132c664e6c1ab753
|
refs/heads/master
| 2023-06-21T19:05:11.025481
| 2023-01-11T07:50:33
| 2023-01-11T07:50:33
| 577,321,977
| 112
| 8
|
Apache-2.0
| 2023-02-09T16:26:31
| 2022-12-12T13:36:09
|
Python
|
UTF-8
|
Python
| false
| false
| 3,094
|
py
|
progress.py
|
# -*- coding: utf-8 -*-
from flet import (
Draggable,
alignment,
border_radius
)
from .fletbaseelement import FletBaseElement
from .widgets import BaseContainer
class ProgressElement(FletBaseElement):
def __init__(self, node, parent, draggable=False, sessionID=None):
super().__init__(node, parent, draggable, sessionID=sessionID)
self.create(parent, draggable)
self.setParent(parent)
self['percent'] = 0
def create(self, parent, draggable=False):
self._progressbar_ = BaseContainer()
if draggable:
self._obj_ = BaseContainer(Draggable(content=self._progressbar_),
alignment=alignment.center_left
)
self._obj_.content.element = self
else:
self._obj_ = BaseContainer(self._progressbar_, alignment=alignment.center_left)
def set_width(self, value):
self._obj_.width = float(value)
self._progressbar_.width = self._obj_.width * (float(self['percent']) / 100)
def set_height(self, value):
self._obj_.height = value
self._progressbar_.height = value
def set_border_radius(self, value):
self.obj.border_radius = border_radius.all(value)
self._progressbar_.border_radius = border_radius.all(value)
def set_value(self, value):
self.set_percent(value)
def set_percent(self, value):
if self._obj_.width:
self._progressbar_.width = self._obj_.width * (value / 100)
def set_background_color(self, value):
self._obj_.bgcolor = value
def set_progress_indic_color(self, value):
self._progressbar_.bgcolor = value
@property
def style(self):
ret = super().style
ret.update({
"progress-indic-color": self._progressbar_.bgcolor
})
return ret
@property
def attributes(self):
attributes = super().attributes
attributes.update({
"percent": self['percent']
})
return attributes
def set_attributes(self, node):
super().set_attributes(node)
attributes = node['attributes']
style = attributes['style']
self.progress_indic_color = style['progress-indic-color']
# attr
self.percent = attributes["percent"]
def set_tiny_attributes(self, data):
style = data['style']
self.progress_indic_color = style['progress-indic-color']
# attr
self.percent = data["percent"]
@classmethod
def defaut_style(cls):
return {
"width": 200,
"height": 32,
"border-width": 0,
"border-radius": 100,
"border-color": "transparent",
"background-color": "white",
"progress-indic-color": "green",
}
@classmethod
def defaut_attributes(cls):
return {
"percent": 30,
"style": cls.defaut_style()
}
@classmethod
def defaut_json(cls, left=0, top=0):
return FletBaseElement.defaut_json(cls, "progress", left, top)
|
92e0aa76a69983b90f82c1d54be517e82ea944f7
|
45de7d905486934629730945619f49281ad19359
|
/examples/user_types2.py
|
714792d8dce567d547634c5903a8506f2b1fe065
|
[
"BSD-2-Clause"
] |
permissive
|
jmcnamara/XlsxWriter
|
599e1d225d698120ef931a776a9d93a6f60186ed
|
ab13807a1be68652ffc512ae6f5791d113b94ee1
|
refs/heads/main
| 2023-09-04T04:21:04.559742
| 2023-08-31T19:30:52
| 2023-08-31T19:30:52
| 7,433,211
| 3,251
| 712
|
BSD-2-Clause
| 2023-08-28T18:52:14
| 2013-01-04T01:07:06
|
Python
|
UTF-8
|
Python
| false
| false
| 1,329
|
py
|
user_types2.py
|
##############################################################################
#
# An example of adding support for user defined types to the XlsxWriter write()
# method.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright 2013-2023, John McNamara, jmcnamara@cpan.org
#
import xlsxwriter
import math
# Create a function that will behave like a worksheet write() method.
#
# This function takes a float and if it is NaN then it writes a blank cell
# instead. It should take the parameters shown below and return the return
# value from the called worksheet write_*() method.
#
def ignore_nan(worksheet, row, col, number, format=None):
if math.isnan(number):
return worksheet.write_blank(row, col, None, format)
else:
# Return control to the calling write() method for any other number.
return None
# Set up the workbook as usual.
workbook = xlsxwriter.Workbook("user_types2.xlsx")
worksheet = workbook.add_worksheet()
# Add the write() handler/callback to the worksheet.
worksheet.add_write_handler(float, ignore_nan)
# Create some data to write.
my_data = [1, 2, float("nan"), 4, 5]
# Write the data. Note that write_row() calls write() so this will work as
# expected. Writing NaN values would raise a TypeError without the handler.
worksheet.write_row("A1", my_data)
workbook.close()
|
6a1e78906d7e3a5935106fa4266b05638ee26272
|
1d08ad13c33f1c9a5724fd126066a8bac634d7fe
|
/tutorial/advanced/stepwise.py
|
ec64ea71b292a877ec798da5a55b7d07e8cab250
|
[
"MIT"
] |
permissive
|
oemof/tespy
|
b4d78e3249c51f31c41d55f0ed1215625ddae609
|
cdb2b31f796744d2b312a7bfaec67eedd983a2e6
|
refs/heads/dev
| 2023-08-10T01:40:01.860654
| 2023-07-30T16:49:47
| 2023-07-30T16:49:47
| 113,834,202
| 199
| 82
|
MIT
| 2023-08-21T16:56:15
| 2017-12-11T08:44:12
|
Python
|
UTF-8
|
Python
| false
| false
| 6,276
|
py
|
stepwise.py
|
# %%[sec_1]
from tespy.networks import Network
working_fluid = "NH3"
nw = Network(
fluids=["water", working_fluid],
T_unit="C", p_unit="bar", h_unit="kJ / kg", m_unit="kg / s"
)
# %%[sec_2]
from tespy.components import Condenser
from tespy.components import CycleCloser
from tespy.components import HeatExchangerSimple
from tespy.components import Pump
from tespy.components import Sink
from tespy.components import Source
# sources & sinks
c_in = Source("refrigerant in")
cons_closer = CycleCloser("consumer cycle closer")
va = Sink("valve")
# consumer system
cd = Condenser("condenser")
rp = Pump("recirculation pump")
cons = HeatExchangerSimple("consumer")
# %%[sec_3]
from tespy.connections import Connection
c0 = Connection(c_in, "out1", cd, "in1", label="0")
c1 = Connection(cd, "out1", va, "in1", label="1")
c20 = Connection(cons_closer, "out1", rp, "in1", label="20")
c21 = Connection(rp, "out1", cd, "in2", label="21")
c22 = Connection(cd, "out2", cons, "in1", label="22")
c23 = Connection(cons, "out1", cons_closer, "in1", label="23")
nw.add_conns(c0, c1, c20, c21, c22, c23)
# %%[sec_4]
cd.set_attr(pr1=0.99, pr2=0.99)
rp.set_attr(eta_s=0.75)
cons.set_attr(pr=0.99)
# %%[sec_5]
from CoolProp.CoolProp import PropsSI as PSI
p_cond = PSI("P", "Q", 1, "T", 273.15 + 95, working_fluid) / 1e5
c0.set_attr(T=170, p=p_cond, fluid={"water": 0, working_fluid: 1})
c20.set_attr(T=60, p=2, fluid={"water": 1, working_fluid: 0})
c22.set_attr(T=90)
# key design paramter
cons.set_attr(Q=-230e3)
# %%[sec_6]
nw.solve("design")
nw.print_results()
# %%[sec_7]
from tespy.components import Valve, Drum, HeatExchanger
# ambient heat source
amb_in = Source("source ambient")
amb_out = Sink("sink ambient")
# evaporator system
va = Valve("valve")
dr = Drum("drum")
ev = HeatExchanger("evaporator")
su = HeatExchanger("superheater")
# virtual source
cp1 = Sink("compressor 1")
# %%[sec_8]
nw.del_conns(c1)
# evaporator system
c1 = Connection(cd, "out1", va, "in1", label="1")
c2 = Connection(va, "out1", dr, "in1", label="2")
c3 = Connection(dr, "out1", ev, "in2", label="3")
c4 = Connection(ev, "out2", dr, "in2", label="4")
c5 = Connection(dr, "out2", su, "in2", label="5")
c6 = Connection(su, "out2", cp1, "in1", label="6")
nw.add_conns(c1, c2, c3, c4, c5, c6)
c17 = Connection(amb_in, "out1", su, "in1", label="17")
c18 = Connection(su, "out1", ev, "in1", label="18")
c19 = Connection(ev, "out1", amb_out, "in1", label="19")
nw.add_conns(c17, c18, c19)
# %%[sec_9]
ev.set_attr(pr1=0.99)
su.set_attr(pr1=0.99, pr2=0.99)
# %%[sec_10]
# evaporator system cold side
p_evap = PSI("P", "Q", 1, "T", 273.15 + 5, working_fluid) / 1e5
c4.set_attr(x=0.9, p=p_evap)
h_sat = PSI("H", "Q", 1, "T", 273.15 + 15, working_fluid) / 1e3
c6.set_attr(h=h_sat)
# evaporator system hot side
c17.set_attr(T=15, fluid={"water": 1, working_fluid: 0})
c19.set_attr(T=9, p=1.013)
# %%[sec_11]
nw.solve("design")
nw.print_results()
# %%[sec_12]
from tespy.components import Compressor, Splitter, Merge
cp1 = Compressor("compressor 1")
cp2 = Compressor("compressor 2")
ic = HeatExchanger("intermittent cooling")
hsp = Pump("heat source pump")
sp = Splitter("splitter")
me = Merge("merge")
cv = Valve("control valve")
hs = Source("ambient intake")
cc = CycleCloser("heat pump cycle closer")
# %%[sec_13]
nw.del_conns(c0, c6, c17)
c6 = Connection(su, "out2", cp1, "in1", label="6")
c7 = Connection(cp1, "out1", ic, "in1", label="7")
c8 = Connection(ic, "out1", cp2, "in1", label="8")
c9 = Connection(cp2, "out1", cc, "in1", label="9")
c0 = Connection(cc, "out1", cd, "in1", label="0")
c11 = Connection(hs, "out1", hsp, "in1", label="11")
c12 = Connection(hsp, "out1", sp, "in1", label="12")
c13 = Connection(sp, "out1", ic, "in2", label="13")
c14 = Connection(ic, "out2", me, "in1", label="14")
c15 = Connection(sp, "out2", cv, "in1", label="15")
c16 = Connection(cv, "out1", me, "in2", label="16")
c17 = Connection(me, "out1", su, "in1", label="17")
nw.add_conns(c6, c7, c8, c9, c0, c11, c12, c13, c14, c15, c16, c17)
# %%[sec_14]
pr = (c1.p.val / c5.p.val) ** 0.5
cp1.set_attr(pr=pr)
ic.set_attr(pr1=0.99, pr2=0.98)
hsp.set_attr(eta_s=0.75)
# %%[sec_15]
c0.set_attr(p=p_cond, fluid={"water": 0, working_fluid: 1})
c6.set_attr(h=c5.h.val + 10)
c8.set_attr(h=c5.h.val + 10)
c7.set_attr(h=c5.h.val * 1.2)
c9.set_attr(h=c5.h.val * 1.2)
c11.set_attr(p=1.013, T=15, fluid={"water": 1, working_fluid: 0})
c14.set_attr(T=30)
# %% [sec_16]
nw.solve("design")
c0.set_attr(p=None)
cd.set_attr(ttd_u=5)
c4.set_attr(p=None)
ev.set_attr(ttd_l=5)
c6.set_attr(h=None)
su.set_attr(ttd_u=5)
c7.set_attr(h=None)
cp1.set_attr(eta_s=0.8)
c9.set_attr(h=None)
cp2.set_attr(eta_s=0.8)
c8.set_attr(h=None, Td_bp=4)
nw.solve("design")
nw.save("system_design")
# %% [sec_17]
cp1.set_attr(design=["eta_s"], offdesign=["eta_s_char"])
cp2.set_attr(design=["eta_s"], offdesign=["eta_s_char"])
rp.set_attr(design=["eta_s"], offdesign=["eta_s_char"])
hsp.set_attr(design=["eta_s"], offdesign=["eta_s_char"])
cons.set_attr(design=["pr"], offdesign=["zeta"])
cd.set_attr(
design=["pr2", "ttd_u"], offdesign=["zeta2", "kA_char"]
)
from tespy.tools.characteristics import CharLine
from tespy.tools.characteristics import load_default_char as ldc
kA_char1 = ldc("heat exchanger", "kA_char1", "DEFAULT", CharLine)
kA_char2 = ldc("heat exchanger", "kA_char2", "EVAPORATING FLUID", CharLine)
ev.set_attr(
kA_char1=kA_char1, kA_char2=kA_char2,
design=["pr1", "ttd_l"], offdesign=["zeta1", "kA_char"]
)
su.set_attr(
design=["pr1", "pr2", "ttd_u"], offdesign=["zeta1", "zeta2", "kA_char"]
)
ic.set_attr(
design=["pr1", "pr2"], offdesign=["zeta1", "zeta2", "kA_char"]
)
c14.set_attr(design=["T"])
nw.solve("offdesign", design_path="system_design")
nw.print_results()
# %% [sec_18]
import numpy as np
nw.set_attr(iterinfo=False)
for Q in np.linspace(1, 0.6, 5) * cons.Q.val:
cons.set_attr(Q=Q)
nw.solve("offdesign", design_path="system_design")
print(
"COP:",
abs(cons.Q.val) / (cp1.P.val + cp2.P.val + hsp.P.val + rp.P.val)
)
# %% [sec_19]
|
c5a7d3028bc47dbd346fbed225421cafe9b1bce8
|
5db0fab37c2b8a618d85d3b60fab9f806c416474
|
/src/python/pants/help/help_integration_test.py
|
38130dad88a1f315466f30738169c83acfd55716
|
[
"Apache-2.0"
] |
permissive
|
pantsbuild/pants
|
4988d1ac5474ec95f94ce2218aeb759401e4b011
|
98cbda8545f0d58c586ed2daa76fefd729d5e0d5
|
refs/heads/main
| 2023-09-05T03:44:17.646899
| 2023-09-01T19:52:09
| 2023-09-01T19:52:09
| 7,209,075
| 2,708
| 593
|
Apache-2.0
| 2023-09-14T19:33:33
| 2012-12-17T17:39:04
|
Python
|
UTF-8
|
Python
| false
| false
| 6,506
|
py
|
help_integration_test.py
|
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import json
import re
import textwrap
from pants.testutil.pants_integration_test import run_pants
from pants.util.docutil import doc_url
def test_help() -> None:
pants_run = run_pants(["help"])
pants_run.assert_success()
assert "Usage:" in pants_run.stdout
def test_help_global() -> None:
pants_run = run_pants(["help", "global"])
pants_run.assert_success()
assert "--level" in pants_run.stdout
assert "Global options" in pants_run.stdout
def test_help_advanced_global() -> None:
pants_run = run_pants(["help-advanced", "global"])
pants_run.assert_success()
assert "Global advanced options" in pants_run.stdout
# Spot check to see that a global advanced option is printed
assert "--loop-max" in pants_run.stdout
def test_help_targets() -> None:
pants_run = run_pants(["help", "targets"])
pants_run.assert_success()
lines = [" ".join(line.split()) for line in pants_run.stdout.splitlines()]
assert "archive A ZIP or TAR file containing loose files and code packages." in lines
assert "to get help for a specific target" in pants_run.stdout
def test_help_subsystems() -> None:
pants_run = run_pants(["--backend-packages=pants.backend.python", "help", "subsystems"])
pants_run.assert_success()
assert (
"pex How Pants uses Pex to run Python subprocesses" in pants_run.stdout
)
assert "to get help for a specific subsystem" in pants_run.stdout
assert not re.search(r"^test\s+", pants_run.stdout)
def test_help_specific_target() -> None:
pants_run = run_pants(["help", "archive"])
pants_run.assert_success()
assert (
textwrap.dedent(
"""
`archive` target
----------------
A ZIP or TAR file containing loose files and code packages.
Activated by pants.core
Valid fields:
"""
)
in pants_run.stdout
)
assert (
textwrap.dedent(
"""
format
type: 'tar' | 'tar.bz2' | 'tar.gz' | 'tar.xz' | 'zip'
required
The type of archive file to be generated.
"""
)
in pants_run.stdout
)
def test_help_goals() -> None:
pants_run = run_pants(["help", "goals"])
pants_run.assert_success()
assert "to get help for a specific goal" in pants_run.stdout
# Spot check a few core goals.
for goal in ["filedeps", "list", "roots"]:
assert goal in pants_run.stdout
def test_help_goals_only_show_implemented() -> None:
# Some core goals, such as `./pants test`, require downstream implementations to work
# properly. We should only show those goals when an implementation is provided.
goals_that_need_implementation = ["fmt", "test"]
command = ["--pants-config-files=[]", "help", "goals"]
not_implemented_run = run_pants(["--backend-packages=[]", *command])
not_implemented_run.assert_success()
for goal in goals_that_need_implementation:
assert goal not in not_implemented_run.stdout
implemented_run = run_pants(
[
"--backend-packages=['pants.backend.python', 'pants.backend.python.lint.isort']",
*command,
],
)
implemented_run.assert_success()
for goal in goals_that_need_implementation:
assert goal in implemented_run.stdout
def test_help_all() -> None:
pants_run = run_pants(["--backend-packages=pants.backend.python", "help-all"])
pants_run.assert_success()
all_help = json.loads(pants_run.stdout)
# Spot check the data.
assert "name_to_goal_info" in all_help
assert "test" in all_help["name_to_goal_info"]
assert "scope_to_help_info" in all_help
assert "" in all_help["scope_to_help_info"]
assert "pytest" in all_help["scope_to_help_info"]
assert len(all_help["scope_to_help_info"]["pytest"]["basic"]) > 0
def test_unknown_goal() -> None:
pants_run = run_pants(["testx"])
pants_run.assert_failure()
assert "Unknown goal: testx" in pants_run.stdout
assert "Did you mean test" in pants_run.stdout
def test_unknown_global_flags() -> None:
pants_run = run_pants(["--pants-workdirx", "goals"])
pants_run.assert_failure()
assert "Unknown flag --pants-workdirx on global scope" in pants_run.stdout
assert "Did you mean --pants-workdir" in pants_run.stdout
def test_unknown_scoped_flags() -> None:
pants_run = run_pants(["test", "--forcex"])
pants_run.assert_failure()
assert "Unknown flag --forcex on test scope" in pants_run.stdout
assert "Did you mean --force" in pants_run.stdout
def test_global_flag_in_scoped_position() -> None:
pants_run = run_pants(
["test", "--pants-distdir=dist/"],
)
pants_run.assert_failure()
assert "Unknown flag --pants-distdir on test scope" in pants_run.stdout
assert "Did you mean to use the global --pants-distdir?" in pants_run.stdout
def test_help_provided_target_plugin_field() -> None:
pants_run = run_pants(
[
"--backend-packages=['pants.backend.python', 'pants.backend.experimental.python']",
"help",
"python_distribution",
]
)
pants_run.assert_success()
assert (
textwrap.dedent(
f"""
`python_distribution` target
----------------------------
A publishable Python setuptools distribution (e.g. an sdist or wheel).
See {doc_url("python-distributions")}.
Activated by pants.backend.python
Valid fields:
"""
)
in pants_run.stdout
)
assert (
textwrap.dedent(
"""
skip_twine
from: pants.backend.experimental.python
type: bool
default: False
If true, don't publish this target's packages using Twine.
tags
type: Iterable[str] | None
default: None
Arbitrary strings to describe a target.
"""
)
in pants_run.stdout
)
def test_help_ignore_specs() -> None:
pants_run = run_pants(
["test", "src/python/pants/bsp/protocol_test.py", "--help"],
)
pants_run.assert_success()
assert "`test` goal options" in pants_run.stdout
|
ecc697b6ffabedf444d25fdea8e1e648b2f44357
|
4805a71711625735215cc1a773a85712be305b59
|
/Cython/Tests/TestJediTyper.py
|
ede99b3a8a96caa4c4d9a2bb76c5e41a00ad0984
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
cython/cython
|
0a75b75b7eaf19eeedaaebca9d49adb603e3e8f5
|
6ba3daf319d94058de74e8e7f53f932092b38441
|
refs/heads/master
| 2023-09-04T11:09:56.569277
| 2023-09-04T07:45:47
| 2023-09-04T07:45:47
| 1,099,265
| 8,352
| 1,704
|
Apache-2.0
| 2023-09-14T06:33:34
| 2010-11-21T07:44:20
|
Python
|
UTF-8
|
Python
| false
| false
| 7,021
|
py
|
TestJediTyper.py
|
# -*- coding: utf-8 -*-
# tag: jedi
from __future__ import absolute_import
import sys
import os.path
from textwrap import dedent
from contextlib import contextmanager
from tempfile import NamedTemporaryFile
from Cython.Compiler.ParseTreeTransforms import NormalizeTree, InterpretCompilerDirectives
from Cython.Compiler import Main, Symtab, Visitor, Options
from Cython.TestUtils import TransformTest
TOOLS_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'Tools'))
@contextmanager
def _tempfile(code):
code = dedent(code)
if not isinstance(code, bytes):
code = code.encode('utf8')
with NamedTemporaryFile(suffix='.py') as f:
f.write(code)
f.seek(0)
yield f
def _test_typing(code, inject=False):
sys.path.insert(0, TOOLS_DIR)
try:
import jedityper
finally:
sys.path.remove(TOOLS_DIR)
lines = []
with _tempfile(code) as f:
types = jedityper.analyse(f.name)
if inject:
lines = jedityper.inject_types(f.name, types)
return types, lines
class DeclarationsFinder(Visitor.VisitorTransform):
directives = None
visit_Node = Visitor.VisitorTransform.recurse_to_children
def visit_CompilerDirectivesNode(self, node):
if not self.directives:
self.directives = []
self.directives.append(node)
self.visitchildren(node)
return node
class TestJediTyper(TransformTest):
def _test(self, code):
return _test_typing(code)[0]
def test_typing_global_int_loop(self):
code = '''\
for i in range(10):
a = i + 1
'''
types = self._test(code)
self.assertIn((None, (1, 0)), types)
variables = types.pop((None, (1, 0)))
self.assertFalse(types)
self.assertEqual({'a': set(['int']), 'i': set(['int'])}, variables)
def test_typing_function_int_loop(self):
code = '''\
def func(x):
for i in range(x):
a = i + 1
return a
'''
types = self._test(code)
self.assertIn(('func', (1, 0)), types)
variables = types.pop(('func', (1, 0)))
self.assertFalse(types)
self.assertEqual({'a': set(['int']), 'i': set(['int'])}, variables)
def test_conflicting_types_in_function(self):
code = '''\
def func(a, b):
print(a)
a = 1
b += a
a = 'abc'
return a, str(b)
print(func(1.5, 2))
'''
types = self._test(code)
self.assertIn(('func', (1, 0)), types)
variables = types.pop(('func', (1, 0)))
self.assertFalse(types)
self.assertEqual({'a': set(['float', 'int', 'str']), 'b': set(['int'])}, variables)
def _test_typing_function_char_loop(self):
code = '''\
def func(x):
l = []
for c in x:
l.append(c)
return l
print(func('abcdefg'))
'''
types = self._test(code)
self.assertIn(('func', (1, 0)), types)
variables = types.pop(('func', (1, 0)))
self.assertFalse(types)
self.assertEqual({'a': set(['int']), 'i': set(['int'])}, variables)
def test_typing_global_list(self):
code = '''\
a = [x for x in range(10)]
b = list(range(10))
c = a + b
d = [0]*10
'''
types = self._test(code)
self.assertIn((None, (1, 0)), types)
variables = types.pop((None, (1, 0)))
self.assertFalse(types)
self.assertEqual({'a': set(['list']), 'b': set(['list']), 'c': set(['list']), 'd': set(['list'])}, variables)
def test_typing_function_list(self):
code = '''\
def func(x):
a = [[], []]
b = [0]* 10 + a
c = a[0]
print(func([0]*100))
'''
types = self._test(code)
self.assertIn(('func', (1, 0)), types)
variables = types.pop(('func', (1, 0)))
self.assertFalse(types)
self.assertEqual({'a': set(['list']), 'b': set(['list']), 'c': set(['list']), 'x': set(['list'])}, variables)
def test_typing_global_dict(self):
code = '''\
a = dict()
b = {i: i**2 for i in range(10)}
c = a
'''
types = self._test(code)
self.assertIn((None, (1, 0)), types)
variables = types.pop((None, (1, 0)))
self.assertFalse(types)
self.assertEqual({'a': set(['dict']), 'b': set(['dict']), 'c': set(['dict'])}, variables)
def test_typing_function_dict(self):
code = '''\
def func(x):
a = dict()
b = {i: i**2 for i in range(10)}
c = x
print(func({1:2, 'x':7}))
'''
types = self._test(code)
self.assertIn(('func', (1, 0)), types)
variables = types.pop(('func', (1, 0)))
self.assertFalse(types)
self.assertEqual({'a': set(['dict']), 'b': set(['dict']), 'c': set(['dict']), 'x': set(['dict'])}, variables)
def test_typing_global_set(self):
code = '''\
a = set()
# b = {i for i in range(10)} # jedi does not support set comprehension yet
c = a
d = {1,2,3}
e = a | b
'''
types = self._test(code)
self.assertIn((None, (1, 0)), types)
variables = types.pop((None, (1, 0)))
self.assertFalse(types)
self.assertEqual({'a': set(['set']), 'c': set(['set']), 'd': set(['set']), 'e': set(['set'])}, variables)
def test_typing_function_set(self):
code = '''\
def func(x):
a = set()
# b = {i for i in range(10)} # jedi does not support set comprehension yet
c = a
d = a | b
print(func({1,2,3}))
'''
types = self._test(code)
self.assertIn(('func', (1, 0)), types)
variables = types.pop(('func', (1, 0)))
self.assertFalse(types)
self.assertEqual({'a': set(['set']), 'c': set(['set']), 'd': set(['set']), 'x': set(['set'])}, variables)
class TestTypeInjection(TestJediTyper):
"""
Subtype of TestJediTyper that additionally tests type injection and compilation.
"""
def setUp(self):
super(TestTypeInjection, self).setUp()
compilation_options = Options.CompilationOptions(Options.default_options)
ctx = Main.Context.from_options(compilation_options)
transform = InterpretCompilerDirectives(ctx, ctx.compiler_directives)
transform.module_scope = Symtab.ModuleScope('__main__', None, ctx)
self.declarations_finder = DeclarationsFinder()
self.pipeline = [NormalizeTree(None), transform, self.declarations_finder]
def _test(self, code):
types, lines = _test_typing(code, inject=True)
tree = self.run_pipeline(self.pipeline, ''.join(lines))
directives = self.declarations_finder.directives
# TODO: validate directives
return types
|
0b4a720857912ccc16e3146da122af995dd93085
|
6a468c1650b3c083f102f19ace0b0d6e4d0686f7
|
/sympy/stats/sampling/tests/test_sample_finite_rv.py
|
96cabe0ff4aaa5977e16600217fbbdeb08b962ae
|
[
"BSD-3-Clause",
"MIT"
] |
permissive
|
sympy/sympy
|
a5f8accaa7686c59d9b5c94212fef60d746dac4b
|
69f98fb2b0d845e76874067a381dba37b577e8c5
|
refs/heads/master
| 2023-09-01T15:51:37.886107
| 2023-08-31T20:54:33
| 2023-08-31T20:54:33
| 640,534
| 10,928
| 5,362
|
NOASSERTION
| 2023-09-14T17:29:13
| 2010-04-30T20:37:14
|
Python
|
UTF-8
|
Python
| false
| false
| 3,061
|
py
|
test_sample_finite_rv.py
|
from sympy.core.numbers import Rational
from sympy.core.singleton import S
from sympy.external import import_module
from sympy.stats import Binomial, sample, Die, FiniteRV, DiscreteUniform, Bernoulli, BetaBinomial, Hypergeometric, \
Rademacher
from sympy.testing.pytest import skip, raises
def test_given_sample():
X = Die('X', 6)
scipy = import_module('scipy')
if not scipy:
skip('Scipy is not installed. Abort tests')
assert sample(X, X > 5) == 6
def test_sample_numpy():
distribs_numpy = [
Binomial("B", 5, 0.4),
Hypergeometric("H", 2, 1, 1)
]
size = 3
numpy = import_module('numpy')
if not numpy:
skip('Numpy is not installed. Abort tests for _sample_numpy.')
else:
for X in distribs_numpy:
samps = sample(X, size=size, library='numpy')
for sam in samps:
assert sam in X.pspace.domain.set
raises(NotImplementedError,
lambda: sample(Die("D"), library='numpy'))
raises(NotImplementedError,
lambda: Die("D").pspace.sample(library='tensorflow'))
def test_sample_scipy():
distribs_scipy = [
FiniteRV('F', {1: S.Half, 2: Rational(1, 4), 3: Rational(1, 4)}),
DiscreteUniform("Y", list(range(5))),
Die("D"),
Bernoulli("Be", 0.3),
Binomial("Bi", 5, 0.4),
BetaBinomial("Bb", 2, 1, 1),
Hypergeometric("H", 1, 1, 1),
Rademacher("R")
]
size = 3
scipy = import_module('scipy')
if not scipy:
skip('Scipy not installed. Abort tests for _sample_scipy.')
else:
for X in distribs_scipy:
samps = sample(X, size=size)
samps2 = sample(X, size=(2, 2))
for sam in samps:
assert sam in X.pspace.domain.set
for i in range(2):
for j in range(2):
assert samps2[i][j] in X.pspace.domain.set
def test_sample_pymc():
distribs_pymc = [
Bernoulli('B', 0.2),
Binomial('N', 5, 0.4)
]
size = 3
pymc = import_module('pymc')
if not pymc:
skip('PyMC is not installed. Abort tests for _sample_pymc.')
else:
for X in distribs_pymc:
samps = sample(X, size=size, library='pymc')
for sam in samps:
assert sam in X.pspace.domain.set
raises(NotImplementedError,
lambda: (sample(Die("D"), library='pymc')))
def test_sample_seed():
F = FiniteRV('F', {1: S.Half, 2: Rational(1, 4), 3: Rational(1, 4)})
size = 10
libraries = ['scipy', 'numpy', 'pymc']
for lib in libraries:
try:
imported_lib = import_module(lib)
if imported_lib:
s0 = sample(F, size=size, library=lib, seed=0)
s1 = sample(F, size=size, library=lib, seed=0)
s2 = sample(F, size=size, library=lib, seed=1)
assert all(s0 == s1)
assert not all(s1 == s2)
except NotImplementedError:
continue
|
0a5b136fba1021fd88f25ac800e218d4a2c09184
|
faa390890e17219fd763bd66e66bb6753c692b14
|
/jactorch/nn/rnn_utils.py
|
5ac2fb849fcdb1a2f0b27695687e6a9acad762a1
|
[
"MIT"
] |
permissive
|
vacancy/Jacinle
|
7170b1c798e4a903186abe74d28e4a7e034ec766
|
20021790fd32ef1ad40c67fba7582c6db54235da
|
refs/heads/master
| 2023-07-20T03:54:46.693649
| 2023-07-12T21:00:10
| 2023-07-12T21:00:10
| 117,910,172
| 135
| 275
|
MIT
| 2023-01-18T17:41:33
| 2018-01-18T00:35:55
|
Python
|
UTF-8
|
Python
| false
| false
| 1,893
|
py
|
rnn_utils.py
|
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# File : rnn_utils.py
# Author : Jiayuan Mao
# Email : maojiayuan@gmail.com
# Date : 01/25/2018
#
# This file is part of Jacinle.
# Distributed under terms of the MIT license.
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
from jactorch.functional.indexing import inverse_permutation
__all__ = ['rnn_with_length']
def rnn_with_length(rnn, seq_tensor, seq_lengths, initial_states, batch_first=True, sorted=False):
perm_idx = None
if not sorted:
seq_lengths, perm_idx = seq_lengths.sort(0, descending=True)
seq_tensor = seq_tensor[perm_idx]
if type(initial_states) is tuple:
if initial_states[0].dim() == 3: # including layers
initial_states = tuple(map(lambda x: x[:, perm_idx], initial_states))
else:
assert initial_states[0].dim() == 2
initial_states = tuple(map(lambda x: x[perm_idx], initial_states))
else:
if initial_states.dim() == 3:
initial_states = initial_states[:, perm_idx]
else:
assert initial_states.dim() == 2
initial_states = initial_states[perm_idx]
packed_input = pack_padded_sequence(seq_tensor, seq_lengths.cpu().numpy(), batch_first=batch_first)
packed_output, last_output = rnn(packed_input, initial_states)
output, _ = pad_packed_sequence(packed_output, batch_first=batch_first)
if not sorted:
perm_inv = inverse_permutation(perm_idx)
output = output[perm_inv]
sequence_dim = 1 if batch_first else 0
if type(last_output) is tuple:
last_output = tuple(map(lambda x: x.index_select(sequence_dim, perm_inv), last_output))
else:
last_output = last_output.index_select(sequence_dim, perm_inv)
return output, last_output
|
1fba40245b72174fed759bb99e33bec0953efda4
|
e4b2d6863fadf63bdc6b42fafb4ad298d7ad0d08
|
/elyra/tests/pipeline/util.py
|
8cbda9dc91ea4bf99c105a9369b6ff0be721ac2d
|
[
"Apache-2.0",
"CC-BY-4.0",
"LicenseRef-scancode-unknown-license-reference",
"CC-BY-SA-4.0",
"BSD-3-Clause"
] |
permissive
|
elyra-ai/elyra
|
eef32416b7c6039090a2d2a9da08238bb55569b2
|
3c27ada25a27b719529e88268bed38d135e40805
|
refs/heads/main
| 2023-08-19T02:58:52.615956
| 2023-06-19T16:00:23
| 2023-06-19T16:00:23
| 216,914,329
| 1,707
| 345
|
Apache-2.0
| 2023-08-14T23:34:05
| 2019-10-22T21:37:58
|
Python
|
UTF-8
|
Python
| false
| false
| 6,094
|
py
|
util.py
|
#
# Copyright 2018-2023 Elyra Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import json
import os
import shutil
from typing import Any
from typing import List
from typing import Optional
import uuid
from elyra.pipeline.pipeline import GenericOperation
from elyra.pipeline.pipeline import Pipeline
from elyra.pipeline.properties import ElyraProperty
def _read_pipeline_resource(pipeline_filename):
root = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
pipeline_path = os.path.join(root, pipeline_filename)
with open(pipeline_path, "r") as f:
pipeline_json = json.load(f)
return pipeline_json
class NodeBase(object):
"""Represents a node of a constructed pipeline based on files in resources/node_util."""
id: str
name: str
outputs: List[str]
dependencies: List[str]
env_vars: List[str]
image_name: str
fail: bool
# from subclasses
classifier: str
filename: str
pipeline_name: str # Set during pipeline construction
def __init__(
self,
name: str,
num_outputs: Optional[int] = 0,
input_nodes: Optional[List[Any]] = None,
image_name: Optional[str] = None,
fail: Optional[bool] = False,
):
self.id = str(uuid.uuid4())
self.name = name
self.fail = fail
self.image_name = image_name
self.outputs = []
for i in range(1, num_outputs + 1):
self.outputs.append(f"{self.name}_{i}.out")
self.inputs = []
self.parent_operations = []
if input_nodes:
for node in input_nodes:
self.inputs.extend(node.outputs)
self.parent_operations.append(node.id)
self.dependencies = ["node_util/*"]
def get_operation(self) -> GenericOperation:
env_vars = []
if self.fail: # NODE_FILENAME is required, so skip if triggering failure
if "NODE_FILENAME" in os.environ: # remove entry if present
os.environ.pop("NODE_FILENAME")
else:
env_vars.append({"env_var": "NODE_FILENAME", "value": self.filename})
if self.inputs:
env_vars.append({"env_var": "INPUT_FILENAMES", "value": ";".join(self.inputs)})
if self.outputs:
env_vars.append({"env_var": "OUTPUT_FILENAMES", "value": ";".join(self.outputs)})
# Convey the pipeline name
assert self.pipeline_name is not None, "Pipeline name has not been set during construction!"
env_vars.append({"env_var": "PIPELINE_NAME", "value": self.pipeline_name})
# Add system-owned here with bogus or no value...
env_vars.append({"env_var": "ELYRA_RUNTIME_ENV", "value": "bogus_runtime"})
self.env_vars = ElyraProperty.create_instance("env_vars", env_vars)
component_parameters = {
"filename": self.filename,
"runtime_image": self.image_name or "NA",
"dependencies": self.dependencies,
"inputs": self.inputs,
"outputs": self.outputs,
}
return GenericOperation(
self.id,
"execution_node",
self.name,
self.classifier,
parent_operation_ids=self.parent_operations,
component_props=component_parameters,
elyra_props={"env_vars": self.env_vars},
)
class NotebookNode(NodeBase):
def __init__(
self,
name: str,
num_outputs: Optional[int] = 0,
input_nodes: Optional[List[Any]] = None,
image_name: Optional[str] = None,
fail: Optional[bool] = False,
):
super().__init__(name, num_outputs=num_outputs, input_nodes=input_nodes, image_name=image_name, fail=fail)
self.classifier = "execute-notebook-node"
self.filename = f"{self.name}.ipynb"
class PythonNode(NodeBase):
def __init__(
self,
name: str,
num_outputs: Optional[int] = 0,
input_nodes: Optional[List[Any]] = None,
image_name: Optional[str] = None,
fail: Optional[bool] = False,
):
super().__init__(name, num_outputs=num_outputs, input_nodes=input_nodes, image_name=image_name, fail=fail)
self.classifier = "execute-python-node"
self.filename = f"{self.name}.py"
def construct_pipeline(
name: str,
nodes: List[NodeBase],
location: str,
runtime_type: Optional[str] = "local",
runtime_config: Optional[str] = "local",
) -> Pipeline:
"""Returns an instance of a local Pipeline consisting of each node and populates the
specified location with the necessary files to run the pipeline from that location.
"""
pipeline = Pipeline(str(uuid.uuid4()), name, runtime_type, runtime_config)
for node in nodes:
node.pipeline_name = name
pipeline.operations[node.id] = node.get_operation()
# copy the node file into the "working directory"
if isinstance(node, NotebookNode):
src_file = os.path.join(os.path.dirname(__file__), "resources/node_util/node.ipynb")
elif isinstance(node, PythonNode):
src_file = os.path.join(os.path.dirname(__file__), "resources/node_util/node.py")
else:
assert False, f"Invalid node type detected: {node.__class__.__name__}"
shutil.copy(src_file, os.path.join(location, node.filename))
# copy the node_util directory into the "working directory"
shutil.copytree(os.path.join(os.path.dirname(__file__), "resources/node_util"), os.path.join(location, "node_util"))
return pipeline
|
d98fa7302ab0694742a4179917a650e2c5a57335
|
ccb0740c4846e943003b075bddd52fd7c884b6d8
|
/auto_pose/visualization/render_pose.py
|
1fd7a5fa6d15621ee9207d5b58f0dee9a2cc5c62
|
[
"MIT"
] |
permissive
|
DLR-RM/AugmentedAutoencoder
|
87a8bc5e32832cadbbfaafca8e19f15f2ce7718a
|
9f0a56f622fabf6200d9f034fcb2eef106997118
|
refs/heads/master
| 2022-09-12T08:51:59.086448
| 2022-08-16T09:43:02
| 2022-08-16T09:43:02
| 156,195,670
| 347
| 106
|
MIT
| 2022-06-22T00:55:31
| 2018-11-05T09:56:25
|
Python
|
UTF-8
|
Python
| false
| false
| 4,235
|
py
|
render_pose.py
|
import cv2
import numpy as np
import os
import glob
from auto_pose.meshrenderer import meshrenderer
from auto_pose.ae.utils import lazy_property
class PoseVisualizer:
def __init__(self, ae_pose_est, downsample=1):
self.downsample = downsample
self.classes = list(ae_pose_est.class_2_encoder.keys())
self.vertex_scale = list(set([ae_pose_est.all_train_args[c].getint('Dataset','VERTEX_SCALE') for c in self.classes]))
self.ply_model_paths = [str(ae_pose_est.all_train_args[c].get('Paths','MODEL_PATH')) for c in self.classes]
print(('renderer', 'Model paths: ', self.ply_model_paths))
@lazy_property
def renderer(self):
return meshrenderer.Renderer(self.ply_model_paths,
samples=1,
vertex_tmp_store_folder='.',
vertex_scale=float(self.vertex_scale[0])) #1000 for models in meters
def render_poses(self, image, camK, pose_ests, dets, vis_bbs=True, vis_mask=False, all_pose_estimates_rgb=None, depth_image=None, waitKey=True):
W_d = image.shape[1] // self.downsample
H_d = image.shape[0] // self.downsample
print( [self.classes.index(pose_est.name) for pose_est in pose_ests])
bgr, depth,_ = self.renderer.render_many(obj_ids = [self.classes.index(pose_est.name) for pose_est in pose_ests],
W = W_d,
H = H_d,
K = camK.copy(),
Rs = [pose_est.trafo[:3,:3] for pose_est in pose_ests],
ts = [pose_est.trafo[:3,3] for pose_est in pose_ests],
near = 10,
far = 10000)
image_show = cv2.resize(image,(W_d,H_d))
if all_pose_estimates_rgb is not None:
image_show_rgb = image_show.copy()
g_y = np.zeros_like(bgr)
g_y[:,:,1]= bgr[:,:,1]
image_show[bgr > 0] = g_y[bgr > 0]*2./3. + image_show[bgr > 0]*1./3.
if all_pose_estimates_rgb is not None:
bgr, depth,_ = self.renderer.render_many(obj_ids = [clas_idx for clas_idx in all_class_idcs],
W = W_d,
H = H_d,
K = camK.copy(),
Rs = [pose_est.trafo[:3,:3] for pose_est in pose_ests],
ts = [pose_est.trafo[:3,3] for pose_est in pose_ests],
near = 10,
far = 10000)
bgr = cv2.resize(bgr,(W_d,H_d))
b_y = np.zeros_like(bgr)
b_y[:,:,0]= bgr[:,:,0]
image_show_rgb[bgr > 0] = b_y[bgr > 0]*2./3. + image_show_rgb[bgr > 0]*1./3.
if np.any(depth_image):
depth_show = depth_image.copy()
depth_show = np.dstack((depth_show,depth_show,depth_show))
depth_show[bgr[:,:,0] > 0] = g_y[bgr[:,:,0] > 0]*2./3. + depth_show[bgr[:,:,0] > 0]*1./3.
cv2.imshow('depth_refined_pose', depth_show)
if vis_bbs:
# for label,box,score in zip(labels,boxes,scores):
for det in dets:
# box = box.astype(np.int32) / self.downsample
# xmin, ymin, xmax, ymax = box[0], box[1], box[0] + box[2], box[1] + box[3]
xmin, ymin, xmax, ymax = int(det.xmin * W_d), int(det.ymin * H_d), int(det.xmax * W_d), int(det.ymax * H_d)
label, score = list(det.classes.items())[0]
try:
cv2.putText(image_show, '%s : %1.3f' % (label,score), (xmin, ymax+20), cv2.FONT_ITALIC, .5, (0,0,255), 2)
cv2.rectangle(image_show,(xmin,ymin),(xmax,ymax),(255,0,0),2)
if all_pose_estimates_rgb is not None:
cv2.putText(image_show_rgb, '%s : %1.3f' % (label,score), (xmin, ymax+20), cv2.FONT_ITALIC, .5, (0,0,255), 2)
cv2.rectangle(image_show_rgb,(xmin,ymin),(xmax,ymax),(255,0,0),2)
except:
print('failed to plot boxes')
if all_pose_estimates_rgb is not None:
cv2.imshow('rgb_pose', image_show_rgb)
cv2.imshow('refined_pose', image_show)
if waitKey:
cv2.waitKey(0)
else:
cv2.waitKey(1)
return (image_show)
|
7ae3b30d556e1e148dd40def1a6eccbbd1c96103
|
0e4860fecfdd34a3255003cc8c8df086c14083dd
|
/python/source_code/source_code_of_lp3thw/ex35n.py
|
50733b5de702d910e59a6d9de5e7872c7abdc235
|
[] |
no_license
|
anzhihe/learning
|
503ab9a58f280227011da5eaa4b14b46c678e6f3
|
66f7f801e1395207778484e1543ea26309d4b354
|
refs/heads/master
| 2023-08-08T11:42:11.983677
| 2023-07-29T09:19:47
| 2023-07-29T09:19:47
| 188,768,643
| 1,443
| 617
| null | 2023-08-24T02:10:34
| 2019-05-27T04:04:10
|
Python
|
UTF-8
|
Python
| false
| false
| 3,732
|
py
|
ex35n.py
|
from sys import exit#从sys模块里导入exit模块
def gold_room():#定义一个函数:金屋子。
print("这个屋子里堆满了金子,你准备要带走多少?")
choice = input("请输个数吧> ")#只有选择0和1的时候将choice转换成int?其他的数呢?因此我改了。
if choice.isdigit():#判断你输入的是否是数字。
how_much = int(choice)
if how_much < 50:
print("很好,你不贪婪,你赢了!")
exit(0)
else:
dead("你是个贪婪的混蛋!")
else:
print("先生, 敲个'数字'进去嘛?")
gold_room()
def bear_room():#定义第二个函数:熊屋子。
print("""
这里有一头熊.
这头熊有一罐蜂蜜.
这头熊在另一个门口.
你准备怎么移动开这头熊?
""")
bear_moved =False
while True:#当什么?是真?
choice = input("你可以输入:take honey、taunt bear、open door:/n> ")
if choice == "take honey":
dead("熊看着你,然后开始打你打脸。")#调用dead()函数。
elif choice == "taunt bear" and not bear_moved:
print("熊从门口移开了.")
print("你现在可以进去了.")
bear_moved = True
elif choice == "taunt bear" and bear_moved:
dead("熊生气了,咬了你的腿.")#调用dead()函数。
elif choice == "open door" and bear_moved:
gold_room()#调用gold_room()函数。
elif choice == "open door" and not bear_moved:#这一行是我新加的。
dead("熊生气了,咬了你的腿.")#调用dead()函数。
else:
print("我不知道那是什么意思。")
def cthulhu_room():#邪神房间
print("这里你看到邪神房间。")
print("他,不管你怎么看都疯了。")
print("你是逃避生命还是吃你的头?")
choice = input("flee逃走,head头?> ")
if "flee" in choice:#逃走
start()
elif "head" in choice:#头
dead("嗯,那很好吃!")
else:
cthulhu_room()
def dead(why):#这是一个定义的dead()函数,参数是why?
print(why, " Well Done!")
exit(0)
def start():#这是最开始的一个函数,可以用来调用熊房间或者邪神房间。
print("你在一个黑屋子里.")
print("有2个门在你的左右。")
print("你选择哪个呢?")
choice = input("请选择left或者right> ")
if choice == "left":#如果选择左边的门,则调用-熊房间这个函数。
bear_room()
elif choice == "right":#如果选择左边的门,则调用-邪神这个函数。
cthulhu_room()
else:
dead("你在房间里跌跌撞撞,直到饿死。")
start()#调用start()函数。
'''
# 运行后的结果如下:
bogon:LP3THW yyy$ python ex35n.py
你在一个黑屋子里.
有2个门在你的左右。
你选择哪个呢?
请选择left或者right> right
这里你看到邪神房间。
他,不管你怎么看都疯了。
你是逃避生命还是吃你的头?
flee逃走,head头?> flee
你在一个黑屋子里.
有2个门在你的左右。
你选择哪个呢?
请选择left或者right> right
这里你看到邪神房间。
他,不管你怎么看都疯了。
你是逃避生命还是吃你的头?
flee逃走,head头?> flee
你在一个黑屋子里.
有2个门在你的左右。
你选择哪个呢?
请选择left或者right> left
这里有一头熊.
这头熊有一罐蜂蜜.
这头熊在另一个门口.
你准备怎么移动开这头熊?
你可以输入:take honey、taunt bear、open door:/n> open door
熊生气了,咬了你的腿. Well Done!
'''
|
5472dd9f8c32f8ac69ea2b31a61c00dc4fa8ed98
|
59bb398c5f23770e4725f35f932f3a5fd013efae
|
/jwst/associations/tests/test_validate.py
|
1c9d769d6f8cda6638684513df402da0d8c09686
|
[
"BSD-2-Clause"
] |
permissive
|
spacetelescope/jwst
|
9826d86781c6e01aced951882471f8b967fa1f6e
|
a4a0e8ad2b88249f01445ee1dcf175229c51033f
|
refs/heads/master
| 2023-09-04T09:54:04.504036
| 2023-08-31T20:19:27
| 2023-08-31T20:19:27
| 60,551,519
| 449
| 106
|
NOASSERTION
| 2023-09-14T21:21:33
| 2016-06-06T18:34:23
|
Jupyter Notebook
|
UTF-8
|
Python
| false
| false
| 583
|
py
|
test_validate.py
|
import pytest
from jwst.associations.tests import helpers
from jwst.associations import (
AssociationRegistry,
AssociationNotValidError,
load_asn
)
def test_invalid():
rules = AssociationRegistry()
with pytest.raises(AssociationNotValidError):
rules.validate({})
def test_valid():
rules = AssociationRegistry()
asn_file = helpers.t_path(
'data/test_image_asn.json'
)
with open(asn_file, 'r') as asn_fp:
asn = load_asn(asn_fp)
valid_schema_list = rules.validate(asn)
assert isinstance(valid_schema_list, list)
|
b7b3daa8d730689f10df9a46c9596309762c39e5
|
04e5b6df2ee3bcfb7005d8ec91aab8e380333ac4
|
/Lib/objc/UIKit.py
|
5a91ae0caa64551045fb2204d89826192d8e8c73
|
[
"MIT"
] |
permissive
|
ColdGrub1384/Pyto
|
64e2a593957fd640907f0e4698d430ea7754a73e
|
7557485a733dd7e17ba0366b92794931bdb39975
|
refs/heads/main
| 2023-08-01T03:48:35.694832
| 2022-07-20T14:38:45
| 2022-07-20T14:38:45
| 148,944,721
| 884
| 157
|
MIT
| 2023-02-26T21:34:04
| 2018-09-15T22:29:07
|
C
|
UTF-8
|
Python
| false
| false
| 261,542
|
py
|
UIKit.py
|
"""
Classes from the 'UIKit' framework.
"""
try:
from rubicon.objc import ObjCClass
except ValueError:
def ObjCClass(name):
return None
def _Class(name):
try:
return ObjCClass(name)
except NameError:
return None
_UITargetedProxy = _Class("_UITargetedProxy")
_UIViewServiceUIBehaviorProxy = _Class("_UIViewServiceUIBehaviorProxy")
_UIViewServiceReplyControlTrampoline = _Class("_UIViewServiceReplyControlTrampoline")
_UIViewServiceReplyAwaitingTrampoline = _Class("_UIViewServiceReplyAwaitingTrampoline")
_UIViewServiceImplicitAnimationDecodingProxy = _Class(
"_UIViewServiceImplicitAnimationDecodingProxy"
)
_UIViewServiceViewControllerDeputy = _Class("_UIViewServiceViewControllerDeputy")
_UIQueueingProxy = _Class("_UIQueueingProxy")
_UIViewServiceFencingControlProxy = _Class("_UIViewServiceFencingControlProxy")
_UIUserNotificationRestrictedAlertViewProxy = _Class(
"_UIUserNotificationRestrictedAlertViewProxy"
)
_UIUserNotificationAlertViewRestrictedTextField = _Class(
"_UIUserNotificationAlertViewRestrictedTextField"
)
_UIViewServiceImplicitAnimationEncodingProxy = _Class(
"_UIViewServiceImplicitAnimationEncodingProxy"
)
_UIViewControllerControlMessageDeputy = _Class("_UIViewControllerControlMessageDeputy")
_UIDiffableDataSourceItemRenderer = _Class("_UIDiffableDataSourceItemRenderer")
_UIOutlineItemRenderer = _Class("_UIOutlineItemRenderer")
_UIOutlineItemRendererInternal = _Class("_UIOutlineItemRendererInternal")
_UIDiffableDataSourceItemRendererInternal = _Class(
"_UIDiffableDataSourceItemRendererInternal"
)
_UIDatePickerDataModel = _Class("_UIDatePickerDataModel")
_UIPassthroughScrollInteraction = _Class("_UIPassthroughScrollInteraction")
_UITreeDataSourceSnapshotter = _Class("_UITreeDataSourceSnapshotter")
_UISliderControlStateContent = _Class("_UISliderControlStateContent")
_UISliderDataModel = _Class("_UISliderDataModel")
UISceneActivationRequestOptions = _Class("UISceneActivationRequestOptions")
UISceneOpenExternalURLOptions = _Class("UISceneOpenExternalURLOptions")
UISceneOpenURLOptions = _Class("UISceneOpenURLOptions")
UICollectionViewDiffableDataSourceReorderingHandlers = _Class(
"UICollectionViewDiffableDataSourceReorderingHandlers"
)
_UIShareParticipantDetails = _Class("_UIShareParticipantDetails")
_UISharingControllerActivityItemSource = _Class(
"_UISharingControllerActivityItemSource"
)
_UIWebViewportHandler = _Class("_UIWebViewportHandler")
UIWebPaginationInfo = _Class("UIWebPaginationInfo")
UIWebOverflowScrollListener = _Class("UIWebOverflowScrollListener")
UIWebGeolocationPolicyDecider = _Class("UIWebGeolocationPolicyDecider")
_UIWebGeolocationChallengeData = _Class("_UIWebGeolocationChallengeData")
UIWebViewWebViewDelegate = _Class("UIWebViewWebViewDelegate")
_UIWebViewScrollViewDelegateForwarder = _Class("_UIWebViewScrollViewDelegateForwarder")
UIWebViewInternal = _Class("UIWebViewInternal")
_UIColorPickerViewControllerConfiguration = _Class(
"_UIColorPickerViewControllerConfiguration"
)
UIWebURLAction = _Class("UIWebURLAction")
_UIContextMenuAnimator = _Class("_UIContextMenuAnimator")
UIWebPDFSearchController = _Class("UIWebPDFSearchController")
UIWebPDFSearchResult = _Class("UIWebPDFSearchResult")
UIWebPDFViewHandler = _Class("UIWebPDFViewHandler")
UIWebPDFLinkAction = _Class("UIWebPDFLinkAction")
_UICollectionViewLayoutInteractionStateModule = _Class(
"_UICollectionViewLayoutInteractionStateModule"
)
UIWebElementAction = _Class("UIWebElementAction")
UIWebElementActionInfo = _Class("UIWebElementActionInfo")
UIListContentImageProperties = _Class("UIListContentImageProperties")
UIWebClip = _Class("UIWebClip")
UIWebClipLinkTag = _Class("UIWebClipLinkTag")
UIWebClipIcon = _Class("UIWebClipIcon")
UIWebOverflowScrollInfo = _Class("UIWebOverflowScrollInfo")
UIWebOverflowScrollViewInfo = _Class("UIWebOverflowScrollViewInfo")
UIThreadSafeNode = _Class("UIThreadSafeNode")
UIFocusRingStyle = _Class("UIFocusRingStyle")
UIWebBrowserFindOnPageHighlighter = _Class("UIWebBrowserFindOnPageHighlighter")
_UIViewLFLDChangeRecord = _Class("_UIViewLFLDChangeRecord")
_UIViewLFLDVariableChangeRecord = _Class("_UIViewLFLDVariableChangeRecord")
_UIViewLFLDGeometryChangeRecord = _Class("_UIViewLFLDGeometryChangeRecord")
_UIStackedImageSingleNamedStack = _Class("_UIStackedImageSingleNamedStack")
_UIStackedImageSingleNamedLayerImage = _Class("_UIStackedImageSingleNamedLayerImage")
_UIStackedImageSimpleImage = _Class("_UIStackedImageSimpleImage")
_UIStackedImageConfiguration = _Class("_UIStackedImageConfiguration")
_UIDragSetDownItemAnimation = _Class("_UIDragSetDownItemAnimation")
_UIPopoverViewArtworkLoader = _Class("_UIPopoverViewArtworkLoader")
_UIDragPreviewBlockProvider = _Class("_UIDragPreviewBlockProvider")
_UIDatePickerCalendarTimeValueStore = _Class("_UIDatePickerCalendarTimeValueStore")
_UIContentUnavailableViewCacheKey = _Class("_UIContentUnavailableViewCacheKey")
_UIViewKeyValueAnimationFactory = _Class("_UIViewKeyValueAnimationFactory")
_UIViewKeyValueAnimationFactoryTransition = _Class(
"_UIViewKeyValueAnimationFactoryTransition"
)
_UIDatePickerCalendarDaySet = _Class("_UIDatePickerCalendarDaySet")
_UIViewCALayerKeyValueMapper = _Class("_UIViewCALayerKeyValueMapper")
_UIViewAnimationDelegate = _Class("_UIViewAnimationDelegate")
UIViewAnimationInfo = _Class("UIViewAnimationInfo")
_UIViewMaskViewWrapper = _Class("_UIViewMaskViewWrapper")
_UIViewDeferredAnimation = _Class("_UIViewDeferredAnimation")
_UIViewDeferredKeyframeAnimation = _Class("_UIViewDeferredKeyframeAnimation")
_UIViewDeferredBasicAnimation = _Class("_UIViewDeferredBasicAnimation")
_UIViewAnimationFrame = _Class("_UIViewAnimationFrame")
_UIViewWeakCAAnimationDelegate = _Class("_UIViewWeakCAAnimationDelegate")
UIViewBlockBasedCAAction = _Class("UIViewBlockBasedCAAction")
_UIImageViewPretiledImageWrapper = _Class("_UIImageViewPretiledImageWrapper")
_UIImageViewPretiledImageCacheKey = _Class("_UIImageViewPretiledImageCacheKey")
_UIScrollDynamics = _Class("_UIScrollDynamics")
_UIScrollDynamicsiOSMac = _Class("_UIScrollDynamicsiOSMac")
_UIScrollViewSimulatedGesture = _Class("_UIScrollViewSimulatedGesture")
_UIScrollViewGestureSimulator = _Class("_UIScrollViewGestureSimulator")
_UIScrollViewMockPinchGestureRecognizer = _Class(
"_UIScrollViewMockPinchGestureRecognizer"
)
_UIScrollViewMockPanGestureRecognizer = _Class("_UIScrollViewMockPanGestureRecognizer")
UIScrollTestParameters = _Class("UIScrollTestParameters")
_UIDiffableDataSourceUpdate = _Class("_UIDiffableDataSourceUpdate")
_UIDiffableDataSourceState = _Class("_UIDiffableDataSourceState")
UIIndexBarVisualStyle_Base = _Class("UIIndexBarVisualStyle_Base")
UIIndexBarVisualStyle_LegacyiOS = _Class("UIIndexBarVisualStyle_LegacyiOS")
UIIndexBarEntry = _Class("UIIndexBarEntry")
UIIndexBarDisplayEntry = _Class("UIIndexBarDisplayEntry")
UIIndexBarDisplayEntry_LegacyIOS = _Class("UIIndexBarDisplayEntry_LegacyIOS")
_UIVectorTextLayoutGlyph = _Class("_UIVectorTextLayoutGlyph")
_UIVectorTextLayoutRun = _Class("_UIVectorTextLayoutRun")
_UIVectorTextLayoutParameters = _Class("_UIVectorTextLayoutParameters")
_UIVectorTextLayout = _Class("_UIVectorTextLayout")
_UIVectorTextLayoutInfo = _Class("_UIVectorTextLayoutInfo")
_UICollectionViewCompositionalLayoutMutableConfiguration = _Class(
"_UICollectionViewCompositionalLayoutMutableConfiguration"
)
_UICollectionLayoutAnchor = _Class("_UICollectionLayoutAnchor")
_UICollectionLayoutEdgeSpacing = _Class("_UICollectionLayoutEdgeSpacing")
_UICollectionLayoutSpacing = _Class("_UICollectionLayoutSpacing")
_UICollectionLayoutSize = _Class("_UICollectionLayoutSize")
_UICollectionLayoutDimension = _Class("_UICollectionLayoutDimension")
_UICollectionLayoutItem = _Class("_UICollectionLayoutItem")
_UICollectionLayoutDecorationItem = _Class("_UICollectionLayoutDecorationItem")
_UICollectionLayoutSupplementaryItem = _Class("_UICollectionLayoutSupplementaryItem")
_UICollectionLayoutBoundarySupplementaryItem = _Class(
"_UICollectionLayoutBoundarySupplementaryItem"
)
_UICollectionLayoutGroup = _Class("_UICollectionLayoutGroup")
_UICollectionLayoutSection = _Class("_UICollectionLayoutSection")
_UILabelScaledMetrics = _Class("_UILabelScaledMetrics")
_UIViewAnimationWithComposerWrapper = _Class("_UIViewAnimationWithComposerWrapper")
_UICGImageDecompressor = _Class("_UICGImageDecompressor")
UIViewInProcessAnimationManager = _Class("UIViewInProcessAnimationManager")
UIViewAnimationComposer = _Class("UIViewAnimationComposer")
UIViewRunningAnimationEntry = _Class("UIViewRunningAnimationEntry")
UIInterpolatedValue = _Class("UIInterpolatedValue")
UIInterpolatedTransform = _Class("UIInterpolatedTransform")
UIInterpolatedSize = _Class("UIInterpolatedSize")
UIInterpolatedRect = _Class("UIInterpolatedRect")
UIInterpolatedNormalizedRect = _Class("UIInterpolatedNormalizedRect")
UIInterpolatedPoint = _Class("UIInterpolatedPoint")
UIInterpolatedNormalizedPoint = _Class("UIInterpolatedNormalizedPoint")
UIInterpolatedFloat = _Class("UIInterpolatedFloat")
UIInterpolatedScaledFloat = _Class("UIInterpolatedScaledFloat")
UIInterpolatedColor = _Class("UIInterpolatedColor")
UIViewUpdateVelocityAnimationDescription = _Class(
"UIViewUpdateVelocityAnimationDescription"
)
UIViewRetargetingAnimationDescription = _Class("UIViewRetargetingAnimationDescription")
UIViewInstaneouslyStableAnimation = _Class("UIViewInstaneouslyStableAnimation")
UIViewFrictionBounceAnimation = _Class("UIViewFrictionBounceAnimation")
UIViewSpringAnimationDescription = _Class("UIViewSpringAnimationDescription")
UIViewSpringAnimationBehavior = _Class("UIViewSpringAnimationBehavior")
UIViewSpringAnimation = _Class("UIViewSpringAnimation")
UIFloatSpringIntegrator = _Class("UIFloatSpringIntegrator")
UIFloatCompoundSpringIntegrator = _Class("UIFloatCompoundSpringIntegrator")
_UIViewPropertyInfo = _Class("_UIViewPropertyInfo")
_UIPreviewInteractionPresentationAssistant = _Class(
"_UIPreviewInteractionPresentationAssistant"
)
_UIViewAnimatablePropertyTransformer = _Class("_UIViewAnimatablePropertyTransformer")
UIAnimatablePropertyBase = _Class("UIAnimatablePropertyBase")
UIViewFloatAnimatableProperty = _Class("UIViewFloatAnimatableProperty")
UIViewProgressAnimatableProperty = _Class("UIViewProgressAnimatableProperty")
UIAnimatableProperty = _Class("UIAnimatableProperty")
_UIRadiosityImageGenerator = _Class("_UIRadiosityImageGenerator")
_UIViewBaselineLoweringInfo = _Class("_UIViewBaselineLoweringInfo")
_NSLayoutConstraintConstant = _Class("_NSLayoutConstraintConstant")
_UIFulfilledContextMenuConfiguration = _Class("_UIFulfilledContextMenuConfiguration")
UIContextMenuConfiguration = _Class("UIContextMenuConfiguration")
_UIStatusBarStateStackInfo = _Class("_UIStatusBarStateStackInfo")
UIInterpolatedColorMatrix = _Class("UIInterpolatedColorMatrix")
_UIViewServiceSession = _Class("_UIViewServiceSession")
_UICollectionViewListLayoutSectionConfiguration = _Class(
"_UICollectionViewListLayoutSectionConfiguration"
)
_UICollectionViewEnvironmentAdapter = _Class("_UICollectionViewEnvironmentAdapter")
_UISunScheduleController = _Class("_UISunScheduleController")
_UIPreview = _Class("_UIPreview")
_UIVibrantSettings = _Class("_UIVibrantSettings")
_UIPopoverLayoutInfo = _Class("_UIPopoverLayoutInfo")
_UISlidingPopoverLayoutInfo = _Class("_UISlidingPopoverLayoutInfo")
_UICubicPolyTangent = _Class("_UICubicPolyTangent")
_UIAutologgingDeallocSentinel = _Class("_UIAutologgingDeallocSentinel")
_UILazyMapTable = _Class("_UILazyMapTable")
_UIAssociationTable = _Class("_UIAssociationTable")
UIPointerInteractionAnimator = _Class("UIPointerInteractionAnimator")
_UIPrototypingValue = _Class("_UIPrototypingValue")
_UIPrototypingSettingsManager = _Class("_UIPrototypingSettingsManager")
UIDebuggingIvar = _Class("UIDebuggingIvar")
_UIDebuggingOverlayDetail = _Class("_UIDebuggingOverlayDetail")
_UIDebuggingOverlayDetailOpacity = _Class("_UIDebuggingOverlayDetailOpacity")
_UIDebuggingOverlayViewControllerDetail = _Class(
"_UIDebuggingOverlayViewControllerDetail"
)
_UIDebuggingOverlayDetailIvar = _Class("_UIDebuggingOverlayDetailIvar")
_UIDebuggingOverlayPresentingViewControllerDetail = _Class(
"_UIDebuggingOverlayPresentingViewControllerDetail"
)
_UIDebuggingOverlayPresentedViewControllerDetail = _Class(
"_UIDebuggingOverlayPresentedViewControllerDetail"
)
_UIDebuggingOverlayViewDetail = _Class("_UIDebuggingOverlayViewDetail")
UIDebuggingInformationVCHierarchyDataContainer = _Class(
"UIDebuggingInformationVCHierarchyDataContainer"
)
UIDebuggingInformationHierarchyDataContainer = _Class(
"UIDebuggingInformationHierarchyDataContainer"
)
UIDebuggingInformationOverlayInvokeGestureHandler = _Class(
"UIDebuggingInformationOverlayInvokeGestureHandler"
)
UIDraggingSystemSceneMetadata = _Class("UIDraggingSystemSceneMetadata")
UIDraggingSystemMonitor = _Class("UIDraggingSystemMonitor")
UIDraggingSystemSession = _Class("UIDraggingSystemSession")
UIDraggingSystemSessionInfo = _Class("UIDraggingSystemSessionInfo")
UIDraggingSystemTouchRoutingPolicy = _Class("UIDraggingSystemTouchRoutingPolicy")
_UITextItem = _Class("_UITextItem")
_UITextItemDiscoverer = _Class("_UITextItemDiscoverer")
UIFontPickerController = _Class("UIFontPickerController")
_UIBoundingTextRectsSolver = _Class("_UIBoundingTextRectsSolver")
UIInputContextHistory = _Class("UIInputContextHistory")
UITextCheckerDictionaryEntry = _Class("UITextCheckerDictionaryEntry")
_UIGestureStudyInteraction = _Class("_UIGestureStudyInteraction")
_UICharacterStreamingManager = _Class("_UICharacterStreamingManager")
_UISelectorSet = _Class("_UISelectorSet")
_UIFocusGroupMap = _Class("_UIFocusGroupMap")
_UITextAttachmentViewHelper = _Class("_UITextAttachmentViewHelper")
UITextPlaceholder = _Class("UITextPlaceholder")
UIWebTextPlaceholder = _Class("UIWebTextPlaceholder")
_UITextFieldBackgroundCacheKey = _Class("_UITextFieldBackgroundCacheKey")
_UITextFieldClearButtonCacheKey = _Class("_UITextFieldClearButtonCacheKey")
_UITextFieldEditingToken = _Class("_UITextFieldEditingToken")
_UITextFieldEditingProcessor = _Class("_UITextFieldEditingProcessor")
_UIForceClickInteractionDriver = _Class("_UIForceClickInteractionDriver")
_UICompatibilityForceClickInteractionDriver = _Class(
"_UICompatibilityForceClickInteractionDriver"
)
_UIDatePickerCalendarDateComponent = _Class("_UIDatePickerCalendarDateComponent")
_UIDatePickerCalendarTime = _Class("_UIDatePickerCalendarTime")
_UIDatePickerCalendarMonth = _Class("_UIDatePickerCalendarMonth")
_UIDatePickerCalendarDay = _Class("_UIDatePickerCalendarDay")
_UITextTiledLayerMaskedRect = _Class("_UITextTiledLayerMaskedRect")
UIWebSelectionGraph = _Class("UIWebSelectionGraph")
UIWebSelectionNode = _Class("UIWebSelectionNode")
_UICommandDiffv1 = _Class("_UICommandDiffv1")
_UICommandChange = _Class("_UICommandChange")
_UICommandMenuInsertion = _Class("_UICommandMenuInsertion")
_UICommandMenuDeletion = _Class("_UICommandMenuDeletion")
_UICommandItemInsertion = _Class("_UICommandItemInsertion")
_UICommandItemDeletion = _Class("_UICommandItemDeletion")
_UIDatePickerDateRange = _Class("_UIDatePickerDateRange")
UIWebSelectionAssistant = _Class("UIWebSelectionAssistant")
UIWebSelection = _Class("UIWebSelection")
_UIImageSystemImageVisualStyle = _Class("_UIImageSystemImageVisualStyle")
UIWKAutocorrectionRects = _Class("UIWKAutocorrectionRects")
UIWKAutocorrectionContext = _Class("UIWKAutocorrectionContext")
UIWKDocumentRequest = _Class("UIWKDocumentRequest")
UIWKDocumentContext = _Class("UIWKDocumentContext")
UITextTouchObservingInteraction = _Class("UITextTouchObservingInteraction")
UITextSelectionGrabberSuppressionAssertion = _Class(
"UITextSelectionGrabberSuppressionAssertion"
)
UITextReplacementGenerator = _Class("UITextReplacementGenerator")
UITextReplacementGeneratorForMultilingualDictation = _Class(
"UITextReplacementGeneratorForMultilingualDictation"
)
UITextReplacementGeneratorForDictation = _Class(
"UITextReplacementGeneratorForDictation"
)
UITextReplacementGeneratorForChineseTransliteration = _Class(
"UITextReplacementGeneratorForChineseTransliteration"
)
UITextReplacementGeneratorForCorrections = _Class(
"UITextReplacementGeneratorForCorrections"
)
UITextReplacement = _Class("UITextReplacement")
_UICarPlaySceneComponent = _Class("_UICarPlaySceneComponent")
_UITextLinkInteractionSession = _Class("_UITextLinkInteractionSession")
UITextInteractionInputDelegate = _Class("UITextInteractionInputDelegate")
_UICollectionPreferredSizingCustomizations = _Class(
"_UICollectionPreferredSizingCustomizations"
)
_UITextDraggableGeometrySameViewDropOperation = _Class(
"_UITextDraggableGeometrySameViewDropOperation"
)
_UITextDragCaretUpdate = _Class("_UITextDragCaretUpdate")
_UIPositionedAttributedString = _Class("_UIPositionedAttributedString")
UITextDropRequest = _Class("UITextDropRequest")
UITextDraggableGeometrySameViewDropOperationResult = _Class(
"UITextDraggableGeometrySameViewDropOperationResult"
)
UITextDraggableObject = _Class("UITextDraggableObject")
UITextDragRequest = _Class("UITextDragRequest")
UITextDragPreviewRenderer = _Class("UITextDragPreviewRenderer")
UITextDragFinishState = _Class("UITextDragFinishState")
UISceneSizeRestrictions = _Class("UISceneSizeRestrictions")
UIWindowSceneTouchCancellationOnRotationAssertion = _Class(
"UIWindowSceneTouchCancellationOnRotationAssertion"
)
UISceneDestructionRequestOptions = _Class("UISceneDestructionRequestOptions")
UIWindowSceneDestructionRequestOptions = _Class(
"UIWindowSceneDestructionRequestOptions"
)
UISubTest = _Class("UISubTest")
_UITableViewCellReuseParameters = _Class("_UITableViewCellReuseParameters")
_UITableViewShadowUpdatesController = _Class("_UITableViewShadowUpdatesController")
_UITableViewPrefetchContext = _Class("_UITableViewPrefetchContext")
UIListContentTextProperties = _Class("UIListContentTextProperties")
_UIFontPickerFontInfo = _Class("_UIFontPickerFontInfo")
_UITableViewDeleteAnimationSupport = _Class("_UITableViewDeleteAnimationSupport")
_UITableViewIndexEntry = _Class("_UITableViewIndexEntry")
_UIPointerContentEffect = _Class("_UIPointerContentEffect")
UITableViewDataSource = _Class("UITableViewDataSource")
UITableViewSection = _Class("UITableViewSection")
UITableViewRow = _Class("UITableViewRow")
_UITableViewCellPromiseRegion = _Class("_UITableViewCellPromiseRegion")
UITableViewRowAction = _Class("UITableViewRowAction")
_UIDisplayInfoProvider = _Class("_UIDisplayInfoProvider")
_UIDatePickerCalendarTimeWheelDisplayModeDriver = _Class(
"_UIDatePickerCalendarTimeWheelDisplayModeDriver"
)
UILocalizedIndexedCollation = _Class("UILocalizedIndexedCollation")
_UITableViewSpringLoadedEffect = _Class("_UITableViewSpringLoadedEffect")
_UITableViewSpringLoadedBehavior = _Class("_UITableViewSpringLoadedBehavior")
_UITableViewSpringLoadedInteraction = _Class("_UITableViewSpringLoadedInteraction")
UITableViewPlaceholder = _Class("UITableViewPlaceholder")
UITableViewDropPlaceholder = _Class("UITableViewDropPlaceholder")
_UITableViewDropPlaceholderContextImpl = _Class(
"_UITableViewDropPlaceholderContextImpl"
)
_UITableViewDropCoordinatorImpl = _Class("_UITableViewDropCoordinatorImpl")
_UITableViewDropItemImpl = _Class("_UITableViewDropItemImpl")
_UIKeyboardMediaServiceWarmUpConnection = _Class(
"_UIKeyboardMediaServiceWarmUpConnection"
)
_UIClickHighlightInteractionEffect = _Class("_UIClickHighlightInteractionEffect")
_UITableViewDropAnimation = _Class("_UITableViewDropAnimation")
_UITableViewDropAnimationToTarget = _Class("_UITableViewDropAnimationToTarget")
_UITableViewDropAnimationToCell = _Class("_UITableViewDropAnimationToCell")
_UITableViewDragItemContext = _Class("_UITableViewDragItemContext")
UITableConstants_TV = _Class("UITableConstants_TV")
_UIListSeparatorConfiguration = _Class("_UIListSeparatorConfiguration")
UITableConstants_CarPlay = _Class("UITableConstants_CarPlay")
_UIPageControlVisualProvider = _Class("_UIPageControlVisualProvider")
_UIInteractivePageControlVisualProvider = _Class(
"_UIInteractivePageControlVisualProvider"
)
_UILegacyPageControlVisualProvider = _Class("_UILegacyPageControlVisualProvider")
_UIDefaultSwipeViewManipulator = _Class("_UIDefaultSwipeViewManipulator")
UITableViewCellEditingData = _Class("UITableViewCellEditingData")
_UISwipeActionSpringAnimationParameters = _Class(
"_UISwipeActionSpringAnimationParameters"
)
UISwipeOccurrence = _Class("UISwipeOccurrence")
UISwipeActionsConfiguration = _Class("UISwipeActionsConfiguration")
UIListContentConfiguration = _Class("UIListContentConfiguration")
_UIStoryboardUnwindChain = _Class("_UIStoryboardUnwindChain")
UIStoryboardViewControllerPlaceholder = _Class("UIStoryboardViewControllerPlaceholder")
UIStoryboardPreviewingSegueTemplateStorage = _Class(
"UIStoryboardPreviewingSegueTemplateStorage"
)
UIStoryboardPreviewingRegistrant = _Class("UIStoryboardPreviewingRegistrant")
UIStatusBarStyleRequest = _Class("UIStatusBarStyleRequest")
UIMutableStatusBarStyleRequest = _Class("UIMutableStatusBarStyleRequest")
UIStatusBarLayoutManager = _Class("UIStatusBarLayoutManager")
UIStatusBarItem = _Class("UIStatusBarItem")
UIUserInterfaceStyleArbiterTransition = _Class("UIUserInterfaceStyleArbiterTransition")
UIUserInterfaceStyleArbiter = _Class("UIUserInterfaceStyleArbiter")
UIStatusBarComposedData = _Class("UIStatusBarComposedData")
UIStatusBarCache = _Class("UIStatusBarCache")
UIStatusBarStyleAttributes = _Class("UIStatusBarStyleAttributes")
UIStatusBarNewUIStyleAttributes = _Class("UIStatusBarNewUIStyleAttributes")
UIStatusBarNewUIActionableStyleAttributes = _Class(
"UIStatusBarNewUIActionableStyleAttributes"
)
UIStatusBarNewUIDoubleHeightStyleAttributes = _Class(
"UIStatusBarNewUIDoubleHeightStyleAttributes"
)
UIStatusBarLockScreenStyleAttributes = _Class("UIStatusBarLockScreenStyleAttributes")
UIStatusBarActionableLockScreenStyleAttributes = _Class(
"UIStatusBarActionableLockScreenStyleAttributes"
)
UIStatusBarExternalStyleAttributes = _Class("UIStatusBarExternalStyleAttributes")
UIStatusBarPublisher = _Class("UIStatusBarPublisher")
UIStatusBarServer = _Class("UIStatusBarServer")
UIStatusBarServerListener = _Class("UIStatusBarServerListener")
_UIStatusBarStyleAttributes = _Class("_UIStatusBarStyleAttributes")
_UIFocusSearchInfo = _Class("_UIFocusSearchInfo")
_UIStatusBarRegion = _Class("_UIStatusBarRegion")
_UIStatusBarImageProvider = _Class("_UIStatusBarImageProvider")
_UIStatusBarDisplayItemRelation = _Class("_UIStatusBarDisplayItemRelation")
_UIStatusBarDisplayItemDependencyRelation = _Class(
"_UIStatusBarDisplayItemDependencyRelation"
)
_UIStatusBarDisplayItemGroupRelation = _Class("_UIStatusBarDisplayItemGroupRelation")
_UIStatusBarDisplayItemState = _Class("_UIStatusBarDisplayItemState")
_UIStatusBarDisplayItemPlacementState = _Class("_UIStatusBarDisplayItemPlacementState")
_UICopyConfiguration = _Class("_UICopyConfiguration")
_UIStatusBarDataConverter = _Class("_UIStatusBarDataConverter")
_UIStatusBarDataAggregatorUpdate = _Class("_UIStatusBarDataAggregatorUpdate")
_UIStatusBarDataAggregator = _Class("_UIStatusBarDataAggregator")
_UIStatusBarData = _Class("_UIStatusBarData")
_UIStatusBarDataEntry = _Class("_UIStatusBarDataEntry")
_UIStatusBarDataBackgroundActivityEntry = _Class(
"_UIStatusBarDataBackgroundActivityEntry"
)
_UIStatusBarDataLockEntry = _Class("_UIStatusBarDataLockEntry")
_UIStatusBarDataVoiceControlEntry = _Class("_UIStatusBarDataVoiceControlEntry")
_UIStatusBarDataLocationEntry = _Class("_UIStatusBarDataLocationEntry")
_UIStatusBarDataTetheringEntry = _Class("_UIStatusBarDataTetheringEntry")
_UIStatusBarDataActivityEntry = _Class("_UIStatusBarDataActivityEntry")
_UIStatusBarDataThermalEntry = _Class("_UIStatusBarDataThermalEntry")
_UIStatusBarDataBluetoothEntry = _Class("_UIStatusBarDataBluetoothEntry")
_UIStatusBarDataBatteryEntry = _Class("_UIStatusBarDataBatteryEntry")
_UIStatusBarDataIntegerEntry = _Class("_UIStatusBarDataIntegerEntry")
_UIStatusBarDataNetworkEntry = _Class("_UIStatusBarDataNetworkEntry")
_UIStatusBarDataWifiEntry = _Class("_UIStatusBarDataWifiEntry")
_UIStatusBarDataCellularEntry = _Class("_UIStatusBarDataCellularEntry")
_UIStatusBarDataStringEntry = _Class("_UIStatusBarDataStringEntry")
_UIStatusBarDataBoolEntry = _Class("_UIStatusBarDataBoolEntry")
_UIStatusBarCycleAnimation = _Class("_UIStatusBarCycleAnimation")
_UIStatusBarCycleLayerAnimation = _Class("_UIStatusBarCycleLayerAnimation")
_UIStatusBarAnimationFactory = _Class("_UIStatusBarAnimationFactory")
_UIStatusBarFadeAnimationParameters = _Class("_UIStatusBarFadeAnimationParameters")
_UIStatusBarAnimation = _Class("_UIStatusBarAnimation")
_UIStatusBarAction = _Class("_UIStatusBarAction")
_UIStatusBarHoverRegionAction = _Class("_UIStatusBarHoverRegionAction")
_UIStatusBarSystemNavigationAction = _Class("_UIStatusBarSystemNavigationAction")
_UIStatusBarActivityAction = _Class("_UIStatusBarActivityAction")
_UIStatusBarVisualProvider_iOS = _Class("_UIStatusBarVisualProvider_iOS")
_UIStatusBarVisualProvider_Pad = _Class("_UIStatusBarVisualProvider_Pad")
_UIStatusBarVisualProvider_Pad_ForcedNoCell = _Class(
"_UIStatusBarVisualProvider_Pad_ForcedNoCell"
)
_UIStatusBarVisualProvider_Pad_ForcedCellular = _Class(
"_UIStatusBarVisualProvider_Pad_ForcedCellular"
)
_UIStatusBarVisualProvider_RoundedPad = _Class("_UIStatusBarVisualProvider_RoundedPad")
_UIStatusBarVisualProvider_RoundedPad_ForcedNoCell = _Class(
"_UIStatusBarVisualProvider_RoundedPad_ForcedNoCell"
)
_UIStatusBarVisualProvider_RoundedPad_ForcedCellular = _Class(
"_UIStatusBarVisualProvider_RoundedPad_ForcedCellular"
)
_UIStatusBarVisualProvider_Phone = _Class("_UIStatusBarVisualProvider_Phone")
_UIStatusBarVisualProvider_Split = _Class("_UIStatusBarVisualProvider_Split")
_UIStatusBarVisualProvider_Split65 = _Class("_UIStatusBarVisualProvider_Split65")
_UIStatusBarVisualProvider_Split2x61 = _Class("_UIStatusBarVisualProvider_Split2x61")
_UIStatusBarVisualProvider_Split58 = _Class("_UIStatusBarVisualProvider_Split58")
_UIStatusBarVisualProvider_LegacyPhone = _Class(
"_UIStatusBarVisualProvider_LegacyPhone"
)
_UIStatusBarVisualProvider_Fallback = _Class("_UIStatusBarVisualProvider_Fallback")
_UIDatePickerCalendarTimeWheelItem = _Class("_UIDatePickerCalendarTimeWheelItem")
UIKeyboardFloatingTransitionState = _Class("UIKeyboardFloatingTransitionState")
_UIBatteryViewAXHUDImageCacheInfo = _Class("_UIBatteryViewAXHUDImageCacheInfo")
_UIStatusBarRegionAxisStackingLayout = _Class("_UIStatusBarRegionAxisStackingLayout")
_UIStatusBarRegionAxisFillingLayout = _Class("_UIStatusBarRegionAxisFillingLayout")
_UIStatusBarRegionAxisCenteringLayout = _Class("_UIStatusBarRegionAxisCenteringLayout")
_UIStatusBarRegionAxisAligningLayout = _Class("_UIStatusBarRegionAxisAligningLayout")
_UIStatusBarRegionAxesLayout = _Class("_UIStatusBarRegionAxesLayout")
_UIStatusBarItemUpdate = _Class("_UIStatusBarItemUpdate")
_UIStatusBarIdentifier = _Class("_UIStatusBarIdentifier")
_UIStatusBarDisplayItemPlacement = _Class("_UIStatusBarDisplayItemPlacement")
_UIStatusBarDisplayItem = _Class("_UIStatusBarDisplayItem")
_UIStatusBarSpacerDisplayItem = _Class("_UIStatusBarSpacerDisplayItem")
_UIStatusBarDisplayItemPlacementGroup = _Class("_UIStatusBarDisplayItemPlacementGroup")
_UIStatusBarDisplayItemPlacementWifiGroup = _Class(
"_UIStatusBarDisplayItemPlacementWifiGroup"
)
_UIStatusBarDisplayItemPlacementNetworkGroup = _Class(
"_UIStatusBarDisplayItemPlacementNetworkGroup"
)
_UIStatusBarDisplayItemPlacementIndicatorsGroup = _Class(
"_UIStatusBarDisplayItemPlacementIndicatorsGroup"
)
_UIStatusBarDisplayItemPlacementExpandedIndicatorsGroup = _Class(
"_UIStatusBarDisplayItemPlacementExpandedIndicatorsGroup"
)
_UIStatusBarDisplayItemPlacementCellularGroup = _Class(
"_UIStatusBarDisplayItemPlacementCellularGroup"
)
_UIStatusBarDisplayItemPlacementBatteryGroup = _Class(
"_UIStatusBarDisplayItemPlacementBatteryGroup"
)
_UIPageIndicatorFeed = _Class("_UIPageIndicatorFeed")
UIStatusBarForegroundStyleAttributes = _Class("UIStatusBarForegroundStyleAttributes")
UIStatusBarLockScreenForegroundStyleAttributes = _Class(
"UIStatusBarLockScreenForegroundStyleAttributes"
)
UIStatusBarExternalForegroundStyleAttributes = _Class(
"UIStatusBarExternalForegroundStyleAttributes"
)
UIStatusBarExternalNavigationForegroundStyleAttributes = _Class(
"UIStatusBarExternalNavigationForegroundStyleAttributes"
)
UIStatusBarExternalInCallForegroundStyleAttributes = _Class(
"UIStatusBarExternalInCallForegroundStyleAttributes"
)
UIStatusBarExternalTranslucentForegroundStyleAttributes = _Class(
"UIStatusBarExternalTranslucentForegroundStyleAttributes"
)
_UIBanner = _Class("_UIBanner")
_UIBannerContent = _Class("_UIBannerContent")
_UIStateRestorationKeyedArchiverDelegate = _Class(
"_UIStateRestorationKeyedArchiverDelegate"
)
_UIObjectIdentifierPathProxy = _Class("_UIObjectIdentifierPathProxy")
_UIStoryboardProxy = _Class("_UIStoryboardProxy")
_UIValuePredictor = _Class("_UIValuePredictor")
_UITouchPredictor = _Class("_UITouchPredictor")
_UIDropInteractionWeakWrapper = _Class("_UIDropInteractionWeakWrapper")
_UIDragEventSample = _Class("_UIDragEventSample")
_UIStateMachine = _Class("_UIStateMachine")
_UIHIDScaleEventTracker = _Class("_UIHIDScaleEventTracker")
_UIHIDPathCollection = _Class("_UIHIDPathCollection")
_UIHIDPath = _Class("_UIHIDPath")
_UIEstimatedTouchRecord = _Class("_UIEstimatedTouchRecord")
_UIHoverTouchDeliveryTable = _Class("_UIHoverTouchDeliveryTable")
_UISlotId = _Class("_UISlotId")
_UIPopoverSceneManager = _Class("_UIPopoverSceneManager")
_UITouchDownClickInteractionDriver = _Class("_UITouchDownClickInteractionDriver")
_UISearchPresentationAssistant = _Class("_UISearchPresentationAssistant")
_UIFocusCastingController = _Class("_UIFocusCastingController")
_UIDefaultsInterfaceStyleObserver = _Class("_UIDefaultsInterfaceStyleObserver")
UIKeyCommandDiscoverabilityHUDVisualStyle = _Class(
"UIKeyCommandDiscoverabilityHUDVisualStyle"
)
UIKeyCommandDiscoverabilityHUDVisualStyleRegular = _Class(
"UIKeyCommandDiscoverabilityHUDVisualStyleRegular"
)
UIKeyCommandDiscoverabilityHUDVisualStyleCompact = _Class(
"UIKeyCommandDiscoverabilityHUDVisualStyleCompact"
)
_UITouchForceMessage = _Class("_UITouchForceMessage")
_UITouchForceObservationMessageReader = _Class("_UITouchForceObservationMessageReader")
_UICollectionLayoutSectionSolver = _Class("_UICollectionLayoutSectionSolver")
_UIForceMessage = _Class("_UIForceMessage")
UIPrinterPickerControllerInternals = _Class("UIPrinterPickerControllerInternals")
_UIClickPresentationAssistant = _Class("_UIClickPresentationAssistant")
UIPrinterInternals = _Class("UIPrinterInternals")
UIPrintPreviewState = _Class("UIPrintPreviewState")
UIPrintInfoRequest = _Class("UIPrintInfoRequest")
UIPrintingProgress = _Class("UIPrintingProgress")
UIPrintPanelViewController = _Class("UIPrintPanelViewController")
_NSDiffableDataSourceSectionSnapshotState = _Class(
"_NSDiffableDataSourceSectionSnapshotState"
)
_UIPickerViewTestParameters = _Class("_UIPickerViewTestParameters")
_UIDatePickerMode = _Class("_UIDatePickerMode")
_UIDatePickerMode_Custom = _Class("_UIDatePickerMode_Custom")
_UIDatePickerMode_TimeInterval = _Class("_UIDatePickerMode_TimeInterval")
_UIDatePickerMode_DateAndTime = _Class("_UIDatePickerMode_DateAndTime")
_UIDatePickerMode_Time = _Class("_UIDatePickerMode_Time")
_UIDatePickerMode_Date = _Class("_UIDatePickerMode_Date")
_UIDatePickerMode_YearMonth = _Class("_UIDatePickerMode_YearMonth")
_UIDatePickerMode_MonthDay = _Class("_UIDatePickerMode_MonthDay")
_UIDatePickerMode_DateWithOptionalYear = _Class(
"_UIDatePickerMode_DateWithOptionalYear"
)
_UIDatePickerComponent = _Class("_UIDatePickerComponent")
_UICPILiveDragPreview = _Class("_UICPILiveDragPreview")
_UIDiffableDataSource = _Class("_UIDiffableDataSource")
_UIDiffableDataSourceSnapshotter = _Class("_UIDiffableDataSourceSnapshotter")
_UITableViewDiffableDataSource = _Class("_UITableViewDiffableDataSource")
_UICollectionViewDiffableDataSource = _Class("_UICollectionViewDiffableDataSource")
_UIDiffableDataSourceSnapshot = _Class("_UIDiffableDataSourceSnapshot")
_UIPreviewInteractionClassicImpl = _Class("_UIPreviewInteractionClassicImpl")
_UIPreviewInteractionViewControllerPresentation = _Class(
"_UIPreviewInteractionViewControllerPresentation"
)
_UIPreviewInteractionHighlighter = _Class("_UIPreviewInteractionHighlighter")
UIPreviewItemController = _Class("UIPreviewItemController")
_UIPreviewInteractionPresentationTransition = _Class(
"_UIPreviewInteractionPresentationTransition"
)
_UIPreviewInteractionDismissTransition = _Class(
"_UIPreviewInteractionDismissTransition"
)
_UIPreviewInteractionController = _Class("_UIPreviewInteractionController")
_UIInteractionEffect_deprecated = _Class("_UIInteractionEffect_deprecated")
_UIStatusBarVisualProvider_CarPlay = _Class("_UIStatusBarVisualProvider_CarPlay")
_UIStatusBarVisualProvider_CarPlayHorizontal = _Class(
"_UIStatusBarVisualProvider_CarPlayHorizontal"
)
_UIStatusBarVisualProvider_CarPlayVertical = _Class(
"_UIStatusBarVisualProvider_CarPlayVertical"
)
_UIDynamicTransformer = _Class("_UIDynamicTransformer")
_UIIndexPathIdentityTracker = _Class("_UIIndexPathIdentityTracker")
_UIPreviewInteractionSystemHighlighter = _Class(
"_UIPreviewInteractionSystemHighlighter"
)
_UIPreviewInteractionCustomViewHighlighter = _Class(
"_UIPreviewInteractionCustomViewHighlighter"
)
_UIPreviewTransitionDelegate = _Class("_UIPreviewTransitionDelegate")
UIScribbleInteractionWrapper = _Class("UIScribbleInteractionWrapper")
_UIPreviewPresentationAnimator = _Class("_UIPreviewPresentationAnimator")
UIPreviewInteractionController = _Class("UIPreviewInteractionController")
UIInteractionProgress = _Class("UIInteractionProgress")
UIPreviewForceInteractionProgress = _Class("UIPreviewForceInteractionProgress")
_UITouchForceInteractionProgress = _Class("_UITouchForceInteractionProgress")
UIForceStageInteractionProgress = _Class("UIForceStageInteractionProgress")
UISimpleInteractionProgress = _Class("UISimpleInteractionProgress")
_UIPICSimpleInteractionProgress = _Class("_UIPICSimpleInteractionProgress")
UIForcePresentationHelper = _Class("UIForcePresentationHelper")
_UIPreviewInteractionCrossBlurViewControllerTransition = _Class(
"_UIPreviewInteractionCrossBlurViewControllerTransition"
)
_UIPreviewInteractionViewControllerHelper = _Class(
"_UIPreviewInteractionViewControllerHelper"
)
_UIPreviewInteractionSimulatingTouchForceProvider = _Class(
"_UIPreviewInteractionSimulatingTouchForceProvider"
)
_UIPreviewInteractionGestureRecognizerTouchForceProvider = _Class(
"_UIPreviewInteractionGestureRecognizerTouchForceProvider"
)
_UIPreviewInteractionDecayTouchForceProvider = _Class(
"_UIPreviewInteractionDecayTouchForceProvider"
)
_UICommandInternalDiff = _Class("_UICommandInternalDiff")
_UICommandParentInserts = _Class("_UICommandParentInserts")
_UICommandChildInserts = _Class("_UICommandChildInserts")
_UIPreviewInteractionCompatibilityTouchForceProvider = _Class(
"_UIPreviewInteractionCompatibilityTouchForceProvider"
)
_UIPreviewInteractionStateRecognizer = _Class("_UIPreviewInteractionStateRecognizer")
_UICollectionViewAnimator = _Class("_UICollectionViewAnimator")
_UICollectionViewAnimationContext = _Class("_UICollectionViewAnimationContext")
_UIDeepPressAnalyzer = _Class("_UIDeepPressAnalyzer")
_UIPreviewInteractionCommitTransition = _Class("_UIPreviewInteractionCommitTransition")
_UIInteractiveHighlightEffect = _Class("_UIInteractiveHighlightEffect")
_UIInteractiveHighlightEnvironment = _Class("_UIInteractiveHighlightEnvironment")
_UIInteractiveHighlightViewRecord = _Class("_UIInteractiveHighlightViewRecord")
_UIElasticValue = _Class("_UIElasticValue")
NSDiffableDataSourceSectionTransaction = _Class(
"NSDiffableDataSourceSectionTransaction"
)
NSDiffableDataSourceTransaction = _Class("NSDiffableDataSourceTransaction")
_UIVelocityIntegrator = _Class("_UIVelocityIntegrator")
_UIVelocityIntegratorDataSample = _Class("_UIVelocityIntegratorDataSample")
_UIPreviewActionsController = _Class("_UIPreviewActionsController")
_UIPlatterMenuPanningTransformer = _Class("_UIPlatterMenuPanningTransformer")
_UIPlatterMenuDynamicsController = _Class("_UIPlatterMenuDynamicsController")
_UIPlatterItem = _Class("_UIPlatterItem")
_UIViewControllerPreviewingContext = _Class("_UIViewControllerPreviewingContext")
_UIViewControllerCompatibilityPreviewingContext = _Class(
"_UIViewControllerCompatibilityPreviewingContext"
)
UIKBPhoneToCarPlayTransformation = _Class("UIKBPhoneToCarPlayTransformation")
_UIInertPreviewingContext = _Class("_UIInertPreviewingContext")
_UIItemProviderRepresentationOptions = _Class("_UIItemProviderRepresentationOptions")
_UIContentViewEditingState = _Class("_UIContentViewEditingState")
_UIContentViewEditingConfiguration = _Class("_UIContentViewEditingConfiguration")
UIFocusRingClientState = _Class("UIFocusRingClientState")
UIUserNotificationAction = _Class("UIUserNotificationAction")
UIMutableUserNotificationAction = _Class("UIMutableUserNotificationAction")
UIUserNotificationCategory = _Class("UIUserNotificationCategory")
UIMutableUserNotificationCategory = _Class("UIMutableUserNotificationCategory")
UIUserNotificationSettings = _Class("UIUserNotificationSettings")
UIUserNotificationActionSettings = _Class("UIUserNotificationActionSettings")
UIMutableUserNotificationActionSettings = _Class(
"UIMutableUserNotificationActionSettings"
)
_UIKeyboardPasscodeObscuringInteraction = _Class(
"_UIKeyboardPasscodeObscuringInteraction"
)
_UISheetDropInteraction = _Class("_UISheetDropInteraction")
UILocalNotification = _Class("UILocalNotification")
UIConcreteLocalNotification = _Class("UIConcreteLocalNotification")
_UIMotionEffectAcceleratedOutputRange = _Class("_UIMotionEffectAcceleratedOutputRange")
UIMotionEffect = _Class("UIMotionEffect")
_UITiltMotionEffect = _Class("_UITiltMotionEffect")
_UIParallaxMotionEffect = _Class("_UIParallaxMotionEffect")
UIMotionEffectGroup = _Class("UIMotionEffectGroup")
UIInterpolatingMotionEffect = _Class("UIInterpolatingMotionEffect")
_UIViewerRelativeDevicePose = _Class("_UIViewerRelativeDevicePose")
_UIMotionEffectEngineLogger = _Class("_UIMotionEffectEngineLogger")
_UIMotionEffectEngineClient = _Class("_UIMotionEffectEngineClient")
_UIMotionEffectEventProvider = _Class("_UIMotionEffectEventProvider")
_UIMotionEffectCoreMotionEventProvider = _Class(
"_UIMotionEffectCoreMotionEventProvider"
)
_UIMotionEffectEvent = _Class("_UIMotionEffectEvent")
_UIMotionEffectFocusChangeEvent = _Class("_UIMotionEffectFocusChangeEvent")
_UIMotionEffectAttitudeEvent = _Class("_UIMotionEffectAttitudeEvent")
_UIMotionEffectApplicator = _Class("_UIMotionEffectApplicator")
_UICAAnimationPositionQuantizer = _Class("_UICAAnimationPositionQuantizer")
_UIMotionAnalyzer = _Class("_UIMotionAnalyzer")
_UIMotionFocusAnalyzer = _Class("_UIMotionFocusAnalyzer")
_UIMotionAttitudeAnalyzer = _Class("_UIMotionAttitudeAnalyzer")
_UIValueCellContentViewConfiguration = _Class("_UIValueCellContentViewConfiguration")
_UIInputHostController = _Class("_UIInputHostController")
UIKBUndoStyling = _Class("UIKBUndoStyling")
_PointQueue = _Class("_PointQueue")
_PathPoint = _Class("_PathPoint")
UITextInputPayloadController = _Class("UITextInputPayloadController")
UITextSuggestion = _Class("UITextSuggestion")
UIAutofillExtrasSuggestion = _Class("UIAutofillExtrasSuggestion")
UITextAutofillSuggestion = _Class("UITextAutofillSuggestion")
_UISubtitleCellContentViewConfiguration = _Class(
"_UISubtitleCellContentViewConfiguration"
)
UIKeyboardKeyplaneTransition = _Class("UIKeyboardKeyplaneTransition")
UIKeyboardSquishTransition = _Class("UIKeyboardSquishTransition")
UIKeyboardShiftTransition = _Class("UIKeyboardShiftTransition")
UIKeyboardKeySwipeTransition = _Class("UIKeyboardKeySwipeTransition")
UIKeyboardHandBiasTransitionContext = _Class("UIKeyboardHandBiasTransitionContext")
UIKBPanGestureVelocitySample = _Class("UIKBPanGestureVelocitySample")
_UIPointerContentEffectAnimationBuilder = _Class(
"_UIPointerContentEffectAnimationBuilder"
)
_UIPageIndicatorStore = _Class("_UIPageIndicatorStore")
_UIPageIndicatorStoreObject = _Class("_UIPageIndicatorStoreObject")
_UIFocusGroupHistory = _Class("_UIFocusGroupHistory")
_UIKBRTFingerInfo = _Class("_UIKBRTFingerInfo")
_UIKBRTFakeFingerInfo = _Class("_UIKBRTFakeFingerInfo")
_UIKBRTMutableOrderIndexSet = _Class("_UIKBRTMutableOrderIndexSet")
_UIKBRTTouchVelocities = _Class("_UIKBRTTouchVelocities")
_UIKBRTTimerBlock = _Class("_UIKBRTTimerBlock")
_UIKBRTTouchHistory = _Class("_UIKBRTTouchHistory")
_UIKBRTTouchHistoryInfo = _Class("_UIKBRTTouchHistoryInfo")
_UIKBRTDecayingObject = _Class("_UIKBRTDecayingObject")
_UIKBRTDecayingOffset = _Class("_UIKBRTDecayingOffset")
_UIFocusGroup = _Class("_UIFocusGroup")
_UIKBRTRecognizer = _Class("_UIKBRTRecognizer")
_UIKBRTConfidenceLevels = _Class("_UIKBRTConfidenceLevels")
_UIKBRTPendingConfidenceLevels = _Class("_UIKBRTPendingConfidenceLevels")
_UIKBRTObject = _Class("_UIKBRTObject")
_UIKBRTTouchInfo = _Class("_UIKBRTTouchInfo")
_UIKBRTKeyboardTouchObserver = _Class("_UIKBRTKeyboardTouchObserver")
_UIKBRTFingerDetection = _Class("_UIKBRTFingerDetection")
_UIKBRTTouchDrifting = _Class("_UIKBRTTouchDrifting")
UIKBCadenceMonitor = _Class("UIKBCadenceMonitor")
UIKeyboardSupplementaryControlKeyTransformation = _Class(
"UIKeyboardSupplementaryControlKeyTransformation"
)
UIKBKeyplaneTransformationContext = _Class("UIKBKeyplaneTransformationContext")
UIKBContinuousPathModalKeysTransformation = _Class(
"UIKBContinuousPathModalKeysTransformation"
)
_UIKBVoidSpace = _Class("_UIKBVoidSpace")
UIPointerShape = _Class("UIPointerShape")
_UICursor = _Class("_UICursor")
UIPointerStyle = _Class("UIPointerStyle")
_UICursorStyle = _Class("_UICursorStyle")
UIPointerEffect = _Class("UIPointerEffect")
_UICursorEffect = _Class("_UICursorEffect")
_UICursorHoverEffect = _Class("_UICursorHoverEffect")
_UICursorLiftEffect = _Class("_UICursorLiftEffect")
_UICursorAppIconEffect = _Class("_UICursorAppIconEffect")
_UICursorHighlightEffect = _Class("_UICursorHighlightEffect")
_UIPointerScrollIndicatorEffect = _Class("_UIPointerScrollIndicatorEffect")
UIPointerHoverEffect = _Class("UIPointerHoverEffect")
_UIPointerAccessibilityEffect = _Class("_UIPointerAccessibilityEffect")
UIPointerLiftEffect = _Class("UIPointerLiftEffect")
UIPointerAppIconEffect = _Class("UIPointerAppIconEffect")
UIPointerHighlightEffect = _Class("UIPointerHighlightEffect")
_UISwipeAnimationFactory = _Class("_UISwipeAnimationFactory")
UIKeyboardPopoverContainer = _Class("UIKeyboardPopoverContainer")
UICellAccessory = _Class("UICellAccessory")
UICellAccessoryCustomView = _Class("UICellAccessoryCustomView")
UICellAccessoryLabel = _Class("UICellAccessoryLabel")
UICellAccessoryOutlineDisclosure = _Class("UICellAccessoryOutlineDisclosure")
UICellAccessoryMultiselect = _Class("UICellAccessoryMultiselect")
UICellAccessorySeparator = _Class("UICellAccessorySeparator")
UICellAccessoryReorder = _Class("UICellAccessoryReorder")
UICellAccessoryInsert = _Class("UICellAccessoryInsert")
UICellAccessoryDelete = _Class("UICellAccessoryDelete")
UICellAccessoryCheckmark = _Class("UICellAccessoryCheckmark")
UICellAccessoryDisclosureIndicator = _Class("UICellAccessoryDisclosureIndicator")
_UICollectionViewLayoutSwipeViewManipulator = _Class(
"_UICollectionViewLayoutSwipeViewManipulator"
)
_UICollectionViewLayoutSwipeActionsModule = _Class(
"_UICollectionViewLayoutSwipeActionsModule"
)
UIInputViewAnimationStyleExtraView = _Class("UIInputViewAnimationStyleExtraView")
UIKeyboardRotationState = _Class("UIKeyboardRotationState")
UIInputViewTransition = _Class("UIInputViewTransition")
UIPeripheralHostState = _Class("UIPeripheralHostState")
UIKBDerivedKeyboard = _Class("UIKBDerivedKeyboard")
UIKBSplitTraits = _Class("UIKBSplitTraits")
UIKBTouchOrderedTaskList = _Class("UIKBTouchOrderedTaskList")
UIKBTouchStateTask = _Class("UIKBTouchStateTask")
UIKBTouchState = _Class("UIKBTouchState")
UIKeyboardInputManagerMux = _Class("UIKeyboardInputManagerMux")
UIKeyboardInputManagerClient = _Class("UIKeyboardInputManagerClient")
UIKeyboardInputManagerClientRequest = _Class("UIKeyboardInputManagerClientRequest")
UIKeyboardDockItem = _Class("UIKeyboardDockItem")
_UIKeyboardAnimatorAnimationStyleControllerContext = _Class(
"_UIKeyboardAnimatorAnimationStyleControllerContext"
)
_UIKeyboardAnimatorAnimationStyleController = _Class(
"_UIKeyboardAnimatorAnimationStyleController"
)
_UIKeyboardAnimator = _Class("_UIKeyboardAnimator")
_UICGColorCacheKey = _Class("_UICGColorCacheKey")
UIKBViewTreeSnapshotter = _Class("UIKBViewTreeSnapshotter")
UIKeyboardEmojiPreferences = _Class("UIKeyboardEmojiPreferences")
UIKeyboardEmojiKeyDisplayController = _Class("UIKeyboardEmojiKeyDisplayController")
UIKeyboardEmojiGraphicsTraits = _Class("UIKeyboardEmojiGraphicsTraits")
UIKeyboardEmojiGraphics = _Class("UIKeyboardEmojiGraphics")
UIKeyboardEmojiCategory = _Class("UIKeyboardEmojiCategory")
UIKeyboardEmoji = _Class("UIKeyboardEmoji")
_IntArray2D = _Class("_IntArray2D")
_EditScriptRangedAtom = _Class("_EditScriptRangedAtom")
_EditScriptIndexedAtom = _Class("_EditScriptIndexedAtom")
_EditScriptDataArray = _Class("_EditScriptDataArray")
_EditScript = _Class("_EditScript")
_EditScriptRanged = _Class("_EditScriptRanged")
_EditScriptIndexed = _Class("_EditScriptIndexed")
UIDictationSerializableResults = _Class("UIDictationSerializableResults")
UIDictationMultilingualResults = _Class("UIDictationMultilingualResults")
UIDictationMultilingualString = _Class("UIDictationMultilingualString")
UIDictationInterpretationGroup = _Class("UIDictationInterpretationGroup")
UIDictationInterpretation = _Class("UIDictationInterpretation")
UIDictationToken = _Class("UIDictationToken")
UIDictationScoredToken = _Class("UIDictationScoredToken")
UIDictationUtilities = _Class("UIDictationUtilities")
UIDictationLandingViewSettings = _Class("UIDictationLandingViewSettings")
UIDictationConnectionFilterState = _Class("UIDictationConnectionFilterState")
DispatchGroupWrapper = _Class("DispatchGroupWrapper")
UIDictationStreamingOperations = _Class("UIDictationStreamingOperations")
UIDictationConnectionCorrectionInfo = _Class("UIDictationConnectionCorrectionInfo")
UIDictationConnectionOptions = _Class("UIDictationConnectionOptions")
UIKBStrokeSample = _Class("UIKBStrokeSample")
UIKeyboardSyntheticTouch = _Class("UIKeyboardSyntheticTouch")
UIKeyboardTouchInfo = _Class("UIKeyboardTouchInfo")
UIKBRenderer = _Class("UIKBRenderer")
UIKBDivotedEffect = _Class("UIKBDivotedEffect")
UIKBShadowEffect = _Class("UIKBShadowEffect")
UIKBNullEffect = _Class("UIKBNullEffect")
UIKBHandwritingInputSpeedModel = _Class("UIKBHandwritingInputSpeedModel")
_UIKBHandwritingInputSpeedModelPoint = _Class("_UIKBHandwritingInputSpeedModelPoint")
UIKBHandwritingPointFIFO = _Class("UIKBHandwritingPointFIFO")
UIKBHandwritingBezierPathPointFIFO = _Class("UIKBHandwritingBezierPathPointFIFO")
UIKBHandwritingQuadCurvePointFIFO = _Class("UIKBHandwritingQuadCurvePointFIFO")
UIKBHandwritingBoxcarFilterPointFIFO = _Class("UIKBHandwritingBoxcarFilterPointFIFO")
UIKBHandwritingStrokePointFIFO = _Class("UIKBHandwritingStrokePointFIFO")
UIGestureKeyboardIntroduction = _Class("UIGestureKeyboardIntroduction")
UIKBShapeOperator = _Class("UIKBShapeOperator")
_UISceneFocusMovementBSActionsHandler = _Class("_UISceneFocusMovementBSActionsHandler")
_UIInputViewControllerOutput = _Class("_UIInputViewControllerOutput")
_UIInputViewControllerState = _Class("_UIInputViewControllerState")
_UIDialogForAddingKeyboard = _Class("_UIDialogForAddingKeyboard")
UIMultiSelectInteractionState = _Class("UIMultiSelectInteractionState")
UIKeyboardSplitControlMenu_DockAndMerge = _Class(
"UIKeyboardSplitControlMenu_DockAndMerge"
)
UIKeyboardSplitControlMenu_Merge = _Class("UIKeyboardSplitControlMenu_Merge")
UIKeyboardSplitControlMenu_Split = _Class("UIKeyboardSplitControlMenu_Split")
UIKeyboardSplitControlMenu_Dock = _Class("UIKeyboardSplitControlMenu_Dock")
UIKeyboardSplitControlMenu_Undock = _Class("UIKeyboardSplitControlMenu_Undock")
UIKeyboardSplitControlMenu_Floating = _Class("UIKeyboardSplitControlMenu_Floating")
UIInputSwitcherGestureState = _Class("UIInputSwitcherGestureState")
UIInputSwitcherItem = _Class("UIInputSwitcherItem")
UIKeyboardCandidateViewStyle = _Class("UIKeyboardCandidateViewStyle")
UIKeyboardCandidateViewState = _Class("UIKeyboardCandidateViewState")
_UIFocusLinearMovementDebugViewLineElement = _Class(
"_UIFocusLinearMovementDebugViewLineElement"
)
_UIFocusLinearMovementDebugViewLineSegment = _Class(
"_UIFocusLinearMovementDebugViewLineSegment"
)
UIKeyboardCandidateViewImageRenderer = _Class("UIKeyboardCandidateViewImageRenderer")
_UIDiffableSectionBoundaryMoveDetector = _Class(
"_UIDiffableSectionBoundaryMoveDetector"
)
UIKBAutoFillTestTagRequest = _Class("UIKBAutoFillTestTagRequest")
UIKBAutoFillTestTableViewHeaderFooterData = _Class(
"UIKBAutoFillTestTableViewHeaderFooterData"
)
UIKBTestAutoFillTableViewCellData = _Class("UIKBTestAutoFillTableViewCellData")
UIKBAutoFillTestTableViewDataSource = _Class("UIKBAutoFillTestTableViewDataSource")
UIKBAutoFillTestArchiveMaker = _Class("UIKBAutoFillTestArchiveMaker")
UIKBAutoFillTestArchive = _Class("UIKBAutoFillTestArchive")
UIKBAutoFillTestExpectedResult = _Class("UIKBAutoFillTestExpectedResult")
_UIRelationshipTraitStorageRecord = _Class("_UIRelationshipTraitStorageRecord")
_UIAttributeTraitStorageRecord = _Class("_UIAttributeTraitStorageRecord")
_UITraitStorage = _Class("_UITraitStorage")
_UIRelationshipTraitStorage = _Class("_UIRelationshipTraitStorage")
_UIColorAttributeTraitStorage = _Class("_UIColorAttributeTraitStorage")
_UIAttributeTraitStorage = _Class("_UIAttributeTraitStorage")
_UITraitStorageList = _Class("_UITraitStorageList")
_UICoreUICatalogColorWrapper = _Class("_UICoreUICatalogColorWrapper")
_UIKeyboardSuppressionPencilPolicyDelegate = _Class(
"_UIKeyboardSuppressionPencilPolicyDelegate"
)
UIRuntimeAccessibilityConfiguration = _Class("UIRuntimeAccessibilityConfiguration")
UINibKeyValuePair = _Class("UINibKeyValuePair")
_UIClickInteraction = _Class("_UIClickInteraction")
_UIPercentDrivenInteractionEffect = _Class("_UIPercentDrivenInteractionEffect")
_UIPercentDrivenInteractionEffectChangeContext = _Class(
"_UIPercentDrivenInteractionEffectChangeContext"
)
_UIIdleModeLayoutAttributes = _Class("_UIIdleModeLayoutAttributes")
_UIIdleModeController = _Class("_UIIdleModeController")
_UIContentViewEditingController = _Class("_UIContentViewEditingController")
_UITableViewMultiSelectController = _Class("_UITableViewMultiSelectController")
UIAccelerometer = _Class("UIAccelerometer")
UIAcceleration = _Class("UIAcceleration")
_UICachedBoundingPathBitmapDataReferenceCorner = _Class(
"_UICachedBoundingPathBitmapDataReferenceCorner"
)
_UIBoundingPathBitmap = _Class("_UIBoundingPathBitmap")
_UILegibilityImageSet = _Class("_UILegibilityImageSet")
_UILegibilityCachedShadow = _Class("_UILegibilityCachedShadow")
_UILegibilitySettings = _Class("_UILegibilitySettings")
_UILegibilitySettingsProvider = _Class("_UILegibilitySettingsProvider")
UITextRenderingAttributes = _Class("UITextRenderingAttributes")
_UIImageAssetRenditionCacheKey = _Class("_UIImageAssetRenditionCacheKey")
_UIImageSymbolLayer = _Class("_UIImageSymbolLayer")
_UIImageSerializationWrapper = _Class("_UIImageSerializationWrapper")
_UIGraphicsLetterpressStyle = _Class("_UIGraphicsLetterpressStyle")
UIGradient = _Class("UIGradient")
_UITVScrollViewManager = _Class("_UITVScrollViewManager")
_UIForceLevelClassifier = _Class("_UIForceLevelClassifier")
_UIPreviewInteractionForceLevelClassifier = _Class(
"_UIPreviewInteractionForceLevelClassifier"
)
_UILinearForceLevelClassifier = _Class("_UILinearForceLevelClassifier")
UICollectionViewSupplementaryRegistration = _Class(
"UICollectionViewSupplementaryRegistration"
)
_UICollectionViewSupplementaryRegistration = _Class(
"_UICollectionViewSupplementaryRegistration"
)
UICollectionViewCellRegistration = _Class("UICollectionViewCellRegistration")
_UICollectionViewCellRegistration = _Class("_UICollectionViewCellRegistration")
_UIContextMenuLayoutArbiter = _Class("_UIContextMenuLayoutArbiter")
_UIContextMenuLayoutArbiterOutput = _Class("_UIContextMenuLayoutArbiterOutput")
_UIContextMenuLayoutArbiterInput = _Class("_UIContextMenuLayoutArbiterInput")
UIGestureDelayedPress = _Class("UIGestureDelayedPress")
_UIDigitizerGestureRecognizerImp = _Class("_UIDigitizerGestureRecognizerImp")
__UISystemGestureManager = _Class("__UISystemGestureManager")
_UISystemGestureManager = _Class("_UISystemGestureManager")
_UIDatePickerCalendarViewDataSourceController = _Class(
"_UIDatePickerCalendarViewDataSourceController"
)
UIInputViewAnimationControllerSlideContext = _Class(
"UIInputViewAnimationControllerSlideContext"
)
UIInputViewAnimationControllerSlide = _Class("UIInputViewAnimationControllerSlide")
_UIArrayController = _Class("_UIArrayController")
UIKBTutorialModalDisplayStyling = _Class("UIKBTutorialModalDisplayStyling")
_UIDisplayObserver = _Class("_UIDisplayObserver")
UISnapshottingAssertionManager = _Class("UISnapshottingAssertionManager")
UISnapshottingAssertion = _Class("UISnapshottingAssertion")
UIScenePresentationManager = _Class("UIScenePresentationManager")
UIScenePresentationContext = _Class("UIScenePresentationContext")
UIMutableScenePresentationContext = _Class("UIMutableScenePresentationContext")
UISceneLayerTargetFactory = _Class("UISceneLayerTargetFactory")
UISceneLayerPresentationContext = _Class("UISceneLayerPresentationContext")
UIMutableSceneLayerPresentationContext = _Class(
"UIMutableSceneLayerPresentationContext"
)
UIExternalScenePairingObserver = _Class("UIExternalScenePairingObserver")
_UITransformToReasonAssociation = _Class("_UITransformToReasonAssociation")
UITransform = _Class("UITransform")
UITransformer = _Class("UITransformer")
UIMutableTransformer = _Class("UIMutableTransformer")
_UIDatePickerCalendarTimeFormat = _Class("_UIDatePickerCalendarTimeFormat")
UIScenePresentationBinder = _Class("UIScenePresentationBinder")
UIRootWindowScenePresentationBinder = _Class("UIRootWindowScenePresentationBinder")
_UIScenePresenterOwner = _Class("_UIScenePresenterOwner")
_UIScenePresenter = _Class("_UIScenePresenter")
_UISceneLayerTargetWithContext = _Class("_UISceneLayerTargetWithContext")
UIApplicationSceneDeactivationManager = _Class("UIApplicationSceneDeactivationManager")
UIApplicationSceneDeactivationAssertion = _Class(
"UIApplicationSceneDeactivationAssertion"
)
_UIPreviewInteractionClickImpl = _Class("_UIPreviewInteractionClickImpl")
UISystemNavigationActionDestinationContext = _Class(
"UISystemNavigationActionDestinationContext"
)
UIKBResizingKeyplaneTransformation = _Class("UIKBResizingKeyplaneTransformation")
UIWebFormDelegate = _Class("UIWebFormDelegate")
_UIWebFormDelegateEditedFormsMap = _Class("_UIWebFormDelegateEditedFormsMap")
UIWebFormSelectPeripheral = _Class("UIWebFormSelectPeripheral")
UIWebOptGroup = _Class("UIWebOptGroup")
UIDOMHTMLOptGroupSelectedItem = _Class("UIDOMHTMLOptGroupSelectedItem")
UIDOMHTMLOptionSelectedItem = _Class("UIDOMHTMLOptionSelectedItem")
UIWebFormDateTimePeripheral = _Class("UIWebFormDateTimePeripheral")
UIWebRotatingNodePopover = _Class("UIWebRotatingNodePopover")
UIWebFormRotatingAccessoryPopover = _Class("UIWebFormRotatingAccessoryPopover")
UIWebSelectPopover = _Class("UIWebSelectPopover")
UIWebDefaultDateTimePopover = _Class("UIWebDefaultDateTimePopover")
UIWebDefaultDateTimePicker = _Class("UIWebDefaultDateTimePicker")
_UIWebFileUploadItem = _Class("_UIWebFileUploadItem")
_UIWebImageUploadItem = _Class("_UIWebImageUploadItem")
_UIWebVideoUploadItem = _Class("_UIWebVideoUploadItem")
_UIFocusScrollManager = _Class("_UIFocusScrollManager")
_UIFocusDisplayLinkScrollAnimator = _Class("_UIFocusDisplayLinkScrollAnimator")
_UIFocusEngineScrollableContainerOffsets = _Class(
"_UIFocusEngineScrollableContainerOffsets"
)
_UIFocusFastScrollingRequest = _Class("_UIFocusFastScrollingRequest")
_CarTitleAlternative = _Class("_CarTitleAlternative")
_UIFocusFastScrollingRecognizer = _Class("_UIFocusFastScrollingRecognizer")
_UIFocusFastScrollingSwipeSequence = _Class("_UIFocusFastScrollingSwipeSequence")
_UIFocusFastScrollingTouchSequence = _Class("_UIFocusFastScrollingTouchSequence")
_UIFocusFastScrollingIndexBarEntryTrimmer = _Class(
"_UIFocusFastScrollingIndexBarEntryTrimmer"
)
_UIContextMenuPresentationAnimation = _Class("_UIContextMenuPresentationAnimation")
_UICompactContextMenuPresentationAnimation = _Class(
"_UICompactContextMenuPresentationAnimation"
)
_UIFocusFastScrollingIndexBarEntry = _Class("_UIFocusFastScrollingIndexBarEntry")
_UIFocusFastScrollingDataAggregator = _Class("_UIFocusFastScrollingDataAggregator")
_UIFocusFastScrollingEntryTrimmerDelegate = _Class(
"_UIFocusFastScrollingEntryTrimmerDelegate"
)
_UIFocusFastScrollingController = _Class("_UIFocusFastScrollingController")
_UITextItemActionSheet = _Class("_UITextItemActionSheet")
_UIScreenFocusSystemManager = _Class("_UIScreenFocusSystemManager")
_UIFocusMovementRequest = _Class("_UIFocusMovementRequest")
_UIDefaultFocusSoundPlayer = _Class("_UIDefaultFocusSoundPlayer")
_UIFocusSoundPool = _Class("_UIFocusSoundPool")
_UIFocusSoundGenerator = _Class("_UIFocusSoundGenerator")
_UIFocusMovementPerformer = _Class("_UIFocusMovementPerformer")
_UIDefaultFocusHapticFeedbackGenerator = _Class(
"_UIDefaultFocusHapticFeedbackGenerator"
)
UICollectionViewDiffableDataSourceSectionSnapshotHandlers = _Class(
"UICollectionViewDiffableDataSourceSectionSnapshotHandlers"
)
_UIFocusItemFrameReporter = _Class("_UIFocusItemFrameReporter")
_UIDiffableDataSourceSectionControllerHandlers = _Class(
"_UIDiffableDataSourceSectionControllerHandlers"
)
_UIDiffableDataSourceSectionControllerHandlersInternal = _Class(
"_UIDiffableDataSourceSectionControllerHandlersInternal"
)
_UIDiffableDataSourceOutlineSectionControllerHandlersInternal = _Class(
"_UIDiffableDataSourceOutlineSectionControllerHandlersInternal"
)
_UIDiffableDataSourceOutlineSectionControllerHandlers = _Class(
"_UIDiffableDataSourceOutlineSectionControllerHandlers"
)
_UIDiffableDataSourceSectionController = _Class(
"_UIDiffableDataSourceSectionController"
)
_UIDiffableDataSourceSectionControllerInternal = _Class(
"_UIDiffableDataSourceSectionControllerInternal"
)
_UIDiffableDataSourceOutlineSectionControllerInternal = _Class(
"_UIDiffableDataSourceOutlineSectionControllerInternal"
)
_UIDiffableDataSourceOutlineSectionController = _Class(
"_UIDiffableDataSourceOutlineSectionController"
)
_UIFocusMapSnapshotter = _Class("_UIFocusMapSnapshotter")
_UIFocusMapSnapshot = _Class("_UIFocusMapSnapshot")
NSDiffableDataSourceSectionSnapshot = _Class("NSDiffableDataSourceSectionSnapshot")
_NSDiffableDataSourceSectionSnapshot = _Class("_NSDiffableDataSourceSectionSnapshot")
_NSDiffableDataSourceSectionSnapshotInternal = _Class(
"_NSDiffableDataSourceSectionSnapshotInternal"
)
_UIFocusMapRect = _Class("_UIFocusMapRect")
_UIFocusMapSearchInfo = _Class("_UIFocusMapSearchInfo")
_UIFocusMap = _Class("_UIFocusMap")
_UIFocusRegionMapEntry = _Class("_UIFocusRegionMapEntry")
_UIFocusContainerGuideMapEntry = _Class("_UIFocusContainerGuideMapEntry")
_UIFocusableRegionMapEntry = _Class("_UIFocusableRegionMapEntry")
_UIFocusRegionMapSnapshot = _Class("_UIFocusRegionMapSnapshot")
_UIFocusRegionMapSnapshotRequest = _Class("_UIFocusRegionMapSnapshotRequest")
_UIFocusRegionMap = _Class("_UIFocusRegionMap")
_UIFocusRegionContainerProxy = _Class("_UIFocusRegionContainerProxy")
_UIFocusRegionContentAttributes = _Class("_UIFocusRegionContentAttributes")
_UIFocusRegion = _Class("_UIFocusRegion")
_UIFocusSpeedBumpRegion = _Class("_UIFocusSpeedBumpRegion")
_UIFocusPromiseRegion = _Class("_UIFocusPromiseRegion")
_UIFocusItemRegion = _Class("_UIFocusItemRegion")
_UIFocusGuideRegion = _Class("_UIFocusGuideRegion")
_UIFocusContainerGuideRegion = _Class("_UIFocusContainerGuideRegion")
_UIFocusEffectsController = _Class("_UIFocusEffectsController")
_UIFocusEngineDelayedPressAction = _Class("_UIFocusEngineDelayedPressAction")
_UIFocusEventRecognizer = _Class("_UIFocusEventRecognizer")
_UIDatePickerLinkedLabelCacheKey = _Class("_UIDatePickerLinkedLabelCacheKey")
_UIDatePickerLinkedLabelStorage = _Class("_UIDatePickerLinkedLabelStorage")
_UIFocusUpdateReport = _Class("_UIFocusUpdateReport")
_UIContextMenuInteraction = _Class("_UIContextMenuInteraction")
_UIFocusMapSnapshotDebugInfo = _Class("_UIFocusMapSnapshotDebugInfo")
_UIDebugReportComponents = _Class("_UIDebugReportComponents")
_UIDebugLogReport = _Class("_UIDebugLogReport")
_UIDebugLogStatement = _Class("_UIDebugLogStatement")
_UIDebugReportFormatter = _Class("_UIDebugReportFormatter")
_UIFocusUpdateReportFormatter = _Class("_UIFocusUpdateReportFormatter")
_UIDebugLogReportFormatter = _Class("_UIDebugLogReportFormatter")
_UIDebugIssueReportFormatter = _Class("_UIDebugIssueReportFormatter")
_UIDebugIssueReport = _Class("_UIDebugIssueReport")
_UIDebugIssue = _Class("_UIDebugIssue")
_UIFocusDebuggerStringOutput = _Class("_UIFocusDebuggerStringOutput")
_UINSLayoutManagerBaselineCalculator = _Class("_UINSLayoutManagerBaselineCalculator")
_UIFocusMovementInfo = _Class("_UIFocusMovementInfo")
_UIFocusLinearMovementSequence = _Class("_UIFocusLinearMovementSequence")
_UIFocusItemInfo = _Class("_UIFocusItemInfo")
_UIFocusInputDeviceInfo = _Class("_UIFocusInputDeviceInfo")
_UIDeepestPreferredEnvironmentSearch = _Class("_UIDeepestPreferredEnvironmentSearch")
_UIFocusEnvironmentPreferenceEnumerator = _Class(
"_UIFocusEnvironmentPreferenceEnumerator"
)
_UIFocusEnvironmentPreferenceEnumerationContext = _Class(
"_UIFocusEnvironmentPreferenceEnumerationContext"
)
_UITargetContentIdentifierPredicateValidator = _Class(
"_UITargetContentIdentifierPredicateValidator"
)
_UIDatePickerCalendarTimeSoundDriver = _Class("_UIDatePickerCalendarTimeSoundDriver")
_UIFocusEngineFakePanGestureRecognizer = _Class(
"_UIFocusEngineFakePanGestureRecognizer"
)
_UIFocusTest = _Class("_UIFocusTest")
_UIFocusSwipeTest = _Class("_UIFocusSwipeTest")
_UIFocusMoveTest = _Class("_UIFocusMoveTest")
_UIFocusFastScrollingTest = _Class("_UIFocusFastScrollingTest")
_UIFocusAnimationCoordinatorManager = _Class("_UIFocusAnimationCoordinatorManager")
_UIFocusAnimationConfiguration = _Class("_UIFocusAnimationConfiguration")
_UIFocusAnimationContext = _Class("_UIFocusAnimationContext")
_UIFeedbackVisualizer = _Class("_UIFeedbackVisualizer")
_UIFeedbackCoreHapticsPlayer = _Class("_UIFeedbackCoreHapticsPlayer")
_UIFeedbackData = _Class("_UIFeedbackData")
_UIStatusBarItem = _Class("_UIStatusBarItem")
_UIStatusBarSensorActivityItem = _Class("_UIStatusBarSensorActivityItem")
_UIStatusBarVPNDisconnectItem = _Class("_UIStatusBarVPNDisconnectItem")
_UIStatusBarFallbackItem = _Class("_UIStatusBarFallbackItem")
_UIStatusBarSpacerItem = _Class("_UIStatusBarSpacerItem")
_UIStatusBarWifiItem = _Class("_UIStatusBarWifiItem")
_UIStatusBarTimeItem = _Class("_UIStatusBarTimeItem")
_UIStatusBarNameItem = _Class("_UIStatusBarNameItem")
_UIStatusBarDeviceNameItem = _Class("_UIStatusBarDeviceNameItem")
_UIStatusBarPersonNameItem = _Class("_UIStatusBarPersonNameItem")
_UIStatusBarNavigationItem = _Class("_UIStatusBarNavigationItem")
_UIStatusBarLockItem = _Class("_UIStatusBarLockItem")
_UIStatusBarCellularItem = _Class("_UIStatusBarCellularItem")
_UIStatusBarCellularExpandedItem = _Class("_UIStatusBarCellularExpandedItem")
_UIStatusBarSecondaryCellularExpandedItem = _Class(
"_UIStatusBarSecondaryCellularExpandedItem"
)
_UIStatusBarCellularCondensedItem = _Class("_UIStatusBarCellularCondensedItem")
_UIStatusBarSecondaryCellularCondensedItem = _Class(
"_UIStatusBarSecondaryCellularCondensedItem"
)
_UIStatusBarBuildVersionItem = _Class("_UIStatusBarBuildVersionItem")
_UIStatusBarBatteryItem = _Class("_UIStatusBarBatteryItem")
_UIStatusBarActivityItem = _Class("_UIStatusBarActivityItem")
_UIStatusBarActivityItem_SyncOnly = _Class("_UIStatusBarActivityItem_SyncOnly")
_UIStatusBarActivityItem_Split = _Class("_UIStatusBarActivityItem_Split")
_UIStatusBarIndicatorItem = _Class("_UIStatusBarIndicatorItem")
_UIStatusBarIndicatorLocationItem = _Class("_UIStatusBarIndicatorLocationItem")
_UIStatusBarElectronicTollCollectionItem = _Class(
"_UIStatusBarElectronicTollCollectionItem"
)
_UIStatusBarRadarItem = _Class("_UIStatusBarRadarItem")
_UIStatusBarThermalItem = _Class("_UIStatusBarThermalItem")
_UIStatusBarIndicatorAlarmItem = _Class("_UIStatusBarIndicatorAlarmItem")
_UIStatusBarIndicatorCarPlayItem = _Class("_UIStatusBarIndicatorCarPlayItem")
_UIStatusBarIndicatorAirPlayItem = _Class("_UIStatusBarIndicatorAirPlayItem")
_UIStatusBarIndicatorVPNItem = _Class("_UIStatusBarIndicatorVPNItem")
_UIStatusBarIndicatorStudentItem = _Class("_UIStatusBarIndicatorStudentItem")
_UIStatusBarIndicatorAssistantItem = _Class("_UIStatusBarIndicatorAssistantItem")
_UIStatusBarIndicatorTTYItem = _Class("_UIStatusBarIndicatorTTYItem")
_UIStatusBarIndicatorAirplaneModeItem = _Class("_UIStatusBarIndicatorAirplaneModeItem")
_UIStatusBarIndicatorRotationLockItem = _Class("_UIStatusBarIndicatorRotationLockItem")
_UIStatusBarIndicatorLiquidDetectionItem = _Class(
"_UIStatusBarIndicatorLiquidDetectionItem"
)
_UIStatusBarIndicatorQuietModeItem = _Class("_UIStatusBarIndicatorQuietModeItem")
_UIStatusBarBluetoothItem = _Class("_UIStatusBarBluetoothItem")
_UIStatusBarBackgroundActivityItem = _Class("_UIStatusBarBackgroundActivityItem")
_UIStatusBarFullBackgroundActivityItem = _Class(
"_UIStatusBarFullBackgroundActivityItem"
)
_UIStatusBarPillBackgroundActivityItem = _Class(
"_UIStatusBarPillBackgroundActivityItem"
)
_UIStatusBarVoiceControlItem = _Class("_UIStatusBarVoiceControlItem")
_UIStatusBarVoiceControlPillItem = _Class("_UIStatusBarVoiceControlPillItem")
_UITapticEngine = _Class("_UITapticEngine")
_UIFeedbackStateChangeConfiguration = _Class("_UIFeedbackStateChangeConfiguration")
UIPointerRegionRequest = _Class("UIPointerRegionRequest")
_UICursorRequest = _Class("_UICursorRequest")
UIRegion = _Class("UIRegion")
UIDynamicsDebug = _Class("UIDynamicsDebug")
UIDynamicItemGroup = _Class("UIDynamicItemGroup")
_UISearchControllerAnimator = _Class("_UISearchControllerAnimator")
_UISearchControllerTransplantSearchBarAnimator = _Class(
"_UISearchControllerTransplantSearchBarAnimator"
)
_UISearchControllerOffscreenSearchBarAnimator = _Class(
"_UISearchControllerOffscreenSearchBarAnimator"
)
_UISearchControllerInPlaceSearchBarAnimator = _Class(
"_UISearchControllerInPlaceSearchBarAnimator"
)
_UISearchControllerCarPlaySearchBarAnimator = _Class(
"_UISearchControllerCarPlaySearchBarAnimator"
)
_UISearchControllerATVSearchBarAnimator = _Class(
"_UISearchControllerATVSearchBarAnimator"
)
_UISearchControllerATVSearchBarAnimatorLegacy = _Class(
"_UISearchControllerATVSearchBarAnimatorLegacy"
)
UIDynamicAnimatorTicker = _Class("UIDynamicAnimatorTicker")
_UIDragSetDownAnimation = _Class("_UIDragSetDownAnimation")
_UIDataTransferMonitor = _Class("_UIDataTransferMonitor")
_UIDataTransferRequest = _Class("_UIDataTransferRequest")
_UIDruidDestinationConnection = _Class("_UIDruidDestinationConnection")
_UIDruidSourceConnection = _Class("_UIDruidSourceConnection")
_UIDraggingImageSlotOwner = _Class("_UIDraggingImageSlotOwner")
_UIInternalDraggingSessionDestination = _Class("_UIInternalDraggingSessionDestination")
_UIInternalDraggingSessionSource = _Class("_UIInternalDraggingSessionSource")
_UIDraggingImageComponent = _Class("_UIDraggingImageComponent")
_UIImageLoader = _Class("_UIImageLoader")
_UINSItemProviderImageLoader = _Class("_UINSItemProviderImageLoader")
_UINSURLRequestImageLoader = _Class("_UINSURLRequestImageLoader")
_UILoadingHandlerImageLoader = _Class("_UILoadingHandlerImageLoader")
_DUIAccessibilityDragStatus = _Class("_DUIAccessibilityDragStatus")
_DUIPotentialDrop = _Class("_DUIPotentialDrop")
_UIDropSessionImpl = _Class("_UIDropSessionImpl")
UISpringLoadedInteractionContextImpl = _Class("UISpringLoadedInteractionContextImpl")
_UIDropInteractionHighlightEffect = _Class("_UIDropInteractionHighlightEffect")
UIDropInteractionContextImpl = _Class("UIDropInteractionContextImpl")
_UIDragLiftEffectOperation = _Class("_UIDragLiftEffectOperation")
_UIDragLiftedItem = _Class("_UIDragLiftedItem")
UICollectionLayoutListConfiguration = _Class("UICollectionLayoutListConfiguration")
_UIDragAnimatingWrapper = _Class("_UIDragAnimatingWrapper")
_UIActiveTimer = _Class("_UIActiveTimer")
UIDocumentErrorRecoveryAttempter = _Class("UIDocumentErrorRecoveryAttempter")
UIDocumentAlertPresenter = _Class("UIDocumentAlertPresenter")
_UIArchiveExtractionController = _Class("_UIArchiveExtractionController")
_UIArchiveListingController = _Class("_UIArchiveListingController")
_UILibArchiveStreamingReader = _Class("_UILibArchiveStreamingReader")
_UILibArchiveStreamingExtractor = _Class("_UILibArchiveStreamingExtractor")
_UIArchiveItem = _Class("_UIArchiveItem")
_UILibArchiveItem = _Class("_UILibArchiveItem")
_UILibArchiveReaderLoadedItem = _Class("_UILibArchiveReaderLoadedItem")
_UILibArchiveAppleDoublePathSet = _Class("_UILibArchiveAppleDoublePathSet")
_UIDocumentPickerAuxiliaryOption = _Class("_UIDocumentPickerAuxiliaryOption")
_UISceneKeyboardProxyLayerForwardingStateMachine = _Class(
"_UISceneKeyboardProxyLayerForwardingStateMachine"
)
UIKBFloatingKeyplaneTransformation = _Class("UIKBFloatingKeyplaneTransformation")
_UIModernSwitchVisualElementCacheKey = _Class("_UIModernSwitchVisualElementCacheKey")
_UISwitchSettings = _Class("_UISwitchSettings")
UISwitchMVEGestureTrackingSession = _Class("UISwitchMVEGestureTrackingSession")
UISegmentedControlSpringLoadedEffect = _Class("UISegmentedControlSpringLoadedEffect")
UISegmentedControlSpringLoadedBehavior = _Class(
"UISegmentedControlSpringLoadedBehavior"
)
_UISegmentedControlSegmentHoverIdentifier = _Class(
"_UISegmentedControlSegmentHoverIdentifier"
)
_UISegmentedControlAppearanceStorage = _Class("_UISegmentedControlAppearanceStorage")
_UIImageSystemImageCacheKey = _Class("_UIImageSystemImageCacheKey")
UIInputViewAnimationControllerViewControllerContext = _Class(
"UIInputViewAnimationControllerViewControllerContext"
)
UIInputViewAnimationControllerViewController = _Class(
"UIInputViewAnimationControllerViewController"
)
_UIApplicationModalProgressController = _Class("_UIApplicationModalProgressController")
_UIGestureStudyClickInteraction = _Class("_UIGestureStudyClickInteraction")
_UIAnimationCoordinator = _Class("_UIAnimationCoordinator")
_UIActionBridge = _Class("_UIActionBridge")
UIViewControllerPreviewAction = _Class("UIViewControllerPreviewAction")
UISplitViewControllerClassicImpl = _Class("UISplitViewControllerClassicImpl")
_UIPageControlInteractor = _Class("_UIPageControlInteractor")
_UISearchControllerDidScrollDelegate = _Class("_UISearchControllerDidScrollDelegate")
UISearchDisplayController = _Class("UISearchDisplayController")
_UIDictionaryManager = _Class("_UIDictionaryManager")
_UIDefinitionDictionary = _Class("_UIDefinitionDictionary")
_UIDefinitionValue = _Class("_UIDefinitionValue")
UIPreviewMenuItem = _Class("UIPreviewMenuItem")
_UIPageCurl = _Class("_UIPageCurl")
_UITransitionState = _Class("_UITransitionState")
_UIQueuingScrollViewState = _Class("_UIQueuingScrollViewState")
_UIPageCurlState = _Class("_UIPageCurlState")
_UISimpleTransitioningDelegate = _Class("_UISimpleTransitioningDelegate")
_UICollectionViewControllerLayoutToLayoutTransition = _Class(
"_UICollectionViewControllerLayoutToLayoutTransition"
)
UIClientRotationContext = _Class("UIClientRotationContext")
_UINavigationCrossfadeAnimator = _Class("_UINavigationCrossfadeAnimator")
_UITabBarTVTransitioner = _Class("_UITabBarTVTransitioner")
_UIDiffableDataSourceSectionTransaction = _Class(
"_UIDiffableDataSourceSectionTransaction"
)
_UIDiffableDataSourceTransaction = _Class("_UIDiffableDataSourceTransaction")
_UIPopoverAnimationController = _Class("_UIPopoverAnimationController")
_UIWindowSceneAccessibilityContrastSettingsDiffAction = _Class(
"_UIWindowSceneAccessibilityContrastSettingsDiffAction"
)
_UIProgressiveBlurPresentationAnimator = _Class(
"_UIProgressiveBlurPresentationAnimator"
)
_UIProgressiveBlurPresentationAnimationFactory = _Class(
"_UIProgressiveBlurPresentationAnimationFactory"
)
_UIPreviewPlatterPanController = _Class("_UIPreviewPlatterPanController")
_UIActionSheetPresentationControllerVisualStyleiOS = _Class(
"_UIActionSheetPresentationControllerVisualStyleiOS"
)
_UIPointerAssistantRegionID = _Class("_UIPointerAssistantRegionID")
_UIDatePickerCalendarTimeLabelStateMachineContext = _Class(
"_UIDatePickerCalendarTimeLabelStateMachineContext"
)
UIPrinterAttributesService = _Class("UIPrinterAttributesService")
_UIDragMovementCadenceSettings = _Class("_UIDragMovementCadenceSettings")
_MapUpdate = _Class("_MapUpdate")
_UIDataSourceUpdateMap = _Class("_UIDataSourceUpdateMap")
_UIDataSourceSnapshot = _Class("_UIDataSourceSnapshot")
_UIDataSourceBatchUpdateMapHelper = _Class("_UIDataSourceBatchUpdateMapHelper")
_UICollectionViewSpringLoadedEffect = _Class("_UICollectionViewSpringLoadedEffect")
_UICollectionViewSpringLoadedBehavior = _Class("_UICollectionViewSpringLoadedBehavior")
_UICollectionViewSpringLoadedInteraction = _Class(
"_UICollectionViewSpringLoadedInteraction"
)
_UICollectionViewPrefetchItem = _Class("_UICollectionViewPrefetchItem")
_UICollectionViewPrefetchingContext = _Class("_UICollectionViewPrefetchingContext")
_UICollectionViewDragSourceControllerDragState = _Class(
"_UICollectionViewDragSourceControllerDragState"
)
_UICollectionViewSourcePrivateLocalObject = _Class(
"_UICollectionViewSourcePrivateLocalObject"
)
_UICollectionViewDragSourceControllerSessionState = _Class(
"_UICollectionViewDragSourceControllerSessionState"
)
_UICollectionViewDragSourceController = _Class("_UICollectionViewDragSourceController")
_UIDragDestinationControllerReorderingState = _Class(
"_UIDragDestinationControllerReorderingState"
)
_UIDragDestinationControllerDropProposalState = _Class(
"_UIDragDestinationControllerDropProposalState"
)
_UIDragDestinationControllerSessionState = _Class(
"_UIDragDestinationControllerSessionState"
)
_UICollectionViewDragDestinationController = _Class(
"_UICollectionViewDragDestinationController"
)
UICollectionViewPlaceholder = _Class("UICollectionViewPlaceholder")
UICollectionViewDropPlaceholder = _Class("UICollectionViewDropPlaceholder")
_UICollectionViewDropCoordinatorItem = _Class("_UICollectionViewDropCoordinatorItem")
_UICollectionViewCellAppearanceState = _Class("_UICollectionViewCellAppearanceState")
_UICollectionViewDropItem = _Class("_UICollectionViewDropItem")
_UICollectionViewPlaceholderContext = _Class("_UICollectionViewPlaceholderContext")
_UIDropAnimationHandlers = _Class("_UIDropAnimationHandlers")
UICollectionViewReorderedItem = _Class("UICollectionViewReorderedItem")
UICollectionViewAnimation = _Class("UICollectionViewAnimation")
_UICollectionViewTrackedValue = _Class("_UICollectionViewTrackedValue")
_UICollectionViewTrackedValueItem = _Class("_UICollectionViewTrackedValueItem")
_UICollectionViewItemKey = _Class("_UICollectionViewItemKey")
UICollectionViewUpdate = _Class("UICollectionViewUpdate")
UICollectionViewUpdateItem = _Class("UICollectionViewUpdateItem")
_UICollectionViewCellPromiseRegion = _Class("_UICollectionViewCellPromiseRegion")
UIAutoRespondingScrollViewControllerKeyboardSupport = _Class(
"UIAutoRespondingScrollViewControllerKeyboardSupport"
)
UICellHighlightingSupport = _Class("UICellHighlightingSupport")
UITableViewCellUnhighlightedState = _Class("UITableViewCellUnhighlightedState")
UIContextualAction = _Class("UIContextualAction")
UISwipeAction = _Class("UISwipeAction")
UICollectionViewTableLayoutSwipeAction = _Class(
"UICollectionViewTableLayoutSwipeAction"
)
_UIContextMenuCommitAnimation = _Class("_UIContextMenuCommitAnimation")
_UIContextMenuActionsListSection = _Class("_UIContextMenuActionsListSection")
_UIDataSourceSnapshotter = _Class("_UIDataSourceSnapshotter")
_UICollectionViewListSnapshotter = _Class("_UICollectionViewListSnapshotter")
_UICollectionViewListSeparatorDiff = _Class("_UICollectionViewListSeparatorDiff")
_UICollectionViewListLayoutVisualProvider = _Class(
"_UICollectionViewListLayoutVisualProvider"
)
_UICollectionViewListLayoutVisualProvider_tvOS = _Class(
"_UICollectionViewListLayoutVisualProvider_tvOS"
)
_UICollectionViewListLayoutVisualProvider_iOS = _Class(
"_UICollectionViewListLayoutVisualProvider_iOS"
)
_UICollectionViewListCellVisualProvider = _Class(
"_UICollectionViewListCellVisualProvider"
)
_UICollectionViewListCellVisualProvider_tvOS = _Class(
"_UICollectionViewListCellVisualProvider_tvOS"
)
_UICollectionViewListCellVisualProvider_iOS = _Class(
"_UICollectionViewListCellVisualProvider_iOS"
)
_UIIdentifierDifferMovePair = _Class("_UIIdentifierDifferMovePair")
_UIIdentifierDiffer = _Class("_UIIdentifierDiffer")
_UIDiffableDataSourceViewUpdater = _Class("_UIDiffableDataSourceViewUpdater")
_UIDiffableDataSourceDiffer = _Class("_UIDiffableDataSourceDiffer")
__UIDiffableDataSource = _Class("__UIDiffableDataSource")
__UIDiffableDataSourceSnapshot = _Class("__UIDiffableDataSourceSnapshot")
UITableViewDiffableDataSource = _Class("UITableViewDiffableDataSource")
UICollectionViewDiffableDataSource = _Class("UICollectionViewDiffableDataSource")
NSDiffableDataSourceSnapshot = _Class("NSDiffableDataSourceSnapshot")
_UIRTree = _Class("_UIRTree")
_UIOrderedRangeIndexer = _Class("_UIOrderedRangeIndexer")
_UICollectionLayoutAuxillaryItemSolver = _Class(
"_UICollectionLayoutAuxillaryItemSolver"
)
_UICollectionLayoutSupplementaryEnrollment = _Class(
"_UICollectionLayoutSupplementaryEnrollment"
)
_UICollectionLayoutSupplementaryRegistrar = _Class(
"_UICollectionLayoutSupplementaryRegistrar"
)
_UICollectionLayoutSolveParameters = _Class("_UICollectionLayoutSolveParameters")
_UICollectionLayoutSolveResult = _Class("_UICollectionLayoutSolveResult")
_UICollectionLayoutSectionFixedSolver = _Class("_UICollectionLayoutSectionFixedSolver")
_UICollectionLayoutSolutionState = _Class("_UICollectionLayoutSolutionState")
_UICollectionEstimatedSolutionBookmark = _Class(
"_UICollectionEstimatedSolutionBookmark"
)
_UICollectionLayoutSectionEstimatedSolver = _Class(
"_UICollectionLayoutSectionEstimatedSolver"
)
_UICollectionLayoutItemSolverState = _Class("_UICollectionLayoutItemSolverState")
_UICollectionAvailableDimensionalLayoutSpace = _Class(
"_UICollectionAvailableDimensionalLayoutSpace"
)
_UICollectionSolutionGroupArrangementItem = _Class(
"_UICollectionSolutionGroupArrangementItem"
)
_UICollectionEdgeSpacingSolution = _Class("_UICollectionEdgeSpacingSolution")
_UICollectionLayoutItemSolver = _Class("_UICollectionLayoutItemSolver")
_UIContentInsetsEnvironment = _Class("_UIContentInsetsEnvironment")
_UICollectionLayoutFramesQueryResultElementIndexKey = _Class(
"_UICollectionLayoutFramesQueryResultElementIndexKey"
)
_UICollectionLayoutAuxillaryKey = _Class("_UICollectionLayoutAuxillaryKey")
_UICollectionLayoutSectionGeometryTranslator = _Class(
"_UICollectionLayoutSectionGeometryTranslator"
)
_UICollectionLayoutAuxillaryOffsets = _Class("_UICollectionLayoutAuxillaryOffsets")
_UICollectionLayoutFramesQueryResult = _Class("_UICollectionLayoutFramesQueryResult")
_UICollectionLayoutDynamicsConfiguration = _Class(
"_UICollectionLayoutDynamicsConfiguration"
)
NSCollectionLayoutVisibleItem = _Class("NSCollectionLayoutVisibleItem")
_UICollectionLayoutVisualFormatTreeParser = _Class(
"_UICollectionLayoutVisualFormatTreeParser"
)
_UICollectionLayoutVisualFormatItem = _Class("_UICollectionLayoutVisualFormatItem")
_UICollectionLayoutVisualTreeNode = _Class("_UICollectionLayoutVisualTreeNode")
_UICollectionLayoutVisualFormatParser = _Class("_UICollectionLayoutVisualFormatParser")
_UICollectionLayoutVFLParserItem = _Class("_UICollectionLayoutVFLParserItem")
_UICollectionLayoutFramesQueryOffsets = _Class("_UICollectionLayoutFramesQueryOffsets")
NSCollectionLayoutEnvironment = _Class("NSCollectionLayoutEnvironment")
_UICollectionLayoutContainer = _Class("_UICollectionLayoutContainer")
_UICollectionViewLayoutOrthogonalScrollingSectionState = _Class(
"_UICollectionViewLayoutOrthogonalScrollingSectionState"
)
_UICollectionCompositionalLayoutSolverRestorableState = _Class(
"_UICollectionCompositionalLayoutSolverRestorableState"
)
_UICollectionCompositionalLayoutSolverBookmarkStateSnapshotter = _Class(
"_UICollectionCompositionalLayoutSolverBookmarkStateSnapshotter"
)
_UICollectionCompositionalLayoutSolverOptions = _Class(
"_UICollectionCompositionalLayoutSolverOptions"
)
_UICollectionCompositionalSolverPreferredSizesRebaseInfo = _Class(
"_UICollectionCompositionalSolverPreferredSizesRebaseInfo"
)
_UICollectionCompositionalLayoutSolverResolveResult = _Class(
"_UICollectionCompositionalLayoutSolverResolveResult"
)
_UICollectionCompositionalLayoutSolverUpdate = _Class(
"_UICollectionCompositionalLayoutSolverUpdate"
)
_UICollectionSectionSolutionBookmark = _Class("_UICollectionSectionSolutionBookmark")
_UICollectionLayoutUpdateContainerOffsetResult = _Class(
"_UICollectionLayoutUpdateContainerOffsetResult"
)
UIDynamicBehavior = _Class("UIDynamicBehavior")
_UISpringBehavior = _Class("_UISpringBehavior")
_UIPlatterMenuSnapBehavior = _Class("_UIPlatterMenuSnapBehavior")
UISnapBehavior = _Class("UISnapBehavior")
UIPushBehavior = _Class("UIPushBehavior")
UIGravityBehavior = _Class("UIGravityBehavior")
UIFieldBehavior = _Class("UIFieldBehavior")
UIDynamicItemBehavior = _Class("UIDynamicItemBehavior")
_UIDynamicItemObservingBehavior = _Class("_UIDynamicItemObservingBehavior")
UICollisionBehavior = _Class("UICollisionBehavior")
UIAttachmentBehavior = _Class("UIAttachmentBehavior")
_UICollectionCompositionalLayoutDynamicBehavior = _Class(
"_UICollectionCompositionalLayoutDynamicBehavior"
)
UIDynamicAnimator = _Class("UIDynamicAnimator")
_UICollectionCompositionalLayoutDynamicAnimator = _Class(
"_UICollectionCompositionalLayoutDynamicAnimator"
)
_UICollectionCompositionalLayoutSolver = _Class(
"_UICollectionCompositionalLayoutSolver"
)
_UIASCIIArtFramesRenderer = _Class("_UIASCIIArtFramesRenderer")
UICollectionViewCompositionalLayoutConfiguration = _Class(
"UICollectionViewCompositionalLayoutConfiguration"
)
_UICollectionPreferredSizes = _Class("_UICollectionPreferredSizes")
_UICollectionPreferredSize = _Class("_UICollectionPreferredSize")
NSCollectionLayoutAnchor = _Class("NSCollectionLayoutAnchor")
NSCollectionLayoutSize = _Class("NSCollectionLayoutSize")
NSCollectionLayoutDimension = _Class("NSCollectionLayoutDimension")
NSCollectionLayoutEdgeSpacing = _Class("NSCollectionLayoutEdgeSpacing")
NSCollectionLayoutSpacing = _Class("NSCollectionLayoutSpacing")
NSCollectionLayoutSection = _Class("NSCollectionLayoutSection")
_UICollectionViewListLayoutSection = _Class("_UICollectionViewListLayoutSection")
NSCollectionLayoutGroupCustomItem = _Class("NSCollectionLayoutGroupCustomItem")
NSCollectionLayoutItem = _Class("NSCollectionLayoutItem")
NSCollectionLayoutDecorationItem = _Class("NSCollectionLayoutDecorationItem")
NSCollectionLayoutSupplementaryItem = _Class("NSCollectionLayoutSupplementaryItem")
NSCollectionLayoutBoundarySupplementaryItem = _Class(
"NSCollectionLayoutBoundarySupplementaryItem"
)
NSCollectionLayoutGroup = _Class("NSCollectionLayoutGroup")
_UIDatePickerCalendarMonthSet = _Class("_UIDatePickerCalendarMonthSet")
_UICollectionViewOutlineCellDisclosureConfiguration = _Class(
"_UICollectionViewOutlineCellDisclosureConfiguration"
)
_UIClickPresentation = _Class("_UIClickPresentation")
_UIContextMenuPresentation = _Class("_UIContextMenuPresentation")
_UIWindowSceneLifecycleSettingsDiffAction = _Class(
"_UIWindowSceneLifecycleSettingsDiffAction"
)
_UICanvasSceneLaunchOptions = _Class("_UICanvasSceneLaunchOptions")
_UIPackedRegion = _Class("_UIPackedRegion")
_UIAlignmentRegion = _Class("_UIAlignmentRegion")
_UISimplex = _Class("_UISimplex")
_UIHyperrepeatedRegion = _Class("_UIHyperrepeatedRegion")
_UIHypersphere = _Class("_UIHypersphere")
_UIHyperplane = _Class("_UIHyperplane")
_UICellAccessoryConfiguration = _Class("_UICellAccessoryConfiguration")
_UICellAccessoryConfigurationCustomView = _Class(
"_UICellAccessoryConfigurationCustomView"
)
_UICellAccessoryConfigurationBadge = _Class("_UICellAccessoryConfigurationBadge")
_UICellAccessoryConfigurationSeparator = _Class(
"_UICellAccessoryConfigurationSeparator"
)
_UICellAccessoryConfigurationOutlineDisclosure = _Class(
"_UICellAccessoryConfigurationOutlineDisclosure"
)
_UICellAccessoryConfigurationMultiselect = _Class(
"_UICellAccessoryConfigurationMultiselect"
)
_UICellAccessoryConfigurationReorder = _Class("_UICellAccessoryConfigurationReorder")
_UICellAccessoryConfigurationInsert = _Class("_UICellAccessoryConfigurationInsert")
_UICellAccessoryConfigurationDelete = _Class("_UICellAccessoryConfigurationDelete")
_UICellAccessoryConfigurationCheckmark = _Class(
"_UICellAccessoryConfigurationCheckmark"
)
_UICellAccessoryConfigurationDisclosureIndicator = _Class(
"_UICellAccessoryConfigurationDisclosureIndicator"
)
_UIBadgeVisualStyle = _Class("_UIBadgeVisualStyle")
_UIBadgeTVVisualStyle = _Class("_UIBadgeTVVisualStyle")
_UIBadgeCarplayVisualStyle = _Class("_UIBadgeCarplayVisualStyle")
_UIBadgePhonePadVisualStyle = _Class("_UIBadgePhonePadVisualStyle")
_UIBadgePadHorizontalVisualStyle = _Class("_UIBadgePadHorizontalVisualStyle")
_UIBadgePhoneLandscapeVisualStyle = _Class("_UIBadgePhoneLandscapeVisualStyle")
_UISceneKeyboardProxyLayerForwardingManager = _Class(
"_UISceneKeyboardProxyLayerForwardingManager"
)
_UICommandIdentifier = _Class("_UICommandIdentifier")
_UITabBarVisualProvider = _Class("_UITabBarVisualProvider")
_UITabBarVisualProviderLegacyTVOS = _Class("_UITabBarVisualProviderLegacyTVOS")
_UITabBarVisualProviderLegacyIOS = _Class("_UITabBarVisualProviderLegacyIOS")
_UINullClickHighlightEffect = _Class("_UINullClickHighlightEffect")
UITabBarItemProxy = _Class("UITabBarItemProxy")
_UITabBarAppearanceStorage = _Class("_UITabBarAppearanceStorage")
_UISearchBarVisualProviderLegacy = _Class("_UISearchBarVisualProviderLegacy")
_UISearchBarTransitionContext = _Class("_UISearchBarTransitionContext")
_UISearchBarTransitionerBase = _Class("_UISearchBarTransitionerBase")
_UISearchBarTokenOptionsPresentationTransitioner = _Class(
"_UISearchBarTokenOptionsPresentationTransitioner"
)
_UISearchBarTokenOptionsDismissalTransitioner = _Class(
"_UISearchBarTokenOptionsDismissalTransitioner"
)
_UISearchBarSearchPresentationTransitioner = _Class(
"_UISearchBarSearchPresentationTransitioner"
)
_UISearchBarSearchDismissalTransitioner = _Class(
"_UISearchBarSearchDismissalTransitioner"
)
_UISearchBarAppearanceStorage = _Class("_UISearchBarAppearanceStorage")
_UISearchBarBackgroundCacheKey = _Class("_UISearchBarBackgroundCacheKey")
_UINavigationBarTransitionContext = _Class("_UINavigationBarTransitionContext")
_UINavigationBarTransitionContextDismissSearch = _Class(
"_UINavigationBarTransitionContextDismissSearch"
)
_UINavigationBarTransitionContextPresentSearch = _Class(
"_UINavigationBarTransitionContextPresentSearch"
)
_UINavigationBarTransitionContextCrossfade = _Class(
"_UINavigationBarTransitionContextCrossfade"
)
_UINavigationBarTransitionContextPop = _Class("_UINavigationBarTransitionContextPop")
_UINavigationBarTransitionContextPush = _Class("_UINavigationBarTransitionContextPush")
_UINavigationBarLargeTitleCandidate = _Class("_UINavigationBarLargeTitleCandidate")
_UIFocusActiveSceneObserver = _Class("_UIFocusActiveSceneObserver")
_UINavigationBarTransitionAssistant = _Class("_UINavigationBarTransitionAssistant")
_UINavigationBarGestureHandler = _Class("_UINavigationBarGestureHandler")
_UINavigationBarTitleViewOverlayRects = _Class("_UINavigationBarTitleViewOverlayRects")
_UINavigationBarContents = _Class("_UINavigationBarContents")
_UIBarItemAppearanceStorage = _Class("_UIBarItemAppearanceStorage")
_UITabBarItemAppearanceStorage = _Class("_UITabBarItemAppearanceStorage")
_UIBarButtonItemAppearanceStorage = _Class("_UIBarButtonItemAppearanceStorage")
_UIBarBackButtonItemAppearanceStorage = _Class("_UIBarBackButtonItemAppearanceStorage")
_UIStretchableShadow = _Class("_UIStretchableShadow")
_UIVisualEffectDifferenceEngine = _Class("_UIVisualEffectDifferenceEngine")
_UILegacyEffectConverter = _Class("_UILegacyEffectConverter")
_UILegacyEffectConverterTVOS = _Class("_UILegacyEffectConverterTVOS")
_UILegacyEffectConverterIOS = _Class("_UILegacyEffectConverterIOS")
_UIVisualEffectConfig = _Class("_UIVisualEffectConfig")
_UIVisualEffectLayerConfig = _Class("_UIVisualEffectLayerConfig")
_UIVisualEffectVibrantLayerConfig = _Class("_UIVisualEffectVibrantLayerConfig")
_UIVisualEffectTintLayerConfig = _Class("_UIVisualEffectTintLayerConfig")
_UIBasicHeaderFooterContentViewConfiguration = _Class(
"_UIBasicHeaderFooterContentViewConfiguration"
)
UIActivityItemsConfiguration = _Class("UIActivityItemsConfiguration")
_UITextInteractableItem = _Class("_UITextInteractableItem")
_UITextInteractableLink = _Class("_UITextInteractableLink")
_UITextInteractableAttachment = _Class("_UITextInteractableAttachment")
_UIBackdropColorSettings = _Class("_UIBackdropColorSettings")
_UIActionGroup = _Class("_UIActionGroup")
_UIContextMenuPreviewActionGroup = _Class("_UIContextMenuPreviewActionGroup")
_UIAction = _Class("_UIAction")
_UIBackdropViewSettings = _Class("_UIBackdropViewSettings")
_UIBackdropViewSettingsATVTabBarLight = _Class("_UIBackdropViewSettingsATVTabBarLight")
_UIBackdropViewSettingsATVTabBarDark = _Class("_UIBackdropViewSettingsATVTabBarDark")
_UIBackdropViewSettingsCombiner = _Class("_UIBackdropViewSettingsCombiner")
_UIBackdropViewSettingsColorSample = _Class("_UIBackdropViewSettingsColorSample")
_UIBackdropViewSettingsBlur = _Class("_UIBackdropViewSettingsBlur")
_UIBackdropViewSettingsReplicator = _Class("_UIBackdropViewSettingsReplicator")
_UIBackdropViewSettingsNone = _Class("_UIBackdropViewSettingsNone")
_UIBackdropViewSettingsLightKeyboard = _Class("_UIBackdropViewSettingsLightKeyboard")
_UIBackdropViewSettingsLightEmojiKeyboard = _Class(
"_UIBackdropViewSettingsLightEmojiKeyboard"
)
_UIBackdropViewSettingsUltraLight = _Class("_UIBackdropViewSettingsUltraLight")
_UIBackdropViewSettingsUltraColored = _Class("_UIBackdropViewSettingsUltraColored")
_UIBackdropViewSettingsNonAdaptive = _Class("_UIBackdropViewSettingsNonAdaptive")
_UIBackdropViewSettingsUltraDark = _Class("_UIBackdropViewSettingsUltraDark")
_UIBackdropViewSettingsUltraDarkWithZoom = _Class(
"_UIBackdropViewSettingsUltraDarkWithZoom"
)
_UIBackdropViewSettingsLight = _Class("_UIBackdropViewSettingsLight")
_UIBackdropViewSettingsFlatSemiLight = _Class("_UIBackdropViewSettingsFlatSemiLight")
_UIBackdropViewSettingsSemiLight = _Class("_UIBackdropViewSettingsSemiLight")
_UIBackdropViewSettingsAdaptiveLight = _Class("_UIBackdropViewSettingsAdaptiveLight")
_UIBackdropViewSettingsLightLow = _Class("_UIBackdropViewSettingsLightLow")
_UIBackdropViewSettingsDark = _Class("_UIBackdropViewSettingsDark")
_UIBackdropViewSettingsPasscodePaddle = _Class("_UIBackdropViewSettingsPasscodePaddle")
_UIBackdropViewSettingsDarkWithZoom = _Class("_UIBackdropViewSettingsDarkWithZoom")
_UIBackdropViewSettingsDarkLow = _Class("_UIBackdropViewSettingsDarkLow")
_UIBackdropViewSettingsColored = _Class("_UIBackdropViewSettingsColored")
_UIBackdropViewSettingsATVUltraLight = _Class("_UIBackdropViewSettingsATVUltraLight")
_UIBackdropViewSettingsATVUltraDark = _Class("_UIBackdropViewSettingsATVUltraDark")
_UIBackdropViewSettingsATVSemiLight = _Class("_UIBackdropViewSettingsATVSemiLight")
_UIBackdropViewSettingsATVSemiDark = _Class("_UIBackdropViewSettingsATVSemiDark")
_UIBackdropViewSettingsATVMenuLight = _Class("_UIBackdropViewSettingsATVMenuLight")
_UIBackdropViewSettingsATVMenuDark = _Class("_UIBackdropViewSettingsATVMenuDark")
_UIBackdropViewSettingsATVMediumLight = _Class("_UIBackdropViewSettingsATVMediumLight")
_UIBackdropViewSettingsATVMediumDark = _Class("_UIBackdropViewSettingsATVMediumDark")
_UIBackdropViewSettingsATVLight = _Class("_UIBackdropViewSettingsATVLight")
_UIBackdropViewSettingsATVDark = _Class("_UIBackdropViewSettingsATVDark")
_UIBackdropViewSettingsATVAdaptiveLighten = _Class(
"_UIBackdropViewSettingsATVAdaptiveLighten"
)
_UIBackdropViewSettingsATVAdaptive = _Class("_UIBackdropViewSettingsATVAdaptive")
_UIBackdropViewSettingsATVAccessoryLight = _Class(
"_UIBackdropViewSettingsATVAccessoryLight"
)
_UIBackdropViewSettingsATVAccessoryDark = _Class(
"_UIBackdropViewSettingsATVAccessoryDark"
)
UIAvoidanceCoordinator = _Class("UIAvoidanceCoordinator")
UIAvoidanceLargestArea = _Class("UIAvoidanceLargestArea")
_UIViewPropertyAnimatorTrackingGroup = _Class("_UIViewPropertyAnimatorTrackingGroup")
UICubicTimingParameters = _Class("UICubicTimingParameters")
_UIViewCubicTimingFunction = _Class("_UIViewCubicTimingFunction")
_UIViewPropertyAnimationDescription = _Class("_UIViewPropertyAnimationDescription")
_UIViewPropertyAnimationUpdate = _Class("_UIViewPropertyAnimationUpdate")
_UIDynamicAnimationActiveValue = _Class("_UIDynamicAnimationActiveValue")
_UIFocusGroupDescriptorStringIdentifier = _Class(
"_UIFocusGroupDescriptorStringIdentifier"
)
_UIFocusGroupDescriptor = _Class("_UIFocusGroupDescriptor")
_UIDynamicAnimation = _Class("_UIDynamicAnimation")
_UIDynamicValueConvergenceAnimation = _Class("_UIDynamicValueConvergenceAnimation")
_UIDynamicAnimationGroup = _Class("_UIDynamicAnimationGroup")
_UIDynamicValueAnimation = _Class("_UIDynamicValueAnimation")
_UIDynamicAnimationState = _Class("_UIDynamicAnimationState")
_UIRapidClickPresentationAssistant = _Class("_UIRapidClickPresentationAssistant")
_UIAlertControllerVisualStyleAlertTVCustomCurveFactory = _Class(
"_UIAlertControllerVisualStyleAlertTVCustomCurveFactory"
)
UIInputViewPostPinningReloadState = _Class("UIInputViewPostPinningReloadState")
_UITextPlainLinkInteractionHandler = _Class("_UITextPlainLinkInteractionHandler")
_UITextDataDetectedLinkInteractionHandler = _Class(
"_UITextDataDetectedLinkInteractionHandler"
)
_UITextAttachmentInteractionHandler = _Class("_UITextAttachmentInteractionHandler")
_UICollectionLayoutSectionListSolver = _Class("_UICollectionLayoutSectionListSolver")
UIInterfaceActionRepresentationViewSpringLoadedEffect = _Class(
"UIInterfaceActionRepresentationViewSpringLoadedEffect"
)
UIInterfaceActionRepresentationViewSpringLoadedBehavior = _Class(
"UIInterfaceActionRepresentationViewSpringLoadedBehavior"
)
UIInterfaceActionSeparatorAttributes = _Class("UIInterfaceActionSeparatorAttributes")
UIInterfaceActionHighlightAttributes = _Class("UIInterfaceActionHighlightAttributes")
_UISceneCanvasComponent = _Class("_UISceneCanvasComponent")
_UISceneCanvasSceneActionsHandler = _Class("_UISceneCanvasSceneActionsHandler")
_UISceneCanvasSettingsDiffAction = _Class("_UISceneCanvasSettingsDiffAction")
_UIInterfaceActionRepresentationViewContext_AppleTV = _Class(
"_UIInterfaceActionRepresentationViewContext_AppleTV"
)
_UIAlertControllerShimPresenter = _Class("_UIAlertControllerShimPresenter")
UIAutonomousSingleAppModeSession = _Class("UIAutonomousSingleAppModeSession")
UIAutonomousSingleAppModeConfiguration = _Class(
"UIAutonomousSingleAppModeConfiguration"
)
UIAccessibilityHUDLayoutManager = _Class("UIAccessibilityHUDLayoutManager")
UIAccessibilityCustomViewHUDLayoutManager = _Class(
"UIAccessibilityCustomViewHUDLayoutManager"
)
UIAccessibilityImageOnlyHUDLayoutManager = _Class(
"UIAccessibilityImageOnlyHUDLayoutManager"
)
UIAccessibilityLabelOnlyHUDLayoutManager = _Class(
"UIAccessibilityLabelOnlyHUDLayoutManager"
)
UIAccessibilityHUDItem = _Class("UIAccessibilityHUDItem")
UIAccessibilityHUDPositionManager = _Class("UIAccessibilityHUDPositionManager")
_UICustomScheduleController = _Class("_UICustomScheduleController")
UIAccessibilityContainerReferenceHolder = _Class(
"UIAccessibilityContainerReferenceHolder"
)
_UIDiffableDataSourceSectionSnapshotRebaser = _Class(
"_UIDiffableDataSourceSectionSnapshotRebaser"
)
_UIContextMenuStyle = _Class("_UIContextMenuStyle")
_UISearchTokenAttachmentViewProvider = _Class("_UISearchTokenAttachmentViewProvider")
_UIApplicationInfo = _Class("_UIApplicationInfo")
UIWillPresentNotificationActionResponse = _Class(
"UIWillPresentNotificationActionResponse"
)
UIWatchKitExtensionRequestActionResponse = _Class(
"UIWatchKitExtensionRequestActionResponse"
)
UISceneProposalActionResponse = _Class("UISceneProposalActionResponse")
UISceneHitTestActionResponse = _Class("UISceneHitTestActionResponse")
UIDestroySceneActionResponse = _Class("UIDestroySceneActionResponse")
UIFetchContentInBackgroundActionResponse = _Class(
"UIFetchContentInBackgroundActionResponse"
)
UIIntentForwardingActionResponse = _Class("UIIntentForwardingActionResponse")
PKExtendedPhysicsWorld = _Class("PKExtendedPhysicsWorld")
PKExtendedPhysicsBody = _Class("PKExtendedPhysicsBody")
_UIConstantConstraintSet = _Class("_UIConstantConstraintSet")
_UIFlexibleConstantConstraintSet = _Class("_UIFlexibleConstantConstraintSet")
_UIVisualEffectViewEntry = _Class("_UIVisualEffectViewEntry")
_UIWallpaperEffectEntry = _Class("_UIWallpaperEffectEntry")
_UICopyEffectViewEntry = _Class("_UICopyEffectViewEntry")
_UIVisualEffectAlphaEntry = _Class("_UIVisualEffectAlphaEntry")
_UIVisualEffectViewTransitioningEntry = _Class("_UIVisualEffectViewTransitioningEntry")
_UIVisualEffectViewReversingEntry = _Class("_UIVisualEffectViewReversingEntry")
_UICompositingEffectViewEntry = _Class("_UICompositingEffectViewEntry")
_UIOverlayEffectViewEntry = _Class("_UIOverlayEffectViewEntry")
_UIZoomEffectViewEntry = _Class("_UIZoomEffectViewEntry")
_UITintColorViewEntry = _Class("_UITintColorViewEntry")
_UIVibrancyEffectImpl = _Class("_UIVibrancyEffectImpl")
_UIVibrancyEffectVibrantColorMatrixImpl = _Class(
"_UIVibrancyEffectVibrantColorMatrixImpl"
)
_UIVibrancyEffectModernCompositedImpl = _Class("_UIVibrancyEffectModernCompositedImpl")
_UIVibrancyEffectModernVibrancyImpl = _Class("_UIVibrancyEffectModernVibrancyImpl")
_UIVibrancyEffectLegacyImpl = _Class("_UIVibrancyEffectLegacyImpl")
_UIVibrancyEffectCoreMaterialImpl = _Class("_UIVibrancyEffectCoreMaterialImpl")
_UIInterfaceActionSeparatorConstraintController = _Class(
"_UIInterfaceActionSeparatorConstraintController"
)
UIAlertVisualStyleUpdatableConstraints = _Class(
"UIAlertVisualStyleUpdatableConstraints"
)
_UIAlertControllerActionViewMetrics = _Class("_UIAlertControllerActionViewMetrics")
UIInterfaceAction = _Class("UIInterfaceAction")
_UIAlertControllerActionViewInterfaceAction = _Class(
"_UIAlertControllerActionViewInterfaceAction"
)
UIInterfaceActionSelectionTrackingController = _Class(
"UIInterfaceActionSelectionTrackingController"
)
UIInterfaceActionSection = _Class("UIInterfaceActionSection")
UIInterfaceActionGroup = _Class("UIInterfaceActionGroup")
_UIAlertControllerAnimatedTransitioning = _Class(
"_UIAlertControllerAnimatedTransitioning"
)
UIInterfaceActionVisualStyleViewState = _Class("UIInterfaceActionVisualStyleViewState")
UIInterfaceActionViewState = _Class("UIInterfaceActionViewState")
UIInterfaceActionGroupViewState = _Class("UIInterfaceActionGroupViewState")
UIInterfaceActionConcreteVisualStyle = _Class("UIInterfaceActionConcreteVisualStyle")
UIInterfaceActionConcreteVisualStyle_CarPlay = _Class(
"UIInterfaceActionConcreteVisualStyle_CarPlay"
)
UIInterfaceActionConcreteVisualStyle_CarPlayAlert = _Class(
"UIInterfaceActionConcreteVisualStyle_CarPlayAlert"
)
UIInterfaceActionConcreteVisualStyle_AppleTV = _Class(
"UIInterfaceActionConcreteVisualStyle_AppleTV"
)
UIInterfaceActionConcreteVisualStyleAlert_AppleTVAlert = _Class(
"UIInterfaceActionConcreteVisualStyleAlert_AppleTVAlert"
)
UIInterfaceActionConcreteVisualStyle_iOS = _Class(
"UIInterfaceActionConcreteVisualStyle_iOS"
)
UIInterfaceActionConcreteVisualStyle_iOSSheet = _Class(
"UIInterfaceActionConcreteVisualStyle_iOSSheet"
)
UIInterfaceActionConcreteVisualStylePreviewPlatter = _Class(
"UIInterfaceActionConcreteVisualStylePreviewPlatter"
)
UIInterfaceActionConcreteVisualStyle_iOSInlineActionSheet = _Class(
"UIInterfaceActionConcreteVisualStyle_iOSInlineActionSheet"
)
UIInterfaceActionConcreteVisualStyle_iOSActivitySheet = _Class(
"UIInterfaceActionConcreteVisualStyle_iOSActivitySheet"
)
UIInterfaceActionConcreteVisualStyle_iOSAlert = _Class(
"UIInterfaceActionConcreteVisualStyle_iOSAlert"
)
UIInterfaceActionConcreteVisualStyleFactory_CarPlay = _Class(
"UIInterfaceActionConcreteVisualStyleFactory_CarPlay"
)
UIInterfaceActionConcreteVisualStyleFactory_AppleTV = _Class(
"UIInterfaceActionConcreteVisualStyleFactory_AppleTV"
)
UIInterfaceActionConcreteVisualStyleFactory_iOS = _Class(
"UIInterfaceActionConcreteVisualStyleFactory_iOS"
)
UIInterfaceActionVisualStyle = _Class("UIInterfaceActionVisualStyle")
UIInterfaceActionOverrideVisualStyle = _Class("UIInterfaceActionOverrideVisualStyle")
UIAlertControllerVisualStyle = _Class("UIAlertControllerVisualStyle")
UIAlertControllerVisualStyleActionSheet = _Class(
"UIAlertControllerVisualStyleActionSheet"
)
UIAlertControllerVisualStyleActionSheetInline = _Class(
"UIAlertControllerVisualStyleActionSheetInline"
)
UIAlertControllerVisualStyleActionSheetCar = _Class(
"UIAlertControllerVisualStyleActionSheetCar"
)
UIAlertControllerVisualStyleAlert = _Class("UIAlertControllerVisualStyleAlert")
UIAlertControllerVisualStyleAlertTV = _Class("UIAlertControllerVisualStyleAlertTV")
UIAlertControllerVisualStyleAlertCar = _Class("UIAlertControllerVisualStyleAlertCar")
UIAlertControllerDescriptor = _Class("UIAlertControllerDescriptor")
_UIAlertControllerTransitioningDelegate = _Class(
"_UIAlertControllerTransitioningDelegate"
)
_UISceneSettingsMediaTimingAnimationFactory = _Class(
"_UISceneSettingsMediaTimingAnimationFactory"
)
NSDocumentDifferenceSizeTriple = _Class("NSDocumentDifferenceSizeTriple")
UITextPasteItem = _Class("UITextPasteItem")
_UISearchTextFieldPasteItem = _Class("_UISearchTextFieldPasteItem")
_UITextPasteSession = _Class("_UITextPasteSession")
UITextPasteCoordinator = _Class("UITextPasteCoordinator")
UITextInputArrowKeyHistory = _Class("UITextInputArrowKeyHistory")
_UIPasteboardOptions = _Class("_UIPasteboardOptions")
UIPasteboardOptions = _Class("UIPasteboardOptions")
UIAutoscroll = _Class("UIAutoscroll")
_UIAssertionRecord = _Class("_UIAssertionRecord")
_UIAssertionBase = _Class("_UIAssertionBase")
UITextSelectionWindowAveragedValue = _Class("UITextSelectionWindowAveragedValue")
UITextGestureTuning = _Class("UITextGestureTuning")
_UIKitDragAndDropStatistics = _Class("_UIKitDragAndDropStatistics")
UIDragInteractionContextImpl = _Class("UIDragInteractionContextImpl")
_DUIDirtyItem = _Class("_DUIDirtyItem")
_DUIVisibleDroppedItem = _Class("_DUIVisibleDroppedItem")
_DUIImageComponent = _Class("_DUIImageComponent")
_DUIPreview = _Class("_DUIPreview")
_DUIPreviewAndImageComponent = _Class("_DUIPreviewAndImageComponent")
UIDraggingSessionConfiguration = _Class("UIDraggingSessionConfiguration")
UIDraggingBeginningSessionConfiguration = _Class(
"UIDraggingBeginningSessionConfiguration"
)
_UIDruidSourceWarmUpConnection = _Class("_UIDruidSourceWarmUpConnection")
_UIDragManager = _Class("_UIDragManager")
UITableViewUpdateGap = _Class("UITableViewUpdateGap")
_UIPanelAnimationState = _Class("_UIPanelAnimationState")
UIPointerRegion = _Class("UIPointerRegion")
_UICursorRegion = _Class("_UICursorRegion")
UIViewAnimationContext = _Class("UIViewAnimationContext")
UIViewAnimation = _Class("UIViewAnimation")
_UITableViewUpdateSupport = _Class("_UITableViewUpdateSupport")
UIUpdateItem = _Class("UIUpdateItem")
UIDecomposedReloadUpdateItem = _Class("UIDecomposedReloadUpdateItem")
UIRowMoveUpdateItem = _Class("UIRowMoveUpdateItem")
_UITitleContent = _Class("_UITitleContent")
_UISpringLoadedHysteresisBehavior = _Class("_UISpringLoadedHysteresisBehavior")
_UISpringLoadedBlinkingEffect = _Class("_UISpringLoadedBlinkingEffect")
_UIBarButtonSpringLoadedBlinkingEffect = _Class(
"_UIBarButtonSpringLoadedBlinkingEffect"
)
_UIAppCACommitFuture = _Class("_UIAppCACommitFuture")
_UISheetAnimationController = _Class("_UISheetAnimationController")
UIPanGestureVelocitySample = _Class("UIPanGestureVelocitySample")
UIIndirectScribbleInteraction = _Class("UIIndirectScribbleInteraction")
_UICursorInteraction = _Class("_UICursorInteraction")
_UINavigationParallaxTransition = _Class("_UINavigationParallaxTransition")
UIWebPlugInView = _Class("UIWebPlugInView")
_UICellAccessory = _Class("_UICellAccessory")
_UICellSpacingAccessory = _Class("_UICellSpacingAccessory")
_UICellViewAccessory = _Class("_UICellViewAccessory")
_UIShadowViewImageCacheKey = _Class("_UIShadowViewImageCacheKey")
_UIHyperAsymmetricExtender = _Class("_UIHyperAsymmetricExtender")
_UISheetInteraction = _Class("_UISheetInteraction")
_UISegmentedControlCacheKey = _Class("_UISegmentedControlCacheKey")
_UIScrollViewRefreshControlHost = _Class("_UIScrollViewRefreshControlHost")
_UISelectionGrabberAnimationDelegate = _Class("_UISelectionGrabberAnimationDelegate")
UIDictationMultilingualUtilities = _Class("UIDictationMultilingualUtilities")
_UIMotionEffectEngine = _Class("_UIMotionEffectEngine")
_UITextCursorAssertion = _Class("_UITextCursorAssertion")
_UIUpdateVisibleCellsContext = _Class("_UIUpdateVisibleCellsContext")
UICollectionViewLayoutAttributes = _Class("UICollectionViewLayoutAttributes")
UIDebuggingInformationHierarchyLayoutAttributes = _Class(
"UIDebuggingInformationHierarchyLayoutAttributes"
)
UITableViewIndexOverlaySelectionViewCollectionViewLayoutAttributes = _Class(
"UITableViewIndexOverlaySelectionViewCollectionViewLayoutAttributes"
)
UIKeyboardCandidatePocketShadowLayoutAttributes = _Class(
"UIKeyboardCandidatePocketShadowLayoutAttributes"
)
UICollectionViewTableLayoutAttributes = _Class("UICollectionViewTableLayoutAttributes")
_UICollectionViewListLayoutAttributes = _Class("_UICollectionViewListLayoutAttributes")
_UIFlowLayoutRow = _Class("_UIFlowLayoutRow")
_UIFlowLayoutItem = _Class("_UIFlowLayoutItem")
_UIUndoTextOperation = _Class("_UIUndoTextOperation")
_UITextUndoOperationSetAttributes = _Class("_UITextUndoOperationSetAttributes")
_UITextUndoOperationReplace = _Class("_UITextUndoOperationReplace")
_UITextUndoOperationTyping = _Class("_UITextUndoOperationTyping")
UIRepeatedAction = _Class("UIRepeatedAction")
UIKey = _Class("UIKey")
UIPressInfo = _Class("UIPressInfo")
_UIMenuLeafValidation = _Class("_UIMenuLeafValidation")
UITextRangeAdjustmentInteraction = _Class("UITextRangeAdjustmentInteraction")
UIWindowController = _Class("UIWindowController")
UIKeyboardMediaController = _Class("UIKeyboardMediaController")
_UIStatisticsIntegrator = _Class("_UIStatisticsIntegrator")
UIKBTextEditingTraits = _Class("UIKBTextEditingTraits")
UITextCursorAssertionController = _Class("UITextCursorAssertionController")
_UIFlowLayoutSection = _Class("_UIFlowLayoutSection")
_UIFlowLayoutInfo = _Class("_UIFlowLayoutInfo")
UIKeyboardFloatingTransitionController = _Class(
"UIKeyboardFloatingTransitionController"
)
UIMorphingLabelGlyphSet = _Class("UIMorphingLabelGlyphSet")
UIDescriptionBuilder = _Class("UIDescriptionBuilder")
_UIFeedbackEngine = _Class("_UIFeedbackEngine")
_UIFeedbackDummyEngine = _Class("_UIFeedbackDummyEngine")
_UIFeedbackSystemSoundEngine = _Class("_UIFeedbackSystemSoundEngine")
_UIFeedbackCoreHapticsEngine = _Class("_UIFeedbackCoreHapticsEngine")
_UIFeedbackCoreHapticsIgnoreCaptureEngine = _Class(
"_UIFeedbackCoreHapticsIgnoreCaptureEngine"
)
_UIFeedbackCoreHapticsIgnoreCaptureHapticsOnlyEngine = _Class(
"_UIFeedbackCoreHapticsIgnoreCaptureHapticsOnlyEngine"
)
_UIFeedbackCoreHapticsHapticsOnlyEngine = _Class(
"_UIFeedbackCoreHapticsHapticsOnlyEngine"
)
_UIFeedbackPreferences = _Class("_UIFeedbackPreferences")
_UIFeedbackParameters = _Class("_UIFeedbackParameters")
_UIFeedbackPatternParameters = _Class("_UIFeedbackPatternParameters")
_UIFeedback = _Class("_UIFeedback")
_UIFeedbackAudioFilePattern = _Class("_UIFeedbackAudioFilePattern")
_UIFeedbackHapticFilePattern = _Class("_UIFeedbackHapticFilePattern")
_UIFeedbackPattern = _Class("_UIFeedbackPattern")
_UIContinuousFeedback = _Class("_UIContinuousFeedback")
_UIDiscreteFeedback = _Class("_UIDiscreteFeedback")
_UICustomDiscreteFeedback = _Class("_UICustomDiscreteFeedback")
_UIRemoteKeyboardsToken = _Class("_UIRemoteKeyboardsToken")
UIKeyboardPredictionCellMetrics = _Class("UIKeyboardPredictionCellMetrics")
UIKeyboardTaskExecutionContext = _Class("UIKeyboardTaskExecutionContext")
UIKeyboardTaskEntry = _Class("UIKeyboardTaskEntry")
_UIScreenEdgePanRecognizer = _Class("_UIScreenEdgePanRecognizer")
UIKeyboardScheduledTask = _Class("UIKeyboardScheduledTask")
UIKBTextStyle = _Class("UIKBTextStyle")
UIKBKeyDisplayContents = _Class("UIKBKeyDisplayContents")
UIKBRenderGeometry = _Class("UIKBRenderGeometry")
UIKeyboardCache = _Class("UIKeyboardCache")
UIKBRenderFactoryLayoutSegment = _Class("UIKBRenderFactoryLayoutSegment")
UIKBEdgeEffect = _Class("UIKBEdgeEffect")
UIKBGradient = _Class("UIKBGradient")
UIKBColorGradient = _Class("UIKBColorGradient")
UIKBRenderTraits = _Class("UIKBRenderTraits")
UIKBRenderingContext = _Class("UIKBRenderingContext")
UIKBCacheToken = _Class("UIKBCacheToken")
UIKBCacheToken_Keyplane = _Class("UIKBCacheToken_Keyplane")
UIKBCacheToken_Key = _Class("UIKBCacheToken_Key")
UIKBCacheToken_KeyFilledTemplate = _Class("UIKBCacheToken_KeyFilledTemplate")
UIKBCacheToken_KeyMask = _Class("UIKBCacheToken_KeyMask")
UIKBCacheToken_KeyTemplate = _Class("UIKBCacheToken_KeyTemplate")
UIKeyboardTransitionSlice = _Class("UIKeyboardTransitionSlice")
UIKBSplitRow = _Class("UIKBSplitRow")
UIKeyboardSliceSet = _Class("UIKeyboardSliceSet")
UIKeyboardSliceStore = _Class("UIKeyboardSliceStore")
UIRivenFactory = _Class("UIRivenFactory")
UIKBSplitKeyplaneGenerator = _Class("UIKBSplitKeyplaneGenerator")
UIKBKeyViewAnimator = _Class("UIKBKeyViewAnimator")
UIKBKeyViewAnimatorMonolith = _Class("UIKBKeyViewAnimatorMonolith")
UIKBKeyViewAnimatorDeveloper = _Class("UIKBKeyViewAnimatorDeveloper")
_UIKeyboardUsageTracking = _Class("_UIKeyboardUsageTracking")
UIKeyboardTypingStyleEstimator = _Class("UIKeyboardTypingStyleEstimator")
_UIKeyboardTypingSpeedLogger = _Class("_UIKeyboardTypingSpeedLogger")
UIKBResizingKeyplaneCoordinator = _Class("UIKBResizingKeyplaneCoordinator")
UIKeyboardHandBiasTransitionCoordinator = _Class(
"UIKeyboardHandBiasTransitionCoordinator"
)
UIKBGeometry = _Class("UIKBGeometry")
UIKBMergeAction = _Class("UIKBMergeAction")
UIKBTree = _Class("UIKBTree")
UIKBShape = _Class("UIKBShape")
UIKBGraphCache = _Class("UIKBGraphCache")
UIKeyboardCandidateViewConfiguration = _Class("UIKeyboardCandidateViewConfiguration")
UIKeyboardCandidateViewConfigurationTV = _Class(
"UIKeyboardCandidateViewConfigurationTV"
)
UIKeyboardCandidateViewConfigurationHandwriting = _Class(
"UIKeyboardCandidateViewConfigurationHandwriting"
)
UIKeyboardCandidateViewConfigurationHandwritingPad = _Class(
"UIKeyboardCandidateViewConfigurationHandwritingPad"
)
UIKeyboardCandidateViewConfigurationTenKey = _Class(
"UIKeyboardCandidateViewConfigurationTenKey"
)
UIKeyboardCandidateViewConfigurationTenKeyPadSplit = _Class(
"UIKeyboardCandidateViewConfigurationTenKeyPadSplit"
)
UIKeyboardCandidateViewConfigurationTenKeyCarPlay = _Class(
"UIKeyboardCandidateViewConfigurationTenKeyCarPlay"
)
UIKeyboardCandidateViewConfigurationCarPlay = _Class(
"UIKeyboardCandidateViewConfigurationCarPlay"
)
UIKeyboardCandidateViewConfigurationPhoneInline = _Class(
"UIKeyboardCandidateViewConfigurationPhoneInline"
)
UIKeyboardCandidateViewConfigurationPhoneVerticalInline = _Class(
"UIKeyboardCandidateViewConfigurationPhoneVerticalInline"
)
UIKeyboardCandidateViewConfigurationPadVerticalInline = _Class(
"UIKeyboardCandidateViewConfigurationPadVerticalInline"
)
UIKeyboardCandidateViewConfigurationPadVerticalInlineZhuyin = _Class(
"UIKeyboardCandidateViewConfigurationPadVerticalInlineZhuyin"
)
UIKeyboardCandidateViewConfigurationPadInline = _Class(
"UIKeyboardCandidateViewConfigurationPadInline"
)
UIKeyboardCandidateViewConfigurationPadInlineLiveConversion = _Class(
"UIKeyboardCandidateViewConfigurationPadInlineLiveConversion"
)
UIKeyboardCandidateViewConfigurationPadInlineLiveConversionZhuyin = _Class(
"UIKeyboardCandidateViewConfigurationPadInlineLiveConversionZhuyin"
)
UIKeyboardCandidateViewConfigurationPhoneBar = _Class(
"UIKeyboardCandidateViewConfigurationPhoneBar"
)
UIKeyboardCandidateViewConfigurationPhoneBarLandscape = _Class(
"UIKeyboardCandidateViewConfigurationPhoneBarLandscape"
)
UIKeyboardCandidateViewConfigurationPhoneBarLandscapeWithBottomPadding = _Class(
"UIKeyboardCandidateViewConfigurationPhoneBarLandscapeWithBottomPadding"
)
UIKeyboardCandidateViewConfigurationPhoneBarTall = _Class(
"UIKeyboardCandidateViewConfigurationPhoneBarTall"
)
UIKeyboardCandidateViewConfigurationPhoneBarWithBottomPadding = _Class(
"UIKeyboardCandidateViewConfigurationPhoneBarWithBottomPadding"
)
UIKeyboardCandidateViewConfigurationPadBar = _Class(
"UIKeyboardCandidateViewConfigurationPadBar"
)
UIKeyboardCandidateViewConfigurationPadSplitBar = _Class(
"UIKeyboardCandidateViewConfigurationPadSplitBar"
)
UIKeyboardCandidateViewConfigurationPadSplitBarJapanese = _Class(
"UIKeyboardCandidateViewConfigurationPadSplitBarJapanese"
)
UIKeyboardCandidateViewConfigurationPadBarLandscape = _Class(
"UIKeyboardCandidateViewConfigurationPadBarLandscape"
)
UIKeyboardCandidateViewConfigurationPhoneBarDown = _Class(
"UIKeyboardCandidateViewConfigurationPhoneBarDown"
)
UIKeyboardCandidateViewConfigurationPadFloatingBar = _Class(
"UIKeyboardCandidateViewConfigurationPadFloatingBar"
)
UIKeyboardCandidateViewConfigurationPhoneBarDownWithBottomPadding = _Class(
"UIKeyboardCandidateViewConfigurationPhoneBarDownWithBottomPadding"
)
UIKBKeyplaneChangeContext = _Class("UIKBKeyplaneChangeContext")
_UIResponder_Override_Host_Entry = _Class("_UIResponder_Override_Host_Entry")
_UIResponder_Override_Host = _Class("_UIResponder_Override_Host")
_UIResponder_Override = _Class("_UIResponder_Override")
_UIFieldEditorHost = _Class("_UIFieldEditorHost")
_UIFieldEditorSystemInputHost = _Class("_UIFieldEditorSystemInputHost")
_UIFieldEditorPasscodeHost = _Class("_UIFieldEditorPasscodeHost")
_UITouchForwardingRecipient = _Class("_UITouchForwardingRecipient")
UILongPressGestureVelocitySample = _Class("UILongPressGestureVelocitySample")
UIGestureDelayedTouch = _Class("UIGestureDelayedTouch")
_UISEGestureFeature = _Class("_UISEGestureFeature")
_UISEIdleTimerFailGestureFeature = _Class("_UISEIdleTimerFailGestureFeature")
_UISEHybridEdgesFailGestureFeature = _Class("_UISEHybridEdgesFailGestureFeature")
_UISEFirmwareEdgesFailGestureFeature = _Class("_UISEFirmwareEdgesFailGestureFeature")
_UISEEdgeTypeForceRecognizeGestureFeature = _Class(
"_UISEEdgeTypeForceRecognizeGestureFeature"
)
_UISEDiagonalHysteresisRecognizeGestureFeature = _Class(
"_UISEDiagonalHysteresisRecognizeGestureFeature"
)
_UISEPerTypeEdgesFailGestureFeature = _Class("_UISEPerTypeEdgesFailGestureFeature")
_UISEAnyGestureFeature = _Class("_UISEAnyGestureFeature")
_UISEAllGestureFeature = _Class("_UISEAllGestureFeature")
_UISEEdgeTypeRecognizeGestureFeature = _Class("_UISEEdgeTypeRecognizeGestureFeature")
_UISEVelocityDirectionEdgesGestureFeature = _Class(
"_UISEVelocityDirectionEdgesGestureFeature"
)
_UISEOrthogonalHysteresisGestureFeature = _Class(
"_UISEOrthogonalHysteresisGestureFeature"
)
_UISEBackProjectEdgesFailGestureFeature = _Class(
"_UISEBackProjectEdgesFailGestureFeature"
)
_UISETeleportFailGestureFeature = _Class("_UISETeleportFailGestureFeature")
_UISEEdgeTypeFailGestureFeature = _Class("_UISEEdgeTypeFailGestureFeature")
_UISEInitialEdgesFailGestureFeature = _Class("_UISEInitialEdgesFailGestureFeature")
_UISEMuxGestureFeature = _Class("_UISEMuxGestureFeature")
_UIWeakDisplayLinkTarget = _Class("_UIWeakDisplayLinkTarget")
UIDelayedAction = _Class("UIDelayedAction")
UIHeldAction = _Class("UIHeldAction")
_UIAnalyticsTouchesSession = _Class("_UIAnalyticsTouchesSession")
_UIRKEOTouchTracking = _Class("_UIRKEOTouchTracking")
_UIDragSessionImpl = _Class("_UIDragSessionImpl")
UIAnimation = _Class("UIAnimation")
UIScrollAnimation = _Class("UIScrollAnimation")
UIFrameAnimation = _Class("UIFrameAnimation")
UIScrollViewScrollAnimation = _Class("UIScrollViewScrollAnimation")
UIAnimator = _Class("UIAnimator")
UITouchData = _Class("UITouchData")
UIKeyCommandDiscoverabilityHUD = _Class("UIKeyCommandDiscoverabilityHUD")
_UIHIDContext = _Class("_UIHIDContext")
_UIPencilPreferences = _Class("_UIPencilPreferences")
UICommandAlternate = _Class("UICommandAlternate")
UIKeyboardMotionSupport = _Class("UIKeyboardMotionSupport")
UIScrollToDismissSupport = _Class("UIScrollToDismissSupport")
UISplitKeyboardSupport = _Class("UISplitKeyboardSupport")
_UIInputViewKeyboardOutput = _Class("_UIInputViewKeyboardOutput")
TIKeyboardCandidateSuggestion = _Class("TIKeyboardCandidateSuggestion")
UITextReplacementCandidate = _Class("UITextReplacementCandidate")
UIInputViewControllerInterface = _Class("UIInputViewControllerInterface")
_UITextDocumentInterface = _Class("_UITextDocumentInterface")
UIKBAutofillController = _Class("UIKBAutofillController")
UIKeyboardCandidateController = _Class("UIKeyboardCandidateController")
UIKeyboardAutocorrectionController = _Class("UIKeyboardAutocorrectionController")
_UIKeyboardImplProxy = _Class("_UIKeyboardImplProxy")
UIKeyboardTaskQueue = _Class("UIKeyboardTaskQueue")
_UIButtonBarTargetAction = _Class("_UIButtonBarTargetAction")
_UISceneDisplayLinkTargetAndAction = _Class("_UISceneDisplayLinkTargetAndAction")
_UISceneDisplayLink = _Class("_UISceneDisplayLink")
UICellAccessoryConfiguration = _Class("UICellAccessoryConfiguration")
_UIBackgroundViewConfiguration = _Class("_UIBackgroundViewConfiguration")
UIBackgroundConfiguration = _Class("UIBackgroundConfiguration")
UITableCellAccessoryLayout = _Class("UITableCellAccessoryLayout")
UICellAccessoryManager = _Class("UICellAccessoryManager")
UITableViewCellLayoutManager = _Class("UITableViewCellLayoutManager")
UITableViewCellLayoutManagerValue2 = _Class("UITableViewCellLayoutManagerValue2")
UITableViewCellLayoutManagerValue1 = _Class("UITableViewCellLayoutManagerValue1")
UITableViewCellLayoutManagerEditable1 = _Class("UITableViewCellLayoutManagerEditable1")
UIMoreListCellLayoutManager = _Class("UIMoreListCellLayoutManager")
UITableViewCellLayoutManagerSubtitle = _Class("UITableViewCellLayoutManagerSubtitle")
UIViewConfigurationState = _Class("UIViewConfigurationState")
UICellConfigurationState = _Class("UICellConfigurationState")
_UIContentViewLabelConfiguration = _Class("_UIContentViewLabelConfiguration")
_UIContentViewImageViewConfiguration = _Class("_UIContentViewImageViewConfiguration")
_UIBasicCellContentViewConfiguration = _Class("_UIBasicCellContentViewConfiguration")
_UITableViewReorderingSupport = _Class("_UITableViewReorderingSupport")
_UIButtonBarLayout = _Class("_UIButtonBarLayout")
_UIButtonBarSpacerLayout = _Class("_UIButtonBarSpacerLayout")
_UIButtonBarItemLayout = _Class("_UIButtonBarItemLayout")
_UIButtonBarItemGroupLayout = _Class("_UIButtonBarItemGroupLayout")
UINavigationContentAdjustments = _Class("UINavigationContentAdjustments")
UISectionRowData = _Class("UISectionRowData")
UITableViewRowData = _Class("UITableViewRowData")
UINavigationDeferredTransitionContext = _Class("UINavigationDeferredTransitionContext")
_UIBarButtonItemDataBaseFallback = _Class("_UIBarButtonItemDataBaseFallback")
_UIBarAppearanceData = _Class("_UIBarAppearanceData")
_UINavTitleAppearanceData = _Class("_UINavTitleAppearanceData")
_UITabBarItemData = _Class("_UITabBarItemData")
_UITabBarLayoutData = _Class("_UITabBarLayoutData")
_UIBarBackgroundAppearanceData = _Class("_UIBarBackgroundAppearanceData")
_UIBarButtonItemData = _Class("_UIBarButtonItemData")
_UINavigationBarVisualStyle = _Class("_UINavigationBarVisualStyle")
_UINavigationBarTVVisualStyle = _Class("_UINavigationBarTVVisualStyle")
_UINavigationBarStarkVisualStyle = _Class("_UINavigationBarStarkVisualStyle")
_UINavigationBarPhonePadVisualStyle = _Class("_UINavigationBarPhonePadVisualStyle")
_UIBarAppearanceStorage = _Class("_UIBarAppearanceStorage")
_UIToolbarAppearanceStorage = _Class("_UIToolbarAppearanceStorage")
_UINavigationBarAppearanceStorage = _Class("_UINavigationBarAppearanceStorage")
_UIBarInsertLayoutData = _Class("_UIBarInsertLayoutData")
_UINavigationBarLayout = _Class("_UINavigationBarLayout")
UISlidingBarStateRequest = _Class("UISlidingBarStateRequest")
UISlidingBarState = _Class("UISlidingBarState")
_UIAppearanceRecorder = _Class("_UIAppearanceRecorder")
_UITableViewDropController = _Class("_UITableViewDropController")
_UITableViewDragController = _Class("_UITableViewDragController")
_UISwipeHandler = _Class("_UISwipeHandler")
UISwipeActionController = _Class("UISwipeActionController")
_UITableViewSubviewManager = _Class("_UITableViewSubviewManager")
UITableConstants_IOS = _Class("UITableConstants_IOS")
UITableConstants_Phone = _Class("UITableConstants_Phone")
UITableConstants_Watch = _Class("UITableConstants_Watch")
UITableConstants_Pad = _Class("UITableConstants_Pad")
UIPopoverController = _Class("UIPopoverController")
_UIViewServiceDummyPopoverController = _Class("_UIViewServiceDummyPopoverController")
UIDeviceAppearanceContainer = _Class("UIDeviceAppearanceContainer")
UITestOneAppearanceContainer = _Class("UITestOneAppearanceContainer")
UITestTwoAppearanceContainer = _Class("UITestTwoAppearanceContainer")
UIPhoneAppearanceContainer = _Class("UIPhoneAppearanceContainer")
UIPadAppearanceContainer = _Class("UIPadAppearanceContainer")
_UITextInputStringTokenizerSubrange = _Class("_UITextInputStringTokenizerSubrange")
_UIViewAdditiveAnimationAction = _Class("_UIViewAdditiveAnimationAction")
_UIAssistantEntry = _Class("_UIAssistantEntry")
_UIButtonBarLayoutMetrics = _Class("_UIButtonBarLayoutMetrics")
_UIButtonBar = _Class("_UIButtonBar")
UITextInputPasswordRules = _Class("UITextInputPasswordRules")
_UIAccessibilityLimits = _Class("_UIAccessibilityLimits")
_UIToolbarVisualProvider = _Class("_UIToolbarVisualProvider")
_UIToolbarVisualProviderLegacyIOS = _Class("_UIToolbarVisualProviderLegacyIOS")
_UIToolbarVisualProviderModernIOS = _Class("_UIToolbarVisualProviderModernIOS")
_UIKeyboardTextSelectionController = _Class("_UIKeyboardTextSelectionController")
_UIKeyboardAsyncTextSelectionController = _Class(
"_UIKeyboardAsyncTextSelectionController"
)
_UIViewFittingSizeTargetInfo = _Class("_UIViewFittingSizeTargetInfo")
_UIWeakHelper = _Class("_UIWeakHelper")
UIMultiSelectInteraction = _Class("UIMultiSelectInteraction")
_UICollectionViewMultiSelectController = _Class(
"_UICollectionViewMultiSelectController"
)
_UICollectionViewOrthogonalScrollerSectionController = _Class(
"_UICollectionViewOrthogonalScrollerSectionController"
)
_UICollectionViewShadowUpdatesController = _Class(
"_UICollectionViewShadowUpdatesController"
)
_UICollectionViewDragAndDropController = _Class(
"_UICollectionViewDragAndDropController"
)
UICollectionViewData = _Class("UICollectionViewData")
_UICollectionViewSelectionController = _Class("_UICollectionViewSelectionController")
UICollectionViewLayoutInvalidationContext = _Class(
"UICollectionViewLayoutInvalidationContext"
)
_UICollectionViewCompositionLayoutInvalidationContext = _Class(
"_UICollectionViewCompositionLayoutInvalidationContext"
)
UICollectionViewTableLayoutInvalidationContext = _Class(
"UICollectionViewTableLayoutInvalidationContext"
)
_UICollectionViewListLayoutInvalidationContext = _Class(
"_UICollectionViewListLayoutInvalidationContext"
)
UICollectionViewFlowLayoutInvalidationContext = _Class(
"UICollectionViewFlowLayoutInvalidationContext"
)
EmojiSectionHeaderLayoutInvalidationContext = _Class(
"EmojiSectionHeaderLayoutInvalidationContext"
)
UICollectionViewLayout = _Class("UICollectionViewLayout")
UIDebuggingInformationHierarchyLayout = _Class("UIDebuggingInformationHierarchyLayout")
_UICollectionViewListLayout = _Class("_UICollectionViewListLayout")
_UICollectionViewCompositionLayout = _Class("_UICollectionViewCompositionLayout")
UICollectionViewTableLayout = _Class("UICollectionViewTableLayout")
UICollectionViewCompositionalLayout = _Class("UICollectionViewCompositionalLayout")
_UICollectionViewCompositionalLayout = _Class("_UICollectionViewCompositionalLayout")
UICollectionViewTransitionLayout = _Class("UICollectionViewTransitionLayout")
UICollectionViewFlowLayout = _Class("UICollectionViewFlowLayout")
UITableViewIndexOverlaySelectionViewCollectionViewFlowLayout = _Class(
"UITableViewIndexOverlaySelectionViewCollectionViewFlowLayout"
)
UIKeyboardEmojiLayout = _Class("UIKeyboardEmojiLayout")
_UILAConfigurationHistory = _Class("_UILAConfigurationHistory")
_UIOLAConfigurationHistory = _Class("_UIOLAConfigurationHistory")
_UIALAConfigurationHistory = _Class("_UIALAConfigurationHistory")
_UILayoutArrangement = _Class("_UILayoutArrangement")
_UIAlignedLayoutArrangement = _Class("_UIAlignedLayoutArrangement")
_UIOrderedLayoutArrangement = _Class("_UIOrderedLayoutArrangement")
UITextPasteController = _Class("UITextPasteController")
UITextLoupeCursorBehavior = _Class("UITextLoupeCursorBehavior")
UITextMagnifierTimeWeightedPoint = _Class("UITextMagnifierTimeWeightedPoint")
_UIKeyboardTextSelectionGestureController = _Class(
"_UIKeyboardTextSelectionGestureController"
)
_UIKeyboardBasedTextSelectionGestureController = _Class(
"_UIKeyboardBasedTextSelectionGestureController"
)
_UIKeyboardBasedNonEditableTextSelectionGestureController = _Class(
"_UIKeyboardBasedNonEditableTextSelectionGestureController"
)
UITextLoupeTouchBehavior = _Class("UITextLoupeTouchBehavior")
_UILongPressClickInteractionDriver = _Class("_UILongPressClickInteractionDriver")
_UICoversheetClickInteractionDriver = _Class("_UICoversheetClickInteractionDriver")
_UILongPressTimeoutClickInteractionDriver = _Class(
"_UILongPressTimeoutClickInteractionDriver"
)
_UIControlCenterClickInteractionDriver = _Class(
"_UIControlCenterClickInteractionDriver"
)
_UIControlLongPressClickInteractionDriver = _Class(
"_UIControlLongPressClickInteractionDriver"
)
_UISecondaryClickClickInteractionDriver = _Class(
"_UISecondaryClickClickInteractionDriver"
)
_UIClickPresentationInteraction = _Class("_UIClickPresentationInteraction")
UITextSelection = _Class("UITextSelection")
UITextInteractionAssistant = _Class("UITextInteractionAssistant")
UIWKTextInteractionAssistant = _Class("UIWKTextInteractionAssistant")
_UIDragInteractionDriver = _Class("_UIDragInteractionDriver")
_UIDragInteractionClickPresentationDriver = _Class(
"_UIDragInteractionClickPresentationDriver"
)
_UIDragInteractionLongPressDriver = _Class("_UIDragInteractionLongPressDriver")
_UIDragSourceLiftEffect = _Class("_UIDragSourceLiftEffect")
UITextDragAssistant = _Class("UITextDragAssistant")
UITextDragDropSupport = _Class("UITextDragDropSupport")
UILayoutManagerBasedDraggableGeometry = _Class("UILayoutManagerBasedDraggableGeometry")
_UITextViewContentPadding = _Class("_UITextViewContentPadding")
_UITextViewVisualStyle = _Class("_UITextViewVisualStyle")
_UITextViewVisualStyle_tvOS = _Class("_UITextViewVisualStyle_tvOS")
_UITextViewVisualStyle_iOS = _Class("_UITextViewVisualStyle_iOS")
_UITextViewRestorableScrollPosition = _Class("_UITextViewRestorableScrollPosition")
UITextInteraction = _Class("UITextInteraction")
UITextPhraseBoundaryInteraction = _Class("UITextPhraseBoundaryInteraction")
UITextLiveConversionInteraction = _Class("UITextLiveConversionInteraction")
_UITextContextMenuInteractionBase = _Class("_UITextContextMenuInteractionBase")
_UIContextMenuInteractionBasedTextContextInteraction = _Class(
"_UIContextMenuInteractionBasedTextContextInteraction"
)
_UIMenuControllerBasedTextContextInteraction = _Class(
"_UIMenuControllerBasedTextContextInteraction"
)
UITextServicesInteraction = _Class("UITextServicesInteraction")
UITextContextMenuInteraction = _Class("UITextContextMenuInteraction")
UITextNonEditableInteraction = _Class("UITextNonEditableInteraction")
UITextIndirectEditableInteraction = _Class("UITextIndirectEditableInteraction")
UITextIndirectNonEditableInteraction = _Class("UITextIndirectNonEditableInteraction")
_UIKeyboardTextSelectionInteraction = _Class("_UIKeyboardTextSelectionInteraction")
_UIKeyboardBasedTextSelectionInteraction = _Class(
"_UIKeyboardBasedTextSelectionInteraction"
)
_UIKeyboardBasedNonEditableTextSelectionInteraction = _Class(
"_UIKeyboardBasedNonEditableTextSelectionInteraction"
)
UITextIndirectKeyboardInteraction = _Class("UITextIndirectKeyboardInteraction")
UITextSelectionInteraction = _Class("UITextSelectionInteraction")
UIWKTextSelectionInteraction = _Class("UIWKTextSelectionInteraction")
UITextLoupeInteraction = _Class("UITextLoupeInteraction")
UITextLoupeInteraction_CustomHighlighter = _Class(
"UITextLoupeInteraction_CustomHighlighter"
)
UITextItemInteractionInteraction = _Class("UITextItemInteractionInteraction")
_UITextSimpleLinkInteraction = _Class("_UITextSimpleLinkInteraction")
_UITextLongPressLinkInteraction = _Class("_UITextLongPressLinkInteraction")
_UITextMenuLinkInteraction = _Class("_UITextMenuLinkInteraction")
UITextLinkInteraction = _Class("UITextLinkInteraction")
UISearchToken = _Class("UISearchToken")
_UISearchToken = _Class("_UISearchToken")
UIScreenshotService = _Class("UIScreenshotService")
UIContextMenuInteraction = _Class("UIContextMenuInteraction")
_UIVariableGestureContextMenuInteraction = _Class(
"_UIVariableGestureContextMenuInteraction"
)
UIBarButtonItemStateAppearance = _Class("UIBarButtonItemStateAppearance")
UIBarButtonItemAppearance = _Class("UIBarButtonItemAppearance")
UITabBarItemStateAppearance = _Class("UITabBarItemStateAppearance")
UITabBarItemAppearance = _Class("UITabBarItemAppearance")
UIBarAppearance = _Class("UIBarAppearance")
UITabBarAppearance = _Class("UITabBarAppearance")
UIToolbarAppearance = _Class("UIToolbarAppearance")
UINavigationBarAppearance = _Class("UINavigationBarAppearance")
UIFontPickerViewControllerConfiguration = _Class(
"UIFontPickerViewControllerConfiguration"
)
UIDictationPhrase = _Class("UIDictationPhrase")
UITextInputStringTokenizer = _Class("UITextInputStringTokenizer")
_UITextInputControllerTokenizer = _Class("_UITextInputControllerTokenizer")
_UITextPlaceholderAttachment = _Class("_UITextPlaceholderAttachment")
_UIImageTextAttachment = _Class("_UIImageTextAttachment")
_UISearchTokenAttachment = _Class("_UISearchTokenAttachment")
UITextSelectionRect = _Class("UITextSelectionRect")
_UITextSelectionCaretRect = _Class("_UITextSelectionCaretRect")
UISimpleSelectionRect = _Class("UISimpleSelectionRect")
UITextSelectionRectImpl = _Class("UITextSelectionRectImpl")
_UITextKitSelectionRect = _Class("_UITextKitSelectionRect")
UITextChecker = _Class("UITextChecker")
UIFontMetrics = _Class("UIFontMetrics")
UIPrintFormatter = _Class("UIPrintFormatter")
UITallPDFPrintFormatter = _Class("UITallPDFPrintFormatter")
UIMarkupTextPrintFormatter = _Class("UIMarkupTextPrintFormatter")
UISimpleTextPrintFormatter = _Class("UISimpleTextPrintFormatter")
UIViewPrintFormatter = _Class("UIViewPrintFormatter")
UIWebDocumentViewPrintFormatter = _Class("UIWebDocumentViewPrintFormatter")
UIWebViewPrintFormatter = _Class("UIWebViewPrintFormatter")
UITextViewPrintFormatter = _Class("UITextViewPrintFormatter")
UIPrintPaper = _Class("UIPrintPaper")
UIPrintInfo = _Class("UIPrintInfo")
UIPrinter = _Class("UIPrinter")
UIPrintPageRenderer = _Class("UIPrintPageRenderer")
UIPrintInteractionController = _Class("UIPrintInteractionController")
UIAccessibilityLocationDescriptor = _Class("UIAccessibilityLocationDescriptor")
UIAccessibilityCustomRotorSearchPredicate = _Class(
"UIAccessibilityCustomRotorSearchPredicate"
)
UIAccessibilityCustomRotorItemResult = _Class("UIAccessibilityCustomRotorItemResult")
UIAccessibilityCustomRotor = _Class("UIAccessibilityCustomRotor")
UIAccessibilityCustomAction = _Class("UIAccessibilityCustomAction")
UIApplicationShortcutItem = _Class("UIApplicationShortcutItem")
UIMutableApplicationShortcutItem = _Class("UIMutableApplicationShortcutItem")
UIApplicationShortcutIcon = _Class("UIApplicationShortcutIcon")
UIPreviewInteraction = _Class("UIPreviewInteraction")
UIPreviewActionGroup = _Class("UIPreviewActionGroup")
UIPreviewAction = _Class("UIPreviewAction")
UIFocusAnimationCoordinator = _Class("UIFocusAnimationCoordinator")
UIFocusDebugger = _Class("UIFocusDebugger")
UIFocusMovementHint = _Class("UIFocusMovementHint")
UIFocusUpdateContext = _Class("UIFocusUpdateContext")
UITableViewFocusUpdateContext = _Class("UITableViewFocusUpdateContext")
UICollectionViewFocusUpdateContext = _Class("UICollectionViewFocusUpdateContext")
UIPencilInteraction = _Class("UIPencilInteraction")
UITargetedPreview = _Class("UITargetedPreview")
_UITargetedPreview = _Class("_UITargetedPreview")
UITargetedDragPreview = _Class("UITargetedDragPreview")
UIPreviewTarget = _Class("UIPreviewTarget")
_UIPreviewTarget = _Class("_UIPreviewTarget")
UIDragPreviewTarget = _Class("UIDragPreviewTarget")
UIDragPreview = _Class("UIDragPreview")
UIPreviewParameters = _Class("UIPreviewParameters")
_UIPreviewParameters = _Class("_UIPreviewParameters")
UIDragPreviewParameters = _Class("UIDragPreviewParameters")
UIDropProposal = _Class("UIDropProposal")
UITextDropProposal = _Class("UITextDropProposal")
UITableViewDropProposal = _Class("UITableViewDropProposal")
UICollectionViewDropProposal = _Class("UICollectionViewDropProposal")
UIDragItem = _Class("UIDragItem")
_UIDropItem = _Class("_UIDropItem")
UIDropInteraction = _Class("UIDropInteraction")
UIDragInteraction = _Class("UIDragInteraction")
UIPress = _Class("UIPress")
UITouch = _Class("UITouch")
UIScreenMode = _Class("UIScreenMode")
UIAlertAction = _Class("UIAlertAction")
UIPrinterPickerController = _Class("UIPrinterPickerController")
UILexiconEntry = _Class("UILexiconEntry")
UILexicon = _Class("UILexicon")
UIStoryboardUnwindSegueSource = _Class("UIStoryboardUnwindSegueSource")
UIStoryboardSegue = _Class("UIStoryboardSegue")
UIStoryboardPopoverSegue = _Class("UIStoryboardPopoverSegue")
UIPasteConfiguration = _Class("UIPasteConfiguration")
NSDocumentDifferenceSize = _Class("NSDocumentDifferenceSize")
_UIDocumentPickerNSURLWrapper = _Class("_UIDocumentPickerNSURLWrapper")
UIDocument = _Class("UIDocument")
UIManagedDocument = _Class("UIManagedDocument")
_UIViewControllerNullAnimationTransitionCoordinator = _Class(
"_UIViewControllerNullAnimationTransitionCoordinator"
)
_UISplitViewControllerColumnContents = _Class("_UISplitViewControllerColumnContents")
_UITouchForceObservable = _Class("_UITouchForceObservable")
UIForceStageObservable = _Class("UIForceStageObservable")
_UIHyperConstantExtender = _Class("_UIHyperConstantExtender")
_UIHyperspace = _Class("_UIHyperspace")
_UIHyperInteractor = _Class("_UIHyperInteractor")
_UIHyperrectangle = _Class("_UIHyperrectangle")
_UIHyperregionUnion = _Class("_UIHyperregionUnion")
_UIHyperpoint = _Class("_UIHyperpoint")
UISlidingBarConfiguration = _Class("UISlidingBarConfiguration")
_UIPanelInternalState = _Class("_UIPanelInternalState")
UIPanelController = _Class("UIPanelController")
UISplitViewControllerPanelImpl = _Class("UISplitViewControllerPanelImpl")
_UIBarBackgroundLayout = _Class("_UIBarBackgroundLayout")
_UIBarBackgroundLayoutModern = _Class("_UIBarBackgroundLayoutModern")
_UIBarBackgroundLayoutLegacy = _Class("_UIBarBackgroundLayoutLegacy")
_UINavigationBarItemStackEntry = _Class("_UINavigationBarItemStackEntry")
_UISEGestureFeatureSettings = _Class("_UISEGestureFeatureSettings")
UIPercentDrivenInteractiveTransition = _Class("UIPercentDrivenInteractiveTransition")
_UIPreviewTransitionController = _Class("_UIPreviewTransitionController")
_UIAlertControllerInteractionController = _Class(
"_UIAlertControllerInteractionController"
)
_UINavigationInteractiveTransitionBase = _Class(
"_UINavigationInteractiveTransitionBase"
)
_UINavigationInteractiveTransition = _Class("_UINavigationInteractiveTransition")
_UINavigationControllerRefreshControlHost = _Class(
"_UINavigationControllerRefreshControlHost"
)
_UINavigationBarLargeTitleViewLayout = _Class("_UINavigationBarLargeTitleViewLayout")
_UINavigationBarContentViewLayout = _Class("_UINavigationBarContentViewLayout")
_UINavigationBarItemStack = _Class("_UINavigationBarItemStack")
_UINavigationBarVisualProvider = _Class("_UINavigationBarVisualProvider")
_UINavigationBarVisualProviderModernCarPlay = _Class(
"_UINavigationBarVisualProviderModernCarPlay"
)
_UINavigationBarVisualProviderLegacyIOS = _Class(
"_UINavigationBarVisualProviderLegacyIOS"
)
_UINavigationBarVisualProviderModernIOS = _Class(
"_UINavigationBarVisualProviderModernIOS"
)
_UIAppearanceCustomizableClassInfo = _Class("_UIAppearanceCustomizableClassInfo")
_UICompoundObjectMap = _Class("_UICompoundObjectMap")
_UIViewControllerKeyboardAnimationStyleInfo = _Class(
"_UIViewControllerKeyboardAnimationStyleInfo"
)
UIInputViewAnimationControllerBasic = _Class("UIInputViewAnimationControllerBasic")
UIInputViewPlacementTransition = _Class("UIInputViewPlacementTransition")
UIInputViewSetNotificationInfo = _Class("UIInputViewSetNotificationInfo")
UIKBAnalyticsDispatcher = _Class("UIKBAnalyticsDispatcher")
UIViewControllerAction = _Class("UIViewControllerAction")
_UIStatistics = _Class("_UIStatistics")
_UIStatisticsDistribution = _Class("_UIStatisticsDistribution")
_UIStatisticsScalar = _Class("_UIStatisticsScalar")
_UIScreenBoundingPathUtilities = _Class("_UIScreenBoundingPathUtilities")
_UIScreenRectangularBoundingPathUtilities = _Class(
"_UIScreenRectangularBoundingPathUtilities"
)
_UIScreenComplexBoundingPathUtilities = _Class("_UIScreenComplexBoundingPathUtilities")
_UIFenceTask = _Class("_UIFenceTask")
_UISceneScreenBasedMetricsCalculator = _Class("_UISceneScreenBasedMetricsCalculator")
_UISceneUnassociatedContext = _Class("_UISceneUnassociatedContext")
_UIViewServiceReplyControlProxy = _Class("_UIViewServiceReplyControlProxy")
_UITextServiceSession = _Class("_UITextServiceSession")
_UIHostedTextServiceSession = _Class("_UIHostedTextServiceSession")
_UIAsyncInvocationObserver = _Class("_UIAsyncInvocationObserver")
UIKeyboardBIUImageGenerator = _Class("UIKeyboardBIUImageGenerator")
UIBarButtonItemGroup = _Class("UIBarButtonItemGroup")
_UIViewServiceDeputyXPCInterfaceInvocationFactory = _Class(
"_UIViewServiceDeputyXPCInterfaceInvocationFactory"
)
_UIRemoteViewControllerWeakWrapperProxy = _Class(
"_UIRemoteViewControllerWeakWrapperProxy"
)
_UIHostedWindowHostingHandle = _Class("_UIHostedWindowHostingHandle")
_UIBoundingPath = _Class("_UIBoundingPath")
_UIComplexBoundingPath = _Class("_UIComplexBoundingPath")
_UIRectangularBoundingPath = _Class("_UIRectangularBoundingPath")
_UIViewControllerTransitionCoordinatorContextDescription = _Class(
"_UIViewControllerTransitionCoordinatorContextDescription"
)
_UIViewServiceControllerOperatorCreateResult = _Class(
"_UIViewServiceControllerOperatorCreateResult"
)
_UIViewServiceViewControllerOperatorCreateOptions = _Class(
"_UIViewServiceViewControllerOperatorCreateOptions"
)
_UIViewAnimationAttributes = _Class("_UIViewAnimationAttributes")
UISpringTimingParameters = _Class("UISpringTimingParameters")
_UITextServiceSessionContext = _Class("_UITextServiceSessionContext")
_UIViewServiceDeputyManager = _Class("_UIViewServiceDeputyManager")
_UIViewServiceInterfaceConnectionRequest = _Class(
"_UIViewServiceInterfaceConnectionRequest"
)
_UIViewServiceInterface = _Class("_UIViewServiceInterface")
_UIViewControllerControlMessageDeputyXPCInterface = _Class(
"_UIViewControllerControlMessageDeputyXPCInterface"
)
_UIViewServiceTextEffectsOperator_XPCInterface = _Class(
"_UIViewServiceTextEffectsOperator_XPCInterface"
)
_UIViewServiceTextEffectsOperator = _Class("_UIViewServiceTextEffectsOperator")
_UIViewServiceViewControllerOperator_XPCInterface = _Class(
"_UIViewServiceViewControllerOperator_XPCInterface"
)
UITextInputAssistantItem = _Class("UITextInputAssistantItem")
UISystemDefaultTextInputAssistantItem = _Class("UISystemDefaultTextInputAssistantItem")
UIAssistantBarButtonItemProvider = _Class("UIAssistantBarButtonItemProvider")
_UIActionWhenIdle = _Class("_UIActionWhenIdle")
_UIGestureRecognizerTransformAnalyzer = _Class("_UIGestureRecognizerTransformAnalyzer")
UIUndoGestureInteraction = _Class("UIUndoGestureInteraction")
UIPeripheralHost = _Class("UIPeripheralHost")
_UIAsyncInvocation = _Class("_UIAsyncInvocation")
_UIRemoteViewControllerConnectionInfo = _Class("_UIRemoteViewControllerConnectionInfo")
_UIRemoteViewControllerConnectionRequest = _Class(
"_UIRemoteViewControllerConnectionRequest"
)
_UIViewServiceViewControllerDeputyXPCInterface = _Class(
"_UIViewServiceViewControllerDeputyXPCInterface"
)
_UIRemoteViewService = _Class("_UIRemoteViewService")
_UIKeyboardChangedInformation = _Class("_UIKeyboardChangedInformation")
_UIKeyboardChangedInformationWithFencing = _Class(
"_UIKeyboardChangedInformationWithFencing"
)
_UITextSizeCache = _Class("_UITextSizeCache")
UIItemProvider = _Class("UIItemProvider")
WebThreadSafeUndoManager = _Class("WebThreadSafeUndoManager")
_UITextUndoManager = _Class("_UITextUndoManager")
UIInputViewSetPlacement_GenericApplicator = _Class(
"UIInputViewSetPlacement_GenericApplicator"
)
UIInputViewSetPlacement_UndockedApplicator = _Class(
"UIInputViewSetPlacement_UndockedApplicator"
)
UIInputViewSetPlacement_FloatingApplicator = _Class(
"UIInputViewSetPlacement_FloatingApplicator"
)
UIInputViewSetPlacement_DockResponderApplicator = _Class(
"UIInputViewSetPlacement_DockResponderApplicator"
)
UIInputViewSetPlacement_DragToDismissApplicator = _Class(
"UIInputViewSetPlacement_DragToDismissApplicator"
)
UIInputViewSetPlacement_AssistantApplicator = _Class(
"UIInputViewSetPlacement_AssistantApplicator"
)
UIKBRenderFactory = _Class("UIKBRenderFactory")
UIKBRenderFactory_Monolith = _Class("UIKBRenderFactory_Monolith")
UIKBRenderFactory_MonolithLinear = _Class("UIKBRenderFactory_MonolithLinear")
UIKBRenderFactory_MonolithLinearSlim = _Class("UIKBRenderFactory_MonolithLinearSlim")
UIKBRenderFactory_Emoji = _Class("UIKBRenderFactory_Emoji")
UIKBRenderFactoryEmoji_iPad_Split = _Class("UIKBRenderFactoryEmoji_iPad_Split")
UIKBRenderFactoryEmoji_iPhone = _Class("UIKBRenderFactoryEmoji_iPhone")
UIKBRenderFactoryEmoji_iPad = _Class("UIKBRenderFactoryEmoji_iPad")
UIKBRenderFactoryEmoji_iPad_Landscape = _Class("UIKBRenderFactoryEmoji_iPad_Landscape")
UIKBRenderFactory_Car = _Class("UIKBRenderFactory_Car")
UIKBRenderFactory_CarLinear = _Class("UIKBRenderFactory_CarLinear")
UIKBRenderFactory_CarTenKey = _Class("UIKBRenderFactory_CarTenKey")
UIKBRenderFactory_Candidates = _Class("UIKBRenderFactory_Candidates")
UIKBRenderFactory10Key = _Class("UIKBRenderFactory10Key")
UIKBRenderFactoryiPad10Key_Portrait = _Class("UIKBRenderFactoryiPad10Key_Portrait")
UIKBRenderFactoryiPad10Key_Landscape = _Class("UIKBRenderFactoryiPad10Key_Landscape")
UIKBRenderFactory10Key_Round = _Class("UIKBRenderFactory10Key_Round")
UIKBRenderFactoryiPadHWR_Portrait = _Class("UIKBRenderFactoryiPadHWR_Portrait")
UIKBRenderFactoryiPadHWR_PortraitFudge = _Class(
"UIKBRenderFactoryiPadHWR_PortraitFudge"
)
UIKBRenderFactoryiPadHWR_PortraitSansHomeButton = _Class(
"UIKBRenderFactoryiPadHWR_PortraitSansHomeButton"
)
UIKBRenderFactoryiPadHWR_Landscape = _Class("UIKBRenderFactoryiPadHWR_Landscape")
UIKBRenderFactoryiPadHWR_LandscapeFudge = _Class(
"UIKBRenderFactoryiPadHWR_LandscapeFudge"
)
UIKBRenderFactoryiPadHWR_LandscapeSansHomeButton = _Class(
"UIKBRenderFactoryiPadHWR_LandscapeSansHomeButton"
)
UIKBRenderFactory50On_Portrait = _Class("UIKBRenderFactory50On_Portrait")
UIKBRenderFactory50On_Landscape = _Class("UIKBRenderFactory50On_Landscape")
UIKBRenderFactoryHWR_Portrait = _Class("UIKBRenderFactoryHWR_Portrait")
UIKBRenderFactoryHWR_Floating = _Class("UIKBRenderFactoryHWR_Floating")
UIKBRenderFactoryHWR_Landscape = _Class("UIKBRenderFactoryHWR_Landscape")
UIKBRenderFactoryHWR_PortraitTruffle = _Class("UIKBRenderFactoryHWR_PortraitTruffle")
UIKBRenderFactoryHWR_PortraitChoco = _Class("UIKBRenderFactoryHWR_PortraitChoco")
UIKBRenderFactory10Key_Portrait = _Class("UIKBRenderFactory10Key_Portrait")
UIKBRenderFactory10Key_Landscape = _Class("UIKBRenderFactory10Key_Landscape")
UIKBRenderFactory10Key_LandscapeTruffle = _Class(
"UIKBRenderFactory10Key_LandscapeTruffle"
)
UIKBRenderFactory10Key_LandscapeChoco = _Class("UIKBRenderFactory10Key_LandscapeChoco")
UIKBRenderFactory10Key_PortraitTruffle = _Class(
"UIKBRenderFactory10Key_PortraitTruffle"
)
UIKBRenderFactory10Key_PortraitChoco = _Class("UIKBRenderFactory10Key_PortraitChoco")
UIKBRenderFactoryNumberPad = _Class("UIKBRenderFactoryNumberPad")
UIKBRenderFactoryNumberPadLandscape = _Class("UIKBRenderFactoryNumberPadLandscape")
UIKBRenderFactoryiPhone = _Class("UIKBRenderFactoryiPhone")
UIKBRenderFactory_Composite = _Class("UIKBRenderFactory_Composite")
UIKBRenderFactory_iPhoneTruffleReachable = _Class(
"UIKBRenderFactory_iPhoneTruffleReachable"
)
UIKBRenderFactory_iPhoneChocoReachable = _Class(
"UIKBRenderFactory_iPhoneChocoReachable"
)
UIKBRenderFactoryiPhonePasscode = _Class("UIKBRenderFactoryiPhonePasscode")
UIKBRenderFactoryiPhonePasscodeTruffle = _Class(
"UIKBRenderFactoryiPhonePasscodeTruffle"
)
UIKBRenderFactoryiPhonePasscodeChoco = _Class("UIKBRenderFactoryiPhonePasscodeChoco")
UIKBRenderFactoryiPhoneTruffle = _Class("UIKBRenderFactoryiPhoneTruffle")
UIKBRenderFactoryiPhoneChoco = _Class("UIKBRenderFactoryiPhoneChoco")
UIKBRenderFactoryiPhoneLandscape = _Class("UIKBRenderFactoryiPhoneLandscape")
UIKBRenderFactoryiPhoneTruffleLandscape = _Class(
"UIKBRenderFactoryiPhoneTruffleLandscape"
)
UIKBRenderFactoryiPhoneChocoLandscape = _Class("UIKBRenderFactoryiPhoneChocoLandscape")
UIKBRenderFactoryiPad = _Class("UIKBRenderFactoryiPad")
UIKBRenderFactoryiPadPasscode = _Class("UIKBRenderFactoryiPadPasscode")
UIKBRenderFactoryiPadSplit = _Class("UIKBRenderFactoryiPadSplit")
UIKBRenderFactoryiPadSansHomeButton = _Class("UIKBRenderFactoryiPadSansHomeButton")
UIKBRenderFactoryiPadSansHomeButtonLandscape = _Class(
"UIKBRenderFactoryiPadSansHomeButtonLandscape"
)
UIKBRenderFactoryiPadFudge = _Class("UIKBRenderFactoryiPadFudge")
UIKBRenderFactoryiPadFudgePasscode = _Class("UIKBRenderFactoryiPadFudgePasscode")
UIKBRenderFactoryiPadFudgeLandscape = _Class("UIKBRenderFactoryiPadFudgeLandscape")
UIKBRenderFactoryiPadFudgeLandscapePasscode = _Class(
"UIKBRenderFactoryiPadFudgeLandscapePasscode"
)
UIKBRenderFactoryiPadLandscape = _Class("UIKBRenderFactoryiPadLandscape")
UIKBRenderFactoryiPadLandscapePasscode = _Class(
"UIKBRenderFactoryiPadLandscapePasscode"
)
UIInputSwitcher = _Class("UIInputSwitcher")
UITextInputMode = _Class("UITextInputMode")
UIKeyboardInputMode = _Class("UIKeyboardInputMode")
UIKeyboardExtensionInputMode = _Class("UIKeyboardExtensionInputMode")
UIKeyboardSuggestedInputMode = _Class("UIKeyboardSuggestedInputMode")
UISpecializedInputMode = _Class("UISpecializedInputMode")
UIDictationInputMode = _Class("UIDictationInputMode")
UIKBScreenTraits = _Class("UIKBScreenTraits")
UIKeyboardPreferencesController = _Class("UIKeyboardPreferencesController")
UIInputWindowControllerHostingItem = _Class("UIInputWindowControllerHostingItem")
UIInputWindowControllerHosting = _Class("UIInputWindowControllerHosting")
_UIButtonBarButtonVisualProvider = _Class("_UIButtonBarButtonVisualProvider")
_UIButtonBarButtonVisualProviderCarPlay = _Class(
"_UIButtonBarButtonVisualProviderCarPlay"
)
_UIButtonBarButtonVisualProviderIOS = _Class("_UIButtonBarButtonVisualProviderIOS")
_UIUCBBarButtonVisualProviderIOS = _Class("_UIUCBBarButtonVisualProviderIOS")
_UIUCBPopoverBarButtonVisualProviderIOS = _Class(
"_UIUCBPopoverBarButtonVisualProviderIOS"
)
_UIUCBGroupBarButtonVisualProviderIOS = _Class("_UIUCBGroupBarButtonVisualProviderIOS")
UIKBRenderConfig = _Class("UIKBRenderConfig")
UIInputViewSetPlacement = _Class("UIInputViewSetPlacement")
UIInputViewSetPlacementInvisible = _Class("UIInputViewSetPlacementInvisible")
UIInputViewSetPlacementInvisibleForFloatingTransition = _Class(
"UIInputViewSetPlacementInvisibleForFloatingTransition"
)
UIInputViewSetPlacementOffScreenLeftOrRight = _Class(
"UIInputViewSetPlacementOffScreenLeftOrRight"
)
UIInputViewSetPlacementOffScreenRight = _Class("UIInputViewSetPlacementOffScreenRight")
UIInputViewSetPlacementOffScreenLeft = _Class("UIInputViewSetPlacementOffScreenLeft")
UIInputViewSetPlacementOffScreenDownByScreenHeight = _Class(
"UIInputViewSetPlacementOffScreenDownByScreenHeight"
)
UIInputViewSetPlacementUndocked = _Class("UIInputViewSetPlacementUndocked")
UIInputViewSetPlacementPlaceholderUndocked = _Class(
"UIInputViewSetPlacementPlaceholderUndocked"
)
UIInputViewSetPlacementFloating = _Class("UIInputViewSetPlacementFloating")
UIInputViewSetPlacementAssistantOnScreen = _Class(
"UIInputViewSetPlacementAssistantOnScreen"
)
UIInputViewSetPlacementAccessoryOnScreen = _Class(
"UIInputViewSetPlacementAccessoryOnScreen"
)
UIInputViewSetPlacementOnScreen = _Class("UIInputViewSetPlacementOnScreen")
UIInputViewSetPlacementPlaceholder = _Class("UIInputViewSetPlacementPlaceholder")
_UIInputViewSetPlacementDragToDismiss = _Class("_UIInputViewSetPlacementDragToDismiss")
UIInputViewSetPlacementOnScreenWithAccessory = _Class(
"UIInputViewSetPlacementOnScreenWithAccessory"
)
UIInputViewSetPlacementOffScreenDown = _Class("UIInputViewSetPlacementOffScreenDown")
UIInputViewSetPlacementInitialPosition = _Class(
"UIInputViewSetPlacementInitialPosition"
)
UIStoryboardSegueTemplate = _Class("UIStoryboardSegueTemplate")
UIStoryboardUnwindSegueTemplate = _Class("UIStoryboardUnwindSegueTemplate")
UIStoryboardEmbedSegueTemplate = _Class("UIStoryboardEmbedSegueTemplate")
UIStoryboardPreviewingSegueTemplate = _Class("UIStoryboardPreviewingSegueTemplate")
UIStoryboardReplaceSegueTemplate = _Class("UIStoryboardReplaceSegueTemplate")
UIStoryboardPushSegueTemplate = _Class("UIStoryboardPushSegueTemplate")
UIStoryboardModalSegueTemplate = _Class("UIStoryboardModalSegueTemplate")
UIStoryboardPopoverSegueTemplate = _Class("UIStoryboardPopoverSegueTemplate")
UIStoryboardPresentationSegueTemplate = _Class("UIStoryboardPresentationSegueTemplate")
UIStoryboardPopoverPresentationSegueTemplate = _Class(
"UIStoryboardPopoverPresentationSegueTemplate"
)
UIStoryboardShowSegueTemplate = _Class("UIStoryboardShowSegueTemplate")
UIRemoteInputViewControllerInterface = _Class("UIRemoteInputViewControllerInterface")
UIInputViewControllerInterfaceClient = _Class("UIInputViewControllerInterfaceClient")
_UIFilteredDataSource = _Class("_UIFilteredDataSource")
_UIDictationTelephonyMonitor = _Class("_UIDictationTelephonyMonitor")
UIDictationConnectionPreferences = _Class("UIDictationConnectionPreferences")
UIDictationConnection = _Class("UIDictationConnection")
UIDictationController = _Class("UIDictationController")
UIScribbleInteraction = _Class("UIScribbleInteraction")
_UISearchBarTextFieldTokenCounter = _Class("_UISearchBarTextFieldTokenCounter")
_UITextFieldPaddedMetricsProvider = _Class("_UITextFieldPaddedMetricsProvider")
_UILargeContentViewerItemStoredProperties = _Class(
"_UILargeContentViewerItemStoredProperties"
)
_UITextInputControllerLayoutManagerConnection = _Class(
"_UITextInputControllerLayoutManagerConnection"
)
UITextCheckingController = _Class("UITextCheckingController")
UITextPosition = _Class("UITextPosition")
UIWebCaretRectTextPosition = _Class("UIWebCaretRectTextPosition")
UITextPositionImpl = _Class("UITextPositionImpl")
_UITextKitTextPosition = _Class("_UITextKitTextPosition")
UITextRange = _Class("UITextRange")
UITextRangeImpl = _Class("UITextRangeImpl")
_UITextKitTextRange = _Class("_UITextKitTextRange")
UITextInputController = _Class("UITextInputController")
_UIAutoScrollerItemBehavior = _Class("_UIAutoScrollerItemBehavior")
_UIAutoScrollAssistant = _Class("_UIAutoScrollAssistant")
UIFeedbackGenerator = _Class("UIFeedbackGenerator")
_UIModulationFeedbackGenerator = _Class("_UIModulationFeedbackGenerator")
_UIClickFeedbackGenerator = _Class("_UIClickFeedbackGenerator")
_UIButtonFeedbackGenerator = _Class("_UIButtonFeedbackGenerator")
_UIFeedbackButtonBehavior = _Class("_UIFeedbackButtonBehavior")
_UIFeedbackBehavior = _Class("_UIFeedbackBehavior")
_UIClickPresentationFeedbackGenerator = _Class("_UIClickPresentationFeedbackGenerator")
_UIKeyboardFeedbackGenerator = _Class("_UIKeyboardFeedbackGenerator")
_UIFeedbackKeyboardBehavior = _Class("_UIFeedbackKeyboardBehavior")
_UIDragFeedbackGenerator = _Class("_UIDragFeedbackGenerator")
_UIFeedbackDragBehavior = _Class("_UIFeedbackDragBehavior")
_UIDragSnappingFeedbackGenerator = _Class("_UIDragSnappingFeedbackGenerator")
_UIFeedbackDragSnappingBehavior = _Class("_UIFeedbackDragSnappingBehavior")
_UIStatesFeedbackGenerator = _Class("_UIStatesFeedbackGenerator")
_UIFeedbackStatesBehavior = _Class("_UIFeedbackStatesBehavior")
UISelectionFeedbackGenerator = _Class("UISelectionFeedbackGenerator")
_UIFeedbackRetargetBehavior = _Class("_UIFeedbackRetargetBehavior")
UINotificationFeedbackGenerator = _Class("UINotificationFeedbackGenerator")
_UIFeedbackEventBehavior = _Class("_UIFeedbackEventBehavior")
UIImpactFeedbackGenerator = _Class("UIImpactFeedbackGenerator")
_UIFeedbackImpactBehavior = _Class("_UIFeedbackImpactBehavior")
_UIEdgeFeedbackGenerator = _Class("_UIEdgeFeedbackGenerator")
_UIFeedbackEdgeBehavior = _Class("_UIFeedbackEdgeBehavior")
_UIZoomEdgeFeedbackGenerator = _Class("_UIZoomEdgeFeedbackGenerator")
_UIFeedbackZoomEdgeBehavior = _Class("_UIFeedbackZoomEdgeBehavior")
_UIFeedbackGeneratorConfiguration = _Class("_UIFeedbackGeneratorConfiguration")
_UIModulationFeedbackGeneratorConfiguration = _Class(
"_UIModulationFeedbackGeneratorConfiguration"
)
_UINotificationFeedbackGeneratorConfiguration = _Class(
"_UINotificationFeedbackGeneratorConfiguration"
)
_UIFeedbackEventBehaviorConfiguration = _Class("_UIFeedbackEventBehaviorConfiguration")
_UIImpactFeedbackGeneratorConfiguration = _Class(
"_UIImpactFeedbackGeneratorConfiguration"
)
_UIFeedbackImpactBehaviorConfiguration = _Class(
"_UIFeedbackImpactBehaviorConfiguration"
)
_UIKeyboardFeedbackGeneratorConfiguration = _Class(
"_UIKeyboardFeedbackGeneratorConfiguration"
)
_UIFeedbackKeyboardBehaviorConfiguration = _Class(
"_UIFeedbackKeyboardBehaviorConfiguration"
)
_UIStatesFeedbackGeneratorConfiguration = _Class(
"_UIStatesFeedbackGeneratorConfiguration"
)
_UIStatesFeedbackGeneratorSwipeActionConfiguration = _Class(
"_UIStatesFeedbackGeneratorSwipeActionConfiguration"
)
_UIFeedbackSwipeActionStatesBehaviorConfiguration = _Class(
"_UIFeedbackSwipeActionStatesBehaviorConfiguration"
)
_UIStatesFeedbackGeneratorPreviewConfiguration = _Class(
"_UIStatesFeedbackGeneratorPreviewConfiguration"
)
_UIFeedbackPreviewStatesBehaviorConfiguration = _Class(
"_UIFeedbackPreviewStatesBehaviorConfiguration"
)
_UIFeedbackGeneratorUserInteractionDrivenConfiguration = _Class(
"_UIFeedbackGeneratorUserInteractionDrivenConfiguration"
)
_UIClickFeedbackGeneratorConfiguration = _Class(
"_UIClickFeedbackGeneratorConfiguration"
)
_UIButtonFeedbackGeneratorConfiguration = _Class(
"_UIButtonFeedbackGeneratorConfiguration"
)
_UIFeedbackButtonBehaviorConfiguration = _Class(
"_UIFeedbackButtonBehaviorConfiguration"
)
_UISelectionFeedbackGeneratorConfiguration = _Class(
"_UISelectionFeedbackGeneratorConfiguration"
)
_UIFeedbackRetargetBehaviorConfiguration = _Class(
"_UIFeedbackRetargetBehaviorConfiguration"
)
_UIClickPresentationFeedbackGeneratorConfiguration = _Class(
"_UIClickPresentationFeedbackGeneratorConfiguration"
)
_UIDragFeedbackGeneratorConfiguration = _Class("_UIDragFeedbackGeneratorConfiguration")
_UIFeedbackDragBehaviorConfiguration = _Class("_UIFeedbackDragBehaviorConfiguration")
_UIDragSnappingFeedbackGeneratorConfiguration = _Class(
"_UIDragSnappingFeedbackGeneratorConfiguration"
)
_UIEdgeFeedbackGeneratorConfiguration = _Class("_UIEdgeFeedbackGeneratorConfiguration")
_UIFeedbackEdgeBehaviorConfiguration = _Class("_UIFeedbackEdgeBehaviorConfiguration")
_UIFullFontSize = _Class("_UIFullFontSize")
_UITextFieldPassthroughMetricsProvider = _Class(
"_UITextFieldPassthroughMetricsProvider"
)
_UITextFieldBackgroundProvider = _Class("_UITextFieldBackgroundProvider")
_UITextFieldDrawingBackgroundProvider = _Class("_UITextFieldDrawingBackgroundProvider")
_UITextFieldLineBackgroundProvider = _Class("_UITextFieldLineBackgroundProvider")
_UITextFieldBezelBackgroundProvider = _Class("_UITextFieldBezelBackgroundProvider")
_UITextFieldViewBackgroundProvider = _Class("_UITextFieldViewBackgroundProvider")
_UITextFieldTVBackgroundProvider = _Class("_UITextFieldTVBackgroundProvider")
_UITextFieldMacBackgroundProvider = _Class("_UITextFieldMacBackgroundProvider")
_UITextFieldImageBackgroundProvider = _Class("_UITextFieldImageBackgroundProvider")
_UITextFieldSystemBackgroundProvider = _Class("_UITextFieldSystemBackgroundProvider")
_UITextFieldPasscodeBackgroundProvider = _Class(
"_UITextFieldPasscodeBackgroundProvider"
)
_UITextFieldNoBackgroundProvider = _Class("_UITextFieldNoBackgroundProvider")
_UITextFieldVisualStyle = _Class("_UITextFieldVisualStyle")
_UITextFieldVisualStyle_tvOS = _Class("_UITextFieldVisualStyle_tvOS")
_UITextFieldVisualStyle_iOS = _Class("_UITextFieldVisualStyle_iOS")
UIAccessibilityHUDGestureManager = _Class("UIAccessibilityHUDGestureManager")
UILargeContentViewerInteraction = _Class("UILargeContentViewerInteraction")
_UISearchBarLayoutBase = _Class("_UISearchBarLayoutBase")
_UISearchBarScopeContainerLayout = _Class("_UISearchBarScopeContainerLayout")
_UISearchBarSearchContainerLayout = _Class("_UISearchBarSearchContainerLayout")
_UISearchBarLayout = _Class("_UISearchBarLayout")
_UISearchBarVisualProviderIOS = _Class("_UISearchBarVisualProviderIOS")
UITextInputTraits = _Class("UITextInputTraits")
_UITextInputSessionAccumulator = _Class("_UITextInputSessionAccumulator")
UINavigationItem = _Class("UINavigationItem")
_UIDocumentPickerNavigationItem = _Class("_UIDocumentPickerNavigationItem")
_UISearchBarNavigationItem = _Class("_UISearchBarNavigationItem")
_UISceneEventRegistry = _Class("_UISceneEventRegistry")
UIBezierPath = _Class("UIBezierPath")
_UIActivityIndicatorViewArtworkCacheKey = _Class(
"_UIActivityIndicatorViewArtworkCacheKey"
)
_UIViewLayoutEngineRelativeAlignmentRectOriginCache = _Class(
"_UIViewLayoutEngineRelativeAlignmentRectOriginCache"
)
_UISceneEventResponse = _Class("_UISceneEventResponse")
_UISimpleFenceProvider = _Class("_UISimpleFenceProvider")
UIApplicationSceneClientSettingsDiffInspector = _Class(
"UIApplicationSceneClientSettingsDiffInspector"
)
UIApplicationSceneSettingsDiffInspector = _Class(
"UIApplicationSceneSettingsDiffInspector"
)
_UIFocusUpdateRequest = _Class("_UIFocusUpdateRequest")
_UIAccessibilityFocusUpdateRequest = _Class("_UIAccessibilityFocusUpdateRequest")
UIInputViewAnimationStyle = _Class("UIInputViewAnimationStyle")
_UIKeyboardAnimatorAnimationStyle = _Class("_UIKeyboardAnimatorAnimationStyle")
UIInputViewAnimationStyleDirectional = _Class("UIInputViewAnimationStyleDirectional")
_UIViewControllerKeyboardAnimationStyle = _Class(
"_UIViewControllerKeyboardAnimationStyle"
)
_UITextInputSessionAction = _Class("_UITextInputSessionAction")
_UITextInputSessionInsertionAction = _Class("_UITextInputSessionInsertionAction")
_UITextInputSessionRedoAction = _Class("_UITextInputSessionRedoAction")
_UITextInputSessionUndoAction = _Class("_UITextInputSessionUndoAction")
_UITextInputSessionSelectionAction = _Class("_UITextInputSessionSelectionAction")
_UITextInputSessionDeletionAction = _Class("_UITextInputSessionDeletionAction")
_UITextInputSessionBeganAction = _Class("_UITextInputSessionBeganAction")
UITextInputSessionActionAnalytics = _Class("UITextInputSessionActionAnalytics")
UIKeyboardInputModeController = _Class("UIKeyboardInputModeController")
_UIScenePointerLockDiffAction = _Class("_UIScenePointerLockDiffAction")
UIPointerLockState = _Class("UIPointerLockState")
UIViewPropertyAnimatorTrackingState = _Class("UIViewPropertyAnimatorTrackingState")
UIViewPropertyAnimator = _Class("UIViewPropertyAnimator")
_UISwipePropertyAnimator = _Class("_UISwipePropertyAnimator")
_UIPanelCoordinatingAnimator = _Class("_UIPanelCoordinatingAnimator")
_UIViewControllerImmediateAnimationTransitionCoordinator = _Class(
"_UIViewControllerImmediateAnimationTransitionCoordinator"
)
_UISheetPresentationControllerConfiguration = _Class(
"_UISheetPresentationControllerConfiguration"
)
_UIEventEnvironmentClearTouchesContext = _Class(
"_UIEventEnvironmentClearTouchesContext"
)
_UIObjectPerCanvas = _Class("_UIObjectPerCanvas")
UITextEffectsHostingInfo = _Class("UITextEffectsHostingInfo")
UIViewControllerBuiltinTransitionViewAnimator = _Class(
"UIViewControllerBuiltinTransitionViewAnimator"
)
UIBarItem = _Class("UIBarItem")
UITabBarItem = _Class("UITabBarItem")
UIBarButtonItem = _Class("UIBarButtonItem")
UISplitViewControllerDisplayModeBarButtonItem = _Class(
"UISplitViewControllerDisplayModeBarButtonItem"
)
_UIFloatableBarButtonItem = _Class("_UIFloatableBarButtonItem")
UIFocusRingManager = _Class("UIFocusRingManager")
_UIDelayedPresentationContext = _Class("_UIDelayedPresentationContext")
_UISystemBaselineConstraint = _Class("_UISystemBaselineConstraint")
_UILayoutSupportConstraint = _Class("_UILayoutSupportConstraint")
_UIWindowAutoresizingConstraint = _Class("_UIWindowAutoresizingConstraint")
_UIScrollViewAutomaticContentSizeConstraint = _Class(
"_UIScrollViewAutomaticContentSizeConstraint"
)
_UIWindowAnchoringConstraint = _Class("_UIWindowAnchoringConstraint")
_UIImageViewExtendedStorage = _Class("_UIImageViewExtendedStorage")
_UIPointerEffectSizeRuleSettings = _Class("_UIPointerEffectSizeRuleSettings")
_UISearchBarBehaviorSettings = _Class("_UISearchBarBehaviorSettings")
_UITabBarBehaviorSettings = _Class("_UITabBarBehaviorSettings")
_UINavigationAndToolbarBehaviorSettings = _Class(
"_UINavigationAndToolbarBehaviorSettings"
)
_UIButtonBehaviorSettings = _Class("_UIButtonBehaviorSettings")
_UIPointerTextBehaviorSettings = _Class("_UIPointerTextBehaviorSettings")
_UIFreeformPointerSettings = _Class("_UIFreeformPointerSettings")
_UILinkPointerSettings = _Class("_UILinkPointerSettings")
_UIBeamPointerSettings = _Class("_UIBeamPointerSettings")
_UIPointerEffectSettings = _Class("_UIPointerEffectSettings")
_UIPointerSBAppIconEffectSettings = _Class("_UIPointerSBAppIconEffectSettings")
_UIPointerHoverEffectSettings = _Class("_UIPointerHoverEffectSettings")
_UIPointerLiftEffectSettings = _Class("_UIPointerLiftEffectSettings")
_UIPointerHighlightEffectSettings = _Class("_UIPointerHighlightEffectSettings")
_UIPointerSettings = _Class("_UIPointerSettings")
_UIPageControlIndicatorSettings = _Class("_UIPageControlIndicatorSettings")
_UIPageControlPlatterSettings = _Class("_UIPageControlPlatterSettings")
_UIPageControlSettings = _Class("_UIPageControlSettings")
_UISettings = _Class("_UISettings")
_UIMotionAnalyzerSettings = _Class("_UIMotionAnalyzerSettings")
_UIScreenEdgePanRecognizerCornerSettings = _Class(
"_UIScreenEdgePanRecognizerCornerSettings"
)
_UIScreenEdgePanRecognizerDwellSettings = _Class(
"_UIScreenEdgePanRecognizerDwellSettings"
)
_UIScreenEdgePanRecognizerEdgeSettings = _Class(
"_UIScreenEdgePanRecognizerEdgeSettings"
)
_UIScreenEdgePanRecognizerSettings = _Class("_UIScreenEdgePanRecognizerSettings")
_UITextSelectionSettings = _Class("_UITextSelectionSettings")
_UIActivityIndicatorSettings = _Class("_UIActivityIndicatorSettings")
_UIPageControlSettingsDomain = _Class("_UIPageControlSettingsDomain")
_UIPointerSettingsDomain = _Class("_UIPointerSettingsDomain")
_UIActivityIndicatorSettingsDomain = _Class("_UIActivityIndicatorSettingsDomain")
UILayoutGuide = _Class("UILayoutGuide")
_UIScrollViewLayoutGuide = _Class("_UIScrollViewLayoutGuide")
_UIContentConstraintsLayoutGuide = _Class("_UIContentConstraintsLayoutGuide")
_UILayoutSpacer = _Class("_UILayoutSpacer")
_UIOLAGapGuide = _Class("_UIOLAGapGuide")
_UIScrollViewContentOffsetGuide = _Class("_UIScrollViewContentOffsetGuide")
UIFocusGuide = _Class("UIFocusGuide")
UIKBFocusGuide = _Class("UIKBFocusGuide")
UIFocusContainerGuide = _Class("UIFocusContainerGuide")
UIViewAnimationBlockDelegate = _Class("UIViewAnimationBlockDelegate")
UIViewAnimationState = _Class("UIViewAnimationState")
UIViewKeyframeAnimationState = _Class("UIViewKeyframeAnimationState")
UIViewInProcessAnimationState = _Class("UIViewInProcessAnimationState")
UIViewPropertyCollectingAnimationState = _Class(
"UIViewPropertyCollectingAnimationState"
)
UIViewSpringAnimationState = _Class("UIViewSpringAnimationState")
UIStatusBarAnimationParameters = _Class("UIStatusBarAnimationParameters")
UIStatusBarHideAnimationParameters = _Class("UIStatusBarHideAnimationParameters")
UIStatusBarStyleAnimationParameters = _Class("UIStatusBarStyleAnimationParameters")
UIStatusBarOrientationAnimationParameters = _Class(
"UIStatusBarOrientationAnimationParameters"
)
_UIScreenFixedCoordinateSpace = _Class("_UIScreenFixedCoordinateSpace")
_UIViewControllerTransitionCoordinator = _Class(
"_UIViewControllerTransitionCoordinator"
)
_UIWindowAnimationController = _Class("_UIWindowAnimationController")
_UIHostedWindowAnimationController = _Class("_UIHostedWindowAnimationController")
_UIWindowRotationAnimationController = _Class("_UIWindowRotationAnimationController")
_UIViewControllerTransitionContext = _Class("_UIViewControllerTransitionContext")
_UIViewControllerOneToOneTransitionContext = _Class(
"_UIViewControllerOneToOneTransitionContext"
)
UIOpenURLContext = _Class("UIOpenURLContext")
_UISelectorDictionary = _Class("_UISelectorDictionary")
_UICommandIdentifierDictionary = _Class("_UICommandIdentifierDictionary")
_UIMenuBuilder = _Class("_UIMenuBuilder")
UIMenuSystem = _Class("UIMenuSystem")
UIMenuElement = _Class("UIMenuElement")
UIDeferredMenuElement = _Class("UIDeferredMenuElement")
UIAction = _Class("UIAction")
_UIImmutableAction = _Class("_UIImmutableAction")
UIMenu = _Class("UIMenu")
UICommand = _Class("UICommand")
_UIImmutableCommand = _Class("_UIImmutableCommand")
_UIValidatableCommand = _Class("_UIValidatableCommand")
UIKeyCommand = _Class("UIKeyCommand")
_UIImmutableKeyCommand = _Class("_UIImmutableKeyCommand")
_UIWindowOrientationUpdate = _Class("_UIWindowOrientationUpdate")
_UISheetDetent = _Class("_UISheetDetent")
_UISheetLayoutInfo = _Class("_UISheetLayoutInfo")
UIPresentationController = _Class("UIPresentationController")
_UIPreviewPlatterPresentationController = _Class(
"_UIPreviewPlatterPresentationController"
)
_UISearchFormSheetPresentationController = _Class(
"_UISearchFormSheetPresentationController"
)
_UISearchPresentationController = _Class("_UISearchPresentationController")
_UISearchCarPlayPresentationController = _Class(
"_UISearchCarPlayPresentationController"
)
_UISearchATVPresentationController = _Class("_UISearchATVPresentationController")
UIKeyboardVCPresentationController = _Class("UIKeyboardVCPresentationController")
_UIProgressiveBlurPresentationController = _Class(
"_UIProgressiveBlurPresentationController"
)
_UIActionSheetCompactPresentationController = _Class(
"_UIActionSheetCompactPresentationController"
)
_UIAlertControllerPresentationController = _Class(
"_UIAlertControllerPresentationController"
)
_UIAlertControllerActionSheetCompactPresentationController = _Class(
"_UIAlertControllerActionSheetCompactPresentationController"
)
_UIAlertControllerAlertPresentationController = _Class(
"_UIAlertControllerAlertPresentationController"
)
_UICurrentContextPresentationController = _Class(
"_UICurrentContextPresentationController"
)
_UIOverCurrentContextPresentationController = _Class(
"_UIOverCurrentContextPresentationController"
)
_UIFullscreenPresentationController = _Class("_UIFullscreenPresentationController")
_UIOverFullscreenPresentationController = _Class(
"_UIOverFullscreenPresentationController"
)
UIPreviewPresentationController = _Class("UIPreviewPresentationController")
_UIPreviewPresentationController = _Class("_UIPreviewPresentationController")
_UIPreviewPresentationController2 = _Class("_UIPreviewPresentationController2")
UIPopoverPresentationController = _Class("UIPopoverPresentationController")
_UISharingViewPresentationController = _Class("_UISharingViewPresentationController")
_UISearchPopoverPresentationController = _Class(
"_UISearchPopoverPresentationController"
)
_UIActionSheetPresentationController = _Class("_UIActionSheetPresentationController")
_UIAlertControllerActionSheetRegularPresentationController = _Class(
"_UIAlertControllerActionSheetRegularPresentationController"
)
_UISheetPresentationController = _Class("_UISheetPresentationController")
_UIFormSheetPresentationController = _Class("_UIFormSheetPresentationController")
_UIPageSheetPresentationController = _Class("_UIPageSheetPresentationController")
_UIRootPresentationController = _Class("_UIRootPresentationController")
UICustomObject = _Class("UICustomObject")
UIStoryboardDecodingContext = _Class("UIStoryboardDecodingContext")
UIClassSwapper = _Class("UIClassSwapper")
UIProxyObject = _Class("UIProxyObject")
UIRuntimeConnection = _Class("UIRuntimeConnection")
UIRuntimeOutletCollectionConnection = _Class("UIRuntimeOutletCollectionConnection")
UIRuntimeEventConnection = _Class("UIRuntimeEventConnection")
UIRuntimeOutletConnection = _Class("UIRuntimeOutletConnection")
UIStoryboardScene = _Class("UIStoryboardScene")
UINibStorage = _Class("UINibStorage")
UINib = _Class("UINib")
UITextFormattingCoordinator = _Class("UITextFormattingCoordinator")
UIInputViewSet = _Class("UIInputViewSet")
_UIWindowSceneStatusBarSettingsDiffAction = _Class(
"_UIWindowSceneStatusBarSettingsDiffAction"
)
_UIFocusSystemSceneComponent = _Class("_UIFocusSystemSceneComponent")
_UIFocusSystemKeyboardSceneComponent = _Class("_UIFocusSystemKeyboardSceneComponent")
UIAlertControllerStackManager = _Class("UIAlertControllerStackManager")
_UIBannerManager = _Class("_UIBannerManager")
_UISystemAppearanceManager = _Class("_UISystemAppearanceManager")
UIStatusBarManager = _Class("UIStatusBarManager")
_UIWindowSceneCoordinateSpace = _Class("_UIWindowSceneCoordinateSpace")
_UIScenefbsSceneBasedMetricsCalculator = _Class(
"_UIScenefbsSceneBasedMetricsCalculator"
)
_UIContextBinder = _Class("_UIContextBinder")
_UIContextBinderSubstrate = _Class("_UIContextBinderSubstrate")
_UINullSubstrate = _Class("_UINullSubstrate")
_UIFBSSceneSubstrate = _Class("_UIFBSSceneSubstrate")
_UISceneLifecycleMonitor = _Class("_UISceneLifecycleMonitor")
_UIWindowSceneFBSSceneLifecycleMonitor = _Class(
"_UIWindowSceneFBSSceneLifecycleMonitor"
)
_UIWindowHostingSceneSafeAreaInsetsSettingsDiffAction = _Class(
"_UIWindowHostingSceneSafeAreaInsetsSettingsDiffAction"
)
_UIWindowSceneOcclusionSettingsDiffAction = _Class(
"_UIWindowSceneOcclusionSettingsDiffAction"
)
_UIWindowSceneGeometrySettingsDiffAction = _Class(
"_UIWindowSceneGeometrySettingsDiffAction"
)
_UIWindowSceneDeviceOrientationSettingsDiffAction = _Class(
"_UIWindowSceneDeviceOrientationSettingsDiffAction"
)
_UIWindowSceneUserInterfaceStyleSettingsDiffAction = _Class(
"_UIWindowSceneUserInterfaceStyleSettingsDiffAction"
)
_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction = _Class(
"_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction"
)
_UIWindowSceneDisplayConfigurationSettingsDiffAction = _Class(
"_UIWindowSceneDisplayConfigurationSettingsDiffAction"
)
UISceneActivationConditions = _Class("UISceneActivationConditions")
UISceneConnectionOptions = _Class("UISceneConnectionOptions")
_UISceneConnectionOptionsContext = _Class("_UISceneConnectionOptionsContext")
_UISceneApplicationActionsHandler = _Class("_UISceneApplicationActionsHandler")
_UICanvasApplicationSceneActionsHandler = _Class(
"_UICanvasApplicationSceneActionsHandler"
)
_UISceneSnapshotBSActionsHandler = _Class("_UISceneSnapshotBSActionsHandler")
_UISceneCloudKitShareMetadataBSActionHandler = _Class(
"_UISceneCloudKitShareMetadataBSActionHandler"
)
_UISceneShortcutItemBSActionsHandler = _Class("_UISceneShortcutItemBSActionsHandler")
_UISceneUserNotificationsBSActionsHandler = _Class(
"_UISceneUserNotificationsBSActionsHandler"
)
_UISceneOpenURLBSActionsHandler = _Class("_UISceneOpenURLBSActionsHandler")
_UISceneUserActivityBSActionsHandler = _Class("_UISceneUserActivityBSActionsHandler")
UIStoryboard = _Class("UIStoryboard")
UISceneConfiguration = _Class("UISceneConfiguration")
UISceneSession = _Class("UISceneSession")
_UICanvasDefinition = _Class("_UICanvasDefinition")
_UIMutableCanvasDefinition = _Class("_UIMutableCanvasDefinition")
_UIWeakReference = _Class("_UIWeakReference")
_UIBoxedAutoreleasePoolMark = _Class("_UIBoxedAutoreleasePoolMark")
_UIAfterCACommitBlock = _Class("_UIAfterCACommitBlock")
_UIObjectReferenceCounter = _Class("_UIObjectReferenceCounter")
_UIBackgroundTaskInfo = _Class("_UIBackgroundTaskInfo")
UIPasteboard = _Class("UIPasteboard")
_UIConcretePasteboard = _Class("_UIConcretePasteboard")
_UIImageContentRendition = _Class("_UIImageContentRendition")
_UIImageContentContextualEffect = _Class("_UIImageContentContextualEffect")
_UIImageContentLayout = _Class("_UIImageContentLayout")
_UIImageContentLayoutDrawingTarget = _Class("_UIImageContentLayoutDrawingTarget")
UIGraphicsRendererContext = _Class("UIGraphicsRendererContext")
UIGraphicsPDFRendererContext = _Class("UIGraphicsPDFRendererContext")
UIGraphicsImageRendererContext = _Class("UIGraphicsImageRendererContext")
_UIReusePool = _Class("_UIReusePool")
UIGraphicsRenderer = _Class("UIGraphicsRenderer")
UIGraphicsPDFRenderer = _Class("UIGraphicsPDFRenderer")
UIGraphicsImageRenderer = _Class("UIGraphicsImageRenderer")
UIGraphicsRendererFormat = _Class("UIGraphicsRendererFormat")
UIGraphicsPDFRendererFormat = _Class("UIGraphicsPDFRendererFormat")
UIGraphicsImageRendererFormat = _Class("UIGraphicsImageRendererFormat")
_UIFieldEditorLayoutManager = _Class("_UIFieldEditorLayoutManager")
_UILabelContent = _Class("_UILabelContent")
_UILabelAttributedStringContent = _Class("_UILabelAttributedStringContent")
_UILabelStringContent = _Class("_UILabelStringContent")
_UITextAttributeDefaultCategories = _Class("_UITextAttributeDefaultCategories")
_UITextAttributeDefaults = _Class("_UITextAttributeDefaults")
_UILabelVisualStyle = _Class("_UILabelVisualStyle")
_UILabelVisualStyle_tvOS = _Class("_UILabelVisualStyle_tvOS")
_UILabelVisualStyle_iOS = _Class("_UILabelVisualStyle_iOS")
UIFocusSystem = _Class("UIFocusSystem")
_UIHostedFocusSystem = _Class("_UIHostedFocusSystem")
UIButtonContent = _Class("UIButtonContent")
UIControlTargetAction = _Class("UIControlTargetAction")
_UIPointerArbiterCore_iOS = _Class("_UIPointerArbiterCore_iOS")
_UIPointerArbiter = _Class("_UIPointerArbiter")
UIGestureGraphElement = _Class("UIGestureGraphElement")
UIGestureGraphEdge = _Class("UIGestureGraphEdge")
UIGestureGraphNode = _Class("UIGestureGraphNode")
UITapRecognizer = _Class("UITapRecognizer")
UIGestureRecognizerTarget = _Class("UIGestureRecognizerTarget")
UIGestureRecognizer = _Class("UIGestureRecognizer")
_UIContextMenuActionScrubbingHandoffGestureRecognizer = _Class(
"_UIContextMenuActionScrubbingHandoffGestureRecognizer"
)
UIDragRecognizer = _Class("UIDragRecognizer")
_UIFocusLinearMovementDebugGestureRecognizer = _Class(
"_UIFocusLinearMovementDebugGestureRecognizer"
)
_UIStatusBarActionGestureRecognizer = _Class("_UIStatusBarActionGestureRecognizer")
_UITouchDownGestureRecognizer = _Class("_UITouchDownGestureRecognizer")
_UISteadyTouchForceGestureRecognizer = _Class("_UISteadyTouchForceGestureRecognizer")
_UIPreviewInteractionFailureRelationshipGestureRecognizer = _Class(
"_UIPreviewInteractionFailureRelationshipGestureRecognizer"
)
_UIGestureStudyMetricsGestureRecognizer = _Class(
"_UIGestureStudyMetricsGestureRecognizer"
)
_UITouchesObservingGestureRecognizer = _Class("_UITouchesObservingGestureRecognizer")
_UIPreviewInteractionTouchObservingGestureRecognizer = _Class(
"_UIPreviewInteractionTouchObservingGestureRecognizer"
)
_UIKeyboardTextSelectionTouchesObservingGestureRecognizer = _Class(
"_UIKeyboardTextSelectionTouchesObservingGestureRecognizer"
)
_UIPassthroughGateGestureRecognizer = _Class("_UIPassthroughGateGestureRecognizer")
_UIInterruptScrollDecelerationGestureRecognizer = _Class(
"_UIInterruptScrollDecelerationGestureRecognizer"
)
UITouchForceGestureRecognizer = _Class("UITouchForceGestureRecognizer")
UIDigitizerLongPressGestureRecognizer = _Class("UIDigitizerLongPressGestureRecognizer")
UIDigitizerTapGestureRecognizer = _Class("UIDigitizerTapGestureRecognizer")
_UIDirectTouchObserverGestureRecognizer = _Class(
"_UIDirectTouchObserverGestureRecognizer"
)
UIImmediateEdgeSwipeGestureRecognizer = _Class("UIImmediateEdgeSwipeGestureRecognizer")
_UIPendingEdgeSwipeGestureRecognizer = _Class("_UIPendingEdgeSwipeGestureRecognizer")
_UIExclusiveTouchGestureRecognizer = _Class("_UIExclusiveTouchGestureRecognizer")
UIHBLongClickGestureRecognizer = _Class("UIHBLongClickGestureRecognizer")
UIHBDownGestureRecognizer = _Class("UIHBDownGestureRecognizer")
UIHBClickGestureRecognizer = _Class("UIHBClickGestureRecognizer")
_UIFocusPressGestureRecognizer = _Class("_UIFocusPressGestureRecognizer")
_UIRepeatingPressGestureRecognizer = _Class("_UIRepeatingPressGestureRecognizer")
UIScrollViewDirectionalPressGestureRecognizer = _Class(
"UIScrollViewDirectionalPressGestureRecognizer"
)
_UIFocusEngineRepeatingPressGestureRecognizer = _Class(
"_UIFocusEngineRepeatingPressGestureRecognizer"
)
_UIFocusEngineJoystickGestureRecognizer = _Class(
"_UIFocusEngineJoystickGestureRecognizer"
)
_UIContextMenuSelectionGestureRecognizer = _Class(
"_UIContextMenuSelectionGestureRecognizer"
)
_UITrackingGestureRecognizer = _Class("_UITrackingGestureRecognizer")
_UITabBarTouchDetectionGestureRecognizer = _Class(
"_UITabBarTouchDetectionGestureRecognizer"
)
_UIContextMenuSelectionDelayGestureRecognizer = _Class(
"_UIContextMenuSelectionDelayGestureRecognizer"
)
_UIInterfaceActionSelectionDelayGestureRecognizer = _Class(
"_UIInterfaceActionSelectionDelayGestureRecognizer"
)
UIWebTouchEventsGestureRecognizer = _Class("UIWebTouchEventsGestureRecognizer")
UIKeyboardPinchGestureRecognizer = _Class("UIKeyboardPinchGestureRecognizer")
UIScrollViewPagingSwipeGestureRecognizer = _Class(
"UIScrollViewPagingSwipeGestureRecognizer"
)
_UIPassthroughScrollGestureRecognizer = _Class("_UIPassthroughScrollGestureRecognizer")
_UISwipeDismissalGestureRecognizer = _Class("_UISwipeDismissalGestureRecognizer")
UITextMultiTapRecognizer = _Class("UITextMultiTapRecognizer")
UITapAndAHalfRecognizer = _Class("UITapAndAHalfRecognizer")
_UITouchDurationObservingGestureRecognizer = _Class(
"_UITouchDurationObservingGestureRecognizer"
)
_UIContextualMenuGestureRecognizer = _Class("_UIContextualMenuGestureRecognizer")
_UISecondaryClickDriverGestureRecognizer = _Class(
"_UISecondaryClickDriverGestureRecognizer"
)
_UIRelationshipGestureRecognizer = _Class("_UIRelationshipGestureRecognizer")
UIRotationGestureRecognizer = _Class("UIRotationGestureRecognizer")
UIPinchGestureRecognizer = _Class("UIPinchGestureRecognizer")
UIScrollViewPinchGestureRecognizer = _Class("UIScrollViewPinchGestureRecognizer")
UIKeyboardFloatingPinchGestureRecognizer = _Class(
"UIKeyboardFloatingPinchGestureRecognizer"
)
UIKBProductivityPinchGestureRecognizer = _Class(
"UIKBProductivityPinchGestureRecognizer"
)
UIUndoGestureObserver = _Class("UIUndoGestureObserver")
UIDragGestureRecognizer = _Class("UIDragGestureRecognizer")
UISpringLoadedGestureRecognizer = _Class("UISpringLoadedGestureRecognizer")
UIDropInteractionGestureRecognizer = _Class("UIDropInteractionGestureRecognizer")
_UIDragAutoScrollGestureRecognizer = _Class("_UIDragAutoScrollGestureRecognizer")
UIPanGestureRecognizer = _Class("UIPanGestureRecognizer")
_UIFocusEnginePanGestureRecognizer = _Class("_UIFocusEnginePanGestureRecognizer")
_UIBarPanGestureRecognizer = _Class("_UIBarPanGestureRecognizer")
UITextRangeAdjustmentGestureRecognizer = _Class(
"UITextRangeAdjustmentGestureRecognizer"
)
_UISwipeActionPanGestureRecognizer = _Class("_UISwipeActionPanGestureRecognizer")
_UIMultiSelectOneFingerPanGesture = _Class("_UIMultiSelectOneFingerPanGesture")
UITextLoupePanGestureRecognizer = _Class("UITextLoupePanGestureRecognizer")
_UIPanOrFlickGestureRecognizer = _Class("_UIPanOrFlickGestureRecognizer")
_UIEditableTextSelectionTwoFingerPanGesture = _Class(
"_UIEditableTextSelectionTwoFingerPanGesture"
)
UIScreenEdgePanGestureRecognizer = _Class("UIScreenEdgePanGestureRecognizer")
_UIParallaxTransitionPanGestureRecognizer = _Class(
"_UIParallaxTransitionPanGestureRecognizer"
)
UIKBProductivityPanGestureRecognizer = _Class("UIKBProductivityPanGestureRecognizer")
UIScrollViewPanGestureRecognizer = _Class("UIScrollViewPanGestureRecognizer")
UIScrollViewDelayedTouchesBeganGestureRecognizer = _Class(
"UIScrollViewDelayedTouchesBeganGestureRecognizer"
)
UITapGestureRecognizer = _Class("UITapGestureRecognizer")
_UIEditableTextSelectionTwoFingerTapGesture = _Class(
"_UIEditableTextSelectionTwoFingerTapGesture"
)
_CarButtonTapGestureRecognizer = _Class("_CarButtonTapGestureRecognizer")
_UIDismissCurlUpTapGestureRecognizer = _Class("_UIDismissCurlUpTapGestureRecognizer")
_UIBarTapGestureRecognizer = _Class("_UIBarTapGestureRecognizer")
_UIInterfaceActionSelectByPressGestureRecognizer = _Class(
"_UIInterfaceActionSelectByPressGestureRecognizer"
)
_UISingleFingerTapExtensionGesture = _Class("_UISingleFingerTapExtensionGesture")
UITextTapRecognizer = _Class("UITextTapRecognizer")
UISelectionTapRecognizer = _Class("UISelectionTapRecognizer")
_UIDragAddItemsGesture = _Class("_UIDragAddItemsGesture")
UIKBProductivityDoubleTapGesture = _Class("UIKBProductivityDoubleTapGesture")
UIKBProductivitySingleTapGesture = _Class("UIKBProductivitySingleTapGesture")
_UISystemGestureGateGestureRecognizer = _Class("_UISystemGestureGateGestureRecognizer")
UISwipeGestureRecognizer = _Class("UISwipeGestureRecognizer")
UILongPressGestureRecognizer = _Class("UILongPressGestureRecognizer")
_UITouchObservingLongPress = _Class("_UITouchObservingLongPress")
_UIPreviewInteractionGestureRecognizer = _Class(
"_UIPreviewInteractionGestureRecognizer"
)
_UITextSelectionForceGesture = _Class("_UITextSelectionForceGesture")
_UINonEditableTextSelectionForceGesture = _Class(
"_UINonEditableTextSelectionForceGesture"
)
_UIEditableTextSelectionForceGesture = _Class("_UIEditableTextSelectionForceGesture")
UIPhraseBoundaryGestureRecognizer = _Class("UIPhraseBoundaryGestureRecognizer")
_UIWebHighlightLongPressGestureRecognizer = _Class(
"_UIWebHighlightLongPressGestureRecognizer"
)
_UIRevealGestureRecognizer = _Class("_UIRevealGestureRecognizer")
_UIPreviewGestureRecognizer = _Class("_UIPreviewGestureRecognizer")
UIVariableDelayLoupeGesture = _Class("UIVariableDelayLoupeGesture")
_UIDragLiftGestureRecognizer = _Class("_UIDragLiftGestureRecognizer")
_UIDragLiftPointerGestureRecognizer = _Class("_UIDragLiftPointerGestureRecognizer")
_UIDragLiftPointerWithEarlyStartGestureRecognizer = _Class(
"_UIDragLiftPointerWithEarlyStartGestureRecognizer"
)
UIKBProductivityLongPressGestureRecognizer = _Class(
"UIKBProductivityLongPressGestureRecognizer"
)
UIScrollViewKnobLongPressGestureRecognizer = _Class(
"UIScrollViewKnobLongPressGestureRecognizer"
)
UIAccessibilityHUDGestureLongPressRecognizer = _Class(
"UIAccessibilityHUDGestureLongPressRecognizer"
)
_UIPointerInteractionPressGestureRecognizer = _Class(
"_UIPointerInteractionPressGestureRecognizer"
)
UIHoverGestureRecognizer = _Class("UIHoverGestureRecognizer")
_UIPointerInteractionHoverGestureRecognizer = _Class(
"_UIPointerInteractionHoverGestureRecognizer"
)
UISpringLoadedInteraction = _Class("UISpringLoadedInteraction")
_UIPointerInteractionHoverDriver = _Class("_UIPointerInteractionHoverDriver")
UIPointerInteraction = _Class("UIPointerInteraction")
_UIPointerInteractionAssistant = _Class("_UIPointerInteractionAssistant")
UIImage = _Class("UIImage")
_UIStatusBarImage = _Class("_UIStatusBarImage")
UIImageNibPlaceholder = _Class("UIImageNibPlaceholder")
_UIMappedBitmapImage = _Class("_UIMappedBitmapImage")
_UIAnimatedImage = _Class("_UIAnimatedImage")
_UISegmentedControlDividerImage = _Class("_UISegmentedControlDividerImage")
_UIResizableImage = _Class("_UIResizableImage")
UIKBCachedImage = _Class("UIKBCachedImage")
_UIImageContent = _Class("_UIImageContent")
_UIImageMultiVectorGlyphContent = _Class("_UIImageMultiVectorGlyphContent")
_UIImageCGSVGDocumentContent = _Class("_UIImageCGSVGDocumentContent")
_UIImageCGPDFPageContent = _Class("_UIImageCGPDFPageContent")
_UIImageIOSurfaceContent = _Class("_UIImageIOSurfaceContent")
_UIImageCIImageContent = _Class("_UIImageCIImageContent")
_UIImageEmptyContent = _Class("_UIImageEmptyContent")
_UIImageCGImageContent = _Class("_UIImageCGImageContent")
_UIImageAsyncCGImageContent = _Class("_UIImageAsyncCGImageContent")
_UIImageCUIVectorGlyphContent = _Class("_UIImageCUIVectorGlyphContent")
_UIImageCUIVectorImageContent = _Class("_UIImageCUIVectorImageContent")
_UIImageAssetMapEnvelope = _Class("_UIImageAssetMapEnvelope")
UIImageAsset = _Class("UIImageAsset")
_UIImageStackImageAsset = _Class("_UIImageStackImageAsset")
_UIPathLazyImageAsset = _Class("_UIPathLazyImageAsset")
_UIImageCacheKey = _Class("_UIImageCacheKey")
_UIAssetManager = _Class("_UIAssetManager")
UIImageConfiguration = _Class("UIImageConfiguration")
UIImageSymbolConfiguration = _Class("UIImageSymbolConfiguration")
_UIImageSymbolConfiguration = _Class("_UIImageSymbolConfiguration")
_UICalloutBarSystemButtonDescription = _Class("_UICalloutBarSystemButtonDescription")
_UIViewVisitor = _Class("_UIViewVisitor")
_UIAccessibilityInterfaceStyleVisitor = _Class("_UIAccessibilityInterfaceStyleVisitor")
_UIFocusTrackingVisitor = _Class("_UIFocusTrackingVisitor")
_UIMotionEffectsVisitor = _Class("_UIMotionEffectsVisitor")
_UIViewBlockVisitor = _Class("_UIViewBlockVisitor")
_UITintColorVisitor = _Class("_UITintColorVisitor")
UIColor = _Class("UIColor")
UICIColor = _Class("UICIColor")
UIDisplayP3Color = _Class("UIDisplayP3Color")
NSColor = _Class("NSColor")
UICGColor = _Class("UICGColor")
UIPatternCGColor = _Class("UIPatternCGColor")
UICachedPatternCGColor = _Class("UICachedPatternCGColor")
UIDeviceRGBColor = _Class("UIDeviceRGBColor")
UICachedDeviceRGBColor = _Class("UICachedDeviceRGBColor")
UIDynamicColor = _Class("UIDynamicColor")
UIDynamicPatternColor = _Class("UIDynamicPatternColor")
UIDynamicAppDefinedColor = _Class("UIDynamicAppDefinedColor")
UIDynamicProviderColor = _Class("UIDynamicProviderColor")
UIDynamicCatalogColor = _Class("UIDynamicCatalogColor")
UIDynamicModifiedColor = _Class("UIDynamicModifiedColor")
UIDynamicSystemColor = _Class("UIDynamicSystemColor")
UIDeviceWhiteColor = _Class("UIDeviceWhiteColor")
UICachedDeviceWhiteColor = _Class("UICachedDeviceWhiteColor")
UIPlaceholderColor = _Class("UIPlaceholderColor")
_UIVisualEffectViewCornerMask = _Class("_UIVisualEffectViewCornerMask")
_UIVisualEffectFilterEntry = _Class("_UIVisualEffectFilterEntry")
_UIVisualEffectDescriptor = _Class("_UIVisualEffectDescriptor")
_UIVisualEffectHost = _Class("_UIVisualEffectHost")
_UIBlurEffectImpl = _Class("_UIBlurEffectImpl")
_UIBlurEffectCoreUIImpl = _Class("_UIBlurEffectCoreUIImpl")
_UIBlurEffectLegacyImpl = _Class("_UIBlurEffectLegacyImpl")
_UIBlurEffectModernImpl = _Class("_UIBlurEffectModernImpl")
_UIBlurEffectCoreMaterialImpl = _Class("_UIBlurEffectCoreMaterialImpl")
_UIBlurEffectAverageImpl = _Class("_UIBlurEffectAverageImpl")
UIVisualEffect = _Class("UIVisualEffect")
_UIWallpaperEffect = _Class("_UIWallpaperEffect")
_UICopyEffect = _Class("_UICopyEffect")
_UIOverlayEffect = _Class("_UIOverlayEffect")
_UIZoomEffect = _Class("_UIZoomEffect")
_UICompoundEffect = _Class("_UICompoundEffect")
_UIEmptyEffect = _Class("_UIEmptyEffect")
UIVibrancyEffect = _Class("UIVibrancyEffect")
UIColorEffect = _Class("UIColorEffect")
UIBlurEffect = _Class("UIBlurEffect")
_UIPopoverBackgroundVisualEffect = _Class("_UIPopoverBackgroundVisualEffect")
_UICoreUIEffect = _Class("_UICoreUIEffect")
_UIBlurThroughEffect = _Class("_UIBlurThroughEffect")
_UINoBlurEffect = _Class("_UINoBlurEffect")
_UICustomBlurEffect = _Class("_UICustomBlurEffect")
_UIVisualEffectViewBackdropCaptureGroup = _Class(
"_UIVisualEffectViewBackdropCaptureGroup"
)
_UIVisualEffectEnvironment = _Class("_UIVisualEffectEnvironment")
_UIViewLayoutFeedbackLoopDebugger = _Class("_UIViewLayoutFeedbackLoopDebugger")
UIMenuItem = _Class("UIMenuItem")
UIMenuController = _Class("UIMenuController")
_UIAppearance = _Class("_UIAppearance")
_UIBarItemAppearance = _Class("_UIBarItemAppearance")
_UIPropertyBasedAppearance = _Class("_UIPropertyBasedAppearance")
_UITraitBasedAppearance = _Class("_UITraitBasedAppearance")
_UIViewServiceSessionManager = _Class("_UIViewServiceSessionManager")
_UICanvasUserActivityManager = _Class("_UICanvasUserActivityManager")
_UIAssertionController = _Class("_UIAssertionController")
_UIRemoteKeyboardsEventObserver = _Class("_UIRemoteKeyboardsEventObserver")
_UIObjectPerScreen = _Class("_UIObjectPerScreen")
UIDevice = _Class("UIDevice")
UITraitCollection = _Class("UITraitCollection")
UIApplicationSceneHostAgent = _Class("UIApplicationSceneHostAgent")
UIApplicationSceneClientAgent = _Class("UIApplicationSceneClientAgent")
_UIInterprocessKeyedArchiver = _Class("_UIInterprocessKeyedArchiver")
UIStateRestorationKeyedArchiver = _Class("UIStateRestorationKeyedArchiver")
UIStateRestorationKeyedUnarchiver = _Class("UIStateRestorationKeyedUnarchiver")
UIMutableApplicationSceneClientSettings = _Class(
"UIMutableApplicationSceneClientSettings"
)
UIApplicationSceneClientSettings = _Class("UIApplicationSceneClientSettings")
UIMutableApplicationSceneSettings = _Class("UIMutableApplicationSceneSettings")
UIMutableCarPlayApplicationSceneSettings = _Class(
"UIMutableCarPlayApplicationSceneSettings"
)
UIApplicationSceneSettings = _Class("UIApplicationSceneSettings")
UICarPlayApplicationSceneSettings = _Class("UICarPlayApplicationSceneSettings")
UIWindowSceneSpecification = _Class("UIWindowSceneSpecification")
UIApplicationSceneSpecification = _Class("UIApplicationSceneSpecification")
UIApplicationCoverSheetSceneSpecification = _Class(
"UIApplicationCoverSheetSceneSpecification"
)
UIApplicationStarkSceneSpecification = _Class("UIApplicationStarkSceneSpecification")
UIApplicationExternalScreenSceneSpecification = _Class(
"UIApplicationExternalScreenSceneSpecification"
)
_UIPopoverSceneSpecification = _Class("_UIPopoverSceneSpecification")
_UIScreenFrameSpecification = _Class("_UIScreenFrameSpecification")
UIScreen = _Class("UIScreen")
_UISceneLifecycleMultiplexer = _Class("_UISceneLifecycleMultiplexer")
_UIRemoteKeyboards = _Class("_UIRemoteKeyboards")
UIInputResponderController = _Class("UIInputResponderController")
UISceneRequestOptions = _Class("UISceneRequestOptions")
UIStatusBarTapAction = _Class("UIStatusBarTapAction")
UIApplicationLegacyVOIPKeepAliveAction = _Class(
"UIApplicationLegacyVOIPKeepAliveAction"
)
UIPPTRequestAction = _Class("UIPPTRequestAction")
UIStatusBarHoverRegionAction = _Class("UIStatusBarHoverRegionAction")
UIResetFocusAction = _Class("UIResetFocusAction")
UIUnhandledMenuButtonAction = _Class("UIUnhandledMenuButtonAction")
UIUnhandledBackButtonAction = _Class("UIUnhandledBackButtonAction")
UIDismissSceneAction = _Class("UIDismissSceneAction")
UIWillPresentNotificationAction = _Class("UIWillPresentNotificationAction")
UIWatchKitExtensionRequestAction = _Class("UIWatchKitExtensionRequestAction")
UISystemNavigationAction = _Class("UISystemNavigationAction")
UISiriTaskAction = _Class("UISiriTaskAction")
UIScreenshotMetadataRequestAction = _Class("UIScreenshotMetadataRequestAction")
UISceneProposalAction = _Class("UISceneProposalAction")
UISceneHitTestAction = _Class("UISceneHitTestAction")
UIOpenURLAction = _Class("UIOpenURLAction")
UINotificationSettingsAction = _Class("UINotificationSettingsAction")
UINotificationResponseAction = _Class("UINotificationResponseAction")
UIHealthAuthorizationAction = _Class("UIHealthAuthorizationAction")
UIHandleStatusBarTapAction = _Class("UIHandleStatusBarTapAction")
UIHandleLocalNotificationAction = _Class("UIHandleLocalNotificationAction")
UIHandleCloudKitShareAction = _Class("UIHandleCloudKitShareAction")
UIHandleBackgroundURLSessionAction = _Class("UIHandleBackgroundURLSessionAction")
UIHandleApplicationShortcutAction = _Class("UIHandleApplicationShortcutAction")
UIDidTakeScreenshotAction = _Class("UIDidTakeScreenshotAction")
UIBannerAction = _Class("UIBannerAction")
UIActivityContinuationAction = _Class("UIActivityContinuationAction")
UIAccessoryBackgroundTaskAction = _Class("UIAccessoryBackgroundTaskAction")
UIDestroySceneAction = _Class("UIDestroySceneAction")
UIFetchContentInBackgroundAction = _Class("UIFetchContentInBackgroundAction")
UIIntentForwardingAction = _Class("UIIntentForwardingAction")
UIHandleRemoteNotificationAction = _Class("UIHandleRemoteNotificationAction")
UIFocusMovementAction = _Class("UIFocusMovementAction")
UIApplicationSceneTransitionContext = _Class("UIApplicationSceneTransitionContext")
_UIAfterCACommitQueue = _Class("_UIAfterCACommitQueue")
_UISceneEventResponder = _Class("_UISceneEventResponder")
UIContentSizeCategoryPreference = _Class("UIContentSizeCategoryPreference")
_UIContentSizeCategoryPreferenceSystem = _Class(
"_UIContentSizeCategoryPreferenceSystem"
)
_UIApplicationInfoParser = _Class("_UIApplicationInfoParser")
UIActivityContinuationManager = _Class("UIActivityContinuationManager")
UIEvent = _Class("UIEvent")
_UIGameControllerEvent = _Class("_UIGameControllerEvent")
UIMoveEvent = _Class("UIMoveEvent")
UITransformEvent = _Class("UITransformEvent")
UIDragEvent = _Class("UIDragEvent")
UIScrollEvent = _Class("UIScrollEvent")
UIHoverEvent = _Class("UIHoverEvent")
UITouchesEvent = _Class("UITouchesEvent")
UIPencilEvent = _Class("UIPencilEvent")
UIMotionEvent = _Class("UIMotionEvent")
UIRemoteControlEvent = _Class("UIRemoteControlEvent")
UIWheelEvent = _Class("UIWheelEvent")
UIPressesEvent = _Class("UIPressesEvent")
UIPhysicalKeyboardEvent = _Class("UIPhysicalKeyboardEvent")
UIEventEnvironment = _Class("UIEventEnvironment")
UIEventDispatcher = _Class("UIEventDispatcher")
UIGestureGraph = _Class("UIGestureGraph")
UIGestureEnvironment = _Class("UIGestureEnvironment")
_UIHIDTransformer = _Class("_UIHIDTransformer")
UIEventFetcher = _Class("UIEventFetcher")
_UIDeviceInitialDeviceConfigurationLoader = _Class(
"_UIDeviceInitialDeviceConfigurationLoader"
)
_UIScreenInitialDisplayConfigurationLoader = _Class(
"_UIScreenInitialDisplayConfigurationLoader"
)
_UIApplicationConfigurationLoader = _Class("_UIApplicationConfigurationLoader")
UIWebLayer = _Class("UIWebLayer")
_UIWebDocumentViewRotationLayer = _Class("_UIWebDocumentViewRotationLayer")
_UIStackedImageContainerLayer = _Class("_UIStackedImageContainerLayer")
_UIDirectionalRotationLayer = _Class("_UIDirectionalRotationLayer")
_UILabelContentLayer = _Class("_UILabelContentLayer")
_UIVectorLabelLayer = _Class("_UIVectorLabelLayer")
_UIContentViewAnimationStateUpdatingLayer = _Class(
"_UIContentViewAnimationStateUpdatingLayer"
)
_UIReplicantLayer = _Class("_UIReplicantLayer")
_UICircleProgressLayer = _Class("_UICircleProgressLayer")
_UIBackdropViewLayer = _Class("_UIBackdropViewLayer")
_UIKBKeyViewLayer = _Class("_UIKBKeyViewLayer")
_UITileLayer = _Class("_UITileLayer")
UIFocusRingLayer = _Class("UIFocusRingLayer")
UIFocusRingDefaultShapeLayer = _Class("UIFocusRingDefaultShapeLayer")
_UITextTiledLayer = _Class("_UITextTiledLayer")
UIWindowLayer = _Class("UIWindowLayer")
_UIWindowTransformLayer = _Class("_UIWindowTransformLayer")
_UILabelLayer = _Class("_UILabelLayer")
UICABackdropLayer = _Class("UICABackdropLayer")
_UIFlippingLayer = _Class("_UIFlippingLayer")
UIWebPDFSearchOperation = _Class("UIWebPDFSearchOperation")
_UIDocumentActivityDownloadOperation = _Class("_UIDocumentActivityDownloadOperation")
UIDictationStreamingOperation = _Class("UIDictationStreamingOperation")
UIKBTreeLocalizedKeylistEnumerator = _Class("UIKBTreeLocalizedKeylistEnumerator")
_UIGetAssetThread = _Class("_UIGetAssetThread")
WebPDFNSNumberFormatter = _Class("WebPDFNSNumberFormatter")
_UICascadingTextStorage = _Class("_UICascadingTextStorage")
_UIDatePickerChineseCalendar = _Class("_UIDatePickerChineseCalendar")
UIResponder = _Class("UIResponder")
_UITextServicesResponderProxy = _Class("_UITextServicesResponderProxy")
_UIKeyboardHandwritingLink = _Class("_UIKeyboardHandwritingLink")
_UITextLoupeResponderProxy = _Class("_UITextLoupeResponderProxy")
UIApplication = _Class("UIApplication")
UISystemShellApplication = _Class("UISystemShellApplication")
UITextInteractionSelectableInputDelegate = _Class(
"UITextInteractionSelectableInputDelegate"
)
UIScene = _Class("UIScene")
UIWindowScene = _Class("UIWindowScene")
_UIPopoverScene = _Class("_UIPopoverScene")
_UIScreenBasedWindowScene = _Class("_UIScreenBasedWindowScene")
_UIKeyboardWindowScene = _Class("_UIKeyboardWindowScene")
_UIPlaceholderWindowScene = _Class("_UIPlaceholderWindowScene")
UICanvas = _Class("UICanvas")
_UICanvas = _Class("_UICanvas")
UIAccessibilityElement = _Class("UIAccessibilityElement")
UIView = _Class("UIView")
_UITouchFallbackView = _Class("_UITouchFallbackView")
_UIShareInvitationRemoteViewControllerTintColorView = _Class(
"_UIShareInvitationRemoteViewControllerTintColorView"
)
_UIAttributedStringView = _Class("_UIAttributedStringView")
_UIWebFindOnPageHighlightBubbleView = _Class("_UIWebFindOnPageHighlightBubbleView")
_UIStackedImageContainerView = _Class("_UIStackedImageContainerView")
_UIStackedImageLayerWrappingView = _Class("_UIStackedImageLayerWrappingView")
_UIStackedImageLayerDelegate = _Class("_UIStackedImageLayerDelegate")
_UIPlatterContainerView = _Class("_UIPlatterContainerView")
_UIPopoverViewBackgroundComponentView = _Class("_UIPopoverViewBackgroundComponentView")
_UIMirrorNinePatchView = _Class("_UIMirrorNinePatchView")
_UIGlintyStringView = _Class("_UIGlintyStringView")
_UIGlintyGradientView = _Class("_UIGlintyGradientView")
_UIGlintyShapeView = _Class("_UIGlintyShapeView")
_UIExpandingGlyphsView = _Class("_UIExpandingGlyphsView")
_UIContentUnavailableView = _Class("_UIContentUnavailableView")
_UIContentUnavailableViewTV = _Class("_UIContentUnavailableViewTV")
_UICircleProgressIndicator = _Class("_UICircleProgressIndicator")
_UICAPackageView = _Class("_UICAPackageView")
_UIAccessDeniedView = _Class("_UIAccessDeniedView")
_UIReflectingView = _Class("_UIReflectingView")
_UIReflectingGradientView = _Class("_UIReflectingGradientView")
_UIReflectingContainerView = _Class("_UIReflectingContainerView")
_UIImageViewOverlayView = _Class("_UIImageViewOverlayView")
_UIStaticScrollBar = _Class("_UIStaticScrollBar")
_UIDatePickerCalendarHeaderView = _Class("_UIDatePickerCalendarHeaderView")
_UIBasicCellContentView = _Class("_UIBasicCellContentView")
_UIDebugAlignmentRectView = _Class("_UIDebugAlignmentRectView")
_UIDatePickerCalendarMonthYearSelector = _Class(
"_UIDatePickerCalendarMonthYearSelector"
)
_UIDebugColorBoundsView = _Class("_UIDebugColorBoundsView")
_UIPointerEffectPlatterView = _Class("_UIPointerEffectPlatterView")
_UIAnimatedAttachmentView = _Class("_UIAnimatedAttachmentView")
_UIDragDestinationIndicatorView = _Class("_UIDragDestinationIndicatorView")
_UIMorphingView = _Class("_UIMorphingView")
_UIDynamicCaretAlternatives = _Class("_UIDynamicCaretAlternatives")
_UIDynamicCaretInput = _Class("_UIDynamicCaretInput")
_UIDynamicCaretDot = _Class("_UIDynamicCaretDot")
_UIPageControlIndicatorContentView = _Class("_UIPageControlIndicatorContentView")
_UIPageControlContentView = _Class("_UIPageControlContentView")
_UITextDragCaretView = _Class("_UITextDragCaretView")
_UITableViewSeparatorView = _Class("_UITableViewSeparatorView")
_UITableViewHeaderFooterContentView = _Class("_UITableViewHeaderFooterContentView")
_UITableViewHeaderFooterViewBackground = _Class(
"_UITableViewHeaderFooterViewBackground"
)
_UIFocusLinearMovementDebugView = _Class("_UIFocusLinearMovementDebugView")
_UIClickHighlightInteractionEffectAnchorView = _Class(
"_UIClickHighlightInteractionEffectAnchorView"
)
_UITableViewCellBadge = _Class("_UITableViewCellBadge")
_UITableViewCellVerticalSeparator = _Class("_UITableViewCellVerticalSeparator")
_UIStatusBarLocalView = _Class("_UIStatusBarLocalView")
_UIStatusBar = _Class("_UIStatusBar")
_UIStatusBarForegroundView = _Class("_UIStatusBarForegroundView")
_UIStatusBarMultilineStringView = _Class("_UIStatusBarMultilineStringView")
_UIStatusBarLockView = _Class("_UIStatusBarLockView")
_UIStatusBarDualCellularSignalView = _Class("_UIStatusBarDualCellularSignalView")
_UIStatusBarBadgeView = _Class("_UIStatusBarBadgeView")
_UIStatusBarActivityView = _Class("_UIStatusBarActivityView")
_UIHighlightPlatterView = _Class("_UIHighlightPlatterView")
_UIAnchoredClickHighlightPlatterView = _Class("_UIAnchoredClickHighlightPlatterView")
_UIStatusBarLockItemPadlockView = _Class("_UIStatusBarLockItemPadlockView")
_UIBannerView = _Class("_UIBannerView")
_UIBannerContainerView = _Class("_UIBannerContainerView")
_UIReplicantView = _Class("_UIReplicantView")
_UISearchControllerLimitedAccessView = _Class("_UISearchControllerLimitedAccessView")
_UISearchControllerTVKeyboardContainerView = _Class(
"_UISearchControllerTVKeyboardContainerView"
)
_UISearchControllerView = _Class("_UISearchControllerView")
_UISearchAtomBackgroundView = _Class("_UISearchAtomBackgroundView")
_UISearchAtomView = _Class("_UISearchAtomView")
_UIPrintMessageAndSpinnerView = _Class("_UIPrintMessageAndSpinnerView")
_UIPlatterTransformView = _Class("_UIPlatterTransformView")
_UIPreviewPlatterView = _Class("_UIPreviewPlatterView")
_UIPlatterClippingView = _Class("_UIPlatterClippingView")
_UIOnePartImageView = _Class("_UIOnePartImageView")
_UIPickerViewTopFrame = _Class("_UIPickerViewTopFrame")
_UIPreviewPresentationContainerView = _Class("_UIPreviewPresentationContainerView")
_UIPreviewPresentationPlatterView = _Class("_UIPreviewPresentationPlatterView")
_UIPreviewPresentationEffectView = _Class("_UIPreviewPresentationEffectView")
_UIPortalView = _Class("_UIPortalView")
_UIInteractiveHighlightContentView = _Class("_UIInteractiveHighlightContentView")
_UIPreviewQuickActionView = _Class("_UIPreviewQuickActionView")
_UIPreviewActionSheetView = _Class("_UIPreviewActionSheetView")
_UIPreviewActionSheetTitleView = _Class("_UIPreviewActionSheetTitleView")
_UIPreviewActionSheetItemView = _Class("_UIPreviewActionSheetItemView")
_UIContextMenuReparentingContainerView = _Class(
"_UIContextMenuReparentingContainerView"
)
_UIValueCellContentView = _Class("_UIValueCellContentView")
_UISlideriOSVisualElement = _Class("_UISlideriOSVisualElement")
_UISubtitleCellContentView = _Class("_UISubtitleCellContentView")
_UIKBRTFingerDetectionFingerFeedbackView = _Class(
"_UIKBRTFingerDetectionFingerFeedbackView"
)
_UIKBRTFingerDetectionFingerCircleView = _Class(
"_UIKBRTFingerDetectionFingerCircleView"
)
_UIKBRTFingerDetectionView = _Class("_UIKBRTFingerDetectionView")
_UIKBRTTouchDrifingFingerCircleView = _Class("_UIKBRTTouchDrifingFingerCircleView")
_UITextFieldSystemBackgroundView = _Class("_UITextFieldSystemBackgroundView")
_UIKeyboardPopoverAffordance = _Class("_UIKeyboardPopoverAffordance")
_UIKeyboardPopover = _Class("_UIKeyboardPopover")
_UICollectionViewLayoutSwipeMaskView = _Class("_UICollectionViewLayoutSwipeMaskView")
_UIContextMenuAccessoryView = _Class("_UIContextMenuAccessoryView")
_UIKBCompositeImageView = _Class("_UIKBCompositeImageView")
_UIContextMenuActionView = _Class("_UIContextMenuActionView")
_UIContextMenuLoadingActionView = _Class("_UIContextMenuLoadingActionView")
_UIConstraintBasedLayoutHostingView = _Class("_UIConstraintBasedLayoutHostingView")
_UIRadiosityShadowView = _Class("_UIRadiosityShadowView")
_UIStatusBarSensorActivityView = _Class("_UIStatusBarSensorActivityView")
_UIRecentsAccessoryDefaultView = _Class("_UIRecentsAccessoryDefaultView")
_UILumaTrackingBackdropView = _Class("_UILumaTrackingBackdropView")
_UISearchBarCompatibilityClippingView = _Class("_UISearchBarCompatibilityClippingView")
_UIKeyboardCandidateSlidingMaskView = _Class("_UIKeyboardCandidateSlidingMaskView")
_UIKeyboardCandidateSnapshotView = _Class("_UIKeyboardCandidateSnapshotView")
_UICollectionViewListAccessoryVerticalSeparator = _Class(
"_UICollectionViewListAccessoryVerticalSeparator"
)
_UIDatePickerCalendarDateView = _Class("_UIDatePickerCalendarDateView")
_UILegibilityView = _Class("_UILegibilityView")
_UILegibilityLabel = _Class("_UILegibilityLabel")
_UIStatusBarVPNDisconnectView = _Class("_UIStatusBarVPNDisconnectView")
_UIHighlightView = _Class("_UIHighlightView")
_UISceneSnapshotPresentationView = _Class("_UISceneSnapshotPresentationView")
_UISceneLayerHostContainerView = _Class("_UISceneLayerHostContainerView")
_UIBatteryView = _Class("_UIBatteryView")
_UIStaticBatteryView = _Class("_UIStaticBatteryView")
_CarTitleView = _Class("_CarTitleView")
_UIFocusFastScrollingIndexBarView = _Class("_UIFocusFastScrollingIndexBarView")
_UIFocusFastScrollingIndexBarIndicatorView = _Class(
"_UIFocusFastScrollingIndexBarIndicatorView"
)
_UIHorizontalIndexTitleBar = _Class("_UIHorizontalIndexTitleBar")
_UIFieldEditorSystemInputHostView = _Class("_UIFieldEditorSystemInputHostView")
_UIDatePickerLinkedLabel = _Class("_UIDatePickerLinkedLabel")
_UIDragBadge = _Class("_UIDragBadge")
_UIShapeView = _Class("_UIShapeView")
_UIPlatterView = _Class("_UIPlatterView")
_UIPlatterShadowView = _Class("_UIPlatterShadowView")
_UIGradientView = _Class("_UIGradientView")
_UIDocumentPickerRemoteViewControllerTintColorView = _Class(
"_UIDocumentPickerRemoteViewControllerTintColorView"
)
_UIActionSliderTrackComponentView = _Class("_UIActionSliderTrackComponentView")
_UIActionSliderKnob = _Class("_UIActionSliderKnob")
_UIButtonMaskAnimationView = _Class("_UIButtonMaskAnimationView")
_UIButtonContentCenteringSpacer = _Class("_UIButtonContentCenteringSpacer")
_UIProgressView = _Class("_UIProgressView")
_UICircleProgressView = _Class("_UICircleProgressView")
_UIDatePickerCalendarTimeView = _Class("_UIDatePickerCalendarTimeView")
_UIFlippingView = _Class("_UIFlippingView")
_UIPanelControllerMeshAnimatingTransitionView = _Class(
"_UIPanelControllerMeshAnimatingTransitionView"
)
_UIShortDefinitionView = _Class("_UIShortDefinitionView")
_UIPageViewControllerContentView = _Class("_UIPageViewControllerContentView")
_UINavigationControllerPaletteClippingView = _Class(
"_UINavigationControllerPaletteClippingView"
)
_UIPPPCDebugDot = _Class("_UIPPPCDebugDot")
_UICollectionViewMaskView = _Class("_UICollectionViewMaskView")
_UIContextMenuCommitContainerView = _Class("_UIContextMenuCommitContainerView")
_UICollectionViewListCellBackgroundView = _Class(
"_UICollectionViewListCellBackgroundView"
)
_UICollectionViewListCellSelectedBackgroundView = _Class(
"_UICollectionViewListCellSelectedBackgroundView"
)
_UIDirectionalRotationView = _Class("_UIDirectionalRotationView")
_UISceneLayerHostView = _Class("_UISceneLayerHostView")
_UIExternalSceneLayerHostView = _Class("_UIExternalSceneLayerHostView")
_UIContextLayerHostView = _Class("_UIContextLayerHostView")
_UIKeyboardLayerHostView = _Class("_UIKeyboardLayerHostView")
_UISystemBackgroundStrokeView = _Class("_UISystemBackgroundStrokeView")
_UINavigationControllerPalette = _Class("_UINavigationControllerPalette")
_UINavigationControllerManagedSearchPalette = _Class(
"_UINavigationControllerManagedSearchPalette"
)
_UIBadgeView = _Class("_UIBadgeView")
_UISearchTokenLayoutView = _Class("_UISearchTokenLayoutView")
_UIContextMenuContainerView = _Class("_UIContextMenuContainerView")
_UISearchBarScopeContainerView = _Class("_UISearchBarScopeContainerView")
_UISearchBarPromptContainerView = _Class("_UISearchBarPromptContainerView")
_UISearchBarContainerView = _Class("_UISearchBarContainerView")
_UIColorWellConicalGradientBackgroundView = _Class(
"_UIColorWellConicalGradientBackgroundView"
)
_UINavigationBarPalette = _Class("_UINavigationBarPalette")
_UINavigationBarLegacyContentView = _Class("_UINavigationBarLegacyContentView")
_UINavBarPrompt = _Class("_UINavBarPrompt")
_UINavigationBarTitleView = _Class("_UINavigationBarTitleView")
_UIBarBackgroundTopCurtainView = _Class("_UIBarBackgroundTopCurtainView")
_UIGroupedBar = _Class("_UIGroupedBar")
_UIUCBKBSelectionBackground = _Class("_UIUCBKBSelectionBackground")
_UIFloatingShadowView = _Class("_UIFloatingShadowView")
_UIFloatingContentView = _Class("_UIFloatingContentView")
_UIKBFloatingContentView = _Class("_UIKBFloatingContentView")
_UIFloatingContentCornerRadiusAnimatingView = _Class(
"_UIFloatingContentCornerRadiusAnimatingView"
)
_UIFloatingContentCornerRadiusAnimatingScreenScaleInheritingView = _Class(
"_UIFloatingContentCornerRadiusAnimatingScreenScaleInheritingView"
)
_UIFloatingContentTransformView = _Class("_UIFloatingContentTransformView")
_UIBasicHeaderFooterContentView = _Class("_UIBasicHeaderFooterContentView")
_UIBackdropContentView = _Class("_UIBackdropContentView")
_UIBackdropEffectView = _Class("_UIBackdropEffectView")
_UIStatusBarPersistentAnimationView = _Class("_UIStatusBarPersistentAnimationView")
_UIStatusBarSignalView = _Class("_UIStatusBarSignalView")
_UIStatusBarWifiSignalView = _Class("_UIStatusBarWifiSignalView")
_UIStatusBarCellularSignalView = _Class("_UIStatusBarCellularSignalView")
_UIStatusBarCellularSmallSignalView = _Class("_UIStatusBarCellularSmallSignalView")
_UIStatusBarCellularFlatSignalView = _Class("_UIStatusBarCellularFlatSignalView")
_UIStatusBarRoundedCornerView = _Class("_UIStatusBarRoundedCornerView")
_UIStatusBarPillView = _Class("_UIStatusBarPillView")
_UIDatePickerCalendarView = _Class("_UIDatePickerCalendarView")
_UIAlertControllerTVBackgroundView = _Class("_UIAlertControllerTVBackgroundView")
_UIAlertControllerCarBackgroundView = _Class("_UIAlertControllerCarBackgroundView")
_UIAlertControllerCarActionHighlightedBackgroundView = _Class(
"_UIAlertControllerCarActionHighlightedBackgroundView"
)
_UIDatePickerCalendarTimeLabel = _Class("_UIDatePickerCalendarTimeLabel")
_UIAlertControllerGradientView = _Class("_UIAlertControllerGradientView")
_UIContextMenuActionsListView = _Class("_UIContextMenuActionsListView")
_UIAlertControllerTextFieldView = _Class("_UIAlertControllerTextFieldView")
_UIInterfaceActionBlankSeparatorView = _Class("_UIInterfaceActionBlankSeparatorView")
_UIInterfaceActionVibrantBorderView = _Class("_UIInterfaceActionVibrantBorderView")
_UIBlendingHighlightView = _Class("_UIBlendingHighlightView")
_UIInterfaceActionBlendingSeparatorView = _Class(
"_UIInterfaceActionBlendingSeparatorView"
)
_UIInterfaceActionBlendingBorderView = _Class("_UIInterfaceActionBlendingBorderView")
_UIInterfaceActionLabelsPropertyView = _Class("_UIInterfaceActionLabelsPropertyView")
_UITabBarAccessoryView = _Class("_UITabBarAccessoryView")
_UIPlatterSoftShadowView = _Class("_UIPlatterSoftShadowView")
_UIAlertControlleriOSHighlightedBackgroundView = _Class(
"_UIAlertControlleriOSHighlightedBackgroundView"
)
_UIInterfaceActionVibrantSeparatorView = _Class(
"_UIInterfaceActionVibrantSeparatorView"
)
_UIAlertControllerActionView = _Class("_UIAlertControllerActionView")
_UIDimmingKnockoutBackdropView = _Class("_UIDimmingKnockoutBackdropView")
_UIInterfaceActionSeparatableSequenceView = _Class(
"_UIInterfaceActionSeparatableSequenceView"
)
_UIAlertControllerView = _Class("_UIAlertControllerView")
_UIKeyboardLayoutAlignmentView = _Class("_UIKeyboardLayoutAlignmentView")
_UIBackButtonMaskView = _Class("_UIBackButtonMaskView")
_UIParallaxDimmingView = _Class("_UIParallaxDimmingView")
_UITableViewCellSeparatorView = _Class("_UITableViewCellSeparatorView")
_UIRefreshControlModernReplicatorView = _Class("_UIRefreshControlModernReplicatorView")
_UIRefreshControlContentView = _Class("_UIRefreshControlContentView")
_UIRefreshControlModernContentView = _Class("_UIRefreshControlModernContentView")
_UIKBCompatInputView = _Class("_UIKBCompatInputView")
_UIGroupTableViewCellBackground_TV = _Class("_UIGroupTableViewCellBackground_TV")
_UIScrollViewGradientMaskView = _Class("_UIScrollViewGradientMaskView")
_UIBackdropView = _Class("_UIBackdropView")
_UISystemBackgroundView = _Class("_UISystemBackgroundView")
_UITAMICAdaptorView = _Class("_UITAMICAdaptorView")
_UIScrollViewScrollIndicator = _Class("_UIScrollViewScrollIndicator")
_UINavigationItemView = _Class("_UINavigationItemView")
_UINavigationItemButtonView = _Class("_UINavigationItemButtonView")
_UITableViewContainerView = _Class("_UITableViewContainerView")
_UITableViewDropAnimationContainerView = _Class(
"_UITableViewDropAnimationContainerView"
)
_UITableViewCellSwipeContainerView = _Class("_UITableViewCellSwipeContainerView")
_UIInputViewContent = _Class("_UIInputViewContent")
_UITextLayoutView = _Class("_UITextLayoutView")
_UILayoutGuide = _Class("_UILayoutGuide")
_UIPanelControllerContentView = _Class("_UIPanelControllerContentView")
_UINavigationBarModernPromptView = _Class("_UINavigationBarModernPromptView")
_UINavigationBarLargeTitleView = _Class("_UINavigationBarLargeTitleView")
_UIBarContentView = _Class("_UIBarContentView")
_UIToolbarContentView = _Class("_UIToolbarContentView")
_UINavigationBarContentView = _Class("_UINavigationBarContentView")
_UIBarBackground = _Class("_UIBarBackground")
_UIRemoteKeyboardPlaceholderView = _Class("_UIRemoteKeyboardPlaceholderView")
_UISizeTrackingView = _Class("_UISizeTrackingView")
_UIVisibilityPropagationView = _Class("_UIVisibilityPropagationView")
_UIScenePresentationView = _Class("_UIScenePresentationView")
_UILayerHostView = _Class("_UILayerHostView")
_UIRemoteView = _Class("_UIRemoteView")
_UITextEffectsRemoteView = _Class("_UITextEffectsRemoteView")
_UITextFieldRoundedRectBackgroundViewNeue = _Class(
"_UITextFieldRoundedRectBackgroundViewNeue"
)
_UISearchBarSearchFieldBackgroundView = _Class("_UISearchBarSearchFieldBackgroundView")
_UITextContainerView = _Class("_UITextContainerView")
_UITextCanvasView = _Class("_UITextCanvasView")
_UITextViewCanvasView = _Class("_UITextViewCanvasView")
_UITextFieldCanvasView = _Class("_UITextFieldCanvasView")
_UISearchTextFieldCanvasView = _Class("_UISearchTextFieldCanvasView")
_UISearchBarSearchContainerView = _Class("_UISearchBarSearchContainerView")
_UIPopoverView = _Class("_UIPopoverView")
_UIViewServiceDummyPopoverView = _Class("_UIViewServiceDummyPopoverView")
_UIVisualEffectSubview = _Class("_UIVisualEffectSubview")
_UIVisualEffectContentView = _Class("_UIVisualEffectContentView")
_UIVisualEffectBackdropView = _Class("_UIVisualEffectBackdropView")
UIWebPDFLabelView = _Class("UIWebPDFLabelView")
UIWebOverflowContentView = _Class("UIWebOverflowContentView")
UIWebView = _Class("UIWebView")
UIWebPlaybackTargetPicker = _Class("UIWebPlaybackTargetPicker")
UIWebPDFView = _Class("UIWebPDFView")
UIWebTiledView = _Class("UIWebTiledView")
UIWebDocumentView = _Class("UIWebDocumentView")
UIWebBrowserView = _Class("UIWebBrowserView")
UIDocumentPasswordView = _Class("UIDocumentPasswordView")
UIKeyboardEmojiFamilyConfigurationView = _Class(
"UIKeyboardEmojiFamilyConfigurationView"
)
UITransitionView = _Class("UITransitionView")
UISnapshotView = _Class("UISnapshotView")
UIPopoverBackgroundView = _Class("UIPopoverBackgroundView")
_UIPopoverSlidingChromeView = _Class("_UIPopoverSlidingChromeView")
_UIPopoverStandardChromeView = _Class("_UIPopoverStandardChromeView")
_UIViewServiceDummyPopoverBackgroundView = _Class(
"_UIViewServiceDummyPopoverBackgroundView"
)
UINavigationTransitionView = _Class("UINavigationTransitionView")
UIDropShadowView = _Class("UIDropShadowView")
UIDimmingView = _Class("UIDimmingView")
_UIPopoverDimmingView = _Class("_UIPopoverDimmingView")
UIKBViewForResponderForwarding = _Class("UIKBViewForResponderForwarding")
UIVectorLabel = _Class("UIVectorLabel")
UIStackView = _Class("UIStackView")
_UIDatePickerCalendarContentStackView = _Class("_UIDatePickerCalendarContentStackView")
_UIButtonBarStackView = _Class("_UIButtonBarStackView")
UIStepperHorizontalVisualElement = _Class("UIStepperHorizontalVisualElement")
UIDebuggingZoomLoupeView = _Class("UIDebuggingZoomLoupeView")
UIDebuggingZoomLineView = _Class("UIDebuggingZoomLineView")
UIDebuggingInformationContainerView = _Class("UIDebuggingInformationContainerView")
UIProgressHUD = _Class("UIProgressHUD")
UIPasscodeField = _Class("UIPasscodeField")
UITextAttachmentView = _Class("UITextAttachmentView")
UITextFieldBackgroundView = _Class("UITextFieldBackgroundView")
_UITextFieldPasscodeCutoutBackground = _Class("_UITextFieldPasscodeCutoutBackground")
UITextFieldBorderView = _Class("UITextFieldBorderView")
UISplitAndMaskView = _Class("UISplitAndMaskView")
UIWebDragDotView = _Class("UIWebDragDotView")
UIWebTextRangeView = _Class("UIWebTextRangeView")
UIWebSelectionOutline = _Class("UIWebSelectionOutline")
UIWebSelectionHandle = _Class("UIWebSelectionHandle")
UIWebSelectionView = _Class("UIWebSelectionView")
UITextSelectionView = _Class("UITextSelectionView")
UITextRangeView = _Class("UITextRangeView")
UISelectionGrabber = _Class("UISelectionGrabber")
UIEditingOverlayGestureView = _Class("UIEditingOverlayGestureView")
UITextMagnifierCommonRenderer = _Class("UITextMagnifierCommonRenderer")
UITextMagnifierRangedRenderer = _Class("UITextMagnifierRangedRenderer")
UITextMagnifierCaretRenderer = _Class("UITextMagnifierCaretRenderer")
UITextMagnifier = _Class("UITextMagnifier")
UITextMagnifierRanged = _Class("UITextMagnifierRanged")
UITextMagnifierCaret = _Class("UITextMagnifierCaret")
UITextContentView = _Class("UITextContentView")
UIURLDragPreviewView = _Class("UIURLDragPreviewView")
UITableViewCellContentMirror = _Class("UITableViewCellContentMirror")
UITableViewHeaderFooterView = _Class("UITableViewHeaderFooterView")
UIShadowView = _Class("UIShadowView")
UITableViewIndexOverlaySelectionView = _Class("UITableViewIndexOverlaySelectionView")
UITableViewIndexOverlayIndicatorView = _Class("UITableViewIndexOverlayIndicatorView")
UITableViewCellContentView = _Class("UITableViewCellContentView")
UITableViewCellSelectedBackground = _Class("UITableViewCellSelectedBackground")
UISwipeActionPullView = _Class("UISwipeActionPullView")
UISwipeActionDeleteScanlineView = _Class("UISwipeActionDeleteScanlineView")
UIListContentView = _Class("UIListContentView")
UIStatusBarForegroundView = _Class("UIStatusBarForegroundView")
UIStatusBarBackgroundView = _Class("UIStatusBarBackgroundView")
_UIScrollsToTopInitiatorView = _Class("_UIScrollsToTopInitiatorView")
UIStatusBar_Base = _Class("UIStatusBar_Base")
UIStatusBar_Placeholder = _Class("UIStatusBar_Placeholder")
UIStatusBar_Modern = _Class("UIStatusBar_Modern")
UIStatusBar = _Class("UIStatusBar")
UIKeyboardKeyplaneSnapshotView = _Class("UIKeyboardKeyplaneSnapshotView")
UIStatusBarItemView = _Class("UIStatusBarItemView")
UIStatusBarDateTimeItemView = _Class("UIStatusBarDateTimeItemView")
UIStatusBarDateItemView = _Class("UIStatusBarDateItemView")
UIStatusBarTimeItemView = _Class("UIStatusBarTimeItemView")
UIStatusBarThermalColorItemView = _Class("UIStatusBarThermalColorItemView")
UIStatusBarTetheringItemView = _Class("UIStatusBarTetheringItemView")
UIStatusBarSignalStrengthItemView = _Class("UIStatusBarSignalStrengthItemView")
UIStatusBarSecondarySignalStrengthItemView = _Class(
"UIStatusBarSecondarySignalStrengthItemView"
)
UIStatusBarServiceItemView = _Class("UIStatusBarServiceItemView")
UIStatusBarPersonNameItemView = _Class("UIStatusBarPersonNameItemView")
UIStatusBarNotChargingItemView = _Class("UIStatusBarNotChargingItemView")
UIStatusBarLockItemView = _Class("UIStatusBarLockItemView")
UIStatusBarLocationItemView = _Class("UIStatusBarLocationItemView")
UIStatusBarLiquidDetectionItemView = _Class("UIStatusBarLiquidDetectionItemView")
UIStatusBarElectronicTollCollectionItemView = _Class(
"UIStatusBarElectronicTollCollectionItemView"
)
UIStatusBarDoubleHeightItemView = _Class("UIStatusBarDoubleHeightItemView")
UIStatusBarDataNetworkItemView = _Class("UIStatusBarDataNetworkItemView")
UIStatusBarSecondaryDataNetworkItemView = _Class(
"UIStatusBarSecondaryDataNetworkItemView"
)
UIStatusBarCarPlayDockItemView = _Class("UIStatusBarCarPlayDockItemView")
UIStatusBarSystemNavigationItemView = _Class("UIStatusBarSystemNavigationItemView")
UIStatusBarOpenInSafariItemView = _Class("UIStatusBarOpenInSafariItemView")
UIStatusBarBreadcrumbItemView = _Class("UIStatusBarBreadcrumbItemView")
UIStatusBarBluetoothItemView = _Class("UIStatusBarBluetoothItemView")
UIStatusBarBluetoothBatteryItemView = _Class("UIStatusBarBluetoothBatteryItemView")
UIStatusBarBatteryPercentItemView = _Class("UIStatusBarBatteryPercentItemView")
UIStatusBarBatteryItemView = _Class("UIStatusBarBatteryItemView")
UIStatusBarButtonActionItemView = _Class("UIStatusBarButtonActionItemView")
UIStatusBarRadarItemView = _Class("UIStatusBarRadarItemView")
UIStatusBarHomeItemView = _Class("UIStatusBarHomeItemView")
UIStatusBarCarPlayTimeItemView = _Class("UIStatusBarCarPlayTimeItemView")
UIStatusBarCarPlayRadarTimeItemView = _Class("UIStatusBarCarPlayRadarTimeItemView")
UIStatusBarCarPlayRecordingTimeItemView = _Class(
"UIStatusBarCarPlayRecordingTimeItemView"
)
UIStatusBarAppIconItemView = _Class("UIStatusBarAppIconItemView")
UIStatusBarNavigationItemView = _Class("UIStatusBarNavigationItemView")
UIStatusBarReturnToCallItemView = _Class("UIStatusBarReturnToCallItemView")
UIStatusBarIndicatorItemView = _Class("UIStatusBarIndicatorItemView")
UIStatusBarStudentItemView = _Class("UIStatusBarStudentItemView")
UIStatusBarQuietModeItemView = _Class("UIStatusBarQuietModeItemView")
UIStatusBarCarPlayItemView = _Class("UIStatusBarCarPlayItemView")
UIStatusBarAirplaneModeItemView = _Class("UIStatusBarAirplaneModeItemView")
UIStatusBarActivityItemView = _Class("UIStatusBarActivityItemView")
UIKeyCommandDiscoverabilityHUDView = _Class("UIKeyCommandDiscoverabilityHUDView")
UIKeyCommandDiscoverabilityHUDDescriptionView = _Class(
"UIKeyCommandDiscoverabilityHUDDescriptionView"
)
UIKeyCommandDiscoverabilityHUDColumnView = _Class(
"UIKeyCommandDiscoverabilityHUDColumnView"
)
UIProgressView = _Class("UIProgressView")
UIActivityIndicatorView = _Class("UIActivityIndicatorView")
_UIStatusBarActivityIndicator = _Class("_UIStatusBarActivityIndicator")
UIProgressIndicator = _Class("UIProgressIndicator")
UIPrintingMessageView = _Class("UIPrintingMessageView")
SupplyLevelView = _Class("SupplyLevelView")
UIPrinterSetupDisplayPINView = _Class("UIPrinterSetupDisplayPINView")
UIPrinterSetupConnectingView = _Class("UIPrinterSetupConnectingView")
UIPrinterSearchingView = _Class("UIPrinterSearchingView")
UIPrinterAccessoryView = _Class("UIPrinterAccessoryView")
UIPickerColumnView = _Class("UIPickerColumnView")
UIDatePickerWeekMonthDayView = _Class("UIDatePickerWeekMonthDayView")
UIDatePickerContentView = _Class("UIDatePickerContentView")
UIKBUndoStateHUD = _Class("UIKBUndoStateHUD")
UIKBUndoInteractionHUD = _Class("UIKBUndoInteractionHUD")
UIKBUndoHUDContainerView = _Class("UIKBUndoHUDContainerView")
UIMorphingLabel = _Class("UIMorphingLabel")
UIKeyboardPathEffectView = _Class("UIKeyboardPathEffectView")
UIKBASPCoverView = _Class("UIKBASPCoverView")
UIKeyboardSplitTransitionView = _Class("UIKeyboardSplitTransitionView")
UIKeyboardSliceTransitionView = _Class("UIKeyboardSliceTransitionView")
UIKeyboardFlipTransitionView = _Class("UIKeyboardFlipTransitionView")
UIAssistantBarRoundedButtonView = _Class("UIAssistantBarRoundedButtonView")
UIKeyboardImpl = _Class("UIKeyboardImpl")
UIKeyboardDockView = _Class("UIKeyboardDockView")
UIKeyboard = _Class("UIKeyboard")
UIKeyboardAutomatic = _Class("UIKeyboardAutomatic")
UIKBInputBackdropView = _Class("UIKBInputBackdropView")
UIInputSetHostView = _Class("UIInputSetHostView")
UIInputSetContainerView = _Class("UIInputSetContainerView")
UIKeyboardEmojiWellView = _Class("UIKeyboardEmojiWellView")
UIDefaultKeyboardInput = _Class("UIDefaultKeyboardInput")
UIKBEmojiSnapshotSizingView = _Class("UIKBEmojiSnapshotSizingView")
UIKeyboardEmojiScrubBarView = _Class("UIKeyboardEmojiScrubBarView")
UIDictationView = _Class("UIDictationView")
UIDictationPopUpView = _Class("UIDictationPopUpView")
UIDictationLayoutView = _Class("UIDictationLayoutView")
UIDictationSplitLayoutView = _Class("UIDictationSplitLayoutView")
UIDictationFloatingView = _Class("UIDictationFloatingView")
UIDictationATVLinearView = _Class("UIDictationATVLinearView")
UIDictationFloatingStarkView = _Class("UIDictationFloatingStarkView")
UIKeyboardDicationBackground = _Class("UIKeyboardDicationBackground")
UIKeyboardDicationBackgroundGradientView = _Class(
"UIKeyboardDicationBackgroundGradientView"
)
UIDictationLandingView = _Class("UIDictationLandingView")
UIKBStrokeView = _Class("UIKBStrokeView")
UIKBDimmingView = _Class("UIKBDimmingView")
UIKeyboardLayout = _Class("UIKeyboardLayout")
UIKeyboardLayoutDictation = _Class("UIKeyboardLayoutDictation")
UIKeyboardLayoutStar = _Class("UIKeyboardLayoutStar")
UIKeyboardLayoutCursor = _Class("UIKeyboardLayoutCursor")
UIKBSplitImageView = _Class("UIKBSplitImageView")
UIKBBackgroundView = _Class("UIKBBackgroundView")
UIKBKeyplaneView = _Class("UIKBKeyplaneView")
UIKBHandwritingStrokeView = _Class("UIKBHandwritingStrokeView")
UIKBKeyView = _Class("UIKBKeyView")
UIHandwritingAssistantView = _Class("UIHandwritingAssistantView")
UIKBViewBackedKeyView = _Class("UIKBViewBackedKeyView")
UIKeyboardEmojiKeyView = _Class("UIKeyboardEmojiKeyView")
UIKeyboardEmojiSplit = _Class("UIKeyboardEmojiSplit")
UIKeyboardEmojiSplitCategoryPicker = _Class("UIKeyboardEmojiSplitCategoryPicker")
UIKeyboardEmojiCollectionInputView = _Class("UIKeyboardEmojiCollectionInputView")
UIKeyboardEmojiSplitCharacterPicker = _Class("UIKeyboardEmojiSplitCharacterPicker")
UIKeyboardEmojiCategoryBar = _Class("UIKeyboardEmojiCategoryBar")
UIKeyboardEmojiCategoryBar_iPad = _Class("UIKeyboardEmojiCategoryBar_iPad")
UIKeyboardEmojiCategoryBar_iPhone = _Class("UIKeyboardEmojiCategoryBar_iPhone")
UIKBRecentInputsView = _Class("UIKBRecentInputsView")
UIKBHandwritingView = _Class("UIKBHandwritingView")
UIKBDictationDisplayView = _Class("UIKBDictationDisplayView")
UIKBCandidateView = _Class("UIKBCandidateView")
UIKBHandwritingCandidateView = _Class("UIKBHandwritingCandidateView")
UIKBLinearCandidateView = _Class("UIKBLinearCandidateView")
UIKBContainerKeyView = _Class("UIKBContainerKeyView")
UIKBFloatingKeyView = _Class("UIKBFloatingKeyView")
UIKBBlurredKeyView = _Class("UIKBBlurredKeyView")
UIKBFocusVCView = _Class("UIKBFocusVCView")
UIInputSwitcherSelectionExtraView = _Class("UIInputSwitcherSelectionExtraView")
UIInputSwitcherShadowView = _Class("UIInputSwitcherShadowView")
UIKeyboardMenuView = _Class("UIKeyboardMenuView")
UIKeyboardDictationMenu = _Class("UIKeyboardDictationMenu")
UIKeyboardSplitControlMenu = _Class("UIKeyboardSplitControlMenu")
UIInputSwitcherView = _Class("UIInputSwitcherView")
UIInputSwitcherTableCellSegmentView = _Class("UIInputSwitcherTableCellSegmentView")
UIInputSwitcherTableCellBackgroundView = _Class(
"UIInputSwitcherTableCellBackgroundView"
)
UIKeyboardCandidateInlineFloatingView = _Class("UIKeyboardCandidateInlineFloatingView")
UIAutocorrectInlinePrompt = _Class("UIAutocorrectInlinePrompt")
UIAutocorrectTextView = _Class("UIAutocorrectTextView")
UIAutocorrectShadowView = _Class("UIAutocorrectShadowView")
UIKBAutoFillTestTaggerView = _Class("UIKBAutoFillTestTaggerView")
UISystemGestureView = _Class("UISystemGestureView")
UIApplicationRotationFollowingControllerView = _Class(
"UIApplicationRotationFollowingControllerView"
)
UICheckeredPatternView = _Class("UICheckeredPatternView")
UIKBTutorialMultipageView = _Class("UIKBTutorialMultipageView")
UIKBTutorialSinglePageView = _Class("UIKBTutorialSinglePageView")
UICalloutBar = _Class("UICalloutBar")
UICalloutBarBackground = _Class("UICalloutBarBackground")
UIAssistantBarSeparatorView = _Class("UIAssistantBarSeparatorView")
UIPickerView = _Class("UIPickerView")
_UIDatePickerView = _Class("_UIDatePickerView")
UIPrintRangePickerView = _Class("UIPrintRangePickerView")
UIWebSelectMultiplePicker = _Class("UIWebSelectMultiplePicker")
UIWebSelectSinglePicker = _Class("UIWebSelectSinglePicker")
UIPickerContentView = _Class("UIPickerContentView")
UIDOMHTMLOptionPickerCell = _Class("UIDOMHTMLOptionPickerCell")
UIDOMHTMLOptGroupCell = _Class("UIDOMHTMLOptGroupCell")
UIInputView = _Class("UIInputView")
UIWebFormAccessory = _Class("UIWebFormAccessory")
UISwitchVisualElement = _Class("UISwitchVisualElement")
UISwitchModernVisualElement = _Class("UISwitchModernVisualElement")
UISwitchCarPlayVisualElement = _Class("UISwitchCarPlayVisualElement")
UIMovieScrubberTrackOverlayView = _Class("UIMovieScrubberTrackOverlayView")
UIMovieScrubberTrackView = _Class("UIMovieScrubberTrackView")
UIMovieScrubberEditingView = _Class("UIMovieScrubberEditingView")
UIViewControllerWrapperView = _Class("UIViewControllerWrapperView")
UIPanelWrapperView = _Class("UIPanelWrapperView")
UIPanelBorderView = _Class("UIPanelBorderView")
UIPanelBorderReplicatingView = _Class("UIPanelBorderReplicatingView")
UISearchDisplayControllerContainerView = _Class(
"UISearchDisplayControllerContainerView"
)
UILayoutContainerView = _Class("UILayoutContainerView")
_UISplitViewControllerPanelImplView = _Class("_UISplitViewControllerPanelImplView")
UICollectionViewControllerWrapperView = _Class("UICollectionViewControllerWrapperView")
_UIAlertControlleriOSActionSheetCancelBackgroundView = _Class(
"_UIAlertControlleriOSActionSheetCancelBackgroundView"
)
UIActionSheetiOSDismissActionView = _Class("UIActionSheetiOSDismissActionView")
UIScrollView = _Class("UIScrollView")
_UIQueuingScrollView = _Class("_UIQueuingScrollView")
_UICollectionViewOrthogonalScrollerEmbeddedScrollView = _Class(
"_UICollectionViewOrthogonalScrollerEmbeddedScrollView"
)
_UIAlertControllerShadowedScrollView = _Class("_UIAlertControllerShadowedScrollView")
_UIInterfaceActionGroupHeaderScrollView = _Class(
"_UIInterfaceActionGroupHeaderScrollView"
)
_UIInterfaceActionRepresentationsSequenceView = _Class(
"_UIInterfaceActionRepresentationsSequenceView"
)
UIWebOverflowScrollView = _Class("UIWebOverflowScrollView")
UIWebScrollView = _Class("UIWebScrollView")
_UIWebViewScrollView = _Class("_UIWebViewScrollView")
UIFieldEditor = _Class("UIFieldEditor")
_UISearchBarFieldEditor = _Class("_UISearchBarFieldEditor")
UITableViewWrapperView = _Class("UITableViewWrapperView")
UIPrinterSetupPINScrollView = _Class("UIPrinterSetupPINScrollView")
UITextView = _Class("UITextView")
_UISiriTranscriptTextView = _Class("_UISiriTranscriptTextView")
UIKBASPTextView = _Class("UIKBASPTextView")
UITableView = _Class("UITableView")
_UIMoreListTableView = _Class("_UIMoreListTableView")
UIPickerTableView = _Class("UIPickerTableView")
UIInputSwitcherTableView = _Class("UIInputSwitcherTableView")
UISearchResultsTableView = _Class("UISearchResultsTableView")
UIPageControllerScrollView = _Class("UIPageControllerScrollView")
UICollectionView = _Class("UICollectionView")
UIKeyboardEmojiCollectionView = _Class("UIKeyboardEmojiCollectionView")
UITableViewCell = _Class("UITableViewCell")
_UIPrototypingMenuCell = _Class("_UIPrototypingMenuCell")
_UIPrototypingMenuNumberCell = _Class("_UIPrototypingMenuNumberCell")
_UIPrototypingMenuBoolCell = _Class("_UIPrototypingMenuBoolCell")
UIDebuggingIvarTableViewCell = _Class("UIDebuggingIvarTableViewCell")
UIMainPrinterUtilityCell = _Class("UIMainPrinterUtilityCell")
UIPrinterTableViewCell = _Class("UIPrinterTableViewCell")
UIPickerTableViewCell = _Class("UIPickerTableViewCell")
UIPickerTableViewTitledCell = _Class("UIPickerTableViewTitledCell")
UIPickerTableViewWrapperCell = _Class("UIPickerTableViewWrapperCell")
UIKeyboardEmojiSplitCategoryCell = _Class("UIKeyboardEmojiSplitCategoryCell")
UIRecentInputTableCell = _Class("UIRecentInputTableCell")
UIInputSwitcherTableCell = _Class("UIInputSwitcherTableCell")
UIInputSwitcherSegmentedTableCell = _Class("UIInputSwitcherSegmentedTableCell")
UIExpandedBarItemTableCell = _Class("UIExpandedBarItemTableCell")
UITableViewCollectionCell = _Class("UITableViewCollectionCell")
UICollectionReusableView = _Class("UICollectionReusableView")
_UICollectionViewListLayoutSectionBackgroundColorDecorationView = _Class(
"_UICollectionViewListLayoutSectionBackgroundColorDecorationView"
)
_UICollectionViewListSwipeActionsView = _Class("_UICollectionViewListSwipeActionsView")
_UICollectionViewListHeaderFooter = _Class("_UICollectionViewListHeaderFooter")
_UICollectionViewListSeparatorView = _Class("_UICollectionViewListSeparatorView")
_UIContextMenuActionsListSeparatorView = _Class(
"_UIContextMenuActionsListSeparatorView"
)
_UIContextMenuActionsListTitleView = _Class("_UIContextMenuActionsListTitleView")
_UICollectionSnapshotView = _Class("_UICollectionSnapshotView")
UIDebuggingInformationHierarchyLineView = _Class(
"UIDebuggingInformationHierarchyLineView"
)
UIKeyboardEmojiSectionHeader = _Class("UIKeyboardEmojiSectionHeader")
UIKeyboardCandidatePocketShadow = _Class("UIKeyboardCandidatePocketShadow")
UICollectionViewTableSeparatorView = _Class("UICollectionViewTableSeparatorView")
UICollectionViewTableHeaderFooterView = _Class("UICollectionViewTableHeaderFooterView")
UICollectionViewCell = _Class("UICollectionViewCell")
_UIContextMenuActionsListCell = _Class("_UIContextMenuActionsListCell")
_UIContextMenuActionsListLoadingCell = _Class("_UIContextMenuActionsListLoadingCell")
_UIPrintPreviewPageCell = _Class("_UIPrintPreviewPageCell")
_UIDatePickerCalendarDayCell = _Class("_UIDatePickerCalendarDayCell")
_UIDatePickerCalendarTimeWheelCell = _Class("_UIDatePickerCalendarTimeWheelCell")
_UIHorizontalIndexTitleBarCell = _Class("_UIHorizontalIndexTitleBarCell")
_UIAlertControllerTextFieldViewCollectionCell = _Class(
"_UIAlertControllerTextFieldViewCollectionCell"
)
UIDebuggingInformationHierarchyCell = _Class("UIDebuggingInformationHierarchyCell")
UITableViewIndexOverlaySelectionViewCollectionViewCell = _Class(
"UITableViewIndexOverlaySelectionViewCollectionViewCell"
)
UIKeyCommandDiscoverabilityHUDViewCell = _Class(
"UIKeyCommandDiscoverabilityHUDViewCell"
)
UIKeyboardEmojiCollectionViewCell = _Class("UIKeyboardEmojiCollectionViewCell")
UIKBRecentInputCell = _Class("UIKBRecentInputCell")
UICollectionViewTableCell = _Class("UICollectionViewTableCell")
UICollectionViewListCell = _Class("UICollectionViewListCell")
_UICollectionViewListCell = _Class("_UICollectionViewListCell")
_UICollectionViewOutlineCell = _Class("_UICollectionViewOutlineCell")
UIToolbar = _Class("UIToolbar")
UITabBar = _Class("UITabBar")
UITabBarCustomizeView = _Class("UITabBarCustomizeView")
UIKeyboardGlobeKeyIntroductionView = _Class("UIKeyboardGlobeKeyIntroductionView")
UILabel = _Class("UILabel")
_UITableViewHeaderFooterViewLabel = _Class("_UITableViewHeaderFooterViewLabel")
_UIStatusBarStringView = _Class("_UIStatusBarStringView")
_UIActivityIndicatorMessageLabel = _Class("_UIActivityIndicatorMessageLabel")
UIDateLabel = _Class("UIDateLabel")
UITextLabel = _Class("UITextLabel")
UITableViewCountView = _Class("UITableViewCountView")
UITableViewLabel = _Class("UITableViewLabel")
UISegmentLabel = _Class("UISegmentLabel")
UIButtonLabel = _Class("UIButtonLabel")
UITabBarButtonLabel = _Class("UITabBarButtonLabel")
UITextFieldLabel = _Class("UITextFieldLabel")
UITextFieldCenteredLabel = _Class("UITextFieldCenteredLabel")
UISearchBarTextFieldLabel = _Class("UISearchBarTextFieldLabel")
UISearchBar = _Class("UISearchBar")
UIImageView = _Class("UIImageView")
_UITextAttachmentImageView = _Class("_UITextAttachmentImageView")
_UITextAttachmentPlaceholderView = _Class("_UITextAttachmentPlaceholderView")
_UIDynamicCaretHelpLabel = _Class("_UIDynamicCaretHelpLabel")
_UIDynamicCaretNoContentView = _Class("_UIDynamicCaretNoContentView")
_UIStatusBarImageView = _Class("_UIStatusBarImageView")
_UIStatusBarActivityIconView = _Class("_UIStatusBarActivityIconView")
_UIStatusBarRadarView = _Class("_UIStatusBarRadarView")
_UIStatusBarFocusableImageView = _Class("_UIStatusBarFocusableImageView")
_UILegibilityImageView = _Class("_UILegibilityImageView")
_UIPageIndicatorView = _Class("_UIPageIndicatorView")
_UITextFieldImageBackgroundView = _Class("_UITextFieldImageBackgroundView")
_UISearchBarScopeBarBackground = _Class("_UISearchBarScopeBarBackground")
_UISearchBarShadowView = _Class("_UISearchBarShadowView")
_UIBarBackgroundCustomImageContainer = _Class("_UIBarBackgroundCustomImageContainer")
_UIListContentImageView = _Class("_UIListContentImageView")
_UIInterfaceActionImagePropertyView = _Class("_UIInterfaceActionImagePropertyView")
_UIShadowView = _Class("_UIShadowView")
_UIVerticalEdgeShadowView = _Class("_UIVerticalEdgeShadowView")
_UIRoundedRectShadowView = _Class("_UIRoundedRectShadowView")
_UICutoutShadowView = _Class("_UICutoutShadowView")
_UIVisualEffectImageView = _Class("_UIVisualEffectImageView")
_UIBarBackgroundShadowContentImageView = _Class(
"_UIBarBackgroundShadowContentImageView"
)
UISelectionGrabberDot = _Class("UISelectionGrabberDot")
UIDynamicCaret = _Class("UIDynamicCaret")
UIKBCursorSelection = _Class("UIKBCursorSelection")
UISegment = _Class("UISegment")
UIMovieScrubberThumbnailView = _Class("UIMovieScrubberThumbnailView")
UITabBarSwappableImageView = _Class("UITabBarSwappableImageView")
_UIBarBackgroundImageView = _Class("_UIBarBackgroundImageView")
UISearchBarBackground = _Class("UISearchBarBackground")
UINavigationBarBackIndicatorView = _Class("UINavigationBarBackIndicatorView")
UINavigationBar = _Class("UINavigationBar")
UITutorialAnimatedView = _Class("UITutorialAnimatedView")
UITutorialFramingView = _Class("UITutorialFramingView")
UIVisualEffectView = _Class("UIVisualEffectView")
_UIPointerEffectTintView = _Class("_UIPointerEffectTintView")
_UIInteractiveHighlightBackgroundEffectView = _Class(
"_UIInteractiveHighlightBackgroundEffectView"
)
_UIBarBackgroundShadowView = _Class("_UIBarBackgroundShadowView")
UIKBBackdropView = _Class("UIKBBackdropView")
UIKBVisualEffectView = _Class("UIKBVisualEffectView")
UIInterfaceActionRepresentationView = _Class("UIInterfaceActionRepresentationView")
_UIInterfaceActionSystemRepresentationView = _Class(
"_UIInterfaceActionSystemRepresentationView"
)
_UIInterfaceActionCustomViewRepresentationView = _Class(
"_UIInterfaceActionCustomViewRepresentationView"
)
UIInterfaceActionGroupView = _Class("UIInterfaceActionGroupView")
_UIAlertControllerInterfaceActionGroupView = _Class(
"_UIAlertControllerInterfaceActionGroupView"
)
UIAlertView = _Class("UIAlertView")
_UIUserNotificationAlertView = _Class("_UIUserNotificationAlertView")
UIActionSheet = _Class("UIActionSheet")
UIWindow = _Class("UIWindow")
_UIContextMenuAnimationWindow = _Class("_UIContextMenuAnimationWindow")
_UIBannerWindow = _Class("_UIBannerWindow")
_UISnapshotWindow = _Class("_UISnapshotWindow")
_UIBackgroundHitTestWindow = _Class("_UIBackgroundHitTestWindow")
_UIKeyCommandDiscoverabilityHUDWindow = _Class("_UIKeyCommandDiscoverabilityHUDWindow")
_UIWindowSceneUserInterfaceStyleAnimationSnapshotWindow = _Class(
"_UIWindowSceneUserInterfaceStyleAnimationSnapshotWindow"
)
_UIPreviewInteractionTransitionWindow = _Class("_UIPreviewInteractionTransitionWindow")
_UIInteractiveHighlightEffectWindow = _Class("_UIInteractiveHighlightEffectWindow")
_UIFeedbackVisualizerWindow = _Class("_UIFeedbackVisualizerWindow")
_UIDragSetDownAnimationWindow = _Class("_UIDragSetDownAnimationWindow")
_UIApplicationModalProgressWindow = _Class("_UIApplicationModalProgressWindow")
_UIWindowSceneAccessibilityContrastAnimationSnapshotWindow = _Class(
"_UIWindowSceneAccessibilityContrastAnimationSnapshotWindow"
)
_UIHostedWindow = _Class("_UIHostedWindow")
_UISecureHostedWindow = _Class("_UISecureHostedWindow")
UIDebuggingInformationOverlay = _Class("UIDebuggingInformationOverlay")
UIStatusBarWindow = _Class("UIStatusBarWindow")
UIPrinterPickerWindow = _Class("UIPrinterPickerWindow")
UIPrintPanelWindow = _Class("UIPrintPanelWindow")
UISoftwareDimmingWindow = _Class("UISoftwareDimmingWindow")
_UIRootWindow = _Class("_UIRootWindow")
_UISystemGestureWindow = _Class("_UISystemGestureWindow")
UIRootSceneWindow = _Class("UIRootSceneWindow")
UIApplicationRotationFollowingWindow = _Class("UIApplicationRotationFollowingWindow")
_UIFallbackPresentationWindow = _Class("_UIFallbackPresentationWindow")
_UIAlertControllerShimPresenterWindow = _Class("_UIAlertControllerShimPresenterWindow")
UIAutoRotatingWindow = _Class("UIAutoRotatingWindow")
UITextEffectsWindow = _Class("UITextEffectsWindow")
UITextEffectsWindowHosted = _Class("UITextEffectsWindowHosted")
UIRemoteKeyboardWindow = _Class("UIRemoteKeyboardWindow")
UIRemoteKeyboardWindowHosted = _Class("UIRemoteKeyboardWindowHosted")
UIAccessibilityHUDWindow = _Class("UIAccessibilityHUDWindow")
UIAccessibilityHUDView = _Class("UIAccessibilityHUDView")
UIKBTutorialModalDisplay = _Class("UIKBTutorialModalDisplay")
UIKBEditingGesturesIntroduction = _Class("UIKBEditingGesturesIntroduction")
UIUndoTutorialView = _Class("UIUndoTutorialView")
UIContinuousPathIntroductionView = _Class("UIContinuousPathIntroductionView")
UIControl = _Class("UIControl")
_UIDatePickerIOSCompactView = _Class("_UIDatePickerIOSCompactView")
_UIDatePickerCalendarTimeWheel = _Class("_UIDatePickerCalendarTimeWheel")
_UICollectionViewListAccessoryDisclosure = _Class(
"_UICollectionViewListAccessoryDisclosure"
)
_UICollectionViewListAccessoryControl = _Class("_UICollectionViewListAccessoryControl")
_UISearchDisplayControllerDimmingView = _Class("_UISearchDisplayControllerDimmingView")
_UICollectionViewListCellReorderControl = _Class(
"_UICollectionViewListCellReorderControl"
)
_UIGrabber = _Class("_UIGrabber")
_UIActionSlider = _Class("_UIActionSlider")
_UIButtonBarButton = _Class("_UIButtonBarButton")
UIIndexBarView = _Class("UIIndexBarView")
UIIndexBarAccessoryView = _Class("UIIndexBarAccessoryView")
UIRemoveControl = _Class("UIRemoveControl")
UITableViewIndex = _Class("UITableViewIndex")
UITableViewCellReorderControl = _Class("UITableViewCellReorderControl")
UITableViewCellFocusableReorderControl = _Class(
"UITableViewCellFocusableReorderControl"
)
UITableViewCellEditControl = _Class("UITableViewCellEditControl")
UITableViewCellFocusableEditControl = _Class("UITableViewCellFocusableEditControl")
UITableViewCellDetailDisclosureView = _Class("UITableViewCellDetailDisclosureView")
UIPrinterSetupPINView = _Class("UIPrinterSetupPINView")
UIDatePicker = _Class("UIDatePicker")
UICoverSheetButton = _Class("UICoverSheetButton")
UIKBUndoControl = _Class("UIKBUndoControl")
UIInputSwitcherSegmentControl = _Class("UIInputSwitcherSegmentControl")
UISwitch = _Class("UISwitch")
UIStepper = _Class("UIStepper")
UISlider = _Class("UISlider")
_UIPrototypingMenuSlider = _Class("_UIPrototypingMenuSlider")
_UIDynamicSlider = _Class("_UIDynamicSlider")
UISegmentedControl = _Class("UISegmentedControl")
UIRefreshControl = _Class("UIRefreshControl")
UIPageControl = _Class("UIPageControl")
UIMovieScrubber = _Class("UIMovieScrubber")
UITabBarButton = _Class("UITabBarButton")
UITextField = _Class("UITextField")
_UIAlertControllerTextField = _Class("_UIAlertControllerTextField")
UIDocumentPasswordField = _Class("UIDocumentPasswordField")
UISearchField = _Class("UISearchField")
UISearchTextField = _Class("UISearchTextField")
UISearchBarTextField = _Class("UISearchBarTextField")
UIToolbarButton = _Class("UIToolbarButton")
UIToolbarTextButton = _Class("UIToolbarTextButton")
UIButton = _Class("UIButton")
_UIStaticScrollbarButton = _Class("_UIStaticScrollbarButton")
_UIDatePickerTouchOutsetButton = _Class("_UIDatePickerTouchOutsetButton")
_UIStepperButton = _Class("_UIStepperButton")
_UITableViewCellActionButton = _Class("_UITableViewCellActionButton")
_UIStatusBarSystemNavigationItemButton = _Class(
"_UIStatusBarSystemNavigationItemButton"
)
_UITextFieldClearButton = _Class("_UITextFieldClearButton")
_UIShortPlacardButton = _Class("_UIShortPlacardButton")
_UIPlacardButton = _Class("_UIPlacardButton")
_UITableCellAccessoryButton = _Class("_UITableCellAccessoryButton")
_UIModernBarButton = _Class("_UIModernBarButton")
UISwipeActionButton = _Class("UISwipeActionButton")
UISwipeActionStandardButton = _Class("UISwipeActionStandardButton")
UISwipeActionCircularButton = _Class("UISwipeActionCircularButton")
UIStatusBarCarPlayDockAppItemButton = _Class("UIStatusBarCarPlayDockAppItemButton")
UIAssistantBarRoundedButtonViewButton = _Class("UIAssistantBarRoundedButtonViewButton")
UIKeyboardDockItemButton = _Class("UIKeyboardDockItemButton")
UIKeyboardDictationStarkDoneButton = _Class("UIKeyboardDictationStarkDoneButton")
UIKeyboardButton = _Class("UIKeyboardButton")
UICalloutBarButton = _Class("UICalloutBarButton")
UISegmentAccessibilityButton = _Class("UISegmentAccessibilityButton")
UIPopoverButton = _Class("UIPopoverButton")
UITexturedButton = _Class("UITexturedButton")
UIRoundedRectButton = _Class("UIRoundedRectButton")
UIDictationSearchButton = _Class("UIDictationSearchButton")
UINavigationButton = _Class("UINavigationButton")
_UIToolbarNavigationButton = _Class("_UIToolbarNavigationButton")
UIColorWell = _Class("UIColorWell")
_UIColorWell = _Class("_UIColorWell")
UIViewController = _Class("UIViewController")
_UIPrototypingMenuViewController = _Class("_UIPrototypingMenuViewController")
_UIDatePickerIOSCompactViewController = _Class("_UIDatePickerIOSCompactViewController")
_UIContextMenuActionsOnlyViewController = _Class(
"_UIContextMenuActionsOnlyViewController"
)
_UISearchControllerLimitedUIShieldViewController = _Class(
"_UISearchControllerLimitedUIShieldViewController"
)
_UIAlternateApplicationIconsAlertContentViewController = _Class(
"_UIAlternateApplicationIconsAlertContentViewController"
)
_UIScreenRoutePickerViewController = _Class("_UIScreenRoutePickerViewController")
_UIDatePickerNumericKeyboardViewController = _Class(
"_UIDatePickerNumericKeyboardViewController"
)
_UINoDefinitionViewController = _Class("_UINoDefinitionViewController")
_UILongDefinitionViewController = _Class("_UILongDefinitionViewController")
_UIImagePickerPlaceholderViewController = _Class(
"_UIImagePickerPlaceholderViewController"
)
_UIProgressiveBlurContextController = _Class("_UIProgressiveBlurContextController")
_UIButtonGroupViewController = _Class("_UIButtonGroupViewController")
_UIAlertViewShimAccessoryViewController = _Class(
"_UIAlertViewShimAccessoryViewController"
)
_UIViewServiceViewControllerOperator = _Class("_UIViewServiceViewControllerOperator")
_UIWaitingForRemoteViewContainerViewController = _Class(
"_UIWaitingForRemoteViewContainerViewController"
)
_UIResilientRemoteViewContainerViewController = _Class(
"_UIResilientRemoteViewContainerViewController"
)
UIDocumentSharingController = _Class("UIDocumentSharingController")
_UISharingViewController = _Class("_UISharingViewController")
UICloudSharingController = _Class("UICloudSharingController")
UIPredictionViewController = _Class("UIPredictionViewController")
UIKeyboardPopoverController = _Class("UIKeyboardPopoverController")
UIDebuggingZoomViewController = _Class("UIDebuggingZoomViewController")
UIDebuggingSpecViewController = _Class("UIDebuggingSpecViewController")
UIDebuggingInformationVCHierarchyViewController = _Class(
"UIDebuggingInformationVCHierarchyViewController"
)
UIDebuggingInformationVCDetailViewController = _Class(
"UIDebuggingInformationVCDetailViewController"
)
UIDebuggingInformationOverlayWindowPickerViewController = _Class(
"UIDebuggingInformationOverlayWindowPickerViewController"
)
UIDebuggingInformationInspectorDetailViewController = _Class(
"UIDebuggingInformationInspectorDetailViewController"
)
UIDebuggingInformationHierarchyViewController = _Class(
"UIDebuggingInformationHierarchyViewController"
)
UIDebuggingInformationOverlayViewController = _Class(
"UIDebuggingInformationOverlayViewController"
)
UIDebuggingKBAutoFillViewController = _Class("UIDebuggingKBAutoFillViewController")
UIFontPickerViewController = _Class("UIFontPickerViewController")
UIEditingOverlayViewController = _Class("UIEditingOverlayViewController")
UISearchController = _Class("UISearchController")
UISearchContainerViewController = _Class("UISearchContainerViewController")
UIKeyCommandDiscoverabilityHUDViewController = _Class(
"UIKeyCommandDiscoverabilityHUDViewController"
)
UIPrinterSetupPINViewController = _Class("UIPrinterSetupPINViewController")
UIPrinterSetupDisplayPINViewController = _Class(
"UIPrinterSetupDisplayPINViewController"
)
UIPrinterPickerViewController = _Class("UIPrinterPickerViewController")
UIPrintRangeViewController = _Class("UIPrintRangeViewController")
UIKeyboardHiddenViewController = _Class("UIKeyboardHiddenViewController")
UIKeyboardHiddenViewController_ExternalCredential = _Class(
"UIKeyboardHiddenViewController_ExternalCredential"
)
UIKeyboardHiddenViewController_Save = _Class("UIKeyboardHiddenViewController_Save")
UIKeyboardHiddenViewController_Autofill = _Class(
"UIKeyboardHiddenViewController_Autofill"
)
UISystemKeyboardDockController = _Class("UISystemKeyboardDockController")
UICandidateViewController = _Class("UICandidateViewController")
UICompatibilityPredictiveViewController = _Class(
"UICompatibilityPredictiveViewController"
)
UISystemInputViewController = _Class("UISystemInputViewController")
UIKBStackViewController = _Class("UIKBStackViewController")
UIKBSystemLayoutViewController = _Class("UIKBSystemLayoutViewController")
UIKBAutoFillTestViewController = _Class("UIKBAutoFillTestViewController")
UIKBAutoFillTestGroundTruthGenerationViewController = _Class(
"UIKBAutoFillTestGroundTruthGenerationViewController"
)
_UIRemoteViewController = _Class("_UIRemoteViewController")
_UIShareInvitationRemoteViewController = _Class(
"_UIShareInvitationRemoteViewController"
)
_UIColorPickerRemoteViewController = _Class("_UIColorPickerRemoteViewController")
_UIFontPickerRemoteViewController = _Class("_UIFontPickerRemoteViewController")
_UIRemoteInputViewController = _Class("_UIRemoteInputViewController")
_UIScreenRoutePickerRemoteViewController = _Class(
"_UIScreenRoutePickerRemoteViewController"
)
_UIDocumentPickerRemoteViewController = _Class("_UIDocumentPickerRemoteViewController")
_UIDocumentPickerExtensionRemoteViewController = _Class(
"_UIDocumentPickerExtensionRemoteViewController"
)
UIKeyboardMediaServiceRemoteViewController = _Class(
"UIKeyboardMediaServiceRemoteViewController"
)
UIApplicationRotationFollowingController = _Class(
"UIApplicationRotationFollowingController"
)
_UIFallbackPresentationViewController = _Class("_UIFallbackPresentationViewController")
UIApplicationRotationFollowingControllerNoTouches = _Class(
"UIApplicationRotationFollowingControllerNoTouches"
)
UIInputWindowController = _Class("UIInputWindowController")
UIWebDateTimePopoverViewController = _Class("UIWebDateTimePopoverViewController")
UIWebFileUploadPanel = _Class("UIWebFileUploadPanel")
UIInputViewController = _Class("UIInputViewController")
UICompatibilityInputViewController = _Class("UICompatibilityInputViewController")
UISystemInputAssistantViewController = _Class("UISystemInputAssistantViewController")
UIUndoTutorialViewController = _Class("UIUndoTutorialViewController")
UIDocumentPickerViewController = _Class("UIDocumentPickerViewController")
UIDocumentMenuViewController = _Class("UIDocumentMenuViewController")
UIDocumentPickerExtensionViewController = _Class(
"UIDocumentPickerExtensionViewController"
)
UIAccessibilityLargeTextSegmentedViewController = _Class(
"UIAccessibilityLargeTextSegmentedViewController"
)
UITableViewController = _Class("UITableViewController")
_UIRemoteDictionaryViewController = _Class("_UIRemoteDictionaryViewController")
UIDebuggingIvarViewController = _Class("UIDebuggingIvarViewController")
UIDebuggingInformationListTableViewController = _Class(
"UIDebuggingInformationListTableViewController"
)
UIDebuggingInformationRootTableViewController = _Class(
"UIDebuggingInformationRootTableViewController"
)
UIPrintingProgressViewController = _Class("UIPrintingProgressViewController")
UIPrinterUtilityTableViewController = _Class("UIPrinterUtilityTableViewController")
UIPrinterSetupConfigureViewController = _Class("UIPrinterSetupConfigureViewController")
UIPrinterBrowserViewController = _Class("UIPrinterBrowserViewController")
UIPrintPaperViewController = _Class("UIPrintPaperViewController")
UIPrintPanelTableViewController = _Class("UIPrintPanelTableViewController")
UIPrintMoreOptionsTableViewController = _Class("UIPrintMoreOptionsTableViewController")
UIRecentsInputViewController = _Class("UIRecentsInputViewController")
UIExpandedBarItemsTableViewController = _Class("UIExpandedBarItemsTableViewController")
UIWebSelectTableViewController = _Class("UIWebSelectTableViewController")
UISplitViewController = _Class("UISplitViewController")
UIMultiColumnViewController = _Class("UIMultiColumnViewController")
UIReferenceLibraryViewController = _Class("UIReferenceLibraryViewController")
UIPageViewController = _Class("UIPageViewController")
UIPageController = _Class("UIPageController")
UISnapshotModalViewController = _Class("UISnapshotModalViewController")
UICollectionViewController = _Class("UICollectionViewController")
_UIAlertControllerTextFieldViewController = _Class(
"_UIAlertControllerTextFieldViewController"
)
UIPrintPreviewViewController = _Class("UIPrintPreviewViewController")
UITabBarController = _Class("UITabBarController")
UINavigationController = _Class("UINavigationController")
_UIDictationPrivacySheetController = _Class("_UIDictationPrivacySheetController")
_UIDocumentPickerNavigationBridgeController = _Class(
"_UIDocumentPickerNavigationBridgeController"
)
UIPrintPanelNavigationController = _Class("UIPrintPanelNavigationController")
UIVideoEditorController = _Class("UIVideoEditorController")
UIImagePickerController = _Class("UIImagePickerController")
UIMoreNavigationController = _Class("UIMoreNavigationController")
UIMoreListController = _Class("UIMoreListController")
UIColorPickerViewController = _Class("UIColorPickerViewController")
_UIColorPickerViewController = _Class("_UIColorPickerViewController")
UIAlertController = _Class("UIAlertController")
_UIRotatingAlertController = _Class("_UIRotatingAlertController")
UIWebRotatingAlertController = _Class("UIWebRotatingAlertController")
UIKBAlertController = _Class("UIKBAlertController")
UIInterfaceActionGroupViewController = _Class("UIInterfaceActionGroupViewController")
_UITextAttributeDictionary = _Class("_UITextAttributeDictionary")
_UITextAttributeDictionaryImplI = _Class("_UITextAttributeDictionaryImplI")
_UITextAttributeDictionaryImplM = _Class("_UITextAttributeDictionaryImplM")
_UIMutableTextAttributeDictionary = _Class("_UIMutableTextAttributeDictionary")
UITableViewVisibleCells = _Class("UITableViewVisibleCells")
NSTextSelection = _Class("NSTextSelection")
_NSTextAttachmentLayoutContext = _Class("_NSTextAttachmentLayoutContext")
NSRTFWriter = _Class("NSRTFWriter")
NSHTMLWriter = _Class("NSHTMLWriter")
NSSubstituteWebResource = _Class("NSSubstituteWebResource")
NSTextCorrectionMarkerRendering = _Class("NSTextCorrectionMarkerRendering")
NSRTFReader = _Class("NSRTFReader")
NSRTFReaderTableState = _Class("NSRTFReaderTableState")
NSTextAttachmentViewProvider = _Class("NSTextAttachmentViewProvider")
_NSTextViewportLayoutObserver = _Class("_NSTextViewportLayoutObserver")
NSTextViewportLayoutController = _Class("NSTextViewportLayoutController")
UIPointFIFO = _Class("UIPointFIFO")
UIQuadCurvePointFIFO = _Class("UIQuadCurvePointFIFO")
UIBoxcarFilterPointFIFO = _Class("UIBoxcarFilterPointFIFO")
_UIPointVector = _Class("_UIPointVector")
NSTextBlock = _Class("NSTextBlock")
NSTextTable = _Class("NSTextTable")
NSTextTableBlock = _Class("NSTextTableBlock")
NSTextBlockLayoutHelper = _Class("NSTextBlockLayoutHelper")
_NSTextRunStorage = _Class("_NSTextRunStorage")
NSTextList = _Class("NSTextList")
NSStringDrawingTextStorageSettings = _Class("NSStringDrawingTextStorageSettings")
NSTextContentManager = _Class("NSTextContentManager")
NSTextContentStorage = _Class("NSTextContentStorage")
NSTextLineFragment = _Class("NSTextLineFragment")
NSCountableTextLocation = _Class("NSCountableTextLocation")
NSTextRange = _Class("NSTextRange")
NSCountableTextRange = _Class("NSCountableTextRange")
NSLayoutManagerTextBlockRowArrayCache = _Class("NSLayoutManagerTextBlockRowArrayCache")
NSLayoutManagerTextBlockHelper = _Class("NSLayoutManagerTextBlockHelper")
NSTextElement = _Class("NSTextElement")
NSTextParagraph = _Class("NSTextParagraph")
NSGlyphInfo = _Class("NSGlyphInfo")
NSCTGlyphInfo = _Class("NSCTGlyphInfo")
NSCIDGlyphInfo = _Class("NSCIDGlyphInfo")
NSIdentityGlyphInfo = _Class("NSIdentityGlyphInfo")
NSGlyphNameGlyphInfo = _Class("NSGlyphNameGlyphInfo")
_NSAttributeRun = _Class("_NSAttributeRun")
_NSAttributes = _Class("_NSAttributes")
_NSCGTextGraphicsContext = _Class("_NSCGTextGraphicsContext")
UINibCoderValue = _Class("UINibCoderValue")
NSTextLayoutManager = _Class("NSTextLayoutManager")
NSTextSelectionNavigation = _Class("NSTextSelectionNavigation")
__NSTextSelectionLineFragmentInfo = _Class("__NSTextSelectionLineFragmentInfo")
NSLineFragmentRenderingContext = _Class("NSLineFragmentRenderingContext")
NSTextLayoutFragment = _Class("NSTextLayoutFragment")
NSHTMLWebDelegate = _Class("NSHTMLWebDelegate")
NSHTMLReader = _Class("NSHTMLReader")
NSTextAlternatives = _Class("NSTextAlternatives")
__NSTextAppearanceEffectContext = _Class("__NSTextAppearanceEffectContext")
_NSUIKitTextGraphicsContext = _Class("_NSUIKitTextGraphicsContext")
_NSStandardTextGraphicsContextProvider = _Class(
"_NSStandardTextGraphicsContextProvider"
)
NSTextGraphicsContextProvider = _Class("NSTextGraphicsContextProvider")
NSTextAttachment = _Class("NSTextAttachment")
NSTextTab = _Class("NSTextTab")
NSDataAsset = _Class("NSDataAsset")
NSInsertionPointHelper = _Class("NSInsertionPointHelper")
_NSCoreTypesetterLayoutCache = _Class("_NSCoreTypesetterLayoutCache")
NSATSGlyphStorage = _Class("NSATSGlyphStorage")
NSATSLineFragment = _Class("NSATSLineFragment")
NSGlyphGenerator = _Class("NSGlyphGenerator")
_NSATSTypesetterGuts = _Class("_NSATSTypesetterGuts")
NSTextContainer = _Class("NSTextContainer")
NSParagraphArbitrator = _Class("NSParagraphArbitrator")
NSExtraLMData = _Class("NSExtraLMData")
NSRunStorage = _Class("NSRunStorage")
NSIdRunStorage = _Class("NSIdRunStorage")
NSStorage = _Class("NSStorage")
_NSTextStorageSideData = _Class("_NSTextStorageSideData")
UINibStringIDTable = _Class("UINibStringIDTable")
NSLayoutManager = _Class("NSLayoutManager")
NSTypesetter = _Class("NSTypesetter")
NSATSTypesetter = _Class("NSATSTypesetter")
NSSingleLineTypesetter = _Class("NSSingleLineTypesetter")
NSCoreTypesetter = _Class("NSCoreTypesetter")
NSStringDrawingContext = _Class("NSStringDrawingContext")
NSShadow = _Class("NSShadow")
NSParagraphStyleExtraData = _Class("NSParagraphStyleExtraData")
__NSFontExtraData = _Class("__NSFontExtraData")
UIFontDescriptor = _Class("UIFontDescriptor")
UICTFontDescriptor = _Class("UICTFontDescriptor")
_UIFontCacheKey = _Class("_UIFontCacheKey")
_UIFontDescriptorCacheKey = _Class("_UIFontDescriptorCacheKey")
_UIFontTextStyleCacheKey = _Class("_UIFontTextStyleCacheKey")
_UIFontNameCacheKey = _Class("_UIFontNameCacheKey")
_UIFontSystemCacheKey = _Class("_UIFontSystemCacheKey")
UIFont = _Class("UIFont")
NSFont = _Class("NSFont")
UICTFont = _Class("UICTFont")
_UICache = _Class("_UICache")
NSParagraphStyle = _Class("NSParagraphStyle")
NSMutableParagraphStyle = _Class("NSMutableParagraphStyle")
UINibEncoder = _Class("UINibEncoder")
UINibDecoder = _Class("UINibDecoder")
NSAttributeDictionaryEnumerator = _Class("NSAttributeDictionaryEnumerator")
_NSCachedAttributedString = _Class("_NSCachedAttributedString")
NSConcreteNotifyingMutableAttributedString = _Class(
"NSConcreteNotifyingMutableAttributedString"
)
NSTextStorage = _Class("NSTextStorage")
__NSImmutableTextStorage = _Class("__NSImmutableTextStorage")
NSConcreteTextStorage = _Class("NSConcreteTextStorage")
NSStringDrawingTextStorage = _Class("NSStringDrawingTextStorage")
__NSATSStringSegment = _Class("__NSATSStringSegment")
NSAttributeDictionary = _Class("NSAttributeDictionary")
NSTempAttributeDictionary = _Class("NSTempAttributeDictionary")
|
523cd5822505ad7736049a9b999968b4b6d17ae3
|
32813222f51ca2a82907e59c5f05e08f862ee80d
|
/eval.py
|
e3bbd26719d59d34fa4f7d57453875cfb01626ac
|
[] |
no_license
|
DeokyunKim/Progressive-Face-Super-Resolution
|
5946efb5cdf770936153c692541823b3ff458cf2
|
8d7a354fa96c92f6efdb2074732c343a351d2ce8
|
refs/heads/master
| 2022-07-15T13:45:37.009522
| 2022-06-29T02:10:40
| 2022-06-29T02:10:40
| 200,457,499
| 268
| 67
| null | 2020-04-02T19:14:16
| 2019-08-04T06:20:32
|
Python
|
UTF-8
|
Python
| false
| false
| 4,395
|
py
|
eval.py
|
import torch
from torch import optim, nn
import argparse
from dataloader import CelebDataSet
from torch.utils.data import DataLoader
from model import Generator
import os
from torch.autograd import Variable, grad
import sys
from torchvision import utils
from math import log10
from ssim import ssim, msssim
def test(dataloader, generator, MSE_Loss, step, alpha):
avg_psnr = 0
avg_ssim = 0
avg_msssim = 0
for i, (x2_target_image, x4_target_image, target_image, input_image) in enumerate(dataloader):
input_image = input_image.to(device)
if step==1:
target_image = x2_target_image.to(device)
elif step==2:
target_image = x4_target_image.to(device)
else:
target_image = target_image.to(device)
input_image = input_image.to(device)
predicted_image = generator(input_image, step, alpha)
predicted_image = predicted_image.double()
target_image = target_image.double()
mse_loss = MSE_Loss(0.5*predicted_image+0.5, 0.5*target_image+0.5)
psnr = 10*log10(1./mse_loss.item())
avg_psnr += psnr
_ssim = ssim(0.5*predicted_image+0.5, 0.5*target_image+0.5)
avg_ssim += _ssim.item()
ms_ssim = msssim(0.5*predicted_image+0.5, 0.5*target_image+0.5)
avg_msssim += ms_ssim.item()
sys.stdout.write('\r [%d/%d] Test progress... PSNR: %6.4f'%(i, len(dataloader), psnr))
save_image = torch.cat([predicted_image, target_image], dim=0)
if args.local_rank==0:
utils.save_image(0.5*save_image+0.5, os.path.join(args.result_path, '%d_results.jpg'%i))
print('Test done, Average PSNR:%6.4f, Average SSIM:%6.4f, Average MS-SSIM:%6.4f '%(avg_psnr/len(dataloader),avg_ssim/len(dataloader), avg_msssim/len(dataloader)))
if __name__ == '__main__':
parser = argparse.ArgumentParser('Implemnetation of Progressive Face Super-Resolution Attention to Face Landmarks')
parser.add_argument('--batch-size', default=16, type=int)
parser.add_argument('--checkpoint-path', default='./checkpoints/', type=str)
parser.add_argument('--data-path', default='./dataset/', type=str)
parser.add_argument('--result-path', default='./result/', type=str)
parser.add_argument('--workers', default=4, type=int)
parser.add_argument('--local_rank', default=0, type=int, help='node rank for distributed training')
parser.add_argument('--distributed', action='store_true')
args = parser.parse_args()
if args.local_rank == 0:
if not os.path.exists(args.result_path):
os.mkdir(args.result_path)
print('===>make directory', args.result_path)
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
args.gpu = 0
args.world_size = 1
dataset = CelebDataSet(data_path=args.data_path, state='test')
if args.distributed:
import apex.parallel as parallel
args.gpu = args.local_rank
torch.cuda.set_device(args.gpu)
torch.distributed.init_process_group(backend='nccl', init_method='env://')
args.world_size = torch.distributed.get_world_size()
train_sampler = torch.utils.data.distributed.DistributedSampler(dataset)
dataloader = DataLoader(dataset, batch_size=args.batch_size, shuffle=False, num_workers=args.workers, pin_memory=True, sampler=train_sampler)
else:
dataloader = DataLoader(dataset=dataset, batch_size=args.batch_size, shuffle=False, num_workers=args.workers, pin_memory=True)
generator = Generator().to(device)
if args.distributed:
g_checkpoint = torch.load(args.checkpoint_path, map_location = lambda storage, loc: storage.cuda(args.local_rank))
generator = parallel.DistributedDataParallel(generator)
generator = parallel.convert_syncbn_model(generator)
else:
g_checkpoint = torch.load(args.checkpoint_path)
generator.load_state_dict(g_checkpoint['model_state_dict'], strict=False)
step = g_checkpoint['step']
alpha = g_checkpoint['alpha']
iteration = g_checkpoint['iteration']
print('pre-trained model is loaded step:%d, alpha:%d iteration:%d'%(step, alpha, iteration))
MSE_Loss = nn.MSELoss()
generator.eval()
test(dataloader, generator, MSE_Loss, step, alpha)
|
6613982205af5ea138ce04d04e2211c30c0b4468
|
c530897cb72b6943c7226b25824444cad5f3503b
|
/usaspending_api/search/migrations/0004_transactionsearch_award_date_signed.py
|
9ad9f527141518c287fe8b522964d6be93137760
|
[
"CC0-1.0"
] |
permissive
|
fedspendingtransparency/usaspending-api
|
fc63a22d32ea0207b7273d3e1ef26ba9dbabc42a
|
38f920438697930ae3ac57bbcaae9034877d8fb7
|
refs/heads/master
| 2023-09-01T22:00:36.633612
| 2023-08-29T18:39:18
| 2023-08-29T18:39:18
| 65,394,827
| 276
| 118
|
CC0-1.0
| 2023-09-14T20:33:15
| 2016-08-10T15:39:45
|
Python
|
UTF-8
|
Python
| false
| false
| 406
|
py
|
0004_transactionsearch_award_date_signed.py
|
# Generated by Django 2.2.17 on 2021-08-11 16:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('search', '0003_auto_20210629_1550'),
]
operations = [
migrations.AddField(
model_name='transactionsearch',
name='award_date_signed',
field=models.DateTimeField(null=True),
),
]
|
886d5c3111db9cae8d40a90facb08278feb9dcea
|
9f84d91a8ae3df53b07fe3267992fba00a99ac9e
|
/torch_geometric/nn/conv/hetero_conv.py
|
e1d4d2a9d26ee25ce0c98f40b63cb5a7449d96dc
|
[
"MIT"
] |
permissive
|
pyg-team/pytorch_geometric
|
ebea601eae228f3905465b5c2349d3fb3bb5cb26
|
a52af694b8ce6a80811e20966fe6d08a3e7511fe
|
refs/heads/master
| 2023-08-31T04:13:40.943308
| 2023-08-30T12:48:42
| 2023-08-30T12:48:42
| 106,024,057
| 6,775
| 1,563
|
MIT
| 2023-09-14T17:10:18
| 2017-10-06T16:03:03
|
Python
|
UTF-8
|
Python
| false
| false
| 6,470
|
py
|
hetero_conv.py
|
import warnings
from collections import defaultdict
from typing import Dict, List, Optional
import torch
from torch import Tensor
from torch_geometric.nn.conv import MessagePassing
from torch_geometric.nn.module_dict import ModuleDict
from torch_geometric.typing import Adj, EdgeType, NodeType
from torch_geometric.utils.hetero import check_add_self_loops
def group(xs: List[Tensor], aggr: Optional[str]) -> Optional[Tensor]:
if len(xs) == 0:
return None
elif aggr is None:
return torch.stack(xs, dim=1)
elif len(xs) == 1:
return xs[0]
elif aggr == "cat":
return torch.cat(xs, dim=-1)
else:
out = torch.stack(xs, dim=0)
out = getattr(torch, aggr)(out, dim=0)
out = out[0] if isinstance(out, tuple) else out
return out
class HeteroConv(torch.nn.Module):
r"""A generic wrapper for computing graph convolution on heterogeneous
graphs.
This layer will pass messages from source nodes to target nodes based on
the bipartite GNN layer given for a specific edge type.
If multiple relations point to the same destination, their results will be
aggregated according to :attr:`aggr`.
In comparison to :meth:`torch_geometric.nn.to_hetero`, this layer is
especially useful if you want to apply different message passing modules
for different edge types.
.. code-block:: python
hetero_conv = HeteroConv({
('paper', 'cites', 'paper'): GCNConv(-1, 64),
('author', 'writes', 'paper'): SAGEConv((-1, -1), 64),
('paper', 'written_by', 'author'): GATConv((-1, -1), 64),
}, aggr='sum')
out_dict = hetero_conv(x_dict, edge_index_dict)
print(list(out_dict.keys()))
>>> ['paper', 'author']
Args:
convs (Dict[Tuple[str, str, str], MessagePassing]): A dictionary
holding a bipartite
:class:`~torch_geometric.nn.conv.MessagePassing` layer for each
individual edge type.
aggr (str, optional): The aggregation scheme to use for grouping node
embeddings generated by different relations
(:obj:`"sum"`, :obj:`"mean"`, :obj:`"min"`, :obj:`"max"`,
:obj:`"cat"`, :obj:`None`). (default: :obj:`"sum"`)
"""
def __init__(
self,
convs: Dict[EdgeType, MessagePassing],
aggr: Optional[str] = "sum",
):
super().__init__()
for edge_type, module in convs.items():
check_add_self_loops(module, [edge_type])
src_node_types = set([key[0] for key in convs.keys()])
dst_node_types = set([key[-1] for key in convs.keys()])
if len(src_node_types - dst_node_types) > 0:
warnings.warn(
f"There exist node types ({src_node_types - dst_node_types}) "
f"whose representations do not get updated during message "
f"passing as they do not occur as destination type in any "
f"edge type. This may lead to unexpected behavior.")
self.convs = ModuleDict({'__'.join(k): v for k, v in convs.items()})
self.aggr = aggr
def reset_parameters(self):
r"""Resets all learnable parameters of the module."""
for conv in self.convs.values():
conv.reset_parameters()
def forward(
self,
x_dict: Dict[NodeType, Tensor],
edge_index_dict: Dict[EdgeType, Adj],
*args_dict,
**kwargs_dict,
) -> Dict[NodeType, Tensor]:
r"""Runs the forward pass of the module.
Args:
x_dict (Dict[str, torch.Tensor]): A dictionary holding node feature
information for each individual node type.
edge_index_dict (Dict[Tuple[str, str, str], torch.Tensor]): A
dictionary holding graph connectivity information for each
individual edge type, either as a :class:`torch.Tensor` of
shape :obj:`[2, num_edges]` or a
:class:`torch_sparse.SparseTensor`.
*args_dict (optional): Additional forward arguments of invididual
:class:`torch_geometric.nn.conv.MessagePassing` layers.
**kwargs_dict (optional): Additional forward arguments of
individual :class:`torch_geometric.nn.conv.MessagePassing`
layers.
For example, if a specific GNN layer at edge type
:obj:`edge_type` expects edge attributes :obj:`edge_attr` as a
forward argument, then you can pass them to
:meth:`~torch_geometric.nn.conv.HeteroConv.forward` via
:obj:`edge_attr_dict = { edge_type: edge_attr }`.
"""
out_dict = defaultdict(list)
for edge_type, edge_index in edge_index_dict.items():
src, rel, dst = edge_type
str_edge_type = '__'.join(edge_type)
if str_edge_type not in self.convs:
continue
args = []
for value_dict in args_dict:
if edge_type in value_dict:
args.append(value_dict[edge_type])
elif src == dst and src in value_dict:
args.append(value_dict[src])
elif src in value_dict or dst in value_dict:
args.append(
(value_dict.get(src, None), value_dict.get(dst, None)))
kwargs = {}
for arg, value_dict in kwargs_dict.items():
arg = arg[:-5] # `{*}_dict`
if edge_type in value_dict:
kwargs[arg] = value_dict[edge_type]
elif src == dst and src in value_dict:
kwargs[arg] = value_dict[src]
elif src in value_dict or dst in value_dict:
kwargs[arg] = (value_dict.get(src, None),
value_dict.get(dst, None))
conv = self.convs[str_edge_type]
if src == dst:
out = conv(x_dict[src], edge_index, *args, **kwargs)
else:
out = conv((x_dict[src], x_dict[dst]), edge_index, *args,
**kwargs)
out_dict[dst].append(out)
for key, value in out_dict.items():
out_dict[key] = group(value, self.aggr)
return out_dict
def __repr__(self) -> str:
return f'{self.__class__.__name__}(num_relations={len(self.convs)})'
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.