Monday, January 09, 2006

posted by skynare at 10:06 PM

"LIPL : Little Idiotic Programming Language" has 0 comments


<expr> ::= <state> <operator> <state> { <operator> <state> }
<state> ::= '(' <name> ')'
<name> ::= <character> { <character> }
<character> ::= ANY CHARACTER. UNICODE WHATEVER
<operator> ::= =[<weight>]=> | <=[<weight>]=
<weight> ::= '(' (<func-call> | <name>) ')'


=========================
Example of <expr>
(f( => A)<=())=>(B)=>(B)<=(()() ())=>(C)

Meaning:
"f( => A" => ")"
")" => "B"
"B" => "B"
"()() ()" => "B"
"()() ()" => "C"

Step by step parsing (Always from left to right):
(f( => A)<=())
open paren detected. find closing paren.
closing paren detected. see if there is an operator.
operator detected. previous token is <state> : f( => A.

Saturday, January 07, 2006

posted by skynare at 3:52 PM

"ANN" has 0 comments

artificial neural networks are hot.

Yi =(Wij)=> Yj

Xj ::= Weight input at j = sum( Yi*Wij )
Yj ::= Activity Level at j =1/(1 + e^(-Xj))

Yj = 1 + e^sum( Yi*Wij )

E ::= Error = sum( (Yj - Dj)^2 )/2
Dj ::= Desired Activity Level for j
E = sum( (1/(1+e^(-sum(Yi*Wij))) - Dj)^2 )/2
Note that Yj is recursively evaluated from the input layer to the output layer.

EAj ::= Rate of Error change according to Activity change = dE/dYj = Yj - Dj ::= Activity - Desired Activity.

EIj ::= Rate of Error change according to total Input change = dE/dXj = dE/dYj * dYj/dXj = EAj * dYj/dXj = EAj*Yj(1-Yj).
dYj/dXj = Yj(1-Yj) since Yj is sigmoid function 1/(1+e^-Xj)

EWij ::= Rate of Error change according to Weight change = dE/dW = dE/dXj * dXj/dWij = EIj * dXj/dWij = EIj * Yi
I don't know why dXj/dWij = Yi

EAi ::= Rate of Error change according to Activity level change in previous layer = dE/dYi =

ok i thought it's a simple derivitave..but it's partial derivative..no d..ok i'm stuck here

Friday, January 06, 2006

posted by skynare at 10:19 PM

"Queens College Report" has 0 comments

I needed an unofficial transcript from my college ( Queens College - CUNY ).
So, I went to the registrar's office to get a copy.
But they only provided printed copy of transcript.
I mean, no file? Come on!
Anyways, I needed a transcript with course numbers and course titles.
But webregs.qc.edu (the site where students can look up their grades and stuff) was written in stupid ASP and probably running on Windows 95. And it doesn't give me course titles.
I mean, come on! Why? Why? Why?

So, I wrote a script to insert course titles based on course codes.
Two files are needed as an input:
#1. a list of course codes i took.
#2. a list of course code => course title hash table.

I can get #1. from webregs.qc.edu by copy and pasting my record.
I got #2 from other site that has course schedules. (you can view source on the site and find javascript array).

So, here's the script:

#!/bin/bash
transcript=$1
courselisting=$2

if [[ -z $transcript || -z $courselisting ]]
then
echo "usage : $0 transcript.txt courselisting.txt"
exit 1
fi

courses="grep \"[[:upper:]]\{3,\}[[:space:]]\{1,\}[[:digit:]]\{3,3\}\" ${transcript}"
tempfile="${transcript}.temp.txt"
eval $courses > $tempfile

while read department number credits grade
do
echo $department $number
grep "${department}[[:space:]]\{1,\}${number}" ${courselisting} |sed 's/^\".. //'
echo "grade: ${grade}"
echo "------------------"
done < "$tempfile"

rm $tempfile

Friday, December 30, 2005

posted by skynare at 2:43 PM

"Text to Phonemes" has 0 comments

[past]a[future]
pronounciation of 'a' is determined (i hope) by [past] and [future].

In turing machines, current symbol modifies [past] buffer and according to the buffer, state is changed...So, i think text to phoneme is a possible problem.

[vowel chart]
i u
I U
e ^ >
ae a

[examples]
apple

a => a
ap => ap
app => aep
appl => aepl
apple => aepl
apple => aep^l (it's hard to write liquid l. or consonant-vowel..i forgot the term).

application

a => a
ap => ap
app => aep
appl => aepl
appli => aepli
applic => aeplIk
applica => aeplIka
applicat => aeplIkIt
applicati => ^plIkaetI
applicatio => ^plIkeISou
application => ^plIkeIS^n
applicaiton => aeplIkeIS^n
(sometimes application has stress on the first syllable. sometimes on the third. So, determination of the stress pattern is realted to [past] and [future]. For example, "The application /aeplIkeIS^n/ won the best software award." or "Application /^plIkeIS^n/ of the lemma shines a light on the problem".

Thursday, December 29, 2005

posted by skynare at 11:05 PM

"I hate GUI!" has 0 comments

Here is what happened:
I got a message from the professor said that my report on the server (WindowsXP hoa) is missing.
How can a file be missing? It's all because of GUI designers' wicked evil plan to make us suffer.
I copy and pasted a previous report to fork it to be a current report.
cp ./prev.report ../new_project/curr.report
That's what I would do normally. But since Windows has GUI and stuff, I did:
right click prev.report -> click Copy -> open new_project folder -> right click -> click paste.
So I forked the previous report and finished the current report.
Then after the Christmas and Hanukkah and other holidays, I get a message from the prof saying that my previous report is missing...
So, I remotedesktopped to the server and right clicked a file in Explorer...oh oh oh

OH MY GOOOOOOOD MOSES' GREAT GRAND PARENTS' GREAT CAT!!!!!
The right click menu was like:
+---------+
|Copy |
|Cut |
+---------+
Why on earth do they put Copy and Cut close together??
People like me who don't play Half life 2 so our mouse skils suck will possibly click 1 pixel below Copy and initiate Cutting process, which envolves i don't know my cereal!!!!!

So, they should make it like this:
+---------+
|

Copy

|
|Cut |
+---------+
And when the mouse goes over Cut, it should change the background to red telling users it's a D A N G E R O U S operation. Or, they should send content of the cutted file or stuff to their Customer Report or something..you know the thing pops up when WindowsXP can't handle your hawtness...
So, I demand GUI designers to bear in mind that we dumb users need Audio/Visual input when we have slight chance of messing up our reports stored on Windows server!

"GUI Macro" has 0 comments

This is how it works..

Available events:
Keyboard input.
Mouse click (left/middle/right).
Mouse button release (left/middle/right)
Mouse wheel.
Mouse coordinate.
Maybe more...

So, my desktop environment (GuiGui) will capture all those events and record them in a file (xml or s-expression).
The file might look like this:

<code>
<gui-macro>
<date>
<day-of-week>Thursday</day-of-week>
<month>December</month><day>29</day>
<hh>08</hh><mm>56</mm><ss>25</ss>
<timezone>EST</timezone>
<year>2005</year>
</date>
<event-sequence>
<item class="LMB-on">
<coordinate><x>352</x><y>35</y></coordinate>
</item>
<item class="LMB-off">
<coordinate><x>124</x><y>436</y></coordinate>
</item>
<item class="RMB-on">
<coordinate><x>23</x><y>352</y></coordinate>
<item>
<item class="RMB-off">
<coordinate><x>23</x><y>352</y></coordinate>
<item>
<item class="LMB-on">
<coordinate><x>32</x><y>367</y></coordinate>
</item>
<item class="LMB-off">
<coordinate><x>32</x><y>367</y></coordinate>
</item>
<item class="LMB-on">
<coordinate><x>100</x><y>111</y></coordinate>
</item>
<item class="LMB-off">
<coordinate><x>100</x><y>111</y></coordinate>
</item>
<item class="Keyboard-in">
<string>mike\trowe\t1st Ave.\tNew York\tnnnnnnnnnnnn\t10001\r</string>
</item>
</event-sequence>
</gui-macro>
</code>

Above drags a window (supposedly) from 352,35 to 124,436.
Then it right clicks on 23,352 and clicks a button from the right click menu (supposedly).
Then it places caret on 100,111 where there can be a web form for registration.
And it fills out the form.

Maybe I can do better than that if X11 gives me the name of application being clicked, dragged..etc.
And each text field of an application (including web applications) should have some sort of id.
Web applications are usually marked up very well.
So, it might be possible to record where the left mouse click was.
For example, Firefox::http://www.website.com/registration.php::name can be the were I clicked before the keyboard input sequence.
For normal applications, I'm not sure if X11 gives name of the application being clicked.
And in the application, text fields might not have unique id...

Wednesday, December 28, 2005

posted by skynare at 5:39 AM

"google job" has 1 comments

I want to work for google because it might make me look cooler.
but in case i can't work for google, it's ok because i'll cry hard.