چطور میتونیم از redis در پایتون استفاده کنیم ؟
https://realpython.com/python-redis/
@raspberry_python
https://realpython.com/python-redis/
@raspberry_python
Realpython
How to Use Redis With Python – Real Python
In this step-by-step tutorial, you'll cover how to use both Redis and its Python client library. You'll learn a bite-sized slice of Redis itself and master the redis-py client library.
افرادی گزارش کردن تو idle جدید پایتون توی mac وختی کدت رو باز میکنی چنین وارنینگی میده :
مگر اینطور نبود ک pep8 گفته بود از اسپیس استفاده کنید ب جای تب ؟
@raspberry_python
WARNING: The system preference "Prefer tabs when opening documents" is set to "Always". This will cause various problems with IDLE.
کسی هم ایا این مشکل مواجه شده ؟مگر اینطور نبود ک pep8 گفته بود از اسپیس استفاده کنید ب جای تب ؟
@raspberry_python
Forwarded from RASPBERRY PI FOR ALL (Kasra :|)
نحوه ساخت progress bar در پایتون
اولش ک باید کتابخونشو نصب کنیم
حالا برای ایمپورت کردنش مینویسیم:
`from tqdm import tqdm`
حالا هرجایی ک ی حلقه داشتیم تنها کاری ک باید بکنیم اینه ک اون چیزی ک حلقه روش اجرا میشه رو بزاریم توی
برای مثال:
@raspberrypiforall
اولش ک باید کتابخونشو نصب کنیم
pip install tqdm
حالا برای ایمپورت کردنش مینویسیم:
`from tqdm import tqdm`
حالا هرجایی ک ی حلقه داشتیم تنها کاری ک باید بکنیم اینه ک اون چیزی ک حلقه روش اجرا میشه رو بزاریم توی
tqdm()
برای مثال:
from tqdm import tqdm
from time import sleep
for i in tqdm(range(1000)):
sleep(0.1)
@raspberrypiforall
Forwarded from Raspberry Project (فرهاد ناصری زاده)
Machine Learning with Spark and Python: Essential Techniques for Predictive Analytic
یادگیری ماشین با پایتون
🌟🌟 جدید 2019 انتشارات وایلی
❇️ @raspberry_python
یادگیری ماشین با پایتون
🌟🌟 جدید 2019 انتشارات وایلی
❇️ @raspberry_python
Michael_Bowles_Machine_Learning.pdf
9.9 MB
Machine Learning with Spark and Python: Essential Techniques for Predictive Analytic
یادگیری ماشین با پایتون
🌟🌟 جدید 2019 انتشارات وایلی
❇️ @raspberry_python
یادگیری ماشین با پایتون
🌟🌟 جدید 2019 انتشارات وایلی
❇️ @raspberry_python
رمزنگاری light wight present با پایتون
https://github.com/xSAVIKx/PRESENT-cipher/blob/master/present/pyPresent.py
🔰@raspberry_python
https://github.com/xSAVIKx/PRESENT-cipher/blob/master/present/pyPresent.py
🔰@raspberry_python
GitHub
PRESENT-cipher/present/pyPresent.py at master · xSAVIKx/PRESENT-cipher
In this repo you'll find a reference python implementation of PRESENT cipher and my own minified version with 16-bit key and 8-bit block. - xSAVIKx/PRESENT-cipher
Forwarded from RASPBERRY PI FOR ALL (Kasra :|)
با استفاده از دستور lnav میتونید فایل های لاگ رو خیلی بهتر ببینید
برای نصب کردنش
برای اسنفاده کردنش خیلی راحت همه فایلای مورد نظر رو ب عنوان ارگومان برای برنامه بفرستید
@raspberrypiforall
برای نصب کردنش
sudo apt install lnav
برای اسنفاده کردنش خیلی راحت همه فایلای مورد نظر رو ب عنوان ارگومان برای برنامه بفرستید
@raspberrypiforall
#آموزش
# Example of flattening a nested sequence using subgenerators
مسطح نمودن محتواهای تو در تو
from collections import Iterable
def flatten(items, ignore_types=(str, bytes)):
for x in items:
if isinstance(x, Iterable) and not isinstance(x, ignore_types):
yield from flatten(x)
else:
yield x
items = [1, 2, [3, 4, [5, 6], 7], 8]
# Produces 1 2 3 4 5 6 7 8
for x in flatten(items):
print(x)
items = ['Dave', 'Paula', ['Thomas', 'Lewis']]
for x in flatten(items):
print(x)
❇️ @raspberry_python
# Example of flattening a nested sequence using subgenerators
مسطح نمودن محتواهای تو در تو
from collections import Iterable
def flatten(items, ignore_types=(str, bytes)):
for x in items:
if isinstance(x, Iterable) and not isinstance(x, ignore_types):
yield from flatten(x)
else:
yield x
items = [1, 2, [3, 4, [5, 6], 7], 8]
# Produces 1 2 3 4 5 6 7 8
for x in flatten(items):
print(x)
items = ['Dave', 'Paula', ['Thomas', 'Lewis']]
for x in flatten(items):
print(x)
❇️ @raspberry_python