Skip to content

Commit

Permalink
nuevo repo para fuentes de blog
Browse files Browse the repository at this point in the history
  • Loading branch information
relopezbriega committed Oct 26, 2018
0 parents commit 415336f
Show file tree
Hide file tree
Showing 315 changed files with 158,381 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*.pyc
*.csv
*.pdf
downloads/
.ipynb_checkpoints/
MLbooks/
MNIST_data/
__pycache__/
data/
datasets/
stats/
output/
339 changes: 339 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions ML.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Title: Sistema solar
Date: 2017-05-21
Category: Pobabilidad y Estadistica
Tags: python, estadistica, programacion, analisis de datos, probabilidad, distribuciones, Monte-Carlo, MCMC, Metropolis, Bayes, inferencia
Author: Raul E. Lopez Briega
Description: Introducción a la inferencia Bayesiana con Python. La incertidumbre y el problema de la inducción, El teorema de Bayes, inferencia bayesiana, redes Bayesianas, Programación probabilística y PyMC3, Bayes ingenuo.


{% notebook ML.ipynb cells[1:] %}
108 changes: 108 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
PY=python
PELICAN=pelican
PELICANOPTS=

BASEDIR=$(CURDIR)
INPUTDIR=$(BASEDIR)/content
OUTPUTDIR=$(BASEDIR)/output
CONFFILE=$(BASEDIR)/pelicanconf.py
PUBLISHCONF=$(BASEDIR)/publishconf.py

FTP_HOST=localhost
FTP_USER=anonymous
FTP_TARGET_DIR=/

SSH_HOST=localhost
SSH_PORT=22
SSH_USER=root
SSH_TARGET_DIR=/var/www

S3_BUCKET=my_s3_bucket

CLOUDFILES_USERNAME=my_rackspace_username
CLOUDFILES_API_KEY=my_rackspace_api_key
CLOUDFILES_CONTAINER=my_cloudfiles_container

DROPBOX_DIR=~/Dropbox/Public/

DEBUG ?= 0
ifeq ($(DEBUG), 1)
PELICANOPTS += -D
endif

help:
@echo 'Makefile for a pelican Web site '
@echo ' '
@echo 'Usage: '
@echo ' make html (re)generate the web site '
@echo ' make clean remove the generated files '
@echo ' make regenerate regenerate files upon modification '
@echo ' make publish generate using production settings '
@echo ' make serve [PORT=8000] serve site at http://localhost:8000'
@echo ' make devserver [PORT=8000] start/restart develop_server.sh '
@echo ' make stopserver stop local server '
@echo ' make ssh_upload upload the web site via SSH '
@echo ' make rsync_upload upload the web site via rsync+ssh '
@echo ' make dropbox_upload upload the web site via Dropbox '
@echo ' make ftp_upload upload the web site via FTP '
@echo ' make s3_upload upload the web site via S3 '
@echo ' make cf_upload upload the web site via Cloud Files'
@echo ' make github upload the web site via gh-pages '
@echo ' '
@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html'
@echo ' '

html:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)

clean:
[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)

regenerate:
$(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)

serve:
ifdef PORT
cd $(OUTPUTDIR) && $(PY) -m pelican.server $(PORT)
else
cd $(OUTPUTDIR) && $(PY) -m pelican.server
endif

devserver:
ifdef PORT
$(BASEDIR)/develop_server.sh restart $(PORT)
else
$(BASEDIR)/develop_server.sh restart
endif

stopserver:
kill -9 `cat pelican.pid`
kill -9 `cat srv.pid`
@echo 'Stopped Pelican and SimpleHTTPServer processes running in background.'

publish:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)

ssh_upload: publish
scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)

rsync_upload: publish
rsync -e "ssh -p $(SSH_PORT)" -P -rvz --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude

dropbox_upload: publish
cp -r $(OUTPUTDIR)/* $(DROPBOX_DIR)

ftp_upload: publish
lftp ftp://$(FTP_USER)@$(FTP_HOST) -e "mirror -R $(OUTPUTDIR) $(FTP_TARGET_DIR) ; quit"

s3_upload: publish
s3cmd sync $(OUTPUTDIR)/ s3://$(S3_BUCKET) --acl-public --delete-removed

cf_upload: publish
cd $(OUTPUTDIR) && swift -v -A https://auth.api.rackspacecloud.com/v1.0 -U $(CLOUDFILES_USERNAME) -K $(CLOUDFILES_API_KEY) upload -c $(CLOUDFILES_CONTAINER) .

github: publish
ghp-import $(OUTPUTDIR)
git push origin gh-pages

.PHONY: html help clean regenerate serve devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload cf_upload github
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
mi-python-blog
==============

Raul E. Lopez Briega
-----------------------
This is the source of my [Github blog](http://relopezbriega.github.io)
blog. It is built using the [Pelican](http://blog.getpelican.com/)
blogging platform.

Requirements
------------

- Recent version of [IPython](http://github.com/ipython/ipython). The
liquid_tags plugin above requires IPython 1.0. Note that previously
this could be built with the stand-alone nbconvert package. That
no longer works with the recent liquid_tags plugin.

- Recent version of [Pelican](http://github.com/getpelican/pelican). For
the static paths (downloads, images, figures, etc.) to appear in the right
place, Pelican 3.3+ must be used.
180 changes: 180 additions & 0 deletions _nb_header.html

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions adivinar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
function adivinar_numero(){
var numero_a_adivinar = Math.floor(Math.random()*1000);
var bits = 1;
var numero_usuario = prompt("Adivine un número entero entre 1 y 1000\nIngrese un número entre 1 y 1000: ");

while (numero_usuario != numero_a_adivinar) {
if (numero_usuario < numero_a_adivinar) {
numero_usuario = prompt("Su número es muy bajo!\nIngrese otro número entre 1 y 1000:");
bits++;
} else {
numero_usuario = prompt("Su número es muy alto!\nIngrese otro número entre 1 y 1000:");
bits++;
}
}
alert("Felicidades el número es " + numero_usuario + " y ha utilizado " + bits + " bits!");
}
62 changes: 62 additions & 0 deletions calculo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
El Cálculo es una ciencia deductiva y una rama de la Matemática pura. Al mismo
tiempo es muy importante recordar que el Cálculo tiene profundas raíces en pro-
blemas físicos y que gran parte de su potencia y belleza deriva de la variedad de
sus aplicaciones.
La rama de la Matemática conocida por Cálculo integral y diferencial es un
instrumento natural y poderoso para atacar múltiples problemas que surgen en
Física, Astronomía, Ingeniería, Química, Geología, Biología, y en otros campos,
Para dar una idea al lector de los muy diversos tipos de problemas que
pueden tratarse por los métodos de Cálculo se expone a continuación una pe-
queña muestra de cuestiones seleccionadas entre los ejercicios que aparecen en
capítulos posteriores de este libro.
¿Con qué velocidad debería ser impulsado un cohete para que nunca volviera
a la Tierra? ¿Cuál es el radio del menor disco circular que cubra a todo triángulo
isósceles de perímetro L? ¿Cuál es el volumen de material extraído de una esfera
de radio 2r al atravesarla por un orificio cilíndrico de radio r cuyo eje pase por
el centro de la esfera? Si un cultivo de bacterias crece en razón directa a la can-
tidad que hay en cada instante, y la población se duplica en una hora, ¿en cuánto
se habrá incrementado al cabo de dos horas? Si una fuerza de diez libras estira
una cuerda elástica una pulgada, ¿qué trabajo se necesita para estirarla un pie?
El Cálculo no sólo es un instrumento técnico, sino que contiene una colec-
ción de ideas fascinadoras y atrayentes que han ocupado el pensamiento humano
durante centurias. Estas ideas están relacionadas con velocidad, área, volumen,
razón de crecimiento, tangente a una línea, y con otros conceptos referentes a
otros dominios. El Cálculo obliga a detenerse y a pensar cuidadosamente acerca
del significado de estos conceptos. Otro carácter notable del Cálculo es su poder
unificador. Muchos de estos problemas pueden ser formulados de manera que se
reduzcan a otros problemas de naturaleza puramente geométrica.
En el Cálculo se definen los con-
ceptos de área y tangente y se calculan el área de una región dada y la pen-
diente de la tangente a una curva dada. El Cálculo integral se ocupa del problema
del área y será discutido en este capítulo 1. El Cálculo diferencial se ocupa del
problema de la tangente

historia

El origen del Cálculo integral se remonta a más de 2000 años, cuando los
griegos intentaban resolver el problema del área ideando el procedimiento
que
llamaron método de exhaución. Las ideas esenciales de este método son real-
mente muy simples y se pueden describir brevemente como sigue: Dada una
región cuya área quiere determinarse,
se inscribe en ella una región poligonal
que se aproxime a la dada y cuya área sea de fácil cálculo. Luego se elige otra
región poligonal que dé una aproximación
mejor y se continúa el proceso to-
mando polígonos con mayor número de lados cada vez, tendiendo a llenar la
región dada. La figura 1.2 es una ilustración del método en el caso de una región
semicircular.
Este método fue usado satisfactoriamente
por Arquímedes
(287-
212 A.C.) para hallar fórmulas exactas de las áreas del círculo y de algunas
otras figuras especiales.
Desde Arquímedes,Gradualmente, el método de exhaución fue transformándose en lo que hoy
se conoce como Cálculo integral,

Hay muchas formas de estructurar el Cálculo como sistema deductivo. Una
manera posible, es tomar los números reales como conceptos no definidos o primi-
tivos. Algunas de las reglas que rigen las operaciones con los números reales
pueden tomarse como axiomas. Este sistema de axiomas se ha incluido en la
parte 3 de esta introducción. Nuevos conceptos, tales como integral, límite, conti-
nuidad, derivada, pueden definirse a partir de los números reales.
19 changes: 19 additions & 0 deletions content/2048/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"esnext": true,
"indent": 2,
"maxlen": 80,
"freeze": true,
"camelcase": true,
"unused": true,
"eqnull": true,
"proto": true,
"supernew": true,
"noyield": true,
"evil": true,
"node": true,
"boss": true,
"expr": true,
"loopfunc": true,
"white": true,
"maxdepth": 4
}
Binary file added content/2048/favicon.ico
Binary file not shown.
116 changes: 116 additions & 0 deletions content/2048/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Raulo 2048</title>

<link href="style/main.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="favicon.ico">
<link rel="apple-touch-icon" href="meta/apple-touch-icon.png">
<link rel="apple-touch-startup-image" href="meta/apple-touch-startup-image-640x1096.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)"> <!-- iPhone 5+ -->
<link rel="apple-touch-startup-image" href="meta/apple-touch-startup-image-640x920.png" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)"> <!-- iPhone, retina -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">

<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui">
</head>
<body>
<div class="container">
<div class="heading">
<h1 class="title">2048</h1>
<div class="scores-container">
<div class="score-container">0</div>
<div class="best-container">0</div>
</div>
</div>

<div class="above-game">
<p class="game-intro">Join the numbers and get to the <strong>2048 tile!</strong></p>
<a class="restart-button">New Game</a>
</div>

<div class="game-container">
<div class="game-message">
<p></p>
<div class="lower">
<a class="keep-playing-button">Keep going</a>
<a class="retry-button">Try again</a>
</div>
</div>

<div class="grid-container">
<div class="grid-row">
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
</div>
<div class="grid-row">
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
</div>
<div class="grid-row">
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
</div>
<div class="grid-row">
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
<div class="grid-cell"></div>
</div>
</div>

<div class="tile-container">

</div>
</div>

<p class="game-explanation">
<strong class="important">How to play:</strong> Use your <strong>arrow keys</strong> to move the tiles. When two tiles with the same number touch, they <strong>merge into one!</strong>
</p>
<p>
Created by <a href="http://gabrielecirulli.com" target="_blank">Gabriele Cirulli.</a> Based on <a href="https://itunes.apple.com/us/app/1024!/id823499224" target="_blank">1024 by Veewo Studio</a> and conceptually similar to <a href="http://asherv.com/threes/" target="_blank">Threes by Asher Vollmer.</a>
</p>
<p>
<a class="goback-button" href="http://relopezbriega.github.io">Back to relopezbriega.github.io</a>
</p>
</div>

<script src="js/bind_polyfill.js"></script>
<script src="js/classlist_polyfill.js"></script>
<script src="js/animframe_polyfill.js"></script>
<script src="js/keyboard_input_manager.js"></script>
<script src="js/html_actuator.js"></script>
<script src="js/grid.js"></script>
<script src="js/tile.js"></script>
<script src="js/local_storage_manager.js"></script>
<script src="js/game_manager.js"></script>
<script src="js/application.js"></script>
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-29080434-3']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-29080434-3');
ga('send', 'pageview');
</script>
</body>
</html>
28 changes: 28 additions & 0 deletions content/2048/js/animframe_polyfill.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
(function () {
var lastTime = 0;
var vendors = ['webkit', 'moz'];
for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] ||
window[vendors[x] + 'CancelRequestAnimationFrame'];
}

if (!window.requestAnimationFrame) {
window.requestAnimationFrame = function (callback) {
var currTime = new Date().getTime();
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
var id = window.setTimeout(function () {
callback(currTime + timeToCall);
},
timeToCall);
lastTime = currTime + timeToCall;
return id;
};
}

if (!window.cancelAnimationFrame) {
window.cancelAnimationFrame = function (id) {
clearTimeout(id);
};
}
}());
Loading

0 comments on commit 415336f

Please sign in to comment.