Unknown model· unknown
from ShareGPT 90K (shared ChatGPT conversations)
幫我產生一個ics file的範例
- User
幫我產生一個ics file的範例
- Assistant
Example made using CODAI: https://codepen.io/RealityMoez/full/qBMgaXg
CODAI *-^
generate_ics_file.py
csharp# Import the necessary modules import ics from datetime import datetime, timedelta # Create the calendar object calendar = ics.Calendar() # Create an event object event = ics.Event() event.name = "Example Event" event.begin = datetime(2023, 4, 1, 18, 0, 0) event.end = event.begin + timedelta(hours=2) event.location = "Virtual" # Add the event to the calendar calendar.events.add(event) # Save the calendar to a file with open("example.ics", "w") as f: f.write(str(calendar))DONE.