Commit 31b78946 authored by josd's avatar josd

refresh

parent 0d5dddf1
# EYE Linked Data
A collection of programs welding linked data.
......@@ -2,6 +2,6 @@ from sympy import *
if __name__ == "__main__":
x = Symbol('x')
print('PREFIX : <http://josd.github.io/eye/featuring#>')
print('PREFIX : <http://josd.github.io/eye/eyelid#>')
print('')
print('"integrate(exp(-x**2), (x, -oo, oo))" :integrate-bell "%s".' % (integrate(exp(-x**2), (x, -oo, oo))))
PREFIX : <http://josd.github.io/eye/featuring#>
PREFIX : <http://josd.github.io/eye/eyelid#>
"integrate(exp(-x**2), (x, -oo, oo))" :integrate-bell "sqrt(pi)".
......@@ -15,7 +15,7 @@ def easter(year):
if __name__ == "__main__":
print('PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>')
print('PREFIX : <http://josd.github.io/eye/featuring#>')
print('PREFIX : <http://josd.github.io/eye/eyelid#>')
print('')
print('2019 :easter "%s"^^xsd:date.' % (easter(2019)))
print('2020 :easter "%s"^^xsd:date.' % (easter(2020)))
......
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://josd.github.io/eye/featuring#>
PREFIX : <http://josd.github.io/eye/eyelid#>
2019 :easter "2019-04-21"^^xsd:date.
2020 :easter "2020-04-12"^^xsd:date.
......
from sympy import *
if __name__ == "__main__":
print('PREFIX : <http://josd.github.io/eye/featuring#>')
print('PREFIX : <http://josd.github.io/eye/eyelid#>')
print('')
print('"E**(I*pi) + 1" :euler-identity %d .' % (E**(I*pi) + 1))
PREFIX : <http://josd.github.io/eye/featuring#>
PREFIX : <http://josd.github.io/eye/eyelid#>
"E**(I*pi) + 1" :euler-identity 0 .
#!/bin/bash
function featuring {
echo "# $(date)" > featuring.diff
pushd bell; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../featuring.diff; popd
pushd easter; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../featuring.diff; popd
pushd euler; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../featuring.diff; popd
pushd fib; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../featuring.diff; popd
pushd grover; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../featuring.diff; popd
function eyelid {
echo "# $(date)" > eyelid.diff
pushd bell; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../eyelid.diff; popd
pushd easter; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../eyelid.diff; popd
pushd euler; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../eyelid.diff; popd
pushd fib; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../eyelid.diff; popd
pushd grover; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../eyelid.diff; popd
}
pushd ~/github.com/josd/eye/featuring
featuring "$@"
pushd ~/github.com/josd/eye/eyelid
eyelid "$@"
popd
......@@ -5,7 +5,7 @@ def fib(n, c={0:1, 1:1}):
return c[n]
if __name__ == "__main__":
print('PREFIX : <http://josd.github.io/eye/featuring#>')
print('PREFIX : <http://josd.github.io/eye/eyelid#>')
print('')
print('0 :fib %d .' % (fib(0)))
print('91 :fib %d .' % (fib(91)))
......
PREFIX : <http://josd.github.io/eye/featuring#>
PREFIX : <http://josd.github.io/eye/eyelid#>
0 :fib 1 .
91 :fib 7540113804746346429 .
......
......@@ -82,6 +82,6 @@ if __name__ == "__main__":
# run Grover search to find a 7-bit solution
lst = run_grover(eng, 7, alternating_bits_oracle)
n3_lst = '(' + ' '.join([str(i) for i in lst]) + ')'
print('PREFIX : <http://josd.github.io/eye/featuring#>')
print('PREFIX : <http://josd.github.io/eye/eyelid#>')
print('')
print('"grover(7_bits, alternating_bits_oracle)" :grover %s.' % (n3_lst))
PREFIX : <http://josd.github.io/eye/featuring#>
PREFIX : <http://josd.github.io/eye/eyelid#>
"grover(7_bits, alternating_bits_oracle)" :grover (1 0 1 0 1 0 1).
# EYE Featuring
A collection of programs featuring linked data.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment