hexsha
string
size
int64
ext
string
lang
string
max_stars_repo_path
string
max_stars_repo_name
string
max_stars_repo_head_hexsha
string
max_stars_repo_licenses
list
max_stars_count
int64
max_stars_repo_stars_event_min_datetime
string
max_stars_repo_stars_event_max_datetime
string
max_issues_repo_path
string
max_issues_repo_name
string
max_issues_repo_head_hexsha
string
max_issues_repo_licenses
list
max_issues_count
int64
max_issues_repo_issues_event_min_datetime
string
max_issues_repo_issues_event_max_datetime
string
max_forks_repo_path
string
max_forks_repo_name
string
max_forks_repo_head_hexsha
string
max_forks_repo_licenses
list
max_forks_count
int64
max_forks_repo_forks_event_min_datetime
string
max_forks_repo_forks_event_max_datetime
string
content
string
avg_line_length
float64
max_line_length
int64
alphanum_fraction
float64
qsc_code_num_words_quality_signal
int64
qsc_code_num_chars_quality_signal
float64
qsc_code_mean_word_length_quality_signal
float64
qsc_code_frac_words_unique_quality_signal
float64
qsc_code_frac_chars_top_2grams_quality_signal
float64
qsc_code_frac_chars_top_3grams_quality_signal
float64
qsc_code_frac_chars_top_4grams_quality_signal
float64
qsc_code_frac_chars_dupe_5grams_quality_signal
float64
qsc_code_frac_chars_dupe_6grams_quality_signal
float64
qsc_code_frac_chars_dupe_7grams_quality_signal
float64
qsc_code_frac_chars_dupe_8grams_quality_signal
float64
qsc_code_frac_chars_dupe_9grams_quality_signal
float64
qsc_code_frac_chars_dupe_10grams_quality_signal
float64
qsc_code_frac_chars_replacement_symbols_quality_signal
float64
qsc_code_frac_chars_digital_quality_signal
float64
qsc_code_frac_chars_whitespace_quality_signal
float64
qsc_code_size_file_byte_quality_signal
float64
qsc_code_num_lines_quality_signal
float64
qsc_code_num_chars_line_max_quality_signal
float64
qsc_code_num_chars_line_mean_quality_signal
float64
qsc_code_frac_chars_alphabet_quality_signal
float64
qsc_code_frac_chars_comments_quality_signal
float64
qsc_code_cate_xml_start_quality_signal
float64
qsc_code_frac_lines_dupe_lines_quality_signal
float64
qsc_code_cate_autogen_quality_signal
float64
qsc_code_frac_lines_long_string_quality_signal
float64
qsc_code_frac_chars_string_length_quality_signal
float64
qsc_code_frac_chars_long_word_length_quality_signal
float64
qsc_code_frac_lines_string_concat_quality_signal
float64
qsc_code_cate_encoded_data_quality_signal
float64
qsc_code_frac_chars_hex_words_quality_signal
float64
qsc_code_frac_lines_prompt_comments_quality_signal
float64
qsc_code_frac_lines_assert_quality_signal
float64
qsc_codepython_cate_ast_quality_signal
float64
qsc_codepython_frac_lines_func_ratio_quality_signal
float64
qsc_codepython_cate_var_zero_quality_signal
bool
qsc_codepython_frac_lines_pass_quality_signal
float64
qsc_codepython_frac_lines_import_quality_signal
float64
qsc_codepython_frac_lines_simplefunc_quality_signal
float64
qsc_codepython_score_lines_no_logic_quality_signal
float64
qsc_codepython_frac_lines_print_quality_signal
float64
qsc_code_num_words
int64
qsc_code_num_chars
int64
qsc_code_mean_word_length
int64
qsc_code_frac_words_unique
null
qsc_code_frac_chars_top_2grams
int64
qsc_code_frac_chars_top_3grams
int64
qsc_code_frac_chars_top_4grams
int64
qsc_code_frac_chars_dupe_5grams
int64
qsc_code_frac_chars_dupe_6grams
int64
qsc_code_frac_chars_dupe_7grams
int64
qsc_code_frac_chars_dupe_8grams
int64
qsc_code_frac_chars_dupe_9grams
int64
qsc_code_frac_chars_dupe_10grams
int64
qsc_code_frac_chars_replacement_symbols
int64
qsc_code_frac_chars_digital
int64
qsc_code_frac_chars_whitespace
int64
qsc_code_size_file_byte
int64
qsc_code_num_lines
int64
qsc_code_num_chars_line_max
int64
qsc_code_num_chars_line_mean
int64
qsc_code_frac_chars_alphabet
int64
qsc_code_frac_chars_comments
int64
qsc_code_cate_xml_start
int64
qsc_code_frac_lines_dupe_lines
int64
qsc_code_cate_autogen
int64
qsc_code_frac_lines_long_string
int64
qsc_code_frac_chars_string_length
int64
qsc_code_frac_chars_long_word_length
int64
qsc_code_frac_lines_string_concat
null
qsc_code_cate_encoded_data
int64
qsc_code_frac_chars_hex_words
int64
qsc_code_frac_lines_prompt_comments
int64
qsc_code_frac_lines_assert
int64
qsc_codepython_cate_ast
int64
qsc_codepython_frac_lines_func_ratio
int64
qsc_codepython_cate_var_zero
int64
qsc_codepython_frac_lines_pass
int64
qsc_codepython_frac_lines_import
int64
qsc_codepython_frac_lines_simplefunc
int64
qsc_codepython_score_lines_no_logic
int64
qsc_codepython_frac_lines_print
int64
effective
string
hits
int64
4a1a3c645379c8c98ed9e7f98e3f57571c58250b
80,089
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/vport.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/vport.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/vport.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files from typing import List, Any, Union class Vport(Base): """This is the virtual port hierarchy, which is used to configure IxNetwork. The Vport class encapsulates a list of vport resources that are managed by the user. A list of resources can be retrieved from the server using the Vport.find() method. The list can be managed by using the Vport.add() and Vport.remove() methods. """ __slots__ = () _SDM_NAME = 'vport' _SDM_ATT_MAP = { 'ActualSpeed': 'actualSpeed', 'AdminMode': 'adminMode', 'AssignedTo': 'assignedTo', 'AssignedToDisplayName': 'assignedToDisplayName', 'CaptureSupported': 'captureSupported', 'ConnectedTo': 'connectedTo', 'ConnectionInfo': 'connectionInfo', 'ConnectionState': 'connectionState', 'ConnectionStatus': 'connectionStatus', 'ConnectionStatusDisplayName': 'connectionStatusDisplayName', 'DpdkPerformanceAcceleration': 'dpdkPerformanceAcceleration', 'InternalId': 'internalId', 'IsAvailable': 'isAvailable', 'IsConnected': 'isConnected', 'IsFramePreemptionSupported': 'isFramePreemptionSupported', 'IsMapped': 'isMapped', 'IsPullOnly': 'isPullOnly', 'IsVMPort': 'isVMPort', 'IxnChassisVersion': 'ixnChassisVersion', 'IxnClientVersion': 'ixnClientVersion', 'IxosChassisVersion': 'ixosChassisVersion', 'Licenses': 'licenses', 'Location': 'location', 'Name': 'name', 'ResourceMode': 'resourceMode', 'RxMode': 'rxMode', 'State': 'state', 'StateDetail': 'stateDetail', 'TraceEnabled': 'traceEnabled', 'TraceLevel': 'traceLevel', 'TraceTag': 'traceTag', 'TransmitIgnoreLinkStatus': 'transmitIgnoreLinkStatus', 'TxGapControlMode': 'txGapControlMode', 'TxMode': 'txMode', 'Type': 'type', 'UseGlobalSettings': 'useGlobalSettings', 'ValidTxModes': 'validTxModes', } _SDM_ENUM_MAP = { 'captureSupported': ['data', 'control', 'dataAndControl', 'none'], 'connectionState': ['assignedInUseByOther', 'assignedUnconnected', 'connectedLinkDown', 'connectedLinkUp', 'connecting', 'unassigned'], 'rxMode': ['capture', 'measure', 'captureAndMeasure', 'packetImpairment'], 'state': ['busy', 'down', 'unassigned', 'up', 'versionMismatch'], 'stateDetail': ['busy', 'cpuNotReady', 'idle', 'inActive', 'l1ConfigFailed', 'protocolsNotSupported', 'versionMismatched', 'waitingForCPUStatus'], 'traceLevel': ['kCritical', 'kDebug', 'kError', 'kInfo', 'kNote', 'kTrace', 'kWarning'], 'txGapControlMode': ['fixedMode', 'averageMode'], 'txMode': ['sequential', 'interleaved', 'sequentialCoarse', 'interleavedCoarse', 'packetImpairment'], 'type': ['ethernet', 'ethernetvm', 'ethernetFcoe', 'atm', 'pos', 'tenGigLan', 'tenGigLanFcoe', 'fortyGigLan', 'fortyGigLanFcoe', 'tenGigWan', 'tenGigWanFcoe', 'hundredGigLan', 'hundredGigLanFcoe', 'tenFortyHundredGigLan', 'tenFortyHundredGigLanFcoe', 'fc', 'ethernetImpairment', 'novusHundredGigLan', 'novusHundredGigLanFcoe', 'novusTenGigLan', 'novusTenGigLanFcoe', 'krakenFourHundredGigLan', 'krakenFourHundredGigLanFcoe', 'aresOneFourHundredGigLan', 'aresOneFourHundredGigLanFcoe', 'uhdOneHundredGigLan'], } def __init__(self, parent, list_op=False): super(Vport, self).__init__(parent, list_op) @property def Capture(self): """ Returns ------- - obj(ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.capture.capture.Capture): An instance of the Capture class Raises ------ - ServerError: The server has encountered an uncategorized error condition """ from ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.capture.capture import Capture if self._properties.get('Capture', None) is not None: return self._properties.get('Capture') else: return Capture(self)._select() @property def DiscoveredNeighbor(self): """ Returns ------- - obj(ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.discoveredneighbor.discoveredneighbor.DiscoveredNeighbor): An instance of the DiscoveredNeighbor class Raises ------ - ServerError: The server has encountered an uncategorized error condition """ from ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.discoveredneighbor.discoveredneighbor import DiscoveredNeighbor if self._properties.get('DiscoveredNeighbor', None) is not None: return self._properties.get('DiscoveredNeighbor') else: return DiscoveredNeighbor(self) @property def Interface(self): """ Returns ------- - obj(ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.interface.interface.Interface): An instance of the Interface class Raises ------ - ServerError: The server has encountered an uncategorized error condition """ from ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.interface.interface import Interface if self._properties.get('Interface', None) is not None: return self._properties.get('Interface') else: return Interface(self) @property def InterfaceDiscoveredAddress(self): """ Returns ------- - obj(ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.interfacediscoveredaddress.interfacediscoveredaddress.InterfaceDiscoveredAddress): An instance of the InterfaceDiscoveredAddress class Raises ------ - ServerError: The server has encountered an uncategorized error condition """ from ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.interfacediscoveredaddress.interfacediscoveredaddress import InterfaceDiscoveredAddress if self._properties.get('InterfaceDiscoveredAddress', None) is not None: return self._properties.get('InterfaceDiscoveredAddress') else: return InterfaceDiscoveredAddress(self)._select() @property def L1Config(self): """ Returns ------- - obj(ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.l1config.l1config.L1Config): An instance of the L1Config class Raises ------ - ServerError: The server has encountered an uncategorized error condition """ from ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.l1config.l1config import L1Config if self._properties.get('L1Config', None) is not None: return self._properties.get('L1Config') else: return L1Config(self)._select() @property def ProtocolStack(self): """ Returns ------- - obj(ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.protocolstack.protocolstack.ProtocolStack): An instance of the ProtocolStack class Raises ------ - ServerError: The server has encountered an uncategorized error condition """ from ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.protocolstack.protocolstack import ProtocolStack if self._properties.get('ProtocolStack', None) is not None: return self._properties.get('ProtocolStack') else: return ProtocolStack(self)._select() @property def Protocols(self): """ Returns ------- - obj(ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.protocols.protocols.Protocols): An instance of the Protocols class Raises ------ - ServerError: The server has encountered an uncategorized error condition """ from ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.protocols.protocols import Protocols if self._properties.get('Protocols', None) is not None: return self._properties.get('Protocols') else: return Protocols(self) @property def RateControlParameters(self): """ Returns ------- - obj(ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.ratecontrolparameters.ratecontrolparameters.RateControlParameters): An instance of the RateControlParameters class Raises ------ - ServerError: The server has encountered an uncategorized error condition """ from ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.ratecontrolparameters.ratecontrolparameters import RateControlParameters if self._properties.get('RateControlParameters', None) is not None: return self._properties.get('RateControlParameters') else: return RateControlParameters(self)._select() @property def TapSettings(self): """ Returns ------- - obj(ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.tapsettings.tapsettings.TapSettings): An instance of the TapSettings class Raises ------ - ServerError: The server has encountered an uncategorized error condition """ from ixnetwork_restpy.testplatform.sessions.ixnetwork.vport.tapsettings.tapsettings import TapSettings if self._properties.get('TapSettings', None) is not None: return self._properties.get('TapSettings') else: return TapSettings(self) @property def ActualSpeed(self): # type: () -> int """ Returns ------- - number: The actual speed. """ return self._get_attribute(self._SDM_ATT_MAP['ActualSpeed']) @property def AdminMode(self): # type: () -> str """ Returns ------- - str: """ return self._get_attribute(self._SDM_ATT_MAP['AdminMode']) @property def AssignedTo(self): # type: () -> str """DEPRECATED Returns ------- - str: (Read Only) A new port is assigned with this option. """ return self._get_attribute(self._SDM_ATT_MAP['AssignedTo']) @property def AssignedToDisplayName(self): # type: () -> str """ Returns ------- - str: """ return self._get_attribute(self._SDM_ATT_MAP['AssignedToDisplayName']) @property def CaptureSupported(self): # type: () -> str """ Returns ------- - str(data | control | dataAndControl | none): """ return self._get_attribute(self._SDM_ATT_MAP['CaptureSupported']) @property def ConnectedTo(self): # type: () -> str """DEPRECATED Returns ------- - str(None | /api/v1/sessions/1/ixnetwork/availableHardware/.../port): The physical port to which the unassigned port is assigned. """ return self._get_attribute(self._SDM_ATT_MAP['ConnectedTo']) @ConnectedTo.setter def ConnectedTo(self, value): # type: (str) -> None self._set_attribute(self._SDM_ATT_MAP['ConnectedTo'], value) @property def ConnectionInfo(self): # type: () -> str """ Returns ------- - str: Detailed information about location of the physical port that is assigned to this port configuration. """ return self._get_attribute(self._SDM_ATT_MAP['ConnectionInfo']) @property def ConnectionState(self): # type: () -> str """ Returns ------- - str(assignedInUseByOther | assignedUnconnected | connectedLinkDown | connectedLinkUp | connecting | unassigned): Consolidated state of the vport. This combines the connection state with link state. """ return self._get_attribute(self._SDM_ATT_MAP['ConnectionState']) @property def ConnectionStatus(self): # type: () -> str """ Returns ------- - str: A string describing the status of the hardware connected to this vport """ return self._get_attribute(self._SDM_ATT_MAP['ConnectionStatus']) @property def ConnectionStatusDisplayName(self): # type: () -> str """ Returns ------- - str: """ return self._get_attribute(self._SDM_ATT_MAP['ConnectionStatusDisplayName']) @property def DpdkPerformanceAcceleration(self): # type: () -> str """ Returns ------- - str: """ return self._get_attribute(self._SDM_ATT_MAP['DpdkPerformanceAcceleration']) @property def InternalId(self): # type: () -> int """ Returns ------- - number: For internal use. """ return self._get_attribute(self._SDM_ATT_MAP['InternalId']) @property def IsAvailable(self): # type: () -> bool """ Returns ------- - bool: If true, this virtual port is available for assigning to a physical port. """ return self._get_attribute(self._SDM_ATT_MAP['IsAvailable']) @property def IsConnected(self): # type: () -> bool """ Returns ------- - bool: If true, indicates that the port is connected. """ return self._get_attribute(self._SDM_ATT_MAP['IsConnected']) @property def IsFramePreemptionSupported(self): # type: () -> bool """ Returns ------- - bool: """ return self._get_attribute(self._SDM_ATT_MAP['IsFramePreemptionSupported']) @property def IsMapped(self): # type: () -> bool """ Returns ------- - bool: If true, this virtual port is mapped. """ return self._get_attribute(self._SDM_ATT_MAP['IsMapped']) @property def IsPullOnly(self): # type: () -> bool """ Returns ------- - bool: (This action only affects assigned ports.) This action will temporarily set the port as an Unassigned Port. This function is used to pull the configuration set by a Tcl script or an IxExplorer port file into the IxNetwork configuration. """ return self._get_attribute(self._SDM_ATT_MAP['IsPullOnly']) @IsPullOnly.setter def IsPullOnly(self, value): # type: (bool) -> None self._set_attribute(self._SDM_ATT_MAP['IsPullOnly'], value) @property def IsVMPort(self): # type: () -> bool """ Returns ------- - bool: If true the hardware connected to this vport is a virtual machine port """ return self._get_attribute(self._SDM_ATT_MAP['IsVMPort']) @property def IxnChassisVersion(self): # type: () -> str """ Returns ------- - str: (Read Only) If true, the installer installs the same resources as installed by the IxNetwork Full installer/IxNetwork Chassis installer on chassis. """ return self._get_attribute(self._SDM_ATT_MAP['IxnChassisVersion']) @property def IxnClientVersion(self): # type: () -> str """ Returns ------- - str: (Read Only) If true, this installs full client side IxNetwork or IxNetwork-FT components. """ return self._get_attribute(self._SDM_ATT_MAP['IxnClientVersion']) @property def IxosChassisVersion(self): # type: () -> str """ Returns ------- - str: (Read Only) If true, the installer installs the same resources as installed by IxOS on a chassis. """ return self._get_attribute(self._SDM_ATT_MAP['IxosChassisVersion']) @property def Licenses(self): # type: () -> str """ Returns ------- - str: Number of licenses. """ return self._get_attribute(self._SDM_ATT_MAP['Licenses']) @property def Location(self): # type: () -> str """ Returns ------- - str: The current format is {chassisIp}/{frontPanelPort}.{fanoutPort} or {chassisIp};{cardId};{portId} for legacy systems. """ return self._get_attribute(self._SDM_ATT_MAP['Location']) @Location.setter def Location(self, value): # type: (str) -> None self._set_attribute(self._SDM_ATT_MAP['Location'], value) @property def Name(self): # type: () -> str """ Returns ------- - str: The description of the port: (1) For an assigned port, the format is: (Port type) (card no.): (port no.) - (chassis name or IP). (2) For an (unassigned) port configuration, the format is: (Port type) Port 00x. """ return self._get_attribute(self._SDM_ATT_MAP['Name']) @Name.setter def Name(self, value): # type: (str) -> None self._set_attribute(self._SDM_ATT_MAP['Name'], value) @property def ResourceMode(self): # type: () -> str """ Returns ------- - str: """ return self._get_attribute(self._SDM_ATT_MAP['ResourceMode']) @property def RxMode(self): # type: () -> str """ Returns ------- - str(capture | measure | captureAndMeasure | packetImpairment): The receive mode of the virtual port. """ return self._get_attribute(self._SDM_ATT_MAP['RxMode']) @RxMode.setter def RxMode(self, value): # type: (str) -> None self._set_attribute(self._SDM_ATT_MAP['RxMode'], value) @property def State(self): # type: () -> str """DEPRECATED Returns ------- - str(busy | down | unassigned | up | versionMismatch): The virtual port state. """ return self._get_attribute(self._SDM_ATT_MAP['State']) @property def StateDetail(self): # type: () -> str """DEPRECATED Returns ------- - str(busy | cpuNotReady | idle | inActive | l1ConfigFailed | protocolsNotSupported | versionMismatched | waitingForCPUStatus): This attribute describes the state of the port. """ return self._get_attribute(self._SDM_ATT_MAP['StateDetail']) @property def TraceEnabled(self): # type: () -> bool """ Returns ------- - bool: Enables/Disables rpf port trace for this port """ return self._get_attribute(self._SDM_ATT_MAP['TraceEnabled']) @TraceEnabled.setter def TraceEnabled(self, value): # type: (bool) -> None self._set_attribute(self._SDM_ATT_MAP['TraceEnabled'], value) @property def TraceLevel(self): # type: () -> str """ Returns ------- - str(kCritical | kDebug | kError | kInfo | kNote | kTrace | kWarning): PCPU Trace level """ return self._get_attribute(self._SDM_ATT_MAP['TraceLevel']) @TraceLevel.setter def TraceLevel(self, value): # type: (str) -> None self._set_attribute(self._SDM_ATT_MAP['TraceLevel'], value) @property def TraceTag(self): # type: () -> str """ Returns ------- - str: PCPU Trace Tag """ return self._get_attribute(self._SDM_ATT_MAP['TraceTag']) @TraceTag.setter def TraceTag(self, value): # type: (str) -> None self._set_attribute(self._SDM_ATT_MAP['TraceTag'], value) @property def TransmitIgnoreLinkStatus(self): # type: () -> bool """ Returns ------- - bool: If true, the port ingores the link status when transmitting data. """ return self._get_attribute(self._SDM_ATT_MAP['TransmitIgnoreLinkStatus']) @TransmitIgnoreLinkStatus.setter def TransmitIgnoreLinkStatus(self, value): # type: (bool) -> None self._set_attribute(self._SDM_ATT_MAP['TransmitIgnoreLinkStatus'], value) @property def TxGapControlMode(self): # type: () -> str """ Returns ------- - str(fixedMode | averageMode): This object controls the Gap Control mode of the port. """ return self._get_attribute(self._SDM_ATT_MAP['TxGapControlMode']) @TxGapControlMode.setter def TxGapControlMode(self, value): # type: (str) -> None self._set_attribute(self._SDM_ATT_MAP['TxGapControlMode'], value) @property def TxMode(self): # type: () -> str """ Returns ------- - str(sequential | interleaved | sequentialCoarse | interleavedCoarse | packetImpairment): The transmit mode. """ return self._get_attribute(self._SDM_ATT_MAP['TxMode']) @TxMode.setter def TxMode(self, value): # type: (str) -> None self._set_attribute(self._SDM_ATT_MAP['TxMode'], value) @property def Type(self): # type: () -> str """ Returns ------- - str(ethernet | ethernetvm | ethernetFcoe | atm | pos | tenGigLan | tenGigLanFcoe | fortyGigLan | fortyGigLanFcoe | tenGigWan | tenGigWanFcoe | hundredGigLan | hundredGigLanFcoe | tenFortyHundredGigLan | tenFortyHundredGigLanFcoe | fc | ethernetImpairment | novusHundredGigLan | novusHundredGigLanFcoe | novusTenGigLan | novusTenGigLanFcoe | krakenFourHundredGigLan | krakenFourHundredGigLanFcoe | aresOneFourHundredGigLan | aresOneFourHundredGigLanFcoe | uhdOneHundredGigLan): The type of port selection. """ return self._get_attribute(self._SDM_ATT_MAP['Type']) @Type.setter def Type(self, value): # type: (str) -> None self._set_attribute(self._SDM_ATT_MAP['Type'], value) @property def UseGlobalSettings(self): # type: () -> bool """ Returns ------- - bool: Enables/Disables use of global settings instead of local settings on port """ return self._get_attribute(self._SDM_ATT_MAP['UseGlobalSettings']) @UseGlobalSettings.setter def UseGlobalSettings(self, value): # type: (bool) -> None self._set_attribute(self._SDM_ATT_MAP['UseGlobalSettings'], value) @property def ValidTxModes(self): # type: () -> List[str] """ Returns ------- - list(str[interleaved | interleavedCoarse | packetImpairment | sequential | sequentialCoarse]): """ return self._get_attribute(self._SDM_ATT_MAP['ValidTxModes']) def update(self, ConnectedTo=None, IsPullOnly=None, Location=None, Name=None, RxMode=None, TraceEnabled=None, TraceLevel=None, TraceTag=None, TransmitIgnoreLinkStatus=None, TxGapControlMode=None, TxMode=None, Type=None, UseGlobalSettings=None): # type: (str, bool, str, str, str, bool, str, str, bool, str, str, str, bool) -> Vport """Updates vport resource on the server. Args ---- - ConnectedTo (str(None | /api/v1/sessions/1/ixnetwork/availableHardware/.../port)): The physical port to which the unassigned port is assigned. - IsPullOnly (bool): (This action only affects assigned ports.) This action will temporarily set the port as an Unassigned Port. This function is used to pull the configuration set by a Tcl script or an IxExplorer port file into the IxNetwork configuration. - Location (str): The current format is {chassisIp}/{frontPanelPort}.{fanoutPort} or {chassisIp};{cardId};{portId} for legacy systems. - Name (str): The description of the port: (1) For an assigned port, the format is: (Port type) (card no.): (port no.) - (chassis name or IP). (2) For an (unassigned) port configuration, the format is: (Port type) Port 00x. - RxMode (str(capture | measure | captureAndMeasure | packetImpairment)): The receive mode of the virtual port. - TraceEnabled (bool): Enables/Disables rpf port trace for this port - TraceLevel (str(kCritical | kDebug | kError | kInfo | kNote | kTrace | kWarning)): PCPU Trace level - TraceTag (str): PCPU Trace Tag - TransmitIgnoreLinkStatus (bool): If true, the port ingores the link status when transmitting data. - TxGapControlMode (str(fixedMode | averageMode)): This object controls the Gap Control mode of the port. - TxMode (str(sequential | interleaved | sequentialCoarse | interleavedCoarse | packetImpairment)): The transmit mode. - Type (str(ethernet | ethernetvm | ethernetFcoe | atm | pos | tenGigLan | tenGigLanFcoe | fortyGigLan | fortyGigLanFcoe | tenGigWan | tenGigWanFcoe | hundredGigLan | hundredGigLanFcoe | tenFortyHundredGigLan | tenFortyHundredGigLanFcoe | fc | ethernetImpairment | novusHundredGigLan | novusHundredGigLanFcoe | novusTenGigLan | novusTenGigLanFcoe | krakenFourHundredGigLan | krakenFourHundredGigLanFcoe | aresOneFourHundredGigLan | aresOneFourHundredGigLanFcoe | uhdOneHundredGigLan)): The type of port selection. - UseGlobalSettings (bool): Enables/Disables use of global settings instead of local settings on port Raises ------ - ServerError: The server has encountered an uncategorized error condition """ return self._update(self._map_locals(self._SDM_ATT_MAP, locals())) def add(self, ConnectedTo=None, IsPullOnly=None, Location=None, Name=None, RxMode=None, TraceEnabled=None, TraceLevel=None, TraceTag=None, TransmitIgnoreLinkStatus=None, TxGapControlMode=None, TxMode=None, Type=None, UseGlobalSettings=None): # type: (str, bool, str, str, str, bool, str, str, bool, str, str, str, bool) -> Vport """Adds a new vport resource on the server and adds it to the container. Args ---- - ConnectedTo (str(None | /api/v1/sessions/1/ixnetwork/availableHardware/.../port)): The physical port to which the unassigned port is assigned. - IsPullOnly (bool): (This action only affects assigned ports.) This action will temporarily set the port as an Unassigned Port. This function is used to pull the configuration set by a Tcl script or an IxExplorer port file into the IxNetwork configuration. - Location (str): The current format is {chassisIp}/{frontPanelPort}.{fanoutPort} or {chassisIp};{cardId};{portId} for legacy systems. - Name (str): The description of the port: (1) For an assigned port, the format is: (Port type) (card no.): (port no.) - (chassis name or IP). (2) For an (unassigned) port configuration, the format is: (Port type) Port 00x. - RxMode (str(capture | measure | captureAndMeasure | packetImpairment)): The receive mode of the virtual port. - TraceEnabled (bool): Enables/Disables rpf port trace for this port - TraceLevel (str(kCritical | kDebug | kError | kInfo | kNote | kTrace | kWarning)): PCPU Trace level - TraceTag (str): PCPU Trace Tag - TransmitIgnoreLinkStatus (bool): If true, the port ingores the link status when transmitting data. - TxGapControlMode (str(fixedMode | averageMode)): This object controls the Gap Control mode of the port. - TxMode (str(sequential | interleaved | sequentialCoarse | interleavedCoarse | packetImpairment)): The transmit mode. - Type (str(ethernet | ethernetvm | ethernetFcoe | atm | pos | tenGigLan | tenGigLanFcoe | fortyGigLan | fortyGigLanFcoe | tenGigWan | tenGigWanFcoe | hundredGigLan | hundredGigLanFcoe | tenFortyHundredGigLan | tenFortyHundredGigLanFcoe | fc | ethernetImpairment | novusHundredGigLan | novusHundredGigLanFcoe | novusTenGigLan | novusTenGigLanFcoe | krakenFourHundredGigLan | krakenFourHundredGigLanFcoe | aresOneFourHundredGigLan | aresOneFourHundredGigLanFcoe | uhdOneHundredGigLan)): The type of port selection. - UseGlobalSettings (bool): Enables/Disables use of global settings instead of local settings on port Returns ------- - self: This instance with all currently retrieved vport resources using find and the newly added vport resources available through an iterator or index Raises ------ - ServerError: The server has encountered an uncategorized error condition """ return self._create(self._map_locals(self._SDM_ATT_MAP, locals())) def remove(self): """Deletes all the contained vport resources in this instance from the server. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ self._delete() def find(self, ActualSpeed=None, AdminMode=None, AssignedTo=None, AssignedToDisplayName=None, CaptureSupported=None, ConnectedTo=None, ConnectionInfo=None, ConnectionState=None, ConnectionStatus=None, ConnectionStatusDisplayName=None, DpdkPerformanceAcceleration=None, InternalId=None, IsAvailable=None, IsConnected=None, IsFramePreemptionSupported=None, IsMapped=None, IsPullOnly=None, IsVMPort=None, IxnChassisVersion=None, IxnClientVersion=None, IxosChassisVersion=None, Licenses=None, Location=None, Name=None, ResourceMode=None, RxMode=None, State=None, StateDetail=None, TraceEnabled=None, TraceLevel=None, TraceTag=None, TransmitIgnoreLinkStatus=None, TxGapControlMode=None, TxMode=None, Type=None, UseGlobalSettings=None, ValidTxModes=None): # type: (int, str, str, str, str, str, str, str, str, str, str, int, bool, bool, bool, bool, bool, bool, str, str, str, str, str, str, str, str, str, str, bool, str, str, bool, str, str, str, bool, List[str]) -> Vport """Finds and retrieves vport resources from the server. All named parameters are evaluated on the server using regex. The named parameters can be used to selectively retrieve vport resources from the server. To retrieve an exact match ensure the parameter value starts with ^ and ends with $ By default the find method takes no parameters and will retrieve all vport resources from the server. Args ---- - ActualSpeed (number): The actual speed. - AdminMode (str): - AssignedTo (str): (Read Only) A new port is assigned with this option. - AssignedToDisplayName (str): - CaptureSupported (str(data | control | dataAndControl | none)): - ConnectedTo (str(None | /api/v1/sessions/1/ixnetwork/availableHardware/.../port)): The physical port to which the unassigned port is assigned. - ConnectionInfo (str): Detailed information about location of the physical port that is assigned to this port configuration. - ConnectionState (str(assignedInUseByOther | assignedUnconnected | connectedLinkDown | connectedLinkUp | connecting | unassigned)): Consolidated state of the vport. This combines the connection state with link state. - ConnectionStatus (str): A string describing the status of the hardware connected to this vport - ConnectionStatusDisplayName (str): - DpdkPerformanceAcceleration (str): - InternalId (number): For internal use. - IsAvailable (bool): If true, this virtual port is available for assigning to a physical port. - IsConnected (bool): If true, indicates that the port is connected. - IsFramePreemptionSupported (bool): - IsMapped (bool): If true, this virtual port is mapped. - IsPullOnly (bool): (This action only affects assigned ports.) This action will temporarily set the port as an Unassigned Port. This function is used to pull the configuration set by a Tcl script or an IxExplorer port file into the IxNetwork configuration. - IsVMPort (bool): If true the hardware connected to this vport is a virtual machine port - IxnChassisVersion (str): (Read Only) If true, the installer installs the same resources as installed by the IxNetwork Full installer/IxNetwork Chassis installer on chassis. - IxnClientVersion (str): (Read Only) If true, this installs full client side IxNetwork or IxNetwork-FT components. - IxosChassisVersion (str): (Read Only) If true, the installer installs the same resources as installed by IxOS on a chassis. - Licenses (str): Number of licenses. - Location (str): The current format is {chassisIp}/{frontPanelPort}.{fanoutPort} or {chassisIp};{cardId};{portId} for legacy systems. - Name (str): The description of the port: (1) For an assigned port, the format is: (Port type) (card no.): (port no.) - (chassis name or IP). (2) For an (unassigned) port configuration, the format is: (Port type) Port 00x. - ResourceMode (str): - RxMode (str(capture | measure | captureAndMeasure | packetImpairment)): The receive mode of the virtual port. - State (str(busy | down | unassigned | up | versionMismatch)): The virtual port state. - StateDetail (str(busy | cpuNotReady | idle | inActive | l1ConfigFailed | protocolsNotSupported | versionMismatched | waitingForCPUStatus)): This attribute describes the state of the port. - TraceEnabled (bool): Enables/Disables rpf port trace for this port - TraceLevel (str(kCritical | kDebug | kError | kInfo | kNote | kTrace | kWarning)): PCPU Trace level - TraceTag (str): PCPU Trace Tag - TransmitIgnoreLinkStatus (bool): If true, the port ingores the link status when transmitting data. - TxGapControlMode (str(fixedMode | averageMode)): This object controls the Gap Control mode of the port. - TxMode (str(sequential | interleaved | sequentialCoarse | interleavedCoarse | packetImpairment)): The transmit mode. - Type (str(ethernet | ethernetvm | ethernetFcoe | atm | pos | tenGigLan | tenGigLanFcoe | fortyGigLan | fortyGigLanFcoe | tenGigWan | tenGigWanFcoe | hundredGigLan | hundredGigLanFcoe | tenFortyHundredGigLan | tenFortyHundredGigLanFcoe | fc | ethernetImpairment | novusHundredGigLan | novusHundredGigLanFcoe | novusTenGigLan | novusTenGigLanFcoe | krakenFourHundredGigLan | krakenFourHundredGigLanFcoe | aresOneFourHundredGigLan | aresOneFourHundredGigLanFcoe | uhdOneHundredGigLan)): The type of port selection. - UseGlobalSettings (bool): Enables/Disables use of global settings instead of local settings on port - ValidTxModes (list(str[interleaved | interleavedCoarse | packetImpairment | sequential | sequentialCoarse])): Returns ------- - self: This instance with matching vport resources retrieved from the server available through an iterator or index Raises ------ - ServerError: The server has encountered an uncategorized error condition """ return self._select(self._map_locals(self._SDM_ATT_MAP, locals())) def read(self, href): """Retrieves a single instance of vport data from the server. Args ---- - href (str): An href to the instance to be retrieved Returns ------- - self: This instance with the vport resources from the server available through an iterator or index Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ return self._read(href) def AddQuickFlowGroups(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the addQuickFlowGroups operation on the server. Add quick flow traffic items to the configuration. addQuickFlowGroups(Arg2=number, async_operation=bool) ----------------------------------------------------- - Arg2 (number): The number of quick flow groups to add. - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('addQuickFlowGroups', payload=payload, response_object=None) def AssignPorts(self, *args, **kwargs): # type: (*Any, **Any) -> Union[List[str], None] """Executes the assignPorts operation on the server. Assign hardware ports to virtual ports using port display names. It connects all the ports in the list provided using their location attribute. It takes a bool as input which says ClearOwnership is required or not. assignPorts(Arg2=bool, async_operation=bool)list ------------------------------------------------ - Arg2 (bool): If true, it will clear ownership on the hardware ports which have location attribute set. - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. - Returns list(str[None | /api/v1/sessions/1/ixnetwork/vport]): Returns a list of virtual port object references that were successfully connected. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('assignPorts', payload=payload, response_object=None) def ClearNeighborSolicitation(self, *args, **kwargs): # type: (*Any, **Any) -> Union[bool, None] """Executes the clearNeighborSolicitation operation on the server. NOT DEFINED The IxNetwork model allows for multiple method Signatures with the same name while python does not. clearNeighborSolicitation(async_operation=bool) ----------------------------------------------- This function signature is used when there is a list of vports - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. clearNeighborSolicitation(async_operation=bool)bool --------------------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. - Returns bool: NOT DEFINED Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('clearNeighborSolicitation', payload=payload, response_object=None) def ClearNeighborTable(self, *args, **kwargs): # type: (*Any, **Any) -> Union[bool, None] """Executes the clearNeighborTable operation on the server. This exec clears the learned neighbor table for the specified vport. clearNeighborTable(async_operation=bool)bool -------------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. - Returns bool: NOT DEFINED Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self.href } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('clearNeighborTable', payload=payload, response_object=None) def ClearPortTransmitDuration(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the clearPortTransmitDuration operation on the server. Clear the port transmit duration. clearPortTransmitDuration(async_operation=bool) ----------------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('clearPortTransmitDuration', payload=payload, response_object=None) def ConnectPort(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the connectPort operation on the server. Connect a list of ports. connectPort(async_operation=bool) --------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('connectPort', payload=payload, response_object=None) def ConnectPorts(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the connectPorts operation on the server. Connect a list of ports. The IxNetwork model allows for multiple method Signatures with the same name while python does not. connectPorts(async_operation=bool) ---------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. connectPorts(Arg2=bool, async_operation=bool) --------------------------------------------- - Arg2 (bool): a boolean indicating if ownership should be taken forcefully - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('connectPorts', payload=payload, response_object=None) def CopyTapSettings(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the copyTapSettings operation on the server. It will copy the values from a port to the given ports. copyTapSettings(Arg2=list, async_operation=bool) ------------------------------------------------ - Arg2 (list(str[None | /api/v1/sessions/1/ixnetwork/vport])): - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self.href } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('copyTapSettings', payload=payload, response_object=None) def DeleteCustomDefaults(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the deleteCustomDefaults operation on the server. It will delete custom defaults for the given ports. deleteCustomDefaults(async_operation=bool) ------------------------------------------ - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('deleteCustomDefaults', payload=payload, response_object=None) def EnableOAM(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the enableOAM operation on the server. Enable/Disable OAM on a list of ports. enableOAM(Arg2=bool, async_operation=bool) ------------------------------------------ - Arg2 (bool): If true, it will enable OAM. Otherwise, it will disable OAM. - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('enableOAM', payload=payload, response_object=None) def GetTapSettings(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the getTapSettings operation on the server. Get TAP Settings for the given ports. getTapSettings(async_operation=bool) ------------------------------------ - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('getTapSettings', payload=payload, response_object=None) def IgmpJoin(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the igmpJoin operation on the server. NOT DEFINED The IxNetwork model allows for multiple method Signatures with the same name while python does not. igmpJoin(Arg2=string, async_operation=bool) ------------------------------------------- - Arg2 (str): NOT DEFINED - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. igmpJoin(Arg2=string, Arg3=number, async_operation=bool) -------------------------------------------------------- - Arg2 (str): NOT DEFINED - Arg3 (number): NOT DEFINED - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self.href } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('igmpJoin', payload=payload, response_object=None) def IgmpLeave(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the igmpLeave operation on the server. NOT DEFINED The IxNetwork model allows for multiple method Signatures with the same name while python does not. igmpLeave(Arg2=string, async_operation=bool) -------------------------------------------- - Arg2 (str): NOT DEFINED - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. igmpLeave(Arg2=string, Arg3=number, async_operation=bool) --------------------------------------------------------- - Arg2 (str): NOT DEFINED - Arg3 (number): NOT DEFINED - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self.href } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('igmpLeave', payload=payload, response_object=None) def Import(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the import operation on the server. Imports the port file (also supports legacy port files). import(Arg2=href, async_operation=bool) --------------------------------------- - Arg2 (obj(ixnetwork_restpy.files.Files)): The file to be imported. - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self.href } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('import', payload=payload, response_object=None) def LinkUpDn(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the linkUpDn operation on the server. Simulate port link up/down. linkUpDn(Arg2=enum, async_operation=bool) ----------------------------------------- - Arg2 (str(down | up)): A valid enum value as specified by the restriction. - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('linkUpDn', payload=payload, response_object=None) def PauseStatelessTraffic(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the pauseStatelessTraffic operation on the server. Pause or Resume stateless traffic. pauseStatelessTraffic(Arg2=bool, async_operation=bool) ------------------------------------------------------ - Arg2 (bool): If true, it will pause running traffic. If false, it will resume previously paused traffic. - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('pauseStatelessTraffic', payload=payload, response_object=None) def PullPort(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the pullPort operation on the server. Pulls config onto vport or group of vports. pullPort(async_operation=bool) ------------------------------ - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self.href } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('pullPort', payload=payload, response_object=None) def RefreshUnresolvedNeighbors(self, *args, **kwargs): # type: (*Any, **Any) -> Union[bool, None] """Executes the refreshUnresolvedNeighbors operation on the server. Refresh unresolved neighbours. refreshUnresolvedNeighbors(async_operation=bool)bool ---------------------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. - Returns bool: NOT DEFINED Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self.href } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('refreshUnresolvedNeighbors', payload=payload, response_object=None) def ReleaseCapturePorts(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the releaseCapturePorts operation on the server. Release capture buffer from a list of ports. releaseCapturePorts(async_operation=bool) ----------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('releaseCapturePorts', payload=payload, response_object=None) def ReleasePort(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the releasePort operation on the server. Release a hardware port. releasePort(async_operation=bool) --------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('releasePort', payload=payload, response_object=None) def ResetPortCpu(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the resetPortCpu operation on the server. Reboot port CPU. resetPortCpu(async_operation=bool) ---------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('resetPortCpu', payload=payload, response_object=None) def ResetPortCpuAndFactoryDefault(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the resetPortCpuAndFactoryDefault operation on the server. Reboots the port CPU and restores the default settings. resetPortCpuAndFactoryDefault(async_operation=bool) --------------------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('resetPortCpuAndFactoryDefault', payload=payload, response_object=None) def RestartPppNegotiation(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the restartPppNegotiation operation on the server. Restarts the PPP negotiation on the port. restartPppNegotiation(async_operation=bool) ------------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self.href } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('restartPppNegotiation', payload=payload, response_object=None) def RestoreCustomDefaults(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the restoreCustomDefaults operation on the server. It will restore custom defaults for the given ports. restoreCustomDefaults(async_operation=bool) ------------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('restoreCustomDefaults', payload=payload, response_object=None) def RestoreDefaults(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the restoreDefaults operation on the server. Restore the default values for the given ports. restoreDefaults(async_operation=bool) ------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('restoreDefaults', payload=payload, response_object=None) def SaveCustomDefaults(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the saveCustomDefaults operation on the server. It will save custom defaults for the given ports. saveCustomDefaults(async_operation=bool) ---------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('saveCustomDefaults', payload=payload, response_object=None) def SendArp(self, *args, **kwargs): # type: (*Any, **Any) -> Union[bool, None] """Executes the sendArp operation on the server. NOT DEFINED The IxNetwork model allows for multiple method Signatures with the same name while python does not. sendArp(async_operation=bool)bool --------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. - Returns bool: NOT DEFINED sendArp(Arg2=list, async_operation=bool)bool -------------------------------------------- - Arg2 (list(str[None | /api/v1/sessions/1/ixnetwork/vport/.../interface])): NOT DEFINED - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. - Returns bool: NOT DEFINED Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self.href } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('sendArp', payload=payload, response_object=None) def SendArpAll(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the sendArpAll operation on the server. NOT DEFINED sendArpAll(async_operation=bool) -------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('sendArpAll', payload=payload, response_object=None) def SendNs(self, *args, **kwargs): # type: (*Any, **Any) -> Union[bool, None] """Executes the sendNs operation on the server. NOT DEFINED The IxNetwork model allows for multiple method Signatures with the same name while python does not. sendNs(async_operation=bool)bool -------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. - Returns bool: NOT DEFINED sendNs(Arg2=list, async_operation=bool)bool ------------------------------------------- - Arg2 (list(str[None | /api/v1/sessions/1/ixnetwork/vport/.../interface])): NOT DEFINED - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. - Returns bool: NOT DEFINED Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self.href } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('sendNs', payload=payload, response_object=None) def SendNsAll(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the sendNsAll operation on the server. NOT DEFINED sendNsAll(async_operation=bool) ------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('sendNsAll', payload=payload, response_object=None) def SendRs(self, *args, **kwargs): # type: (*Any, **Any) -> Union[bool, None] """Executes the sendRs operation on the server. NOT DEFINED The IxNetwork model allows for multiple method Signatures with the same name while python does not. sendRs(async_operation=bool)bool -------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. - Returns bool: NOT DEFINED sendRs(Arg2=list, async_operation=bool)bool ------------------------------------------- - Arg2 (list(str[None | /api/v1/sessions/1/ixnetwork/vport/.../interface])): NOT DEFINED - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. - Returns bool: NOT DEFINED Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self.href } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('sendRs', payload=payload, response_object=None) def SendRsAll(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the sendRsAll operation on the server. NOT DEFINED sendRsAll(async_operation=bool) ------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('sendRsAll', payload=payload, response_object=None) def SetFactoryDefaults(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the setFactoryDefaults operation on the server. Set default values for port settings. setFactoryDefaults(async_operation=bool) ---------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('setFactoryDefaults', payload=payload, response_object=None) def SetTapSettings(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the setTapSettings operation on the server. Send TAP Settings to IxServer for the given ports. setTapSettings(async_operation=bool) ------------------------------------ - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('setTapSettings', payload=payload, response_object=None) def StartStatelessTraffic(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the startStatelessTraffic operation on the server. Start the traffic configuration for stateless traffic items only. startStatelessTraffic(async_operation=bool) ------------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('startStatelessTraffic', payload=payload, response_object=None) def StartStatelessTrafficBlocking(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the startStatelessTrafficBlocking operation on the server. Start the traffic configuration for stateless traffic items only. This will block until traffic is fully started. startStatelessTrafficBlocking(async_operation=bool) --------------------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('startStatelessTrafficBlocking', payload=payload, response_object=None) def StopStatelessTraffic(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the stopStatelessTraffic operation on the server. Stop the stateless traffic items. stopStatelessTraffic(async_operation=bool) ------------------------------------------ - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('stopStatelessTraffic', payload=payload, response_object=None) def StopStatelessTrafficBlocking(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the stopStatelessTrafficBlocking operation on the server. Stop the traffic configuration for stateless traffic items only. This will block until traffic is fully stopped. stopStatelessTrafficBlocking(async_operation=bool) -------------------------------------------------- - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('stopStatelessTrafficBlocking', payload=payload, response_object=None) def SwitchMode(self, *args, **kwargs): # type: (*Any, **Any) -> Union[str, None] """Executes the switchMode operation on the server. Switches the port mode. Takes vports as input. switchMode(Arg2=list, Arg3=bool, async_operation=bool)string ------------------------------------------------------------ - Arg2 (list(str)): List of valid Modes - Arg3 (bool): If true, it will clear ownership on the hardware ports for which mode switch is being done. - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. - Returns str: Warning Messages Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('switchMode', payload=payload, response_object=None) def UnassignPorts(self, *args, **kwargs): # type: (*Any, **Any) -> None """Executes the unassignPorts operation on the server. Unassign hardware ports. unassignPorts(Arg2=bool, async_operation=bool) ---------------------------------------------- - Arg2 (bool): If true, virtual ports will be deleted. - async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete. Raises ------ - NotFoundError: The requested resource does not exist on the server - ServerError: The server has encountered an uncategorized error condition """ payload = { "Arg1": self } for i in range(len(args)): payload['Arg%s' % (i + 2)] = args[i] for item in kwargs.items(): payload[item[0]] = item[1] return self._execute('unassignPorts', payload=payload, response_object=None)
47.672024
753
0.638465
8,747
80,089
5.787584
0.065051
0.026134
0.033423
0.024534
0.768963
0.750751
0.708103
0.700122
0.66749
0.614313
0
0.004202
0.239371
80,089
1,679
754
47.700417
0.826816
0.570478
0
0.363825
0
0
0.133153
0.033477
0
0
0
0
0
1
0.218295
false
0
0.029106
0
0.463617
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
c5961a27791a96025144f30cb3bea3252ad8990a
7,932
py
Python
src/gityaml/git_to_yaml_integration_tests.py
raboley/gityaml
1f3d9775310853fcdce442d803e811a8551bb56e
[ "MIT" ]
null
null
null
src/gityaml/git_to_yaml_integration_tests.py
raboley/gityaml
1f3d9775310853fcdce442d803e811a8551bb56e
[ "MIT" ]
null
null
null
src/gityaml/git_to_yaml_integration_tests.py
raboley/gityaml
1f3d9775310853fcdce442d803e811a8551bb56e
[ "MIT" ]
null
null
null
from gityaml.git_to_yaml import GitYaml from gityaml.gitcommit import GitCommit import os import unittest from testfixtures import TempDirectory # Test stub so tests aren't dependent on having a specific commmit class GitCommit_Test(GitCommit): def get_hash(self): return '525b2550eb10dcbab2643ebf0417c90a2afe38dc' def get_url(self): return 'https://hurontfs.visualstudio.com/products/_git/GitYaml' class git_to_yaml_integration(unittest.TestCase): def setUp(self): # Before every test create a Puppetfile.yaml file with the initial_yaml content self.d = TempDirectory() self.initial_yaml = b"""modules: nagiosmonitor_checkldap: git: hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/nagiosmonitor_checkldap ref: 59bf2d9045688a75cd22f02b9fe5493d276ab5d7 """ self.inital_path = 'Puppetfile.yaml' self.d.write(self.inital_path, self.initial_yaml) self.two_items_yaml = b"""modules: nagiosmonitor_checkldap: git: hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/nagiosmonitor_checkldap ref: 59bf2d9045688a75cd22f02b9fe5493d276ab5d7 vscode: git: hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/vscode ref: lasij34256lawengffasd89ewal3259034qjnlk """ self.two_items_path = 'two_items_Puppetfile.yaml' self.d.write(self.two_items_path, self.two_items_yaml) self.empty_file_path = 'empty_Puppetfile.yaml' self.d.write(self.empty_file_path, b'') def tearDown(self): # After every test delete everything in the temp directory self.d.cleanup() def test_read_yaml_file_to_data(self): path = os.path.join(self.d.path, self.inital_path) git_yaml = GitYaml(path) result_data = git_yaml.get_yaml_data() expected_data = { 'modules': { 'nagiosmonitor_checkldap': { 'git': 'hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/nagiosmonitor_checkldap', 'ref': '59bf2d9045688a75cd22f02b9fe5493d276ab5d7' } } } self.assertEqual(result_data, expected_data) def test_write_data_to_yaml_file(self): path = os.path.join(self.d.path, self.inital_path) git_yaml = GitYaml(path) yaml_to_write = """modules: nagiosmonitor_checkldap: git: hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/nagiosmonitor_checkldap ref: 59bf2d9045688a75cd22f02b9fe5493d276ab5d7 vscode: git: hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/vscode ref: lasij34256lawengffasd89ewal3259034qjnlk """ expected_data = { 'modules': { 'nagiosmonitor_checkldap': { 'git': 'hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/nagiosmonitor_checkldap', 'ref': '59bf2d9045688a75cd22f02b9fe5493d276ab5d7' }, 'vscode': { 'git': 'hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/vscode', 'ref': 'lasij34256lawengffasd89ewal3259034qjnlk' } } } git_yaml.write_yaml_file(path, yaml_to_write) result_data = GitYaml(path).get_yaml_data() self.assertEqual(result_data, expected_data) def test_add_new_commit_to_file(self): path = os.path.join(self.d.path, self.inital_path) git_yaml = GitYaml(path) new_commit = { 'vscode': { 'git': 'hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/vscode', 'ref': 'New_Ref_commit' } } expected_data = { 'modules': { 'nagiosmonitor_checkldap': { 'git': 'hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/nagiosmonitor_checkldap', 'ref': '59bf2d9045688a75cd22f02b9fe5493d276ab5d7' }, 'vscode': { 'git': 'hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/vscode', 'ref': 'New_Ref_commit' } } } git_yaml.add_commit_to_file(new_commit) result_data = GitYaml(path).get_yaml_data() self.assertEqual(result_data, expected_data) def test_add_commit_to_file_updates_commit_ref(self): path = os.path.join(self.d.path, self.two_items_path) git_yaml = GitYaml(path) new_commit = { 'vscode': { 'git': 'hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/vscode', 'ref': 'Updated_ref_Commit' } } expected_data = { 'modules': { 'nagiosmonitor_checkldap': { 'git': 'hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/nagiosmonitor_checkldap', 'ref': '59bf2d9045688a75cd22f02b9fe5493d276ab5d7' }, 'vscode': { 'git': 'hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/vscode', 'ref': 'Updated_ref_Commit' } } } git_yaml.add_commit_to_file(new_commit) result_data = GitYaml(path).get_yaml_data() self.assertEqual(result_data, expected_data) def test_add_commit_to_file_creates_if_blank(self): path = os.path.join(self.d.path, self.empty_file_path) git_yaml = GitYaml(path) new_commit = { 'vscode': { 'git': 'hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/vscode', 'ref': 'Updated_ref_Commit' } } expected_data = { 'modules': {'vscode': { 'git': 'hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/vscode', 'ref': 'Updated_ref_Commit' } } } git_yaml.add_commit_to_file(new_commit) result_data = GitYaml(path).get_yaml_data() self.assertEqual(result_data, expected_data) def test_add_commit_to_file_creates_file_if_doesnt_exist(self): path = os.path.join(self.d.path, 'New_Puppetfile.yaml') git_yaml = GitYaml(path) new_commit = { 'vscode': { 'git': 'hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/vscode', 'ref': 'Updated_ref_Commit' } } expected_data = { 'modules': {'vscode': { 'git': 'hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/vscode', 'ref': 'Updated_ref_Commit' } } } git_yaml.add_commit_to_file(new_commit) result_data = GitYaml(path).get_yaml_data() self.assertEqual(result_data, expected_data) def test_commit_and_file_get_created(self): path = os.path.join(self.d.path, 'integration_Puppetfile.yaml') git_yaml = GitYaml(path) git_commit = GitCommit_Test() new_commit = git_commit.new_commit_ref() expected_data = { 'modules': {'GitYaml': { 'git': 'hurontfs@vs-ssh.visualstudio.com:v3/hurontfs/Puppet-Core/GitYaml', 'ref': '525b2550eb10dcbab2643ebf0417c90a2afe38dc' } } } git_yaml.add_commit_to_file(new_commit) result_data = GitYaml(path).get_yaml_data() self.assertEqual(result_data, expected_data) if __name__ == '__main__': unittest.main()
36.552995
118
0.584342
803
7,932
5.50934
0.119552
0.067812
0.055832
0.068716
0.761302
0.761302
0.731917
0.731917
0.710669
0.696655
0
0.052796
0.314675
7,932
217
119
36.552995
0.761038
0.025088
0
0.497238
0
0.027624
0.338163
0.262743
0
0
0
0
0.038674
1
0.060773
false
0
0.027624
0.01105
0.110497
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
c5af36c821bd58d68308c8ff7a7186497398718e
18
py
Python
hello_world.py
Abdulazizsayed/profiles-rest-api
c31e2c09c88d9d8c950b61af28b36a28235b3247
[ "MIT" ]
null
null
null
hello_world.py
Abdulazizsayed/profiles-rest-api
c31e2c09c88d9d8c950b61af28b36a28235b3247
[ "MIT" ]
null
null
null
hello_world.py
Abdulazizsayed/profiles-rest-api
c31e2c09c88d9d8c950b61af28b36a28235b3247
[ "MIT" ]
null
null
null
print("mia mia!")
9
17
0.611111
3
18
3.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.111111
18
1
18
18
0.6875
0
0
0
0
0
0.444444
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
c5c4bb3deff64f843bbafbe4e2d11d2d44d6d136
87
py
Python
app/nurse/__init__.py
par3k/DatabaseSystemFinal
b577fa2a94604fa1f2217d1e0da71467fe3cb897
[ "MIT" ]
null
null
null
app/nurse/__init__.py
par3k/DatabaseSystemFinal
b577fa2a94604fa1f2217d1e0da71467fe3cb897
[ "MIT" ]
1
2019-12-27T09:32:31.000Z
2019-12-27T09:32:31.000Z
app/nurse/__init__.py
par3k/DatabaseSystemFinal
b577fa2a94604fa1f2217d1e0da71467fe3cb897
[ "MIT" ]
null
null
null
from flask import Blueprint bp_nurse = Blueprint('nurse', __name__) from . import views
29
39
0.793103
12
87
5.333333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.126437
87
3
40
29
0.842105
0
0
0
0
0
0.056818
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0.666667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
1
0
5
c5d89524169d67d39acb41427c84d5af5f891ed5
94
py
Python
autoscalingsim/scaling/policiesbuilder/metric/forecasting/models/arima/__init__.py
Remit/autoscaling-simulator
091943c0e9eedf9543e9305682a067ab60f56def
[ "MIT" ]
6
2021-03-10T16:23:10.000Z
2022-01-14T04:57:46.000Z
autoscalingsim/scaling/policiesbuilder/metric/forecasting/models/arima/__init__.py
Remit/autoscaling-simulator
091943c0e9eedf9543e9305682a067ab60f56def
[ "MIT" ]
null
null
null
autoscalingsim/scaling/policiesbuilder/metric/forecasting/models/arima/__init__.py
Remit/autoscaling-simulator
091943c0e9eedf9543e9305682a067ab60f56def
[ "MIT" ]
1
2022-01-14T04:57:55.000Z
2022-01-14T04:57:55.000Z
from . import ar from . import ma from . import arma from . import arima from . import sarima
15.666667
20
0.734043
15
94
4.6
0.466667
0.724638
0
0
0
0
0
0
0
0
0
0
0.212766
94
5
21
18.8
0.932432
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
c5f9d424949f2f98d7310f746c13fb7a93b899a1
16,103
py
Python
tests/containers/test_MetadataContainer.py
gertdekkers/dcase_util
e5b80cc98b28facad2f3fff9acba126487b19879
[ "MIT" ]
null
null
null
tests/containers/test_MetadataContainer.py
gertdekkers/dcase_util
e5b80cc98b28facad2f3fff9acba126487b19879
[ "MIT" ]
null
null
null
tests/containers/test_MetadataContainer.py
gertdekkers/dcase_util
e5b80cc98b28facad2f3fff9acba126487b19879
[ "MIT" ]
null
null
null
""" Unit tests for MetadataContainer """ import os import tempfile import numpy import nose.tools from dcase_util.containers import MetaDataContainer from dcase_util.utils import FieldValidator content = [ { 'filename': 'audio_001.wav', 'scene_label': 'office', 'event_label': 'speech', 'onset': 1.0, 'offset': 10.0, 'identifier': 'A001' }, { 'filename': 'audio_001.wav', 'scene_label': 'office', 'event_label': 'mouse clicking', 'onset': 3.0, 'offset': 5.0, 'identifier': 'A001' }, { 'filename': 'audio_001.wav', 'scene_label': 'office', 'event_label': 'printer', 'onset': 7.0, 'offset': 9.0, 'identifier': 'A001' }, { 'filename': 'audio_002.wav', 'scene_label': 'meeting', 'event_label': 'speech', 'onset': 1.0, 'offset': 9.0, 'identifier': 'A002' }, { 'filename': 'audio_002.wav', 'scene_label': 'meeting', 'event_label': 'printer', 'onset': 5.0, 'offset': 7.0, 'identifier': 'A002' }, ] content2 = [ { 'filename': 'audio_001.wav', 'scene_label': 'office', 'event_label': 'speech', 'onset': 1.0, 'offset': 1.2, }, { 'filename': 'audio_001.wav', 'scene_label': 'office', 'event_label': 'speech', 'onset': 1.5, 'offset': 3.0, }, { 'filename': 'audio_001.wav', 'scene_label': 'office', 'event_label': 'speech', 'onset': 4.0, 'offset': 6.0, }, { 'filename': 'audio_001.wav', 'scene_label': 'office', 'event_label': 'speech', 'onset': 7.0, 'offset': 8.0, }, ] content3 = [ { 'filename': 'audio_001.wav', 'tags': 'tag1,tag2', }, { 'filename': 'audio_002.wav', 'tags': 'tag2', }, { 'filename': 'audio_003.wav', 'tags': 'tag2,tag3', }, { 'filename': 'audio_004.wav', 'tags': 'tag1,tag3', }, ] def test_formats(): delimiters = [',', ';', '\t'] for delimiter in delimiters: tmp = tempfile.NamedTemporaryFile('r+', suffix='.txt', dir='/tmp', delete=False) try: tmp.write('0.5' + delimiter + '0.7\n') tmp.write('2.5' + delimiter + '2.7\n') tmp.close() item = MetaDataContainer().load(filename=tmp.name)[0] nose.tools.eq_(item.onset, 0.5) nose.tools.eq_(item.offset, 0.7) finally: os.unlink(tmp.name) tmp = tempfile.NamedTemporaryFile('r+', suffix='.txt', dir='/tmp', delete=False) try: tmp.write('0.5' + delimiter + '0.7' + delimiter + 'event\n') tmp.write('2.5' + delimiter + '2.7' + delimiter + 'event\n') tmp.close() item = MetaDataContainer().load(filename=tmp.name)[0] nose.tools.eq_(item.onset, 0.5) nose.tools.eq_(item.offset, 0.7) nose.tools.eq_(item.event_label, 'event') finally: os.unlink(tmp.name) tmp = tempfile.NamedTemporaryFile('r+', suffix='.txt', dir='/tmp', delete=False) try: tmp.write('file.wav' + delimiter + 'scene' + delimiter + '0.5' + delimiter + '0.7' + delimiter + 'event\n') tmp.write('file.wav' + delimiter + 'scene' + delimiter + '0.5' + delimiter + '0.7' + delimiter + 'event\n') tmp.close() item = MetaDataContainer().load(filename=tmp.name)[0] nose.tools.eq_(item.onset, 0.5) nose.tools.eq_(item.offset, 0.7) nose.tools.eq_(item.event_label, 'event') nose.tools.eq_(item.filename, 'file.wav') nose.tools.eq_(item.scene_label, 'scene') finally: os.unlink(tmp.name) tmp = tempfile.NamedTemporaryFile('r+', suffix='.txt', dir='/tmp', delete=False) try: tmp.write('file.wav' + delimiter + 'scene' + delimiter + '0.5' + delimiter + '0.7' + delimiter + 'event' + delimiter + 'm' + delimiter + 'a1\n') tmp.write('file.wav' + delimiter + 'scene' + delimiter + '0.5' + delimiter + '0.7' + delimiter + 'event' + delimiter + 'm' + delimiter + 'a2\n') tmp.close() item = MetaDataContainer().load(filename=tmp.name)[0] nose.tools.eq_(item.onset, 0.5) nose.tools.eq_(item.offset, 0.7) nose.tools.eq_(item.event_label, 'event') nose.tools.eq_(item.filename, 'file.wav') nose.tools.eq_(item.scene_label, 'scene') nose.tools.eq_(item.identifier, 'a1') nose.tools.eq_(item.source_label, 'm') finally: os.unlink(tmp.name) def test_content(): meta = MetaDataContainer(content) nose.tools.eq_(len(meta), 5) # Test content nose.tools.eq_(meta[0].filename, 'audio_001.wav') nose.tools.eq_(meta[0].scene_label, 'office') nose.tools.eq_(meta[0].event_label, 'speech') nose.tools.eq_(meta[0].onset, 1.0) nose.tools.eq_(meta[0].offset, 10.0) nose.tools.eq_(meta[4].filename, 'audio_002.wav') nose.tools.eq_(meta[4].scene_label, 'meeting') nose.tools.eq_(meta[4].event_label, 'printer') nose.tools.eq_(meta[4].onset, 5.0) nose.tools.eq_(meta[4].offset, 7.0) def test_filter(): # Test filter by file meta = MetaDataContainer(content).filter(filename='audio_002.wav') nose.tools.eq_(len(meta), 2) nose.tools.eq_(meta[0].filename, 'audio_002.wav') nose.tools.eq_(meta[0].scene_label, 'meeting') nose.tools.eq_(meta[0].event_label, 'speech') nose.tools.eq_(meta[0].onset, 1.0) nose.tools.eq_(meta[0].offset, 9.0) nose.tools.eq_(meta[1].filename, 'audio_002.wav') nose.tools.eq_(meta[1].scene_label, 'meeting') nose.tools.eq_(meta[1].event_label, 'printer') nose.tools.eq_(meta[1].onset, 5.0) nose.tools.eq_(meta[1].offset, 7.0) # Test filter by scene_label meta = MetaDataContainer(content).filter(scene_label='office') nose.tools.eq_(len(meta), 3) nose.tools.eq_(meta[0].filename, 'audio_001.wav') nose.tools.eq_(meta[0].scene_label, 'office') nose.tools.eq_(meta[0].event_label, 'speech') nose.tools.eq_(meta[0].onset, 1.0) nose.tools.eq_(meta[0].offset, 10.0) nose.tools.eq_(meta[1].filename, 'audio_001.wav') nose.tools.eq_(meta[1].scene_label, 'office') nose.tools.eq_(meta[1].event_label, 'mouse clicking') nose.tools.eq_(meta[1].onset, 3.0) nose.tools.eq_(meta[1].offset, 5.0) meta = MetaDataContainer(content).filter(scene_list=['meeting']) nose.tools.eq_(len(meta), 2) # Test filter by event_label meta = MetaDataContainer(content).filter(event_label='speech') nose.tools.eq_(len(meta), 2) nose.tools.eq_(meta[0].filename, 'audio_001.wav') nose.tools.eq_(meta[0].scene_label, 'office') nose.tools.eq_(meta[0].event_label, 'speech') nose.tools.eq_(meta[0].onset, 1.0) nose.tools.eq_(meta[0].offset, 10.0) nose.tools.eq_(meta[1].filename, 'audio_002.wav') nose.tools.eq_(meta[1].scene_label, 'meeting') nose.tools.eq_(meta[1].event_label, 'speech') nose.tools.eq_(meta[1].onset, 1.0) nose.tools.eq_(meta[1].offset, 9.0) meta = MetaDataContainer(content).filter(event_list=['speech', 'printer']) nose.tools.eq_(len(meta), 4) # Test filter by tags meta = MetaDataContainer(content3).filter(tag='tag1') nose.tools.eq_(len(meta), 2) meta = MetaDataContainer(content3).filter(tag_list=['tag1', 'tag3']) nose.tools.eq_(len(meta), 3) def test_filter_time_segment(): # Case 1 meta = MetaDataContainer(content).filter_time_segment( filename='audio_001.wav', start=1.0, stop=3.5, zero_time=True, trim=True, ) nose.tools.eq_(len(meta), 2) nose.tools.eq_(meta[0].filename, 'audio_001.wav') nose.tools.eq_(meta[0].scene_label, 'office') nose.tools.eq_(meta[0].event_label, 'speech') nose.tools.eq_(meta[0].onset, 0.0) nose.tools.eq_(meta[0].offset, 2.5) nose.tools.eq_(meta[1].filename, 'audio_001.wav') nose.tools.eq_(meta[1].scene_label, 'office') nose.tools.eq_(meta[1].event_label, 'mouse clicking') nose.tools.eq_(meta[1].onset, 2.0) nose.tools.eq_(meta[1].offset, 2.5) # Case 2 meta = MetaDataContainer(content).filter_time_segment( filename='audio_001.wav', start=1.0, stop=3.5, zero_time=False, trim=True, ) nose.tools.eq_(len(meta), 2) nose.tools.eq_(meta[0].filename, 'audio_001.wav') nose.tools.eq_(meta[0].scene_label, 'office') nose.tools.eq_(meta[0].event_label, 'speech') nose.tools.eq_(meta[0].onset, 1.0) nose.tools.eq_(meta[0].offset, 3.5) nose.tools.eq_(meta[1].filename, 'audio_001.wav') nose.tools.eq_(meta[1].scene_label, 'office') nose.tools.eq_(meta[1].event_label, 'mouse clicking') nose.tools.eq_(meta[1].onset, 3.0) nose.tools.eq_(meta[1].offset, 3.5) # Case 3 meta = MetaDataContainer(content).filter_time_segment( filename='audio_001.wav', start=1.0, stop=3.5, zero_time=False, trim=False, ) nose.tools.eq_(len(meta), 2) nose.tools.eq_(meta[0].filename, 'audio_001.wav') nose.tools.eq_(meta[0].scene_label, 'office') nose.tools.eq_(meta[0].event_label, 'speech') nose.tools.eq_(meta[0].onset, 1.0) nose.tools.eq_(meta[0].offset, 10.0) nose.tools.eq_(meta[1].filename, 'audio_001.wav') nose.tools.eq_(meta[1].scene_label, 'office') nose.tools.eq_(meta[1].event_label, 'mouse clicking') nose.tools.eq_(meta[1].onset, 3.0) nose.tools.eq_(meta[1].offset, 5.0) def test_process_events(): meta = MetaDataContainer(content2).process_events( minimum_event_gap=0.5, minimum_event_length=1.0 ) nose.tools.eq_(len(meta), 3) nose.tools.eq_(meta[0].filename, 'audio_001.wav') nose.tools.eq_(meta[0].scene_label, 'office') nose.tools.eq_(meta[0].event_label, 'speech') nose.tools.eq_(meta[0].onset, 1.5) nose.tools.eq_(meta[0].offset, 3.0) nose.tools.eq_(meta[1].filename, 'audio_001.wav') nose.tools.eq_(meta[1].scene_label, 'office') nose.tools.eq_(meta[1].event_label, 'speech') nose.tools.eq_(meta[1].onset, 4.0) nose.tools.eq_(meta[1].offset, 6.0) nose.tools.eq_(meta[2].filename, 'audio_001.wav') nose.tools.eq_(meta[2].scene_label, 'office') nose.tools.eq_(meta[2].event_label, 'speech') nose.tools.eq_(meta[2].onset, 7.0) nose.tools.eq_(meta[2].offset, 8.0) meta = MetaDataContainer(content2).process_events( minimum_event_gap=1.0, minimum_event_length=1.0 ) nose.tools.eq_(len(meta), 1) nose.tools.eq_(meta[0].filename, 'audio_001.wav') nose.tools.eq_(meta[0].scene_label, 'office') nose.tools.eq_(meta[0].event_label, 'speech') nose.tools.eq_(meta[0].onset, 1.5) nose.tools.eq_(meta[0].offset, 8.0) meta = MetaDataContainer( [ { 'filename': 'audio_001.wav', 'scene_label': 'office', 'event_label': 'mouse clicking', 'onset': 3.0, 'offset': 5.0, 'identifier': 'A001' }, { 'filename': 'audio_001.wav', 'scene_label': 'office', 'event_label': 'mouse clicking', 'onset': 13.0, 'offset': 13.0, 'identifier': 'A001' }, ] ).process_events(minimum_event_gap=1.0, minimum_event_length=numpy.spacing(1)) nose.tools.eq_(len(meta), 1) def test_add_time_offset(): meta = MetaDataContainer(content2).add_time(time=2.0) nose.tools.eq_(len(meta), 4) nose.tools.eq_(meta[0].filename, 'audio_001.wav') nose.tools.eq_(meta[0].scene_label, 'office') nose.tools.eq_(meta[0].event_label, 'speech') nose.tools.eq_(meta[0].onset, 3.0) nose.tools.eq_(meta[0].offset, 3.2) nose.tools.eq_(meta[3].filename, 'audio_001.wav') nose.tools.eq_(meta[3].scene_label, 'office') nose.tools.eq_(meta[3].event_label, 'speech') nose.tools.eq_(meta[3].onset, 9.0) nose.tools.eq_(meta[3].offset, 10.0) def test_addition(): meta = MetaDataContainer(content) meta2 = MetaDataContainer(content2) meta += meta2 nose.tools.eq_(len(meta), 9) nose.tools.eq_(meta[8].filename, 'audio_001.wav') nose.tools.eq_(meta[8].scene_label, 'office') nose.tools.eq_(meta[8].event_label, 'speech') nose.tools.eq_(meta[8].onset, 7.0) nose.tools.eq_(meta[8].offset, 8.0) def test_unique_files(): files = MetaDataContainer(content).unique_files nose.tools.eq_(len(files), 2) nose.tools.eq_(files[0], 'audio_001.wav') nose.tools.eq_(files[1], 'audio_002.wav') def test_event_count(): nose.tools.eq_(MetaDataContainer(content).event_count, len(content)) def test_scene_label_count(): nose.tools.eq_(MetaDataContainer(content).scene_label_count, 2) def test_event_label_count(): nose.tools.eq_(MetaDataContainer(content).event_label_count, 3) def test_unique_event_labels(): events = MetaDataContainer(content).unique_event_labels nose.tools.eq_(len(events), 3) nose.tools.eq_(events[0], 'mouse clicking') nose.tools.eq_(events[1], 'printer') nose.tools.eq_(events[2], 'speech') def test_unique_scene_labels(): scenes = MetaDataContainer(content).unique_scene_labels nose.tools.eq_(len(scenes), 2) nose.tools.eq_(scenes[0], 'meeting') nose.tools.eq_(scenes[1], 'office') def test_max_event_offset(): nose.tools.eq_(MetaDataContainer(content).max_offset, 10) def test_intersection(): data1 = MetaDataContainer(content) data2 = MetaDataContainer([ { 'filename': 'audio_001.wav', 'scene_label': 'office', 'event_label': 'speech', 'onset': 1.0, 'offset': 10.0, 'identifier': 'A001' } ]) intersection = data1.intersection(data2) nose.tools.eq_(len(intersection), 1) nose.tools.eq_(intersection[0].filename, 'audio_001.wav') def test_map_events(): meta = MetaDataContainer(content) meta_mapped_1 = meta.map_events( target_event_label='activity', source_event_labels=['speech', 'printer'] ) nose.tools.eq_(len(meta_mapped_1), 4) meta_mapped_2 = meta.map_events( target_event_label='activity' ) nose.tools.eq_(len(meta_mapped_2), 5) def test_event_inactivity(): meta = MetaDataContainer(content) meta_inactivity = meta.event_inactivity() nose.tools.eq_(len(meta_inactivity), 3) meta = MetaDataContainer( [ { 'filename': 'audio_001.wav', 'scene_label': 'office', 'event_label': 'mouse clicking', 'onset': 3.0, 'offset': 5.0, 'identifier': 'A001' }, { 'filename': 'audio_001.wav', 'scene_label': 'office', 'event_label': 'mouse clicking', 'onset': 13.0, 'offset': 13.0, 'identifier': 'A001' }, ] ) meta_inactivity = meta.event_inactivity(duration_list={'audio_001.wav': 20.0}) nose.tools.eq_(meta_inactivity[0].onset, 0.00) nose.tools.eq_(meta_inactivity[0].offset, 3.00) nose.tools.eq_(meta_inactivity[1].onset, 5.00) nose.tools.eq_(meta_inactivity[1].offset, 20.00)
31.451172
156
0.57983
2,117
16,103
4.225791
0.059518
0.162978
0.197966
0.182763
0.802482
0.73653
0.70579
0.612005
0.577018
0.566734
0
0.049203
0.251568
16,103
511
157
31.51272
0.69308
0.01006
0
0.53012
0
0
0.141835
0
0
0
0
0
0
1
0.040964
false
0
0.014458
0
0.055422
0.016867
0
0
0
null
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
a849d7af21c8f5a4ebdadd175fae660e5ac76c44
84
py
Python
src/cirrus_ngs/util/test.py
ucsd-ccbb/cirrus-ngs
8f51450b3d971b03d4fd08a1aab11d5a076aa23e
[ "MIT" ]
8
2017-01-20T00:00:45.000Z
2022-02-11T00:20:45.000Z
src/cirrus_ngs/util/test.py
miko-798/cirrus-ngs
2c005f0fe29e298652ed2164e08ada75e908229b
[ "MIT" ]
3
2018-03-23T19:09:06.000Z
2018-03-26T19:49:55.000Z
src/cirrus_ngs/util/test.py
miko-798/cirrus-ngs
2c005f0fe29e298652ed2164e08ada75e908229b
[ "MIT" ]
2
2018-03-29T06:24:31.000Z
2019-04-01T18:34:53.000Z
import DesignFileLoader as dfl import sys print(dfl.load_design_file(sys.argv[1]))
16.8
40
0.809524
14
84
4.714286
0.785714
0
0
0
0
0
0
0
0
0
0
0.013158
0.095238
84
4
41
21
0.855263
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
a868a27d79e7221e96cf0d2b21d05ac170360b43
245
py
Python
back/bitext_matching/schema.py
PhilippeFerreiraDeSousa/bitext-matching
195c3e98775cfa5e63e4bb0bb1da6f741880d980
[ "MIT" ]
null
null
null
back/bitext_matching/schema.py
PhilippeFerreiraDeSousa/bitext-matching
195c3e98775cfa5e63e4bb0bb1da6f741880d980
[ "MIT" ]
9
2018-02-04T16:25:55.000Z
2022-03-08T22:49:58.000Z
back/bitext_matching/schema.py
PhilippeFerreiraDeSousa/bitext-matching
195c3e98775cfa5e63e4bb0bb1da6f741880d980
[ "MIT" ]
1
2017-12-01T17:08:18.000Z
2017-12-01T17:08:18.000Z
import graphene import core.schemaBitext class Query(core.schemaBitext.Query, graphene.ObjectType): pass class Mutation(core.schemaBitext.Mutation, graphene.ObjectType): pass schema = graphene.Schema(query=Query, mutation=Mutation)
18.846154
64
0.791837
28
245
6.928571
0.357143
0.247423
0.226804
0
0
0
0
0
0
0
0
0
0.118367
245
12
65
20.416667
0.898148
0
0
0.285714
0
0
0
0
0
0
0
0
0
1
0
false
0.285714
0.285714
0
0.571429
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
5
a8ac0a20d8cf56e5c71d469198db41f297c71f74
229
py
Python
tests/unit/test_download_dataset.py
nismod/open-gira
be70e1734272d0b8ed60697264e22bf083305faf
[ "MIT" ]
1
2022-02-12T14:37:09.000Z
2022-02-12T14:37:09.000Z
tests/unit/test_download_dataset.py
nismod/open-gira
be70e1734272d0b8ed60697264e22bf083305faf
[ "MIT" ]
29
2022-01-10T10:02:54.000Z
2022-03-31T17:27:56.000Z
tests/unit/test_download_dataset.py
nismod/open-gira
be70e1734272d0b8ed60697264e22bf083305faf
[ "MIT" ]
null
null
null
import os import sys import common sys.path.insert(0, os.path.dirname(__file__)) def test_download_dataset(): common.run_test('download_dataset', 'snakemake results/input/tanzania-mini.osm.pbf -F -j1 --keep-target-files')
22.9
115
0.764192
35
229
4.771429
0.742857
0.143713
0.227545
0
0
0
0
0
0
0
0
0.009709
0.100437
229
9
116
25.444444
0.800971
0
0
0
0
0.166667
0.384279
0.152838
0
0
0
0
0
1
0.166667
true
0
0.5
0
0.666667
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
763a0b2d86db368843ed44a738b3a1aa2adf18fb
1,052
py
Python
python/anyascii/_data/_080.py
casept/anyascii
d4f426b91751254b68eaa84c6cd23099edd668e6
[ "ISC" ]
null
null
null
python/anyascii/_data/_080.py
casept/anyascii
d4f426b91751254b68eaa84c6cd23099edd668e6
[ "ISC" ]
null
null
null
python/anyascii/_data/_080.py
casept/anyascii
d4f426b91751254b68eaa84c6cd23099edd668e6
[ "ISC" ]
null
null
null
b='Yao Lao Lao Kao Mao Zhe Qi Gou Gou Gou Die Die Er Shua Ruan Nai Nai Duan Lei Ting Zi Geng Chao Hao Yun Ba Pi Yi Si Qu Jia Ju Huo Chu Lao Lun Ji Tang Ou Lou Nou Jiang Pang Zha Lou Ji Lao Huo You Mo Huai Er Yi Ding Ye Da Song Qin Yun Chi Dan Dan Hong Geng Zhi Pan Nie Dan Zhen Che Ling Zheng You Wa Liao Long Zhi Ning Tiao Er Ya Tie Gua Xu Lian Hao Sheng Lie Pin Jing Ju Bi Di Guo Wen Xu Ping Cong Ding Ni Ting Ju Cong Kui Lian Kui Cong Lian Weng Kui Lian Lian Cong Ao Sheng Song Ting Kui Nie Zhi Dan Ning Qie Ni Ting Ting Long Yu Yu Zhao Si Su Yi Su Si Zhao Zhao Rou Yi Le Ji Qiu Ken Cao Ge Bo Huan Huang Chi Ren Xiao Ru Zhou Yuan Du Gang Rong Gan Cha Wo Chang Gu Zhi Han Fu Fei Fen Pei Pang Jian Fang Zhun You Na Ang Ken Ran Gong Yu Wen Yao Qi Pi Qian Xi Xi Fei Ken Jing Tai Shen Zhong Zhang Xie Shen Wei Zhou Die Dan Fei Ba Bo Qu Tian Bei Gua Tai Zi Fei Zhi Ni Ping Zi Fu Pang Zhen Xian Zuo Pei Jia Sheng Zhi Bao Mu Qu Hu Ke Chi Yin Xu Yang Long Dong Ka Lu Jing Nu Yan Pang Kua Yi Guang Hai Ge Dong Chi Jiao Xiong Xiong Er An Heng Pian Neng Zi Gui'
1,052
1,052
0.754753
257
1,052
3.089494
0.59144
0.015113
0
0
0
0
0
0
0
0
0
0
0.242395
1,052
1
1,052
1,052
0.996236
0
0
0
0
1
0.995252
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
7647e767937d629b12e6aeb45b5f7cf4ce9baf49
489
py
Python
meet/serializers.py
bjones-tech/speedy-meety
a7d557788a544b69fd6ad454d921d9cf02cfa636
[ "MIT" ]
null
null
null
meet/serializers.py
bjones-tech/speedy-meety
a7d557788a544b69fd6ad454d921d9cf02cfa636
[ "MIT" ]
null
null
null
meet/serializers.py
bjones-tech/speedy-meety
a7d557788a544b69fd6ad454d921d9cf02cfa636
[ "MIT" ]
null
null
null
from rest_framework import serializers class WebhookSerializer(serializers.Serializer): id = serializers.CharField(max_length=200) name = serializers.CharField(max_length=200) resource = serializers.CharField(max_length=200) event = serializers.CharField(max_length=200) filter = serializers.CharField(max_length=200) data = serializers.DictField() def create(self, validated_data): pass def update(self, instance, validated_data): pass
28.764706
52
0.740286
55
489
6.436364
0.472727
0.282486
0.324859
0.409605
0.451977
0
0
0
0
0
0
0.037129
0.173824
489
16
53
30.5625
0.839109
0
0
0.166667
0
0
0
0
0
0
0
0
0
1
0.166667
false
0.166667
0.083333
0
0.833333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
5
767fe9a5d091886de261beaee00b1b89236cdd2f
177
py
Python
deuce/drivers/storage/metadata/mongodb/__init__.py
TheSriram/deuce
9e8a7a342275aa02d0a59953b5a8c96ffb760b51
[ "Apache-2.0" ]
null
null
null
deuce/drivers/storage/metadata/mongodb/__init__.py
TheSriram/deuce
9e8a7a342275aa02d0a59953b5a8c96ffb760b51
[ "Apache-2.0" ]
null
null
null
deuce/drivers/storage/metadata/mongodb/__init__.py
TheSriram/deuce
9e8a7a342275aa02d0a59953b5a8c96ffb760b51
[ "Apache-2.0" ]
null
null
null
# Hoist up into the sqlite namespace from deuce.drivers.storage.metadata.mongodb import mongodbstoragedriver MongoDbStorageDriver = mongodbstoragedriver.MongoDbStorageDriver
25.285714
71
0.864407
17
177
9
0.823529
0.784314
0.784314
0
0
0
0
0
0
0
0
0
0.096045
177
6
72
29.5
0.95625
0.19209
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
76968446558c3eed8a6f53ce51810c44735f6964
604
py
Python
Chapter2_Python/MatplotlibIntro.py
dependencyInversion/UdemyML
9e1a0a01688a82c61ef006a592a58c12fb186552
[ "MIT" ]
null
null
null
Chapter2_Python/MatplotlibIntro.py
dependencyInversion/UdemyML
9e1a0a01688a82c61ef006a592a58c12fb186552
[ "MIT" ]
null
null
null
Chapter2_Python/MatplotlibIntro.py
dependencyInversion/UdemyML
9e1a0a01688a82c61ef006a592a58c12fb186552
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt grades = { "Jan": [56, 64, 78, 100], "Ben": [86, 94, 98, 90] } # Plot plt.plot(range(len(grades["Jan"])), grades["Jan"], color="blue") plt.plot(range(len(grades["Ben"])), grades["Ben"], color="red") plt.legend(grades.keys()) plt.xlabel("Course") plt.ylabel("Grade in %") plt.title("Jan vs. Ben") plt.show() # Scatter plt.scatter(range(len(grades["Jan"])), grades["Jan"], color="blue") plt.scatter(range(len(grades["Ben"])), grades["Ben"], color="red") plt.legend(grades.keys()) plt.xlabel("Course") plt.ylabel("Grade in %") plt.title("Jan vs. Ben") plt.show()
23.230769
67
0.637417
94
604
4.095745
0.351064
0.116883
0.145455
0.077922
0.825974
0.753247
0.753247
0.753247
0.753247
0.555844
0
0.031481
0.10596
604
25
68
24.16
0.681481
0.019868
0
0.526316
0
0
0.166384
0
0
0
0
0
0
1
0
false
0
0.052632
0
0.052632
0
0
0
0
null
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
4f1f57faca28f2b5e2486029d28f910c5ed78123
229
py
Python
regym/__init__.py
Danielhp95/Regym
f0f0be0ad23bf1a3410ecd9ed9b8025947d6080a
[ "MIT" ]
6
2019-12-03T21:07:12.000Z
2021-03-25T13:09:39.000Z
regym/__init__.py
Danielhp95/Generalized-RL-Self-Play-Framework
64e02e143070ca6eb8bc8f898c431f59cd229341
[ "MIT" ]
1
2019-01-29T18:43:32.000Z
2019-01-31T17:31:39.000Z
regym/__init__.py
Danielhp95/Regym
f0f0be0ad23bf1a3410ecd9ed9b8025947d6080a
[ "MIT" ]
4
2019-08-01T10:29:41.000Z
2021-12-06T21:44:30.000Z
from . import environments from . import rl_loops from . import util from . import game_theory from . import rl_algorithms from . import training_schemes from . import networks from . import logging_server from . import plotting
22.9
30
0.803493
32
229
5.59375
0.46875
0.502793
0.134078
0
0
0
0
0
0
0
0
0
0.157205
229
9
31
25.444444
0.927461
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
4f219836cf1c877e2b908d648ffa112e9fd000ae
37
py
Python
mysticweb/exceptions.py
bentheiii/mystic
04df023a07fc411367a3a8984f9da143596085f0
[ "MIT" ]
null
null
null
mysticweb/exceptions.py
bentheiii/mystic
04df023a07fc411367a3a8984f9da143596085f0
[ "MIT" ]
null
null
null
mysticweb/exceptions.py
bentheiii/mystic
04df023a07fc411367a3a8984f9da143596085f0
[ "MIT" ]
null
null
null
class DumpError(Exception): pass
12.333333
27
0.72973
4
37
6.75
1
0
0
0
0
0
0
0
0
0
0
0
0.189189
37
2
28
18.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
4f2cb28e9d8be8a1f5cea72fea858de8aab7dabf
75
py
Python
nntoolbox/visualization/__init__.py
nhatsmrt/nn-toolbox
689b9924d3c88a433f8f350b89c13a878ac7d7c3
[ "Apache-2.0" ]
16
2019-07-11T15:57:41.000Z
2020-09-08T13:52:45.000Z
nntoolbox/visualization/__init__.py
nhatsmrt/nn-toolbox
689b9924d3c88a433f8f350b89c13a878ac7d7c3
[ "Apache-2.0" ]
1
2022-01-18T22:21:57.000Z
2022-01-18T22:21:57.000Z
nntoolbox/visualization/__init__.py
nhatsmrt/nn-toolbox
689b9924d3c88a433f8f350b89c13a878ac7d7c3
[ "Apache-2.0" ]
1
2019-08-07T10:07:09.000Z
2019-08-07T10:07:09.000Z
"""Utilities for model and data visualization""" from .reduce_dim import *
25
48
0.76
10
75
5.6
1
0
0
0
0
0
0
0
0
0
0
0
0.133333
75
2
49
37.5
0.861538
0.56
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
4f5344773278784536fef50175911f4b1cea9ac1
922
py
Python
PyStationB/projects/CellSignalling/cellsig_pipeline/pybckg/__init__.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
6
2021-09-29T15:46:55.000Z
2021-12-14T18:39:51.000Z
PyStationB/projects/CellSignalling/cellsig_pipeline/pybckg/__init__.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
null
null
null
PyStationB/projects/CellSignalling/cellsig_pipeline/pybckg/__init__.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
3
2021-09-27T10:35:20.000Z
2021-10-02T17:53:07.000Z
# ------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # ------------------------------------------------------------------------------------------- """High-level wrappers around pyBCKG. Exports: create_connection, a factory method for WetLabAzureConnection WetLabAzureConnection, a child class of pyBCKG's AzureConnection, introducing more functionalities experiment_to_dataframe, a high-level function, returns a data frame witch characterization results TODO: When pyBCKG is refactored, we may need to replace these utilities. """ from cellsig_pipeline.pybckg.connection import create_connection, WetLabAzureConnection # noqa: F401 from cellsig_pipeline.pybckg.core import experiment_to_dataframe # noqa: F401
57.625
103
0.646421
94
922
6.255319
0.691489
0.030612
0.071429
0.085034
0
0
0
0
0
0
0
0.007335
0.112798
922
15
104
61.466667
0.711491
0.81128
0
0
0
0
0
0
0
0
0
0.066667
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
1
0
1
0
0
5
4f56d2cb72ba5e4f99601bb9950b27fc481cc3d6
17
py
Python
tests/t55.py
jplevyak/pyc
9f4bc49be78ba29427841460945ce63826fcd857
[ "BSD-3-Clause" ]
3
2019-08-21T22:01:35.000Z
2021-07-25T00:21:28.000Z
tests/t55.py
jplevyak/pyc
9f4bc49be78ba29427841460945ce63826fcd857
[ "BSD-3-Clause" ]
null
null
null
tests/t55.py
jplevyak/pyc
9f4bc49be78ba29427841460945ce63826fcd857
[ "BSD-3-Clause" ]
null
null
null
print "abcde"[3]
8.5
16
0.647059
3
17
3.666667
1
0
0
0
0
0
0
0
0
0
0
0.066667
0.117647
17
1
17
17
0.666667
0
0
0
0
0
0.294118
0
0
0
0
0
0
0
null
null
0
0
null
null
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5
4f84b5499a5eb316e8b67ab9b0c4dcd92d30e673
77
py
Python
commands/dad.py
pieroproietti/penguins-eggs2
7c029cf1d180bd5d7ace856d547de8540b61c093
[ "MIT" ]
null
null
null
commands/dad.py
pieroproietti/penguins-eggs2
7c029cf1d180bd5d7ace856d547de8540b61c093
[ "MIT" ]
null
null
null
commands/dad.py
pieroproietti/penguins-eggs2
7c029cf1d180bd5d7ace856d547de8540b61c093
[ "MIT" ]
null
null
null
def dad(args): """ This command run dad """ print("run dad")
11
23
0.493506
10
77
3.8
0.7
0.315789
0
0
0
0
0
0
0
0
0
0
0.337662
77
7
24
11
0.745098
0.25974
0
0
0
0
0.162791
0
0
0
0
0
0
1
0.5
false
0
0
0
0.5
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
1
0
5
8c04874113ea4d90d8ff2d87181b7400952633a8
13,903
py
Python
soc_poster.py
parinavcodes/Automate-your-Social-Media
1348cc3914cf74eada5cde81f79404d96a69de05
[ "Apache-2.0" ]
null
null
null
soc_poster.py
parinavcodes/Automate-your-Social-Media
1348cc3914cf74eada5cde81f79404d96a69de05
[ "Apache-2.0" ]
null
null
null
soc_poster.py
parinavcodes/Automate-your-Social-Media
1348cc3914cf74eada5cde81f79404d96a69de05
[ "Apache-2.0" ]
null
null
null
import pandas as pd from datetime import datetime import time from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.chrome.options import * import autoit chrome_path='' fb_page_url="" fb_username= "" fb_password= "" insta_username= "" insta_password= "" linkedin_url="" linkedin_username= "" linkedin_password= "" def facebook_post(desc,img_path): driver=webdriver.Chrome(executable_path=chrome_path) driver.get(fb_page_url) t_out = 10 #log in tab try: element_pres = EC.presence_of_element_located((By.XPATH, '/html/body/div[1]/div[2]/div/div/div/div/div[2]/form/table/tbody/tr[2]/td[1]/input')) WebDriverWait(driver, t_out).until(element_pres) except TimeoutException: print("Timed out waiting for login page to load") return driver.find_element_by_xpath("/html/body/div[1]/div[2]/div/div/div/div/div[2]/form/table/tbody/tr[2]/td[1]/input").send_keys(fb_username) time.sleep(0.3) driver.find_element_by_xpath("/html/body/div[1]/div[2]/div/div/div/div/div[2]/form/table/tbody/tr[2]/td[2]/input").send_keys(fb_password) driver.implicitly_wait(3000) button = driver.find_element_by_xpath("/html/body/div[1]/div[2]/div/div/div/div/div[2]/form/table/tbody/tr[2]/td[3]/label/input") driver.execute_script("arguments[0].click();", button) #post tab try: element_pres = EC.presence_of_element_located((By.XPATH,'/html/body/div[1]/div[3]/div[1]/div/div/div[2]/div[2]/div[2]/div/div[3]/div[2]/div/div[1]/div/div[2]/div/div[1]/div[1]/div[2]/div/div/div[2]/div/div/div/form/div[1]/div/div[2]/textarea')) WebDriverWait(driver, t_out).until(element_pres) except TimeoutException: print("Timed out waiting for page to load") time.sleep(8) if desc!='no desc.': split=desc.split() txt=driver.find_element_by_xpath("/html/body/div[1]/div[3]/div[1]/div/div/div[2]/div[2]/div[2]/div/div[3]/div[2]/div/div[1]/div/div[2]/div/div[1]/div[1]/div[2]/div/div/div[2]/div/div/div/form/div[1]/div/div[2]/textarea") time.sleep(5) driver.execute_script(""" var elm = arguments[0], text = arguments[1]; if (!('value' in elm)) throw new Error('Expected an <input> or <textarea>'); elm.focus(); elm.value = text; elm.dispatchEvent(new Event('change')); """,txt,desc) else: driver.find_element_by_xpath("/html/body/div[1]/div[3]/div[1]/div/div/div[2]/div[2]/div[2]/div/div[3]/div[2]/div/div[1]/div/div[2]/div/div[1]/div[1]/div[2]/div/div/div[2]/div/div/div/form/div[1]/div/div[2]/textarea").click() time.sleep(4) try: element_pres = EC.presence_of_element_located((By.XPATH,'/html/body/div[1]/div[3]/div[1]/div/div/div[2]/div[2]/div[2]/div/div[3]/div[2]/div/div[1]/div/div[2]/div/div[1]/div[1]/div[2]/div/div/div[2]/div[1]/div/div/div/div/div/div[2]/div[2]/div/table/tbody/tr[1]/td[2]/div/div/span/a/div[2]/input')) WebDriverWait(driver, t_out).until(element_pres) except TimeoutException: print("Timed out waiting for text box to load") if img_path!="0": driver.find_element_by_xpath("/html/body/div[1]/div[3]/div[1]/div/div/div[2]/div[2]/div[2]/div/div[3]/div[2]/div/div[1]/div/div[2]/div/div[1]/div[1]/div[2]/div/div/div[2]/div[1]/div/div/div/div/div/div[2]/div[2]/div/table/tbody/tr[1]/td[2]/div/div/span/a/div[2]/input").send_keys(img_path) try: element_pres = EC.presence_of_element_located((By.XPATH,'/html/body/div[1]/div[3]/div[1]/div/div/div[2]/div[2]/div[2]/div/div[3]/div[2]/div/div[1]/div/div[2]/div/div[1]/div[1]/div[2]/div/div/div[2]/div[1]/div/div/div/div/div/div[1]/div[2]/div[3]/div[2]/div[2]/div/span/button')) WebDriverWait(driver, t_out).until(element_pres) except TimeoutException: print("Timed out waiting for image to load") time.sleep(2) button = driver.find_element_by_xpath("/html/body/div[1]/div[3]/div[1]/div/div/div[2]/div[2]/div[2]/div/div[3]/div[2]/div/div[1]/div/div[2]/div/div[1]/div[1]/div[2]/div/div/div[2]/div[1]/div/div/div/div/div/div[1]/div[2]/div[3]/div[2]/div[2]/div/span/button/span") driver.implicitly_wait(3000) driver.execute_script("arguments[0].click();", button) else: button = driver.find_element_by_xpath("/html/body/div[1]/div[3]/div[1]/div/div/div[2]/div[2]/div[2]/div/div[3]/div[2]/div/div[1]/div/div[2]/div/div[1]/div[1]/div[2]/div/div/div[2]/div[1]/div/div/div/div/div/div[2]/div[3]/div[2]/div[2]/div/button/span") driver.implicitly_wait(3000) driver.execute_script("arguments[0].click();", button) time.sleep(10) driver.close() def instagram_post(desc, img_path): options = Options() mobile_emulation = {"deviceName": "Nexus 5"} options.add_experimental_option("mobileEmulation", mobile_emulation) options.add_argument('--user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1') options.add_argument("--disable-notifications") driver = webdriver.Chrome(executable_path=chrome_path, options=options) driver.get("https://www.instagram.com/accounts/login/?next=%2F&source=mobile_nav") time.sleep(3) driver.find_element_by_xpath("/html/body/div[1]/section/main/article/div/div/div/form/div[4]/div/label/input").send_keys(insta_username) time.sleep(0.3) driver.find_element_by_xpath("/html/body/div[1]/section/main/article/div/div/div/form/div[5]/div/label/input").send_keys(insta_password) time.sleep(0.5) button = driver.find_element_by_xpath("/html/body/div[1]/section/main/article/div/div/div/form/div[7]/button/div") driver.implicitly_wait(3000) driver.execute_script("arguments[0].click();", button) time.sleep(1) t_out = 5 check = 0 try: element_pres = EC.presence_of_element_located((By.XPATH, '/html/body/div[1]/section/main/div/div/div/button')) WebDriverWait(driver, t_out).until(element_pres) except TimeoutException: print("no pop up") check = 1 if check == 0: button = driver.find_element_by_xpath("/html/body/div[1]/section/main/div/div/div/button") driver.implicitly_wait(3000) driver.execute_script("arguments[0].click();", button) time.sleep(1) check = 0 try: element_pres = EC.presence_of_element_located((By.XPATH, '/html/body/div[4]/div/div/div/div[3]/button[2]')) WebDriverWait(driver, t_out).until(element_pres) except TimeoutException: print("no pop up") check = 1 if check == 0: button = driver.find_element_by_xpath("/html/body/div[4]/div/div/div/div[3]/button[2]") driver.implicitly_wait(3000) driver.execute_script("arguments[0].click();", button) check = 0 time.sleep(1) try: element_pres = EC.presence_of_element_located( (By.XPATH, '//*[@id="react-root"]/section/nav[2]/div/div/div[2]/div/div/div[3]')) WebDriverWait(driver, t_out).until(element_pres) except TimeoutException: print("button not found") check = 1 time.sleep(2) if check == 0: driver.find_element_by_xpath("//div[@role='menuitem']").click() time.sleep(1.5) autoit.win_active("Open") # open can change by your os language if not open change that time.sleep(2) autoit.control_send("Open", "Edit1", img_path) time.sleep(1.5) autoit.control_send("Open", "Edit1", "{ENTER}") time.sleep(2) driver.find_element_by_xpath("/html/body/div[1]/section/div[1]/header/div/div[2]/button").click() time.sleep(1.5) if desc!="no desc.": split=desc.split() #driver.find_element_by_xpath("/html/body/div[1]/section/div[2]/section[1]/div[1]/textarea").send_keys(desc) for i in split: driver.find_element_by_xpath("/html/body/div[1]/section/div[2]/section[1]/div[1]/textarea").send_keys(i) time.sleep(0.01) driver.find_element_by_xpath("/html/body/div[1]/section/div[2]/section[1]/div[1]/textarea").send_keys(" ") time.sleep(0.01) time.sleep(2) driver.find_element_by_xpath("/html/body/div[1]/section/div[1]/header/div/div[2]/button").click() time.sleep(20) driver.close() def linkedin_post(desc,img_path): driver = webdriver.Chrome(executable_path=chrome_path) driver.get(linkedin_url) t_out=5 f=0 try: element_pres = EC.presence_of_element_located((By.XPATH, '/html/body/div/main/div[2]/form/div[1]/input')) WebDriverWait(driver, t_out).until(element_pres) except TimeoutException: print("1st type linkedin Page not loaded1") f=1 time.sleep(2) if f==1: driver.find_element_by_xpath("/html/body/div/div/form[1]/section/p/a").click() try: element_pres = EC.presence_of_element_located((By.XPATH, '/html/body/div/div/form[2]/input[1]')) WebDriverWait(driver, t_out).until(element_pres) except TimeoutException: print("2nd type Page not loaded") return time.sleep(0.5) driver.find_element_by_xpath("/html/body/div/div/form[2]/input[1]").send_keys(linkedin_username) time.sleep(0.3) driver.find_element_by_xpath("/html/body/div/div/form[2]/input[2]").send_keys(linkedin_password) time.sleep(2) driver.find_element_by_xpath("/html/body/div/div/form[2]/input[7]").click() else: driver.find_element_by_xpath("/html/body/div/main/div[2]/form/div[1]/input").send_keys(linkedin_username) time.sleep(0.3) driver.find_element_by_xpath("/html/body/div/main/div[2]/form/div[2]/input").send_keys(linkedin_password) time.sleep(2) driver.find_element_by_xpath("/html/body/div/main/div[2]/form/div[3]/button").click() t_out=10 while 1: try: element_pres = EC.presence_of_element_located((By.XPATH, '/html/body/div[9]/div[4]/div/div/div/div/div[1]/div/div[1]/button[1]')) WebDriverWait(driver, t_out).until(element_pres) break except TimeoutException: print("Home Page not loaded") driver.find_element_by_xpath("/html/body/div[9]/div[4]/div/div/div/div/div[1]/div/div[1]/button[1]").click() time.sleep(1.5) try: element_pres = EC.presence_of_element_located((By.XPATH, '/html/body/div[4]/div/div/div[2]/div/div[1]/div[1]/div[2]/div/div/div/div/div[1]')) WebDriverWait(driver, t_out).until(element_pres) except TimeoutException: print("text box not loaded") if desc!="no desc.": split=desc.split() #driver.find_element_by_xpath("/html/body/div[4]/div/div/div[2]/div/div[1]/div[1]/div[2]/div/div/div/div/div[1]").send_keys(desc) for i in split: driver.find_element_by_xpath("/html/body/div[4]/div/div/div[2]/div/div[1]/div[1]/div[2]/div/div/div/div/div[1]").send_keys(i) time.sleep(0.01) driver.find_element_by_xpath("/html/body/div[4]/div/div/div[2]/div/div[1]/div[1]/div[2]/div/div/div/div/div[1]").send_keys(" ") time.sleep(0.01) # driver.find_element_by_xpath("/html/body/div[4]/div/div/div[2]/div/div[1]/div[1]/div[2]/div/div/div/div/div[1]").send_keys(desc) time.sleep(7) if img_path!='0': driver.find_element_by_xpath('/html/body/div[4]/div/div/div[2]/div/div[2]/div[1]/button[1]').click() time.sleep(1.5) autoit.win_active("Open") time.sleep(2) autoit.control_send("Open", "Edit1", img_path) time.sleep(1.5) autoit.control_send("Open", "Edit1", "{ENTER}") time.sleep(1.5) driver.find_element_by_xpath("/html/body/div[4]/div/div/div[2]/div/div/div[2]/div/button[2]/span").click() else: driver.find_element_by_xpath("/html/body/div[4]/div/div/div[2]/div/div[2]/div[2]/button/span").click() time.sleep(15) """ cur_time=datetime.now().time() print(cur_time) df=pd.read_excel("postingxlsx.xlsx") df.Image=df.Image.fillna(0) df.Desc=df.Desc.fillna("no desc.") print(df) for i, row in df.iterrows(): if cur_time>=row['Time']: if row['Platform'].lower() =="facebook": if row['Image']==0: if row['Desc']=="no desc.": print("No Description and Image") continue st=str(0) facebook_post(str(row['Desc']),st) instagram_post(str(row['Desc']),st) else: facebook_post(str(row['Desc']),row['Image']) instagram_post(str(row['Desc']),row['Image']) elif row['Platform'].lower() =="instagram": if row['Image']==0: print("Image not found") else: instagram_post(str(row['Desc']),row['Image']) facebook_post(str(row['Desc']),row['Image']) elif row['Platform'].lower() == "linkedin": if row['Image']==0: if row['Desc'] == "no desc.": print("No Description and Image") continue st=str(0) linkedin_post(str(row['Desc']),st) else: linkedin_post(str(row['Desc']),row['Image']) """
49.127208
306
0.622815
2,188
13,903
3.835923
0.096892
0.141547
0.098654
0.063148
0.779102
0.76814
0.750149
0.726796
0.717741
0.704397
0
0.038499
0.194778
13,903
282
307
49.301418
0.71121
0.031792
0
0.520548
0
0.141553
0.404643
0.327459
0
0
0
0
0
1
0.013699
false
0.031963
0.045662
0
0.068493
0.050228
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
8c0b457ab397564c13157ce28611d824562d3cc6
187
py
Python
apps/base/admin.py
samsagaz/pyerp
db61bca307f73c13f4ad5a2ffb4531132ea5b605
[ "MIT" ]
1
2020-02-26T19:36:08.000Z
2020-02-26T19:36:08.000Z
apps/base/admin.py
samsagaz/pyerp
db61bca307f73c13f4ad5a2ffb4531132ea5b605
[ "MIT" ]
null
null
null
apps/base/admin.py
samsagaz/pyerp
db61bca307f73c13f4ad5a2ffb4531132ea5b605
[ "MIT" ]
2
2020-02-26T19:36:12.000Z
2020-03-16T16:30:57.000Z
from django.contrib import admin from apps.base.models import PyPartner, PyProduct, PyCountry admin.site.register(PyPartner) admin.site.register(PyProduct) admin.site.register(PyCountry)
31.166667
60
0.839572
25
187
6.28
0.52
0.171975
0.324841
0
0
0
0
0
0
0
0
0
0.069519
187
6
61
31.166667
0.902299
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
8c3036b4045d5297983ae563634e3689a095546e
161
py
Python
examples_elo_ratings/show_likelihood_categories.py
MarcoGorelli/precise
227d017d45f1c4b39887a85133f3d62950a1e341
[ "MIT" ]
40
2022-01-13T00:40:59.000Z
2022-03-31T20:33:19.000Z
examples_elo_ratings/show_likelihood_categories.py
MarcoGorelli/precise
227d017d45f1c4b39887a85133f3d62950a1e341
[ "MIT" ]
14
2022-01-08T16:00:12.000Z
2022-03-16T00:12:04.000Z
examples_elo_ratings/show_likelihood_categories.py
MarcoGorelli/precise
227d017d45f1c4b39887a85133f3d62950a1e341
[ "MIT" ]
9
2022-01-26T21:14:43.000Z
2022-03-21T17:32:02.000Z
from precise.skatervaluation.battleutil.battleio import win_dirs from pprint import pprint if __name__=='__main__': pprint(win_dirs(genre='cov_likelihood'))
32.2
64
0.813665
21
161
5.714286
0.714286
0.116667
0
0
0
0
0
0
0
0
0
0
0.093168
161
5
65
32.2
0.821918
0
0
0
0
0
0.135802
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
5
8c444ae83e2eecedc74b18dac209bd2251731a54
36
py
Python
tests/__init__.py
shubham3121/laymon
bac1374151ef94918f6631d254f5945b016da82c
[ "MIT" ]
3
2020-08-25T18:15:27.000Z
2020-08-31T16:50:08.000Z
tests/__init__.py
shubham3121/laymon
bac1374151ef94918f6631d254f5945b016da82c
[ "MIT" ]
null
null
null
tests/__init__.py
shubham3121/laymon
bac1374151ef94918f6631d254f5945b016da82c
[ "MIT" ]
2
2020-09-04T11:44:03.000Z
2021-08-23T06:25:40.000Z
"""Unit test package for laymon."""
18
35
0.666667
5
36
4.8
1
0
0
0
0
0
0
0
0
0
0
0
0.138889
36
1
36
36
0.774194
0.805556
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
8c5375a1ce9c89c70f73e55546d8d7ead5346f26
265
py
Python
srl/base/env/spaces/__init__.py
pocokhc/simple_rl
765f12f392f87e6897027905d74f1bced6a2b7bf
[ "MIT" ]
1
2022-03-01T09:16:57.000Z
2022-03-01T09:16:57.000Z
srl/base/env/spaces/__init__.py
pocokhc/simple_rl
765f12f392f87e6897027905d74f1bced6a2b7bf
[ "MIT" ]
null
null
null
srl/base/env/spaces/__init__.py
pocokhc/simple_rl
765f12f392f87e6897027905d74f1bced6a2b7bf
[ "MIT" ]
null
null
null
from .array_continuous import ArrayContinuousSpace # noqa F402 from .array_discrete import ArrayDiscreteSpace # noqa F402 from .box import BoxSpace # noqa F402 from .continuous import ContinuousSpace # noqa F402 from .discrete import DiscreteSpace # noqa F402
44.166667
63
0.811321
32
265
6.65625
0.40625
0.187793
0.225352
0
0
0
0
0
0
0
0
0.066667
0.150943
265
5
64
53
0.88
0.184906
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
8c642e85ac8677c1a5bac75ecf7964e225d9314c
29
py
Python
archive/analysis/__init__.py
FedeClaudi/LocomotionControl
1281f7894825096ad212407351463a2105c5152a
[ "MIT" ]
null
null
null
archive/analysis/__init__.py
FedeClaudi/LocomotionControl
1281f7894825096ad212407351463a2105c5152a
[ "MIT" ]
null
null
null
archive/analysis/__init__.py
FedeClaudi/LocomotionControl
1281f7894825096ad212407351463a2105c5152a
[ "MIT" ]
null
null
null
from analysis import visuals
14.5
28
0.862069
4
29
6.25
1
0
0
0
0
0
0
0
0
0
0
0
0.137931
29
1
29
29
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
4fb5dc9ebb30823ff9a1e37891ee9aac0fa1406b
259
py
Python
deepy/utils/fake_generator.py
uaca/deepy
090fbad22a08a809b12951cd0d4984f5bd432698
[ "MIT" ]
260
2015-05-16T07:58:29.000Z
2016-01-07T09:10:47.000Z
deepy/utils/fake_generator.py
uaca/deepy
090fbad22a08a809b12951cd0d4984f5bd432698
[ "MIT" ]
20
2015-04-21T01:46:46.000Z
2015-12-20T00:04:23.000Z
deepy/utils/fake_generator.py
zomux/deepy
090fbad22a08a809b12951cd0d4984f5bd432698
[ "MIT" ]
50
2016-01-27T03:45:25.000Z
2020-12-16T07:02:57.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- class FakeGenerator(object): def __init__(self, dataset, method_name): self.dataset = dataset self.method_name = method_name def __iter__(self): return getattr(self.dataset, self.method_name)()
21.583333
52
0.694981
34
259
4.941176
0.558824
0.238095
0.202381
0.25
0
0
0
0
0
0
0
0.00463
0.166023
259
12
52
21.583333
0.773148
0.162162
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.166667
0.666667
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
4ff71c88e5d58535385d73c36223f657e80cc272
122
py
Python
schapp/schedule/admin.py
oliverspizza/time_clock
172f578b1f2dfcc2bc64d95eac747191f1c897a6
[ "MIT" ]
null
null
null
schapp/schedule/admin.py
oliverspizza/time_clock
172f578b1f2dfcc2bc64d95eac747191f1c897a6
[ "MIT" ]
null
null
null
schapp/schedule/admin.py
oliverspizza/time_clock
172f578b1f2dfcc2bc64d95eac747191f1c897a6
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Job, Shift admin.site.register(Job) admin.site.register(Shift)
20.333333
33
0.770492
18
122
5.222222
0.555556
0.191489
0.361702
0
0
0
0
0
0
0
0
0
0.139344
122
5
34
24.4
0.895238
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
8b270fb8b6ca69061ffda76b1a6f896a115ce600
123
py
Python
api/admin.py
Henrique-Miranda/Verzel_Catalogo
6cdfce32f7b10556077d0280fe4250406d80ca11
[ "MIT" ]
null
null
null
api/admin.py
Henrique-Miranda/Verzel_Catalogo
6cdfce32f7b10556077d0280fe4250406d80ca11
[ "MIT" ]
null
null
null
api/admin.py
Henrique-Miranda/Verzel_Catalogo
6cdfce32f7b10556077d0280fe4250406d80ca11
[ "MIT" ]
null
null
null
from django.contrib import admin from .views import Lesson, Module admin.site.register(Lesson) admin.site.register(Module)
24.6
33
0.821138
18
123
5.611111
0.555556
0.178218
0.336634
0
0
0
0
0
0
0
0
0
0.089431
123
5
34
24.6
0.901786
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
8c87019b6645c02df1224edba94be72bacd7c4c6
54
py
Python
src/cms/forms/bed_target_groups/__init__.py
digitalfabrik/coldaid-backend
b769510570d5921e30876565263813c0362994e2
[ "Apache-2.0" ]
4
2019-12-05T16:45:17.000Z
2020-05-09T07:26:34.000Z
src/cms/forms/bed_target_groups/__init__.py
digitalfabrik/coldaid-backend
b769510570d5921e30876565263813c0362994e2
[ "Apache-2.0" ]
56
2019-12-05T12:31:37.000Z
2021-01-07T15:47:45.000Z
src/cms/forms/bed_target_groups/__init__.py
digitalfabrik/coldaid-backend
b769510570d5921e30876565263813c0362994e2
[ "Apache-2.0" ]
2
2019-12-11T09:52:26.000Z
2020-05-09T07:26:38.000Z
from .bed_target_group_form import BedTargetGroupForm
27
53
0.907407
7
54
6.571429
1
0
0
0
0
0
0
0
0
0
0
0
0.074074
54
1
54
54
0.92
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
8c948a390a5f3d1801ef636e6c86db80ebaa98ee
120
py
Python
zisan/Seg/davisinteractive/storage/__init__.py
JintuZheng/zisan
84b30d1ee91754d4351841a2077c78146028adfc
[ "MIT" ]
40
2020-02-14T07:03:16.000Z
2022-03-07T10:52:18.000Z
zisan/Seg/davisinteractive/storage/__init__.py
EpsilionJT/zisan
84b30d1ee91754d4351841a2077c78146028adfc
[ "MIT" ]
1
2021-09-04T07:40:26.000Z
2021-09-04T14:51:03.000Z
zisan/Seg/davisinteractive/storage/__init__.py
EpsilionJT/zisan
84b30d1ee91754d4351841a2077c78146028adfc
[ "MIT" ]
9
2020-02-24T01:08:11.000Z
2021-12-15T07:35:14.000Z
from __future__ import absolute_import, division from .abstract import AbstractStorage from .local import LocalStorage
24
48
0.858333
14
120
7
0.642857
0
0
0
0
0
0
0
0
0
0
0
0.116667
120
4
49
30
0.924528
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
8cb4c52f22516844009dc69620fe95ad1899fa54
83
py
Python
pigar/tests/imports_example/mainfoobar.py
yasirroni/pigar
823a3c2478361d53dba408bea75e1766d253f3c0
[ "BSD-3-Clause" ]
959
2016-08-15T10:02:24.000Z
2022-03-31T12:35:39.000Z
pigar/tests/imports_example/mainfoobar.py
yasirroni/pigar
823a3c2478361d53dba408bea75e1766d253f3c0
[ "BSD-3-Clause" ]
67
2016-10-02T20:48:26.000Z
2022-01-08T16:29:58.000Z
pigar/tests/imports_example/mainfoobar.py
yasirroni/pigar
823a3c2478361d53dba408bea75e1766d253f3c0
[ "BSD-3-Clause" ]
64
2016-11-30T11:21:36.000Z
2022-02-18T19:33:37.000Z
from subbar.bar import bar import mainfoobar if __name__ == '__main__': bar()
13.833333
26
0.710843
11
83
4.636364
0.727273
0.352941
0
0
0
0
0
0
0
0
0
0
0.192771
83
5
27
16.6
0.761194
0
0
0
0
0
0.096386
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
8cf43ef091498f48e367b7b74b2d7ee4d6e32315
123
py
Python
httoop/proxy/__init__.py
spaceone/httoop
99f5f51a6ebab4bfdfd02d3705a0bffb5379b4a9
[ "MIT" ]
13
2015-01-07T19:39:02.000Z
2021-07-12T21:09:28.000Z
httoop/proxy/__init__.py
spaceone/httoop
99f5f51a6ebab4bfdfd02d3705a0bffb5379b4a9
[ "MIT" ]
9
2015-06-14T11:37:26.000Z
2020-12-11T09:12:30.000Z
httoop/proxy/__init__.py
spaceone/httoop
99f5f51a6ebab4bfdfd02d3705a0bffb5379b4a9
[ "MIT" ]
10
2015-05-28T05:51:46.000Z
2021-12-29T20:36:15.000Z
# -*- coding: utf-8 -*- from httoop.server import ServerStateMachine class ProxyStateMachine(ServerStateMachine): pass
15.375
44
0.764228
12
123
7.833333
0.916667
0
0
0
0
0
0
0
0
0
0
0.009346
0.130081
123
7
45
17.571429
0.869159
0.170732
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
0
0
0
5
507cd2c0c20c4dbb564d0187137f0795f261205f
121
py
Python
PathPlanning/utils/load_spline.py
curiousTauseef/SmoothPathPlanningFramework
5b59bf302013e6dca6f3896288b1d16568e8a1a3
[ "MIT" ]
1
2021-12-18T08:15:44.000Z
2021-12-18T08:15:44.000Z
PathPlanning/utils/load_spline.py
curiousTauseef/SmoothPathPlanningFramework
5b59bf302013e6dca6f3896288b1d16568e8a1a3
[ "MIT" ]
null
null
null
PathPlanning/utils/load_spline.py
curiousTauseef/SmoothPathPlanningFramework
5b59bf302013e6dca6f3896288b1d16568e8a1a3
[ "MIT" ]
null
null
null
import dill import pickle def load_spline(pickle_file): f = open(pickle_file, 'rb') return pickle.load(f)
17.285714
32
0.677686
18
121
4.388889
0.611111
0.253165
0
0
0
0
0
0
0
0
0
0
0.223141
121
7
33
17.285714
0.840426
0
0
0
0
0
0.017241
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.8
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
509c079b2de330586425d96ab7b47a6eb1c40cd7
1,302
py
Python
python/akg/ops/poly_gpu/resize_nearest_neighbor_grad.py
xqdan/akg
e28501611d73d3957a1f3c58eeb6b028f2f2765d
[ "Apache-2.0" ]
null
null
null
python/akg/ops/poly_gpu/resize_nearest_neighbor_grad.py
xqdan/akg
e28501611d73d3957a1f3c58eeb6b028f2f2765d
[ "Apache-2.0" ]
null
null
null
python/akg/ops/poly_gpu/resize_nearest_neighbor_grad.py
xqdan/akg
e28501611d73d3957a1f3c58eeb6b028f2f2765d
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """resize_nearest_neighbor_grad""" import akg import akg.topi as topi from akg.topi.cuda.injective_single_kernel import schedule_injective from akg.ops.gpu import resize_nearest_neighbor_grad @akg.schedule(schedule_injective) def resize_nearest_neighbor_grad_manual(grad, size, align_corners=True): """Resize_nearest_neighbor_grad with manual schedule.""" return resize_nearest_neighbor_grad.resize_nearest_neighbor_grad(grad, size, align_corners=align_corners) def resize_nearest_neighbor_grad_auto(grad, size, align_corners=True): """Resize_nearest_neighbor_grad with auto schedule.""" return resize_nearest_neighbor_grad.resize_nearest_neighbor_grad(grad, size, align_corners=align_corners)
44.896552
109
0.807988
192
1,302
5.260417
0.458333
0.128713
0.207921
0.247525
0.350495
0.29505
0.29505
0.29505
0.29505
0.29505
0
0.006987
0.120584
1,302
28
110
46.5
0.875109
0.530722
0
0.222222
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.444444
0
0.888889
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
50d07ac56b974c4ec3623dec585dcb39567bc184
53
py
Python
doodle.py
Noctsol/lib-py-helpme
500d42e79b1fc87effe3d0e61bf4f1afa68d86cf
[ "MIT" ]
null
null
null
doodle.py
Noctsol/lib-py-helpme
500d42e79b1fc87effe3d0e61bf4f1afa68d86cf
[ "MIT" ]
null
null
null
doodle.py
Noctsol/lib-py-helpme
500d42e79b1fc87effe3d0e61bf4f1afa68d86cf
[ "MIT" ]
null
null
null
"""File I use to write random code """ import helpu
10.6
34
0.679245
9
53
4
1
0
0
0
0
0
0
0
0
0
0
0
0.207547
53
4
35
13.25
0.857143
0.584906
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
0f9e8ab99c204766bf7cc1f6a13b74eae6ea10ee
1,923
py
Python
printing/fonts/PSFont_Symbol.py
notatallshaw/Grail-0.6
2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43
[ "CNRI-Jython" ]
22
2021-05-17T07:01:04.000Z
2021-10-31T09:03:29.000Z
printing/fonts/PSFont_Symbol.py
SimiCode/Grail-Web-Browser
16b86d3215068d334eacf6153b71a748eed53d3d
[ "CNRI-Jython" ]
17
2021-05-17T04:39:49.000Z
2021-09-06T14:50:39.000Z
printing/fonts/PSFont_Symbol.py
SimiCode/Grail-Web-Browser
16b86d3215068d334eacf6153b71a748eed53d3d
[ "CNRI-Jython" ]
6
2021-05-17T07:37:01.000Z
2022-01-09T10:26:24.000Z
# Character width information for PostScript font `Symbol' # generated from the Adobe Font Metric file `../../../../adobe/sy______.afm'. Adobe # copyright notice follows: # # Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved. # import PSFont font = PSFont.PSFont('Symbol', 'Symbol', [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 250, 333, 713, 500, 549, 833, 778, 439, 333, 333, 500, 549, 250, 549, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 278, 278, 549, 549, 549, 444, 549, 722, 667, 722, 612, 611, 763, 603, 722, 333, 631, 722, 686, 889, 722, 722, 768, 741, 556, 592, 611, 690, 439, 768, 645, 795, 611, 333, 863, 333, 658, 500, 500, 631, 549, 549, 494, 439, 521, 411, 603, 329, 603, 549, 549, 576, 521, 549, 549, 521, 549, 603, 439, 576, 713, 686, 493, 686, 494, 480, 200, 480, 549, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 620, 247, 549, 167, 713, 500, 753, 753, 753, 753, 1042, 987, 603, 987, 603, 400, 549, 411, 549, 549, 713, 494, 460, 549, 549, 549, 549, 1000, 603, 1000, 658, 823, 686, 795, 987, 768, 768, 823, 768, 768, 713, 713, 713, 713, 713, 713, 713, 768, 713, 790, 790, 890, 823, 549, 250, 713, 603, 603, 1042, 987, 603, 987, 603, 494, 329, 790, 790, 786, 713, 384, 384, 384, 384, 384, 384, 494, 494, 494, 494, 0, 329, 274, 686, 686, 686, 384, 384, 384, 384, 384, 384, 494, 494, 494, 0, ])
45.785714
88
0.451898
296
1,923
2.915541
0.277027
0.14832
0.215527
0.2781
0.235226
0.198146
0.173812
0.173812
0.173812
0.076477
0
0.557265
0.391576
1,923
41
89
46.902439
0.180342
0.131045
0
0.2
1
0
0.007212
0
0
0
0
0
0
1
0
false
0
0.028571
0
0.028571
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
0fa333abe9a4f971e3d2c767f176f8b13afa4acb
155
py
Python
ex2.py
sbyount/hard_ways
7a97a23b5a4cae4e043250b5cecb94941eabee13
[ "Apache-2.0" ]
null
null
null
ex2.py
sbyount/hard_ways
7a97a23b5a4cae4e043250b5cecb94941eabee13
[ "Apache-2.0" ]
null
null
null
ex2.py
sbyount/hard_ways
7a97a23b5a4cae4e043250b5cecb94941eabee13
[ "Apache-2.0" ]
null
null
null
# A comment # All is ignored print "I could have code like this" #don't print this # You can disable code # print this won't run print "this will run"
17.222222
55
0.703226
29
155
3.758621
0.689655
0.247706
0
0
0
0
0
0
0
0
0
0
0.225806
155
8
56
19.375
0.908333
0.529032
0
0
0
0
0.597015
0
0
0
0
0
0
0
null
null
0
0
null
null
1
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5
0ff9409e759d391b42ab823bf2434e73d6460a8f
47
py
Python
v3/tests/frontend-tests/binary-tree.py
ambadhan/OnlinePythonTutor
857bab941fbde20f1f020b05b7723094ddead62a
[ "MIT" ]
17
2021-12-09T11:31:44.000Z
2021-12-29T03:07:14.000Z
v3/tests/frontend-tests/binary-tree.py
heysachin/OnlinePythonTutor
0dcdacc7ff5be504dd6a47236ebc69dc0069f991
[ "MIT" ]
22
2017-09-17T03:59:16.000Z
2017-11-14T17:33:57.000Z
v3/tests/frontend-tests/binary-tree.py
heysachin/OnlinePythonTutor
0dcdacc7ff5be504dd6a47236ebc69dc0069f991
[ "MIT" ]
12
2021-12-09T11:31:46.000Z
2022-01-07T03:14:46.000Z
t = [[['a', 'b'], ['c', 'd']], [[1,2], [3,4]]]
23.5
46
0.191489
9
47
1
1
0
0
0
0
0
0
0
0
0
0
0.102564
0.170213
47
1
47
47
0.128205
0
0
0
0
0
0.085106
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
e8a65176569ef5f7deb5c4955a5a68707a002178
239
py
Python
src/moke/__init__.py
mcieslik-mctp/moke
5768245b66d35d23bf2d2c918657aa2ce0061197
[ "MIT" ]
1
2018-11-20T20:39:28.000Z
2018-11-20T20:39:28.000Z
src/moke/__init__.py
mcieslik-mctp/moke
5768245b66d35d23bf2d2c918657aa2ce0061197
[ "MIT" ]
1
2018-12-13T21:06:54.000Z
2018-12-13T21:06:54.000Z
src/moke/__init__.py
mcieslik-mctp/moke
5768245b66d35d23bf2d2c918657aa2ce0061197
[ "MIT" ]
null
null
null
""" :mod:`moke` =========== Moke is not like ``make``. See the documentation. """ from .core import * from .util import * # this is for chained pipes of moke scripts import signal signal.signal(signal.SIGPIPE, signal.SIG_DFL) del signal
17.071429
49
0.686192
35
239
4.657143
0.685714
0.220859
0.220859
0
0
0
0
0
0
0
0
0
0.154812
239
13
50
18.384615
0.806931
0.48954
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.6
0
0.6
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e8c8eae3953b975971f01cab180033eddeedfb6d
283
py
Python
scrapy/utils/decorator.py
jesuslosada/scrapy
8be28fe4ca8b1cd011d5f7e03661da8a6bb3217b
[ "BSD-3-Clause" ]
22
2018-03-13T13:51:41.000Z
2022-02-19T07:27:48.000Z
scrapy/utils/decorator.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
10
2020-02-11T23:34:28.000Z
2022-03-11T23:16:12.000Z
scrapy/utils/decorator.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
6
2017-12-28T03:59:54.000Z
2020-02-26T16:01:45.000Z
import warnings from scrapy.exceptions import ScrapyDeprecationWarning warnings.warn("Module `scrapy.utils.decorator` is deprecated, " "use `scrapy.utils.decorators` instead", ScrapyDeprecationWarning, stacklevel=2) from scrapy.utils.decorators import *
35.375
63
0.745583
28
283
7.535714
0.607143
0.156398
0.199052
0
0
0
0
0
0
0
0
0.004274
0.173145
283
7
64
40.428571
0.897436
0
0
0
0
0
0.29682
0.173145
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
2ce09012707dd569b5a5229378356a0e8a1138c3
43
py
Python
main.py
bjoekeldude/testprojekt
d7f8fa65327657a676a2075518fe7fe9cacf0e20
[ "MIT" ]
null
null
null
main.py
bjoekeldude/testprojekt
d7f8fa65327657a676a2075518fe7fe9cacf0e20
[ "MIT" ]
null
null
null
main.py
bjoekeldude/testprojekt
d7f8fa65327657a676a2075518fe7fe9cacf0e20
[ "MIT" ]
null
null
null
import mylibrary as ml ml.library_test()
8.6
22
0.767442
7
43
4.571429
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.162791
43
4
23
10.75
0.888889
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
2ce0efc48814ee3d04ddac765eb79efadfbede8a
135
py
Python
scavenger/api/definitions/__init__.py
Gulats/scavenger
ba8a712a60ae9f4f4ebdbc8111369c9a5954aa05
[ "MIT" ]
null
null
null
scavenger/api/definitions/__init__.py
Gulats/scavenger
ba8a712a60ae9f4f4ebdbc8111369c9a5954aa05
[ "MIT" ]
null
null
null
scavenger/api/definitions/__init__.py
Gulats/scavenger
ba8a712a60ae9f4f4ebdbc8111369c9a5954aa05
[ "MIT" ]
null
null
null
from .commons import interfaces, invariants, mixins from .error import ApiError, Detail, Issue, Location from .input import ProcessArgs
45
52
0.822222
17
135
6.529412
0.764706
0
0
0
0
0
0
0
0
0
0
0
0.118519
135
3
53
45
0.932773
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
2cf2b27b663674a897a1f0f43a1b66205e9b8712
18
py
Python
cloudmesh/common/__version__.py
jebeckford/cloudmesh-common
baccdc56a5e1258a4cf4b50503ccc9240f00de3c
[ "Apache-2.0" ]
null
null
null
cloudmesh/common/__version__.py
jebeckford/cloudmesh-common
baccdc56a5e1258a4cf4b50503ccc9240f00de3c
[ "Apache-2.0" ]
null
null
null
cloudmesh/common/__version__.py
jebeckford/cloudmesh-common
baccdc56a5e1258a4cf4b50503ccc9240f00de3c
[ "Apache-2.0" ]
null
null
null
version = "4.2.43"
18
18
0.611111
4
18
2.75
1
0
0
0
0
0
0
0
0
0
0
0.25
0.111111
18
1
18
18
0.4375
0
0
0
0
0
0.315789
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
fa37b29e9c0ad7527555e2bc63fc44896835f5bc
82
py
Python
bayom_e/solution_handling/__init__.py
dkauf42/bayota
104ba91746231be10419390a9d7ed8f2593a21bc
[ "BSD-3-Clause" ]
1
2021-07-23T18:09:55.000Z
2021-07-23T18:09:55.000Z
bayom_e/solution_handling/__init__.py
dkauf42/bayota
104ba91746231be10419390a9d7ed8f2593a21bc
[ "BSD-3-Clause" ]
null
null
null
bayom_e/solution_handling/__init__.py
dkauf42/bayota
104ba91746231be10419390a9d7ed8f2593a21bc
[ "BSD-3-Clause" ]
null
null
null
# __init__.py for solution_handling from .solutionhandler import SolutionHandler
20.5
44
0.853659
9
82
7.222222
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.109756
82
3
45
27.333333
0.890411
0.402439
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
fa481d3cad5e85c1be9d4466d47c07a0a549f796
3,501
py
Python
Dataloader.py
lcmmai/R-PSNN-for-multi-focus-image-fusion
3f1a07eceb417a298ab31cc6d9ccc99d964dd533
[ "Apache-2.0" ]
2
2021-11-10T14:12:16.000Z
2021-11-13T06:47:34.000Z
Dataloader.py
lcmmai/R-PSNN-for-multi-focus-image-fusion
3f1a07eceb417a298ab31cc6d9ccc99d964dd533
[ "Apache-2.0" ]
null
null
null
Dataloader.py
lcmmai/R-PSNN-for-multi-focus-image-fusion
3f1a07eceb417a298ab31cc6d9ccc99d964dd533
[ "Apache-2.0" ]
null
null
null
import os import numpy as np import torch from torch.utils import data from PIL import Image def load_train_list(load_img1_path, load_img2_path, load_groundtruth_path): #get train list filename_list = os.listdir(load_img1_path) #get file name of every image #the file name in each folder should be same dataset = [] for filename in filename_list: dataset.append((load_img1_path+filename, load_img2_path+filename, load_groundtruth_path+filename)) return dataset def load_test_list(load_img1_path, load_img2_path): #get test list filename_list = os.listdir(load_img1_path) #get file name of every image #the file name in each folder should be same dataset = [] for filename in filename_list: dataset.append((load_img1_path + filename, load_img2_path + filename)) return dataset class Train_data_loader(data.Dataset): def __init__(self, img1, img2, groundtruth, \ mode ='train', img_height = 350, img_width = 350): #image = 350*350,default mode = train self.mode = mode self.img_height = img_height self.img_width = img_width if mode == 'train': self.train_dataset = load_train_list(img1, img2, groundtruth) self.data_list = self.train_dataset print("Total training examples:", len(self.data_list)) def __getitem__(self, index): i1_path, i2_path, gr_path= self.data_list[index] i1 = Image.open(i1_path) i2 = Image.open(i2_path) gr = Image.open(gr_path) i1 = i1.resize((self.img_height, self.img_width), Image.ANTIALIAS) #resize image to target size which U-Net can process i2 = i2.resize((self.img_height, self.img_width), Image.ANTIALIAS) gr = gr.resize((self.img_height, self.img_width), Image.ANTIALIAS) i1 = torch.from_numpy(np.asarray(i1) / 255).float() #transform numpy to tensor i2 = torch.from_numpy(np.asarray(i2) / 255).float() gr = torch.from_numpy(np.asarray(gr) / 255).float() return i1.permute(2, 0, 1), i2.permute(2, 0, 1), gr.permute(2, 0, 1) #change dimension contents def __len__(self): return len(self.data_list) class Test_data_loader(data.Dataset): def __init__(self, img1, img2, \ mode='test', img_height=350, img_width=350): # image = 224*224,default mode = train self.mode = mode self.img_height = img_height self.img_width = img_width if mode == 'test': self.test_dataset = load_test_list(img1, img2) self.data_list = self.test_dataset print("Total testing examples:", len(self.data_list)) def __getitem__(self, index): i1_path, i2_path = self.data_list[index] i1 = Image.open(i1_path) i2 = Image.open(i2_path) # i1 = i1.resize((self.img_height, self.img_width), Image.ANTIALIAS) # resize image to target size which U-Net can process # i2 = i2.resize((self.img_height, self.img_width), Image.ANTIALIAS) i1 = torch.from_numpy(np.asarray(i1) / 255).float() # transform numpy to tensor i2 = torch.from_numpy(np.asarray(i2) / 255).float() return i1.permute(2, 0, 1), i2.permute(2, 0, 1)# change dimension contents def __len__(self): return len(self.data_list)
43.7625
132
0.62982
486
3,501
4.304527
0.17284
0.046845
0.045889
0.053537
0.783939
0.772945
0.772945
0.719407
0.719407
0.681166
0
0.040657
0.269352
3,501
80
133
43.7625
0.77717
0.166524
0
0.466667
0
0
0.023017
0
0
0
0
0
0
1
0.133333
false
0
0.083333
0.033333
0.35
0.033333
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
fa4a289f3b1183785572f2667ead7830cdbde1e3
1,724
py
Python
src/app/mod_user/models.py
tcouch360/WarwickQnA
904502ccc99a7f20692ea1a942ca2df34404c625
[ "MIT" ]
15
2018-07-20T08:38:42.000Z
2021-12-06T08:25:47.000Z
src/app/mod_user/models.py
tcouch360/WarwickQnA
904502ccc99a7f20692ea1a942ca2df34404c625
[ "MIT" ]
null
null
null
src/app/mod_user/models.py
tcouch360/WarwickQnA
904502ccc99a7f20692ea1a942ca2df34404c625
[ "MIT" ]
12
2018-03-02T02:36:20.000Z
2022-02-12T16:08:52.000Z
from app import db, login_manager from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from hashlib import md5 """This is the model for User class""" class User(UserMixin, db.Model): __tablename__ = "users" user_id = db.Column(db.Integer, primary_key = True, autoincrement = True) username = db.Column(db.String, index = True, unique = True) email = db.Column(db.String, index = True, unique = True) password_hash = db.Column(db.String(128)) last_seen = db.Column(db.DateTime) questions = db.relationship('Question', backref = 'author', lazy = 'dynamic') answers = db.relationship('Answer', backref = 'author', lazy = 'dynamic') comments = db.relationship('Comment', backref = 'author', lazy = 'dynamic') upvotes = db.relationship('Upvote', backref = 'author', lazy = 'dynamic') downvotes = db.relationship('Downvote', backref = 'author', lazy = 'dynamic') @property def password(self): raise AttributeError('password is not a readable attribute') """This generates password based on hashing """ @password.setter def password(self, password): self.password_hash = generate_password_hash(password) """This verifies password based on hashing""" def verify_password(self, password): return check_password_hash(self.password_hash, password) def get_id(self): return str(self.user_id) """Uses gravatar API""" def avatar(self, size): return 'http://www.gravatar.com/avatar/%s?d=identicon&s=%d' % (md5(self.email.encode('utf-8')).hexdigest(), size) def __repr__(self): return '<User %r>' % (self.username) """Refer to Flask/login documentation""" @login_manager.user_loader def user_loader(user_id): return User.query.get(int(user_id))
39.181818
115
0.734919
235
1,724
5.255319
0.417021
0.068016
0.040486
0.097166
0.05668
0.05668
0.05668
0.05668
0
0
0
0.003979
0.12529
1,724
44
116
39.181818
0.814987
0
0
0
1
0
0.133812
0
0
0
0
0
0
1
0.212121
false
0.272727
0.121212
0.151515
0.848485
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
5
d707acbc8cd0e3d2b1baed466e2546456b2b7a98
44,267
py
Python
src/automotive/core/android/android_service.py
philosophy912/automotive
de918611652b789a83545f346c1569c2c2c955a6
[ "Apache-2.0" ]
null
null
null
src/automotive/core/android/android_service.py
philosophy912/automotive
de918611652b789a83545f346c1569c2c2c955a6
[ "Apache-2.0" ]
null
null
null
src/automotive/core/android/android_service.py
philosophy912/automotive
de918611652b789a83545f346c1569c2c2c955a6
[ "Apache-2.0" ]
1
2022-02-28T07:23:28.000Z
2022-02-28T07:23:28.000Z
# -*- coding:utf-8 -*- # -------------------------------------------------------- # Copyright (C), 2016-2020, lizhe, All rights reserved # -------------------------------------------------------- # @Name: android_service.py # @Author: lizhe # @Created: 2021/5/1 - 23:48 # -------------------------------------------------------- from typing import Optional, List, Union from appium.webdriver.common.touch_action import TouchAction from selenium.common.exceptions import NoSuchElementException from .common.enums import SwipeDirectorEnum, ElementAttributeEnum, ToolTypeEnum from .common.typehints import Capability, Driver, LocatorElement, Locator, Element, Attributes, ClickPosition from .uiautomator2_client import UiAutomator2Client from .appium_client import AppiumClient from .adb import ADB from automotive.common.typehints import Position from automotive.common.singleton import Singleton from automotive.logger.logger import logger class AndroidService(metaclass=Singleton): """ Android 测试服务,实现主要的测试方式,同时兼容APPIUM和Uiautomator2两种框架, 前者当前最流行的开源框架https://github.com/appium/appium, 后者则为python的自动化测试框架https://github.com/openatx/uiautomator2 主要实现功能如: 1、获取元素及元素列表 2、获取子元素及子元素列表 3、获取元素的所有属性 4、获取元素的指定属性 5、滑动可滑动空间并查找指定的文本,并可以进行相关的操作 6、滑动空间滑动到头 7、获取控件的相关位置属性,如起始点、长宽信息 8、元素操作,如点击、双击、长按、拖动 9、获取元素的文本信息 10、文本框的输入和清除 11、指定元素是否存在 12、获取页面Activity的XML结构 android_service 也提供了原生的能力,可以直接调用driver实现, 如: android_service = AndroidService(ToolTypeEnum.APPIUM) android_service.driver.xxx """ _DEFAULT_TIME_OUT = 3 def __init__(self, tool_type: Union[ToolTypeEnum, str]): self.adb = ADB() if isinstance(tool_type, str): self.__type = ToolTypeEnum.from_value(tool_type) else: self.__type = tool_type if self.__type == ToolTypeEnum.APPIUM: self.__client = AppiumClient() elif self.__type == ToolTypeEnum.UIAUTOMATOR2: self.__client = UiAutomator2Client() else: raise TypeError(f"{tool_type} not support, only support APPIUM and UIAUTOMATOR2") @property def actions(self) -> TouchAction: if self.__type == ToolTypeEnum.UIAUTOMATOR2: raise TypeError(f"uiautomator2 is not support touch action") return self.__client.actions @property def driver(self) -> Driver: return self.__client.driver def connect(self, device_id: str, capability: Optional[Capability] = None, url: str = "http://localhost:4723/wd/hub"): """ 连接Android设备 appium: 连接Android设备并打开app u2: 连接Android设备,如果传入了package和activity,则需要打开app,否则不打开app :param url: appium的URL :param capability: appium相关的配置参数 :param device_id 设备编号 """ self.__client.connect(device_id=device_id, capability=capability, url=url) def disconnect(self): """ 断开连接,目前仅把driver置空 """ self.__client.disconnect() def open_app(self, package: str, activity: str): """ 打开应用。 由于u2连接的时候不会主动打开application,则需要调用该接口 u2/appium: 打开某个应用 :param package 应用的package :param activity 应用的activity """ self.__client.open_app(package=package, activity=activity) def close_app(self, package: str = None): """ 关闭应用 appium: 只能关闭所有应用 u2: 可以单独关闭某个应用,如果没有填则表示调用app_stop_all方法 :param package: 应用的package """ self.__client.close_app(package=package) def get_element(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> Element: """ 根据定位符获取元素 :param timeout: 超时时间, 默认3秒 :param locator: 定位符(只支持字典类型) :return: appium: 获取的是WebElement对象 u2: 获取的是UiObject对象 """ return self.__client.get_element(locator=locator, timeout=timeout) def get_elements(self, locator: Locator, timeout: float = _DEFAULT_TIME_OUT) -> List[Element]: """ 根据定位符获取元素列表 :param locator: 定位符(只支持字典类型) :param timeout: 超时时间, 默认3秒 :return: 元素列表集合 appium: 获取的是WebElement对象列表 u2: 获取的是UiObject对象列表 """ return self.__client.get_elements(locator=locator, timeout=timeout) def get_child_element(self, parent: LocatorElement, locator: Locator, timeout: float = _DEFAULT_TIME_OUT) -> Element: """ 在父元素中查找子元素 :param parent: 父元素 :param locator: 子元素定位符 :param timeout: 超时时间,默认3秒 :return: appium: 获取的是WebElement对象列表 u2: 获取的是UiObject对象列表 """ return self.__client.get_child_element(parent=parent, locator=locator, timeout=timeout) def get_child_elements(self, parent: LocatorElement, locator: Locator, timeout: float = _DEFAULT_TIME_OUT) -> List[Element]: """ 在父元素中查找子元素列表 :param parent: 父元素 :param locator: 子元素定位符 :param timeout: 超时时间,默认3秒 :return: 元素列表集合 appium: 获取的是WebElement对象列表 u2: 获取的是UiObject对象列表 """ return self.__client.get_child_elements(parent=parent, locator=locator, timeout=timeout) def get_element_attribute(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> Attributes: """ 获取元素的属性,以列表方式返回 :param locator: 子元素定位符 :param timeout: 超时时间,默认3秒 :return: 属性字典,键值对 key: ElementAttribute value: bool类型,True or False """ return self.__client.get_element_attribute(locator=locator, timeout=timeout) def is_checkable(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> bool: """ 元素是否可选择 :param locator: 定位符 :param timeout: 超时时间 :return: 是/否 """ return self.__client.get_element_attribute(locator=locator, timeout=timeout)[ElementAttributeEnum.CHECKABLE] def is_checked(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> bool: """ 元素是否可选中 :param locator: 定位符 :param timeout: 超时时间 :return: 是/否 """ return self.__client.get_element_attribute(locator=locator, timeout=timeout)[ElementAttributeEnum.CHECKED] def is_clickable(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> bool: """ 元素是否可点击 :param locator: 定位符 :param timeout: 超时时间 :return: 是/否 """ return self.__client.get_element_attribute(locator=locator, timeout=timeout)[ElementAttributeEnum.CLICKABLE] def is_enable(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> bool: """ 元素是否可用 :param locator: 定位符 :param timeout: 超时时间 :return: 是/否 """ return self.__client.get_element_attribute(locator=locator, timeout=timeout)[ElementAttributeEnum.ENABLED] def is_focusable(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> bool: """ 元素是否可以存在焦点 :param locator: 定位符 :param timeout: 超时时间 :return: 是/否 """ return self.__client.get_element_attribute(locator=locator, timeout=timeout)[ElementAttributeEnum.FOCUSABLE] def is_focused(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> bool: """ 元素是否焦点中 :param locator: 定位符 :param timeout: 超时时间 :return: 是/否 """ return self.__client.get_element_attribute(locator=locator, timeout=timeout)[ElementAttributeEnum.FOCUSED] def is_scrollable(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> bool: """ 元素是否可滑动 :param locator: 定位符 :param timeout: 超时时间 :return: 是/否 """ return self.__client.get_element_attribute(locator=locator, timeout=timeout)[ElementAttributeEnum.SCROLLABLE] def is_long_clickable(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> bool: """ 元素是否可长按 :param locator: 定位符 :param timeout: 超时时间 :return: 是/否 """ return self.__client.get_element_attribute(locator=locator, timeout=timeout)[ ElementAttributeEnum.LONG_CLICKABLE] def is_display(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> bool: """ 元素是否可显示,对于uiautomator2来说,默认可显示,即不准 :param locator: 定位符 :param timeout: 超时时间 :return: 是/否 """ return self.__client.get_element_attribute(locator=locator, timeout=timeout)[ElementAttributeEnum.CHECKABLE] def is_selected(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> bool: """ 元素是否可选择 :param locator: 定位符 :param timeout: 超时时间 :return: 是/否 """ return self.__client.get_element_attribute(locator=locator, timeout=timeout)[ElementAttributeEnum.SELECTED] def scroll_get_element(self, element: LocatorElement, locator: Locator, text: str, exact_match: bool = False, duration: Optional[float] = None, direct: Union[SwipeDirectorEnum, str] = SwipeDirectorEnum.UP, swipe_time: Optional[int] = None, swipe_percent: float = 0.8, timeout: float = _DEFAULT_TIME_OUT, wait_time: float = 1) -> Element: """ 在可滑动的空间中,查找文字所在的控件 :param swipe_time: 滑动次数,默认为None,即滑动到头 :param timeout: 超时时间 :param text: 行/列控件中要查找的文字 :param element: 可滑动的控件 :param locator: 滑动控件中行/列控件,一般来说是一般来说是classname: android.widget.LinearLayout :param exact_match: 是否精确查找 :param duration: 滑动持续时间 :param direct: 滑动方向 :param swipe_percent: 滑动的比例 :param wait_time: 每次滑动等待时间 :return: appium: 获取的是WebElement对象列表 u2: 获取的是UiObject对象列表 """ if isinstance(direct, str): direct = SwipeDirectorEnum.from_value(direct) return self.__client.scroll_get_element(element=element, locator=locator, text=text, exact_match=exact_match, duration=duration, direct=direct, swipe_time=swipe_time, swipe_percent=swipe_percent, timeout=timeout, wait_time=wait_time) def scroll_get_element_and_click(self, element: LocatorElement, locator: Locator, text: str, exact_match: bool = False, duration: Optional[float] = None, direct: Union[SwipeDirectorEnum, str] = SwipeDirectorEnum.UP, swipe_time: Optional[int] = None, swipe_percent: float = 0.8, timeout: float = _DEFAULT_TIME_OUT, wait_time: float = 1): """ 在可滑动的空间中,查找文字所在的控件 :param swipe_time: 滑动次数,默认为None,即滑动到头 :param timeout: 超时时间 :param text: 行/列控件中要查找的文字 :param element: 可滑动的控件 :param locator: 滑动控件中行/列控件,一般来说是一般来说是classname: android.widget.LinearLayout :param exact_match: 是否精确查找 :param duration: 滑动持续时间 :param direct: 滑动方向 :param swipe_percent: 滑动的比例 :param wait_time: 滑动等待时间 """ self.scroll_get_element(element=element, locator=locator, text=text, exact_match=exact_match, duration=duration, direct=direct, swipe_time=swipe_time, swipe_percent=swipe_percent, timeout=timeout, wait_time=wait_time).click() def scroll_up_get_element(self, element: LocatorElement, locator: Locator, text: str, exact_match: bool = False, duration: Optional[float] = None, swipe_time: Optional[int] = None, swipe_percent: float = 0.8, timeout: float = _DEFAULT_TIME_OUT, wait_time: float = 1) -> Element: """ 在可滑动的空间中,向上滑动并查找文字所在的控件 :param element: 可滑动的控件 :param locator: 滑动控件中行/列控件,一般来说是一般来说是classname: android.widget.LinearLayout :param text: 行/列控件中要查找的文字 :param exact_match: 是否精确查找 :param duration: 滑动持续时间 :param swipe_time: 滑动次数,默认为None,即滑动到头 :param swipe_percent: 滑动的比例 :param timeout: 超时时间 :param wait_time: 滑动等待时间 :return: 查询到的对象 """ return self.__client.scroll_get_element(element=element, locator=locator, text=text, exact_match=exact_match, duration=duration, direct=SwipeDirectorEnum.UP, swipe_time=swipe_time, swipe_percent=swipe_percent, timeout=timeout, wait_time=wait_time) def scroll_up_get_element_and_click(self, element: LocatorElement, locator: Locator, text: str, exact_match: bool = False, duration: Optional[float] = None, swipe_time: Optional[int] = None, swipe_percent: float = 0.8, timeout: float = _DEFAULT_TIME_OUT, wait_time: float = 1): """ 在可滑动的空间中,向上滑动并查找文字所在的控件, 并点击 :param element: 可滑动的控件 :param locator: 滑动控件中行/列控件,一般来说是一般来说是classname: android.widget.LinearLayout :param text: 行/列控件中要查找的文字 :param exact_match: 是否精确查找 :param duration: 滑动持续时间 :param swipe_time: 滑动次数,默认为None,即滑动到头 :param swipe_percent: 滑动的比例 :param timeout: 超时时间 :param wait_time: 滑动等待时间 """ self.__client.scroll_get_element(element=element, locator=locator, text=text, exact_match=exact_match, duration=duration, direct=SwipeDirectorEnum.UP, swipe_time=swipe_time, swipe_percent=swipe_percent, timeout=timeout, wait_time=wait_time).click() def scroll_down_get_element(self, element: LocatorElement, locator: Locator, text: str, exact_match: bool = False, duration: Optional[float] = None, swipe_time: Optional[int] = None, swipe_percent: float = 0.8, timeout: float = _DEFAULT_TIME_OUT, wait_time: float = 1) -> Element: """ 在可滑动的空间中,向下滑动并查找文字所在的控件 :param element: 可滑动的控件 :param locator: 滑动控件中行/列控件,一般来说是一般来说是classname: android.widget.LinearLayout :param text: 行/列控件中要查找的文字 :param exact_match: 是否精确查找 :param duration: 滑动持续时间 :param swipe_time: 滑动次数,默认为None,即滑动到头 :param swipe_percent: 滑动的比例 :param timeout: 超时时间 :param wait_time: 滑动等待时间 :return: 查询到的对象 """ return self.__client.scroll_get_element(element=element, locator=locator, text=text, exact_match=exact_match, duration=duration, direct=SwipeDirectorEnum.DOWN, swipe_time=swipe_time, swipe_percent=swipe_percent, timeout=timeout, wait_time=wait_time) def scroll_down_get_element_and_click(self, element: LocatorElement, locator: Locator, text: str, exact_match: bool = False, duration: Optional[float] = None, swipe_time: Optional[int] = None, swipe_percent: float = 0.8, timeout: float = _DEFAULT_TIME_OUT, wait_time: float = 1): """ 在可滑动的空间中,向下滑动并查找文字所在的控件,并点击 :param element: 可滑动的控件 :param locator: 滑动控件中行/列控件,一般来说是一般来说是classname: android.widget.LinearLayout :param text: 行/列控件中要查找的文字 :param exact_match: 是否精确查找 :param duration: 滑动持续时间 :param swipe_time: 滑动次数,默认为None,即滑动到头 :param swipe_percent: 滑动的比例 :param wait_time: 滑动等待时间 :param timeout: 超时时间 """ self.__client.scroll_get_element(element=element, locator=locator, text=text, exact_match=exact_match, duration=duration, direct=SwipeDirectorEnum.DOWN, swipe_time=swipe_time, swipe_percent=swipe_percent, timeout=timeout, wait_time=wait_time).click() def scroll_left_get_element(self, element: LocatorElement, locator: Locator, text: str, exact_match: bool = False, duration: Optional[float] = None, swipe_time: Optional[int] = None, swipe_percent: float = 0.8, timeout: float = _DEFAULT_TIME_OUT, wait_time: float = 1) -> Element: """ 在可滑动的空间中,向左滑动并查找文字所在的控件 :param element: 可滑动的控件 :param locator: 滑动控件中行/列控件,一般来说是一般来说是classname: android.widget.LinearLayout :param text: 行/列控件中要查找的文字 :param exact_match: 是否精确查找 :param duration: 滑动持续时间 :param swipe_time: 滑动次数,默认为None,即滑动到头 :param swipe_percent: 滑动的比例 :param timeout: 超时时间 :param wait_time: 滑动等待时间 :return: 查询到的对象 """ return self.__client.scroll_get_element(element=element, locator=locator, text=text, exact_match=exact_match, duration=duration, direct=SwipeDirectorEnum.LEFT, swipe_time=swipe_time, swipe_percent=swipe_percent, timeout=timeout, wait_time=wait_time) def scroll_left_get_element_and_click(self, element: LocatorElement, locator: Locator, text: str, exact_match: bool = False, duration: Optional[float] = None, swipe_time: Optional[int] = None, swipe_percent: float = 0.8, timeout: float = _DEFAULT_TIME_OUT, wait_time: float = 1): """ 在可滑动的空间中,向左滑动并查找文字所在的控件, 并点击 :param element: 可滑动的控件 :param locator: 滑动控件中行/列控件,一般来说是一般来说是classname: android.widget.LinearLayout :param text: 行/列控件中要查找的文字 :param exact_match: 是否精确查找 :param duration: 滑动持续时间 :param swipe_time: 滑动次数,默认为None,即滑动到头 :param swipe_percent: 滑动的比例 :param timeout: 超时时间 :param wait_time: 滑动等待时间 :return: 查询到的对象 """ self.__client.scroll_get_element(element=element, locator=locator, text=text, exact_match=exact_match, duration=duration, direct=SwipeDirectorEnum.LEFT, swipe_time=swipe_time, swipe_percent=swipe_percent, timeout=timeout, wait_time=wait_time).click() def scroll_right_get_element(self, element: LocatorElement, locator: Locator, text: str, exact_match: bool = False, duration: Optional[float] = None, swipe_time: Optional[int] = None, swipe_percent: float = 0.8, timeout: float = _DEFAULT_TIME_OUT, wait_time: float = 1) -> Element: """ 在可滑动的空间中,向右滑动并查找文字所在的控件 :param element: 可滑动的控件 :param locator: 滑动控件中行/列控件,一般来说是一般来说是classname: android.widget.LinearLayout :param text: 行/列控件中要查找的文字 :param exact_match: 是否精确查找 :param duration: 滑动持续时间 :param swipe_time: 滑动次数,默认为None,即滑动到头 :param swipe_percent: 滑动的比例 :param timeout: 超时时间 :param wait_time: 滑动等待时间 :return: 查询到的对象 """ return self.__client.scroll_get_element(element=element, locator=locator, text=text, exact_match=exact_match, duration=duration, direct=SwipeDirectorEnum.RIGHT, swipe_time=swipe_time, swipe_percent=swipe_percent, timeout=timeout, wait_time=wait_time) def scroll_right_get_element_and_click(self, element: LocatorElement, locator: Locator, text: str, exact_match: bool = False, duration: Optional[float] = None, swipe_time: Optional[int] = None, swipe_percent: float = 0.8, timeout: float = _DEFAULT_TIME_OUT, wait_time: float = 1): """ 在可滑动的空间中,向右滑动并查找文字所在的控件 :param element: 可滑动的控件 :param locator: 滑动控件中行/列控件,一般来说是一般来说是classname: android.widget.LinearLayout :param text: 行/列控件中要查找的文字 :param exact_match: 是否精确查找 :param duration: 滑动持续时间 :param swipe_time: 滑动次数,默认为None,即滑动到头 :param swipe_percent: 滑动的比例 :param timeout: 超时时间 :param wait_time: 滑动等待时间 :return: 查询到的对象 """ self.__client.scroll_get_element(element=element, locator=locator, text=text, exact_match=exact_match, duration=duration, direct=SwipeDirectorEnum.RIGHT, swipe_time=swipe_time, swipe_percent=swipe_percent, timeout=timeout, wait_time=wait_time).click() def get_location(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> Position: """ 获取元素的位置 :param timeout: 超时时间 :param locator: 定位符(只支持字典类型) :return: 元素在屏幕中的位置, x, y, width, height """ return self.__client.get_location(locator=locator, timeout=timeout) def get_device_id(self) -> str: """ 获取device id :return: device_id """ return self.__client.get_device_id() def click_if_attributes(self, locator: Union[ClickPosition, LocatorElement], attributes: Attributes, timeout: float = _DEFAULT_TIME_OUT): """ 根据多个属性值判断 :param locator: 定位符 :param attributes: 属性值字典 :param timeout: 超时时间 """ current_attributes = self.__client.get_element_attribute(locator, timeout) flag = True for element_attribute, status in attributes.items(): if current_attributes[element_attribute] != status: flag = False if flag: self.__client.click(locator, timeout) def click_if_attribute(self, locator: Union[ClickPosition, LocatorElement], element_attribute: ElementAttributeEnum, status: bool, timeout: float = _DEFAULT_TIME_OUT): """ 首先过滤ElementAttributeEnum中的DISPLAYED和TEXT属性 首先找到这个元素,然后判断属性值是否为Ture和False,当满足属性值等于status, 则点击 """ self.__client.click_if_attribute(locator=locator, element_attribute=element_attribute, status=status, timeout=timeout) def click_if_checkable(self, locator: Union[ClickPosition, LocatorElement], status: bool, timeout: float = _DEFAULT_TIME_OUT): """ 当定位到的元素状态和status一致的时候,进行点击 :param locator: 定位符 :param status: 元素CHECKABLE属性状态 :param timeout: 超时时间 """ self.__client.click_if_attribute(locator, ElementAttributeEnum.CHECKABLE, status, timeout) def click_if_checked(self, locator: Union[ClickPosition, LocatorElement], status: bool, timeout: float = _DEFAULT_TIME_OUT): """ 当定位到的元素状态和status一致的时候,进行点击 :param locator: 定位符 :param status: 元素CHECKABLE属性状态 :param timeout: 超时时间 """ self.__client.click_if_attribute(locator, ElementAttributeEnum.CHECKED, status, timeout) def click_if_clickable(self, locator: Union[ClickPosition, LocatorElement], status: bool, timeout: float = _DEFAULT_TIME_OUT): """ 当定位到的元素状态和status一致的时候,进行点击 :param locator: 定位符 :param status: 元素CHECKABLE属性状态 :param timeout: 超时时间 """ self.__client.click_if_attribute(locator, ElementAttributeEnum.CLICKABLE, status, timeout) def click_if_enabled(self, locator: Union[ClickPosition, LocatorElement], status: bool, timeout: float = _DEFAULT_TIME_OUT): """ 当定位到的元素状态和status一致的时候,进行点击 :param locator: 定位符 :param status: 元素CHECKABLE属性状态 :param timeout: 超时时间 """ self.__client.click_if_attribute(locator, ElementAttributeEnum.ENABLED, status, timeout) def click_if_focusable(self, locator: Union[ClickPosition, LocatorElement], status: bool, timeout: float = _DEFAULT_TIME_OUT): """ 当定位到的元素状态和status一致的时候,进行点击 :param locator: 定位符 :param status: 元素CHECKABLE属性状态 :param timeout: 超时时间 """ self.__client.click_if_attribute(locator, ElementAttributeEnum.FOCUSABLE, status, timeout) def click_if_focused(self, locator: Union[ClickPosition, LocatorElement], status: bool, timeout: float = _DEFAULT_TIME_OUT): """ 当定位到的元素状态和status一致的时候,进行点击 :param locator: 定位符 :param status: 元素CHECKABLE属性状态 :param timeout: 超时时间 """ self.__client.click_if_attribute(locator, ElementAttributeEnum.FOCUSED, status, timeout) def click_if_scrollable(self, locator: Union[ClickPosition, LocatorElement], status: bool, timeout: float = _DEFAULT_TIME_OUT): """ 当定位到的元素状态和status一致的时候,进行点击 :param locator: 定位符 :param status: 元素CHECKABLE属性状态 :param timeout: 超时时间 """ self.__client.click_if_attribute(locator, ElementAttributeEnum.SCROLLABLE, status, timeout) def click_if_long_clickable(self, locator: Union[ClickPosition, LocatorElement], status: bool, timeout: float = _DEFAULT_TIME_OUT): """ 当定位到的元素状态和status一致的时候,进行点击 :param locator: 定位符 :param status: 元素CHECKABLE属性状态 :param timeout: 超时时间 """ self.__client.click_if_attribute(locator, ElementAttributeEnum.LONG_CLICKABLE, status, timeout) def click_if_selected(self, locator: Union[ClickPosition, LocatorElement], status: bool, timeout: float = _DEFAULT_TIME_OUT): """ 当定位到的元素状态和status一致的时候,进行点击 :param locator: 定位符 :param status: 元素CHECKABLE属性状态 :param timeout: 超时时间 """ self.__client.click_if_attribute(locator, ElementAttributeEnum.SELECTED, status, timeout) def click(self, locator: Union[ClickPosition, LocatorElement], timeout: float = _DEFAULT_TIME_OUT): """ 点击元素的某个位置 :param locator: 定位符 tuple: 点击x, y坐标(TIPS: 如果直接传入的是X,Y)则后续的偏移不可用 str: 查找文字并点击,即dict中只指定text元素 dict: 查找元素并进行点击操作 WebElement, UiObject: 直接对元素进行点击操作(前者仅适用于appium,后者适用于u2) :param timeout: 超时时间, 默认3秒 """ logger.debug(f"locator is {locator}") self.__client.click(locator=locator, timeout=timeout) def double_click(self, locator: Union[ClickPosition, LocatorElement], timeout: float = _DEFAULT_TIME_OUT, duration: float = 0.1): """ 点击元素的某个位置 :param duration: 两次点击的间隔时间,默认0.1秒 :param locator: 定位符 tuple: 点击x, y坐标(TIPS: 如果直接传入的是X,Y)则后续的偏移不可用 str: 查找文字并点击,即dict中只指定text元素 dict: 查找元素并进行点击操作 WebElement, UiObject: 直接对元素进行点击操作(前者仅适用于appium,后者适用于u2) :param timeout: 超时时间, 默认3秒 """ self.__client.double_click(locator=locator, timeout=timeout, duration=duration) def press(self, locator: Union[ClickPosition, LocatorElement], duration: float, timeout: float = _DEFAULT_TIME_OUT): """ 点击元素的某个位置 :param duration: 两次点击的间隔时间 :param locator: 定位符 tuple: 点击x, y坐标(TIPS: 如果直接传入的是X,Y)则后续的偏移不可用 str: 查找文字并点击,即dict中只指定text元素 dict: 查找元素并进行点击操作 WebElement, UiObject: 直接对元素进行点击操作(前者仅适用于appium,后者适用于u2) :param timeout: 超时时间, 默认3秒 """ self.__client.press(locator=locator, timeout=timeout, duration=duration) def drag(self, start_x: int, start_y: int, end_x: int, end_y: int, duration: int = 1): """ 从某点拖动到某点 :param start_x: 拖动的起始点x坐标 :param start_y: 拖动的起始点y坐标 :param end_x: 拖动的结束点x坐标 :param end_y: 拖动的结束点y坐标 :param duration: 拖动持续时间 """ self.__client.drag(start_x=start_x, start_y=start_y, end_x=end_x, end_y=end_y, duration=duration) def drag_element_to(self, locator1: LocatorElement, locator2: LocatorElement, duration: int = 1, timeout: float = _DEFAULT_TIME_OUT): """ 从某点拖动到某点 :param timeout: 超时时间 :param locator1: 定位符1 :param locator2: 定位符2 :param duration: 拖动持续时间 """ self.__client.drag_element_to(locator1=locator1, locator2=locator2, duration=duration, timeout=timeout) def drag_to(self, locator: LocatorElement, x: int, y: int, duration: int = 1, timeout: float = _DEFAULT_TIME_OUT): """ 从某点拖动到某点 :param timeout: 超时时间 :param locator: 定位符1 :param x: 拖动目的地的x :param y: 拖动目的地的y :param duration: 拖动持续时间 """ self.__client.drag_to(locator=locator, x=x, y=y, duration=duration, timeout=timeout) def swipe_element(self, from_element: LocatorElement, to_element: LocatorElement, duration: Optional[float] = None, timeout: float = _DEFAULT_TIME_OUT): """ 滑动元素从from到to :param timeout: 超时时间, 默认3秒 :param from_element: 起始滑动的元素 :param to_element: 滑动截止的元素 :param duration: 持续时间 """ self.__client.swipe_element(from_element=from_element, to_element=to_element, duration=duration, timeout=timeout) def swipe(self, swipe_element: LocatorElement, locator: Locator, duration: Optional[float] = None, direction: Union[SwipeDirectorEnum, str] = SwipeDirectorEnum.UP, swipe_time: Optional[int] = None, wait_time: Optional[float] = None, timeout: float = _DEFAULT_TIME_OUT, swipe_percent: float = 0.8): """ 滑动元素 首先获取locator定位的元素, 并判断该元素是否可滑动,若不可滑动则发出警告信息 其次,获取x, y, width, height, 根据方向确定start_x, start_y, end_x, end_y 若swipe_time为None,表示滑动到顶 :param wait_time: 滑动等待时间 :param swipe_percent: 滑动比例 :param swipe_element: 可滑动的元素, 一般情况是android.widget.ListView :param timeout: 超时时间, 默认3秒 :param swipe_time: 滑动次数,默认为None表示滑动到头 :param locator: 用于定位是否滑动到最后的元素,一般是android.widget.LinearLayout :param duration: 持续时间 :param direction: 方向,只支持UP/DOWN/LEFT/RIGHT四个方向 """ if isinstance(direction, str): direction = SwipeDirectorEnum.from_name(direction) self.__client.swipe(swipe_element=swipe_element, locator=locator, duration=duration, direction=direction, swipe_time=swipe_time, wait_time=wait_time, timeout=timeout, swipe_percent=swipe_percent) def swipe_up(self, swipe_element: LocatorElement, locator: Locator, duration: Optional[float] = None, swipe_time: Optional[int] = None, wait_time: Optional[float] = None, timeout: float = _DEFAULT_TIME_OUT, swipe_percent: float = 0.8): """ 向上滑动元素 首先获取locator定位的元素, 并判断该元素是否可滑动,若不可滑动则发出警告信息 其次,获取x, y, width, height, 根据方向确定start_x, start_y, end_x, end_y 若swipe_time为None,表示滑动到顶 :param wait_time: 滑动等待时间 :param swipe_percent: 滑动比例 :param swipe_element: 可滑动的元素, 一般情况是android.widget.ListView :param timeout: 超时时间, 默认3秒 :param swipe_time: 滑动次数,默认为None表示滑动到头 :param locator: 用于定位是否滑动到最后的元素,一般是android.widget.LinearLayout :param duration: 持续时间 """ self.__client.swipe(swipe_element=swipe_element, locator=locator, duration=duration, direction=SwipeDirectorEnum.UP, swipe_time=swipe_time, wait_time=wait_time, timeout=timeout, swipe_percent=swipe_percent) def swipe_down(self, swipe_element: LocatorElement, locator: Locator, duration: Optional[float] = None, swipe_time: Optional[int] = None, wait_time: Optional[float] = None, timeout: float = _DEFAULT_TIME_OUT, swipe_percent: float = 0.8): """ 向下滑动元素 首先获取locator定位的元素, 并判断该元素是否可滑动,若不可滑动则发出警告信息 其次,获取x, y, width, height, 根据方向确定start_x, start_y, end_x, end_y 若swipe_time为None,表示滑动到顶 :param wait_time: 滑动等待时间 :param swipe_percent: 滑动比例 :param swipe_element: 可滑动的元素, 一般情况是android.widget.ListView :param timeout: 超时时间, 默认3秒 :param swipe_time: 滑动次数,默认为None表示滑动到头 :param locator: 用于定位是否滑动到最后的元素,一般是android.widget.LinearLayout :param duration: 持续时间 """ self.__client.swipe(swipe_element=swipe_element, locator=locator, duration=duration, direction=SwipeDirectorEnum.DOWN, swipe_time=swipe_time, wait_time=wait_time, timeout=timeout, swipe_percent=swipe_percent) def swipe_left(self, swipe_element: LocatorElement, locator: Locator, duration: Optional[float] = None, swipe_time: Optional[int] = None, wait_time: Optional[float] = None, timeout: float = _DEFAULT_TIME_OUT, swipe_percent: float = 0.8): """ 向左滑动元素 首先获取locator定位的元素, 并判断该元素是否可滑动,若不可滑动则发出警告信息 其次,获取x, y, width, height, 根据方向确定start_x, start_y, end_x, end_y 若swipe_time为None,表示滑动到顶 :param wait_time: 滑动等待时间 :param swipe_percent: 滑动比例 :param swipe_element: 可滑动的元素, 一般情况是android.widget.ListView :param timeout: 超时时间, 默认3秒 :param swipe_time: 滑动次数,默认为None表示滑动到头 :param locator: 用于定位是否滑动到最后的元素,一般是android.widget.LinearLayout :param duration: 持续时间 """ self.__client.swipe(swipe_element=swipe_element, locator=locator, duration=duration, direction=SwipeDirectorEnum.LEFT, swipe_time=swipe_time, wait_time=wait_time, timeout=timeout, swipe_percent=swipe_percent) def swipe_right(self, swipe_element: LocatorElement, locator: Locator, duration: Optional[float] = None, swipe_time: Optional[int] = None, wait_time: Optional[float] = None, timeout: float = _DEFAULT_TIME_OUT, swipe_percent: float = 0.8): """ 向右滑动元素 首先获取locator定位的元素, 并判断该元素是否可滑动,若不可滑动则发出警告信息 其次,获取x, y, width, height, 根据方向确定start_x, start_y, end_x, end_y 若swipe_time为None,表示滑动到顶 :param wait_time: 滑动等待时间 :param swipe_percent: 滑动比例 :param swipe_element: 可滑动的元素, 一般情况是android.widget.ListView :param timeout: 超时时间, 默认3秒 :param swipe_time: 滑动次数,默认为None表示滑动到头 :param locator: 用于定位是否滑动到最后的元素,一般是android.widget.LinearLayout :param duration: 持续时间 """ self.__client.swipe(swipe_element=swipe_element, locator=locator, duration=duration, direction=SwipeDirectorEnum.RIGHT, swipe_time=swipe_time, wait_time=wait_time, timeout=timeout, swipe_percent=swipe_percent) def swipe_point(self, start: ClickPosition, end: ClickPosition, swipe_time: int, duration: float): """ 滑动点 :param start: 起点 :param end: 终点 :param swipe_time: 滑动次数 :param duration: 每次滑动持续时间 """ self.__client.swipe_point(start_point=start, end_point=end, swipe_time=swipe_time, duration=duration) def swipe_in_element(self, element: LocatorElement, swipe_time: int, duration: float, percent: float = 0.8, director: SwipeDirectorEnum = SwipeDirectorEnum.UP): """ 滑动可滑动元素 :param element: 可滑动的元素 :param percent: 滑动幅度 :param swipe_time: 滑动次数 :param duration: 每次滑动持续时间 :param director: 滑动方向 """ self.__client.swipe_in_element(element=element, swipe_time=swipe_time, duration=duration, percent=percent, director=director) def swipe_up_in_element(self, element: LocatorElement, swipe_time: int, duration: float, percent: float = 0.8, director: SwipeDirectorEnum = SwipeDirectorEnum.DOWN): """ 滑动可滑动元素 :param element: 可滑动的元素 :param percent: 滑动幅度 :param swipe_time: 滑动次数 :param duration: 每次滑动持续时间 :param director:滑动方向 """ self.__client.swipe_in_element(element=element, swipe_time=swipe_time, duration=duration, percent=percent, director=director) def swipe_down_in_element(self, element: LocatorElement, swipe_time: int, duration: float, percent: float = 0.8, director: SwipeDirectorEnum = SwipeDirectorEnum.DOWN): """ 滑动可滑动元素 :param element: 可滑动的元素 :param percent: 滑动幅度 :param swipe_time: 滑动次数 :param duration: 每次滑动持续时间 :param director:滑动方向 """ self.__client.swipe_in_element(element=element, swipe_time=swipe_time, duration=duration, percent=percent, director=director) def swipe_left_in_element(self, element: LocatorElement, swipe_time: int, duration: float, percent: float = 0.8, director: SwipeDirectorEnum = SwipeDirectorEnum.LEFT): """ 滑动可滑动元素 :param element: 可滑动的元素 :param percent: 滑动幅度 :param swipe_time: 滑动次数 :param duration: 每次滑动持续时间 :param director:滑动方向 """ self.__client.swipe_in_element(element=element, swipe_time=swipe_time, duration=duration, percent=percent, director=director) def swipe_right_in_element(self, element: LocatorElement, swipe_time: int, duration: float, percent: float = 0.8, director: SwipeDirectorEnum = SwipeDirectorEnum.LEFT): """ 滑动可滑动元素 :param element: 可滑动的元素 :param percent: 滑动幅度 :param swipe_time: 滑动次数 :param duration: 每次滑动持续时间 :param director:滑动方向 """ self.__client.swipe_in_element(element=element, swipe_time=swipe_time, duration=duration, percent=percent, director=director) def get_text(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> str: """ 获取元素的文本 :param locator: 定位符 :param timeout: 超时时间,默认3秒 :return: element的文本 """ return self.__client.get_text(locator=locator, timeout=timeout) def input_text(self, locator: LocatorElement, text: str, timeout: float = _DEFAULT_TIME_OUT): """ 对指定控件输入文本信息 :param timeout: 超时时间, 默认3秒 :param locator: 定位符(只支持字典类型) :param text: 要输入的文字 """ self.__client.input_text(locator=locator, text=text, timeout=timeout) def clear_text(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT): """ 清空编辑框中的文字 :param timeout: 超时时间, 默认3秒 :param locator: 定位符(只支持字典类型) """ self.__client.clear_text(locator=locator, timeout=timeout) def screen_shot(self, file: str): """ 截图到本地文件 :param file: 要存储的文件 """ self.__client.screen_shot(file=file) def get_xml_struct(self) -> str: """ 获取xml结构 :return: xml结构字符串 """ return self.__client.get_xml_struct() def exist(self, locator: LocatorElement, timeout: float = _DEFAULT_TIME_OUT) -> bool: """ 元素是否存在 :return: 存在/不存在 """ try: self.__client.get_element(locator=locator, timeout=timeout) return True except NoSuchElementException: return False
32.241078
120
0.559514
4,016
44,267
5.950199
0.096365
0.031637
0.031051
0.05005
0.788584
0.760253
0.737487
0.726523
0.702503
0.676222
0
0.00515
0.359568
44,267
1,372
121
32.264577
0.837743
0.262927
0
0.56068
0
0
0.005258
0
0
0
0
0
0
1
0.167476
false
0
0.026699
0.002427
0.26699
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
d7217453aff6afed19aa3171abfd66c6ba9f60f0
85
py
Python
exercises/python/dummy_tax_calculator.py
ATKata/tax_calculator
124111b2cd7a963c67a5a090cfc53e06eba08468
[ "Apache-2.0" ]
1
2019-01-21T10:09:54.000Z
2019-01-21T10:09:54.000Z
exercises/python/dummy_tax_calculator.py
ATKata/tax_calculator
124111b2cd7a963c67a5a090cfc53e06eba08468
[ "Apache-2.0" ]
20
2019-01-22T13:49:31.000Z
2022-01-28T17:43:41.000Z
exercises/python/dummy_tax_calculator.py
ATKata/tax_calculator
124111b2cd7a963c67a5a090cfc53e06eba08468
[ "Apache-2.0" ]
63
2019-01-16T15:16:25.000Z
2022-01-25T09:35:22.000Z
class DummyTaxCalculator(): def calculate_tax(self, vehicle): return -1
17
37
0.670588
9
85
6.222222
1
0
0
0
0
0
0
0
0
0
0
0.015385
0.235294
85
4
38
21.25
0.846154
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
d73ba840708521429534dc81dc661abd233fda4f
2,219
py
Python
lib/third_party/ml_sdk/cloud/ml/prediction/__init__.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/third_party/ml_sdk/cloud/ml/prediction/__init__.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/third_party/ml_sdk/cloud/ml/prediction/__init__.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # pylint: disable=g-import-not-at-top """Classes and methods for predictions on a trained machine learning model. """ from ._interfaces import Model from ._interfaces import PredictionClient from .custom_code_utils import create_processor_class from .custom_code_utils import create_user_model from .custom_code_utils import load_custom_class from .custom_code_utils import POSTPROCESS_KEY from .custom_code_utils import PREPROCESS_KEY from .prediction_lib import create_client from .prediction_lib import create_model from .prediction_lib import local_predict from .prediction_utils import ALIAS_TIME from .prediction_utils import BaseModel from .prediction_utils import COLUMNARIZE_TIME from .prediction_utils import copy_model_to_local from .prediction_utils import decode_base64 from .prediction_utils import detect_framework from .prediction_utils import does_signature_contain_str from .prediction_utils import ENCODE_TIME from .prediction_utils import ENGINE from .prediction_utils import FRAMEWORK from .prediction_utils import LOCAL_MODEL_PATH from .prediction_utils import PredictionError from .prediction_utils import ROWIFY_TIME from .prediction_utils import SCIKIT_LEARN_FRAMEWORK_NAME from .prediction_utils import SESSION_RUN_ENGINE_NAME from .prediction_utils import SESSION_RUN_TIME from .prediction_utils import SIGNATURE_KEY from .prediction_utils import SK_XGB_FRAMEWORK_NAME from .prediction_utils import Stats from .prediction_utils import TENSORFLOW_FRAMEWORK_NAME from .prediction_utils import Timer from .prediction_utils import UNALIAS_TIME from .prediction_utils import XGBOOST_FRAMEWORK_NAME
41.867925
75
0.847679
321
2,219
5.610592
0.392523
0.171016
0.242643
0.319267
0.338701
0.144364
0.043309
0
0
0
0
0.005084
0.113565
2,219
52
76
42.673077
0.910524
0.305994
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
d76d72807ab813f355e11c221c4bb28b85d6774f
190
py
Python
app/users/serializers.py
prapeller/blackemployer_api
ae9232773e6e164b22ffccf0b39dd9a4c2a036cf
[ "MIT" ]
null
null
null
app/users/serializers.py
prapeller/blackemployer_api
ae9232773e6e164b22ffccf0b39dd9a4c2a036cf
[ "MIT" ]
null
null
null
app/users/serializers.py
prapeller/blackemployer_api
ae9232773e6e164b22ffccf0b39dd9a4c2a036cf
[ "MIT" ]
null
null
null
from .models import User from rest_framework.serializers import ModelSerializer class UserModelSerializer(ModelSerializer): class Meta: model = User fields = '__all__'
21.111111
54
0.736842
19
190
7.105263
0.736842
0.296296
0
0
0
0
0
0
0
0
0
0
0.210526
190
8
55
23.75
0.9
0
0
0
0
0
0.036842
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
d793adb2b995ed11f1036c95eced53090713c6f0
127
py
Python
chat/admin.py
cschlyter/chat_project
bb94d334aca4037b9c1e292a15723aff45022b00
[ "MIT" ]
null
null
null
chat/admin.py
cschlyter/chat_project
bb94d334aca4037b9c1e292a15723aff45022b00
[ "MIT" ]
null
null
null
chat/admin.py
cschlyter/chat_project
bb94d334aca4037b9c1e292a15723aff45022b00
[ "MIT" ]
null
null
null
from django.contrib import admin from chat.models import Room, Message admin.site.register(Room) admin.site.register(Message)
21.166667
37
0.818898
19
127
5.473684
0.578947
0.173077
0.326923
0
0
0
0
0
0
0
0
0
0.094488
127
5
38
25.4
0.904348
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
ad23b04a542a37e1625f30919b6503c1d81b7343
143
py
Python
old/05/02.py
systemquant/book-pandas-for-finance
90b7eb9be1de20a12ae72b9bb5d51424a979b174
[ "MIT" ]
10
2021-02-04T12:49:56.000Z
2022-03-26T11:28:11.000Z
old/05/02.py
systemquant/book-pandas-for-finance
90b7eb9be1de20a12ae72b9bb5d51424a979b174
[ "MIT" ]
1
2022-03-24T03:47:14.000Z
2022-03-24T03:54:52.000Z
old/05/02.py
systemquant/book-pandas-for-finance
90b7eb9be1de20a12ae72b9bb5d51424a979b174
[ "MIT" ]
4
2021-07-17T16:50:15.000Z
2022-03-22T05:55:34.000Z
import pandas as pd dates = ["2019-06-07", "2019-06-05", "2019-06-04", "2019-06-03", "2019-05-31"] index = pd.to_datetime(dates) print(index)
23.833333
78
0.657343
27
143
3.444444
0.592593
0.258065
0
0
0
0
0
0
0
0
0
0.314961
0.111888
143
5
79
28.6
0.417323
0
0
0
0
0
0.34965
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0.25
1
0
0
null
1
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
a8ed5f974fdb8e9490e6f30e263af81550a9ad80
62
py
Python
brl_baselines/qmdp/__init__.py
gilwoolee/brl_baselines
c85df28c0f2dfbd69d3d27928bcbabf36a3663bb
[ "BSD-3-Clause" ]
null
null
null
brl_baselines/qmdp/__init__.py
gilwoolee/brl_baselines
c85df28c0f2dfbd69d3d27928bcbabf36a3663bb
[ "BSD-3-Clause" ]
null
null
null
brl_baselines/qmdp/__init__.py
gilwoolee/brl_baselines
c85df28c0f2dfbd69d3d27928bcbabf36a3663bb
[ "BSD-3-Clause" ]
null
null
null
from brl_baselines.qmdp.policies import QFunction, QMDPPolicy
31
61
0.870968
8
62
6.625
1
0
0
0
0
0
0
0
0
0
0
0
0.080645
62
1
62
62
0.929825
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
d128e1bba1b9c3a85d48e43c2da4ebb38d76e766
35
py
Python
Chapter 8/tango_with_django_project/_init__.py
Recol/Django-Tango
8da577fa640d5d838a0e750de1b028d7912fa24d
[ "Apache-2.0" ]
null
null
null
Chapter 8/tango_with_django_project/_init__.py
Recol/Django-Tango
8da577fa640d5d838a0e750de1b028d7912fa24d
[ "Apache-2.0" ]
null
null
null
Chapter 8/tango_with_django_project/_init__.py
Recol/Django-Tango
8da577fa640d5d838a0e750de1b028d7912fa24d
[ "Apache-2.0" ]
null
null
null
# edit files to allow upload to git
35
35
0.771429
7
35
3.857143
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.2
35
1
35
35
0.964286
0.942857
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
d14cd8fb73bd5986a2db0fb17ef5beab2128b0c4
166
py
Python
blurr/core/aggregate_variable.py
ddrightnow/blurr
a8745101d4a8a85ccf1efc608dba8486d3cebb49
[ "Apache-2.0" ]
null
null
null
blurr/core/aggregate_variable.py
ddrightnow/blurr
a8745101d4a8a85ccf1efc608dba8486d3cebb49
[ "Apache-2.0" ]
7
2019-12-16T20:58:29.000Z
2022-02-09T23:57:32.000Z
blurr/core/aggregate_variable.py
ddrightnow/blurr
a8745101d4a8a85ccf1efc608dba8486d3cebb49
[ "Apache-2.0" ]
null
null
null
from blurr.core.aggregate import Aggregate, AggregateSchema class VariableAggregateSchema(AggregateSchema): pass class VariableAggregate(Aggregate): pass
16.6
59
0.807229
15
166
8.933333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.138554
166
9
60
18.444444
0.937063
0
0
0.4
0
0
0
0
0
0
0
0
0
1
0
true
0.4
0.2
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
1
0
0
5
d14fd38abaf5fccd22d5c6491ffbe6cb17655360
274
py
Python
example/drf_integrations_example/admin.py
yoyowallet/drf-integrations-framework
7cf5cd28e5aff80c9b1a34b461294f4bd3108fa9
[ "MIT" ]
1
2020-07-09T11:39:19.000Z
2020-07-09T11:39:19.000Z
example/drf_integrations_example/admin.py
yoyowallet/drf-integrations-framework
7cf5cd28e5aff80c9b1a34b461294f4bd3108fa9
[ "MIT" ]
5
2020-07-08T11:00:26.000Z
2021-01-13T09:33:09.000Z
example/drf_integrations_example/admin.py
yoyowallet/drf-integrations-framework
7cf5cd28e5aff80c9b1a34b461294f4bd3108fa9
[ "MIT" ]
2
2021-08-12T12:23:54.000Z
2021-09-20T06:45:38.000Z
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from . import models admin.site.register(models.User, UserAdmin) admin.site.register(models.Organisation) admin.site.register(models.IntegrationUser) admin.site.register(models.UserPurchase)
27.4
47
0.835766
36
274
6.361111
0.388889
0.157205
0.296943
0.401747
0
0
0
0
0
0
0
0
0.069343
274
9
48
30.444444
0.898039
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.428571
0
0.428571
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
d1606681f2cc342ac59269497c5e49ac196196a8
280
py
Python
core/olymps_parser/urls.py
GrishaVoronin/Rulimpbot
61dd2ef2d4d654ff1ae9e602dc92ffaefef3077d
[ "Apache-2.0" ]
null
null
null
core/olymps_parser/urls.py
GrishaVoronin/Rulimpbot
61dd2ef2d4d654ff1ae9e602dc92ffaefef3077d
[ "Apache-2.0" ]
null
null
null
core/olymps_parser/urls.py
GrishaVoronin/Rulimpbot
61dd2ef2d4d654ff1ae9e602dc92ffaefef3077d
[ "Apache-2.0" ]
null
null
null
BASE_URL = "https://olimpiada.ru/" def get_request_url(request: str) -> str: return f'{BASE_URL}search?q={request}' def get_by_subject_url(subject_id: str) -> str: return f'{BASE_URL}activities?type=any&subject%5B{subject_id}%5D=on&class=any&period_date=&period=week'
28
107
0.732143
47
280
4.12766
0.553191
0.108247
0.123711
0.134021
0.206186
0.206186
0
0
0
0
0
0.007968
0.103571
280
9
108
31.111111
0.76494
0
0
0
0
0.2
0.507143
0.432143
0
0
0
0
0
1
0.4
false
0
0
0.4
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
d16f5a15f719e0d1dccb23b68225bfce039c4206
226
py
Python
run.py
natehishon/nlp_proj
d099ef466311ca8c833ae02a5d2def52ccf85eff
[ "MIT" ]
null
null
null
run.py
natehishon/nlp_proj
d099ef466311ca8c833ae02a5d2def52ccf85eff
[ "MIT" ]
null
null
null
run.py
natehishon/nlp_proj
d099ef466311ca8c833ae02a5d2def52ccf85eff
[ "MIT" ]
null
null
null
import werkzeug # from werkzeug.utils import cached_property # werkzeug.cached_property = werkzeug.utils.cached_property import os from app import app app.run(port=5000) # To Run: # python run.py # or # python -m flask run
16.142857
59
0.769912
35
226
4.885714
0.485714
0.245614
0.25731
0
0
0
0
0
0
0
0
0.020833
0.150442
226
13
60
17.384615
0.869792
0.641593
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.75
0
0.75
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
0f0aeeaf6b8b3ae09c4289f00c4dcd9708d782f0
1,578
py
Python
darkeye.py
nandydark/thedarkeye
2de85386bc6f64f04a78f3ca5143f736430d3f05
[ "MIT" ]
2
2021-01-31T10:04:28.000Z
2022-01-26T17:21:44.000Z
darkeye.py
nandydark/thedarkeye
2de85386bc6f64f04a78f3ca5143f736430d3f05
[ "MIT" ]
null
null
null
darkeye.py
nandydark/thedarkeye
2de85386bc6f64f04a78f3ca5143f736430d3f05
[ "MIT" ]
1
2021-06-05T12:55:49.000Z
2021-06-05T12:55:49.000Z
from os import * from urllib import * from time import * print("NandyDarkEye") print("Created by Nandydark") print("Don't Forget To Follow Me On Github From Below") print("http://www.github.com/nandydark") print target = raw_input("Enter The Ip Here...It Can Be IPv4 Or IPv6 :\033[1;32m ") url = "http://ip-api.com/json/" +target data = urlopen(url).read().decode("utf-8") data2 = eval(data) print print("\033[1;36m[ # ] \033[1;32mHERE WE GO!! >>>\033[0m") print print "\033[1;36m[ $ ] \033[0mAS :\033[1;32m ", str(data2["as"]) print "\033[1;36m[ $ ] \033[0mCOUNTRY :\033[1;32m ", str(data2["country"]) print "\033[1;36m[ $ ] \033[0mCITY :\033[1;32m ", str(data2["city"]) print "\033[1;36m[ $ ] \033[0mCOUNTRY CODE :\033[1;32m ", str(data2["countryCode"]) print "\033[1;36m[ $ ] \033[0mISP :\033[1;32m ", str(data2["isp"]) print "\033[1;36m[ $ ] \033[0mLATITUDE :\033[1;32m ", str(data2["lat"]) print "\033[1;36m[ $ ] \033[0mLONGTITUDE :\033[1;32m ", str(data2["lon"]) print "\033[1;36m[ $ ] \033[0mORG :\033[1;32m ", str(data2["org"]) print "\033[1;36m[ $ ] \033[0mQUERY :\033[1;32m ", str(data2["query"]) print "\033[1;36m[ $ ] \033[0mREGION :\033[1;32m ", str(data2["region"]) print "\033[1;36m[ $ ] \033[0mREGION NAME :\033[1;32m ", str(data2["regionName"]) print "\033[1;36m[ $ ] \033[0mTIME ZONE :\033[1;32m ", str(data2["timezone"]) print "\033[1;36m[ $ ] \033[0mZIP :\033[1;32m ", str(data2["zip"]) print "\033[1;36m[ $ ] \033[0mSTATUS :\033[1;32m ", str(data2["status"]) print "\033[1;36m[ $ ] \033[0mSAY THANKS TO NANDYDARK FOR MAKING THIS TOOL\033" print "\033[0m"
46.411765
83
0.630545
267
1,578
3.722846
0.337079
0.128773
0.144869
0.193159
0.496982
0.134809
0
0
0
0
0
0.20245
0.120406
1,578
33
84
47.818182
0.513689
0
0
0.096774
0
0.064516
0.624842
0
0
0
0
0
0
0
null
null
0
0.096774
null
null
0.774194
0
0
0
null
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5
0f2ce1d5f8895e888179b61a197de5ebd14e4978
75
py
Python
macapi/__init__.py
dmcna005/macapi
edbef3b1d3133ed791892b4bda5951f42648f2d2
[ "Apache-2.0" ]
null
null
null
macapi/__init__.py
dmcna005/macapi
edbef3b1d3133ed791892b4bda5951f42648f2d2
[ "Apache-2.0" ]
null
null
null
macapi/__init__.py
dmcna005/macapi
edbef3b1d3133ed791892b4bda5951f42648f2d2
[ "Apache-2.0" ]
null
null
null
#!/bin/python """Macapi init.""" from macapi.version import __version__
10.714286
38
0.706667
9
75
5.444444
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.133333
75
6
39
12.5
0.753846
0.333333
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
0f356fbfb8927b4ee2fa28ac6682892f1014c82d
1,393
py
Python
djstripe/migrations/0005_auto_20191002_1012.py
Korben11/dj-stripe
06661c174f0cda52b33be9a421f8b80438d71ab0
[ "MIT" ]
2
2019-11-13T18:20:33.000Z
2020-04-18T02:58:40.000Z
djstripe/migrations/0005_auto_20191002_1012.py
Korben11/dj-stripe
06661c174f0cda52b33be9a421f8b80438d71ab0
[ "MIT" ]
null
null
null
djstripe/migrations/0005_auto_20191002_1012.py
Korben11/dj-stripe
06661c174f0cda52b33be9a421f8b80438d71ab0
[ "MIT" ]
2
2020-01-31T14:26:09.000Z
2020-07-14T04:24:15.000Z
# Generated by Django 2.2.5 on 2019-10-02 10:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [("djstripe", "0004_2_1")] operations = [ migrations.RemoveField(model_name="account", name="business_name"), migrations.RemoveField(model_name="account", name="business_primary_color"), migrations.RemoveField(model_name="account", name="business_url"), migrations.RemoveField(model_name="account", name="debit_negative_balances"), migrations.RemoveField(model_name="account", name="decline_charge_on"), migrations.RemoveField(model_name="account", name="display_name"), migrations.RemoveField(model_name="account", name="legal_entity"), migrations.RemoveField(model_name="account", name="payout_schedule"), migrations.RemoveField( model_name="account", name="payout_statement_descriptor" ), migrations.RemoveField(model_name="account", name="statement_descriptor"), migrations.RemoveField(model_name="account", name="support_email"), migrations.RemoveField(model_name="account", name="support_phone"), migrations.RemoveField(model_name="account", name="support_url"), migrations.RemoveField(model_name="account", name="timezone"), migrations.RemoveField(model_name="account", name="verification"), ]
48.034483
85
0.71285
149
1,393
6.436242
0.308725
0.328467
0.406674
0.469239
0.754953
0.754953
0.626694
0.12513
0
0
0
0.017767
0.151472
1,393
28
86
49.75
0.79357
0.032304
0
0
1
0
0.260773
0.053492
0
0
0
0
0
1
0
false
0
0.045455
0
0.181818
0
0
0
0
null
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
0f6db179373967e886cd48391793efae79eb0564
8,376
py
Python
pygrabber/dshow_ids.py
tina90q/python_grabber
383cbc7d0ae0a11fe6390931172339dfadac15b6
[ "MIT" ]
36
2019-01-18T19:41:28.000Z
2022-02-03T00:32:48.000Z
pygrabber/dshow_ids.py
svrbasky/python_grabber
41f16a699e568eeeb09d142fe8650984bd2b3a2d
[ "MIT" ]
9
2019-01-27T07:07:56.000Z
2021-12-07T09:15:54.000Z
pygrabber/dshow_ids.py
svrbasky/python_grabber
41f16a699e568eeeb09d142fe8650984bd2b3a2d
[ "MIT" ]
21
2019-06-23T03:02:46.000Z
2022-03-31T11:03:02.000Z
# # python_grabber # # Authors: # Andrea Schiavinato <andrea.schiavinato84@gmail.com> # # Copyright (C) 2019 Andrea Schiavinato # # Permission is hereby grantedfree of chargeto any person obtaining # a copy of this software and associated documentation files (the # "Software")to deal in the Software without restrictionincluding # without limitation the rights to usecopymodifymergepublish, # distributesublicenseand/or sell copies of the Softwareand to # permit persons to whom the Software is furnished to do sosubject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS"WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIEDINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITYFITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIMDAMAGES OR OTHER LIABILITYWHETHER IN AN ACTION # OF CONTRACTTORT OR OTHERWISEARISING FROMOUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # from comtypes import GUID GUID_NULL = GUID("{00000000-0000-0000-0000-000000000000}") class clsids: CLSID_FilterGraph = "{E436EBB3-524F-11CE-9F53-0020AF0BA770}" CLSID_SystemDeviceEnum = "{62BE5D10-60EB-11d0-BD3B-00A0C911CE86}" CLSID_SampleGrabber = "{C1F400A0-3F08-11d3-9F0B-006008039E37}" CLSID_CaptureGraphBuilder2 = "{BF87B6E1-8C27-11d0-B3F0-00AA003761C5}" CLSID_VideoRendererDefault = "{6BC1CFFA-8FC1-4261-AC22-CFB4CC38DB50}" CLSID_NullRender = "{C1F400A4-3F08-11D3-9F0B-006008039E37}" CLSID_VideoMixingRenderer = "{B87BEB7B-8D29-423f-AE4D-6582C10175AC}" CLSID_SmartTee = "{CC58E280-8AA1-11d1-B3F1-00AA003761C5}" class DeviceCategories: VideoInputDevice = "{860bb310-5d01-11d0-bd3b-00a0c911ce86}" AudioInputDevice = "{33d9a762-90c8-11d0-bd43-00a0c911ce86}" VideoCompressor = "{33d9a760-90c8-11d0-bd43-00a0c911ce86}" AudioCompressor = "{33d9a761-90c8-11d0-bd43-00a0c911ce86}" LegacyAmFilter = "{083863F1-70DE-11d0-BD40-00A0C911CE86}" class MediaTypes: Video = "{73646976-0000-0010-8000-00AA00389B71}" Audio = "{73647561-0000-0010-8000-00AA00389B71}" class MediaSubtypes: RGB24 = "{E436EB7D-524F-11CE-9F53-0020AF0BA770}" AVI = "{E436EB88-524F-11CE-9F53-0020AF0BA770}" ASF = "{3DB80F90-9412-11D1-ADED-0000F8754B99}" class PinCategory: Preview = "{fb6c4282-0353-11d1-905f-0000c0cc16ba}" Capture = "{fb6c4281-0353-11d1-905f-0000c0cc16ba}" subtypes = { '{4C504C43-0000-0010-8000-00AA00389B71}': 'CLPL', '{56595559-0000-0010-8000-00AA00389B71}': 'YUYV', '{56555949-0000-0010-8000-00AA00389B71}': 'IYUV', '{39555659-0000-0010-8000-00AA00389B71}': 'YVU9', '{31313459-0000-0010-8000-00AA00389B71}': 'Y411', '{50313459-0000-0010-8000-00AA00389B71}': 'Y41P', '{32595559-0000-0010-8000-00AA00389B71}': 'YUY2', '{55595659-0000-0010-8000-00AA00389B71}': 'YVYU', '{59565955-0000-0010-8000-00AA00389B71}': 'UYVY', '{31313259-0000-0010-8000-00AA00389B71}': 'Y211', '{524A4C43-0000-0010-8000-00AA00389B71}': 'CLJR', '{39304649-0000-0010-8000-00AA00389B71}': 'IF09', '{414C5043-0000-0010-8000-00AA00389B71}': 'CPLA', '{47504A4D-0000-0010-8000-00AA00389B71}': 'MJPG', '{4A4D5654-0000-0010-8000-00AA00389B71}': 'TVMJ', '{454B4157-0000-0010-8000-00AA00389B71}': 'WAKE', '{43434643-0000-0010-8000-00AA00389B71}': 'CFCC', '{47504A49-0000-0010-8000-00AA00389B71}': 'IJPG', '{6D756C50-0000-0010-8000-00AA00389B71}': 'PLUM', '{53435644-0000-0010-8000-00AA00389B71}': 'DVCS', '{34363248-0000-0010-8000-00AA00389B71}': 'H264', '{44535644-0000-0010-8000-00AA00389B71}': 'DVSD', '{4656444D-0000-0010-8000-00AA00389B71}': 'MDVF', '{E436EB78-524F-11CE-9F53-0020AF0BA770}': 'RGB1', '{E436EB78-524F-11CE-9F53-0020AF0BA770}': 'RGB1', '{E436EB79-524F-11CE-9F53-0020AF0BA770}': 'RGB4', '{E436EB7A-524F-11CE-9F53-0020AF0BA770}': 'RGB8', '{E436EB7B-524F-11CE-9F53-0020AF0BA770}': 'RGB565', '{E436EB7C-524F-11CE-9F53-0020AF0BA770}': 'RGB555', '{E436EB7D-524F-11CE-9F53-0020AF0BA770}': 'RGB24', '{E436EB7E-524F-11CE-9F53-0020AF0BA770}': 'RGB32', '{297C55AF-E209-4CB3-B757-C76D6B9C88A8}': 'ARGB1555', '{6E6415E6-5C24-425F-93CD-80102B3D1CCA}': 'ARGB4444', '{773C9AC0-3274-11D0-B724-00AA006C1A01}': 'ARGB32', '{2F8BB76D-B644-4550-ACF3-D30CAA65D5C5}': 'A2R10G10B10', '{576F7893-BDF6-48C4-875F-AE7B81834567}': 'A2B10G10R10', '{56555941-0000-0010-8000-00AA00389B71}': 'AYUV', '{34344941-0000-0010-8000-00AA00389B71}': 'AI44', '{34344149-0000-0010-8000-00AA00389B71}': 'IA44', '{32335237-0000-0010-8000-00AA00389B71}': 'RGB32_D3D_DX7_RT', '{36315237-0000-0010-8000-00AA00389B71}': 'RGB16_D3D_DX7_RT', '{38384137-0000-0010-8000-00AA00389B71}': 'ARGB32_D3D_DX7_RT', '{34344137-0000-0010-8000-00AA00389B71}': 'ARGB4444_D3D_DX7_RT', '{35314137-0000-0010-8000-00AA00389B71}': 'ARGB1555_D3D_DX7_RT', '{32335239-0000-0010-8000-00AA00389B71}': 'RGB32_D3D_DX9_RT', '{36315239-0000-0010-8000-00AA00389B71}': 'RGB16_D3D_DX9_RT', '{38384139-0000-0010-8000-00AA00389B71}': 'ARGB32_D3D_DX9_RT', '{34344139-0000-0010-8000-00AA00389B71}': 'ARGB4444_D3D_DX9_RT', '{35314139-0000-0010-8000-00AA00389B71}': 'ARGB1555_D3D_DX9_RT', '{32315659-0000-0010-8000-00AA00389B71}': 'YV12', '{3231564E-0000-0010-8000-00AA00389B71}': 'NV12', '{3131564E-0000-0010-8000-00AA00389B71}': 'NV11', '{38303250-0000-0010-8000-00AA00389B71}': 'P208', '{38303250-0000-0010-8000-00AA00389B71}': 'P210', '{38303250-0000-0010-8000-00AA00389B71}': 'P216', '{38303250-0000-0010-8000-00AA00389B71}': 'P010', '{38303250-0000-0010-8000-00AA00389B71}': 'P016', '{38303250-0000-0010-8000-00AA00389B71}': 'Y210', '{38303250-0000-0010-8000-00AA00389B71}': 'Y216', '{38303450-0000-0010-8000-00AA00389B71}': 'P408', '{3432564E-0000-0010-8000-00AA00389B71}': 'NV24', '{4F303234-0000-0010-8000-00AA00389B71}': '420O', '{31434D49-0000-0010-8000-00AA00389B71}': 'IMC1', '{32434D49-0000-0010-8000-00AA00389B71}': 'IMC2', '{33434D49-0000-0010-8000-00AA00389B71}': 'IMC3', '{34434D49-0000-0010-8000-00AA00389B71}': 'IMC4', '{30343353-0000-0010-8000-00AA00389B71}': 'S340', '{32343353-0000-0010-8000-00AA00389B71}': 'S342', '{E436EB7F-524F-11CE-9F53-0020AF0BA770}': 'OVERLAY', '{E436EB80-524F-11CE-9F53-0020AF0BA770}': 'MPEGPACKET', '{E436EB81-524F-11CE-9F53-0020AF0BA770}': 'MPEG1PAYLOAD', '{00000050-0000-0010-8000-00AA00389B71}': 'MPEG1AUDIOPAYLOAD', '{E436EB82-524F-11CE-9F53-0020AF0BA770}': 'MPEG1SYSTEMSTREAM', '{E436EB84-524F-11CE-9F53-0020AF0BA770}': 'MPEG1SYSTEM', '{E436EB85-524F-11CE-9F53-0020AF0BA770}': 'MPEG1VIDEOCD', '{E436EB86-524F-11CE-9F53-0020AF0BA770}': 'MPEG1VIDEO', '{E436EB87-524F-11CE-9F53-0020AF0BA770}': 'MPEG1AUDIO', '{E436EB88-524F-11CE-9F53-0020AF0BA770}': 'AVI', '{3DB80F90-9412-11D1-ADED-0000F8754B99}': 'ASF', '{E436EB89-524F-11CE-9F53-0020AF0BA770}': 'QTMOVIE', '{617A7072-0000-0010-8000-00AA00389B71}': 'RPZA', '{20636D73-0000-0010-8000-00AA00389B71}': 'SMC', '{20656C72-0000-0010-8000-00AA00389B71}': 'RLE', '{6765706A-0000-0010-8000-00AA00389B71}': 'JPEG', '{E436EB8A-524F-11CE-9F53-0020AF0BA770}': 'PCMAUDIO_OBSOLETE', '{00000001-0000-0010-8000-00AA00389B71}': 'PCM', '{E436EB8B-524F-11CE-9F53-0020AF0BA770}': 'WAVE', '{E436EB8C-524F-11CE-9F53-0020AF0BA770}': 'AU', '{E436EB8D-524F-11CE-9F53-0020AF0BA770}': 'AIFF', '{6E8D4A22-310C-11D0-B79A-00AA003767A7}': 'LINE21_BYTEPAIR', '{6E8D4A23-310C-11D0-B79A-00AA003767A7}': 'LINE21_GOPPACKET', '{6E8D4A24-310C-11D0-B79A-00AA003767A7}': 'LINE21_VBIRAWDATA', '{0AF414BC-4ED2-445E-9839-8F095568AB3C}': '708_608DATA', '{F52ADDAA-36F0-43F5-95EA-6D866484262A}': 'DTVCCDATA', '{7EA626DB-54DA-437B-BE9F-F73073ADFA3C}': 'CC_CONTAINER', '{F72A76E3-EB0A-11D0-ACE4-0000C0CC16BA}': 'TELETEXT', '{663DA43C-03E8-4E9A-9CD5-BF11ED0DEF76}': 'VBI', '{2791D576-8E7A-466F-9E90-5D3F3083738B}': 'WSS', '{01CA73E3-DCE6-4575-AFE1-2BF1C902CAF3}': 'XDS', '{A1B3F620-9792-4D8D-81A4-86AF25772090}': 'VPS' }
49.270588
77
0.703558
946
8,376
6.180761
0.446089
0.086198
0.129297
0.258594
0.166923
0.069437
0
0
0
0
0
0.4348
0.123806
8,376
169
78
49.56213
0.361902
0.130731
0
0.015504
0
0
0.730419
0.634032
0
0
0
0
0
1
0
false
0
0.007752
0
0.20155
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
0f8f4d3207985171679199d3188086763a00b42c
38
py
Python
tests/__init__.py
ykdojo/replit-py
6f8f4572d067bc0160543ef70e10e3ec18d6112c
[ "0BSD" ]
114
2020-07-28T22:55:37.000Z
2022-03-18T20:49:19.000Z
tests/__init__.py
ykdojo/replit-py
6f8f4572d067bc0160543ef70e10e3ec18d6112c
[ "0BSD" ]
60
2020-08-04T18:59:34.000Z
2022-03-31T18:20:18.000Z
tests/__init__.py
ykdojo/replit-py
6f8f4572d067bc0160543ef70e10e3ec18d6112c
[ "0BSD" ]
33
2020-07-31T05:29:18.000Z
2022-03-31T02:31:49.000Z
"""Tests for replit python module."""
19
37
0.684211
5
38
5.2
1
0
0
0
0
0
0
0
0
0
0
0
0.131579
38
1
38
38
0.787879
0.815789
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
0f8fc9d346193d3aa7482dc66c69be7201b97c31
123
py
Python
src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/pacman/operations/chip_id_allocator_algorithms/__init__.py
Roboy/LSM_SpiNNaker_MyoArm
04fa1eaf78778edea3ba3afa4c527d20c491718e
[ "BSD-3-Clause" ]
2
2020-11-01T13:22:11.000Z
2020-11-01T13:22:20.000Z
src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/pacman/operations/chip_id_allocator_algorithms/__init__.py
Roboy/LSM_SpiNNaker_MyoArm
04fa1eaf78778edea3ba3afa4c527d20c491718e
[ "BSD-3-Clause" ]
null
null
null
src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/pacman/operations/chip_id_allocator_algorithms/__init__.py
Roboy/LSM_SpiNNaker_MyoArm
04fa1eaf78778edea3ba3afa4c527d20c491718e
[ "BSD-3-Clause" ]
null
null
null
from pacman.operations.chip_id_allocator_algorithms.\ malloc_based_chip_id_allocator import MallocBasedChipIdAllocator
41
68
0.894309
14
123
7.357143
0.785714
0.116505
0.291262
0
0
0
0
0
0
0
0
0
0.073171
123
2
69
61.5
0.903509
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
7e3a0d6da2256739dd361c6613c7a190877632a9
940
py
Python
tests/src/main/python/rest/tests/extract/test/test_cohort_evaluation_api.py
kpgangat/quality-measure-and-cohort-service
f27e33f11fd3e1b9ed2a259da7a587837a27225a
[ "Apache-2.0" ]
8
2021-01-27T15:57:11.000Z
2022-03-23T01:17:22.000Z
tests/src/main/python/rest/tests/extract/test/test_cohort_evaluation_api.py
kpgangat/quality-measure-and-cohort-service
f27e33f11fd3e1b9ed2a259da7a587837a27225a
[ "Apache-2.0" ]
62
2020-10-22T14:26:13.000Z
2022-03-30T17:49:42.000Z
tests/src/main/python/rest/tests/extract/test/test_cohort_evaluation_api.py
kpgangat/quality-measure-and-cohort-service
f27e33f11fd3e1b9ed2a259da7a587837a27225a
[ "Apache-2.0" ]
14
2020-10-21T19:47:18.000Z
2022-03-10T19:12:23.000Z
# coding: utf-8 """ IBM Cohort Engine Service to evaluate cohorts and measures # noqa: E501 OpenAPI spec version: 0.0.1 2021-07-22T12:47:28Z Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_client from swagger_client.api.cohort_evaluation_api import CohortEvaluationApi # noqa: E501 from swagger_client.rest import ApiException class TestCohortEvaluationApi(unittest.TestCase): """CohortEvaluationApi unit test stubs""" def setUp(self): self.api = swagger_client.api.cohort_evaluation_api.CohortEvaluationApi() # noqa: E501 def tearDown(self): pass def test_evaluate_cohort(self): """Test case for evaluate_cohort Evaluates a specific define within a CQL for a set of patients # noqa: E501 """ pass if __name__ == '__main__': unittest.main()
22.380952
95
0.708511
118
940
5.440678
0.576271
0.049844
0.05296
0.068536
0.109034
0.109034
0
0
0
0
0
0.040377
0.209574
940
41
96
22.926829
0.823688
0.393617
0
0.142857
1
0
0.015595
0
0
0
0
0
0
1
0.214286
false
0.142857
0.357143
0
0.642857
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
1
1
0
1
0
0
5
7e8c672c9a259a5b4f8e35d4e4527c1e23f6eb6f
9,767
py
Python
calvin/csparser/parsetab.py
josrolgil/exjobbCalvin
976459eaa50246586360c049b9880d753623d574
[ "Apache-2.0" ]
1
2016-05-10T22:36:31.000Z
2016-05-10T22:36:31.000Z
calvin/csparser/parsetab.py
josrolgil/exjobbCalvin
976459eaa50246586360c049b9880d753623d574
[ "Apache-2.0" ]
null
null
null
calvin/csparser/parsetab.py
josrolgil/exjobbCalvin
976459eaa50246586360c049b9880d753623d574
[ "Apache-2.0" ]
null
null
null
# parsetab.py # This file is automatically generated. Do not edit. _tabversion = '3.8' _lr_method = 'LALR' _lr_signature = '861D35F55FA6B91D5E8BF508730A3692' _lr_action_items = {'NUMBER':([0,2,3,5,7,8,13,14,15,16,19,20,21,22,23,24,27,28,29,31,32,33,34,39,40,44,45,46,50,51,53,54,57,58,63,64,71,75,76,78,79,80,81,],[-2,-6,-4,-8,28,-3,-29,-30,-32,-35,-34,-37,-7,28,-15,-31,-16,-33,-17,-36,-43,-27,28,-22,-14,28,-5,-28,-20,-19,-21,-38,-46,-45,28,-44,-18,28,-10,28,-11,28,-9,]),'NULL':([0,2,3,5,7,8,13,14,15,16,19,20,21,22,23,24,27,28,29,31,32,33,34,39,40,44,45,46,50,51,53,54,57,58,63,64,71,75,76,78,79,80,81,],[-2,-6,-4,-8,20,-3,-29,-30,-32,-35,-34,-37,-7,20,-15,-31,-16,-33,-17,-36,-43,-27,20,-22,-14,20,-5,-28,-20,-19,-21,-38,-46,-45,20,-44,-18,20,-10,20,-11,20,-9,]),'TRUE':([0,2,3,5,7,8,13,14,15,16,19,20,21,22,23,24,27,28,29,31,32,33,34,39,40,44,45,46,50,51,53,54,57,58,63,64,71,75,76,78,79,80,81,],[-2,-6,-4,-8,16,-3,-29,-30,-32,-35,-34,-37,-7,16,-15,-31,-16,-33,-17,-36,-43,-27,16,-22,-14,16,-5,-28,-20,-19,-21,-38,-46,-45,16,-44,-18,16,-10,16,-11,16,-9,]),'DOT':([0,2,3,5,7,8,10,11,13,14,15,16,19,20,21,22,23,24,25,27,28,29,31,33,37,38,39,40,45,46,48,49,50,51,52,53,54,57,71,76,78,79,80,81,],[-2,-6,-4,-8,18,-3,36,-51,-29,-30,-32,-35,-34,-37,-7,18,-15,-31,42,-16,-33,-17,-36,-27,18,18,-22,-14,-5,-28,-50,42,-20,-19,36,-21,-38,-46,-18,-10,18,-11,18,-9,]),'RBRACE':([13,14,15,16,19,20,23,24,27,28,29,30,31,39,40,43,50,51,53,54,55,57,62,68,71,80,],[-29,-30,-32,-35,-34,-37,-15,-31,-16,-33,-17,-39,-36,-22,-14,54,-20,-19,-21,-38,-41,-46,-40,-42,-18,81,]),'RPAREN':([13,14,15,16,19,20,24,28,31,33,35,46,47,54,57,60,61,66,67,70,74,77,],[-29,-30,-32,-35,-34,-37,-31,-33,-36,-27,-47,-28,59,-38,-46,-49,-23,-48,71,-25,-24,-26,]),'DOCSTRING':([76,],[79,]),'RARROW':([59,60,65,66,],[-47,-49,69,-48,]),'COLON':([25,56,],[41,63,]),'COMMA':([13,14,15,16,19,20,24,28,31,33,46,54,55,57,58,60,68,70,77,],[-29,-30,-32,-35,-34,-37,-31,-33,-36,-27,-28,-38,62,-46,64,66,-42,74,-26,]),'IDENTIFIER':([0,2,3,4,5,6,7,8,13,14,15,16,18,19,20,21,22,23,24,27,28,29,31,33,34,35,36,37,38,39,40,41,42,45,46,47,50,51,53,54,57,59,60,61,65,66,67,69,70,71,73,74,75,76,77,78,79,80,81,],[-2,-6,-4,9,-8,11,25,-3,-29,-30,-32,-35,39,-34,-37,-7,25,-15,-31,-16,-33,-17,-36,-27,46,-47,48,49,49,-22,-14,11,53,-5,-28,60,-20,-19,-21,-38,-46,-47,-49,-23,60,-48,72,-47,-25,-18,60,-24,46,-10,-26,25,-11,25,-9,]),'DEFINE':([0,2,3,8,13,14,15,16,19,20,24,28,31,33,45,46,54,57,],[4,4,-4,-3,-29,-30,-32,-35,-34,-37,-31,-33,-36,-27,-5,-28,-38,-46,]),'GT':([12,13,14,15,16,17,19,20,24,25,28,31,33,39,53,54,57,],[37,-29,-30,-32,-35,38,-34,-37,-31,-28,-33,-36,-27,-22,-21,-38,-46,]),'STRING':([0,2,3,5,7,8,13,14,15,16,19,20,21,22,23,24,27,28,29,30,31,32,33,34,39,40,43,44,45,46,50,51,53,54,55,57,58,62,63,64,68,71,75,76,78,79,80,81,],[-2,-6,-4,-8,19,-3,-29,-30,-32,-35,-34,-37,-7,19,-15,-31,-16,-33,-17,-39,-36,-43,-27,19,-22,-14,56,19,-5,-28,-20,-19,-21,-38,-41,-46,-45,-40,19,-44,-42,-18,19,-10,19,-11,19,-9,]),'RBRACK':([13,14,15,16,19,20,24,28,31,32,44,54,57,58,64,],[-29,-30,-32,-35,-34,-37,-31,-33,-36,-43,57,-38,-46,-45,-44,]),'LPAREN':([10,11,48,52,],[35,-51,-50,61,]),'EQ':([9,72,],[34,75,]),'LBRACE':([0,2,3,5,7,8,13,14,15,16,19,20,21,22,23,24,27,28,29,31,32,33,34,39,40,44,45,46,50,51,53,54,57,58,60,63,64,66,69,71,73,75,76,78,79,80,81,],[-2,-6,-4,-8,30,-3,-29,-30,-32,-35,-34,-37,-7,30,-15,-31,-16,-33,-17,-36,-43,-27,30,-22,-14,30,-5,-28,-20,-19,-21,-38,-46,-45,-49,30,-44,-48,-47,-18,76,30,-10,30,-11,30,-9,]),'FALSE':([0,2,3,5,7,8,13,14,15,16,19,20,21,22,23,24,27,28,29,31,32,33,34,39,40,44,45,46,50,51,53,54,57,58,63,64,71,75,76,78,79,80,81,],[-2,-6,-4,-8,31,-3,-29,-30,-32,-35,-34,-37,-7,31,-15,-31,-16,-33,-17,-36,-43,-27,31,-22,-14,31,-5,-28,-20,-19,-21,-38,-46,-45,31,-44,-18,31,-10,31,-11,31,-9,]),'COMPONENT':([0,2,3,5,7,8,13,14,15,16,19,20,21,24,28,31,33,45,46,54,57,81,],[-2,6,-4,-8,6,-3,-29,-30,-32,-35,-34,-37,-7,-31,-33,-36,-27,-5,-28,-38,-46,-9,]),'LBRACK':([0,2,3,5,7,8,13,14,15,16,19,20,21,22,23,24,27,28,29,31,32,33,34,39,40,44,45,46,50,51,53,54,57,58,63,64,71,75,76,78,79,80,81,],[-2,-6,-4,-8,32,-3,-29,-30,-32,-35,-34,-37,-7,32,-15,-31,-16,-33,-17,-36,-43,-27,32,-22,-14,32,-5,-28,-20,-19,-21,-38,-46,-45,32,-44,-18,32,-10,32,-11,32,-9,]),'$end':([0,1,2,3,5,7,8,13,14,15,16,19,20,21,22,23,24,26,27,28,29,31,33,39,40,45,46,50,51,53,54,57,71,81,],[-2,0,-6,-4,-8,-12,-3,-29,-30,-32,-35,-34,-37,-7,-13,-15,-31,-1,-16,-33,-17,-36,-27,-22,-14,-5,-28,-20,-19,-21,-38,-46,-18,-9,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): for _x,_y in zip(_v[0],_v[1]): if not _x in _lr_action: _lr_action[_x] = {} _lr_action[_x][_k] = _y del _lr_action_items _lr_goto_items = {'argument':([7,22,34,75,78,80,],[12,12,45,77,12,12,]),'dictionary':([7,22,34,44,63,75,78,80,],[13,13,13,13,13,13,13,13,]),'array':([7,22,34,44,63,75,78,80,],[14,14,14,14,14,14,14,14,]),'null':([7,22,34,44,63,75,78,80,],[15,15,15,15,15,15,15,15,]),'port':([7,22,37,38,78,80,],[17,17,50,51,17,17,]),'compdef':([2,7,],[5,21,]),'script':([0,],[1,]),'compdefs':([2,],[7,]),'member':([43,],[55,]),'program':([7,78,],[22,80,]),'bool':([7,22,34,44,63,75,78,80,],[24,24,24,24,24,24,24,24,]),'statement':([7,22,78,80,],[23,40,23,40,]),'opt_program':([7,],[26,]),'constdef':([0,2,],[3,8,]),'named_arg':([67,],[70,]),'qualified_name':([6,41,],[10,52,]),'assignment':([7,22,78,80,],[27,27,27,27,]),'docstring':([76,],[78,]),'link':([7,22,78,80,],[29,29,29,29,]),'named_args':([61,],[67,]),'members':([30,],[43,]),'constdefs':([0,],[2,]),'identifiers':([35,59,69,],[47,65,73,]),'value':([7,22,34,44,63,75,78,80,],[33,33,33,58,68,33,33,33,]),'values':([32,],[44,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items(): for _x, _y in zip(_v[0], _v[1]): if not _x in _lr_goto: _lr_goto[_x] = {} _lr_goto[_x][_k] = _y del _lr_goto_items _lr_productions = [ ("S' -> script","S'",1,None,None,None), ('script -> constdefs compdefs opt_program','script',3,'p_script','parser.py',36), ('constdefs -> <empty>','constdefs',0,'p_constdefs','parser.py',41), ('constdefs -> constdefs constdef','constdefs',2,'p_constdefs','parser.py',42), ('constdefs -> constdef','constdefs',1,'p_constdefs','parser.py',43), ('constdef -> DEFINE IDENTIFIER EQ argument','constdef',4,'p_constdef','parser.py',50), ('compdefs -> <empty>','compdefs',0,'p_compdefs','parser.py',56), ('compdefs -> compdefs compdef','compdefs',2,'p_compdefs','parser.py',57), ('compdefs -> compdef','compdefs',1,'p_compdefs','parser.py',58), ('compdef -> COMPONENT qualified_name LPAREN identifiers RPAREN identifiers RARROW identifiers LBRACE docstring program RBRACE','compdef',12,'p_compdef','parser.py',65), ('docstring -> <empty>','docstring',0,'p_docstring','parser.py',85), ('docstring -> DOCSTRING','docstring',1,'p_docstring','parser.py',86), ('opt_program -> <empty>','opt_program',0,'p_opt_program','parser.py',94), ('opt_program -> program','opt_program',1,'p_opt_program','parser.py',95), ('program -> program statement','program',2,'p_program','parser.py',103), ('program -> statement','program',1,'p_program','parser.py',104), ('statement -> assignment','statement',1,'p_statement','parser.py',124), ('statement -> link','statement',1,'p_statement','parser.py',125), ('assignment -> IDENTIFIER COLON qualified_name LPAREN named_args RPAREN','assignment',6,'p_assignment','parser.py',130), ('link -> port GT port','link',3,'p_link','parser.py',135), ('link -> argument GT port','link',3,'p_link','parser.py',136), ('port -> IDENTIFIER DOT IDENTIFIER','port',3,'p_port','parser.py',150), ('port -> DOT IDENTIFIER','port',2,'p_port','parser.py',151), ('named_args -> <empty>','named_args',0,'p_named_args','parser.py',156), ('named_args -> named_args named_arg COMMA','named_args',3,'p_named_args','parser.py',157), ('named_args -> named_args named_arg','named_args',2,'p_named_args','parser.py',158), ('named_arg -> IDENTIFIER EQ argument','named_arg',3,'p_named_arg','parser.py',166), ('argument -> value','argument',1,'p_argument','parser.py',171), ('argument -> IDENTIFIER','argument',1,'p_argument','parser.py',172), ('value -> dictionary','value',1,'p_value','parser.py',177), ('value -> array','value',1,'p_value','parser.py',178), ('value -> bool','value',1,'p_value','parser.py',179), ('value -> null','value',1,'p_value','parser.py',180), ('value -> NUMBER','value',1,'p_value','parser.py',181), ('value -> STRING','value',1,'p_value','parser.py',182), ('bool -> TRUE','bool',1,'p_bool','parser.py',187), ('bool -> FALSE','bool',1,'p_bool','parser.py',188), ('null -> NULL','null',1,'p_null','parser.py',193), ('dictionary -> LBRACE members RBRACE','dictionary',3,'p_dictionary','parser.py',198), ('members -> <empty>','members',0,'p_members','parser.py',203), ('members -> members member COMMA','members',3,'p_members','parser.py',204), ('members -> members member','members',2,'p_members','parser.py',205), ('member -> STRING COLON value','member',3,'p_member','parser.py',214), ('values -> <empty>','values',0,'p_values','parser.py',219), ('values -> values value COMMA','values',3,'p_values','parser.py',220), ('values -> values value','values',2,'p_values','parser.py',221), ('array -> LBRACK values RBRACK','array',3,'p_array','parser.py',230), ('identifiers -> <empty>','identifiers',0,'p_identifiers','parser.py',243), ('identifiers -> identifiers IDENTIFIER COMMA','identifiers',3,'p_identifiers','parser.py',244), ('identifiers -> identifiers IDENTIFIER','identifiers',2,'p_identifiers','parser.py',245), ('qualified_name -> qualified_name DOT IDENTIFIER','qualified_name',3,'p_qualified_name','parser.py',253), ('qualified_name -> IDENTIFIER','qualified_name',1,'p_qualified_name','parser.py',254), ]
120.580247
4,297
0.601208
2,072
9,767
2.7611
0.098938
0.071316
0.017829
0.023772
0.385422
0.341898
0.26831
0.237371
0.158539
0.144206
0
0.295883
0.044947
9,767
80
4,298
122.0875
0.317431
0.006348
0
0.028169
1
0
0.318936
0.003299
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
0e78de6ac57d77d39cfa16577780bbaeca7bc064
682
py
Python
test/test_permission.py
Factern/factern-client-python
2453dbf0d683417142fe98514ef6de2742f14f92
[ "MIT" ]
null
null
null
test/test_permission.py
Factern/factern-client-python
2453dbf0d683417142fe98514ef6de2742f14f92
[ "MIT" ]
null
null
null
test/test_permission.py
Factern/factern-client-python
2453dbf0d683417142fe98514ef6de2742f14f92
[ "MIT" ]
2
2018-07-20T15:02:06.000Z
2018-08-01T20:38:38.000Z
# coding: utf-8 """ Factern API """ from __future__ import absolute_import import unittest import factern_client from factern_client.com.factern.model.permission import Permission # noqa: E501 from factern_client.rest import ApiException class TestPermission(unittest.TestCase): """Permission unit test stubs""" def setUp(self): pass def tearDown(self): pass def testPermission(self): """Test Permission""" # FIXME: construct object with mandatory attributes with example values # model = factern_client.models.permission.Permission() # noqa: E501 pass if __name__ == '__main__': unittest.main()
19.485714
80
0.690616
76
682
5.973684
0.539474
0.114537
0.07489
0
0
0
0
0
0
0
0
0.013183
0.221408
682
34
81
20.058824
0.841808
0.318182
0
0.214286
0
0
0.018223
0
0
0
0
0.029412
0
1
0.214286
false
0.214286
0.357143
0
0.642857
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
1
1
0
1
0
0
5
7ece32bd13f2bf790af0df68a0a0088acdefba36
1,648
py
Python
api/src/tests/test_cidr_notation.py
rbipin/cidr-ip-calculator
7eedb086a99cb44214478aa6fecd3b8e0f22d834
[ "MIT" ]
null
null
null
api/src/tests/test_cidr_notation.py
rbipin/cidr-ip-calculator
7eedb086a99cb44214478aa6fecd3b8e0f22d834
[ "MIT" ]
null
null
null
api/src/tests/test_cidr_notation.py
rbipin/cidr-ip-calculator
7eedb086a99cb44214478aa6fecd3b8e0f22d834
[ "MIT" ]
null
null
null
import unittest from logic.cidr_calculator import CIDRCalculator from models.CustomExceptions import * class TestCIDRNotation(unittest.TestCase): def test_when_start_end_ip_same(self): startIP = '74.150.120.0' endIP = '74.150.120.0' cidr = CIDRCalculator() result = cidr.calculateCIDRNotation(startIP, endIP) self.assertEqual(result.IP, '74.150.120.0') self.assertEqual(result.CIDR, 32) def test_calculate_cidr_notation(self): startIP = '74.150.120.0' endIP = '74.150.120.7' cidr = CIDRCalculator() result = cidr.calculateCIDRNotation(startIP, endIP) self.assertEqual(result.IP, '74.150.120.1') self.assertEqual(result.CIDR, 29) def test_calculate_cidr_notation(self): startIP = '74.150.120.0' endIP = '74.150.120.7' cidr = CIDRCalculator() result = cidr.calculateCIDRNotation(startIP, endIP) self.assertEqual(result.IP, '74.150.120.1') self.assertEqual(result.CIDR, 29) def test_when_start_is_greater_than_end_ip_only_last_octect(self): startIP = '74.150.120.8' endIP = '74.150.120.7' cidr = CIDRCalculator() self.assertRaises(BadArgumentExcepton, cidr.calculateCIDRNotation, startIP, endIP) def test_when_start_is_greater_than_end_ip_only_first_octect(self): startIP = '120.150.120.0' endIP = '74.150.120.7' cidr = CIDRCalculator() self.assertRaises(BadArgumentExcepton, cidr.calculateCIDRNotation, startIP, endIP) if __name__ == "main": unittest.main()
34.333333
71
0.651092
195
1,648
5.317949
0.246154
0.075217
0.092575
0.043394
0.770492
0.75217
0.75217
0.75217
0.75217
0.75217
0
0.099042
0.240291
1,648
47
72
35.06383
0.729233
0
0
0.641026
0
0
0.097694
0
0
0
0
0
0.205128
1
0.128205
false
0
0.076923
0
0.230769
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
7edd18aa0d4c54b42f23356a2064d4f736e7c11e
36
py
Python
Project_Health/src/mklaren/kernel/__init__.py
Anonymous633671/STABILIZER
5a1ab8099a2d75ace7e053afc78055f1f4d359c0
[ "MIT" ]
null
null
null
Project_Health/src/mklaren/kernel/__init__.py
Anonymous633671/STABILIZER
5a1ab8099a2d75ace7e053afc78055f1f4d359c0
[ "MIT" ]
4
2020-08-17T16:26:16.000Z
2021-03-24T17:36:02.000Z
src/mklaren/kernel/__init__.py
ai-se/GENERAL
5a4bef2a80526524e3e18139b561fc0e2bb8888d
[ "MIT" ]
null
null
null
# import kernel # import kinterface
12
19
0.777778
4
36
7
0.75
0
0
0
0
0
0
0
0
0
0
0
0.166667
36
2
20
18
0.933333
0.861111
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
7efc6559b47d9635565cd625f579d35ce46c023f
101
py
Python
hrsalespipes/api_integrations/admin.py
hanztura/hrsalespipes
77accf3132726ced05d84fa2a41891b841f310b8
[ "Apache-2.0" ]
3
2020-03-26T12:43:43.000Z
2021-05-10T14:35:51.000Z
hrsalespipes/api_integrations/admin.py
hanztura/hrsalespipes
77accf3132726ced05d84fa2a41891b841f310b8
[ "Apache-2.0" ]
5
2021-04-08T21:15:15.000Z
2022-02-10T11:03:12.000Z
hrsalespipes/api_integrations/admin.py
hanztura/hrsalespipes
77accf3132726ced05d84fa2a41891b841f310b8
[ "Apache-2.0" ]
1
2022-01-30T19:24:48.000Z
2022-01-30T19:24:48.000Z
from django.contrib import admin from .models import LinkedinApi admin.site.register(LinkedinApi)
14.428571
32
0.821782
13
101
6.384615
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.118812
101
6
33
16.833333
0.932584
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
7d09e9602f328e1ecb72d543cabc21f3da541a10
77
py
Python
morphelia/clustering/__init__.py
marx-alex/Morphelia
809278b07f1a535789455d54df3cbddc850d609c
[ "MIT" ]
null
null
null
morphelia/clustering/__init__.py
marx-alex/Morphelia
809278b07f1a535789455d54df3cbddc850d609c
[ "MIT" ]
null
null
null
morphelia/clustering/__init__.py
marx-alex/Morphelia
809278b07f1a535789455d54df3cbddc850d609c
[ "MIT" ]
null
null
null
from .hierarchical import linkage_tree from .fate_cluster import FateCluster
25.666667
38
0.87013
10
77
6.5
0.8
0
0
0
0
0
0
0
0
0
0
0
0.103896
77
2
39
38.5
0.942029
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
7d25f722c41216754227f551ff0e3ea823e9e141
189
py
Python
tests/web_platform/CSS2/normal_flow/test_block_in_inline_insert_012_nosplit_ref.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
null
null
null
tests/web_platform/CSS2/normal_flow/test_block_in_inline_insert_012_nosplit_ref.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
null
null
null
tests/web_platform/CSS2/normal_flow/test_block_in_inline_insert_012_nosplit_ref.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
1
2020-01-16T01:56:41.000Z
2020-01-16T01:56:41.000Z
from tests.utils import W3CTestCase class TestBlockInInlineInsert012NosplitRef(W3CTestCase): vars().update(W3CTestCase.find_tests(__file__, 'block-in-inline-insert-012-nosplit-ref'))
31.5
93
0.814815
21
189
7.095238
0.857143
0
0
0
0
0
0
0
0
0
0
0.051429
0.074074
189
5
94
37.8
0.8
0
0
0
0
0
0.202128
0.202128
0
0
0
0
0
1
0
true
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
7d2d306e0d333f3eb5dcdcc64cdea70f94d1e7cd
871
py
Python
libheap/frontend/frontend_gdb.py
saidelike/libheap
820088e242c4af2947eaaf4a6c96315135763cd3
[ "MIT" ]
498
2015-02-27T05:28:52.000Z
2022-03-31T03:09:11.000Z
libheap/frontend/frontend_gdb.py
saidelike/libheap
820088e242c4af2947eaaf4a6c96315135763cd3
[ "MIT" ]
30
2015-01-15T14:15:29.000Z
2021-05-11T18:11:39.000Z
libheap/frontend/frontend_gdb.py
saidelike/libheap
820088e242c4af2947eaaf4a6c96315135763cd3
[ "MIT" ]
98
2015-06-08T02:27:43.000Z
2021-06-25T21:59:16.000Z
from libheap.frontend.commands.gdb.heap import heap from libheap.frontend.commands.gdb.mstats import mstats from libheap.frontend.commands.gdb.heapls import heapls from libheap.frontend.commands.gdb.heaplsc import heaplsc from libheap.frontend.commands.gdb.fastbins import fastbins from libheap.frontend.commands.gdb.freebins import freebins from libheap.frontend.commands.gdb.smallbins import smallbins from libheap.frontend.commands.gdb.print_bin_layout import print_bin_layout class frontend_gdb: """Register commands with GDB""" def __init__(self, debugger, version): heap(debugger, version) mstats(debugger, version) heapls(debugger, version) heaplsc(debugger, version) fastbins(debugger, version) freebins(debugger, version) smallbins(debugger, version) print_bin_layout(debugger, version)
37.869565
75
0.769231
106
871
6.216981
0.226415
0.204856
0.230653
0.327769
0.364188
0
0
0
0
0
0
0
0.152698
871
22
76
39.590909
0.892954
0.029851
0
0
0
0
0
0
0
0
0
0
0
1
0.055556
false
0
0.444444
0
0.555556
0.111111
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
7d357c5ac0f0edbcd8850c8e8c06e2836be3428d
74
py
Python
zero_shot_re/__init__.py
fractalego/zero-shot-relation-extractor
3097ab5716983c2fbae23af4128ec085966b0c18
[ "MIT" ]
1
2021-12-16T00:15:31.000Z
2021-12-16T00:15:31.000Z
zero_shot_re/__init__.py
fractalego/zero-shot-relation-extractor
3097ab5716983c2fbae23af4128ec085966b0c18
[ "MIT" ]
null
null
null
zero_shot_re/__init__.py
fractalego/zero-shot-relation-extractor
3097ab5716983c2fbae23af4128ec085966b0c18
[ "MIT" ]
null
null
null
from .extractor import RelationExtractor from .model import RelTaggerModel
37
40
0.878378
8
74
8.125
0.75
0
0
0
0
0
0
0
0
0
0
0
0.094595
74
2
41
37
0.970149
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
adf0df2a6eb7adb81606ba0bbc4f0f2f4c8e78be
121
py
Python
regscrape/run.py
sunlightlabs/regulations-scraper
5f2644a3cf54f915d7d90957645073737ab91022
[ "BSD-3-Clause" ]
13
2015-09-28T16:59:31.000Z
2020-06-20T01:23:13.000Z
regscrape/run.py
sunlightlabs/regulations-scraper
5f2644a3cf54f915d7d90957645073737ab91022
[ "BSD-3-Clause" ]
1
2019-02-18T20:26:21.000Z
2021-02-25T01:43:44.000Z
regscrape/run.py
sunlightlabs/regulations-scraper
5f2644a3cf54f915d7d90957645073737ab91022
[ "BSD-3-Clause" ]
6
2015-07-08T22:41:34.000Z
2019-09-03T18:19:32.000Z
#!/usr/bin/env python from regs_common.commands.runner import run_command if __name__ == '__main__': run_command()
17.285714
51
0.743802
17
121
4.647059
0.882353
0.253165
0
0
0
0
0
0
0
0
0
0
0.140496
121
6
52
20.166667
0.759615
0.165289
0
0
0
0
0.08
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
cb14d05345db3f16043fc0c6d947fee2e2323655
30,978
py
Python
python/services/monitoring/service.py
GoogleCloudPlatform/declarative-resource-client-library
ef28ca390518a8266cfe5a5e0d5abb8f45f5c7d2
[ "Apache-2.0" ]
16
2021-01-08T19:35:22.000Z
2022-03-23T16:23:49.000Z
python/services/monitoring/service.py
GoogleCloudPlatform/declarative-resource-client-library
ef28ca390518a8266cfe5a5e0d5abb8f45f5c7d2
[ "Apache-2.0" ]
1
2021-01-13T04:59:56.000Z
2021-01-13T04:59:56.000Z
python/services/monitoring/service.py
GoogleCloudPlatform/declarative-resource-client-library
ef28ca390518a8266cfe5a5e0d5abb8f45f5c7d2
[ "Apache-2.0" ]
11
2021-03-18T11:27:28.000Z
2022-03-12T06:49:14.000Z
# Copyright 2021 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from connector import channel from google3.cloud.graphite.mmv2.services.google.monitoring import service_pb2 from google3.cloud.graphite.mmv2.services.google.monitoring import service_pb2_grpc from typing import List class Service(object): def __init__( self, name: str = None, display_name: str = None, custom: dict = None, app_engine: dict = None, cloud_endpoints: dict = None, cluster_istio: dict = None, mesh_istio: dict = None, istio_canonical_service: dict = None, cloud_run: dict = None, gke_namespace: dict = None, gke_workload: dict = None, gke_service: dict = None, telemetry: dict = None, user_labels: dict = None, deleted: bool = None, project: str = None, service_account_file: str = "", ): channel.initialize() self.name = name self.display_name = display_name self.custom = custom self.app_engine = app_engine self.cloud_endpoints = cloud_endpoints self.cluster_istio = cluster_istio self.mesh_istio = mesh_istio self.istio_canonical_service = istio_canonical_service self.cloud_run = cloud_run self.gke_namespace = gke_namespace self.gke_workload = gke_workload self.gke_service = gke_service self.telemetry = telemetry self.user_labels = user_labels self.deleted = deleted self.project = project self.service_account_file = service_account_file def apply(self): stub = service_pb2_grpc.MonitoringServiceServiceStub(channel.Channel()) request = service_pb2.ApplyMonitoringServiceRequest() if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.display_name): request.resource.display_name = Primitive.to_proto(self.display_name) if ServiceCustom.to_proto(self.custom): request.resource.custom.CopyFrom(ServiceCustom.to_proto(self.custom)) else: request.resource.ClearField("custom") if ServiceAppEngine.to_proto(self.app_engine): request.resource.app_engine.CopyFrom( ServiceAppEngine.to_proto(self.app_engine) ) else: request.resource.ClearField("app_engine") if ServiceCloudEndpoints.to_proto(self.cloud_endpoints): request.resource.cloud_endpoints.CopyFrom( ServiceCloudEndpoints.to_proto(self.cloud_endpoints) ) else: request.resource.ClearField("cloud_endpoints") if ServiceClusterIstio.to_proto(self.cluster_istio): request.resource.cluster_istio.CopyFrom( ServiceClusterIstio.to_proto(self.cluster_istio) ) else: request.resource.ClearField("cluster_istio") if ServiceMeshIstio.to_proto(self.mesh_istio): request.resource.mesh_istio.CopyFrom( ServiceMeshIstio.to_proto(self.mesh_istio) ) else: request.resource.ClearField("mesh_istio") if ServiceIstioCanonicalService.to_proto(self.istio_canonical_service): request.resource.istio_canonical_service.CopyFrom( ServiceIstioCanonicalService.to_proto(self.istio_canonical_service) ) else: request.resource.ClearField("istio_canonical_service") if ServiceCloudRun.to_proto(self.cloud_run): request.resource.cloud_run.CopyFrom( ServiceCloudRun.to_proto(self.cloud_run) ) else: request.resource.ClearField("cloud_run") if ServiceGkeNamespace.to_proto(self.gke_namespace): request.resource.gke_namespace.CopyFrom( ServiceGkeNamespace.to_proto(self.gke_namespace) ) else: request.resource.ClearField("gke_namespace") if ServiceGkeWorkload.to_proto(self.gke_workload): request.resource.gke_workload.CopyFrom( ServiceGkeWorkload.to_proto(self.gke_workload) ) else: request.resource.ClearField("gke_workload") if ServiceGkeService.to_proto(self.gke_service): request.resource.gke_service.CopyFrom( ServiceGkeService.to_proto(self.gke_service) ) else: request.resource.ClearField("gke_service") if ServiceTelemetry.to_proto(self.telemetry): request.resource.telemetry.CopyFrom( ServiceTelemetry.to_proto(self.telemetry) ) else: request.resource.ClearField("telemetry") if Primitive.to_proto(self.user_labels): request.resource.user_labels = Primitive.to_proto(self.user_labels) if Primitive.to_proto(self.deleted): request.resource.deleted = Primitive.to_proto(self.deleted) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) request.service_account_file = self.service_account_file response = stub.ApplyMonitoringService(request) self.name = Primitive.from_proto(response.name) self.display_name = Primitive.from_proto(response.display_name) self.custom = ServiceCustom.from_proto(response.custom) self.app_engine = ServiceAppEngine.from_proto(response.app_engine) self.cloud_endpoints = ServiceCloudEndpoints.from_proto( response.cloud_endpoints ) self.cluster_istio = ServiceClusterIstio.from_proto(response.cluster_istio) self.mesh_istio = ServiceMeshIstio.from_proto(response.mesh_istio) self.istio_canonical_service = ServiceIstioCanonicalService.from_proto( response.istio_canonical_service ) self.cloud_run = ServiceCloudRun.from_proto(response.cloud_run) self.gke_namespace = ServiceGkeNamespace.from_proto(response.gke_namespace) self.gke_workload = ServiceGkeWorkload.from_proto(response.gke_workload) self.gke_service = ServiceGkeService.from_proto(response.gke_service) self.telemetry = ServiceTelemetry.from_proto(response.telemetry) self.user_labels = Primitive.from_proto(response.user_labels) self.deleted = Primitive.from_proto(response.deleted) self.project = Primitive.from_proto(response.project) def delete(self): stub = service_pb2_grpc.MonitoringServiceServiceStub(channel.Channel()) request = service_pb2.DeleteMonitoringServiceRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.display_name): request.resource.display_name = Primitive.to_proto(self.display_name) if ServiceCustom.to_proto(self.custom): request.resource.custom.CopyFrom(ServiceCustom.to_proto(self.custom)) else: request.resource.ClearField("custom") if ServiceAppEngine.to_proto(self.app_engine): request.resource.app_engine.CopyFrom( ServiceAppEngine.to_proto(self.app_engine) ) else: request.resource.ClearField("app_engine") if ServiceCloudEndpoints.to_proto(self.cloud_endpoints): request.resource.cloud_endpoints.CopyFrom( ServiceCloudEndpoints.to_proto(self.cloud_endpoints) ) else: request.resource.ClearField("cloud_endpoints") if ServiceClusterIstio.to_proto(self.cluster_istio): request.resource.cluster_istio.CopyFrom( ServiceClusterIstio.to_proto(self.cluster_istio) ) else: request.resource.ClearField("cluster_istio") if ServiceMeshIstio.to_proto(self.mesh_istio): request.resource.mesh_istio.CopyFrom( ServiceMeshIstio.to_proto(self.mesh_istio) ) else: request.resource.ClearField("mesh_istio") if ServiceIstioCanonicalService.to_proto(self.istio_canonical_service): request.resource.istio_canonical_service.CopyFrom( ServiceIstioCanonicalService.to_proto(self.istio_canonical_service) ) else: request.resource.ClearField("istio_canonical_service") if ServiceCloudRun.to_proto(self.cloud_run): request.resource.cloud_run.CopyFrom( ServiceCloudRun.to_proto(self.cloud_run) ) else: request.resource.ClearField("cloud_run") if ServiceGkeNamespace.to_proto(self.gke_namespace): request.resource.gke_namespace.CopyFrom( ServiceGkeNamespace.to_proto(self.gke_namespace) ) else: request.resource.ClearField("gke_namespace") if ServiceGkeWorkload.to_proto(self.gke_workload): request.resource.gke_workload.CopyFrom( ServiceGkeWorkload.to_proto(self.gke_workload) ) else: request.resource.ClearField("gke_workload") if ServiceGkeService.to_proto(self.gke_service): request.resource.gke_service.CopyFrom( ServiceGkeService.to_proto(self.gke_service) ) else: request.resource.ClearField("gke_service") if ServiceTelemetry.to_proto(self.telemetry): request.resource.telemetry.CopyFrom( ServiceTelemetry.to_proto(self.telemetry) ) else: request.resource.ClearField("telemetry") if Primitive.to_proto(self.user_labels): request.resource.user_labels = Primitive.to_proto(self.user_labels) if Primitive.to_proto(self.deleted): request.resource.deleted = Primitive.to_proto(self.deleted) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) response = stub.DeleteMonitoringService(request) @classmethod def list(self, project, service_account_file=""): stub = service_pb2_grpc.MonitoringServiceServiceStub(channel.Channel()) request = service_pb2.ListMonitoringServiceRequest() request.service_account_file = service_account_file request.Project = project return stub.ListMonitoringService(request).items def to_proto(self): resource = service_pb2.MonitoringService() if Primitive.to_proto(self.name): resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.display_name): resource.display_name = Primitive.to_proto(self.display_name) if ServiceCustom.to_proto(self.custom): resource.custom.CopyFrom(ServiceCustom.to_proto(self.custom)) else: resource.ClearField("custom") if ServiceAppEngine.to_proto(self.app_engine): resource.app_engine.CopyFrom(ServiceAppEngine.to_proto(self.app_engine)) else: resource.ClearField("app_engine") if ServiceCloudEndpoints.to_proto(self.cloud_endpoints): resource.cloud_endpoints.CopyFrom( ServiceCloudEndpoints.to_proto(self.cloud_endpoints) ) else: resource.ClearField("cloud_endpoints") if ServiceClusterIstio.to_proto(self.cluster_istio): resource.cluster_istio.CopyFrom( ServiceClusterIstio.to_proto(self.cluster_istio) ) else: resource.ClearField("cluster_istio") if ServiceMeshIstio.to_proto(self.mesh_istio): resource.mesh_istio.CopyFrom(ServiceMeshIstio.to_proto(self.mesh_istio)) else: resource.ClearField("mesh_istio") if ServiceIstioCanonicalService.to_proto(self.istio_canonical_service): resource.istio_canonical_service.CopyFrom( ServiceIstioCanonicalService.to_proto(self.istio_canonical_service) ) else: resource.ClearField("istio_canonical_service") if ServiceCloudRun.to_proto(self.cloud_run): resource.cloud_run.CopyFrom(ServiceCloudRun.to_proto(self.cloud_run)) else: resource.ClearField("cloud_run") if ServiceGkeNamespace.to_proto(self.gke_namespace): resource.gke_namespace.CopyFrom( ServiceGkeNamespace.to_proto(self.gke_namespace) ) else: resource.ClearField("gke_namespace") if ServiceGkeWorkload.to_proto(self.gke_workload): resource.gke_workload.CopyFrom( ServiceGkeWorkload.to_proto(self.gke_workload) ) else: resource.ClearField("gke_workload") if ServiceGkeService.to_proto(self.gke_service): resource.gke_service.CopyFrom(ServiceGkeService.to_proto(self.gke_service)) else: resource.ClearField("gke_service") if ServiceTelemetry.to_proto(self.telemetry): resource.telemetry.CopyFrom(ServiceTelemetry.to_proto(self.telemetry)) else: resource.ClearField("telemetry") if Primitive.to_proto(self.user_labels): resource.user_labels = Primitive.to_proto(self.user_labels) if Primitive.to_proto(self.deleted): resource.deleted = Primitive.to_proto(self.deleted) if Primitive.to_proto(self.project): resource.project = Primitive.to_proto(self.project) return resource class ServiceCustom(object): @classmethod def to_proto(self, resource): if not resource: return None res = service_pb2.MonitoringServiceCustom() return res @classmethod def from_proto(self, resource): if not resource: return None return ServiceCustom() class ServiceCustomArray(object): @classmethod def to_proto(self, resources): if not resources: return resources return [ServiceCustom.to_proto(i) for i in resources] @classmethod def from_proto(self, resources): return [ServiceCustom.from_proto(i) for i in resources] class ServiceAppEngine(object): def __init__(self, module_id: str = None): self.module_id = module_id @classmethod def to_proto(self, resource): if not resource: return None res = service_pb2.MonitoringServiceAppEngine() if Primitive.to_proto(resource.module_id): res.module_id = Primitive.to_proto(resource.module_id) return res @classmethod def from_proto(self, resource): if not resource: return None return ServiceAppEngine(module_id=Primitive.from_proto(resource.module_id),) class ServiceAppEngineArray(object): @classmethod def to_proto(self, resources): if not resources: return resources return [ServiceAppEngine.to_proto(i) for i in resources] @classmethod def from_proto(self, resources): return [ServiceAppEngine.from_proto(i) for i in resources] class ServiceCloudEndpoints(object): def __init__(self, service: str = None): self.service = service @classmethod def to_proto(self, resource): if not resource: return None res = service_pb2.MonitoringServiceCloudEndpoints() if Primitive.to_proto(resource.service): res.service = Primitive.to_proto(resource.service) return res @classmethod def from_proto(self, resource): if not resource: return None return ServiceCloudEndpoints(service=Primitive.from_proto(resource.service),) class ServiceCloudEndpointsArray(object): @classmethod def to_proto(self, resources): if not resources: return resources return [ServiceCloudEndpoints.to_proto(i) for i in resources] @classmethod def from_proto(self, resources): return [ServiceCloudEndpoints.from_proto(i) for i in resources] class ServiceClusterIstio(object): def __init__( self, location: str = None, cluster_name: str = None, service_namespace: str = None, service_name: str = None, ): self.location = location self.cluster_name = cluster_name self.service_namespace = service_namespace self.service_name = service_name @classmethod def to_proto(self, resource): if not resource: return None res = service_pb2.MonitoringServiceClusterIstio() if Primitive.to_proto(resource.location): res.location = Primitive.to_proto(resource.location) if Primitive.to_proto(resource.cluster_name): res.cluster_name = Primitive.to_proto(resource.cluster_name) if Primitive.to_proto(resource.service_namespace): res.service_namespace = Primitive.to_proto(resource.service_namespace) if Primitive.to_proto(resource.service_name): res.service_name = Primitive.to_proto(resource.service_name) return res @classmethod def from_proto(self, resource): if not resource: return None return ServiceClusterIstio( location=Primitive.from_proto(resource.location), cluster_name=Primitive.from_proto(resource.cluster_name), service_namespace=Primitive.from_proto(resource.service_namespace), service_name=Primitive.from_proto(resource.service_name), ) class ServiceClusterIstioArray(object): @classmethod def to_proto(self, resources): if not resources: return resources return [ServiceClusterIstio.to_proto(i) for i in resources] @classmethod def from_proto(self, resources): return [ServiceClusterIstio.from_proto(i) for i in resources] class ServiceMeshIstio(object): def __init__( self, mesh_uid: str = None, service_namespace: str = None, service_name: str = None, ): self.mesh_uid = mesh_uid self.service_namespace = service_namespace self.service_name = service_name @classmethod def to_proto(self, resource): if not resource: return None res = service_pb2.MonitoringServiceMeshIstio() if Primitive.to_proto(resource.mesh_uid): res.mesh_uid = Primitive.to_proto(resource.mesh_uid) if Primitive.to_proto(resource.service_namespace): res.service_namespace = Primitive.to_proto(resource.service_namespace) if Primitive.to_proto(resource.service_name): res.service_name = Primitive.to_proto(resource.service_name) return res @classmethod def from_proto(self, resource): if not resource: return None return ServiceMeshIstio( mesh_uid=Primitive.from_proto(resource.mesh_uid), service_namespace=Primitive.from_proto(resource.service_namespace), service_name=Primitive.from_proto(resource.service_name), ) class ServiceMeshIstioArray(object): @classmethod def to_proto(self, resources): if not resources: return resources return [ServiceMeshIstio.to_proto(i) for i in resources] @classmethod def from_proto(self, resources): return [ServiceMeshIstio.from_proto(i) for i in resources] class ServiceIstioCanonicalService(object): def __init__( self, mesh_uid: str = None, canonical_service_namespace: str = None, canonical_service: str = None, ): self.mesh_uid = mesh_uid self.canonical_service_namespace = canonical_service_namespace self.canonical_service = canonical_service @classmethod def to_proto(self, resource): if not resource: return None res = service_pb2.MonitoringServiceIstioCanonicalService() if Primitive.to_proto(resource.mesh_uid): res.mesh_uid = Primitive.to_proto(resource.mesh_uid) if Primitive.to_proto(resource.canonical_service_namespace): res.canonical_service_namespace = Primitive.to_proto( resource.canonical_service_namespace ) if Primitive.to_proto(resource.canonical_service): res.canonical_service = Primitive.to_proto(resource.canonical_service) return res @classmethod def from_proto(self, resource): if not resource: return None return ServiceIstioCanonicalService( mesh_uid=Primitive.from_proto(resource.mesh_uid), canonical_service_namespace=Primitive.from_proto( resource.canonical_service_namespace ), canonical_service=Primitive.from_proto(resource.canonical_service), ) class ServiceIstioCanonicalServiceArray(object): @classmethod def to_proto(self, resources): if not resources: return resources return [ServiceIstioCanonicalService.to_proto(i) for i in resources] @classmethod def from_proto(self, resources): return [ServiceIstioCanonicalService.from_proto(i) for i in resources] class ServiceCloudRun(object): def __init__(self, service_name: str = None, location: str = None): self.service_name = service_name self.location = location @classmethod def to_proto(self, resource): if not resource: return None res = service_pb2.MonitoringServiceCloudRun() if Primitive.to_proto(resource.service_name): res.service_name = Primitive.to_proto(resource.service_name) if Primitive.to_proto(resource.location): res.location = Primitive.to_proto(resource.location) return res @classmethod def from_proto(self, resource): if not resource: return None return ServiceCloudRun( service_name=Primitive.from_proto(resource.service_name), location=Primitive.from_proto(resource.location), ) class ServiceCloudRunArray(object): @classmethod def to_proto(self, resources): if not resources: return resources return [ServiceCloudRun.to_proto(i) for i in resources] @classmethod def from_proto(self, resources): return [ServiceCloudRun.from_proto(i) for i in resources] class ServiceGkeNamespace(object): def __init__( self, project_id: str = None, location: str = None, cluster_name: str = None, namespace_name: str = None, ): self.project_id = project_id self.location = location self.cluster_name = cluster_name self.namespace_name = namespace_name @classmethod def to_proto(self, resource): if not resource: return None res = service_pb2.MonitoringServiceGkeNamespace() if Primitive.to_proto(resource.project_id): res.project_id = Primitive.to_proto(resource.project_id) if Primitive.to_proto(resource.location): res.location = Primitive.to_proto(resource.location) if Primitive.to_proto(resource.cluster_name): res.cluster_name = Primitive.to_proto(resource.cluster_name) if Primitive.to_proto(resource.namespace_name): res.namespace_name = Primitive.to_proto(resource.namespace_name) return res @classmethod def from_proto(self, resource): if not resource: return None return ServiceGkeNamespace( project_id=Primitive.from_proto(resource.project_id), location=Primitive.from_proto(resource.location), cluster_name=Primitive.from_proto(resource.cluster_name), namespace_name=Primitive.from_proto(resource.namespace_name), ) class ServiceGkeNamespaceArray(object): @classmethod def to_proto(self, resources): if not resources: return resources return [ServiceGkeNamespace.to_proto(i) for i in resources] @classmethod def from_proto(self, resources): return [ServiceGkeNamespace.from_proto(i) for i in resources] class ServiceGkeWorkload(object): def __init__( self, project_id: str = None, location: str = None, cluster_name: str = None, namespace_name: str = None, top_level_controller_type: str = None, top_level_controller_name: str = None, ): self.project_id = project_id self.location = location self.cluster_name = cluster_name self.namespace_name = namespace_name self.top_level_controller_type = top_level_controller_type self.top_level_controller_name = top_level_controller_name @classmethod def to_proto(self, resource): if not resource: return None res = service_pb2.MonitoringServiceGkeWorkload() if Primitive.to_proto(resource.project_id): res.project_id = Primitive.to_proto(resource.project_id) if Primitive.to_proto(resource.location): res.location = Primitive.to_proto(resource.location) if Primitive.to_proto(resource.cluster_name): res.cluster_name = Primitive.to_proto(resource.cluster_name) if Primitive.to_proto(resource.namespace_name): res.namespace_name = Primitive.to_proto(resource.namespace_name) if Primitive.to_proto(resource.top_level_controller_type): res.top_level_controller_type = Primitive.to_proto( resource.top_level_controller_type ) if Primitive.to_proto(resource.top_level_controller_name): res.top_level_controller_name = Primitive.to_proto( resource.top_level_controller_name ) return res @classmethod def from_proto(self, resource): if not resource: return None return ServiceGkeWorkload( project_id=Primitive.from_proto(resource.project_id), location=Primitive.from_proto(resource.location), cluster_name=Primitive.from_proto(resource.cluster_name), namespace_name=Primitive.from_proto(resource.namespace_name), top_level_controller_type=Primitive.from_proto( resource.top_level_controller_type ), top_level_controller_name=Primitive.from_proto( resource.top_level_controller_name ), ) class ServiceGkeWorkloadArray(object): @classmethod def to_proto(self, resources): if not resources: return resources return [ServiceGkeWorkload.to_proto(i) for i in resources] @classmethod def from_proto(self, resources): return [ServiceGkeWorkload.from_proto(i) for i in resources] class ServiceGkeService(object): def __init__( self, project_id: str = None, location: str = None, cluster_name: str = None, namespace_name: str = None, service_name: str = None, ): self.project_id = project_id self.location = location self.cluster_name = cluster_name self.namespace_name = namespace_name self.service_name = service_name @classmethod def to_proto(self, resource): if not resource: return None res = service_pb2.MonitoringServiceGkeService() if Primitive.to_proto(resource.project_id): res.project_id = Primitive.to_proto(resource.project_id) if Primitive.to_proto(resource.location): res.location = Primitive.to_proto(resource.location) if Primitive.to_proto(resource.cluster_name): res.cluster_name = Primitive.to_proto(resource.cluster_name) if Primitive.to_proto(resource.namespace_name): res.namespace_name = Primitive.to_proto(resource.namespace_name) if Primitive.to_proto(resource.service_name): res.service_name = Primitive.to_proto(resource.service_name) return res @classmethod def from_proto(self, resource): if not resource: return None return ServiceGkeService( project_id=Primitive.from_proto(resource.project_id), location=Primitive.from_proto(resource.location), cluster_name=Primitive.from_proto(resource.cluster_name), namespace_name=Primitive.from_proto(resource.namespace_name), service_name=Primitive.from_proto(resource.service_name), ) class ServiceGkeServiceArray(object): @classmethod def to_proto(self, resources): if not resources: return resources return [ServiceGkeService.to_proto(i) for i in resources] @classmethod def from_proto(self, resources): return [ServiceGkeService.from_proto(i) for i in resources] class ServiceTelemetry(object): def __init__(self, resource_name: str = None): self.resource_name = resource_name @classmethod def to_proto(self, resource): if not resource: return None res = service_pb2.MonitoringServiceTelemetry() if Primitive.to_proto(resource.resource_name): res.resource_name = Primitive.to_proto(resource.resource_name) return res @classmethod def from_proto(self, resource): if not resource: return None return ServiceTelemetry( resource_name=Primitive.from_proto(resource.resource_name), ) class ServiceTelemetryArray(object): @classmethod def to_proto(self, resources): if not resources: return resources return [ServiceTelemetry.to_proto(i) for i in resources] @classmethod def from_proto(self, resources): return [ServiceTelemetry.from_proto(i) for i in resources] class Primitive(object): @classmethod def to_proto(self, s): if not s: return "" return s @classmethod def from_proto(self, s): return s
36.231579
87
0.666247
3,304
30,978
6.007869
0.054177
0.067355
0.066499
0.072544
0.80796
0.764937
0.733249
0.716071
0.675365
0.664484
0
0.001391
0.257118
30,978
854
88
36.274005
0.861165
0.018465
0
0.663889
0
0
0.012931
0.00227
0
0
0
0
0
1
0.084722
false
0
0.005556
0.016667
0.2375
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
cb3127fd1bb43f66968645bcb5b8595ddfe268ab
257
py
Python
nexus/tests/unit/test_rmg_analyzer.py
eugeneswalker/qmcpack
352ff27f163bb92e0c232c48bec8ae7951ed9d8c
[ "NCSA" ]
null
null
null
nexus/tests/unit/test_rmg_analyzer.py
eugeneswalker/qmcpack
352ff27f163bb92e0c232c48bec8ae7951ed9d8c
[ "NCSA" ]
11
2020-05-09T20:57:21.000Z
2020-06-10T00:00:17.000Z
nexus/tests/unit/test_rmg_analyzer.py
williamfgc/qmcpack
732b473841e7823a21ab55ff397eed059f0f2e96
[ "NCSA" ]
null
null
null
import testing from testing import value_eq,object_eq,text_eq def test_import(): from rmg_analyzer import RmgAnalyzer #end def test_import def test_empty_init(): from rmg_analyzer import RmgAnalyzer RmgAnalyzer() #end def test_empty_init
15.117647
46
0.782101
38
257
5
0.394737
0.147368
0.136842
0.221053
0.336842
0
0
0
0
0
0
0
0.171206
257
16
47
16.0625
0.892019
0.163424
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.285714
true
0
0.714286
0
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
5
cb82f67e6847fde0252ce337f7c144f730560b03
51
py
Python
model.py
leahcruz/App-Homepage
89c6d983026f6b7ee92e5e3d6a7fabfcd253739f
[ "MIT" ]
null
null
null
model.py
leahcruz/App-Homepage
89c6d983026f6b7ee92e5e3d6a7fabfcd253739f
[ "MIT" ]
1
2020-08-03T18:23:52.000Z
2020-08-03T18:23:52.000Z
model.py
leahcruz/App-Homepage
89c6d983026f6b7ee92e5e3d6a7fabfcd253739f
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request
17
49
0.823529
7
51
5.857143
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.137255
51
2
50
25.5
0.931818
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
cbaee91dc4cc34aed7db497a85df9c1f34bc23b6
159
py
Python
roundrobin/__init__.py
bollwyvl/roundrobin
833f23cf406d08ba4842c14daf81dc5453620498
[ "MIT" ]
11
2019-05-30T02:37:22.000Z
2021-12-14T17:37:25.000Z
venv/venv/lib/python3.8/site-packages/roundrobin/__init__.py
mrunix1998/booking-flights-system
4eab3d845c4ba6742bd550604fe69b7f101c8da4
[ "MIT" ]
1
2020-10-20T16:10:22.000Z
2020-10-20T16:10:22.000Z
venv/venv/lib/python3.8/site-packages/roundrobin/__init__.py
mrunix1998/booking-flights-system
4eab3d845c4ba6742bd550604fe69b7f101c8da4
[ "MIT" ]
5
2020-01-20T15:46:57.000Z
2021-08-02T02:15:42.000Z
from roundrobin.basic_rr import basic from roundrobin.smooth_rr import smooth from roundrobin.weighted_rr import weighted __ALL__ = [basic, weighted, smooth]
26.5
43
0.836478
22
159
5.727273
0.363636
0.333333
0
0
0
0
0
0
0
0
0
0
0.113208
159
5
44
31.8
0.893617
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
cbcb5870fddb0ef201689d6686b2d848014187e5
317
py
Python
run_features.py
JesseBerdowski/eindexamen_csd_gpp
c4859c74cf8e2e8c948d339ea95f31182592f625
[ "Apache-2.0" ]
null
null
null
run_features.py
JesseBerdowski/eindexamen_csd_gpp
c4859c74cf8e2e8c948d339ea95f31182592f625
[ "Apache-2.0" ]
null
null
null
run_features.py
JesseBerdowski/eindexamen_csd_gpp
c4859c74cf8e2e8c948d339ea95f31182592f625
[ "Apache-2.0" ]
null
null
null
# local imports from feature_extraction.feature_extraction import features_to_csv, batch_extractor_essentia from feature_extraction.feature_exports import export_csv_data from util import export_history if __name__ == '__main__': # batch_extractor_essentia() features_to_csv() export_csv_data()
31.7
92
0.804416
40
317
5.75
0.5
0.221739
0.182609
0.243478
0
0
0
0
0
0
0
0
0.14511
317
10
93
31.7
0.848708
0.126183
0
0
0
0
0.030075
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
cbcf240cab81162b2e1241ef77bcff8fd47886a6
144
py
Python
tc_generator/test_generate.py
sandarubc/Testcase-Generator
a712dc021b36be7cb2d50d90275077c960ff7bc0
[ "MIT" ]
2
2018-11-22T21:09:20.000Z
2018-12-03T12:35:56.000Z
tc_generator/test_generate.py
Atishay990/Testcase-Generator
e0d78247d07b0342b2d7c162e68107e0db99c5c8
[ "MIT" ]
14
2018-12-02T14:39:48.000Z
2018-12-26T10:32:16.000Z
tc_generator/test_generate.py
Atishay990/Testcase-Generator
e0d78247d07b0342b2d7c162e68107e0db99c5c8
[ "MIT" ]
6
2018-12-03T06:41:13.000Z
2019-10-30T08:20:39.000Z
import os from tc_gen import generate def check_zip(): generate(4, 1) if os.system('rm -r test-cases.zip') == 0: assert(True)
16
46
0.625
24
144
3.666667
0.833333
0
0
0
0
0
0
0
0
0
0
0.027523
0.243056
144
8
47
18
0.779817
0
0
0
1
0
0.138889
0
0
0
0
0
0.166667
1
0.166667
true
0
0.333333
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
1dc8acd0acc893225d32eedabeb877a957df3ef9
239
py
Python
gym_poker/envs/poker/__init__.py
x2ever/PokerAI
0d99c1c1d9f68aa403db6cbc85a3f699a28d2342
[ "MIT" ]
null
null
null
gym_poker/envs/poker/__init__.py
x2ever/PokerAI
0d99c1c1d9f68aa403db6cbc85a3f699a28d2342
[ "MIT" ]
null
null
null
gym_poker/envs/poker/__init__.py
x2ever/PokerAI
0d99c1c1d9f68aa403db6cbc85a3f699a28d2342
[ "MIT" ]
null
null
null
"""Objects for poker game.""" from gym_poker.envs.poker.card import Card from gym_poker.envs.poker.deck import Deck from gym_poker.envs.poker.ranks import Ranks from gym_poker.envs.poker.player import BasePlayer, RandomPlayer, ModelPlayer
39.833333
77
0.820084
38
239
5.052632
0.394737
0.145833
0.25
0.333333
0.4375
0
0
0
0
0
0
0
0.09205
239
5
78
47.8
0.884793
0.096234
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
1dd9a4337a2c9bd04b6a8f81b0e04d55bee2d799
54
py
Python
Week 5: Tuples, for loop, Lists/5 (01).py
MLunov/Python-programming-basics-HSE
7df8bba105db84d6b932c454fdc39193a648254e
[ "MIT" ]
null
null
null
Week 5: Tuples, for loop, Lists/5 (01).py
MLunov/Python-programming-basics-HSE
7df8bba105db84d6b932c454fdc39193a648254e
[ "MIT" ]
null
null
null
Week 5: Tuples, for loop, Lists/5 (01).py
MLunov/Python-programming-basics-HSE
7df8bba105db84d6b932c454fdc39193a648254e
[ "MIT" ]
null
null
null
print(*tuple(range(int(input()), int(input()) + 1)))
27
53
0.592593
8
54
4
0.75
0.5
0
0
0
0
0
0
0
0
0
0.020408
0.092593
54
1
54
54
0.632653
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
3830580c297bfc0b0da576233b25a0f31d7d6259
5,799
py
Python
Code/Selenium/submodules/login.py
HeptaDevGrp/BB-CWL
1f10cd17b3f7f447c9bdac76a124026a4bafb4b5
[ "MIT" ]
1
2021-08-25T10:41:28.000Z
2021-08-25T10:41:28.000Z
Code/Selenium/submodules/login.py
HeptaDevGrp/BB-CWL
1f10cd17b3f7f447c9bdac76a124026a4bafb4b5
[ "MIT" ]
null
null
null
Code/Selenium/submodules/login.py
HeptaDevGrp/BB-CWL
1f10cd17b3f7f447c9bdac76a124026a4bafb4b5
[ "MIT" ]
3
2022-01-28T09:02:33.000Z
2022-03-28T16:29:10.000Z
from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.wait import WebDriverWait import configparser class login: refresh_limit_number = 100 def __init__(self, driver=None): # local variable initialization self.driver = driver self.account = "example.19@intl.zju.edu.cn" self.password = "PasswordYouLike" def load_account_info(self): # load the config file config = configparser.ConfigParser() config.read("config.ini") self.account = config['identification_information']['account_config'] self.password = config['identification_information']['password_config'] return def logging_in_process(self): # click on "INTL ID" # self.driver.implicitly_wait(10) # INTL_ID_button = self.driver.find_element_by_xpath("/html/body/div[2]/div/div[1]/a/img") INTL_ID_button = WebDriverWait(self.driver,10).until(lambda d:d.find_element_by_xpath("/html/body/div[2]/div/div[1]/a/img")) INTL_ID_button.click() # enter the account name max_refresh_number=0 while(True): if(max_refresh_number > self.refresh_limit_number): print("fail to enter account name") return else: try: # self.driver.implicitly_wait(10) # account_input_box = self.driver.find_element_by_xpath( # '/html/body/div/form[1]/div/div/div[2]/div[1]/div/div/div/div/div/div[3]/div/div/div/div[2]/div[2]/div/input[1]') account_input_box = WebDriverWait(self.driver,10).until(lambda d:d.find_element_by_xpath('/html/body/div/form[1]/div/div/div[2]/div[1]/div/div/div/div/div/div[3]/div/div/div/div[2]/div[2]/div/input[1]')) account_input_box.send_keys(self.account) account_input_box.send_keys(Keys.ENTER) break except: max_refresh_number += 1 # enter the password and confirm max_refresh_number = 0 while(max_refresh_number <= self.refresh_limit_number): try: # self.driver.implicitly_wait(10) # password_input_box = self.driver.find_element_by_xpath( # '/html/body/div/form[1]/div/div/div[2]/div[1]/div/div/div/div/div/div[3]/div/div[2]/div/div[2]/div/div[2]/input') password_input_box = WebDriverWait(self.driver,10).until(lambda d:d.find_element_by_xpath('/html/body/div/form[1]/div/div/div[2]/div[1]/div/div/div/div/div/div[3]/div/div[2]/div/div[2]/div/div[2]/input')) password_input_box.send_keys(self.password) password_input_box.send_keys(Keys.ENTER) break except: self.driver.refresh() max_refresh_number += 1 if(max_refresh_number > self.refresh_limit_number): print("fail to enter password") return # click the YES button max_refresh_number = 0 while(max_refresh_number <= self.refresh_limit_number): try: # self.driver.implicitly_wait(10) # YES_button = self.driver.find_element_by_xpath( # '/html/body/div/form/div/div/div[2]/div[1]/div/div/div/div/div/div/div[1]/div[2]/div/div[2]/div/div[3]/div[2]/div/div/div[2]/input') YES_button = WebDriverWait(self.driver,30).until(lambda d:d.find_element_by_xpath('/html/body/div/form/div/div/div[2]/div[1]/div/div/div/div/div/div/div[1]/div[2]/div/div[2]/div/div[3]/div[2]/div/div/div[2]/input')) YES_button.click() break except: self.driver.refresh() max_refresh_number += 1 if(max_refresh_number > self.refresh_limit_number): print("fail to click yes button") return # click the "click this link" button max_refresh_number = 0 while(max_refresh_number <= self.refresh_limit_number): try: # self.driver.implicitly_wait(10) # click_this_link_button = self.driver.find_element_by_xpath('/html/body/div/div/div[3]/p[2]/span/a[1]') click_this_link_button = WebDriverWait(self.driver,10).until(lambda d:d.find_element_by_xpath('/html/body/div/div/div[3]/p[2]/span/a[1]')) click_this_link_button.click() break except: self.driver.refresh() max_refresh_number += 1 if(max_refresh_number > self.refresh_limit_number): print("fail to click this link") return # click the "INTL ID" button again max_refresh_number = 0 while(max_refresh_number <= self.refresh_limit_number): if(max_refresh_number > self.refresh_limit_number): print("fail to click INTL ID button again") return else: try: # self.driver.implicitly_wait(10) # INTL_ID_button_second = self.driver.find_element_by_xpath( # '/html/body/div/div[3]/div[2]/div/div[2]/div/div[1]/div/div[1]/a/img') INTL_ID_button_second = WebDriverWait(self.driver,10).until(lambda d:d.find_element_by_xpath('/html/body/div/div[3]/div[2]/div/div[2]/div/div[1]/div/div[1]/a/img')) INTL_ID_button_second.click() break except: self.driver.refresh() max_refresh_number += 1 return def login_caller(self): self.load_account_info() self.logging_in_process() return
47.532787
231
0.590792
777
5,799
4.198198
0.123552
0.14347
0.110362
0.080932
0.739117
0.720417
0.720417
0.720417
0.664316
0.664316
0
0.024879
0.286084
5,799
121
232
47.92562
0.763043
0.217624
0
0.55814
0
0.05814
0.166445
0.125887
0
0
0
0
0
1
0.046512
false
0.069767
0.034884
0
0.197674
0.05814
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
3842ce4bc051f9a4f52600d3ae78d415a257b83f
220
py
Python
apps/chat/urls.py
prashg008/chatify
99cdd90ed8415b8818603e3270773f16845f23fd
[ "MIT" ]
1
2020-05-22T15:07:40.000Z
2020-05-22T15:07:40.000Z
apps/chat/urls.py
prashg008/chatify
99cdd90ed8415b8818603e3270773f16845f23fd
[ "MIT" ]
5
2020-06-19T10:41:03.000Z
2022-02-27T02:54:38.000Z
apps/chat/urls.py
prashg008/chatify
99cdd90ed8415b8818603e3270773f16845f23fd
[ "MIT" ]
null
null
null
from rest_framework.routers import SimpleRouter from .views import RoomsViewSet, MessageViewSet chat_router = SimpleRouter() chat_router.register(r'rooms', RoomsViewSet) chat_router.register(r'message', MessageViewSet)
31.428571
48
0.840909
26
220
6.961538
0.576923
0.165746
0.198895
0.209945
0
0
0
0
0
0
0
0
0.077273
220
6
49
36.666667
0.891626
0
0
0
0
0
0.054545
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
697f4a74edd64afcd0b486d2fa2425c49d19f049
343
py
Python
ATC2_0/original_views/landing_views.py
JoannaMadNat/ATCProject
c68e550b2cc33195af36784be0adfd2bb46a396e
[ "MIT" ]
null
null
null
ATC2_0/original_views/landing_views.py
JoannaMadNat/ATCProject
c68e550b2cc33195af36784be0adfd2bb46a396e
[ "MIT" ]
null
null
null
ATC2_0/original_views/landing_views.py
JoannaMadNat/ATCProject
c68e550b2cc33195af36784be0adfd2bb46a396e
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from ..models import User def landing_index(request): return render(request, 'landing/index.html') def not_found(request): return render(request=request, template_name='landing/not-found.html', status=400) def bad_input(request): return render(request, 'landing/bad-input.html')
22.866667
86
0.758017
47
343
5.446809
0.468085
0.152344
0.222656
0.304688
0.257813
0
0
0
0
0
0
0.01
0.125364
343
14
87
24.5
0.843333
0
0
0
0
0
0.180758
0.12828
0
0
0
0
0
1
0.375
false
0
0.25
0.375
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
3892b90186db48449178b705af17bf3e69298a99
267
py
Python
doc/colors.py
borntyping/python-colorlog
250a692c583cf03d5dd18918a7974ac46a8c0321
[ "MIT" ]
745
2015-01-12T20:12:53.000Z
2022-03-28T03:27:31.000Z
doc/colors.py
borntyping/python-colorlog
250a692c583cf03d5dd18918a7974ac46a8c0321
[ "MIT" ]
90
2015-01-06T14:35:34.000Z
2022-03-15T11:58:29.000Z
doc/colors.py
borntyping/python-colorlog
250a692c583cf03d5dd18918a7974ac46a8c0321
[ "MIT" ]
93
2015-01-24T15:21:45.000Z
2022-03-18T14:49:40.000Z
""" Print every color code supported by colorlog in it's own color. """ import colorlog.escape_codes if __name__ == "__main__": for key, value in colorlog.escape_codes.escape_codes.items(): print(value, key, colorlog.escape_codes.escape_codes["reset"])
26.7
70
0.730337
38
267
4.789474
0.578947
0.302198
0.313187
0.274725
0.32967
0
0
0
0
0
0
0
0.153558
267
9
71
29.666667
0.80531
0.235955
0
0
0
0
0.066327
0
0
0
0
0
0
1
0
true
0
0.25
0
0.25
0.25
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
38b145cef881bcb1bcd67d70a78c7945bc04b531
336
py
Python
ndef-0.1/ndef/__init__.py
project-humix/humix-sense-nfc
425364177d55d8a70a2e17119553c0bd5088ddf4
[ "Apache-2.0" ]
null
null
null
ndef-0.1/ndef/__init__.py
project-humix/humix-sense-nfc
425364177d55d8a70a2e17119553c0bd5088ddf4
[ "Apache-2.0" ]
null
null
null
ndef-0.1/ndef/__init__.py
project-humix/humix-sense-nfc
425364177d55d8a70a2e17119553c0bd5088ddf4
[ "Apache-2.0" ]
null
null
null
from ndef import NdefMessage, NdefRecord, new_message, new_smart_poster from ndef import TNF_EMPTY, TNF_EXTERNAL, TNF_MEDIA, TNF_RESERVED, TNF_UNCHANGED, TNF_UNKNOWN, TNF_URI, TNF_WELL_KNOWN from ndef import RTD_SMART_POSTER, RTD_TEXT, RTD_URI, RTD_URI_ABBRIV_NUM from ndef import InvalidNdef, InvalidNdefMessage, InvalidNdefRecord
67.2
119
0.85119
50
336
5.34
0.52
0.11985
0.209738
0
0
0
0
0
0
0
0
0
0.104167
336
4
120
84
0.887043
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
38d600400d207ce619b9f2546b0244c2e5a710c8
49
py
Python
carrot/exceptions.py
martinell/django-carrot
11c8790d8e68ccd7757cc9187d852acb2f528a8d
[ "Apache-2.0" ]
63
2017-10-12T19:38:17.000Z
2022-02-21T15:56:17.000Z
carrot/exceptions.py
martinell/django-carrot
11c8790d8e68ccd7757cc9187d852acb2f528a8d
[ "Apache-2.0" ]
93
2017-10-13T06:17:14.000Z
2022-03-02T14:25:40.000Z
carrot/exceptions.py
martinell/django-carrot
11c8790d8e68ccd7757cc9187d852acb2f528a8d
[ "Apache-2.0" ]
19
2018-03-26T08:33:13.000Z
2022-03-17T04:33:49.000Z
class CarrotConfigException(Exception): pass
16.333333
39
0.795918
4
49
9.75
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
49
2
40
24.5
0.928571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
2a527a8b93a64223ec23b69ae83758602c2c23c3
45
py
Python
examples/multiparse/__init__.py
kuwv/python-argufy
e833d5aa3c491671d0043c0c6861a2f632e238b6
[ "Apache-2.0" ]
null
null
null
examples/multiparse/__init__.py
kuwv/python-argufy
e833d5aa3c491671d0043c0c6861a2f632e238b6
[ "Apache-2.0" ]
3
2021-12-05T15:27:58.000Z
2021-12-05T15:27:59.000Z
examples/multiparse/__init__.py
kuwv/python-argufy
e833d5aa3c491671d0043c0c6861a2f632e238b6
[ "Apache-2.0" ]
null
null
null
'''Provide initialization for multiparse.'''
22.5
44
0.755556
4
45
8.5
1
0
0
0
0
0
0
0
0
0
0
0
0.088889
45
1
45
45
0.829268
0.844444
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
2a8faf9198b71e71e17312b019cb9efcb355d028
97
py
Python
kernels/__init__.py
mockingbird2/GraphKernelBenchmark
988d1c3b05375283675a0ab0b3a9e711be34a37a
[ "MIT" ]
4
2019-08-29T09:30:57.000Z
2021-07-05T14:57:23.000Z
kernels/__init__.py
mockingbird2/GraphKernelBenchmark
988d1c3b05375283675a0ab0b3a9e711be34a37a
[ "MIT" ]
null
null
null
kernels/__init__.py
mockingbird2/GraphKernelBenchmark
988d1c3b05375283675a0ab0b3a9e711be34a37a
[ "MIT" ]
2
2020-05-11T09:53:46.000Z
2020-06-23T14:03:55.000Z
from .MLG import MLGKernel from .GraKeL import GrakelKernel from .glocalwl import GlocalWLKernel
24.25
36
0.845361
12
97
6.833333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.123711
97
3
37
32.333333
0.964706
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
aa553b73754d34ce0b9278ac48114c2fe3b25285
113
py
Python
tests/test_trainer/test_pipeline/model/layers/__init__.py
RichardoLuo/ColossalAI
797a9dc5a9e801d7499b8667c3ef039a38aa15ba
[ "Apache-2.0" ]
1,630
2021-10-30T01:00:27.000Z
2022-03-31T23:02:41.000Z
tests/test_trainer/test_pipeline/model/layers/__init__.py
RichardoLuo/ColossalAI
797a9dc5a9e801d7499b8667c3ef039a38aa15ba
[ "Apache-2.0" ]
166
2021-10-30T01:03:01.000Z
2022-03-31T14:19:07.000Z
tests/test_trainer/test_pipeline/model/layers/__init__.py
RichardoLuo/ColossalAI
797a9dc5a9e801d7499b8667c3ef039a38aa15ba
[ "Apache-2.0" ]
253
2021-10-30T06:10:29.000Z
2022-03-31T13:30:06.000Z
from .basic_block import ResNetBasicBlock from .bottleneck import ResNetBottleneck from .reslayer import ResLayer
37.666667
41
0.876106
13
113
7.538462
0.615385
0
0
0
0
0
0
0
0
0
0
0
0.097345
113
3
42
37.666667
0.960784
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
aa62fdee55e8935c208497e24a378eacc27ce38b
655
py
Python
tests/test_1792.py
sungho-joo/leetcode2github
ce7730ef40f6051df23681dd3c0e1e657abba620
[ "MIT" ]
null
null
null
tests/test_1792.py
sungho-joo/leetcode2github
ce7730ef40f6051df23681dd3c0e1e657abba620
[ "MIT" ]
null
null
null
tests/test_1792.py
sungho-joo/leetcode2github
ce7730ef40f6051df23681dd3c0e1e657abba620
[ "MIT" ]
null
null
null
#!/usr/bin/env python import pytest """ Test 1792. Maximum Average Pass Ratio """ @pytest.fixture(scope="session") def init_variables_1792(): from src.leetcode_1792_maximum_average_pass_ratio import Solution solution = Solution() def _init_variables_1792(): return solution yield _init_variables_1792 class TestClass1792: def test_solution_0(self, init_variables_1792): assert init_variables_1792().maxAverageRatio([[1, 2], [3, 5], [2, 2]], 2) == 0.78333 def test_solution_1(self, init_variables_1792): assert init_variables_1792().maxAverageRatio([[2, 4], [3, 9], [4, 5], [2, 10]], 4) == 0.53485
23.392857
101
0.691603
90
655
4.755556
0.433333
0.212617
0.278037
0.102804
0.401869
0.275701
0.275701
0.275701
0.275701
0
0
0.131725
0.177099
655
27
102
24.259259
0.662338
0.030534
0
0
0
0
0.011885
0
0
0
0
0
0.153846
1
0.307692
false
0.076923
0.153846
0.076923
0.615385
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
aaaf6b237cddb8371a57d3b26ec91fc30dc05711
37
py
Python
tests/components/cover/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/cover/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
tests/components/cover/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Tests for the cover component."""
18.5
36
0.675676
5
37
5
1
0
0
0
0
0
0
0
0
0
0
0
0.135135
37
1
37
37
0.78125
0.810811
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
2acee46060f93dda4f83350be38215a51c0a54be
194
py
Python
soda/core/soda/sampler/sampler_cfg.py
duyet/soda-core
92a52e0d7c1e88624d0637123cfcb2610af6d112
[ "Apache-2.0" ]
4
2022-03-23T02:43:42.000Z
2022-03-31T15:20:54.000Z
soda/core/soda/sampler/sampler_cfg.py
duyet/soda-core
92a52e0d7c1e88624d0637123cfcb2610af6d112
[ "Apache-2.0" ]
543
2022-03-22T09:02:17.000Z
2022-03-31T16:29:41.000Z
soda/core/soda/sampler/sampler_cfg.py
duyet/soda-core
92a52e0d7c1e88624d0637123cfcb2610af6d112
[ "Apache-2.0" ]
1
2022-03-27T03:37:55.000Z
2022-03-27T03:37:55.000Z
class SamplerCfg: def __init__(self): self.max_failed_rows_sample_size: int = 100 self.max_passed_rows_sample_size: int = 0 self.max_partition_sample_size: int = 100
32.333333
51
0.706186
28
194
4.357143
0.535714
0.172131
0.319672
0.278689
0
0
0
0
0
0
0
0.046667
0.226804
194
5
52
38.8
0.766667
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0.2
0
0
0.4
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
2af349a5127b3f1030bf5622eef2567a564f8725
71
py
Python
lfd/__init__.py
ashawkey/light-field-distance
88031b227e0c5c91959b274a67161875637c0ef9
[ "BSD-2-Clause" ]
null
null
null
lfd/__init__.py
ashawkey/light-field-distance
88031b227e0c5c91959b274a67161875637c0ef9
[ "BSD-2-Clause" ]
null
null
null
lfd/__init__.py
ashawkey/light-field-distance
88031b227e0c5c91959b274a67161875637c0ef9
[ "BSD-2-Clause" ]
null
null
null
from .lfd import LightFieldDistance, MeshEncoder, light_field_distance
35.5
70
0.873239
8
71
7.5
1
0
0
0
0
0
0
0
0
0
0
0
0.084507
71
1
71
71
0.923077
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
2d547c94e8521d3d66dbd47fea89c2ad238daa25
43
py
Python
tests/__init__.py
dkasak/fingerprinter
8f94e76a93ce8b6739f023722d6679218296ac36
[ "MIT" ]
1
2021-03-13T09:50:31.000Z
2021-03-13T09:50:31.000Z
tests/__init__.py
dkasak/fingerprinter
8f94e76a93ce8b6739f023722d6679218296ac36
[ "MIT" ]
null
null
null
tests/__init__.py
dkasak/fingerprinter
8f94e76a93ce8b6739f023722d6679218296ac36
[ "MIT" ]
null
null
null
"""Unit test package for fingerprinter."""
21.5
42
0.72093
5
43
6.2
1
0
0
0
0
0
0
0
0
0
0
0
0.116279
43
1
43
43
0.815789
0.837209
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
2d8c1bb3992d347c412716e14b68be1229b49f10
201
py
Python
weibull/__init__.py
KTCrisis/weibull
2384342c2e2fc6554d8cdf1556528c99480f2386
[ "MIT" ]
1
2020-05-20T01:02:30.000Z
2020-05-20T01:02:30.000Z
weibull/__init__.py
KTCrisis/weibull
2384342c2e2fc6554d8cdf1556528c99480f2386
[ "MIT" ]
null
null
null
weibull/__init__.py
KTCrisis/weibull
2384342c2e2fc6554d8cdf1556528c99480f2386
[ "MIT" ]
null
null
null
from weibull.version import __version__ from weibull.weibull import Analysis, Design, Weibayes, ParameterError __all__ = ['__version__', 'Analysis', 'Design', 'Weibayes', 'ParameterError']
33.5
70
0.741294
19
201
7.210526
0.473684
0.160584
0.321168
0.525547
0
0
0
0
0
0
0
0
0.149254
201
5
71
40.2
0.80117
0
0
0
0
0
0.233831
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
2da311df3c4b154d1fb040614a6fbee6b3b13c34
28
py
Python
segmentation_models_pytorch/unet3plus/__init__.py
eikaramba/segmentation_models.pytorch
7a061d7c73021bfdf881b407817d014de8eea2f0
[ "MIT" ]
3
2021-08-31T11:47:16.000Z
2022-03-17T05:16:23.000Z
segmentation_models_pytorch/unet3plus/__init__.py
eikaramba/segmentation_models.pytorch
7a061d7c73021bfdf881b407817d014de8eea2f0
[ "MIT" ]
null
null
null
segmentation_models_pytorch/unet3plus/__init__.py
eikaramba/segmentation_models.pytorch
7a061d7c73021bfdf881b407817d014de8eea2f0
[ "MIT" ]
1
2022-03-17T05:16:31.000Z
2022-03-17T05:16:31.000Z
from .model import Unet3Plus
28
28
0.857143
4
28
6
1
0
0
0
0
0
0
0
0
0
0
0.04
0.107143
28
1
28
28
0.92
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
2dac0f1107ff3709bf7638feb0fc0061410d6324
165
py
Python
src/banner.py
t0a5ted/WhatsSpam
f739b554bcb4cd1ebada9a9e4881ea4826a18da8
[ "MIT" ]
null
null
null
src/banner.py
t0a5ted/WhatsSpam
f739b554bcb4cd1ebada9a9e4881ea4826a18da8
[ "MIT" ]
null
null
null
src/banner.py
t0a5ted/WhatsSpam
f739b554bcb4cd1ebada9a9e4881ea4826a18da8
[ "MIT" ]
null
null
null
import os.path def print_banner(): with open(os.path.dirname(__file__) + '\\..\\resources\\banner.txt', 'r') as banner_file: print(banner_file.read())
23.571429
93
0.654545
23
165
4.391304
0.652174
0.118812
0
0
0
0
0
0
0
0
0
0
0.157576
165
6
94
27.5
0.726619
0
0
0
0
0
0.170732
0.164634
0
0
0
0
0
1
0.25
true
0
0.25
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
1
0
5