#آموزش استفاده از عبارات با قاعده
Import re # برای استفاده از عبارات باقاعده
.compile() # الگو را به کامپایل میدهیم
برای مثال:
re.compile(r'\d\d) # به دنبال دو رقم میگردد
.search() # عبارتی که میخواهید در آن جستجو کنید
.findall() # عبارتی که میخواهید در آن جستجو کنید
نکته:
تفاوت findall و search این است که در search اولین تطابق که ایجاد شود آن را به عنوان خروجی بر میگرداند،اما در findall تمامی همخوانی ها را در یک لیست بر میگرداند.
.group() # متن اصلی را نمایش میدهد
نکته:
اگر پس از search برای تبدیل نتیجه از group استفاده نکنید ،نتیجه برگردانده شده قابل فهم نخواهد بود
مثال:
import re
WeightRegEx=re.compile(r'\d\d.\d\d')
Mo=WeightRegEx.search(r'this is 56.34 kg')
Result=Mo.group()
print(Result)
#Regular_Expressions
#عبارات_با_قاعده
🔰 @raspberry_python
Import re # برای استفاده از عبارات باقاعده
.compile() # الگو را به کامپایل میدهیم
برای مثال:
re.compile(r'\d\d) # به دنبال دو رقم میگردد
.search() # عبارتی که میخواهید در آن جستجو کنید
.findall() # عبارتی که میخواهید در آن جستجو کنید
نکته:
تفاوت findall و search این است که در search اولین تطابق که ایجاد شود آن را به عنوان خروجی بر میگرداند،اما در findall تمامی همخوانی ها را در یک لیست بر میگرداند.
.group() # متن اصلی را نمایش میدهد
نکته:
اگر پس از search برای تبدیل نتیجه از group استفاده نکنید ،نتیجه برگردانده شده قابل فهم نخواهد بود
مثال:
import re
WeightRegEx=re.compile(r'\d\d.\d\d')
Mo=WeightRegEx.search(r'this is 56.34 kg')
Result=Mo.group()
print(Result)
#Regular_Expressions
#عبارات_با_قاعده
🔰 @raspberry_python
یک طراح وب با استفاده از CSS و HTML این نقاشی روغنی قدیمی رو شبیه سازی کرده:
کد https://github.com/cyanharlow/purecss-francine
طرح نهایی https://cyanharlow.github.io/purecss-francine/
@raspberrypython
کد https://github.com/cyanharlow/purecss-francine
طرح نهایی https://cyanharlow.github.io/purecss-francine/
@raspberrypython
Forwarded from 🐍 Python & Raspberry 🐍 (F.Naserizadeh)
Raspbian OS Programming with the Raspberry Pi
کتاب جدید رزبری پای به همراه اینترنت اشیا 👇
🌟انتشار 2019🌟
🔰 @raspberry_python
کتاب جدید رزبری پای به همراه اینترنت اشیا 👇
🌟انتشار 2019🌟
🔰 @raspberry_python
Agus_Kurniawan_Raspbian_OS_Programming.pdf
9.7 MB
Raspbian OS Programming with the Raspberry Pi
کتاب جدید رزبری پای به همراه اینترنت اشیا
🌟انتشار 2019🌟
🔰 @raspberry_python
کتاب جدید رزبری پای به همراه اینترنت اشیا
🌟انتشار 2019🌟
🔰 @raspberry_python
Forwarded from Sadra Codes
part-2.pdf
21.2 MB
🔺OpenMag+Pyshred-Pro
دانلود مجله اپنمگ نسخه 2 به صورت رایگان 🥇🌹
➖🔹 صفحه 30 مرتبط با گیت هاب من 🤓
🔰 @lnxpylnxpy
دانلود مجله اپنمگ نسخه 2 به صورت رایگان 🥇🌹
➖🔹 صفحه 30 مرتبط با گیت هاب من 🤓
🔰 @lnxpylnxpy
#باگـلینوکس
هر یوزر با UID بزرگ تر از INT_MAX مثلا 4e9 میتونه هر دستور systemctl رو اجرا کنه
https://gitlab.freedesktop.org/polkit/polkit/issues/74
هر یوزر با UID بزرگ تر از INT_MAX مثلا 4e9 میتونه هر دستور systemctl رو اجرا کنه
https://gitlab.freedesktop.org/polkit/polkit/issues/74
GitLab
unprivileged users with UID > INT_MAX can successfully execute any systemctl command (#74) · Issues · polkit / polkit · GitLab
This issue was initially created at https://github.com/systemd/systemd/issues/11026; crossposting it here as it seems to be a polkit issue: systemd version the...
❇️❇️ UART Communication on Raspberry Pi Using Python
import serial
from time import sleep
ser = serial.Serial ("/dev/ttyS0", 9600)
while True:
received_data = ser.read()
sleep(0.03)
data_left = ser.inWaiting()
received_data += ser.read(data_left)
print (received_data)
ser.write(received_data)
❇️ @raspberry_python
import serial
from time import sleep
ser = serial.Serial ("/dev/ttyS0", 9600)
while True:
received_data = ser.read()
sleep(0.03)
data_left = ser.inWaiting()
received_data += ser.read(data_left)
print (received_data)
ser.write(received_data)
❇️ @raspberry_python
Jojo_John_Moolayil_Learn_Keras_for.pdf
2.7 MB
Learn Keras for Deep Neural Networks
یادگیری کراس برای شبکه های عصبی عمیق
🌟جدید انتشار 2019🌟
🔰 @raspberry_python
یادگیری کراس برای شبکه های عصبی عمیق
🌟جدید انتشار 2019🌟
🔰 @raspberry_python
Forwarded from Micropython & IOT (F.Naserizadeh)
Hands-On ESP8266: Mastering Basic Peripherals
آموزش خوب برای esp8266 👇
🌟سال انتشار 2018🌟
🔰 @micropython_iot
آموزش خوب برای esp8266 👇
🌟سال انتشار 2018🌟
🔰 @micropython_iot
Forwarded from Micropython & IOT (F.Naserizadeh)
Hands-On-ESP8266-Mastering-Basic-Peripherals.pdf
12.8 MB
Hands-On ESP8266: Mastering Basic Peripherals
(NodeMcu)
آموزش خوب برای esp8266
🌟سال انتشار 2018🌟
🔰 @micropython_iot
(NodeMcu)
آموزش خوب برای esp8266
🌟سال انتشار 2018🌟
🔰 @micropython_iot
https://thepihut.com/blogs/raspberry-pi-tutorials/16021420-how-to-install-use-the-raspberry-pi-camera
Capture a new Image via the camera
@raspberry_python
Capture a new Image via the camera
@raspberry_python
https://medium.com/nanonets/topic-modeling-with-lsa-psla-lda-and-lda2vec-555ff65b0b05?source=placement_card_footer_grid---------1-41
Topic Modeling with LSA, PSLA, LDA & lda2Vec
@raspberry_python
Topic Modeling with LSA, PSLA, LDA & lda2Vec
@raspberry_python