Skip to content

Instantly share code, notes, and snippets.

View eduardogpg's full-sized avatar
🏠
Working from home

Eduardo Ismael García Pérez eduardogpg

🏠
Working from home
View GitHub Profile
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'
import time
import timeit
from functools import partial
def is_prime(number):
if number < 2:
return False
for x in range(2, number):
class QueueLLEmptyError(Exception):
pass
class Node:
def __init__(self, data):
self.data = data
self.next = None
class QueueFullError(Exception):
pass
class QueueEmptyError(Exception):
pass
class ListQueue():
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):
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:
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')
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)]
@eduardogpg
eduardogpg / scraper.py
Last active November 25, 2023 14:44
Una clase del BC de Ciencia de datos.
import csv
import json
import requests
from bs4 import BeautifulSoup
TITLE = 'Próximos lanzamientos'
URL = 'https://www.imdb.com/calendar/?region=MX'
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():