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
#!/bin/bash | |
set -e | |
# Err if user is root | |
if [ "$EUID" -eq 0 ]; then | |
echo "Please do not run as root" | |
exit | |
fi | |
# Install git, docker, and VSCode dependencies |
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 -O anaconda_installer.sh $(python3 latest_anaconda.py) | |
bash anaconda_installer.sh -b -u -f -p $HOME/anaconda3 | |
source $HOME/anaconda3/etc/profile.d/conda.sh | |
conda init | |
conda config --set auto_activate_base false |
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
import argparse | |
import csv | |
import io | |
import itertools | |
import pathlib | |
import sqlite3 | |
from typing import Any, Dict, Iterable, List, Optional | |
import zipfile | |
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
# Autor: Mario Abarca | |
""" | |
Aplicación que genera de contraseñas fáciles de recordar mezclando | |
palabras en español y símbolos. | |
""" | |
import abc | |
import collections | |
import itertools | |
import math |
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
import matplotlib.pyplot as plt | |
def mcd(a, b): | |
'Algoritmo de Euclides para hallar el máximo común divisor.' | |
while b != 0: | |
(a, b) = (b, a % b) | |
return a | |
def grafica_thomae(a=0, b=1, denominador_max=1000): | |
'''Aproximación de la gráfica de la función de Thomae en el |
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
# Autor: Mario Abarca | |
# Fecha: 29 nov. 2017 | |
# Lenguaje: Python 3.6 | |
from cmd import Cmd | |
class TextoBinarioApp(Cmd): | |
def __init__(mi): | |
super().__init__() | |
mi.codigo = 'utf8' |
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
# Crear un laberinto aleatorio en Python3 usando el algoritmo de | |
# recorrido en profundidad. El propósito de este programa es mostrar las | |
# características del lenguaje. | |
# | |
# Autor: Mario Abarca | |
# Fecha: 2017/09/07 | |
from random import shuffle, randint # Números pseudoaleatorios | |
from itertools import product # Producto cartesiano |
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
## A simple program that showcases tree drawing by fractals | |
## Copyright (C) 2016 Mario Abarca | |
## | |
## This program is free software: you can redistribute it and/or | |
## modify it under the terms of the GNU General Public License as | |
## published by the Free Software Foundation, either version 3 of the | |
## License, or (at your option) any later version. | |
## | |
## This program is distributed in the hope that it will be useful, | |
## but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
import turtle, colorsys, math | |
t = turtle.Turtle() | |
t.pensize(4); t.right(90); t.speed(0) | |
n, j, i, p = 19, 1, 1, (5 ** 0.5 - 1) / 2 | |
for k in range(n): | |
r, g, b = colorsys.hls_to_rgb(p * k % 1, p, 1) | |
t.color('white', (r, g, b)) | |
t.begin_fill() | |
for k in range(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
## Algoritmos en redes (grafos con pesos en las aristas) | |
## | |
## Autor: Mario Abarca (asma@uaem.mx) | |
## Fecha: 20 de octubre de 2015 | |
from grafos import Grafo | |
from estructuras import Cola | |
from estructuras import ColaMin | |
from estructuras import ConjuntosDisjuntos |
NewerOlder