Celery Python This function uses the Celery library to create a background task that generates a random number and waits for the result. It demonstrates how to handle asynchronous tasks with Celery. Celery mission 2024-12-16 12:17:49 35 views
Click This code defines a simple command-line interface with three features: addition, text reversal, and displaying file content. Command line interface 2024-12-16 12:17:27 17 views
Python standard This function generates a random task name, which is used in Celery to create tasks. Task names are typically required to be unique. Function 2024-12-16 12:17:25 15 views
Schedule datetime This code defines a function named 'daily_task' that runs at 9 AM every day. It uses the Schedule library to set up timed tasks and runs the scheduler in an infinite loop. Timed task 2024-12-16 12:17:14 25 views
XGBoost NumPy This function generates a random XGBoost model for classification or regression tasks. It takes a feature matrix X and a label vector y as input and returns a trained XGBoost model. Custom function 2024-12-16 12:16:25 16 views
Celery random 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. The type of code 2024-12-16 12:15:59 18 views
Locust HttpUser This code defines a Locust user class to simulate user visits to a website and randomly set user agents. It uses some basic features of the Locust library, including defining user classes, tasks, and HTTP requests. The type of code 2024-12-16 12:15:41 24 views
Schedule library This function uses the Schedule library to schedule a task that prints a random greeting every 10 seconds. It defines a function `random_task` that uses the `every` method from the Schedule library to run the `print_random_greeting` function every 10 seconds. The `print_random_greeting` function randomly selects a greeting from a predefined list and prints it. Finally, an infinite loop keeps the program running and periodically checks if it needs to run the scheduled tasks. Timed task 2024-12-16 12:15:17 16 views
APScheduler datetime The code defines a custom function named xxx that uses the APScheduler library to create a background scheduler for scheduling tasks. It adds a job to the scheduler that runs the random_task function every hour and allows the scheduler to run for 2 hours. Timed task 2024-12-16 12:15:02 10 views
Luigi pandas This code defines two Luigi tasks: GenerateData and AggregateData. The GenerateData task generates a DataFrame with a random date and a random number of rows, while the AggregateData task reads the data generated by GenerateData, calculates the sum of all numbers. The type of code 2024-12-16 12:14:49 10 views