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
""" Download files from a DirectoryIndex. | |
""" | |
from requests_html import HTMLSession | |
from os import path | |
from urllib import request | |
import shutil | |
def download_files(url_repo: str, out_path: str): | |
"""Download in `out_path` all files of DirectoryIndex in `url_repo`. |
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 bash | |
# usage: bash wget_custom.sh | |
# Put this file in the same directory of `frm` files with unique URL to download. | |
# Downloades file has the same name of `frm` file but the extension is `txt`. | |
# Answer to AskUbuntu question: https://askubuntu.com/questions/1196228/wget-from-file-and-save-as-acording-to-file-name | |
SAVEIFS=$IFS | |
IFS=$'\n' | |
files=$(ls -1 *.frm) |
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
[+] acérrimo | |
acérrimo, ma. | |
Del lat. acerrĭmus. | |
1. adj. sup. de acre2. | |
2. adj. Muy fuerte, vigoroso o tenaz. | |
3. adj. Intransigente, fanático, extremado. | |
[+] acérrimos | |
acérrimo, ma. | |
Del lat. acerrĭmus. | |
1. adj. sup. de acre2. |
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
[+] abarrocado | |
abarrocado, da. | |
1. adj. Que presenta rasgos barrocos. Estilo, vestido abarrocado. | |
[+] abarrotamiento | |
abarrotamiento. | |
1. m. Acción y efecto de abarrotar (‖ llenar por completo un espacio). | |
[+] abocardamiento | |
abocardamiento. | |
1. m. Acción y efecto de abocardar. | |
[+] abochornante |
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 bash | |
SAVEIFS=$IFS | |
IFS=$'\n' | |
FILES=$(find . -iname "$1") | |
for FILE in ${FILES[@]}; do | |
DIRECTORY=$(echo $FILE | sed -n -E 's/^(\.?\/?(.+\/))?(([^\/]+)(\.([^\.\/]+))?)$/\1/p') | |
FILENAME=$(echo $FILE | sed -n -E 's/^(\.?\/?(.+\/))?(([^\/]+)(\.([^\.\/]+))?)$/\3/p') | |
FILENAME_NORM=$(echo $FILENAME | sed -E -e 's/./\l\0/g' -e 's/( |_)+/_/g' \ | |
-e 's/^_//' -e 's/(_|-)\./\./g' -e 's/\.\./\._/g') | |
if ! [[ "$DIRECTORY$FILENAME" = "$DIRECTORY$FILENAME_NORM" ]]; then |
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 | |
# author: Edward Villegas-Pulgarin (@cosmoscalibur) | |
# Scraping web site and convert to markdown format. | |
# Extract product catalog. | |
# June 28, 2017. | |
# Last test: June 22, 2019. | |
import requests |
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
conda create -y -n pyinstaller python=3.6 | |
conda activate pyinstaller | |
pip install pyinstaller | |
echo 'print("hola mundo")' > hola.py | |
pyinstaller --onefile hola.py | |
./dist/hola |
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
""" | |
This script help you to list your conda environments and install packages in multiples environments. | |
You need conda package manager installed (Anaconda/Miniconda) and Python Anaconda. | |
:Authors: | |
Edward Villegas-Pulgarin <cosmoscalibur at gmail dot com>. | |
""" | |
#%% |
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
""" | |
This script help you to download the large collection of Spanish books included | |
in `Guttenberg project <https://www.gutenberg.org/browse/languages/es>`_. | |
You need to install `requests-html <http://html.python-requests.org/>`_. | |
:Authors: | |
Edward Villegas-Pulgarin <cosmoscalibur at gmail dot com>. | |
""" | |
from requests_html import HTMLSession |
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 bash | |
# Rutina elaborada por Edward Villegas Pulgarin (@cosmoscalibur en github). | |
# Genera lista de lemas de nombres propios colombianos para diccionario hunspell | |
# a partir de una lista de nombres compuestos en archivo de texto plano, comparando | |
# con los topónimos y nombres propios ya incluidos. | |
# El archivo debe ubicarse en el directorio de la localización. | |
# Realizado para la localización es_CO de [RLA-ES](https://github.com/sbosio/rla-es). | |
# $1: Nombre del archivo de listas de nombres |
NewerOlder