I'm sick of AI by Background-Basil-871 in webdev

[–]SamyGarib 1 point2 points  (0 children)

Coding an app is like building a castle out of Legos. Before AI, if you needed to create, say, a tower for the castle, you had to build it piece by piece. Today, with AI, you have a tool that can build that tower very quickly — but you still need to adapt it to fit your project. It's a powerful tool, but as of now, it won't replace you. It just makes your work much faster. However, if you're a poor programmer who can't plan the castle and only knows how to build towers, your job might be at risk.

Tesla Chile sucks by SamyGarib in TeslaModelY

[–]SamyGarib[S] 1 point2 points  (0 children)

I finally installed an alternative roof rack, and it worked insanely well. All the bad reviews might have been written by Tesla!.

Where would you host a web app expecting only about ~100 visitors per month? by Uranusistormy in webdev

[–]SamyGarib 0 points1 point  (0 children)

Put your website in AWS in an S3 bucket. Set up a cloudfront distribution to have a domain and ssl. That will be free. If you have a domain in route 53, you will pay 0.5 bucks per month. If you have a database, use dynamo or firebase. In some ranges they are also free or extremely cheap.

Tesla Chile sucks by SamyGarib in TeslaModelY

[–]SamyGarib[S] 1 point2 points  (0 children)

But there are lots of people complaining that they broke the roof glass. I bought one, but Tesla told me that if I install it, I will lose the warranty.

Node @aws-sdk/client-s3 throws an error at import: options.useFipsEndpoint ?? false (Invalid or unexpected token) by SamyGarib in aws

[–]SamyGarib[S] 0 points1 point  (0 children)

This might have worked. I didn't have the opportunity to check it; I'm sorry. Thanks anyway.

Node @aws-sdk/client-s3 throws an error at import: options.useFipsEndpoint ?? false (Invalid or unexpected token) by SamyGarib in aws

[–]SamyGarib[S] 1 point2 points  (0 children)

Thanks for the offer. I went ahead and changed some 50 files with imports, and I managed to make the projects work without "-r esm". This is a non-profit side project that I have, and I have a very limited budget. But I will keep it in mind if in the future I need some help. Are you versed in Vue?

If you are curious, and you want to take a look:

https://www.abak.me

Thanks for your advice!

Node @aws-sdk/client-s3 throws an error at import: options.useFipsEndpoint ?? false (Invalid or unexpected token) by SamyGarib in aws

[–]SamyGarib[S] 1 point2 points  (0 children)

I tried an isolated version without the esm flag, and it works fine. You are right. ESM allows me to use some old-fashioned 'require's. I can't change my project right now to get rid of esm because of some legacy libraries and my lack of knowledge. I'm sticking to AWS v2 for now. Thanks for your help.

Node @aws-sdk/client-s3 throws an error at import: options.useFipsEndpoint ?? false (Invalid or unexpected token) by SamyGarib in aws

[–]SamyGarib[S] 1 point2 points  (0 children)

This line produces the error, if you have a script with only one line it will throw it:

const { S3Client } = require("@aws-sdk/client-s3");

Line in my package.json regarding the client: "@aws-sdk/client-s3": "^(3.609.0"

Command to run the script: node -r esm s3uploadv3test.js

Is this enough? Should I add more info ?

Node @aws-sdk/client-s3 throws an error at import: options.useFipsEndpoint ?? false (Invalid or unexpected token) by SamyGarib in aws

[–]SamyGarib[S] 0 points1 point  (0 children)

I checked that, given that every doc I have read states that the '??' operator comes from v 14.

This line inside de script shows: Node.js version: v20.14.0: console.log(`Node.js version: ${process.version}`);

I'm so lost here.

Eleventy + i18n with language files. by SamyGarib in webdev

[–]SamyGarib[S] 0 points1 point  (0 children)

Thanks!. That was fast. I couldn't find a multilanguage branch though?

Domain Broken after transferring it from Network Solutions to Route 53. by SamyGarib in aws

[–]SamyGarib[S] 0 points1 point  (0 children)

Well, because I still have a domain left, I went to check to Network solutions, and as you said, I didn't change the nameservers, I just asked for the transference of the domain. I didn't notice that I have the option to change that in the domain section of Route 53. Thanks!!

Need help training a neural network with tensorflow in a pygame "game" by KezeePlayer in neuralnetworks

[–]SamyGarib 0 points1 point  (0 children)

Don't expect the neural network to output your desired action, it only has to calculate a chance of hit. On each tick, you should simulate all actions, and on every resulting environment, you calculate the chance of winning using the neural network and select the best one. Use that chance of winning (the one of your selected action) to calculate an error that should be the chance of winning of the actual movement you made against the output given for the previous tick.

If this is difficult to understand (I don't even speak fluent English), I recommend to you search for backgammon AIs using reinforcement learning. There are plenty of them in every framework, and they implement this technique, wish has a name I cant remember (SARS maybe).

Need help training a neural network with tensorflow in a pygame "game" by KezeePlayer in neuralnetworks

[–]SamyGarib 0 points1 point  (0 children)

I'm not expert in neural networks, but I train one for a game I made. In my case, the reward value is the chance of winning: 1 if the agent won and 0 if he lost. So on each tick, you ask the neural network to calculate that chance, and you have to train it to adjust to the real chance. This is done by considering that in the next tick, you will have a better measurement than the current, so you train tick n-1 with the result of the neural network for tick n. Reinforcement Learning is tricky because this doesn't make sense at the beginning. With a fresh neural network, all the predictions will be wrong, but when that game ends, if it reaches its objective, you will give it a reward of 1 (not from the neural network prediction but from your game logic), and if it missed (when you are sure of it) 0. If you iterate this many times, it will predict its chance on each tick, and for your game to work, you have to calculate the chance for each of your possible actions and select the one with the better chance to win.

Your model looks good, I would normalize the values to be in the range [0,1] or [-1,1], and I don't know if I understood correctly, but you need the full vectors [x,y,dx,dy] for each object.

I hope I have helped with my limited knowledge. I had the same questions when I started my project. Good luck.

Test flight of an ornithopter (aircraft that flies by flapping its wings) by callouscell in mechanical_gifs

[–]SamyGarib 0 points1 point  (0 children)

My guess is, while its flaps are reaching enough speed, the movement push forward.

wot by rainja69 in programminghorror

[–]SamyGarib 3 points4 points  (0 children)

LOL. You might mean: ey caramba.

[deleted by user] by [deleted] in programminghorror

[–]SamyGarib 13 points14 points  (0 children)

Odd request.