Compare commits
No commits in common. '9933252127408179648832ca2ea28e75b0870b06' and 'e65e4875e7504aaa801b03805b186ed181ee2326' have entirely different histories.
9933252127
...
e65e4875e7
Binary file not shown.
@ -1,37 +0,0 @@
|
|||||||
import nltk
|
|
||||||
|
|
||||||
with open('speech.txt','r') as result:
|
|
||||||
r = result.read()
|
|
||||||
|
|
||||||
r = r.replace('<span class="interim"></span>','').replace('\n','. ')
|
|
||||||
|
|
||||||
l=nltk.word_tokenize(r)
|
|
||||||
pos = nltk.pos_tag(l)
|
|
||||||
|
|
||||||
html = '''
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<link rel="stylesheet" href="pagedjs_files/interface.css">
|
|
||||||
<script src="pagedjs_files/paged.polyfill.js"></script>
|
|
||||||
<link rel="stylesheet" href="styles/1.css">
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<title>Booklet</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
'''
|
|
||||||
|
|
||||||
for x in pos:
|
|
||||||
if x[0] == '.':
|
|
||||||
html += "<span class='dot'>.</span><br> \n"
|
|
||||||
else:
|
|
||||||
html += "<span class='"+x[1]+"'> "+x[0]+"</span>\n"
|
|
||||||
|
|
||||||
|
|
||||||
html += '''</body>
|
|
||||||
</html>'''
|
|
||||||
|
|
||||||
html = html.replace(' .','.').replace(" '", "'")
|
|
||||||
|
|
||||||
with open('index.html','w') as index:
|
|
||||||
index.write(html)
|
|
@ -1,47 +0,0 @@
|
|||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<link rel="stylesheet" href="pagedjs_files/interface.css">
|
|
||||||
<script src="pagedjs_files/paged.polyfill.js"></script>
|
|
||||||
<link rel="stylesheet" href="styles/3.css">
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<title>Booklet</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<span>ok let's talk in English for awhile what are we eating</span>
|
|
||||||
<img src='https://tse3.mm.bing.net/th?id=OIP.URkqiGHddaNVnvoUtMflQQHaF0&pid=Api'>
|
|
||||||
<span>or not so it is starting again</span>
|
|
||||||
<img src='https://tse3.mm.bing.net/th?id=OIP.w2KDA__F4lQ1NyTt5FOjIgAAAA&pid=Api'>
|
|
||||||
<span>ok navigate</span>
|
|
||||||
<img src='https://tse3.mm.bing.net/th?id=OIF.y9XMU%2b2gdAWMj7VXDE%2ft%2fQ&pid=Api'>
|
|
||||||
<span>you need to rest sometimes</span>
|
|
||||||
<img src='https://tse4.mm.bing.net/th?id=OIP.GbFGas-ayDWMUd_9vgedSwHaGO&pid=Api'>
|
|
||||||
<span>also implemented that implementing</span>
|
|
||||||
<img src='https://tse3.mm.bing.net/th?id=OIF.GJKQxrJERpdrEixc86Aylg&pid=Api'>
|
|
||||||
<span>he's a sentence and we are not interested</span>
|
|
||||||
<img src='https://tse2.mm.bing.net/th?id=OIP.B8V15Vgwb4WSIBCh_DBKAAHaEK&pid=Api'>
|
|
||||||
<span>remember</span>
|
|
||||||
<img src='https://tse4.mm.bing.net/th?id=OIP.FIpqGxb0o5Qhs7F6FsmLUwHaJ4&pid=Api'>
|
|
||||||
<span>so basically sentence</span>
|
|
||||||
<img src='https://tse4.mm.bing.net/th?id=OIP.R-Aq7zQgyXkEkqHsRpd_fQHaK5&pid=Api'>
|
|
||||||
<span>where is to go a couple and then you put the adult</span>
|
|
||||||
<img src='https://tse3.mm.bing.net/th?id=OIP.-zezO3MYsykMDFXKr5BN4gHaFT&pid=Api'>
|
|
||||||
<span>a bit easier to understand</span>
|
|
||||||
<img src='https://tse2.mm.bing.net/th?id=OIP.dAOU1dmcC7DcOHjdZWnsOAHaFj&pid=Api'>
|
|
||||||
<span>actually maybe people just don't just</span>
|
|
||||||
<img src='https://tse3.mm.bing.net/th?id=OIP.lN80mz6v0-Og5Hy4rBFDBgHaFj&pid=Api'>
|
|
||||||
<span>I'm just thinking it's not the centres don't put the dot and just put a couple</span>
|
|
||||||
<img src='https://tse2.mm.bing.net/th?id=OIP.soE-jIhLUlXXcsImI9dSAgHaDE&pid=Api'>
|
|
||||||
<span>because then</span>
|
|
||||||
<img src='https://tse4.mm.bing.net/th?id=OIP._isREjX53ak2ahph2VOozgHaIM&pid=Api'>
|
|
||||||
<span>they are talking they are a booklet but they are not writing</span>
|
|
||||||
<img src='https://tse2.mm.bing.net/th?id=OIP.-utvaIFVP4SIM9E9Am3efAHaEZ&pid=Api'>
|
|
||||||
<span>so it is just fine</span>
|
|
||||||
<img src='https://tse3.mm.bing.net/th?id=OIP.6d-LRDAm986tLKsRdmxAFwHaC_&pid=Api'>
|
|
||||||
<span>so are you done</span>
|
|
||||||
<img src='https://tse1.mm.bing.net/th?id=OIF.GUCE7OkP722hk6eZcjJckQ&pid=Api'>
|
|
||||||
<span>and now is f***** up</span>
|
|
||||||
<img src='https://tse4.mm.bing.net/th?id=OIP.Z_JLWGz4XfBuc0lzMmTUggHaEQ&pid=Api'>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,71 +0,0 @@
|
|||||||
import DuckDuckGoImages as ddg
|
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
|
|
||||||
with open('speech.txt','r') as speech:
|
|
||||||
qq = speech.readlines()
|
|
||||||
|
|
||||||
html = ''
|
|
||||||
|
|
||||||
html = '''
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<link rel="stylesheet" href="pagedjs_files/interface.css">
|
|
||||||
<script src="pagedjs_files/paged.polyfill.js"></script>
|
|
||||||
<link rel="stylesheet" href="styles/3.css">
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<title>Booklet</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
'''
|
|
||||||
|
|
||||||
if os.path.isdir('./images/') is True:
|
|
||||||
shutil.rmtree('./images/')
|
|
||||||
|
|
||||||
os.mkdir('./images/')
|
|
||||||
|
|
||||||
|
|
||||||
for q in qq:
|
|
||||||
if q == '''<span class="interim"></span>''':
|
|
||||||
continue
|
|
||||||
|
|
||||||
qDDG = q.replace(' ','+')
|
|
||||||
qBinded = q.replace(' ','')
|
|
||||||
print(qDDG)
|
|
||||||
qBinded = qBinded.replace("\n","")
|
|
||||||
os.mkdir(f'./images/{qBinded}')
|
|
||||||
ddg.download(qDDG, folder= f"./images/{qBinded}/", max_urls=10, thumbnails=True)
|
|
||||||
normalize = os.listdir(f"./images/{qBinded}/")
|
|
||||||
|
|
||||||
print(len(os.listdir(f"./images/{qBinded}/")))
|
|
||||||
|
|
||||||
if len(os.listdir(f"./images/{qBinded}/")) == 0:
|
|
||||||
html += f'<span class="{qBinded}">{q}</span><br><br>'
|
|
||||||
os.rmdir(f'./images/{qBinded}/')
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
|
||||||
print('NORMALIZE', normalize)
|
|
||||||
normalize = normalize[0]
|
|
||||||
|
|
||||||
splitExtension = os.path.splitext(normalize)
|
|
||||||
print('ESTENSIONE', splitExtension)
|
|
||||||
|
|
||||||
|
|
||||||
os.rename(f'./images/{qBinded}/{normalize}', f'./images/{qBinded}/{qBinded}')
|
|
||||||
os.replace(f'./images/{qBinded}/{qBinded}', f'./images/{qBinded}.jpg')
|
|
||||||
shutil.rmtree(f'./images/{qBinded}/')
|
|
||||||
|
|
||||||
html += f"""<span class="{qBinded}">{q}</span>"""
|
|
||||||
html += f"""<span><img src="./images/{qBinded}.jpg"></span>"""
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
html += '''</body>
|
|
||||||
</html>'''
|
|
||||||
|
|
||||||
html = html.replace(' .','.').replace(" '", "'")
|
|
||||||
|
|
||||||
with open('picindex.html','w') as index:
|
|
||||||
index.write(html)
|
|
@ -1,49 +0,0 @@
|
|||||||
import DuckDuckGoImages as ddg
|
|
||||||
from duckduckgo_images_api import search
|
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
|
|
||||||
with open('speech.txt','r') as speech:
|
|
||||||
qq = speech.readlines()
|
|
||||||
|
|
||||||
html = ''
|
|
||||||
|
|
||||||
html = '''
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<link rel="stylesheet" href="pagedjs_files/interface.css">
|
|
||||||
<script src="pagedjs_files/paged.polyfill.js"></script>
|
|
||||||
<link rel="stylesheet" href="styles/3.css">
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<title>Booklet</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
'''
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for q in qq:
|
|
||||||
q = q.strip()
|
|
||||||
if q == '''<span class="interim"></span>''':
|
|
||||||
continue
|
|
||||||
|
|
||||||
q = q.replace("\n","")
|
|
||||||
|
|
||||||
qDDG = q.replace(' ','+')
|
|
||||||
|
|
||||||
results = search(q, max_results=1)
|
|
||||||
r = results["results"][0]["thumbnail"]
|
|
||||||
|
|
||||||
html += f"""<span> {q} </span>\n"""
|
|
||||||
html += f"""<img src='{r}'>\n"""
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
html += '''</body>
|
|
||||||
</html>'''
|
|
||||||
|
|
||||||
html = html.replace(' .','.').replace(" '", "'")
|
|
||||||
|
|
||||||
with open('nuovo.html','w') as index:
|
|
||||||
index.write(html)
|
|
@ -0,0 +1,97 @@
|
|||||||
|
> rendering css capire cosa e non cosa
|
||||||
|
> preparare domande x parte teorica
|
||||||
|
|
||||||
|
> prep mail da mandare in anticipo con istru git
|
||||||
|
|
||||||
|
> prep 3 fogli css per auto layout
|
||||||
|
> prep cose fatte in precedenza da fa vedere
|
||||||
|
|
||||||
|
|
||||||
|
info su git
|
||||||
|
vscode
|
||||||
|
py + nltk
|
||||||
|
console
|
||||||
|
chrome :(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4 hrs
|
||||||
|
----
|
||||||
|
|
||||||
|
18:00 45''
|
||||||
|
introduction:
|
||||||
|
presentations
|
||||||
|
some theoric references
|
||||||
|
outlines and releated works
|
||||||
|
some questions
|
||||||
|
|
||||||
|
18:45 30''
|
||||||
|
workflow tour:
|
||||||
|
speech js
|
||||||
|
parse python
|
||||||
|
scrape python
|
||||||
|
design html + css
|
||||||
|
print js
|
||||||
|
|
||||||
|
19:15 45''
|
||||||
|
hands on aka speech and chat:
|
||||||
|
fast UI tutorial
|
||||||
|
3 groups
|
||||||
|
chat using the questions as a starting point
|
||||||
|
|
||||||
|
20:00 30''
|
||||||
|
break + eat something
|
||||||
|
|
||||||
|
20:30 45''
|
||||||
|
hands on design:
|
||||||
|
start from the speech dataset
|
||||||
|
start from our templates
|
||||||
|
start from a sketch
|
||||||
|
|
||||||
|
21:15 30''
|
||||||
|
print and bind
|
||||||
|
|
||||||
|
21:45
|
||||||
|
presenting the results 30''
|
||||||
|
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
4 hrs
|
||||||
|
----
|
||||||
|
|
||||||
|
18:00 45''
|
||||||
|
introduction:
|
||||||
|
presentations
|
||||||
|
some theoric references
|
||||||
|
outlines and releated works
|
||||||
|
some questions
|
||||||
|
|
||||||
|
18:45 30''
|
||||||
|
workflow:
|
||||||
|
speech
|
||||||
|
parse
|
||||||
|
scrape
|
||||||
|
design
|
||||||
|
print
|
||||||
|
|
||||||
|
19:15 45''
|
||||||
|
hands on aka speech and chat:
|
||||||
|
fast UI tutorial
|
||||||
|
3 groups
|
||||||
|
chat using the questions as a starting point
|
||||||
|
|
||||||
|
20:00 30''
|
||||||
|
break + eat something
|
||||||
|
|
||||||
|
20:30 45''
|
||||||
|
hands on design:
|
||||||
|
start from the speech dataset
|
||||||
|
start from our templates
|
||||||
|
start from a sketch
|
||||||
|
|
||||||
|
21:15 30''
|
||||||
|
print and bind
|
||||||
|
|
||||||
|
21:45
|
||||||
|
presenting the results 30''
|
Loading…
Reference in New Issue