Commit 5c068153 authored by josd's avatar josd

refresh

parent c1c982ad
# EYE LInked Data
A collection of programs welding linked data.
# EYE Imagining
A collection of programs imagining linked data.
......@@ -2,6 +2,6 @@ from sympy import *
if __name__ == "__main__":
x = Symbol('x')
print('PREFIX : <http://josd.github.io/eye/eyelid#>')
print('PREFIX : <http://josd.github.io/eye/imagining#>')
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/eyelid#>
PREFIX : <http://josd.github.io/eye/imagining#>
"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/eyelid#>')
print('PREFIX : <http://josd.github.io/eye/imagining#>')
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/eyelid#>
PREFIX : <http://josd.github.io/eye/imagining#>
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/eyelid#>')
print('PREFIX : <http://josd.github.io/eye/imagining#>')
print('')
print('"E**(I*pi) + 1" :euler-identity %d .' % (E**(I*pi) + 1))
PREFIX : <http://josd.github.io/eye/eyelid#>
PREFIX : <http://josd.github.io/eye/imagining#>
"E**(I*pi) + 1" :euler-identity 0 .
......@@ -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/eyelid#>')
print('PREFIX : <http://josd.github.io/eye/imagining#>')
print('')
print('0 :fib %d .' % (fib(0)))
print('91 :fib %d .' % (fib(91)))
......
PREFIX : <http://josd.github.io/eye/eyelid#>
PREFIX : <http://josd.github.io/eye/imagining#>
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/eyelid#>')
print('PREFIX : <http://josd.github.io/eye/imagining#>')
print('')
print('"grover(7_bits, alternating_bits_oracle)" :grover %s.' % (n3_lst))
PREFIX : <http://josd.github.io/eye/eyelid#>
PREFIX : <http://josd.github.io/eye/imagining#>
"grover(7_bits, alternating_bits_oracle)" :grover (1 0 1 0 1 0 1).
#!/bin/bash
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
function imagining {
echo "# $(date)" > imagining.diff
pushd bell; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../imagining.diff; popd
pushd easter; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../imagining.diff; popd
pushd euler; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../imagining.diff; popd
pushd fib; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../imagining.diff; popd
pushd grover; ./test.sh "$@"; git diff -U0 . | grep -E -v '^diff|^index|^Binary|^--|^\+-|\+\+|^@@' >> ../imagining.diff; popd
}
pushd ~/github.com/josd/eye/eyelid
eyelid "$@"
pushd ~/github.com/josd/eye/imagining
imagining "$@"
popd
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