You'll need to install some softwares to run the neural nets on a stock embedded device. We'll layout all the resources that we used to get our systems up and running.
- Raspberry Pi 3B (running Ubuntu MATE 16.04.2)
| <form> | |
| <div class="svgContainer"> | |
| <div> | |
| <svg class="mySVG" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 200 200"> | |
| <defs> | |
| <circle id="armMaskPath" cx="100" cy="100" r="100"/> | |
| </defs> | |
| <clipPath id="armMask"> | |
| <use xlink:href="#armMaskPath" overflow="visible"/> | |
| </clipPath> |
You'll need to install some softwares to run the neural nets on a stock embedded device. We'll layout all the resources that we used to get our systems up and running.
| #https://pyttsx3.readthedocs.io/en/latest/engine.html#examples | |
| import pyttsx3 | |
| engine = pyttsx3.init() | |
| engine.setProperty('voice', 'punjabi') | |
| rate = engine.getProperty('rate') | |
| print(rate) | |
| engine.setProperty('rate', rate-100) | |
| engine.say('ਸੋ ਦਰੁ ਤੇਰਾ ਕੇਹਾ ਸੋ ਘਰੁ ਕੇਹਾ ਜਿਤੁ ਬਹਿ, ਸਰਬ ਸਮਾਲੇ ॥ ਵਾਜੇ ਤੇਰੇ ਨਾਦ ਅਨੇਕ, ਅਸੰਖਾ ਕੇਤੇ ਤੇਰੇ ਵਾਵਣਹਾਰੇ ॥ ਕੇਤੇ ਤੇਰੇ, ਰਾਗ ਪਰੀ ਸਿਉ ਕਹੀਅਹਿ ਕੇਤੇ ਤੇਰੇ ਗਾਵਣਹਾਰੇ ') | |
| engine.runAndWait() |
https://chrisyeh96.github.io/2017/08/08/definitive-guide-python-imports.html
In addition to labeling a directory as a Python package and defining __all__, __init__.py allows you to define any variable at the package level. Doing so is often convenient if a package defines something that will be imported frequently, in an API-like fashion. This pattern promotes adherence to the Pythonic "flat is better than nested" philosophy.
An example
Here is an example from one of my projects, in which I frequently import a sessionmaker called Session to interact with my database. I wrote a "database" package with a few modules: ` database/ init.py schema.py insertions.py
Use git config --global --unset http.proxy to unset proxy
git config --global http.proxy http://<userid>:<passwd>@proxy62.iitd.ac.in:3128git rm -r '*.class' and then echo '*.class' >> .gitignoreAnd finally i found 100% work for me (check on two same laptops with different version Ubuntu 16.04LTS and 17.04)
| import os | |
| #gets the files ending with .txt in the current directory | |
| files = [f for f in os.listdir('.') if os.path.isfile(f)] | |
| for f in files: | |
| if f.endswith('.txt'): | |
| filename = f | |
| #opens the file | |
| a = open( filename , 'r') | |
| #lines contains list of lines in the file | |
| lines = a.readlines() |
| var field = document.getElementById('valuepkg3'); | |
| var condition = field.previousSibling.textContent; | |
| var numbers = condition.match(/\d+/g).map(Number); | |
| var myInt = 0; | |
| if(condition.includes('first')){ | |
| myInt = numbers[0]; | |
| } | |
| else if(condition.includes('add')){ | |
| myInt = numbers[0]+numbers[1]; | |
| } |
| <!-- HEAD SECTION --> | |
| <!-- IE Edge Meta Tag --> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <!-- Viewport --> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <!-- Minified CSS --> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> |