Skip to content

Commit f6e73bc

Browse files
author
ma0
committed
first stable commit with 00 introduction
0 parents  commit f6e73bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1245
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

Makefile

+124
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
PY?=python3
2+
PELICAN?=pelican
3+
PELICANOPTS=
4+
5+
BASEDIR=$(CURDIR)
6+
INPUTDIR=$(BASEDIR)/content
7+
OUTPUTDIR=$(BASEDIR)/output
8+
CONFFILE=$(BASEDIR)/pelicanconf.py
9+
PUBLISHCONF=$(BASEDIR)/publishconf.py
10+
11+
FTP_HOST=localhost
12+
FTP_USER=anonymous
13+
FTP_TARGET_DIR=/
14+
15+
SSH_HOST=localhost
16+
SSH_PORT=22
17+
SSH_USER=root
18+
SSH_TARGET_DIR=/var/www
19+
20+
S3_BUCKET=contraslash
21+
22+
CLOUDFILES_USERNAME=my_rackspace_username
23+
CLOUDFILES_API_KEY=my_rackspace_api_key
24+
CLOUDFILES_CONTAINER=my_cloudfiles_container
25+
26+
DROPBOX_DIR=~/Dropbox/Public/
27+
28+
GITHUB_PAGES_BRANCH=gh-pages
29+
30+
DEBUG ?= 0
31+
ifeq ($(DEBUG), 1)
32+
PELICANOPTS += -D
33+
endif
34+
35+
RELATIVE ?= 0
36+
ifeq ($(RELATIVE), 1)
37+
PELICANOPTS += --relative-urls
38+
endif
39+
40+
help:
41+
@echo 'Makefile for a pelican Web site '
42+
@echo ' '
43+
@echo 'Usage: '
44+
@echo ' make html (re)generate the web site '
45+
@echo ' make clean remove the generated files '
46+
@echo ' make regenerate regenerate files upon modification '
47+
@echo ' make publish generate using production settings '
48+
@echo ' make serve [PORT=8000] serve site at http://localhost:8000'
49+
@echo ' make serve-global [SERVER=0.0.0.0] serve (as root) to $(SERVER):80 '
50+
@echo ' make devserver [PORT=8000] start/restart develop_server.sh '
51+
@echo ' make stopserver stop local server '
52+
@echo ' make ssh_upload upload the web site via SSH '
53+
@echo ' make rsync_upload upload the web site via rsync+ssh '
54+
@echo ' make dropbox_upload upload the web site via Dropbox '
55+
@echo ' make ftp_upload upload the web site via FTP '
56+
@echo ' make s3_upload upload the web site via S3 '
57+
@echo ' make cf_upload upload the web site via Cloud Files'
58+
@echo ' make github upload the web site via gh-pages '
59+
@echo ' '
60+
@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html '
61+
@echo 'Set the RELATIVE variable to 1 to enable relative urls '
62+
@echo ' '
63+
64+
html:
65+
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
66+
67+
clean:
68+
[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)
69+
70+
regenerate:
71+
$(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
72+
73+
serve:
74+
ifdef PORT
75+
cd $(OUTPUTDIR) && $(PY) -m pelican.server $(PORT)
76+
else
77+
cd $(OUTPUTDIR) && $(PY) -m pelican.server
78+
endif
79+
80+
serve-global:
81+
ifdef SERVER
82+
cd $(OUTPUTDIR) && $(PY) -m pelican.server 80 $(SERVER)
83+
else
84+
cd $(OUTPUTDIR) && $(PY) -m pelican.server 80 0.0.0.0
85+
endif
86+
87+
88+
devserver:
89+
ifdef PORT
90+
$(BASEDIR)/develop_server.sh restart $(PORT)
91+
else
92+
$(BASEDIR)/develop_server.sh restart
93+
endif
94+
95+
stopserver:
96+
$(BASEDIR)/develop_server.sh stop
97+
@echo 'Stopped Pelican and SimpleHTTPServer processes running in background.'
98+
99+
publish:
100+
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
101+
102+
ssh_upload: publish
103+
scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)
104+
105+
rsync_upload: publish
106+
rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude
107+
108+
dropbox_upload: publish
109+
cp -r $(OUTPUTDIR)/* $(DROPBOX_DIR)
110+
111+
ftp_upload: publish
112+
lftp ftp://$(FTP_USER)@$(FTP_HOST) -e "mirror -R $(OUTPUTDIR) $(FTP_TARGET_DIR) ; quit"
113+
114+
s3_upload: publish
115+
s3cmd sync $(OUTPUTDIR)/ s3://$(S3_BUCKET) --acl-public --delete-removed --guess-mime-type --no-mime-magic --no-preserve
116+
117+
cf_upload: publish
118+
cd $(OUTPUTDIR) && swift -v -A https://auth.api.rackspacecloud.com/v1.0 -U $(CLOUDFILES_USERNAME) -K $(CLOUDFILES_API_KEY) upload -c $(CLOUDFILES_CONTAINER) .
119+
120+
github: publish
121+
ghp-import -m "Generate Pelican site" -b $(GITHUB_PAGES_BRANCH) $(OUTPUTDIR)
122+
git push origin $(GITHUB_PAGES_BRANCH)
123+
124+
.PHONY: html help clean regenerate serve serve-global devserver stopserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload cf_upload github

README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Curso Rápido de Python
2+
3+
Este sitio fue construido usando [Pelican](https://blog.getpelican.com/)
4+
5+
Para configurar el ambiente de desarrollo
6+
7+
```bash
8+
# Create an environment
9+
conda create --name curso_rapido_python
10+
# Activate the environment
11+
source activate curso_rapido_python
12+
# Install pelican dependencies
13+
conda install -c conda-forge pelican
14+
conda install -c conda-forge markdown
15+
16+
# And for live reload
17+
conda install -c conda-forge livereload
18+
```
19+
20+
Para ejecutar local
21+
22+
```bash
23+
pelican --autoreload
24+
```
25+
26+
27+
Para crear un nuevo tema
28+
29+
```bash
30+
mkdir -p themes/<your_theme_name>/{static/{css,js},templates}
31+
touch themes/<your_theme_name>/templates/{archives.html,period_archives.html,author.html,authors.html,categories.html,category.html,index.html,page.html,tag.html,tags.html}
32+
```

content/img/nltk.png

5.64 KB
Loading

content/img/python_economist.png

210 KB
Loading

content/lecciones/00-introduccion.md

+205
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
Title: Introducción
2+
Author: Mauricio Collazos
3+
Date: 2018-09-24
4+
![]()
5+
---
6+
class: center, middle, light
7+
# Introducción
8+
## Mauricio Collazos
9+
---
10+
class: center, middle
11+
# ¿Porqué Python?
12+
13+
- Elegancia
14+
- Sencillez
15+
- Versatilidad
16+
- Demanda
17+
- Comunidad
18+
- Popularidad
19+
---
20+
class: center
21+
# The Economist
22+
![https://www.economist.com/graphic-detail/2018/07/26/python-is-becoming-the-worlds-most-popular-coding-language](/img/python_economist.png)
23+
https://www.economist.com/graphic-detail/2018/07/26/python-is-becoming-the-worlds-most-popular-coding-language
24+
---
25+
class: center
26+
# Algunos enlaces útiles
27+
- [Encuestas de Stack Overflow](https://insights.stackoverflow.com)
28+
- [Python se está conviertendo en el lenguaje de programación mas popular](https://www.economist.com/graphic-detail/2018/07/26/python-is-becoming-the-worlds-most-popular-coding-language)
29+
- [Por qué aprender Python](http://www.bestprogramminglanguagefor.me/why-learn-python)
30+
- [Ventajas y desventajas de Python] (https://medium.com/@mindfiresolutions.usa/advantages-and-disadvantages-of-python-programming-language-fd0b394f2121)
31+
---
32+
# Ventajas
33+
- Tipado Dinámico
34+
```java
35+
int x = 1;
36+
// x es entero y su valor es 1
37+
x = x/2;
38+
// x es entero y su valor es 0
39+
```
40+
```python
41+
x = 1
42+
# x es entero y su valor es 1
43+
x = x/2
44+
# x es es flotante y su valor es 0.5
45+
```
46+
---
47+
# Ventajas
48+
- Sintaxis Limpia
49+
```java
50+
private void function_1(int x)
51+
{
52+
int y = x + 1;
53+
if (y > 5)
54+
{
55+
return x;
56+
}
57+
else
58+
{
59+
return y;
60+
}
61+
return y
62+
}
63+
```
64+
```python
65+
def function_1(x):
66+
y = x + 1
67+
if y > 5:
68+
return x
69+
else:
70+
return y
71+
```
72+
---
73+
# Ventajas
74+
- Oneliners
75+
```java
76+
int temp = x;
77+
x = y;
78+
y = temp
79+
```
80+
```python
81+
y,x = x,y
82+
```
83+
---
84+
# Ventajas
85+
- Simplicidad
86+
87+
```java
88+
public class A{
89+
public static void main(String ... args)
90+
{
91+
System.out.println("Hola Mundo");
92+
}
93+
}
94+
```
95+
96+
```python
97+
print("Hola Mundo")
98+
```
99+
---
100+
# Ventajas
101+
- Estructuras de Datos
102+
103+
```java
104+
import java.util.ArrayList;
105+
import java.util.Set;
106+
import java.util.HashSet;
107+
import java.util.Map;
108+
import java.util.HashMap;
109+
110+
111+
112+
public class A{
113+
public static void main(String ... args)
114+
{
115+
ArrayList <String> lista = new ArrayList();
116+
Set conjunto = new HashSet();
117+
Map<String, Integer> diccionario = new HashMap<String, Integer>();
118+
119+
}
120+
}
121+
```
122+
123+
```python
124+
lista = list()
125+
conjunto = set()
126+
diccionario = dict()
127+
```
128+
---
129+
class: center
130+
# Librerías
131+
![https://www.djangoproject.com/](https://upload.wikimedia.org/wikipedia/commons/7/75/Django_logo.svg)
132+
133+
[Django](https://www.djangoproject.com/)
134+
---
135+
class: center
136+
# Librerías
137+
![http://flask.pocoo.org/](https://cdn.worldvectorlogo.com/logos/flask.svg)
138+
139+
[Flask](http://flask.pocoo.org/)
140+
---
141+
class: center
142+
# Librerías
143+
![https://www.tensorflow.org](https://upload.wikimedia.org/wikipedia/commons/1/11/TensorFlowLogo.svg)
144+
145+
[Tensorflow](https://www.tensorflow.org)
146+
---
147+
class: center
148+
# Librerías
149+
![https://pytorch.org/](https://discuss.pytorch.org/uploads/default/original/2X/3/35226d9fbc661ced1c5d17e374638389178c3176.png)
150+
151+
[PyTorch](https://pytorch.org/)
152+
---
153+
class: center
154+
# Librerías
155+
![http://www.numpy.org/](http://www.numpy.org/_static/numpy_logo.png)
156+
157+
[Numpy](http://www.numpy.org/)
158+
---
159+
class: center
160+
# Librerías
161+
![https://www.scipy.org/](https://www.scipy.org/_static/logo.gif)
162+
163+
[Scipy](https://www.scipy.org/)
164+
---
165+
class: center
166+
# Librerías
167+
![https://pandas.pydata.org/](https://pandas.pydata.org/_static/pandas_logo.png)
168+
169+
[Pandas](https://pandas.pydata.org/)
170+
---
171+
class: center
172+
# Librerías
173+
![https://opencv.org/](https://opencv.org/assets/theme/logo.png)
174+
175+
[OpenCV](https://opencv.org/)
176+
---
177+
class: center
178+
# Librerías
179+
![http://www.nltk.org/](/img/nltk.png)
180+
181+
[NLTK](http://www.nltk.org/)
182+
---
183+
class: center
184+
# Librerías
185+
![https://scrapy.org/](https://scrapy.org/img/scrapylogo.png)
186+
187+
[Scrapy](https://scrapy.org/)
188+
---
189+
class: center
190+
# Librerías
191+
![https://kivy.org/](https://raw.githubusercontent.com/kivy/kivy/master/kivy/data/logo/kivy-icon-256.png)
192+
193+
[Kivy](https://kivy.org/)
194+
---
195+
# Librerías
196+
Pero sin contar también
197+
- [Sanic](https://github.com/huge-success/sanic)
198+
- [Keras](https://keras.io/)
199+
- [SciKit Learn](http://scikit-learn.org/stable/)
200+
- [MatPlotLib](https://matplotlib.org/index.html)
201+
- [Plotly](https://plot.ly/python/)
202+
- [Bokeh](https://bokeh.pydata.org/en/latest/)
203+
- [Spacy](https://spacy.io/)
204+
- [Gensim](https://radimrehurek.com/gensim/)
205+
-

custom_pelican_markdown_reader/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)