Questions tagged [python-3.x]

USE ONLY IF YOUR QUESTION IS VERSION-SPECIFIC. For questions about Python programming that are specific to version 3+ of the language. Use the more generic [python] tag on all Python questions. Use the [python-2.x] tags for Python 2 questions.

0
votes
0answers
3 views

stats.linregress not giving me the right slope

I am trying to calculate the 7 days moving average for covid cases. I have a date frame with a column that has all the covid cases and another column that contains the days from the start date. data ...
0
votes
0answers
4 views

How to get smart guess from words list for target words list so the target must be guessed correctly within 3.5 turns on average

i am trying to make Lingo game in python but i am not getting quick output,I use random.choice() to short the list of target words but still the average turn for 6 letters word takes more than average ...
0
votes
0answers
21 views

Maximum Subarray Satisfying Condition

Given an array or a list x, find the largest sub array such that the element satisfies the following condition: x[i] = x[i-1] + x[i-2] If more than one sub array satisfies this condition, then: print ...
0
votes
0answers
10 views

How do I use date formatting in Python to show 4 digits for a small year?

If I understand the date formatting from the Standard Library docs correctly, the following from datetime import date date(1, 2, 3).strftime("%Y-%m-%d") should produce "0001-02-03"...
0
votes
0answers
11 views

How to extract data from multiple xml tags to csv file in python

xml is : <?xml version="1.0" encoding="UTF-8"?> <Page xmlns="http://gigabyte.com/documoto/Statuslist/1.6" xmlns:xs="http://www.w3.org/2001/XMLSchema" ...
0
votes
2answers
22 views

Python script module not found on rerun of script

I am running a python script on RaspberryPi 4, and today when I ran the script again, it showed me the error ModuleNotFoundError: No module named 'adafruit_ssd1306' although I ran this same script ...
0
votes
1answer
19 views

CONNECTION To JUPYTER NETWORK CONFIGURAYION COULDNOT BE ESTABLISHED

I have tried launching jupyter notebook through python 3 but Suddenly for last two days I could not launch it and I get error when opening a notebook as 'connection failed ; A connection to the ...
0
votes
1answer
13 views

Can you please help me to solve the below python question

Evenly Divisible: Create a function that gets three arguments x,y,z as input and return the number of values in the range between x and y(both x and y are included) and evenly divisible by z. Sample ...
0
votes
0answers
9 views

check pattern with DictReader in python

i have a csv file like this : vahid,ajorloo,vahidlogin,ajorloo32@gmail.com,12345 james,statham,jameslogin,jamesmail@gmail.com,1245844 john,patinson,johnlogin,wrong-email-format,412541 ...
0
votes
1answer
22 views

Login URL redirecting issue

When I log into my web application, it doesn't redirect to the custom redirect page created instead it redirects to the default accounts/profile url in Django. Below are my codes : Views.py def ...
0
votes
0answers
4 views

I want to measure perplexity of pretrained_model

I want to measure perplexity of pretrained_model. This pretrained_model is self_made. The code is as follows. import pickle import os import logging logger = logging.getLogger(__name__) logging....
0
votes
1answer
13 views

How can I write each row to a csv file?

I currently have code that is writing to a csv file, however, it keesp replacing the first row of the file and overwriting it instead of writing of it. NOTE: I have this function inside a for loop ...
0
votes
0answers
14 views

Selenium: How to deal with web elements that get hidden when you try to inspect them? Python 3.x related

I'm about to finish developing an automated program on Python and the only thing that's stopping me it's a web element that gets immediately hidden when I try to inspect it from an OpenSea page (can't ...
0
votes
1answer
22 views

How to replace all the border value of matrix with my list clockwise in python

How to replace the border of M matrix with the given list clockwise? This is my Input matrix -M 3 3 1 2 3 4 5 6 7 8 9 (Here 3-rows 3- columns) and this is my list to replace all the border values ...
1
vote
1answer
24 views

How to read csv dataset using shell command?

In my repository I had a shell file get_data.sh with this kind of command: wget --load-cookies /tmp/cookies.txt \ "https://docs.google.com/u.... \ 'https://docs.google.com/...." \ -O train....

15 30 50 per page
1
2 3 4 5
20306