Quantum Physics and Universal Beauty - with Frank Wilczek - YouTube https://www.tensorflow.org/versions/master/get_started/index.html https://www.tensorflow.org/versions/master/tutorials/recurrent/index.html https://api.ai/ print re.sub(r"(\d)F", r"\1 degrees", string1) rep = {"NW": "northwest", "SW": "southwest"} # define desired replacements here # use these three lines to do the replacement rep = dict((re.escape(k), v) for k, v in rep.iteritems()) pattern = re.compile("|".join(rep.keys())) text = pattern.sub(lambda m: rep[re.escape(m.group(0))], string1) params = {'text': text, 'voice': 'fr-FR_ReneeVoice', 'accept': 'audio/wav'} headers = {'content-type': 'audio/wav'} url='https://stream.watsonplatform.net/text-to-speech/api/v1/synthesize' r = requests.request(method='POST', url=url, headers=headers, params=params, stream=True, auth=('user', 'pass')) if r.status_code == 200: filename='output.wav' with open(filename, 'wb') as audio_file: audio_file.write(r.content) print join(dirname(__file__), filename) os.system('/usr/bin/mplayer ' + join(dirname(__file__), filename)) os.remove(filename) else: print r.status_code print r.headers print r.text url = 'https://stream.watsonplatform.net/speech-to-text/api/v1/recognize' audio = open(audio_fname, 'rb') headers = {'content-type': 'audio/wav'} params = {'continuous': False} r = requests.request(method='POST', url=url, headers=headers, data=audio, params=params, stream=True, auth=('user', 'pass')) os.remove(audio_fname) if r.status_code == 200: response= json.loads(r.text) print response['results'][0]['alternatives'][0]['confidence'] print response['results'][0]['alternatives'][0]['transcript'] #return response['results'][0]['alternatives'][0]['transcript'] else: print r.status_code print r.headers print r.text quit() @startuml autonumber 10 10 "<b>[000]" hide footbox title Footer removed participant RTC participant Slot1 participant Slot2 participant Slot3 participant Slot4 box "Internal Service" #LightBlue participant Bob participant Alice end box == REST == RTC -> Slot1 : Source Code Delivery Slot1 -> Slot4 : Passing BDD autonumber stop Bob -> Alice : dummy == Initialization == autonumber resume "<font color=red><b>Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response autonumber stop Bob -> Alice : dummy note left a note can also be defined on several lines end note autonumber resume 1 "<font color=blue><b>Message 0 " Bob -> Alice : Yet another authentication Request Bob <- Alice : Yet another authentication Response @enduml cut -d "," -f4,5 myfile.csv | sort | uniq -c
#http://francescopochetti.com/part-vii-backtest-portfolio-performance/
#!/usr/bin/python import sys import pickle
class Reminder(object):
f = open(mycontactfile,'rb');
print '--------------------------------------' for entry in sorted_x:
reminders = [] reminders.append(Reminder("name1", int(datetime(2015, 12, 20, 0, 0).strftime("%Y%m%d%H%M")), "major")) print len(reminders) #print students print '--------------------------------------' for entry in sorted_x:
mycontactfile = 'contactlist.data'; ''' quit() -------------------------------------------------------------------- calling subprocess.Popen(["/bin/mycmd", "myarg"]) is "no wait." Quentin, time to get on the bus, have fun at school Mom, one of your kids has to go to school Batman, this is Robin, quick, to the batcave Mars to earth base, Commander Quentin, your hyperspace launch vehicle is leaving now Mom, your kid is coming back from school School bus is arriving in a few Fun's over, kid #2 is coming back mydict = {'george':16,'amber':19} print mydict.keys()[mydict.values().index(16)] # Prints george if 'amber' in mydict: print "blah" else: print "boo" if '16' in mydict: print "blah" else: print "boo" for k,v in sorted(mydict.items()): print k, v delete mydict.pop("key", None) |