code string | signature string | docstring string | loss_without_docstring float64 | loss_with_docstring float64 | factor float64 |
|---|---|---|---|---|---|
ip_version = kwargs.pop('ip_version', '4')
enabled = kwargs.pop('enabled', True)
rbridge_id = kwargs.pop('rbridge_id', '1')
callback = kwargs.pop('callback', self._callback)
vrrp_args = dict(rbridge_id=rbridge_id)
vrrp_method = 'rbridge_id_protocol_hide_vrrp_hold... | def vrrp(self, **kwargs) | Enable or Disable VRRP.
Args:
ip_version (str): The IP version ('4' or '6') for which VRRP should
be enabled/disabled. Default: `4`.
enabled (bool): If VRRP should be enabled or disabled. Default:
``True``.
rbridge_id (str): The rbridge ID o... | 2.640036 | 2.509418 | 1.052051 |
ip_version = kwargs.pop('ip_version', '4')
enable = kwargs.pop('enable', True)
get = kwargs.pop('get', False)
rbridge_id = kwargs.pop('rbridge_id', '1')
callback = kwargs.pop('callback', self._callback)
if get:
enable = None
vrrpe_args = dict(... | def vrrpe(self, **kwargs) | Enable or Disable Vrrpe.
Args:
ip_version (str): The IP version ('4' or '6') for which vrrpe
should be enabled/disabled. Default: `4`.
enable (bool): If vrrpe should be enabled or disabled. Default:
``True``.
get (bool): Get config instead of... | 2.636747 | 2.373797 | 1.110772 |
solver = SolverContext(**params)
start = time.time()
count = sum(1 for _ in solver.solve())
execution_time = time.time() - start
params.update({
'solutions': count,
'execution_time': execution_time})
return params | def run_scenario(params) | Run one scenario and returns execution time and number of solutions.
Also returns initial parameters in the response to keep the results
associated with the initial context. | 3.946666 | 3.638776 | 1.084613 |
if path.exists(self.csv_filepath):
self.results = self.results.append(
pandas.read_csv(self.csv_filepath)) | def load_csv(self) | Load old benchmark results from CSV. | 4.945022 | 3.959891 | 1.248777 |
for result in new_results:
result.update(self.context)
self.results = self.results.append(result, ignore_index=True) | def add(self, new_results) | Add new benchmark results. | 3.569787 | 3.520281 | 1.014063 |
# Sort results so we can start to see patterns right in the raw CSV.
self.results.sort_values(by=self.column_ids, inplace=True)
# Gotcha: integers seems to be promoted to float64 because of
# reindexation. See: https://pandas.pydata.org/pandas-docs/stable
# /gotchas.html... | def save_csv(self) | Dump all results to CSV. | 7.978235 | 7.554599 | 1.056077 |
# Filters out boards with pieces other than queens.
nqueens = self.results
for piece_label in set(PIECE_LABELS).difference(['queen']):
nqueens = nqueens[nqueens[piece_label].map(pandas.isnull)]
# Filters out non-square boards whose dimension are not aligned to the
... | def nqueen_graph(self) | Graph n-queens problem for the current version and context. | 3.807533 | 3.613462 | 1.053708 |
ip_addr = ip_interface(unicode(kwargs.pop('ip_addr')))
rbridge_id = kwargs.pop('rbridge_id', '1')
delete = kwargs.pop('delete', False)
callback = kwargs.pop('callback', self._callback)
remote_as = kwargs.pop('remote_as', None)
get_config = kwargs.pop('get', False... | def neighbor(self, **kwargs) | Experimental neighbor method.
Args:
ip_addr (str): IP Address of BGP neighbor.
remote_as (str): Remote ASN of BGP neighbor.
rbridge_id (str): The rbridge ID of the device on which BGP will be
configured in a VCS fabric.
afis (list): A list of AFIs... | 2.389609 | 2.331813 | 1.024786 |
callback = kwargs.pop('callback', self._callback)
config = ET.Element("config")
rbridge_id = ET.SubElement(config, "rbridge-id",
xmlns="urn:brocade.com:mgmt:"
"brocade-rbridge")
rbridge_id_key = ET.SubEl... | def evpn_afi(self, **kwargs) | EVPN AFI. This method just enables/disables or gets the EVPN AFI.
Args:
rbridge_id (str): The rbridge ID of the device on which BGP will be
configured in a VCS fabric.
delete (bool): Deletes the neighbor if `delete` is ``True``.
get (bool): Get config instead... | 2.161246 | 2.265876 | 0.953824 |
peer_ip = kwargs.pop('peer_ip')
callback = kwargs.pop('callback', self._callback)
evpn_activate = getattr(self._rbridge,
'rbridge_id_router_router_bgp_address_family_'
'l2vpn_evpn_neighbor_evpn_neighbor_ipv4_'
... | def evpn_afi_peer_activate(self, **kwargs) | Activate EVPN AFI for a peer.
Args:
ip_addr (str): IP Address of BGP neighbor.
rbridge_id (str): The rbridge ID of the device on which BGP will be
configured in a VCS fabric.
delete (bool): Deletes the neighbor if `delete` is ``True``.
Deactiv... | 3.42333 | 3.214226 | 1.065056 |
kwargs['min_tx'] = kwargs.pop('tx')
kwargs['min_rx'] = kwargs.pop('rx')
kwargs['delete'] = kwargs.pop('delete', False)
callback = kwargs.pop('callback', self._callback)
bfd_tx = self._bfd_tx(**kwargs)
bfd_rx = self._bfd_rx(**kwargs)
bfd_multiplier = self.... | def bfd(self, **kwargs) | Configure BFD for BGP globally.
Args:
rbridge_id (str): Rbridge to configure. (1, 225, etc)
tx (str): BFD transmit interval in milliseconds (300, 500, etc)
rx (str): BFD receive interval in milliseconds (300, 500, etc)
multiplier (str): BFD multiplier. (3, 7, 5... | 2.530663 | 2.324411 | 1.088733 |
method_name = 'rbridge_id_router_router_bgp_router_bgp_attributes_' \
'bfd_interval_min_rx'
bfd_rx = getattr(self._rbridge, method_name)
config = bfd_rx(**kwargs)
if kwargs['delete']:
tag = 'min-rx'
config.find('.//*%s' % tag).set('o... | def _bfd_rx(self, **kwargs) | Return the BFD minimum receive interval XML.
You should not use this method.
You probably want `BGP.bfd`.
Args:
min_rx (str): BFD receive interval in milliseconds (300, 500, etc)
delete (bool): Remove the configuration if ``True``.
Returns:
XML to b... | 6.020557 | 5.955966 | 1.010845 |
method_name = 'rbridge_id_router_router_bgp_router_bgp_attributes_' \
'bfd_interval_multiplier'
bfd_multiplier = getattr(self._rbridge, method_name)
config = bfd_multiplier(**kwargs)
if kwargs['delete']:
tag = 'multiplier'
config.fin... | def _bfd_multiplier(self, **kwargs) | Return the BFD multiplier XML.
You should not use this method.
You probably want `BGP.bfd`.
Args:
min_tx (str): BFD transmit interval in milliseconds (300, 500, etc)
delete (bool): Remove the configuration if ``True``.
Returns:
XML to be passed to t... | 5.524374 | 6.364228 | 0.868035 |
callback = kwargs.pop('callback', self._callback)
args = dict(rbridge_id=kwargs.pop('rbridge_id', '1'),
evpn_neighbor_ipv4_address=kwargs.pop('ip_addr'))
next_hop_unchanged = getattr(self._rbridge,
'rbridge_id_router_router_bgp_ad... | def evpn_next_hop_unchanged(self, **kwargs) | Configure next hop unchanged for an EVPN neighbor.
You probably don't want this method. You probably want to configure
an EVPN neighbor using `BGP.neighbor`. That will configure next-hop
unchanged automatically.
Args:
ip_addr (str): IP Address of BGP neighbor.
... | 3.019824 | 2.840073 | 1.063291 |
kwargs['min_tx'] = kwargs.pop('tx')
kwargs['min_rx'] = kwargs.pop('rx')
kwargs['router_bgp_neighbor_address'] = kwargs.pop('peer_ip')
kwargs['delete'] = kwargs.pop('delete', False)
callback = kwargs.pop('callback', self._callback)
bfd_tx = self._peer_bfd_tx(**kwa... | def peer_bfd_timers(self, **kwargs) | Configure BFD for BGP globally.
Args:
rbridge_id (str): Rbridge to configure. (1, 225, etc)
peer_ip (str): Peer IPv4 address for BFD setting.
tx (str): BFD transmit interval in milliseconds (300, 500, etc)
rx (str): BFD receive interval in milliseconds (300, 500... | 2.643021 | 2.480395 | 1.065565 |
method_name = 'rbridge_id_router_router_bgp_router_bgp_attributes_' \
'neighbor_neighbor_ips_neighbor_addr_bfd_bfd_enable'
bfd_enable = getattr(self._rbridge, method_name)
kwargs['router_bgp_neighbor_address'] = kwargs.pop('peer_ip')
callback = kwargs.pop('... | def enable_peer_bfd(self, **kwargs) | BFD enable for each specified peer.
Args:
rbridge_id (str): Rbridge to configure. (1, 225, etc)
peer_ip (str): Peer IPv4 address for BFD setting.
delete (bool): True if BFD configuration should be deleted.
Default value will be False if not specified.
... | 3.78174 | 3.782414 | 0.999822 |
method_name = 'rbridge_id_router_router_bgp_router_bgp_attributes_' \
'neighbor_neighbor_ips_neighbor_addr_bfd_interval_min_tx'
bfd_tx = getattr(self._rbridge, method_name)
config = bfd_tx(**kwargs)
if kwargs['delete']:
tag = 'min-tx'
... | def _peer_bfd_tx(self, **kwargs) | Return the BFD minimum transmit interval XML.
You should not use this method.
You probably want `BGP.bfd`.
Args:
peer_ip (str): Peer IPv4 address for BFD setting.
min_tx (str): BFD transmit interval in milliseconds (300, 500, etc)
delete (bool): Remove the c... | 6.440883 | 6.516103 | 0.988456 |
tx = self._callback(tx, handler='get_config')
rx = self._callback(rx, handler='get_config')
multiplier = self._callback(multiplier, handler='get_config')
tx = pynos.utilities.return_xml(str(tx))
rx = pynos.utilities.return_xml(str(rx))
multiplier = pynos.utilitie... | def _peer_get_bfd(self, tx, rx, multiplier) | Get and merge the `bfd` config from global BGP.
You should not use this method.
You probably want `BGP.bfd`.
Args:
tx: XML document with the XML to get the transmit interval.
rx: XML document with the XML to get the receive interval.
multiplier: XML document... | 2.445124 | 2.506082 | 0.975676 |
rbridge_id = kwargs['rbridge_id']
get_config = kwargs.pop('get', False)
delete = kwargs.pop('delete', False)
callback = kwargs.pop('callback', self._callback)
result = []
method_class = self._rbridge
if not get_config:
evpn_instance = kwargs[... | def vni_add(self, **kwargs) | Add VNIs to the EVPN Instance
Args:
rbridge_id (str): rbridge-id for device.
evpn_instance (str): Name of the evpn instance.
vni (str): vnis to the evpn instance
get (bool): Get config instead of editing config. (True, False)
delete (bool): True, delet... | 1.840326 | 1.793917 | 1.02587 |
afi = kwargs.pop('afi', 'ipv4')
rbridge_id = kwargs.pop('rbridge_id', '1')
delete = kwargs.pop('delete', False)
callback = kwargs.pop('callback', self._callback)
if afi not in ['ipv4', 'ipv6']:
raise AttributeError('Invalid AFI.')
addr_family = getat... | def default_vrf_unicast_address_family(self, **kwargs) | Create default address family (ipv4/ipv6) under router bgp.
Args:
afi (str): Address family to configure. (ipv4, ipv6)
rbridge_id (str): The rbridge ID of the device on which BGP will be
configured in a VCS fabric.
delete (bool): Deletes the red... | 3.140881 | 3.043004 | 1.032165 |
afi = kwargs.pop('afi', 'ipv4')
callback = kwargs.pop('callback', self._callback)
get_config = kwargs.pop('get', False)
if afi not in ['ipv4', 'ipv6']:
raise AttributeError('Invalid AFI.')
if not get_config:
args = dict(rbridge_id=kwargs.pop('rbri... | def default_vrf_max_paths(self, **kwargs) | Set BGP max paths property on default VRF address family.
Args:
rbridge_id (str): The rbridge ID of the device on which BGP will be
configured in a VCS fabric.
paths (str): Number of paths for BGP ECMP (default: 8).
afi (str): Address family to configure. (ip... | 2.767123 | 2.615719 | 1.057883 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
connector = ET.SubElement(hardware, "connector")
name = ET.SubElement(connector, "name")
name.text = kwargs.pop('name')
callback = kwargs.po... | def hardware_connector_name(self, **kwargs) | Auto Generated Code | 1.515913 | 1.331596 | 1.138418 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
connector = ET.SubElement(hardware, "connector")
name_key = ET.SubElement(connector, "name")
name_key.text = kwargs.pop('name')
sfp = ET.SubE... | def hardware_connector_sfp_breakout(self, **kwargs) | Auto Generated Code | 1.453834 | 1.27443 | 1.140772 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
port_group = ET.SubElement(hardware, "port-group")
name = ET.SubElement(port_group, "name")
name.text = kwargs.pop('name')
callback = kwargs... | def hardware_port_group_name(self, **kwargs) | Auto Generated Code | 1.432968 | 1.296886 | 1.10493 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
port_group = ET.SubElement(hardware, "port-group")
name_key = ET.SubElement(port_group, "name")
name_key.text = kwargs.pop('name')
mode = ET.... | def hardware_port_group_mode_performance(self, **kwargs) | Auto Generated Code | 1.374857 | 1.275537 | 1.077866 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
port_group = ET.SubElement(hardware, "port-group")
name_key = ET.SubElement(port_group, "name")
name_key.text = kwargs.pop('name')
mode = ET.... | def hardware_port_group_mode_portgroup_speed(self, **kwargs) | Auto Generated Code | 1.279557 | 1.200731 | 1.065648 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
port_group = ET.SubElement(hardware, "port-group")
name_key = ET.SubElement(port_group, "name")
name_key.text = kwargs.pop('name')
mode = ET.... | def hardware_port_group_mode_support_performance(self, **kwargs) | Auto Generated Code | 1.365592 | 1.284449 | 1.063173 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
port_group = ET.SubElement(hardware, "port-group")
name_key = ET.SubElement(port_group, "name")
name_key.text = kwargs.pop('name')
mode = ET.... | def hardware_port_group_mode_support_multispeed(self, **kwargs) | Auto Generated Code | 1.348195 | 1.263912 | 1.066684 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
connector_group = ET.SubElement(hardware, "connector-group")
id = ET.SubElement(connector_group, "id")
id.text = kwargs.pop('id')
callback =... | def hardware_connector_group_id(self, **kwargs) | Auto Generated Code | 1.486644 | 1.333804 | 1.114589 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
connector_group = ET.SubElement(hardware, "connector-group")
id_key = ET.SubElement(connector_group, "id")
id_key.text = kwargs.pop('id')
spe... | def hardware_connector_group_speed(self, **kwargs) | Auto Generated Code | 1.388255 | 1.262371 | 1.09972 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
flexport = ET.SubElement(hardware, "flexport")
id = ET.SubElement(flexport, "id")
id.text = kwargs.pop('id')
callback = kwargs.pop('callback... | def hardware_flexport_id(self, **kwargs) | Auto Generated Code | 1.45037 | 1.303105 | 1.113011 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
flexport = ET.SubElement(hardware, "flexport")
id_key = ET.SubElement(flexport, "id")
id_key.text = kwargs.pop('id')
flexport_type = ET.SubEl... | def hardware_flexport_flexport_type_type(self, **kwargs) | Auto Generated Code | 1.37879 | 1.313293 | 1.049873 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
flexport = ET.SubElement(hardware, "flexport")
id_key = ET.SubElement(flexport, "id")
id_key.text = kwargs.pop('id')
flexport_type = ET.SubEl... | def hardware_flexport_flexport_type_instance(self, **kwargs) | Auto Generated Code | 1.386476 | 1.320677 | 1.049822 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
flexport = ET.SubElement(hardware, "flexport")
id_key = ET.SubElement(flexport, "id")
id_key.text = kwargs.pop('id')
flexport_type = ET.SubEl... | def hardware_flexport_flexport_type_skip_deconfig(self, **kwargs) | Auto Generated Code | 1.351133 | 1.287419 | 1.04949 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
custom_profile = ET.SubElement(hardware, "custom-profile")
kap_custom_profile = ET.SubElement(custom_profile, "kap-custom-profile")
name = ET.SubElem... | def hardware_custom_profile_kap_custom_profile_name(self, **kwargs) | Auto Generated Code | 1.319561 | 1.25173 | 1.05419 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
custom_profile = ET.SubElement(hardware, "custom-profile")
kap_custom_profile = ET.SubElement(custom_profile, "kap-custom-profile")
name_key = ET.Sub... | def hardware_custom_profile_kap_custom_profile_lacp_lacp_hello_interval(self, **kwargs) | Auto Generated Code | 1.274589 | 1.230123 | 1.036148 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
custom_profile = ET.SubElement(hardware, "custom-profile")
kap_custom_profile = ET.SubElement(custom_profile, "kap-custom-profile")
name_key = ET.Sub... | def hardware_custom_profile_kap_custom_profile_xstp_xstp_hello_interval(self, **kwargs) | Auto Generated Code | 1.257929 | 1.222897 | 1.028647 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
custom_profile = ET.SubElement(hardware, "custom-profile")
kap_custom_profile = ET.SubElement(custom_profile, "kap-custom-profile")
name_key = ET.Sub... | def hardware_custom_profile_kap_custom_profile_rpvst_rpvst_hello_interval(self, **kwargs) | Auto Generated Code | 1.254963 | 1.214723 | 1.033127 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
custom_profile = ET.SubElement(hardware, "custom-profile")
kap_custom_profile = ET.SubElement(custom_profile, "kap-custom-profile")
name_key = ET.Sub... | def hardware_custom_profile_kap_custom_profile_udld_udld_hello_interval(self, **kwargs) | Auto Generated Code | 1.254295 | 1.211538 | 1.035292 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
custom_profile = ET.SubElement(hardware, "custom-profile")
kap_custom_profile = ET.SubElement(custom_profile, "kap-custom-profile")
name_key = ET.Sub... | def hardware_custom_profile_kap_custom_profile_bfd_vxlan_bfd_vxlan_hello_interval(self, **kwargs) | Auto Generated Code | 1.276138 | 1.226503 | 1.040469 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
custom_profile = ET.SubElement(hardware, "custom-profile")
kap_custom_profile = ET.SubElement(custom_profile, "kap-custom-profile")
name_key = ET.Sub... | def hardware_custom_profile_kap_custom_profile_bfd_l3_bfd_l3_hello_interval(self, **kwargs) | Auto Generated Code | 1.260716 | 1.218447 | 1.034691 |
config = ET.Element("config")
hardware = ET.SubElement(config, "hardware", xmlns="urn:brocade.com:mgmt:brocade-hardware")
custom_profile = ET.SubElement(hardware, "custom-profile")
kap_custom_profile = ET.SubElement(custom_profile, "kap-custom-profile")
name_key = ET.Sub... | def hardware_custom_profile_kap_custom_profile_fcoe_fcoe_hello_interval(self, **kwargs) | Auto Generated Code | 1.261957 | 1.219813 | 1.034549 |
config = ET.Element("config")
get_flexports = ET.Element("get_flexports")
config = get_flexports
output = ET.SubElement(get_flexports, "output")
flexport_list = ET.SubElement(output, "flexport-list")
port_id = ET.SubElement(flexport_list, "port-id")
port_... | def get_flexports_output_flexport_list_port_id(self, **kwargs) | Auto Generated Code | 1.290596 | 1.220253 | 1.057646 |
def decorator(f):
if 'description' not in kwargs:
kwargs['description'] = f.__doc__
if 'parents' in kwargs:
if not hasattr(f, '_argnames'): # pragma: no cover
f._argnames = []
for p in kwargs['parents']:
f._argnames += p._argn... | def command(*args, **kwargs) | Decorator to define a command.
The arguments to this decorator are those of the
`ArgumentParser <https://docs.python.org/3/library/argparse.html\
#argumentparser-objects>`_
object constructor. | 2.617063 | 2.560858 | 1.021948 |
def decorator(f):
if 'help' not in kwargs:
kwargs['help'] = f.__doc__
_parser_class = group._subparsers._parser_class
if 'parser' in kwargs:
# use a copy of the given parser
group._subparsers._parser_class = _CopiedArgumentParser
if 'parents' ... | def _subcommand(group, *args, **kwargs) | Decorator to define a subcommand.
This decorator is used for the group's @command decorator. | 3.014217 | 3.071853 | 0.981237 |
def decorator(f):
f.required = kwargs.pop('required', True)
if 'parents' in kwargs:
if not hasattr(f, '_argnames'): # pragma: no cover
f._argnames = []
for p in kwargs['parents']:
f._argnames += p._argnames if hasattr(p, '_argnames') else... | def _subgroup(group, *args, **kwargs) | Decorator to define a subgroup.
This decorator is used for the group's @group decorator. | 2.831404 | 2.852604 | 0.992568 |
def decorator(f):
f.required = kwargs.pop('required', True)
if 'parents' in kwargs:
if not hasattr(f, '_argnames'): # pragma: no cover
f._argnames = []
for p in kwargs['parents']:
f._argnames += p._argnames if hasattr(p, '_argnames') else... | def group(*args, **kwargs) | Decorator to define a command group.
The arguments to this decorator are those of the
`ArgumentParser <https://docs.python.org/3/library/argparse.html\
#argumentparser-objects>`_
object constructor. | 2.874481 | 2.850822 | 1.008299 |
# strings starting with two prefix characters are long options
option_strings.append(option_string)
if option_string[0] in prefix_chars:
if len(option_string) > 1:
if option_string[1] in prefix_chars:
long_option_strings.append(option_string)
... | def _get_dest(*args, **kwargs): # pragma: no cover
prefix_chars = kwargs.get('prefix_chars', '-')
# determine short and long option strings
option_strings = []
long_option_strings = []
for option_string in args | Duplicate argument names processing logic from argparse.
argparse stores the variable in the namespace using the provided dest name,
the first long option string, or the first short option string | 2.836369 | 2.885469 | 0.982983 |
def decorator(f):
if not hasattr(f, '_arguments'):
f._arguments = []
if not hasattr(f, '_argnames'):
f._argnames = []
f._arguments.append((args, kwargs))
f._argnames.append(_get_dest(*args, **kwargs))
return f
return decorator | def argument(*args, **kwargs) | Decorator to define an argparse option or argument.
The arguments to this decorator are the same as the
`ArgumentParser.add_argument <https://docs.python.org/3/library/\
argparse.html#the-add-argument-method>`_
method. | 2.63486 | 3.150641 | 0.836293 |
config = ET.Element("config")
webui = ET.SubElement(config, "webui", xmlns="http://tail-f.com/ns/webui")
schematics = ET.SubElement(webui, "schematics")
panels = ET.SubElement(schematics, "panels")
panel = ET.SubElement(panels, "panel")
name = ET.SubElement(panel... | def webui_schematics_panels_panel_name(self, **kwargs) | Auto Generated Code | 1.573723 | 1.398993 | 1.124896 |
config = ET.Element("config")
webui = ET.SubElement(config, "webui", xmlns="http://tail-f.com/ns/webui")
schematics = ET.SubElement(webui, "schematics")
panels = ET.SubElement(schematics, "panels")
panel = ET.SubElement(panels, "panel")
name_key = ET.SubElement(p... | def webui_schematics_panels_panel_properties_height(self, **kwargs) | Auto Generated Code | 1.421036 | 1.351907 | 1.051134 |
config = ET.Element("config")
webui = ET.SubElement(config, "webui", xmlns="http://tail-f.com/ns/webui")
schematics = ET.SubElement(webui, "schematics")
panels = ET.SubElement(schematics, "panels")
panel = ET.SubElement(panels, "panel")
name_key = ET.SubElement(p... | def webui_schematics_panels_panel_components_component_id(self, **kwargs) | Auto Generated Code | 1.400086 | 1.349697 | 1.037333 |
config = ET.Element("config")
webui = ET.SubElement(config, "webui", xmlns="http://tail-f.com/ns/webui")
schematics = ET.SubElement(webui, "schematics")
panels = ET.SubElement(schematics, "panels")
panel = ET.SubElement(panels, "panel")
name_key = ET.SubElement(p... | def webui_schematics_panels_panel_components_component_properties_top(self, **kwargs) | Auto Generated Code | 1.371156 | 1.304289 | 1.051267 |
config = ET.Element("config")
webui = ET.SubElement(config, "webui", xmlns="http://tail-f.com/ns/webui")
schematics = ET.SubElement(webui, "schematics")
assets = ET.SubElement(schematics, "assets")
asset = ET.SubElement(assets, "asset")
name = ET.SubElement(asset... | def webui_schematics_assets_asset_name(self, **kwargs) | Auto Generated Code | 1.467766 | 1.396209 | 1.051251 |
config = ET.Element("config")
webui = ET.SubElement(config, "webui", xmlns="http://tail-f.com/ns/webui")
schematics = ET.SubElement(webui, "schematics")
assets = ET.SubElement(schematics, "assets")
asset = ET.SubElement(assets, "asset")
name_key = ET.SubElement(a... | def webui_schematics_assets_asset_asset_type_image_base_64_image(self, **kwargs) | Auto Generated Code | 1.344279 | 1.275867 | 1.05362 |
config = ET.Element("config")
webui = ET.SubElement(config, "webui", xmlns="http://tail-f.com/ns/webui")
data_stores = ET.SubElement(webui, "data-stores")
user_profile = ET.SubElement(data_stores, "user-profile")
username = ET.SubElement(user_profile, "username")
... | def webui_data_stores_user_profile_username(self, **kwargs) | Auto Generated Code | 1.477052 | 1.390527 | 1.062225 |
config = ET.Element("config")
webui = ET.SubElement(config, "webui", xmlns="http://tail-f.com/ns/webui")
data_stores = ET.SubElement(webui, "data-stores")
user_profile = ET.SubElement(data_stores, "user-profile")
username_key = ET.SubElement(user_profile, "username")
... | def webui_data_stores_user_profile_saved_query_key(self, **kwargs) | Auto Generated Code | 1.510364 | 1.430824 | 1.05559 |
config = ET.Element("config")
webui = ET.SubElement(config, "webui", xmlns="http://tail-f.com/ns/webui")
data_stores = ET.SubElement(webui, "data-stores")
user_profile = ET.SubElement(data_stores, "user-profile")
username_key = ET.SubElement(user_profile, "username")
... | def webui_data_stores_user_profile_saved_query_value(self, **kwargs) | Auto Generated Code | 1.455445 | 1.380307 | 1.054436 |
config = ET.Element("config")
webui = ET.SubElement(config, "webui", xmlns="http://tail-f.com/ns/webui")
data_stores = ET.SubElement(webui, "data-stores")
data_store = ET.SubElement(data_stores, "data-store")
key = ET.SubElement(data_store, "key")
key.text = kwar... | def webui_data_stores_data_store_key(self, **kwargs) | Auto Generated Code | 1.465345 | 1.396445 | 1.04934 |
config = ET.Element("config")
webui = ET.SubElement(config, "webui", xmlns="http://tail-f.com/ns/webui")
data_stores = ET.SubElement(webui, "data-stores")
data_store = ET.SubElement(data_stores, "data-store")
key_key = ET.SubElement(data_store, "key")
key_key.tex... | def webui_data_stores_data_store_value(self, **kwargs) | Auto Generated Code | 1.522061 | 1.455712 | 1.045579 |
config = ET.Element("config")
webui = ET.SubElement(config, "webui", xmlns="http://tail-f.com/ns/webui")
data_stores = ET.SubElement(webui, "data-stores")
saved_query = ET.SubElement(data_stores, "saved-query")
key = ET.SubElement(saved_query, "key")
key.text = k... | def webui_data_stores_saved_query_key(self, **kwargs) | Auto Generated Code | 1.539874 | 1.428846 | 1.077705 |
''' Override the create method to add the user's id to the request data '''
return await super(EntryResource, self).create(user=self.request['user']) | async def create(self, **kwargs) | Override the create method to add the user's id to the request data | 13.471931 | 6.905969 | 1.950766 |
enabled = kwargs.pop('enabled')
callback = kwargs.pop('callback', self._callback)
if not isinstance(enabled, bool):
raise ValueError('%s must be `True` or `False`.' % repr(enabled))
state_args = dict()
autoupload_state = getattr(self._ras, 'support_autouplo... | def enable_support_autoupload(self, **kwargs) | Set Spanning Tree state.
Args:
enabled (bool): Is Autoupload enabled? (True, False).
callback (function): A function executed upon completion of the
method. The only parameter passed to `callback` will be the
``ElementTree`` `config`.
Returns:
... | 5.346461 | 4.347596 | 1.229751 |
config = ET.Element("config")
igmp_snooping = ET.SubElement(config, "igmp-snooping", xmlns="urn:brocade.com:mgmt:brocade-igmp-snooping")
ip = ET.SubElement(igmp_snooping, "ip")
igmp = ET.SubElement(ip, "igmp")
snooping = ET.SubElement(igmp, "snooping")
enable = E... | def igmp_snooping_ip_igmp_snooping_enable(self, **kwargs) | Auto Generated Code | 1.327575 | 1.270335 | 1.045059 |
config = ET.Element("config")
vlan = ET.SubElement(config, "vlan", xmlns="urn:brocade.com:mgmt:brocade-vlan")
classifier = ET.SubElement(vlan, "classifier")
rule = ET.SubElement(classifier, "rule")
ruleid = ET.SubElement(rule, "ruleid")
ruleid.text = kwargs.pop('... | def vlan_classifier_rule_ruleid(self, **kwargs) | Auto Generated Code | 1.338281 | 1.289497 | 1.037832 |
config = ET.Element("config")
vlan = ET.SubElement(config, "vlan", xmlns="urn:brocade.com:mgmt:brocade-vlan")
classifier = ET.SubElement(vlan, "classifier")
rule = ET.SubElement(classifier, "rule")
ruleid_key = ET.SubElement(rule, "ruleid")
ruleid_key.text = kwar... | def vlan_classifier_rule_class_type_mac_mac_address(self, **kwargs) | Auto Generated Code | 1.360221 | 1.319435 | 1.030911 |
config = ET.Element("config")
vlan = ET.SubElement(config, "vlan", xmlns="urn:brocade.com:mgmt:brocade-vlan")
classifier = ET.SubElement(vlan, "classifier")
rule = ET.SubElement(classifier, "rule")
ruleid_key = ET.SubElement(rule, "ruleid")
ruleid_key.text = kwar... | def vlan_classifier_rule_class_type_proto_proto_proto_val(self, **kwargs) | Auto Generated Code | 1.416914 | 1.37283 | 1.032111 |
config = ET.Element("config")
vlan = ET.SubElement(config, "vlan", xmlns="urn:brocade.com:mgmt:brocade-vlan")
classifier = ET.SubElement(vlan, "classifier")
group = ET.SubElement(classifier, "group")
oper_key = ET.SubElement(group, "oper")
oper_key.text = kwargs.... | def vlan_classifier_group_groupid(self, **kwargs) | Auto Generated Code | 1.471842 | 1.436554 | 1.024565 |
config = ET.Element("config")
vlan = ET.SubElement(config, "vlan", xmlns="urn:brocade.com:mgmt:brocade-vlan")
classifier = ET.SubElement(vlan, "classifier")
group = ET.SubElement(classifier, "group")
groupid_key = ET.SubElement(group, "groupid")
groupid_key.text ... | def vlan_classifier_group_oper(self, **kwargs) | Auto Generated Code | 1.422185 | 1.413912 | 1.005851 |
config = ET.Element("config")
vlan = ET.SubElement(config, "vlan", xmlns="urn:brocade.com:mgmt:brocade-vlan")
classifier = ET.SubElement(vlan, "classifier")
group = ET.SubElement(classifier, "group")
groupid_key = ET.SubElement(group, "groupid")
groupid_key.text ... | def vlan_classifier_group_rule_name(self, **kwargs) | Auto Generated Code | 1.406498 | 1.386651 | 1.014313 |
config = ET.Element("config")
vlan = ET.SubElement(config, "vlan", xmlns="urn:brocade.com:mgmt:brocade-vlan")
classifier = ET.SubElement(vlan, "classifier")
group = ET.SubElement(classifier, "group")
groupid_key = ET.SubElement(group, "groupid")
groupid_key.text ... | def vlan_classifier_group_ruleid(self, **kwargs) | Auto Generated Code | 1.388924 | 1.347196 | 1.030974 |
config = ET.Element("config")
vlan = ET.SubElement(config, "vlan", xmlns="urn:brocade.com:mgmt:brocade-vlan")
dot1q = ET.SubElement(vlan, "dot1q")
tag = ET.SubElement(dot1q, "tag")
native = ET.SubElement(tag, "native")
callback = kwargs.pop('callback', self._cal... | def vlan_dot1q_tag_native(self, **kwargs) | Auto Generated Code | 1.443801 | 1.342874 | 1.075158 |
''' begin listening to messages that were entered after starting'''
# begin by making sure the channel is created
await self.create_channel()
# get cursor method
def create_cursor():
now = datetime.datetime.utcnow()
dummy_id = ObjectId.from_datetime(now)
... | async def consume_events(self) | begin listening to messages that were entered after starting | 4.864783 | 4.05682 | 1.199162 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
input = ET.SubElement(get_vlan_brief, "input")
request_type = ET.SubElement(input, "request-type")
get_request = ET.SubElement(request_type, "get-request")
... | def get_vlan_brief_input_request_type_get_request_vlan_id(self, **kwargs) | Auto Generated Code | 1.269458 | 1.210467 | 1.048735 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
input = ET.SubElement(get_vlan_brief, "input")
request_type = ET.SubElement(input, "request-type")
get_next_request = ET.SubElement(request_type, "get-next-request... | def get_vlan_brief_input_request_type_get_next_request_last_rcvd_vlan_id(self, **kwargs) | Auto Generated Code | 1.218649 | 1.178103 | 1.034416 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
output = ET.SubElement(get_vlan_brief, "output")
configured_vlans_count = ET.SubElement(output, "configured-vlans-count")
configured_vlans_count.text = kwargs.pop(... | def get_vlan_brief_output_configured_vlans_count(self, **kwargs) | Auto Generated Code | 1.342366 | 1.217086 | 1.102934 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
output = ET.SubElement(get_vlan_brief, "output")
provisioned_vlans_count = ET.SubElement(output, "provisioned-vlans-count")
provisioned_vlans_count.text = kwargs.p... | def get_vlan_brief_output_provisioned_vlans_count(self, **kwargs) | Auto Generated Code | 1.330918 | 1.2243 | 1.087085 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
output = ET.SubElement(get_vlan_brief, "output")
unprovisioned_vlans_count = ET.SubElement(output, "unprovisioned-vlans-count")
unprovisioned_vlans_count.text = kw... | def get_vlan_brief_output_unprovisioned_vlans_count(self, **kwargs) | Auto Generated Code | 1.333836 | 1.232624 | 1.082111 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
output = ET.SubElement(get_vlan_brief, "output")
vlan = ET.SubElement(output, "vlan")
vlan_id = ET.SubElement(vlan, "vlan-id")
vlan_id.text = kwargs.pop('v... | def get_vlan_brief_output_vlan_vlan_id(self, **kwargs) | Auto Generated Code | 1.317791 | 1.215272 | 1.084359 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
output = ET.SubElement(get_vlan_brief, "output")
vlan = ET.SubElement(output, "vlan")
vlan_id_key = ET.SubElement(vlan, "vlan-id")
vlan_id_key.text = kwarg... | def get_vlan_brief_output_vlan_vlan_type(self, **kwargs) | Auto Generated Code | 1.286909 | 1.196429 | 1.075625 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
output = ET.SubElement(get_vlan_brief, "output")
vlan = ET.SubElement(output, "vlan")
vlan_id_key = ET.SubElement(vlan, "vlan-id")
vlan_id_key.text = kwarg... | def get_vlan_brief_output_vlan_vlan_name(self, **kwargs) | Auto Generated Code | 1.289506 | 1.19852 | 1.075915 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
output = ET.SubElement(get_vlan_brief, "output")
vlan = ET.SubElement(output, "vlan")
vlan_id_key = ET.SubElement(vlan, "vlan-id")
vlan_id_key.text = kwarg... | def get_vlan_brief_output_vlan_vlan_state(self, **kwargs) | Auto Generated Code | 1.261344 | 1.177205 | 1.071474 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
output = ET.SubElement(get_vlan_brief, "output")
vlan = ET.SubElement(output, "vlan")
vlan_id_key = ET.SubElement(vlan, "vlan-id")
vlan_id_key.text = kwarg... | def get_vlan_brief_output_vlan_interface_interface_type(self, **kwargs) | Auto Generated Code | 1.240699 | 1.176407 | 1.054652 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
output = ET.SubElement(get_vlan_brief, "output")
vlan = ET.SubElement(output, "vlan")
vlan_id_key = ET.SubElement(vlan, "vlan-id")
vlan_id_key.text = kwarg... | def get_vlan_brief_output_vlan_interface_interface_name(self, **kwargs) | Auto Generated Code | 1.254886 | 1.190733 | 1.053877 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
output = ET.SubElement(get_vlan_brief, "output")
vlan = ET.SubElement(output, "vlan")
vlan_id_key = ET.SubElement(vlan, "vlan-id")
vlan_id_key.text = kwarg... | def get_vlan_brief_output_vlan_interface_tag(self, **kwargs) | Auto Generated Code | 1.266183 | 1.191589 | 1.0626 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
output = ET.SubElement(get_vlan_brief, "output")
vlan = ET.SubElement(output, "vlan")
vlan_id_key = ET.SubElement(vlan, "vlan-id")
vlan_id_key.text = kwarg... | def get_vlan_brief_output_vlan_interface_classification_classification_type(self, **kwargs) | Auto Generated Code | 1.252712 | 1.21056 | 1.034821 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
output = ET.SubElement(get_vlan_brief, "output")
vlan = ET.SubElement(output, "vlan")
vlan_id_key = ET.SubElement(vlan, "vlan-id")
vlan_id_key.text = kwarg... | def get_vlan_brief_output_vlan_interface_classification_classification_value(self, **kwargs) | Auto Generated Code | 1.221586 | 1.182188 | 1.033326 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
output = ET.SubElement(get_vlan_brief, "output")
last_vlan_id = ET.SubElement(output, "last-vlan-id")
last_vlan_id.text = kwargs.pop('last_vlan_id')
callb... | def get_vlan_brief_output_last_vlan_id(self, **kwargs) | Auto Generated Code | 1.365075 | 1.233806 | 1.106394 |
config = ET.Element("config")
get_vlan_brief = ET.Element("get_vlan_brief")
config = get_vlan_brief
output = ET.SubElement(get_vlan_brief, "output")
has_more = ET.SubElement(output, "has-more")
has_more.text = kwargs.pop('has_more')
callback = kwargs.pop... | def get_vlan_brief_output_has_more(self, **kwargs) | Auto Generated Code | 1.432502 | 1.247571 | 1.148233 |
config = ET.Element("config")
get_interface_switchport = ET.Element("get_interface_switchport")
config = get_interface_switchport
output = ET.SubElement(get_interface_switchport, "output")
switchport = ET.SubElement(output, "switchport")
interface_name_key = ET.S... | def get_interface_switchport_output_switchport_interface_type(self, **kwargs) | Auto Generated Code | 1.291842 | 1.241688 | 1.040391 |
config = ET.Element("config")
get_interface_switchport = ET.Element("get_interface_switchport")
config = get_interface_switchport
output = ET.SubElement(get_interface_switchport, "output")
switchport = ET.SubElement(output, "switchport")
interface_type_key = ET.S... | def get_interface_switchport_output_switchport_interface_name(self, **kwargs) | Auto Generated Code | 1.31738 | 1.253142 | 1.051262 |
config = ET.Element("config")
get_interface_switchport = ET.Element("get_interface_switchport")
config = get_interface_switchport
output = ET.SubElement(get_interface_switchport, "output")
switchport = ET.SubElement(output, "switchport")
interface_type_key = ET.S... | def get_interface_switchport_output_switchport_mode(self, **kwargs) | Auto Generated Code | 1.313381 | 1.250795 | 1.050037 |
config = ET.Element("config")
get_interface_switchport = ET.Element("get_interface_switchport")
config = get_interface_switchport
output = ET.SubElement(get_interface_switchport, "output")
switchport = ET.SubElement(output, "switchport")
interface_type_key = ET.S... | def get_interface_switchport_output_switchport_fcoe_port_enabled(self, **kwargs) | Auto Generated Code | 1.292615 | 1.241033 | 1.041564 |
config = ET.Element("config")
get_interface_switchport = ET.Element("get_interface_switchport")
config = get_interface_switchport
output = ET.SubElement(get_interface_switchport, "output")
switchport = ET.SubElement(output, "switchport")
interface_type_key = ET.S... | def get_interface_switchport_output_switchport_ingress_filter_enabled(self, **kwargs) | Auto Generated Code | 1.305558 | 1.242226 | 1.050983 |
config = ET.Element("config")
get_interface_switchport = ET.Element("get_interface_switchport")
config = get_interface_switchport
output = ET.SubElement(get_interface_switchport, "output")
switchport = ET.SubElement(output, "switchport")
interface_type_key = ET.S... | def get_interface_switchport_output_switchport_acceptable_frame_type(self, **kwargs) | Auto Generated Code | 1.290144 | 1.251819 | 1.030616 |
config = ET.Element("config")
get_interface_switchport = ET.Element("get_interface_switchport")
config = get_interface_switchport
output = ET.SubElement(get_interface_switchport, "output")
switchport = ET.SubElement(output, "switchport")
interface_type_key = ET.S... | def get_interface_switchport_output_switchport_default_vlan(self, **kwargs) | Auto Generated Code | 1.302198 | 1.237959 | 1.051891 |
config = ET.Element("config")
get_ip_interface = ET.Element("get_ip_interface")
config = get_ip_interface
input = ET.SubElement(get_ip_interface, "input")
request_type = ET.SubElement(input, "request-type")
get_request = ET.SubElement(request_type, "get-request")... | def get_ip_interface_input_request_type_get_request_interface_type(self, **kwargs) | Auto Generated Code | 1.299881 | 1.25322 | 1.037233 |
config = ET.Element("config")
get_ip_interface = ET.Element("get_ip_interface")
config = get_ip_interface
input = ET.SubElement(get_ip_interface, "input")
request_type = ET.SubElement(input, "request-type")
get_request = ET.SubElement(request_type, "get-request")... | def get_ip_interface_input_request_type_get_request_interface_name(self, **kwargs) | Auto Generated Code | 1.279306 | 1.23625 | 1.034828 |
config = ET.Element("config")
get_ip_interface = ET.Element("get_ip_interface")
config = get_ip_interface
input = ET.SubElement(get_ip_interface, "input")
request_type = ET.SubElement(input, "request-type")
get_request = ET.SubElement(request_type, "get-request")... | def get_ip_interface_input_request_type_get_request_rbridge_id(self, **kwargs) | Auto Generated Code | 1.255408 | 1.217626 | 1.031029 |
config = ET.Element("config")
get_ip_interface = ET.Element("get_ip_interface")
config = get_ip_interface
output = ET.SubElement(get_ip_interface, "output")
interface = ET.SubElement(output, "interface")
interface_name_key = ET.SubElement(interface, "interface-na... | def get_ip_interface_output_interface_interface_type(self, **kwargs) | Auto Generated Code | 1.265897 | 1.204048 | 1.051368 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.