Skip to content

Instantly share code, notes, and snippets.

View jige003's full-sized avatar
🎯
Focusing

jige003 jige003

🎯
Focusing
View GitHub Profile
@korakot
korakot / neo4j.py
Last active February 2, 2025 14:30
Using Neo4j in Colab
# download 3.5.8 or neo4j-enterprise-4.0.0-alpha09mr02-unix
!curl https://neo4j.com/artifact.php?name=neo4j-community-3.5.8-unix.tar.gz -o neo4j.tar.gz
# decompress and rename
!tar -xf neo4j.tar.gz # or --strip-components=1
!mv neo4j-community-3.5.8 nj
# disable password, and start server
!sed -i '/#dbms.security.auth_enabled/s/^#//g' nj/conf/neo4j.conf
!nj/bin/neo4j start
@dcollien
dcollien / c_json_servlet.c
Last active August 12, 2020 10:50
C program for a libevent server receiving JSON requests and replying with JSON responses over HTTP
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <event.h>
#include <evhttp.h>
@shunsukeaihara
shunsukeaihara / pic.py
Created January 23, 2013 08:37
power iteration clustering
#!/opt/local/bin/python
# module power iteration clustering
import numpy as NP
from scipy.cluster.vq import kmeans2
def calcNorm1(v):
return NP.sum(NP.fabs(v))
def calcDelta(v,v2):