Skip to content

Instantly share code, notes, and snippets.


Huber Flores (El Magico) huberflores

View GitHub Profile
huberflores / statistical.R
Last active Sep 18, 2020
Statistical test analysis, Friedman and Pairwise Wilcoxon
View statistical.R
mydata <- read.csv("mydata-fixedhold.csv", sep=",", header = T)
myvars <- c("id", "cigarette", "bottle", "cup")
newdata <- mydata[myvars]
# From socket module we import the required structures and constants.
from socket import AF_INET, SOCK_DGRAM, socket
if __name__ == '__main__':
print 'Application started'
# Creating a UDP/IP socket
s = socket(AF_INET, SOCK_DGRAM)
View Adb-wifi
# author Huber Flores
#Open Android Studio and connect your device via USB
#Computer and phone need to be connected to the same Network
#Open terminal
$ huberflo@hp8x-78:~$ adb tcpip 5555
restarting in TCP mode port: 5555
huberflores / distfit.R
Created Apr 5, 2016
Fitting data to a particular distribution
View distfit.R
fileInput <- "/Users/hflores/Desktop/datasets/code-benchmarking/output70-t2large.csv"
codebenchmark = read.csv(fileInput, sep=";")
time <- codebenchmark$response
descdist(time, discrete = FALSE)
huberflores / lpmodel-basics.R
Last active Aug 6, 2018
Linear programming in R - basic example
View lpmodel-basics.R
#author Huber Flores
huberflores /
Last active Dec 27, 2015
social graph with graphivz
digraph Bluetooth {
graph [ dpi = 300 ];
p0-> p9;
p0-> p10;
p0-> p11;
p0-> p12;
p0-> p13;
p0-> p14;
p0-> p15;
p0-> p16;
huberflores / decision-engine.R
Last active Nov 11, 2015
A fuzzy logic engine for computational offloading - simulation version
View decision-engine.R
# author Huber Flores
# The input of the engine is a dataset. For each tuple of the dataset a decision is expected
# Each attribute in the tuple is normalized in a 0-1 interval
huberflores / file.R
Created Nov 9, 2015 — forked from mollietaylor/file.R
Storing a Function in a Separate File in R
View file.R
# calling the functions
# this is the file where we will call the functions in fun.R and times.R
times <- dget("times.R")
times(-4:4, 2)
mult(-4:4, 2)
huberflores / fuzzyLogic.R
Last active Apr 2, 2022
Fuzzy logic in R
View fuzzyLogic.R
# author Huber Flores
# Example of fuzzy logic in R
# The main idea is to have fuzzy sets for each of the dimensions
# each attribute in the dimension can be defined as a fuzzy set with their respective linguistic variables, terms and membership functions
huberflores / data-normalization.R
Created Oct 23, 2015
Normalization of data in a range using R
View data-normalization.R
# author Huber Flores
# Normalizing data to a target range (a, b)
#original dataset
mydata <- c(26,33,45,77,15,100,66,21,89,55)
A = min(mydata)
B = max(mydata)