Skip to content

Instantly share code, notes, and snippets.

@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 November 9, 2024 17:59
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
def upload_cytoscape_to_neo4j(
cytoscape_data: str | dict,
neo4j_uri: Optional[str] = None,
@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
@jalakoo
jalakoo / open_source_projects.csv
Created May 8, 2024 17:25
VectorFriends Open Source Projects
name language
TensorFlow Python
Django Python
Flask Python
OpenCV Python
Ansible Python
Verba Python
CNTK C++
IncludeOS C++
Kodi C++
@jalakoo
jalakoo / software_technologies.csv
Created May 8, 2024 17:16
VectorFriends Tech List
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
name
Orchard Core
MVC
Blazor
WPF
Qt
Boost
POCO
STL
Cinder
@jalakoo
jalakoo / blueprint.json
Last active March 5, 2024 16:36
make.com -> neo4j | Asana | All Webhooks | Task + Assignee
{
"name": "Webooks - Asana Tasks",
"flow": [
{
"id": 15,
"module": "asana:WatchProjectTask",
"version": 2,
"parameters": {
"__IMTHOOK__": 1168829
},