Skip to content

Instantly share code, notes, and snippets.

@erangaeb
erangaeb / colarado-tax-data
Created October 27, 2025 20:04
colarado tax data
In general, leases of tangible personal property are
considered retail sales and are subject to Colorado
sales tax. However, a lease for a term of 36 months or
less is tax-exempt if the lessor has paid Colorado sales
or use tax on the acquisition of the leased property. A
lessor may request permission from the Department to
acquire tangible personal property tax-free on the
condition that the lessor agrees to collect sales tax on
all lease payments received on the property.
A contract pursuant to which a contractor performs a
@erangaeb
erangaeb / dental.jsonl
Created October 15, 2025 19:13
dental radiology data set
This file has been truncated, but you can view the full file.
{"id": "case_0001", "images": ["images/placeholder_0001.png"], "question": "Planning for pre-surgical bone mapping. Brief history/status: Amlodipine, Calcichew-D3, Bufomix Easyhaler, Betolvex, Losartan, Levaxin. Desired treatment: Provide measurements relevant to guided surgery stent planning for 15–25 and 36–46.", "answer": "Review of CBCT volume dated 210506. Bone quality ranges from ordinary to reduced in posterior segments. Implant space is referenced from a 5 mm minimal bone width threshold. Region 15: bone height ≈ 17.4 mm; implant space ≈ 15.6 mm; nearest critical structure: sinus floor. Region 21: bone height ≈ 20.5 mm; implant space ≈ 14.0 mm; nearest critical structure: nasal floor. Region 28: bone height ≈ 6.4 mm; implant space ≈ 1.0 mm; nearest critical structure: nasal floor. Region 35: bone height ≈ 16.7 mm; implant space ≈ 14.2 mm; nearest critical structure: anterior loop. Region 45: bone height ≈ 9.6 mm; implant space ≈ 1.8 mm; nearest critical structure: anterior loop. Region 31: bone height
@erangaeb
erangaeb / mental-reasoning.csv
Created March 29, 2025 09:56
mental reasoning dataset
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
conversation,reasoning,diagnosis
"Patient: I feel on top of the world, barely sleep, and started multiple projects. Doctor: Are your thoughts racing? Patient: Yes, I can't stop talking or thinking. (Sample 0)","Elevated mood, decreased need for sleep, increased goal-directed activity, and pressured speech indicate a manic episode consistent with Bipolar I Disorder.","Bipolar I Disorder, Current Episode Manic (DSM-5 296.41)"
Patient: I've been feeling really down for weeks and I don't enjoy anything anymore. Doctor: How is your sleep and appetite? Patient: I can't sleep and I've lost my appetite. (Sample 1),"The patient reports a persistent depressed mood, anhedonia, insomnia, loss of appetite, and hopelessness lasting more than two weeks. These symptoms align with the diagnostic criteria for Major Depressive Disorder as per DSM-5.",Major Depressive Disorder (DSM-5 296.21)
"Patient: I suddenly feel like I can't breathe and my heart races. Doctor: Do these happen without warning? Patient: Yes, and I worry about
@erangaeb
erangaeb / stride-llama-response
Created March 25, 2025 18:06
stride-llama response
{
"image": "images/mobile_app_architecture.png",
"prompt": "Analyze this system architecture for STRIDE threats. Output a table with Component, STRIDE Category, Threat Description, and Mitigation.",
"response": "Component: Mobile App
Category: Information Disclosure
Threat: Unencrypted data in transit
Mitigation: Use TLS for all communications.
Component: API Gateway
Category: Denial of Service
{
"image": "images/webapp_diagram_01.png",
"prompt": "Given this threat diagram, identify the STRIDE threats and categorize them by components.",
"response": {
"Web Server": [
{
"threat": "Spoofing",
"description": "Unverified clients may impersonate legitimate users if authentication is weak.",
"mitigation": "Implement strong authentication with MFA."
},
@erangaeb
erangaeb / NISTControlParser.scala
Created February 17, 2025 22:56
NIST control parser with control guide
import scala.util.matching.Regex
object NISTControlParser extends App {
// Function to split the text into control questions and control description
def processControlText(controlId: String, text: String): (List[String], String) = {
val sections = text.split("(?i)Supplemental Guidance:").map(_.trim)
// Extract the control part before Supplemental Guidance
val controlDescription = if (sections.length > 1) sections(1) else ""
@erangaeb
erangaeb / NISTControlParser.scala
Created February 17, 2025 22:50
parse nist control statement
import scala.util.matching.Regex
object NISTControlParser extends App {
def generateQuestions(controlId: String, text: String): List[String] = {
val lines = text.stripMargin.split("\n").map(_.trim).filter(_.nonEmpty).toList
val questionList = scala.collection.mutable.ListBuffer[String]()
val regex: Regex = """^([a-z]+|\d+)\.\s*(.*)""".r // Matches lines like "a. Identifies..." or "1. When accounts..."
@erangaeb
erangaeb / control-parser.py
Created February 17, 2025 22:47
nist control parser
import re
# Input text (NIST 800-53 control AC-2 example)
nist_control_text = """
a. Identifies and selects the following types of information system accounts to support organizational missions/business functions: [Assignment: organization-defined information system account types];
b. Assigns account managers for information system accounts;
c. Establishes conditions for group and role membership;
d. Specifies authorized users of the information system, group and role membership, and access authorizations (i.e., privileges) and other attributes (as required) for each account;
e. Requires approvals by [Assignment: organization-defined personnel or roles] for requests to create information system accounts;
f. Creates, enables, modifies, disables, and removes information system accounts in accordance with [Assignment: organization-defined procedures or conditions];
@erangaeb
erangaeb / w-538.json
Last active June 26, 2024 03:14
w-528 nft schema to represent medicine recipe
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Medical Recipe NFT",
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"description": "Unique identifier for the NFT"
},
"recipeName": {
--------------------------- MODULE BlockchainTransactions ---------------------------
EXTENDS Integers, Sequences, TLC
(*-- Constants used in the specification --*)
CONSTANT Clients, KafkaNodes, SmartContracts, StorageNodes, CacheNodes, LokkaServices
(*-- The set of all possible transactions --*)
VARIABLE transactions, messageBroker, blockchainStorage, distributedCache, blocks
(* -- Define the initial state of the blockchain system --*)