<commit_before>import json

class Device:

	PUSH_URL = "https://www.pushbullet.com/api/pushes"

	def __init__(self, session, device_info):
		self._session = session
		self.dev_id = device_info.get("id")
		self.owner = device_info.get("owner_name", None)

		extras = device_info["extras"]
		self.model = extras.get("model")
		self.manufacturer = extras.get("manufacturer")
		self.android_version = extras.get("android_version")
		self.sdk_version = extras.get("sdk_version")
		self.app_version = extras.get("app_version")

		self._fullname = "{} {} {}".format(self.manufacturer,
										   self.model, self.android_version)
		
		nickname = extras.get("nickname")
		self.name = nickname or self._fullname

	def push_note(self, title, body):
		data = {"type": "note", "title": title, "body": body}
		return self._push(data)

	def push_address(self, name, address):
		pass

	def push_list(self, title, items):
		data = {"type": "list", "title": title, "items": items}
		return self._push(data)		

	def push_file(self, file):
		pass

	def push_link(self, title, url):
		pass
<commit_msg>Add support for links and addresses.<commit_after>import json

class Device:

	PUSH_URL = "https://www.pushbullet.com/api/pushes"

	def __init__(self, session, device_info):
		self._session = session
		self.dev_id = device_info.get("id")
		self.owner = device_info.get("owner_name", None)

		extras = device_info["extras"]
		self.model = extras.get("model")
		self.manufacturer = extras.get("manufacturer")
		self.android_version = extras.get("android_version")
		self.sdk_version = extras.get("sdk_version")
		self.app_version = extras.get("app_version")

		self._fullname = "{} {} {}".format(self.manufacturer,
										   self.model, self.android_version)
		
		nickname = extras.get("nickname")
		self.name = nickname or self._fullname

	def push_note(self, title, body):
		data = {"type": "note", "title": title, "body": body}
		return self._push(data)

	def push_address(self, name, address):
		data = {"type": "address", "name": name, "address": address}
		return self._push(data)

	def push_list(self, title, items):
		data = {"type": "list", "title": title, "items": items}
		return self._push(data)

	def push_file(self, file):
		pass

	def push_link(self, title, url):
		data = {"type": "link", "title": title, "url": url}
		return self._push(data)

{'fraction_non_alphanumeric': 0.1574232081911263, 'fraction_numerical': 0.0, 'mean_word_length': 4.466200466200466, 'pattern_counts': {'":': 18, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5246251', 'n_tokens_mistral': 892, 'n_tokens_neox': 788, 'n_words': 179}