This file contains 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 a library(location) called SASDATA that | |
can be used as a shrotcut to access data | |
*/ | |
libname SASDATA "/home/u62247871/ExerciseA"; | |
/* import schooldata into school a variable called school */ | |
data school; | |
set SASDATA.schooldata; | |
diff_lang = post_lang - pre_lang; |
This file contains 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
############# | |
# All steps created following instructions on Medium from Chamika Kasun | |
# https://chamikakasun.medium.com/how-to-manage-multiple-java-version-in-macos-e5421345f6d0 | |
############# | |
#### BEFORE YOU RUN ###### | |
# change directory to where you proM files are | |
# this assumes you're using zsh shell. If not, you'll need to uncomment some code below | |
######################### |
This file contains 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
graph.add((KG.Person, RDF.type, RDFS.Class)) | |
graph.add((KG.Person, RDFS.label, Literal("Person"))) | |
graph.add((KG.Author, RDFS.subClassOf, KG.Person)) | |
graph.add((KG.Author, RDFS.label, Literal("Author"))) | |
graph.add((KG.Reviewer, RDFS.subClassOf, KG.Person)) | |
graph.add((KG.Reviewer, RDFS.label, Literal("Reviewer"))) | |
graph.add((KG.Chair, RDFS.subClassOf, KG.Person)) |
This file contains 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
graph.add((KG.title, RDF.type, RDF.Property)) | |
graph.add((KG.title, RDFS.label, Literal("title"))) | |
graph.add((KG.title, RDFS.comment, Literal("this is a super-property that can be used to query all items that " | |
"have a title"))) | |
graph.add((KG.title, RDFS.range, XSD.string)) | |
#all title are subproperties of KG:title, allowing for flexible querying. | |
graph.add((KG.paperTitle, RDF.type, RDF.Property)) | |
graph.add((KG.paperTitle, RDFS.domain, KG.Paper)) | |
graph.add((KG.paperTitle, RDFS.range, XSD.string)) |
This file contains 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
# 4. Find all the papers written by a given author that where published in database conferences. | |
given_author = "Firstname Lastname" | |
@prefix : <http://example.org/> . | |
SELECT ?papers | |
WHERE | |
{ | |
?paper rdf:type :Paper ; | |
:submitted ?submission . |
This file contains 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
from neo4j import GraphDatabase | |
uri = "neo4j://localhost:7687" | |
driver = GraphDatabase.driver(uri, auth=("neo4j", "password")) | |
def create_friend_of(tx, parameter_name, parameter_friend): | |
tx.run("MATCH (a:Person) WHERE a.name = $name " | |
"CREATE (a)-[:KNOWS]->(:Person {name: $friend})", | |
name=parameter_name, friend=parameter_friend) |