Monday, April 29, 2019

Python plot maps and polygons





Map Resources:
[1] http://www.arcgis.com/home/item.html?id=3fd6eb2de569477ca83b2b65da8ecb6f

Source for plot:
[1]


Aditional Lectures
[1] http://dan-scientia.blogspot.com/2009/10/centroide-de-um-poligono.html
[2] https://www.matematica.pt/faq/poligono-convexo.php
[3] https://github.com/deparkes/shapely_tests
[4] https://shapely.readthedocs.io/en/stable/manual.html
[5] https://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon
[6] Centro Geodesico https://ww2.ibge.gov.br/home/geociencias/geodesia/artigos/1996_Centro_Geodesico_Centroide.pdf

Visual Center
[1] https://blog.mapbox.com/a-new-algorithm-for-finding-a-visual-center-of-a-polygon-7c77e6492fbc
[2] https://github.com/mapbox/polylabel
[3] Poly Decomp https://mpen.ca/406/motivation

Python basemap
[1] https://matplotlib.org/basemap/users/examples.html
[2] https://github.com/matplotlib/basemap/tree/master/examples


sudo apt-get install libgeos-3.5.0
sudo apt-get install libgeos-dev
sudo pip install https://github.com/matplotlib/basemap/archive/master.zip
 
Results:
https://github.com/fincahuanaco/covid19peru 
Next Step
https://towardsdatascience.com/easy-steps-to-plot-geographic-data-on-a-map-python-11217859a2db
 
 

Wednesday, April 24, 2019

Deep Learning


Resources

[1] Classification 6 class (pt) https://www.linkedin.com/pulse/classifica%C3%A7%C3%A3o-de-imagens-atrav%C3%A9s-deep-learning-s%C3%A9rgio-saraiva/

1) http://demo.caffe.berkeleyvision.org/
2) http://playground.tensorflow.org

Additional
[1] https://medium.com/analytics-vidhya/python-implementation-of-andrew-ngs-machine-learning-course-part-1-6b8dd1c73d80


Classify Dog/Cat (Under evaluation)

1) https://medium.com/@harsathAI/cats-and-dogs-classifier-convolutional-neural-network-with-python-and-tensorflow-9-steps-of-6259c92802f3

2) https://towardsdatascience.com/image-classifier-cats-vs-dogs-with-convolutional-neural-networks-cnns-and-google-colabs-4e9af21ae7a8


3) https://github.com/georgeblu1/Dog-Vs-Cat

4) https://github.com/girishkuniyal/Cat-Dog-CNN-Classifier


Google tools
[1] Big picture  https://research.google.com/bigpicture
[2] Database Search https://toolbox.google.com/datasetsearch/search

Thursday, April 04, 2019

Latex \printnomenclature doesn't work

Add to TexStudio or your favorite editor, the user command:

makeindex %.nlo -s nomencl.ist -o %.nls


And for update, compile, execute the above user command, and compile again.
 
 

Monday, April 01, 2019

Ubuntu 16 - VMWare Player 12 - GCC Not found


First solution
cd /usr/lib/vmware/modules/source 
wget https://github.com/mkubecek/vmware-host-modules/archive/player-12.5.9.zip 
unzip player-12.5.9.zip 
cd vmware-host-modules-player-12.5.9/vmmon-only/ 
make 
cd ../vmnet-only/ 
make 
cd .. 
mkdir /lib/modules/`uname -r`/misc 
cp vmmon.o /lib/modules/`uname -r`/misc/vmmon.ko 
cp vmnet.o /lib/modules/`uname -r`/misc/vmnet.ko 
depmod -a /etc/init.d/vmware restart


Second solution

mkdir ~/vmmodules #create a temp folder and copy files.
cp /usr/lib/vmware/modules/source/vmnet.tar /usr/lib/vmware/modules/source/vmmon.tar ~/vmmodules/ 
# make the modules manually 
tar -xvf vmmon.tar 
cd vmmon-only 
make 
cd .. 
sudo cp vmmon.o /lib/modules/`uname -r`/kernel/drivers/misc/vmmon.ko.gz 
tar -xvf vmnet.tar 
cd vmnet-only 
make 
cd .. 
sudo cp vmnet.o /lib/modules/`uname -r`/kernel/drivers/misc/vmnet.ko.gz 
#Then reload the modules and restart vmware service, vmplayer should works now. 
sudo depmod -a 
sudo systemctl restart vmware


Thrid solution

#install the right version of gcc
$sudo apt-get install g++-4.9 

Trick

$sudo sed 's/gcc version 5.4.0/gcc version 6.4.0/' /proc/version > /tmp/version
$sudo mount --bind /tmp/version /proc/version
$sudo vmware-modconfig --console --install-all
$sudo umount /proc/version && rm /tmp/version


Final solution 2019
Update kernel from 4.4 to 4.11 works good[2] and download from [3].

References:
[1] https://unix.stackexchange.com/questions/310637/vmware-kernel-module-a-compatible-version-of-gcc-was-not-found
[2] Update kernel https://www.howtoforge.com/tutorial/how-to-upgrade-linux-kernel-in-ubuntu-1604-server/
[3] Ubuntu kernels https://kernel.ubuntu.com/~kernel-ppa/mainline/
[4] Update Ubuntu 18 kernel https://www.tecmint.com/upgrade-kernel-in-ubuntu/ 

Firefox open multiple private window

    /opt/firefox/firefox-bin --profile $(mktemp -d) --private-window www.google.com www.bing.com