Measuring real time music volume

I want to control my addressable LEDs depending on the current music’s volume. I need some kind of value like 0-100 depending on the music’s loudness. I thought of measuring the microphone’s volume, but I don’t want to create virtual microphones from speakers. import sounddevice as sd import numpy as np def print_volume(indata, frames, time, … Read more

How can I get over the error of: An error occurred: strptime() takes exactly 2 arguments (1 given) for the following code?

from typing import Self import mysql.connector from mysql.connector import errorcode import datetime import csv import pandas as pd import os from dotenv import load_dotenv load_dotenv() class DataBase: def __init__(self): self.username = os.getenv(“”) self.password = os.getenv(“”) self.endpoint_url = os.getenv(“DB_ENDPOINT”) self.db = os.getenv(“DB_NAME”) self.cnx = None self.cursor = None def connect(self): try: self.cnx = mysql.connector.connect( user=self.username, password=self.password, … Read more

Flutter local notification action button

I’m attempting to add an action button to some of my received push notifications, I’m using Flutter Local Notifications with FCM to listen to incoming data (from my server) and create the notification. Currently, when I tap on the notification, it opens the app (which is okay for me), but I want to call an … Read more

Date format ‘2024-01-19T18:33:16.000000000’ not imputing in BigQuery using format – Field ‘date’ has changed type from DATETIME to TIMESTAMP

I’m trying to move a dataframe from python, with a date column format as ‘2024-01-19T18:33:16.000000000′ to Bigquery. this column also has NaT values. But while pushing this in BigQuery, i have specified the column schema as ‘DATETIME’, but am getting the following error – Field ‘date’ has changed type from DATETIME to TIMESTAMP What is … Read more

Using machine ID as token in SessionID and cookie

I am following this way in cookie, do you think it is correct? 1.when the user first logs in, I encrypt the hard disk serial number of the client machine and store it in the sessionID and save it in the same sessionID sql users table TableUsers > CurrentSessionID {sessionID} > harddiskNo 2.when the user … Read more

Problem calling .NET DLL from Visual Fox Pro

I have the following method that calls a .NET DLL from VFP. n=0 ON ERROR n=1 x = createobject(“Business_Bancos.ApiKhipu_Bancos”) if n=0 ON error &&respuesta=x.prueba() respuesta=x.obtienerespuestakhipu(tipobanco, host, userNamebd, dataBase, puerto, passworddb, valor_banco, UserName, Password, EnterpriseIdentity, Role, Agreement, accountNumber, BookingDateStart, BookingDateEnd) result=respuesta.datos else messagebox(“Error….!!”,16,”Aviso”) ENDIF And in the .net dll, I call the method as follows: public … Read more