Latest Questions

ValueError: X has 19 features, but LinearRegression is expecting 20 features as input

I'm trying to do polynomial regression using this code here: x_train,x_test,y_train,y_test = train_test_split(self.X, self.y, test_size=split, random_state=rand

Azure CosmosDB - Sharding Strategy for georeferenced data?

I have a collection on cosmos for about 1 million documents like this: { "title":"My Happy Bakery", "address":"155 Happy Avenue, Happy City", "location

Why does numpy.angle(0+0j) answer pi instead of zero

I am creating an array of complex numbers and compute the angle. When I set the magnitude to zero, I expect the angle to always be zero. However, I get pi if th

Evaluating (model.evaluate) with a triplet loss Siamese neural network model - tensorflow

I have trained a Siamese neural network that uses triplet loss. It was a pain, but I think I managed to do it. However, I am struggling to understand how to mak

Displays the same cart-quantity and total price

I am having issue with the cart notification panel as it displays the product-quantity and price of the previous user and is not updated even after i add produc

How to import Teradata table into HIVE using HUE?

I need help importing a Teradata table (with LDAP credentials) into HIVE using HUE interface. I'm new to HIVE and has very little knowledge. Also, the import ne

How do I make inheritance work from component class?

Im trying to access Ids from a component class in an If statement but I get the error saying that it does not exist in the current context (CS0103). Here is my

Deploying consul on existing kubernetes cluster in GKE

I am trying to deploy Consul service mesh to an existing kubernetes cluster running on GKE. The cluster already has workloads running in production. For this ma

Cache manegment in recoil js

I decided to try using recoil instead of redux and ran into the problem of caching mutable collections. To be more precise, the problem is not in the response c

Matplotlib plots in the wrong data format eventhough it is a datetime object [duplicate]

I have a problem when trying to plot a timeseries with matplotlib: df = pd.read_csv('myfile.dat', skiprows=1) #Change data type to datetime d

C# Cannot implicitly convert type 'string' to 'int'

I get Error when try to set value for (a.Hinta ) to (HintaTextB.Text) in third code block. public bool saveAutoIntoDatabase(Auto newAuto) { bool

Why does clock() returns -1 in C

I'm trying to implement an error handler using the clock() function from the "time.h" library. The code runs inside an embeeded system (Colibri IMX7 - M4 Proces

On batch size, epochs, and learning rate of DistributedDataParallel

I have read these threads [1] [2] [3] [4], and this article. I think I got how batch size and epochs works with DDP, but I am not sure about the learning rate.

Batch conversion of xlsx files to txt in Python

I am trying to convert files with the extension xlxs to txt files. All items have the same name and are marked with a number. The problem is that there are no n

Is it possible to force Compile-Only with CMake?

I've got a very huge project (~180 libs, ~1Mio LOC, CMake but exclusively developed with VS2017 + permissive, ~30 third-parties) that needs to get ported to Lin

What is the difference between using AsyncOperation and not using AsyncOperation to show progress in UnityWebRequest?

I wrote a script that simply downloads a text file using UnityWebRequest. (I set the text size to 50 MB to see meaningful progress.) private IEnumerator GetRequ

Optimizing FMA sequences on different arm64 micro-architectures

In order to optimize a heavily used inner loop (3x3xN tensor convolution in winograd domain), I had some good results by using the maximum amount of neon regist

AdMob: Ads not working with my package name

I have a problem implementing AdMob with my Android app, ads are not showing for my package name, I changed the name and everything works fine, I restored the p

React build suddenly fails inside Docker image

This error is only happening inside a Docker image build: TypeScript error in /app/src/index.tsx(12,10): 'Provider' cannot be used as a JSX component. Its ins

Pydantic child discrimination from parent field

I am trying to create a limited set of Pydantic models from a boto3 response (specifically CodeDeploy's get_deployment). Where I'm having trouble is this:

I'm trying to exclude elements from an Array, but I'm doing somthing wrong

I'm trying to create this script: https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy

Fixing memory leak in tensorflow2 during loading the model

I am new to tensorflow-2 and I am experiencing a memory leak in my object detection application. I was able to track the section which causes the issue. class T

How to output sql date row to time elapsed

I have table with row id, name, created_at and I want to output the created_at row as timestamp time ago in php

Dataframe with scipy minimize function

Im trying to minimize sum square function that works with a dataframe. The df is as follows: ds = pd.DataFrame({'t': [*np.linspace(0,300,7)], 'Ca': [0.05, 0.038

Making a Naruto Game in Python

i have been stuck in this problem for a while now, am trying to make a game where the user is given only 100 number to create a well defined shinobi ( got the n

Conditionally render component views based on browser screen size

I have three different components representing different views for screen sizes. I want to render one of them based on the browser view width. I've managed to g

How to automate the creation of Table data on Jmeter when using aggregate report?

Table dataI want to obtain the Table Data created by the aggregate report used in Jmeter 5.3 but i cannot find the way. I don't know if i can can do it using a

Freeing the Memory of a list that contain lists

I have an assignment where i have to create a radix sort method using linked lists. First i create a sequence/list of random numbers then perform radix sort on

Add RBAC role on a Azure blob storage container with Bicep

I'm deploying an azure datalake gen 2 storage account with bicep. I want to assign roles (groups) on a containers with bicep (see code below). But I keep gettin

Simple select records from two tables

I have 2 tables (table_A has one column products_id & table_B has products_id & state) My query needs to select, all products_id from table_A join with