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





As an Amazon Associate I earn from qualifying purchases.

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





As an Amazon Associate I earn from qualifying purchases.

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:



As an Amazon Associate I earn from qualifying purchases.

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:



As an Amazon Associate I earn from qualifying purchases.

CANtact v1.0 Open Source Controller Area Network (CAN) to USB Converter

CANtact v1.0 Open Source Controller Area Network (CAN) to USB Converter





References:



As an Amazon Associate I earn from qualifying purchases.

CANtact v1.0 Open Source Controller Area Network (CAN) to USB Converter

CANtact v1.0 Open Source Controller Area Network (CAN) to USB Converter





References:



As an Amazon Associate I earn from qualifying purchases.

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






As an Amazon Associate I earn from qualifying purchases.

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






As an Amazon Associate I earn from qualifying purchases.

Distributed Cloud as a Pathway to Adaptable Artificial Intelligence.

I have published a new article on Medium.com

Distributed Cloud as a Pathway to Adaptable Artificial Intelligence.


https://medium.com/@ukidlucas/distributed-machine-learning-and-gp-ai-fc2a0e3f6db


As an Amazon Associate I earn from qualifying purchases.

Distributed Cloud as a Pathway to Adaptable Artificial Intelligence.

I have published a new article on Medium.com

Distributed Cloud as a Pathway to Adaptable Artificial Intelligence.


https://medium.com/@ukidlucas/distributed-machine-learning-and-gp-ai-fc2a0e3f6db


As an Amazon Associate I earn from qualifying purchases.

singularity

I wrote a new article on Medium.

Distributed Machine Learning and AI

https://medium.com/@ukidlucas/distributed-machine-learning-and-gp-ai-fc2a0e3f6db


As an Amazon Associate I earn from qualifying purchases.

singularity

I wrote a new article on Medium.

Distributed Machine Learning and AI

https://medium.com/@ukidlucas/distributed-machine-learning-and-gp-ai-fc2a0e3f6db


As an Amazon Associate I earn from qualifying purchases.

AUTOSAR









As an Amazon Associate I earn from qualifying purchases.

AUTOSAR









As an Amazon Associate I earn from qualifying purchases.

Enable code completion in Jupyter Notebook




$ pip install jupyter_contrib_nbextensions
$ jupyter contrib nbextension install --user
$ jupyter notebook


Open "Nbextensions" tab, select Hinterland




As an Amazon Associate I earn from qualifying purchases.

Enable code completion in Jupyter Notebook




$ pip install jupyter_contrib_nbextensions
$ jupyter contrib nbextension install --user
$ jupyter notebook


Open "Nbextensions" tab, select Hinterland




As an Amazon Associate I earn from qualifying purchases.

Ryzen-Hackintosh








As an Amazon Associate I earn from qualifying purchases.

Ryzen-Hackintosh








As an Amazon Associate I earn from qualifying purchases.

AWS-Lambda-Android







As an Amazon Associate I earn from qualifying purchases.

AWS-Lambda-Android







As an Amazon Associate I earn from qualifying purchases.

ROSberryPi








As an Amazon Associate I earn from qualifying purchases.

ROSberryPi








As an Amazon Associate I earn from qualifying purchases.

#book: 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:


As an Amazon Associate I earn from qualifying purchases.

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:


As an Amazon Associate I earn from qualifying purchases.

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




As an Amazon Associate I earn from qualifying purchases.

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




As an Amazon Associate I earn from qualifying purchases.

TensorFlow-serving


TensorFlow Docker Serving








As an Amazon Associate I earn from qualifying purchases.

TensorFlow-serving


TensorFlow Docker Serving








As an Amazon Associate I earn from qualifying purchases.

Android Vendor Testing Suite (VTS)


Android Vendor Testing Suite (VTS)





As an Amazon Associate I earn from qualifying purchases.

Android Vendor Testing Suite (VTS)


Android Vendor Testing Suite (VTS)





As an Amazon Associate I earn from qualifying purchases.

Is the (Android) user a goat?

Is the (Android) user a goat?

A very important method to know your users. 





As an Amazon Associate I earn from qualifying purchases.

Is the (Android) user a goat?

Is the (Android) user a goat?

A very important method to know your users. 





As an Amazon Associate I earn from qualifying purchases.

Detroit Autonomous Vehicle and Robotics Meetup



Detroit Autonomous Vehicle and Robotics Meetup 


Thursday, November 15, 2018, from 6:00 PM to 9:00 PM (EST)

Detroit, MI
EventBright.com



As an Amazon Associate I earn from qualifying purchases.

Detroit Autonomous Vehicle and Robotics Meetup



Detroit Autonomous Vehicle and Robotics Meetup 


Thursday, November 15, 2018, from 6:00 PM to 9:00 PM (EST)

Detroit, MI
EventBright.com



As an Amazon Associate I earn from qualifying purchases.

AI-career

I have updated the article on LinkedIn:

High Tech (as in A.I.) career path.


https://www.linkedin.com/pulse/how-stay-relevant-your-high-tech-career-uki-dominque-lucas/


As an Amazon Associate I earn from qualifying purchases.

AI-career

I have updated the article on LinkedIn:

High Tech (as in A.I.) career path.


https://www.linkedin.com/pulse/how-stay-relevant-your-high-tech-career-uki-dominque-lucas/


As an Amazon Associate I earn from qualifying purchases.

LattePanda SBC "Hackintosh" with TuriCreate Machine Learning for in-car applications.

The new LattePanda Alpha Single Board Computer has ample 8GB of RAM, operates on 12V, can run a MacOS with TuriCreate Machine Learning and use massive GPU connected via the M.2 bus, hence making it an excellent in-vehicle machine learning platform. 




References:




As an Amazon Associate I earn from qualifying purchases.

LattePanda SBC "Hackintosh" with TuriCreate Machine Learning for in-car applications.

The new LattePanda Alpha Single Board Computer has ample 8GB of RAM, operates on 12V, can run a MacOS with TuriCreate Machine Learning and use massive GPU connected via the M.2 bus, hence making it an excellent in-vehicle machine learning platform. 




References:




As an Amazon Associate I earn from qualifying purchases.

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



As an Amazon Associate I earn from qualifying purchases.

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



As an Amazon Associate I earn from qualifying purchases.

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:




As an Amazon Associate I earn from qualifying purchases.

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:




As an Amazon Associate I earn from qualifying purchases.

Post Scriptum

The views in this article are mine and do not reflect those of my employer.
I am preparing to cancel the subscription to the e-mail newsletter that sends my articles.
Follow me on:
X.com (Twitter)
LinkedIn
Google Scholar

Popular Recent Posts

Most Popular Articles

apt quotation..