Skip to content

Instantly share code, notes, and snippets.

View syllogismos's full-sized avatar
🏠
Working from home

Anil Karaka syllogismos

🏠
Working from home
View GitHub Profile
-- When I have a helper function `errorTotal` seperately in a where clause as shown below I'm getting the following error.
gradientDescentSeperated ::
(Traversable f, Fractional a, Ord a)
=> (forall s. Reifies s Tape => f (Reverse s a) -> f (Scalar a) -> Reverse s a)
-> [f (Scalar a)]
-> f a
-> [f a]
gradientDescentSeperated errorFunction d = gradientDescent (\theta -> errorTotal theta d)
where
@syllogismos
syllogismos / Instructions
Created July 15, 2014 14:46
haskell environment on windows using sublime text
http://stackoverflow.com/questions/304614/haskell-on-windows-setup
This is what I have done in order to get Haskell set up on my Windows 7 x64
1. Install Haskell Platform
Download and install the Haskell Platform from http://www.haskell.org/platform/windows.html
2. Install Sublime Text 3
@syllogismos
syllogismos / build.gradle
Created July 13, 2014 11:13
working gradle build file for android studio, with android annotations
// change com.appname with your proper path and appname
// build wtth Ctlr + F9 on Android Studio to generate the java classes from android annotated files
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2+'
}
@syllogismos
syllogismos / genetic-programming-brief-explanation.txt
Last active August 29, 2015 14:00
Genetic programming brief explanation.
http://forums.aichallenge.org/viewtopic.php?f=17&t=1136
We represent every program internally as an object tree,
very much like a compiler internally represents a program
after parsing and before generating executable code.
A compiler manipulates these objects in order to optimize
the code, we do it in order to randomly change the
code (mutation) and to insert parts of one program
into another (crossover).
-- this is how Eq is defined in standard prelude
class Eq a where
(==) :: a -> a -> Bool
(/=) :: a -> a -> Bool
x == y = not (x /= y)
x /= y = not (x == y)
-- Anyway, we did implement the function bodies for the functions that Eq defines, only we defined them in terms of mutual recursion. We said that two instances of Eq are equal if they are not different and they are different if they are not equal. We didn't have to do this, really, but we did and we'll see how this helps us soon.