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
| { | |
| movies(options: { limit: 10 }) { | |
| title | |
| actors { | |
| name | |
| } | |
| } | |
| } |
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
| //DEPS org.jsoup:jsoup:1.14.3 | |
| import static java.lang.System.*; | |
| import org.jsoup.*; | |
| public class Html { | |
| public static void main(String...args) throws Exception { | |
| var doc = Jsoup.connect(args[0]).get(); | |
| out.println(doc.title()); | |
| doc.select(args[1]) |
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
| create index on :Partei(name); | |
| create index on :These(name); | |
| create constraint if not exists on (p:Partei) assert p.id is unique; | |
| create constraint if not exists on (t:These) assert t.id is unique; | |
| load csv with headers from | |
| "https://gist.github.com/jexp/189e9d7a47095ff96ff522fe350f0d36/raw/fa2f356514ec981067856ad7a5f6dfb017122c8d/wom-sa-2021.csv" | |
| as row | |
| merge (p:Partei {id:toInteger(row.`Partei: Nr.`)}) on create set p.text = row.`Partei: Name`, p.name = row.`Partei: Kurzbezeichnung` |
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
| //Movies based on similar users and favorite genres | |
| MATCH (u:Users)-[:WATCHED]->(m:Movies) | |
| WHERE u.userId ='1' | |
| WITH collect(m) as watchedMovies | |
| MATCH (u:Users)-[:WATCHED]->(m1:Movies)-[s:SIMILAR]->(m2:Movies), | |
| (m2)-[:GENRES]->(g:Genres), (u)-[:FAVORITE]->(g) | |
| WHERE u.userId ='10' and m2 IN watchedMovies | |
| RETURN distinct u.userId as userId, g.genres as genres, m2.title as title, m2.rating_mean as rating |
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
| !pip install giphy_client | |
| import giphy_client | |
| import random | |
| from IPython.core.display import display, HTML | |
| api_instance = giphy_client.DefaultApi() | |
| api_key = '***' # from https://developers.giphy.com/dashboard/ | |
| search = 'science' | |
| api_response = api_instance.gifs_search_get( api_key, search, limit=25) | |
| images = [img.images.fixed_height.url for img in api_response.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
| // load initial package, adjust your name and version | |
| with "org.neo4j:neo4j-kernel" as name, '4.2.6' as version | |
| call apoc.load.json("https://deps.dev/_/s/maven/p/"+name+"/v/"+version+"/dependencies") yield value | |
| where value.package.system = 'MAVEN' | |
| merge (p:Package:Maven {name:value.package.name, version:value.version}) | |
| with * | |
| unwind value.dependencies as dep | |
| with p, dep where dep.package.system = 'MAVEN' | |
| merge (d:Package:Maven {name:dep.package.name, version:dep.version}) |
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
| call apoc.load.json("https://lombardinetworks.net/network/1027/1027.json") yield value | |
| unwind value.nodes as n | |
| call apoc.create.node([split(n.type,'#')[1]], n {.id, .name}) yield node | |
| with value, apoc.map.groupBy(collect(node),"id") as nodes | |
| unwind value.links as r | |
| call apoc.create.relationship(nodes[r.source],split(r.type,'#')[1], {amount:toFloat(r.amount)},nodes[r.target]) yield rel | |
| return count(*); |
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
| Dev Rel | |
| Don’t sound smart | |
| Help others feels smart | |
| Break thinks down to simple bits | |
| Developer empathy | |
| Not just for senior audiences | |
| Netlify - docs, dx-eng, eng-integrations | |
| Employee of community. Company is a sponsor | |
| Ambassador progr. |
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
| # -*- coding: utf-8 -*- | |
| # https://developers.google.com/explorer-help/guides/code_samples#python | |
| # pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib | |
| # python playlist.py | |
| import os | |
| import sys | |
| import json |
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
| call apoc.load.csv('https://www.nature.com/immersive/d41586-019-03165-4/dat/data.zip!cociteNodes.csv',{}) | |
| yield map | |
| create (p:Paper) set p =map {.NatureID, .PubYear, .Title, .HierCat, .size} | |
| return count(*) as papers; | |
| create index on :Paper(NatureID); | |
| call db.awaitIndexes(); | |
| call apoc.load.csv('https://www.nature.com/immersive/d41586-019-03165-4/dat/data.zip!cociteEdges.csv',{ignore:['path']}) | |
| yield map |