Wednesday, 3 January 2024

what is the difference between display( ) and show( )?

 


display( ) is an object method as it receives the address of the object

(inself) using which it is called. show( ) is class method and it can be

called independent of an object.

In the given code snippet, display() is a method of a class (Message), and show() is a standalone function. The key difference lies in their usage and the context in which they are defined.

display(self, msg):

This is a method of a class named Message.

The method takes two parameters: self (a reference to the instance of the class) and msg (another parameter).

The display() method is intended to be called on an instance of the Message class, and it can access and manipulate the attributes of that instance.

Example:

# Creating an instance of the Message class

my_message = Message()


# Calling the display method on the instance

my_message.display("Hello, World!")

show(msg):

This is a standalone function that is not part of any class.

It takes a single parameter, msg.

The show() function is not associated with any specific instance of a class and does not have access to instance-specific attributes.

Example:

# Calling the show function without an instance

show("Hello, World!")

In summary, the display() method is associated with instances of the Message class and can be called on those instances, while the show() function is standalone and can be called without creating an instance of any class. The distinction between methods and standalone functions is an essential concept in object-oriented programming.

How much do you know about classes and objects in python?

 


a. Class attributes and object attributes are same.

Answer

False

b. A class data member is useful when all objects of the same class must

share a common item of information.

Answer

True

c. If a class has a data member and three objects are created from this class,

then each object would have its own data member.

Answer

True

d. A class can have class data as well as class methods.

Answer

True

e. Usually data in a class is kept private and the data is accessed /

manipulated through object methods of the class.

Answer

True

f. Member functions of an object have to be called explicitly, whereas, the

_init_( ) method gets called automatically.

Answer

True

g. A constructor gets called whenever an object gets instantiated.

Answer

True

h. The _init_( ) method never returns a value.

Answer

True

i. When an object goes out of scope, its _del_( ) method gets called

automatically.

Answer

True

j. The self variable always contains the address of the object using which

the method/data is being accessed.

Answer

True

k. The self variable can be used even outside the class.

Answer

False

l. The _init_( ) method gets called only once during the lifetime of an

object.

Answer

True

m. By default, instance data and methods in a class are public.

Answer

True

n. In a class 2 constructors can coexist-a 0-argument constructor and a 2-

argument constructor.

Answer

True

Tuesday, 2 January 2024

Hands-on Introduction to Linux Commands and Shell Scripting

 



What you'll learn

Describe the Linux architecture and common Linux distributions and update and install software on a Linux system. 

Perform common informational, file, content, navigational, compression, and networking commands in Bash shell. 

Develop shell scripts using Linux commands, environment variables, pipes, and filters.

Schedule cron jobs in Linux with crontab and explain the cron syntax.  

Join Free:Hands-on Introduction to Linux Commands and Shell Scripting

There are 4 modules in this course

This course provides a practical understanding of common Linux / UNIX shell commands. In this beginner friendly course, you will learn about the Linux basics, Shell commands, and Bash shell scripting.   

You will begin this course with an introduction to Linux and explore the Linux architecture. You will interact with the Linux Terminal, execute commands, navigate directories, edit files, as well as install and update software. 

Next, you’ll become familiar with commonly used Linux commands. You will work with general purpose commands like id, date, uname, ps, top, echo, man; directory management commands such as pwd, cd, mkdir, rmdir, find, df; file management commands like cat, wget, more, head, tail, cp, mv, touch, tar, zip, unzip; access control command chmod; text processing commands - wc, grep, tr; as well as networking commands - hostname, ping, ifconfig and curl.  

You will then move on to learning the basics of shell scripting to automate a variety of tasks. You’ll create simple to more advanced shell scripts that involve Metacharacters, Quoting, Variables, Command substitution, I/O Redirection, Pipes & Filters, and Command line arguments. You will also schedule cron jobs using crontab. 

The course includes both video-based lectures as well as hands-on labs to practice and apply what you learn. You will have no-charge access to a virtual Linux server that you can access through your web browser, so you don't need to download and install anything to complete the labs. 

You’ll end this course with a final project as well as a final exam. In the final project you will demonstrate your knowledge of course concepts by performing your own Extract, Transform, and Load (ETL) process and create a scheduled backup script. 

This course is ideal for data engineers, data scientists, software developers, and cloud practitioners who want to get familiar with frequently used commands on Linux, MacOS and other Unix-like operating systems as well as get started with creating shell scripts.

Scripting with Python and SQL for Data Engineering

 


What you'll learn

Extract data from different sources and map it to Python data structures.

Design Scripts to connect and query a SQL database from within Python.

Apply scraping techniques to read and extract data from a website.

Join Free:Scripting with Python and SQL for Data Engineering

There are 4 modules in this course

In this third course of the Python, Bash and SQL Essentials for Data Engineering Specialization, you will explore techniques to work effectively with Python and SQL. We will go through useful data structures in Python scripting and connect to databases like MySQL. Additionally, you will learn how to use a modern text editor to connect and run SQL queries against a real database, performing operations to load and extract data. Finally, you will use extracted data from websites using scraping techniques. These skills will allow you to work effectively when data is not readily available, or when spatial queries are required to extract useful information from databases.

Data Engineering Foundations Specialization

 


What you'll learn

Working knowledge of Data Engineering Ecosystem and Lifecycle. Viewpoints and tips from Data professionals on starting a career in this domain.

Python programming basics including data structures, logic, working with files, invoking APIs, using libraries such as Pandas and Numpy, doing ETL.

Relational Database fundamentals including Database Design, Creating Schemas, Tables, Constraints, and working with MySQL, PostgreSQL & IBM Db2.

SQL query language, SELECT, INSERT, UPDATE, DELETE statements, database functions, stored procs, working with multiple tables, JOINs, & transactions.

Join Free:Data Engineering Foundations Specialization

Specialization - 5 course series

Data engineering is one of the fastest-growing tech occupations, where the demand for skilled data engineers far outweighs the supply. The goal of data engineering is to make quality data available for fact-finding and data-driven decision making. This Specialization from IBM will help anyone interested in pursuing a career in data engineering by teaching fundamental skills to get started in this field. No prior data engineering experience is required to succeed in this Specialization.

 The Specialization consists of 5 self-paced online courses covering skills required for data engineering, including the data engineering ecosystem and lifecycle, Python, SQL, and Relational Databases.  You will learn these data engineering prerequisites through engaging videos and hands-on practice using real tools and real-world databases. You'll develop your understanding of data engineering, gain skills that can be applied directly to a data career, and build the foundation of your data engineering career.

 Upon successfully completing these courses, you will have the practical knowledge and experience to delve deeper into data engineering and work on more advanced data engineering projects. 

Applied Learning Project

All courses in the Specialization contain multiple hands-on labs and assignments to help you gain practical experience and skills.    

The projects range from working with data in multiple formats to transforming and loading that data into a single source to analyzing socio-economic data with SQL and working with advanced SQL techniques. 

You will work hands-on with multiple real-world databases and tools including MySQL, PostgresSQL, IBM Db2, PhpMyAdmin, pgAdmin, IBM Cloud, Python, Jupyter notebooks, Watson Studio, etc.

Introduction to R Programming for Data Science

 


What you'll learn

Manipulate primitive data types in the R programming language using RStudio or Jupyter Notebooks.

Control program flow with conditions and loops, write functions, perform character string operations, write regular expressions, handle errors. 

Construct and manipulate R data structures, including vectors, factors, lists, and data frames.

Read, write, and save data files and scrape web pages using R. 

Join Free:Introduction to R Programming for Data Science

There are 5 modules in this course

When working in the data science field you will definitely become acquainted with the R language and the role it plays in data analysis. This course introduces you to the basics of the R language such as data types, techniques for manipulation, and how to implement fundamental programming tasks. 

You will begin the process of understanding common data structures, programming fundamentals and how to manipulate data all with the help of the R programming language. 

The emphasis in this course is hands-on and practical learning . You will write a simple program using RStudio, manipulate data in a data frame or matrix, and complete a final project as a data analyst using Watson Studio and Jupyter notebooks to acquire and analyze data-driven insights.  
 
No prior knowledge of R, or programming is required.

Data Science with R - Capstone Project

 


What you'll learn

Write a web scraping program to extract data from an HTML file using HTTP requests and convert the data to a data frame.

Prepare data for modelling by handling missing values, formatting and normalizing data, binning, and turning categorical values into numeric values.

Interpret datawithexploratory data analysis techniques by calculating descriptive statistics, graphing data, and generating correlation statistics.

Build a Shiny app containing a Leaflet map and an interactive dashboard then create a presentation on the project to share with your peers.

Join Free:Data Science with R - Capstone Project

There are 6 modules in this course

In this capstone course, you will apply various data science skills and techniques that you have learned as part of the previous courses in the IBM Data Science with R Specialization or IBM Data Analytics with Excel and R Professional Certificate.

For this project, you will assume the role of a Data Scientist who has recently joined an organization and be presented with a challenge that requires data collection, analysis, basic hypothesis testing, visualization, and modeling to be performed on real-world datasets. You will collect and understand data from multiple sources, conduct data wrangling and preparation with Tidyverse, perform exploratory data analysis with SQL, Tidyverse and ggplot2, model data with linear regression, create charts and plots to visualize the data, and build an interactive dashboard.

The project will culminate with a presentation of your data analysis report, with an executive summary for the various stakeholders in the organization.

Python Coding challenge - Day 107 | What is the output of the following Python Code?

 


The output of the code will be 48.

Here's a breakdown of how the code works:

Function Definition:

The code defines a recursive function named fun that takes two integer arguments, x and y.

Base Case:

If x is equal to 0, the function returns y. This is the base case that stops the recursion.

Recursive Case:

If x is not 0, the function calls itself recursively with the arguments x - 1 and x * y. This means the function keeps calling itself with updated values until it reaches the base case.

Function Call and Output:

The code calls the fun function with the arguments 4 and 2: print(fun(4, 2)).

This initiates the recursive process, which unfolds as follows:

fun(4, 2) calls fun(3, 8) because 4 is not 0.

fun(3, 8) calls fun(2, 24).

fun(2, 24) calls fun(1, 48).

fun(1, 48) calls fun(0, 48).

Finally, fun(0, 48) returns 48 because x is now 0 (the base case is reached).

This value, 48, is then printed to the console, resulting in the output you see.

In essence, the code calculates a product of numbers in a recursive manner, with the final product being 2 * 4 * 3 * 2 = 48.

How much do you know about Recursion?

 


a. If a recursive function uses three variables a, b and c, then the same set

of variables are used during each recursive call.

Answer

True

b. If a recursive function uses three variables a, b and c, then the same set

of variables are used during each recursive call.

Answer

False

c. Multiple copies of the recursive function are created in memory.

Answer

False

d. A recursive function must contain at least 1 return statement.

Answer

True

e. Every iteration done using a while or for loop can be replaced with

recursion.

Answer

True

f. Logics expressible in the form of themselves are good candidates for

writing recursive functions.

Answer

True

g. Tail recursion is similar to a loop.

Answer

True

h. Infinite recursion can occur if the base case is not properly defined.

Answer

True

i. A recursive function is easy to write, understand and maintain as

compared to a one that uses a loop.

Answer

False

Monday, 1 January 2024

Python Coding challenge - Day 106 | What is the output of the following Python Code?

 


The above code  uses the filter function along with a lambda function to filter out elements from the list lst based on a condition. In this case, it filters out elements that have a length less than 8. Here's a breakdown of the code:

lst = ['Python', 'Clcoding', 'Intagram']

lst1 = filter(lambda x: len(x) >= 8, lst)

print(list(lst1))

lambda x: len(x) >= 8: This lambda function checks if the length of the input string x is greater than or equal to 8.


filter(lambda x: len(x) >= 8, lst): The filter function applies the lambda function to each element of the list lst. It retains only those elements for which the lambda function returns True.

list(lst1): Converts the filtered result into a list.

print(list(lst1)): Prints the final filtered list.

In this specific example, the output would be:

['Clcoding', 'Intagram']

This is because only the elements 'Clcoding' and 'Intagram' have lengths greater than or equal to 8.

How much do you know about Lambda?

 


a. lambda function cannot be used with reduce( ) function.

Answer

False

b. lambda, map( ), filter( ), reduce( ) can be combined in one single

expression.

Answer

True

c. Though functions can be assigned to variables, they cannot be called

using these variables.

Program

False

d. Functions can be passed as arguments to function and returned from

function.

Program

True

e. Functions can be built at execution time, the way lists, tuples, etc. can

be.

Program

True

f. Lambda functions are always nameless.

Program

True

Sunday, 31 December 2023

Happy New Year 2024

 

Free Code:

from colorama import Fore
def heart_shape(msg=" Happy New Year 2024"):
    lines = []
    for y in range(15, -15, -1):
        line = ""
        for x in range(-30, 30):
            f = ((x * 0.05) ** 2 + (y * 0.1) ** 2 - 1) ** 3 - (x * 0.05) ** 2 * (y * 0.1) ** 3
            line += msg[(x - y) % len(msg)] if f <= 0 else " "
        lines.append(line)
    print(Fore.BLUE+"\n".join(lines))
heart_shape()  # Call the function to create the heart
#clcoding.com

Python Coding challenge - Day 105 | What is the output of the following Python Code?

 


The given code creates a set s using a set comprehension to check if each element in the list lst is even (True) or not (False). The condition n % 2 == 0 is used to determine if an element is even. Here's the code and its output:

lst = [2, 7, 8, 6, 5, 5, 4, 4, 8]
s = {True if n % 2 == 0 else False for n in lst}
print(s)

Output:

{False, True}

In this case, the set s contains both True and False because there are even and odd numbers in the list. The set comprehension creates a set of unique values based on the condition specified.

Using comprehension how will you convert

 

Using comprehension how will you convert

{'a' : 1, 'b' : 2, 'c' : 3, 'd' : 4, 'e' : 5}

into

{'A' : 100, 'B' : 200, 'C' : 300, 'D' : 400, 'E' : 500}?


Output

d = {'a' : 1, 'b' : 2, 'c' : 3, 'd' : 4, 'e' : 5}

d = {key.upper( ) : value * 100 for (key, value) in d.items( )}

print(d)


Another Method : 

original_dict = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5}

converted_dict = {key.upper(): value * 100 for key, value in original_dict.items()}

print(converted_dict)


The upper() method is used to convert the keys to uppercase, and the values are multiplied by 100. The resulting dictionary is {'A': 100, 'B': 200, 'C': 300, 'D': 400, 'E': 500}.






Saturday, 30 December 2023

Happy New Year 2024 using Python

 


Code:

import time

import random

import pyfiglet as pf

from pyfiglet import Figlet

from termcolor import colored

text = "Happy New Year 2024"

color_list = ['red', 'green', 'blue', 'yellow']

data_list = []

with open('texts.txt') as f:

    data_list = [line.strip() for line in f]

happy_new_year_art = pf.figlet_format(text)

for i in range(0, 1):

    if i % 2 == 0:

        f = Figlet(font=random.choice(data_list))

        text_art = colored(f.renderText(text), random.choice(color_list))

    else:

        text_art = happy_new_year_art

    print("\n", text_art)

   

#clcoding.com

Friday, 29 December 2023

Python Coding challenge - Day 104 | What is the output of the following Python Code?

 


print(max(min(False, False), 1, True))

1

Explanation:

The min function returns the smallest value among its arguments. Since False is considered 0 in Python, the min of False and False is still False. Then, the max function returns the largest value among False, 1, and True. Since True is equivalent to 1 in Python and 1 is greater than 0, the max function returns 1.

Python Coding challenge - Day 103 | What is the output of the following Python Code?

 


Code : 

print(min(max(False,-3,-4), 2,7))


Let's break down the expression step by step:

max(False, -3, -4): This evaluates to False because False is treated as 0 in numerical comparisons, and 0 is not greater than -3 or -4.

min(False, 2, 7): This evaluates to False because False is treated as 0 in numerical comparisons, and 0 is the minimum among False, 2, and 7.

So, the output of the expression will be False.

Artificial Intelligence on Microsoft Azure

 


What you'll learn

How to identify guiding principles for responsible AI

How to identify features of common AI workloads

Join Free:Artificial Intelligence on Microsoft Azure

There is 1 module in this course

Whether you're just beginning to work with Artificial Intelligence (AI) or you already have AI experience and are new to Microsoft Azure, this course provides you with everything you need to get started. Artificial Intelligence (AI) empowers amazing new solutions and experiences; and Microsoft Azure provides easy to use services to help you build solutions that seemed like science fiction a short time ago; enabling incredible advances in health care, financial management, environmental protection, and other areas to make a better world for everyone.

In this course, you will learn the key AI concepts of machine learning, anomaly detection, computer vision, natural language processing, and conversational AI. You’ll see some of the ways that AI can be used and explore the principles of responsible AI that can help you understand some of the challenges facing developers as they try to create ethical AI solutions. 

This course will help you prepare for Exam AI-900: Microsoft Azure AI Fundamentals. This is the first course in a five-course program that prepares you to take the AI-900 certification exam. This course teaches you the core concepts and skills that are assessed in the AI fundamentals exam domains.  This beginner course is suitable for IT personnel who are just beginning to work with Microsoft Azure and want to learn about Microsoft Azure offerings and get hands-on experience with the product. Microsoft Azure AI Fundamentals can be used to prepare for other Azure role-based certifications like Microsoft Azure Data Scientist Associate or Microsoft Azure AI Engineer Associate, but it is not a prerequisite for any of them.

This course is intended for candidates with both technical and non-technical backgrounds. Data science and software engineering experience is not required; however, some general programming knowledge or experience would be beneficial.  To be successful in this course, you need to have basic computer literacy and proficiency in the English language. You should be familiar with basic computing concepts and terminology,  general technology concepts, including concepts of machine learning and artificial intelligence.

AI, Business & the Future of Work

 


What you'll learn

How AI can give you better information upon which to make better decisions.

How AI can help you automate processes and become more efficient.

How AI will impact your industry so that you can avoid the pitfalls and seize the benefits.

Join Free:AI, Business & the Future of Work

There are 4 modules in this course

This course from Lunds university will help you understand and use AI so that you can transform your organisation to be more efficient, more sustainable and thus innovative. 

The lives of people all over the world are increasingly enhanced and shaped by artificial intelligence. To organisations there are tremendous opportunities, but also risks, so where do you start to plan for AI, business and the future of work?

Whether you are in the public or private sector, in a large organisation or a small shop, AI has a growing impact on your business. Most organisations don’t have a strategy in place for how to make AI work for them. 

The teacher, Anamaria Dutceac Segesten, will guide you through the topics with short lectures, interviews and interactive exercises meant to get you thinking about your own context.

12 industry professionals, AI experts and thought leaders from different industries have been interviewed and will complement the short lectures to give you a broad overview of perspectives on the topics. You will meet:

Kerstin Enflo
Professor in Economic History
Lund University

Dr. Irene Ek
Founder
Digital Institute

Samuel Engblom
Policy Director
The Swedish Confederation of Professional Employees

Pelle Kimvall
Lead Solution Ideator
AFRY X

Joakim Wernberg
Research Director, Digitalisation and Tech Policy
Swedish Entrepreneurship Forum

Marcus Henriksson
Empathic Leader of AI & Automation and Digital Business Development
Empathic

Johan Grundström Eriksson
Board Advisor, Innovation Management & Corporate Governance
Founder & Chairman, aiRikr Innovation AB

Jakob Svensson
Professor in Media and Communication Studies
Malmö University

Ulrik Franke
Senior Researcher
RISE Research Institutes of Sweden

Björn Lorentzon
Nordic Growth Lead
Sympa

Anna Felländer
Founder 
AI Sustainability Center

Prof. Fredrik Heintz
Associate Professor of Computer Science
Linköping University

AI Product Management Specialization

 


What you'll learn

Identify when and how machine learning can applied to solve problems

Apply human-centered design practices to design AI product experiences that protect privacy and meet ethical standards

Lead machine learning projects using the data science process and best practices from industry

Join Free:AI Product Management Specialization

Specialization - 3 course series

Organizations in every industry are accelerating their use of artificial intelligence and machine learning to create innovative new products and systems.  This requires professionals across a range of functions, not just strictly within the data science and data engineering teams, to understand when and how AI can be applied, to speak the language of data and analytics, and to be capable of working in cross-functional teams on machine learning projects.

This Specialization provides a foundational understanding of how machine learning works and when and how it can be applied to solve problems.  Learners will build skills in applying the data science process and industry best practices to lead machine learning projects, and develop competency in designing human-centered AI products which ensure privacy and ethical standards. The courses in this Specialization focus on the intuition behind these technologies, with no programming required, and merge theory with practical information including best practices from industry.  Professionals and aspiring professionals from a diverse range of industries and functions, including product managers and product owners, engineering team leaders, executives, analysts and others will find this program valuable.   

Applied Learning Project

Learners will implement three projects throughout the course of this Specialization:

1) In Course 1, you will complete a hands-on project where you will create a machine learning model to solve a simple problem (no coding necessary) and assess your model's performance.

2) In Course 2, you will identify and frame a problem of interest, design a machine learning system which can help solve it, and begin the development of a project plan.

3) In Course 3, you will perform a basic user experience design exercise for your ML-based solution and analyze the relevant ethical and privacy considerations of the project.

AI Foundations for Everyone Specialization

 


Advance your subject-matter expertise

Learn in-demand skills from university and industry experts

Master a subject or tool with hands-on projects

Develop a deep understanding of key concepts

Earn a career certificate from IBM

Join Free:AI Foundations for Everyone Specialization

Specialization - 4 course series

Artificial Intelligence (AI) is no longer science fiction. It is rapidly permeating all industries and having a profound impact on virtually every aspect of our existence. Whether you are an executive, a leader, an industry professional, a researcher, or a student - understanding AI, its impact and transformative potential for your organization and our society is of paramount importance. 

 This specialization is designed for those with little or no background in AI, whether you have technology background or not, and does not require any programming skills. It is designed to give you a firm understanding of what is AI, its applications and use cases across various industries. You will become acquainted with terms like Machine Learning, Deep Learning and Neural Networks. 

Furthermore, it will familiarize you with IBM Watson AI services that enable any business to quickly and easily employ pre-built AI smarts to their products and solutions. You will also learn about creating intelligent virtual assistants and how they can be leveraged in different scenarios.

 By the end of this specialization, learners will have had hands-on interactions with several AI environments and applications, and have built and deployed an AI enabled chatbot on a website – without any coding. 

Applied Learning Project

Learners will perform several no-code hands-on exercises in each of the  three courses. At the end of the last course, learners would have developed,  tested, and deployed a Watson AI powered customer service chatbot on a website to delight their clients.

AI For Business Specialization

 


Advance your subject-matter expertise

Learn in-demand skills from university and industry experts

Master a subject or tool with hands-on projects

Develop a deep understanding of key concepts

Earn a career certificate from University of Pennsylvania

Join Free:AI For Business Specialization

Specialization - 4 course series

This specialization will provide learners with the fundamentals of using Big Data, Artificial Intelligence, and Machine Learning and the various areas in which you can deploy them to support your business. You'll cover ethics and risks of AI, designing governance frameworks to fairly apply AI, and also cover people management in the fair design of HR functions within Machine Learning. You'll also learn effective marketing strategies using data analytics, and how personalization can enhance and prolong the customer journey and lifecycle. Finally, you will hear from industry leaders who will provide you with insights into how AI and Big Data are revolutionizing the way we do business.

By the end of this specialization, you will be able to implement ethical AI strategies for people management and have a better understanding of the relationship between data analytics, artificial intelligence, and machine learning. You will leave this specialization with insight into how these tools can shape and influence how you manage your business. 

For additional reading, Professor Hosanagar's book "A Human’s Guide to Machine Intelligence" can be used as an additional resource,". You can find Professor 

Applied Learning Project

Each course module in this Specialization culminates in an assessment, with two courses including peer-review exercises. These assessments are designed to check learners' knowledge and to provide an opportunity for learners to apply course concepts such as data analytics, machine learning tools, and people management best practices with AI algorithms.

The assessments will be cumulative and cover the application of artificial intelligence, ethical governance rules, Big Data management, the customer journey, fraud prevention, and personalization technology in order to develop and implement a successful AI strategy for your business.

Thursday, 28 December 2023

Python Coding challenge - Day 102 | What is the output of the following Python Code?

 



Code :

my_tuple = (5, 12, 19, 3, 25)

tup = my_tuple[-2::-2] 

print(tup)


Let's break down the code:

Sure! The output of the code is:

(3, 12)

Explanation:

You created a tuple named my_tuple with five elements: 5, 12, 19, 3, and 25.

Then, you created another tuple named tup by slicing my_tuple from the second-last element (-2) to the first element (-1) with a step size of -2 (meaning you iterate from the second-last element to the first element, reversing the order every two elements).

Finally, you printed the tup tuple, which contains the elements extracted from my_tuple: (3, 12).

Wednesday, 27 December 2023

Python Coding challenge - Day 101| What is the output of the following Python Code?

 

Code :

numbers = [12, 5, 8, 13, 4]
Num = numbers[::2]  
print(Num)

Solution and Explanation: 

The expression numbers[::2] is a slicing operation with the following parameters:

The starting index is omitted, so it starts from the beginning of the list.
The stopping index is omitted, so it goes until the end of the list.
The step is 2, which means it selects every second element.
So, numbers[::2] will select elements from the original list with a step of 2. Let's break it down:

Element at index 0: 12
Element at index 2: 8
Element at index 4: 4
Therefore, the result will be a new list containing the elements [12, 8, 4]. When you print the result, you'll get:

[12, 8, 4]

Tuesday, 26 December 2023

Microsoft Azure Data Scientist Associate (DP-100) Professional Certificate

 


What you'll learn

Manage Azure resources for machine learning

Run experiments and train models

Deploy and operationalize ethical machine learning solutions

Join Free:Microsoft Azure Data Scientist Associate (DP-100) Professional Certificate

Professional Certificate - 5 course series

This Professional Certificate is intended for data scientists with existing knowledge of Python and machine learning frameworks like Scikit-Learn, PyTorch, and Tensorflow, who want to build and operate machine learning solutions in the cloud. This Professional Certificate teaches learners how to create end-to-end solutions in Microsoft Azure. They will learn how to manage Azure resources for machine learning; run experiments and train models; deploy and operationalize machine learning solutions; and implement responsible machine learning. They will also learn to use Azure Databricks to explore, prepare, and model data; and integrate Databricks machine learning processes with Azure Machine Learning.

This program consists of 5 courses to help prepare you to take the Exam DP-100: Designing and Implementing a Data Science Solution on Azure. The certification exam is an opportunity to prove knowledge and expertise operate machine learning solutions at cloud scale using Azure Machine Learning. This Professional Certificate teaches you to leverage your existing knowledge of Python and machine learning to manage data ingestion and preparation, model training and deployment, and machine learning solution monitoring in Microsoft Azure. Each course teaches you the concepts and skills that are measured by the exam. 

By the end of this program, you will be ready to take the DP-100: Designing and Implementing a Data Science Solution on Azure.

Applied Learning Project

Learners will engage in interactive exercises throughout this program that offers opportunities to practice and implement what they are learning. They will work directly in the Azure Portal and use the Microsoft Learn Sandbox. This is a free environment that allows learners to explore Microsoft Azure and get hands-on with live Microsoft Azure resources and services.

For example, when you learn about training a deep neural network; you will work in a temporary Azure environment called the Sandbox. The beauty about this is that you will be working with real technology but in a controlled environment, which allows you to apply what you learn, and at your own pace.

You will need a Microsoft account. If you don't have one, you can create one for free. The Learn Sandbox allows free, fixed-time access to a cloud subscription with no credit card required. Learners can safely explore, create, and manage resources without the fear of incurring costs or "breaking production".


AI for Medicine Specialization

 


What you'll learn

Diagnose diseases from x-rays and 3D MRI brain images

Predict patient survival rates more accurately using tree-based models

Estimate treatment effects on patients using data from randomized trials

Automate the task of labeling medical datasets using natural language processing

Join Free:AI for Medicine Specialization

Specialization - 3 course series

AI is transforming the practice of medicine. It’s helping doctors diagnose patients more accurately, make predictions about patients’ future health, and recommend better treatments. This three-course Specialization will give you practical experience in applying machine learning to concrete problems in medicine.

These courses go beyond the foundations of deep learning to teach you the nuances in applying AI to medical use cases.  If you are new to deep learning or want to get a deeper foundation of how neural networks work, we recommend taking the 
Deep Learning Specialization

Applied Learning Project

Medicine is one of the fastest-growing and important application areas, with unique challenges like handling missing data. You’ll start by learning the nuances of working with 2D and 3D medical image data. You’ll then apply tree-based models to improve patient survival estimates. You’ll also use data from randomized trials to recommend treatments more suited to individual patients. Finally, you’ll explore how natural language extraction can more efficiently label medical datasets.

Data Privacy Fundamentals

 


What you'll learn

Identify foundational understanding of digital age privacy concepts and theories

Identify privacy implications of modern digital technology

Identify the rules and frameworks for data privacy in the age of technology

Join Free:Data Privacy Fundamentals

There are 3 modules in this course

This course is designed to introduce data privacy to a wide audience and help each participant see how data privacy has evolved as a compelling concern to public and private organizations as well as individuals. In this course, you will hear from legal and technical experts and practitioners who encounter data privacy issues daily. This course will review theories of data privacy as well as data privacy in the context of social media and artificial intelligence. It will also explore data privacy issues in journalism, surveillance, new technologies like facial recognition and biometrics. Completion of the course will enable the participant to be eligible for CPE credit.


Industrial IoT Markets and Security

 


What you'll learn

What Industry 4.0 is and what factors have enabled the IIoT.

Key skills to develop to be employed in the IIoT space.

What platforms are, and also market information on Software and Services.

What the top application areas are (examples include manufacturing and oil & gas).

Join Free:Industrial IoT Markets and Security

There are 5 modules in this course

This course can also be taken for academic credit as ECEA 5385, part of CU Boulder’s Master of Science in Electrical Engineering degree.

Developing tomorrow's industrial infrastructure is a significant challenge. This course goes beyond the hype of consumer IoT to emphasize a much greater space for potential embedded system applications and growth: The Industrial Internet of Things (IIoT), also known as Industry 4.0. Cisco’s CEO stated: “IoT overall is a $19 Trillion market. IIoT is a significant subset including digital oilfield, advanced manufacturing, power grid automation, and smart cities”.

This is part 1 of the specialization. The primary objective of this specialization is to closely examine emerging markets, technology trends, applications and skills required by engineering students, or working engineers, exploring career opportunities in the IIoT space. The structure of the course is intentionally wide and shallow: We will cover many topics, but will not go extremely deep into any one topic area, thereby providing a broad overview of the immense landscape of IIoT. There is one exception: We will study security in some depth as this is the most important topic for all "Internet of Things" product development.

In this course students will learn :
  * What Industry 4.0 is and what factors have enabled the IIoT
  * Key skills to develop to be employed in the IIoT space
  * What platforms are, and also market information on Software and Services
  * What the top application areas are (examples include manufacturing and oil & gas)
  * What the top operating systems are that are used in IIoT deployments
  * About networking and wireless communication protocols used in IIoT deployments
  * About computer security; encryption techniques and secure methods for insuring data integrity and authentication

Launching Machine Learning: Delivering Operational Success with Gold Standard ML Leadership

 


What you'll learn

Apply ML: Identify opportunities where machine learning can improve marketing, sales, financial credit scoring, insurance, fraud detection, and more

Plan ML: Determine the way machine learning will be operationally integrated and deployed, and the staffing and data requirements to get there

Greenlight ML: Forecast the effectiveness of a machine learning project and then internally sell it, gaining buy-in from your colleagues

Lead ML: Manage a machine learning project, from the generation of predictive models to their launch

Join Free:Launching Machine Learning: Delivering Operational Success with Gold Standard ML Leadership

There are 4 modules in this course

Machine learning runs the world. It generates predictions for each individual customer, employee, voter, and suspect, and these predictions drive millions of business decisions more effectively, determining whom to call, mail, approve, test, diagnose, warn, investigate, incarcerate, set up on a date, or medicate. 

But, to make this work, you've got to bridge what is a prevalent gap between business leadership and technical know-how. Launching machine learning is as much a management endeavor as a technical one. Its success relies on a very particular business leadership practice. This means that two different species must cooperate in harmony: the business leader and the quant. 

This course will guide you to lead or participate in the end-to-end implementation of machine learning (aka predictive analytics). Unlike most machine learning courses, it prepares you to avoid the most common management mistake that derails machine learning projects: jumping straight into the number crunching before establishing and planning for a path to operational deployment.

Whether you'll participate on the business or tech side of a machine learning project, this course delivers essential, pertinent know-how. You'll learn the business-level fundamentals needed to ensure the core technology works within - and successfully produces value for - business operations. If you're more a quant than a business leader, you'll find this is a rare opportunity to ramp up on the business side, since technical ML trainings don't usually go there. But know this: The soft skills are often the hard ones.

After this course, you will be able to:

- Apply ML: Identify the opportunities where machine learning can improve marketing, sales, financial credit scoring, insurance, fraud detection, and much more.

- Plan ML: Determine the way in which machine learning will be operationally integrated and deployed, and the staffing and data requirements to get there. 

- Greenlight ML: Forecast the effectiveness of a machine learning project and then internally sell it, gaining buy-in from your colleagues.

- Lead ML: Manage a machine learning project, from the generation of predictive models to their launch.

- Prep data for ML: Oversee the data preparation, which is directly informed by business priorities.

- Evaluate ML: Report on the performance of predictive models in business terms, such as profit and ROI.

- Regulate ML: Manage ethical pitfalls, such as when predictive models reveal sensitive information about individuals, including whether they're pregnant, will quit their job, or may be arrested - aka AI ethics.

NO HANDS-ON AND NO HEAVY MATH. Rather than a hands-on training, this course serves both business leaders and burgeoning data scientists alike by contextualizing the core technology, guiding you on the end-to-end process required to successfully deploy a predictive model so that it delivers a business impact. There are no exercises involving coding or the use of machine learning software.

WHO IT'S FOR. This concentrated entry-level program is for anyone who wishes to participate in the commercial deployment of machine learning, no matter whether you'll do so in the role of enterprise leader or quant. This includes business professionals and decision makers of all kinds, such as executives, directors, line of business managers, and consultants - as well as data scientists.

LIKE A UNIVERSITY COURSE. This course is also a good fit for college students, or for those planning for or currently enrolled in an MBA program. The breadth and depth of the overall three-course specialization is equivalent to one full-semester MBA or graduate-level course.

IN-DEPTH YET ACCESSIBLE. Brought to you by industry leader Eric Siegel - a winner of teaching awards when he was a professor at Columbia University - this curriculum stands out as one of the most thorough, engaging, and surprisingly accessible on the subject of machine learning. 

VENDOR-NEUTRAL. This specialization includes illuminating software demos of machine learning in action using SAS products. However, the curriculum is vendor-neutral and universally-applicable. The contents and learning objectives apply, regardless of which machine learning software tools you end up choosing to work with. 

PREREQUISITES. Before this course, learners should take the first of this specialization's three courses, "The Power of Machine Learning: Boost Business, Accumulate Clicks, Fight Fraud, and Deny Deadbeats."

How much do you know about Python Comprehension?

 



a. Tuple comprehension offers a fast and compact way to generate a tuple.

Answer

True

b. List comprehension and dictionary comprehension can be nested.

Answer

True

c. A list being used in a list comprehension cannot be modified when it is

being iterated.

Answer

True

d. Sets being immutable cannot be used in comprehension.

Answer

False

e. Comprehensions can be used to create a list, set or a dictionary.

Answer

True

Data Science Methodology

 


What you'll learn

Describe what a data science methodology is and why data scientists need a methodology.

Apply the six stages in the Cross-Industry Process for Data Mining (CRISP-DM) methodology to analyze a case study.

Evaluate which analytic model is appropriate among predictive, descriptive, and classification models used to analyze a case study.

Determine appropriate data sources for your data science analysis methodology.

Join Free:Data Science Methodology

There are 4 modules in this course

If there is a shortcut to becoming a Data Scientist, then learning to think and work like a successful Data Scientist is it. In this course, you will learn and then apply this methodology that you can use to tackle any Data Science scenario. You’ll explore two notable data science methodologies, Foundational Data Science Methodology, and the six-stage CRISP-DM data science methodology, and learn how to apply these data science methodologies. Most established data scientists follow these or similar methodologies for solving data science problems.

Begin by learning about forming the business/research problem Learn how data scientists obtain, prepare, and analyze data. Discover how applying data science methodology practices helps ensure that the data used for problem-solving is relevant and properly manipulated to address the question. Next, learn about building the data model, deploying that model, data storytelling, and obtaining feedback You’ll think like a data scientist and develop your data science methodology skills using a real-world inspired scenario through progressive labs hosted within Jupyter Notebooks and using Python.

Communicating Data Science Results

 


Build your subject-matter expertise

This course is part of the Data Science at Scale Specialization

When you enroll in this course, you'll also be enrolled in this Specialization.

Learn new concepts from industry experts

Gain a foundational understanding of a subject or tool

Develop job-relevant skills with hands-on projects

Earn a shareable career certificate

Join Free:Communicating Data Science Results

There are 3 modules in this course

Important note: The second assignment in this course covers the topic of Graph Analysis in the Cloud, in which you will use Elastic MapReduce and the Pig language to perform graph analysis over a moderately large dataset, about 600GB. In order to complete this assignment, you will need to make use of Amazon Web Services (AWS). Amazon has generously offered to provide up to $50 in free AWS credit to each learner in this course to allow you to complete the assignment. Further details regarding the process of receiving this credit are available in the welcome message for the course, as well as in the assignment itself. Please note that Amazon, University of Washington, and Coursera cannot reimburse you for any charges if you exhaust your credit.

While we believe that this assignment contributes an excellent learning experience in this course, we understand that some learners may be unable or unwilling to use AWS. We are unable to issue Course Certificates for learners who do not complete the assignment that requires use of AWS. As such, you should not pay for a Course Certificate in Communicating Data Results if you are unable or unwilling to use AWS, as you will not be able to successfully complete the course without doing so.

Making predictions is not enough!  Effective data scientists know how to explain and interpret their results, and communicate findings accurately to stakeholders to inform business decisions.  Visualization is the field of research in computer science that studies effective communication of quantitative results by linking perception, cognition, and algorithms to exploit the enormous bandwidth of the human visual cortex.  In this course you will learn to recognize, design, and use effective visualizations.

Just because you can make a prediction and convince others to act on it doesn’t mean you should.  In this course you will explore the ethical considerations around big data and how these considerations are beginning to influence policy and practice.   You will learn the foundational limitations of using technology to protect privacy and the codes of conduct emerging to guide the behavior of data scientists.  You will also learn the importance of reproducibility in data science and how the commercial cloud can help support reproducible research even for experiments involving massive datasets, complex computational infrastructures, or both.

Learning Goals: After completing this course, you will be able to:
1. Design and critique visualizations
2. Explain the state-of-the-art in privacy, ethics, governance around big data and data science
3. Use cloud computing to analyze large datasets in a reproducible way.

Excel to MySQL: Analytic Techniques for Business Specialization

 


Advance your subject-matter expertise

Learn in-demand skills from university and industry experts

Master a subject or tool with hands-on projects

Develop a deep understanding of key concepts

Earn a career certificate from Duke University

Join Free:Excel to MySQL: Analytic Techniques for Business Specialization

Specialization - 5 course series

Formulate data questions, explore and visualize large datasets, and inform strategic decisions.
In this Specialization, you’ll learn to frame business challenges as data questions. You’ll use powerful tools and methods such as Excel, Tableau, and MySQL to analyze data, create forecasts and models, design visualizations, and communicate your insights. In the final Capstone Project, you’ll apply your skills to explore and justify improvements to a real-world business process.

The Capstone Project focuses on optimizing revenues from residential property, and Airbnb, our Capstone’s official Sponsor, provided input on the project design. Airbnb is the world’s largest marketplace connecting property-owner hosts with travelers to facilitate short-term rental transactions. The top 10 Capstone completers each year will have the opportunity to present their work directly to senior data scientists at Airbnb live for feedback and discussion.

Increasing Real Estate Management Profits: Harnessing Data Analytics

 


Build your subject-matter expertise

This course is part of the Excel to MySQL: Analytic Techniques for Business Specialization

When you enroll in this course, you'll also be enrolled in this Specialization.

Learn new concepts from industry experts

Gain a foundational understanding of a subject or tool

Develop job-relevant skills with hands-on projects

Earn a shareable career certificate

Join Free:Increasing Real Estate Management Profits: Harnessing Data Analytics

There are 7 modules in this course

In this final course you will complete a Capstone Project using data analysis to recommend a method for improving profits for your company, Watershed Property Management, Inc. Watershed is responsible for managing thousands of residential rental properties throughout the United States. Your job is to persuade Watershed’s management team to pursue a new strategy for managing its properties that will increase their profits. To do this, you will: (1) Elicit information about important variables relevant to your analysis; (2) Draw upon your new MySQL database skills to extract relevant data from a real estate database; (3) Implement data analysis in Excel to identify the best opportunities for Watershed to increase revenue and maximize profits, while managing any new risks; (4) Create a Tableau dashboard to show Watershed executives the results of a sensitivity analysis; and (5) Articulate a significant and innovative business process change for Watershed based on your data analysis, that you will recommend to company executives. 

Airbnb, our Capstone’s official Sponsor, provided input on the project design. The top 10 Capstone completers each year will have the opportunity to present their work directly to senior data scientists at Airbnb live for feedback and discussion.


Excel Skills for Data Analytics and Visualization Specialization

 

Advance your subject-matter expertise

Learn in-demand skills from university and industry experts

Master a subject or tool with hands-on projects

Develop a deep understanding of key concepts

Earn a career certificate from Macquarie University

Join Free:Excel Skills for Data Analytics and Visualization Specialization

Specialization - 3 course series

As data becomes the modern currency, so the ability to quickly and accurately analyse data has become of paramount importance. Therefore, data analytics and visualization are two of the most sought after skills for high paying jobs with strong future growth prospects. According to an 
IBM report
, the Excel tools for data analytics and visualization are among the top 10 competencies projected to show double-digit growth in their demand. This course will help you develop your analytical and visualization skills so that you not only improve your current work performance but also expand your future job prospects. For those in business and data analysis who want to master advanced Excel and beginner Power BI
, that will add an asset to your employability portfolio.

Upon completing this specialization, you will be able to bring data to life using advanced Excel functions, creative visualizations, and powerful automation features. These courses will equip you with a comprehensive set of tools for transforming, linking, and analysing data. You will master a broad range of charts and create stunning interactive dashboards. Finally, you will explore a new dimension in Excel with PowerPivot, Get and Transform, and DAX.  Harnessing the power of an underlying database engine, we will remove the 1,048,576 row limitation, completely automate data transformation, create data models to effectively link data, and open the gateway to Power Business Intelligence.

Applied Learning Project

Working with datasets similar to those typically found in a business, you will use powerful Excel tools to wrangle the data into shape, create useful visualizations, and prepare dashboards and report to share your results. You will learn to create a data workflow to automate your analysis and make the results flexible and reproducible.

Monday, 25 December 2023

Python Coding challenge - Day 100 | What is the output of the following Python Code?

 


Code :

def fun(a, *args, s = '!') :

    print(a, s)

    for i in args :

        print(i, s)

fun(100)


Solution and Explanation:

Function Definition:

def fun(a, *args, s = '!') :

def fun(..): Defines a function named fun.
a: A required positional argument.
*args: A special syntax to accept an arbitrary number of additional positional arguments, gathered as a tuple within the function.
s = '!': An optional keyword argument with a default value of '!'.
Function Body:

  print(a, s)
  for i in args :
    print(i, s)

print(a, s): Prints the value of a followed by the value of s.
for i in args :: Iterates through each argument in the args tuple.
print(i, s): Prints each argument from args followed by the value of s.
Function Call:

fun(100)

Calls the fun function with a single argument, 100.

Output:
100 !

Explanation:

The function call fun(100) assigns 100 to a.
Since no additional positional arguments are provided, args remains an empty tuple.
The first print statement outputs "100 !".
The for loop doesn't execute because args is empty.


Sunday, 24 December 2023

How much do you know about Python Dictionary? 🧵:

 



a. Dictionary elements can be accessed using position-based index.

Answer

False

b. Dictionaries are immutable.

Answer

False

c. Insertion order is preserved by a dictionary.

Answer

False

d. The very first key - value pair in a dictionary d can be accessed using the

expression d[0].

Answer

False

e. courses.clear( ) will delete the dictionary object called courses.

Answer

False

f. It is possible to nest dictionaries.

Answer

True

g. It is possible to hold multiple values against a key in a dictionary

Answer

True

Create font art using python - Merry Christmas

 


Free Code :

from colorama import Fore

import pyfiglet

font = pyfiglet.figlet_format('Merry Christmas ')

print(Fore.GREEN+font)


#clcoding.com


Let's break down the code step by step:


Importing Libraries:

from colorama import Fore

import pyfiglet

The colorama library is used for adding color to the output text in the console.

The pyfiglet library is used for creating ASCII art text.

Creating ASCII Art:

font = pyfiglet.figlet_format('Merry Christmas ')

The pyfiglet.figlet_format function is used to convert the text "Merry Christmas" into ASCII art format using a specific font. In this case, it uses the default font.

Printing in Green:

print(Fore.GREEN + font)

Fore.GREEN sets the text color to green using Colorama.

font contains the ASCII art text generated by PyFiglet.

The print statement then outputs the combined result, which is the ASCII art text in green.

To run this code, you'll need to have the colorama and pyfiglet libraries installed. You can install them using the following commands:

pip install colorama

pip install pyfiglet

After installing the required libraries, you can run the script to see the "Merry Christmas" message in green ASCII art in your terminal.

Advertising with Meta

 


What you'll learn

Structure campaigns in Meta Ads Manager

Build an ad that aligns with your marketing objectives and target it to your intended audience

Set a budget, placement, and schedule for your ads in Meta Ads Manager

Join Free:Advertising with Meta

Build your Marketing expertise

This course is part of the Meta Social Media Marketing Professional Certificate
When you enroll in this course, you'll also be enrolled in this Professional Certificate.
Learn new concepts from industry experts
Gain a foundational understanding of a subject or tool
Develop job-relevant skills with hands-on projects
Earn a shareable career certificate from Meta

Popular Posts

Categories

100 Python Programs for Beginner (53) AI (34) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (173) C (77) C# (12) C++ (82) Course (67) Coursera (226) Cybersecurity (24) data management (11) Data Science (128) Data Strucures (8) Deep Learning (20) Django (14) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (6) flask (3) flutter (1) FPL (17) Google (34) Hadoop (3) HTML&CSS (47) IBM (25) IoT (1) IS (25) Java (93) Leet Code (4) Machine Learning (59) Meta (22) MICHIGAN (5) microsoft (4) Nvidia (3) Pandas (4) PHP (20) Projects (29) Python (932) Python Coding Challenge (358) Python Quiz (23) Python Tips (2) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (3) Software (17) SQL (42) UX Research (1) web application (8) Web development (2) web scraping (2)

Followers

Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses