This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Punto fijo, que avisa si la sucesion de numeros dada la ecuacion de recurrencia G(x) no es una contraccion, i.e. si | G'(x) | >= 1. Hay que mandarle la derivada de G(x), i.e. G_ en el parametro | |
| def PuntoFijoAPruebaDeMuladas(G,G_,x0,e): | |
| if abs(G_(x0)) >= 1: | |
| print "Esta funcion G(x) esta tricky, la derivada evaluada en x=",x, " es mayor que 1, por lo que se podria salir de la recta f(x)=x y no converger" | |
| else: | |
| print "x_i: " , x0, " G(x_i): ", G(x0) | |
| x0 = G(x0) | |
| return x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import XMonad | |
| import Data.Monoid | |
| import System.Exit | |
| import XMonad.Config.Gnome | |
| import XMonad.Util.Replace | |
| import XMonad.Actions.Search | |
| import qualified XMonad.Actions.Submap as SM | |
| import qualified XMonad.StackSet as W |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- tests if an image is valid and, if it is, returns the resolution of the picture as a pair of the x-resolution and the y-resolution. An image is valid if all its pixels are valid and if all the rows have equally many columns. | |
| ANTES | |
| ----------------------------- | |
| validImage rows@(firstRow:nextRow:rrs) = | |
| if (isValidRow firstRow && length firstRow == length nextRow && (isJust $ validImage (nextRow:rrs))) then | |
| Just (length firstRow, length rows) | |
| else | |
| Nothing | |
| validImage rows@(r:rs) = if isValidRow r && (isJust $ validImage rs) then Just (length r, length rows) else Nothing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- tests if an image is valid and, if it is, returns the resolution of the picture as a pair of the x-resolution and the y-resolution. An image is valid if all its pixels are valid and if all the rows have equally many columns. | |
| ANTES | |
| ----------------------------- | |
| validImage rows@(firstRow:nextRow:rrs) = | |
| if (isValidRow firstRow && length firstRow == length nextRow && (isJust $ validImage (nextRow:rrs))) then | |
| Just (length firstRow, length rows) | |
| else | |
| Nothing | |
| validImage rows@(r:rs) = if isValidRow r && (isJust $ validImage rs) then Just (length r, length rows) else Nothing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE KindSignatures #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| data Expr :: * -> * where | |
| Int :: Int -> Expr Int | |
| Bool :: Bool -> Expr Bool | |
| IsZero :: Expr Int -> Expr Bool | |
| -- Plus :: (* -> *) -> (* -> *) -> (* -> | |
| If :: Expr Bool -> Expr a -> Expr a -> Expr a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kmels@kmels-portable-stelle:~/code/trac-timeline-stats$ runhaskell Main.lhs "http://hackage.haskell.org/trac/ghc/timeline?changeset=on&ticket=on&milestone=on&wiki=on&blog=on&max=500&author=&daysback=120&format=rss" | |
| ## Debug output ## | |
| # Fetching feed.. | |
| # Fetched feed.. | |
| # Parsing.. | |
| # Calculating.. | |
| ######################### | |
| # REPORT | |
| # (to plot with gnuplot) | |
| # Number of Tickets fetched: 182 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kmels@kmels-stelle:~/code/trac-stats$ git config --list | |
| user.name=Carlos López-Camey | |
| user.email=c.lopez@kmels.net | |
| core.repositoryformatversion=0 | |
| core.filemode=true | |
| core.bare=false | |
| core.logallrefupdates=true | |
| remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* | |
| remote.origin.url=https://github.com/kmels/trac-stats | |
| branch.master.remote=origin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| maybeGetBy :: forall (m :: * -> *) val. (PersistEntity val, | |
| PersistUnique | |
| (PersistEntityBackend val) m) => | |
| Unique val (PersistEntityBackend val) | |
| -> MaybeT | |
| (PersistEntityBackend val m) (Database.Persist.Store.Entity val) | |
| maybeGetBy criterion = MaybeT $ getBy criterion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| canvas = document.getElementById("canvas"); | |
| field = document.getElementById("field"); | |
| robot = document.getElementById("robot"); | |
| goal = document.getElementById("goal"); | |
| ctx = canvas.getContext("2d"); | |
| mkImagePattern = (img) -> ctx.createPattern(img, 'repeat'); | |
| # fills canvas with a field pattern |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Keybase proof | |
| I hereby claim: | |
| * I am kmels on github. | |
| * I am kmels (https://keybase.io/kmels) on keybase. | |
| * I have a public key whose fingerprint is 290C EB97 2C38 9CCE 8352 A8B4 3A69 87CF 41D7 3145 | |
| To claim this, I am signing this object: |
OlderNewer