I have a huge spreadsheet of data that looks something like this: Date IDNumber Item 2021-05-10 1 Apple 2021-05-10 1 Orange 2021-05-10 2 Apple 2021-05-10 2 Gra
I'm using python with Zope and I'm trying to create a variable with a if condition (if possible). I'm having a difficult time finding examples and resources onl
I have the following code to evaluate some configuration values stored in a file: from ast import literal_eval for key, value in dict_read_from_file.items():
I've been struggling with this issue for a while now. I simply want to transform my data in display world, perform some operations, and then translate back to t
Let's say I'm writing a lifespan prediction calculator that takes in ~40 inputs: sex = ['Male', 'Female'] smoking_status = [True, False] ... Eventually, there
I am looking for the command or SDK, such as python, to generate new personal access token (PAT) in Github, but I didn't see any API for it. https://docs.github
Branching on t_x21 led to this error [scip_branch.c:1061] ERROR: cannot branch on variable <t_x21> with fixed domain [-0,0] So, my guess as to why this
I am trying to customize my OpenAPI (Swagger UI) docs generated by FastAPI, but that string - Swagger UI still remains. app = FastAPI( title="Test", ver
I want to replicate the admin functionality shown in the screenshot below on the client side. This is app is meant to cost a recipe based on the ingredients and
I'm using python 3.6.8 and plotly 5.7.0 [user1@testsrv1 ~]$ python3 --version Python 3.6.8 [user1@testsrv1 ~]$ pip3 freeze | grep -i plotly plotly==5.7.0 [user1
I have the following code: import matplotlib.pyplot as plt cdict = { 'red' : ( (0.0, 0.25, .25), (0.02, .59, .59), (1., 1., 1.)), 'green': ( (0.0, 0.0,
It's been hours since I tried to perform this operation but I couldn't figure it out. Let's say I have a Django project with two classes like these: from django
Trying to create a simple website consisting of two webpages Few radio buttons to choose which input/output video to display Displays input and output video mai
So, I was writing an event emitter class using Python. Code currently looks like this: from typing import Callable, Generic, ParamSpec P = ParamSpec('P') clas
I'm using the Paramiko Python module to connect to a remote server as user admin and then switch user to root. here is the class I'm using class ShellHandler:
I have the following (simplified) model and factory: models.py class Event(): duration = FloatField() start_time = TimeField() finish_time = DateTim
Could someone explain why this code: from sklearn.model_selection import train_test_split import pandas as pd from sklearn.model_selection import StratifiedKFol
I have a nested dictionary. How do I access them and get the result as follows: dict_lbl = { "lbl1":{"name":"label1","item1":"Accounts", "item2":"kannagu"
`list = [] with open("ads.txt", "r", encoding="UTF-8") as ads: first= ads.readline() for i in ads: i = i.strip().split(";") list.append(
I was wondering if someone could elaborate on exactly why creating a new list out of the two attributes passed in the class returns a "NoneType"? class Finance: