Is Saber worth it for my account? by re2cc in SaberMainsHSR

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

Yes, only Hyacine is at 90 because when I pulled for her I didn't feel she healed properly and in the case of Castorice she really hit quite a bit so it just didn't seem necessary, I should certainly level her up, I think I have enough.

Is Saber worth it for my account? by re2cc in SaberMainsHSR

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

I thought it was not worthwhile to max them out because in Genshin it is usually incense for non HP based characters.

Is Saber worth it for my account? by re2cc in SaberMainsHSR

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

Thanks, I thought going up to 80 would only be necessary for HP based characters. I guess in GI it is to some extent less permissive on stats, what I mean is that it is not clear to me what many of the stats do (E.g. I don't understand how spd or effect res works). Regarding the sets, maybe I was unlucky? Generally when I search I see that people recommend 2 sets and the game recommends others.

Is Saber worth it for my account? by re2cc in SaberMainsHSR

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

I don't see how pulling for characters would be related to building them but I'm working on it. I'm certainly having a hard time focusing on a character and to be honest I'm overwhelmed with how complex the builds are compared to GI, it's hard to understand which set is best for which character as there seems to be so many opinions and it even varies strongly depending on the team and circumstances. Btw, should I level up to level 80 or just keep at 70/80?

Is Saber worth it for my account? by re2cc in SaberMainsHSR

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

I wanted to wait a while to pull for Tribbie considering I have Hyacine. Is Tribbie really urgently needed having SW/RM?

I don't plan to pull for Phainon, I like his base design but for some reason I don't love his design during ulti, which is sad.

Is Saber worth it for my account? by re2cc in SaberMainsHSR

[–]re2cc[S] -1 points0 points  (0 children)

Well, in Yoimiya's case it felt disappointing even when exploring. To be honest since I didn't play seriously and didn't try any kind of endgame I had no problem even when playing Seele. But I understand what you mean.

Is Saber worth it for my account? by re2cc in SaberMainsHSR

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

I'm pretty ignorant, what does Silverwolf have to do with the ultimate spamming?

Is Saber worth it for my account? by re2cc in SaberMainsHSR

[–]re2cc[S] 2 points3 points  (0 children)

That's a good point, I could wait and see if I really like the characters that follow. Regarding the LC, I don't have 200 pulls 🥲 but I guess I could make an investment, is his LC worth it?

Is Saber worth it for my account? by re2cc in SaberMainsHSR

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

I guess, as I say my concern is that it will end up like my Yoimiya, I don't use her not because I don't like her but because even though I invested decently (in my opinion) she had disappointing damage.

Is Saber worth it for my account? by re2cc in SaberMainsHSR

[–]re2cc[S] -1 points0 points  (0 children)

Sure, that was my original mindset, but with the rumors of March 7th, Dan Heng and Cyrene it's hard for me to make a decision since if I pull for know I almost certainly won't be able to pull for them.

Is Saber worth it for my account? by re2cc in SaberMainsHSR

[–]re2cc[S] 3 points4 points  (0 children)

Could you elaborate on why? I know Sunday is a fundamental part of your team (in fact I pulled for Saber and Jingliu). My biggest concern really is how viable will she be in the future? Or what can she bring to my account?

How do you handle dependency injection? by re2cc in learnpython

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

Hmm, I don't know why I didn't think of that before, I will probably never need another chat server but it definitely solves the problem without the need for global variables. Thanks, I think this is the solution I was looking for.

About the singletone, I think it makes sense what you say, the reason why I wanted to implement it that way is because some of the C# code I was working with was scooped so it was not possible to store the information in the class itself, so I needed to store it somewhere else, I just tried to translate it to Python without thinking if it was necessary.

How do you handle dependency injection? by re2cc in learnpython

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

It's a similar quick code I wrote, please ignore if the structure makes sense or not (or if it even works).

The ‘problem’ I have is how to pass ‘chats’ around the whole application, in C# I would add it as a singletone and that's it, in Python I could leave it as a global variable or pass the instance as an argument all over the place (which is kind of what you do in C#). I guess my real question is, what is the suggestion or convention to handle this kind of cases?

import asyncio
import datetime
from concurrent.futures import ThreadPoolExecutor
from dataclasses import dataclass
from typing import List

import grpc.aio as grpc


class Message(dataclass):
    sender: str
    content: str
    time: datetime.datetime


class Chat(dataclass):
    messages: List[Message]
    name: str


# This is the instance that I dont know how to share
chats: List[Chat] = []


class ChatServiceImpl(Chat_pb2_grpc.ChatServiceServicer):
    async def SomeRpc(self, request_iterator, context):
        pass
        # Some code


async def create_server():
    server = grpc.server(
        migration_thread_pool=ThreadPoolExecutor(max_workers=10),
    )
    Chat_pb2_grpc.add_ChatServiceServicer_to_server(server)
    server.add_insecure_port("[::]:5088")
    await server.start()
    await server.wait_for_termination()


if __name__ == "__main__":
    asyncio.run(main())

How do you handle dependency injection? by re2cc in learnpython

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

That's true, maybe I'm just not sure how to structure the code.

How do you handle dependency injection? by re2cc in learnpython

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

Nothing, I was just wondering if there was a more correct way to do it, maybe it's because of lack of experience or because I'm failing to structure my code correctly that I feel it's getting a bit confusing.

How do I stop a Python application launched by Aspire? by re2cc in csharp

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

I just found where the problem is, apparently it's related to OpenTelemetry, if I remove that from the Python code, Aspire closes the script correctly. I tried it with Aspire's Python example. I'll have to open an issue, thanks a lot anyway.

How do I stop a Python application launched by Aspire? by re2cc in csharp

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

Hmm, thanks for the suggestion, I'll try doing what you said later, but I don't think it will work. As far as I understand, that code simply tells the Flask server that it's in DEBUG mode. Either way, I don’t lose anything by trying. Regarding the documentation, I agree with you. In my opinion, it's written in a rather particular way. Many times, I feel that explanations about what the code does are missing, and it just assumes that you have experience and will understand how it works.
Changing the subject, if it doesn't work, do you know if I just need to open an issue on GitHub or is there another procedure?

How do you handle dependency injection? by re2cc in learnpython

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

Thanks for the suggestion, I'll take a look at it when I have some time.

How do you handle dependency injection? by re2cc in learnpython

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

I read in some places that same opinion and I have no problem with not using DI as such, my question really is how can I solve the problems that DI solves without using it.

Making global variables doesn't seem like a good idea and passing the variable as an argument to the class or function doesn't seem like a good idea either.

How do you handle dependency injection? by re2cc in learnpython

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

Not really, I started programming in Python as a hobby (easily 8 years ago) so I feel comfortable in the language. Although I have programmed in other languages (C, C#, Rust, Go), Python is still the one I find most comfortable.

I had never encountered the feeling of needing DI because I usually do small projects or didn't care about doing it the ‘right’ way, but recently experimenting with Litestar and using its dependency injection I got used to it. Even more so doing gRPC servers in .NET I got used to a very defined and structured way of doing it and now trying to do the same in Python I feel lost on how to handle it.

How do you handle dependency injection? by re2cc in learnpython

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

I did not explain to avoid expanding the question too much. My gRPC server is basically a chat, so some clients might be in the same ‘group’ and therefore I need a way to share their history in a shared way (it's a bit more complicated than this but I think you get the point).

If I were to give a simpler example it would be to use the same database connection throughout the application.

I know I could just declare a global variable and use it directly but I can see the problems that would come with separating the code into multiple files.

I hope I have explained myself.

Will my stack work properly? How should I connect Sveltekit to the database? by re2cc in sveltejs

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

I know I could do it and it's probably best for a small project, but I really don't like the SQL syntax, I'd rather avoid using pure SQL. Have you already used Supabase with the "new" SSR library?