Questions tagged [python-3.x]

1 votes
0 replies
TypeError: 'module' object is not callable Flask JWT
I'm working on a Flask server where we have a route to validate a user's JWT token using the library flask-jwt-extended. This is what our route l...
asked 4 months ago
0 votes
0 replies
Problem with Instagram authentication in Django if user is not logged to instagram beforehand
I have a weird problem with the instagram django_social. If a user tries to login to my application with Instagram I get the error message below...
1 votes
1 replies
Python: Shuffle and put back into initial order elements of an numpy array
I have an array on which I must modify some values. In order to do so, I have to change the order of elements of the array, after having changed...
asked 4 months ago
-4 votes
0 replies
How to generate a multiple nested dictionary from a list? [closed]
This is what I want to get as follows: dic = {'E':{0:{'T':{0:{'F':{0:'i'}},1:{'B':{0:'n'}}}},1:{'A':{0:'+',1:{'T':{0:{'F':{0:'i'}},1:{'B':{0:'+'...
asked 4 months ago
1 votes
0 replies
Pygit2: Need help on how to walk on all commits in all repo's branches
I'd need to walk on entire repo's branches commits. I have tried this but with no success. : for branch_name in list(repo.branches.remote): t...
asked 4 months ago
2 votes
0 replies
How to switch table area coordinates in Python Camelot and Tabula-Py
I have obtained the coordinates of a table bounding box using Camelot, but I need to use tabula-py to extract the table data, as camelot is only...
asked 4 months ago
0 votes
0 replies
How to read specific lines from a single file and write in a same line in new file?
import os post_analysis_log = open("Complete_post_analysis.text",'w') directory='/media/quinn/Joker/Anaysis/KCATBH00' for x in range (1,6):...
asked 4 months ago
1 votes
0 replies
Pyserial: termios.error: (22, 'Invalid argument') while reading from virtual serial port
Is there any posibility to read from virtual serial ports without mentioned error? I'm trying to reach data sent from symbol/zebra barcode scann...
3 votes
3 replies
Function on dataframe rows to reduce duplicate pairs Python
I've got a dataframe that looks like: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 13 13.4...
asked 4 months ago
-2 votes
2 replies
How to comma separate an array of integers in python? [closed]
I have a list of integers, i want to convert them into comma separated integers, how can i actually achieve that The result should have comma se...
asked 4 months ago
1 votes
1 replies
Function doesn't work anymore if run by more than one time in Python 3.7
I'm dealing with some simulations in Python and I have the following code: import numpy as np import matplotlib.pyplot as plt from statsmodels.s...
-1 votes
1 replies
How to fix “name 'self' is not defined” error in python?
I'm trying to learn python OOP, I am stuck with the error below. Exception has occurred: NameError name 'self' is not defined File "/home/khal...
asked 4 months ago
1 votes
1 replies
Shared dict across multiple processes is not being updated [duplicate]
This question already has an answer here: multiprocessing: How do I share a dict among multiple processes?...
asked 4 months ago
1 votes
2 replies
Ticks not showing correctly on colorbar
With the following code: import matplotlib.cm as cm from matplotlib import colors import matplotlib.pyplot as plt colormap = cm.YlOrRd norm =...
asked 4 months ago
1 votes
1 replies
Replace duplicate set of values with NaN
If I had the following data: +---------------+---------------------+---------------------+----------+--------------+ | email | date_open...
asked 4 months ago
-1 votes
0 replies
Python How to open another script and make it active
I want to open a python script via another .pyw script I tried os.system("script.py") and it works but when it opens the script it's not active...
asked 4 months ago
0 votes
1 replies
Decrypting environmental variables in AWS Lambda not working in Python 3.6
I have encrypted an environmental variable in an AWS Lambda function with an AWS KMS. Then I have tried to decrypt the variable in code using the...
asked 4 months ago
0 votes
1 replies
WebScraping: Get nested element in HTML Table
Hi I am new to webscraping and got stuck on getting nested html element tag in a table, here is the html code I get from the url http://www.geona...
asked 4 months ago
0 votes
1 replies
How to define an initializer in a PyMODM model class
I would like to have a custom initializer for my PyMODM class. Doing it the straightforward way class MyModel(MongoModel): fields = ......
asked 4 months ago
1 votes
1 replies
Overlapped predictions on segmented image
Context and examples of symptoms I am using a neural network to do super-resolution (increase the resolution of images). However, since an image...
-1 votes
2 replies
How do I give boolean value to decide is my timestamp is holiday and weekends or not in Dataframe in python
I have a dataframe calendar, it contains date and is holiday or not. I have another dataframe contains datetime timestamp, and i want to check e...
1 votes
0 replies
Retrained model(test_new) from previously created keras-cnn-sequential model(test) has reduced size on local disk. Is this correct?
I had created created the model for 16 labelled images , all placed 1 local directory.This model size is 300MB on my local disk. Now I have incre...
0 votes
0 replies
Animate Array Heatmap in real time
With Python3, Numpy, Matplotlib, Anaconda, Spyder: I have an array that changes over time, and I want to animate its heatmap. Now I already found...
asked 4 months ago
1 votes
1 replies
How to fix “Permission Denied” in pyglet
I'm making a simple program that displays a single image on the screen, but while it tries to look for the file, it gives me an error saying that...
asked 4 months ago
-3 votes
0 replies
I want to make write sth with python in another file and then I want to import it's variable to the first file [closed]
I want to make a python file which writes variable a=2 in another python file and then I want to import its variable to the first python file. H...
asked 4 months ago