AWS
Python Program with Auto-Upgrade Mechanism
Following Python code checks if a newer version is available on AWS S3, downloads the new version and automatically launches the newer version with initial arguments. The code is working on Linux, MacOS and Windows.
AWS
Jenkinsfile – Copy S3 Objects to EFS
The code below is example of Jenkins job that copies files or folders form S3 bucket to EFS
AWS
Boto3: Create EC2 with Volume, UserData, Tags and more
The code below creates AWS EC2 instance from AMI, attaches a volume to it and assigns tags both to the instance and to the volume. During creation I attach to the instance a SubnetId, ScurityGroup and UserData which contains initialization script for the instance.
Python
Python3 Async/Await Example
What is Coroutine? In short - coroutine is a form of sequential processing. Meaning that coroutines are actually always running concurrently and never in parallel! Next question rises - why the heck someone would prefer coroutines over threads that are running in parallel?
The answer is that coroutines can provide a very high level of concurrency with very little overhead.
Code Example
Python Multiprocessing Example
In the last post we saw what are the differences between Multiprocessing and Multithreading in Python3 and the code sample which uses concurrent.futures library for crawling URLs in separate threads.
Here we...
Code Example
Python Example Multithreading with Concurrent Futures
Before we start you should understand the difference between Multiprocessing and Multithreading. To keep things simple I just put this quick comparison here.
Multiprocessing
+ Great for CPU bound applications
+ Takes advantage of...