Skip to content

Instantly share code, notes, and snippets.

View arpieb's full-sized avatar

Robert Bates arpieb

View GitHub Profile
@arpieb
arpieb / gist:969917a2ee27ed3c77262c7063a8911b
Created February 12, 2026 16:51
Gitea self-hosted runners via docker compose
services:
gitea-runner:
image: docker.io/gitea/act_runner:nightly
restart: always
environment:
GITEA_INSTANCE_URL: "XXX"
GITEA_RUNNER_REGISTRATION_TOKEN: "XXX"
GITEA_RUNNER_EPHEMERAL: 1
deploy:
replicas: 4
@arpieb
arpieb / heilmeier-catechism-prompt.md
Created January 5, 2026 16:14
Heilmeier Catechism prompt for papers

Please help me read this paper (uploaded). Create the following subsections below:

  • OVERVIEW: Indicate in a paragraph what the paper is trying to do, what the problem is that they are trying to solve, and the approach they are taking, using minimal jargon.
  • CURRENT STATE-OF-THE-ART: How is this problem addressed today? What are the limitations with these existing practices? Which of these existing limitations of current practices is the paper attempting to address?
  • CONTRIBUTIONS: What is new about the author's approach? Present an overview paragraph of the contributions, then create a bullet list of specific contributions, highlighting any clever and novel approaches by preceding the bullet text with "CLEVER:". Also, does the work cover related work thoroughly and fairly? Is the paper missing an important related work? If it is, please include a citation and a weblink to the paper.
  • POTENTIAL IMPACT: What is the potential impact of this work? Who would care about it? What difference would it make?
  • RIS
@arpieb
arpieb / gen-unit-tests-prompt.md
Created January 5, 2026 16:10
Prompt to generate unit tests

today we're going to focus on unit tests for this project. we are using the <brief desc of venv manager, name, location, etc> for this project. you do not need to start any code generation or coverage tests just yet, just familiarize yourself with the codebase.

--

implement all possible unique unit tests for module XXX without duplicating any existing tests.

  • only create tests for classes and functions defined in this module.
  • assume pytest will be used to execute tests.
@arpieb
arpieb / gist:a2422519909c54767d60d808f6c0f095
Created June 14, 2025 18:11
Saving pint pandas dataframe with types
from typing import Dict
import pandas as pd
import pyarrow as pa
import pyarrow.parquet as pq
import json
def session_data_to_parquet(fname: str, header: Dict, data: pd.DataFrame) -> None:
index_col = data.index.name
@arpieb
arpieb / gist:2e0d262e4099f3c28f4befdfe0958a15
Created December 18, 2023 23:20
Sample datafile for testing PashehNet
0
1
2
3
4
5
6
7
8
9
@arpieb
arpieb / main.py
Last active June 9, 2023 23:51
Python 3 CLI starter
import os
import logging
import argparse
import sys
from text2kg import text2kg, plot_kg
def setup_logging():
"""
@arpieb
arpieb / Dockerfile
Created February 16, 2023 20:42
Set up a Wine environment in a Docker container with Python 3.8 installed
################
# Attempt to run Windows scripts in a Docker container (for K8s deployment)
# Inspiration/material from:
# https://betterprogramming.pub/how-to-run-any-windows-cli-app-in-a-linux-docker-container-318cd49bdd25
################
FROM ubuntu:22.04
# Core system packages
RUN apt -y update
RUN apt -y install wget
@arpieb
arpieb / gdelt2-events.sql
Last active May 16, 2018 01:32
MariaDB CONNECT table schemas for GDELT v2 events and mentions CSV files
create table events (
GlobalEventID bigint unsigned ,
Day date date_format='YYYYMMDD' ,
MonthYear date date_format='YYYYMM' ,
Year date date_format='YYYY' ,
FractionDate double ,
Actor1Code char(15) ,
Actor1Name varchar(255) ,
Actor1CountryCode char(3) ,
Actor1KnownGroupCode char(3) ,
@arpieb
arpieb / GDELT_2.0_Data_Download.xml
Created May 8, 2018 21:17
Apache NiFi Template - GDELT 2.0 Data Download
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>98771fb2-0162-1000-65a1-1228bdb238d4</groupId>
<name>GDELT 2.0 Data Download</name>
<snippet>
<connections>
<id>99327f17-9239-34b6-0000-000000000000</id>
<parentGroupId>5eca6977-2945-3990-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>

Keybase proof

I hereby claim:

  • I am arpieb on github.
  • I am arpieb (https://keybase.io/arpieb) on keybase.
  • I have a public key ASDKYPcHf2bo0-TQareVbzMjxhUbcvvPvV5E6l3izG5qZQo

To claim this, I am signing this object: