<commit_before># encoding: utf-8
"""
negotiated.py

Created by <NAME> on 2012-07-19.
Copyright (c) 2009-2013 Exa Networks. All rights reserved.
"""

from exabgp.bgp.message.open.asn import ASN
from exabgp.bgp.message.open.asn import AS_TRANS
from exabgp.bgp.message.open.holdtime import HoldTime
from exabgp.bgp.message.open.capability import Capability
from exabgp.bgp.message.open.capability import REFRESH
from exabgp.bgp.message.open.routerid import RouterID

class Negotiated (object):
	def __init__ (self,neighbor):
		self.neighbor = neighbor

		self.sent_open = None
		self.received_open = None

		self.holdtime = HoldTime(0)
		self.local_as = ASN(0)
		self.peer_as = ASN(0)
		self.families = []
		self.asn4 = False
		self.addpath = RequirePath()
		self.multisession = False
		self.msg_size = 4096
		self.operational = False
		self.refresh = REFRESH.absent
		self.aigp = None

	def sent (self,sent_open):
		self.sent_open = sent_open
		if self.received_open:
			self._negociate()

	def received (self,received_open):
		self.received_open = received_open
		if self.sent_open:
			self._negociate()
		#else:
		#	import pdb; pdb.set_trace()

	def _negociate (self):
		sent_capa = self.sent_open.capabilities<commit_msg>fix minor typo in negotiated.py<commit_after># encoding: utf-8
"""
negotiated.py

Created by <NAME> on 2012-07-19.
Copyright (c) 2009-2013 Exa Networks. All rights reserved.
"""

from exabgp.bgp.message.open.asn import ASN
from exabgp.bgp.message.open.asn import AS_TRANS
from exabgp.bgp.message.open.holdtime import HoldTime
from exabgp.bgp.message.open.capability import Capability
from exabgp.bgp.message.open.capability import REFRESH
from exabgp.bgp.message.open.routerid import RouterID

class Negotiated (object):
	def __init__ (self,neighbor):
		self.neighbor = neighbor

		self.sent_open = None
		self.received_open = None

		self.holdtime = HoldTime(0)
		self.local_as = ASN(0)
		self.peer_as = ASN(0)
		self.families = []
		self.asn4 = False
		self.addpath = RequirePath()
		self.multisession = False
		self.msg_size = 4096
		self.operational = False
		self.refresh = REFRESH.absent
		self.aigp = None

	def sent (self,sent_open):
		self.sent_open = sent_open
		if self.received_open:
			self._negotiate()

	def received (self,received_open):
		self.received_open = received_open
		if self.sent_open:
			self._negotiate()
		#else:
		#	import pdb; pdb.set_trace()

	def _negotiate (self):
		sent_capa = self.sent_open.capabilities
{'fraction_non_alphanumeric': 0.10438667749796914, 'fraction_numerical': 0.020308692120227456, 'mean_word_length': 4.17436974789916, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3013631', 'n_tokens_mistral': 1017, 'n_tokens_neox': 900, 'n_words': 201}