autopy - simple, cross-platform GUI automation toolkit. MIT - https://github.com/msanders/autopy/
- 432 stars, 102 forks, 2950 monthly downloads at 2015-05-13
- GUI toolkit agnostic
| class NorvigSpellChecker(corpus: String, alphabet: Seq[Char] = 'a' to 'z', level: Int = 2) { | |
| val words = s"[${alphabet.head}-${alphabet.last}]+".r.findAllIn(corpus.toLowerCase).toSeq | |
| val count = words.groupBy(_.toSeq).mapValues(_.size) withDefaultValue 0 | |
| def edit(n: Int)(word: Seq[Char]): Set[Seq[Char]] = n match { | |
| case 0 => Set(word) | |
| case 1 => | |
| val splits = word.indices map word.splitAt | |
| val deletes = splits collect {case (a, b0 +: b1) => a ++ b1} |
autopy - simple, cross-platform GUI automation toolkit. MIT - https://github.com/msanders/autopy/
| package com.twitter.univ.calculator | |
| object Operator { | |
| val all: Map[String, (Int, Int) => Int] = | |
| Map("+" -> (_ + _), | |
| "-" -> (_ - _), | |
| "*" -> (_ * _), | |
| "/" -> (_ / _)) | |
| def unapply(str: String) = all.get(str) | |
| } |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| #! /usr/bin/python | |
| # | |
| # Church numerals in Python. | |
| # See http://en.wikipedia.org/wiki/Church_encoding | |
| # | |
| # Vivek Haldar <vh@vivekhaldar.com> | |
| # | |
| # https://gist.github.com/2438498 | |
| zero = lambda f: lambda x: x |