本文整理汇总了Python中Utils.Utils.get_date_from_sqlite_string方法的典型用法代码示例。如果您正苦于以下问题:Python Utils.get_date_from_sqlite_string方法的具体用法?Python Utils.get_date_from_sqlite_string怎么用?Python Utils.get_date_from_sqlite_string使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Utils.Utils
的用法示例。
在下文中一共展示了Utils.get_date_from_sqlite_string方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: from_sqlite_data_row
# 需要导入模块: from Utils import Utils [as 别名]
# 或者: from Utils.Utils import get_date_from_sqlite_string [as 别名]
def from_sqlite_data_row(self, sqlite_data_row):
id, client_mac, hostname, total_packets, last_seen_lat, last_seen_lon, seen_first_time, seen_last_time, max_metres_between_locations, number_of_times_seen = sqlite_data_row
client = Client(client_mac)
client.id = id
client.hostname = hostname
client.total_packets = int(total_packets)
if not last_seen_lat == None:
client.last_seen_lat = float(last_seen_lat)
client.last_seen_lon = float(last_seen_lon)
client.seen_first_time = Utils.get_date_from_sqlite_string(seen_first_time)
client.seen_last_time = Utils.get_date_from_sqlite_string(seen_last_time)
client.max_metres_between_locations = int(max_metres_between_locations)
client.number_of_times_seen = int(number_of_times_seen)
return client
示例2: from_sqlite_data_row
# 需要导入模块: from Utils import Utils [as 别名]
# 或者: from Utils.Utils import get_date_from_sqlite_string [as 别名]
def from_sqlite_data_row(cls, sqlite_data_row):
id, client_mac, network_bssid, total_packets, avg_lat, avg_lon, seen_first_time, seen_last_time, max_metres_between_locations, number_of_times_seen = sqlite_data_row
network_client = NetworkClient()
network_client.id = id
network_client.client_mac = client_mac
network_client.network_bssid = network_bssid
network_client.total_packets = int(total_packets)
if not avg_lat == None:
network_client.avg_lat = float(avg_lat)
network_client.avg_lon = float(avg_lon)
network_client.seen_first_time = Utils.get_date_from_sqlite_string(seen_first_time)
network_client.seen_last_time = Utils.get_date_from_sqlite_string(seen_last_time)
network_client.max_metres_between_locations = int(max_metres_between_locations)
network_client.number_of_times_seen = int(number_of_times_seen)
return network_client
示例3: from_sqlite_data_row
# 需要导入模块: from Utils import Utils [as 别名]
# 或者: from Utils.Utils import get_date_from_sqlite_string [as 别名]
def from_sqlite_data_row(self, sqlite_data_row):
id, network_bssid, essid, total_packets, avg_lat, avg_lon, is_hidden, max_rate, seen_first_time, seen_last_time, max_metres_between_locations, number_of_times_seen = sqlite_data_row
network = Network()
network.id = id
network.bssid = network_bssid
network.essid = essid
network.total_packets = int(total_packets)
if not avg_lat == None:
network.avg_lat = float(avg_lat)
network.avg_lon = float(avg_lon)
network.is_hidden = is_hidden == "1"
network.max_rate = max_rate
network.seen_first_time = Utils.get_date_from_sqlite_string(seen_first_time)
network.seen_last_time = Utils.get_date_from_sqlite_string(seen_last_time)
network.max_metres_between_locations = int(max_metres_between_locations)
network.number_of_times_seen = int(number_of_times_seen)
return network
示例4: from_sqlite_data_row
# 需要导入模块: from Utils import Utils [as 别名]
# 或者: from Utils.Utils import get_date_from_sqlite_string [as 别名]
def from_sqlite_data_row(cls, sqlite_data_row):
id, file_name, date_imported = sqlite_data_row
return ImportedHostnameFile(id, file_name, Utils.get_date_from_sqlite_string(date_imported))
示例5: from_sqlite_data_row
# 需要导入模块: from Utils import Utils [as 别名]
# 或者: from Utils.Utils import get_date_from_sqlite_string [as 别名]
def from_sqlite_data_row(cls, sqlite_data_row):
id, client_mac, ssid, total_packets, seen_first_time, seen_last_time, number_of_times_seen = sqlite_data_row
return ProbeRequest(id, client_mac, ssid, int(total_packets), Utils.get_date_from_sqlite_string(seen_first_time), Utils.get_date_from_sqlite_string(seen_last_time), int(number_of_times_seen))
示例6: from_sqlite_data_row
# 需要导入模块: from Utils import Utils [as 别名]
# 或者: from Utils.Utils import get_date_from_sqlite_string [as 别名]
def from_sqlite_data_row(cls, sqlite_data_row):
id, client_mac, avg_lat, avg_lon, seen_time, seen_in_file_name = sqlite_data_row
return ClientLocation(id, client_mac, float(avg_lat), float(avg_lon), Utils.get_date_from_sqlite_string(seen_time), seen_in_file_name)
示例7: from_sqlite_data_row
# 需要导入模块: from Utils import Utils [as 别名]
# 或者: from Utils.Utils import get_date_from_sqlite_string [as 别名]
def from_sqlite_data_row(cls, sqlite_data_row):
id, network_bssid, avg_lat, avg_lon, seen_time, seen_in_file_name = sqlite_data_row
return NetworkLocation(id, network_bssid, float(avg_lat), float(avg_lon), Utils.get_date_from_sqlite_string(seen_time), seen_in_file_name)