What modules in Python do you think are awesome?

The following 10 awesome modules of Python are recommended. For example, the numpy and pandas packages are used for data cleaning. The matplotlib library is used for data visualization. The matplotlib library is easy to get started. For more advanced learning, the seaborn library is an improved chart drawing of the matplotlib library. Method, if […]

21. Integration of Flink’s table API and DataStream API (2) – batch processing mode and insert-only stream processing

Flink series of articles 1. Flink column The Flink column systematically introduces a certain knowledge point and explains it with specific examples. 1. Flink deployment series This section introduces the basic content related to the deployment and configuration of Flink. 2. Flink basic series This part introduces the basic parts of Flink, such as terminology, […]

Open source software FFmpeg generates models using image data sets

This article talks about the open source software ffmpeg, which has helped countless video software companies, countless online video websites, and countless CDN cloud service vendors. Share how to use it to convert various video or movie files into tens of thousands of image data sets and wallpaper collections, so that the model program in […]

Python generates a pair of RSA keys and saves the public and private keys as .pem files respectively. Use the public key in the generated RSA key pair to encrypt the data, and then use the private key to decrypt. Convert RSA’s public key exponent (E) and modulus (N) to .pem format

You can use the cryptography library to generate a pair of RSA keys and save the public and private keys as .pem files respectively. Here is a sample code: from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa # Generate RSA key pair private_key = rsa.generate_private_key( public_exponent=65537, key_size=2048, backend=default_backend() ) # Get […]

One article decoding language models: principles, practice and evaluation of language models

In this article, we take a deep dive into the inner workings of language models, from basic models to large-scale variants, and analyze the pros and cons of various evaluation metrics. The article provides a comprehensive and in-depth perspective through code examples, algorithm details, and latest research, aiming to help readers more accurately understand and […]

python exceptions, modules and packages

1. Abnormal Exception: When an error is detected, the Python interpreter cannot continue to execute. Instead, some error prompts appear. This is the so-called “exception”, which is what we often call BUG. 1.1 Catching Exceptions Basic syntax: try: error code may occur except: Code to be executed if an exception occurs Code example: # Try […]

[vs+qt] Use the VTK library to read the STL model and display the STL model on the QT interface

Article directory summary Show results Implementation steps Code summary summary Summary To use the complete interface, click the button to select the file, read the stl three-dimensional model, and display the model on the qvtkWidget control. Effect display 1.Select the file address 2. Interface window display Implementation steps 1. Click the Open File button, select […]

[Python] collections module

The collections module in Python contains some container data types. import collections [x for x in dir(collections) if not x.startswith(‘_’)] # result: [‘ChainMap’, ‘Counter’, ‘OrderedDict’, ‘UserDict’, ‘UserList’, ‘UserString’, ‘abc’, ‘defaultdict’, ‘deque’, ‘namedtuple’] 1. collections.ChainMap() [Search multiple dictionaries] Search multiple dictionaries in the order in which they appear. m=collections.ChainMap(Dictionary 1, Dictionary 2, Dictionary 3,…): manages multiple […]

Pytorch model use, modification, saving and loading

This article introduces the use, modification, saving and loading of Pytorch models. Taking torchvision in image processing as an example, PyTorch provides more pre-trained models through the torchvision.models module. Article directory Use and modification of network models VGG16 model use VGG16 model modification Saving and reading network models Save the model Loading the network model […]

[Android] Screen lag, optimized list fluency, pull down to refresh, pull up to load more components, RefreshLayout modification

I have also written about similar components before: Address: Pull down to refresh & pull up to load more components SmartRefreshLayout I originally planned to replace it with this one, but after careful research I found it was not suitable. The functions are very good, but they cannot be embedded in the current engineering system. […]