Adding additional functionality to a basic movement tracking script in Python
For my dissertation project I am looking at tadpole movement patterns. I have a python script written by a previous PhD student. Currently the script takes a video and tracks the tadpole as it swims...
View ArticleHow to add two side slide button to a line chart based on the year using Altair
i have a line chart that has date as X axis. i want to filter this with a double (two) sided slide button for filtering proposes. So i want to be able to filter the data from starting and end date of...
View ArticlePipreqs outputs 2 versions of the same package
I updated sqlalchemy to the latest version, but now when i use pipreqs to build my requirement.txt file, it outputs two versions of sqlalchemy despite me only having one...
View Articlewatsonxlangchain package can not be installed?
from watsonxlangchain import LangchainInterfaceModuleNotFoundError: No module named 'watsonxlangchain'pip install watsonxlangchainDefaulting to user installation because normal site-packages is not...
View ArticleIs there a consensus on what should be documented in the class and __init__...
I did not find any best practice about what should be documented in the class and __init__ docstrings. Sometimes I find that the constructor arguments are already documented in the class docstring,...
View ArticleGraph API HTTPS 400 When trying to assign managers
I am trying to assign managers to members in my organization via Graph API to Azure AD. I seem to have done everything according to the documentation, but I still get a Bad Request, can you spot what...
View ArticleLeverage broadcasting to make this subtraction more efficient
I have an array x of shape (N, T, d). I have two functions f and g which both take an array of shape (some_dimension, d) and return an array of shape (some_dimension, ).I would like to compute f on all...
View ArticleHow can I make it so other people (and myself) can open the .py file and not...
I'm pretty new to programming, and I've made a few projects so far, but this was my first time using files in my program which weren't just txt files which were getting automatically created using code...
View ArticleAverage of values in the same column based on time
I need to calculate the average of some numbers in the same column every 5 minutes.These data can come every 30 seconds or 1 minute.I would like the time to be used as a reference to calculate this...
View ArticleUploading multiple large files with django on Google App Engine -- how to do...
I'm trying to figure out how to load multiple large files (like 4K images) to Google Cloud Storage via django using the default admin interface.For example, I have a model with multiple...
View ArticleWhy is this not working on my Driving costs - functions code
This is the info given for my problem:Write a function driving_cost() with input parametersmiles_per_gallon, dollars_per_gallon, and miles_driven, that returnsthe dollar cost to drive those miles. All...
View ArticleItertools Combinations will not output sequence larger than 3
In the below code I can not get the result if the output sequence is larger than 3 values.The below code returns nothing, is there any way to get the below code to return the correct answer of 7175.90,...
View Articlesklearn.preprocessing.OneHotEncoder and the way to read it
I have been using one-hot encoding for a while now in all pre-processing data pipelines that I have had.But I have run into an issue now that I am trying to pre-process new data automatically with...
View ArticleBERT Model for reviews throwing an error. How do I fix it?
This is the link to the tutorial.This is the code specifically (I just opened in Colab and ran it - so I did not edit anything):I am getting the following error:AttributeError: in user code: File...
View ArticleHASS - usual method for getting sunrise and sunset time stopped working - how...
I have this python program that I’ve been running on home assistant every day for over a year now.It is called via shell script:#!/bin/bashpython3 /config/solax/compute_pv_schedule.py $1 $2 $3 $4 $5...
View ArticleHow to extract matching information from pdf to excel on appropriate location...
I have to extract tons of pdf files/pages to Excel for work. I decided I can be done much more sooner with automating all or most of the process in python. Even though I know python, the most I could...
View ArticleError while installing QGIS on Ubuntu 20.04
I'm trying to install QGIS for ubuntu 20.04 with this guide https://freegistutorial.com/install-qgis-on-ubuntu-20-04-focal-fossa/I managed step one and successfully installed and upgradedgnupg...
View ArticlePlotly Express Choropleth of Census Data Fails
I am attempting to use Plotly Express to create interactive choropleths of Census data which I retrieve using the censusdis package. This works for two of the variables which I am retrieving, but not...
View ArticleOpenAI API error: "The api_key client option must be set either by passing...
I'm a little confused about using OpenAI in Python and need a little help to make this code work. I tried several solutions found on StackOverflow, none of them are working.My goal is to make a Python...
View ArticleImport JSON Lines into Pandas
I want to import a JSON lines file into pandas. I tried to import it like a regular JSON file, but it did not work:js = pd.read_json (r'C:\Users\Name\Downloads\profilenotes.jsonl')
View Article