Skip to content

Instantly share code, notes, and snippets.

View cristianvasquez's full-sized avatar
♠️

Cristian Vasquez cristianvasquez

♠️
View GitHub Profile
@cristianvasquez
cristianvasquez / example-alice.html
Created February 19, 2024 10:42
Alice HTML example
<!DOCTYPE html>
<head>
<style>
body {
--border: #d1d1d1;
--metadata: #4f4f4f;
}
@cristianvasquez
cristianvasquez / 2002_Metadata_Systems_Used_on_the_Web.md
Last active September 28, 2022 00:08
Descriptive and Technical Study of Languages and Metadata Systems Used on the Web

Descriptive and Technical Study of Languages and Metadata Systems Used on the Web

Cristian Vasquez, 2002

Introduction

These days most of the web content is designed by humans to be read by themselves, forming a chaotic library from which knowledge is difficult and expensive to extract.

Distinct communities promote the use of the "Semantic Web," which adds representation to the Web, to be machine-processable. The idea is to establish channels for feasible processing, integration, and reuse of Information, betting as the extraction of knowledge of better utility to humans. The semantic Web would only be an extension of the existing Web, where the Information acquires meaning through the use of Metadata, which provides semantics to its content and enables automatic reasoning about the Information.

// https://www.npmjs.com/package/@rdfjs-elements/formats-pretty
import prefixes from '@zazuko/rdf-vocabularies/prefixes'
import { turtle } from '@rdfjs-elements/formats-pretty/serializers'
import rdf from '@rdfjs/data-model'
import { Readable } from 'readable-stream'
import getStream from 'get-stream'
// Example data
const data = [
rdf.quad(rdf.namedNode('http://ex.org/s1'), rdf.namedNode('http://schema.org/name'), rdf.literal('Alice')),
// https://www.npmjs.com/package/@rdfjs-elements/formats-pretty
import prefixes from '@zazuko/rdf-vocabularies/prefixes'
import { turtle } from '@rdfjs-elements/formats-pretty/serializers'
import rdf from 'rdf-ext'
import { Readable } from 'readable-stream'
import getStream from 'get-stream'
// Setting up the prettifier
const { schema } = prefixes
const prettifier = await turtle({
@cristianvasquez
cristianvasquez / notes.11tydata.js
Created November 15, 2021 05:39
Process notes in the garden
// This regex finds all wikilinks in a string
const wikilinkRegExp = /\[\[\s?([^\[\]\|\n\r]+)(\|[^\[\]\|\n\r]+)?\s?\]\]/g;
function caselessCompare(a, b) {
return a.toLowerCase() === b.toLowerCase();
}
var SMALL_WORDS =
/\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i;
var TOKENS = /[^\s:–—-]+|./g;
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix schema: <http://schema.org/> .
schema:Person a rdfs:Class, sh:NodeShape ;
sh:property [
sh:maxCount 1 ;
sh:minCount 1 ;
@cristianvasquez
cristianvasquez / file_explorer.css
Created May 26, 2021 07:21
Pretty file explorer in obsidian
/* condense line spacing on file explorer title list. also avoids character-level word breaks */
.nav-file-title-content,
.search-result-file-title,
.search-result-file-match {
padding-top: 0 !important;
padding-bottom: 0 !important;
line-height: normal !important;
word-break: keep-all;
}
@cristianvasquez
cristianvasquez / main.py
Created April 28, 2021 10:04
Opl hello world example
from flask import Flask, request
from flask_cors import CORS
####################################################################################
# config
####################################################################################
PORT = 5000
HOST = '127.0.0.1'
app = Flask(__name__)
@cristianvasquez
cristianvasquez / descripcion-datos-proceso-constituyente-abierto-a-la-ciudadan-a-2016.ipynb
Created October 2, 2020 13:57
Descripcion datos proceso Constituyente Abierto a la Ciudadanía (2016).ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import collections
from runner.koan import *
# Greed is a dice game where you roll up to five dice to accumulate
# points. The following "score" function will be used calculate the
# score of a single roll of the dice.