Why don't suggestions appear after the dot symbol in some Python libraries?...
When I try to call suggestions after the dot symbol in some Python libraries, they do not appear as in the picture enter image description here, and I have to use the dir() method, and I feel that this...
View ArticlePython pyodbc BACKUP DATABASE TO DISK getting default MSSQL backup path added
I'm writing Python to backup MS SQL database to a different server. When I put the //remoteServer/share/filename into command, I get:pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][ODBC SQL...
View ArticleHow to traverse nested JSON object and delete/modify them using Python after...
Given XML, I need to convert it to JSON and modify the JSON object.<?xml version="1.0" standalone="yes"?><!--COUNTRIES is the root element--><WORLD><country name="A"><event...
View ArticleArray value must start with "{" or dimension information when excute_values...
My codesfrom psycopg2.extras import Jsonfrom psycopg2.extensions import register_adapterregister_adapter(dict, Json)data = [{'end_of_epoch_data': ['GasCoin', [{'Input': 5}, {'Input': 6}, {'Input':...
View ArticleNameError: name 'train_gen' is not defined [closed]
I'm new to python and tensorflow. I'm now testing Improved WGAN code from https://github.com/igul222/improved_wgan_trainingAfter adjusting the code to python 3.6, it still gives "NameError: name...
View Article3D interpolation of data in python limiting the fitted function to only be...
I have the following data:x = array([ 0, 0.08885313, 0.05077321, 0.05077321, 0.03807991, 0.03807991, 0.03807991, 0.02538661, 0.02538661, 0.0126933 , 0.0126933 , -0. , -0. , -0.0126933 , -0.0126933 ,...
View ArticleExtract the captcha image with opancv and pyteserract. can any one suggest me...
pytesseract.pytesseract.tesseract_cmd = r'/usr/bin/tesseract'original_image = cv2.imread('download (1).png')grey = cv2.cvtColor(original_image, cv2.COLOR_RGB2GRAY)height, width =...
View ArticleUnable to import 'matplotlib.backends.backend_qt6agg' in PyQt6 application
My code Python:from PyQt6.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget, QPushButtonimport sysfrom matplotlib.backends.backend_qt6agg import FigureCanvasQTAgg as FigureCanvasimport...
View ArticleIs this a pandas dataframe filter bug?
I am working in pandas with a sql database;I have a production dataframe similar to this:DATEMACHINE_IDTYPEIS_NULLDate 1Id 1150Date 2Id 271I'm trying to clean the data so I'm doing some filtering.I...
View ArticleHow would I use html, csss as gui for my python program? [closed]
I want to make a Minecraft Launcher, but I'm bad at making UI in python, so I would like to know how to render html, css but let's say I clicked a button, I want to run the button in python. I do not...
View ArticlePython Project only taking env variables that were initialized at the very start
I am trying to use some variables using:settings.pyfrom dotenv import dotenv_valuesconfig = dotenv_values("/etc/env/env_file")Content of env_file:TOP_MAX = 12KEY = valueIt works fine at first, loading...
View ArticleApache Nifi and rest api using template instantiate problem
I am new to Apache Nifi would like to receive some help from you all, past 2 days I am trying to instantiate template into my process group using rest api through a python file. I am able to create...
View ArticleThe shapes of image read from CV2 and Pillow are different
I have an image read from cv2.imread, the shape is (2320, 1744, 3). However, when I use Pillow, the results are very different:a = PIL.Image.open('mypic')a.size # => (2320, 1744)b =...
View Article"agent_node() got multiple values for argument 'agent'" when extract...
I'm running the example LangChain/LangGraph code for "Basic Multi-agent Collaboration." I got the example from here (Github). There is also a blogpost/video.After configuring my local virtual...
View ArticlePerformance with global variables vs local
I am still new to Python, and I have been trying to improve the performance of my Python script, so I tested it with and without global variables. I timed it, and to my surprise, it ran faster with...
View ArticleWhy can't the Python interpreter find the opencv installed in the virtual...
My python version in my virtual environment is 3.9.18.This is the code running on the terminal,OEM is the name of my virtual environment.(base) PS F:\OEM-Fewshot-Challenge\OEM-Fewshot-Challenge\src>...
View ArticleValueError: time data 'x' does not match format '%d-%m-%Y' (match) when using...
Very simple question but I can't seem to find an answer. The date format in my CSV is in mm/dd/yyyy format specifically 1/16/1962 but i am trying to get it to change to a display of dd/mm/yyyy . But...
View ArticlePandas 'isin' or 'merge' function with multiple columns and dataframes...
I have 2 dataframes:d1={'A':[1,3,5,7,8,4,6],'B':[6,4,3,8,1,7,4], 'C':[2,5,8,9,8,4,7]}df1=pd.DataFrame(data=d1)d2={'a':[2,8,6,5,7],'b':[6,4,9,3,2]}df2=pd.DataFrame(data=d2)Now, I would like to see which...
View ArticleHow do I assign attachments file to create post using Wordpress REST API in...
I use this tutorial 1 ,tutorial 2 and create new posts in python code, with below json: post = {'title' : title, 'status' : 'publish', 'content' : 'Hello this is content of my post.','categories': 5, #...
View ArticleHow to convert a list of dictionaries to a tensorflow dataset?
I have a .jsonl dataset that I am trying to convert into a tensorflow dataset.Each line of the .jsonl is of the form{"text": "some text", "meta": "irrelevant"}I need to get it into a tensorflow dataset...
View Article