wasabi

joined 1 year ago
[–] wasabi@feddit.de 1 points 6 months ago (1 children)

What's your hoster?

 

I'm using contabo and the VPS I got is advertised as 1 Gigabit. When I do a speedtest or use iperf3 to connect to public servers I get pretty close to 1 Gigabit. But from my residential IP the speed drops down to 100-250 Mbit/s. My home internet connection can handle 500 Mbit just fine.

I'm looking for a new hoster with a better network connection. What real world speeds do you get with your server?

[–] wasabi@feddit.de 7 points 6 months ago

Looks very broken on mobile.

1000021481

[–] wasabi@feddit.de 2 points 6 months ago

I have found it: fka boursin - coma (original mix)

Finally my mind can rest

4
submitted 6 months ago* (last edited 6 months ago) by wasabi@feddit.de to c/music@beehaw.org
 

I just listened to Tatsuro Yamashita's City Pop classic "SPACY" and at the end of the Track "Umbrella" (at 3:22) I heard a snippet that sounded incredibly familiar. That guitar slide with the harmonics.

Some other track must have sampled it, but I can't put my finger on it. I think that the sample was used at the start of the track and that the track had a mostly ambient vibe. Does anyone know who sampled this?

[–] wasabi@feddit.de 1 points 6 months ago

Check out Wolfgang's Channel on YouTube. He goes very in depth on low power consumption home servers.

[–] wasabi@feddit.de 1 points 6 months ago

Exact Audio Copy and Qobuz.

[–] wasabi@feddit.de 19 points 7 months ago (1 children)

python -m http.server came in handy so many times!

[–] wasabi@feddit.de 1 points 7 months ago* (last edited 7 months ago)

Honestly the most complete source of high res music is private trackers like redacted. You can download all the stuff from qobuz and bandcamp, every CD rip you can think of in bit perfect quality of and even very good vinyl rips. You basically can download any version ever released from any album.

[–] wasabi@feddit.de 1 points 7 months ago

Yes, that's a good alternative for Collection[str] but not so much for Iterable[str] as you lose the lazyness of Generators.

[–] wasabi@feddit.de 3 points 7 months ago

Maybe something like passing in a list of patterns which should match some data, or a list of files/urls to download would be examples of where I would like to be generic, but taking in a string would be bad.

But the real solution be to convert it to foo(*args: str). But maybe if you take 2 Container[str] as input so you can't use *args. But no real world example comes to mind.

[–] wasabi@feddit.de 1 points 7 months ago

Yes, you're right. It also a lot of benefits.

[–] wasabi@feddit.de 2 points 7 months ago (2 children)

This + an assert seems like the way to go. I think that str should never have fulfilled these contracts in the first place and should have a .chars property that returns a list of one-character-strings. But this change would break existing code, so it is not going to happen.

 

I often find myself defining function args with list[SomeClass] type and think "do I really care that it's a list? No, tuple or Generator is fine, too". I then tend to use Iterable[SomeClass] or Collection[SomeClass]. But when it comes to str, I really don't like that solution, because if you have this function:

def foo(bar: Collection[str]) -> None:
    pass

Then calling foo("hello") is fine, too, because "hello" is a collection of strings with length 1, which would not be fine if I just used list[str] in the first place. What would you do in a situation like this?

 

I'm currently using a VPS from contabo and am curious if I would get better performance CPU and disk I/O wise because of the dedicated resources. The bigger VPS from contabo seem to be in a similar ballpark to the cheapest options available in the hetzner server auction when it comes to corecount, ram and disk size and price.

 

I'm new to the container world. Does it have any security benefits when I run my applications as a non-root user in a docker container? And how about Podman? There I'll run the container as an unprivileged user anyway. Would changing the user in the container achieve anything?

 

I have seen some people prefer to create a list of strings by using thing = list[str]() instead of thing: list[str] = []. I think it looks kinda weird, but maybe that's just because I have never seen that syntax before. Does that have any downsides?

It is also possible to use this for dicts: thing = dict[str, SomeClass](). Looks equally weird to me. Is that widely used? Would you use it? Would you point it out in a code review?

1
submitted 1 year ago* (last edited 1 year ago) by wasabi@feddit.de to c/python@programming.dev
 

After learning about TYPE_CHECKING i made it a habit to put all imports that were only needed for type checking into an if TYPE_CHECKING: guard. But now I am wondering if that is actually intended to be used like that. Checking whether an import is only needed at type checking time can get quite tedious and sometimes you run into situations were you introduced some code that made the import a requirement at runtime.

How do you use TYPE_CHECKING? Whenever it is possible or only when using it actually solves a circular import?

0
submitted 1 year ago* (last edited 1 year ago) by wasabi@feddit.de to c/music@beehaw.org
 

I'm sure some of you have some artists that are generally beloved by the music community but you just can't stand them.

For me it is The Mars Volta. It should be right up my alley, I like a lot of similar music but I can't get over the vocals. They sound so emo (which kinda makes sense, given the background of the vocalist) but to me it just does not fit the music at all.

Not trying to shit talk them, just wanting to share some hot takes.

view more: next ›