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
from pathlib import Path # > 3.6 | |
from setuptools import setup | |
this_directory = Path(__file__).parent | |
long_description = (this_directory / "README.md").read_text() | |
VERSION = '0.0.2' | |
DESCRIPTION = | |
PACKAGE_NAME = | |
AUTHOR = 'Eduardo Ismael García Pérez' |
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 time | |
import timeit | |
from functools import partial | |
def is_prime(number): | |
if number < 2: | |
return False | |
for x in range(2, number): |
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
class QueueLLEmptyError(Exception): | |
pass | |
class Node: | |
def __init__(self, data): | |
self.data = data | |
self.next = None | |
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
class QueueFullError(Exception): | |
pass | |
class QueueEmptyError(Exception): | |
pass | |
class ListQueue(): |
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 time | |
from stack import Stack | |
from stackll import StackLL | |
from collections import deque | |
total = 100_000_000 | |
start = time.time() | |
def timer_decorator(function): |
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
from typing import Optional, Any | |
class StackUnderFlowError(Exception): | |
def __init__(self): | |
super().__init__('Stack Under Flow error') | |
class Node: | |
def __init__(self, data: Any = None) -> None: |
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
from typing import Optional, List, Any | |
class StackOverFlowError(Exception): | |
def __init__(self): | |
super().__init__('Stack Over Flow error') | |
class StackUnderFlowError(Exception): | |
def __init__(self): | |
super().__init__('Stack Under Flow error') |
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 time | |
def simple_for(): | |
lista = [] | |
for x in range(0, 100_000_000): | |
lista.append(x) | |
def list_comprehension(): | |
lista = [x for x in range(0, 100_000_000)] |
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 csv | |
import json | |
import requests | |
from bs4 import BeautifulSoup | |
TITLE = 'Próximos lanzamientos' | |
URL = 'https://www.imdb.com/calendar/?region=MX' |
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
from fabric.api import run | |
from fabric.api import env, cd, prefix, sudo | |
from fabric.api import local | |
env.hosts = ['104.236.4.54'] | |
env.user = 'eduardo' | |
env.key_filename = '/home/eduardo/.ssh/id_ed25519.pub' | |
def deploy(): |