Skip to content

Instantly share code, notes, and snippets.

View kupietools's full-sized avatar

Michael Kupietz kupietools

View GitHub Profile
@fcingolani
fcingolani / index.html
Created August 9, 2012 02:16
How to render a full PDF using Mozilla's pdf.js
<html>
<body>
<!-- really dirty! this is just a test drive ;) -->
<script type="text/javascript" src="https://raw.github.com/mozilla/pdf.js/gh-pages/build/pdf.js"></script>
<script type="text/javascript">
function renderPDF(url, canvasContainer, options) {
var options = options || { scale: 1 };
#!/usr/bin/env python3
import sqlite3
import json
import datetime
from pathlib import Path
import sys
def get_chat_data_from_db(db_path) -> list[dict]:
"""Extract chat data from the SQLite database"""