partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
train | make_hex_texture | Makes a texture consisting on a grid of hexagons.
Args:
grid_size (int): the number of hexagons along each dimension of the grid
resolution (int): the number of midpoints along the line of each hexagon
Returns:
A texture. | penkit/textures/__init__.py | def make_hex_texture(grid_size = 2, resolution=1):
"""Makes a texture consisting on a grid of hexagons.
Args:
grid_size (int): the number of hexagons along each dimension of the grid
resolution (int): the number of midpoints along the line of each hexagon
Returns:
A texture.
... | def make_hex_texture(grid_size = 2, resolution=1):
"""Makes a texture consisting on a grid of hexagons.
Args:
grid_size (int): the number of hexagons along each dimension of the grid
resolution (int): the number of midpoints along the line of each hexagon
Returns:
A texture.
... | [
"Makes",
"a",
"texture",
"consisting",
"on",
"a",
"grid",
"of",
"hexagons",
"."
] | paulgb/penkit | python | https://github.com/paulgb/penkit/blob/da451a30f62cfefbab285b9d6979b8dec3ac4957/penkit/textures/__init__.py#L69-L113 | [
"def",
"make_hex_texture",
"(",
"grid_size",
"=",
"2",
",",
"resolution",
"=",
"1",
")",
":",
"grid_x",
",",
"grid_y",
"=",
"np",
".",
"meshgrid",
"(",
"np",
".",
"arange",
"(",
"grid_size",
")",
",",
"np",
".",
"arange",
"(",
"grid_size",
")",
")",
... | da451a30f62cfefbab285b9d6979b8dec3ac4957 |
train | make_noise_surface | Makes a surface by generating random noise and blurring it.
Args:
dims (pair): the dimensions of the surface to create
blur (float): the amount of Gaussian blur to apply
seed (int): a random seed to use (optional)
Returns:
surface: A surface. | penkit/surfaces.py | def make_noise_surface(dims=DEFAULT_DIMS, blur=10, seed=None):
"""Makes a surface by generating random noise and blurring it.
Args:
dims (pair): the dimensions of the surface to create
blur (float): the amount of Gaussian blur to apply
seed (int): a random seed to use (optional)
... | def make_noise_surface(dims=DEFAULT_DIMS, blur=10, seed=None):
"""Makes a surface by generating random noise and blurring it.
Args:
dims (pair): the dimensions of the surface to create
blur (float): the amount of Gaussian blur to apply
seed (int): a random seed to use (optional)
... | [
"Makes",
"a",
"surface",
"by",
"generating",
"random",
"noise",
"and",
"blurring",
"it",
"."
] | paulgb/penkit | python | https://github.com/paulgb/penkit/blob/da451a30f62cfefbab285b9d6979b8dec3ac4957/penkit/surfaces.py#L10-L24 | [
"def",
"make_noise_surface",
"(",
"dims",
"=",
"DEFAULT_DIMS",
",",
"blur",
"=",
"10",
",",
"seed",
"=",
"None",
")",
":",
"if",
"seed",
"is",
"not",
"None",
":",
"np",
".",
"random",
".",
"seed",
"(",
"seed",
")",
"return",
"gaussian_filter",
"(",
"... | da451a30f62cfefbab285b9d6979b8dec3ac4957 |
train | make_gradients | Makes a pair of gradients to generate textures from numpy primitives.
Args:
dims (pair): the dimensions of the surface to create
Returns:
pair: A pair of surfaces. | penkit/surfaces.py | def make_gradients(dims=DEFAULT_DIMS):
"""Makes a pair of gradients to generate textures from numpy primitives.
Args:
dims (pair): the dimensions of the surface to create
Returns:
pair: A pair of surfaces.
"""
return np.meshgrid(
np.linspace(0.0, 1.0, dims[0]),
np.l... | def make_gradients(dims=DEFAULT_DIMS):
"""Makes a pair of gradients to generate textures from numpy primitives.
Args:
dims (pair): the dimensions of the surface to create
Returns:
pair: A pair of surfaces.
"""
return np.meshgrid(
np.linspace(0.0, 1.0, dims[0]),
np.l... | [
"Makes",
"a",
"pair",
"of",
"gradients",
"to",
"generate",
"textures",
"from",
"numpy",
"primitives",
"."
] | paulgb/penkit | python | https://github.com/paulgb/penkit/blob/da451a30f62cfefbab285b9d6979b8dec3ac4957/penkit/surfaces.py#L27-L39 | [
"def",
"make_gradients",
"(",
"dims",
"=",
"DEFAULT_DIMS",
")",
":",
"return",
"np",
".",
"meshgrid",
"(",
"np",
".",
"linspace",
"(",
"0.0",
",",
"1.0",
",",
"dims",
"[",
"0",
"]",
")",
",",
"np",
".",
"linspace",
"(",
"0.0",
",",
"1.0",
",",
"d... | da451a30f62cfefbab285b9d6979b8dec3ac4957 |
train | make_sine_surface | Makes a surface from the 3D sine function.
Args:
dims (pair): the dimensions of the surface to create
offset (float): an offset applied to the function
scale (float): a scale applied to the sine frequency
Returns:
surface: A surface. | penkit/surfaces.py | def make_sine_surface(dims=DEFAULT_DIMS, offset=0.5, scale=1.0):
"""Makes a surface from the 3D sine function.
Args:
dims (pair): the dimensions of the surface to create
offset (float): an offset applied to the function
scale (float): a scale applied to the sine frequency
Returns:
... | def make_sine_surface(dims=DEFAULT_DIMS, offset=0.5, scale=1.0):
"""Makes a surface from the 3D sine function.
Args:
dims (pair): the dimensions of the surface to create
offset (float): an offset applied to the function
scale (float): a scale applied to the sine frequency
Returns:
... | [
"Makes",
"a",
"surface",
"from",
"the",
"3D",
"sine",
"function",
"."
] | paulgb/penkit | python | https://github.com/paulgb/penkit/blob/da451a30f62cfefbab285b9d6979b8dec3ac4957/penkit/surfaces.py#L42-L54 | [
"def",
"make_sine_surface",
"(",
"dims",
"=",
"DEFAULT_DIMS",
",",
"offset",
"=",
"0.5",
",",
"scale",
"=",
"1.0",
")",
":",
"gradients",
"=",
"(",
"np",
".",
"array",
"(",
"make_gradients",
"(",
"dims",
")",
")",
"-",
"offset",
")",
"*",
"scale",
"*... | da451a30f62cfefbab285b9d6979b8dec3ac4957 |
train | make_bubble_surface | Makes a surface from the product of sine functions on each axis.
Args:
dims (pair): the dimensions of the surface to create
repeat (int): the frequency of the waves is set to ensure this many
repetitions of the function
Returns:
surface: A surface. | penkit/surfaces.py | def make_bubble_surface(dims=DEFAULT_DIMS, repeat=3):
"""Makes a surface from the product of sine functions on each axis.
Args:
dims (pair): the dimensions of the surface to create
repeat (int): the frequency of the waves is set to ensure this many
repetitions of the function
... | def make_bubble_surface(dims=DEFAULT_DIMS, repeat=3):
"""Makes a surface from the product of sine functions on each axis.
Args:
dims (pair): the dimensions of the surface to create
repeat (int): the frequency of the waves is set to ensure this many
repetitions of the function
... | [
"Makes",
"a",
"surface",
"from",
"the",
"product",
"of",
"sine",
"functions",
"on",
"each",
"axis",
"."
] | paulgb/penkit | python | https://github.com/paulgb/penkit/blob/da451a30f62cfefbab285b9d6979b8dec3ac4957/penkit/surfaces.py#L57-L71 | [
"def",
"make_bubble_surface",
"(",
"dims",
"=",
"DEFAULT_DIMS",
",",
"repeat",
"=",
"3",
")",
":",
"gradients",
"=",
"make_gradients",
"(",
"dims",
")",
"return",
"(",
"np",
".",
"sin",
"(",
"(",
"gradients",
"[",
"0",
"]",
"-",
"0.5",
")",
"*",
"rep... | da451a30f62cfefbab285b9d6979b8dec3ac4957 |
train | vrp_solver | Solve a path using or-tools' Vehicle Routing Problem solver.
Params:
path_graph the PathGraph representing the problem
initial_solution a solution to start with (list of indices, not
including the origin)
runtime_seconds how long to search before returning... | optimizer/penkit_optimize/vrp_solver.py | def vrp_solver(path_graph, initial_solution=None, runtime_seconds=60):
"""Solve a path using or-tools' Vehicle Routing Problem solver.
Params:
path_graph the PathGraph representing the problem
initial_solution a solution to start with (list of indices, not
inclu... | def vrp_solver(path_graph, initial_solution=None, runtime_seconds=60):
"""Solve a path using or-tools' Vehicle Routing Problem solver.
Params:
path_graph the PathGraph representing the problem
initial_solution a solution to start with (list of indices, not
inclu... | [
"Solve",
"a",
"path",
"using",
"or",
"-",
"tools",
"Vehicle",
"Routing",
"Problem",
"solver",
".",
"Params",
":",
"path_graph",
"the",
"PathGraph",
"representing",
"the",
"problem",
"initial_solution",
"a",
"solution",
"to",
"start",
"with",
"(",
"list",
"of",... | paulgb/penkit | python | https://github.com/paulgb/penkit/blob/da451a30f62cfefbab285b9d6979b8dec3ac4957/optimizer/penkit_optimize/vrp_solver.py#L6-L78 | [
"def",
"vrp_solver",
"(",
"path_graph",
",",
"initial_solution",
"=",
"None",
",",
"runtime_seconds",
"=",
"60",
")",
":",
"# Create the VRP routing model. The 1 means we are only looking",
"# for a single path.",
"routing",
"=",
"pywrapcp",
".",
"RoutingModel",
"(",
"pat... | da451a30f62cfefbab285b9d6979b8dec3ac4957 |
train | init_controller | Initialize a controller.
Provides a single global controller for applications that can't do this
themselves | pyvera/__init__.py | def init_controller(url):
"""Initialize a controller.
Provides a single global controller for applications that can't do this
themselves
"""
# pylint: disable=global-statement
global _VERA_CONTROLLER
created = False
if _VERA_CONTROLLER is None:
_VERA_CONTROLLER = VeraController(... | def init_controller(url):
"""Initialize a controller.
Provides a single global controller for applications that can't do this
themselves
"""
# pylint: disable=global-statement
global _VERA_CONTROLLER
created = False
if _VERA_CONTROLLER is None:
_VERA_CONTROLLER = VeraController(... | [
"Initialize",
"a",
"controller",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L55-L68 | [
"def",
"init_controller",
"(",
"url",
")",
":",
"# pylint: disable=global-statement",
"global",
"_VERA_CONTROLLER",
"created",
"=",
"False",
"if",
"_VERA_CONTROLLER",
"is",
"None",
":",
"_VERA_CONTROLLER",
"=",
"VeraController",
"(",
"url",
")",
"created",
"=",
"Tru... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraController.data_request | Perform a data_request and return the result. | pyvera/__init__.py | def data_request(self, payload, timeout=TIMEOUT):
"""Perform a data_request and return the result."""
request_url = self.base_url + "/data_request"
return requests.get(request_url, timeout=timeout, params=payload) | def data_request(self, payload, timeout=TIMEOUT):
"""Perform a data_request and return the result."""
request_url = self.base_url + "/data_request"
return requests.get(request_url, timeout=timeout, params=payload) | [
"Perform",
"a",
"data_request",
"and",
"return",
"the",
"result",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L99-L102 | [
"def",
"data_request",
"(",
"self",
",",
"payload",
",",
"timeout",
"=",
"TIMEOUT",
")",
":",
"request_url",
"=",
"self",
".",
"base_url",
"+",
"\"/data_request\"",
"return",
"requests",
".",
"get",
"(",
"request_url",
",",
"timeout",
"=",
"timeout",
",",
... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraController.get_simple_devices_info | Get basic device info from Vera. | pyvera/__init__.py | def get_simple_devices_info(self):
"""Get basic device info from Vera."""
j = self.data_request({'id': 'sdata'}).json()
self.scenes = []
items = j.get('scenes')
for item in items:
self.scenes.append(VeraScene(item, self))
if j.get('temperature'):
... | def get_simple_devices_info(self):
"""Get basic device info from Vera."""
j = self.data_request({'id': 'sdata'}).json()
self.scenes = []
items = j.get('scenes')
for item in items:
self.scenes.append(VeraScene(item, self))
if j.get('temperature'):
... | [
"Get",
"basic",
"device",
"info",
"from",
"Vera",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L104-L128 | [
"def",
"get_simple_devices_info",
"(",
"self",
")",
":",
"j",
"=",
"self",
".",
"data_request",
"(",
"{",
"'id'",
":",
"'sdata'",
"}",
")",
".",
"json",
"(",
")",
"self",
".",
"scenes",
"=",
"[",
"]",
"items",
"=",
"j",
".",
"get",
"(",
"'scenes'",... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraController.get_device_by_name | Search the list of connected devices by name.
device_name param is the string name of the device | pyvera/__init__.py | def get_device_by_name(self, device_name):
"""Search the list of connected devices by name.
device_name param is the string name of the device
"""
# Find the device for the vera device name we are interested in
found_device = None
for device in self.get_devices():
... | def get_device_by_name(self, device_name):
"""Search the list of connected devices by name.
device_name param is the string name of the device
"""
# Find the device for the vera device name we are interested in
found_device = None
for device in self.get_devices():
... | [
"Search",
"the",
"list",
"of",
"connected",
"devices",
"by",
"name",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L137-L154 | [
"def",
"get_device_by_name",
"(",
"self",
",",
"device_name",
")",
":",
"# Find the device for the vera device name we are interested in",
"found_device",
"=",
"None",
"for",
"device",
"in",
"self",
".",
"get_devices",
"(",
")",
":",
"if",
"device",
".",
"name",
"==... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraController.get_device_by_id | Search the list of connected devices by ID.
device_id param is the integer ID of the device | pyvera/__init__.py | def get_device_by_id(self, device_id):
"""Search the list of connected devices by ID.
device_id param is the integer ID of the device
"""
# Find the device for the vera device name we are interested in
found_device = None
for device in self.get_devices():
if... | def get_device_by_id(self, device_id):
"""Search the list of connected devices by ID.
device_id param is the integer ID of the device
"""
# Find the device for the vera device name we are interested in
found_device = None
for device in self.get_devices():
if... | [
"Search",
"the",
"list",
"of",
"connected",
"devices",
"by",
"ID",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L156-L173 | [
"def",
"get_device_by_id",
"(",
"self",
",",
"device_id",
")",
":",
"# Find the device for the vera device name we are interested in",
"found_device",
"=",
"None",
"for",
"device",
"in",
"self",
".",
"get_devices",
"(",
")",
":",
"if",
"device",
".",
"device_id",
"=... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraController.get_devices | Get list of connected devices.
category_filter param is an array of strings | pyvera/__init__.py | def get_devices(self, category_filter=''):
"""Get list of connected devices.
category_filter param is an array of strings
"""
# pylint: disable=too-many-branches
# the Vera rest API is a bit rough so we need to make 2 calls to get
# all the info e need
self.get_... | def get_devices(self, category_filter=''):
"""Get list of connected devices.
category_filter param is an array of strings
"""
# pylint: disable=too-many-branches
# the Vera rest API is a bit rough so we need to make 2 calls to get
# all the info e need
self.get_... | [
"Get",
"list",
"of",
"connected",
"devices",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L175-L241 | [
"def",
"get_devices",
"(",
"self",
",",
"category_filter",
"=",
"''",
")",
":",
"# pylint: disable=too-many-branches",
"# the Vera rest API is a bit rough so we need to make 2 calls to get",
"# all the info e need",
"self",
".",
"get_simple_devices_info",
"(",
")",
"j",
"=",
... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraController.refresh_data | Refresh data from Vera device. | pyvera/__init__.py | def refresh_data(self):
"""Refresh data from Vera device."""
j = self.data_request({'id': 'sdata'}).json()
self.temperature_units = j.get('temperature', 'C')
self.model = j.get('model')
self.version = j.get('version')
self.serial_number = j.get('serial_number')
... | def refresh_data(self):
"""Refresh data from Vera device."""
j = self.data_request({'id': 'sdata'}).json()
self.temperature_units = j.get('temperature', 'C')
self.model = j.get('model')
self.version = j.get('version')
self.serial_number = j.get('serial_number')
... | [
"Refresh",
"data",
"from",
"Vera",
"device",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L243-L265 | [
"def",
"refresh_data",
"(",
"self",
")",
":",
"j",
"=",
"self",
".",
"data_request",
"(",
"{",
"'id'",
":",
"'sdata'",
"}",
")",
".",
"json",
"(",
")",
"self",
".",
"temperature_units",
"=",
"j",
".",
"get",
"(",
"'temperature'",
",",
"'C'",
")",
"... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraController.map_services | Get full Vera device service info. | pyvera/__init__.py | def map_services(self):
"""Get full Vera device service info."""
# the Vera rest API is a bit rough so we need to make 2 calls
# to get all the info e need
self.get_simple_devices_info()
j = self.data_request({'id': 'status', 'output_format': 'json'}).json()
service_map... | def map_services(self):
"""Get full Vera device service info."""
# the Vera rest API is a bit rough so we need to make 2 calls
# to get all the info e need
self.get_simple_devices_info()
j = self.data_request({'id': 'status', 'output_format': 'json'}).json()
service_map... | [
"Get",
"full",
"Vera",
"device",
"service",
"info",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L267-L282 | [
"def",
"map_services",
"(",
"self",
")",
":",
"# the Vera rest API is a bit rough so we need to make 2 calls",
"# to get all the info e need",
"self",
".",
"get_simple_devices_info",
"(",
")",
"j",
"=",
"self",
".",
"data_request",
"(",
"{",
"'id'",
":",
"'status'",
","... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraController.get_changed_devices | Get data since last timestamp.
This is done via a blocking call, pass NONE for initial state. | pyvera/__init__.py | def get_changed_devices(self, timestamp):
"""Get data since last timestamp.
This is done via a blocking call, pass NONE for initial state.
"""
if timestamp is None:
payload = {}
else:
payload = {
'timeout': SUBSCRIPTION_WAIT,
... | def get_changed_devices(self, timestamp):
"""Get data since last timestamp.
This is done via a blocking call, pass NONE for initial state.
"""
if timestamp is None:
payload = {}
else:
payload = {
'timeout': SUBSCRIPTION_WAIT,
... | [
"Get",
"data",
"since",
"last",
"timestamp",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L284-L332 | [
"def",
"get_changed_devices",
"(",
"self",
",",
"timestamp",
")",
":",
"if",
"timestamp",
"is",
"None",
":",
"payload",
"=",
"{",
"}",
"else",
":",
"payload",
"=",
"{",
"'timeout'",
":",
"SUBSCRIPTION_WAIT",
",",
"'minimumdelay'",
":",
"SUBSCRIPTION_MIN_WAIT",... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDevice.vera_request | Perfom a vera_request for this device. | pyvera/__init__.py | def vera_request(self, **kwargs):
"""Perfom a vera_request for this device."""
request_payload = {
'output_format': 'json',
'DeviceNum': self.device_id,
}
request_payload.update(kwargs)
return self.vera_controller.data_request(request_payload) | def vera_request(self, **kwargs):
"""Perfom a vera_request for this device."""
request_payload = {
'output_format': 'json',
'DeviceNum': self.device_id,
}
request_payload.update(kwargs)
return self.vera_controller.data_request(request_payload) | [
"Perfom",
"a",
"vera_request",
"for",
"this",
"device",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L445-L453 | [
"def",
"vera_request",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"request_payload",
"=",
"{",
"'output_format'",
":",
"'json'",
",",
"'DeviceNum'",
":",
"self",
".",
"device_id",
",",
"}",
"request_payload",
".",
"update",
"(",
"kwargs",
")",
"return... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDevice.set_service_value | Set a variable on the vera device.
This will call the Vera api to change device state. | pyvera/__init__.py | def set_service_value(self, service_id, set_name, parameter_name, value):
"""Set a variable on the vera device.
This will call the Vera api to change device state.
"""
payload = {
'id': 'lu_action',
'action': 'Set' + set_name,
'serviceId': service_id,... | def set_service_value(self, service_id, set_name, parameter_name, value):
"""Set a variable on the vera device.
This will call the Vera api to change device state.
"""
payload = {
'id': 'lu_action',
'action': 'Set' + set_name,
'serviceId': service_id,... | [
"Set",
"a",
"variable",
"on",
"the",
"vera",
"device",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L455-L469 | [
"def",
"set_service_value",
"(",
"self",
",",
"service_id",
",",
"set_name",
",",
"parameter_name",
",",
"value",
")",
":",
"payload",
"=",
"{",
"'id'",
":",
"'lu_action'",
",",
"'action'",
":",
"'Set'",
"+",
"set_name",
",",
"'serviceId'",
":",
"service_id"... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDevice.call_service | Call a Vera service.
This will call the Vera api to change device state. | pyvera/__init__.py | def call_service(self, service_id, action):
"""Call a Vera service.
This will call the Vera api to change device state.
"""
result = self.vera_request(id='action', serviceId=service_id,
action=action)
logger.debug("call_service: "
... | def call_service(self, service_id, action):
"""Call a Vera service.
This will call the Vera api to change device state.
"""
result = self.vera_request(id='action', serviceId=service_id,
action=action)
logger.debug("call_service: "
... | [
"Call",
"a",
"Vera",
"service",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L471-L481 | [
"def",
"call_service",
"(",
"self",
",",
"service_id",
",",
"action",
")",
":",
"result",
"=",
"self",
".",
"vera_request",
"(",
"id",
"=",
"'action'",
",",
"serviceId",
"=",
"service_id",
",",
"action",
"=",
"action",
")",
"logger",
".",
"debug",
"(",
... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDevice.set_cache_value | Set a variable in the local state dictionary.
This does not change the physical device. Useful if you want the
device state to refect a new value which has not yet updated drom
Vera. | pyvera/__init__.py | def set_cache_value(self, name, value):
"""Set a variable in the local state dictionary.
This does not change the physical device. Useful if you want the
device state to refect a new value which has not yet updated drom
Vera.
"""
dev_info = self.json_state.get('deviceInf... | def set_cache_value(self, name, value):
"""Set a variable in the local state dictionary.
This does not change the physical device. Useful if you want the
device state to refect a new value which has not yet updated drom
Vera.
"""
dev_info = self.json_state.get('deviceInf... | [
"Set",
"a",
"variable",
"in",
"the",
"local",
"state",
"dictionary",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L483-L496 | [
"def",
"set_cache_value",
"(",
"self",
",",
"name",
",",
"value",
")",
":",
"dev_info",
"=",
"self",
".",
"json_state",
".",
"get",
"(",
"'deviceInfo'",
")",
"if",
"dev_info",
".",
"get",
"(",
"name",
".",
"lower",
"(",
")",
")",
"is",
"None",
":",
... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDevice.set_cache_complex_value | Set a variable in the local complex state dictionary.
This does not change the physical device. Useful if you want the
device state to refect a new value which has not yet updated from
Vera. | pyvera/__init__.py | def set_cache_complex_value(self, name, value):
"""Set a variable in the local complex state dictionary.
This does not change the physical device. Useful if you want the
device state to refect a new value which has not yet updated from
Vera.
"""
for item in self.json_sta... | def set_cache_complex_value(self, name, value):
"""Set a variable in the local complex state dictionary.
This does not change the physical device. Useful if you want the
device state to refect a new value which has not yet updated from
Vera.
"""
for item in self.json_sta... | [
"Set",
"a",
"variable",
"in",
"the",
"local",
"complex",
"state",
"dictionary",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L498-L507 | [
"def",
"set_cache_complex_value",
"(",
"self",
",",
"name",
",",
"value",
")",
":",
"for",
"item",
"in",
"self",
".",
"json_state",
".",
"get",
"(",
"'states'",
")",
":",
"if",
"item",
".",
"get",
"(",
"'variable'",
")",
"==",
"name",
":",
"item",
"[... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDevice.get_complex_value | Get a value from the service dictionaries.
It's best to use get_value if it has the data you require since
the vera subscription only updates data in dev_info. | pyvera/__init__.py | def get_complex_value(self, name):
"""Get a value from the service dictionaries.
It's best to use get_value if it has the data you require since
the vera subscription only updates data in dev_info.
"""
for item in self.json_state.get('states'):
if item.get('variable'... | def get_complex_value(self, name):
"""Get a value from the service dictionaries.
It's best to use get_value if it has the data you require since
the vera subscription only updates data in dev_info.
"""
for item in self.json_state.get('states'):
if item.get('variable'... | [
"Get",
"a",
"value",
"from",
"the",
"service",
"dictionaries",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L509-L518 | [
"def",
"get_complex_value",
"(",
"self",
",",
"name",
")",
":",
"for",
"item",
"in",
"self",
".",
"json_state",
".",
"get",
"(",
"'states'",
")",
":",
"if",
"item",
".",
"get",
"(",
"'variable'",
")",
"==",
"name",
":",
"return",
"item",
".",
"get",
... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDevice.get_strict_value | Get a case-sensitive keys value from the dev_info area. | pyvera/__init__.py | def get_strict_value(self, name):
"""Get a case-sensitive keys value from the dev_info area.
"""
dev_info = self.json_state.get('deviceInfo')
return dev_info.get(name, None) | def get_strict_value(self, name):
"""Get a case-sensitive keys value from the dev_info area.
"""
dev_info = self.json_state.get('deviceInfo')
return dev_info.get(name, None) | [
"Get",
"a",
"case",
"-",
"sensitive",
"keys",
"value",
"from",
"the",
"dev_info",
"area",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L537-L541 | [
"def",
"get_strict_value",
"(",
"self",
",",
"name",
")",
":",
"dev_info",
"=",
"self",
".",
"json_state",
".",
"get",
"(",
"'deviceInfo'",
")",
"return",
"dev_info",
".",
"get",
"(",
"name",
",",
"None",
")"
] | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDevice.refresh_complex_value | Refresh a value from the service dictionaries.
It's best to use get_value / refresh if it has the data you need. | pyvera/__init__.py | def refresh_complex_value(self, name):
"""Refresh a value from the service dictionaries.
It's best to use get_value / refresh if it has the data you need.
"""
for item in self.json_state.get('states'):
if item.get('variable') == name:
service_id = item.get('s... | def refresh_complex_value(self, name):
"""Refresh a value from the service dictionaries.
It's best to use get_value / refresh if it has the data you need.
"""
for item in self.json_state.get('states'):
if item.get('variable') == name:
service_id = item.get('s... | [
"Refresh",
"a",
"value",
"from",
"the",
"service",
"dictionaries",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L543-L560 | [
"def",
"refresh_complex_value",
"(",
"self",
",",
"name",
")",
":",
"for",
"item",
"in",
"self",
".",
"json_state",
".",
"get",
"(",
"'states'",
")",
":",
"if",
"item",
".",
"get",
"(",
"'variable'",
")",
"==",
"name",
":",
"service_id",
"=",
"item",
... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDevice.refresh | Refresh the dev_info data used by get_value.
Only needed if you're not using subscriptions. | pyvera/__init__.py | def refresh(self):
"""Refresh the dev_info data used by get_value.
Only needed if you're not using subscriptions.
"""
j = self.vera_request(id='sdata', output_format='json').json()
devices = j.get('devices')
for device_data in devices:
if device_data.get('id'... | def refresh(self):
"""Refresh the dev_info data used by get_value.
Only needed if you're not using subscriptions.
"""
j = self.vera_request(id='sdata', output_format='json').json()
devices = j.get('devices')
for device_data in devices:
if device_data.get('id'... | [
"Refresh",
"the",
"dev_info",
"data",
"used",
"by",
"get_value",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L562-L571 | [
"def",
"refresh",
"(",
"self",
")",
":",
"j",
"=",
"self",
".",
"vera_request",
"(",
"id",
"=",
"'sdata'",
",",
"output_format",
"=",
"'json'",
")",
".",
"json",
"(",
")",
"devices",
"=",
"j",
".",
"get",
"(",
"'devices'",
")",
"for",
"device_data",
... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDevice.update | Update the dev_info data from a dictionary.
Only updates if it already exists in the device. | pyvera/__init__.py | def update(self, params):
"""Update the dev_info data from a dictionary.
Only updates if it already exists in the device.
"""
dev_info = self.json_state.get('deviceInfo')
dev_info.update({k: params[k] for k in params if dev_info.get(k)}) | def update(self, params):
"""Update the dev_info data from a dictionary.
Only updates if it already exists in the device.
"""
dev_info = self.json_state.get('deviceInfo')
dev_info.update({k: params[k] for k in params if dev_info.get(k)}) | [
"Update",
"the",
"dev_info",
"data",
"from",
"a",
"dictionary",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L573-L579 | [
"def",
"update",
"(",
"self",
",",
"params",
")",
":",
"dev_info",
"=",
"self",
".",
"json_state",
".",
"get",
"(",
"'deviceInfo'",
")",
"dev_info",
".",
"update",
"(",
"{",
"k",
":",
"params",
"[",
"k",
"]",
"for",
"k",
"in",
"params",
"if",
"dev_... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDevice.level | Get level from vera. | pyvera/__init__.py | def level(self):
"""Get level from vera."""
# Used for dimmers, curtains
# Have seen formats of 10, 0.0 and "0%"!
level = self.get_value('level')
try:
return int(float(level))
except (TypeError, ValueError):
pass
try:
return int... | def level(self):
"""Get level from vera."""
# Used for dimmers, curtains
# Have seen formats of 10, 0.0 and "0%"!
level = self.get_value('level')
try:
return int(float(level))
except (TypeError, ValueError):
pass
try:
return int... | [
"Get",
"level",
"from",
"vera",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L628-L641 | [
"def",
"level",
"(",
"self",
")",
":",
"# Used for dimmers, curtains",
"# Have seen formats of 10, 0.0 and \"0%\"!",
"level",
"=",
"self",
".",
"get_value",
"(",
"'level'",
")",
"try",
":",
"return",
"int",
"(",
"float",
"(",
"level",
")",
")",
"except",
"(",
... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraSwitch.set_switch_state | Set the switch state, also update local state. | pyvera/__init__.py | def set_switch_state(self, state):
"""Set the switch state, also update local state."""
self.set_service_value(
self.switch_service,
'Target',
'newTargetValue',
state)
self.set_cache_value('Status', state) | def set_switch_state(self, state):
"""Set the switch state, also update local state."""
self.set_service_value(
self.switch_service,
'Target',
'newTargetValue',
state)
self.set_cache_value('Status', state) | [
"Set",
"the",
"switch",
"state",
"also",
"update",
"local",
"state",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L690-L697 | [
"def",
"set_switch_state",
"(",
"self",
",",
"state",
")",
":",
"self",
".",
"set_service_value",
"(",
"self",
".",
"switch_service",
",",
"'Target'",
",",
"'newTargetValue'",
",",
"state",
")",
"self",
".",
"set_cache_value",
"(",
"'Status'",
",",
"state",
... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDimmer.is_switched_on | Get dimmer state.
Refresh data from Vera if refresh is True,
otherwise use local cache. Refresh is only needed if you're
not using subscriptions. | pyvera/__init__.py | def is_switched_on(self, refresh=False):
"""Get dimmer state.
Refresh data from Vera if refresh is True,
otherwise use local cache. Refresh is only needed if you're
not using subscriptions.
"""
if refresh:
self.refresh()
return self.get_brightness(ref... | def is_switched_on(self, refresh=False):
"""Get dimmer state.
Refresh data from Vera if refresh is True,
otherwise use local cache. Refresh is only needed if you're
not using subscriptions.
"""
if refresh:
self.refresh()
return self.get_brightness(ref... | [
"Get",
"dimmer",
"state",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L730-L739 | [
"def",
"is_switched_on",
"(",
"self",
",",
"refresh",
"=",
"False",
")",
":",
"if",
"refresh",
":",
"self",
".",
"refresh",
"(",
")",
"return",
"self",
".",
"get_brightness",
"(",
"refresh",
")",
">",
"0"
] | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDimmer.get_brightness | Get dimmer brightness.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions.
Converts the Vera level property for dimmable lights from a percentage
to the 0 - 255 scale used by HA. | pyvera/__init__.py | def get_brightness(self, refresh=False):
"""Get dimmer brightness.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions.
Converts the Vera level property for dimmable lights from a percentage
to the 0 - 25... | def get_brightness(self, refresh=False):
"""Get dimmer brightness.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions.
Converts the Vera level property for dimmable lights from a percentage
to the 0 - 25... | [
"Get",
"dimmer",
"brightness",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L741-L755 | [
"def",
"get_brightness",
"(",
"self",
",",
"refresh",
"=",
"False",
")",
":",
"if",
"refresh",
":",
"self",
".",
"refresh",
"(",
")",
"brightness",
"=",
"0",
"percent",
"=",
"self",
".",
"level",
"if",
"percent",
">",
"0",
":",
"brightness",
"=",
"ro... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDimmer.set_brightness | Set dimmer brightness.
Converts the Vera level property for dimmable lights from a percentage
to the 0 - 255 scale used by HA. | pyvera/__init__.py | def set_brightness(self, brightness):
"""Set dimmer brightness.
Converts the Vera level property for dimmable lights from a percentage
to the 0 - 255 scale used by HA.
"""
percent = 0
if brightness > 0:
percent = round(brightness / 2.55)
self.set_ser... | def set_brightness(self, brightness):
"""Set dimmer brightness.
Converts the Vera level property for dimmable lights from a percentage
to the 0 - 255 scale used by HA.
"""
percent = 0
if brightness > 0:
percent = round(brightness / 2.55)
self.set_ser... | [
"Set",
"dimmer",
"brightness",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L757-L772 | [
"def",
"set_brightness",
"(",
"self",
",",
"brightness",
")",
":",
"percent",
"=",
"0",
"if",
"brightness",
">",
"0",
":",
"percent",
"=",
"round",
"(",
"brightness",
"/",
"2.55",
")",
"self",
".",
"set_service_value",
"(",
"self",
".",
"dimmer_service",
... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDimmer.get_color_index | Get color index.
Refresh data from Vera if refresh is True, otherwise use local cache. | pyvera/__init__.py | def get_color_index(self, colors, refresh=False):
"""Get color index.
Refresh data from Vera if refresh is True, otherwise use local cache.
"""
if refresh:
self.refresh_complex_value('SupportedColors')
sup = self.get_complex_value('SupportedColors')
if sup i... | def get_color_index(self, colors, refresh=False):
"""Get color index.
Refresh data from Vera if refresh is True, otherwise use local cache.
"""
if refresh:
self.refresh_complex_value('SupportedColors')
sup = self.get_complex_value('SupportedColors')
if sup i... | [
"Get",
"color",
"index",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L774-L790 | [
"def",
"get_color_index",
"(",
"self",
",",
"colors",
",",
"refresh",
"=",
"False",
")",
":",
"if",
"refresh",
":",
"self",
".",
"refresh_complex_value",
"(",
"'SupportedColors'",
")",
"sup",
"=",
"self",
".",
"get_complex_value",
"(",
"'SupportedColors'",
")"... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDimmer.get_color | Get color.
Refresh data from Vera if refresh is True, otherwise use local cache. | pyvera/__init__.py | def get_color(self, refresh=False):
"""Get color.
Refresh data from Vera if refresh is True, otherwise use local cache.
"""
if refresh:
self.refresh_complex_value('CurrentColor')
ci = self.get_color_index(['R', 'G', 'B'], refresh)
cur = self.get_complex_valu... | def get_color(self, refresh=False):
"""Get color.
Refresh data from Vera if refresh is True, otherwise use local cache.
"""
if refresh:
self.refresh_complex_value('CurrentColor')
ci = self.get_color_index(['R', 'G', 'B'], refresh)
cur = self.get_complex_valu... | [
"Get",
"color",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L792-L809 | [
"def",
"get_color",
"(",
"self",
",",
"refresh",
"=",
"False",
")",
":",
"if",
"refresh",
":",
"self",
".",
"refresh_complex_value",
"(",
"'CurrentColor'",
")",
"ci",
"=",
"self",
".",
"get_color_index",
"(",
"[",
"'R'",
",",
"'G'",
",",
"'B'",
"]",
",... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraDimmer.set_color | Set dimmer color. | pyvera/__init__.py | def set_color(self, rgb):
"""Set dimmer color.
"""
target = ','.join([str(c) for c in rgb])
self.set_service_value(
self.color_service,
'ColorRGB',
'newColorRGBTarget',
target)
rgbi = self.get_color_index(['R', 'G', 'B'])
... | def set_color(self, rgb):
"""Set dimmer color.
"""
target = ','.join([str(c) for c in rgb])
self.set_service_value(
self.color_service,
'ColorRGB',
'newColorRGBTarget',
target)
rgbi = self.get_color_index(['R', 'G', 'B'])
... | [
"Set",
"dimmer",
"color",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L811-L830 | [
"def",
"set_color",
"(",
"self",
",",
"rgb",
")",
":",
"target",
"=",
"','",
".",
"join",
"(",
"[",
"str",
"(",
"c",
")",
"for",
"c",
"in",
"rgb",
"]",
")",
"self",
".",
"set_service_value",
"(",
"self",
".",
"color_service",
",",
"'ColorRGB'",
","... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraArmableDevice.set_armed_state | Set the armed state, also update local state. | pyvera/__init__.py | def set_armed_state(self, state):
"""Set the armed state, also update local state."""
self.set_service_value(
self.security_sensor_service,
'Armed',
'newArmedValue',
state)
self.set_cache_value('Armed', state) | def set_armed_state(self, state):
"""Set the armed state, also update local state."""
self.set_service_value(
self.security_sensor_service,
'Armed',
'newArmedValue',
state)
self.set_cache_value('Armed', state) | [
"Set",
"the",
"armed",
"state",
"also",
"update",
"local",
"state",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L836-L843 | [
"def",
"set_armed_state",
"(",
"self",
",",
"state",
")",
":",
"self",
".",
"set_service_value",
"(",
"self",
".",
"security_sensor_service",
",",
"'Armed'",
",",
"'newArmedValue'",
",",
"state",
")",
"self",
".",
"set_cache_value",
"(",
"'Armed'",
",",
"state... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraArmableDevice.is_switched_on | Get armed state.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions. | pyvera/__init__.py | def is_switched_on(self, refresh=False):
"""Get armed state.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions.
"""
if refresh:
self.refresh()
val = self.get_value('Armed')
r... | def is_switched_on(self, refresh=False):
"""Get armed state.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions.
"""
if refresh:
self.refresh()
val = self.get_value('Armed')
r... | [
"Get",
"armed",
"state",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L853-L862 | [
"def",
"is_switched_on",
"(",
"self",
",",
"refresh",
"=",
"False",
")",
":",
"if",
"refresh",
":",
"self",
".",
"refresh",
"(",
")",
"val",
"=",
"self",
".",
"get_value",
"(",
"'Armed'",
")",
"return",
"val",
"==",
"'1'"
] | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraCurtain.is_open | Get curtains state.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions. | pyvera/__init__.py | def is_open(self, refresh=False):
"""Get curtains state.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions.
"""
if refresh:
self.refresh()
return self.get_level(refresh) > 0 | def is_open(self, refresh=False):
"""Get curtains state.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions.
"""
if refresh:
self.refresh()
return self.get_level(refresh) > 0 | [
"Get",
"curtains",
"state",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L902-L910 | [
"def",
"is_open",
"(",
"self",
",",
"refresh",
"=",
"False",
")",
":",
"if",
"refresh",
":",
"self",
".",
"refresh",
"(",
")",
"return",
"self",
".",
"get_level",
"(",
"refresh",
")",
">",
"0"
] | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraCurtain.set_level | Set open level of the curtains.
Scale is 0-100 | pyvera/__init__.py | def set_level(self, level):
"""Set open level of the curtains.
Scale is 0-100
"""
self.set_service_value(
self.dimmer_service,
'LoadLevelTarget',
'newLoadlevelTarget',
level)
self.set_cache_value('level', level) | def set_level(self, level):
"""Set open level of the curtains.
Scale is 0-100
"""
self.set_service_value(
self.dimmer_service,
'LoadLevelTarget',
'newLoadlevelTarget',
level)
self.set_cache_value('level', level) | [
"Set",
"open",
"level",
"of",
"the",
"curtains",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L923-L934 | [
"def",
"set_level",
"(",
"self",
",",
"level",
")",
":",
"self",
".",
"set_service_value",
"(",
"self",
".",
"dimmer_service",
",",
"'LoadLevelTarget'",
",",
"'newLoadlevelTarget'",
",",
"level",
")",
"self",
".",
"set_cache_value",
"(",
"'level'",
",",
"level... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraLock.get_last_user | Get the last used PIN user id | pyvera/__init__.py | def get_last_user(self, refresh=False):
"""Get the last used PIN user id"""
if refresh:
self.refresh_complex_value('sl_UserCode')
val = self.get_complex_value("sl_UserCode")
# Syntax string: UserID="<pin_slot>" UserName="<pin_code_name>"
# See http://wiki.micasaverde.... | def get_last_user(self, refresh=False):
"""Get the last used PIN user id"""
if refresh:
self.refresh_complex_value('sl_UserCode')
val = self.get_complex_value("sl_UserCode")
# Syntax string: UserID="<pin_slot>" UserName="<pin_code_name>"
# See http://wiki.micasaverde.... | [
"Get",
"the",
"last",
"used",
"PIN",
"user",
"id"
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L967-L986 | [
"def",
"get_last_user",
"(",
"self",
",",
"refresh",
"=",
"False",
")",
":",
"if",
"refresh",
":",
"self",
".",
"refresh_complex_value",
"(",
"'sl_UserCode'",
")",
"val",
"=",
"self",
".",
"get_complex_value",
"(",
"\"sl_UserCode\"",
")",
"# Syntax string: UserI... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraLock.get_pin_codes | Get the list of PIN codes
Codes can also be found with self.get_complex_value('PinCodes') | pyvera/__init__.py | def get_pin_codes(self, refresh=False):
"""Get the list of PIN codes
Codes can also be found with self.get_complex_value('PinCodes')
"""
if refresh:
self.refresh()
val = self.get_value("pincodes")
# val syntax string: <VERSION=3>next_available_user_code_id\t... | def get_pin_codes(self, refresh=False):
"""Get the list of PIN codes
Codes can also be found with self.get_complex_value('PinCodes')
"""
if refresh:
self.refresh()
val = self.get_value("pincodes")
# val syntax string: <VERSION=3>next_available_user_code_id\t... | [
"Get",
"the",
"list",
"of",
"PIN",
"codes"
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L1006-L1046 | [
"def",
"get_pin_codes",
"(",
"self",
",",
"refresh",
"=",
"False",
")",
":",
"if",
"refresh",
":",
"self",
".",
"refresh",
"(",
")",
"val",
"=",
"self",
".",
"get_value",
"(",
"\"pincodes\"",
")",
"# val syntax string: <VERSION=3>next_available_user_code_id\\tuser... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraThermostat.set_temperature | Set current goal temperature / setpoint | pyvera/__init__.py | def set_temperature(self, temp):
"""Set current goal temperature / setpoint"""
self.set_service_value(
self.thermostat_setpoint,
'CurrentSetpoint',
'NewCurrentSetpoint',
temp)
self.set_cache_value('setpoint', temp) | def set_temperature(self, temp):
"""Set current goal temperature / setpoint"""
self.set_service_value(
self.thermostat_setpoint,
'CurrentSetpoint',
'NewCurrentSetpoint',
temp)
self.set_cache_value('setpoint', temp) | [
"Set",
"current",
"goal",
"temperature",
"/",
"setpoint"
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L1056-L1065 | [
"def",
"set_temperature",
"(",
"self",
",",
"temp",
")",
":",
"self",
".",
"set_service_value",
"(",
"self",
".",
"thermostat_setpoint",
",",
"'CurrentSetpoint'",
",",
"'NewCurrentSetpoint'",
",",
"temp",
")",
"self",
".",
"set_cache_value",
"(",
"'setpoint'",
"... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraThermostat.get_current_goal_temperature | Get current goal temperature / setpoint | pyvera/__init__.py | def get_current_goal_temperature(self, refresh=False):
"""Get current goal temperature / setpoint"""
if refresh:
self.refresh()
try:
return float(self.get_value('setpoint'))
except (TypeError, ValueError):
return None | def get_current_goal_temperature(self, refresh=False):
"""Get current goal temperature / setpoint"""
if refresh:
self.refresh()
try:
return float(self.get_value('setpoint'))
except (TypeError, ValueError):
return None | [
"Get",
"current",
"goal",
"temperature",
"/",
"setpoint"
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L1067-L1074 | [
"def",
"get_current_goal_temperature",
"(",
"self",
",",
"refresh",
"=",
"False",
")",
":",
"if",
"refresh",
":",
"self",
".",
"refresh",
"(",
")",
"try",
":",
"return",
"float",
"(",
"self",
".",
"get_value",
"(",
"'setpoint'",
")",
")",
"except",
"(",
... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraThermostat.get_current_temperature | Get current temperature | pyvera/__init__.py | def get_current_temperature(self, refresh=False):
"""Get current temperature"""
if refresh:
self.refresh()
try:
return float(self.get_value('temperature'))
except (TypeError, ValueError):
return None | def get_current_temperature(self, refresh=False):
"""Get current temperature"""
if refresh:
self.refresh()
try:
return float(self.get_value('temperature'))
except (TypeError, ValueError):
return None | [
"Get",
"current",
"temperature"
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L1076-L1083 | [
"def",
"get_current_temperature",
"(",
"self",
",",
"refresh",
"=",
"False",
")",
":",
"if",
"refresh",
":",
"self",
".",
"refresh",
"(",
")",
"try",
":",
"return",
"float",
"(",
"self",
".",
"get_value",
"(",
"'temperature'",
")",
")",
"except",
"(",
... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraThermostat.set_hvac_mode | Set the hvac mode | pyvera/__init__.py | def set_hvac_mode(self, mode):
"""Set the hvac mode"""
self.set_service_value(
self.thermostat_operating_service,
'ModeTarget',
'NewModeTarget',
mode)
self.set_cache_value('mode', mode) | def set_hvac_mode(self, mode):
"""Set the hvac mode"""
self.set_service_value(
self.thermostat_operating_service,
'ModeTarget',
'NewModeTarget',
mode)
self.set_cache_value('mode', mode) | [
"Set",
"the",
"hvac",
"mode"
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L1085-L1092 | [
"def",
"set_hvac_mode",
"(",
"self",
",",
"mode",
")",
":",
"self",
".",
"set_service_value",
"(",
"self",
".",
"thermostat_operating_service",
",",
"'ModeTarget'",
",",
"'NewModeTarget'",
",",
"mode",
")",
"self",
".",
"set_cache_value",
"(",
"'mode'",
",",
"... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraThermostat.set_fan_mode | Set the fan mode | pyvera/__init__.py | def set_fan_mode(self, mode):
"""Set the fan mode"""
self.set_service_value(
self.thermostat_fan_service,
'Mode',
'NewMode',
mode)
self.set_cache_value('fanmode', mode) | def set_fan_mode(self, mode):
"""Set the fan mode"""
self.set_service_value(
self.thermostat_fan_service,
'Mode',
'NewMode',
mode)
self.set_cache_value('fanmode', mode) | [
"Set",
"the",
"fan",
"mode"
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L1116-L1123 | [
"def",
"set_fan_mode",
"(",
"self",
",",
"mode",
")",
":",
"self",
".",
"set_service_value",
"(",
"self",
".",
"thermostat_fan_service",
",",
"'Mode'",
",",
"'NewMode'",
",",
"mode",
")",
"self",
".",
"set_cache_value",
"(",
"'fanmode'",
",",
"mode",
")"
] | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraSceneController.get_last_scene_id | Get last scene id.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions. | pyvera/__init__.py | def get_last_scene_id(self, refresh=False):
"""Get last scene id.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions.
"""
if refresh:
self.refresh_complex_value('LastSceneID')
sel... | def get_last_scene_id(self, refresh=False):
"""Get last scene id.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions.
"""
if refresh:
self.refresh_complex_value('LastSceneID')
sel... | [
"Get",
"last",
"scene",
"id",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L1157-L1167 | [
"def",
"get_last_scene_id",
"(",
"self",
",",
"refresh",
"=",
"False",
")",
":",
"if",
"refresh",
":",
"self",
".",
"refresh_complex_value",
"(",
"'LastSceneID'",
")",
"self",
".",
"refresh_complex_value",
"(",
"'sl_CentralScene'",
")",
"val",
"=",
"self",
"."... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraSceneController.get_last_scene_time | Get last scene time.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions. | pyvera/__init__.py | def get_last_scene_time(self, refresh=False):
"""Get last scene time.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions.
"""
if refresh:
self.refresh_complex_value('LastSceneTime')
v... | def get_last_scene_time(self, refresh=False):
"""Get last scene time.
Refresh data from Vera if refresh is True, otherwise use local cache.
Refresh is only needed if you're not using subscriptions.
"""
if refresh:
self.refresh_complex_value('LastSceneTime')
v... | [
"Get",
"last",
"scene",
"time",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L1169-L1178 | [
"def",
"get_last_scene_time",
"(",
"self",
",",
"refresh",
"=",
"False",
")",
":",
"if",
"refresh",
":",
"self",
".",
"refresh_complex_value",
"(",
"'LastSceneTime'",
")",
"val",
"=",
"self",
".",
"get_complex_value",
"(",
"'LastSceneTime'",
")",
"return",
"va... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraScene.vera_request | Perfom a vera_request for this scene. | pyvera/__init__.py | def vera_request(self, **kwargs):
"""Perfom a vera_request for this scene."""
request_payload = {
'output_format': 'json',
'SceneNum': self.scene_id,
}
request_payload.update(kwargs)
return self.vera_controller.data_request(request_payload) | def vera_request(self, **kwargs):
"""Perfom a vera_request for this scene."""
request_payload = {
'output_format': 'json',
'SceneNum': self.scene_id,
}
request_payload.update(kwargs)
return self.vera_controller.data_request(request_payload) | [
"Perfom",
"a",
"vera_request",
"for",
"this",
"scene",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L1225-L1233 | [
"def",
"vera_request",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"request_payload",
"=",
"{",
"'output_format'",
":",
"'json'",
",",
"'SceneNum'",
":",
"self",
".",
"scene_id",
",",
"}",
"request_payload",
".",
"update",
"(",
"kwargs",
")",
"return",... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraScene.activate | Activate a Vera scene.
This will call the Vera api to activate a scene. | pyvera/__init__.py | def activate(self):
"""Activate a Vera scene.
This will call the Vera api to activate a scene.
"""
payload = {
'id': 'lu_action',
'action': 'RunScene',
'serviceId': self.scene_service
}
result = self.vera_request(**payload)
log... | def activate(self):
"""Activate a Vera scene.
This will call the Vera api to activate a scene.
"""
payload = {
'id': 'lu_action',
'action': 'RunScene',
'serviceId': self.scene_service
}
result = self.vera_request(**payload)
log... | [
"Activate",
"a",
"Vera",
"scene",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L1235-L1250 | [
"def",
"activate",
"(",
"self",
")",
":",
"payload",
"=",
"{",
"'id'",
":",
"'lu_action'",
",",
"'action'",
":",
"'RunScene'",
",",
"'serviceId'",
":",
"self",
".",
"scene_service",
"}",
"result",
"=",
"self",
".",
"vera_request",
"(",
"*",
"*",
"payload... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | VeraScene.refresh | Refresh the data used by get_value.
Only needed if you're not using subscriptions. | pyvera/__init__.py | def refresh(self):
"""Refresh the data used by get_value.
Only needed if you're not using subscriptions.
"""
j = self.vera_request(id='sdata', output_format='json').json()
scenes = j.get('scenes')
for scene_data in scenes:
if scene_data.get('id') == self.scen... | def refresh(self):
"""Refresh the data used by get_value.
Only needed if you're not using subscriptions.
"""
j = self.vera_request(id='sdata', output_format='json').json()
scenes = j.get('scenes')
for scene_data in scenes:
if scene_data.get('id') == self.scen... | [
"Refresh",
"the",
"data",
"used",
"by",
"get_value",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/__init__.py#L1255-L1264 | [
"def",
"refresh",
"(",
"self",
")",
":",
"j",
"=",
"self",
".",
"vera_request",
"(",
"id",
"=",
"'sdata'",
",",
"output_format",
"=",
"'json'",
")",
".",
"json",
"(",
")",
"scenes",
"=",
"j",
".",
"get",
"(",
"'scenes'",
")",
"for",
"scene_data",
"... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | SubscriptionRegistry.register | Register a callback.
device: device to be updated by subscription
callback: callback for notification of changes | pyvera/subscribe.py | def register(self, device, callback):
"""Register a callback.
device: device to be updated by subscription
callback: callback for notification of changes
"""
if not device:
logger.error("Received an invalid device: %r", device)
return
logger.debu... | def register(self, device, callback):
"""Register a callback.
device: device to be updated by subscription
callback: callback for notification of changes
"""
if not device:
logger.error("Received an invalid device: %r", device)
return
logger.debu... | [
"Register",
"a",
"callback",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/subscribe.py#L41-L53 | [
"def",
"register",
"(",
"self",
",",
"device",
",",
"callback",
")",
":",
"if",
"not",
"device",
":",
"logger",
".",
"error",
"(",
"\"Received an invalid device: %r\"",
",",
"device",
")",
"return",
"logger",
".",
"debug",
"(",
"\"Subscribing to events for %s\""... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | SubscriptionRegistry.unregister | Remove a registered a callback.
device: device that has the subscription
callback: callback used in original registration | pyvera/subscribe.py | def unregister(self, device, callback):
"""Remove a registered a callback.
device: device that has the subscription
callback: callback used in original registration
"""
if not device:
logger.error("Received an invalid device: %r", device)
return
... | def unregister(self, device, callback):
"""Remove a registered a callback.
device: device that has the subscription
callback: callback used in original registration
"""
if not device:
logger.error("Received an invalid device: %r", device)
return
... | [
"Remove",
"a",
"registered",
"a",
"callback",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/subscribe.py#L55-L67 | [
"def",
"unregister",
"(",
"self",
",",
"device",
",",
"callback",
")",
":",
"if",
"not",
"device",
":",
"logger",
".",
"error",
"(",
"\"Received an invalid device: %r\"",
",",
"device",
")",
"return",
"logger",
".",
"debug",
"(",
"\"Removing subscription for {}\... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | SubscriptionRegistry.start | Start a thread to handle Vera blocked polling. | pyvera/subscribe.py | def start(self):
"""Start a thread to handle Vera blocked polling."""
self._poll_thread = threading.Thread(target=self._run_poll_server,
name='Vera Poll Thread')
self._poll_thread.deamon = True
self._poll_thread.start() | def start(self):
"""Start a thread to handle Vera blocked polling."""
self._poll_thread = threading.Thread(target=self._run_poll_server,
name='Vera Poll Thread')
self._poll_thread.deamon = True
self._poll_thread.start() | [
"Start",
"a",
"thread",
"to",
"handle",
"Vera",
"blocked",
"polling",
"."
] | pavoni/pyvera | python | https://github.com/pavoni/pyvera/blob/e05e3d13f76153444787d31948feb5419d77a8c8/pyvera/subscribe.py#L129-L134 | [
"def",
"start",
"(",
"self",
")",
":",
"self",
".",
"_poll_thread",
"=",
"threading",
".",
"Thread",
"(",
"target",
"=",
"self",
".",
"_run_poll_server",
",",
"name",
"=",
"'Vera Poll Thread'",
")",
"self",
".",
"_poll_thread",
".",
"deamon",
"=",
"True",
... | e05e3d13f76153444787d31948feb5419d77a8c8 |
train | format_timestamp | Format the UTC timestamp for Elasticsearch
eg. 2014-07-09T08:37:18.000Z
@see https://docs.python.org/2/library/time.html#time.strftime | sources/elasticsearch/logs2dataflow.py | def format_timestamp(ts):
"""
Format the UTC timestamp for Elasticsearch
eg. 2014-07-09T08:37:18.000Z
@see https://docs.python.org/2/library/time.html#time.strftime
"""
tz_info = tz.tzutc()
return datetime.fromtimestamp(ts, tz=tz_info).strftime("%Y-%m-%dT%H:%M:%S.... | def format_timestamp(ts):
"""
Format the UTC timestamp for Elasticsearch
eg. 2014-07-09T08:37:18.000Z
@see https://docs.python.org/2/library/time.html#time.strftime
"""
tz_info = tz.tzutc()
return datetime.fromtimestamp(ts, tz=tz_info).strftime("%Y-%m-%dT%H:%M:%S.... | [
"Format",
"the",
"UTC",
"timestamp",
"for",
"Elasticsearch",
"eg",
".",
"2014",
"-",
"07",
"-",
"09T08",
":",
"37",
":",
"18",
".",
"000Z"
] | macbre/data-flow-graph | python | https://github.com/macbre/data-flow-graph/blob/16164c3860f3defe3354c19b8536ed01b3bfdb61/sources/elasticsearch/logs2dataflow.py#L45-L52 | [
"def",
"format_timestamp",
"(",
"ts",
")",
":",
"tz_info",
"=",
"tz",
".",
"tzutc",
"(",
")",
"return",
"datetime",
".",
"fromtimestamp",
"(",
"ts",
",",
"tz",
"=",
"tz_info",
")",
".",
"strftime",
"(",
"\"%Y-%m-%dT%H:%M:%S.000Z\"",
")"
] | 16164c3860f3defe3354c19b8536ed01b3bfdb61 |
train | Coinapult._pick_level | Choose between small, medium, large, ... depending on the
amount specified. | exchanges/coinapult.py | def _pick_level(cls, btc_amount):
"""
Choose between small, medium, large, ... depending on the
amount specified.
"""
for size, level in cls.TICKER_LEVEL:
if btc_amount < size:
return level
return cls.TICKER_LEVEL[-1][1] | def _pick_level(cls, btc_amount):
"""
Choose between small, medium, large, ... depending on the
amount specified.
"""
for size, level in cls.TICKER_LEVEL:
if btc_amount < size:
return level
return cls.TICKER_LEVEL[-1][1] | [
"Choose",
"between",
"small",
"medium",
"large",
"...",
"depending",
"on",
"the",
"amount",
"specified",
"."
] | dursk/bitcoin-price-api | python | https://github.com/dursk/bitcoin-price-api/blob/abc186041d7041c9465f476bade589da042f6d6d/exchanges/coinapult.py#L41-L49 | [
"def",
"_pick_level",
"(",
"cls",
",",
"btc_amount",
")",
":",
"for",
"size",
",",
"level",
"in",
"cls",
".",
"TICKER_LEVEL",
":",
"if",
"btc_amount",
"<",
"size",
":",
"return",
"level",
"return",
"cls",
".",
"TICKER_LEVEL",
"[",
"-",
"1",
"]",
"[",
... | abc186041d7041c9465f476bade589da042f6d6d |
train | format_tsv_line | Render a single line for TSV file with data flow described
:type source str
:type edge str
:type target str
:type value float
:type metadata str
:rtype: str | data_flow_graph.py | def format_tsv_line(source, edge, target, value=None, metadata=None):
"""
Render a single line for TSV file with data flow described
:type source str
:type edge str
:type target str
:type value float
:type metadata str
:rtype: str
"""
return '{source}\t{edge}\t{target}\t{value}\... | def format_tsv_line(source, edge, target, value=None, metadata=None):
"""
Render a single line for TSV file with data flow described
:type source str
:type edge str
:type target str
:type value float
:type metadata str
:rtype: str
"""
return '{source}\t{edge}\t{target}\t{value}\... | [
"Render",
"a",
"single",
"line",
"for",
"TSV",
"file",
"with",
"data",
"flow",
"described"
] | macbre/data-flow-graph | python | https://github.com/macbre/data-flow-graph/blob/16164c3860f3defe3354c19b8536ed01b3bfdb61/data_flow_graph.py#L7-L24 | [
"def",
"format_tsv_line",
"(",
"source",
",",
"edge",
",",
"target",
",",
"value",
"=",
"None",
",",
"metadata",
"=",
"None",
")",
":",
"return",
"'{source}\\t{edge}\\t{target}\\t{value}\\t{metadata}'",
".",
"format",
"(",
"source",
"=",
"source",
",",
"edge",
... | 16164c3860f3defe3354c19b8536ed01b3bfdb61 |
train | format_graphviz_lines | Render a .dot file with graph definition from a given set of data
:type lines list[dict]
:rtype: str | data_flow_graph.py | def format_graphviz_lines(lines):
"""
Render a .dot file with graph definition from a given set of data
:type lines list[dict]
:rtype: str
"""
# first, prepare the unique list of all nodes (sources and targets)
lines_nodes = set()
for line in lines:
lines_nodes.add(line['source... | def format_graphviz_lines(lines):
"""
Render a .dot file with graph definition from a given set of data
:type lines list[dict]
:rtype: str
"""
# first, prepare the unique list of all nodes (sources and targets)
lines_nodes = set()
for line in lines:
lines_nodes.add(line['source... | [
"Render",
"a",
".",
"dot",
"file",
"with",
"graph",
"definition",
"from",
"a",
"given",
"set",
"of",
"data"
] | macbre/data-flow-graph | python | https://github.com/macbre/data-flow-graph/blob/16164c3860f3defe3354c19b8536ed01b3bfdb61/data_flow_graph.py#L45-L117 | [
"def",
"format_graphviz_lines",
"(",
"lines",
")",
":",
"# first, prepare the unique list of all nodes (sources and targets)",
"lines_nodes",
"=",
"set",
"(",
")",
"for",
"line",
"in",
"lines",
":",
"lines_nodes",
".",
"add",
"(",
"line",
"[",
"'source'",
"]",
")",
... | 16164c3860f3defe3354c19b8536ed01b3bfdb61 |
train | logs_map_and_reduce | :type logs str[]
:type _map (list) -> str
:type _reduce (list) -> obj | data_flow_graph.py | def logs_map_and_reduce(logs, _map, _reduce):
"""
:type logs str[]
:type _map (list) -> str
:type _reduce (list) -> obj
"""
keys = []
mapped_count = Counter()
mapped = defaultdict(list)
# first map all entries
for log in logs:
key = _map(log)
mapped[key].append(l... | def logs_map_and_reduce(logs, _map, _reduce):
"""
:type logs str[]
:type _map (list) -> str
:type _reduce (list) -> obj
"""
keys = []
mapped_count = Counter()
mapped = defaultdict(list)
# first map all entries
for log in logs:
key = _map(log)
mapped[key].append(l... | [
":",
"type",
"logs",
"str",
"[]",
":",
"type",
"_map",
"(",
"list",
")",
"-",
">",
"str",
":",
"type",
"_reduce",
"(",
"list",
")",
"-",
">",
"obj"
] | macbre/data-flow-graph | python | https://github.com/macbre/data-flow-graph/blob/16164c3860f3defe3354c19b8536ed01b3bfdb61/data_flow_graph.py#L120-L157 | [
"def",
"logs_map_and_reduce",
"(",
"logs",
",",
"_map",
",",
"_reduce",
")",
":",
"keys",
"=",
"[",
"]",
"mapped_count",
"=",
"Counter",
"(",
")",
"mapped",
"=",
"defaultdict",
"(",
"list",
")",
"# first map all entries",
"for",
"log",
"in",
"logs",
":",
... | 16164c3860f3defe3354c19b8536ed01b3bfdb61 |
train | ChromeExecutionManager.close_chromium | Close the remote chromium instance.
This command is normally executed as part of the class destructor.
It can be called early without issue, but calling ANY class functions
after the remote chromium instance is shut down will have unknown effects.
Note that if you are rapidly creating and destroying ChromeCon... | ChromeController/transport.py | def close_chromium(self):
'''
Close the remote chromium instance.
This command is normally executed as part of the class destructor.
It can be called early without issue, but calling ANY class functions
after the remote chromium instance is shut down will have unknown effects.
Note that if you are rapidly... | def close_chromium(self):
'''
Close the remote chromium instance.
This command is normally executed as part of the class destructor.
It can be called early without issue, but calling ANY class functions
after the remote chromium instance is shut down will have unknown effects.
Note that if you are rapidly... | [
"Close",
"the",
"remote",
"chromium",
"instance",
"."
] | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/transport.py#L235-L258 | [
"def",
"close_chromium",
"(",
"self",
")",
":",
"if",
"self",
".",
"cr_proc",
":",
"try",
":",
"if",
"'win'",
"in",
"sys",
".",
"platform",
":",
"self",
".",
"__close_internal_windows",
"(",
")",
"else",
":",
"self",
".",
"__close_internal_linux",
"(",
"... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeExecutionManager.connect | Open a websocket connection to remote browser, determined by
self.host and self.port. Each tab has it's own websocket
endpoint. | ChromeController/transport.py | def connect(self, tab_key):
"""
Open a websocket connection to remote browser, determined by
self.host and self.port. Each tab has it's own websocket
endpoint.
"""
assert self.tablist is not None
tab_idx = self._get_tab_idx_for_key(tab_key)
if not self.tablist:
self.tablist = self.fetch_tablist(... | def connect(self, tab_key):
"""
Open a websocket connection to remote browser, determined by
self.host and self.port. Each tab has it's own websocket
endpoint.
"""
assert self.tablist is not None
tab_idx = self._get_tab_idx_for_key(tab_key)
if not self.tablist:
self.tablist = self.fetch_tablist(... | [
"Open",
"a",
"websocket",
"connection",
"to",
"remote",
"browser",
"determined",
"by",
"self",
".",
"host",
"and",
"self",
".",
"port",
".",
"Each",
"tab",
"has",
"it",
"s",
"own",
"websocket",
"endpoint",
"."
] | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/transport.py#L300-L337 | [
"def",
"connect",
"(",
"self",
",",
"tab_key",
")",
":",
"assert",
"self",
".",
"tablist",
"is",
"not",
"None",
"tab_idx",
"=",
"self",
".",
"_get_tab_idx_for_key",
"(",
"tab_key",
")",
"if",
"not",
"self",
".",
"tablist",
":",
"self",
".",
"tablist",
... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeExecutionManager.close_websockets | Close websocket connection to remote browser. | ChromeController/transport.py | def close_websockets(self):
""" Close websocket connection to remote browser."""
self.log.info("Websocket Teardown called")
for key in list(self.soclist.keys()):
if self.soclist[key]:
self.soclist[key].close()
self.soclist.pop(key) | def close_websockets(self):
""" Close websocket connection to remote browser."""
self.log.info("Websocket Teardown called")
for key in list(self.soclist.keys()):
if self.soclist[key]:
self.soclist[key].close()
self.soclist.pop(key) | [
"Close",
"websocket",
"connection",
"to",
"remote",
"browser",
"."
] | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/transport.py#L423-L429 | [
"def",
"close_websockets",
"(",
"self",
")",
":",
"self",
".",
"log",
".",
"info",
"(",
"\"Websocket Teardown called\"",
")",
"for",
"key",
"in",
"list",
"(",
"self",
".",
"soclist",
".",
"keys",
"(",
")",
")",
":",
"if",
"self",
".",
"soclist",
"[",
... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeExecutionManager.fetch_tablist | Connect to host:port and request list of tabs
return list of dicts of data about open tabs. | ChromeController/transport.py | def fetch_tablist(self):
"""Connect to host:port and request list of tabs
return list of dicts of data about open tabs."""
# find websocket endpoint
try:
response = requests.get("http://%s:%s/json" % (self.host, self.port))
except requests.exceptions.ConnectionError:
raise cr_exceptions.ChromeConnectF... | def fetch_tablist(self):
"""Connect to host:port and request list of tabs
return list of dicts of data about open tabs."""
# find websocket endpoint
try:
response = requests.get("http://%s:%s/json" % (self.host, self.port))
except requests.exceptions.ConnectionError:
raise cr_exceptions.ChromeConnectF... | [
"Connect",
"to",
"host",
":",
"port",
"and",
"request",
"list",
"of",
"tabs",
"return",
"list",
"of",
"dicts",
"of",
"data",
"about",
"open",
"tabs",
"."
] | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/transport.py#L432-L443 | [
"def",
"fetch_tablist",
"(",
"self",
")",
":",
"# find websocket endpoint",
"try",
":",
"response",
"=",
"requests",
".",
"get",
"(",
"\"http://%s:%s/json\"",
"%",
"(",
"self",
".",
"host",
",",
"self",
".",
"port",
")",
")",
"except",
"requests",
".",
"ex... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeExecutionManager.synchronous_command | Synchronously execute command `command` with params `params` in the
remote chrome instance, returning the response from the chrome instance. | ChromeController/transport.py | def synchronous_command(self, command, tab_key, **params):
"""
Synchronously execute command `command` with params `params` in the
remote chrome instance, returning the response from the chrome instance.
"""
self.log.debug("Synchronous_command to tab %s (%s):", tab_key, self._get_cr_tab_meta_for_key(tab_key)... | def synchronous_command(self, command, tab_key, **params):
"""
Synchronously execute command `command` with params `params` in the
remote chrome instance, returning the response from the chrome instance.
"""
self.log.debug("Synchronous_command to tab %s (%s):", tab_key, self._get_cr_tab_meta_for_key(tab_key)... | [
"Synchronously",
"execute",
"command",
"command",
"with",
"params",
"params",
"in",
"the",
"remote",
"chrome",
"instance",
"returning",
"the",
"response",
"from",
"the",
"chrome",
"instance",
"."
] | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/transport.py#L455-L472 | [
"def",
"synchronous_command",
"(",
"self",
",",
"command",
",",
"tab_key",
",",
"*",
"*",
"params",
")",
":",
"self",
".",
"log",
".",
"debug",
"(",
"\"Synchronous_command to tab %s (%s):\"",
",",
"tab_key",
",",
"self",
".",
"_get_cr_tab_meta_for_key",
"(",
"... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeExecutionManager.send | Send command `command` with optional parameters `params` to the
remote chrome instance.
The command `id` is automatically added to the outgoing message.
return value is the command id, which can be used to match a command
to it's associated response. | ChromeController/transport.py | def send(self, command, tab_key, params=None):
'''
Send command `command` with optional parameters `params` to the
remote chrome instance.
The command `id` is automatically added to the outgoing message.
return value is the command id, which can be used to match a command
to it's associated response.
''... | def send(self, command, tab_key, params=None):
'''
Send command `command` with optional parameters `params` to the
remote chrome instance.
The command `id` is automatically added to the outgoing message.
return value is the command id, which can be used to match a command
to it's associated response.
''... | [
"Send",
"command",
"command",
"with",
"optional",
"parameters",
"params",
"to",
"the",
"remote",
"chrome",
"instance",
"."
] | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/transport.py#L474-L509 | [
"def",
"send",
"(",
"self",
",",
"command",
",",
"tab_key",
",",
"params",
"=",
"None",
")",
":",
"self",
".",
"__check_open_socket",
"(",
"tab_key",
")",
"sent_id",
"=",
"self",
".",
"msg_id",
"command",
"=",
"{",
"\"id\"",
":",
"self",
".",
"msg_id",... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeExecutionManager.recv_filtered | Receive a filtered message, using the callable `keycheck` to filter received messages
for content.
`keycheck` is expected to be a callable that takes a single parameter (the decoded response
from chromium), and returns a boolean (true, if the command is the one filtered for, or false
if the command is not the ... | ChromeController/transport.py | def recv_filtered(self, keycheck, tab_key, timeout=30, message=None):
'''
Receive a filtered message, using the callable `keycheck` to filter received messages
for content.
`keycheck` is expected to be a callable that takes a single parameter (the decoded response
from chromium), and returns a boolean (true,... | def recv_filtered(self, keycheck, tab_key, timeout=30, message=None):
'''
Receive a filtered message, using the callable `keycheck` to filter received messages
for content.
`keycheck` is expected to be a callable that takes a single parameter (the decoded response
from chromium), and returns a boolean (true,... | [
"Receive",
"a",
"filtered",
"message",
"using",
"the",
"callable",
"keycheck",
"to",
"filter",
"received",
"messages",
"for",
"content",
"."
] | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/transport.py#L531-L579 | [
"def",
"recv_filtered",
"(",
"self",
",",
"keycheck",
",",
"tab_key",
",",
"timeout",
"=",
"30",
",",
"message",
"=",
"None",
")",
":",
"self",
".",
"__check_open_socket",
"(",
"tab_key",
")",
"# First, check if the message has already been received.",
"for",
"idx... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeExecutionManager.recv_all_filtered | Receive a all messages matching a filter, using the callable `keycheck` to filter received messages
for content.
This function will *ALWAY* block for at least `timeout` seconds.
If chromium is for some reason continuously streaming responses, it may block forever!
`keycheck` is expected to be a callable that... | ChromeController/transport.py | def recv_all_filtered(self, keycheck, tab_key, timeout=0.5):
'''
Receive a all messages matching a filter, using the callable `keycheck` to filter received messages
for content.
This function will *ALWAY* block for at least `timeout` seconds.
If chromium is for some reason continuously streaming responses, ... | def recv_all_filtered(self, keycheck, tab_key, timeout=0.5):
'''
Receive a all messages matching a filter, using the callable `keycheck` to filter received messages
for content.
This function will *ALWAY* block for at least `timeout` seconds.
If chromium is for some reason continuously streaming responses, ... | [
"Receive",
"a",
"all",
"messages",
"matching",
"a",
"filter",
"using",
"the",
"callable",
"keycheck",
"to",
"filter",
"received",
"messages",
"for",
"content",
"."
] | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/transport.py#L581-L628 | [
"def",
"recv_all_filtered",
"(",
"self",
",",
"keycheck",
",",
"tab_key",
",",
"timeout",
"=",
"0.5",
")",
":",
"self",
".",
"__check_open_socket",
"(",
"tab_key",
")",
"# First, check if the message has already been received.",
"ret",
"=",
"[",
"tmp",
"for",
"tmp... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeExecutionManager.recv | Recieve a message, optionally filtering for a specified message id.
If `message_id` is none, the first command in the receive queue is returned.
If `message_id` is not none, the command waits untill a message is received with
the specified id, or it times out.
Timeout is the number of seconds to wait for a re... | ChromeController/transport.py | def recv(self, tab_key, message_id=None, timeout=30):
'''
Recieve a message, optionally filtering for a specified message id.
If `message_id` is none, the first command in the receive queue is returned.
If `message_id` is not none, the command waits untill a message is received with
the specified id, or it t... | def recv(self, tab_key, message_id=None, timeout=30):
'''
Recieve a message, optionally filtering for a specified message id.
If `message_id` is none, the first command in the receive queue is returned.
If `message_id` is not none, the command waits untill a message is received with
the specified id, or it t... | [
"Recieve",
"a",
"message",
"optionally",
"filtering",
"for",
"a",
"specified",
"message",
"id",
"."
] | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/transport.py#L630-L664 | [
"def",
"recv",
"(",
"self",
",",
"tab_key",
",",
"message_id",
"=",
"None",
",",
"timeout",
"=",
"30",
")",
":",
"self",
".",
"__check_open_socket",
"(",
"tab_key",
")",
"# First, check if the message has already been received.",
"for",
"idx",
"in",
"range",
"("... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeExecutionManager.drain | Return all messages in waiting for the websocket connection. | ChromeController/transport.py | def drain(self, tab_key):
'''
Return all messages in waiting for the websocket connection.
'''
self.log.debug("Draining transport")
ret = []
while len(self.messages[tab_key]):
ret.append(self.messages[tab_key].pop(0))
self.log.debug("Polling socket")
tmp = self.___recv(tab_key)
while tmp is not N... | def drain(self, tab_key):
'''
Return all messages in waiting for the websocket connection.
'''
self.log.debug("Draining transport")
ret = []
while len(self.messages[tab_key]):
ret.append(self.messages[tab_key].pop(0))
self.log.debug("Polling socket")
tmp = self.___recv(tab_key)
while tmp is not N... | [
"Return",
"all",
"messages",
"in",
"waiting",
"for",
"the",
"websocket",
"connection",
"."
] | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/transport.py#L674-L691 | [
"def",
"drain",
"(",
"self",
",",
"tab_key",
")",
":",
"self",
".",
"log",
".",
"debug",
"(",
"\"Draining transport\"",
")",
"ret",
"=",
"[",
"]",
"while",
"len",
"(",
"self",
".",
"messages",
"[",
"tab_key",
"]",
")",
":",
"ret",
".",
"append",
"(... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | cli | ChromeController
\b
Usage: python3 -m ChromeController [-s | --silent] [-v | --verbose]
python3 -m ChromeController fetch <url> [--binary <bin_name>] [--outfile <out_file_name>]
python3 -m ChromeController update
python3 -m ChromeController (-h | --help)
python3 -m ChromeController --version
\b
Options:
-s ... | ChromeController/__main__.py | def cli(verbose, silent):
'''
ChromeController
\b
Usage: python3 -m ChromeController [-s | --silent] [-v | --verbose]
python3 -m ChromeController fetch <url> [--binary <bin_name>] [--outfile <out_file_name>]
python3 -m ChromeController update
python3 -m ChromeController (-h | --help)
python3 -m ChromeControll... | def cli(verbose, silent):
'''
ChromeController
\b
Usage: python3 -m ChromeController [-s | --silent] [-v | --verbose]
python3 -m ChromeController fetch <url> [--binary <bin_name>] [--outfile <out_file_name>]
python3 -m ChromeController update
python3 -m ChromeController (-h | --help)
python3 -m ChromeControll... | [
"ChromeController"
] | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/__main__.py#L17-L43 | [
"def",
"cli",
"(",
"verbose",
",",
"silent",
")",
":",
"if",
"verbose",
":",
"logging",
".",
"basicConfig",
"(",
"level",
"=",
"logging",
".",
"DEBUG",
")",
"elif",
"silent",
":",
"logging",
".",
"basicConfig",
"(",
"level",
"=",
"logging",
".",
"ERROR... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | fetch | Fetch a specified URL's content, and output it to the console. | ChromeController/__main__.py | def fetch(url, binary, outfile, noprint, rendered):
'''
Fetch a specified URL's content, and output it to the console.
'''
with chrome_context.ChromeContext(binary=binary) as cr:
resp = cr.blocking_navigate_and_get_source(url)
if rendered:
resp['content'] = cr.get_rendered_page_source()
resp['binary'] = F... | def fetch(url, binary, outfile, noprint, rendered):
'''
Fetch a specified URL's content, and output it to the console.
'''
with chrome_context.ChromeContext(binary=binary) as cr:
resp = cr.blocking_navigate_and_get_source(url)
if rendered:
resp['content'] = cr.get_rendered_page_source()
resp['binary'] = F... | [
"Fetch",
"a",
"specified",
"URL",
"s",
"content",
"and",
"output",
"it",
"to",
"the",
"console",
"."
] | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/__main__.py#L68-L91 | [
"def",
"fetch",
"(",
"url",
",",
"binary",
",",
"outfile",
",",
"noprint",
",",
"rendered",
")",
":",
"with",
"chrome_context",
".",
"ChromeContext",
"(",
"binary",
"=",
"binary",
")",
"as",
"cr",
":",
"resp",
"=",
"cr",
".",
"blocking_navigate_and_get_sou... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Memory_setPressureNotificationsSuppressed | Function path: Memory.setPressureNotificationsSuppressed
Domain: Memory
Method name: setPressureNotificationsSuppressed
Parameters:
Required arguments:
'suppressed' (type: boolean) -> If true, memory pressure notifications will be suppressed.
No return value.
Description: Enable/disable su... | ChromeController/Generator/Generated.py | def Memory_setPressureNotificationsSuppressed(self, suppressed):
"""
Function path: Memory.setPressureNotificationsSuppressed
Domain: Memory
Method name: setPressureNotificationsSuppressed
Parameters:
Required arguments:
'suppressed' (type: boolean) -> If true, memory pressure notifications wil... | def Memory_setPressureNotificationsSuppressed(self, suppressed):
"""
Function path: Memory.setPressureNotificationsSuppressed
Domain: Memory
Method name: setPressureNotificationsSuppressed
Parameters:
Required arguments:
'suppressed' (type: boolean) -> If true, memory pressure notifications wil... | [
"Function",
"path",
":",
"Memory",
".",
"setPressureNotificationsSuppressed",
"Domain",
":",
"Memory",
"Method",
"name",
":",
"setPressureNotificationsSuppressed",
"Parameters",
":",
"Required",
"arguments",
":",
"suppressed",
"(",
"type",
":",
"boolean",
")",
"-",
... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L66-L84 | [
"def",
"Memory_setPressureNotificationsSuppressed",
"(",
"self",
",",
"suppressed",
")",
":",
"assert",
"isinstance",
"(",
"suppressed",
",",
"(",
"bool",
",",
")",
")",
",",
"\"Argument 'suppressed' must be of type '['bool']'. Received type: '%s'\"",
"%",
"type",
"(",
... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Page_addScriptToEvaluateOnLoad | Function path: Page.addScriptToEvaluateOnLoad
Domain: Page
Method name: addScriptToEvaluateOnLoad
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'scriptSource' (type: string) -> No description
Returns:
'identifier' (type: ScriptIdentifier) -> Identifie... | ChromeController/Generator/Generated.py | def Page_addScriptToEvaluateOnLoad(self, scriptSource):
"""
Function path: Page.addScriptToEvaluateOnLoad
Domain: Page
Method name: addScriptToEvaluateOnLoad
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'scriptSource' (type: string) -> No description
... | def Page_addScriptToEvaluateOnLoad(self, scriptSource):
"""
Function path: Page.addScriptToEvaluateOnLoad
Domain: Page
Method name: addScriptToEvaluateOnLoad
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'scriptSource' (type: string) -> No description
... | [
"Function",
"path",
":",
"Page",
".",
"addScriptToEvaluateOnLoad",
"Domain",
":",
"Page",
"Method",
"name",
":",
"addScriptToEvaluateOnLoad",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":",
... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L169-L190 | [
"def",
"Page_addScriptToEvaluateOnLoad",
"(",
"self",
",",
"scriptSource",
")",
":",
"assert",
"isinstance",
"(",
"scriptSource",
",",
"(",
"str",
",",
")",
")",
",",
"\"Argument 'scriptSource' must be of type '['str']'. Received type: '%s'\"",
"%",
"type",
"(",
"script... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Page_addScriptToEvaluateOnNewDocument | Function path: Page.addScriptToEvaluateOnNewDocument
Domain: Page
Method name: addScriptToEvaluateOnNewDocument
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'source' (type: string) -> No description
Returns:
'identifier' (type: ScriptIdentifier) -> I... | ChromeController/Generator/Generated.py | def Page_addScriptToEvaluateOnNewDocument(self, source):
"""
Function path: Page.addScriptToEvaluateOnNewDocument
Domain: Page
Method name: addScriptToEvaluateOnNewDocument
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'source' (type: string) -> No descr... | def Page_addScriptToEvaluateOnNewDocument(self, source):
"""
Function path: Page.addScriptToEvaluateOnNewDocument
Domain: Page
Method name: addScriptToEvaluateOnNewDocument
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'source' (type: string) -> No descr... | [
"Function",
"path",
":",
"Page",
".",
"addScriptToEvaluateOnNewDocument",
"Domain",
":",
"Page",
"Method",
"name",
":",
"addScriptToEvaluateOnNewDocument",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"argumen... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L211-L232 | [
"def",
"Page_addScriptToEvaluateOnNewDocument",
"(",
"self",
",",
"source",
")",
":",
"assert",
"isinstance",
"(",
"source",
",",
"(",
"str",
",",
")",
")",
",",
"\"Argument 'source' must be of type '['str']'. Received type: '%s'\"",
"%",
"type",
"(",
"source",
")",
... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Page_setAutoAttachToCreatedPages | Function path: Page.setAutoAttachToCreatedPages
Domain: Page
Method name: setAutoAttachToCreatedPages
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'autoAttach' (type: boolean) -> If true, browser will open a new inspector window for every page created from ... | ChromeController/Generator/Generated.py | def Page_setAutoAttachToCreatedPages(self, autoAttach):
"""
Function path: Page.setAutoAttachToCreatedPages
Domain: Page
Method name: setAutoAttachToCreatedPages
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'autoAttach' (type: boolean) -> If true, brows... | def Page_setAutoAttachToCreatedPages(self, autoAttach):
"""
Function path: Page.setAutoAttachToCreatedPages
Domain: Page
Method name: setAutoAttachToCreatedPages
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'autoAttach' (type: boolean) -> If true, brows... | [
"Function",
"path",
":",
"Page",
".",
"setAutoAttachToCreatedPages",
"Domain",
":",
"Page",
"Method",
"name",
":",
"setAutoAttachToCreatedPages",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":"... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L253-L273 | [
"def",
"Page_setAutoAttachToCreatedPages",
"(",
"self",
",",
"autoAttach",
")",
":",
"assert",
"isinstance",
"(",
"autoAttach",
",",
"(",
"bool",
",",
")",
")",
",",
"\"Argument 'autoAttach' must be of type '['bool']'. Received type: '%s'\"",
"%",
"type",
"(",
"autoAtta... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Page_setAdBlockingEnabled | Function path: Page.setAdBlockingEnabled
Domain: Page
Method name: setAdBlockingEnabled
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> Whether to block ads.
No return value.
Description: Enable Chrome's experimental ad fi... | ChromeController/Generator/Generated.py | def Page_setAdBlockingEnabled(self, enabled):
"""
Function path: Page.setAdBlockingEnabled
Domain: Page
Method name: setAdBlockingEnabled
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> Whether to block ads.
No return value.... | def Page_setAdBlockingEnabled(self, enabled):
"""
Function path: Page.setAdBlockingEnabled
Domain: Page
Method name: setAdBlockingEnabled
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'enabled' (type: boolean) -> Whether to block ads.
No return value.... | [
"Function",
"path",
":",
"Page",
".",
"setAdBlockingEnabled",
"Domain",
":",
"Page",
"Method",
"name",
":",
"setAdBlockingEnabled",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":",
"enabled",... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L304-L324 | [
"def",
"Page_setAdBlockingEnabled",
"(",
"self",
",",
"enabled",
")",
":",
"assert",
"isinstance",
"(",
"enabled",
",",
"(",
"bool",
",",
")",
")",
",",
"\"Argument 'enabled' must be of type '['bool']'. Received type: '%s'\"",
"%",
"type",
"(",
"enabled",
")",
"subd... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Page_navigateToHistoryEntry | Function path: Page.navigateToHistoryEntry
Domain: Page
Method name: navigateToHistoryEntry
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'entryId' (type: integer) -> Unique id of the entry to navigate to.
No return value.
Description: Navigates cur... | ChromeController/Generator/Generated.py | def Page_navigateToHistoryEntry(self, entryId):
"""
Function path: Page.navigateToHistoryEntry
Domain: Page
Method name: navigateToHistoryEntry
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'entryId' (type: integer) -> Unique id of the entry to navigate ... | def Page_navigateToHistoryEntry(self, entryId):
"""
Function path: Page.navigateToHistoryEntry
Domain: Page
Method name: navigateToHistoryEntry
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'entryId' (type: integer) -> Unique id of the entry to navigate ... | [
"Function",
"path",
":",
"Page",
".",
"navigateToHistoryEntry",
"Domain",
":",
"Page",
"Method",
"name",
":",
"navigateToHistoryEntry",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":",
"entry... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L389-L409 | [
"def",
"Page_navigateToHistoryEntry",
"(",
"self",
",",
"entryId",
")",
":",
"assert",
"isinstance",
"(",
"entryId",
",",
"(",
"int",
",",
")",
")",
",",
"\"Argument 'entryId' must be of type '['int']'. Received type: '%s'\"",
"%",
"type",
"(",
"entryId",
")",
"subd... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Page_deleteCookie | Function path: Page.deleteCookie
Domain: Page
Method name: deleteCookie
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'cookieName' (type: string) -> Name of the cookie to remove.
'url' (type: string) -> URL to match cooke domain and path.
No return v... | ChromeController/Generator/Generated.py | def Page_deleteCookie(self, cookieName, url):
"""
Function path: Page.deleteCookie
Domain: Page
Method name: deleteCookie
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'cookieName' (type: string) -> Name of the cookie to remove.
'url' (type: string)... | def Page_deleteCookie(self, cookieName, url):
"""
Function path: Page.deleteCookie
Domain: Page
Method name: deleteCookie
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'cookieName' (type: string) -> Name of the cookie to remove.
'url' (type: string)... | [
"Function",
"path",
":",
"Page",
".",
"deleteCookie",
"Domain",
":",
"Page",
"Method",
"name",
":",
"deleteCookie",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":",
"cookieName",
"(",
"ty... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L427-L451 | [
"def",
"Page_deleteCookie",
"(",
"self",
",",
"cookieName",
",",
"url",
")",
":",
"assert",
"isinstance",
"(",
"cookieName",
",",
"(",
"str",
",",
")",
")",
",",
"\"Argument 'cookieName' must be of type '['str']'. Received type: '%s'\"",
"%",
"type",
"(",
"cookieNam... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Page_getResourceContent | Function path: Page.getResourceContent
Domain: Page
Method name: getResourceContent
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'frameId' (type: FrameId) -> Frame id to get resource for.
'url' (type: string) -> URL of the resource to get content for.
... | ChromeController/Generator/Generated.py | def Page_getResourceContent(self, frameId, url):
"""
Function path: Page.getResourceContent
Domain: Page
Method name: getResourceContent
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'frameId' (type: FrameId) -> Frame id to get resource for.
'url' (... | def Page_getResourceContent(self, frameId, url):
"""
Function path: Page.getResourceContent
Domain: Page
Method name: getResourceContent
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'frameId' (type: FrameId) -> Frame id to get resource for.
'url' (... | [
"Function",
"path",
":",
"Page",
".",
"getResourceContent",
"Domain",
":",
"Page",
"Method",
"name",
":",
"getResourceContent",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":",
"frameId",
"... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L469-L492 | [
"def",
"Page_getResourceContent",
"(",
"self",
",",
"frameId",
",",
"url",
")",
":",
"assert",
"isinstance",
"(",
"url",
",",
"(",
"str",
",",
")",
")",
",",
"\"Argument 'url' must be of type '['str']'. Received type: '%s'\"",
"%",
"type",
"(",
"url",
")",
"subd... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Page_searchInResource | Function path: Page.searchInResource
Domain: Page
Method name: searchInResource
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'frameId' (type: FrameId) -> Frame id for resource to search in.
'url' (type: string) -> URL of the resource to search in.
... | ChromeController/Generator/Generated.py | def Page_searchInResource(self, frameId, url, query, **kwargs):
"""
Function path: Page.searchInResource
Domain: Page
Method name: searchInResource
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'frameId' (type: FrameId) -> Frame id for resource to search... | def Page_searchInResource(self, frameId, url, query, **kwargs):
"""
Function path: Page.searchInResource
Domain: Page
Method name: searchInResource
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'frameId' (type: FrameId) -> Frame id for resource to search... | [
"Function",
"path",
":",
"Page",
".",
"searchInResource",
"Domain",
":",
"Page",
"Method",
"name",
":",
"searchInResource",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":",
"frameId",
"(",
... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L494-L535 | [
"def",
"Page_searchInResource",
"(",
"self",
",",
"frameId",
",",
"url",
",",
"query",
",",
"*",
"*",
"kwargs",
")",
":",
"assert",
"isinstance",
"(",
"url",
",",
"(",
"str",
",",
")",
")",
",",
"\"Argument 'url' must be of type '['str']'. Received type: '%s'\""... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Page_setDocumentContent | Function path: Page.setDocumentContent
Domain: Page
Method name: setDocumentContent
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'frameId' (type: FrameId) -> Frame id to set HTML for.
'html' (type: string) -> HTML content to set.
No return value.
... | ChromeController/Generator/Generated.py | def Page_setDocumentContent(self, frameId, html):
"""
Function path: Page.setDocumentContent
Domain: Page
Method name: setDocumentContent
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'frameId' (type: FrameId) -> Frame id to set HTML for.
'html' (ty... | def Page_setDocumentContent(self, frameId, html):
"""
Function path: Page.setDocumentContent
Domain: Page
Method name: setDocumentContent
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'frameId' (type: FrameId) -> Frame id to set HTML for.
'html' (ty... | [
"Function",
"path",
":",
"Page",
".",
"setDocumentContent",
"Domain",
":",
"Page",
"Method",
"name",
":",
"setDocumentContent",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":",
"frameId",
"... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L537-L558 | [
"def",
"Page_setDocumentContent",
"(",
"self",
",",
"frameId",
",",
"html",
")",
":",
"assert",
"isinstance",
"(",
"html",
",",
"(",
"str",
",",
")",
")",
",",
"\"Argument 'html' must be of type '['str']'. Received type: '%s'\"",
"%",
"type",
"(",
"html",
")",
"... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Page_setDeviceMetricsOverride | Function path: Page.setDeviceMetricsOverride
Domain: Page
Method name: setDeviceMetricsOverride
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'width' (type: integer) -> Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
... | ChromeController/Generator/Generated.py | def Page_setDeviceMetricsOverride(self, width, height, deviceScaleFactor,
mobile, **kwargs):
"""
Function path: Page.setDeviceMetricsOverride
Domain: Page
Method name: setDeviceMetricsOverride
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'width' (t... | def Page_setDeviceMetricsOverride(self, width, height, deviceScaleFactor,
mobile, **kwargs):
"""
Function path: Page.setDeviceMetricsOverride
Domain: Page
Method name: setDeviceMetricsOverride
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'width' (t... | [
"Function",
"path",
":",
"Page",
".",
"setDeviceMetricsOverride",
"Domain",
":",
"Page",
"Method",
"name",
":",
"setDeviceMetricsOverride",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":",
"w... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L560-L631 | [
"def",
"Page_setDeviceMetricsOverride",
"(",
"self",
",",
"width",
",",
"height",
",",
"deviceScaleFactor",
",",
"mobile",
",",
"*",
"*",
"kwargs",
")",
":",
"assert",
"isinstance",
"(",
"width",
",",
"(",
"int",
",",
")",
")",
",",
"\"Argument 'width' must ... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Page_setDeviceOrientationOverride | Function path: Page.setDeviceOrientationOverride
Domain: Page
Method name: setDeviceOrientationOverride
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'alpha' (type: number) -> Mock alpha
'beta' (type: number) -> Mock beta
'gamma' (type: number) -> ... | ChromeController/Generator/Generated.py | def Page_setDeviceOrientationOverride(self, alpha, beta, gamma):
"""
Function path: Page.setDeviceOrientationOverride
Domain: Page
Method name: setDeviceOrientationOverride
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'alpha' (type: number) -> Mock alph... | def Page_setDeviceOrientationOverride(self, alpha, beta, gamma):
"""
Function path: Page.setDeviceOrientationOverride
Domain: Page
Method name: setDeviceOrientationOverride
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'alpha' (type: number) -> Mock alph... | [
"Function",
"path",
":",
"Page",
".",
"setDeviceOrientationOverride",
"Domain",
":",
"Page",
"Method",
"name",
":",
"setDeviceOrientationOverride",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
"... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L696-L724 | [
"def",
"Page_setDeviceOrientationOverride",
"(",
"self",
",",
"alpha",
",",
"beta",
",",
"gamma",
")",
":",
"assert",
"isinstance",
"(",
"alpha",
",",
"(",
"float",
",",
"int",
")",
")",
",",
"\"Argument 'alpha' must be of type '['float', 'int']'. Received type: '%s'\... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Page_screencastFrameAck | Function path: Page.screencastFrameAck
Domain: Page
Method name: screencastFrameAck
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'sessionId' (type: integer) -> Frame number.
No return value.
Description: Acknowledges that a screencast frame has bee... | ChromeController/Generator/Generated.py | def Page_screencastFrameAck(self, sessionId):
"""
Function path: Page.screencastFrameAck
Domain: Page
Method name: screencastFrameAck
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'sessionId' (type: integer) -> Frame number.
No return value.
Des... | def Page_screencastFrameAck(self, sessionId):
"""
Function path: Page.screencastFrameAck
Domain: Page
Method name: screencastFrameAck
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'sessionId' (type: integer) -> Frame number.
No return value.
Des... | [
"Function",
"path",
":",
"Page",
".",
"screencastFrameAck",
"Domain",
":",
"Page",
"Method",
"name",
":",
"screencastFrameAck",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":",
"sessionId",
... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L957-L977 | [
"def",
"Page_screencastFrameAck",
"(",
"self",
",",
"sessionId",
")",
":",
"assert",
"isinstance",
"(",
"sessionId",
",",
"(",
"int",
",",
")",
")",
",",
"\"Argument 'sessionId' must be of type '['int']'. Received type: '%s'\"",
"%",
"type",
"(",
"sessionId",
")",
"... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Overlay_setShowPaintRects | Function path: Overlay.setShowPaintRects
Domain: Overlay
Method name: setShowPaintRects
Parameters:
Required arguments:
'result' (type: boolean) -> True for showing paint rectangles
No return value.
Description: Requests that backend shows paint rectangles | ChromeController/Generator/Generated.py | def Overlay_setShowPaintRects(self, result):
"""
Function path: Overlay.setShowPaintRects
Domain: Overlay
Method name: setShowPaintRects
Parameters:
Required arguments:
'result' (type: boolean) -> True for showing paint rectangles
No return value.
Description: Requests that backend sho... | def Overlay_setShowPaintRects(self, result):
"""
Function path: Overlay.setShowPaintRects
Domain: Overlay
Method name: setShowPaintRects
Parameters:
Required arguments:
'result' (type: boolean) -> True for showing paint rectangles
No return value.
Description: Requests that backend sho... | [
"Function",
"path",
":",
"Overlay",
".",
"setShowPaintRects",
"Domain",
":",
"Overlay",
"Method",
"name",
":",
"setShowPaintRects",
"Parameters",
":",
"Required",
"arguments",
":",
"result",
"(",
"type",
":",
"boolean",
")",
"-",
">",
"True",
"for",
"showing",... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1164-L1182 | [
"def",
"Overlay_setShowPaintRects",
"(",
"self",
",",
"result",
")",
":",
"assert",
"isinstance",
"(",
"result",
",",
"(",
"bool",
",",
")",
")",
",",
"\"Argument 'result' must be of type '['bool']'. Received type: '%s'\"",
"%",
"type",
"(",
"result",
")",
"subdom_f... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Overlay_setShowDebugBorders | Function path: Overlay.setShowDebugBorders
Domain: Overlay
Method name: setShowDebugBorders
Parameters:
Required arguments:
'show' (type: boolean) -> True for showing debug borders
No return value.
Description: Requests that backend shows debug borders on layers | ChromeController/Generator/Generated.py | def Overlay_setShowDebugBorders(self, show):
"""
Function path: Overlay.setShowDebugBorders
Domain: Overlay
Method name: setShowDebugBorders
Parameters:
Required arguments:
'show' (type: boolean) -> True for showing debug borders
No return value.
Description: Requests that backend show... | def Overlay_setShowDebugBorders(self, show):
"""
Function path: Overlay.setShowDebugBorders
Domain: Overlay
Method name: setShowDebugBorders
Parameters:
Required arguments:
'show' (type: boolean) -> True for showing debug borders
No return value.
Description: Requests that backend show... | [
"Function",
"path",
":",
"Overlay",
".",
"setShowDebugBorders",
"Domain",
":",
"Overlay",
"Method",
"name",
":",
"setShowDebugBorders",
"Parameters",
":",
"Required",
"arguments",
":",
"show",
"(",
"type",
":",
"boolean",
")",
"-",
">",
"True",
"for",
"showing... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1184-L1202 | [
"def",
"Overlay_setShowDebugBorders",
"(",
"self",
",",
"show",
")",
":",
"assert",
"isinstance",
"(",
"show",
",",
"(",
"bool",
",",
")",
")",
",",
"\"Argument 'show' must be of type '['bool']'. Received type: '%s'\"",
"%",
"type",
"(",
"show",
")",
"subdom_funcs",... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Overlay_setShowFPSCounter | Function path: Overlay.setShowFPSCounter
Domain: Overlay
Method name: setShowFPSCounter
Parameters:
Required arguments:
'show' (type: boolean) -> True for showing the FPS counter
No return value.
Description: Requests that backend shows the FPS counter | ChromeController/Generator/Generated.py | def Overlay_setShowFPSCounter(self, show):
"""
Function path: Overlay.setShowFPSCounter
Domain: Overlay
Method name: setShowFPSCounter
Parameters:
Required arguments:
'show' (type: boolean) -> True for showing the FPS counter
No return value.
Description: Requests that backend shows th... | def Overlay_setShowFPSCounter(self, show):
"""
Function path: Overlay.setShowFPSCounter
Domain: Overlay
Method name: setShowFPSCounter
Parameters:
Required arguments:
'show' (type: boolean) -> True for showing the FPS counter
No return value.
Description: Requests that backend shows th... | [
"Function",
"path",
":",
"Overlay",
".",
"setShowFPSCounter",
"Domain",
":",
"Overlay",
"Method",
"name",
":",
"setShowFPSCounter",
"Parameters",
":",
"Required",
"arguments",
":",
"show",
"(",
"type",
":",
"boolean",
")",
"-",
">",
"True",
"for",
"showing",
... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1204-L1222 | [
"def",
"Overlay_setShowFPSCounter",
"(",
"self",
",",
"show",
")",
":",
"assert",
"isinstance",
"(",
"show",
",",
"(",
"bool",
",",
")",
")",
",",
"\"Argument 'show' must be of type '['bool']'. Received type: '%s'\"",
"%",
"type",
"(",
"show",
")",
"subdom_funcs",
... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Overlay_setShowScrollBottleneckRects | Function path: Overlay.setShowScrollBottleneckRects
Domain: Overlay
Method name: setShowScrollBottleneckRects
Parameters:
Required arguments:
'show' (type: boolean) -> True for showing scroll bottleneck rects
No return value.
Description: Requests that backend shows scroll bottleneck rects | ChromeController/Generator/Generated.py | def Overlay_setShowScrollBottleneckRects(self, show):
"""
Function path: Overlay.setShowScrollBottleneckRects
Domain: Overlay
Method name: setShowScrollBottleneckRects
Parameters:
Required arguments:
'show' (type: boolean) -> True for showing scroll bottleneck rects
No return value.
De... | def Overlay_setShowScrollBottleneckRects(self, show):
"""
Function path: Overlay.setShowScrollBottleneckRects
Domain: Overlay
Method name: setShowScrollBottleneckRects
Parameters:
Required arguments:
'show' (type: boolean) -> True for showing scroll bottleneck rects
No return value.
De... | [
"Function",
"path",
":",
"Overlay",
".",
"setShowScrollBottleneckRects",
"Domain",
":",
"Overlay",
"Method",
"name",
":",
"setShowScrollBottleneckRects",
"Parameters",
":",
"Required",
"arguments",
":",
"show",
"(",
"type",
":",
"boolean",
")",
"-",
">",
"True",
... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1224-L1242 | [
"def",
"Overlay_setShowScrollBottleneckRects",
"(",
"self",
",",
"show",
")",
":",
"assert",
"isinstance",
"(",
"show",
",",
"(",
"bool",
",",
")",
")",
",",
"\"Argument 'show' must be of type '['bool']'. Received type: '%s'\"",
"%",
"type",
"(",
"show",
")",
"subdo... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Overlay_setShowViewportSizeOnResize | Function path: Overlay.setShowViewportSizeOnResize
Domain: Overlay
Method name: setShowViewportSizeOnResize
Parameters:
Required arguments:
'show' (type: boolean) -> Whether to paint size or not.
No return value.
Description: Paints viewport size upon main frame resize. | ChromeController/Generator/Generated.py | def Overlay_setShowViewportSizeOnResize(self, show):
"""
Function path: Overlay.setShowViewportSizeOnResize
Domain: Overlay
Method name: setShowViewportSizeOnResize
Parameters:
Required arguments:
'show' (type: boolean) -> Whether to paint size or not.
No return value.
Description: Pai... | def Overlay_setShowViewportSizeOnResize(self, show):
"""
Function path: Overlay.setShowViewportSizeOnResize
Domain: Overlay
Method name: setShowViewportSizeOnResize
Parameters:
Required arguments:
'show' (type: boolean) -> Whether to paint size or not.
No return value.
Description: Pai... | [
"Function",
"path",
":",
"Overlay",
".",
"setShowViewportSizeOnResize",
"Domain",
":",
"Overlay",
"Method",
"name",
":",
"setShowViewportSizeOnResize",
"Parameters",
":",
"Required",
"arguments",
":",
"show",
"(",
"type",
":",
"boolean",
")",
"-",
">",
"Whether",
... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1244-L1262 | [
"def",
"Overlay_setShowViewportSizeOnResize",
"(",
"self",
",",
"show",
")",
":",
"assert",
"isinstance",
"(",
"show",
",",
"(",
"bool",
",",
")",
")",
",",
"\"Argument 'show' must be of type '['bool']'. Received type: '%s'\"",
"%",
"type",
"(",
"show",
")",
"subdom... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Overlay_setSuspended | Function path: Overlay.setSuspended
Domain: Overlay
Method name: setSuspended
Parameters:
Required arguments:
'suspended' (type: boolean) -> Whether overlay should be suspended and not consume any resources until resumed.
No return value. | ChromeController/Generator/Generated.py | def Overlay_setSuspended(self, suspended):
"""
Function path: Overlay.setSuspended
Domain: Overlay
Method name: setSuspended
Parameters:
Required arguments:
'suspended' (type: boolean) -> Whether overlay should be suspended and not consume any resources until resumed.
No return value.
"... | def Overlay_setSuspended(self, suspended):
"""
Function path: Overlay.setSuspended
Domain: Overlay
Method name: setSuspended
Parameters:
Required arguments:
'suspended' (type: boolean) -> Whether overlay should be suspended and not consume any resources until resumed.
No return value.
"... | [
"Function",
"path",
":",
"Overlay",
".",
"setSuspended",
"Domain",
":",
"Overlay",
"Method",
"name",
":",
"setSuspended",
"Parameters",
":",
"Required",
"arguments",
":",
"suspended",
"(",
"type",
":",
"boolean",
")",
"-",
">",
"Whether",
"overlay",
"should",
... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1288-L1305 | [
"def",
"Overlay_setSuspended",
"(",
"self",
",",
"suspended",
")",
":",
"assert",
"isinstance",
"(",
"suspended",
",",
"(",
"bool",
",",
")",
")",
",",
"\"Argument 'suspended' must be of type '['bool']'. Received type: '%s'\"",
"%",
"type",
"(",
"suspended",
")",
"s... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Overlay_setInspectMode | Function path: Overlay.setInspectMode
Domain: Overlay
Method name: setInspectMode
Parameters:
Required arguments:
'mode' (type: InspectMode) -> Set an inspection mode.
Optional arguments:
'highlightConfig' (type: HighlightConfig) -> A descriptor for the highlight appearance of hovered-over... | ChromeController/Generator/Generated.py | def Overlay_setInspectMode(self, mode, **kwargs):
"""
Function path: Overlay.setInspectMode
Domain: Overlay
Method name: setInspectMode
Parameters:
Required arguments:
'mode' (type: InspectMode) -> Set an inspection mode.
Optional arguments:
'highlightConfig' (type: HighlightConfig) ->... | def Overlay_setInspectMode(self, mode, **kwargs):
"""
Function path: Overlay.setInspectMode
Domain: Overlay
Method name: setInspectMode
Parameters:
Required arguments:
'mode' (type: InspectMode) -> Set an inspection mode.
Optional arguments:
'highlightConfig' (type: HighlightConfig) ->... | [
"Function",
"path",
":",
"Overlay",
".",
"setInspectMode",
"Domain",
":",
"Overlay",
"Method",
"name",
":",
"setInspectMode",
"Parameters",
":",
"Required",
"arguments",
":",
"mode",
"(",
"type",
":",
"InspectMode",
")",
"-",
">",
"Set",
"an",
"inspection",
... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1307-L1328 | [
"def",
"Overlay_setInspectMode",
"(",
"self",
",",
"mode",
",",
"*",
"*",
"kwargs",
")",
":",
"expected",
"=",
"[",
"'highlightConfig'",
"]",
"passed_keys",
"=",
"list",
"(",
"kwargs",
".",
"keys",
"(",
")",
")",
"assert",
"all",
"(",
"[",
"(",
"key",
... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Overlay_highlightRect | Function path: Overlay.highlightRect
Domain: Overlay
Method name: highlightRect
Parameters:
Required arguments:
'x' (type: integer) -> X coordinate
'y' (type: integer) -> Y coordinate
'width' (type: integer) -> Rectangle width
'height' (type: integer) -> Rectangle height
Optional... | ChromeController/Generator/Generated.py | def Overlay_highlightRect(self, x, y, width, height, **kwargs):
"""
Function path: Overlay.highlightRect
Domain: Overlay
Method name: highlightRect
Parameters:
Required arguments:
'x' (type: integer) -> X coordinate
'y' (type: integer) -> Y coordinate
'width' (type: integer) -> Rectan... | def Overlay_highlightRect(self, x, y, width, height, **kwargs):
"""
Function path: Overlay.highlightRect
Domain: Overlay
Method name: highlightRect
Parameters:
Required arguments:
'x' (type: integer) -> X coordinate
'y' (type: integer) -> Y coordinate
'width' (type: integer) -> Rectan... | [
"Function",
"path",
":",
"Overlay",
".",
"highlightRect",
"Domain",
":",
"Overlay",
"Method",
"name",
":",
"highlightRect",
"Parameters",
":",
"Required",
"arguments",
":",
"x",
"(",
"type",
":",
"integer",
")",
"-",
">",
"X",
"coordinate",
"y",
"(",
"type... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1330-L1367 | [
"def",
"Overlay_highlightRect",
"(",
"self",
",",
"x",
",",
"y",
",",
"width",
",",
"height",
",",
"*",
"*",
"kwargs",
")",
":",
"assert",
"isinstance",
"(",
"x",
",",
"(",
"int",
",",
")",
")",
",",
"\"Argument 'x' must be of type '['int']'. Received type: ... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Overlay_highlightQuad | Function path: Overlay.highlightQuad
Domain: Overlay
Method name: highlightQuad
Parameters:
Required arguments:
'quad' (type: DOM.Quad) -> Quad to highlight
Optional arguments:
'color' (type: DOM.RGBA) -> The highlight fill color (default: transparent).
'outlineColor' (type: DOM.RGBA)... | ChromeController/Generator/Generated.py | def Overlay_highlightQuad(self, quad, **kwargs):
"""
Function path: Overlay.highlightQuad
Domain: Overlay
Method name: highlightQuad
Parameters:
Required arguments:
'quad' (type: DOM.Quad) -> Quad to highlight
Optional arguments:
'color' (type: DOM.RGBA) -> The highlight fill color (de... | def Overlay_highlightQuad(self, quad, **kwargs):
"""
Function path: Overlay.highlightQuad
Domain: Overlay
Method name: highlightQuad
Parameters:
Required arguments:
'quad' (type: DOM.Quad) -> Quad to highlight
Optional arguments:
'color' (type: DOM.RGBA) -> The highlight fill color (de... | [
"Function",
"path",
":",
"Overlay",
".",
"highlightQuad",
"Domain",
":",
"Overlay",
"Method",
"name",
":",
"highlightQuad",
"Parameters",
":",
"Required",
"arguments",
":",
"quad",
"(",
"type",
":",
"DOM",
".",
"Quad",
")",
"-",
">",
"Quad",
"to",
"highlig... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1369-L1391 | [
"def",
"Overlay_highlightQuad",
"(",
"self",
",",
"quad",
",",
"*",
"*",
"kwargs",
")",
":",
"expected",
"=",
"[",
"'color'",
",",
"'outlineColor'",
"]",
"passed_keys",
"=",
"list",
"(",
"kwargs",
".",
"keys",
"(",
")",
")",
"assert",
"all",
"(",
"[",
... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Overlay_highlightNode | Function path: Overlay.highlightNode
Domain: Overlay
Method name: highlightNode
Parameters:
Required arguments:
'highlightConfig' (type: HighlightConfig) -> A descriptor for the highlight appearance.
Optional arguments:
'nodeId' (type: DOM.NodeId) -> Identifier of the node to highlight.
... | ChromeController/Generator/Generated.py | def Overlay_highlightNode(self, highlightConfig, **kwargs):
"""
Function path: Overlay.highlightNode
Domain: Overlay
Method name: highlightNode
Parameters:
Required arguments:
'highlightConfig' (type: HighlightConfig) -> A descriptor for the highlight appearance.
Optional arguments:
'n... | def Overlay_highlightNode(self, highlightConfig, **kwargs):
"""
Function path: Overlay.highlightNode
Domain: Overlay
Method name: highlightNode
Parameters:
Required arguments:
'highlightConfig' (type: HighlightConfig) -> A descriptor for the highlight appearance.
Optional arguments:
'n... | [
"Function",
"path",
":",
"Overlay",
".",
"highlightNode",
"Domain",
":",
"Overlay",
"Method",
"name",
":",
"highlightNode",
"Parameters",
":",
"Required",
"arguments",
":",
"highlightConfig",
"(",
"type",
":",
"HighlightConfig",
")",
"-",
">",
"A",
"descriptor",... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1393-L1416 | [
"def",
"Overlay_highlightNode",
"(",
"self",
",",
"highlightConfig",
",",
"*",
"*",
"kwargs",
")",
":",
"expected",
"=",
"[",
"'nodeId'",
",",
"'backendNodeId'",
",",
"'objectId'",
"]",
"passed_keys",
"=",
"list",
"(",
"kwargs",
".",
"keys",
"(",
")",
")",... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Overlay_highlightFrame | Function path: Overlay.highlightFrame
Domain: Overlay
Method name: highlightFrame
Parameters:
Required arguments:
'frameId' (type: Page.FrameId) -> Identifier of the frame to highlight.
Optional arguments:
'contentColor' (type: DOM.RGBA) -> The content box highlight fill color (default: tr... | ChromeController/Generator/Generated.py | def Overlay_highlightFrame(self, frameId, **kwargs):
"""
Function path: Overlay.highlightFrame
Domain: Overlay
Method name: highlightFrame
Parameters:
Required arguments:
'frameId' (type: Page.FrameId) -> Identifier of the frame to highlight.
Optional arguments:
'contentColor' (type: D... | def Overlay_highlightFrame(self, frameId, **kwargs):
"""
Function path: Overlay.highlightFrame
Domain: Overlay
Method name: highlightFrame
Parameters:
Required arguments:
'frameId' (type: Page.FrameId) -> Identifier of the frame to highlight.
Optional arguments:
'contentColor' (type: D... | [
"Function",
"path",
":",
"Overlay",
".",
"highlightFrame",
"Domain",
":",
"Overlay",
"Method",
"name",
":",
"highlightFrame",
"Parameters",
":",
"Required",
"arguments",
":",
"frameId",
"(",
"type",
":",
"Page",
".",
"FrameId",
")",
"-",
">",
"Identifier",
"... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1418-L1440 | [
"def",
"Overlay_highlightFrame",
"(",
"self",
",",
"frameId",
",",
"*",
"*",
"kwargs",
")",
":",
"expected",
"=",
"[",
"'contentColor'",
",",
"'contentOutlineColor'",
"]",
"passed_keys",
"=",
"list",
"(",
"kwargs",
".",
"keys",
"(",
")",
")",
"assert",
"al... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Emulation_setPageScaleFactor | Function path: Emulation.setPageScaleFactor
Domain: Emulation
Method name: setPageScaleFactor
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'pageScaleFactor' (type: number) -> Page scale factor.
No return value.
Description: Sets a specified page sc... | ChromeController/Generator/Generated.py | def Emulation_setPageScaleFactor(self, pageScaleFactor):
"""
Function path: Emulation.setPageScaleFactor
Domain: Emulation
Method name: setPageScaleFactor
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'pageScaleFactor' (type: number) -> Page scale factor... | def Emulation_setPageScaleFactor(self, pageScaleFactor):
"""
Function path: Emulation.setPageScaleFactor
Domain: Emulation
Method name: setPageScaleFactor
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'pageScaleFactor' (type: number) -> Page scale factor... | [
"Function",
"path",
":",
"Emulation",
".",
"setPageScaleFactor",
"Domain",
":",
"Emulation",
"Method",
"name",
":",
"setPageScaleFactor",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":",
"pag... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1573-L1593 | [
"def",
"Emulation_setPageScaleFactor",
"(",
"self",
",",
"pageScaleFactor",
")",
":",
"assert",
"isinstance",
"(",
"pageScaleFactor",
",",
"(",
"float",
",",
"int",
")",
")",
",",
"\"Argument 'pageScaleFactor' must be of type '['float', 'int']'. Received type: '%s'\"",
"%",... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Emulation_setVisibleSize | Function path: Emulation.setVisibleSize
Domain: Emulation
Method name: setVisibleSize
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'width' (type: integer) -> Frame width (DIP).
'height' (type: integer) -> Frame height (DIP).
No return value.
D... | ChromeController/Generator/Generated.py | def Emulation_setVisibleSize(self, width, height):
"""
Function path: Emulation.setVisibleSize
Domain: Emulation
Method name: setVisibleSize
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'width' (type: integer) -> Frame width (DIP).
'height' (type: ... | def Emulation_setVisibleSize(self, width, height):
"""
Function path: Emulation.setVisibleSize
Domain: Emulation
Method name: setVisibleSize
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'width' (type: integer) -> Frame width (DIP).
'height' (type: ... | [
"Function",
"path",
":",
"Emulation",
".",
"setVisibleSize",
"Domain",
":",
"Emulation",
"Method",
"name",
":",
"setVisibleSize",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":",
"width",
"... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1595-L1619 | [
"def",
"Emulation_setVisibleSize",
"(",
"self",
",",
"width",
",",
"height",
")",
":",
"assert",
"isinstance",
"(",
"width",
",",
"(",
"int",
",",
")",
")",
",",
"\"Argument 'width' must be of type '['int']'. Received type: '%s'\"",
"%",
"type",
"(",
"width",
")",... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Emulation_setScriptExecutionDisabled | Function path: Emulation.setScriptExecutionDisabled
Domain: Emulation
Method name: setScriptExecutionDisabled
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'value' (type: boolean) -> Whether script execution should be disabled in the page.
No return value... | ChromeController/Generator/Generated.py | def Emulation_setScriptExecutionDisabled(self, value):
"""
Function path: Emulation.setScriptExecutionDisabled
Domain: Emulation
Method name: setScriptExecutionDisabled
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'value' (type: boolean) -> Whether scri... | def Emulation_setScriptExecutionDisabled(self, value):
"""
Function path: Emulation.setScriptExecutionDisabled
Domain: Emulation
Method name: setScriptExecutionDisabled
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'value' (type: boolean) -> Whether scri... | [
"Function",
"path",
":",
"Emulation",
".",
"setScriptExecutionDisabled",
"Domain",
":",
"Emulation",
"Method",
"name",
":",
"setScriptExecutionDisabled",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1621-L1641 | [
"def",
"Emulation_setScriptExecutionDisabled",
"(",
"self",
",",
"value",
")",
":",
"assert",
"isinstance",
"(",
"value",
",",
"(",
"bool",
",",
")",
")",
",",
"\"Argument 'value' must be of type '['bool']'. Received type: '%s'\"",
"%",
"type",
"(",
"value",
")",
"s... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Emulation_setEmulatedMedia | Function path: Emulation.setEmulatedMedia
Domain: Emulation
Method name: setEmulatedMedia
Parameters:
Required arguments:
'media' (type: string) -> Media type to emulate. Empty string disables the override.
No return value.
Description: Emulates the given media for CSS media queries. | ChromeController/Generator/Generated.py | def Emulation_setEmulatedMedia(self, media):
"""
Function path: Emulation.setEmulatedMedia
Domain: Emulation
Method name: setEmulatedMedia
Parameters:
Required arguments:
'media' (type: string) -> Media type to emulate. Empty string disables the override.
No return value.
Description: ... | def Emulation_setEmulatedMedia(self, media):
"""
Function path: Emulation.setEmulatedMedia
Domain: Emulation
Method name: setEmulatedMedia
Parameters:
Required arguments:
'media' (type: string) -> Media type to emulate. Empty string disables the override.
No return value.
Description: ... | [
"Function",
"path",
":",
"Emulation",
".",
"setEmulatedMedia",
"Domain",
":",
"Emulation",
"Method",
"name",
":",
"setEmulatedMedia",
"Parameters",
":",
"Required",
"arguments",
":",
"media",
"(",
"type",
":",
"string",
")",
"-",
">",
"Media",
"type",
"to",
... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1756-L1774 | [
"def",
"Emulation_setEmulatedMedia",
"(",
"self",
",",
"media",
")",
":",
"assert",
"isinstance",
"(",
"media",
",",
"(",
"str",
",",
")",
")",
",",
"\"Argument 'media' must be of type '['str']'. Received type: '%s'\"",
"%",
"type",
"(",
"media",
")",
"subdom_funcs"... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Emulation_setCPUThrottlingRate | Function path: Emulation.setCPUThrottlingRate
Domain: Emulation
Method name: setCPUThrottlingRate
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'rate' (type: number) -> Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
No ret... | ChromeController/Generator/Generated.py | def Emulation_setCPUThrottlingRate(self, rate):
"""
Function path: Emulation.setCPUThrottlingRate
Domain: Emulation
Method name: setCPUThrottlingRate
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'rate' (type: number) -> Throttling rate as a slowdown fac... | def Emulation_setCPUThrottlingRate(self, rate):
"""
Function path: Emulation.setCPUThrottlingRate
Domain: Emulation
Method name: setCPUThrottlingRate
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'rate' (type: number) -> Throttling rate as a slowdown fac... | [
"Function",
"path",
":",
"Emulation",
".",
"setCPUThrottlingRate",
"Domain",
":",
"Emulation",
"Method",
"name",
":",
"setCPUThrottlingRate",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":",
... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1776-L1796 | [
"def",
"Emulation_setCPUThrottlingRate",
"(",
"self",
",",
"rate",
")",
":",
"assert",
"isinstance",
"(",
"rate",
",",
"(",
"float",
",",
"int",
")",
")",
",",
"\"Argument 'rate' must be of type '['float', 'int']'. Received type: '%s'\"",
"%",
"type",
"(",
"rate",
"... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Emulation_setVirtualTimePolicy | Function path: Emulation.setVirtualTimePolicy
Domain: Emulation
Method name: setVirtualTimePolicy
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'policy' (type: VirtualTimePolicy) -> No description
Optional arguments:
'budget' (type: integer) -> If s... | ChromeController/Generator/Generated.py | def Emulation_setVirtualTimePolicy(self, policy, **kwargs):
"""
Function path: Emulation.setVirtualTimePolicy
Domain: Emulation
Method name: setVirtualTimePolicy
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'policy' (type: VirtualTimePolicy) -> No descr... | def Emulation_setVirtualTimePolicy(self, policy, **kwargs):
"""
Function path: Emulation.setVirtualTimePolicy
Domain: Emulation
Method name: setVirtualTimePolicy
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'policy' (type: VirtualTimePolicy) -> No descr... | [
"Function",
"path",
":",
"Emulation",
".",
"setVirtualTimePolicy",
"Domain",
":",
"Emulation",
"Method",
"name",
":",
"setVirtualTimePolicy",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":",
... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1814-L1841 | [
"def",
"Emulation_setVirtualTimePolicy",
"(",
"self",
",",
"policy",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"'budget'",
"in",
"kwargs",
":",
"assert",
"isinstance",
"(",
"kwargs",
"[",
"'budget'",
"]",
",",
"(",
"int",
",",
")",
")",
",",
"\"Optional a... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
train | ChromeRemoteDebugInterface.Emulation_setNavigatorOverrides | Function path: Emulation.setNavigatorOverrides
Domain: Emulation
Method name: setNavigatorOverrides
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'platform' (type: string) -> The platform navigator.platform should return.
No return value.
Descriptio... | ChromeController/Generator/Generated.py | def Emulation_setNavigatorOverrides(self, platform):
"""
Function path: Emulation.setNavigatorOverrides
Domain: Emulation
Method name: setNavigatorOverrides
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'platform' (type: string) -> The platform navigator... | def Emulation_setNavigatorOverrides(self, platform):
"""
Function path: Emulation.setNavigatorOverrides
Domain: Emulation
Method name: setNavigatorOverrides
WARNING: This function is marked 'Experimental'!
Parameters:
Required arguments:
'platform' (type: string) -> The platform navigator... | [
"Function",
"path",
":",
"Emulation",
".",
"setNavigatorOverrides",
"Domain",
":",
"Emulation",
"Method",
"name",
":",
"setNavigatorOverrides",
"WARNING",
":",
"This",
"function",
"is",
"marked",
"Experimental",
"!",
"Parameters",
":",
"Required",
"arguments",
":",
... | fake-name/ChromeController | python | https://github.com/fake-name/ChromeController/blob/914dd136184e8f1165c7aa6ef30418aaf10c61f0/ChromeController/Generator/Generated.py#L1843-L1863 | [
"def",
"Emulation_setNavigatorOverrides",
"(",
"self",
",",
"platform",
")",
":",
"assert",
"isinstance",
"(",
"platform",
",",
"(",
"str",
",",
")",
")",
",",
"\"Argument 'platform' must be of type '['str']'. Received type: '%s'\"",
"%",
"type",
"(",
"platform",
")",... | 914dd136184e8f1165c7aa6ef30418aaf10c61f0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.