Python: difference between list and tuple with examples
Cloud Vedas
by
10M ago
Lists and tuples both are used to store data in a sequence in Python. Lists are enclosed in square brackets [ ], whereas tuples are enclosed in parentheses ( ). Here is an example of creating a list in Python: cv_list = [1, 2, 3, 4, 5] And here is an example of creating a tuple in Python: cv_tuple = (1, 2, 3, 4, 5) To access elements in a list or tuple, you use indexing and slicing. The first element in a list or tuple has an index of 0. Here is an example of indexing in a list: print(cv_list[0]) # Output: 1 And here is an example of indexing in a tuple: print(cv_tuple[0]) # Outp ..read more
Visit website
How to prepare for Certified Kubernetes Administrator exam
Cloud Vedas
by
2y ago
Hello everyone I have recently cleared the Certified Kubernetes Administrator (CKA) exam by Cloud Native Computing Foundation (CNCF), in collaboration with The Linux Foundation. In this blog I will share the strategy I used to prepare for the exam and the important tips you should remember while you are actually giving the exam. My exam was on 1.22 version of CKA. which is the latest exam version as of 21-Oct-21. You can see broad level domains tested in this exam here . CKA is bit different from many other professional exams of like AWS, Azure or GCP etc. CKA is lab based practi ..read more
Visit website
Solved : How to zip directories in Linux
Cloud Vedas
by
2y ago
In this post we will see how you can use zip command in Linux to compress directories and files and unzip them. zip is also very useful if you have to further uncompress the files on windows machine as by default windows allows you to open zip files without installing any extra program. First let's install zip. Below we will show installation instruction for both Ubuntu and Redhat linux/CentOS. Ubuntu : Update the package repo: root@CloudVedas:~# sudo apt-get update Now let's install zip and unzip packages: sudo apt-get install zip unzip -y RHEL/CentOS: Update the package repo: root ..read more
Visit website
Solved : Unable to locate package error in Ubuntu
Cloud Vedas
by
2y ago
During installation of a package in ubuntu you may get an error Unable to locate package .  In this post we will show you how you can fix that error and continue with your installation.  Below is a sample error I got while installing vagrant.  But, the solution discussed below is common for any package installation in ubuntu. root@cloudvedas:~# apt install vagrant Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package vagrant To resolve this issue you have to update your apt repo. You can simply do this by run ..read more
Visit website
Solved : How to zip and unzip files in Python
Cloud Vedas
by
2y ago
In this post we will see how to zip and unzip files in python using two modules zipfile and shutil . You can execute below commands in Jupyter notebook or IDE like Pycharm. Create a zip using zipfile First we will use a python module called zipfile to create a zip file containing multiple files. #import required modulesimport zipfile#Let's create a zip file first by giving it a namenew_zip = zipfile.ZipFile('zip_file.zip','w')#Add two files which we want to zipnew_zip.write("abc.txt",compress_type=zipfile.ZIP_DEFLATED)new_zip.write("fileloop.py",compress_type=zipfile.ZIP_DEFLATED)#Close t ..read more
Visit website
Most useful Tar command examples
Cloud Vedas
by
3y ago
Many softwares are distributed by compressing them using tar so the examples below will guide you how you can uncompress or open such files. In this post we will also see how to use the tar command to compress your files and directories. This command is very useful when you have to archive or share huge directories or files.  Create a tar  In the below example we have a directory called cloudvedas which has multiple files. Let's tar this directory. With -v option you can see what all files it is adding in the tar ball. cvterm#tar -cvf cloudvedas.tar cloudvedas cloudvedas/ cloud ..read more
Visit website
Steps to create docker containers in your laptop
Cloud Vedas
by
3y ago
In this post we will see how to create a docker container of ubuntu on your windows laptop. Pre-requisites:-I am using “Docker for Windows” software to run dockers on my Windows 10 laptop. You can get “Docker for Windows” by clicking on this link . If you have Windows 7 download Docker Toolbox for Windows with Virtualbox. Ubuntu docker creation Once you are done with docker installation let’s move ahead. In the windows command prompt or in “Docker Quickstart Terminal” execute below command. By default it will pull the latest image of ubuntu container available in rep ..read more
Visit website
How to become a Google Cloud Certified Professional Cloud Architect
Cloud Vedas
by
3y ago
In this post I'll be giving tips on how to prepare for Google Cloud Certified Professional Cloud Architect exam. This will also be helpful for people who are currently working on other cloud platforms like AWS or Azure and looking for broadening their skills to Google Cloud Platform (GCP). As many you who are following this blog knows that I am already working on AWS and Azure. About a couple of years back we got heavily into Kubernetes. Being a curious techie when I started digging further about Kubernetes, I found that it was initially designed by Google. One thing led to another and I ..read more
Visit website
How to transfer files to EC2 instance
Cloud Vedas
by
3y ago
In our earlier post we showed how you can use Filezilla a GUI based solution to transfer files to an EC2 instance. But, in many companies installation of third party software like Filezilla is not allowed.  So, in this post we will show you how you can transfer files to and from an EC2 linux instance using our old trustworthy friend SFTP.  For those who don't know about sftp let us give you a gist of what it is. SFTP is SSH File Transfer Protocol (also Secure File Transfer Protocol, or SFTP)  thus it works on same port 22 as ssh. It's secure in comparison to ..read more
Visit website
AWS Subnet Calculator
Cloud Vedas
by
4y ago
This is a simple calculator to let you know how many IPv4 IPs you will get when you create a Subnet in AWS.  AWS allows subnet mask only between /16 to /28 . Few IPs in each subnet are reserved for AWS internal usage .  To calculate for e.g. in subnet 10.0.0.0/24 subnet mask is 24 so, enter 24 below to get available IPs in this subnet .  Enter Subnet Mask Calculate IPs Disclaimer: Please note that this is not an offical AWS calculator. Please visit AWS VPC for more details ..read more
Visit website

Follow Cloud Vedas on FeedSpot

Continue with Google
Continue with Apple
OR