We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [python-3.x]

For questions about Python programming that are specific to version 3+ of the language. Use the more generic [python] tag if your question is not version-specific. Use the [python-2.x] tags for Python 2 questions.

Filter by
Sorted by
Tagged with
0
votes
1answer
130 views
+50

how to create 2 level admin users in django where each user will administer only the users he creates?

I need to create more than 1 admin user who can administer roles/permissions to only the users he creates in django.This admin should be able to see only the users he creates and not the users created ...
0
votes
3answers
261 views
+100

Can't modify a function to work independently instead of depending on a returned result

I've written a script in python making use of proxies while sending requests to some links in order to parse the product name from there. My current attempt does the job flawlessly. This function ...
1
vote
2answers
67 views
+100

Python3 Failed to establish connection socket.gaierror: Name or service not known

I am trying to run an email harvester, when I enter the url manually without the loop, I do not have any connection errors. import re import requests import requests.exceptions from urllib.parse ...
0
votes
0answers
22 views
+50

Is it possible to generate calculated plots/data from an interactive Bokeh plot?

I have a plot where there are some fixed theoretical points and the experimental points are plotted using a combination of multi-select buttons. Is there a way I can generate data of the %error ...
0
votes
2answers
92 views
+100

Why, after login by my own view, user is logged in on admin site but not on my views? Django

I have situation where I wanted to check if my app works on production. When I start app locally, everythink works, but on production when I use my login form, user is logged in on django admin site, ...
0
votes
1answer
106 views
+50

How to get a specific number of group after applying groupby?

I have more than 1000 groups with different id and I only need to select a specific number of groups and read the nth number of every group. Here an example of what I need: import pandas as pd import ...
0
votes
3answers
92 views
+50

How to find all the JavaScript requests made from my browser when I'm accessing a site

I want to scrap the contents of LinkedIn using requests and bs4 but I'm facing a problem with the JavaScript that is loading the page after I sign in(I don't get the home page directly), I don't ...
0
votes
1answer
48 views
+100

Error on prediction running keras multi_gpu_model

I've an issue running a keras model on a Google Cloud Platform instance. The model is the following one: n_timesteps, n_features, n_outputs = train_x.shape[1], train_x.shape[2], train_y.shape[1] ...
0
votes
1answer
35 views
+50

How to use watchdog and do something in the main thread if a folder is modified?

I was looking for a watchdog and I found this great library. I need to fit a DBSCAN model if a file is created in a folder. Joblib is used in the scikit-learn's DBSCAN implementation and joblib doesn'...
5
votes
1answer
188 views
+100

How to hide command prompt popup during launching PyLatex or Latexmk

How could I hide command prompt that pops up during launch and execute pylatex codes. I have a page working on it and generate pdf. I need to hide popup window when I run the code. Talking about ...
-2
votes
0answers
36 views
+50

Searching through large data files by python

I have large data files of several Gb in size that I have to run the python script against. Possibly search for text and generate lists/sets. How can I handle large csv/txt files, read through them, ...
0
votes
1answer
28 views
+50

Show select field based on some other select option in flask

I am creating a flask form where I need to show a dropdown based on some other dropdown select field in Flask. I was able to do it with HTML, but finding it difficult to do the same in Flask form. ...
1
vote
0answers
38 views
+50

Python mock multiple queries in a function using pytest_mock

I am writing unit test case for a function which has multiple sql queries in it.I am using psycopg2 module and trying to mock the cursor. app.py import psycopg2 def my_function(): # all ...