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/env python3 | |
# -*- coding: UTF-8 -*- | |
# Copyright (C) 2023 Schmidt Cristian Hernán | |
# Este script descarga el histórico de los valores del precio del dólar en la | |
# República Argentina y los gráfica, agregando además los cambios de presidentes | |
# que hubieron en el rango de los valores disponibles. | |
# | |
# Se almacenan además los datos en un archivo csv y se guarda la imagen en formato | |
# png y svg. Los tres archivos en la misma carpeta donde donde esté este archivo, |
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 os | |
import sys | |
import pickle | |
from threading import Thread, Event | |
from time import time, sleep | |
from datetime import timedelta | |
from telegram import Update | |
from telegram.ext import Updater, Filters, CommandHandler, MessageHandler, Job |
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 -*- | |
# https://py.checkio.org/mission/break-rings/ | |
# https://py.checkio.org/mission/break-rings/publications/schcriher/python-3/cute-problem/ | |
# All of the rings are numbered and you are told which of the rings are connected. This | |
# information is given as a sequence of sets. Each set describes the connected rings. | |
# For example: {1, 2} means that the 1st and 2nd rings are connected. You should count | |
# how many rings we need to break to get the maximum of separate rings. Each of the |
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 -*- | |
# https://py.checkio.org/mission/climbing-route/ | |
# https://py.checkio.org/mission/climbing-route/publications/schcriher/python-3/persistence/ | |
# You have an elevation map and you want to know the shortest climbing route. | |
# | |
# The map is given as a list of strings. | |
# - 0 : plain (elevation is 0) |
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 | |
if [[ $# -eq 0 || $# -ge 3 ]];then | |
echo "git cloneall path/url [folder]" | |
exit 1 | |
fi | |
if [ -n "$2" ];then | |
folder=$2 | |
else | |
name=${1##*/} | |
folder=${name%%.git} |
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 | |
minute=5 | |
cache=/tmp/public-ip-cached | |
if [[ ! -f $cache || $(echo "$(stat -c %Y $cache) + $minute * 60 < $(date +%s)" | bc) -eq 1 ]];then | |
wget http://ipinfo.io/ip -qO - > $cache | |
fi | |
cat $cache |
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
javascript:Qr=''+document.getSelection();if(!Qr)Qr=prompt('Diccionario de la Real Academia Española.\nTeclee la palabra que desea consultar:','');if(Qr!=null)location='http://dle.rae.es/?w='+encodeURI(Qr)+' '; |
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
""" | |
Add copy to clipboard from IPython! | |
To install, just copy it to your profile/startup directory, typically: | |
~/.ipython/profile_default/startup/ | |
Example usage: | |
%clip hello world | |
# will store "hello world" |
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
var xLBD = {}; | |
xLBD.c = function (){ | |
xLBD.f = unescape(document.querySelector("[flashvars]").getAttribute("flashvars")).substring(7); | |
xLBD.f = JSON.parse(xLBD.f.substring(0, xLBD.f.lastIndexOf("}") + 1)).video_data[0].hd_src; | |
xLBD.a = "<div style='position:absolute;top:100px;height:300px;left:15%;background:#fff;border:10px solid #000;font-size:5em;padding:100px;'>Click <a download='lookback.mp4' href='"+xLBD.f+"'>here<\/a> to download your lookBack video.</div>"; | |
document.body.innerHTML += xLBD.a; | |
} | |
if(document.readyState == "complete") | |
xLBD.c(); | |
else window.onload = xLBD.c; |
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/env python3 | |
#-*- coding: utf-8 -*- | |
# | |
# Copyright (C) 2013-2017 Cristian Hernán Schmidt | |
# | |
# texdiff.py 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. | |
# |
NewerOlder