This file contains hidden or 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 -*- | |
| # Script para Notepad++ usando el plugin PythonScript | |
| # Formatea tablas con columnas delimitadas por comillas dobles, manteniendo las comillas. | |
| # Se aplica a todo el contenido de la pestaña Notepad++ actual. | |
| # Deja sólo dos espacios entre el final del elemento más largo y la siguiente columna. | |
| # | |
| # "COL1" "COL2" "COL3" "COL1" "COL2" "COL3" | |
| # "VALUE1____________""" "VALUE3" --> "VALUE1____________" "" "VALUE3" | |
| from Npp import editor |
This file contains hidden or 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
| /* Optimizada con analytic functions (un pase por analytic function como mucho, no consulta anidada fila a fila: */ | |
| WITH RankedOperations AS ( | |
| SELECT | |
| ID, | |
| ASS_ID, | |
| FECHA, | |
| TIPO, | |
| -- Asignamos un número de secuencia a cada operación dentro de cada ciudadano | |
| ROW_NUMBER() OVER (PARTITION BY ASS_ID ORDER BY FECHA, ID) AS rn | |
| FROM |
This file contains hidden or 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
| SELECT | |
| CASE | |
| WHEN GROUPING(REGION) = 1 THEN 'TOTAL GENERAL' | |
| ELSE REGION | |
| END AS REGION, | |
| CASE | |
| WHEN GROUPING(PRODUCTO) = 1 THEN 'TOTAL REGIÓN' | |
| ELSE PRODUCTO | |
| END AS PRODUCTO, | |
| SUM(IMPORTE) AS TOTAL_VENTAS |
This file contains hidden or 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
| # Remember str are immutable objects | |
| # IMPORTANT: only worth it for really long strings! | |
| # otherwise just use += | |
| # Summary: Append them to a list, join them with "".join() | |
| charlist = [] | |
| text = '' | |
| # it would also work for words, sentences, ... | |
| for char in text_to_loop: |
This file contains hidden or 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 matplotlib.pyplot as plt # we only import pyplot | |
| month_number = [1, 2, 3, 4, 5, 6, 7] | |
| new_deaths = [213, 2729, 37718, 184064, 143119, 136073, 165003] | |
| plt.plot(month_number, new_cases) | |
| plt.ticklabel_format(axis='y', style='plain') | |
| plt.title('New Reported Cases By Month (Globally)') | |
| plt.xlabel('Month Number') | |
| plt.ylabel('Number Of Cases') |
This file contains hidden or 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 csv | |
| file = open('dq_unisex_names.csv') | |
| file_reader = csv.reader(file) | |
| rows_list = list(file_reader) | |
| file.close() | |
| header = rows_list[0] | |
| data = rows_list[1:] |
This file contains hidden or 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
| # Set default behavior to automatically normalize line endings to LF in Git repo. | |
| * text=auto | |
| # Force batch scripts to always use CRLF line endings so that if a repo is accessed | |
| # in Windows via a file share from Linux, the scripts will work. | |
| *.{cmd,[cC][mM][dD]} text eol=crlf | |
| *.{bat,[bB][aA][tT]} text eol=crlf | |
| # Force bash scripts to always use LF line endings so that if a repo is accessed | |
| # in Unix via a file share from Windows, the scripts will work. |
This file contains hidden or 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
| PROJECT_DIR=/home/pentaho/projects | |
| KETTLE_REDIRECT_STDERR=Y | |
| KETTLE_REDIRECT_STDOUT=Y | |
| KETTLE_MAX_LOGGING_REGISTRY_SIZE=10000 | |
| KETTLE_LOG_MARK_MAPPINGS=Y | |
| KETTLE_JOB_LOG_SCHEMA=pentaho_dilogs | |
| KETTLE_JOB_LOG_DB=live_logging_info | |
| KETTLE_JOB_LOG_TABLE=job_logs |
This file contains hidden or 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
| Personal | |
| ======== | |
| * DataScience - Notes.ipynb | |
| https://colab.research.google.com/drive/1gCPFfHLs3lYwCtShLN2SyarnWHoNNpxM | |
| * Python - NumPy y Pandas.ipynb | |
| https://colab.research.google.com/drive/1mRxlACazsHY4Iyp54vXtYNZRzTJTlT5r | |
| * Data Science - Problem Solving strategies and tricks.ipynb | |
| https://colab.research.google.com/drive/1NsBqiLOBY46U0bgPrx0Kpk207rhhGtdJ | |
| * RM - Google Colab Cheatsheet.ipynb | |
| https://colab.research.google.com/drive/1l1a9R884hNLwIhBk75FB0z95zmuTsMe4 |
This file contains hidden or 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
| https://www.mssqltips.com/sql-server-tip-category/52/sql-server-management-studio/ |
NewerOlder