summaryrefslogtreecommitdiff
path: root/wolfram
diff options
context:
space:
mode:
Diffstat (limited to 'wolfram')
-rw-r--r--wolfram/api-perl6.sh6
-rw-r--r--wolfram/api.sync-conflict-20150502-090303.sh7
-rw-r--r--wolfram/api.sync-conflict-20150615-220742.sh7
-rw-r--r--wolfram/example-result.xml64
-rw-r--r--wolfram/example2-result.xml64
-rw-r--r--wolfram/lat40
-rw-r--r--wolfram/lat.py26
-rw-r--r--wolfram/wolfram-old.sh16
8 files changed, 0 insertions, 230 deletions
diff --git a/wolfram/api-perl6.sh b/wolfram/api-perl6.sh
deleted file mode 100644
index 8990cf1..0000000
--- a/wolfram/api-perl6.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-# id: U6E8UV-AP3QJAT6RK
-DIR="$HOME/Dropbox/speech"
-toread=$(curl "http://api.wolframalpha.com/v2/query?input=$1&appid=U6E8UV-AP3QJAT6RK" | perl6 -e 'my $crap=slurp;my $out = $crap ~~ ms/"200" .*? "<plaintext>" <( .*? )> "</plaintext>"/;$out ~~ s/\(.*\)//;print "$out"')
-$DIR/tts.sh "$toread"
-
diff --git a/wolfram/api.sync-conflict-20150502-090303.sh b/wolfram/api.sync-conflict-20150502-090303.sh
deleted file mode 100644
index 2ac45b2..0000000
--- a/wolfram/api.sync-conflict-20150502-090303.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-# id: U6E8UV-AP3QJAT6RK
-DIR="$HOME/Dropbox/speech"
-toread=$(curl "http://api.wolframalpha.com/v2/query?input=$1&appid=U6E8UV-AP3QJAT6RK&format=plaintext&podindex=2" | gsed ':a;N;$!ba;s/\n/ /g' |perl -pe '($_)=m{<plaintext>(.*?)</plaintext>} or print "No data found";s/\(.*\)//g')
-$DIR/tts.sh "$toread"
-echo $toread;
-
diff --git a/wolfram/api.sync-conflict-20150615-220742.sh b/wolfram/api.sync-conflict-20150615-220742.sh
deleted file mode 100644
index 2ac45b2..0000000
--- a/wolfram/api.sync-conflict-20150615-220742.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-# id: U6E8UV-AP3QJAT6RK
-DIR="$HOME/Dropbox/speech"
-toread=$(curl "http://api.wolframalpha.com/v2/query?input=$1&appid=U6E8UV-AP3QJAT6RK&format=plaintext&podindex=2" | gsed ':a;N;$!ba;s/\n/ /g' |perl -pe '($_)=m{<plaintext>(.*?)</plaintext>} or print "No data found";s/\(.*\)//g')
-$DIR/tts.sh "$toread"
-echo $toread;
-
diff --git a/wolfram/example-result.xml b/wolfram/example-result.xml
deleted file mode 100644
index 6dc1570..0000000
--- a/wolfram/example-result.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<queryresult success='true'
- error='false'
- numpods='2'
- datatypes=''
- timedout=''
- timedoutpods=''
- timing='0.664'
- parsetiming='0.299'
- parsetimedout='false'
- recalculate=''
- id='MSPa2661b53440gdhceah8200002e67fb9ae0777967'
- host='http://www2.wolframalpha.com'
- server='18'
- related='http://www2.wolframalpha.com/api/v2/relatedQueries.jsp?id=MSPa2671b53440gdhceah82000060b56f323e8bg19i&amp;s=18'
- version='2.6'>
- <pod title='Input interpretation'
- scanner='Identity'
- id='Input'
- position='100'
- error='false'
- numsubpods='1'>
- <subpod title=''>
- <plaintext>Answer to the Ultimate Question of Life, the Universe, and Everything</plaintext>
- <img src='http://www2.wolframalpha.com/Calculate/MSP/MSP2681b53440gdhceah82000067ib32g29di4d9g8?MSPStoreType=image/gif&amp;s=18'
- alt='Answer to the Ultimate Question of Life, the Universe, and Everything'
- title='Answer to the Ultimate Question of Life, the Universe, and Everything'
- width='455'
- height='18' />
- </subpod>
- </pod>
- <pod title='Result'
- scanner='Data'
- id='Result'
- position='200'
- error='false'
- numsubpods='1'
- primary='true'>
- <subpod title=''>
- <plaintext>42
-(according to Douglas Adams&apos; humorous science-fiction novel The Hitchhiker&apos;s Guide to the Galaxy)</plaintext>
- <img src='http://www2.wolframalpha.com/Calculate/MSP/MSP2691b53440gdhceah82000019d6099492d028ff?MSPStoreType=image/gif&amp;s=18'
- alt='42
-(according to Douglas Adams&apos; humorous science-fiction novel The Hitchhiker&apos;s Guide to the Galaxy)'
- title='42
-(according to Douglas Adams&apos; humorous science-fiction novel The Hitchhiker&apos;s Guide to the Galaxy)'
- width='486'
- height='47' />
- </subpod>
- </pod>
- <assumptions count='1'>
- <assumption type='SubCategory'
- word='the answer to life'
- template='Assuming ${desc1}. Use ${desc2} instead'
- count='2'>
- <value name='AnswerToLifeUniverseEverything'
- desc='The Ultimate Answer'
- input='*DPClash.MiscellaneousE.the+answer+to+life-_*AnswerToLifeUniverseEverything-' />
- <value name='MontyPythonsMeaningOfLife'
- desc='Monty Python&apos;s Meaning of Life'
- input='*DPClash.MiscellaneousE.the+answer+to+life-_*MontyPythonsMeaningOfLife-' />
- </assumption>
- </assumptions>
-</queryresult> \ No newline at end of file
diff --git a/wolfram/example2-result.xml b/wolfram/example2-result.xml
deleted file mode 100644
index 6aae1cc..0000000
--- a/wolfram/example2-result.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<queryresult success='true'
- error='false'
- numpods='2'
- datatypes=''
- timedout=''
- timedoutpods=''
- timing='0.664'
- parsetiming='0.299'
- parsetimedout='false'
- recalculate=''
- id='MSPa2661b53440gdhceah8200002e67fb9ae0777967'
- host='http://www2.wolframalpha.com'
- server='18'
- related='http://www2.wolframalpha.com/api/v2/relatedQueries.jsp?id=MSPa2671b53440gdhceah82000060b56f323e8bg19i&amp;s=18'
- version='2.6'>
- <pod title='Input interpretation'
- scanner='Identity'
- id='Input'
- position='100'
- error='false'
- numsubpods='1'>
- <subpod title=''>
- <plaintext>Answer to the Ultimate Question of Life, the Universe, and Everything
- <img src='http://www2.wolframalpha.com/Calculate/MSP/MSP2681b53440gdhceah82000067ib32g29di4d9g8?MSPStoreType=image/gif&amp;s=18'
- alt='Answer to the Ultimate Question of Life, the Universe, and Everything'
- title='Answer to the Ultimate Question of Life, the Universe, and Everything'
- width='455'
- height='18' />
- </subpod>
- </pod>
- <pod title='Result'
- scanner='Data'
- id='Result'
- position='200'
- error='false'
- numsubpods='1'
- primary='true'>
- <subpod title=''>
- <plaintext>42
-(according to Douglas Adams&apos; humorous science-fiction novel The Hitchhiker&apos;s Guide to the Galaxy)</plaintext>
- <img src='http://www2.wolframalpha.com/Calculate/MSP/MSP2691b53440gdhceah82000019d6099492d028ff?MSPStoreType=image/gif&amp;s=18'
- alt='42
-(according to Douglas Adams&apos; humorous science-fiction novel The Hitchhiker&apos;s Guide to the Galaxy)'
- title='42
-(according to Douglas Adams&apos; humorous science-fiction novel The Hitchhiker&apos;s Guide to the Galaxy)'
- width='486'
- height='47' />
- </subpod>
- </pod>
- <assumptions count='1'>
- <assumption type='SubCategory'
- word='the answer to life'
- template='Assuming ${desc1}. Use ${desc2} instead'
- count='2'>
- <value name='AnswerToLifeUniverseEverything'
- desc='The Ultimate Answer'
- input='*DPClash.MiscellaneousE.the+answer+to+life-_*AnswerToLifeUniverseEverything-' />
- <value name='MontyPythonsMeaningOfLife'
- desc='Monty Python&apos;s Meaning of Life'
- input='*DPClash.MiscellaneousE.the+answer+to+life-_*MontyPythonsMeaningOfLife-' />
- </assumption>
- </assumptions>
-</queryresult>
diff --git a/wolfram/lat b/wolfram/lat
deleted file mode 100644
index 8d3cdf0..0000000
--- a/wolfram/lat
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<queryresult success='true'
- error='false'
- numpods='1'
- datatypes=''
- timedout='Integral,Series,Plot,Plotter,Simplification,Sequence,Sum'
- timedoutpods=''
- timing='4.551'
- parsetiming='0.832'
- parsetimedout='false'
- recalculate='http://www3.wolframalpha.com/api/v2/recalc.jsp?id=MSPa54207hied0e9cb85c30000613102i371h49b63&amp;s=16'
- id='MSPa55207hied0e9cb85c300004c5338diei1i0bg0'
- host='http://www3.wolframalpha.com'
- server='16'
- related='http://www3.wolframalpha.com/api/v2/relatedQueries.jsp?id=MSPa56207hied0e9cb85c300004a3i69g2d3i729f9&amp;s=16'
- version='2.6'>
- <pod title='Alternate form of the integral'
- scanner='Integral'
- id='AlternateForm'
- position='200'
- error='false'
- numsubpods='1'>
- <subpod title=''>
- <plaintext>1/24 (3 r (sqrt(3) r-2 x) sqrt(-3 r^2+4 r (sqrt(3) x+1)-4 x^2)-4 (3 r^2 (x-tan^(-1)((sqrt(3) r-2 x)/sqrt(-3 r^2+4 sqrt(3) r x+4 r-4 x^2)))-3 r (sqrt(3) x+2) x+2 x^3))+constant</plaintext>
- </subpod>
- </pod>
- <assumptions count='1'>
- <assumption type='Clash'
- word='integral'
- template='Assuming &quot;${word}&quot; is ${desc1}. Use as ${desc2} instead'
- count='2'>
- <value name='IntegralsWord'
- desc='an integral'
- input='*C.integral-_*IntegralsWord-' />
- <value name='MathematicalFunctionIdentityPropertyClass'
- desc='a function property'
- input='*C.integral-_*MathematicalFunctionIdentityPropertyClass-' />
- </assumption>
- </assumptions>
-</queryresult> \ No newline at end of file
diff --git a/wolfram/lat.py b/wolfram/lat.py
deleted file mode 100644
index 92f31d1..0000000
--- a/wolfram/lat.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import requests
-from urllib import quote_plus
-import xml.etree.ElementTree as ET
-
-appid = 'U6E8UV-AP3QJAT6RK'
-
-def get_plaintext_query(latex):
- r = requests.get('http://api.wolframalpha.com/v2/query?input=%s&appid=%s' % (quote_plus(latex), appid))
- root = ET.fromstring(r.text.encode('utf8'))
-
- for pod in root:
- if pod.attrib.get('title', '') in ['Decimal approximation', 'Definite integral']:
- subpod = pod.find('subpod')
- result = subpod.find('plaintext').text
-
- if pod.attrib.get('title', '') == 'Definite integral':
- return result.split('~~')[1]
- else:
- return result
-
-if __name__ == '__main__':
- from sys import stdin
- print get_plaintext_query(stdin.read())
diff --git a/wolfram/wolfram-old.sh b/wolfram/wolfram-old.sh
deleted file mode 100644
index c5fd338..0000000
--- a/wolfram/wolfram-old.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-DIR="$HOME/Dropbox/speech/wolfram"
-DIRA="$HOME/Dropbox/speech"
-curl "`curl \"$1\" |gsed ':a;N;$!ba;s/\n/ /g'|perl -lpe 's/^.*Result<//' |perl -lpe 's/^.*?src="//' |perl -lpe 's/&amp.*$//'`" > /tmp/jarresult.gif
-echo $?
-if [[ $? -ne 0 ]] ; then
- exit 1
-fi
-convert /tmp/jarresult.gif /tmp/jarresult.tiff
-
-if [[ $? -ne 0 ]] ; then
- exit 1
-fi
-
-if tesseract -l eng /tmp/jarresult.tiff /tmp/jarout; then
-$DIRA/tts.sh `cat /tmp/jarout.txt`
-fi