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 ( | |
"context" | |
"encoding/json" | |
mux "github.com/gorilla/mux" | |
"github.com/spotahome/kooper/v2/log" | |
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
"k8s.io/client-go/kubernetes" | |
"k8s.io/client-go/rest" | |
"k8s.io/client-go/tools/clientcmd" | |
"k8s.io/client-go/util/homedir" |
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
std::string s = "scott>=tiger>=mushroom"; | |
std::string delimiter = ">="; | |
size_t pos = 0; | |
std::string token; | |
while ((pos = s.find(delimiter)) != std::string::npos) { | |
token = s.substr(0, pos); | |
std::cout << token << std::endl; | |
s.erase(0, pos + delimiter.length()); | |
} |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <stdint.h> | |
#include <getopt.h> | |
#define OFFSET 2208988800ULL | |
void ntp2tv(uint8_t ntp[8], struct timeval *tv) | |
{ |
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
s <- NULL | |
for (i in 1:5000) { | |
# 5 values normal distribution mean 40 sd 6 | |
t<-sum(rnorm(5, 40, 6)) | |
s[i] <- t | |
} | |
hist(s) |
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
setwd("/Users/kepler/Dropbox/Classroom/UOC - Master Bioinformatica/Software para el Análisis de Datos/PACS/PAC2") | |
#A. Generación de valores aleatorios | |
valores <- runif(100000, min = 1, max = 5) | |
#B. Agrupación en 20 columnas | |
matriz <- matrix(valores, ncol = 20) | |
# histogramas |