Skip to content

Instantly share code, notes, and snippets.

View gkorland's full-sized avatar

Guy Korland gkorland

View GitHub Profile
from langchain_community.llms import Ollama
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import StrOutputParser
import time
MODEL = "phi3"
SYSTEM_PROMPT = "You are a world class technical documentation writer."
@gkorland
gkorland / diffbot_graphtransformer.ipynb
Last active September 27, 2023 12:46
Diffbot Graph Transformer with FalkorDB
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
package com.falkordb;
import org.neo4j.driver.Driver;
import org.neo4j.driver.GraphDatabase;
import org.neo4j.driver.Result;
import org.neo4j.driver.Record;
public class BoltVectorDemo {
public static void main(String args[]) {
package com.falkordb;
import redis.clients.jedis.UnifiedJedis;
import redis.clients.jedis.graph.ResultSet;
import redis.clients.jedis.graph.Record;
public class FalkorDBVectorDemo {
public static void main(String args[]) {
try (UnifiedJedis jedis = new UnifiedJedis("redis://localhost:6379")) {
@gkorland
gkorland / boltdemo.java
Last active September 15, 2023 08:57
FakorDB BoltDemo
package com.falkordb;
import redis.clients.jedis.UnifiedJedis;
import redis.clients.jedis.graph.ResultSet;
import redis.clients.jedis.graph.Record;
public class FalkorDBBench {
public static void main(String args[]) {
try (UnifiedJedis jedis = new UnifiedJedis("redis://localhost:6379")) {
#### GETEX
import redis
r = redis.Redis()
r.set(“somekey”, “hello”)
r.getex(“somekey”, ex=15)
### >>> returns “Hello”
r.ttl(“somekey”)
### >>> 15
#### CLIENT INFO AND KILL
import argparse
from sys import platform
from models import *
from utils.datasets import *
from utils.utils import *
def export():
img_size = (320, 192)
@gkorland
gkorland / Redis_Labs_Software_Grant_and_Contributor_License_Agreement.md
Last active September 21, 2022 17:26
Redis Labs Software Grant and Contributor License Agreement

Redis Software Grant and Contributor License Agreement

In order to clarify the intellectual property license granted in the Contribution (defined below) Redis, Inc. (“Redis”) requires a Software Grant and Contributor License Agreement (“Agreement”) that has been signed or accepted by each contributor indicating an agreement to the license terms below. This license is for your protection as a contributor as well as the protection of Redis and its users; it does not change your rights to use your own Contribution for any other purpose.

You accept and agree to the following terms and conditions for the Contribution. Except for the license granted herein to Redis and recipients of software distributed by Redis, You reserve all right, title, and interest in and to Your Contribution.

  1. Definitions. “You” (or “Your”) shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Redis. For legal entities, the entity making a Contribution and all other entiti
@gkorland
gkorland / gist:7639632
Created November 25, 2013 10:54
Another phantom crash (1.9.2)
Operating system: Linux
0.0.0 Linux 3.2.0-53-virtual #81-Ubuntu SMP Thu Aug 22 21:21:26 UTC 2013 x86_64
CPU: amd64
family 16 model 8 stepping 1
2 CPUs
Crash reason: SIGSEGV
Crash address: 0x209ccf8
Thread 0 (crashed)
@gkorland
gkorland / phantom-crash
Created June 5, 2013 16:28
phantom-crash
Operating system: Linux
0.0.0 Linux 3.2.0-44-virtual #69-Ubuntu SMP Thu May 16 17:54:14 UTC 2013 x86_64
CPU: amd64
family 16 model 8 stepping 1
8 CPUs
Crash reason: SIGABRT
Crash address: 0x3e800005ce5
Thread 61 (crashed)