<commit_before>#!/usr/bin/python

from ADIF_log import ADIF_log
import datetime
import os

# Create a new log...
log = ADIF_log('Py-ADIF Example')
entry = log.newEntry()

# New entry from K6BSD to WD1CKS
entry['OPerator'] = 'K6BSD'
entry['Call'] = 'WD1CKS'
entry['QSO_Date']=datetime.datetime.now().strftime('%Y%m%d')
entry['baNd']='20M'
entry['mODe']='PSK'
entry['SubMode']='PSK31'
entry['TIME_ON']=datetime.datetime.now().strftime('%H%M')

# Write to example.adif
f = open('example.adif', 'wt')
f.write(str(log))
f.close()

# Write to example.adx
f = open('example.adx', 'wt')
f.write(log.xml())
f.close()<commit_msg>Add a unicode value in a comment_intl value.<commit_after>#!/usr/bin/python

from ADIF_log import ADIF_log
import datetime
import os

# Create a new log...
log = ADIF_log('Py-ADIF Example')
entry = log.newEntry()

# New entry from K6BSD to WD1CKS
entry['OPerator'] = 'K6BSD'
entry['Call'] = 'WD1CKS'
entry['QSO_Date']=datetime.datetime.now().strftime('%Y%m%d')
entry['baNd']='20M'
entry['mODe']='PSK'
entry['SubMode']='PSK31'
entry['TIME_ON']=datetime.datetime.now().strftime('%H%M')
entry['comment_intl']=u'Testing... \xb0'

# Write to example.adif
f = open('example.adif', 'wt')
f.write(str(log))
f.close()

# Write to example.adx
f = open('example.adx', 'wt')
f.write(log.xml())
f.close()
{'fraction_non_alphanumeric': 0.20763358778625954, 'fraction_numerical': 0.012977099236641221, 'mean_word_length': 6.010695187165775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '5844394', 'n_tokens_mistral': 557, 'n_tokens_neox': 533, 'n_words': 106}