first commit

master
poni 3 years ago
parent 46f9258ce5
commit cb74de4833

@ -0,0 +1,93 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from weasyprint import HTML, CSS\n",
"from weasyprint.fonts import FontConfiguration\n",
"import nltk\n",
"\n",
"font_config = FontConfiguration()\n",
"\n",
"txt = open('txt/practicalvision.txt').read()\n",
"words = nltk.word_tokenize(txt) #tokenizing the text\n",
"tagged_words = nltk.pos_tag(words) #generating grammar tags for the tokens\n",
"\n",
"content = ''\n",
"content += '<h1>Practical Vision, by Jalada</h1>'\n",
"\n",
"\n",
"for word, tag in tagged_words:\n",
" content += f'<span class=\"{tag}\">{word}</span> ' #for every word, generate an html tag wich includes the grammar tag as class\n",
" if '.' in word:\n",
" content += '<br> \\n'\n",
"\n",
"with open(\"txt/practical_viz.html\", \"w\") as f: #save as html\n",
" f.write(f\"\"\"<!DOCTYPE html>\n",
"<html>\n",
"<head>\n",
" <meta charset=\"utf-8\">\n",
" <link rel=\"stylesheet\" type=\"text/css\" href=\"grammar_viz.css\">\n",
" <title></title>\n",
"</head>\n",
"<body>\n",
"{content}\n",
"</body>\n",
"\"\"\")\n",
"\n",
"html = HTML(\"txt/practical_viz.html\") #define as HTML the genereted html file\n",
"\n",
"css = CSS(string=''' \n",
" body{\n",
" size: A4;\n",
" font-family: serif;\n",
" font-size: 12pt;\n",
" line-height: 1.4;\n",
" padding: 3vw;\n",
" color: rgba(0,0,0,0)\n",
" }\n",
" h1{\n",
" width: 100%;\n",
" text-align: center;\n",
" font-size: 250%;\n",
" line-height: 1.25;\n",
" color: black;\n",
" \n",
" }''', font_config=font_config) #define CSS for print final A4 pdf\n",
"\n",
"html.write_pdf('practical_viz.pdf', stylesheets=[css], font_config=font_config) #generate A4 pdf"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

@ -0,0 +1,126 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"import random #otherwise random does not work :)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"#first parts of the first 12 articles of the italian constitutes\n",
"\n",
"it_articles = [\"\\n\\nART.1 \\nItaly is a Democratic Republic, founded\", 'ART.2 \\nThe Republic recognises and guarantees', 'ART.3 \\nAll citizens have equal social dignity and are','ART.4 \\nThe Republic recognises the right of all citizens to','ART.5 \\nThe Republic, one and indivisible, recognises and promotes','ART.6 \\nThe Republic shall protect','ART.7 \\nThe State and the Catholic Church are','ART.8 \\nAll religious confessions enjoy','ART.9 \\nThe Republic shall promote the development of','ART.10 \\nThe Italian legal system conforms to the generally recognised rules of','ART.11 \\nItaly rejects war as an instrument of','ART.12 \\nThe flag of the Republic is']"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"with open(\"Utopia.txt\") as utopia: #open the external .txt\n",
" contents = utopia.read().replace('\\n',' ').replace('\\r ', '').replace('-','').replace(' ',' ').strip(' and ')#delete useless breaks\n",
" \n",
"with open(\"anarchist_cookbook.txt\") as cookbook:\n",
" contents2 = cookbook.read().replace('\\n', ' ').replace('\\r', '').strip('1234567890').replace('-','').replace(' ',' ').strip(' and ')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"utopia_splitted = contents.split(\",\" or \".\" or '\"' or '; ' or 'and') #splits the texts and makes a list\n",
"\n",
"cookbook_splitted = contents2.split(\",\" or \".\" or '\"' or '; ' or 'and')"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"export = './export.txt'\n",
"with open(export, 'w') as export:\n",
"\n",
" for i in range(20): #creates more possibilities, change the value to have more or less results\n",
" #while True\n",
" \n",
" for constitute in it_articles: \n",
" \n",
" utopia_random = random.choice(utopia_splitted) #it takes a random sentence from the list\n",
" cookbook_random = random.choice(cookbook_splitted)\n",
" \n",
" speculative_constitute = constitute + utopia_random\n",
" \n",
" print(f'''{speculative_constitute}.\\n''',file=export)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,557 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 48,
"metadata": {},
"outputs": [],
"source": [
"import nltk\n",
"import random\n",
"s = ' '"
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [],
"source": [
"text = open('language.txt').read().replace('.','').replace(',','').replace('(','').replace(')','').replace(':','').replace(';','')\n",
"text = text.split()\n",
"textSet = set(text)\n",
"tagged = nltk.pos_tag(textSet)"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {},
"outputs": [],
"source": [
"#create array of single sigles, in order to use them as tags for dictionaries\n",
"\n",
"sigle = '''\n",
"1. \tCC \tCoordinating conjunction\n",
"2. \tCD \tCardinal number\n",
"3. \tDT \tDeterminer\n",
"4. \tEX \tExistential there\n",
"5. \tFW \tForeign word\n",
"6. \tIN \tPreposition or subordinating conjunction\n",
"7. \tJJ \tAdjective\n",
"8. \tJJR \tAdjective, comparative\n",
"9. \tJJS \tAdjective, superlative\n",
"10. \tLS \tList item marker\n",
"11. \tMD \tModal\n",
"12. \tNN \tNoun, singular or mass\n",
"13. \tNNS \tNoun, plural\n",
"14. \tNNP \tProper noun, singular\n",
"15. \tNNPS \tProper noun, plural\n",
"16. \tPDT \tPredeterminer\n",
"17. \tPOS \tPossessive ending\n",
"18. \tPRP \tPersonal pronoun\n",
"19. \tPRP$ \tPossessive pronoun\n",
"20. \tRB \tAdverb\n",
"21. \tRBR \tAdverb, comparative\n",
"22. \tRBS \tAdverb, superlative\n",
"23. \tRP \tParticle\n",
"24. \tSYM \tSymbol\n",
"25. \tTO \tto\n",
"26. \tUH \tInterjection\n",
"27. \tVB \tVerb, base form\n",
"28. \tVBD \tVerb, past tense\n",
"29. \tVBG \tVerb, gerund or present participle\n",
"30. \tVBN \tVerb, past participle\n",
"31. \tVBP \tVerb, non-3 person singular present\n",
"32. \tVBZ \tVerb, 3 person singular present\n",
"33. \tWDT \tWh-determiner\n",
"34. \tWP \tWh-pronoun\n",
"36. \tWRB \tWh-adverb \n",
"'''\n",
"\n",
"sigle = sigle.replace('.','').split()\n",
"sigle = [sigle for sigle in sigle if len(sigle) < 4 and not sigle.isdigit() and not sigle == 'or' and not sigle == 'to' and not sigle == '3rd']"
]
},
{
"cell_type": "code",
"execution_count": 97,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"RB + s + NN + s + VBZ + s + JJ + s + NNS + s + IN + s + DT + s + WDT + s + EX + s + VBP + s + VBN + s + CC + s + NNP\n"
]
}
],
"source": [
"#This is for prepare a grammar constructio based on a picked random part of text\n",
"\n",
"s = ' '\n",
"textlines = open('language.txt').readlines()\n",
"nl = len(textlines)\n",
"r = random.randrange(0,nl)\n",
"line = textlines[r]\n",
"sentence = line.split()\n",
"sentence = nltk.pos_tag(sentence)\n",
"\n",
"dat = {}\n",
"\n",
"for word, tag in sentence:\n",
" dat[tag] = word\n",
" \n",
"keys = dat.keys()\n",
"\n",
"print(\" + s + \".join([pos for pos in keys])) #copypaste the result to generate sentences"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CClista = []\n",
"my_dict('CC','dataCC',CClista)\n",
"\n",
"\n",
"CDlista = []\n",
"my_dict('CD','dataCD',CDlista)\n",
"\n",
"\n",
"DTlista = []\n",
"my_dict('DT','dataDT',DTlista)\n",
"\n",
"\n",
"EXlista = []\n",
"my_dict('EX','dataEX',EXlista)\n",
"\n",
"\n",
"FWlista = []\n",
"my_dict('FW','dataFW',FWlista)\n",
"\n",
"\n",
"INlista = []\n",
"my_dict('IN','dataIN',INlista)\n",
"\n",
"\n",
"JJlista = []\n",
"my_dict('JJ','dataJJ',JJlista)\n",
"\n",
"\n",
"JJRlista = []\n",
"my_dict('JJR','dataJJR',JJRlista)\n",
"\n",
"\n",
"JJSlista = []\n",
"my_dict('JJS','dataJJS',JJSlista)\n",
"\n",
"\n",
"LSlista = []\n",
"my_dict('LS','dataLS',LSlista)\n",
"\n",
"\n",
"MDlista = []\n",
"my_dict('MD','dataMD',MDlista)\n",
"\n",
"\n",
"NNlista = []\n",
"my_dict('NN','dataNN',NNlista)\n",
"\n",
"\n",
"NNSlista = []\n",
"my_dict('NNS','dataNNS',NNSlista)\n",
"\n",
"\n",
"NNPlista = []\n",
"my_dict('NNP','dataNNP',NNPlista)\n",
"\n",
"\n",
"PDTlista = []\n",
"my_dict('PDT','dataPDT',PDTlista)\n",
"\n",
"\n",
"POSlista = []\n",
"my_dict('POS','dataPOS',POSlista)\n",
"\n",
"\n",
"PRPlista = []\n",
"my_dict('PRP','dataPRP',PRPlista)\n",
"\n",
"\n",
"RBlista = []\n",
"my_dict('RB','dataRB',RBlista)\n",
"\n",
"\n",
"RBRlista = []\n",
"my_dict('RBR','dataRBR',RBRlista)\n",
"\n",
"\n",
"RBSlista = []\n",
"my_dict('RBS','dataRBS',RBSlista)\n",
"\n",
"\n",
"RPlista = []\n",
"my_dict('RP','dataRP',RPlista)\n",
"\n",
"\n",
"SYMlista = []\n",
"my_dict('SYM','dataSYM',SYMlista)\n",
"\n",
"\n",
"TOlista = []\n",
"my_dict('TO','dataTO',TOlista)\n",
"\n",
"\n",
"UHlista = []\n",
"my_dict('UH','dataUH',UHlista)\n",
"\n",
"\n",
"VBlista = []\n",
"my_dict('VB','dataVB',VBlista)\n",
"\n",
"\n",
"VBDlista = []\n",
"my_dict('VBD','dataVBD',VBDlista)\n",
"\n",
"\n",
"VBGlista = []\n",
"my_dict('VBG','dataVBG',VBGlista)\n",
"\n",
"\n",
"VBNlista = []\n",
"my_dict('VBN','dataVBN',VBNlista)\n",
"\n",
"\n",
"VBPlista = []\n",
"my_dict('VBP','dataVBP',VBPlista)\n",
"\n",
"\n",
"VBZlista = []\n",
"my_dict('VBZ','dataVBZ',VBZlista)\n",
"\n",
"\n",
"WDTlista = []\n",
"my_dict('WDT','dataWDT',WDTlista)\n",
"\n",
"\n",
"WPlista = []\n",
"my_dict('WP','dataWP',WPlista)\n",
"\n",
"\n",
"WRBlista = []\n",
"my_dict('WRB','dataWRB',WRBlista)\n",
"\n",
"\n"
]
}
],
"source": [
"for gr in sigle: #to create storing list for various pos\n",
" print(f'{gr}lista = []'.replace('$','ç')) \n",
" print(f'''my_dict('{gr}','data{gr}',{gr}lista)'''.replace('$','ç'))\n",
" print('\\n')"
]
},
{
"cell_type": "code",
"execution_count": 52,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CC = random.choice(CClista)\n",
"CD = random.choice(CDlista)\n",
"DT = random.choice(DTlista)\n",
"EX = random.choice(EXlista)\n",
"IN = random.choice(INlista)\n",
"JJ = random.choice(JJlista)\n",
"JJS = random.choice(JJSlista)\n",
"MD = random.choice(MDlista)\n",
"NN = random.choice(NNlista)\n",
"NNS = random.choice(NNSlista)\n",
"NNP = random.choice(NNPlista)\n",
"PRP = random.choice(PRPlista)\n",
"RB = random.choice(RBlista)\n",
"TO = random.choice(TOlista)\n",
"VB = random.choice(VBlista)\n",
"VBD = random.choice(VBDlista)\n",
"VBG = random.choice(VBGlista)\n",
"VBN = random.choice(VBNlista)\n",
"VBP = random.choice(VBPlista)\n",
"VBZ = random.choice(VBZlista)\n",
"WDT = random.choice(WDTlista)\n",
"WP = random.choice(WPlista)\n"
]
}
],
"source": [
"dataset = {} \n",
"\n",
"def my_dict(gr,data,grlista): #to store words in pos lists\n",
"\n",
" data = {}\n",
"\n",
" for word, tag in tagged:\n",
" dataset[tag] = word\n",
" if tag == gr:\n",
" data[tag] = word\n",
" grlista.append(word)\n",
" for x in data:\n",
" if len(grlista) == 0:\n",
" None\n",
" else:\n",
" print(f'{gr} = random.choice({gr}lista)'.replace('$','ç')) #to print the random picker, if the list is empty, doesn't print the randomic variable for that pos\n",
" \n",
"#copy paste from up:\n",
" \n",
" \n",
"CClista = []\n",
"my_dict('CC','dataCC',CClista)\n",
"\n",
"\n",
"CDlista = []\n",
"my_dict('CD','dataCD',CDlista)\n",
"\n",
"\n",
"DTlista = []\n",
"my_dict('DT','dataDT',DTlista)\n",
"\n",
"\n",
"EXlista = []\n",
"my_dict('EX','dataEX',EXlista)\n",
"\n",
"\n",
"FWlista = []\n",
"my_dict('FW','dataFW',FWlista)\n",
"\n",
"\n",
"INlista = []\n",
"my_dict('IN','dataIN',INlista)\n",
"\n",
"\n",
"JJlista = []\n",
"my_dict('JJ','dataJJ',JJlista)\n",
"\n",
"\n",
"JJRlista = []\n",
"my_dict('JJR','dataJJR',JJRlista)\n",
"\n",
"\n",
"JJSlista = []\n",
"my_dict('JJS','dataJJS',JJSlista)\n",
"\n",
"\n",
"LSlista = []\n",
"my_dict('LS','dataLS',LSlista)\n",
"\n",
"\n",
"MDlista = []\n",
"my_dict('MD','dataMD',MDlista)\n",
"\n",
"\n",
"NNlista = []\n",
"my_dict('NN','dataNN',NNlista)\n",
"\n",
"\n",
"NNSlista = []\n",
"my_dict('NNS','dataNNS',NNSlista)\n",
"\n",
"\n",
"NNPlista = []\n",
"my_dict('NNP','dataNNP',NNPlista)\n",
"\n",
"\n",
"PDTlista = []\n",
"my_dict('PDT','dataPDT',PDTlista)\n",
"\n",
"\n",
"POSlista = []\n",
"my_dict('POS','dataPOS',POSlista)\n",
"\n",
"\n",
"PRPlista = []\n",
"my_dict('PRP','dataPRP',PRPlista)\n",
"\n",
"\n",
"RBlista = []\n",
"my_dict('RB','dataRB',RBlista)\n",
"\n",
"\n",
"RBRlista = []\n",
"my_dict('RBR','dataRBR',RBRlista)\n",
"\n",
"\n",
"RBSlista = []\n",
"my_dict('RBS','dataRBS',RBSlista)\n",
"\n",
"\n",
"RPlista = []\n",
"my_dict('RP','dataRP',RPlista)\n",
"\n",
"\n",
"SYMlista = []\n",
"my_dict('SYM','dataSYM',SYMlista)\n",
"\n",
"\n",
"TOlista = []\n",
"my_dict('TO','dataTO',TOlista)\n",
"\n",
"\n",
"UHlista = []\n",
"my_dict('UH','dataUH',UHlista)\n",
"\n",
"\n",
"VBlista = []\n",
"my_dict('VB','dataVB',VBlista)\n",
"\n",
"\n",
"VBDlista = []\n",
"my_dict('VBD','dataVBD',VBDlista)\n",
"\n",
"\n",
"VBGlista = []\n",
"my_dict('VBG','dataVBG',VBGlista)\n",
"\n",
"\n",
"VBNlista = []\n",
"my_dict('VBN','dataVBN',VBNlista)\n",
"\n",
"\n",
"VBPlista = []\n",
"my_dict('VBP','dataVBP',VBPlista)\n",
"\n",
"\n",
"VBZlista = []\n",
"my_dict('VBZ','dataVBZ',VBZlista)\n",
"\n",
"\n",
"WDTlista = []\n",
"my_dict('WDT','dataWDT',WDTlista)\n",
"\n",
"\n",
"WPlista = []\n",
"my_dict('WP','dataWP',WPlista)\n",
"\n",
"\n",
"WRBlista = []\n",
"my_dict('WRB','dataWRB',WRBlista)\n"
]
},
{
"cell_type": "code",
"execution_count": 113,
"metadata": {},
"outputs": [],
"source": [
"#copy paste result from up in order to randomize at every refresh a new word\n",
"\n",
"CC = random.choice(CClista)\n",
"CD = random.choice(CDlista)\n",
"DT = random.choice(DTlista)\n",
"EX = random.choice(EXlista)\n",
"IN = random.choice(INlista)\n",
"JJ = random.choice(JJlista)\n",
"JJS = random.choice(JJSlista)\n",
"MD = random.choice(MDlista)\n",
"NN = random.choice(NNlista)\n",
"NNS = random.choice(NNSlista)\n",
"NNP = random.choice(NNPlista)\n",
"PRP = random.choice(PRPlista)\n",
"RB = random.choice(RBlista)\n",
"TO = random.choice(TOlista)\n",
"VB = random.choice(VBlista)\n",
"VBD = random.choice(VBDlista)\n",
"VBG = random.choice(VBGlista)\n",
"VBN = random.choice(VBNlista)\n",
"VBP = random.choice(VBPlista)\n",
"VBZ = random.choice(VBZlista)\n",
"WDT = random.choice(WDTlista)\n",
"WP = random.choice(WPlista)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 114,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'however process is so-called layers since these which There are implemented and Yet'"
]
},
"execution_count": 114,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"RB + s + NN + s + VBZ + s + JJ + s + NNS + s + IN + s + DT + s + WDT + s + EX + s + VBP + s + VBN + s + CC + s + NNP"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

@ -0,0 +1,75 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Random XPUB1 picker"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To randomly select a 'volountary'"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [],
"source": [
"import random"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [],
"source": [
"xpub1 = ['Louisa','Kendal','Jacopo','Floor','Euna','Clara','Martin','Nami','Federico']"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {},
"outputs": [],
"source": [
"volountary = random.choice(xpub1)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(volountary)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

@ -0,0 +1,15 @@
@page{
size: A5;
background-color: #C0C0C0;
}
body{
size: A5;
font-family: serif;
font-size: 20pt;
line-height: 1.4;
color: blue;
white-space: normal;
text-align: center;
}

@ -0,0 +1,191 @@
strong{
color: blue;
}
em{
color: green;
}
body{
font-size: 2vw;
text-align: justify;
text-justify: inter-word;
line-height: 1;
font-family: sans-serif;
color: rgb(0,0,0,0)
}
span.CC{
background-color:#333300
}
span.CD{
background-color:#999900
}
span.DT{
background-color: #ff00ff
}
span.EX{
background-color: #006080
}
span.FW{
background-color:#f6f6ee
}
span.IN{
background-color:#ffccff
}
span.JJ{
background-color: #f2f2f2;
}
span.JJR{
background-color: #b3b3b3
}
span.JJS{
background-color:#737373
}
span.LS{
background-color:#666633
}
span.MD{
background-color:#00cc00
}
span.NN{
background-color:#33ff33
}
span.NNS{
background-color:#80ff80
}
span.NNP{
background-color:#ccffcc
}
span.PDT{
background-color:#ffd1b3
}
span.POS{
background-color:#ffb380
}
span.PRP{
background-color:#ff8533
}
span.PRP${
background-color:#e65c00
}
span.RB{
background-color:#ff8080
}
span.RBR{
background-color:#ff4d4d
}
span.RBS{
background-color:#e60000
}
span.RP{
background-color:#992600
}
span.SYM{
background-color:#99ff33
}
span.TO{
background-color: black
}
span.UH{
background-color:#ffff00
}
span.VB{
background-color: #000099
}
span.VBD{
background-color: #0000e6
}
span.VBG{
background-color:#1a1aff
}
span.VBN{
background-color: #4d4dff
}
span.VBP{
background-color: #b3b3ff
}
span.VBZ{
background-color: #ccccff
}
span.WDT{
background-color:#ccffff
}
span.WP{
background-color:#66ffff
}
span.WP${
background-color:#00e6e6
}
span.WRB{t
background-color: #008080
}
pre {
white-space: pre-wrap;
}
h1{
font-style: bold;
width: 100%;
text-align: center;
color: black
}

@ -0,0 +1,218 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 117,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"A house of tin \n",
" at leslie-s \n",
" Using a fire torch\n",
" Inhabited by donald.\n",
"A house of paperbox \n",
" in pzi \n",
" Using a led torch\n",
" Inhabited by donald.\n",
"A house of paperbox \n",
" in a forest \n",
" Using a yellow submarine\n",
" Inhabited by donald.\n",
"A house of paperbox \n",
" in pzi \n",
" Using a yellow submarine\n",
" Inhabited by donald.\n",
"A house of stone \n",
" in liverpool \n",
" Using a fire torch\n",
" Inhabited by donald.\n"
]
}
],
"source": [
"import random\n",
"\n",
"a = ('chips','foil','tin','stone','paperbox')\n",
"b = ('in a forest','in pzi','at leslie-s','in liverpool')\n",
"c = ('a yellow submarine','a led torch','a fire torch')\n",
"d = ('tintin','dustman','david bowie','donald')\n",
"\n",
"\n",
"for x in range(5):\n",
" \n",
" ma = random.randint(0,len(a)-1)\n",
" mb = random.randint(0,len(b)-1)\n",
" mc = random.randint(0,len(c)-1)\n",
" md = random.randint(0,len(d)-1)\n",
" \n",
" print(f\"\"\"A house of {a[ma]} \n",
" {b[mb]} \n",
" Using {c[mc]}\n",
" Inhabited by {d[md]}.\"\"\")\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "code",
"execution_count": 120,
"metadata": {},
"outputs": [],
"source": [
"a = ('chips','foil','tin','stone','paperbox')\n",
"b = ('in a forest','in pzi','at leslie-s','in liverpool')\n",
"c = ('a yellow submarine','a led torch','a fire torch')\n",
"d = ('tintin','dustman','david bowie','donald')"
]
},
{
"cell_type": "code",
"execution_count": 120,
"metadata": {},
"outputs": [],
"source": [
"for x in range(5):\n",
" \n",
"\n",
" ma = random.choice(a)\n",
" mb = random.choice(b)\n",
" mc = random.choice(c)\n",
" md = random.choice(d)\n",
" \n",
" print(f\"\"\"A house of {ma} \n",
" {mb} \n",
" Using {mc}\n",
" Inhabited by {md}.\"\"\")"
]
},
{
"cell_type": "code",
"execution_count": 120,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"A house of chips \n",
" at leslie-s \n",
" Using a yellow submarine\n",
" Inhabited by donald.\n",
"A house of tin \n",
" in a forest \n",
" Using a fire torch\n",
" Inhabited by tintin.\n",
"A house of tin \n",
" in a forest \n",
" Using a yellow submarine\n",
" Inhabited by david bowie.\n",
"A house of tin \n",
" in a forest \n",
" Using a led torch\n",
" Inhabited by donald.\n",
"A house of chips \n",
" in pzi \n",
" Using a led torch\n",
" Inhabited by tintin.\n"
]
}
],
"source": []
},
{
"cell_type": "code",
"execution_count": 123,
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"A house of stone \n",
" at leslie-s \n",
" Using a fire torch\n",
" Inhabited by donald.\n",
"A house of foil \n",
" in liverpool \n",
" Using a fire torch\n",
" Inhabited by donald.\n",
"A house of chips \n",
" in pzi \n",
" Using a yellow submarine\n",
" Inhabited by david bowie.\n",
"A house of stone \n",
" at leslie-s \n",
" Using a yellow submarine\n",
" Inhabited by david bowie.\n",
"A house of chips \n",
" in liverpool \n",
" Using a yellow submarine\n",
" Inhabited by dustman.\n"
]
}
],
"source": []
},
{
"cell_type": "code",
"execution_count": 144,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ah ok\n",
"\n",
"vediamo\n",
"\n",
"ciccio\n"
]
}
],
"source": [
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

@ -0,0 +1,97 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"I tried to re/create my favorite twitter bot, [il pleut](https://twitter.com/auto_rain)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
", ,, ,,\n",
" , ,\n",
" , ,, \n",
" , \n",
" , \n",
" , , , \n",
" , \n",
" , , \n",
" \n",
" , , , \n"
]
}
],
"source": [
"import random\n",
"\n",
"width = 10\n",
"height = 10\n",
"drops = [',',' ',' ',' ']\n",
"rain = ''\n",
"\n",
"for x in range(width):\n",
" for y in range(height):\n",
" rain += random.choice(drops)\n",
" print(rain)\n",
" rain = ''"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

@ -0,0 +1,422 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 51,
"metadata": {},
"outputs": [],
"source": [
"import random\n",
"import nltk\n",
"from newsapi import NewsApiClient\n",
"import pprint\n",
"\n",
"pp = pprint.PrettyPrinter(indent=3)"
]
},
{
"cell_type": "code",
"execution_count": 53,
"metadata": {},
"outputs": [],
"source": [
"newsapi = NewsApiClient(api_key='0c00356f65df431ab394d179292075bd')\n",
"top0 = newsapi.get_everything(q='translation', language='en') #get json from NewsAPI\n",
"top1 = newsapi.get_everything(q='futuro', language='it')\n",
"top2 = newsapi.get_everything(q='futuro', language='es')\n",
"top3 = newsapi.get_everything(q='future', language='fr')\n",
"\n",
"#pp.pprint(top0)"
]
},
{
"cell_type": "code",
"execution_count": 256,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'NNP': ['Appl…'], 'NN': ['story:'], 'VBZ': ['is'], 'VBN': ['been'], 'JJ': ['big'], 'NNS': ['employees'], 'IN': ['for'], 'CC': ['and'], 'JJR': ['more'], 'VBG': ['closing'], 'TO': ['to'], 'VB': ['fight'], 'DT': ['The'], 'PRP': ['it'], 'MD': ['can'], 'WDT': ['which'], 'VBD': ['used'], 'PRP$': ['your'], 'CD': ['2020.'], 'RB': ['embarrassingly'], 'RP': ['out'], 'VBP': ['come'], 'RBR': ['earlier'], 'WRB': ['when'], 'PDT': ['all'], 'WP': ['who'], 'EX': ['There'], 'NNPS': ['Republicans']}\n"
]
}
],
"source": [
"articles0 = top0['articles'] #get articles summary from NewsAPI\n",
"articles1 = top1['articles']\n",
"articles2 = top2['articles']\n",
"articles3 = top3['articles']\n",
"\n",
"dtot0 = ''\n",
"dtot1 = ''\n",
"dtot2 = ''\n",
"dtot3 = ''\n",
"\n",
"for x in range(20):\n",
" a0 = articles0[x] #get articles' descriptions and store them to dtot\n",
" a1 = articles1[x]\n",
" a2 = articles2[x]\n",
" a3 = articles3[x]\n",
" d0 = a0['description']\n",
" d1 = a1['description']\n",
" d2 = a2['description']\n",
" d3 = a3['description']\n",
" dtot0 += d0\n",
" dtot1 += d1\n",
" dtot2 += d2\n",
" dtot3 += d3\n",
" \n",
"dtot0 = dtot0.split()\n",
"dtot1 = dtot1.split()\n",
"dtot2 = dtot2.split()\n",
"dtot3 = dtot3.split()\n",
"\n",
"tagged0 = nltk.pos_tag(dtot0) #POSing the descriptions\n",
"tagged1 = nltk.pos_tag(dtot1) #POSing the descriptions\n",
"tagged2 = nltk.pos_tag(dtot2) #POSing the descriptions\n",
"tagged3 = nltk.pos_tag(dtot3) #POSing the descriptions\n",
"\n",
"\n",
"\n",
"#HERE THE WTF\n",
"#HOW CAN I APPEND TO THE DICTIONARY (i0) _ALL_ THE WORDS? IT APPENDS ONLY THE FIRSTS ONES\n",
"#tried in different ways but :(\n",
"\n",
"t0 = []\n",
"i0 = {}\n",
" \n",
"for a, b in tagged0:\n",
" if a not in b:\n",
" i0.update({b:[a]})\n",
" \n",
" \n",
"\n",
"for q, k in tagged0:\n",
" if k not in i0:\n",
" t0.append((k, s))\n",
" i0[k] = '[]'\n",
" \n",
" \n",
"print(i0)"
]
},
{
"cell_type": "code",
"execution_count": 270,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'NNP': ['Appl…'],\n",
" 'NN': ['story:'],\n",
" 'VBZ': ['is'],\n",
" 'VBN': ['been'],\n",
" 'JJ': ['big'],\n",
" 'NNS': ['employees'],\n",
" 'IN': ['for'],\n",
" 'CC': ['and'],\n",
" 'JJR': ['more'],\n",
" 'VBG': ['closing'],\n",
" 'TO': ['to'],\n",
" 'VB': ['fight'],\n",
" 'DT': ['The'],\n",
" 'PRP': ['it'],\n",
" 'MD': ['can'],\n",
" 'WDT': ['which'],\n",
" 'VBD': ['used'],\n",
" 'PRP$': ['your'],\n",
" 'CD': ['2020.'],\n",
" 'RB': ['embarrassingly'],\n",
" 'RP': ['out'],\n",
" 'VBP': ['come'],\n",
" 'RBR': ['earlier'],\n",
" 'WRB': ['when'],\n",
" 'PDT': ['all'],\n",
" 'WP': ['who'],\n",
" 'EX': ['There'],\n",
" 'NNPS': ['Republicans']}"
]
},
"execution_count": 270,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\n",
"d1 = ''\n",
"for a,b in tagged0:\n",
" d1 = {b : [a] for a,b in tagged0}\n",
" if a not in b:\n",
" d1.update({b:[a]})\n",
" \n",
" \n",
" \n",
" \n",
"d1"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 271,
"metadata": {},
"outputs": [],
"source": [
"#This is for prepare a grammar constructio based on a picked random description from the original NewsAPI json\n",
"s = ' '\n",
"r = random.randrange(0,19)\n",
"a_pos = articles[r]\n",
"cont_pos= a_pos['description']\n",
"cont_pos = cont_pos.split()\n",
"tag_cont = nltk.pos_tag(cont_pos)\n",
"\n",
"dat = {}\n",
"\n",
"for word, tag in tag_cont:\n",
" dat[tag] = word\n",
" \n",
"keys = dat.keys()\n",
"\n",
"output = \" + s + \".join([pos for pos in keys])"
]
},
{
"cell_type": "code",
"execution_count": 272,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'NNP + s + NN + s + VBZ + s + VBN + s + JJ + s + NNS + s + IN + s + CC + s + JJR + s + VBG + s + TO + s + VB + s + DT + s + PRP + s + MD'"
]
},
"execution_count": 272,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"output"
]
},
{
"cell_type": "code",
"execution_count": 273,
"metadata": {},
"outputs": [],
"source": [
"####################################################################################################################################################################################"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 293,
"metadata": {},
"outputs": [],
"source": [
"res = ['The cable who is of technologies are going to be new Read also and','''no world's who tells from rules are figuring to use near Broomstick, ahead or''',\n",
"'the mechanism who seeks as owners are figuring to control new Science, again and',\n",
"'the presidency, who has in works carry flying to build hard Harry ever and',\n",
"'a repository. who PlantsPhysicists about microswimmers deliver... going to act it. Harry likely But',\n",
"'the lecture who PlantsPhysicists of issues deliver... flailing to be different Fluora, up and',\n",
"'a cable who has in poets think averting to be electric CEO half-jokingly and',\n",
"'the male who fits of submissions are helping to use fellow Texas half-jokingly and',\n",
"'the toy who is of hed its helping to get electric Black much and',\n",
"'a unease who represents orgasm. sensors think averting to act free PS5 also and',\n",
"'the more...Jennifer who fits of reveals believe offering to streaming. major Fluora, actually and',\n",
"'the sanitizer who represents in reorganizations are figuring to perform adjustable Tech, likely or']\n"
]
},
{
"cell_type": "code",
"execution_count": 294,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['The cable who is of technologies are going to be new Read also and',\n",
" \"no world's who tells from rules are figuring to use near Broomstick, ahead or\",\n",
" 'the mechanism who seeks as owners are figuring to control new Science, again and',\n",
" 'the presidency, who has in works carry flying to build hard Harry ever and',\n",
" 'a repository. who PlantsPhysicists about microswimmers deliver... going to act it. Harry likely But',\n",
" 'the lecture who PlantsPhysicists of issues deliver... flailing to be different Fluora, up and',\n",
" 'a cable who has in poets think averting to be electric CEO half-jokingly and',\n",
" 'the male who fits of submissions are helping to use fellow Texas half-jokingly and',\n",
" 'the toy who is of hed its helping to get electric Black much and',\n",
" 'a unease who represents orgasm. sensors think averting to act free PS5 also and',\n",
" 'the more...Jennifer who fits of reveals believe offering to streaming. major Fluora, actually and',\n",
" 'the sanitizer who represents in reorganizations are figuring to perform adjustable Tech, likely or']"
]
},
"execution_count": 294,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"res"
]
},
{
"cell_type": "code",
"execution_count": 447,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<head>harset=utf-8</head>\n"
]
}
],
"source": [
"export = 'news.txt'\n",
"with open(export, 'w') as export:\n",
" print('<head>harset=utf-8</head>')\n",
" print('<h1>News from the future</h1>', file=export)\n",
" print('<br><br><br><br><br><br><br><br><br><br><br><br>', file = export)\n",
" for x in range(len(res)):\n",
" print(f'''{res[x].lower().capitalize()}.\n",
" ''',file=export)\n",
" print('<br><br><br><br><br><br><br><br><br><br><br><br><br><br>', file = export)"
]
},
{
"cell_type": "code",
"execution_count": 448,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Fontconfig warning: ignoring UTF-8: not a valid region tag\n"
]
}
],
"source": [
"!pandoc news.txt | weasyprint -s css.css - newsfromthefuture.pdf"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 411,
"metadata": {},
"outputs": [],
"source": [
"a_pos = open('language.txt').read()\n",
"cont_pos = a_pos.split()\n",
"tag_cont = nltk.pos_tag(cont_pos)"
]
},
{
"cell_type": "code",
"execution_count": 321,
"metadata": {},
"outputs": [],
"source": [
"dat = {}\n",
"\n",
"for word, tag in tag_cont:\n",
" dat[tag] = word\n",
" \n",
"keys = dat.keys()\n",
"\n",
"output = \" + s + \".join([pos for pos in keys])"
]
},
{
"cell_type": "code",
"execution_count": 330,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'Led and broom believe likely American of can test has called sensors the which There smallest 300 selected They who They to'"
]
},
"execution_count": 330,
"metadata": {},
"output_type": "execute_result"
}
],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

@ -0,0 +1,485 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import random\n",
"import nltk\n",
"from newsapi import NewsApiClient\n",
"s = ' '"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"newsapi = NewsApiClient(api_key='0c00356f65df431ab394d179292075bd')\n",
"top0 = newsapi.get_everything(q='future', language='en')\n",
"top1 = newsapi.get_everything(q='futuro', language='it')\n",
"top2 = newsapi.get_everything(q='futuro', language='es')\n",
"top3 = newsapi.get_everything(q='future', language='fr')"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"articles = top0['articles']\n",
"\n",
"a_pos = articles[14]\n",
"cont_pos= a_pos['description']\n",
"cont_pos = cont_pos.split()\n",
"tag_cont = nltk.pos_tag(cont_pos)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"dtot = ''\n",
"\n",
"for x in range(20):\n",
" a = articles[x]\n",
" d = a['description']\n",
" dtot += d\n",
" \n",
"dtot = dtot.split()\n",
"\n",
"tagged = nltk.pos_tag(dtot)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"dat = {}\n",
"\n",
"for word, tag in tag_cont:\n",
" dat[tag] = word\n",
" \n",
"keys = dat.keys()\n",
"\n",
"output = \" + s + \".join([pos for pos in keys])"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"dataset = {}\n",
"\n",
"def my_dict(gr,data,grlista):\n",
"\n",
" data = {}\n",
"\n",
" for word, tag in tagged:\n",
" dataset[tag] = word\n",
" if tag == gr:\n",
" data[tag] = word\n",
" grlista.append(word)\n",
" \n",
" \n",
"CClista = []\n",
"my_dict('CC','dataCC',CClista)\n",
"\n",
"CDlista = []\n",
"my_dict('CD','dataCD',CDlista)\n",
"\n",
"\n",
"DTlista = []\n",
"my_dict('DT','dataDT',DTlista)\n",
"\n",
"\n",
"EXlista = []\n",
"my_dict('EX','dataEX',EXlista)\n",
"\n",
"\n",
"FWlista = []\n",
"my_dict('FW','dataFW',FWlista)\n",
"\n",
"INlista = []\n",
"my_dict('IN','dataIN',INlista)\n",
"\n",
"\n",
"JJlista = []\n",
"my_dict('JJ','dataJJ',JJlista)\n",
"\n",
"JJRlista = []\n",
"my_dict('JJR','dataJJR',JJRlista)\n",
"\n",
"\n",
"\n",
"JJSlista = []\n",
"my_dict('JJS','dataJJS',JJSlista)\n",
"\n",
"LSlista = []\n",
"my_dict('LS','dataLS',LSlista)\n",
"\n",
"\n",
"MDlista = []\n",
"my_dict('MD','dataMD',MDlista)\n",
"\n",
"\n",
"NNlista = []\n",
"my_dict('NN','dataNN',NNlista)\n",
"\n",
"\n",
"NNSlista = []\n",
"my_dict('NNS','dataNNS',NNSlista)\n",
"\n",
"\n",
"NNPlista = []\n",
"my_dict('NNP','dataNNP',NNPlista)\n",
"\n",
"\n",
"PDTlista = []\n",
"my_dict('PDT','dataPDT',PDTlista)\n",
"\n",
"POSlista = []\n",
"my_dict('POS','dataPOS',POSlista)\n",
"\n",
"PRPlista = []\n",
"my_dict('PRP','dataPRP',PRPlista)\n",
"\n",
"\n",
"RBlista = []\n",
"my_dict('RB','dataRB',RBlista)\n",
"RB = random.choice(RBlista)\n",
"\n",
"\n",
"RBRlista = []\n",
"my_dict('RBR','dataRBR',RBRlista)\n",
"\n",
"\n",
"RBSlista = []\n",
"my_dict('RBS','dataRBS',RBSlista)\n",
"\n",
"\n",
"RPlista = []\n",
"my_dict('RP','dataRP',RPlista)\n",
"\n",
"\n",
"SYMlista = []\n",
"my_dict('SYM','dataSYM',SYMlista)\n",
"\n",
"\n",
"TOlista = []\n",
"my_dict('TO','dataTO',TOlista)\n",
"\n",
"\n",
"UHlista = []\n",
"my_dict('UH','dataUH',UHlista)\n",
"\n",
"\n",
"VBlista = []\n",
"my_dict('VB','dataVB',VBlista)\n",
"\n",
"\n",
"VBDlista = []\n",
"my_dict('VBD','dataVBD',VBDlista)\n",
"\n",
"VBGlista = []\n",
"my_dict('VBG','dataVBG',VBGlista)\n",
"\n",
"VBNlista = []\n",
"my_dict('VBN','dataVBN',VBNlista)\n",
"\n",
"\n",
"VBPlista = []\n",
"my_dict('VBP','dataVBP',VBPlista)\n",
"\n",
"\n",
"VBZlista = []\n",
"my_dict('VBZ','dataVBZ',VBZlista)\n",
"\n",
"\n",
"WDTlista = []\n",
"my_dict('WDT','dataWDT',WDTlista)\n",
"\n",
"\n",
"WPlista = []\n",
"my_dict('WP','dataWP',WPlista)\n",
"\n",
"\n",
"WRBlista = []\n",
"my_dict('WRB','dataWRB',WRBlista)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"ename": "IndexError",
"evalue": "Cannot choose from an empty sequence",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-8-4ed1abd4d748>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 31\u001b[0m \u001b[0mWDT\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mrandom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mchoice\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mWDTlista\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 32\u001b[0m \u001b[0mWP\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mrandom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mchoice\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mWPlista\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 33\u001b[0;31m \u001b[0mWRB\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mrandom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mchoice\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mWRBlista\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/random.py\u001b[0m in \u001b[0;36mchoice\u001b[0;34m(self, seq)\u001b[0m\n\u001b[1;32m 288\u001b[0m \u001b[0mi\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_randbelow\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mseq\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 289\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 290\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mIndexError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'Cannot choose from an empty sequence'\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 291\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mseq\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 292\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mIndexError\u001b[0m: Cannot choose from an empty sequence"
]
}
],
"source": [
"CC = random.choice(CClista)\n",
"CD = random.choice(CDlista)\n",
"DT = random.choice(DTlista)\n",
"EX = random.choice(EXlista)\n",
"#FW = random.choice(FWlista)\n",
"IN = random.choice(INlista)\n",
"JJ = random.choice(JJlista)\n",
"JJR = random.choice(JJRlista)\n",
"JJS = random.choice(JJSlista)\n",
"#LS = random.choice(LSlista)\n",
"MD = random.choice(MDlista)\n",
"NN = random.choice(NNlista)\n",
"NNS = random.choice(NNSlista)\n",
"NNP = random.choice(NNPlista)\n",
"PDT = random.choice(PDTlista)\n",
"#POS = random.choice(POSlista)\n",
"PRP = random.choice(PRPlista)\n",
"RB = random.choice(RBlista)\n",
"#RBR = random.choice(RBRlista)\n",
"#RBS = random.choice(RBSlista)\n",
"RP = random.choice(RPlista)\n",
"#SYM = random.choice(SYMlista)\n",
"TO = random.choice(TOlista)\n",
"#UH = random.choice(UHlista)\n",
"VB = random.choice(VBlista)\n",
"VBD = random.choice(VBDlista)\n",
"VBG = random.choice(VBGlista)\n",
"VBN = random.choice(VBNlista)\n",
"VBP = random.choice(VBPlista)\n",
"VBZ = random.choice(VBZlista)\n",
"WDT = random.choice(WDTlista)\n",
"WP = random.choice(WPlista)\n",
"WRB = random.choice(WRBlista)\n"
]
},
{
"cell_type": "code",
"execution_count": 130,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DT + s + NNS + s + VBN + s + IN + s + VBG + s + NN + s + WDT + s + VBZ + s + JJ + s + EX + s + VBP + s + CD + s + PRP + s + NNP + s + CC\n"
]
}
],
"source": [
"print(output)"
]
},
{
"cell_type": "code",
"execution_count": 131,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'the microswimmers confirmed with tearing software that represents Mashable There its 2018. them Mashable or'"
]
},
"execution_count": 131,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"DT + s + NNS + s + VBN + s + IN + s + VBG + s + NN + s + WDT + s + VBZ + s + JJ + s + EX + s + VBP + s + CD + s + PRP + s + NNP + s + CC\n"
]
},
{
"cell_type": "code",
"execution_count": 293,
"metadata": {},
"outputs": [],
"source": [
"res = ['The cable who is of technologies are going to be new Read also and','''no world's who tells from rules are figuring to use near Broomstick, ahead or''',\n",
"'the mechanism who seeks as owners are figuring to control new Science, again and',\n",
"'the presidency, who has in works carry flying to build hard Harry ever and',\n",
"'a repository. who PlantsPhysicists about microswimmers deliver... going to act it. Harry likely But',\n",
"'the lecture who PlantsPhysicists of issues deliver... flailing to be different Fluora, up and',\n",
"'a cable who has in poets think averting to be electric CEO half-jokingly and',\n",
"'the male who fits of submissions are helping to use fellow Texas half-jokingly and',\n",
"'the toy who is of hed its helping to get electric Black much and',\n",
"'a unease who represents orgasm. sensors think averting to act free PS5 also and',\n",
"'the more...Jennifer who fits of reveals believe offering to streaming. major Fluora, actually and',\n",
"'the sanitizer who represents in reorganizations are figuring to perform adjustable Tech, likely or']\n"
]
},
{
"cell_type": "code",
"execution_count": 294,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['The cable who is of technologies are going to be new Read also and',\n",
" \"no world's who tells from rules are figuring to use near Broomstick, ahead or\",\n",
" 'the mechanism who seeks as owners are figuring to control new Science, again and',\n",
" 'the presidency, who has in works carry flying to build hard Harry ever and',\n",
" 'a repository. who PlantsPhysicists about microswimmers deliver... going to act it. Harry likely But',\n",
" 'the lecture who PlantsPhysicists of issues deliver... flailing to be different Fluora, up and',\n",
" 'a cable who has in poets think averting to be electric CEO half-jokingly and',\n",
" 'the male who fits of submissions are helping to use fellow Texas half-jokingly and',\n",
" 'the toy who is of hed its helping to get electric Black much and',\n",
" 'a unease who represents orgasm. sensors think averting to act free PS5 also and',\n",
" 'the more...Jennifer who fits of reveals believe offering to streaming. major Fluora, actually and',\n",
" 'the sanitizer who represents in reorganizations are figuring to perform adjustable Tech, likely or']"
]
},
"execution_count": 294,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"res"
]
},
{
"cell_type": "code",
"execution_count": 447,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<head>harset=utf-8</head>\n"
]
}
],
"source": [
"export = 'news.txt'\n",
"with open(export, 'w') as export:\n",
" print('<head>harset=utf-8</head>')\n",
" print('<h1>News from the future</h1>', file=export)\n",
" print('<br><br><br><br><br><br><br><br><br><br><br><br>', file = export)\n",
" for x in range(len(res)):\n",
" print(f'''{res[x].lower().capitalize()}.\n",
" ''',file=export)\n",
" print('<br><br><br><br><br><br><br><br><br><br><br><br><br><br>', file = export)"
]
},
{
"cell_type": "code",
"execution_count": 448,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Fontconfig warning: ignoring UTF-8: not a valid region tag\n"
]
}
],
"source": [
"!pandoc news.txt | weasyprint -s css.css - newsfromthefuture.pdf"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 411,
"metadata": {},
"outputs": [],
"source": [
"a_pos = open('language.txt').read()\n",
"cont_pos = a_pos.split()\n",
"tag_cont = nltk.pos_tag(cont_pos)"
]
},
{
"cell_type": "code",
"execution_count": 321,
"metadata": {},
"outputs": [],
"source": [
"dat = {}\n",
"\n",
"for word, tag in tag_cont:\n",
" dat[tag] = word\n",
" \n",
"keys = dat.keys()\n",
"\n",
"output = \" + s + \".join([pos for pos in keys])"
]
},
{
"cell_type": "code",
"execution_count": 330,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'Led and broom believe likely American of can test has called sensors the which There smallest 300 selected They who They to'"
]
},
"execution_count": 330,
"metadata": {},
"output_type": "execute_result"
}
],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

Binary file not shown.

@ -0,0 +1,261 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 289,
"metadata": {},
"outputs": [],
"source": [
"import random\n",
"\n",
"width = 82 #canvas measures\n",
"height = 74"
]
},
{
"cell_type": "code",
"execution_count": 290,
"metadata": {},
"outputs": [],
"source": [
"sentence = '🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit=1000000.0 (bytes/sec) NotebookApp.rate_limit_window=3.0 (secs)'\n",
"sentence = sentence.replace('secs','sex🍬').replace('0', '😡') #replace stuff with funny stuff\n",
"lines = ''\n",
"lista = []"
]
},
{
"cell_type": "code",
"execution_count": 291,
"metadata": {},
"outputs": [],
"source": [
"for x in range(width): #it would be any number since the counter will break the characters\n",
" lines += sentence #fill the lines with the text\n",
" lines += ' ' * (x+25) #and also fill with big aesthetic spaces which will create a beautiful wave"
]
},
{
"cell_type": "code",
"execution_count": 292,
"metadata": {},
"outputs": [],
"source": [
"tmp_line = '' \n",
"\n",
"counter = 0\n",
"\n",
"for character in lines:\n",
" if counter == height:\n",
" break\n",
" elif len(tmp_line) < width:\n",
" tmp_line += character\n",
" else:\n",
" lista.append(tmp_line)\n",
" tmp_line = ''\n",
" counter += 1\n"
]
},
{
"cell_type": "code",
"execution_count": 293,
"metadata": {},
"outputs": [],
"source": [
"patch = \"\\n\".join(lista) #creates effectivly the quilt computing the charachters"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 294,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"6141"
]
},
"execution_count": 294,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"f = 'patcherico.txt' #export the patch for the quilt in .txt\n",
"export = open(f, 'w')\n",
"export.write(patch)"
]
},
{
"cell_type": "code",
"execution_count": 297,
"metadata": {},
"outputs": [],
"source": [
"with open(\"patcherico.txt\") as proto: #open the external .txt\n",
" proto = proto.read()"
]
},
{
"cell_type": "code",
"execution_count": 298,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec\n",
" NotebookApp.rate_limit_window=3.😡 (sex🍬) 🗣 IOPub data rat\n",
" exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rat\n",
"_limit_window=3.😡 (sex🍬) 🗣 IOPub data rate exceeded. Note\n",
"ookApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3\n",
"😡 (sex🍬) 🗣 IOPub data rate exceeded. NotebookApp.iopub_d\n",
"ta_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit\n",
"1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (b\n",
"tes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) 🗣 I\n",
"Pub data rate exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) No\n",
"ebookApp.rate_limit_window=3.😡 (sex🍬) 🗣 IOPub data r\n",
"te exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.r\n",
"te_limit_window=3.😡 (sex🍬) 🗣 IOPub data rate exceed\n",
"d. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_\n",
"indow=3.😡 (sex🍬) 🗣 IOPub data rate exceeded. Noteb\n",
"okApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.\n",
" (sex🍬) 🗣 IOPub data rate exceeded. NotebookApp.i\n",
"pub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬)\n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_da\n",
"a_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rat\n",
"_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_lim\n",
"t=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit=1\n",
"😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡\n",
"😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡\n",
".😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡😡\n",
"😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡😡\n",
"😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡\n",
".😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡\n",
"😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit=1\n",
"😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_lim\n",
"t=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rat\n",
"_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_da\n",
"a_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.i\n",
"pub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬)\n",
" 🗣 IOPub data rate exceeded. Noteb\n",
"okApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.\n",
" (sex🍬) 🗣 IOPub data rate exceed\n",
"d. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_\n",
"indow=3.😡 (sex🍬) 🗣 IOPub data r\n",
"te exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.r\n",
"te_limit_window=3.😡 (sex🍬) 🗣 I\n",
"Pub data rate exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) No\n",
"ebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (b\n",
"tes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit\n",
"1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_d\n",
"ta_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. Note\n",
"ookApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3\n",
"😡 (sex🍬) 🗣 IOPub data rat\n",
" exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec) NotebookApp.rat\n",
"_limit_window=3.😡 (sex🍬) \n",
"🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit=1😡😡😡😡😡😡.😡 (bytes/sec\n",
" NotebookApp.rate_limit_window=3.😡 (sex🍬) \n",
" 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rate_limit=1😡\n",
"😡😡😡😡.😡 (bytes/sec) NotebookApp.rate_limit_window=3.😡 (sex🍬) \n"
]
}
],
"source": [
"print(patch)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
" "
]
},
{
"cell_type": "code",
"execution_count": 252,
"metadata": {},
"outputs": [],
"source": [
"frase = ' 🗣 IOPub data rate exceeded. NotebookApp.iopub_data_rat'"
]
},
{
"cell_type": "code",
"execution_count": 253,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"82\n"
]
}
],
"source": [
"print(len(frase))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

@ -0,0 +1,237 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import random"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"sentence = 'there are more than six thousand nine hundred more languages across the world'.upper() #makes the sentence caps-locked\n",
"words = sentence.split(' ') #split the sentence (taken from \"Practical Vision\") in a list of words"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"width = 82 #canvas measures\n",
"height = 74"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"spaces = ''\n",
"lista = []\n",
"br = [' ','. ']\n",
"\n",
"for x in range(999): \n",
" rwords = random.choices(words, weights=(8,4,5,4,8,15,9,20,4,8,6,3,10)) #pick randomly words from the list 'word' with different random ratio\n",
" spaces += rwords[0] #fill the canvas\n",
" rbr = random.choices(br, weights=(70,10)) #pick a dot or a blank space\n",
" spaces += rbr[0] #fill the canvas\n",
"\n",
" \n",
"tmp_line = '' #here quilting time\n",
"\n",
"counter = 0\n",
"\n",
"for character in spaces:\n",
" if counter == height: #it stops when rows = 74\n",
" break\n",
" elif len(tmp_line) < width:\n",
" tmp_line += character #it stops when charachters per line = 82\n",
" else:\n",
" tmp_line += character\n",
" lista.append(tmp_line)\n",
" tmp_line = ''\n",
" counter += 1\n",
" \n"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"patch = \"\\n\".join(lista) #creates effectivly the quilt computing the charachters"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"THAN NINE THE. WORLD MORE HUNDRED HUNDRED HUNDRED NINE WORLD HUNDRED SIX \n",
" MORE WORLD THOUSAND NINE ARE ARE HUNDRED HUNDRED NINE THOUSAND. THE THOU\n",
"SAND THOUSAND THERE SIX LANGUAGES THOUSAND NINE THE WORLD WORLD HUNDRED \n",
"SIX. LANGUAGES LANGUAGES THOUSAND SIX HUNDRED THOUSAND NINE THOUSAND HUNDRE\n",
"D HUNDRED HUNDRED THERE. MORE THAN. THAN HUNDRED NINE SIX THOUSAND HUNDRED\n",
" NINE SIX HUNDRED. WORLD HUNDRED ARE NINE SIX. THAN NINE SIX NINE. NINE \n",
"MORE HUNDRED. LANGUAGES WORLD HUNDRED THOUSAND HUNDRED NINE SIX NINE MORE \n",
" THOUSAND HUNDRED. THOUSAND. NINE NINE NINE. ACROSS THERE SIX HUNDRED MORE \n",
"HUNDRED WORLD. NINE THAN NINE ACROSS THOUSAND NINE MORE HUNDRED SIX WORLD\n",
" ACROSS THAN LANGUAGES THOUSAND THOUSAND MORE MORE ARE THERE WORLD. LANGU\n",
"AGES. NINE NINE NINE HUNDRED HUNDRED THOUSAND WORLD MORE ACROSS THERE THO\n",
"USAND THOUSAND THOUSAND HUNDRED LANGUAGES THERE LANGUAGES THOUSAND THE SIX\n",
" THOUSAND MORE NINE NINE HUNDRED NINE HUNDRED WORLD MORE NINE THOUSAND \n",
"HUNDRED ACROSS NINE THOUSAND THAN THAN THOUSAND HUNDRED THAN THERE HUNDRE\n",
"D HUNDRED LANGUAGES THERE MORE NINE MORE LANGUAGES SIX NINE MORE NINE M\n",
"ORE HUNDRED HUNDRED WORLD HUNDRED ACROSS THE. ARE HUNDRED NINE MORE HUNDR\n",
"ED HUNDRED LANGUAGES WORLD NINE NINE MORE WORLD THOUSAND. WORLD THOUSAND \n",
"THERE ARE THOUSAND MORE SIX THOUSAND. NINE HUNDRED. WORLD HUNDRED THERE. WO\n",
"RLD. HUNDRED LANGUAGES SIX ACROSS NINE. THERE THE THOUSAND LANGUAGES WORLD \n",
" HUNDRED. ARE LANGUAGES WORLD. THOUSAND. HUNDRED HUNDRED THERE THERE. THOUSAND\n",
" THAN MORE NINE. ACROSS MORE WORLD THOUSAND ARE THOUSAND HUNDRED THOUSAND\n",
" SIX HUNDRED THERE ARE HUNDRED ARE ARE. HUNDRED NINE THERE WORLD. HUNDRED\n",
". HUNDRED THOUSAND ACROSS MORE ACROSS HUNDRED NINE SIX NINE THE LANGUAGES\n",
" HUNDRED ACROSS. SIX SIX NINE WORLD SIX MORE THOUSAND THE THOUSAND LANGU\n",
"AGES THOUSAND WORLD NINE HUNDRED WORLD SIX HUNDRED MORE THOUSAND HUNDRED \n",
" THAN. HUNDRED LANGUAGES ACROSS LANGUAGES MORE NINE HUNDRED MORE THOUSAND. \n",
"THAN. ARE. THOUSAND THOUSAND HUNDRED THOUSAND MORE THOUSAND. HUNDRED NINE WO\n",
"RLD THERE THOUSAND ACROSS SIX WORLD THOUSAND THOUSAND HUNDRED ARE THAN. N\n",
"INE THERE HUNDRED. SIX THOUSAND SIX. MORE THOUSAND. ACROSS. HUNDRED HUNDRED \n",
"LANGUAGES. THOUSAND THAN SIX. HUNDRED WORLD HUNDRED THOUSAND SIX HUNDRED TH\n",
"AN ARE THERE LANGUAGES WORLD THOUSAND WORLD THERE WORLD HUNDRED. THAN THE\n",
"RE. MORE NINE THERE WORLD SIX THOUSAND WORLD HUNDRED. SIX NINE HUNDRED HU\n",
"NDRED HUNDRED THOUSAND ARE HUNDRED ARE. ACROSS. LANGUAGES MORE THERE HUNDRE\n",
"D THOUSAND NINE THERE. HUNDRED SIX. WORLD WORLD SIX THERE THOUSAND NINE M\n",
"ORE THOUSAND THAN. WORLD. HUNDRED ACROSS THOUSAND ACROSS THERE. WORLD THAN \n",
"MORE SIX. THAN WORLD SIX NINE MORE THOUSAND THOUSAND MORE THE THOUSAND T\n",
"HOUSAND THOUSAND NINE MORE LANGUAGES SIX. THOUSAND MORE THOUSAND THE NINE \n",
" THERE HUNDRED THERE WORLD SIX ARE ACROSS MORE THOUSAND SIX THOUSAND THO\n",
"USAND HUNDRED THOUSAND NINE MORE SIX HUNDRED. MORE. LANGUAGES LANGUAGES THE\n",
" THOUSAND. THAN HUNDRED THOUSAND THOUSAND THOUSAND THOUSAND HUNDRED SIX AR\n",
"E THERE. MORE HUNDRED HUNDRED THOUSAND MORE THE THERE ACROSS THERE LANGUA\n",
"GES SIX SIX WORLD WORLD LANGUAGES WORLD THERE THOUSAND ARE. THOUSAND. HUND\n",
"RED THOUSAND LANGUAGES LANGUAGES HUNDRED THOUSAND THOUSAND NINE SIX THAN. \n",
"THOUSAND THE THAN HUNDRED SIX ACROSS HUNDRED MORE. NINE. THAN LANGUAGES MO\n",
"RE HUNDRED NINE HUNDRED THERE MORE NINE. WORLD HUNDRED HUNDRED ACROSS HUN\n",
"DRED NINE WORLD SIX LANGUAGES. THERE HUNDRED THOUSAND THERE THE SIX. LANGU\n",
"AGES WORLD THOUSAND MORE HUNDRED THOUSAND HUNDRED HUNDRED MORE SIX THOUSA\n",
"ND. WORLD ACROSS LANGUAGES THOUSAND WORLD ACROSS. MORE ACROSS NINE. MORE MO\n",
"RE THOUSAND NINE WORLD LANGUAGES SIX HUNDRED NINE NINE HUNDRED LANGUAGES \n",
" MORE THOUSAND THERE. SIX THAN WORLD MORE. THE THERE MORE THERE THERE THO\n",
"USAND. MORE. WORLD NINE NINE THOUSAND THOUSAND. SIX LANGUAGES HUNDRED ARE W\n",
"ORLD ACROSS SIX THOUSAND THERE HUNDRED NINE THERE SIX. THOUSAND THOUSAND \n",
"THOUSAND NINE THOUSAND MORE LANGUAGES. LANGUAGES THOUSAND THOUSAND. WORLD NI\n",
"NE ACROSS HUNDRED NINE LANGUAGES. ACROSS HUNDRED. THOUSAND HUNDRED SIX HUND\n",
"RED NINE MORE LANGUAGES ACROSS WORLD HUNDRED NINE ACROSS ACROSS HUNDRED \n",
"NINE MORE HUNDRED NINE HUNDRED HUNDRED LANGUAGES. SIX LANGUAGES WORLD SIX \n",
" HUNDRED ACROSS THOUSAND SIX LANGUAGES HUNDRED. THE THOUSAND THERE THERE L\n",
"ANGUAGES ACROSS THOUSAND THE SIX WORLD ACROSS HUNDRED THERE. THOUSAND THOU\n",
"SAND THOUSAND WORLD ARE. MORE HUNDRED HUNDRED SIX SIX HUNDRED WORLD WORLD\n",
" MORE. LANGUAGES LANGUAGES THOUSAND THERE. THOUSAND THOUSAND THE THERE HUND\n",
"RED SIX THE WORLD. THE THE LANGUAGES HUNDRED HUNDRED WORLD ARE SIX HUNDR\n",
"ED SIX SIX LANGUAGES HUNDRED MORE WORLD HUNDRED HUNDRED HUNDRED WORLD HU\n",
"NDRED NINE THOUSAND SIX ARE WORLD THERE ACROSS THOUSAND. THERE SIX HUNDRE\n",
"D THAN LANGUAGES. ACROSS THOUSAND SIX THE WORLD LANGUAGES MORE THOUSAND H\n",
"UNDRED HUNDRED THERE WORLD THOUSAND THOUSAND ACROSS ARE WORLD. THOUSAND TH\n",
"E MORE THOUSAND THERE. THOUSAND THOUSAND WORLD LANGUAGES LANGUAGES. SIX LAN\n",
"GUAGES THAN. NINE NINE. NINE HUNDRED THAN MORE SIX MORE HUNDRED THOUSAND \n",
"HUNDRED THOUSAND THAN THERE THOUSAND HUNDRED ACROSS LANGUAGES NINE THAN M\n",
"ORE LANGUAGES MORE THOUSAND. LANGUAGES LANGUAGES THOUSAND HUNDRED HUNDRED M\n",
"ORE NINE. THOUSAND SIX HUNDRED THOUSAND THOUSAND THAN HUNDRED LANGUAGES MO\n",
"RE THAN THOUSAND THOUSAND THAN WORLD HUNDRED. SIX MORE SIX MORE ACROSS L\n",
"ANGUAGES THOUSAND SIX WORLD THAN NINE HUNDRED HUNDRED LANGUAGES LANGUAGES \n",
" WORLD THAN HUNDRED HUNDRED LANGUAGES ACROSS HUNDRED LANGUAGES NINE ARE T\n",
"HOUSAND THOUSAND THOUSAND. HUNDRED HUNDRED THOUSAND ACROSS THERE THERE NINE\n"
]
}
],
"source": [
"print(patch)\n"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"7825"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"f = 'patcherico.txt' #export the patch for the quilt in .txt\n",
"export = open(f, 'w')\n",
"export.write(patch)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

@ -0,0 +1,999 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"import nltk\n",
"import random"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"from urllib.request import urlopen"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"from nltk import word_tokenize"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"url = 'https://git.xpub.nl/XPUB/S13-Words-for-the-Future-notebooks/raw/branch/master/txt/words-for-the-future/PRACTICAL-VISION.txt'"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
"vision = urlopen(url).read().decode('utf-8')"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"tokens = word_tokenize(vision)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
"vision = nltk.text.Text(tokens)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"width = 82 #canvas measures\n",
"height = 74"
]
},
{
"cell_type": "code",
"execution_count": 87,
"metadata": {},
"outputs": [],
"source": [
"#left = line.left_print.lower() #.replace('.','').replace(',','').replace(' ',' ')\n",
"#middle = line.query.upper()\n",
"#right = line.right_print.lower() #.replace('.','').replace(',','').replace(' ',' ')\n",
"\n",
"#lang=[]\n",
"\n",
"#l = [left,' ',middle]\n",
"#m = [middle,' ',right]\n",
"#r = [right, ' ',left]\n",
"\n",
"\n",
"lista = [] \n",
"tmp_line = ''\n",
"\n",
"counter = 0\n",
"\n",
"\n",
"for line in vision.concordance_list('nine', width=85, lines=1): #analyses the given word and print the lines where it is situated, in this case there is only one but \n",
" for x in range(74): #it is repeated 74 times\n",
" l = line.left_print[7:] #this picks only the desired words and defines the left side\n",
" m = line.query #defines the center (the given word)\n",
" r = line.right_print #defines the right side\n",
" l = l.split(' ') #split the sentence, both sides\n",
" r = r.split(' ')\n",
" random.shuffle(l) #shuffles the results for every line, both sides excepts the center, it will be always 'nine'\n",
" rl = ' '.join(l).lower()\n",
" random.shuffle(r)\n",
" rr= ' '.join(r)\n",
" results= (f\" {rl.capitalize()} {m} {rr}. \") #capitalize the first letter of the first word of every line\n",
" lista.append(results)\n",
" \n",
"\n",
"\n",
" patch = \"\\n\".join(lista) #creates effectivly the quilt computing the charachters\n",
"\n",
" f = 'patcherico.txt' #export the patch for the quilt in .txt\n",
" export = open(f, 'w')\n",
" export.write(patch)"
]
},
{
"cell_type": "code",
"execution_count": 88,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"82"
]
},
"execution_count": 88,
"metadata": {},
"output_type": "execute_result"
}
],
"source": []
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"82\n"
]
}
],
"source": [
"print(len(' Than there six are more thousand nine languages the hundred world more across. '))"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"77\n"
]
}
],
"source": [
"print(len('There are more than six thousand nine hundred more languages across the world'))"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"82"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"f = 'patchericofortheconcordance.txt'\n",
"export = open(f, 'w')\n",
"export.write(results)"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n",
"Displaying 7 of 7 matches:\n",
"s in fostering communication amongst readers and speakers of different languages \n",
"ly vital contribution . Not just for readers that want to read other languages , \n",
"s between writers , publishers , and readers . And because of our access to and c\n",
" want to establish a base of devoted readers . Earlier in the process , someone w\n",
"the translators and our most devoted readers started sharing the work on Facebook\n",
" magazine that reached a few million readers . In the USA , the story was nominat\n",
"s between writers , publishers , and readers . When we act out our ideas , the fu\n",
"None\n",
"uld do with the resources we valued := language =, knowledge and our web of connection\n"
]
}
],
"source": [
"## left = line.left_print.lower() #.replace('.','').replace(',','').replace(' ',' ')\n",
"middle = line.query.upper()\n",
"right = line.right_print.lower() #.replace('.','').replace(',','').replace(' ',' ')\n",
"\n",
"lang=[]\n",
"\n",
"#l = [left,' ',middle]\n",
"#m = [middle,' ',right]\n",
"#r = [right, ' ',left]\n",
"\n",
"for word in range(72):\n",
"\n",
" print(vision.concordance('readers',width=82))\n",
" for line in vision.concordance_list('language', width=84, lines=1):\n",
" x = ' ' * (word*4)\n",
" z = len(x)\n",
" results=(f'{line.left_print}= {line.query} ={line.right_print}')\n",
" #for lines in line:\n",
" #results = random.choice(l)+random.choice(m)+random.choice(r)\n",
" lang.append(results)\n",
" print(results)"
]
},
{
"cell_type": "code",
"execution_count": 421,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"78\n"
]
}
],
"source": [
"print(len('Six thousand more are than there nine world across the languages hundred more.'))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

@ -0,0 +1,133 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#HERE IMPORT LIBRARIES FOR USE URLs, IMAGES AND AALIB (FOR ASCII)\n",
"\n",
"from urllib.request import urlopen\n",
"from PIL import Image, ImageDraw\n",
"import aalib"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"pic = Image.open('pic.png') #HERE PUT THE PIC'S PATH!!"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"pic = Image.open(urlopen(\"https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fstatic.toolboxrecords.com%2Fpublic%2Fimages%2Fproducts%2Fe%2F5%2F0%2F22874%2Fbig.jpg&f=1&nofb=1\")) #HERE PUT THE PIC'S URL!!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

@ -0,0 +1,110 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from weasyprint import HTML, CSS\n",
"from weasyprint.fonts import FontConfiguration"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"html = HTML(url=\"https://federicoponi.it\")\n",
"font_config = FontConfiguration()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"css = CSS(string='''\n",
"@page{\n",
" size: A4;\n",
" margin: 15mm;\n",
" background-color: white;\n",
" font-family: monospace;\n",
" font-size: 8pt;\n",
" color: black;\n",
" \n",
" img{\n",
" display:none;}\n",
" }\n",
" \n",
" body{\n",
" font-family: serif;\n",
" font-size: 12pt;\n",
" line-height: 1.4;\n",
" color: black;\n",
" }\n",
" \n",
" h1{\n",
" width: 100%;\n",
" text-align: center;\n",
" font-size: 250%;\n",
" line-height: 1.25;\n",
" color: orange;\n",
" }\n",
" \n",
" img{\n",
" display:none;\n",
" }\n",
" \n",
" #maxed responsive-img{\n",
" display:none;\n",
" }\n",
" \n",
" #submeta {\n",
" display:none;\n",
" }\n",
"\n",
"''', font_config=font_config)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"html.write_pdf('mydocument.pdf', stylesheets=[css])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Loading…
Cancel
Save