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
doc = doc:(object / array / ws / n) { return doc } | |
// Doc | |
line = key:key ws? seperator ws? value:(prim / array / object) ws? lineEnd? n? ws? { return {key, value} } | |
key = txt:txt { return txt } | |
// Primitives | |
prim "primitive value" = val:(null / bool / num / txt) { return val } | |
null = "null" { return null } | |
bool "boolean" = bool:("true" / "false") { return Boolean(bool) } |
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
# global.columns = ID FORM LEMMA UPOS XPOS FEATS HEAD DEPREL DEPS MISC PARSEME:MWE | |
# source_sent_id = . . data/kres_public/cckresV1_0-text/F0000004.txt | |
# text = Vladi je uspelo rešiti gordijski vozel plačnega sistema v javnem sektorju. | |
1 Vladi vlada NOUN Ncfsd Case=Dat|Gender=Fem|Number=Sing 4 iobj _ _ _ | |
2 je biti AUX Va-r3s-n Mood=Ind|Number=Sing|Person=3|Polarity=Pos|Tense=Pres|VerbForm=Fin 3 aux _ _ _ | |
3 uspelo uspeti VERB Vmep-sn Aspect=Perf|Gender=Neut|Number=Sing|VerbForm=Part 0 root _ _ _ | |
4 rešiti rešiti VERB Vmen Aspect=Perf|VerbForm=Inf 3 xcomp _ _ _ | |
5 gordijski gordijski ADJ Agpmsay Case=Acc|Definite=Def|Degree=Pos|Gender=Masc|Number=Sing 6 amod _ _ _ | |
6 vozel vozel NOUN Ncmsan Animacy=Inan|Case=Acc|Gender=Masc|Number=Sing 4 obj _ _ _ | |
7 plačnega plačen ADJ Agpmsg Case=Gen|Degree=Pos|Gender=Masc|Number=Sing 8 amod _ _ _ |
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 -*- | |
# To run it install Scrapy | |
# https://doc.scrapy.org/en/latest/intro/install.html | |
# And then do the following | |
# $ scrapy startproject [your_project_name] | |
# $ cd your_project_name | |
# $ scrapy genspider docs [docs_domain.tld] | |
# | |
# Erase the content of your_project_name/spider/docs.py | |
# and replace it with this code and run |
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
def poor_mans_csv_parser(text, delimiter=',', quote='"'): | |
assert isinstance(text, list), "At the momment we can not process strings." | |
parsed_text = [] | |
for line in text: | |
line = list(line) | |
parsed_line = [] | |
current = '' | |
quoted = False | |
while line: |
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
VAR = line:line* { return line; } // Return array of arrays with elements :D | |
start = ws "{{" ws | |
end = ws "}}" ws | |
ws "whitespace" | |
= s:[ \t\r]* | |
n "newline" | |
= n:"\n"* |
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
<!DOCTYPE html> | |
<html> | |
<head lang="sl"> | |
<meta charset="UTF-8"> | |
<meta name="description" content="Janis Fakebook profile"> | |
<meta name="keywords" content="me, about, interests, fakebook"> | |
<meta name="author" content="Jani Šumak"> | |
<title>Jani Šumak | Fakebook</title> | |
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
<!DOCTYPE html> | |
<html> | |
<head lang="sl"> | |
<meta charset="UTF-8"> | |
<meta name="description" content="Janis Fakebook profile"> | |
<meta name="keywords" content="me, about, interests, fakebook"> | |
<meta name="author" content="Jani Šumak"> | |
<title>Jani Šumak | Fakebook</title> | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
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
#! /usr/bin/env bash | |
# | |
# in progress | |
# Install Caddy webserver | |
curl https://getcaddy.com | bash -s git,cors,hugo |
NewerOlder