{"id":350167,"date":"2023-07-12T15:03:33","date_gmt":"2023-07-12T15:03:33","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=350167"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=350167","title":{"rendered":"<span>\u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 Bluetooth-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432: \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0438 \u0432\u044b\u0432\u043e\u0434\u044b<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0432<a href=\"https:\/\/incrussia.ru\/news\/kitaj-zapretit-wi-fi-bluetooth\/\" rel=\"noopener noreferrer nofollow\"> \u0441\u0442\u0430\u0442\u044c\u044e<\/a> &#171;\u041a\u0438\u0442\u0430\u0439 \u0445\u043e\u0447\u0435\u0442 \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Wi-Fi \u0438 Bluetooth&#187;, \u0437\u0430\u0434\u0443\u043c\u0430\u043b\u0441\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 Bluetooth-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044f\u0441\u044c \u043a \u043d\u0438\u043c (\u0445\u043e\u0442\u044f \u0438 \u0441\u0430\u043c\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044e \u043d\u0435\u043b\u0435\u0433\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430). \u041f\u043e \u0441\u0443\u0442\u0438, \u043b\u044e\u0431\u043e\u0435 Bluetooth \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u2014 \u044d\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0430\u044f\u0447\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043e \u0441\u0435\u0431\u0435 \u043c\u0438\u0440\u0443. \u0418 \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 Wi-Fi-\u0441\u0435\u0442\u0435\u0439\u00a0\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u00a0\u0443\u0436\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043f\u043e\u0434\u0434\u0435\u043b\u044c\u043d\u044b\u0439 MAC-\u0430\u0434\u0440\u0435\u0441, \u0442\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0434\u043b\u044f Bluetooth \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043a\u0430 \u043d\u0435\u0442 (\u043f\u043e\u043f\u0440\u0430\u0432\u044c\u0442\u0435, \u0435\u0441\u043b\u0438 \u043e\u0448\u0438\u0431\u0430\u044e\u0441\u044c).<\/p>\n<p>\u041f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 Bluetooth-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u043a\u0430\u043a \u0432 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0445 \u0446\u0435\u043b\u044f\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435), \u0442\u0430\u043a \u0438 \u0432 \u0438\u043d\u044b\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0442\u0440\u0435\u043a\u0438\u043d\u0433\u0430 \u0438 \u0441\u043b\u0435\u0436\u0435\u043d\u0438\u044f \u0437\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043c).<\/p>\n<p>\u0418\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439\u00a0\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u00a0\u0432 Automate, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0430\u0436\u0434\u044b\u0435 15 \u0441\u0435\u043a\u0443\u043d\u0434 \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 Bluetooth-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432 \u043b\u043e\u0433 \u0438\u043c\u0435\u043d\u0430, \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u043b\u043e\u043a\u0430\u0446\u0438\u044e:  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/988\/5f4\/3b1\/9885f43b14f33495f427e25eda1dfca5.png\" alt=\"Flow \u0438\u0437 Automate\" title=\"Flow \u0438\u0437 Automate\" width=\"1047\" height=\"1280\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/988\/5f4\/3b1\/9885f43b14f33495f427e25eda1dfca5.png\"\/><\/p>\n<div><figcaption>Flow \u0438\u0437 Automate<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0443\u0441\u0442\u043e\u0439 \u0444\u0430\u0439\u043b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 (\u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0435\u00a0\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u00a0\u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u2014 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0431\u044b\u043b\u0430 \u0432\u0430\u0436\u043d\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438).<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0438\u0434\u0430:  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d33\/54a\/27d\/d3354a27d464228c83e943d16996221f.png\" alt=\"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043b\u043e\u0433 \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u0438 \u043b\u043e\u043a\u0430\u0446\u0438\u0435\u0439\" title=\"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043b\u043e\u0433 \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u0438 \u043b\u043e\u043a\u0430\u0446\u0438\u0435\u0439\" width=\"768\" height=\"61\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d33\/54a\/27d\/d3354a27d464228c83e943d16996221f.png\"\/><\/p>\n<div><figcaption>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043b\u043e\u0433 \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u0438 \u043b\u043e\u043a\u0430\u0446\u0438\u0435\u0439<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0432 \u043d\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u044b:<\/p>\n<pre><code class=\"python\">import pandas as pd import csv  # \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b input_file = \"btlog.txt\"  # \u0424\u0430\u0439\u043b, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 output_file = \"formatted_file.csv\"  with open(input_file, 'r', encoding='utf-8') as inp, open(output_file, 'w', newline='', encoding='utf-8') as out:     writer = csv.writer(out)     writer.writerow([\"device name\", \"device address\", \"advertiser\", \"location\", \"datetime\"])     for row in csv.reader(inp, delimiter=';'):         device_names = row[0].split(\", \")         device_addresses = row[1].split(\", \")         advertisers = row[2].split(\", \")         location = f\"{row[3]}, {row[4]}\"         datetime = row[5]                  min_len = min(len(device_names), len(device_addresses), len(advertisers))                  for i in range(min_len):             writer.writerow([device_names[i], device_addresses[i], advertisers[i], location, datetime]) <\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0443\u0436\u0435 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0440\u043e\u0439\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0430<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/74e\/18e\/1f4\/74e18e1f47ee9e09b244db22b32fd136.png\" alt=\"\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\" title=\"\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\" width=\"665\" height=\"156\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/74e\/18e\/1f4\/74e18e1f47ee9e09b244db22b32fd136.png\"\/><\/p>\n<div><figcaption>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u0435\u043d \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435, \u0433\u0434\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e.<\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c Google Colab, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c CSV-\u0444\u0430\u0439\u043b \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u043f\u0438\u0448\u0435\u043c \u0441\u0430\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442.<\/p>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a:<\/p>\n<pre><code class=\"python\">!pip install pandas folium ipywidgets  import pandas as pd import folium from ipywidgets import interact<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439:<\/p>\n<pre><code class=\"python\">df = pd.read_csv('formatted_file.csv', sep=',')  df['location'] = df['location'].apply(lambda x: [float(i) for i in x.split(',')]) df['datetime'] = pd.to_datetime(df['datetime']) df['device address'] = df['device address'].str.strip()  # \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0438 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 df['device name'] = df['device name'].str.strip()  # \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0438 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 df['frequency'] = df.groupby('device address')['device address'].transform('count') df = df.sort_values(by='frequency', ascending=False)  # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430 'device_info', \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0435\u0433\u043e 'device name' \u0438 'device address' \u0434\u043b\u044f \u0441\u0432\u0438\u0442\u043a\u0430 \u0441 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0443\u0441\u0442\u0440\u0439\u043e\u0441\u0442\u0432\u0430 df['device_info'] = df['device name'].fillna('unknown') + ' - ' + df['device address']<\/code><\/pre>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c\u00a0\u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u0432\u044b\u0431\u043e\u0440\u043e\u043c\u00a0\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430: <\/p>\n<pre><code class=\"python\">@interact def search_device(device=list(df['device_info'].unique())):     return df[df['device_info'] == device]<\/code><\/pre>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435:<\/p>\n<pre><code class=\"python\">def visualize_on_map(device_info):     device_data = df[df['device_info'] == device_info]     m = folium.Map(location=device_data['location'].iloc[0], zoom_start=13)      for _, row in device_data.iterrows():         folium.Marker(             location=row['location'],              popup=folium.Popup('\u0414\u0430\u0442\u0430: ' + str(row['datetime']), max_width=300)         ).add_to(m)      return m  @interact def interact_map(device=list(df['device_info'].unique())):     return visualize_on_map(device)<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a. \u0412\u044b\u0431\u0440\u0430\u0432 \u0438\u0437 \u043d\u0435\u0433\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0432\u0438\u0434\u0438\u043c \u043d\u0430 \u043a\u0430\u0440\u0442\u0435, \u0433\u0434\u0435 \u0435\u0433\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0438, \u0430 \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u0442\u043e\u0447\u043a\u0443 \u0432\u0438\u0434\u0438\u043c \u0434\u0430\u0442\u0443 \u0438 \u0432\u0440\u0435\u043c\u044f:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/885\/926\/966\/8859269668275b1bc04c76ee9d6c3e1b.png\" alt=\"\u0412\u044b\u0431\u0440\u0430\u043d Flipper \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0435 \u0436\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\" title=\"\u0412\u044b\u0431\u0440\u0430\u043d Flipper \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0435 \u0436\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\" width=\"781\" height=\"617\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/885\/926\/966\/8859269668275b1bc04c76ee9d6c3e1b.png\"\/><\/p>\n<div><figcaption>\u0412\u044b\u0431\u0440\u0430\u043d Flipper \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0435 \u0436\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0434\u0432\u0430 \u043b\u0438 \u0437\u0430 \u043c\u043d\u043e\u0439 \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440 \u0445\u043e\u0434\u0438\u043b \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0441 60-\u0434\u044e\u0439\u043c\u043e\u0432\u044b\u043c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u043e\u043c, \u0430 \u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0435 \u0443\u0441\u043f\u0435\u043b\u0430 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043b\u043e\u043a\u0430\u0446\u0438\u044f. \u0422\u0435\u043b\u0435\u0444\u043e\u043d\u044b \u0440\u0435\u0434\u043a\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u044e\u0442 \u043e \u0441\u0435\u0431\u0435, \u0430 \u0432\u043e\u0442 \u0447\u0430\u0441\u044b, \u043d\u0430\u0443\u0448\u043d\u0438\u043a\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u2014 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e.<\/p>\n<p>\u0412\u0441\u0435 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c proof of concept \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u044d\u043a\u0441\u043f\u0440\u0438\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>\u041f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u044d\u0442\u043e\u0433\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043c\u044b \u0447\u0430\u0441\u0442\u043e \u0431\u0435\u0441\u043f\u0435\u0447\u043d\u043e \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0432\u043e\u0435\u043c \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f\u0445. \u041c\u044b \u043d\u0435\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0432\u043e\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c Bluetooth \u043d\u0430 \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u0435. \u042d\u0442\u043e\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c, \u0433\u0434\u0435 \u0438 \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438 \u0432\u044b \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u0442\u0435\u0441\u044c, \u0434\u0430\u0436\u0435 \u043d\u0435 \u0437\u043d\u0430\u044f \u043e\u0431 \u044d\u0442\u043e\u043c (\u043d\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u044f \u0438\u0445 \u0432 \u0442\u043e\u043b\u043f\u0435, \u0432 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0435 \u0438\u043b\u0438 \u0432 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u043c \u0446\u0435\u043d\u0442\u0440\u0435), \u0430 \u0442\u0430\u043a\u0436\u0435 \u2014 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0433\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 (\u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0442\u0430\u043c \u0441\u043a\u0430\u043d\u043d\u0435\u0440\u0430 Bluetooth-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c MAC-\u0430\u0434\u0440\u0435\u0441\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0432\u0430\u0448\u0438\u0445 \u0433\u0430\u0434\u0436\u0435\u0442\u043e\u0432).<\/p>\n<p>\u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0438\u0441\u043a\u043e\u043c. \u0427\u0442\u043e\u0431\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0435\u0433\u043e, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c Bluetooth, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c, \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c, \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0435\u0442\u044c \u0438\u0437 Bluetooth-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0441 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043b\u043e\u043a\u0430\u0446\u0438\u044f\u0445 \u0438 \u0442.\u0434. \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/747484\/\"> https:\/\/habr.com\/ru\/articles\/747484\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0432<a href=\"https:\/\/incrussia.ru\/news\/kitaj-zapretit-wi-fi-bluetooth\/\" rel=\"noopener noreferrer nofollow\"> \u0441\u0442\u0430\u0442\u044c\u044e<\/a> &#171;\u041a\u0438\u0442\u0430\u0439 \u0445\u043e\u0447\u0435\u0442 \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Wi-Fi \u0438 Bluetooth&#187;, \u0437\u0430\u0434\u0443\u043c\u0430\u043b\u0441\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 Bluetooth-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044f\u0441\u044c \u043a \u043d\u0438\u043c (\u0445\u043e\u0442\u044f \u0438 \u0441\u0430\u043c\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044e \u043d\u0435\u043b\u0435\u0433\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430). \u041f\u043e \u0441\u0443\u0442\u0438, \u043b\u044e\u0431\u043e\u0435 Bluetooth \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u2014 \u044d\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0430\u044f\u0447\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043e \u0441\u0435\u0431\u0435 \u043c\u0438\u0440\u0443. \u0418 \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 Wi-Fi-\u0441\u0435\u0442\u0435\u0439\u00a0\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u00a0\u0443\u0436\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043f\u043e\u0434\u0434\u0435\u043b\u044c\u043d\u044b\u0439 MAC-\u0430\u0434\u0440\u0435\u0441, \u0442\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0434\u043b\u044f Bluetooth \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043a\u0430 \u043d\u0435\u0442 (\u043f\u043e\u043f\u0440\u0430\u0432\u044c\u0442\u0435, \u0435\u0441\u043b\u0438 \u043e\u0448\u0438\u0431\u0430\u044e\u0441\u044c).<\/p>\n<p>\u041f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 Bluetooth-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u043a\u0430\u043a \u0432 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0445 \u0446\u0435\u043b\u044f\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435), \u0442\u0430\u043a \u0438 \u0432 \u0438\u043d\u044b\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0442\u0440\u0435\u043a\u0438\u043d\u0433\u0430 \u0438 \u0441\u043b\u0435\u0436\u0435\u043d\u0438\u044f \u0437\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043c).<\/p>\n<p>\u0418\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439\u00a0\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u00a0\u0432 Automate, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0430\u0436\u0434\u044b\u0435 15 \u0441\u0435\u043a\u0443\u043d\u0434 \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 Bluetooth-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432 \u043b\u043e\u0433 \u0438\u043c\u0435\u043d\u0430, \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u043b\u043e\u043a\u0430\u0446\u0438\u044e:  <\/p>\n<figure class=\"full-width\">\n<div><figcaption>Flow \u0438\u0437 Automate<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0443\u0441\u0442\u043e\u0439 \u0444\u0430\u0439\u043b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 (\u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0435\u00a0\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u00a0\u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u2014 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0431\u044b\u043b\u0430 \u0432\u0430\u0436\u043d\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438).<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0438\u0434\u0430:  <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043b\u043e\u0433 \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u0438 \u043b\u043e\u043a\u0430\u0446\u0438\u0435\u0439<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0432 \u043d\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u044b:<\/p>\n<pre><code class=\"python\">import pandas as pd import csv  # \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b input_file = \"btlog.txt\"  # \u0424\u0430\u0439\u043b, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 output_file = \"formatted_file.csv\"  with open(input_file, 'r', encoding='utf-8') as inp, open(output_file, 'w', newline='', encoding='utf-8') as out:     writer = csv.writer(out)     writer.writerow([\"device name\", \"device address\", \"advertiser\", \"location\", \"datetime\"])     for row in csv.reader(inp, delimiter=';'):         device_names = row[0].split(\", \")         device_addresses = row[1].split(\", \")         advertisers = row[2].split(\", \")         location = f\"{row[3]}, {row[4]}\"         datetime = row[5]                  min_len = min(len(device_names), len(device_addresses), len(advertisers))                  for i in range(min_len):             writer.writerow([device_names[i], device_addresses[i], advertisers[i], location, datetime]) <\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0443\u0436\u0435 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0440\u043e\u0439\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0430<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u0435\u043d \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435, \u0433\u0434\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e.<\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c Google Colab, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c CSV-\u0444\u0430\u0439\u043b \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u043f\u0438\u0448\u0435\u043c \u0441\u0430\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442.<\/p>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a:<\/p>\n<pre><code class=\"python\">!pip install pandas folium ipywidgets  import pandas as pd import folium from ipywidgets import interact<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439:<\/p>\n<pre><code class=\"python\">df = pd.read_csv('formatted_file.csv', sep=',')  df['location'] = df['location'].apply(lambda x: [float(i) for i in x.split(',')]) df['datetime'] = pd.to_datetime(df['datetime']) df['device address'] = df['device address'].str.strip()  # \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0438 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 df['device name'] = df['device name'].str.strip()  # \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0438 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 df['frequency'] = df.groupby('device address')['device address'].transform('count') df = df.sort_values(by='frequency', ascending=False)  # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430 'device_info', \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0435\u0433\u043e 'device name' \u0438 'device address' \u0434\u043b\u044f \u0441\u0432\u0438\u0442\u043a\u0430 \u0441 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0443\u0441\u0442\u0440\u0439\u043e\u0441\u0442\u0432\u0430 df['device_info'] = df['device name'].fillna('unknown') + ' - ' + df['device address']<\/code><\/pre>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c\u00a0\u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u0432\u044b\u0431\u043e\u0440\u043e\u043c\u00a0\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430: <\/p>\n<pre><code class=\"python\">@interact def search_device(device=list(df['device_info'].unique())):     return df[df['device_info'] == device]<\/code><\/pre>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435:<\/p>\n<pre><code class=\"python\">def visualize_on_map(device_info):     device_data = df[df['device_info'] == device_info]     m = folium.Map(location=device_data['location'].iloc[0], zoom_start=13)      for _, row in device_data.iterrows():         folium.Marker(             location=row['location'],              popup=folium.Popup('\u0414\u0430\u0442\u0430: ' + str(row['datetime']), max_width=300)         ).add_to(m)      return m  @interact def interact_map(device=list(df['device_info'].unique())):     return visualize_on_map(device)<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a. \u0412\u044b\u0431\u0440\u0430\u0432 \u0438\u0437 \u043d\u0435\u0433\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0432\u0438\u0434\u0438\u043c \u043d\u0430 \u043a\u0430\u0440\u0442\u0435, \u0433\u0434\u0435 \u0435\u0433\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0438, \u0430 \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u0442\u043e\u0447\u043a\u0443 \u0432\u0438\u0434\u0438\u043c \u0434\u0430\u0442\u0443 \u0438 \u0432\u0440\u0435\u043c\u044f:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0412\u044b\u0431\u0440\u0430\u043d Flipper \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0435 \u0436\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0434\u0432\u0430 \u043b\u0438 \u0437\u0430 \u043c\u043d\u043e\u0439 \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440 \u0445\u043e\u0434\u0438\u043b \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0441 60-\u0434\u044e\u0439\u043c\u043e\u0432\u044b\u043c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u043e\u043c, \u0430 \u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0435 \u0443\u0441\u043f\u0435\u043b\u0430 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043b\u043e\u043a\u0430\u0446\u0438\u044f. \u0422\u0435\u043b\u0435\u0444\u043e\u043d\u044b \u0440\u0435\u0434\u043a\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u044e\u0442 \u043e \u0441\u0435\u0431\u0435, \u0430 \u0432\u043e\u0442 \u0447\u0430\u0441\u044b, \u043d\u0430\u0443\u0448\u043d\u0438\u043a\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u2014 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e.<\/p>\n<p>\u0412\u0441\u0435 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c proof of concept \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u044d\u043a\u0441\u043f\u0440\u0438\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>\u041f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u044d\u0442\u043e\u0433\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043c\u044b \u0447\u0430\u0441\u0442\u043e \u0431\u0435\u0441\u043f\u0435\u0447\u043d\u043e \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0432\u043e\u0435\u043c \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f\u0445. \u041c\u044b \u043d\u0435\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0432\u043e\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c Bluetooth \u043d\u0430 \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u0435. \u042d\u0442\u043e\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c, \u0433\u0434\u0435 \u0438 \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438 \u0432\u044b \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u0442\u0435\u0441\u044c, \u0434\u0430\u0436\u0435 \u043d\u0435 \u0437\u043d\u0430\u044f \u043e\u0431 \u044d\u0442\u043e\u043c (\u043d\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u044f \u0438\u0445 \u0432 \u0442\u043e\u043b\u043f\u0435, \u0432 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0435 \u0438\u043b\u0438 \u0432 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u043c \u0446\u0435\u043d\u0442\u0440\u0435), \u0430 \u0442\u0430\u043a\u0436\u0435 \u2014 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0433\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 (\u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0442\u0430\u043c \u0441\u043a\u0430\u043d\u043d\u0435\u0440\u0430 Bluetooth-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c MAC-\u0430\u0434\u0440\u0435\u0441\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0432\u0430\u0448\u0438\u0445 \u0433\u0430\u0434\u0436\u0435\u0442\u043e\u0432).<\/p>\n<p>\u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0438\u0441\u043a\u043e\u043c. \u0427\u0442\u043e\u0431\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0435\u0433\u043e, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c Bluetooth, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c, \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c, \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0435\u0442\u044c \u0438\u0437 Bluetooth-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0441 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043b\u043e\u043a\u0430\u0446\u0438\u044f\u0445 \u0438 \u0442.\u0434. \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/747484\/\"> https:\/\/habr.com\/ru\/articles\/747484\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-350167","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/350167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=350167"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/350167\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=350167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=350167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=350167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}