Skip to content

Instantly share code, notes, and snippets.

View argahsuknesib's full-sized avatar

Kush Bisen argahsuknesib

View GitHub Profile
{
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
"import": [
"css:config/app/init/static-root.json",
"css:config/app/main/default.json",
"css:config/app/variables/default.json",
"css:config/http/handler/default.json",
"css:config/http/middleware/default.json",
"css:config/http/notifications/webhooks.json",
"css:config/http/server-factory/http.json",
@argahsuknesib
argahsuknesib / readFromPod.ts
Created November 7, 2023 13:31
Reading from a pod with LDES in LDP.
// download these packages from npm
// you can use the my template for an intial Typescript project:
// https://github.com/argahsuknesib/ts-template
import { LDESinLDP, LDPCommunication } from "@treecg/versionawareldesinldp";
const N3 = require('n3');
async function main() {
// let ldes_location = 'https://n061-14a.wall2.ilabt.iminds.be/dataset_participant1/data/'; //change this to the location of your LDES
let ldes_location = 'http://localhost:3000/dataset_participant1/data/';
@argahsuknesib
argahsuknesib / account.json
Created October 25, 2023 09:03
account information to start up a single solid server.
[
{
"podName":"participant6",
"email":"participant6@protego.com",
"password":"qwerty123csspod"
}
]
@argahsuknesib
argahsuknesib / css-config.json
Last active November 16, 2023 14:35
config to start a solid server
{
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^6.0.0/components/context.jsonld",
"import": [
"css:config/app/init/default.json",
"css:config/app/main/default.json",
"css:config/app/setup/disabled.json",
"css:config/app/variables/default.json",
"css:config/http/handler/default.json",
"css:config/http/middleware/default.json",
"css:config/http/notifications/websockets.json",
async execute(container: QuadContainer) {
const inferredTripleStore = new N3.Store();
const store = new N3.Store();
let parser = new N3.Parser({ format: 'Notation3', blankNodePrefix: 'bnode' });
const QueryEngine = require('@comunica/query-sparql').QueryEngine;
const comunicaEngine = new QueryEngine();
for (let elem of container.elements) {
store.addQuad(elem);
}
for (let elem of this.staticData) {
@argahsuknesib
argahsuknesib / problem-statement-and-goals.md
Created January 17, 2023 12:07
Problem Statement for the PhD and goals.

Problem Statement

"There is a recent trend towards privacy and ownership of the data on the web. Solid is a specification which extends the current web for an interoperable and privately owned data. All of the data published on the web is in the form of a stream. To process these streams in a privacy-focused SOLID context, we will need to develop scalable technologies for efficiently querying and processing these streams.”

Research Questions

  • How to discover relevant streams for aggregation?
  • How to choose the strategy for cooperation and therefore optimisation of aggregators?
  • How should we handle the access constraints of the pod?

Discovering relevant streams for aggregation.

Using an approximation graph:

@argahsuknesib
argahsuknesib / aggregator-kush.md
Last active October 19, 2022 07:40
Aggregators to realise improved data summarization on data streams in a network of solid pods.

Pitch

Healthcare data is sensitive, for which the solid specification can be used to store the sensitive data. In patient monitoring system, datastreams produced by personal vitality sensors and activity trackers are semantically annotated and stored in the data pods. Monitoring by a healthcare expert would require computations on the healthcare data streams, and monitoring paitients simultaneously will be tougher as the number of patients increase. Aggregators are therefore required to realise an improved data summarisation from the solid pods. Aggregations can be multi-paitients across the solid pod, or on a single paitient's data pod. The DAHCC Dataset will be used as the data stored for each patient in a solid pod to realise the aggregators.

Desired Solution

A proof of concept aggregator which runs as a service over the datastores, with which a client application interacts. The client application can specify the nature of the aggregation to be performed. The solutio

@argahsuknesib
argahsuknesib / createMultiPodData.ts
Created October 4, 2022 14:00
Providing the data folder, the script will start a community solid server with names of the data files as of the solid pod.
import { Logger } from "tslog"
const fs = require('fs')
const generator = require('generate-password')
const jsonFile = require('jsonfile')
const directory: string = './data'
const { exec } = require('node:child_process')
const logging: Logger = new Logger();
const cmdCreatePods: string = 'community-solid-server -c @css:config/file.json --seededPodConfigJson multiSolidPod.json';
#!/usr/bin/env bash
for tripleFile in *.nt; do
echo "PUSHING DATA INTO THE SOLID PODS"
echo "================================"
if [ -z "$baseURL"]
then
echo "baseURL is not specified, please specify a base URL."
elif [ -z "$timestamp"]
then
{?s rdf:type email:contact} => {?s rdf:type chat:Chat}
{?s rdf:type email:contact_list} => {?s rdf:type chat:ContactList}
{?s rdf:type email:email} => {?s rdf:type chat:Message}
{?s rdf:type email:thread} => {?s rdf:type chat:Chat}
{?s email:email_timestamp ?o} => {?s chat:timestamp ?o}
{?s email:thread_name ?o} => {?s chat:name ?o}
{?s email:email_body ?o} => {?s chat:text ?o}
{?s email:same_thread_as ?o} => {?s chat:sameChatAs ?o}
{?s email:reply_to ?o} => {?s chat:isReplyTo ?o}
{?s email:has_contact ?o} => {?s chat:hasContact ?o}