We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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." | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$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": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------- 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 --*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"token_id": "pbom123", | |
"timestamp": "2023-11-01T12:30:00Z", | |
"package": { | |
"package_id": "pkg789", | |
"package_name": "example_app" | |
}, | |
"pull_requests": [ | |
{ | |
"id": "pr456", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"token_id": "string", | |
"timestamp": "string", | |
"package": { | |
"package_id": "string", | |
"package_name": "string" | |
}, | |
"pull_requests": [ | |
{ | |
"id": "string", |
NewerOlder