Skip to content

Just something to remember how this works and what it associated with when using a containerized Application such as docker and how it could benefit System Engineering and Administration.

Due to the sake of simplicity, let us use a linux (host) machine called box and with a username as flo. {NameOfYourDockerInstance} is the name of the docker instance you will give on your local machine.

Pulling OS from docker Hub
flo@box: ~ $ docker pull centos # other OS listed on DockerHub

Name your OS instance
flo@box: ~ $ docker run -t -d --name {NameOfYourDockerInstance} centos

Show what is running inside docker
flo@box: ~ $ docker ps

Execute the software inside this Docker instance
flo@box: ~ $ docker exec -it {NameOfYourDockerInstance} bash

Check the status of your docker instances
flo@box: ~ $ docker stats

To Stop/Start Docker Instance
flo@box: ~ $ docker start/stop {NameOfYourDockerInstance}

When and if by chance that you have forgot to add a port to a Docker container. One can search for this file called hostconfig.json in your host OS and make changes to the container you wish to reconfigure. A second approach might be to stop the instance, commit a copy from a source instance to a destination instance then using the run command to finally add the port.

flo@box: ~ $ docker stop cake
flo@box: ~ $ docker commit cake cake2
flo@box: ~ $ docker run -t -d -p 8080:8080 cake2
flo@box: ~ $ docker exec -it cake2 bash

On the previous post we had discussed on the notion of installing a python lib to be used to match faces from a known directory of images. This time, we will be working with identifying images as physical objects with a predefined known DB file rather than matching faces.

We have to install quite a few python libraries this time around in order to start matching objects in an given image with a database of predefined items.

pip3 install --user tensorflow
pip3 install --user numpy
pip3 install --user scipy
pip3 install --user opencv-python
pip3 install --user matplotlib
pip3 install --user h5py
pip3 install --user keras
pip3 install --user imageai
wget https://github.com/fchollet/deep-learning-models/releases/download/v0.2/resnet50_weights_tf_dim_ordering_tf_kernels.h5

I've downloaded this particular 100MB file to the Download directory and pulled an arbitary banana image file as my test into a /var/tmp directory location.


#!/usr/bin/env python3
# Sample Image Prediction with AI and Tensorflow
# imgPrediction.py
################################################

from imageai.Prediction import ImagePrediction
import os

execution_path = os.getcwd()
prediction = ImagePrediction()
prediction.setModelTypeAsResNet()
prediction.setModelPath( execution_path + "/Downloads/resnet50_weights_tf_dim_ordering_tf_kernels.h5")
prediction.loadModel()


predictions, percentage_probabilities = prediction.predictImage("/var/tmp/Bananas.jpg", result_count=5)

for index in range(len(predictions)):
    print(predictions[index] , " : " , percentage_probabilities[index])
# results are as follows

 hobbit@Hobbit : ~ $ python3 imgPrediction.py
2020-02-03 22:30:42.018504: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-02-03 22:30:42.063861: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fad5b33bbf0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-02-03 22:30:42.063890: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
banana  :  98.45277667045593
lemon  :  0.7330755237489939
orange  :  0.5388087593019009
zucchini  :  0.07304142927750945
acorn_squash  :  0.052256841445341706

There is something with tensorflow where this CPU cant seem to run, apparently. Ignore those two warning messages and read the bottom 6 lines. Its comical that using this AI image library, it was able to identify this banana.jpg file with pretty high accuracy. again, i did the opposite with this software to match to see if this application would know a person's name or title by reading a jpg file with a facial image. After using one of the images from the previous post, it was able to identify a tie and a suit with 95% certainly but not the person's name nor their title. 

In term of facial recognition, image object AI when using a predefined DB has its own limitations when trying to ID a face. There doesnt seem to be a software, which can do both: facial recognition and ID-ing objects. 

You can find the step by step writeup with explainations from this author:
View at Medium.com

The best programming language used with Face Recognition and Image Object Recognition in my opinion is python3. There is literally a python library to use when comes to matching face images to other face images.

First, we will need to install one library then we will use git to clone a repository to play with the predefined image.

Using pip3 after installing your trusty python3 programming language. We can run the following commands.

pip3 install --user face_recognition

git clone https://github.com/bradtraversy/face_recognition_examples

As simple as cake, the above two lines of items would be needed to get started in working on using this Face Recognition application. When you run the face_recognition software it will take in two arguments. The zero location will be the application, the first location is the known images and lastly the second location will be the unknown facial images.


hobbit@Hobbit : ~/github/facerecog $ /Users/hobbit/Library/Python/3.7/bin/face_recognition /Users/hobbit/facerecog/img/known/ /Users/hobbit/facerecog/img/unknown/

WARNING: No faces found in ./img/known/Bananas.jpg. Ignoring file.
/Users/flo/Library/Python/3.7/lib/python/site-packages/PIL/Image.py:932: UserWarning: Palette images with Transparency expressed in bytes should be converted to RGBA images
"Palette images with Transparency expressed in bytes should be "
./img/unknown/obama2_0.jpg,Barack Obama
./img/unknown/gettyimages-459761948.jpg,no_persons_found
./img/unknown/d-trump.jpg,Donald Trump
./img/unknown/obama.jpeg,Barack Obama
./img/unknown/barack-obama-12782369-1-402.jpg,Barack Obama
./img/unknown/gates_lookalike.jpg,Bill Gates
./img/unknown/keanu-reeves-9454211-1-402.jpg,unknown_person
./img/unknown/sarahmullerEB358D55-EC16-36C7-7932-0C2F4E502D06.jpg,Steve Jobs
./img/unknown/xxx_d06_jordan_01_876569.jpg,Michael Jordan
./img/unknown/lead_720_405.jpg,Donald Trump
./img/unknown/stevejobs.png,Steve Jobs
./img/unknown/bill-gates-4.jpg,Bill Gates
./img/unknown/1523669923561.jpg,Donald Trump
./img/unknown/keanu-reeves-2000.jpg,unknown_person
./img/unknown/220px-Mark_Wahlberg_2017.jpg,unknown_person
./img/unknown/mark.jpg,unknown_person
./img/unknown/jordan-basketball.jpeg,Michael Jordan
./img/unknown/mark2.jpg,unknown_person
./img/unknown/bill-gates-750-563.jpg,Bill Gates
./img/unknown/steve-jobs---mini-biography.jpg,Steve Jobs


i tried inserting a image of a banana.jpg into this facial recognition application to see whether it would detect another banana01.jpg in the unknown directory. Interesting enough, this facial recognition is only able to detect faces. As you can see, this application detected an unknown image in the known directory which was not recognizable as a face. It then skipped over.

I felt as if facial recognition application will only work with facial images unlike where if one were to use an application to recognize a known physical object, one would then require other arsenals in the python lib. perhaps, Facial recognition is far different than object recognition as I digressed.

When comes to anti-virus utilities, there are quite a few available. There are some anti-virus suites which are quite useful to detect malware and viruses.

https://www.ashampoo.com/en/usd/fdl
https://www.bitdefender.com/solutions/free.html
https://usa.kaspersky.com/downloads#tools
http://www.f-prot.com/download/
https://www.avast.com/en-us/free-antivirus-download
https://www.pandasecurity.com/en-us/homeusers/solutions/free-antivirus/

Antimalware and Antispy tools
https://www.malwarebytes.com/mwb-download/
https://www.ashampoo.com/en/usd/pin/1004/security-software/antispy-for-windows-10
https://www.emsisoft.com/en/home/emergencykit/
https://www.avira.com/en/free-security-suite
https://www.hitmanpro.com/en-us.aspx

There are now a ton of new browsers made available for Windows / Mac devices and on many mobile devices. There are five browsers that are quite popular, which we will list based on personal security.

The first browser which is quite similar to Opera Browser and super secure.
https://vivaldi.com/

This browser based off of the OpenSource project called Chromium.
https://brave.com/

This third browser which i've used for over 1.5 decades and is one of my favoriate browser of all times.
https://www.opera.com/

This fourth browser is the OpenSource project.
https://www.chromium.org/getting-involved/download-chromium

Fifth Browser is also an OpenSource project with tons of plugins and perks.
https://www.mozilla.org/en-US/firefox/

Lastly, this is by far the most popular.
https://www.google.com/chrome/

There are two web browsers which i will note them here in this area.
Microsoft's new edge replacement browser
https://www.microsoft.com/en-us/edge

Apple's Safari which will only work on Apple Devices.
https://www.apple.com/safari/

Browser when using linux.
https://kde.org/applications/internet/org.kde.konqueror
https://www.waterfox.net/

There comes to a time where one would need or require additional software on mac where the apple store might not suffice for your programming purposes. Fear Not ! There are quite a few third-party repositories which will cater to mac users.

The three popular mac software repo are as follows:
1) https://brew.sh
2) https://macports.org
3) http://finkproject.org

I have used the first two repos on a macbook pro laptop. There are pros and cons to each of these repos. Once must pick carefully yet two can be installed on one machine. I found macports has newer software than brew when comes to programming. Brew has the latest stable programming languages made available for all mac users. Both of these repos have excellent volunteers to help answer questions as well as fixing issues when they arise. I am not familiar with the fink project.

if you are familiar with linux, the approach to install and search for anything is quite similar to the apt command.

Install Homebrew:
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew

As of this writing, macports v2.6.2 is available:
https://github.com/macports/macports-base/releases/tag/v2.6.2

For Example:

brew list
brew info python3
brew search python3
brew install python3
brew update
brew upgrade
brew uninstall python3

After upgrading windows 10 to v2004, python silent installed stopped functioning. I was able to use this silent install via the terminal rather than a xml file

python-3.8.5-amd64.exe /quiet InstallAllUsers=1 TargetDir=c:\Python38 AssociateFiles=1 CompileAll=1 PrependPath=0 Shortcuts=0 Include_doc=1 Include_debug=0 Include_dev=0 Include_exe=1 Include_launcher=1 InstallLauncherAllUsers=1 Include_lib=1 Include_pip=1 Include_symbols=0 Include_tcltk=1 Include_test=1 Include_tools=1

I've had a hard time in getting PC windows 10 machines consistently installed the same version of Python3.8.0 with same results. After realizing that one could script the install process using the Python38*.exe file to silently install this version to many laptops. Silent Install aka Unattended Install is the best approach thusfar. There were no many examples i could find online but came up with this list of parameters where it worked for me. This will only install for the user of the machine instead of for all users.

<Options>
<Option Name="InstallAllUsers" Value="no" />
<Option Name="DefaultJustForMeTargetDir" Value="C:\Python38" />
<Option Name="DefaultCustomTargetDir" Value="C:\Python38" />
<Option Name="AssociateFiles" Value="yes" />
<Option Name="CompileAll" Value="yes" />
<Option Name="PrependPath" Value="no" />
<Option Name="Shortcuts" Value="yes" />
<Option Name="Include_doc" Value="yes" />
<Option Name="Include_debug" Value="no" />
<Option Name="Include_dev" Value="yes" />
<Option Name="Include_exe" Value="yes" />
<Option Name="Include_launcher" Value="no" />
<Option Name="InstallLauncherAllUsers" Value="no" />
<Option Name="Include_lib" Value="yes" />
<Option Name="Include_pip" Value="yes" />
<Option Name="Include_symbols" Value="no" />
<Option Name="Include_tcltk" Value="yes" />
<Option Name="Include_test" Value="yes" />
<Option Name="Include_tools" Value="yes" />
<Option Name="SimpleInstall" Value="yes" />
<Option Name="SimpleInstallDescription">Automatic Install</Option>
</Options>




Download Python3.8.0 from this link.
https://www.python.org/downloads/release/python-380/

save the above XML content to a text editor and named it: unattend.xml

Fire up a DOS PROMPT on window 10 and execute the following line:
c:\users\hobbit\python-3.8.0-amd64.exe /quiet c:\users\hobbit\unattend.xml

Of course, my user account on my personal windows 10 will be different from your windows environment. So.... Alter your environment as you see fit. Generally speaking, one could place both the exe file and the xml file inside download directory and fire up the DOS prompt from download dir and execute that particular command.

Happy Coding !

Become one with the compute node. There are scientific research projects one can participate. The Einstein@home https://einsteinathome.org/ is super unique as well as Rosetta@home http://boinc.bakerlab.org/rosetta/ Many of these research projects required a powerful CPU along with a GPU.

Projects
https://boinc.berkeley.edu/projects.php

Research Node Software then once installed, you can then participate in any of the projects mentioned from above.
https://boinc.berkeley.edu/

Before each semester, i often found myself reading this descriptive article on teaching.

advice firstday

Bloom’s Taxonomy

teaching commons rubrics

blended learning UCF

Active Learning in Hybrid and Physically Distanced Classrooms

Butler Online Learning

trauma teaching during COV2

Radford Uni online teaching Resources

http://acue.org/inclusive-teaching-practices-toolkit/#sec1

Diversity-Inclusion

inclusive-teaching

bias guides

discussing_racism_policing_and_protest

avoid-burnout-during-pandemic-opinion

quarantine-fatigue-is-real-heres-how-to-cope