This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org 100h | |
.model small | |
.stack 100h | |
.data | |
bval db 'Hello, World!$' | |
.code | |
main proc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org 100h | |
.data | |
array db 1h, 2h ,3h ,4h | |
.code | |
main proc | |
mov ax, @data | |
mov ds, ax | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org 100h | |
.data | |
array db 'Hello World!$' | |
.code | |
main proc | |
mov ax, @data | |
mov ds, ax | |
mov si, offset array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.data | |
num dw 8 ; Variable to store the number of Fibonacci sequence terms | |
sum dw 0 ; Variable to store the sum of Fibonacci sequence terms | |
res dw 0 ; Variable to store the result of the Fibonacci sequence | |
.code | |
main proc | |
mov ax, 0 ; Initialize first Fibonacci term to 0 | |
mov bx, 1 ; Initialize second Fibonacci term to 1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from textblob import TextBlob | |
line = input("Enter any incorrect phrase: ") | |
corrected_line = TextBlob(line).correct() | |
print("Original line:", line) | |
print("Corrected line:", corrected_line) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from langdetect import detect | |
text = input("Enter any text in any language: ") | |
print(detect(text)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
def get_valid_date(prompt): | |
while True: | |
try: | |
date_str = input(prompt) | |
date = datetime.datetime.strptime(date_str, '%Y-%m-%d').date() | |
return date | |
except ValueError: | |
print("Please enter a valid date in the format YYYY-MM-DD.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyqrcode | |
try: | |
link = input("Enter your link: ") | |
qr_code = pyqrcode.create(link) | |
qr_code.png("your_qr_code.png", scale=5) | |
print("QR code generated successfully!") | |
except Exception as e: | |
print("An error occurred:", e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
from pyzbar.pyzbar import decode | |
image = Image.open("your_image.png") | |
decoded_objects = decode(image) | |
for obj in decoded_objects: | |
print(obj.data.decode('ascii')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import calendar | |
print(calendar.month(2024, 5)) |
OlderNewer