Skip to content

Instantly share code, notes, and snippets.

View analyticalpicasso's full-sized avatar
🎯
Focusing

Sonam Sharma analyticalpicasso

🎯
Focusing
  • New Delhi, India
View GitHub Profile
@gerbrand
gerbrand / spreadingactivation.adoc
Last active April 4, 2022 10:11 — forked from jexp/graph_gist_template.adoc
Demonstration spreading activation in Neo4j

Spreading activation in Neo4j

Introduction

How does the human brain work? How do thoughts pop up in our conscience? Just thinking about the question is confusion enough. Maybe our brain works as a semantic network as explained by Carole Yue at Kahn Academy.
Try for yourself: think of a bird? You probably think a sparrow, duck. Think of an extinct animal? Now you might think of the dodo, mammoth or dinosaur. Animal living on the south pole: a penguin? Or polar bear?

Facts, ideas, memories in our brain are interconnected. They’re not structured into tables like in relational databases or hierarchical in directories on a harddrive: if I’d ask you to name all the birds you know, you won’t give me a long list immediately. A better model of human m

@iamaziz
iamaziz / word2vec-accuracy.py
Last active January 29, 2021 21:21
Computing the accuracy of a word2vec model (used GoogleNews-vectors-negative300.bin as an example).
from gensim.models import Word2Vec
# read the evaluation file, get it at:
# https://word2vec.googlecode.com/svn/trunk/questions-words.txt
>>> questions = 'questions-words.txt'
>>> evals = open(questions, 'r').readlines()
>>> num_sections = len([l for l in evals if l.startswith(':')])
>>> print('total evaluation sentences: {} '.format(len(evals) - num_sections))
total evaluation sentences: 19544
@thomasdarimont
thomasdarimont / howto.md
Last active February 27, 2024 09:08
How to work with binary diffs / patches of Java jars

How to do binary diffs with Java jars

This is a simple example how to generate and apply a binary patch to a jar file. In the hope that some tooling vendor or gradle / maven / repository backend guru might pick this up to unban us from too long dependency download times :)

Download test jars

For testing we download two versions of the commonly used google-guava library.

$ wget http://central.maven.org/maven2/com/google/guava/guava/18.0/guava-18.0.jar
@jvilledieu
jvilledieu / Reshipping scam detection.adoc
Last active July 22, 2019 12:15
A neo4j gist on reshipping and retail fraud.
@ijy
ijy / sublime-text-3-setup.md
Last active March 7, 2025 20:44
My Sublime Text 3 setup.

Sublime Text 3 Setup

Install Package Control

Install Package Control for easy package management.

  1. Open the console with Ctrl+`
  2. Paste in the following:
@tommorris
tommorris / gist:148758
Created July 16, 2009 23:40
[python] twitfave json-to-rdf converter
#!/usr/bin/python
# a twitfave json-to-rdf converter
# twitfave.com provides really awesome data as JSON
# this turns it into RDF/XML. the plan is that I will
# put that data into a giant triple store for you to
# enjoy.
#
# you'll need to install rdflib and cjson and grep the
# file for /Users to customise the paths. basically,
# you need to have an RDF file to use as filesystem