Wednesday, January 30, 2019

useful unix commands


to see all processes
ps -aef | more
ps -aef | sort | more
ps -aef | sort > out.txt


Monday, January 28, 2019

installing anaconda and jupyter in digitalocean

I have been frustrated lately trying to learn data science in my office (in my spare time) because of the SSL certificate issue. Every time I execute a command the error just popping up and I get a less patient and I say "Arrrrrr" and suddenly just pop in my mind, what if I will run anaconda and jupyter in my external server which my personal from digital ocean. and then the quest begins....


1. install the anaconda
https://www.digitalocean.com/community/tutorials/how-to-install-anaconda-on-ubuntu-18-04-quickstart

2. configure and run jupyter
https://www.digitalocean.com/community/tutorials/how-to-install-run-connect-to-jupyter-notebook-on-remote-server

ohhh, i'm invincible its only 2 steps.

 


Eureka!!!!!

Thursday, January 24, 2019

Error: Permission denied to access property "nodeName"

issue




https://github.com/odoo/odoo/commit/5bb7ffa2

1. copy the file from container to host
docker cp 12f4057cbf0c:/usr/lib/python2.7/dist-packages/openerp/addons/web_editor/static/src/js/summernote.js .

2. after edit the file, copy back to container
docker cp summernote.js 12f4057cbf0c:/usr/lib/python2.7/dist-packages/openerp/addons/web_editor/static/src/js






Eureka!

Wednesday, January 23, 2019

python text to speech and this is awesome

pip install pyttsx3
pip install pypiwin32

the code:

import pyttsx3;
engine = pyttsx3.init();
engine.say("My wife is Sheryl and my two son's are Kiefer and Jairus");
engine.runAndWait() ;

that's it, eureka!

Tuesday, January 22, 2019

speech recognition

its 11pm and I found something interesting, this time I tried to implement speech recognition.

actually, its very easy

1. pip install SpeechRecognition
2. conda install -c anaconda pyaudio
3. the code

import speech_recognition as sr

r = sr.Recognizer()

with sr.Microphone() as source:
print('Speak anything:')
audio = r.listen(source)

try:
text = r.recognize_google(audio)
print('you said: {}'.format(text))
except:
print('sorry could not recognize your voice...')


4. run it! so simple. Eureka!


reference:
https://www.youtube.com/watch?v=K_WbsFrPUCk
https://realpython.com/python-speech-recognition/

Thursday, January 17, 2019

check the install python modules

python

import pip
installed_packages = pip.get_installed_distributions()
installed_packages_list = sorted(["%s==%s" % (i.key, i.version)
     for i in installed_packages])
print(installed_packages_list)


Thursday, January 3, 2019

SSL error

error:





solution:

conda config --set ssl_verify False

(better approach)
conda config --set ssl_verify C:\Users\lynard\AppData\Local\Continuum\anaconda3\Library\ssl\Fortinet_CA_SSL.pem

Install and manage anaconda in windows



conda commands

list of environment
conda info --envs

create environment
conda create --name py36 python=3.6 pip numpy
activate py36
conda install matplotlib

to show packages installed
conda list --explicit
conda list --explicit > py36_reqs.txt
conda create --name py36_v2 -- file py36_reqs.txt

to remove environment
conda env remove --name pyside

to clone environment
conda create --name myclone --clone myenv


reference:
https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-cheatsheet.pdf
https://kapeli.com/cheat_sheets/Conda.docset/Contents/Resources/Documents/index (new)
https://www.youtube.com/watch?v=9Sfs7Fbvtdk














free online comma separating tool

https://delim.co/#