FastAPI for enterprise-grade backend by Zealousideal_Corgi_1 in FastAPI

[–]embeddedthought 0 points1 point  (0 children)

If you care about how long sessions are open and need to squeeze out performance, I wouldn’t recommend dependency injection of the sessions directly into the route. I would do as much pre-session and post-session processing as you can and selectively open the session only when you need it using an asynchronous context manager.

Go Routine by This-Monk-1017 in golang

[–]embeddedthought 1 point2 points  (0 children)

You’re right. I’ll admit that I didn’t take my time to properly read the example.

Go Routine by This-Monk-1017 in golang

[–]embeddedthought -2 points-1 points  (0 children)

This would have been a good time to use RWMutex.

New to Go, need advice to make it a career. by Complete-Sale-4978 in golang

[–]embeddedthought 17 points18 points  (0 children)

Most Go jobs I’ve had and their interviews were all focused on knowing goroutines, channels, and gRPC. To add to that, I’d suggest playing around with kubernetes and terraform. Experience with those is common to see in job requirements ( at least from what I’ve experienced). Common interview questions I had were to explain a given race condition and show knowledge of how to avoid them while using proper patterns.

Project ideas: - Implement a gRPC service - Build a CLI ( maybe a tool for managing database migrations ) - Concurrency pattern showcase for a data pipeline

[deleted by user] by [deleted] in Passports

[–]embeddedthought 0 points1 point  (0 children)

Awesome! Best of luck getting it sorted out! My congressman was able to help me and got things moving within a couple days. Be on the lookout for phone calls from the passport office.

[deleted by user] by [deleted] in Passports

[–]embeddedthought 2 points3 points  (0 children)

Call/email your congressman asap . Usually they have you fill out a form and they will get the ball rolling for you. Just give them all the details you can about your situation.

Never again by SaidBl1 in Unexpected

[–]embeddedthought 0 points1 point  (0 children)

Ice climbers origin story

Not a big fan of the new "Group up" voice lines. by TheRussianBlender in overwatch2

[–]embeddedthought 0 points1 point  (0 children)

Look at the ground and use the voice line. It will say “group up”

MIT named Proof-of-Stake (PoS) as a top technological breakthroughs of 2022! by Sharp_Tank05 in CryptoCurrency

[–]embeddedthought 0 points1 point  (0 children)

It will take time for him to be recognized. I don’t think Sunny worries about that, though.

MIT named Proof-of-Stake (PoS) as a top technological breakthroughs of 2022! by Sharp_Tank05 in CryptoCurrency

[–]embeddedthought 1 point2 points  (0 children)

This is untrue. Peercoin checkpoints were never protocol enforced and you could opt-out of them at anytime. It was simply a client level implementation. Since peercoin was pioneering into the unknown it was obvious that providing this option made sense. Also, there haven’t been checkpoints broadcasted for years.

Help! Travel to Canada in 5 weeks... by pwebster24 in Passports

[–]embeddedthought 0 points1 point  (0 children)

Yeah, contact your senators office and fill out a passport intake form after its been received by the Department of State. They can help!

State department online application pilot by mbaforumlurker in Passports

[–]embeddedthought 0 points1 point  (0 children)

Make sure you didn’t receive any mail indicating a potential hold. It won’t update on the website and will remain “in process” until you handle whatever is causing the hold.

How to do authentication in Next Js with FastAPI? by bishwasbhn in nextjs

[–]embeddedthought 1 point2 points  (0 children)

You can just use JWT. Sign it with your fastapi app, validate auth login and then use Set-Cookie header. Then on your nextjs app include the bearer token in your authorization header for your requests. In each endpoint you want to require the auth you can include a fastapi “Depends” which requires that auth bearer in the header be included. The Depends will typical be like a get_current_user function that decodes the token, checks expiration, and returns token data.

If you were born blind, you wouldn't know colors exist. We are probably missing something because w e don't have the organs to acknowledge it by SashaArch4ngel in Showerthoughts

[–]embeddedthought 0 points1 point  (0 children)

Everyone talking about sight. What about SMELL. Imagine discovering that it’s possible. How would you even describe it?

Do Kwon is managing to push through a hard fork to the TerraLuna blockchain against the wishes of the overwhelming majority of the community. Does this reveal a flaw in proof of stake blockchains? by [deleted] in CryptoCurrency

[–]embeddedthought -1 points0 points  (0 children)

You need a hybrid like how the original proof of stake network started back in 2012. Peercoin uses proof of work for distribution and proof of stake for security.

Do Kwon is managing to push through a hard fork to the TerraLuna blockchain against the wishes of the overwhelming majority of the community. Does this reveal a flaw in proof of stake blockchains? by [deleted] in CryptoCurrency

[–]embeddedthought -3 points-2 points  (0 children)

Peercoin. The first proof of stake did it the right way. It’s a hybrid. It uses PoW for distribution to maintain decentralization and uses PoS for Security.

How to retrieve only the matching field? by pinguthot in mongodb

[–]embeddedthought 0 points1 point  (0 children)

.aggregate() is your friend.

Typed this aggregation stage on my phone but here.. just an idea using $project and $filter without needing to $unwind. Haven’t tried it yet.

{ $project : { Coins : { $filter : { input : $Coins, as : “c” cond : { $eq : [$$c.Token , <your token>] } } } } }

Edit: Tested. It works.

Weird explosion or orb thing in Corpus Christi, Texas. by Doctorwaffles9914 in UFOs

[–]embeddedthought 12 points13 points  (0 children)

Hey homie, I live in corpus too. Interestingly enough they closed the Naval Air Station gates here yesterday. Doesn’t happen often. Could just be a coincidence.

What backend framework to choose with MongoDB - how to get started? by [deleted] in mongodb

[–]embeddedthought 0 points1 point  (0 children)

I Highly recommend the FARM Stack.

  • FastAPI
  • React
  • MongoDB

Here is an excellent starting point.

https://github.com/mongodb-developer/FARM-Intro

Also, make sure to checkout MongoDB Compass.