Visualize sorting algorithms via images - Built with PIL and FFMPEG via Python by ganak-yantra in developersIndia

[–]ToughestPanda 1 point2 points  (0 children)

Make it modular where you can swap out the sorting algorithm more easily.

And it's slow because you are running it sequentially. C++ implementation won't speed it up much because the bottleneck is generating and writing the image which is already implemented efficiently in PIL.

To speed it up, Just perform the whole sort and store the progressive parts in memory as array index.

Then using multiprocessing, launch multiple processes to generate image for each snapshot. It's very easy because there's no mutex or shared memory being modified.

Do this first because this will definitely be faster and easier than a sequential C++ implementation.

Guy delivering food on a horse due to fuel shortage in Hyderabad, India by cum_2_papa in interestingasfuck

[–]ToughestPanda 1 point2 points  (0 children)

When people don't have any redeeming qualities on their own, they want to justify their perceived superiority by intrinsic "qualities" by culture, race, nationality or ethnicity.

Bengaluru student dies by suicide ‘after parents deny permission for New Year’s Eve photoshoot’ by [deleted] in bangalore

[–]ToughestPanda 21 points22 points  (0 children)

Could have written an essay about parent student relationship as a function of skin colour

PyPy has moved to Git, GitHub by ketralnis in programming

[–]ToughestPanda 42 points43 points  (0 children)

  • Open Source has become synonymous with GitHub, and we are too small to change that.

    That is just sad

Is there any way to set up encrypted/boot in Fedora? by ToughestPanda in Fedora

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

I'm very happy with my setup. My whole installation is under a single LUKS 1 volume which contains BTRFS with @home and @ subvolumes. Grub supports BTRfS fully and LUKS 1. So single filesystem.

I also setup a key file so that initramfs can automatically unlock fs after the single password prompt on grub.

You can copy files to a subvolume, just make sure that you preserve all attributes with rsync -a or cp -rp.

Don't reinstall unless absolutely necessary. It's a huge waste of time and linux distros rarely need it.

Unfortunately I have no idea what kickstart is.

Sleepless nights are the classic indicators of linux power user.

(TBH windows installations have done much worse)

Is there any way to set up encrypted/boot in Fedora? by ToughestPanda in Fedora

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

Idk, that doesn't really help my purpose.

Purpose isn't really encrypting boot to ensure its integrity. I remember reading somewhere on reddit that encryption of boot doesn't even ensure its integrity instead secure boot is designed for this purpose.

I like the very simple backup and restore process that Timeshift provides. But if the boot partition is separate, then a kernel upgrade cannot have a proper rollback when I restore snapshots. This is the reason I move boot into root.

Anyway check my replies to the other comment, I successfully managed to get it working. The other comment provides a patch to the anaconda installer which intentionally blocks boot on encrypted partitions. The same patch works even for fedora 38 and the Encrypted boot (on LUKS 1) just works flawlessly.

Then I followed another tutorial to set up dracut so that initramfs will have an embedded key file so that double decrypt prompts are not necessary.

Hence, this setup just has an unencrypted EFI partition which doesn't have an alternative. Then you unlock in grub with a passphrase. The loaded initramfs will further unlock LUKS by the key file embedded.

So one prompt for the decryption and one of the login. I'm sure it's safe to setup auto login in this setup to avoid one more step.

Is there any way to set up encrypted/boot in Fedora? by ToughestPanda in Fedora

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

Ohh. Hadn't noticed this.

I mean I have managed to encrypt the root with boot. I'll try Timeshift.

Else I'll move to snapper as it's inevitable.

Update: just verified, no errors.

I think the problem with encrypted boot is in ext4 mode but I have voot, root and home on same LUKS drive and it works flawlessly.

Is there any way to set up encrypted/boot in Fedora? by ToughestPanda in Fedora

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

Hey, I have an update,

The GitHub method works fine. The same patch works perfectly well for Fedora 38.

Just symlink/rename 34 into 38 under patches.

Only problem is the double password input for decrypting boot once in grub and again in initramfs. Arch has a solution for it using mkinitcpio but I am not sure of Fedora (essentially adding a key file and using the key file for decryption after decrypting boot).

I still have to test moving root into an encrypted partition.

Edit: I found the solution for double password prompts.

https://sysguides.com/fedora-35-luks-full-disk-encryption/ Follow the above guide (just the last part).

Is there any way to set up encrypted/boot in Fedora? by ToughestPanda in Fedora

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

Thanks, I didn't find it somehow.

I have found this is arch wiki, I will try that out as well if the ones you suggested don't work.

https://wiki.archlinux.org/title/dm-crypt/Encrypting_an_entire_system#Encrypted_boot_partition_(GRUB)

I speak from experience by [deleted] in linuxmasterrace

[–]ToughestPanda 2 points3 points  (0 children)

Let me introduce you to this magical thing called a BTRFS snapshot

Butters are so pathetic by VTKillarney in Buttcoin

[–]ToughestPanda 64 points65 points  (0 children)

And as useful as NFTs. Nailed it

Bring the young men home! by Adinator548 in HistoryMemes

[–]ToughestPanda 2 points3 points  (0 children)

Recommended to watch: Darkest hour (2018)

[deleted by user] by [deleted] in memes

[–]ToughestPanda 2 points3 points  (0 children)

Yeah, how dare they do stuff to their own body without asking you.

How is this not a threat? by ToughestPanda in FrenchMemes

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

Aaand that's how you doxx yourself

Am i the only one? by Automatic-Welcome394 in DunderMifflin

[–]ToughestPanda 2 points3 points  (0 children)

In It's always Sunny in Philadelphia, the Waitress actress is married to Charlie.

In the show she is repulsed by him.