I've some trouble studing python flet. Is it bug or my fault?
Please help me find the reason for this code behaviorThere are 3 identical boxes (flet Container()) with switch (flet Switch()).Only switch in first box "unit_view1" is available for switching. Other...
View ArticleTechniques for solving the problem with an unbalanced data set
I am trying to solve a problem with an unbalanced data set. I have two classes, one is for patients with risk 1, the other for patients without risk 0.I have a much larger number of patients without...
View ArticleLock classes and Threading in python for dict moifications
I was learning and testing threading in python, and Lock class, So in here I want to add a key to persons but let's say it will takes some time, in another thread I want to read the key. in first...
View ArticleAccessing columns of a numpy ndarray in a vectorized manner
I have a list of lists of indices like so:outer_list = [[0], [1, 2], [1, 2], [3, 5], [4], [3, 5]]Each inner list contains the index number of itself within the outer list.I also have a numpy array with...
View Articlematching numpy conditions row and column without iteration
Given a dataframe condition defined as:0 [3, 4]1 [2]I want another dataframe's 0th row, column 3 and 4 and 1th row, column 2 to be set to 0For example given another dataframe df2: 1 2 3 4 0 0.275464...
View ArticleDoesNotExist at /up_emp/31/
DoesNotExist at /up_emp/31/Employee matching query does not exist.Request Method:POSTRequest URL:http://127.0.0.1:8000/up_emp/31/Django Version:5.0.6Exception Type:DoesNotExistException Value:Employee...
View ArticleMessageFilter.check_update() telegram
This is the code for the Telegram bot that I'm testing:from typing import Finalfrom telegram import Updatefrom telegram.ext import Application, CommandHandler, MessageHandler, filters,...
View ArticleHow to make my dictionary thread safe in python?
I have a class as follows, which maintains simple dictionary for historical records. It needs to support insertion of records and lookup, i.e. given ID and year, returns all records older than given...
View ArticleTelebot bot.get_chat_member(chat_id, user_id) throws an error
def is_sub(channel_id, user_id): try: chat_member = bot.get_chat_member(chat_id=channel_id, user_id=user_id) return True #return chat_member.status in ['member', 'administrator', 'creator'] except...
View ArticleI have a problem, my project is charging station and the problem is the coin...
The pulse is working when I charge my phone and inserts a coin, and now when i want to extend my charging time when I insert a coin for the extend time feature the pulse is not working. The language I...
View ArticleElastic Bean Stalk API's issue
I have my environment running on elastic bean stalk and its deployed successfully also have enabled https on the environment and link is working fine but the issue is:I have my python backend hosted...
View ArticleHow to completely remove a package from PyPI or TestPyPI?
I could remove all releases of my package example_package_superkai but could not remove the package itself from PyPI or TestPyPI as shown below:Or:Actually, How to remove a package from Pypi doesn't...
View ArticleTokenizers && Docker :Could not build wheels for tokenizers, which is...
I have a project with Python 3.9 using some lib to create chatbot, and actually, until now I couldn't build my Docker image without issues with the tokenizers.The Terminal just showed up this error...
View ArticleAttributeError: module 'tensorflow' has no attribute 'map'
dataset.map(preprocess)AttributeErrordataset.map(preprocess)AttributeError: module 'tensorflow' has no attribute 'map'What is the solution?
View ArticleUnderstanding Tkinter window, and Canvas sizes
I can’t get any information on exactly how window and canvas sizes work in Tkinter.If I create a window, I can set its size using either the .configure() method or the .geometry() method. If I set...
View ArticleRunning Jupiter Lab via Command Line WIndows
I have followed the instruction on the official website of Jupyter.I installed JupyterLab with pip:pip install jupyterlabAnd then I tried to run JupyterLab with:jupyter-labIt says the following...
View ArticleAdd cells to current jupyter notebook
I want to execute code in a jupyter notebook that appends a cell to the notebook that is executing the code and writes code in it.e.g. in 'test.ipynb' execute code like...
View Articledjango login Authentication returns None
I am trying to authenticate in django but when I enter the real credentials it assigns the user as None, but when I enter credentials that do not exist it does not assign it as None.views.pydef...
View ArticleHow do I defer reflection on a view/table without primary keys?
I have a view xyz.MyTable that I'd like to build a model for. It doesn't have a unique column but the combination of columns col1 and col2 are guaranteed to be unique.I also don't have access to the...
View ArticlePython function causes changes to input pandas dataframe
I have a Python function that modifies a pandas dataframe in various ways. This includes dropping a column. Counter to my intuition, this drop operation is not limited to the environment (if that's the...
View Article