Skip to content

Instantly share code, notes, and snippets.

@jalakoo
jalakoo / create_data_with_prompts.md
Created May 30, 2025 01:13
Prompts to create synthetic graph data with Claude Desktop + Neo4j Cypher MCP

Setup & Add Products

Lets create some data to my neo4j database.

Add a list of 6 Products for a smart glasses company with the properties:
- id (integer starting from 1)
- name (a simple name of the product)
- msrp_usd (sale price of the product in USD)
@jalakoo
jalakoo / csv_prompts.md
Created May 21, 2025 22:06
Sample LLM Prompts for creating interconnected .csv data

Agents

Generate a .csv listing 6 customer service agents with the following column headers: id (single integer starting with 1), name, email, bio (short description of professional history and technical background), hired_at (use an ISO 8601 compatible datetime string for UTC / GMT 0)

Customers

Generate a .csv listing 12 customers with the following column headers: id (single integer starting with 1), name, email, customer_since (use an ISO 8601 compatible datetime string for UTC / GMT 0)

Tickets

Generate a .csv listing 24 customer tickets detailing issues clients are having with a company's software product. Use the following column headers: id (single integer starting with 1), title, content (short description of problem), customer_id (random integer between 1 and 12 using normal distribution / bell curve), assiged_to (random integer between 1 and 6 with a normal / bell curve distribution), opened_at (use an ISO 8601 compatible datetime string for UTC / GMT 0), resolved_at (use an ISO 8601 compat

@jalakoo
jalakoo / app.py
Created May 13, 2025 03:30
BAML to Graph Data Example
import streamlit as st
from st_cytoscape import cytoscape
from baml_client import b
import json
# Set page config
st.set_page_config(layout="wide")
def process_graph_result(result):
"""Convert BAML graph result to cytoscape elements format"""
@jalakoo
jalakoo / main.py
Created April 20, 2025 00:29
Simple Python script for updating all Nodes "name" property in a target Neo4j database
from neo4j import GraphDatabase
import sys
def update_node_names(uri, user, password, target, replace_with):
driver = GraphDatabase.driver(uri, auth=(user, password))
def update_name(tx, target, replace_with):
query = (
"MATCH (n) "
"WHERE n.name = $target "
@jalakoo
jalakoo / main.py
Created April 19, 2025 03:31
Simple FastAPI server that takes a list of URLs for audio files, extract entities using AssemblyAI and uploads it to Neo4j.
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
import assemblyai as aai
from neo4j import GraphDatabase
from dotenv import load_dotenv
import os
# Load environment variables
load_dotenv()
@jalakoo
jalakoo / app.py
Created April 18, 2025 18:15
Python code for extracting entities from audio with AssemblyAI, then uploading that data into a Neo4j Graph database
import assemblyai as aai
from neo4j import GraphDatabase
aai.settings.api_key = "<ASSEMBLYAI_API_KEY>"
audio_file = "https://assembly.ai/wildfires.mp3"
# audio_file = "./local_file.mp3" #syntax for using a local file
config = aai.TranscriptionConfig(entity_detection=True)
transcript = aai.Transcriber().transcribe(audio_file, config)
@jalakoo
jalakoo / app.py
Created April 15, 2025 04:00
Super Simple RushDB Python Sample App
from rushdb import RushDB
# Initialize the RushDB client
client = RushDB(
"<your_locally_generated_api_key>",
base_url="http://localhost:3000",
)
# Simple - Create a single Node
single_record = {
@jalakoo
jalakoo / smallbook.ttl
Created March 16, 2025 00:51
Ontology Marketplace Test Turtle File
@prefix : <http://www.semanticweb.org/srikargadusu/ontologies/2025/0/untitled-ontology-10/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.semanticweb.org/srikargadusu/ontologies/2025/0/untitled-ontology-10/> .
<http://www.semanticweb.org/srikargadusu/ontologies/2025/0/untitled-ontology-10> rdf:type owl:Ontology .
@jalakoo
jalakoo / cytoscape2neo4j.py
Last active May 14, 2025 23:01
Examples of uploading Cytoscape formatted JSON data to Neo4j and downloading back as Cytoscape compatible dict
from neo4j import GraphDatabase
from neo4j.graph import Relationship, Node
from typing import Optional, List
import json
import os
from dotenv import load_dotenv
load_dotenv()
def upload_cytoscape_to_neo4j(
@jalakoo
jalakoo / open_source_short_list.csv
Created May 8, 2024 17:33
VectorFriends Open Source Short List
name language
TensorFlow Python
Django Python
Flask Python
Verba Python
CNTK C++
Jenkins Java
Spring Java
Apache Tomcat Java