Remove unused or unwanted files: We can write a script to delete certain files based on your requirements.
Open a specific directory: If you want to navigate into a certain directory and list its files.
Search for a specific file: If you’re looking for a specific file, we can write a script to find it for you.
Create a new folder: We can help you create new folders and organize your files.
Move certain files: Based on file type or name, we can move them into different folders.
Additional File Operations:
File Search: Searching for a file pattern in your directories. If you remember partial file name we can find the full name and path of the file.
Space Usage: Check the space used by each directory on your Desktop.
File Content Search: Search for a specific text inside files.
File Sorting: We can sort your files based on name, size, date created, or date modified.
File Compression: If there are several files that you don’t commonly use, we can compress them to save some space.
System Information:
System Update: We can check if your system is up to date with the latest patches and updates.
Disk Usage: We could analyze the disk usage and understand which files or directories are taking the most space.
Process Monitor: We could list all running processes on your machine.
Hardware Information: We could gather and display hardware information, such as CPU, memory, etc.
Programming & Software Development:
Coding Project: We could start a new coding project, such as a small script or a web application.
Learning New Language: We could start learning basics of a new programming language.
Running a program: If you’ve written a program and are experiencing any issues or want to see the output, we can do that.
Understanding Code: If you have any piece of code that you’re having trouble understanding, we could go over it.
Coding Challenge: We could find and work on a coding problem from challenge websites like LeetCode, HackerRank.
Data Analysis & Visualization:
Data Cleaning: We could take a dataset and clean it by removing missing values, handling outliers, encoding variables, etc.
Data Visualization: We could explore a dataset and create various visualizations (like line graphs, bar plots, histograms, etc.) to understand the data better.
Statistical Analysis: We could perform statistical analysis on a dataset of your choice.
Machine Learning: We could implement a simple machine learning model on a dataset. We can even go through a step-by-step process of how machine learning models are built and refined.
Data Scraping: If you’re interested, we could write a script to scrape data from the web.
External Services & APIs:
API Calls: We could write a script to interact with an API of your choice, perhaps fetching and displaying data from it.
Database Interactions: We could write SQL queries to interact with a database, if you have one set up.
Email Automation: We could write a script to automate emails, such as sending an email to multiple recipients.
Web Scraping: If there’s a website with data you’re interested in, we could write a script to scrape data from it.
Task Automation: We can script regular system tasks that could make your day-to-day activities easier.
Design & Multimedia:
Website Design: We could start a plan to design a simple website using HTML, CSS, and JavaScript.
Photo Editing: Basic photo editing tasks can be done using Python libraries like PIL or OpenCV.
Video Processing: We could write scripts for basic video processing tasks using Python’s moviepy library.
Creating Animations: We can create basic animations using JavaScript or CSS.
Designing a User Interface: We could design a simple user interface for an application.
Network-Related Tasks:
Network Ping Check: We could write a script to check the network connectivity to a list of hosts.
Port Scanning: Writing a basic port scanning script.
Traffic Monitoring: We could monitor network traffic on your system.
DNS Lookup: A script to perform a DNS lookup of a particular URL.
Checking Internet Speed: We can check your internet upload and download speed.
System Diagnostics & Performance:
Performance Monitoring: Write a script to monitor the performance of your machine.
Check System Logs: Write a script to fetch and examine system logs.
Hardware Statistics: Gather statistics on your computer’s hardware (CPU usage, memory usage, etc.)
Network Monitoring: Monitor network usage and statistics.
Detect Application Errors: We can write scripts that detect errors, exceptions, or specific log entries related to the application’s behavior.
Interactive Tasks:
Text-based Adventure Game: We can build a simple text-based adventure game in Python or another language of your choice.
Interactive Quiz: We could create a quiz, on a topic of your choice.
Command Line Application: Building a simple Command Line Interface (CLI) application.
Graphical User Interface (GUI) Application: We could write a basic GUI application using Tkinter or similar library.
Mini Game: We can develop a small, simple game like Tic Tac Toe or Rock, Paper, Scissors.
Educational Activities:
Online Course Discussion: We can discuss the content of an online course that you’re enrolled in.
Academic Paper Review: If there’s an academic paper that you’d like to understand better, we can go through it together.
Book Notes: If there’s a particular book (technical or otherwise) that you’re reading, we could discuss its themes or content.
Interview Preparation: I can help you with common interview questions and tips for the area of your interest.
Learning New Skills: We can explore new skills that you’re interested in learning and find the most effective ways/resources for you to learn them.
File Operations:
File Backup: We could write a script to backup certain directories or files.
Duplicate Files: We could find and remove duplicate files in a directory.
File Encryption: We could write a script to encrypt sensitive documents.
Auto Organization: We can script to auto-organize files into appropriate folders based on their type.
Large Files: We can find the largest files that are taking up most of the space.
Coding Practices:
Code Refactoring: We could take a look at an existing piece of code and try to refactor it to make it more efficient, readable or maintainable.
Understanding Algorithms: If there is a particular algorithm or data structure you would like to understand, we could go over it.
Best Coding Practices: We can discuss some of the best practices in coding, be it naming conventions, proper commenting, or efficient ways to structure code.
Code Debugging: If you have a code that is giving errors or not working as expected, we could debug it together.
Set Up Development Environments: We can setup a development environment for a specific programming language or framework on your computer.
Shooter game where the player can shoot projectiles at enemies and move around the screen. Enemies should appear at a reasonable pace randomly and increase the pace the appear over time so the game get more difficult. Enemies will get destroyed if the player shoots projectiles that hits them. If the player hit an enemy it's game over. There should be a score on how many enemies the player hits. Your Final answer must be the python code, only the python code and nothing else.
import requests
from duckduckgo_search import DDGS
from taskweaver.plugin import Plugin, register_plugin
import os, json
from unstructured.partition.html import partition_html
@register_plugin
class InternetSearchPlugin(Plugin):
def __call__(self, query: str, max_results=2):
with DDGS() as ddgs:
results = [r for r in ddgs.text(query, max_results=max_results)]
scraped_results = []
for result in results:
url = self.sanitize_url(result.get('href'))
scraped_content = self.scrape_website(url)
scraped_results.append({'url': url, 'content': scraped_content})
return scraped_results
@staticmethod
def sanitize_url(url):
"""Sanitize the URL by removing any trailing slashes."""
return url.rstrip('/') if url else url
def scrape_website(self, website: str):
"""Just pass a string with
only the full url, no need for a final slash `/`, eg: https://google.com or https://clearbit.com/about-us"""
sanitized_url = self.sanitize_url(website)
url = f"https://chrome.browserless.io/content?token={os.environ['BROWSERLESS_API_KEY']}"
payload = json.dumps({"url": sanitized_url})
headers = {'cache-control': 'no-cache', 'content-type': 'application/json'}
response = requests.request("POST", url, headers=headers, data=payload)
elements = partition_html(text=response.text)
content = "\n\n".join([str(el) for el in elements])
content = [content[i:i + 8000] for i in range(0, len(content), 8000)]
return content
internet_search.yaml
name: internet_search
enabled: true
required: false
description: >-
The InternetSearchPlugin performs internet searches using DuckDuckGo and scrapes the content of the search results.
parameters:
- name: query
type: str
required: true
description: The search query for retrieving and scraping internet search results.
returns:
- name: search_results
type: list
description: >-
A list of dictionaries containing the URL and scraped content of each search result.
import os
import json
import requests
from taskweaver.plugin import Plugin, register_plugin
from unstructured.partition.html import partition_html
@register_plugin
class ScrapePlugin(Plugin):
def __call__(self, website: str):
url = f"https://chrome.browserless.io/content?token={os.environ['BROWSERLESS_API_KEY']}"
payload = json.dumps({"url": website})
headers = {'cache-control': 'no-cache', 'content-type': 'application/json'}
response = requests.request("POST", url, headers=headers, data=payload)
elements = partition_html(text=response.text)
content = "\n\n".join([str(el) for el in elements])
return content
scrape_website.yaml
name: scrape_website
enabled: true
required: false
description: >
The ScrapePlugin scrapes website content.
Pass a URL to receive the raw content of the website.
parameters:
- name: website
type: str
required: true
description: The full URL of the website to scrape.
returns:
- name: scraped_content
type: str
description: >
A string containing the raw content of the scraped website.
from duckduckgo_search import DDGS
from taskweaver.plugin import Plugin, register_plugin
@register_plugin
class InternetSearchPlugin(Plugin):
def __call__(self, query: str, max_results=10):
with DDGS() as ddgs:
results = [r for r in ddgs.text(query, max_results=max_results)]
return results
internet_search.yaml
name: internet_search
enabled: true
required: false
description: >
The InternetSearchPlugin connects to the DuckDuckGo API to perform internet searches.
It retrieves and returns search results in JSON format based on the provided query.
parameters:
- name: query
type: str
required: true
description: The search query for retrieving internet search results.
returns:
- name: search_results
type: dict
description: >
A dictionary containing the search results in JSON format.
name: latest_papers
enabled: true
required: false
description: >-
The LatestPapersPlugin connects to the arXiv API to fetch information about the latest papers on a specified topic.
parameters:
- name: topic
type: str
required: true
description: The topic for which the latest papers are to be retrieved.
returns:
- name: papers_data
type: str
description: >-
A string containing the latest papers' information on the specified topic, returned as XML data from arXiv.