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 list = find_coordinates( matrix, value ) | |
%FIND_COORDINATES Encuentra las coordenadas de la posición de un valor VALUE | |
%en la matriz MATRIX | |
% Se obtiene el largo de la matriz | |
l = size(matrix); | |
% Se almacena una lista con todos los valores posibles (coordenadas) | |
coordenates_list = cell(l(1)*l(2),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
function point = choice_random( matrix, value ) | |
%CHOICE_RANDOM_POINT Elige un valor random de los puntos (i,j) para los | |
%cuales matrix(i,j)=value | |
p = find_coordinates(matrix, value); | |
l = size(p,1); | |
r = randi([1 l],1,1); | |
point = p{r}; | |
end |
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
# coding=utf-8 | |
""" | |
This function adds a figure to (x,y) position to a plot. | |
Autor: Pablo Pizarro @ppizarror.com, 2017. | |
""" | |
# Library importation | |
import matplotlib.pyplot as plt | |
from matplotlib.offsetbox import (OffsetImage, AnnotationBbox) | |
from matplotlib.cbook import get_sample_data |
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
@media print { | |
*, ::after, ::before { | |
text-shadow: none !important; | |
box-shadow: none !important | |
} | |
a, a:visited { | |
text-decoration: underline | |
} |
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
# coding=utf-8 | |
""" | |
The MIT License (MIT) | |
Copyright 2017-2019 Pablo Pizarro R. @ppizarror | |
Permission is hereby granted, free of charge, to any person obtaining a | |
copy of this software and associated documentation files (the "Software"), | |
to deal in the Software without restriction, including without limitation | |
the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
and/or sell copies of the Software, and to permit persons to whom the Software |
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
# coding=utf-8 | |
""" | |
The MIT License (MIT) | |
Copyright 2017-2019 Pablo Pizarro R. @ppizarror | |
Permission is hereby granted, free of charge, to any person obtaining a | |
copy of this software and associated documentation files (the "Software"), | |
to deal in the Software without restriction, including without limitation | |
the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
and/or sell copies of the Software, and to permit persons to whom the Software |
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
% Carga el registro | |
data = detrend(load('accRoca.txt'), 0); | |
FS = 200; % Muestreo, 200 datos por segundo | |
% Encuentra la potencia que mas se ajusta al numero de datos | |
n = 2^nextpow2(length(data)); | |
% Crea el vector temporal | |
tdata = zeros(n, 1); | |
for j = 2:n |
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
# Run this script within downloaded .zip from https://www.data.go.kr/data/15037046/fileData.do (August 2019) | |
# Contains 330 plans in bmp format, Resolution 230-5092. | |
import os | |
import cv2 | |
import base64 | |
# Retrieve all files | |
json_files = [] | |
def get_files(cwd='.'): |