Posts by Absolver • 462 points
14 posts
-
1
votes1
answer45
viewsA: Transform Pandas str objects into numeric values
This "string" that refers is actually a list of lists, or can be interpreted as an array as well, to do what you ask, just go through the list, and assign every value in the Dice '0' of each item,…
-
3
votes1
answer94
viewsA: What are the differences between ways of manipulating huge strings with Python?
Observing the documentation Regarding the tempfile module it is possible to resolve some of your doubts. This library is used for the creation of temporary files and directories, and for simple uses…
-
3
votes1
answer13445
viewsA: Command errored out with Exit status 1: python setup.py egg_info
Oops, so man the error that is returning there that deserves attention is as follows: ModuleNotFoundError: No module named 'ConfigParser' And there may be reasons for that. The most likely would be…
-
1
votes1
answer198
viewsA: Thread with python loading
Your logic is right, in trying to finish one Thread using another, but there is a substantial error in the code, when you indicate within the work function that the done = True he will be True just…
-
1
votes1
answer252
viewsA: Detect color in an area with Pyautogui
Currently there is no functionality to detect the color of an area with Pyautogui, but there are some solutions using existing functions. If your goal is to identify the predominant color of a…
-
1
votes2
answers181
viewsA: Import of python modules
Well, man I ran your code in my IDE, and initially the first error was regarding the name of the function you assigned in "JSON.py", the name json() cannot be used when you care about the json…
-
1
votes2
answers2065
viewsA: Display the sum of each row of a randomly generated matrix
Greetings, my friend ! I ran your code here, to implement what is asked directly on it, and well, I’ve created the following function that does exactly what you’re asking, take a look at it, it’s…
-
1
votes1
answer2830
viewsA: Converting Bases to Python
Oops, greetings! Dude there is an easier way to convert numbers on different bases to integers on decimal basis, I’ll give you an example below: Below is a conversion of a binary number(String) to…
-
2
votes1
answer107
viewsA: Python: Access 4th level of a zipped folder
Good afternoon, Wilson ! So dude, your question has some holes as to why you do what you’re asked and there are ways to develop that you don’t need automation when it comes to harvesting files…
-
0
votes1
answer100
viewsA: How to replace a float element with a string in a zeroed array?
You have to define the type of the array you are creating so that it can accept a string, or a character: When setting the array type to S1, it will only save the first character of the string:…
-
0
votes1
answer54
viewsQ: Doubt about openCV training
In a machine learning one must separate the data in 3 sets, one for training, another for validation and another for tests with relative quantity to 70%, 15% and 15% respectively. However my doubt…
-
3
votes1
answer551
viewsA: Measure CPU or Memory usage of a windows program in Python
Good afternoon, Thiago! To library psutil provides information about the system, such as memory usage and cpu. You would start by installing this library in your python virtual environment, using…
-
1
votes1
answer96
viewsA: Assigning values to repeating variables
Your comments regarding the code are indeed pertinent, and should be done in this way, because it is commented so that others can understand or even to you understand. No matter how much programming…
-
1
votes1
answer579
viewsA: Problems with the vscode interpreter
When an import is done using.name ' is a relative import, which only works if the "parent module" (Parent module) is imported together. Example: `from Twitter.searchTweets` You are importing the…