Categories
Cryptocurrency Ethereum Mastering Development

Fetching an inputted contract address’s token price

I’m looking to fetch the inputted tokenAddress‘s token price, from say a uniswap eth pair, and return it. Any idea how to do this? contract Initialise { using SafeMath for uint; mapping(address => userData) users; // user address assigned to personal info sheet struct userData { uint256 _initialInstallmentAmount; // the amount the user is initialising […]

Categories
Mastering Development

KNN and SVM GridsearchCV for Iris Dataset

I am stuck in an issue with the query below which is supposed to plot best parameter for KNN and different types of SVMs: Linear, Rbf, Poly. So far I wrote the query below: import numpy as np import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.neighbors import KNeighborsClassifier from sklearn.svm import SVC from […]

Categories
Mastering Development

Numpy dot product on specific dimension

I have a numpy array a of shape (x, y) and another array b of shape (x, z) I’m trying to get the dot product between each row (dimension x) of a and b. Desired result: x amount of matrixes of shape (x, y) or a matrix of shape (x, y, z).

Categories
Mastering Development

How does calculating the Loss work with multiple Outputs in Regression with a NN?

I set up a NN with 10 Output values/nodes. Some of them are coordinates, angles and distances. After lots of training my train and test loss gets very good. (~0.05) But after testing the values visually the results arent that good. (some are, but not all) My questions are: Do i need a loss function […]

Categories
Game Creation Mastering Development

Need advices for speeding up map rendering [closed]

Map loader uses for loops for loading text based files then it stores them in list then for loop in rendering takes data it parses them then sends them to opengl but its slow when having maps that very large any alternatives for for loop in this method thanks Map is file that stores game […]

Categories
Mastering Development

Set one element of each float4 in an array using CUDA/thrust

I have a fairly standard float4 class and an array of said float4s on the GPU. Each float4 represents an (x,y,z,rgba) point, and I’d like to use thrust to set the rgba value for each float4 in my array to a specific value. Seems like thrust::fill() might work with a custom iterator, but I don’t […]

Categories
Android User Help

I don’t know why this FFmpeg command is not working in android?

Please Save My Day D/FFmpeg (10151): Build.CPU_ABI : arm64-v8a D/FFmpeg (10151): ffmpeg is ready! [GETX] CLOSE TO ROUTE /UploadView D/FFmpeg (10151): Running publishing updates method I/message (10151): /storage/emulated/0/convert I/message (10151): [-y, -i, /data/user/0/com.brahmand.sanju/cache/file_picker/VID-20210104- WA0003.mp4, -preset, slow, -g, 48, -sc_threshold, 0, -map, 0:0, -map, 0:1, -map, 0:0, -map, 0:1, -s:v:0, 640×360, -c:v:0, libx264, -b:v:0, 365k, -s:v:1, […]

Categories
Game Creation Mastering Development

How to use X,Y, and Z instead of Pitch, Roll and Yaw

I’m learning Unreal engine, and I’m rather disappointed because it uses pitch roll and yaw instead of the standard x, y, and z that I’m used to. Is there any way to convert this easily, or is there a preference, or do I have to get used to using y,z,x, instead of x,y,z.

Categories
Raspberry Pi User Help

Ubuntu 20.10 and GPIO

I have trouble installing RPi.GPIO library on Ubuntu 20.10. I run apt-get update and apt-get upgrade then apt-get install python python3 python3-pip python3-dev everything went ok. Then I run pip install RPi.GPIO and get a lot of errors. —————————————- ERROR: Failed building wheel for RPi.GPIO Running setup.py clean for RPi.GPIO Failed to build RPi.GPIO Installing […]

Categories
Game Creation Mastering Development

Memory Usage Issue with declared variables (when swapping between states)

So my problem is that When I make a Shader variable and I swap between mainmenustate and gamestate really fast I notice my memory usage increase alot but as soon I switch my Shader varaible into a pointer memory usage dont increase until I put cameraShader = new Shader(); I tried deleting the cameraShader but […]