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
# Plumber.R | |
GetTokens = function( code_data ) | |
{ | |
callback_url = URLdecode( code_data ) | |
body_ = list() | |
body_$grant_type = "authorization_code" | |
body_$refresh_token = "" | |
body_$access_type = "offline" | |
body_$code = callback_url |
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
data_table = read.csv2( "ruta/del/archivo/" ) | |
raw_data = unname( unlist( data_table ) ) | |
raw_data = raw_data[which( !is.na( raw_data ) )] | |
View( data_table ) | |
max_x = max( raw_data ) | |
min_x = min( raw_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
timedatectl set-timezone America/Bogota | |
echo "es_CO.UTF-8 UTF-8" > /etc/locale.gen | |
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen | |
echo "ja_JP.EUC-JP EUC-JP" >> /etc/locale.gen | |
echo "ja_JP.UTF-8 UTF-8" >> /etc/locale.gen | |
locale-gen | |
echo LANG=en_US.UTF-8 > /etc/locale.conf | |
export LANG=en_US.UTF-8 | |
echo "desktop" > /etc/hostname | |
echo "127.0.0.1 localhost" > /etc/hosts |
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
#install.packages( "XML" ) | |
#install.packages( "httr" ) | |
url_data = "https://es.investing.com/instruments/HistoricalDataAjax" | |
params = list() | |
params$curr_id = 29248 | |
params$smlID = 205189 | |
params$header = "República+Checa+1+año+Datos+Históricos+Rendimiento+de+Bonos" |
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
24. | |
x² + 2dx + d² = 0 | |
Se reescribe de otra forma equivalente | |
(1)x² + (2d)x + (d²) = 0 | |
La ecuación tiene la forma: | |
(a)x² + (b )x + (c ) = 0. | |
Donde: | |
a es 1 | |
b es 2d | |
c es d² |
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
base_url = "https://etfdb.com/data_set/?tm=40284&cond={%22by_etf%22:1272}&no_null_sort=true&count_by_id=&sort=weight&order=desc&limit=15&offset=" | |
CleanString = function( string ) | |
{ | |
result = gsub( "<a.*stock/", "", string ) | |
gsub( "/.*", "", result ) | |
} | |
WeightsFromUrl = function( json_url ) | |
{ |
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
wget http://contratacion.unal.edu.co/nal/ | |
grep 'rico20[0-9][0-9]' index.html > ids.txt | |
sed -i -E -e "s|.href=\"|\nhref=\"|" ids.txt | |
sed -i -E -e "s|.href=\"|\nhref=\"|" ids.txt | |
sed -i -E -e "s|.href=\"|\nhref=\"|" ids.txt | |
sed -i -E -e "s|.href=\"|\nhref=\"|" ids.txt | |
sed -i -E -e "s|<.*||" ids.txt | |
sed -i -E -e "s|>.*||" ids.txt | |
sed -i -E -e "s| target.*||" ids.txt | |
sed -i '/^ *$/d' ids.txt |
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
wget http://www.creg.gov.co/index.php/es/prensa/presentaciones | |
grep "\-presentaciones\-" presentaciones > links.txt | |
sed -i -E -e "s|.*<div class=\"pd-subcategory\" style=\"margin-left:20px; margin-top:20px;\"><a href=\"|http://www.creg.gov.co|" links.txt | |
sed -i -E -e "s|\" title=\"Presentaciones .*||" links.txt | |
cat links.txt | xargs wget | |
grep "PDF" *-presentaciones-* > links.txt | |
grep "Descargar" *-presentaciones-* >> links.txt | |
sed -i -E -e "s|.*href=\"|http://www.creg.gov.co|" links.txt | |
sed -i -E -e "s|\".*|\"|" links.txt | |
sed -i -E -e "s|http|\"http|" links.txt |
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
data = matrix(nrow = 20, ncol = 5, byrow = T, | |
c(8,8,0,9,6, | |
7,1,1,1,0, | |
2,1,7,2,0, | |
6,6,6,6,4, | |
1,1,1,1,0, | |
3,2,1,3,0, | |
7,6,6,2,2, | |
9,3,1,3,1, | |
0,0,0,0,4, |
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
{ | |
"transformation": [ | |
[ | |
[ 0, 0 ], | |
[ 0, 0.16 ] | |
], | |
[ | |
[ 0.85, 0.04 ], | |
[ -0.04, 0.85 ] | |
], |
NewerOlder