NumPy, SciPy This function uses the NumPy library to generate random data following a normal distribution. 2024-12-16 12:14:20 Dagster Custom Function 11 views
Python, Vega, Pandas This function creates a random bar chart using the Vega library. The function first randomly selects a color palette and a field as the basis for the bars. Then, it defines a Vega chart specification including the data source, marks, and encoding. Finally, it renders the chart using the Vega library. 2024-12-16 12:14:19 The type of code 9 views
Allennlp This function creates an instance from a given sentence and vocabulary, and initializes a simple model. It first converts the sentence into a format that the model can understand, then creates a model with basic parameters. 2024-12-16 12:14:19 Function 13 views
Altair This function generates a random chart from a given dataset using the Altair library. The function first defines different chart types and then randomly selects one to generate the corresponding chart. 2024-12-16 12:14:19 The type of code 11 views
FastAPI, Pydantic This function takes a dictionary containing item information, parses it into an `Item` model, and then calls the `create_item` function to create the item. If there is a validation error during parsing, it raises an HTTP exception. 2024-12-16 12:14:18 FastAPI custom function 10 views
Keras, NumPy, Keras preprocessing sequence This function randomly selects a subsequence of length n_steps from the input sequence and pads it to the same length as the original sequence. 2024-12-16 12:14:18 The type of code 10 views
Questionary This function uses the Questionary library to generate an input question based on a randomly selected type. It can be a text input, number input, select input, confirm input, or separator. 2024-12-16 12:14:18 The type of code 24 views
Cryptography library, RSA keypair generation, private key, public key This function generates an RSA keypair using the cryptography library, including a private key and a public key. The private key is used for decryption and signing, while the public key is used for encryption and verification of signatures. 2024-12-16 12:14:18 The type of code 20 views
Huggingface Transformers, GPT-2 This function uses the GPT-2 model from the Huggingface Transformers library to generate random text based on an input prompt. 2024-12-16 12:14:17 Text generation 27 views
OpenCV, NumPy, 高斯模糊, 霍夫变换 OpenCV, NumPy, Gaussian blur, Hough transform 2024-12-16 12:14:17 The type of code 9 views