danielquinn

joined 1 year ago
[–] danielquinn@lemmy.ca 1 points 1 day ago

Monolith has the same problem here. I think the best resolution might be some sort of browser-plugin based solution where you could say "archive this" and have it push the result somewhere.

I wonder if I could combine a dumb plugin with Monolith to do that... A weekend project perhaps.

[–] danielquinn@lemmy.ca 1 points 1 day ago

Monolith can be particularly handy for this. I used it in a recent project to archive the outgoing links from my own site. Coincidentally, if anyone is interested in that, it's called django-cool-urls.

[–] danielquinn@lemmy.ca 4 points 2 days ago* (last edited 2 days ago) (1 children)

I don't know why I care so much to try to inform you when you can't even be bothered to google israelis destroy food, but here you go:

Then there's the case where Israel targetted and killed aid workers just trying to deliver food. Again from the BBC: Biden 'outraged' over Israel strike on World Central Kitchen staff in Gaza.

Not satisfied with mainstream media that's often biased in favour of genocide? Here is video footage of Israelis straight-up destroying food destined for Gazan children.

You say you've "been there". I assume you mean Israel and not Gaza. Maybe, if you're so confident that Israel are the good guys here, you should go back and help get those aid trucks through the Israeli blockades. Maybe you should try to stop the soldiers from gunning down people trying to collect flour from the few trucks that do get through.

You might be thinking something outlandish like: "It must be Hamas. Some sort of deep-cover thing where they're killing their own people to implicate the Most Moral Army In The World", and honestly, if you're that far gone, there's no helping you. I'm not going to sit here though and let you repeat lies unchallenged. Israel has -- in the words of its own ministers, besieged Gaza. It's so bad that even Biden has demanded that they let aid trucks through.

You are misinformed. I encourage you to learn more about the country you're defending.

[–] danielquinn@lemmy.ca 9 points 2 days ago (3 children)

You are misinformed. The food trucks are not from Israel. They are being blockaded by Israel and the food destroyed. There's ample evidence for this. They film themselves doing it.

[–] danielquinn@lemmy.ca 6 points 4 days ago (1 children)

More of this please!

[–] danielquinn@lemmy.ca -1 points 5 days ago

This will make rejoining the EU much more difficult.

[–] danielquinn@lemmy.ca 5 points 6 days ago

ExFAT is good for portable devices, but if you're working with something internally, there's no reason not to use EXT4 or NTFS.

[–] danielquinn@lemmy.ca 3 points 6 days ago

That's not been my experience. Lots of drives I've bought have been FAT32 out of the box.

[–] danielquinn@lemmy.ca 3 points 6 days ago* (last edited 6 days ago) (4 children)
  • Keep everything in git. You can use third party services like Codeberg, GitLab, or GitHub, or host your own on your NAS.
  • When you're not working on a project and don't think you'll need to reference it for a while, just delete it from your laptop. The code always lives in git anyway.

In terms of local storage, I usually have everything in ~/projects/project-name, and I don't have tiny file size limits because I don't use FAT32 filesystems — that's the default filesystem you usually get on USB sticks and external hard drives you buy. You have to format those drives to something like EXT4 (Linux) or NTFS (Windows) or you get stuck with FAT32 which has 2gb file sizes.

[–] danielquinn@lemmy.ca 12 points 6 days ago (4 children)

You probably want to look into Health Checks. I believe you can tell Docker to "start service B when service A is healthy", so you can define your health check with a script that depends on Tailscale functioning.

[–] danielquinn@lemmy.ca 6 points 6 days ago

I'm reasonably sure that the size of the monitor doesn't matter, but the resolution does. If you run your monitor at 720p, the performance should be the same as the Deck locally. If you try to run it at 4k (I'm not even sure how you'd convince the Deck to do that) it would decrease performance considerably.

[–] danielquinn@lemmy.ca 2 points 1 week ago (1 children)

Agreed. Especially in Canada where we have a Liberal party it's quite annoying!

 

From time to time, often after I've restored from sleep or finished playing a Steam game, one of my CPU cores is pinned at 100% with no indication of what might be doing it. Running htop, btop, or GNOME system monitor all show the same thing: CPU0 at 100% while the rest are doing near-nothing, and no process in particular seems to be using those resources.

If I restart, it's back to normal, and sometimes I can play a game in Steam or let the computer go to sleep and it doesn't do this, but it happens often enough that's annoying/confusing so I'd like to know if there's a way to either (a) diagnose which processes are using which CPU cores, or (b) somehow "reset" the checking of these values to make sure that something's not just being misreported.

This is a desktop system running Arch & GNOME.

61
Developing with Docker (danielquinn.org)
submitted 1 month ago* (last edited 1 month ago) by danielquinn@lemmy.ca to c/python@programming.dev
 

I've been writing code professionally for 24 years, 15 of which has been Python and 9 years of that with Docker. I got tired of running into the same complications every time I started a new job, so I wrote this. Maybe you'll find it useful, or it could even start a conversation, but this post has been a long time coming.

Update: I had a few requests for a demo repo as a companion to this post, so I wrote one today. It includes a very small Django demo user Docker, Compose, and GitLab CI.

 

...so I found out how to fix it

 

It would seem that I have far too much time on my hands. After the post about a Star Trek "test", I started wondering if there could be any data to back it up and... well here we go:

The Next Generation

Name Percentage of Lines
PICARD 20.16
RIKER 11.64
DATA 10.1
LAFORGE 6.93
WORF 6.14
TROI 5.4
CRUSHER 5.11
WESLEY 2.32

DS9

Name Percentage of Lines
SISKO 13.0
KIRA 8.23
BASHIR 7.79
O'BRIEN 7.31
ODO 7.26
QUARK 6.98
DAX 5.73
WORF 3.18
JAKE 2.31
GARAK 2.29
NOG 2.01
ROM 1.89
DUKAT 1.76
EZRI 1.53

Voyager

Name Percentage of Lines
JANEWAY 17.7
CHAKOTAY 8.76
EMH 8.34
PARIS 7.63
TUVOK 6.9
KIM 6.57
TORRES 6.45
SEVEN 6.1
NEELIX 4.99
KES 2.06

Enterprise

Name Percentage of Lines
ARCHER 24.52
T'POL 13.09
TUCKER 12.72
REED 7.34
PHLOX 5.71
HOSHI 4.63
TRAVIS 3.83
SHRAN 1.26

Discovery

Note: This is a limited dataset, as the source site only has transcripts for seasons 1, 2, and 4

Name Percentage of Lines
BURNHAM 22.92
SARU 8.2
BOOK 6.21
STAMETS 5.44
TILLY 5.17
LORCA 4.99
TARKA 3.32
TYLER 3.18
GEORGIOU 2.96
CULBER 2.83
RILLAK 2.17
DETMER 1.97
OWOSEKUN 1.79
ADIRA 1.63
COMPUTER 1.61
ZORA 1.6
VANCE 1.07
CORNWELL 1.07
SAREK 1.06
T'RINA 1.02

If anyone is interested, here's the (rather hurried) Python used:

#!/usr/bin/env python

#
# This script assumes that you've already downloaded all the episode lines from
# the fantastic chakoteya.net:
#
# wget --accept=html,htm --relative --wait=2 --include-directories=/STDisco17/ http://www.chakoteya.net/STDisco17/episodes.html -m
# wget --accept=html,htm --relative --wait=2 --include-directories=/Enterprise/ http://www.chakoteya.net/Enterprise/episodes.htm -m
# wget --accept=html,htm --relative --wait=2 --include-directories=/Voyager/ http://www.chakoteya.net/Voyager/episode_listing.htm -m
# wget --accept=html,htm --relative --wait=2 --include-directories=/DS9/ http://www.chakoteya.net/DS9/episodes.htm -m
# wget --accept=html,htm --relative --wait=2 --include-directories=/NextGen/ http://www.chakoteya.net/NextGen/episodes.htm -m
#
# Then you'll probably have to convert the following files to UTF-8 as they
# differ from the rest:
#
# * Voyager/709.htm
# * Voyager/515.htm
# * Voyager/416.htm
# * Enterprise/41.htm
#

import re
from collections import defaultdict
from pathlib import Path

EPISODE_REGEX = re.compile(r"^\d+\.html?$")
LINE_REGEX = re.compile(r"^(?P<name>[A-Z']+): ")

EPISODES = Path("www.chakoteya.net")
DISCO = EPISODES / "STDisco17"
ENT = EPISODES / "Enterprise"
TNG = EPISODES / "NextGen"
DS9 = EPISODES / "DS9"
VOY = EPISODES / "Voyager"


class CharacterLines:
    def __init__(self, path: Path) -> None:
        self.path = path
        self.line_count = defaultdict(int)

    def collect(self) -> None:
        for episode in self.path.glob("*.htm*"):
            if EPISODE_REGEX.match(episode.name):
                for line in episode.read_text().split("\n"):
                    if m := LINE_REGEX.match(line):
                        self.line_count[m.group("name")] += 1

    @property
    def as_percentages(self) -> dict[str, float]:
        total = sum(self.line_count.values())
        r = {}
        for k, v in self.line_count.items():
            percentage = round(v * 100 / total, 2)
            if percentage > 1:
                r[k] = percentage
        return {k: v for k, v in reversed(sorted(r.items(), key=lambda _: _[1]))}

    def render(self) -> None:
        print(self.path.name)
        print("| Name             | Percentage of Lines |")
        print("| ---------------- | ------------------- |")
        for character, pct in self.as_percentages.items():
            print(f"| {character:16} | {pct} |")


if __name__ == "__main__":
    for series in (TNG, DS9, VOY, ENT, DISCO):
        counter = CharacterLines(series)
        counter.collect()
        counter.render()
 

My father is 75 and not very capable on a computer. He's got an old MacBook Air at home behind a typical ISP router for which he has no access controls (so no port forwarding).

My immediate need is actually not his machine at all, but the Raspberry Pi I installed at his house before I left the country and forgot to enable cron on so it's not doing what I need yet. However, it would be really nice if I could also do one of the following as well:

  • VNC (or something) into his computer whenever something "isn't working" rather than doing the talk-him-through-it dance over Skype.
  • Install a new OS (the Mac is no longer supported by MacOS). I don't know how plausible this is though.

My current plan is to email him a shell script that should create a reverse SSH tunnel to a server in Montréal or something and then I can shell into his Mac through there. It's not ideal though since we're still talking shell scripts and he's easily frustrated.

I know that in Windows land there are all sorts of tools scammers use to take over a machine remotely. Does Mac allow for the same thing? Note that I only have Linux machines available to me on this side of the Atlantic.

 

I'm working on a some materials for a class wherein I'll be teaching some young, wide-eyed Windows nerds about Linux and we're including a section we're calling "foot guns". Basically it's ways you might shoot yourself in the foot while meddling with your newfound Linux powers.

I've got the usual forgetting the . in lines like this:

$ rm -rf ./bin

As well as a bunch of other fun stories like that one time I mounted my Linux home folder into my Windows machine, forgot I did that, then deleted a parent folder.

You know, the war stories.

Tell me yours. I wanna share your mistakes so that they can learn from them.

Fun (?) side note: somehow, my entire ${HOME}/projects folder has been deleted like... just now, and I have no idea how it happened. I may have a terrible new story to add if I figure it out.

 

I've got a very simple Kodi setup:

  • Arch Linux on a laptop behind the TV
  • Media files on a server upstairs, shared over NFS

I've been running Kodi quite successfully on this machine for years, but with the Omega update, videos play without audio for about 10seconds, then freeze. Sometimes if I wait a while, I see subtitles for the episode while the video is frozen. Music doesn't play either. The interface freezes too, to the point where I have to kill -9 it. Switching from Wayland to Xorg hasn't had an effect.

I tried deleting ~/.kodi and restarting, but nothing changes.

Has anyone else run into this?

 

A break from the usual in this community, but I trust it'll be appreciated. I think this is very solarpunk: using technology to improve the lives of all creatures.

 

I've been playing a lot of Fallout 4 over the holidays. I started and finished the Nuka World DLC (killed all the baddies), made it to level 90, etc.

Today I was playing on my Deck as the battery got a little low (11%) so I saved my game, exited the game, and went to shut down.

As it was shutting down, the Deck displayed a message, something like "Syncing to Steam Cloud" as the logo was spinning.

A few hours later, on a full charge, I booted it back up, started Fallout 4 again and... some of my old saves are there, but only about 30% of them, and critically not the most recent ones.

Has this ever happened to anyone else? Is this a known issue? Can I fix it, or report it? I've basically lost interest in finishing the game now.

 

His original post , titled I can't sleep, is some brilliant writing. When we talk about the chilling effect that criticism of Israel creates in industries everywhere (including ours) this is what that looks like.

view more: next ›