a908909495f00c61b52dd184a6275dd25abd0818,networkml/featurizers/funcs/host.py,HostBase,_tshark_ports,#HostBase#,120
Before Change
mac_row_ports = {}
def port_priv(port):
return port < 1024
for ip_proto in ("udp", "tcp") :
lowest_ports = self._lowest_ip_proto_port(mac_df, ip_proto)
for field_name, ports, wk_ports in (
("priv", {port for port in lowest_ports if port_priv(port)}, self.WK_PRIV_TCPUDP_PORTS),
After Change
mac_row_ports = {}
def port_priv(port):
return port < 1024
for ip_proto_num, proto_df in mac_df.groupby("ip.proto"):
ip_proto = TCP_UDP_PROTOS.get(ip_proto_num)
if ip_proto is None:
continue
lowest_ports = self._lowest_ip_proto_port(proto_df, ip_proto)
for field_name, ports, wk_ports in (
("priv", {port for port in lowest_ports if port_priv(port)}, self.WK_PRIV_TCPUDP_PORTS),
("nonpriv", {port for port in lowest_ports if not port_priv(port)}, self.WK_NONPRIV_TCPUDP_PORTS),
):
port_flags = {port: int(port in ports) for port in wk_ports}
port_flags.update({"other": int(bool(lowest_ports) and not ports.issubset(wk_ports))})
mac_row_ports.update({
"tshark_%s_%s_port_%s_%s" % (ip_proto, field_name, port, suffix): present for port, present in port_flags.items()})
return mac_row_ports
def _tshark_ratio_ports(self, mac_df):
mac_row_ports = {}
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: CyberReboot/NetworkML
Commit Name: a908909495f00c61b52dd184a6275dd25abd0818
Time: 2020-04-08
Author: josh@vandervecken.com
File Name: networkml/featurizers/funcs/host.py
Class Name: HostBase
Method Name: _tshark_ports
Project Name: dask/dask-ml
Commit Name: e6fd1b533326c5f42fb45cac57d5e95f919a8955
Time: 2020-05-05
Author: TomAugspurger@users.noreply.github.com
File Name: dask_ml/model_selection/_normalize.py
Class Name:
Method Name: normalize_estimator
Project Name: chainer/chainercv
Commit Name: 90b78b1379b3423aa3b4b5d0de7313f88bda23ab
Time: 2019-02-17
Author: yuyuniitani@gmail.com
File Name: chainercv/utils/mask/mask_to_bbox.py
Class Name:
Method Name: mask_to_bbox