Skip to content

Instantly share code, notes, and snippets.

View MiguelBarrazaAr's full-sized avatar

Miguel Barraza MiguelBarrazaAr

View GitHub Profile
@MiguelBarrazaAr
MiguelBarrazaAr / ejemplo-excel.py
Last active October 20, 2021 10:04
Ejemplo básico de creación de un libro excel con python
# openpyxl: librería para manipular excel desde python
import openpyxl
# creamos nuevo libro:
wb = openpyxl.Workbook()
# seleccionamos la hoja activa, osea la primera
hoja = wb.active
# verificamos el titulo de la hoja:
print('Hoja activa: '+hoja.title)
@MiguelBarrazaAr
MiguelBarrazaAr / example_blockchain.py
Created July 18, 2019 18:19
simple example of blockchain in python 3
<#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import hashlib as hasher
import datetime as date
from time import sleep
class Block:
"""Estructura del bloque."""
def __init__(self, index, timestamp, data, previous_hash):
self.index = index