Skip to content

Instantly share code, notes, and snippets.

View lxndr-rl's full-sized avatar
😸

Alexander lxndr-rl

😸
  • Ecuador
  • 06:03 (UTC -05:00)
View GitHub Profile
@lxndr-rl
lxndr-rl / cedulaGen.js
Last active July 12, 2023 04:43
[EC] Genera números de cédulas válidos
const generarCedula = () => {
const provincias = [
"01", "02", "03", "04", "05", "06", "07", "08", "09", "10",
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20",
"21", "22", "23", "24", "30"
];
const tercerDigito = ["0", "1", "2", "3", "4", "5"];
const cuarto_noveno = Array.from({ length: 7 }, () => Math.floor(Math.random() * 10));
let cedula = provincias[Math.floor(Math.random() * provincias.length)] +
@lxndr-rl
lxndr-rl / getPlayerData.py
Last active March 1, 2023 00:24
Obtener datos de lo que se reproduce actualmente en Windows (Nombre, Artista, Álbum, Miniatura)
import asyncio
from winrt.windows.media.control import \
GlobalSystemMediaTransportControlsSessionManager as MediaManager
from winrt.windows.storage.streams import \
DataReader, Buffer, InputStreamOptions
async def get_media_info():
sessions = await MediaManager.request_async()
current_session = sessions.get_current_session()
@lxndr-rl
lxndr-rl / exceltosqlString.py
Created September 14, 2021 02:38
Excel table to Sql insert
import pandas as pd
import sys
if(len(sys.argv[1:]) < 2):
print("Uso: py script.py _NOMBRETABLA_ --uppercase|--lowercase(opcional)")
exit()
try:
argumento = sys.argv[3]
except:
argumento = "invalid"
{
"1": {
"provincia": "AZUAY",
"cantones": {
"101": {
"canton": "CUENCA",
"parroquias": {
"10101": "BELLAVISTA",
"10102": "CAÑARIBAMBA",
"10103": "EL BATÁN",