pymysql This function uses the pymysql library to connect to a MySQL database and returns a connection object. 2024-12-16 12:16:00 Database connection function 16 views
Basemap, Matplotlib This function uses the Basemap library to draw a map and marks a point on the map with the specified longitude and latitude. 2024-12-16 12:16:00 Map drawing 13 views
pyodbc This function uses the pyodbc library to connect to a specified database. The user needs to provide the driver name, server, database name, username, and password. 2024-12-16 12:15:59 Function 15 views
Celery, random, celery, crontab This code defines a Celery task that runs an addition task every day at midnight, and demonstrates how to use Celery's scheduled tasks and task invocation. 2024-12-16 12:15:59 The type of code 19 views
flask-caching, Flask, random This function calls a cached random number generator and returns the sum of two arguments. 2024-12-16 12:15:59 Function 14 views
Python, random This function takes a list as an argument and uses the shuffle method from the random library to randomly shuffle the elements of the list. 2024-12-16 12:15:59 Python Function 14 views
OpenCV, NumPy This function reads an image and uses OpenCV library features such as thresholding, morphological operations, and contour detection to identify shapes in the image, such as triangles, rectangles, squares, and circles. It then draws the shape names on the original image. 2024-12-16 12:15:58 Image processing 14 views
FastAPI, Pydantic This function creates a FastAPI application, defines a User model, generates 10 random user data, and provides a GET interface to retrieve user data. 2024-12-16 12:15:58 API service 14 views
cryptography This function uses the PBKDF2HMAC algorithm to generate a hash of a password. It accepts a password and an optional salt value. If no salt is provided, it generates a random salt. 2024-12-16 12:15:58 Cryptography 13 views
pymysql This function selects a random table from the specified database and returns the table name. If there are no tables in the database, it returns None. 2024-12-16 12:15:58 Database operation 16 views