Bokeh, Numpy This function uses the Bokeh library to generate a scatter plot. It accepts two arrays x and y as inputs, which are used as the data source for the scatter plot. 2024-12-16 12:16:35 The type of code 16 views
Python, File I/O This function is used to read a file and return a list of lines, where each line is split into a list by a specified delimiter. It is commonly used to handle CSV files. 2024-12-16 12:16:34 The type of code 15 views
Graph-tool This function uses Dijkstra's algorithm from the graph-tool library to find the shortest path between two nodes in an undirected graph. 2024-12-16 12:16:34 Function 16 views
Flask-SQLAlchemy, SQLAlchemy, Flask, SQLite database, database models, custom events, ORM, web application The code uses Flask-SQLAlchemy to create a database model, defines a custom event to perform an operation after a new user is created, and creates a Flask route to handle user creation requests. 2024-12-16 12:16:34 The type of code 14 views
Folium, Python This function creates a map using the Folium library and marks a random location on it. The map is saved as an HTML file. 2024-12-16 12:16:34 Function 17 views
tkinter This function creates a tkinter window with a button. Each time the button is clicked, the button's background color changes randomly. 2024-12-16 12:16:33 Function 17 views
Tornado This code example creates a simple Tornado Web application, including a main handler class and an application creation function. The main handler class responds to GET requests and returns a simple string. The application creation function configures the routes of the web application. 2024-12-16 12:16:33 Tornado Web Application 18 views
cryptography, RSA keypair generation, serialization to PEM format This code defines a function that generates an RSA keypair with a specified number of bits. It first generates the private key, then generates the public key from the private key. Finally, it serializes the private and public keys to PEM format. 2024-12-16 12:16:33 The type of code 15 views
Requests This function fetches a random quote from the https://api.quotable.io/random API and returns the quote content and author. 2024-12-16 12:16:32 Function 15 views
This function uses the Dask library and performs a random mathematical operation (such as sum, mean, max, min, etc.) on a random array created by Dask, returning the result of the operation. This function uses the Dask library to create a random array and then performs a random mathematical operation (such as sum, mean, max, min, etc.) on the array, returning the result of the operation. 2024-12-16 12:16:32 The type of code 31 views