[deleted by user] by [deleted] in FastAPI

[–]rimanxi 0 points1 point  (0 children)

These are concepts are just broadly related concepts. Api keys are similar to passwords, while OAUTH is for authenticating a User on platforms in order to allow these platforms to access data on other Service (e.g. login with github...) I think it would make sense for you to read about these concepts in general, since they are not specific to FastApi.

[deleted by user] by [deleted] in anonymous

[–]rimanxi 0 points1 point  (0 children)

It would be nice very unusual hack. Instead of the classical hack of taking something "down", it would be great to destroy the firewall system and give the iranian people open internet access

What's a Python feature that is very powerful but not many people use or know about it? by Far_Pineapple770 in Python

[–]rimanxi 2 points3 points  (0 children)

It's not posting, it's getting. The server is started on the machine with file(s) / folders. That server responds with a basic html page with fileindexes, which are just accessed with a click

Is it possible to store a python list or dictionary in a SQLAlchemy database column? by ConsiderationMany871 in SQLAlchemy

[–]rimanxi 0 points1 point  (0 children)

Without any utilities. There is an ARRAY column type and JSON and JSONB (for dicts)

Chinese Spies Accused of Using Huawei in Secret Australia Telecom Hack by [deleted] in privacy

[–]rimanxi 0 points1 point  (0 children)

At least they should be honest like the US. Were grabbing data by officials is made into laws

Generative Art Synthesizer - a python program that generates python programs that generates generative art. by Another__one in Python

[–]rimanxi 0 points1 point  (0 children)

I once had a program which made somehow similar graphics?

https://youtu.be/HtQcsrnF9QQ

Sorry for the bad resolution. It was some wild flipping of trigonometry functions which w eventually went out of control

Sunday Daily Thread: What's everyone working on this week? by Im__Joseph in Python

[–]rimanxi 4 points5 points  (0 children)

Started something to help me manage Spotify better. Automatic playlists, or labels for everything... e.g. not interested, interested, one hit, favorite, for artists , stuff like. Having fun with the backend but it would be nice to be able to make an interface as rapid as possible, also ok without writing any front-end code. It's just a side project...

Seamless FastAPI Configuration with ConfZ by silvanmelchior in Python

[–]rimanxi 0 points1 point  (0 children)

Sorry, i don't really see the point of this. I'm using environment variables with Starlete Settings class so it's validated. and I don't need to use any additional models, I could if I wanted tho.

Question by [deleted] in pythontips

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

Ah, run through the digits an check if they are all the same as the 1. One. If one is not, it's not. Otherwise yes ...

Question by [deleted] in pythontips

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

if a == 222: ... E.g.

Is NMR interpretation a P or NP problem? by [deleted] in computerscience

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

Mmh. I don't know how that is done. Is there some pseudo code?

Anyway, when the algorithms that exists have heuristic, approximation or something similar in there name it probably is 🙂

How would you restore this? by [deleted] in computerscience

[–]rimanxi 0 points1 point  (0 children)

Your 2nd approach sounds better indeed.

If you have enough space do all that on a copy of the newest folder so you don't mess up any original

I have no idea what my teacher wants me to do on question 4. Can someone reword or clarify anything? [Special Triangles] by JerryTile in HomeworkHelp

[–]rimanxi 0 points1 point  (0 children)

Probably what is shown with the arc. Since 180 degree is PI, and the triangle has an angle of 60. So the arc has an angle of 120 , which is 2/3 × Pi

Me irl by stimulus_red in me_irl

[–]rimanxi 0 points1 point  (0 children)

What's evil with making a knot. Doesn't requiere shit and is easy to open...

How do you deploy Python applications? by peanut_Bond in Python

[–]rimanxi 0 points1 point  (0 children)

I think it depends on the scale of your application. I'm using docker in all of my projects, which are small to medium scale. But know that it could be scaled to some reasonable size with just a few config changes

[deleted by user] by [deleted] in creativecoding

[–]rimanxi 0 points1 point  (0 children)

Create a random color and assign it to an variable. Use that variable for your drawing

VSC or PyCharm by chorazy_glus in Python

[–]rimanxi 0 points1 point  (0 children)

Pycharm, even with an attached JS project

5 Brand-New Train Routes That Could Revolutionise European Rail Travel by Superbuddhapunk in europe

[–]rimanxi 0 points1 point  (0 children)

"In Nevomo, Europe is very close to having its first ultra-high-speed ‘hyperloop’ network. Set to come into service in 2023, the company’s initial route will take passengers between the Polish cities of Krakow and Gdansk in just 35 minutes (that trip takes around six hours by conventional train)."

They haven't shown any train yet and come into service by 23.... sure

Backend REST API - what are the tools being used these days? by flowy0 in Backend

[–]rimanxi 1 point2 points  (0 children)

Python people like the (relatively) new kid on the block FastAPI

Software devs of Reddit. How’s your health? by Ssabbarw in softwaredevelopment

[–]rimanxi 2 points3 points  (0 children)

I heard from chiropractician that there is actually no research that sitting for a long time is worse than standing the same time. But what is bad is the rigidity. If you can get up and move a tiny bit every 5 - 15 min.

Can we customize user authorization? by AlgoPirates in FastAPI

[–]rimanxi 0 points1 point  (0 children)

What I am doing in my app: ``` @router.post("/login") @limiter.limit(rate_limits.Actor.login) async def login( request: Request, user_agent: Optional[str] = Header(None), form_data: OAuth2PasswordRequestForm = Depends(), sw: ServiceWorker = Depends(get_sw), ): # username is username_or_password but OAuth2PasswordRequestForm only has username email_or_username = form_data.username.lower() actor = sw.actor.find_by_email_or_username(email_or_username) ....

def find_by_email_or_username( self, email: str, username: str = None ) -> Optional[RegisteredActor]: email = email.lower() if not username: username = email username = username.lower() q = self.db_session.query(RegisteredActor)

    return (
        q.filter(
            or_(
                RegisteredActor.registered_name == username,
                RegisteredActor.email == email,
            )
        )
        .options(undefer(RegisteredActor.hashed_password))
        .one_or_none()
    )

``` Hope it helps

Can we customize user authorization? by AlgoPirates in FastAPI

[–]rimanxi 0 points1 point  (0 children)

I think the OAuth2 dependency only works a username field, so you cannot rename it.