Negation in Sentimental Analysis
I'm trying use text normalization, and prepend the prefix NOT_ to every word after a token of logical negation, specifically for the sentence "didn't like this movie , but I."By doing this, it creates...
View ArticleHow to groupBy on two columns and work out avg total value for each grouped...
I have the following DataFrame and using Pyspark, I'm trying to get the following answers:Total Fare by PickTotal Tip by PickAvg Drag by PickAvg Drag by...
View ArticleNSRunLoop and asyncio event loop conflict
I'm very new to working with asynchronous code, but I'm trying to create a basic app monitor with python. I want to integrate an asynchronous loop that performs some checks every 5 seconds.from...
View Article"errors": [ { "detail": "Cannot read property '0' of undefined" how do I get...
This is the source code is below. with this below I am trying to update my spreadsheet import requests from datetime import datetime APP_ID = "mycode" API_KEY = "mykey" exercise_text = input("Tell me...
View ArticleIssues with shared library when setting up Spinnaker Python SDK (PySpin) on...
I plan on using PySpin on Ubuntu but I cannot get the code to compile with this as the only error:I understand that shared libraries must be added to the correct system variables. However, I don't see...
View ArticleAWS Sagemaker MultiModel endpoint additional dependencies
I am trying to deploy a multi model endpoint on aws sagemaker. However some of my models have additional dependencies. I am following the huggingface's documentationon creating user-defined-code and...
View ArticleDjango Allauth Bad Request Error, Error Retrieving Access Token: Invalid Grant
I am using Django Allauth from PyPi in a Django project to authenticate users so they can upload YouTube videos. The way I do this is with a button on the login page that should collect tokens from...
View ArticleHow to make pythontex see PYTHONPATH
I've been working with pythontex for some time and I'm quite happy with the results. After reinstalling the system, however, serious difficulties began.THE PROBLEM: while compiling code (in .tex...
View ArticleWhy is `if x is None: pass` faster than `x is None` alone?
Timing results in Python 3.12 (and similar with 3.11 and 3.13 on different machines):When x = None:13.8 ns x is None10.1 ns if x is None: passWhen x = True:13.9 ns x is None11.1 ns if x is None:...
View ArticleAttributeError: 'WindowsPath' object has no attribute 'endswith' --...
I'm stuck at the following error message:AttributeError: 'WindowsPath' object has no attribute 'endswith'Here is a part of the code:im_path =...
View ArticleNot redirecting to another page main.py after user fill in and click register...
So am not that good with python because am coming from php, and I want to develop this app, and want to use local storage to store user registration data after they register they will be redirected to...
View ArticleRegex capture group in pandas extract call for single digit followed by...
I need to extract substring instances in a pandas series that match this regex: "[3-6]X"ie "3X", "4X", "5X", or "6X" from arbitrary strings like "Hello this is an 6X interesting sentence".I have spent...
View ArticleCan't you have code outside your Azure Functions in python?
I am working on an Azure Function App where i have multiple Azure Functions defined as blueprints.What i'm trying to do is create functions that the Azure Function blueprint can call inside the same...
View ArticleHow to copy and paste an autocad table using python
I am trying to use pyautocad to copy a table from one autocad drawing and paste it in another. Its important that I retain the same table style and location as well. Afterwards the script populates the...
View ArticleRabbitMQ management API call failed: HTTP 500: Internal Server Error
I am using Celery Flower with RabbitMQ as message broker. However I am :getting nasty errorERROR - RabbitMQ management API call failed: HTTP 500: Internal Server Errorevery time I try to access...
View ArticleTypeError: Cannot interpret 'torch.uint8' as a data type
Today I have started to learn Pytorch and I stuck here. The code piece in the comment raises this error:TypeError: Cannot interpret 'torch.uint8' as a data typeFor changing the data type of the tensor...
View ArticleSessionNotCreatedException: Message: Could not start a new session. Response...
I installed selenium/standalone-chrome in docker, and the version is 4.1.2. But when I run my python code get bellow error:My selenium/standalone-chrome in docker:My python code:def demo(): options =...
View ArticleIssues with Custom FISTA Optimizer and Model State Rollback in PyTorch
I've developed a custom FISTA (Fast Iterative Shrinkage-Thresholding Algorithm) optimizer in PyTorch for a project I'm working on. The optimizer works perfectly under normal circumstances. However,...
View ArticleTesting a function in python without in- and output value
I have the following function in my py-file.def change_grid(): print("switch grid, current value:", grid_var.get()) global grid if grid_var.get() == "off": grid = False else: grid = TrueHow can I test...
View ArticleThe KNN model I am using is always coming back at 100% accuracy but it...
I am just getting into machine learning and I am working on using classification models. Currently I am using a mushroom classification dataset (class is poisonous or edible). The issue is that, while...
View Article