Posts

Showing posts from November, 2024

Recent Experiments testing ChatGPT's limits and some useful prompts

Introduction ChatGPT has a lot of people excited, but it deserves this level of excitement. It has a number of faults which I list below - some with workarounds - but in general it is amazingly good. It is absolutely not for having fun chatting to a robot, it's really more like a brilliant coworker who is incredibly stupid at some quite mundane tasks, but incredibly good at more tricky tasks. Summary of findings so far.  1. API vs Interactive Version - a caution 2. Coding Strengths and Weaknesses - be very careful but very useful anyway 3. Shell Scripting - amazingly good, probably what it's best at 4. Text Summarisation - fiddly but useful 5. Spreadsheet Analysis - annoying, maybe do by hand 6. Multi-Step Instruction Handling - very annoying 7. Spellchecking and writing style/grammar - ok overall but fiddly 8. File Compatibility and Formatting - not great 9. APA References from DOIs - good 10. Reference Accuracy - bad, double-check its work 11. Tone and Style Adaptations - ex...

script to pull github activity report

 import os import requests import csv from datetime import datetime # Configuration REPO = 'username/reponame'  # Repository name START_DATE = '2023-09-03T00:00:00Z'  # Start of the date range END_DATE = '2023-11-13T23:59:59Z'  # End of the date range GITHUB_TOKEN = os.getenv('GITHUB_TOKEN')  # Retrieve GitHub token from environment variable headers = {     "Authorization": f"token {GITHUB_TOKEN}",     "Accept": "application/vnd.github.v3+json" } output_file = 'github_report.csv' def fetch_commits():     """Fetch commits within the specified date range."""     url = f'https://api.github.com/repos/{REPO}/commits'     params = {         'since': START_DATE,         'until': END_DATE,     }     response = requests.get(url, headers=headers, params=params)     commits = response.json()          commit_data = []    ...