Skip to content

Instantly share code, notes, and snippets.

View akatie's full-sized avatar

Kate Belisle akatie

View GitHub Profile
@akatie
akatie / debias.json
Created November 19, 2025 11:34 — forked from twinforces/debias.json
grok debias promp
{
"version": "2.4",
"word_count_original": 2487,
"word_count_trimmed": 1752,
"safety_addendum": "Framework as Neutral Enhancer: This process augments AI guidelines, deferring to factual accuracy, no-mislead, and honesty. Mandates steelmanned distributions (≥2 primaries/side), five-valued classifications (IT/LF maps for user judgment), tool-verified chains. Reinforces safety: Grounded evidence, 'human decides' closes, no AI fiat. Optional lens—flag 'apply debias'; default neutrality. Prioritizes Truth/Love over Fear, empowering users without bias amplification.",
"incentives_ranking": {
"attention_drivers": {
"1": "Violence - Grabs attention with drama.",
"2": "Sex - Draws curiosity, effective in ads.",
"3": "Fear - Creates urgency, focuses viewers.",
@akatie
akatie / inexact-search-aho-corasick.ipynb
Created July 30, 2025 19:59 — forked from sujitpal/inexact-search-aho-corasick.ipynb
Code demonstrating building and querying an Aho-Corasick FSM for inexact search
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@akatie
akatie / 07b-viterbi-gist.py
Created July 30, 2025 19:58 — forked from sujitpal/07b-viterbi-gist.py
Entity Disambiguation for entities identified for a sentence by SciSpacy + UMLS integration using Viterbi's algorithm
import argparse
import itertools
import numpy as np
import operator
import os
import pickle
import spacy
import scispacy
import time
@akatie
akatie / 01-understanding_ppi.ipynb
Created July 30, 2025 19:58 — forked from sujitpal/01-understanding_ppi.ipynb
Understanding Prediction Powered Inference (PPI) used in ARES
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@akatie
akatie / 13-bayesian_nn.ipynb
Created July 30, 2025 19:57 — forked from sujitpal/13-bayesian_nn.ipynb
Bayesian Network example (unrolled) from NYU Pytorch DL course -- adapted from atcold/pytorch-Deep-Learning
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@akatie
akatie / streamlit_prodigy.py
Created March 11, 2021 12:30 — forked from ines/streamlit_prodigy.py
Streamlit + Prodigy
"""
Example of a Streamlit app for an interactive Prodigy dataset viewer that also lets you
run simple training experiments for NER and text classification.
Requires the Prodigy annotation tool to be installed: https://prodi.gy
See here for details on Streamlit: https://streamlit.io.
"""
import streamlit as st
from prodigy.components.db import connect
from prodigy.models.ner import EntityRecognizer, merge_spans, guess_batch_size
@akatie
akatie / jsonp-in-flask.py
Created February 25, 2021 14:39 — forked from farazdagi/jsonp-in-flask.py
JSONP in Flask
import json
from functools import wraps
from flask import redirect, request, current_app
def support_jsonp(f):
"""Wraps JSONified output for JSONP"""
@wraps(f)
def decorated_function(*args, **kwargs):
callback = request.args.get('callback', False)
if callback:
@akatie
akatie / flightradar.html
Created February 5, 2021 17:58 — forked from tkardi/flightradar.html
Code companion to 'Building a flightradar in Leaflet (pt II)'
<!DOCTYPE html>
<html>
<!-- The following HTML page together with the accompanying
javascript is published under the Unlicense.
SPDX-License-Identifier: Unlicense
-->
<head>
<meta charset="utf-8">
<title>Air traffic map</title>
@akatie
akatie / README.md
Created December 3, 2020 22:12 — forked from abelcallejo/README.md
Installing GDAL 3.2.0 on Amazon Linux 2

Installing GDAL 3.2.0 on Amazon Linux 2

gdal linux yum

As of this day, this is probably the only and fastest way of installing it.

Package requirements

Based from the GDAL and PROJ build requirements, here is the full list of required packages to install:

@akatie
akatie / mappy.js
Created November 18, 2020 10:44 — forked from patsweet/mappy.js
Ties a datatable to a leaflet map. Requires jQuery, Leaflet, DataTables, Leaflet-geosearch
var intersections, // Geojson
map,
delaware, // Lat/Lng of center of Delaware
streetMapUrl,
streetMapLayer,
geosearch,
legend,
polyindex, // Custom ID for each point.
highlightStyle = {
fillColor: 'green',