Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révisionLes deux révisions suivantes |
teaching:progappchim:notions_avancees [2022/03/24 09:26] – [Expressions rationnelles (régulières)] villersd | teaching:progappchim:notions_avancees [2022/12/06 10:39] – [Liste en compréhension] villersd |
---|
* [[https://gist.github.com/bearfrieze/a746c6f12d8bada03589]] | * [[https://gist.github.com/bearfrieze/a746c6f12d8bada03589]] |
* [[https://medium.com/code-85/a-beginners-guide-to-python-list-comprehensions-7dbb0039f065|A Beginner’s Guide to Python List Comprehensions]] (Jonathan Hsu, Medium, 23/04/2020) | * [[https://medium.com/code-85/a-beginners-guide-to-python-list-comprehensions-7dbb0039f065|A Beginner’s Guide to Python List Comprehensions]] (Jonathan Hsu, Medium, 23/04/2020) |
| * [[https://iam-akshay.medium.com/python-one-liner-superb-tricks-c611aad98553|Python one-liner superb tricks]] Akshay Jain, Medium, 16/04/2022 |
| * [[https://theanup.medium.com/10-powerful-python-one-liners-for-daily-use-8733dac0bc2c|15 Powerful Python One-Liners for Daily Use]] Anup Das, Medium, 22/11/2022 |
| |
| |
===== map, filter, reduce, lambda, pipe ===== | ===== map, filter, reduce, lambda, pipe ===== |
* [[https://towardsdatascience.com/write-clean-python-code-using-pipes-1239a0f3abf5|Write Clean Python Code Using Pipes - A Short and Clean Approach to Processing Iterables]] Khuyen Tran, medium, october 2021 | * [[https://towardsdatascience.com/write-clean-python-code-using-pipes-1239a0f3abf5|Write Clean Python Code Using Pipes - A Short and Clean Approach to Processing Iterables]] Khuyen Tran, medium, october 2021 |
* ... | * ... |
| |
| ===== Le rôle du caractère underscore en Python ===== |
| * [[https://www.datacamp.com/community/tutorials/role-underscore-python|Role of Underscore(_) in Python Tutorial - In this tutorial, you're going to learn about the uses of underscore(_) in python]] Hafeezul Kareem Shaik, Medium (DataCmap) October 26th, 2018 |
| * [[https://www.geeksforgeeks.org/underscore-_-python/]] |
| |
===== Transformations et manipulations de chaînes (string) ===== | ===== Transformations et manipulations de chaînes (string) ===== |
===== Interface utilisateur graphique (GUI) ===== | ===== Interface utilisateur graphique (GUI) ===== |
* [[https://medium.com/analytics-vidhya/how-to-build-your-first-desktop-application-in-python-7568c7d74311|How to build your first Desktop Application in Python]] Ampofo Amoh - Gyebi, Medium, 12/12/2020 | * [[https://medium.com/analytics-vidhya/how-to-build-your-first-desktop-application-in-python-7568c7d74311|How to build your first Desktop Application in Python]] Ampofo Amoh - Gyebi, Medium, 12/12/2020 |
| |
| ===== emails ===== |
| smtplib et poplib : |
| * [[https://twitter.com/driscollis/status/1508506999268552713]] |
| * [[https://twitter.com/driscollis/status/1508570173606928386]] |
| |
| <code python> |
| import smtplib |
| |
| HOST = "smtp.mydomain.com" |
| SUBJECT = "Test email from Python" |
| TO = "mike@mydomain.com" |
| FROM = "python@mydomain.com" |
| text = "blah blah blah" |
| BODY = "\r\n".join(( |
| f"From: {FROM}", |
| f"To: {TO}", |
| f"Subject: {SUBJECT}", |
| "", |
| text) |
| ) |
| server = smtplib.SMTP(HOST) |
| server.sendmail(FROM, [TO], BODY) |
| server.quit() |
| </code> |
| |
| <code python> |
| import poplib |
| |
| mailbox = poplib.POP3('pop3.host.com') |
| mailbox.user("USERNAME") |
| mailbox.pass_("PASSWORD") |
| numMessages = len(mailbox.list()[1]) |
| for i in range(numMessages): |
| for j in mailbox.retr(i+1)[1]: |
| print(j) |
| </code> |
| |
===== Création et gestion de packages ===== | ===== Création et gestion de packages ===== |