What is the output of the code given above?
Anonymous Quiz
15%
[0, 1]
18%
[3, 4]
5%
[]
62%
[0, 1, -2]
Progress bar
🔸tqdm is a Python library that allows you to output a smart progress bar by wrapping around any iterable. A tqdm progress bar not only shows you how much time has elapsed, but also shows the estimated time remaining for the iterable.
⚙️Installation
🔗Github
#progressbar #tqdm
🔸tqdm is a Python library that allows you to output a smart progress bar by wrapping around any iterable. A tqdm progress bar not only shows you how much time has elapsed, but also shows the estimated time remaining for the iterable.
⚙️Installation
pip install tqdm
To start using tqdm you just need to wrap the tqdm()
function around the iterable, which will generate a progress bar while our for-loop is running. We can also assign a name to the progress bar using the desc
keyword argument. The resulting tqdm progress bar gives us information that includes the task completion percentage, number of iterations complete, time elapsed, estimated time remaining, and the iterations completed per second.🔗Github
#progressbar #tqdm
Getting user's password
🔸Getpass is a standard library module that provides a secure way to handle the password prompts where programs interact with the users via the terminal. Using this module, it is possible to accept passwords in Python programs and keep the passphrases safe.
The module provides two functions:
▪️The
▪️The
🔗Docs
🔗[GeeksForGeeks] getpass() and getuser() in Python
#getpass
🔸Getpass is a standard library module that provides a secure way to handle the password prompts where programs interact with the users via the terminal. Using this module, it is possible to accept passwords in Python programs and keep the passphrases safe.
The module provides two functions:
▪️The
getpass()
function is used to prompt to users using the string prompt and reads the input from the user as Password.▪️The
getuser()
function displays the login name of the user.🔗Docs
🔗[GeeksForGeeks] getpass() and getuser() in Python
#getpass
What is the output of the code given above?
Anonymous Quiz
15%
<class 'NoneType'>
35%
<class 'int'>
21%
<class 'function'>
29%
<class 'generator'>
Spellchecker
🔸Have you ever wondered how search engines make suggestions for correcting misspelled words so accurately? They are using "spelling correction" algorithms. And the pyspellchecker is a Python open-source package that implements such an algorithm.
⚙️Installation
🔗Github
🔗pyspellchecker documentation
#spellchecker
🔸Have you ever wondered how search engines make suggestions for correcting misspelled words so accurately? They are using "spelling correction" algorithms. And the pyspellchecker is a Python open-source package that implements such an algorithm.
⚙️Installation
pip install pyspellchecker
As you can see in the screenshot above, pyspellchecker
is pretty straightforward to use. It also supports multiple languages including English, Spanish, German, French, and Portuguese.🔗Github
🔗pyspellchecker documentation
#spellchecker
Underscore Trick
Many of Python developers don't typically know about all the functionalities of the underscore in Python. But actually, you can use the underscore
It saves a lot of time and keystrokes if you are using your Python shell as a calculator (just like me 😄).
#tricks
Many of Python developers don't typically know about all the functionalities of the underscore in Python. But actually, you can use the underscore
_
to refer to the result of the previously executed command. Check out the code above.It saves a lot of time and keystrokes if you are using your Python shell as a calculator (just like me 😄).
#tricks
Awesome Python 🐍
♦️The Awesome Python GitHub repository is a thoughtful yet enormous collection of Python frameworks, libraries, tools, and other handy resources. Moreover, the repo also provides links to useful books, newsletters, podcasts, and web series dedicated to making Python easier for everyone.
❗️It's highly recommended to bookmark this GitHub repo so you can easily find the right component for your next project.
🔗Awesome Python GitHub
#materials
♦️The Awesome Python GitHub repository is a thoughtful yet enormous collection of Python frameworks, libraries, tools, and other handy resources. Moreover, the repo also provides links to useful books, newsletters, podcasts, and web series dedicated to making Python easier for everyone.
❗️It's highly recommended to bookmark this GitHub repo so you can easily find the right component for your next project.
🔗Awesome Python GitHub
#materials
Creating Tables with PrettyTable
🔸PrettyTable is a simple Python library designed to make it easy to represent tabular data in nice and neat ASCII tables.
⚙️Installation
You can add columns as well by using the
🔗GitHub
#prettytable
🔸PrettyTable is a simple Python library designed to make it easy to represent tabular data in nice and neat ASCII tables.
⚙️Installation
pip install prettytable
PrettyTable class, provided by this library, allows you to create such a tables. To add a new row to a table, simply set the field names of your table using the field_names
attribute, and then add rows using the add_row()
method.You can add columns as well by using the
add_column()
method, which takes two arguments: the column name and a list or tuple which contains the column data.🔗GitHub
#prettytable
Neural Networks 📺
This playlist has everything you need to know about Neural Networks, from the basics, all the way to image classification with Convolutional Neural Networks.
1. Neural Networks Pt. 1: Inside the Black Box [YouTube]
2. The Chain Rule [YouTube]
3. Gradient Descent, Step-by-Step [YouTube]
4. Neural Networks Pt. 2: Backpropagation Main Ideas [YouTube]
5. Backpropagation Details Pt. 1: Optimizing 3 parameters simultaneously. [YouTube]
...
13. Neural Networks Part 8: Image Classification with Convolutional Neural Networks [YouTube]
🔗Full YouTube playlist
#materials #machinelearning #neuralnetworks
This playlist has everything you need to know about Neural Networks, from the basics, all the way to image classification with Convolutional Neural Networks.
1. Neural Networks Pt. 1: Inside the Black Box [YouTube]
2. The Chain Rule [YouTube]
3. Gradient Descent, Step-by-Step [YouTube]
4. Neural Networks Pt. 2: Backpropagation Main Ideas [YouTube]
5. Backpropagation Details Pt. 1: Optimizing 3 parameters simultaneously. [YouTube]
...
13. Neural Networks Part 8: Image Classification with Convolutional Neural Networks [YouTube]
🔗Full YouTube playlist
#materials #machinelearning #neuralnetworks
Python Data Validation for Humans
🔸Validators is a simple validation library where validating a value does not require defining a form or a schema.
⚙️Installation
🔗GitHub
🔗Docs
#validators
🔸Validators is a simple validation library where validating a value does not require defining a form or a schema.
⚙️Installation
pip install validatorsThe library allows you to validate emails, urls, and more specific strings including ipv4/ipv6, slug etc. Each validator is a simple function that takes the value to validate and possibly some additional key-value arguments. Each function returns
True
when validation succeeds and ValidationFailure
object when validation fails.🔗GitHub
🔗Docs
#validators
What is the output of the code given above?
Anonymous Quiz
8%
False False
47%
True False
29%
True True
16%
False True