Skip to content

Instantly share code, notes, and snippets.

View bigsnarfdude's full-sized avatar

BigsnarfDude bigsnarfdude

View GitHub Profile
#!/usr/bin/env python3
"""
Fixed CSV Country Counter - Properly extracts clean country names
Handles complex entries like: "United States (Note: This is a corporation, not a university)"
"""
import re
import csv
def extract_clean_country(country_field):

AI verification is critically important because it ensures that AI systems behave as intended—safely, reliably, and ethically. Here's a breakdown of why it's so vital and where it matters most:


🚨 1. Safety and Reliability

AI systems can cause real-world harm if they fail—especially in high-stakes domains like:

  • Healthcare: Misdiagnosis from an unverified AI tool can be fatal.
  • Autonomous vehicles: A misjudged action can lead to accidents.
import csv
import time
import re
import requests
import json
from typing import List, Tuple, Dict
import concurrent.futures
import threading
class UniversityClassifier:
@bigsnarfdude
bigsnarfdude / ai_governance.md
Last active May 28, 2025 18:21
ai_governance.md

I think AI governance should involve much broader participation than what we've seen so far. The current approach - primarily driven by researchers, tech companies, and policymakers - leaves out too many voices that will be affected by these systems.

Democratic Participation We need genuine public input, not just expert committees. This could include citizen assemblies, deliberative polling, or other methods that help ordinary people engage with these complex issues. Taiwan's vTaiwan platform and Ireland's citizens' assemblies on contentious issues offer models.

Affected Communities First People who will bear the brunt of AI impacts - workers whose jobs might be automated, communities subjected to algorithmic policing, students evaluated by AI systems - should have the strongest voice in setting rules, not just token consultation.

Multiple Governance Layers Different rules for different contexts: international coordination on existential risks, national laws for broad frameworks, local regulati

#!/usr/bin/env python3
"""
Production Transcript Processor
A robust script with JSON output, restart capabilities, and metadata tracking
Enhanced version with better mathematical content capture
"""
import requests
import json
import os
@bigsnarfdude
bigsnarfdude / wiki.PRD.md
Last active May 26, 2025 16:56
wikiPRD.md

PRD: Wiki Search That Actually Works

Fix the damn search box


Document Info

Owner: Alex Chen
Status: Ready to build
Timeline: 4 weeks
Last updated: May 26, 2025

Here are some examples of IoCs:
Network IoCs:
Unusual network traffic patterns: Abnormal outbound network traffic, a sudden increase in traffic from a specific IP address, or communication with unknown or malicious domains.
Unusual DNS requests: Requests for known malicious domains or unusual DNS queries.
Mismatched port-application traffic: An application or process communicating over a network port it shouldn't be using.
Host-Based IoCs:
Unauthorized access to system resources: Access to servers, databases, or sensitive data without proper authorization.
Changes to system files or configurations: Unexplained or unauthorized modifications to system configurations or settings.
Unexpected software installations or updates: Unusual or unexpected software being installed or updated on a system.
Suspicious registry changes: Changes to the Windows registry that suggest malicious activity.
@bigsnarfdude
bigsnarfdude / report_event_statistics_job.rb
Created May 24, 2025 15:43
report_event_statistics_job.rb
# app/jobs/que/report_event_statistics_job.rb
# frozen_string_literal: true
# Copyright (c) 2025 Banff International Research Station.
# This file is part of Workshops. Workshops is licensed under
# the GNU Affero General Public License as published by the
# Free Software Foundation, version 3 of the License.
# See the COPYRIGHT file for details and exceptions.
# Mails event statistics to organizers
# All model tests
bundle exec rspec spec/models/
# All controller tests
bundle exec rspec spec/controllers/
# All request tests
bundle exec rspec spec/requests/
# All feature tests
pip install outline-wiki-api
import os
os.environ["OUTLINE_API_KEY"] = "your_api_key"
os.environ["OUTLINE_INSTANCE_URL"] = "your_instance_url"
from outline_wiki_api import OutlineClient
client = OutlineClient(api_key=os.environ["OUTLINE_API_KEY"], server_url=os.environ["OUTLINE_INSTANCE_URL"])
collection_id = "your_collection_id"
new_document = client.documents.create(title="My Document", collection_id=collection_id, text="Content of my document")