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
select TagName, | |
avg(cast(ResponseTime as bigint)) as Average, | |
stdev(cast(ResponseTime as bigint)) as StandardDev | |
from | |
(SELECT | |
Questions.CreationDate, | |
Questions.Title, | |
Tags.TagName, | |
Answers.CreationDate as ResponseDate, | |
datediff(minute, Questions.CreationDate, |
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
''' | |
(c) 2011, 2012 Georgia Tech Research Corporation | |
This source code is released under the New BSD license. Please see | |
http://wiki.quantsoftware.org/index.php?title=QSTK_License | |
for license details. | |
Created on September, 12, 2011 | |
@author: Tucker Balch | |
@contact: tucker@cc.gatech.edu |
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 notify-blaster.models.validation.core) | |
(def ^{:dynamic true} *is-unique?* (fn [value] false)) | |
(def ^{:dynamic true} *default-messages* {:unique "Value %s is aready taken, please choose another one" | |
:required "Field is required" | |
:min-length "Field is shorter than required" | |
:max-length "Field is longer than required" | |
:range "Field value %s is not in range" | |
:email "Field must be a valid email address" | |
:matches "Fields do not match"}) |
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 notify-blaster.models.validation.user) | |
(def rules | |
{ :username {:validations | |
{:required true | |
:unique true | |
:max-length 50} | |
:messages | |
{:required "User name is required" | |
:unique "User name %s is already in use, please choose another one" |
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 dispatchers.call | |
(:require [clj-asterisk.manager :as manager] | |
[clj-asterisk.events :as events] | |
[dispatchers.model :as model]) | |
(:import java.util.UUID)) | |
;; Signal the end of the call to the waiting promise in order to | |
;; release the channel | |
(defmethod events/handle-event "Hangup" | |
[event context] |
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
> viviendas <- read.table("Viviendas.dat", header=T, sep="\t") | |
> head(viviendas) | |
DPTO LOC SECC SEGM VIVID VIVVO01 VIVVO03 VIVVO04 VIVDV01 VIVDV02 VIVDV03 VIVDV05 VIVDV06 VIVDV07 VIVHV01 VIVHV01_1 CATEVIV | |
1 1 20 1 1 1 9 3 2 0 0 0 0 0 0 0 0 0 | |
2 1 20 1 1 2 1 4 0 0 0 0 0 0 0 0 0 0 | |
3 1 20 1 1 3 3 1 0 1 1 1 1 1 1 1 1 1 | |
4 1 20 1 1 4 3 1 0 1 1 1 1 1 1 1 1 1 | |
5 1 20 1 1 5 3 1 0 1 1 1 1 1 1 1 1 1 | |
6 1 20 1 1 6 1 6 0 0 0 0 0 0 0 0 0 0 |
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
<?php | |
//Main script settings | |
$CALL_ERROR_MSG = "Sorry, but I could not connect your call. Please try again later"; | |
$ALT_CALLER_ID = ""; | |
if (substr($CALLER_ID, 0, 3)=="011") { | |
$CALLER_ID = "00" . substr($CALLER_ID, 3); | |
} | |
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
(defn analisis1 | |
[students approval-rate] | |
(let [total (count students) | |
expected-approvals (* total approval-rate)] | |
(loop [examined students iterations 0] | |
(let [remaining (- total (count examined))] | |
(if (< remaining expected-approvals) | |
(let [approved (* (count examined) 0.1)] | |
(recur (drop (int approved) examined) (inc iterations))) |
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
library(ggplot2) | |
library(reshape2) | |
results <- read.csv("/Users/guilespi/Downloads/practico 3 - datos - mutagenesis.csv") | |
results$NroGrupo <- paste(results$Grupo, ".", results$Subgrupo) | |
timedMeasures <- melt(results, id.vars = c("Grupo", "Subgrupo", "NroGrupo", "Hongo", "Distancia", "Potencia"), value.name="Colonias", variable.name="Tiempo") | |
ggplot(timedMeasures, aes(x = Tiempo, y = Colonias, colour = NroGrupo)) + geom_line(aes(group = NroGrupo)) | |
results$sobrevida <- (results$t5 / results$t0) * 100 | |
ggplot(data=results, aes(x=NroGrupo, y=sobrevida, fill=Potencia)) + |
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
(def conv-table (sorted-map 1 :I | |
4 :IV | |
5 :V | |
9 :IX | |
10 :X | |
40 :XL | |
50 :L | |
90 :XC | |
100 :C | |
400 :CD |