Skip to content

Instantly share code, notes, and snippets.

View yawnston's full-sized avatar
🕴️
oh hi mark

Daniel Crha yawnston

🕴️
oh hi mark
View GitHub Profile
@yawnston
yawnston / query.mmql
Created March 8, 2023 21:31
JSS query proposal
# Notation -> is used as a simplification in place of a single morphism, for example 1 or -1. This is for simplification since I don't know the exact schema.
# Similarly ->> means a traversal like 1/2 or 1/-2 or similar, basically just a compound morphism traversal.
SELECT {
?result -> ?address ;
# Cypher-like aggregation - set of neighboring variables is the aggregation set (in this case streetName adn city)
-> COUNT(?sameAddressOrder) AS ?orderCount .
?address -> ?streetNumber ;
-> ?city .
@yawnston
yawnston / journal_feedback.md
Created February 21, 2023 07:44
Feedback pro Elsevier JSS clanek o MMQL

Figure 4

  • Nemyslim si ze dava smysl opakovat FROM clause, t.j. mit vice FROM klauzuli. My ji pouzivame k tomu, abychom vybrali schema ze ktereho dotazovat.

Figure 5

  • WHERE neni v MMQL optional, vzdy tam musi byt. Prijde mi ze obrazek naznacuje, ze by to tam byt nemuselo (pokud mu spravne rozumim).

Figure 6

  • BIND momentalne nepodporujeme, teoreticky by to slo, ale otevreli bychom se tomu, ze se uvnitr toho objevi nejaka velka agregace napric vice databazemi, a bylo by podle me slozite definovat, jak se to ma prekladat. Kazdopadne na urovni jazyka tomu nic nebrani, je to spis implementacni slozitost.
  • V obrazku chybi VALUES
  • Nepodporujeme GRAPH, protoze to nedava v kontextu MMQL smysl

Figure 7

  • Nepodporujeme NOT EXISTS ve verzi MMQL kterou jsem navrhoval v diplomce - dle me uvahy jde NOT EXISTS ekvivalentne vyjadrit pomoci podporovaneho MINUS v kombinaci s filtrovanim
@yawnston
yawnston / docker-compose.yaml
Created December 30, 2022 14:32
My personal docker-compose file for a setup with MM-quecat and MM-evocat.
version: "2.4"
networks:
mmcat:
driver: bridge
name: mmcat
volumes:
mmcat-postgres:
mmcat-postgres-data:
mmcat-mongo-data:
@yawnston
yawnston / querycat-lang-proposal.md
Last active November 9, 2022 07:18
First proposal for the querycat query language (inspired by SPARQL) for querying categorical data

Query Example

For each customer, return their name and surname, as well as the list of all products this customer bought, which have a maximum price of 150 EUR.

SELECT {
  ?customer cheapItems _:cheapItems ;
            name       ?name        ;
            surname    ?surname     .
@yawnston
yawnston / master-thesis-notes.md
Last active November 13, 2022 16:02
master-thesis-notes
  • behem implementace : kdyz narazim na vice variant reseni, napsat si bohate poznamky -> z toho udelat neco do finalniho textu
  • do diplomky je zajimava i diskuse -> kdyz mam 5 napadu, vybrat ten nejlepsi a probrat proc je nejlepsi
  • swaggerui/vaadin
  • client-server
  1. v dashboardu mit moznost pridatat dalsi DB systemy
  2. read only pracovat se semantickou kategorii (klikat dotazy)
  • MM-cat
  1. konstrukce dotazu nebo textova forma (overit aby SPARQL se dal pouzivat na semantickou kategorii)
  • vyhoda kategorie = skladani cesty -> misto slozitych cest lze dlouhe sipky

Research notes

Timestamping

We can use the NOW() function to timestamp the schema. Later we can do something like create a max age for the schema, at which point we will discard old parts of the schema and get them again.

The NOW() function does not give timezone info, but it should be consistent between calls on the same SPARQL endpoint. Therefore should not be an issue.

@yawnston
yawnston / opendata-invalid-response-query.sparql
Created November 22, 2021 19:11
opendata-invalid-response-query.sparql
SELECT *
WHERE {
{
SELECT DISTINCT ?x ?pDomain (if(( ?pRangeLiteral = "" ), ?ppRange, ?pRangeLiteral) AS ?pRange)
WHERE {{
SELECT DISTINCT ?x ?pDomain ?ppRange (if(isLiteral(?o), <http://hypergraphql.org/schema/Literal>, "") AS ?pRangeLiteral)
WHERE{
?s ?x ?o
OPTIONAL { ?o a ?ppRange }
OPTIONAL { ?s a ?pDomain }
// TEST CASE 1
interface IA
{
}
interface IB
{
}
class ComponentA extends ComponentBase implements IA
@yawnston
yawnston / wsl.vbs
Created September 21, 2020 20:53
Launch WSL2 X server + WM
' This script is meant to be launched from the Windows side, to start up a decorationless
' VcXsrv container for the environment.
Set vcxsrvShell = CreateObject("WScript.Shell")
vcxsrvShell.Run """C:\Program Files\VcXsrv\vcxsrv.exe"" -nodecoration -wgl -ac -clipboard -lesspointer"
Set vcxsrvShell = Nothing
Set wslShell = CreateObject("WScript.Shell")
wslShell.Run "wsl ~/.scripts/wlaunch", 0
Set wslShell = Nothing