@eager_eagle@lemmy.world cover
@eager_eagle@lemmy.world avatar

eager_eagle

@[email protected]

This profile is from a federated server and may be incomplete. View on remote instance

best way to access databases in different projects

Hi, I want to know what is the best way to keep the databases I use in different projects? I use a lot of CSVs that I need to prepare every time I'm working with them (I just copy paste the code from other projects) but would like to make some module that I can import and it have all the processes of the databases for example...

eager_eagle ,
@eager_eagle@lemmy.world avatar

But I would like to have a module that I could import and have all my databases and configuration of ETL[...]

ok, then write a module. I'm not sure what's being asked. The best way is what works well for you.

eager_eagle ,
@eager_eagle@lemmy.world avatar

List comprehensions return a new list. For the sake of code clarity, you probably shouldn't change a second list from within a list comprehension. If you're trying to concatenate two lists, you can do so in a second line:

a = list(range(10))
b = [ value for value in range(5) ]
a.extend(b)

# a has 15 elements
print(a)
eager_eagle OP ,
@eager_eagle@lemmy.world avatar

"replacing GPS" is a stretch, but it's some sci-fi tech to use when GPS can't be used

eager_eagle OP ,
@eager_eagle@lemmy.world avatar

a lot cooler

ice what you did there

long-term inertial guidance

this is exactly what I got from the article: a more accurate inertial navigation. What part violates relativity?

eager_eagle OP ,
@eager_eagle@lemmy.world avatar

the initial location doesn't need to be GPS, just a known anchor location. Which is trivial to implement in the case of trains, since stations don't move that drastically.

eager_eagle OP , (edited )
@eager_eagle@lemmy.world avatar

you're thinking anywhere on the platform, I'm suggesting a known place near a station by which the train passes and its location - at that moment - is known.

All the system needs is a ground-truth location after a certain amount of time. GPS is just a cheap and convenient way to do it almost anywhere, but this location correction doesn't need to be satellite-based at all.

eager_eagle OP ,
@eager_eagle@lemmy.world avatar

surely these are things that should be considered, but they move in relation to what? And is this surprising amount of any significance for tens or hundreds of miles of rail?

eager_eagle ,
@eager_eagle@lemmy.world avatar

I just visited it again, ugh...

they revamped the UI, removed features in the process and worsen the performance? Classic Google.

that said, it's still usable on my end. Maybe check your hardware acceleration is working?

eager_eagle ,
@eager_eagle@lemmy.world avatar

tbh I'd rather not see the picture when it comes to mcdonald's, as it can only lead to a disappointment

eager_eagle ,
@eager_eagle@lemmy.world avatar

That's way too much. I'll make you one for just $330.

"make capslock an additional Ctrl" option was removed in the latest update

Running Endeavour OS Linux and just updated to plasma 6.0.5, framework 6.3.0, Qt version 6.7.1 on Wayland. I use capslock strictly as my brain refuses to learn using shift (I do touch type no problem), but as well know the capslock is very slow on Linux which always results in text like THis. So, I've found a fix for it online...

eager_eagle ,
@eager_eagle@lemmy.world avatar

try changing your ~/.config/kxkbrc:

[Layout]
# ... 
Options=caps:ctrl_modifier
# ...

that's the file KDE's keyboard settings change.

Also:

  • caps:ctrl_modifier means "Make Caps Lock act as an additional Ctrl modifier, but keep identifying as Caps Lock"
  • ctrl:nocaps means Ctrl position -> "Caps Lock as Ctrl"
  • ctrl:swapcaps means Ctrl position -> "Swap Ctrl and Caps Lock"
eager_eagle ,
@eager_eagle@lemmy.world avatar

iirc one program (a game, I think) didn't work properly when I had nocaps: the keyboard settings would allow the keybind, but it didn't work in-game

tobozo , to KDE
@tobozo@mastodon.social avatar

omg KDE @kde if it ain't broken, fix it until it is?

eager_eagle ,
@eager_eagle@lemmy.world avatar

I can confirm this breaks on v24.05.0

probably a bug

I'm a bit surprised something like this wasn't caught by tests

eager_eagle , (edited )
@eager_eagle@lemmy.world avatar

fwiw here's the en_SE locale source I use

http://www.stacken.kth.se/~auno/en_SE

as /usr/share/i18n/locales/en_SE

so yes, you can add them

eager_eagle , (edited )
@eager_eagle@lemmy.world avatar

I don't know what you mean by that. It's a locale, it has nothing to do with KDE or Plasma. It doesn't even need a desktop environment. Plasma Settings will just pick up the ones you have installed.

eager_eagle , (edited )
@eager_eagle@lemmy.world avatar

I can see both en_DK and en_SE

https://lemmy.world/pictrs/image/892d57ee-eb90-41c4-bd49-962b3b2e7a55.png

did you run locale-gen after adding it?

eager_eagle ,
@eager_eagle@lemmy.world avatar

Absolutely not! You should use something safe for consumption, like bubble gum.

eager_eagle ,
@eager_eagle@lemmy.world avatar

That's why I'll only play during work hours.

eager_eagle ,
@eager_eagle@lemmy.world avatar

It was really much better than fb and other platforms, really easy to group and filter content on it.

I just hated their forced integration with YouTube comments section which only served to artificially pump up the number of G+ users. Great platform, bad management decisions.

eager_eagle ,
@eager_eagle@lemmy.world avatar

gets their own name as response

fires IT

eager_eagle ,
@eager_eagle@lemmy.world avatar

Overall JavaScript (with Typescript anyway, which you can learn later) is a better language than Python.

🤣🤣🤣

good one

eager_eagle ,
@eager_eagle@lemmy.world avatar

I guess partly because the Python tooling catastrophe makes it a quite a pain to set them up.

Salty huh

Saying you need to set up type hinting in Python shows that you're the one assuming it's a hassle like TS, where you need a different runtime to have access to something the language (JS) should have provided from the start.

Everything you need is provided by typing, which is included in a Python install. Just import it and start using it.

eager_eagle ,
@eager_eagle@lemmy.world avatar

...and breaks it on privacy-preserving browsers

win-win I guess

eager_eagle ,
@eager_eagle@lemmy.world avatar

and for a bland and meaningless name of all choices

eager_eagle ,
@eager_eagle@lemmy.world avatar

part of me wishes they did that, so maybe other websites would stop with the tweet linking and making entire articles around them

eager_eagle ,
@eager_eagle@lemmy.world avatar

it feels like they're shooting gem* products everywhere to see what sticks

then they'll kill 90% of them in a couple of years

eager_eagle ,
@eager_eagle@lemmy.world avatar

Search sucks for some time now. I'd say the best thing google offers today is Gmail - but there are plenty of arguments against that too.

eager_eagle ,
@eager_eagle@lemmy.world avatar

Well, it's not exactly impossible because of that, it's just unlikely they'll use a discriminator for the task because great part of generated content is effectively indistinguishable from human-written content - either because the model was prompted to avoid "LLM speak", or because the text was heavily edited. Thus they'd risk a high false positive rate.

eager_eagle ,
@eager_eagle@lemmy.world avatar

True. I wanted to replace it with OSM or similar, but my main use of Maps after navigation is exploring places, reading reviews, and browsing pictures. They have a database that is tough to replace.

eager_eagle ,
@eager_eagle@lemmy.world avatar

we know it'll never happen, but if they...

  • have content from most studios available indefinitely in one place - or even better, a federated platform - at no additional cost.
  • drop all this drm stupidity and allow the best quality streams on any general computing device.

only then, in my view, it'd equal the convenience I have today and I wouldn't mind paying a reasonable amount for that.

eager_eagle ,
@eager_eagle@lemmy.world avatar

it seems like a general preference to system settings, even after ranking applications higher

https://lemmy.world/pictrs/image/8a5e9570-d340-4130-b62c-4f8342f7c919.png

eager_eagle ,
@eager_eagle@lemmy.world avatar

I thought it was just incrementing the address and dereferencing it, but I don't write C or C++. What is being overloaded there?

eager_eagle ,
@eager_eagle@lemmy.world avatar

I hate it when some blame early returns for the lack of maintainability.

Early returns are a great practice when doing argument validation and some precondition checks. They also avoid nested blocks that worsen readability.

What's being described there is a function that tries to do too much and should be broken down. That's the problem, not early returns.

eager_eagle ,
@eager_eagle@lemmy.world avatar

You can say any execution flow controls are like gotos - continue, break, exceptions, switch, even ifs are not much more than special cases of gotos.

This is true regardless of the size of the function which shows that the size of the function isn’t the determinant

Logical clarity does tend to worsen as the function grows. In general, it is easier to make sense of a shorter function than a longer one. I don't know how you could even say otherwise.

Early returns are still great for argument validation. The alternative means letting the function execute to the end when it shouldn't, just guarded by if conditions - and these conditions any reader would have to keep in mind.

When a reader comes across an early return, that's a state they can free from their reader memory, as any code below that would be unreachable if that condition was met.

eager_eagle , (edited )
@eager_eagle@lemmy.world avatar

Any validation you can write with a few early returns you can write with an equivalent conditional/s followed by a single nested block under it, followed by a single return. The reader is free to leave the validation behind just the same.

And that conditional indents your entire function one level - if you have more validation checks, that's one level of indentation per check (or a complicated condition, depends whether you can validate it all in one place). It's pretty much the case the other user illustrated above.

Returns inside business logic past validation is where the problematic bugs of this class show up

That much we agree. But again, this is not an early return issue, putting too much logic in a function is the issue. Rewriting it without early returns won't make it much clearer. Creating other functions to handle different scenarios will.

eager_eagle , (edited )
@eager_eagle@lemmy.world avatar

exactly, they (Telegram) don't need to put sketchy code in the clients when most messages are not E2E encrypted and they control the servers lol

eager_eagle , (edited )
@eager_eagle@lemmy.world avatar

Telegram is the only massively popular messaging service that allows everyone to make sure that all of its apps indeed use the same open source code that is published on Github.

Not true. Signal has a very similar client verification process to Telegram's, described here. The lack of an iOS reproducible build is an Apple limitation / nuisance.

It’s very complicated, the 2nd jailbroken device is necessary because there’s no other way to download the .ipa, but even if you manage to do that and bit-for-bit reproduce the .ipa you downloaded from source, there’s no way to know if the App Store is sending every user the same .ipa or if your other, non-jailbroken iPhone downloaded a backdoored one.

Telegram docs even acknowledge these limitations.

Ultimately, this client verification is not the selling point Telegram's founder makes it sound like, since most messages are not E2EE and the server code is closed.

eager_eagle ,
@eager_eagle@lemmy.world avatar

tl;dr "Signal might be untrustworthy because the tech came from a State-sponsored project and the current chairman acknowledges that Wikipedia has a white and Western bias."

just wait until they find out pretty much all tech we have can be traced back to government-funded research.

eager_eagle ,
@eager_eagle@lemmy.world avatar

I'd look into AV1 decoding benchmarks, regardless of NVIDIA vs AMD, as I've been using NVIDIA on Jellyfin for a while with no issues.

HEVC is not as relevant IMO, as it's not available through browsers due to license restrictions (ffmpeg / mpv works fine), so I'd focus on AV1 capabilities, which is not available in many cards.

eager_eagle ,
@eager_eagle@lemmy.world avatar

Btrfs is slower than ext4, xfs, and f2fs in pretty much every metric. Noticeably slower app opening times is the reason I switched to F2FS for good.

eager_eagle ,
@eager_eagle@lemmy.world avatar

Compression might be useful in some cases, but the bulk of my data is already compressed or not much compressible (think videos, images, compressed archives, game assets). So the trade off doesn't make much sense to me.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • kbinchat
  • All magazines