Skip to content

Instantly share code, notes, and snippets.

View jexp's full-sized avatar
🐉
Watching the chamaeleon.

Michael Hunger jexp

🐉
Watching the chamaeleon.
View GitHub Profile
@jexp
jexp / devoxx24.cypher
Created October 8, 2024 09:04
Devoxx 2024 Schedule as Neo4j including Vector Embeddings and Vector Search
/*
rows = [
{
"id": 12124,
"title": "Meet Chicory, exploit the power of WebAssembly on the server side!",
"description": "WebAssembly is a rapidly emerging technology that enables the execution of code written in various languages while providing strong sandboxing and safety guarantees.<br>Initially developed for the web to enhance browser capabilities, developers soon recognized the potential of reusing Wasm modules in server-side applications. wazero, a native Go runtime for Wasm, played a pivotal role in showcasing the versatility and power of this solution. With its widespread adoption and integration into diverse applications, wazero demonstrated the value of using Wasm modules beyond the web environment.<br>Inspired by the goals of wazero, we launched Chicory, a pure Java interpreter, with zero dependencies, for Wasm. Chicory empowers developers to load and execute Wasm modules with fine-grained control over their interactions with the system and memory allocation. Notably, Chicory seamlessly integrates
@jexp
jexp / graphrag-load-neo4j-1.ipynb
Last active September 8, 2024 19:28
Quick Neo4j Loaders for GraphRAG Parquet
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jexp
jexp / stackoverflow.md
Last active February 11, 2024 13:31
DuckDB StackOverflow Queries, DuckDB in Action Book: https://manning.com/books/duckdb-in-action – 40% discount: mlneedham 100% for reviewers
@jexp
jexp / slides-llm-embeddings-extraction.cypher
Created September 1, 2023 08:43
Neo4j Cypher Script to import slideshare data, create embeddings, a vector index, similarity search and extract authors and keywords
// gcloud projects list
:param projectId => 'xxxx'
// gcloud auth print-access-token
:param apiKey => 'xxx'
call apoc.load.json("https://data.neo4j.com/slideshare-neo4j.json") yield value
unwind value.User.Slideshow as slide
return slide limit 5;
@jexp
jexp / gist:09df199130a47493b5fbac0251b6159e
Created August 4, 2023 09:46
Python script to download slideshares for a User
# docs https://www.slideshare.net/developers/documentation
# pip install xmltodict requests
import requests
import time
from hashlib import sha1
import os
import json
import xmltodict
@jexp
jexp / BitMapOpsComparision.java
Last active July 9, 2023 08:34
RoaringBitMap Benchmark with jbang based on https://xam.dk/blog/jbang-reproducers/
//JAVA 20
//DEPS org.roaringbitmap:RoaringBitmap:0.9.45
//DEPS org.openjdk.jmh:jmh-generator-annprocess:1.36
package de.jexp.rbm;
import org.openjdk.jmh.annotations.*;
import org.roaringbitmap.RoaringBitmap;
import java.util.BitSet;
@jexp
jexp / nicknames.txt
Created June 26, 2023 13:28
Nicknames - Main name and comma separated list of nicknames after
adam: addy, ade, adie, ad, adi, ady, atim
alexander: alex, alec, xander, lex, sandy, zander, ander, al, axel
amanda: mandy, manda, am, amy, mandi, mands, mendi
andrew: andy, drew, andre, and, drea, dre, andie, andi, andrews
angela: angie, angel, ang, anj, ange, angely, angelica, angelina, angelique
anna: ann, anne, annie, an, ania, anka, anushka, anoushka, anouska
anthony: tony, anth, ant, ton, anthoine, anton, antwan, antonin, antonius
ashley: ash, lee, ashie, ashy, ashleigh, ashlee, ashl, ashli, ashlin
aubrey: aub, bree, brey, brie, aubs, aubry, aubrie, aubri, auberon
augustus: august, gus, gustus, agus, agustus, augie, auggie, augy, gusy
# english output for tools
export JAVA_TOOL_OPTIONS=-Duser.language=en
# sdkman
sdk list
sdk list java
#sdk install java 20-open
sdk use java 20-open
java -version
@jexp
jexp / bsky_jazco_import.cypher
Last active May 8, 2023 09:30
BlueSky User Interactions Neo4j Import, data collection courtesy https://bsky.jazco.dev/
create constraint user_key if not exists for (u:User) require (u.key) is unique;
// add nodes
call apoc.load.json("https://bsky.jazco.dev/exported_graph_minified.json","$.nodes")
yield value as nv
call { with nv
merge (n:User {key:nv.key})
on create set n += apoc.map.clean(nv.attributes,["key"],[])
} in transactions of 10000 rows;
// sdk install java 20-open
// java -version
/*
openjdk version "20" 2023-03-21
OpenJDK Runtime Environment (build 20+36-2344)
OpenJDK 64-Bit Server VM (build 20+36-2344, mixed mode, sharing)
*/
// jshell --enable-preview --add-exports java.base/jdk.internal.vm=ALL-UNNAMED --add-modules=jdk.incubator.concurrent