Quantcast
Browsing all 14097 articles
Browse latest View live

ValueError: invalid on specified as date_x, must be a column (of DataFrame),...

Trying to take a Monthly Rolling average from my DF based on 'ISIN' column on Tone column. this is the df:import pandas as pd# Given data liststone = [-0.397617, -1.217575, 0.101528, -0.736255,...

View Article


Switching between two frames on seperate files in tkinter

I am writing a program where I have the opportunity, to switch between two frames which are one two separate Files. The main file is called "Main_Menu" while the other file is called "first_page". When...

View Article


Raspberry Pi 3 : Servo Motor unusual movement in Python

I'm new in python especially in Raspberry Pi and I'm confused why my servo motor have unusual movement it movable sometimes , I have servo motor Tower Pro Micro servo 9g,why it is happening should I...

View Article

Image may be NSFW.
Clik here to view.

Highlight the changes or areas of discrepancy between the two images

These are my images, I want toConvert the PDF documents (file_1.pdf and file_2.pdf) into images.Compare the images to detect any differences between them.Highlight the changes or areas of discrepancy...

View Article

CS50 Python pset5 Refueling ValueError

I am trying to pass the check50 test on test_fuel problem and am stuck with one last frown:check50 output. Here is my code for test_fuel.py:import fuelimport pytestdef test_convert(): assert...

View Article


Image may be NSFW.
Clik here to view.

How to Create a Dynamic Stacked Bar Chart in Bokeh with Variable Excel Inputs...

I am currently working on a data visualisation project. I need to create a stacked bar chart using Bokeh. The data is sourced from an Excel file that is updated regularly and contains multiple inputs...

View Article

Image may be NSFW.
Clik here to view.

Rectangle to Curve image in openCV python

I am trying to fit a rectangle image(overlay) on my another image(back). I am performing 3 operationsResizing overlay imageCurving overlay image to fit the overlay poster placeholderRotating and...

View Article

How to create numpy.ndarray A from existing B using various functions...

I have numpy.ndarrayA with shape S. I want to create numpy.ndarrayB with same shape but different value type. Also, I want to use various functions to transform element of A into corresponding element...

View Article


Parallelizing, Multiprocessing, CSV writer

I have a huge list of strings called term_list that I process one-by-one in a function called run_mappers(). One of the args is a csv_writer object. I append results to a list called from_mapper in the...

View Article


DRF: Serialize field with different serializers and many=True

I have the following models in my django rest framework app:class Question(models.Model): class Type(models.TextChoices): TEXT = 'text', 'text question' RADIO = 'radio', 'choosing one option quesiton'...

View Article

Best algo for LOG files multiclass classification?

I have a big dataset containing logs/steps that the user performed on my webpage (for example: Clicking on a "Homepage" button, typing some text in the field, etc.) These steps are labelled against...

View Article

Zerodha raw data to Pandas

I am working on project where I want to pull raw data from zerodha to pandas.I am using selenium with python and facing issue while clicking toggle button which will show raw data.Please see the code...

View Article

Using selenium to update google docs linked to spreadsheet

I'm trying to use python selenium to update a google doc that is linked to a spreadsheet, I can't seem to find a way to find each "update" button on the google doc. I can't right click in firefox to...

View Article


The 'flag' appears only when the first turtle touches the finish line

[[[enter image description here](https://i.stack.imgur.com/694bC.png)](https://i.stack.imgur.com/1jiZh.png)](https://i.stack.imgur.com/OG6D7.png)The 'flag' which called 'win' appears only when the...

View Article

Maya scriptJob on quitApplication not working after choosing save in save prompt

I'm trying to link a piece of code on maya application quit using scriptJob. It works when you choose don't save or cancel in the maya save prompt window, but if you choose save and then save the file...

View Article


SyntaxError: invalid syntax in For Loop in python jupyter notebook

from splinter import Browserfrom bs4 import BeautifulSoup as soupbrowser = Browser('chrome')url = 'https://static.bc-edx.com/data/web/mars_news/index.html'browser.visit(url)html = browser.htmlsoup =...

View Article

Tuple problem with parameterized SQLite query

I'm working on a telethon-based telegram chatbot that can query a customer db given a last name in the following format: /search thompson, but am having some trouble using the fill function to keep the...

View Article


How to Change the Type of Connection with Python and FritzConnection?

I want to Change the Type of Connection with FritzConnection in Python. What is the command to change the connection type and where must the login data for the static IP be entered? Enclosed is a photo...

View Article

How to get spesific unique combinations of a dataframe using only dataframe...

So imagine I have this data that contain entries of 2 players playing a game one after another then after they both gain a win or lose they get a shared score(logic of this is unimportant numbers are...

View Article

Partially deleting elements from a bytearray while adding to it from another...

I have bytearray object, two threads are accessing it, a producer and consumer.The producer writes to the bytearray: barr.extend(data)The consumer reads from the bytearray: barr.find(...), barr[x:y]The...

View Article
Browsing all 14097 articles
Browse latest View live