# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export NEO4J_HOME=${NEO4J_HOME-~/Downloads/neo4j-community-3.0.1} | |
if [ ! -f data-csv.zip ]; then | |
curl -OL https://cloudfront-files-1.publicintegrity.org/offshoreleaks/data-csv.zip | |
fi | |
export DATA=${PWD}/import | |
rm -rf $DATA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example Dockerfile | |
FROM hello-world |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -u | |
set -o pipefail | |
COMMAND=${1:-"help"} | |
MACHINE_NAME=myapp | |
DENV=${DENV:-"dev"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function config { | |
mkdir -p /tmp/ce/$1/conf | |
cat > /tmp/ce/$1/conf/neo4j.conf << EOF | |
unsupported.dbms.edition=enterprise | |
dbms.mode=CORE | |
dbms.security.auth_enabled=false | |
dbms.memory.heap.initial_size=512m | |
dbms.memory.heap.max_size=512m | |
dbms.memory.pagecache.size=100M |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl "https://www.wikidata.org/w/api.php?action=wbgetentities&sites=itwiki&titles=Pizza&format=json" | python -mjson.tool | |
{ | |
"entities": { | |
"q177": { | |
"descriptions": { | |
"de": { | |
"language": "de", | |
"value": "Gericht" | |
}, | |
"en": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package demo; | |
import static java.util.Arrays.asList; | |
import static org.springframework.security.core.authority.AuthorityUtils.createAuthorityList; | |
import java.io.PrintWriter; | |
import java.io.StringWriter; | |
import java.util.LinkedHashMap; | |
import java.util.List; | |
import java.util.Map; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from neo4j import GraphDatabase | |
import json | |
import random | |
import logging | |
import uuid | |
# default parameters | |
URI = "bolt://localhost:7687" |
The goal was it to find the authors of a book in fileA.json and get their details in fileB.json
See:
https://twitter.com/JMHReif/status/1503851216740171784?s=20&t=4D2LUKLH9Kh5hCuTSxRlbw
https://twitter.com/JMHReif/status/1503851872096067585?s=20&t=4D2LUKLH9Kh5hCuTSxRlbw
Goal: Create an array of author ids from fileA. Depending on what is to be filtered from fileA.json, there are different approaches: