Category "python"

Python SMTP Email WITH TITUS Classification

I am relatively new to Python and am looking to automate a few emails with Python at my company. I have working code to send emails using MIME, but my company r

SQLAlchemy use calculated column

I want some code like below: distance = (Robot.pose_x)**2 + (Robot.pose_y)**2 robot_filtered = session.query(Robot).filter(distance > 100).all() But it give

Using already existing container python interpreter as PyCharm interpreter

I have latest PyCharm installed. I have a docker container and I want to use its python interpreter as my project interpreter. Note that I don't want PyCharm to

not able to install dask on google colab

I use pip method to install on google lab. But I am not sure why it is not working. Here is what I got code pip install "dask[dataframe]" --upgrade error Requi

Java wrapper for Python library?

I am trying to call Robinhood API methods from Java. I have tinkered with Jython, and just writing the code in Python, but I would much rather write the code in

My Kali linux showing 'No module named importlib' 'from importlib import import_module'

Trying to install build dependencies with pip which is installing in /usr/local/lib/python2.7/dist-packages As I try to install proceed gives an error Collectin

azure function is not working in azure cloud but working in local. giving error in python script

import datetime from distutils.log import log import logging import os import azure.functions as func def main(mytimer: func.TimerRequest) -> None: utc_

Unable to reproduce results for spherical grid in FIPY

I'm trying to reproduce a result from this post (considering fixes provided in answer by jeguyer). But when I try to run the exact same code I receive the follo

What is the maximum character count that can be stored in a csv column?

I'm saving a large list (list of strings/paragraphs) in a csv's column. I can see some that for some rows, where the data is supposed to be huge, the column is

Opencv facing an error for tesseract module not found even after installations

Opencv facing an error for tesseract moule not found even after installations pip install tesseract opencv reinstallation also done but it wont work. opencv i

Version automation with github actions

I started recently with learning poetry and templates with cookiecutter for my python projects. In the template I use the developer of the template used a follo

numpy.core.multiarray failed to import after installing asammdf package

I try to read the mf4 file which has acoustic signal. from asammdf import MDF data = MDF('file1.mf4') The packages that I installed are asammdf 7.0.7 numpy

gpiozero.exc.PinPWMUnsupported: PWM is not supported on pin GPIO7 (Raspberry Pi 4B)

I am working on my first Raspberry Pi project while following a course for creating a line-following robot. This is the course. I followed all the instructions

model training got stuck after first epoch got completed...2nd epoch won't even start and not throwing any error too it justs stay idle

screenshot showing the model training stuck at epoch 1 without throwing error I am using google colab pro and here is my code snippet batch_size = 32 img_heigh

Problem in fetching long URLs using BeautifulSoup

I am trying to fetch a URL from a webpage, here is how the URL looks in the Inspect section: Here is how the URL looks in my python-code: How can I get the ac

Negative dimension size caused by subtracting 3 from 1 for 'conv2d_2/convolution'

I got this error message when declaring the input layer in Keras. ValueError: Negative dimension size caused by subtracting 3 from 1 for 'conv2d_2/convolu

Write a function that takes in a list of integers and returns True if it contains 007 in order but they don't have to be consecutive

examples : 1.spy_game([1,2,4,0,0,7,5]) --> True 2.spy_game([1,0,2,4,0,5,7]) --> True 3.spy_game([1,7,2,0,4,5,0]) --> False

Efficiency of multiple chained str transformation and alternatives

I'm wanting to change a dataframe column so the values are lower case and also have their whitespace stripped. For this I used chained str transformations. df.l

Process the output of python subprocess

I'm trying to make a system call in Python and store the output to a string so that I can process it in my Python program.To be more specific of what i am doing

Set 'global' colorbar range for multiple matplotlib subplots of different ranges

I would like to plot data in subplots using matplotlib.pyplot in python. Each subplot will contain data of different ranges. I would like to plot them using pyp