I hereby claim:
- I am rinze on github.
- I am rinzewind (https://keybase.io/rinzewind) on keybase.
- I have a public key whose fingerprint is C7F0 E413 1FFF 47C6 A2A7 F76B F4FE 866D 2948 FA19
To claim this, I am signing this object:
| package jclustering; | |
| import ij.ImagePlus; | |
| /** | |
| * This class extends {@link ImagePlus} in order to add a handy {@link #getTac} | |
| * method that allows to easily grab time-activity curves. | |
| * | |
| * @author <a href="mailto:jmmateos@mce.hggm.es">José María Mateos</a>. | |
| * |
| station | Leq | L1 | L10 | L50 | L90 | L99 | date | ||
|---|---|---|---|---|---|---|---|---|---|
| 14 | GLORIETA FDEZ. LADREDA | 67.3 | 75.3 | 69.8 | 64.3 | 56.7 | 50 | 1998-09-30 | |
| 16 | ARTURO SORIA | 59.5 | 67.8 | 61.6 | 56 | 45.3 | 39.1 | 1998-09-30 | |
| 19 | ALTO DE EXTREMADURA | 63 | 72.4 | 66.3 | 59.3 | 51.4 | 47 | 1998-09-30 | |
| 27 | GLORIETA CARLOS V | 74.3 | 84.4 | 79.5 | 67.8 | 62 | 55.5 | 1998-10-31 | |
| 29 | PLAZA DE ESPAÑA | 66.3 | 74 | 68.8 | 64.5 | 59.6 | 54.8 | 1998-10-31 | |
| 31 | PLAZA DOCTOR MARAÑÓN | 72.5 | 80.2 | 75.6 | 70.2 | 63.1 | 55.2 | 1998-10-31 | |
| 32 | PLAZA M. DE SALAMANCA | 73.1 | 88.4 | 69.9 | 63.6 | 51.8 | 42.1 | 1998-10-31 | |
| 36 | RAMÓN Y CAJAL | 70.3 | 77.2 | 72.9 | 68.8 | 56.8 | 46.3 | 1998-10-31 | |
| 39 | GLORIETA FDEZ. LADREDA | 68 | 75.8 | 70.2 | 64.6 | 56.8 | 49.8 | 1998-10-31 |
| # Eustat data analysis | |
| library(ggplot2) | |
| eustat <- read.csv(file = "/tmp/ilc_di01_1_Data.csv", na.string = ":") | |
| eustat$Value <- gsub(" ", "", eustat$Value) | |
| eustat$Value <- as.numeric(eustat$Value) | |
| spain <- eustat[eustat$GEO == "Spain" & | |
| eustat$CURRENCY == "Purchasing Power Standard" & | |
| eustat$INDIC_IL == "Top cut-off point", |
| open("C:\\temp\\barcenas.tif"); | |
| run("32-bit"); | |
| run("Mean...", "radius=30"); | |
| open("C:\\temp\\mariano.tif"); | |
| run("32-bit"); | |
| run("Duplicate...", "title=mariano-1.tif"); | |
| run("Mean...", "radius=20"); | |
| imageCalculator("Subtract create 32-bit", "mariano.tif","mariano-1.tif"); | |
| imageCalculator("Add create 32-bit", "Result of mariano.tif","barcenas.tif"); | |
| selectWindow("barcenas.tif"); |
| # Timing measurement in R. Vectorized operation on matrix / data.frame | |
| # Author: José María Mateos - jmmateos@ieee.org | |
| # | |
| # For certain vectorized operations, it makes sense to convert your data.frame | |
| # into a matrix. Even if you are using apply, the data frame iteration can be | |
| # real slow. | |
| # | |
| # In this example, I will compute the Euclidean distance for a random vector | |
| # and a random matrix / data.frame of thousands of elements. Operations will be | |
| # done in two different ways: using the apply function over the columns and |
| localpath <- "/home/chema/tmp/kaggle/digits/" | |
| if (Sys.info()["sysname"] == "Windows") | |
| localpath <- "C:/temp/kaggle/digits" | |
| testFile <- file.path(localpath, "test.Rda") | |
| trainFile <- file.path(localpath, "train.Rda") | |
| if(!file.exists(testFile) && !file.exists(trainFile)) { | |
| testCSV <- file.path(localpath, "test.csv") | |
| trainCSV <- file.path(localpath, "train.csv") |
I hereby claim:
To claim this, I am signing this object:
| ### Keybase proof | |
| I hereby claim: | |
| * I am rinze on github. | |
| * I am rinzewind (https://keybase.io/rinzewind) on keybase. | |
| * I have a public key whose fingerprint is 67AF C4B2 E15C 4F4C 67BD 5F58 5ADF 9021 2630 80EC | |
| To claim this, I am signing this object: |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import csv | |
| import codecs | |
| import cStringIO | |
| import os | |
| from collections import namedtuple | |
| def getParties(parties_file): |
| library(C50) | |
| # Test data | |
| group <- c(rep('groupA', 10), rep('groupB', 10)) | |
| data <- data.frame(group = group, var = c(rep(0, 10), rep(0, 10))) | |
| # Leave-one-out | |
| probs <- lapply(1:nrow(data), function(i) { | |
| train <- data[-i, ] | |
| test <- data[i, ] |