In the Jianghu , It has been circulating about Python The legend of ——Python omnipotent , Besides having children .
Python To have such a good name , Not only because of their own superiority , What's more, they can't do without the omnipotent libraries behind them .
today , Just let us know 5 paragraph Python library , See how they work in different fields ~
Pillow yes PIL(Python Graphics library ) A branch of . For users ,Pillow More friendly , Through it, you can create thumbnails , Converting between file formats 、 rotate 、 Application filter , Display images, etc .
If you want to do Batch image processing , Pillow Is a necessary library .
stay Pillow In the library , There are more than twenty modules , It also supports many plug-ins . The most common one is Image Module with the same name Image class , Many other modules are in Image Based on the module, the image is further processed .
from PIL import Image
im = Image.open("picture.jpg")
new_im = im.convert("L")
print(new_im.mode)
new_im.show()
PyTorch It's based on Torch Of Python Open source machine learning library , For natural language processing applications .
It is mainly composed of Facebook The AI team developed , Not only can you achieve powerful GPU Speed up , It also supports dynamic neural networks , This is now many mainstream frameworks, such as TensorFlow Not supported .
PyTorch Provides Two advanced features :
1. With powerful GPU Accelerated tensor computation ;
2. A deep neural network with an automatic derivation system , except Facebook outside ,Twitter、GMU and Salesforce And other institutions have adopted PyTorch.
One “ Rich and colorful ” Module ——Python Of Colorama modular . It can span multiple terminals , Display different colors and backgrounds of Fonts , Just import colorama The module can , You don't have to look like linux Same color designation .
Fore: Used to change the color of the output text ;
Style: Used to change the brightness of the output text ;
Back: Used to change the background of the output text .
Colorama Support 8 Color : black (black)、 Red (red)、 green (green)、 yellow (yellow)、 Blue (blue)、 Magenta (magenta)、 Cyan (cyan)、 white (white).
from colorama import Fore, Back, Style
print(Fore.RED + 'some red text')
print(Back.GREEN + 'and with a green background')
print(Style.DIM + 'and in dim text')
print(Style.RESET_ALL)
print('back to normal now')
Learn from good examples Python Whether it's employment or sideline, it's good to make money , But learn to Python Still have a learning plan . Finally, let's share a complete set of Python Learning materials , For those who want to learn Python Let's have a little help !
Python The technical points in all directions are sorted out , Form a summary of knowledge points in various fields , The use of it is , You can find the corresponding learning resources according to the above knowledge points , Make sure you learn more comprehensively .( At the end of the article !)
reminder : Limited space , Packaged folder , The way to get it is “ At the end of the article ”!!!
Watch the zero basics learning video , Watching video learning is the quickest and most effective way , Follow the teacher's ideas in the video , From foundation to depth , It's still easy to get started .
Optical theory is useless , Learn to knock together , Do it , Can you apply what you have learned to practice , At this time, we can make some practical cases to learn .
Check the learning results .
We learn Python Must be to find a well paid job , The following interview questions are from Ali 、 tencent 、 The latest interview materials of big Internet companies such as byte , And the leader Ali gave an authoritative answer , After brushing this set of interview materials, I believe everyone can find a satisfactory job .
Guarantee 100% free
】