Что-то вы гоните насчет "привычного вида формата 755 и 644". Я вот вообще не понял что это!😳
Действительно, что означают цифры которые мы получили в прошлом посте?
Это кодировка, заключающая в себе режимы доступа к файлу.
Подробней можно почитать в статье про chmod.
Там можно увидеть альтернативное обозначение того же самого с помощью символов r w x, что значит чтение, запись, исполнение.
Чтобы преобразовать восьмеричное число в такое обозначение в Python есть готовая функция
>>> stat.filemode(0o755)
'?rwxr-xr-x'
Мы видим 3 группы по 3 символа, дающие 3 типа доступа для 3 типов юзеров.
А что за знак вопроса в начале?
Давайте передадим в эту функцию необрезанное значение от os.stat
>>> stat.filemode(os.stat(path).st_mode)
'drwxr-xr-x'
Это данные, которые мы безжалостно обрезали в прошлый раз😼
Первый символ обозначает тип объекта. Это может быть файл (-), директория (d) или симлинк (l).
Вот простая схема данной кодировки
[1][3][3][3]
│ │ │ │
│ │ │ └──> Others Permissions
│ │ └─────> Group Permissions
│ └────────> Owner Permissions
└───────────> File Type
(разверните экран если вы с телефона)
Если вы попробуете получить пермишены для симлинка то получите пермишены для файла
>>> path = '.venv/bin/python3'
>>> stat.filemode(os.stat(path).st_mode)
'-rwxr-xr-x'
Чтобы получить свойства именно симлинка, нужно это явно указать
>>> stat.filemode(os.stat(path, follow_symlinks=False).st_mode)
'lrwxrwxrwx'
#tricks#basic
🚨 Public announcements 🚨
We’re excited to announce a *TikTok Challenge* to showcase your creativity and skills! 🎥
Theme: Highlight the features and benefits of our *Passenger Online Booking* service.
How to Participate:
1️⃣ Create an engaging TikTok video in *Amharic, English, Afaan Oromo, Af Somali, Afar*.
2️⃣ Include the Online Booking requirements is *National ID* in your video.
3️⃣ Be creative, original, and fun!
Deadline: Submit your video by Monday, February 17, 2025.
🎉 Prize:
The winner will receive a *cash bonus* and *special recognition* for their outstanding creativity!
Join the content creators' group by scanning the QR code to submit your videos. We can’t wait to see your creations!
#EthioDjiboutiRailway#ComingSoon#TravelMadeEasy#StayTuned#DigitalEthiopia#Fayda
🌟 FROM ADDIS TO SILICON VALLEY: YOUNG ETHIOPIANS BUILDING THE FUTURE!
የአዲስ አበባ ወደ ሲሊኮን ቫሊ፡ የኢትዮጵያ ወጣቶች ወደፊቱን እየገነቡ ነው!
Your country is not your obstacle - it's your SUPERPOWER! 💪
ሀገርህ መሰናክል አይደለም - ሱፐር ኃይልህ ነው!
🏆 REAL SUCCESS STORIES:
💰BETHLEHEM TILAHUN ALEMU | ብርሀን ጥላሁን ዓለሙ
• Founded soleRebels (footwear company) at 25
• $10M+ revenue, exports to 50+ countries
• Made from recycled tires + traditional weaving
• Featured in Forbes, Times Magazine
• "I turned our grandmother's craft into global brand!"
🎵TEDDY AFRO & MUSIC EMPIRE | ቴዎድሮስ ካሳሁን
• Albums sold 2M+ copies worldwide
• Concert revenues $500K+ per show
• African music ambassador to the world
• Started from Addis Ababa streets
🌱AGRITECH REVOLUTION:
• 2030 Vision: Digital farming apps
• EthioSIS: Soil mapping technology (government project)
• Young farmers earning 300% more using smartphones
• Export potential: $2B+ organic coffee market
👩💼WOMEN ENTREPRENEURS:
• Maya Haile-Mariam: Tech startup $5M valuation
• Selamawit Chekol: Fashion brand expanding to USA
• Martha Tilahun: Food processing empire
💡YOUR ADVANTAGES AS ETHIOPIAN:
✅ Ancient culture = unique design aesthetics
✅ Coffee heritage = premium brand story
✅ 13-month calendar = exclusive time management apps
✅ Multilingual (80+ languages) = translation services
✅ High altitude = athletic training programs
✅ History (3000+ years) = educational content gold mine
🚀START TOMORROW - 3 SIMPLE STEPS:
📱 STEP 1: DIGITAL PRESENCE
• Create Instagram/TikTok showcasing Ethiopian culture
• Use trending hashtags: #EthiopianTradition#AfricanInnovation
• Post daily content in English + Amharic
💰 STEP 2: MONETIZE YOUR KNOWLEDGE
• Teach Amharic online (Italki, Preply): $15-25/hour
• Sell handmade crafts on Etsy: $20-200+ per item
• Create YouTube cooking channel: Ethiopian cuisine going viral!
🌍 STEP 3: THINK GLOBAL
• Partner with diaspora communities (2M+ Ethiopians worldwide)
• Export coffee/spices through e-commerce
• Offer virtual Ethiopian cultural experiences
📞RESOURCES TO START:
• IceAddis: Startup incubator in Addis Ababa
• Ethiopia Commodity Exchange: Connect with coffee buyers
• Women in Tech Ethiopia: Female entrepreneurs network
• TechnoServe: Business development programs
💎GOLDEN RULE:
"Every problem in Ethiopia = business opportunity for smart youth!"
🔥MOTIVATIONAL CLOSE:
Your ancestors built Lalibela without cranes. You can build digital empires with just a smartphone!
The world needs what Ethiopia has. Your job is to package it beautifully and sell it globally! 🌍✨
የአባቶችህ ላሊበላን ክሬን ሳይጠቀሙ ገነቡት። አንተ ስማርትፎን ብቻ ተጠቅመህ ዲጂታል ግዛቶችን መገንባት ትችላለህ!
✨ Expert-reviewed content | Verified by Ethiopian business & tech specialists
#EthiopianEntrepreneurs#StartupEthiopia#DigitalEthiopia#AfricanInnovation#ኢትዮጵያ#BusinessSuccess🇪🇹💰🚀
💻 FROM ANCIENT SCRIPTS TO DIGITAL CODE: ETHIOPIA'S TECH TAKEOVER
💻 ከጥንታዊ ጽሑፍ እስከ ዲጂታል ኮድ: የኢትዮጵያ ቴክኖሎጂ መቆጣጠር
🔥 КОГДА 3000-ЛЕТНЯЯ ЦИВИЛИЗАЦИЯ ВСТРЕЧАЕТ SILICON VALLEY!
Ethiopian youth aren't just consuming technology - they're CREATING it! 💫
🌟 DIGITAL ETHIOPIA RISING:
🏙️ ADDIS ABABA = AFRICA'S SILICON VALLEY:
- Tech hubs sprouting faster than coffee plants
- Young developers coding the future of Africa
- From ancient Ge'ez script to programming languages!
💡 ETHIOPIAN TECH STARTUPS CHANGING THE GAME:
🚀Ride - Ethiopia's answer to Uber, built for African roads
🚀ZayRide - Local mobility solutions that actually work
🚀Deliver Addis - Food delivery revolutionizing Ethiopian dining
🚀EthSwitch - Fintech making banking accessible to everyone
🚀Gebeya - Training Africa's next generation of developers
🚀iCog Labs - AI and robotics putting Ethiopia on the tech map
📊 THE NUMBERS DON'T LIE:
✨ 50%+ youth population = MASSIVE tech potential
✨ Growing internet penetration = Digital revolution in motion
✨ Government support for tech initiatives = Infrastructure backing innovation
✨ Ancient problem-solving culture + Modern tools = Unstoppable combination
🎯 YOUNG ETHIOPIAN DEVELOPERS SAY:
*"Our ancestors built Lalibela without blueprints - we build apps without limits!"*
*"ቅድመ አያቶቻችን ላሊበላን ያለ ንድፍ ገንብተዋል - እኛ ያለ ገደብ መተግበሪያዎችን እንገነባለን!"*
🔋 THE DIGITAL SWAG:
- Coding in multiple languages (including Amharic interfaces!)
- Building solutions for African problems
- Connecting rural Ethiopia to global markets
- Making ancient wisdom accessible through modern tech
🚀 PLOT TWIST:
While Silicon Valley talks about "disruption," Ethiopia has been disrupting expectations for millennia!
💪 THE FUTURE IS BEING WRITTEN:
In Ethiopian coffee shops, young developers are coding solutions that will change Africa forever!
*From coffee ceremonies to coding ceremonies - the grind never stops* ☕💻
#DigitalEthiopia#የኢትዮጵያቴክኖሎጂ#EthiopianTech#AfricaTech#TechStartups#DigitalRevolution#EthiopianInnovation#TechHub#ኢትዮጵያላይፍ#FutureIsEthiopian