Categories
Mastering Development

I am doing an LSTM classification for DDoS detection. I have an error while performing the evaluation

This is the code that I have used. Now I do not really know where did I go wrong as I am new to such things. As an overview of what I am trying to do is that I am trying to classify where there is an attack or no. I gave ‘Y’ as my […]

Categories
Mastering Development

C: why isn’t the sort function changing the order of the numbers?

The sort function should change the order of the numbers scanned in from highest to lowest value. For example, if x = 6, y = 9, and z = 3, then the sort method should replace each variable: x = 9, y = 6, z = 3 //Sort function reorders parameters from highest to lowest […]

Categories
Mastering Development

why am I getting the key error in python?

I have an iris dataset which I want to load onto python and make some graphs with it Here is my error message Here is what it says KeyError Traceback (most recent call last) ~\Anaconda3\lib\site-packages\pandas\core\indexes\base.py in get_loc(self, key, method, tolerance) 3077 try: -> 3078 return self._engine.get_loc(key) 3079 except KeyError: pandas\_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas\_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc() […]

Categories
Mastering Development

how to apply more than one indexing in a single statement

I am working on the dynamic table in which the javascript reads the tables then responds to it respectively to the tables’ columns. I wished to use the row in the col statement for example col = x[i].rows[row].cells.length; instead. function add() { var x, y, z, i, j, row, col; x = document.querySelectorAll(“.tab”); for(i = […]

Categories
Mastering Development

Make erase work for thoughscreen (TouchEvent)

i made a simple game where you have to erase a colored layer to reveal a image. But it only works on my desktop, not on something with a thoughscreen (iphone or ipad). I know i have to replace the MouseEvent to TouchEvent but i don’t know how since i am a beginner at coding. […]

Categories
Mastering Development

How to print the content of PyByteArrayObject*?

I am using PyArg_Parsetuple to parse bytearray sent from python with Y format specifier. Y (bytearray) [PyByteArrayObject *] Requires that the Python object is a bytearray object, without attempting any conversion. Raises TypeError if the object is not a bytearray object. In C code I am doing: static PyObject* py_write(PyObject* self, PyObject* args) { PyByteArrayObject* […]

Categories
Mastering Development

Convert Tensorflow BatchDataset to Numpy Array with Images and Labels

I have a directory of images and am taking them in like this: train_ds = tf.keras.preprocessing.image_dataset_from_directory( train_dir, labels="inferred", label_mode="int", class_names=None, color_mode="rgb", batch_size=batch_size, image_size=(IMG_HEIGHT, IMG_WIDTH), shuffle=True, seed=123, validation_split=Val_Split, subset=’training’, interpolation="bilinear", follow_links=False, ) I then after building the model, I run tuner.search(train_ds, epochs=50, validation_split=0.2, callbacks=[stop_early]) using the BatchDataset and it gives me this: Traceback (most recent call […]

Categories
Mastering Development

requestAnimationFrame looping causes velocity to increase when it says it’s 0

This is the best way I could frame the question. I have two squares on the screen, and am trying to program collision detection. This is vanilla javascript and my code has detailed comments, please take a look, I have been stuck on this for some time. To be specific, I set the square.yVelocity to […]

Categories
Mastering Development

Computation on large array in python

i have a question concerning computation of large array in python( >=3.6.8 ) on Ubuntu SO. I have a large array A, about 20 000 000 (or more) of points (each point is a 3d coordinate x,y,z). I would like to know which of these points are close to a given plane. I use sympy […]

Categories
Mastering Development

How to add subplot table to right of graph

I am wanting to combine a table and a horizontal bar graph, so you can see a note from the table that goes with the bar in the bar graph. What I have now looks like this: I am wanting to just add one column to the right of the graph from Catalyst = in […]