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
%rebase layout title='Register New Slack log Box Backup configuration', parent_url=app.get_url('index') | |
<h2>Create New Slack Box backup</h2> | |
<script> | |
function submitForm(){ | |
document.getElementById('authform').submit(); | |
}; | |
</script> | |
<!-- python block (bottle + wtforms) will not be appear in html--> |
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 | |
# UpToGit 0.1 | |
# Actualiza facilmente tu repositorio Git | |
# (CC) 2011 Alfonso Saavedra "Son Link" | |
# http://sonlinkblog.blogspot.com | |
# Bajo licencia GNU/GPL | |
# Modo de uso: copia o mueve este script a /usr/bin o /usr/local/bin y desde el directorio donde se encuentre la copia de un repo git, ejecútalo de esta manera: | |
# uptogit <ficheros> |
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
# -*- coding: utf-8 *-* | |
""" | |
:Propósito: Medir la memoria consumida por un objeto Python | |
:Autor: https://goshippo.com/blog/measure-real-size-any-python-object/ | |
:Versión: Desconocido | |
:Adaptación: Tony Diana | |
Se ha mejorado y se añadió medir también los atributos de los objetos | |
--------------------------------------------------------------------------- |
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
#!/usr/bin/python | |
from gi.repository import Gtk, GObject | |
from datetime import datetime | |
class MainWindow(Gtk.Window): | |
def __init__(self): | |
Gtk.Window.__init__(self, title="app") | |
self.box = Gtk.Box(spacing=6) | |
self.add(self.box) |
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
# -*- coding: utf-8 -*- | |
import requests | |
import re # Usado para eliminar las etiquetas HTML de las response | |
class googleMapsAPI: | |
""" Clase para trabajar con la API de Google Maps """ | |
# Propiedades | |
_clave = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # Escribe aquí to clave (puedes generarlas desde https://console.developers.google.com/apis/credentials) |
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
# -*- coding: utf-8 -*- | |
from openpyxl import load_workbook # Requiere instalar openpyxl | |
import os.path | |
rutaXLSX = "fichero.xlsx" | |
if os.path.isfile(rutaXLSX): | |
libro = load_workbook(rutaXLSX) # Abro el excel para extraer los campos |
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
# -*- coding: utf-8 -*- | |
from tqdm import tqdm # Requiere instalar la librería -> pip install tqdm | |
from time import sleep | |
tareasQueRealizar = 100; | |
for i in tqdm(range(tareasQueRealizar)): | |
sleep(0.2) |
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
# -*- coding: utf-8 -*- | |
# Clono un repositorio online a mi disco duro local. | |
# Genero una carpeta en la que almacenaré, en diferentes subcarpetas, todas las ramas que vaya a necesitar clonar | |
# Posteriormente comprimo toda la clonación en un archivo .zip con la fecha actual del sistema. | |
# Si ya existiese dicho archivo lo sobrescribiré. | |
# Posteriormente borro las carpetas creadas para dejar solo el .zip | |
import git # Requiere librería GitPython | |
import time |