function
stringlengths
11
56k
repo_name
stringlengths
5
60
features
list
def dc_offset(signal): """Correct DC offset""" log.debug('DC offset before: %.1f', np.sum(signal) / len(signal)) signal = signal - signal.sum(dtype=np.int64) / len(signal) log.debug('DC offset after: %.1f', np.sum(signal) / len(signal)) return signal
riggsd/zcant
[ 3, 1, 3, 8, 1483577342 ]
def highpassfilter(signal, samplerate, cutoff_freq_hz, filter_order=6): """Full spectrum high-pass filter (butterworth)""" cutoff_ratio = cutoff_freq_hz / (samplerate / 2.0) b, a = scipy.signal.butter(filter_order, cutoff_ratio, btype='high') return scipy.signal.filtfilt(b, a, signal)
riggsd/zcant
[ 3, 1, 3, 8, 1483577342 ]
def noise_gate_zc(times_s, freqs_hz, amplitudes, threshold_factor): """Discard low-amplitude portions of the zero-cross signal. threshold_factor: ratio of root-mean-square "noise floor" below which we drop """ signal_rms = rms(amplitudes) threshold = threshold_factor * signal_rms log.debug...
riggsd/zcant
[ 3, 1, 3, 8, 1483577342 ]
def interpolate(signal, crossings): """ Calculate float crossing values by linear interpolation rather than relying exclusively on factors of samplerate. We find the sample values before and after the theoretical zero-crossing, then use linear interpolation to add an additional fractional compo...
riggsd/zcant
[ 3, 1, 3, 8, 1483577342 ]
def calculate_amplitudes(signal, crossings): # FIXME: slow (can we remain entirely in numpy here?) #return np.asarray([chunk.mean() if chunk.any() else 0 for chunk in np.split(np.abs(signal), crossings)[:-1]]) # amazingly it is faster to call np.add.reduce()/len() than to use the numpy mean() method. ...
riggsd/zcant
[ 3, 1, 3, 8, 1483577342 ]
def zero_cross(signal, samplerate, divratio, amplitudes=True, interpolation=False): """Produce (times in seconds, frequencies in Hz, and amplitudes) from calculated zero crossings""" log.debug('zero_cross(..., %d, %d, amplitudes=%s, interpolation=%s)', samplerate, divratio, amplitudes, interpolation) div...
riggsd/zcant
[ 3, 1, 3, 8, 1483577342 ]
def hpf_zc(times_s, freqs_hz, amplitudes, cutoff_freq_hz): """Brickwall high-pass filter for zero-cross signals (simply discards everything < cutoff)""" hpf_mask = np.where(freqs_hz > cutoff_freq_hz) junk_count = len(freqs_hz) - np.count_nonzero(hpf_mask) log.debug('HPF throwing out %d dots of %d (%...
riggsd/zcant
[ 3, 1, 3, 8, 1483577342 ]
def wav2zc(fname, divratio=8, hpfilter_khz=20, threshold_factor=1.0, interpolation=False, brickwall_hpf=True): """Convert a single .wav file to Anabat format. Produces (times in seconds, frequencies in Hz, amplitudes, metadata).
riggsd/zcant
[ 3, 1, 3, 8, 1483577342 ]
def __init__(self, host=None, port=None): super().__init__(host, port) self.heights = {} self.blocks = {} self.txs = {} self.load_testdata()
behas/bitcoingraph
[ 62, 19, 62, 5, 1422445817 ]
def load_testdata(self): p = Path(TEST_DATA_PATH) files = [x for x in p.iterdir() if x.is_file() and x.name.endswith('json')] for f in files: if f.name.startswith("block"): height = f.name[6:-5] with f.open() as jf: ...
behas/bitcoingraph
[ 62, 19, 62, 5, 1422445817 ]
def getblock(self, block_hash): if block_hash not in self.blocks: raise BitcoindException("Unknown block", block_hash) else: return self.blocks[block_hash]
behas/bitcoingraph
[ 62, 19, 62, 5, 1422445817 ]
def getblockhash(self, block_height): if block_height not in self.heights: raise BitcoindException("Unknown height", block_height) else: return self.heights[block_height]
behas/bitcoingraph
[ 62, 19, 62, 5, 1422445817 ]
def getrawtransaction(self, tx_id, verbose=1): if tx_id not in self.txs: raise BitcoindException("Unknown transaction", tx_id) else: return self.txs[tx_id]
behas/bitcoingraph
[ 62, 19, 62, 5, 1422445817 ]
def handle_program_options(): parser = argparse.ArgumentParser(description="Create a 2D or 3D PCoA plot. By default" ", this script opens a window with the plot " "displayed if you want to change certain aspects of " ...
smdabdoub/phylotoast
[ 13, 4, 13, 4, 1399302765 ]
def __init__(self, client, config, serializer, deserializer) -> None: self._client = client self._serialize = serializer self._deserialize = deserializer self._config = config
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {})
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def get_long_running_output(pipeline_response): deserialized = self._deserialize('ApplicationGateway', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def list( self, resource_group_name: str, **kwargs: Any
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL url = self.list.metadat...
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def list_all( self, **kwargs: Any
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL url = self.list_all.met...
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {})
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {})
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def get_long_running_output(pipeline_response): deserialized = self._deserialize('ApplicationGatewayBackendHealth', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def get_long_running_output(pipeline_response): deserialized = self._deserialize('ApplicationGatewayBackendHealthOnDemand', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def list_available_ssl_predefined_policies( self, **kwargs: Any
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL url = self.list_availab...
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def count(): return pygame_sdl2.joystick.get_count()
kfcpaladin/sze-the-game
[ 3, 6, 3, 18, 1471431660 ]
def __init__(self, kind="gas", volumeSpec=0.0, Specification=None, Assets=None, *args, **kw_args): """Initialises a new 'Medium' instance. @param kind: Kind of this medium. Values are: "gas", "liquid", "solid" @param volumeSpec: The volume of the medium specified for this application. Note that...
rwl/PyCIM
[ 68, 33, 68, 7, 1238978196 ]
def getSpecification(self):
rwl/PyCIM
[ 68, 33, 68, 7, 1238978196 ]
def setSpecification(self, value): if self._Specification is not None: filtered = [x for x in self.Specification.Mediums if x != self] self._Specification._Mediums = filtered self._Specification = value if self._Specification is not None: if self not in self....
rwl/PyCIM
[ 68, 33, 68, 7, 1238978196 ]
def getAssets(self):
rwl/PyCIM
[ 68, 33, 68, 7, 1238978196 ]
def setAssets(self, value): for p in self._Assets: filtered = [q for q in p.Mediums if q != self] self._Assets._Mediums = filtered for r in value: if self not in r._Mediums: r._Mediums.append(self) self._Assets = value
rwl/PyCIM
[ 68, 33, 68, 7, 1238978196 ]
def addAssets(self, *Assets): for obj in Assets: if self not in obj._Mediums: obj._Mediums.append(self) self._Assets.append(obj)
rwl/PyCIM
[ 68, 33, 68, 7, 1238978196 ]
def __init__(self, learner_name): s = "Wrong learner_name, " + \ "see model_param_space.py for all available learners." assert learner_name in param_space_dict, s self.learner_name = learner_name
ChenglongChen/Kaggle_HomeDepot
[ 467, 209, 467, 1, 1461682287 ]
def AddLoginWhiteList(self, request): """本接口(AddLoginWhiteList)用于添加白名单规则 :param request: Request instance for AddLoginWhiteList. :type request: :class:`tencentcloud.yunjing.v20180228.models.AddLoginWhiteListRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.AddLoginWhiteList...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def CloseProVersion(self, request): """本接口 (CloseProVersion) 用于关闭专业版。 :param request: Request instance for CloseProVersion. :type request: :class:`tencentcloud.yunjing.v20180228.models.CloseProVersionRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.CloseProVersionResponse`...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def CreateOpenPortTask(self, request): """本接口 (CreateOpenPortTask) 用于创建实时获取端口任务。 :param request: Request instance for CreateOpenPortTask. :type request: :class:`tencentcloud.yunjing.v20180228.models.CreateOpenPortTaskRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.CreateO...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def CreateUsualLoginPlaces(self, request): """此接口(CreateUsualLoginPlaces)用于添加常用登录地。 :param request: Request instance for CreateUsualLoginPlaces. :type request: :class:`tencentcloud.yunjing.v20180228.models.CreateUsualLoginPlacesRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.mod...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DeleteBashEvents(self, request): """根据Ids删除高危命令事件 :param request: Request instance for DeleteBashEvents. :type request: :class:`tencentcloud.yunjing.v20180228.models.DeleteBashEventsRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DeleteBashEventsResponse` """...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DeleteBruteAttacks(self, request): """本接口 (DeleteBruteAttacks) 用于删除暴力破解记录。 :param request: Request instance for DeleteBruteAttacks. :type request: :class:`tencentcloud.yunjing.v20180228.models.DeleteBruteAttacksRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DeleteBru...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DeleteMachine(self, request): """本接口(DeleteMachine)用于卸载云镜客户端。 :param request: Request instance for DeleteMachine. :type request: :class:`tencentcloud.yunjing.v20180228.models.DeleteMachineRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DeleteMachineResponse` ...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DeleteMaliciousRequests(self, request): """本接口 (DeleteMaliciousRequests) 用于删除恶意请求记录。 :param request: Request instance for DeleteMaliciousRequests. :type request: :class:`tencentcloud.yunjing.v20180228.models.DeleteMaliciousRequestsRequest` :rtype: :class:`tencentcloud.yunjing.v20180...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DeleteNonlocalLoginPlaces(self, request): """本接口 (DeleteNonlocalLoginPlaces) 用于删除异地登录记录。 :param request: Request instance for DeleteNonlocalLoginPlaces. :type request: :class:`tencentcloud.yunjing.v20180228.models.DeleteNonlocalLoginPlacesRequest` :rtype: :class:`tencentcloud.yunjin...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DeletePrivilegeRules(self, request): """删除本地提权规则 :param request: Request instance for DeletePrivilegeRules. :type request: :class:`tencentcloud.yunjing.v20180228.models.DeletePrivilegeRulesRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DeletePrivilegeRulesResponse` ...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DeleteReverseShellRules(self, request): """删除反弹Shell规则 :param request: Request instance for DeleteReverseShellRules. :type request: :class:`tencentcloud.yunjing.v20180228.models.DeleteReverseShellRulesRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DeleteReverseShellR...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DeleteUsualLoginPlaces(self, request): """本接口(DeleteUsualLoginPlaces)用于删除常用登录地。 :param request: Request instance for DeleteUsualLoginPlaces. :type request: :class:`tencentcloud.yunjing.v20180228.models.DeleteUsualLoginPlacesRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.mod...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeAccounts(self, request): """本接口 (DescribeAccounts) 用于获取帐号列表数据。 :param request: Request instance for DescribeAccounts. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeAccountsRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DescribeAccountsR...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeAlarmAttribute(self, request): """本接口 (DescribeAlarmAttribute) 用于获取告警设置。 :param request: Request instance for DescribeAlarmAttribute. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeAlarmAttributeRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.mo...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeAttackLogs(self, request): """按分页形式展示网络攻击日志列表 :param request: Request instance for DescribeAttackLogs. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeAttackLogsRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DescribeAttackLogsResponse` ...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeBashRules(self, request): """获取高危命令规则列表 :param request: Request instance for DescribeBashRules. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeBashRulesRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DescribeBashRulesResponse` ""...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeComponentInfo(self, request): """本接口 (DescribeComponentInfo) 用于获取组件信息数据。 :param request: Request instance for DescribeComponentInfo. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeComponentInfoRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.mode...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeComponents(self, request): """本接口 (DescribeComponents) 用于获取组件列表数据。 :param request: Request instance for DescribeComponents. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeComponentsRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DescribeC...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeImpactedHosts(self, request): """本接口 (DescribeImpactedHosts) 用于获取漏洞受影响机器列表。 :param request: Request instance for DescribeImpactedHosts. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeImpactedHostsRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.m...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeMachineInfo(self, request): """本接口(DescribeMachineInfo)用于获取机器详细信息。 :param request: Request instance for DescribeMachineInfo. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeMachineInfoRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.Describ...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeMaliciousRequests(self, request): """本接口 (DescribeMaliciousRequests) 用于获取恶意请求数据。 :param request: Request instance for DescribeMaliciousRequests. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeMaliciousRequestsRequest` :rtype: :class:`tencentcloud.yunjin...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeNonlocalLoginPlaces(self, request): """本接口(DescribeNonlocalLoginPlaces)用于获取异地登录事件。 :param request: Request instance for DescribeNonlocalLoginPlaces. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeNonlocalLoginPlacesRequest` :rtype: :class:`tencentcloud....
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeOpenPortTaskStatus(self, request): """本接口 (DescribeOpenPortTaskStatus) 用于获取实时拉取端口任务状态。 :param request: Request instance for DescribeOpenPortTaskStatus. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeOpenPortTaskStatusRequest` :rtype: :class:`tencentclou...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeOverviewStatistics(self, request): """本接口用于(DescribeOverviewStatistics)获取概览统计数据。 :param request: Request instance for DescribeOverviewStatistics. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeOverviewStatisticsRequest` :rtype: :class:`tencentcloud.yunj...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribePrivilegeRules(self, request): """获取本地提权规则列表 :param request: Request instance for DescribePrivilegeRules. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribePrivilegeRulesRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DescribePrivilegeRulesR...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeProcessStatistics(self, request): """本接口 (DescribeProcessStatistics) 用于获取进程统计列表数据。 :param request: Request instance for DescribeProcessStatistics. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeProcessStatisticsRequest` :rtype: :class:`tencentcloud.yunj...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeProcesses(self, request): """本接口 (DescribeProcesses) 用于获取进程列表数据。 :param request: Request instance for DescribeProcesses. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeProcessesRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DescribeProce...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeReverseShellRules(self, request): """获取反弹Shell规则列表 :param request: Request instance for DescribeReverseShellRules. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeReverseShellRulesRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DescribeRev...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeSecurityTrends(self, request): """本接口 (DescribeSecurityTrends) 用于获取安全事件统计数据。 :param request: Request instance for DescribeSecurityTrends. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeSecurityTrendsRequest` :rtype: :class:`tencentcloud.yunjing.v2018022...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeTags(self, request): """获取所有主机标签 :param request: Request instance for DescribeTags. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeTagsRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DescribeTagsResponse` """ try: ...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeVulInfo(self, request): """本接口 (DescribeVulInfo) 用于获取漏洞详情。 :param request: Request instance for DescribeVulInfo. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeVulInfoRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DescribeVulInfoResponse...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeVuls(self, request): """本接口 (DescribeVuls) 用于获取漏洞列表数据。 :param request: Request instance for DescribeVuls. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeVulsRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.DescribeVulsResponse` ""...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeWeeklyReportInfo(self, request): """本接口 (DescribeWeeklyReportInfo) 用于获取专业周报详情数据。 :param request: Request instance for DescribeWeeklyReportInfo. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeWeeklyReportInfoRequest` :rtype: :class:`tencentcloud.yunjing....
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeWeeklyReportNonlocalLoginPlaces(self, request): """本接口 (DescribeWeeklyReportNonlocalLoginPlaces) 用于获取专业周报异地登录数据。 :param request: Request instance for DescribeWeeklyReportNonlocalLoginPlaces. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeWeeklyReportNonlocalLog...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def DescribeWeeklyReports(self, request): """本接口 (DescribeWeeklyReports) 用于获取周报列表数据。 :param request: Request instance for DescribeWeeklyReports. :type request: :class:`tencentcloud.yunjing.v20180228.models.DescribeWeeklyReportsRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.mode...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def EditPrivilegeRule(self, request): """新增或修改本地提权规则 :param request: Request instance for EditPrivilegeRule. :type request: :class:`tencentcloud.yunjing.v20180228.models.EditPrivilegeRuleRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.EditPrivilegeRuleResponse` "...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def EditTags(self, request): """新增或编辑标签 :param request: Request instance for EditTags. :type request: :class:`tencentcloud.yunjing.v20180228.models.EditTagsRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.EditTagsResponse` """ try: params = req...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def ExportBashEvents(self, request): """导出高危命令事件 :param request: Request instance for ExportBashEvents. :type request: :class:`tencentcloud.yunjing.v20180228.models.ExportBashEventsRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.ExportBashEventsResponse` """ ...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def ExportMaliciousRequests(self, request): """本接口 (ExportMaliciousRequests) 用于导出下载恶意请求文件。 :param request: Request instance for ExportMaliciousRequests. :type request: :class:`tencentcloud.yunjing.v20180228.models.ExportMaliciousRequestsRequest` :rtype: :class:`tencentcloud.yunjing.v201...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def ExportNonlocalLoginPlaces(self, request): """本接口 (ExportNonlocalLoginPlaces) 用于导出异地登录事件记录CSV文件。 :param request: Request instance for ExportNonlocalLoginPlaces. :type request: :class:`tencentcloud.yunjing.v20180228.models.ExportNonlocalLoginPlacesRequest` :rtype: :class:`tencentcloud...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def ExportReverseShellEvents(self, request): """导出反弹Shell事件 :param request: Request instance for ExportReverseShellEvents. :type request: :class:`tencentcloud.yunjing.v20180228.models.ExportReverseShellEventsRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.ExportReverseShe...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def InquiryPriceOpenProVersionPrepaid(self, request): """本接口 (InquiryPriceOpenProVersionPrepaid) 用于开通专业版询价(预付费)。 :param request: Request instance for InquiryPriceOpenProVersionPrepaid. :type request: :class:`tencentcloud.yunjing.v20180228.models.InquiryPriceOpenProVersionPrepaidRequest` ...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def ModifyAlarmAttribute(self, request): """本接口(ModifyAlarmAttribute)用于修改告警设置。 :param request: Request instance for ModifyAlarmAttribute. :type request: :class:`tencentcloud.yunjing.v20180228.models.ModifyAlarmAttributeRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.Modif...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def ModifyLoginWhiteList(self, request): """编辑白名单规则 :param request: Request instance for ModifyLoginWhiteList. :type request: :class:`tencentcloud.yunjing.v20180228.models.ModifyLoginWhiteListRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.ModifyLoginWhiteListResponse` ...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def OpenProVersion(self, request): """本接口 (OpenProVersion) 用于开通专业版。 :param request: Request instance for OpenProVersion. :type request: :class:`tencentcloud.yunjing.v20180228.models.OpenProVersionRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.OpenProVersionResponse` ...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def RecoverMalwares(self, request): """本接口(RecoverMalwares)用于批量恢复已经被隔离的木马文件。 :param request: Request instance for RecoverMalwares. :type request: :class:`tencentcloud.yunjing.v20180228.models.RecoverMalwaresRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.RecoverMalwaresRe...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def RescanImpactedHost(self, request): """本接口 (RescanImpactedHost) 用于漏洞重新检测。 :param request: Request instance for RescanImpactedHost. :type request: :class:`tencentcloud.yunjing.v20180228.models.RescanImpactedHostRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.RescanImpac...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def SetBashEventsStatus(self, request): """设置高危命令事件状态 :param request: Request instance for SetBashEventsStatus. :type request: :class:`tencentcloud.yunjing.v20180228.models.SetBashEventsStatusRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.models.SetBashEventsStatusResponse` ...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def TrustMaliciousRequest(self, request): """本接口 (TrustMaliciousRequest) 用于恶意请求添加信任。 :param request: Request instance for TrustMaliciousRequest. :type request: :class:`tencentcloud.yunjing.v20180228.models.TrustMaliciousRequestRequest` :rtype: :class:`tencentcloud.yunjing.v20180228.mode...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def UntrustMaliciousRequest(self, request): """本接口 (UntrustMaliciousRequest) 用于取消信任恶意请求。 :param request: Request instance for UntrustMaliciousRequest. :type request: :class:`tencentcloud.yunjing.v20180228.models.UntrustMaliciousRequestRequest` :rtype: :class:`tencentcloud.yunjing.v20180...
tzpBingo/github-trending
[ 42, 20, 42, 1, 1504755582 ]
def rank2severity(rank): """:Return: the BlameThrower severity for a bug of the given `rank`.""" if 1 <= rank <= 4: return 'high' elif rank <= 12: return 'med' elif rank <= 20: return 'low' else: assert False
jkleint/blamethrower
[ 3, 3, 3, 2, 1351636768 ]
def __init__( self, plotly_name="ticktext", parent_name="densitymapbox.colorbar", **kwargs
plotly/plotly.py
[ 13052, 2308, 13052, 1319, 1385013188 ]
def __init__(self, *args, **kwargs): super(TypedItem, self).__init__(*args, **kwargs) self['type'] = self.type_name
comsaint/legco-watch
[ 7, 3, 7, 6, 1425877642 ]
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(520, 174) self.verticalLayout = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout.setContentsMargins(6, 6, 6, 6) self.verticalLayout.setObjectName("verticalLayout") self.groupBox = QtWidgets.QGroupBox...
theetcher/fxpt
[ 19, 7, 19, 2, 1405973188 ]
def cluster(): with moto.mock_ecs(), moto.mock_ec2(): boto3.setup_default_session(region_name="eu-west-1") ec2 = boto3.resource("ec2", region_name="eu-west-1") ecs = boto3.client("ecs", region_name="eu-west-1") known_amis = list(ec2_backend.describe_images()) test_instanc...
LabD/ecs-deplojo
[ 19, 5, 19, 5, 1446133044 ]
def connection(cluster): return Connection()
LabD/ecs-deplojo
[ 19, 5, 19, 5, 1446133044 ]
def definition(): path = os.path.join(BASE_DIR, "files/default_taskdef.json") with open(path, "r") as json_file: return TaskDefinition(json.load(json_file))
LabD/ecs-deplojo
[ 19, 5, 19, 5, 1446133044 ]
def default_config(): path = os.path.join(BASE_DIR, "files/default_config.yml") with open(path, "r") as fh: yield fh
LabD/ecs-deplojo
[ 19, 5, 19, 5, 1446133044 ]
def __init__(self, rx_cobid, tx_cobid, node): """ :param int rx_cobid: COB-ID that the server receives on (usually 0x600 + node ID) :param int tx_cobid: COB-ID that the server responds with (usually 0x580 + node ID) :param canopen.LocalNode od: Node ob...
christiansandberg/canopen
[ 362, 159, 362, 67, 1474393338 ]
def init_upload(self, request): _, index, subindex = SDO_STRUCT.unpack_from(request) self._index = index self._subindex = subindex res_command = RESPONSE_UPLOAD | SIZE_SPECIFIED response = bytearray(8) data = self._node.get_data(index, subindex, check_readable=True) ...
christiansandberg/canopen
[ 362, 159, 362, 67, 1474393338 ]
def block_upload(self, data): # We currently don't support BLOCK UPLOAD # according to CIA301 the server is allowed # to switch to regular upload logger.info("Received block upload, switch to regular SDO upload") self.init_upload(data)
christiansandberg/canopen
[ 362, 159, 362, 67, 1474393338 ]
def block_download(self, data): # We currently don't support BLOCK DOWNLOAD logger.error("Block download is not supported") self.abort(0x05040001)
christiansandberg/canopen
[ 362, 159, 362, 67, 1474393338 ]
def segmented_download(self, command, request): if command & TOGGLE_BIT != self._toggle: # Toggle bit mismatch raise SdoAbortedError(0x05030000) last_byte = 8 - ((command >> 1) & 0x7) self._buffer.extend(request[1:last_byte]) if command & NO_MORE_DATA: ...
christiansandberg/canopen
[ 362, 159, 362, 67, 1474393338 ]
def abort(self, abort_code=0x08000000): """Abort current transfer.""" data = struct.pack("<BHBL", RESPONSE_ABORTED, self._index, self._subindex, abort_code) self.send_response(data) # logger.error("Transfer aborted with code 0x{:08X}".format(abort_code))
christiansandberg/canopen
[ 362, 159, 362, 67, 1474393338 ]
def download( self, index: int, subindex: int, data: bytes, force_segment: bool = False,
christiansandberg/canopen
[ 362, 159, 362, 67, 1474393338 ]