ᴅᴇᴠʟᴏꜱꜱᴏ – Telegram
ᴅᴇᴠʟᴏꜱꜱᴏ
328 subscribers
123 photos
1 video
7 files
3 links
°-DevLosso-°

🌐 سورس کدهای کاربردی 
📰 آخرین اخبار دنیای تکنولوژی 
💻 آموزش‌ها و نکات شبکه و برنامه‌نویسی 
🚀 فروش سرور مجازی (VPS) 
🛠️ انجام پروژه‌های تخصصی 

👤 برای مشاوره و همکاری: @imlosso
Download Telegram
🫢 هیچکس GTA 6 رو با 100 دلار نمی‌خواد!

🔄طبق تحقیقات جدید، فقط 35% گیمرها حاضرن نسخه‌ی GTA 6 رو با قیمت 100 دلار بخرن ، در مقابل، 60% بازیکنا گفتن اگه قیمتش همون 70 دلار استاندارد باشه، حتماً یا احتمالاً میخرنش!

💸 کارشناسان معتقدن این تصمیم میتونه یکی از بزرگ‌ترین اشتباهات راک‌استار باشه⚠️؛ چون قیمت بالا، در واقع باعث درآمد کمتر میشه نه بیشتر!🔋

🎁 مدیر داده‌های MIDiA Research :

🛍«فروش بازی با قیمت 0️⃣7️⃣ دلار ، سود بیشتری داره تا 100 دلار؛ چون بخش زیادی از خریدارها از دست میرن.»

🎁 @DevLosso
Please open Telegram to view this post
VIEW IN TELEGRAM
154333
یوزرنیم⭐️
با این تیکه کد میتونید با ترکیب اسم فامیلی سال تولد و یسری کلمات از طرف خودتون ی یوزرنیم ترکیبی بسازید 🇺🇸📞


#make username
import random

def generate_usernames(first_name, last_name, birth_year):
adjectives = ["cool", "fast", "smart", "crazy", "silent", "brave", "epic", "losso"]
suffixes = ["123", "007", "x", "pro", "dev", "king", "queen" , "python"]

usernames = []
for _ in range(5):
adj = random.choice(adjectives)
suf = random.choice(suffixes)
username = f"{adj}_{first_name.lower()}{last_name[:2].lower()}{birth_year[-2:]}{suf}"
usernames.append(username)

return usernames

print("smart username generator")
first = input("enter your first name: ")
last = input("enter your last name: ")
year = input("enter your birth year: ")

suggestions = generate_usernames(first, last, year)
print("\n suggested usernames:")
for name in suggestions:
print("🔸", name)


@DevLosso
Please open Telegram to view this post
VIEW IN TELEGRAM
👏7422
متد های لیست در پایتون 🖥🖥


🖥 @DevLosso
Please open Telegram to view this post
VIEW IN TELEGRAM
1933221
با این کد روند کار زنجیره 🔗 بلاکچین تا حدودی متوجه میشید 🐍

اینجوریه که ی بلوک دارید و برنامه میره سراغ پیدا کردن بلوک بعدی از طریق هش بلوک قبلی و این کار هرچی جلوتر بره پیدا کردن بلوک جدید سخت تر و زمانبر تر میشه

import hashlib
import time

class Block:
def __init__(self, index, previous_hash, timestamp, data, hash):
self.index = index
self.previous_hash = previous_hash
self.timestamp = timestamp
self.data = data
self.hash = hash

def __str__(self):
return f"block {self.index}:\nhash: {self.hash}\nprevious Hash: {self.previous_hash}\ntimestamp: {self.timestamp}\ndata: {self.data}\n"

def calculate_hash(index, previous_hash, timestamp, data):
value = str(index) + str(previous_hash) + str(timestamp) + str(data)
return hashlib.sha256(value.encode()).hexdigest()

def create_genesis_block():
return Block(0, "0", int(time.time()), "genesis block", calculate_hash(0, "0", int(time.time()), "genesis block"))

def create_new_block(previous_block, data):
index = previous_block.index + 1
timestamp = int(time.time())
hash = calculate_hash(index, previous_block.hash, timestamp, data)
return Block(index, previous_block.hash, timestamp, data, hash)


blockchain = [create_genesis_block()]
previous_block = blockchain[0]


num_of_blocks_to_add = 15

for i in range(num_of_blocks_to_add):
data = f"block {i + 1} data"
new_block = create_new_block(previous_block, data)
blockchain.append(new_block)
previous_block = new_block
print(new_block)

print("blockchain is built")

💵 @DevLosso
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
164👏3321
🛡 هَش (HASH)🛡

تو این کد میتونید با روند هَش کردن دیتاها اشنا شید همچنین با متد های هَش کردن که هرکدوم کارایی و قدرت خودشونو دارن 🖥

import hashlib

text = input("enter your text: ")
hash_value = hashlib.sha256(text.encode()).hexdigest()
print(f"📝 '{text}' → {hash_value}")
#**************************
# HaSh MetHodS:
# sha256()  md5()  ha1()  sha512()  blake2b()  sha224()  sha384()  sha3_256()
#**************************

🖥 @DevLosso
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
64441
🚠HTTP Status Codes 🖥

🖥 @DevLosso
Please open Telegram to view this post
VIEW IN TELEGRAM
164321
محتوای امروز یکم فرق داره 😍
بجای روند همیشگی امروز چندتا والپیپر خوشگل اوردیم 🖼

🖥 @DevLosso
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
54421
برنامه محاسبه سود بانکی 💸💸

مدت زمان نگهداری پول تو بانک ، درصد سود ، مقدار پول به عنوان ورودی میگیره و محاسبه میکنه که تو 🔠 روز چقدر سود پولمون میشه
#sood bank
def calculate_interest(principal, sood, days):
    interest = (principal * sood * days) / (100 * 365)
    return interest

try:
    days = int(input("how many DAYS have you kept your money in the bank? : "))
    sood = float(input("eenter the annual interest rate: "))
    principal = float(input("enter the amount of money: "))
    interest = calculate_interest(principal, sood, days)

    print(f"Your interest for {days} days is: {interest:.1f} currency")
except ValueError:
    print("invalid values")

#output   
#how many DAYS have you kept your money in the bank? : 30
#eenter the annual interest rate: 23
#enter the amount of money: 100000000
#Your interest for 30 days is: 1890411.0 currency

🖥 @DevLosso
Please open Telegram to view this post
VIEW IN TELEGRAM
6542💯1
امروز ی کد باحالو کاربردی اوردیم که متنو به صورت ویس میخونه براتون📞🎙

زبانش پایتونه 🐍

import pyttsx3
from colorama import init , Fore
init()

def txt_speech(text):
    engine = pyttsx3.init()
    engine.setProperty('rate', 150)
 
    engine.setProperty('voice', 'com.apple.speech.synthesis.voice.Alex') #for mac

    engine.say(text)
    engine.runAndWait()

text = input(Fore.RED + "enter your txt:" + Fore.GREEN)
txt_speech(text)

🖥 @DevLosso
Please open Telegram to view this post
VIEW IN TELEGRAM
15🥰3👏3👎2222
کامندای مهم تو لینوکس 🍏🖥

🖥 @DevLosso
Please open Telegram to view this post
VIEW IN TELEGRAM
18622👎11
برنامه محاسبه سن به صورت دقیق 🎂😈

#age calculator
from datetime import datetime

def calculate_age(birth_date_str):
    birth_date = datetime.strptime(birth_date_str, "%Y-%m-%d")
    today = datetime.today()

    age_days = (today - birth_date).days
    years = age_days // 365
    months = (age_days % 365) // 30
    days = (age_days % 365) % 30

    return years, months, days

print("enter your birth date in format YYYY-MM-DD:")
birth_input = input("> ")

try:
    y, m, d = calculate_age(birth_input)
    print(f"your age is: {y} years, {m} months, and {d} days")
except:
    print("Invalid date format Please use YYYY-MM-DD")

😄 @DevLosso
Please open Telegram to view this post
VIEW IN TELEGRAM
643👏1💯1
Word Finder 📝📝

با این برنامه میتونید متن مورد نظر وارد کنید و تعیین کنید که برنامه دنبال چه کلمه هایی بگردد و در نتیجه برنامه قسمتی که کلمه در اون متن بود هایلایت میکنه و همچنین تعداد تکرار اون کلمه تو اون متن نمایش میده🔎🔎

این برنامه برای متون بلند که وقت خواندنش نیست خیلی میتونه کمک کنه همچنین در زمان سرچ کلمات با کاما , از هم جدا کنید✂️

#finder
from colorama import init, Fore, Style, Back
init(autoreset=True)

COLORS = [Fore.YELLOW, Fore.CYAN, Fore.MAGENTA, Fore.GREEN, Fore.RED, Fore.BLUE , Fore.BLACK ,Fore.LIGHTCYAN_EX , Fore.LIGHTRED_EX]

text = input("enter your text: ")
keys_input = input("keywords (word1 , word2): ")
keys = [k.strip().lower() for k in keys_input.split(",") if k.strip()]

highlighted_text = text
counts = {}

for idx, k in enumerate(keys):
    color = COLORS[idx % len(COLORS)]
    highlighted_text = highlighted_text.replace(k, f"{color}{k}{Style.RESET_ALL}")
    highlighted_text = highlighted_text.replace(k.noscript(), f"{color}{k.noscript()}{Style.RESET_ALL}")
    counts[k] = text.lower().count(k)

print(f"{Back.LIGHTMAGENTA_EX}result:{Style.RESET_ALL}")
print(highlighted_text)

print(f"{Back.LIGHTMAGENTA_EX}count:{Style.RESET_ALL}")
for idx, k in enumerate(keys):
    color = COLORS[idx % len(COLORS)]
    c = counts[k]
    print(f"  {color}{k}: {c}{Style.RESET_ALL}")

📝 @DevLosso
Please open Telegram to view this post
VIEW IN TELEGRAM
75221
🔄 انویدیا اولین شرکت 5 تریلیون دلاری تاریخ😝💲

روز گذشته ارزش بازار شرکت انویدیا به 5.12 تریلیون دلار رسید تا این غول سبز رنگ به اولین شرکت 5 تریلیون دلاری دنیا تبدیل شود.

🔔@DevLosso
Please open Telegram to view this post
VIEW IN TELEGRAM
1🤯73🎉22