Malem Akoijam

Malem Akoijam Contact information, map and directions, contact form, opening hours, services, ratings, photos, videos and announcements from Malem Akoijam, Web designer, Ningombam, Imphal.

22/10/2024

Canteen Management software for Window

  Types Convertion of python7 types of convertion   convertion () # int() () () () () ()a = "10"print(a)print(type(a))b ...
10/10/2024

Types Convertion of python
7 types of convertion

convertion

()
# int()
()
()
()
()
()

a = "10"
print(a)
print(type(a))

b = int(a) only
print(b)
print(type(b))

c = float(a) # only desimal value
print(c)
print(type(c))

d = eval(a) int,float
print(d)
print(type(d))

e = list(a) #["1","0"]
print(e)
print(type(e))

# Define the dictionary correctly without triple quotes
z = {
"name": "malem",
"a" :"hello"
}

# Print keys and values separately
for key, value in z.items():
print(f"Key: {key}")
print(f"Value: {value}")

#

y= tuple(a)
print(y)
print(type(y))

g= set(a)
print(g)
print(type(g))

06/08/2024

Cyber security code for python

Data Encryption and Decryption.

from cryptography.fernet import Fernet

# Generate a key and instantiate a Fernet instance
key = Fernet.generate_key()
cipher_suite = Fernet(key)

# Encrypt data
data = b"my secret data"
cipher_text = cipher_suite.encrypt(data)
print("Encrypted:", cipher_text)

# Decrypt data
plain_text = cipher_suite.decrypt(cipher_text)
print(ΰ§§"Decrypted:", plain_text)

    YouTube Downloader source code πŸ‘‡πŸ‘‡from pytube import YouTubedef Youtube_Down(url):   try:     yt = YouTube(url)     p...
28/06/2024



YouTube Downloader source code πŸ‘‡πŸ‘‡

from pytube import YouTube

def Youtube_Down(url):
try:
yt = YouTube(url)
print(yt.title)
print(yt.thumbnail_url)
stream = yt.streams.get_highest_resolution()
print("Downloading.....")
stream.download()
print("completed")


except Exception as e:
print(str(e))



while True:
url = input("Paste your Link..:- ")
callback_ = Youtube_Down(url)

25/06/2024
17/06/2024

# Python backend project for kivy,kivymd YouTube downloader

#
import re
from kivy.clock import mainthread
from kivy.lang import Builder
from kivymd.app import MDApp
from kivy.properties import StringProperty, ListProperty, BooleanProperty, ObjectProperty
from kivymd.uix.screen import MDScreen
from kivymd.uix.boxlayout import MDBoxLayout
import datetime
from kivy.config import Config
import threading
from kivymd.toast import toast
from kivymd.uix.dialog import MDDialog
from hurry.filesize import size
from kivymd.uix.button import MDFlatButton
from pytube import YouTube,exceptions
from pathlib import Path
from kivy import platform
from kivy.clock import mainthread
from jnius import autoclass

Config.set('kivy', 'window_icon', 'assets/.ico')

class ContentNavigationDrawer(MDBoxLayout):
pass
()

class HomeScreen(MDScreen):
def __init__(self, **kwargs):
print("ClassA init")
super(HomeScreen, self).__init__(**kwargs)

# =================================yOUTUBE CLASS ==================
class YoutubeDownloader(MDScreen):
yt = ObjectProperty()
title = StringProperty('Loading')
thumbnail = StringProperty()
resolution = StringProperty('Loading')
link = StringProperty()
download_icon = StringProperty('download')
length = StringProperty('Loading')
file_size = StringProperty('Loading')
download = BooleanProperty(False)
downloading = BooleanProperty(False)
isNoTDownloadable = BooleanProperty(True)

def __init__(self, **kwargs):
super(YoutubeDownloader, self).__init__(**kwargs)

def completed_function(self, stream,file_path):
# toast("Download Completes.")
print("complete")
self.ids.progress_bar.value = 0
self.ids.downloading.text = file_path

def progress_func(self, stream, chunk, bytes_remaining):
# value = round((1 - bytes_remaining / stream.filesize) * 100, 3)
total_size = stream.filesize
byte_download = total_size - bytes_remaining
percentage_complete = byte_download / total_size * 100
self.ids.progress_bar.value = percentage_complete
self.ids.downloading.text = (str(int(percentage_complete)) + "%")

def go(self):
app = MDApp.get_running_app()
app.isLoading = True
threading.Thread(target=self.start).start()

def start(self):
self.ids.progress_bar.value = 0
self.ids.download_button.disabled = True
self.link = self.ids.get_url_youtube.text
self.ids.title_get.text = "Title: Loading"
self.ids.resolution_get.text = "Resolution: Loading"
self.ids.length.text = "Lenght: Loading"
self.ids.total_size.text = "File Size: Loading"
try:

self.youtube_regex = (r'(https?://)?(www.)?'
'(youtube|youtu|youtube-nocookie)\.(com|be)/'
'(watch\?v=|embed/|v/|.+\?v=)?([^&=%\?]{11})')
# Compile the regex pattern
self.youtube_pattern = re.compile(self.youtube_regex)
# Check if the URL matches the pattern
if self.youtube_pattern.match(self.link):
try:
self.yt = YouTube(
self.link,
on_complete_callback=self.progress_func,
on_progress_callback=self.completed_function
)
self.title = self.yt.title
self.thumbnail = str(self.yt.thumbnail_url)
self.resolution = str(self.yt.streams.get_highest_resolution().resolution)
self.length = str(datetime.timedelta(seconds=self.yt.length))
self.file_size = size(self.yt.streams.get_highest_resolution().filesize)
self.ids.download_button.disabled = False
self.ids.thumbnail_image.source = self.thumbnail
self.ids.title_get.text = "Title: " + self.title
self.ids.resolution_get.text = "Resolution: " + self.resolution
self.ids.length.text = "Lenght: " + self.length
self.ids.total_size.text = "File Size: " + self.file_size
except exceptions.PytubeError as e:
toast(str(e))
else:
toast("AngaoBa URL Link Lalene.")

except Exception as e:
app = MDApp.get_running_app()
app.isLoading = False
self.ids.downloading.text = e
toast(text=f'{e}')

def download_command(self):
yt = self.yt
threading.Thread(target=self.download_video, args=(yt,)).start()

def download_video(self, yt):
self.downloading = True
app = MDApp.get_running_app()
try:
yt.streams.get_highest_resolution().download(output_path=app.output_path,skip_existing=False)
except Exception as e:
app = MDApp.get_running_app()
app.isLoading = False
toast(text=f'{e}')

# ++++==============================YOUTUBE END CLASSS ====================== #

# ================aPP MAIN CLASS ============================
class MainApp(MDApp):
isLoading = BooleanProperty(False)
icon = 'logo/download.ico'
if platform == 'win':
output_path = f'{str(Path.home() / "Downloads")}/Youtube Downloader/'
elif platform == 'android':
from android.storage import primary_external_storage_path
output_path = f'{str(primary_external_storage_path())}/Youtube Downloader/'
# Replace with your desired download location

def build(self):
self.title = 'Youtube Downloader'
self.theme_cls.theme_style = "Light"
self.theme_cls.primary_palette = "Orange"
self.theme_cls.accent_palette = "Orange"
if platform == 'android':
from android.permissions import request_permissions, Permission
request_permissions([Permission.READ_EXTERNAL_STORAGE, Permission.WRITE_EXTERNAL_STORAGE])

if platform == 'win':
pass
elif platform == 'android':
from android.permission import request_permissions, Permission
request_permissions([Permission.READ_EXTERNAL_STORAGE, Permission.WRITE_EXTERNAL_STORAGE])

return Builder.load_string(KV)

def AppEXIT(self):
self.dialog = MDDialog(text="Are you sure you want to exit?",
buttons=[MDFlatButton(text="CANCEL", on_release=self.close_dialog),
MDFlatButton(text="EXIT", on_release=self.exit_app), ], )
self.dialog.open()

def close_dialog(self, *args):
self.dialog.dismiss()

def exit_app(self, *args):
self.dialog.dismiss()
MDApp.get_running_app().stop()

def re1(self, e):
print(e)

def switch_screen(self, screen_name):
self.root.ids.screen_manager.current = screen_name
self.root.ids.nav_drawer.set_state("close")

if __name__ == '__main__':
MainApp().run()

17/06/2024

Main.kv file

# kivy.require("2.1.0")
KV = '''
# navigation drawer

#: import Clipboard kivy.core.clipboard.Clipboard
#: import threading threading
#: import platform kivy.platform
#: import Window kivy.core.window.Window
:
:
:
size_hint_y: 0.9
background_color:"red"
ScrollView:
MDList:
OneLineIconListItem:
text: "Home"
on_release: app.switch_screen('home')
IconLeftWidget:
icon: "home"
color:"white"
on_release: app.switch_screen('home')
OneLineIconListItem:
text: "YouYube Downloader"
on_release: app.switch_screen("youtube")
IconLeftWidget:
icon: "youtube"
on_release: app.switch_screen("youtube")

OneLineIconListItem:
text: "Exit"
on_release: app.AppEXIT()
IconLeftWidget:
icon: "exit-to-app"
on_release: app.popup()

screen
:
name: 'home'
MDBoxLayout:
orientation: 'vertical'
padding: dp(20)
spacing: dp(0)
pos_hint: {"top":0.99}
Image:
source: "assets/logo.png"
padding: "0dp"
# pos_hint: {"top":0.5}
size_hint_y: 5
MDScrollView:
MDList:
spacing:"20dp"
MDLabel:
text: "I'm Malem Akoijam"
halign: "center"
font_size:"20dp"
bold: True
italic:True
MDLabel:
text: "From Ningombam Mayai Leikai (Near Imphal Airport)"
halign: "center"
pos_hint: {"center_y":0.1}
font_size: "12dp"
MDLabel:
text: "This App is Enjoy for your!"
halign: "center"
# font_style: "H4"

MDFlatButton:
text: "Go to youtube"
pos_hint: {"center_x": 0.5}
on_release: app.switch_screen('youtube')
MDFloatLayout:
MDScreen:
# MDFloatingActionButtonSpeedDial:
# MDFabButton
# data: app.data_icon
# # rotation_root_button: True
# hint_animation: True
# bg_hint_color : app.theme_cls.primary_light

downloader
:
orientation:"vertical"
name: 'youtube'
MDBoxLayout:
orientation: "vertical"
# md_bg_color:"green"
height_adaptive: True
size: root.height,root.width
radius: 0,dp(16),dp(16),0
padding: dp(10),dp(10)
pos_hint_y: {"top":1}
MDBoxLayout:
orientation: "horizontal"
padding: dp(0),dp(0)
# pos_hint: {"top":9}
size_hint_y: None
height: "135dp"
MDTextField:
id: get_url_youtube
icon_left: "magnify"
hint_text : "Paste your URL here.."
helper_text: "Adom gi url sida happu,"
MDIconButton
icon: "plus"
user_font_size: "20dp"
on_release:
root.ids.get_url_youtube.text=Clipboard.paste()
root.go()

MDBoxLayout:
# size_hint_y: None
# height: "200dp"
orientation:'vertical'
radius: 16,dp(16),dp(16),16
spacing: "10dp"
AsyncImage:
id:thumbnail_image
MDBoxLayout:
orientation:'vertical'
spacing: "8dp"
MDBoxLayout:
OneLineListItem:
id : title_get
text: "title"
ripple_alpha:0
MDLabel:
id: resolution_get
adaptive_height:True
text: "Resolution"
# padding: "10dp","10dp"
pos_hint:{"center_x":.5,'center_y':.5}
MDLabel:
text:''
id: length
adaptive_height:True
text: "Length"
pos_hint:{"center_x":.5,'center_y':.5}
MDLabel:
text:""
id: total_size
adaptive_height:True
text:"File Size"
pos_hint:{"center_x":.5,'center_y':.5}
MDBoxLayout:
orientation:"horizontal" Window.width>dp(530) else 'vertical'
adaptive_height:True
spacing:"10dp"
MDBoxLayout:

MDBoxLayout:
pos_hint:{"center_x":.5,'center_y':.5}
spacing:"5dp"
size_hint_y:None
height:'50dp'
MDLabel:
id:downloading
text:''
adaptive_height:True
pos_hint:{"center_x":.5,'center_y':.5}
MDIconButton:
icon:"download"
adaptive_height:True
theme_text_color:'Custom'
id:download_button
disabled:True
text_color:app.theme_cls.accent_color
on_release: root.download_command()

MDBoxLayout:
size_hint_y:None

height:'30dp'
MDProgressBar:
min:0
max:100
id:progress_bar
running_duration:1
color:app.theme_cls.accent_color

# Navigation top

MDNavigationLayout:
ScreenManager:
id: screen_manager
HomeScreen:
YoutubeDownloader:

MDNavigationDrawer:
id: nav_drawer
drawer_type: "modal"
anchor:"left"
radius: 0,dp(16),dp(16),30
# md_bg_color: 230,230,250
# md_color:"black"
# rgba: 0.2, 0.2, 0.2, 1
text_color: "yellow"
ContentNavigationDrawer:

MDTopAppBar:
id : topbar
title: "YOUTUBE DOWNLOADER"
elevation: 2
pos_hint: {"top": 1}
left_action_items: [["menu", lambda x: app.root.ids.nav_drawer.set_state("toggle")]]
right_action_items: [["home", lambda x: app.switch_screen('home')]]

16/06/2024

eMail sender

Address

Ningombam
Imphal
795003

Telephone

+918787723480

Website

Alerts

Be the first to know and let us send you an email when Malem Akoijam posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to Malem Akoijam:

Share

Category