User:Max Dovey/PT/TRIMESTER 2: Difference between revisions
< User:Max Dovey | PT
No edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
Where? map dispaying google searchers containing the phrase 'where can i?" http://headroom.pzwart.wdka.hro.nl/~max/where.html | Where? map dispaying google searchers containing the phrase 'where can i?" http://headroom.pzwart.wdka.hro.nl/~max/where.html | ||
===subtitles=== | |||
<source lang = "python"> | |||
import sys, zipfile, os, shutil, glob, textwrap, re | |||
from os.path import join | |||
f = open("filmsubs/Lost In Translation [Eng].srt", "r",) | |||
h =open("lostintranslation.txt", "w") | |||
i=0 | |||
for line in f: | |||
# read file | |||
if re.findall(r'\b --> \w+', line): #if you find '-->' do something | |||
# print next(f) | |||
# print i | |||
x = 1 # x = line after this symbol | |||
checkBlank = False | |||
while checkBlank is False: | |||
p = open("filmsubs/Lost In Translation [Eng].srt", "r",) | |||
line = p.readlines()[i+x] #read line from point i(where we last where) plus x (read on from this point) | |||
h.write(line) | |||
p.close() | |||
x=x+1 #iterate this digit so that it reads nextline in this while loop until.... | |||
if re.match(r'^\s*$',line): | |||
checkBlank = True | |||
i=i+1 | |||
</source > | |||
===speech=== | |||
'''Talking into the Twitter Stream''' |
Revision as of 12:38, 26 March 2014
Network traffic sound http://www.ioplex.com/~miallen/tcpsound/ html.write()
speech language processing
- http://fritz-weber.de/raw-sonata/
- http://www.voxforge.org/home/read
- http://www.speech.cs.cmu.edu/sphinx/dictator/
- http://nuancedev.github.io/samples/http/python/
CGI
- http://pzwart3.wdka.hro.nl/wiki/Python_CGI_checklist
- http://pzwart3.wdka.hro.nl/wiki/Python_CGI
- www.tutorialspoint.com/python/python_cgi_programming.htm
search
Where? map dispaying google searchers containing the phrase 'where can i?" http://headroom.pzwart.wdka.hro.nl/~max/where.html
subtitles
import sys, zipfile, os, shutil, glob, textwrap, re
from os.path import join
f = open("filmsubs/Lost In Translation [Eng].srt", "r",)
h =open("lostintranslation.txt", "w")
i=0
for line in f:
# read file
if re.findall(r'\b --> \w+', line): #if you find '-->' do something
# print next(f)
# print i
x = 1 # x = line after this symbol
checkBlank = False
while checkBlank is False:
p = open("filmsubs/Lost In Translation [Eng].srt", "r",)
line = p.readlines()[i+x] #read line from point i(where we last where) plus x (read on from this point)
h.write(line)
p.close()
x=x+1 #iterate this digit so that it reads nextline in this while loop until....
if re.match(r'^\s*$',line):
checkBlank = True
i=i+1
speech
Talking into the Twitter Stream