Skip to content

Instantly share code, notes, and snippets.

@valefranz
Last active October 28, 2015 11:27
Show Gist options
  • Select an option

  • Save valefranz/7e5e4f70106c8b667ca6 to your computer and use it in GitHub Desktop.

Select an option

Save valefranz/7e5e4f70106c8b667ca6 to your computer and use it in GitHub Desktop.

Revisions

  1. valefranz revised this gist Oct 28, 2015. No changes.
  2. valefranz renamed this gist Oct 28, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. valefranz revised this gist Oct 28, 2015. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions ScissorsPaperSpock
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    This example can be run here: http://graphgist.neo4j.com/#!/gists/7e5e4f70106c8b667ca6
    If you use the code or images, please cite:
    Valentina Franzoni, https://gist.github.com/valefranz/7e5e4f70106c8b667ca6

    //test
    [source,cypher]
    ----
  4. valefranz renamed this gist Oct 13, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. valefranz revised this gist Oct 13, 2015. No changes.
  6. valefranz revised this gist Oct 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion test
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ CREATE
    (l:Agent{Name:"Lizard"}),
    (sp:Agent{Name:"Spock"}),
    (s)-[:cuts]->(p),
    (s)-[decapitates]->(l),
    (s)-[:decapitates]->(l),
    (r)-[:crashes]->(s),
    (r)-[:crushes]->(l),
    (p)-[:disproves]->(sp),
  7. valefranz revised this gist Oct 13, 2015. No changes.
  8. valefranz revised this gist Oct 13, 2015. No changes.
  9. valefranz revised this gist Oct 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion test
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ CREATE
    (sp:Agent{Name:"Spock"}),
    (s)-[:cuts]->(p),
    (s)-[decapitates]->(l),
    (r)-[:crashes}]->(s),
    (r)-[:crashes]->(s),
    (r)-[:crushes]->(l),
    (p)-[:disproves]->(sp),
    (p)-[:covers]->(r),
  10. valefranz revised this gist Oct 13, 2015. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions test
    Original file line number Diff line number Diff line change
    @@ -8,15 +8,15 @@ CREATE
    (l:Agent{Name:"Lizard"}),
    (sp:Agent{Name:"Spock"}),
    (s)-[:cuts]->(p),
    (s)-[:Action{Name:"decapitates"}]->(l),
    (r)-[:Action{Name:"crashes"}]->(s),
    (r)-[:Action{Name:"crushes"}]->(l),
    (p)-[:Action{Name:"disproves"}]->(sp),
    (p)-[:Action{Name:"covers"}]->(r),
    (l)-[:Action{Name:"poisons"}]->(sp),
    (l)-[:Action{Name:"eats"}]->(p),
    (sp)-[:Action{Name:"smashes"}]->(s),
    (sp)-[:Action{Name:"vapourizes"}]->(r)
    (s)-[decapitates]->(l),
    (r)-[:crashes}]->(s),
    (r)-[:crushes]->(l),
    (p)-[:disproves]->(sp),
    (p)-[:covers]->(r),
    (l)-[:poisons]->(sp),
    (l)-[:eats]->(p),
    (sp)-[:smashes]->(s),
    (sp)-[:vapourizes]->(r)
    RETURN s,r,p,l,sp
    ----
    //graph
  11. valefranz revised this gist Oct 13, 2015. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions test
    Original file line number Diff line number Diff line change
    @@ -8,15 +8,15 @@ CREATE
    (l:Agent{Name:"Lizard"}),
    (sp:Agent{Name:"Spock"}),
    (s)-[:cuts]->(p),
    (:Scissors)-[:Action{Name:"decapitates"}]->(:Lizard),
    (:Rock)-[:Action{Name:"crashes"}]->(:Scissors),
    (:Rock)-[:Action{Name:"crushes"}]->(:Lizard),
    (:Paper)-[:Action{Name:"disproves"}]->(:Spock),
    (:Paper)-[:Action{Name:"covers"}]->(:Rock),
    (:Lizard)-[:Action{Name:"poisons"}]->(:Spock),
    (:Lizard)-[:Action{Name:"eats"}]->(:Paper),
    (:Spock)-[:Action{Name:"smashes"}]->(:Scissors),
    (:Spock)-[:Action{Name:"vapourizes"}]->(:Rock)
    (s)-[:Action{Name:"decapitates"}]->(l),
    (r)-[:Action{Name:"crashes"}]->(s),
    (r)-[:Action{Name:"crushes"}]->(l),
    (p)-[:Action{Name:"disproves"}]->(sp),
    (p)-[:Action{Name:"covers"}]->(r),
    (l)-[:Action{Name:"poisons"}]->(sp),
    (l)-[:Action{Name:"eats"}]->(p),
    (sp)-[:Action{Name:"smashes"}]->(s),
    (sp)-[:Action{Name:"vapourizes"}]->(r)
    RETURN s,r,p,l,sp
    ----
    //graph
  12. valefranz revised this gist Oct 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion test
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ CREATE
    (p:Agent{Name:"Paper"}),
    (l:Agent{Name:"Lizard"}),
    (sp:Agent{Name:"Spock"}),
    (s)-[:cuts}]->(p),
    (s)-[:cuts]->(p),
    (:Scissors)-[:Action{Name:"decapitates"}]->(:Lizard),
    (:Rock)-[:Action{Name:"crashes"}]->(:Scissors),
    (:Rock)-[:Action{Name:"crushes"}]->(:Lizard),
  13. valefranz revised this gist Oct 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion test
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ CREATE
    (p:Agent{Name:"Paper"}),
    (l:Agent{Name:"Lizard"}),
    (sp:Agent{Name:"Spock"}),
    (s)-[:Action{Name:"cuts"}]->(p),
    (s)-[:cuts}]->(p),
    (:Scissors)-[:Action{Name:"decapitates"}]->(:Lizard),
    (:Rock)-[:Action{Name:"crashes"}]->(:Scissors),
    (:Rock)-[:Action{Name:"crushes"}]->(:Lizard),
  14. valefranz revised this gist Oct 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion test
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ CREATE
    (p:Agent{Name:"Paper"}),
    (l:Agent{Name:"Lizard"}),
    (sp:Agent{Name:"Spock"}),
    (:Scissors)-[:Action]->(:Paper),
    (s)-[:Action{Name:"cuts"}]->(p),
    (:Scissors)-[:Action{Name:"decapitates"}]->(:Lizard),
    (:Rock)-[:Action{Name:"crashes"}]->(:Scissors),
    (:Rock)-[:Action{Name:"crushes"}]->(:Lizard),
  15. valefranz revised this gist Oct 13, 2015. 1 changed file with 14 additions and 14 deletions.
    28 changes: 14 additions & 14 deletions test
    Original file line number Diff line number Diff line change
    @@ -2,21 +2,21 @@
    [source,cypher]
    ----
    CREATE
    (s:Agent{Name:Scissors}),
    (r:Agent{Name:Rock}),
    (p:Agent{Name:Paper}),
    (l:Agent{Name:Lizard}),
    (sp:Agent{Name:Spock}),
    (s:Agent{Name:"Scissors"}),
    (r:Agent{Name:"Rock"}),
    (p:Agent{Name:"Paper"}),
    (l:Agent{Name:"Lizard"}),
    (sp:Agent{Name:"Spock"}),
    (:Scissors)-[:Action]->(:Paper),
    (:Scissors)-[:Action{Name:decapitates}]->(:Lizard),
    (:Rock)-[:Action{Name:crashes}]->(:Scissors),
    (:Rock)-[:Action{Name:crushes}]->(:Lizard),
    (:Paper)-[:Action{Name:disproves}]->(:Spock),
    (:Paper)-[:Action{Name:covers}]->(:Rock),
    (:Lizard)-[:Action{Name:poisons}]->(:Spock),
    (:Lizard)-[:Action{Name:eats}]->(:Paper),
    (:Spock)-[:Action{Name:smashes}]->(:Scissors),
    (:Spock)-[:Action{Name:vapourizes}]->(:Rock)
    (:Scissors)-[:Action{Name:"decapitates"}]->(:Lizard),
    (:Rock)-[:Action{Name:"crashes"}]->(:Scissors),
    (:Rock)-[:Action{Name:"crushes"}]->(:Lizard),
    (:Paper)-[:Action{Name:"disproves"}]->(:Spock),
    (:Paper)-[:Action{Name:"covers"}]->(:Rock),
    (:Lizard)-[:Action{Name:"poisons"}]->(:Spock),
    (:Lizard)-[:Action{Name:"eats"}]->(:Paper),
    (:Spock)-[:Action{Name:"smashes"}]->(:Scissors),
    (:Spock)-[:Action{Name:"vapourizes"}]->(:Rock)
    RETURN s,r,p,l,sp
    ----
    //graph
  16. valefranz revised this gist Oct 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion test
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ CREATE
    (p:Agent{Name:Paper}),
    (l:Agent{Name:Lizard}),
    (sp:Agent{Name:Spock}),
    (:Scissors)-[r:Action]->(:Paper),
    (:Scissors)-[:Action]->(:Paper),
    (:Scissors)-[:Action{Name:decapitates}]->(:Lizard),
    (:Rock)-[:Action{Name:crashes}]->(:Scissors),
    (:Rock)-[:Action{Name:crushes}]->(:Lizard),
  17. valefranz revised this gist Oct 13, 2015. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions test
    Original file line number Diff line number Diff line change
    @@ -9,14 +9,14 @@ CREATE
    (sp:Agent{Name:Spock}),
    (:Scissors)-[r:Action]->(:Paper),
    (:Scissors)-[:Action{Name:decapitates}]->(:Lizard),
    (r)-[:Action{Name:crashes}]->(s),
    (r)-[:Action{Name:crushes}]->(l),
    (p)-[:Action{Name:disproves}]->(sp),
    (p)-[:Action{Name:covers}]->(r),
    (l)-[:Action{Name:poisons}]->(sp),
    (l)-[:Action{Name:eats}]->(p),
    (sp)-[:Action{Name:smashes}]->(s),
    (sp)-[:Action{Name:vapourizes}]->(r)
    (:Rock)-[:Action{Name:crashes}]->(:Scissors),
    (:Rock)-[:Action{Name:crushes}]->(:Lizard),
    (:Paper)-[:Action{Name:disproves}]->(:Spock),
    (:Paper)-[:Action{Name:covers}]->(:Rock),
    (:Lizard)-[:Action{Name:poisons}]->(:Spock),
    (:Lizard)-[:Action{Name:eats}]->(:Paper),
    (:Spock)-[:Action{Name:smashes}]->(:Scissors),
    (:Spock)-[:Action{Name:vapourizes}]->(:Rock)
    RETURN s,r,p,l,sp
    ----
    //graph
  18. valefranz revised this gist Oct 13, 2015. 1 changed file with 16 additions and 11 deletions.
    27 changes: 16 additions & 11 deletions test
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,22 @@
    //test
    [source,cypher]
    ----
    CREATE (s:Scissors{Name:Scissors}),
    (r:Rock{Name:Rock}),
    (p:Paper{Name:Paper}),
    (l:Lizard{Name:Lizard}),
    (sp:Spock{Name:Spock}),
    (:Scissors)-[r:cuts]->(:Paper),(:Scissors)-[:decapitates]->(:Lizard),
    (r)-[:crashes]->(s),(r)-[crushes:]->(l),
    (p)-[:disproves]->(sp),
    (p)-[:covers]->(r),(l)-[:poisons]->(sp),
    (l)-[:eats]->(p),(sp)-[:smashes]->(s),
    (sp)-[:vapourizes]->(r)
    CREATE
    (s:Agent{Name:Scissors}),
    (r:Agent{Name:Rock}),
    (p:Agent{Name:Paper}),
    (l:Agent{Name:Lizard}),
    (sp:Agent{Name:Spock}),
    (:Scissors)-[r:Action]->(:Paper),
    (:Scissors)-[:Action{Name:decapitates}]->(:Lizard),
    (r)-[:Action{Name:crashes}]->(s),
    (r)-[:Action{Name:crushes}]->(l),
    (p)-[:Action{Name:disproves}]->(sp),
    (p)-[:Action{Name:covers}]->(r),
    (l)-[:Action{Name:poisons}]->(sp),
    (l)-[:Action{Name:eats}]->(p),
    (sp)-[:Action{Name:smashes}]->(s),
    (sp)-[:Action{Name:vapourizes}]->(r)
    RETURN s,r,p,l,sp
    ----
    //graph
  19. valefranz revised this gist Oct 13, 2015. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion test
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,17 @@
    //test
    [source,cypher]
    ----
    CREATE (s:Scissors{Name:Scissors}), (r:Rock{Name:Rock}),(p:Paper{Name:Paper}),(l:Lizard{Name:Lizard}),(sp:Spock{Name:Spock}),(s)-[r:cuts]->(p),(s)-[:decapitates]->(l),(r)-[:crashes]->(s),(r)-[crushes:]->(l),(p)-[:disproves]->(sp),(p)-[:covers]->(r),(l)-[:poisons]->(sp),(l)-[:eats]->(p),(sp)-[:smashes]->(s),(sp)-[:vapourizes]->(r)
    CREATE (s:Scissors{Name:Scissors}),
    (r:Rock{Name:Rock}),
    (p:Paper{Name:Paper}),
    (l:Lizard{Name:Lizard}),
    (sp:Spock{Name:Spock}),
    (:Scissors)-[r:cuts]->(:Paper),(:Scissors)-[:decapitates]->(:Lizard),
    (r)-[:crashes]->(s),(r)-[crushes:]->(l),
    (p)-[:disproves]->(sp),
    (p)-[:covers]->(r),(l)-[:poisons]->(sp),
    (l)-[:eats]->(p),(sp)-[:smashes]->(s),
    (sp)-[:vapourizes]->(r)
    RETURN s,r,p,l,sp
    ----
    //graph
  20. valefranz revised this gist Oct 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion test
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    //test
    [source,cypher]
    ----
    CREATE (s:Scissors), (r:Rock),(p:Paper),(l:Lizard),(sp:Spock),(s)-[r:cuts]->(p),(s)-[:decapitates]->(l),(r)-[:crashes]->(s),(r)-[crushes:]->(l),(p)-[:disproves]->(sp),(p)-[:covers]->(r),(l)-[:poisons]->(sp),(l)-[:eats]->(p),(sp)-[:smashes]->(s),(sp)-[:vapourizes]->(r)
    CREATE (s:Scissors{Name:Scissors}), (r:Rock{Name:Rock}),(p:Paper{Name:Paper}),(l:Lizard{Name:Lizard}),(sp:Spock{Name:Spock}),(s)-[r:cuts]->(p),(s)-[:decapitates]->(l),(r)-[:crashes]->(s),(r)-[crushes:]->(l),(p)-[:disproves]->(sp),(p)-[:covers]->(r),(l)-[:poisons]->(sp),(l)-[:eats]->(p),(sp)-[:smashes]->(s),(sp)-[:vapourizes]->(r)
    RETURN s,r,p,l,sp
    ----
    //graph
  21. valefranz revised this gist Oct 13, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions test
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,7 @@
    [source,cypher]
    ----
    CREATE (s:Scissors), (r:Rock),(p:Paper),(l:Lizard),(sp:Spock),(s)-[r:cuts]->(p),(s)-[:decapitates]->(l),(r)-[:crashes]->(s),(r)-[crushes:]->(l),(p)-[:disproves]->(sp),(p)-[:covers]->(r),(l)-[:poisons]->(sp),(l)-[:eats]->(p),(sp)-[:smashes]->(s),(sp)-[:vapourizes]->(r)
    RETURN s,r,p,l,sp
    ----
    //graph
    '''
  22. valefranz revised this gist Oct 13, 2015. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions test
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    //test

    CREATE (s:Scissors), (r:Rock),(p:Paper),(l:Lizard),(sp:Spock),(s)-[r:cuts]->(p),(s)-[:decapitates]->(l),(r)-[:crashes]->(s),(r)-[crushes:]->(l),(p)-[:disproves]->(sp),(p)-[:covers]->(r),(l)-[:poisons]->(sp),(l)-[:eats]->(p),(sp)-[:smashes]->(s),(sp)-[:vapourizes]->(r)
    [source,cypher]
    ----
    CREATE (s:Scissors), (r:Rock),(p:Paper),(l:Lizard),(sp:Spock),(s)-[r:cuts]->(p),(s)-[:decapitates]->(l),(r)-[:crashes]->(s),(r)-[crushes:]->(l),(p)-[:disproves]->(sp),(p)-[:covers]->(r),(l)-[:poisons]->(sp),(l)-[:eats]->(p),(sp)-[:smashes]->(s),(sp)-[:vapourizes]->(r)
    ----
    //graph
    '''
  23. valefranz revised this gist Oct 13, 2015. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion test
    Original file line number Diff line number Diff line change
    @@ -1 +1,3 @@
    //test
    //test

    CREATE (s:Scissors), (r:Rock),(p:Paper),(l:Lizard),(sp:Spock),(s)-[r:cuts]->(p),(s)-[:decapitates]->(l),(r)-[:crashes]->(s),(r)-[crushes:]->(l),(p)-[:disproves]->(sp),(p)-[:covers]->(r),(l)-[:poisons]->(sp),(l)-[:eats]->(p),(sp)-[:smashes]->(s),(sp)-[:vapourizes]->(r)
  24. valefranz created this gist Oct 11, 2015.
    1 change: 1 addition & 0 deletions test
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    //test