aws-lambda



Install SAM CLI


$ sudo pip install --user --upgrade aws-sam-cli


Get a list of existing Lambda functions


aws lambda list-functions

Using Postman to test AWS API Gateway



Wordpress-AWS

How to install WordPress blog on the free Amazon AWS EC2 instance.


To start, there is no point re-stating the steps as they are very clear in the AWS tutorial provided below.

Why I decided to look at the WordPress self-hosting if I have this blog for last 10 years?

There are really 2 reasons:

  • Extensions available for WordPress are far superior to any other blogging platform
  • The WordPress hosted on EC2 instance is on well, Amazon AWS, the infrastructure lives in the same datacenter and benefits from high speed connection to my other micro-services such as AWS Lambda functions. 


Stay tuned for customization tips.

References:

Slack Slash Commands with AWS Lambda

Introduction

Incorporating Lambda functionality into your Slack opens endless possibilities for automation. 

The commands may provide a quick method to store the information such as "/todo" and "/memo" as well as very sophisticated methods to "/deploy" some code, or "/reserve" assets. 

With some additional work, the commands such as "/predict" or "/classify" could call on machine learning models. 

The options are truly unlimited and can serve your team, or you individually. 

If you constantly add the new automation skills to your repertoire,  it is going to give you that extra "edge" in the hyper-competitive world.

For ideas on constantly building your set of skills, read my article on Singularity on Medium.com.


Basic Architecture


  • The individual user, or a team, interact with the Slack client app or website.
  • The particular Slack team is identified by a unique token
  • The commands are identified by a leading /slash
  • The AWS API Gateway is able to provide:
    • monetization for the API
    • DDOS attack protection
    • throttling the frequency of received API calls
  • There can be an AWS Lambda function to verify the token and delegate tasks which might limit the security exposure of the system
  • AWS Lambda functions fulfill a very particular skill and connect to other AWS services or APIs as needed. 
  • Over many years you can have thousands of skills that you could progressively perfect and monetize 




Cost Considerations


  • AWS API Gateway costs $3.50 per month per million requests. The first million is free.
  • AWS Encryption costs about $1 per month


Create an AWS "IAM" role for this service



Create role step 1


select Lambda




Create role step 2a


Search and select "AWSLambdaBasicExecutionRole"



Create role step 2b


Search and select "AmazonDynamoDBFullAccess"


Create role step 3


Name the role












Go to the Slack you are an ADMINISTRATOR for:
e.g. https://ukidlucas.slack.com/apps

Search for "Slash Commands"



https://ukidlucas.slack.com/apps/[....]-slash-commands

It should display something like:




Click "Add Configuration"

Choose a Command: "/HelloWorld"

Click "Add Slash Command Integration"

From the "Outgoing Data" copy token=LONG_ALPHA_NUMERIC

Save the token value for next step.














Open AWS new Lambda with "slack-echo-command-python" blueprint

You can search and navigate to this blueprint, or click the link below.




Lambda Function: Basic Information



















Updating "Execution Role"



  • At first, the created role was not available, but later when I edited the Lambda Function it showed up:














Lambda Function: Slack Token


  • Paste the previously saved Slack token













Configuring Triggers: API name























Save the Lambda Function



  • Click on the "API Gateway" trigger block
  • Copy the API endpoint URL 
  • Paste that URL into the Slack 
  • Save the Slack Configuration



Try Calling the /helloworld from Slack

slackbot [10:12 AM]
Darn - that slash command didn't work (error message: `502_service_error`). Manage the command at text.

Go to AWS CloudWatch (your logs) by clicking Monitoring

https://console.aws.amazon.com/cloudwatch/





You can see that the initialization error has occurred having to do with Encryption


The extra level of encryption using KMS:


Set the token value as the "kmsEncryptedToken" value

Create Customer Master Key (CMK):






References




ebooks


Having been a long-time user of Kindle and Nook, I end up using Google Books most of the time, here are some reasons:

  • Amazon Kindle does not support ePub which is a most common format
  • Barnes and Noble Nook does not allow to upload new books to the cloud and from there to the Nook via WiFi
  • Only Google Books allow reading the text using the Android system voice (TTS)
  • For Google Books adding newly purchased books is as simple as clicking "Upload files"



To manage my eBooks I use:

android-adb


It is frustrating when you cannot connect to ADB.

Here is a list of troubleshooting items:

Developer Options - ADB

The first one is obviously enabling ADB in Settings > Developer Options

USB role


The USB role for ADB should be the "Device", your computer is the "Host".


  • Device
    • this device is powered by the USB
    • this device can send ADB data to the Host
  • Host Mode
    • this device powers the USB
    • this device sends and receives the data
  • Accesory - this device cannot be a "Host", but acts like one
    • this device powers the USB
    • this device sends and receives the data



Correct DATA USB cable (and hubs)


This one gets me the most often, once you verify that the USB cable works label it.
The same goes for any hub or USB C to USB A converter.



References


TensorFlow-serving


TensorFlow Docker Serving






Android Vendor Testing Suite (VTS)


Android Vendor Testing Suite (VTS)



Machine Learning Supervised Speaker Recognition (Diarization)

References:

https://arxiv.org/abs/1810.04719

https://github.com/google/uis-rnn

https://catalog.ldc.upenn.edu/LDC2001S97

Setting up the Raspberry Pi with a 7-inch touchscreen

Overview


In this tutorial, I will show steps for setting up the Raspberry Pi 3B with a 7-inch touchscreen. Later, I will add a dual camera support. As usual, I am doing most of the work on the MacBook Pro, but the steps will easily translate to another operating system (Windows, or Linux).

I have ordered the touchscreen display a while ago and it's been sitting on my bench, but right now I am working on the image recognition in my car (a separate tutorial) and I would like to see what I am capturing, also to be able to start and to stop the process from a touchscreen.

I have ordered the case for the setup, but I have to see how it would work for me as I need a stereo (or rather dual) cameras that will require an additional pair of Raspberry Pi boards. I do not believe that Pi Zero will do, as I will do a heavy pre-processing of the images before sending them to the Machine Learning model.



There is also a 10.1-inch (1280x800) capacitive touchscreen available, but this might be for the next stage of the project.

The products mentioned are shown below:


Raspberry Pi 3B 7-inch touchscreen 7-inch case 10.1 touchscreen Infrared camera





Download SD Card Formatter for Mac


https://www.sdcard.org/downloads/formatter_4/eula_mac/index.html


Format the SD card




Download Raspbian with Desktop


https://www.raspberrypi.org/downloads/raspbian/


UZip the Rasbian OS and you get .img

2018-10-09-raspbian-stretch.zip
2018-10-09-raspbian-stretch.img

Check where is your SD Card mounted

$ diskutil list
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.9 GB disk2
1: Windows_FAT_32 PI3_RASBIAN 15.9 GB disk2s1

Unmount your SD Card




$ sudo diskutil unmountDisk /dev/disk2
Password:
Unmount of all volumes on disk2 was successful

 Put the image on the SD Card


$ sudo dd bs=1m if=/Users/uki/Downloads/2018-10-09-raspbian-stretch.img of=/dev/disk2
3944+0 records in
3944+0 records out

4135583744 bytes transferred in 3019.441172 secs (1369652 bytes/sec)

Wait a long time with no feedback.

Eject the SD Card


$ sudo diskutil eject /dev/disk2
Password:

Disk /dev/disk2 ejected

Insert the SD Card into the Raspberry Pi

Make sure you insert the SD Card correctly, the slot is under the Display ribbon.

Connect pins


  • --- RED 5V
  • --- BLACK Ground
  • --- GREEN (serial data) - SDA1 I/O I2C bus
  • --- YELLOW(system clock) - SCL1 I2C bus

The pin layout for Raspberry 2 and 3 is the same.







References:


TuriCreate: display images in Jupyter notebook instead using explore() method

When using TuriCreate in a Jupyter notebook, explore() method for images does not work very well. I created a helper method that shows me the images and their labels.


# shorthand
# sframe[3]['image'].show()

# image_testing_SFrame[0:5]['image'].explore()
sframe = image_testing_SFrame[0:5] # show first 5 records

def show_images(sframe, image_column="image", label_column="label"):
    for subset_dictionary in sframe:
        image = subset_dictionary[image_column]
        print(subset_dictionary[label_column])
        image.show()
show_images(sframe, image_column="image", label_column="label")
show_images(sframe)
 

TuriCreate: SFrame filter_by()

Create a subset SFrame by filtering a bigger SFrame




Filter using a single string


dogs_SFrame = image_training_SFrame.filter_by(values="dog", column_name="label", exclude=False) 
print(dogs_SFrame["label"][0:15]) 
['dog', 'dog', 'dog', 'dog', 'dog', 'dog', 'dog', 'dog', 'dog', 'dog', 'dog', 'dog', 'dog', 'dog', 'dog']


Filter using an array of strings


animals = ["dog", "cat", "bird"] 
animals_SFrame = image_training_SFrame.filter_by(values=animals, column_name='label', exclude=False) 
print(animals_SFrame["label"][0:15]) 
['bird', 'cat', 'cat', 'dog', 'bird', 'dog', 'bird', 'bird', 'cat', 'dog', 'cat', 'bird', 'cat', 'cat', 'dog']




Example:

training_sframes = {}
for label in unique_labels:
    #print (label)
    training_sframes[label] = image_training_SFrame.filter_by(
        values = label,
        column_name = "label",
        exclude = False)
   
for key_name in training_sframes: # dictionary training_sframes
    print(key_name)




TuriCreate: Find unique records in a SFrame

Find unique records in a dataset (SFrame)




labels_column_SArray = SFrame_DataSet['label']
print(type(labels_column_SArray))
unique_labels = labels_column_SArray.unique()
print(unique_labels)
['bird', 'dog', 'cat', 'automobile']



multi_cam_pi

https://www.pyimagesearch.com/2016/01/18/multiple-cameras-with-the-raspberry-pi-and-opencv/

Fabric Python library to run SSH to multiple computers

Fabric Python library can be used to send SSH commands to multiple computers at the same time.

This comes useful when doing distributed updates to the SBC (i.e. Raspberry Pi) cluster.

http://www.fabfile.org/


A very BIG ML dataset un-TAR GZIP command

I have learned that none of my GUI Mac programs were able to expand the 13 GB dataset, however, the command line had no problem with it.


$ tar xvzf BIG_DATASET_MANY_THOUSANDS_FOLDERS.tar.gz

It would be great is it was this simple!

The command has failed as I run out of 41 GB of free disk space before I was able to expand it.

Alternatively, I considered going one directory at the time,

$ tar xvfz BIG_DATASET_MANY_THOUSANDS_FOLDERS.tar.gz /directory_path


with a script that traverses the directories. This way I can keep track which directories were correctly expanded.

At this point, I ended up with multiple directories on various disks, a directory merging tool is very useful:

# parameters:
# -a --archive; look at everything recursively
# -i; --itemize-changes; print update about each file
# -h; --human-readable
# -W; --whole-file; avoid file deltas
# --progress; show progress in terminal
# --log-file=XYZ.log; log the progress to file, this might be useful when resuming
$ rsync -aW source_directory/ destination_directory/


References:

  • https://www.thegeekstuff.com/2010/04/unix-tar-command-examples/
  • https://medium.com/@sethgoldin/a-gentle-introduction-to-rsync-a-free-powerful-tool-for-media-ingest-86761ca29c34









Re-installing Anaconda for TuriCreate environment

Recently, I run out of disk space and had to move my Anaconda to a disk with more room.

I had a bad experience with moving the anaconda3 folder, so I opted to do a full installation.

1) Download Anaconda installer


Usually, I grab the newest version 3, but truthfully, TuriCreate still uses old python-2.7.15.

https://www.anaconda.com/download/#macos

Install it in the new location following GUI screens.

2) Back up your existing conda env

If you have an environment that you want to preserve, you can save its configuration to a small yml file.

$ conda env export > environment_turi_20181105.yml

3) Delete the previous location of Anaconda


rm -r .... /anacondaX/

4) Restore the conda evn from yml file

I provided you my yml file for convenience.
conda env create -f environment_turi_20181105.yml

5) Change to that conda env




$ conda activate turi


and make sure conda env is correct:

$ conda env list
# conda environments:
#
/Users/uki/.julia/conda/3
/Users/uki/.julia/packages/ORCA/uEiWT/deps
base /anaconda2
turi * /anaconda2/envs/turi

6) Re-install Jupyter Notebook kernel


python -m ipykernel install --user --name turi --display-name "Python 2.7 (turi)"

7) Start Jupyter Notebook and test 


$ jupyter notebook




Installing Turi Create on Python 3.6 Anaconda Environment

Installing TuriCreate on Python 3.6 Anaconda Environment

1) Check what Python version Apple Turi Create supports



Turi Create requires:
  • Python 2.7, 3.5, 3.6

2) Switch to Python 3.6 environment

$ source activate py36



$ conda env list
# conda environments:
/Users/uki/.julia/conda/3
/Users/uki/.julia/packages/ORCA/uEiWT/deps
base /Volumes/DATA/anaconda3
py2 /Volumes/DATA/anaconda3/envs/py2
py36 * /Volumes/DATA/anaconda3/envs/py36

3) Find TuriCreate v5.1.0 package

Browse: https://anaconda.org/derickl/turicreate

$ conda install -c derickl turicreate

4) Install Jupyter Notebook kernel conda module 


$ conda install ipykernel

5) Make sure all the packages are matching and updated

$ conda update --all

6) Install Jupyter Notebook kernel with this Environment


python -m ipykernel install --user --name py36 --display-name "Python 3.6 Turi (env py36)"
Installed kernelspec py36 in /Users/uki/Library/Jupyter/kernels/py36

7) Backup your Environment

Just because things go wrong all the time.

$ conda env export > environment_py36_20181102.yml

8) Start Jupyter notebook


$ jupyter notebook



Test Turi in Jupyter Notebook


import turicreate as turi
WARNING: You are using MXNet 1.2.1 which may result in breaking behavior. To fix this, please install the currently recommended version: pip uninstall -y mxnet && pip install mxnet==1.1.0 If you want to use a CUDA GPU, then change 'mxnet' to 'mxnet-cu90' (adjust 'cu90' depending on your CUDA version):




(py36) $ pip uninstall -y mxnet && pip install mxnet==1.1.0












Jupyter Error 49







$ jupyter notebook

Traceback (most recent call last):

File "/anaconda3/bin/jupyter-notebook", line 11, in


sys.exit(main())

File "/anaconda3/lib/python3.7/site-packages/jupyter_core/application.py", line 266, in launch_instance

return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)

File "/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 657, in launch_instance

app.initialize(argv)

File "", line 2, in initialize

File "/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error

return method(app, *args, **kwargs)

File "/anaconda3/lib/python3.7/site-packages/notebook/notebookapp.py", line 1602, in initialize

self.init_webapp()

File "/anaconda3/lib/python3.7/site-packages/notebook/notebookapp.py", line 1381, in init_webapp

self.http_server.listen(port, self.ip)

File "/anaconda3/lib/python3.7/site-packages/tornado/tcpserver.py", line 143, in listen

sockets = bind_sockets(port, address=address)

File "/anaconda3/lib/python3.7/site-packages/tornado/netutil.py", line 168, in bind_sockets

sock.bind(sockaddr)

OSError: [Errno 49] Can't assign requested address


Short Answer



$ jupyter notebook --ip=127.0.0.1


PORT 8888

You can also explore what you are already running on PORT 8888

$ lsof | grep 8888Skype      407  uki  txt       REG                1,5   

$ lsof -nP | grep 8888

Julia

Download Julia


https://julialang.org/downloads/

For me, MacOS Package (.dmg)


               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org  (_)     | (_) (_)    |   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.  | | | | | | |/ _` |  |  | | |_| | | | (_| |  |  Version 1.0.1 (2018-09-29) _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release|__/                   |
julia> println("Hello World,", "Julia!")Hello World,Julia!

Clone Julia:



git clone https://github.com/JuliaLang/julia.git

Visit JuliaBox.com (iJulia Jupyter notebooks):


JuliaBox.com


Install Juno (Atom IDE)


http://docs.junolab.org/latest/man/installation.html

iJulia in Jupyter Notebook



julia> using Pkg
julia> Pkg.add("IJulia")



Jupyter NBInclude.jl


https://github.com/stevengj/NBInclude.jl


$ git clone https://github.com/stevengj/NBInclude.jl.git julia_NBInclude



Windows 10 UBuntu bash

My company uses mostly Windows and Ubuntu servers, I requested a MacBook, obviously.

However, there are certain internally-written programs that will run on the Windows only, so I run Parallels hypervisor with Windows 10 and Ubuntu.

On Windows 10, I have a hard time with the Command Prompt, last time I used DOS was in c. 1999, so I opted to try installing Bash.

$ ping Google.com
PING Google.com (74.125.138.102) 56(84) bytes of data.
64 bytes from yi-in-f102.1e100.net (74.125.138.102): icmp_seq=1 ttl=128 time=30.4 ms

$ ssh dummy@74.125.138.102
ssh: connect to host 74.125.138.102 port 22: Connection refused

Checking for Python


$ python --version

Command 'python' not found, but can be installed with:

sudo apt install python3
sudo apt install python
sudo apt install python-minimal

You also have python3 installed, you can run 'python3' instead.

$ python3 --version
Python 3.6.5

$ python3
Python 3.6.5 (default, Apr  1 2018, 05:46:30)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hello World")
Hello World
>>> exit()
$

Attempting to get Anaconda


wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda-2.3.0-Linux-x86_64.sh
$ chmod +x Anaconda-2.3.0-Linux-x86_64.sh
$ . Anaconda-2.3.0-Linux-x86_64.sh
-bash: .: Anaconda-2.3.0-Linux-x86_64.sh: cannot execute binary file


$ java

Command 'java' not found, but can be installed with:

$ sudo apt install default-jre
$ sudo apt install openjdk-11-jre-headless
$ sudo apt install openjdk-8-jre-headless
$ sudo apt install openjdk-11-jre-headless

$ java --version
openjdk 10.0.1 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)

Amazon remembers 30 of my past mobile devices!

It is funny, Amazon remembers 30 of my past mobile devices!

I had no idea until I have clicked for a new book to be delivered to my Kindle app.

Can you say I have been into mobile development since 2009?



graphlab.canvas.set_target('ipynb') error

I am getting an error in the following line:

graphlab.canvas.set_target('ipynb') # alternative 'browser', port=8889


/Volumes/DATA/anaconda3/envs/py27/lib/python2.7/site-packages/graphlab/canvas/server.pyc
108 self.__server = tornado.httpserver.HTTPServer(self.__application, io_loop=self.__loop)
TypeError: initialize() got an unexpected keyword argument 'io_loop'

Fix Attempt 1:

 
$ conda update tornado
environment location: /Volumes/DATA/anaconda3/envs/py27
tornado: 5.1-py27h1de35cc_0 --> 5.1.1-py27h1de35cc_0
Fix is not successful


Fix Attempt 2:

Reinstall Anaconda3

Conda environment as a Jupyter Notebook kernel

Conda Environment as a Jupyter Notebook kernel


Update conda

$ conda activate base
$ conda update -n base -c defaults conda
$ conda update --all -y

Add conda tensorflow environment

$ conda create -n py_36_tf python=3.6 tensorflow -y

List currently installed Jupyther kernels 



$ ls -alt ~/Library/Jupyter/kernels/


total 0
drwx------ 7 uki staff 224 Nov 22 11:50 ..
drwxr-xr-x 9 uki staff 288 Nov 22 11:43 .
drwxr-xr-x 5 uki staff 160 Nov 4 06:35 julia-1.4
drwxr-xr-x 5 uki staff 160 Apr 1 2020 python361064bitpy36condaa60168e76a7b4349b469299762ee4c30
drwxr-xr-x 5 uki staff 160 Apr 1 2020 python38264bitpytorchcondaaf5a833263b448b8b2738bb5a7355c8a
drwxr-xr-x 5 uki staff 160 Apr 1 2020 python361064bitturiconda565ecc262d0845fbb235ae21ac24296f



List conda environments you already created



$ conda info --envs

 

# conda environments:
#

/Users/uki/.julia/conda/3
base * /opt/anaconda3
py27 /opt/anaconda3/envs/py27
py36 /opt/anaconda3/envs/py36
py_36_tf /opt/anaconda3/envs/py_36_tf
pytorch /opt/anaconda3/envs/pytorch
tensorflow /opt/anaconda3/envs/tensorflow
turi /opt/anaconda3/envs/turi


Install new Jupyther kernel


$ python -m ipykernel install --user --name py_36_tf --display-name "Python 3.6 (tensorflow)"





Installed kernelspec py_36_tf in /Users/uki/Library/Jupyter/kernels/py_36_tf

Refresh a page with Jupyther Lab notebook and change to the new kernel.




Delete kernels that you want to replace


$ rm -r ~/Library/Jupyter/kernels/my_old_kernel_name

 

Microsoft Excel spreadsheet creates 1,048,576 rows!

I am sorry Microsoft, I really thought you have improved, but sometimes you just amaze me...

I bought my own Office license, so I am a paying customer.

The Excel creates 1,048,576 rows and yes, this brings the spreadsheet to a holt.

I am not making this up, there is an official post on it:

https://support.office.com/en-us/article/Locate-and-reset-the-last-cell-on-a-worksheet-C9E468A8-0FC3-4F69-8038-B3C1D86E99E9

The question is why in the world would you do it to a new spreadsheet with a few rows of actual data?

Force-killing frozen Excel

Re-opening the Excel reveals the same condition.


Select and Delete All Empty Rows

You can select and delete all rows below your last row with data.
- Select the first EMPTY row.
Depending on your keyboard you can use the following key combination:
- SHIFT + CONTROL + Arrow DOWN
or
- Control + END
- Right click and select DELETE

IT WORKS, then it recreated 1,048,576 rows!
The developer who created this functionality should be forced to do some very unpleasant things for each row created.

Hiding millions of rows and columns

Some people suggest to select and hide the offending rows and columns (to the right).
I have used it, but I think it is stupid, the rows are still there.

Select and Clear All Empty Rows

Since the cells were auto-generated, I am not sure why the article is suggesting this, but I tried this too.

- Select all empty cells (same as above)
- Right click and "Clear Contents"
- Save file
- Close
- Open file
No difference

Try #2


- Select all empty cells (same as above)
- Home > Clear > Clear All
- Save file
- Close
- Open file
No difference

The file on the disk is 29.5 MB


The Best Solution

- Select ALL POPULATED cells
- Open Apple Numbers
- paste cells
- Export file to Excel when you have to send it to coworkers

The file on the disk is 8 kB




Please share and donate!

Jupyter TOC

In order to create a Table of Contents in Jupyter Notebook, you need anchor tags above the headings:

replace_record
">

## Table of Contents

1. [Reading the CSV file](#Reading-CSV-file)
1. [The article's HTML template](#template)
1. [Main part - replace for every record](#replace_record)




Chrome Refresh

Caching of old content in the browser can drive you nuts when you develop HTML pages.

On Mac Google Chrome you refresh bypassing the cache by:

Holding both the ⌘ Cmd and ⇧ Shift keys and pressing the R key.

PCA9685



pip install Adafruit-PCA9685



References:

https://learn.adafruit.com/adafruit-16-channel-servo-driver-with-raspberry-pi/overview


L298N H-bridge Motor Controller

L298N H-bridge Motor Controller




Connecting to Raspberry Pi Zero


Ubiquity Robotics Ubuntu Pi image for Pi with ROS

Ubiquity Robotics Lubuntu Pi image for Pi


On Ubuntu OS:
sudo apt install gnome-disk-utility

On Mac OS:
https://etcher.io/

Raspberry Pi 3 Model B
User :Ubuntu
Password: ubuntu (please change)




Pi HotSpot:

SSID is ubiquityrobotXXXX
where XXXX is part of the MAC address
Password: robotseverywhere







$ ssh ubuntu@192.168.50.16

The authenticity of host '192.168.50.16 (192.168.50.16)' can't be established.

ECDSA key fingerprint is SHA256:xq7SSuVwuVdifKaZGNqgt09LiDiZ0cnayd1tp4kWzD4.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '192.168.50.16' (ECDSA) to the list of known hosts.

ubuntu@192.168.50.16's password:

Welcome to Ubuntu 16.04.4 LTS (GNU/Linux 4.9.80-v7+ armv7l)

* Documentation: https://help.ubuntu.com

* Management: https://landscape.canonical.com

* Support: https://ubuntu.com/advantage

464 packages can be updated.

140 updates are security updates.
...


ubuntu@ubiquityrobot:~$ sudo apt-get update
[sudo] password for ubuntu:


ubuntu@ubiquityrobot:~$ sudo apt-get upgrade

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?




Disable the Ubiquity Robotics scripts (unless you run their robots):
$ sudo systemctl disable magni-base
Removed symlink /etc/systemd/system/multi-user.target.wants/magni-base.service.





References:

https://ubuntu-pi-flavour-maker.org/

Ubiquity Robotics Lubuntu Pi image for Pi: