Category "python"

Convert GMT_timezone to local datetime in python

I have a date with GMT with different timezones +6 & +5 gmt_time6= "2022-05-06T15:11:29.695GMT+06:00" gmt_time5 = "2022-05-06T14:11:29.785GMT+05:00" How to

Moving window between monitors when using multiple desktops

The following script moves window from my left monitor to the right monitor (2560x1440 each) win = win32gui.GetForegroundWindow() winPlacement = list(win32gui.G

Operate on .dat file, pickle mod

I have project to do in my studies and it is my first project in Python. I must create simply program for bank. With GUI I'm creating an account on classes and

django - How to auto-populate existing data in django form while updating

I want to auto populate my update form in django with the existing data, but instance=request.user and instance=request.user.profile seems not to be auto popula

Django - Add a confirmation email fuction [closed]

Create user page image So I have a fully working signup page so far. I want to add a simple confirmation email function, that sends an email t

Issues with selecting #text inside an html, div enclosed in double quotes using xpath/lxml in python

I'm trying to extract the Fund Summary text on the following Yahoo Finance page using python: Thus far, XPath has worked well using the XPath with the text() me

Training custom object detection train_spec and eval_specs[0] not found

I'm trying to train a custom object detector using tensorflow on google colab using this Building your own object detector — PyTorch vs TensorFlow and how

Django app runs locally but I get CSRF verification failed on Heroku

My app runs fine at heroku local but after deployed to Heroku, every time I try to login/register/login as admin, it returns this error shown below. I have trie

Swapping variables in python with a function

I need to write a program whose input is two integers and whose output is the two integers swapped. If input is: 3 8, output is 8 3. The program must define and

I can't donwload complete genome of Culex pipiens pallens of the ncbi by API (Entrez): HTTP Error 400: Bad Request

I am trying to download the genbank if possible of the complete genome of Culex pipiens pallens from the ncbi but I get this error. The URL of de ncbi. In the d

Python redis-py multiprocessing: TypeError: cannot pickle '_thread.lock' object

I'm trying to parallelize a function in python which interacts with redis using redis-py package. To achieve this task I'm using multiprocessing pool, however I

can't convert cuda:0 device type tensor to numpy

As metioned in the title, I am getting this TyperError for the following code I am using google collab and is set to GPU runtime type. %%time history = [evaluat

Python 3.8.0 Setup Failed - 0x80070666 Another version of this product is already installed / No Python installation detected

I installed 3.8.7, the dependencies didn't match up with the project I was trying so I uninstalled 3.8.7 and wanted to try 3.8.0. I get this error every time. T

Sharing an Oracle table among Spark Nodes using Python

I have an huge Oracle table to process, so I define a list of where clauses to read by each Spark node. In the middle of the processing I need to join the data

python plotly smith chart function behaviour is different from scikit-rf

Can someone explain why this two smith chart plot function for exactly same circle of plotly and scikit-rf are so different? And how can I make plotly plot like

Python2.7 no smb module. Cant locate

Running kali 2020, I am trying to run CVE-2007-2447 which is a python2.7 script, which says: import smb from smb.SMBConnection import SMBConnection I saved th

How do you get and use a Refresh Token for the Dropbox API (Python 3.x)

As the title says, I am trying to generate a refresh token, and then I would like to use the refresh token to get short lived Access tokens. There is a problem

Testing in pandas library: Why is function style chosen over class based testing?

Why is functional style testing facilitating testing compared to class based testing? Is this just additional library specific functionality or are there any ge

How to train a model to predict picks using multiple independent dataframes?

I have a dictionary of 100+ dataframes all have the same shape [9999 rows x 4 columns] with the following columns: ['time', 'response', 'arrival_1','arrival_2']

How to train a model to predict picks using multiple independent dataframes?

I have a dictionary of 100+ dataframes all have the same shape [9999 rows x 4 columns] with the following columns: ['time', 'response', 'arrival_1','arrival_2']