Skip to content

Instantly share code, notes, and snippets.

View seabbs's full-sized avatar

Sam Abbott seabbs

View GitHub Profile
@kathsherratt
kathsherratt / improving_modelling_responses.Rmd
Last active September 13, 2024 12:09
Improving modelling survey: responses
---
title: "Appendix: Responses to improving conditions for outbreak modelling"
date: "2024"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
library(knitr)
library(googlesheets4)
@cpfiffer
cpfiffer / pdf-to-structure.py
Last active January 22, 2025 18:14
Get structured output from PDFs. Goes through a PDF one page at a time -- it is not currently build for multiple pages, but could be extended as needed.
"""
pip install outlines torch==2.4.0 transformers accelerate typing-extensions pillow pdf2image rich requests
may need to install tkinter: https://stackoverflow.com/questions/25905540/importerror-no-module-named-tkinter
sudo apt-get install poppler-utils
"""
from enum import Enum
from io import BytesIO