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
def eval_fun(f, **args): | |
''' (str, dict) -> object | |
f: Function as string. | |
args: dictionary with arbitrary variables. | |
Use arbitrary args in **args to eval general functions. | |
Examples: | |
>> eval_fun('x**2',x=5) | |
25 | |
>> eval_fun('x*y', x=3, y=2) | |
6 |
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: delrepeat STRING_PATTERN | |
## Example: delrepeat "*.mp3" | |
## IFS=$' \t\n' # default | |
SAVEIFS=$IFS | |
IFS=$'\n' | |
files=$(find . -iname "$1") | |
declare -a hashes | |
removed=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
#! /usr/bin/env bash | |
# Rutina elaborada por Edward Villegas Pulgarin (@cosmoscalibur en github). | |
# Genera lista de lemas de topónimos colombianos para diccionario hunspell a partir del reporte de DIVIPOLA. | |
# Realizado para la localización es_CO de [RLA-ES](https://github.com/sbosio/rla-es). | |
A=departamentos | |
B=municipios | |
C=centros_poblados | |
l=lista- |
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 |
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
""" | |
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
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
#! /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
#! /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
[+] 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 |
OlderNewer