danielquinn

joined 2 years ago
[–] danielquinn 2 points 3 days ago (1 children)

He definitely says "gagged". This post is ridiculous.

[–] danielquinn 7 points 4 days ago (1 children)

Well shit. What good is pasta without parmesan? And no feta? Gouda? How is life worth living without good cheese?

[–] danielquinn 9 points 4 days ago* (last edited 4 days ago) (1 children)

I've been a Green supporter for a very long time. I even ran as a candidate for the BC Greens way back. I hate it, but I don't really have a problem with this ruling. The Greens rose to our highest levels of support when we ran a full slate of candidates across the country, and while we have on occasion chosen to not run in a few strategic ridings (don't blame us, it's FPTP), 15 ridings fewer wouldn't be a problem if we were running everywhere else.

The big caveat though is that it's really hard to run a full slate as a small party. The vetting alone is a brutal (and costly) amount of work, and getting 343 candidates mobilised in time for a short-notice election is near impossible for a small party. In other words, when election dates are controlled by the ruling party, elections (and debate rules) will inevitably favour larger parties, diminishing our democracy.

The rules seem reasonable to me, and objectively we didn't meet them, so we shouldn't be included. I just think it's worth noting exactly why we didn't meet them.

[–] danielquinn 4 points 5 days ago* (last edited 5 days ago)

I read this headline, thoroughly confused as to why Francesca Albanese would be wasting her time talking about vegemite.

[–] danielquinn 11 points 5 days ago (3 children)

In Star Trek: Insurrection, the Enterprise protected the Baku from the So'na, though if I remember right, there was some debate as to whether the prime directive applied as the Baku weren't native to the planet.

[–] danielquinn 1 points 1 week ago (4 children)

I was one of the people who based my opinion of Proton on that tweet and swore off them until someone else shared that link with me. It's excellent, thorough, and makes a convincing case that Yang is actually left-leaning. I can only assume that you're getting downvotes from people who haven't read it.

[–] danielquinn 2 points 1 week ago (1 children)

What you're describing is winning elections by letting the public dictate your position. This is not the same thing as leadership. To be fair though, genuine leadership is in short supply all over the world right now, so it's easy to conflate cowardice with strategy.

Leadership is when someone steps away from the crowd, paints a picture of the world they want, and asks people to join them. Think: "I have a dream", or "we choose to go to the moon". Leaders are charismatic visionaries that take you with them rather than taking popular positions once the polling reports in.

Canada deserves the sort of leadership that understands the critical nature of the climate issue, and leaders who will convince us to come with them in building the world we want. May is criticising the other parties for their lack of conviction regarding the most important issue of our time, and she's right to do it.

[–] danielquinn 7 points 1 week ago (1 children)

It was Castlevania that did this to me.

[–] danielquinn 2 points 1 week ago

Well, welcome to the Free side fellow traveller :-) I too ditched Windows for (different) political reasons 25 years ago, and haven't looked back. You'll love it here, 'cause if you don't, you now have the power to change it 'til you do.

[–] danielquinn 1 points 1 week ago

Sorry, I was on mobile so I over-simplified 'cause digging up the details on Wikipedia wasn't so easy while also juggling my kid :-) I'll try to amend the original post.

[–] danielquinn 6 points 1 week ago

I don't know what to tell you. I've been shouted down more than a few times for suggesting that Ubuntu is a bad gateway distro.

 

I find the whole "Ctrl+b followed by another key" way of navigating tmux to be too cumbersome to warrant a switch away from something like Tilix where I can hit Ctrl+Alt+| and the screen splits vertically, or Alt+Left to switch to the terminal on the left. I think it's the mandatory release of all keys followed by more keys that does it.

Is there a way to tell tmux to understand that "Alt+Left means switch to the terminal on the left" and bypass the whole Ctrl+b song and dance altogether?

 

This is what I see in both Firefox and Chromium

 

I'm a web developer, mostly with Python and have close to zero Java or Kotlin experience, but I want to build a bunch of tools for my phone where I can Share a URL (for example) to an app that simply takes that URL string and sends an HTTP POST request to a pre-arranged URL with some pre-arranged headers or POST data.

So basically I'm looking for an app that:

  • Lets you define a series of endpoints
  • Accepts share intents from other apps to then bring up a selector asking "Which endpoint do you want to send this to?", sends it, and exits.

It seems a little nuts that I should have to develop a separate app for each endpoint, when the app experience isn't really something I'm interested in. Can someone here point me to an app that already does something like this? I'd prefer a FOSS option if possible, but at this point I don't even know what to search for.

Example use-cases:

  • Send a YouTube URL to a service that downloads said video and stores it on a share on my VPN
  • Send a text snippet to a service that stores that snippet as a Markdown file for use as ideas for future blog posts
  • Send an article URL to a service that strips the ads and images out and saves a Markdown file for future reading.
 

I've recently learnt about Gemini and I'm reasonably sure that I can write a Django extension to allow the same code I use to run my website also serve more-or-less the same information over Gemini. Unfortunately, while I'm familiar with Django internals, I've always relied on Gunicorn + Nginx/Traefik to handle the HTTP portion of the request/response.

So if I'm going to do this, I need to know what to use to speak Gemini. I found the very simple aiogemini, which I can improve upon and probably link to Django's URL handler, but it's based on asyncio, while Django only partially supports async. I also have no idea what might be fine to replaced the traefik (let alone cert-manager) portion of the process.

I could try to write something from scratch, but there's no sense in reinventing a square wheel, so I thought I'd ask here.

 

cross-posted from: https://lemmy.ca/post/33126960

 

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.

62
Developing with Docker (danielquinn.org)
submitted 6 months ago* (last edited 6 months ago) by danielquinn to c/[email protected]
 

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:

Those Old Scientists

Name Total Lines Percentage of Lines
KIRK 8257 32.89
SPOCK 3985 15.87
MCCOY 2334 9.3
SCOTT 912 3.63
SULU 634 2.53
UHURA 575 2.29
CHEKOV 417 1.66

The Next Generation

Name Total Lines Percentage of Lines
PICARD 11175 20.16
RIKER 6453 11.64
DATA 5599 10.1
LAFORGE 3843 6.93
WORF 3402 6.14
TROI 2992 5.4
CRUSHER 2833 5.11
WESLEY 1285 2.32

Deep Space Nine

Name Total Lines Percentage of Lines
SISKO 8073 13.0
KIRA 5112 8.23
BASHIR 4836 7.79
O'BRIEN 4540 7.31
ODO 4509 7.26
QUARK 4331 6.98
DAX 3559 5.73
WORF 1976 3.18
JAKE 1434 2.31
GARAK 1420 2.29
NOG 1247 2.01
ROM 1172 1.89
DUKAT 1091 1.76
EZRI 953 1.53

Voyager

Name Total Lines Percentage of Lines
JANEWAY 10238 17.7
CHAKOTAY 5066 8.76
EMH 4823 8.34
PARIS 4416 7.63
TUVOK 3993 6.9
KIM 3801 6.57
TORRES 3733 6.45
SEVEN 3527 6.1
NEELIX 2887 4.99
KES 1189 2.06

Enterprise

Name Total Lines Percentage of Lines
ARCHER 6959 24.52
T'POL 3715 13.09
TUCKER 3610 12.72
REED 2083 7.34
PHLOX 1621 5.71
HOSHI 1313 4.63
TRAVIS 1087 3.83
SHRAN 358 1.26

Discovery

Important Note: As the source material is incomplete for Discovery, the following table only includes line counts from seasons 1 and 4 along with a single episode of season 2.

Name Total Lines Percentage of Lines
BURNHAM 2162 22.92
SARU 773 8.2
BOOK 586 6.21
STAMETS 513 5.44
TILLY 488 5.17
LORCA 471 4.99
TARKA 313 3.32
TYLER 300 3.18
GEORGIOU 279 2.96
CULBER 267 2.83
RILLAK 205 2.17
DETMER 186 1.97
OWOSEKUN 169 1.79
ADIRA 154 1.63
COMPUTER 152 1.61
ZORA 151 1.6
VANCE 101 1.07
CORNWELL 101 1.07
SAREK 100 1.06
T'RINA 96 1.02

If anyone is interested, here's the (rather hurried, don't judge me) 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
# wget --accept=html,htm --relative --wait=2 --include-directories=/StarTrek/ http://www.chakoteya.net/StarTrek/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"
TOS = EPISODES / "StarTrek"
DS9 = EPISODES / "DS9"
VOY = EPISODES / "Voyager"

NAMES = {
    TOS.name: "Those Old Scientists",
    TNG.name: "The Next Generation",
    DS9.name: "Deep Space Nine",
    VOY.name: "Voyager",
    ENT.name: "Enterprise",
    DISCO.name: "Discovery",
}


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_tablular_data(self) -> tuple[tuple[str, int, 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.append((str(k), v, percentage))
        return tuple(reversed(sorted(r, key=lambda _: _[2])))

    def render(self) -> None:
        print(f"\n\n# {NAMES[self.path.name]}\n")
        print("| Name             | Total Lines | Percentage of Lines |")
        print("| ---------------- | :---------: | ------------------: |")
        for character, total, pct in self.as_tablular_data:
            print(f"| {character:16} | {total:11} | {pct:19} |")


if __name__ == "__main__":
    for series in (TOS, 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.

view more: next ›