Saturday, 6 January 2024

Avatar Logo in Python using Turtle

 


from turtle import *
speed(0)
bgcolor('black')
color('orange')
hideturtle()
n=1
p=True
while True:
    circle(n)
    if p:
        n=n-1
    else:
        n=n+1
    if n==0 or n==60:
        p=not p
    left(1)
    forward(3)
#clcoding.com    

Explanation:


Amazing Spiral in Python (turtle library)

 


import turtle
#clcoding.com
t = turtle.Turtle()
s = turtle.Screen()
s.bgcolor("black")
t.width(2)
t.speed(15)

col = ('white','pink','cyan')
for i in range (300):
    t.pencolor(col[i%3])
    t.forward(i*4)
    t.right(121)
#clcoding.com  

How much do you know about string in python?

 





s = 'Clcoding'
print(s.startswith('CL'))


# In[13]:


s = 'Clcoding'
print(s.isalpha( ))


# In[14]:


s = 'Clcoding'
print(s.isdigit( ))


# In[15]:


s = 'Clcoding'
print(s.isalnum( ))


# In[16]:


s = 'Clcoding'
print(s.islower( ))


# In[17]:


s = 'Clcoding'
print(s.isupper( ))

Introduction to Probability for Data Science (Free PDF)

 


This introductory textbook in undergraduate probability emphasizes the inseparability between data (computing) and probability (theory) in our time. It examines the motivation, intuition, and implication of the probabilistic tools used in science and engineering:

Motivation: In the ocean of mathematical definitions, theorems, and equations, why should we spend our time on this particular topic but not another?

Intuition: When going through the deviations, is there a geometric interpretation or physics beyond those equations?

Implication: After we have learned a topic, what new problems can we solve?

Download : Introduction to Probability for Data Science


Hard Copy : Introduction to Probability for Data Science



How much do you know about Containership and Inheritance in python?



a. Inheritance is the ability of a class to inherit properties and behavior

from a parent class by extending it.

Answer

True

b. Containership is the ability of a class to contain objects of different

classes as member data.

Answer

True

c. We can derive a class from a base class even if the base class's source

code is not available.

Answer

True

d. Multiple inheritance is different from multiple levels of inheritance.

Answer

True

e. An object of a derived class cannot access members of base class if the

member names begin with.

Answer

True

f. Creating a derived class from a base class requires fundamental changes

to the base class.

Answer

False

g. If a base class contains a member function func( ), and a derived class

does not contain a function with this name, an object of the derived class

cannot access func( ).

Answer

False

h. If no constructors are specified for a derived class, objects of the derived

class will use the constructors in the base class.

Answer

False

i. If a base class and a derived class each include a member function with

the same name, the member function of the derived class will be called

by an object of the derived class.

Answer

True

j. A class D can be derived from a class C, which is derived from a class

B, which is derived from a class A.

Answer

True

k. It is illegal to make objects of one class members of another class.

Answer

False

Day 173 : Convert Decimal to Fraction in Python

 


from fractions import Fraction

# Convert decimal to fraction

decimal_number = input("Enter a Decimal Number:")

fraction_result = Fraction(decimal_number).limit_denominator()

print(f"Decimal: {decimal_number}")

print(f"Fraction: {fraction_result}")

#clcoding.com for free code visit


Explanation : 

Let's break down the code step by step:

from fractions import Fraction

This line imports the Fraction class from the fractions module. The Fraction class is used to represent and perform operations with rational numbers.

# Convert decimal to fraction

decimal_number = input("Enter a Decimal Number:")

This line prompts the user to enter a decimal number by using the input function. The entered value is stored in the variable decimal_number.

fraction_result = Fraction(decimal_number).limit_denominator()

Here, the entered decimal_number is converted to a Fraction object using the Fraction class. The limit_denominator() method is then called to limit the denominator of the fraction to a reasonable size.

print(f"Decimal: {decimal_number}")

print(f"Fraction: {fraction_result}")

These lines print the original decimal number entered by the user and the corresponding fraction.

#clcoding.com for free code visit

This line is a comment and is not executed as part of the program. It's just a comment providing a website link.

So, when you run this code, it will prompt you to enter a decimal number, convert it to a fraction, and then print both the original decimal and the corresponding fraction. The limit_denominator() method is used to present the fraction in a simplified form with a limited denominator.

Python Programming Language




 An extremely handy programmer’s standard library reference that is as durable as it is portable. This 6 page laminated guide includes essential script modules used by developers of all skill levels to simplify the process of programming in Python. This guide is all script and is organized to find needed script quickly. As with QuickStudy reference on any subject, with continued reference, the format lends itself to memorization. Beginning students or seasoned programmers will find this tool a perfect go-to for the at-a-glance script answer and memory jog you might need. At this price and for the bank of script included it’s an easy add to your programmer’s toolbox.
6 page laminated guide includes:
General Functionality
Date/Time Processing
System and Computer Controls
OS Module
Classes of the OS Module
Pathlib Module
Threading Module
Debugging Functionality
PDB Module
Debugging for the PDB Module
Mathematic and Numeric Operations
Math Module
Random Module
Iterable and Iterator Operations
Collections Module
Classes of the Collections Module
Itertools Module
Web and Data Transfer Operations
HTML Parser Module
HTML Module
Audio Manipulation

Python Standard Library

 

An extremely handy programmer’s standard library reference that is as durable as it is portable. This 6 page laminated guide includes essential script modules used by developers of all skill levels to simplify the process of programming in Python. This guide is all script and is organized to find needed script quickly. As with QuickStudy reference on any subject, with continued reference, the format lends itself to memorization. Beginning students or seasoned programmers will find this tool a perfect go-to for the at-a-glance script answer and memory jog you might need. At this price and for the bank of script included it’s an easy add to your programmer’s toolbox.

6 page laminated guide includes:

General Functionality

Date/Time Processing

System and Computer Controls

OS Module

Classes of the OS Module

Pathlib Module

Threading Module

Debugging Functionality

PDB Module

Debugging for the PDB Module

Mathematic and Numeric Operations

Math Module

Random Module

Iterable and Iterator Operations

Collections Module

Classes of the Collections Module

Itertools Module

Web and Data Transfer Operations

HTML Parser Module

HTML Module

Audio Manipulation

Buy : Python Standard Library

Friday, 5 January 2024

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

 


p = 'Love for Coding'

print(p[4], p[5])

Solution and Explanation:

This code prints the characters at positions 4 and 5 in the string p. In Python, string indexing starts at 0. Therefore:

p[4] refers to the fifth character in the string, which is the space (' ').
p[5] refers to the sixth character in the string, which is the letter 'f'.
So, when you run the code, it will output:

  f

How much do you know about Exception Handling in python?

 

a. The exception handling mechanism is supposed to handle compile time

errors.

Answer

False

b. It is necessary to declare the exception class within the class in which an

exception is going to be thrown.

Answer

False

c. Every raised exception must be caught.

Answer

True

d. For one try block there can be multiple except blocks.

Answer

True

e. When an exception is raised, an exception class's constructor gets called.

Answer

True

f. try blocks cannot be nested.

Answer

False

g. Proper destruction of an object is guaranteed by exception handling

mechanism.

Answer

False

h. All exceptions occur at runtime.

Answer

True

i. Exceptions offer an object-oriented way of handling runtime errors.

Answer

True

j. If an exception occurs, then the program terminates abruptly without

getting any chance to recover from the exception.

Answer

False

k. No matter whether an exception occurs or not, the statements in the

finally clause (if present) will get executed.

Answer

True

l. A program can contain multiple finally clauses.

Answer

False

m. finally clause is used to perform cleanup operations like closing the

network/database connections.

Answer

True

n. While raising a user-defined exception, multiple values can be set in the

exception object.

Answer

True

o. In one function/method, there can be only one try block.

Answer

False

p. An exception must be caught in the same function/method in which it is

raised.

Answer

False

q. All values set up in the exception object are available in the except block

that catches the exception.

Answer

True

r. If our program does not catch an exception then Python runtime catches

it.

Answer

True

s. It is possible to create user-defined exceptions.

Answer

True

t. All types of exceptions can be caught using the Exception class.

Answer

True

u. For every try block there must be a corresponding finally block.

Answer

False

Thursday, 4 January 2024

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

 


Code :

s = set('CLC') 

t = list(s)  

t = t[::-1]  

print(t)

Solution and Explanation

Step 1: Define the set and convert it to a list:

s = set('CLC')

t = list(s)

We define a set s containing the characters C, L, and C (duplicates are ignored in sets).

Then, we convert the set s to a list t using the list() function. This creates a list containing the unique elements of the set in an arbitrary order.

Step 2: Reverse the list:

t = t[::-1]

We use the slicing operator [::-1] to reverse the order of elements in the list t.

Step 3: Print the reversed list:

print(t)

Finally, we print the reversed list t.

Output:

['L', 'C']

As you can see, the output shows the characters from the original set in reverse order (L and C).

Structuring Machine Learning Projects

 


Build your subject-matter expertise

This course is part of the Deep Learning 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:Structuring Machine Learning Projects

There are 2 modules in this course

In the third course of the Deep Learning Specialization, you will learn how to build a successful machine learning project and get to practice decision-making as a machine learning project leader. 

By the end, you will be able to diagnose errors in a machine learning system; prioritize strategies for reducing errors; understand complex ML settings, such as mismatched training/test sets, and comparing to and/or surpassing human-level performance; and apply end-to-end learning, transfer learning, and multi-task learning.

This is also a standalone course for learners who have basic machine learning knowledge. This course draws on Andrew Ng’s experience building and shipping many deep learning products. If you aspire to become a technical leader who can set the direction for an AI team, this course provides the "industry experience" that you might otherwise get only after years of ML work experience.
 
The Deep Learning Specialization is our foundational program that will help you understand the capabilities, challenges, and consequences of deep learning and prepare you to participate in the development of leading-edge AI technology. It provides a pathway for you to gain the knowledge and skills to apply machine learning to your work, level up your technical career, and take the definitive step in the world of AI.

Machine Learning: Theory and Hands-on Practice with Python Specialization

 


What you'll learn

Explore several classic Supervised and Unsupervised Learning algorithms and introductory Deep Learning topics.  

Build and evaluate Machine Learning models utilizing popular Python libraries and compare each algorithm’s strengths and weaknesses.

Explain which Machine Learning models would be best to apply to a Machine Learning task based on the data’s properties.

Improve model performance by tuning hyperparameters and applying various techniques such as sampling and regularization.

Join Free:Machine Learning: Theory and Hands-on Practice with Python Specialization

Specialization - 3 course series

In the Machine Learning specialization, we will cover Supervised Learning, Unsupervised Learning, and the basics of Deep Learning. You will apply ML algorithms to real-world data, learn when to use which model and why, and improve the performance of your models. Starting with supervised learning, we will cover linear and logistic regression, KNN, Decision trees, ensembling methods such as Random Forest and Boosting, and kernel methods such as SVM. Then we turn our attention to unsupervised methods, including dimensionality reduction techniques (e.g., PCA), clustering, and recommender systems. We finish with an introduction to deep learning basics, including choosing model architectures, building/training neural networks with libraries like Keras, and hands-on examples of CNNs and RNNs. 

This specialization can be taken for academic credit as part of CU Boulder’s MS in Data Science or MS in Computer Science degrees offered on the Coursera platform. These fully accredited graduate degrees offer targeted courses, short 8-week sessions, and pay-as-you-go tuition. Admission is based on performance in three preliminary courses, not academic history. CU degrees on Coursera are ideal for recent graduates or working professionals. Learn more: 

MS in Data Science: https://www.coursera.org/degrees/master-of-science-data-science-boulder 

MS in Computer Science: https://coursera.org/degrees/ms-computer-science-boulder

Applied Learning Project

In this specialization, you will build a movie recommendation system, identify cancer types based on RNA sequences, utilize CNNs for digital pathology, practice NLP techniques on disaster tweets, and even generate your images of dogs with GANs. You will complete a final supervised, unsupervised, and deep learning project to demonstrate course mastery.

Exploratory Data Analysis for Machine Learning

 


Build your subject-matter expertise

This course is available as part of multiple programs,

When you enroll in this course, you'll also be asked to select a specific program.

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:Exploratory Data Analysis for Machine Learning

There are 5 modules in this course

This first course in the IBM Machine Learning Professional Certificate introduces you to Machine Learning and the content of the professional certificate. In this course you will realize the importance of good, quality data. You will learn common techniques to retrieve your data, clean it, apply feature engineering, and have it ready for preliminary analysis and hypothesis testing.

By the end of this course you should be able to:
Retrieve data from multiple data sources: SQL, NoSQL databases, APIs, Cloud 
Describe and use common feature selection and feature engineering techniques
Handle categorical and ordinal features, as well as missing values
Use a variety of techniques for detecting and dealing with outliers
Articulate why feature scaling is important and use a variety of scaling techniques
 
Who should take this course?

This course targets aspiring data scientists interested in acquiring hands-on experience  with Machine Learning and Artificial Intelligence in a business setting.
 
What skills should you have?

To make the most out of this course, you should have familiarity with programming on a Python development environment, as well as fundamental understanding of Calculus, Linear Algebra, Probability, and Statistics.

Investment Management with Python and Machine Learning Specialization

 


What you'll learn

Write custom Python code and use existing Python libraries to build and analyse efficient portfolio strategies.

Write custom Python code and use existing Python libraries to estimate risk and return parameters, and build better diversified portfolios.

Learn the principles of supervised and unsupervised machine learning techniques to financial data sets 

Gain an understanding of advanced data analytics methodologies, and quantitative modelling applied to alternative data in investment decisions     

Join Free:Investment Management with Python and Machine Learning Specialization

Specialization - 4 course series

The Data Science and Machine Learning for Asset Management Specialization has been designed to deliver a broad and comprehensive introduction to modern methods in Investment Management, with a particular emphasis on the use of data science and machine learning techniques to improve investment decisions.By the end of this specialization, you will have acquired the tools required for making sound investment decisions, with an emphasis not only on the foundational theory and underlying concepts, but also on practical applications and implementation. Instead of merely explaining the science, we help you build on that foundation in a practical manner, with an emphasis on the hands-on implementation of those ideas in the Python programming language through a series of dedicated lab sessions.

Preparing for Google Cloud Certification: Machine Learning Engineer Professional Certificate

 


What you'll learn

Learn the skills needed to be successful in a machine learning engineering role

Prepare for the Google Cloud Professional Machine Learning Engineer certification exam

Understand how to design, build, productionalize ML models to solve business challenges using Google Cloud technologies

Understand the purpose of the Professional Machine Learning Engineer certification and its relationship to other Google Cloud certifications

Join Free:Preparing for Google Cloud Certification: Machine Learning Engineer Professional Certificate

Professional Certificate - 9 course series

87% of Google Cloud certified users feel more confident in their cloud skills. This program provides the skills you need to advance your career and provides training to support your preparation for the industry-recognized
 Google Cloud Professional Machine Learning Engineer
 certification.

Here's what you have to do

1) Complete the Preparing for Google Cloud Machine Learning Engineer Professional Certificate

2) Review other recommended resources for the Google Cloud Professional Machine Learnin Engineer 
exam

3) Review the Professional Machine Learning Engineer exam guide

4) Complete Professional Machine Learning Engineer sample questions

5)Register for the Google Cloud certification exam (remotely or at a test center)

Applied Learning Project

This professional certificate incorporates hands-on labs using Qwiklabs platform.These hands on components will let you apply the skills you learn. Projects incorporate Google Cloud Platform products used within Qwiklabs. You will gain practical hands-on experience with the concepts explained throughout the modules.

Applied Learning Project

This specialization incorporates hands-on labs using Google's Qwiklabs platform.

These hands on components will let you apply the skills you learn in the video lectures. Projects will incorporate topics such as Google Cloud Platform products, which are used and configured within Qwiklabs. You can expect to gain practical hands-on experience with the concepts explained throughout the modules.

Wednesday, 3 January 2024

Python for Excel: A Modern Environment for Automation and Data Analysis (Free PDF)

 


While Excel remains ubiquitous in the business world, recent Microsoft feedback forums are full of requests to include Python as an Excel scripting language. In fact, it's the top feature requested. What makes this combination so compelling? In this hands-on guide, Felix Zumstein--creator of xlwings, a popular open source package for automating Excel with Python--shows experienced Excel users how to integrate these two worlds efficiently.


Excel has added quite a few new capabilities over the past couple of years, but its automation language, VBA, stopped evolving a long time ago. Many Excel power users have already adopted Python for daily automation tasks. This guide gets you started.


Use Python without extensive programming knowledge

Get started with modern tools, including Jupyter notebooks and Visual Studio code

Use pandas to acquire, clean, and analyze data and replace typical Excel calculations

Automate tedious tasks like consolidation of Excel workbooks and production of Excel reports

Use xlwings to build interactive Excel tools that use Python as a calculation engine

Connect Excel to databases and CSV files and fetch data from the internet using Python code

Use Python as a single tool to replace VBA, Power Query, and Power Pivot


PDF Download : Python for Excel: A Modern Environment for Automation and Data Analysis


Buy : Python for Excel: A Modern Environment for Automation and Data Analysis



Rewrite the following code snippet in 1 line

 


Rewrite the following code snippet in 1 line:

x = 3

y = 3.0

if x == y :

    print('x and y are equal')

else :

    print('x and y are not equal')


Answer: 

print('x and y are equal' if x == y else 'x and y are not equal')

The condition x == y is evaluated.

If the condition is True, the expression before the if (i.e., 'x and y are equal') is executed.

If the condition is False, the expression after the else (i.e., 'x and y are not equal') is executed.

So, in a single line, this code snippet prints either 'x and y are equal' or 'x and y are not equal' based on the equality of x and y.

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]

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