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 requests | |
import hashlib | |
import time | |
import pandas as pd | |
import argparse | |
import webbrowser | |
API_ROOT = "http://ws.audioscrobbler.com/2.0/" | |
MAX_RETRIES = 5 | |
RETRY_BACKOFF = 2 # seconds for each trial |
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
# Interfaz gráfica del Script para realizar la explosión de la lista de materiales multinivel | |
import pandas as pd | |
import tkinter as tk | |
from tkinter import filedialog, messagebox | |
from tkinter import ttk | |
from collections import defaultdict | |
class BOMApp: | |
def __init__(self, root): |
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
Function SplitYear01(fechainicio As Date, fechaFin As Date) As Variant | |
Dim fechaActualInicio As Date | |
Dim fechaActualFin As Date | |
Dim finAnoFiscal As Date | |
Dim umatriz As Collection | |
Dim tupla() As Variant | |
Dim i As Integer | |
Dim count As Integer | |
' Crear una colección para almacenar las tuplas |
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
Sub AddNewAccounts() | |
' Desactivar la actualización de pantalla y el cálculo automático para mejorar el rendimiento | |
Application.ScreenUpdating = False | |
Application.Calculation = xlCalculationManual | |
Dim wsParam As Worksheet | |
Dim ws As Worksheet | |
Dim lastRow As Long | |
' Establecer la hoja "param" |
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
Sub SplitExcelFile() | |
Dim ws As Worksheet | |
Dim lastRow As Long | |
Dim i As Long | |
Dim chunkSize As Long | |
Dim outputFolder As String | |
Dim outputFileName As String | |
Dim totalValues As Long | |
Dim chunkCounter As Long | |
Dim chunkValues As Long |
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
# Function to show a folder selection dialog | |
function Get-FolderDialog($initialDirectory) { | |
$folderBrowser = New-Object System.Windows.Forms.FolderBrowserDialog | |
$folderBrowser.RootFolder = [System.Environment+SpecialFolder]::MyComputer | |
$folderBrowser.SelectedPath = $initialDirectory | |
$folderBrowser.ShowNewFolderButton = $false | |
$result = $folderBrowser.ShowDialog() | |
if ($result -eq [System.Windows.Forms.DialogResult]::OK) { |
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
function Calculate-Amortization { | |
param ( | |
[int]$assetNumber, | |
[double]$acquisitionCost, | |
[int]$usefulLife, | |
[string]$usefulLifeUnits, | |
[string]$depreciationStartDate, | |
[string]$capitalizationDate | |
) |
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
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
# Script para scrappear productos de los Supermercados DIA | |
# Necesita tener instalado el parser lxml: sudo apt-get install python-lxml | |
from bs4 import BeautifulSoup | |
from requests import get | |
import locale | |
import re | |
import sys |
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
# install ffmpeg for macOS | |
brew install ffmpeg | |
# invoke ffmpeg while stating that must copy the first stream of metadata | |
ffmpeg -i in.opus -map_metadata 0:s:a:0 out.mp3 | |
# check the out file and verify the metadata |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Table from API with Bootstrap</title> | |
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> | |
</head> | |
<body class="bg-light"> |
NewerOlder