Machine Learning Bangla Course 1, Part 3 : Machine Learning Example

https://www.youtube.com/watch?v=AzG4gHvyE0U
What is Machine Learning? Machine learning is a field of computer science that uses statistical techniques to give computer systems the ability to

Sending data to Thingspeak server using ESP8266 wifi module (Part-5)

https://www.youtube.com/watch?v=FX_stCPhGHU
ESP8266 is the new WIFI platform for Internet Of Things (IoT). This module is unbelievably cheap & powerful. ESP modules are available from ESP-1 to ESP12 .

Importing the Dataset in Spyder IDE for Machine Learning (Part 5)

https://www.youtube.com/watch?v=P9GjtoYbHm0
This video is about importing dataset in Spyder IDE for machine learning. This dataset is a collection of data which are needed to training your machine learning …

Sending Temperature Data (Using LM35) to ThingSpeak Server using ESP8266 (Part 6)

https://www.youtube.com/watch?v=Zdj8N3izTOU
ESP8266 is the new WIFI platform for Internet Of Things (IoT). This module is unbelievably cheap & powerful. ESP modules are available from ESP-1 to ESP12 .

Planeter Intro Cover

https://www.youtube.com/watch?v=peFMqlPkOfk

Machine Learning Bangla Course 1, Part 3 : Machine Learning Example

https://www.youtube.com/watch?v=AzG4gHvyE0U
What is Machine Learning? Machine learning is a field of computer science that uses statistical techniques to give computer systems the ability to

if-then এর ব্যবহার – শেল প্রোগ্রামিং-এ

#!/bin/sh

#count the number of files in current directory, and check if the number is equal to or greater than or less than 26

#NOF represents number of files

NOF=`ls -l | wc -l`

if [ $NOF -eq 26 ]
then
echo “No of files and directories is equal to 26”
fi

if [ $NOF -gt 26 ]
then
echo “No of files is greater than 26”
fi

if [ $NOF -lt 26 ]
then
echo “No of files is less than 26”
fi

exit

শেল প্রোগ্রামিং while লুপ এর উদাহরণ । একটি চার্ট প্রদর্শন করুন

Example Output

bash-3.2$ ./while-loop-example.sh
Enter your Number
10
10 * 1 = 10
10 * 2 = 20
10 * 3 = 30
10 * 4 = 40
10 * 5 = 50
10 * 6 = 60
10 * 7 = 70
10 * 8 = 80
10 * 9 = 90
10 * 10 = 100

The Code

#!/bin/ksh

#example : how to use while loop in shell programming

multiplication()
{

#clear
i=1
while (( i <= 10 )) do echo "$Y * $i = `expr $Y \* $i`" (( i = i + 1 )) done } echo "Enter your Number" read X case "$X" in 1) Y=1 multiplication ;; 2) Y=2 multiplication ;; 3) Y=3 multiplication ;; 4) Y=4 multiplication ;; 5) Y=5 multiplication ;; 6) Y=6 multiplication ;; 7) Y=7 multiplication ;; 8) Y=8 multiplication ;; 9) Y=9 multiplication ;; 10) Y=10 multiplication ;; esac exit

বৃহস্পতিবার এবং শুক্রবারে / etc ফোল্ডারে সমস্ত বিষয়বস্তু /export/home/shell/test/etc.tar তে tar হিসাবে backup করুন

#!/bin/ksh

# on every thursday and friday tar all contents of /etc folder into /export/home/shell/test/. On thursday only create a log file with the list of files
#in the tar file. On thursday untar /export/home/shell/test/etc.tar into vfstab . Then log vfstab exist or not information

DAY=`date +%a`
DATESTAMP=`date +%m-%d-%Y-%H:%M`

if [[ “$DAY” == Mon ]]
then

echo “Today is Monday”

elif [[ “$DAY” == Tue ]]
then

echo “Today is Tuesday”

elif [[ “$DAY” == Wed ]]
then

echo “Today is Wednesday”

elif [[ “$DAY” == Thu ]]
then

echo “Today is Thursday” >> /export/home/shell/test/log/backup-$DATESTAMP.log
cd /etc
tar cvf /export/home/shell/test/etc.tar * >> /export/home/shell/test/log/backup-$DATESTAMP.log
cd /export/home/shell/test
tar xvf etc.tar vfstab

if [[ -f vfstab ]]
then
echo “file vfstab exist” >> /export/home/shell/test/log/backup-$DATESTAMP.log
else
echo “file vfstab does not exist” >> /export/home/shell/test/log/backup-$DATESTAMP.log
fi

elif [[ “$DAY” == Fri ]]
then

echo “Today is Friday”
cd /etc
tar cvf /export/home/shell/test/etc.tar *

elif [[ “$DAY” == Sat ]]
then
echo “Today is Saturday”

else
echo “Today is Sunday”

fi

exit

শেল প্রোগ্রামিং এ if-then-else এর উদাহরণ

#!/bin/sh

#If then else example
#if elif else

NOF=5

if [ $NOF -eq 27 ]

then

echo “No of files and directories = 27”

elif [ $NOF -gt 27 ]

then

echo “No of files are dir are greator than 27”

else

echo “No of files and directories are less than 27”

fi

exit