Skip to main content
9 votes
1 answer
24k views

I wanted to make a very simple proxy using python (mostly to understand how it works). I am talking about a generic TCP proxy, not only http. I have built the following code, however, it seems to only ...
56 votes
6 answers
29k views

I have a number of classes which all share the same methods, only with different implementations. In Java, it would make sense to have each of these classes implement an interface or extend an ...
2 votes
3 answers
10k views

I want to sign in Amazon.com with Python. But I can't do it even if I use requests.Session() , because I can't "Enable Cookies". Could you tell me how to fix the code? Why "dict(response.cookies)" ...
7 votes
3 answers
3k views

I have a large Python test file using unittest that I run from the command line. Some tests take a while to run. This is a mild pain point, because I'm often only concerned with the last test I added....
0 votes
1 answer
45 views

i understand this is seemingly simple im a beginner i apologize if ive wasted anyones time but im pretty lost rn heres my code print ("you awaken in a dark room") print ("you look to ...
2 votes
1 answer
1k views

Say if Appium throws a webdriver exception error, only then that specific test should rerun in pytest.
10 votes
3 answers
24k views

In my scenario, I have one test that writes a file, and one (but potentially many more) tests that would want to read that file. I cannot simply extract writing that file to a function/fixture, ...
Best practices
2 votes
5 replies
66 views

I have a few python scripts that I want to run on a small raspberry pi project I've been working on and I want to use a launcher or something so I can launch them without a pc or anything does anyone ...
0 votes
3 answers
3k views

I want to export a ppt slide as an png format image through pptx python. I have gone through this solution using win32com but facing error as com_error: (-2147221005, 'Invalid class string', None, ...
10 votes
1 answer
10k views

I am trying to train a resnet network using keras backend in tensorflow. The feed dictionary for each batch update is written as: feed_dict= {x:X_train[indices[start:end]], y:Y_train[indices[...
Advice
0 votes
3 replies
32 views

I'm new to coding, and I'm trying to use VS code to learn Python. I had an issue when I ran the debugger. I got some extra output showing something like this: PS C:\Users\user\Desktop\Python\oops> ...
6 votes
1 answer
6k views

Out of sudden, py.test --last-failed skips a lot of tests although no test failed in a previous test run. Here is the output of first running py.test --vv and then py.test --vv --last-failed: venv/bin/...
1 vote
1 answer
26 views

I am trying to setup a distributed environment for NLP processing. I use Ray and Python on GCP. I have a master and several workers. What happens is that when I run 1 worker or 8 workers, it takes ...
Best practices
0 votes
1 replies
21 views

I'm new. Is it best practice to make a list of the variable's "namespace," and if so, what are some of the methods to track them that others might use? Are there other things that should be ...
1 vote
1 answer
27 views

I have an intersting error. I'm starting learning Machine Learning by Tensorflow Keras CV tutorials and two of my tutorial projects working incorrectly I use this tutorials: https://www.tensorflow.org/...

15 30 50 per page
1
2 3 4 5
147183