This file contains 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
package tokenfsm | |
import scala.annotation.tailrec | |
import scala.collection.immutable.SortedSet | |
/** | |
* Created by retnuh on 04/07/2016. | |
*/ | |
object TokenFSM { |
This file contains 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
(ns bad | |
(:import (java.io StringReader)) | |
(:require [clojure.string :as string] | |
[net.cgrand.enlive-html :as enlive])) | |
(defn html-to-text | |
[html] | |
(let [text | |
(-> html | |
(StringReader.) |
This file contains 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
<!doctype html> <head> <title>dentists dublin - Google Search</title> <script>window.google={kEI:"sHsdTq30NILDhAfTyOTCBw",kEXPI:"17311,27731,28505,28936,30316,30869,31116,31215,31259,31303,31396,31405",kCSI:{e:"17311,27731,28505,28936,30316,30869,31116,31215,31259,31303,31396,31405",ei:"sHsdTq30NILDhAfTyOTCBw",expi:"17311,27731,28505,28936,30316,30869,31116,31215,31259,31303,31396,31405"},authuser:0,ml:function(){},pageState:"#",kHL:"en",time:function(){return(new Date).getTime()}, | |
log:function(c,d,b){var a=new Image,e=google,g=e.lc,f=e.li;a.onerror=(a.onload=(a.onabort=function(){delete g[f]}));g[f]=a;b=b||"/gen_204?atyp=i&ct="+c+"&cad="+d+"&zx="+google.time();a.src=b;e.li=f+1},lc:[],li:0,j:{en:0,l:function(){google.fl=true},e:function(){google.fl=true},b:location.hash&&location.hash!="#",bv:20,pm:"i", | |
pl:[],mc:0,sc:0.5,u:"a05e4fab"},Toolbelt:{}};(function(){var c=google.j;window.onpopstate=function(){c.psc=1};for(var d=0,b;b=["ad", | |
"bc","is","p","pa","ac","pc","pah","ph","sa","slp","spf","xx","zc","z |
This file contains 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
(ns euler.algo.uf | |
(:use clojure.algo.monads)) | |
(with-monad state-m | |
(defn get-or-add [key] | |
(fn [s] | |
(if-let [v (get s key)] | |
[v s] | |
[[key 1] (assoc s key [key 1])]))) |
This file contains 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
/* | |
* Copyright 2007-2009 Tyler Close under the terms of the MIT X license found | |
* at http://www.opensource.org/licenses/mit-license.html | |
* | |
* web_send.js version: 2009-06-06 | |
* | |
* This library doesn't actually pass the ADsafe verifier, but rather is | |
* designed to provide a controlled interface to the network, that can be | |
* loaded as an ADsafe library. Clients of this library have permission to send | |
* requests to the window target, and any target returned in a request |
This file contains 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
function [theta, J_history] = gradientDescentMulti(X, y, theta, alpha, num_iters) | |
%GRADIENTDESCENTMULTI Performs gradient descent to learn theta | |
% theta = GRADIENTDESCENTMULTI(x, y, theta, alpha, num_iters) updates theta by | |
% taking num_iters gradient steps with learning rate alpha | |
% Initialize some useful values | |
m = length(y); % number of training examples | |
n = size(X, 2); % number of features (+ 1) | |
J_history = zeros(num_iters, 1); |