Posts by Sergio Nunes • 351 points
37 posts
-
-1
votes1
answer125
viewsQ: format Excel timestamp
Is there any formula in excel for formatting in the timestamp column and move to 1 column type time which is the value that interests me.…
-
3
votes1
answer64
viewsQ: Time to send data
I’m developing a small meteorological station to apply on a farmland, which is to have a temperature sensor, a rain sensor and a humidity sensor to be uncooked later because I don’t have it yet.…
-
0
votes2
answers46
viewsQ: Calling 3-column CSV file in Python
I’m trying to call the file temperature.csv in Python but shows with errors, IE, I wanted to appear the three columns. The code I made was this:: import pandas as pd dataset=…
-
0
votes0
answers269
viewsQ: clear python buffer each time it sends the value
I have an Raspberry sending data every 15 seconds, however I have a value that takes time to update, will cleaning the buffer every iteration in while True solve the problem? my code is as follows::…
-
0
votes0
answers23
viewsQ: Make python file into a library file
I have a python file that I want to transform into a library so I can call it in another file through the import subprocess, for files with extension . c the command I know is cc -o nomeficheiro…
pythonasked Sergio Nunes 351 -
2
votes1
answer140
viewsQ: store the data received from a sensor in a python list
How can I save 100 values received from a sensor in a python list, to later calculate their average? This is the code I have so far: #biblioteca para chamar ficheiros de outra extensão from…
-
-1
votes1
answer192
viewsQ: Run language file c in Python sricpt
I have an analog data acquisition file converted to digital values (in this case the temperature value of the LM35 sensor) with ADC Maxim 1203, I would now like to call the file in a Python script…
-
0
votes1
answer99
viewsQ: Create . JSON file based on the result of the SQL query
I am trying to send data from my database to a . json file but I am not able to because it creates the file and nothing appears, only the empty array. my code is as follows:: <?php $connect =…
-
-1
votes1
answer45
viewsQ: Form registration
I want to create a phpmyadmin php and Mysql user registration service however my code inserts.php is not inserting the records in phpmyadmin and I am not realizing where I am to err in the code,…
phpasked Sergio Nunes 351 -
4
votes2
answers909
viewsQ: Generate float values between -1 and 1
I’m trying to generate values float between -1 and 1 to test if these are within the defined limits to create a vector with the amount of data that only means that I am only able to generate values…
-
1
votes0
answers219
viewsQ: send Arduin integer number with esp8266 to mysql
I have an error when I send via ESP8266, the integer value with the name number, my code is as follows: #include <ESP8266WiFi.h> // Use this for WiFi instead of Ethernet.h #include…
-
0
votes3
answers51
viewsA: send temp_var_node value to Mysql database
Yes because in Uaexpert of Unified Automation also has these values as you can see in the image, IE, wanted to get the Nodesid Value I’m just not getting past the Node Id and the data type, but…
python-3.xanswered Sergio Nunes 351 -
0
votes3
answers51
viewsA: send temp_var_node value to Mysql database
I did the conversion of the variables temp_var_node, altit_var_node and press_var_node in this way: temp = temp_var_node.get_value() print("the temp_var_node is:", temp) time.sleep(1) altit =…
python-3.xanswered Sergio Nunes 351 -
0
votes3
answers51
viewsQ: send temp_var_node value to Mysql database
I want to send the temperature value in OPCUA to the Mysql database, in this case the value of temp_var_node, my code is as follows: import sys sys.path.insert(0, "..") import time import datetime…
python-3.xasked Sergio Nunes 351 -
-2
votes1
answer477
viewsQ: Know if client is connected to the server
I have a client and a server connected through the socket module in python3, on the server side I know when the client is connected, but on the client side I have no message when the client connects…
-
0
votes1
answer23
viewsQ: Adafruit_bmp in python 3
I am testing the BMP180 sensor on Raspberrypi 3 B+ and when I run the file on Raspbian gives me this error: when I run the same file from the command line it gives the values it should give, no…
-
0
votes0
answers42
viewsQ: Connectivity between 2 pi Raspberry via Local Network
How can I connect two pi Raspberry over a local ethernet network, for example send a text from one to the other over the local ethernet network.
-
0
votes4
answers685
viewsQ: Only put the correct message print once
I’m doing this show: Develop a program that requires typing of a CPF number in format xxx.xxx.xxx-xx and indicate if it is a valid or invalid number via validation of check digits and formatting…
-
0
votes1
answer70
viewsQ: Know the smallest number with Function min()
I want to know the smallest number of this list, which I present below the code. I don’t know where I’m going wrong, I think I need to convert the list. Example: lista=[1, 3, 5] def min(values):…
-
-3
votes1
answer97
viewsQ: Error in def function
How can I calculate salary value with number of hours above 40 as defined in the if, I try to run with 41 hours but gives me this error salario = float(40*valor_hora+(h_excd*(1.5*valor_hora)))#valor…
-
0
votes2
answers116
viewsQ: Try and except block
I need to carry out this program: Rewrite your payment program using Try and except for that the program treats non-numeric entries amicably by printing a message and exiting program. The following…
-
0
votes1
answer28
viewsQ: Send data to a pdf and email file
Good afternoon I would like to save data from a form of an html page when users register and commit in a pdf file and be sent to a predefined email but I do not know how to do this, I have the form…
-
1
votes1
answer2967
viewsQ: Figure Legends
I would like to know why a marker in the 2dB column on the 10 0 line appears in the image and how I can eliminate that without erasing the markers on the blue line, which is what I want? The code to…
-
1
votes1
answer24
viewsQ: Article name does not let enter
I want to enter the name of the article only that it does not allow, I already made the same way the scanf as the name of the supplier but does not allow to enter equal #include <stdio.h>…
casked Sergio Nunes 351 -
0
votes1
answer24
viewsQ: Receive a user’s data and show that data at the end
I want to receive the input of a user and at the end I run the program I want to show them, but I think the variable address is not like that, because the program jumps from name to age directly,…
-
2
votes2
answers167
viewsQ: The whole name doesn’t appear
In C language as I can show the whole name when asked to enter the user name, I think it is not correct the definition of the char, my code is this: int main(int argc, char** argv) { char nome[100];…
-
0
votes1
answer39
viewsQ: Graph with values of 2 in 2dB
How can I put these figures in the graph of 2 in 2dB, is coming out of one in one import matplotlib.pyplot as plt #============Ber teórico e Simulado sem repetição==============================…
pythonasked Sergio Nunes 351 -
4
votes1
answer880
viewsQ: View all values of an array
I wonder how I can see all the values of an array when I print this: ber_MFSK = M/2*qfunc(np.sqrt(k*ebno_theory)) print(ber_MFSK) and give me this: [ 1.58655254e-01 1.30927297e-01 1.04028637e-01…
pythonasked Sergio Nunes 351 -
1
votes1
answer396
viewsQ: Wrong square parentheses (square brackets)?
I have this function in Matlab cn = reshape(repmat(sn, n_rep, 1), 1,[]); in Python I have the following code: import numpy as np from numpy.random import randint M=2 N=2*10**8 ### valor de Dados…
-
0
votes0
answers57
viewsQ: Error in converting Matlab to python
I intend to convert the following function into Python: Função Matlab cn = reshape(repmat(sn, n_rep, 1), 1,[]); resultado matlab cn = Columns 1 through 23 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1…
-
0
votes0
answers64
viewsQ: Error correction code (repetition)
I have some questions in this code. I would like if someone could explain to me the functions. from scipy.stats import binom import matplotlib.pyplot as plt import numpy as np r=[2*i+1 for i in…
pythonasked Sergio Nunes 351 -
1
votes0
answers78
viewsQ: Variable not defined
My code gives me an error in a definition of a variable but I think it is declared the variable bits_rx, this variable aims at the result of the conversion: while(1): while not radio.available(0):…
-
0
votes0
answers53
viewsQ: Message Value error
Good afternoon, I got an error message from Coul operands not be broadcast Together with shapes (256,) (268,) image shows the error the code is as follows:: import RPi.GPIO as GPIO from lib_nrf24…
pythonasked Sergio Nunes 351 -
1
votes1
answer461
viewsQ: Store binary variable in list mode
How can I store the binary variable in horizontal line type list mode with all the values coming out in the binary variable. for n in receivedMessage: contador += 1 print (contador)…
pythonasked Sergio Nunes 351 -
1
votes1
answer59
viewsQ: Command finddo Matlab in python?
What is the equivalent in python3.6 of command find of Matlab for this expression? The PDF that I have with some equivalences does not have this command pos = find(sn_til>0)…
python-3.xasked Sergio Nunes 351 -
0
votes1
answer53
viewsQ: error in isempty function
I have a mistake in this role isempty in Matlab, I need when it is empty through a matrix to make the condition after the if isempty: function bn_hat =…
matlabasked Sergio Nunes 351 -
0
votes1
answer318
viewsQ: Typeerror: Len() of unsized Object how to resolve
def invert_map(x): y = _np.empty_like(x) y[x] = _np.arange(len(x)) return y Result gives this in this function : File "E: Anaconda3 lib site-Packages arlpy comms.py", line 74, in invert_map y[x] =…
python-3.xasked Sergio Nunes 351