text stringlengths 0 828 |
|---|
self.emit('electrode-mouseout', {'electrode_id': |
self.last_hovered, |
'event': event.copy()}) |
self.last_hovered = None |
elif shape is not None: |
# Entering shape |
self.last_hovered = shape |
if self._route is not None: |
if self._route.append(shape) and not (event.get_state() & |
gtk.gdk.MOD1_MASK): |
# `<Alt>` key was not held down. |
self.emit('route-electrode-added', shape) |
self.emit('electrode-mouseover', {'electrode_id': |
self.last_hovered, |
'event': event.copy()})" |
4322,"def register_global_command(self, command, title=None, group=None): |
''' |
.. versionadded:: 0.13 |
Register global command (i.e., not specific to electrode or route). |
Add global command to context menu. |
''' |
commands = self.global_commands.setdefault(group, OrderedDict()) |
if title is None: |
title = (command[:1].upper() + command[1:]).replace('_', ' ') |
commands[command] = title" |
4323,"def register_electrode_command(self, command, title=None, group=None): |
''' |
Register electrode command. |
Add electrode plugin command to context menu. |
''' |
commands = self.electrode_commands.setdefault(group, OrderedDict()) |
if title is None: |
title = (command[:1].upper() + command[1:]).replace('_', ' ') |
commands[command] = title" |
4324,"def register_route_command(self, command, title=None, group=None): |
''' |
Register route command. |
Add route plugin command to context menu. |
''' |
commands = self.route_commands.setdefault(group, OrderedDict()) |
if title is None: |
title = (command[:1].upper() + command[1:]).replace('_', ' ') |
commands[command] = title" |
4325,"def list_all_gateways(cls, **kwargs): |
""""""List Gateways |
Return a list of Gateways |
This method makes a synchronous HTTP request by default. To make an |
asynchronous HTTP request, please pass async=True |
>>> thread = api.list_all_gateways(async=True) |
>>> result = thread.get() |
:param async bool |
:param int page: page number |
:param int size: page size |
:param str sort: page order |
:return: page[Gateway] |
If the method is called asynchronously, |
returns the request thread. |
"""""" |
kwargs['_return_http_data_only'] = True |
if kwargs.get('async'): |
return cls._list_all_gateways_with_http_info(**kwargs) |
else: |
(data) = cls._list_all_gateways_with_http_info(**kwargs) |
return data" |
4326,"def list_of_dictionaries_to_mysql_inserts( |
log, |
datalist, |
tableName): |
""""""Convert a python list of dictionaries to pretty csv output |
**Key Arguments:** |
- ``log`` -- logger |
- ``datalist`` -- a list of dictionaries |
- ``tableName`` -- the name of the table to create the insert statements for |
**Return:** |
- ``output`` -- the mysql insert statements (as a string) |
**Usage:** |
.. code-block:: python |
from fundamentals.files import list_of_dictionaries_to_mysql_inserts |
mysqlInserts = list_of_dictionaries_to_mysql_inserts( |
log=log, |
datalist=dataList, |
tableName=""my_new_table"" |
) |
print mysqlInserts |
this output the following: |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.