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
| #include <queue> | |
| #include <vector> | |
| #include <iostream> | |
| #include <algorithm> | |
| using namespace std; | |
| void addEdge(vector<int> *adj, int u, int v) { | |
| adj[u].push_back(v); | |
| adj[v].push_back(u); | |
| } |
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
| ffi = require("ffi") | |
| julia = ffi.load("/Users/inorton/git/julia/usr/lib/libjulia.dylib", true) | |
| ffi.cdef[[ | |
| void jl_eval_string(const char*); | |
| void jl_init(const char*); | |
| ]] | |
| julia.jl_init("/Users/inorton/git/julia/usr/lib/") | |
| julia.jl_eval_string(" println(\"hello, world\") ") | |
| -- should print "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
| #include <fstream> | |
| #include <scripting/ModException.hpp> | |
| #include <sanity.hpp> | |
| #include "LuaSecurity.hpp" | |
| using namespace scripting; | |
| namespace { | |
| void copyAll(sol::environment &env, const sol::global_table &globals, |
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
| { | |
| "options": { | |
| "generate_report": true, | |
| "verbose": true, | |
| "report_file_location": "purged_css_report_data.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
| WITH ["Jennifer","Michelle","Tanya","Julie","Christie", | |
| "Sophie","Amanda","Khloe","Sarah","Kaylee"] AS names | |
| FOREACH (r IN range(1,1000000) | | |
| CREATE (:User {username:names[r % size(names)] + "-" + r}) ); | |
| FOREACH (r IN range(1,1000000) | CREATE (:Account {number: r, balance: round(rand() * 1000000) / 100.0, type:"Savings"})) | |
| UNWIND range(1,1000000) AS number | |
| MATCH (user), (account) |
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
| Schema | |
| ------ | |
| CREATE CONSTRAINT ON (n:Location) ASSERT n.id IS UNIQUE; | |
| CREATE CONSTRAINT ON (n:Owner) ASSERT n.name IS UNIQUE; | |
| CREATE INDEX ON :Address(addr, zip); | |
| Data Exploration |
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
| MATCH (n:User) | |
| RETURN n.partition, COUNT(*) AS members, COLLECT(n.name) AS names | |
| ORDER BY members DESC | |
| LIMIT 10 |
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 (john:User {name:"John"}) | |
| CREATE (sheila:User {name:"Sheila"}) | |
| CREATE (robert:User {name:"Robert"}) | |
| CREATE (karen:User {name:"Karen"}) | |
| CREATE (m1:Merchant {name:"Computer Store"}) | |
| CREATE (m2:Merchant {name:"Gas Station"}) | |
| CREATE (m3:Merchant {name:"Jewelry Store"}) | |
| CREATE (m4:Merchant {name:"Furniture Store"}) | |
| CREATE (m5:Merchant {name:"Optometrist"}) | |
| CREATE (m6:Merchant {name:"Coffee Shop"}) |
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
| MATCH (company)<-[:WORKS_FOR]-(me:Person{username:'ian'})-[:HAS_SKILL]->(skill), | |
| (company)<-[:WORKS_FOR]-(colleague)-[r:HAS_SKILL]->(skill) | |
| WHERE r.level > 1 | |
| RETURN colleague.username AS username, | |
| count(skill) AS score, | |
| collect(skill.name) AS skills | |
| ORDER BY score DESC |
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 com.maxdemarzi.models; | |
| import humanize.Humanize; | |
| import lombok.Data; | |
| import org.jooby.Upload; | |
| import java.time.ZonedDateTime; | |
| import java.time.format.DateTimeFormatter; | |
| import java.util.Date; |
NewerOlder