Skip to content

Instantly share code, notes, and snippets.

View phillijm's full-sized avatar
🏳️‍🌈

Jesse Phillips phillijm

🏳️‍🌈
View GitHub Profile
@phillijm
phillijm / METEOR.md
Last active May 18, 2023 14:34
Calculate METEOR v1.5 scores with Python

Calculate METEOR v1.5 scores with Python

This implements a Python class as an interface for the official Java implementation of METEOR v1.5. I've tested this on Windows, Mac, & Linux. If you encounter any issues, let me know.

You will need to download the official Java implementation of METEOR for this to work. Place the download in a folder named "meteor": cs.cmu.edu/~alavie/METEOR

Example Usage

@phillijm
phillijm / OOMouse.py
Last active March 24, 2023 16:43
Using Python to move your mouse.
""" OOMouse.py - an object-oriented approach to wiggling the mouse.
This is to stop my screens turning off and moving my windows around when
I go to get a brew. You will need to pip install pyautogui and keyboard.
Author: Jesse Phillips <j.m.phillips@lancaster.ac.uk>
"""
import pyautogui
import time
import random
@phillijm
phillijm / ai.py
Created February 7, 2023 15:31
Using OpenAI's API to automatically summarise a source code method.
""" Using OpenAI's API to automatically summarise a source code method.
This example code uses the "davinci" model to attempt to summarise a method
and will limit attempted summaries to 64 tokens. Using this should
demonstrate how easy it is to generate a poor-quality summary using Large
Language Models.
Author: Jesse Phillips <j.m.phillips@lancaster.ac.uk>
"""