‼️code for previous video { Student mark prediction project } [ Like share comment and subscribe❤️
import pickle
var = input("Please enter the news text you want to verify: ")
print("You entered: " + str(var))
# function to run for prediction
def fakenews(var):
# retrieving the best model for prediction call
load_model = pickle.load(open('A:\data\model.sav', 'rb'))
prediction = load_model.predict([var])
prob = load_model.predict_proba([var])
return (print("The given statement is ",prediction[0]),
print("The truth probability score is ",prob[0][1]))
if name == 'main':
fakenews(var)
var = input("Please enter the news text you want to verify: ")
print("You entered: " + str(var))
# function to run for prediction
def fakenews(var):
# retrieving the best model for prediction call
load_model = pickle.load(open('A:\data\model.sav', 'rb'))
prediction = load_model.predict([var])
prob = load_model.predict_proba([var])
return (print("The given statement is ",prediction[0]),
print("The truth probability score is ",prob[0][1]))
if name == 'main':
fakenews(var)
🤔3
Here is the code for Fake news predictor Using python [ Keep share & support for more updates❤️]
⚠️Kindly follow our Instagram account [ akpythonyt ] for interactions and more programming updates😊
https://www.youtube.com/watch?v=rLxjzFSmi0Y [ New video is out now ]
YouTube
| How the Pybrain works in machine learning | | AK |
In this video we are going to learn about Pybrain and it workflow
Pybrain is machine learning library that is used for completing the machine learning tasks
Watch this video fully to understand the real concepts behind the Pybrain
Like share comment and…
Pybrain is machine learning library that is used for completing the machine learning tasks
Watch this video fully to understand the real concepts behind the Pybrain
Like share comment and…
This media is not supported in your browser
VIEW IN TELEGRAM
New video : How to create this 👆
from colorthief import ColorThief
colorthief=ColorThief("Path of your image")
dominatcolor=colorthief.get_color(quality=1)
print(dominatcolor)
palette=colorthief.get_palette(color_count=6)
print(palette)
colorthief=ColorThief("Path of your image")
dominatcolor=colorthief.get_color(quality=1)
print(dominatcolor)
palette=colorthief.get_palette(color_count=6)
print(palette)
import PySimpleGUI as sg
import psutil
sg.theme('DarkAmber')
layout = [[sg.Text('CPU Meter')],
[sg.Text(size=(15,4 ), font=('Helvetica', 20),
justification='center', key='-text-')],
[sg.Exit(button_color=('white', 'firebrick4'),size=(9, 1))]]
window = sg.Window('AK CPU widget',
layout,
no_titlebar=False,
grab_anywhere=True, finalize=True)
interval = 10
while True:
event, values = window.read(timeout=interval)
if event in (sg.WIN_CLOSED, 'Exit'):
break
cpu_percent = psutil.cpu_percent(interval=1)
window['-text-'].update(f'CPU {cpu_percent:02.0f}%')
window.close()
import psutil
sg.theme('DarkAmber')
layout = [[sg.Text('CPU Meter')],
[sg.Text(size=(15,4 ), font=('Helvetica', 20),
justification='center', key='-text-')],
[sg.Exit(button_color=('white', 'firebrick4'),size=(9, 1))]]
window = sg.Window('AK CPU widget',
layout,
no_titlebar=False,
grab_anywhere=True, finalize=True)
interval = 10
while True:
event, values = window.read(timeout=interval)
if event in (sg.WIN_CLOSED, 'Exit'):
break
cpu_percent = psutil.cpu_percent(interval=1)
window['-text-'].update(f'CPU {cpu_percent:02.0f}%')
window.close()
This media is not supported in your browser
VIEW IN TELEGRAM
Today 8:00 PM [ Subscribe & share ]😊
https://youtu.be/Zr9fpVThQjE. Check out this video this video.I gave a clear explanation about most complex algorithm in computer science
YouTube
| Implementation of Knapsack Problem in Python| | AK |
In this video we are going to learn about how to perform the knapsack algorithm in python
Mr.Theif shows how he used this algorithm to get more profit
watch this video fully to understand this knapsack problem in python
Source code is available at AK python…
Mr.Theif shows how he used this algorithm to get more profit
watch this video fully to understand this knapsack problem in python
Source code is available at AK python…
⚠️Code for this Video: def knapsack(Capacity, weights, profits, n):
if(n==0 or Capacity==0):
return 0
if(weights[n-1]>Capacity):
return knapsack(Capacity, weights, profits, n-1)
else:
return max(profits[n-1]+knapsack(Capacity-weights[n-1], weights, profits, n-1), knapsack(Capacity,weights, profits, n-1))
print('Enter the profits:')
profits=list(map(int,input().split(' ')))
print('Enter the weights:')
weights=list(map(int,input().split(' ')))
Capacity=int(input('Enter the maximum capacity:'))
n=len(weights)
print(knapsack(Capacity, weights, profits, n))
if(n==0 or Capacity==0):
return 0
if(weights[n-1]>Capacity):
return knapsack(Capacity, weights, profits, n-1)
else:
return max(profits[n-1]+knapsack(Capacity-weights[n-1], weights, profits, n-1), knapsack(Capacity,weights, profits, n-1))
print('Enter the profits:')
profits=list(map(int,input().split(' ')))
print('Enter the weights:')
weights=list(map(int,input().split(' ')))
Capacity=int(input('Enter the maximum capacity:'))
n=len(weights)
print(knapsack(Capacity, weights, profits, n))
Check out the latest video
https://youtu.be/ZXX30OLjaD8
https://youtu.be/ZXX30OLjaD8
YouTube
| Password cracking explained..! | | AK |
Hello everyone, In this video I will show you how your passwords easily cracked by the hackers
In this video I explained what are the ways that your passwords get compromised
Learn Some thing deeply about this algorithms it will help you in many ways
Like…
In this video I explained what are the ways that your passwords get compromised
Learn Some thing deeply about this algorithms it will help you in many ways
Like…
This media is not supported in your browser
VIEW IN TELEGRAM
Next video: How to create a fidget spinner using python [ Share & Support ❤️ ]