[–] 2 points 4 months ago (1 child)

My main preference for preferring French's is that it at least tastes less sweet than Heinz. Why does Ketchup need to be so sweet? It's beginning to get harder and harder to find anyway, at least where I am.

What actual Canadian alternatives are available for someone in Ontario that isn't a sugar bomb?

  • source
  • parent
  • context
  • [–] 7 points 4 months ago (2 children)

    How would this store afford to pay its employees, rent and utilities if it only sold things at cost? One store alone would also make no difference, you’d need a chain of many stores.

  • source
  • submitted 2 years ago* (last edited 2 years ago) by to c/learnpython@lemmy.ml
     

    Hello,

    I've come across an unexpected issue that may be hard to diagnose due to required hardware, but here goes.

    I have a Raspberry Pi connected to an LCD display that I'm testing turning the screen on and off (not worrying about displaying text, I've previously written a program that uses a DHT22 sensor to display the temperature & humidity and external weather conditions using the Pirate Weather API).

    While trying to write a simple program just to turn the display on or off, I run into an issue.

    Here's the code:

    import board
    import datetime
    # I2C driver from:
    # https://gist.github.com/vay3t/8b0577acfdb27a78101ed16dd78ecba1
    import I2C_LCD_driver
    import argparse
    parser = argparse.ArgumentParser()
    parser.add_argument("state", help="'on' to turn on the screen, 'off' to turn off",type=str)
    args = parser.parse_args()
    
    mylcd = I2C_LCD_driver.lcd()
    
    match args.state:
        case "on":
            power = 1
        case "off":
            power = 0
        case _:
            print("Please enter 'on' or 'off'")
            power = None
    
    if power != None:
        print(power) # this is just to test
        mylcd.backlight(power)
    

    What's happening that I don't understand is if power == None, the if statement will not trigger but the display will turn on.

    The only way I've been able to keep the display off is if I add an else statement:

    else:
        pass
    

    This is using Python 3.10. My understanding is the else should not be needed at all. Any suggestions as to why the display might be turning on, or a better suggestion on how to handle the match statement?

    --EDIT--

    So it turns out initializing the display is turning it on at the same time. For a community that had no activity for ~2 years before this post, I'm pleasantly surprised with the amount of responses I've gotten - you all are awesome!

     

    I’m running a rootless podman container listening on port 8080 on OpenSUSE Tumbleweed.

    From the same host, there's no problem accessing the container. Trying to access the container remotely fails due to firewalld blocking the connection.

    What I don't understand is this:

    If I configure firewalld to forward port 80 to the container on port 8080 using

    firewall-cmd --add-forward-port=port=80:proto=tcp:toport=8080

    I can access the container from a remote computer using port 80.

    However, if I try:

    firewall-cmd --add-forward-port=port=8080:proto=tcp:toport=8080

    I'm not able to reach the container. It seems that every port I try will work except for port 8080 in this case, and I can't find any references explaining why this might be the case.

    What's going on here? Is it a conflict by trying to forward a port to itself? Is there any way to allow port 8080? Trying to allow port 8080 in the public zone fails as well.

    submitted 2 years ago* (last edited 2 years ago) by to c/selfhosted@lemmy.world
     

    I'm new to Podman and so far have been completely frustrated by it.
    I don't know if the issue is with the container or Podman since there are just no logs.

    I'm trying to run Stirling-PDF, using this command:

    podman run -d
    -p 8080:8080
    -v /location/of/trainingData:/usr/share/tesseract-ocr/5/tessdata
    -v /location/of/extraConfigs:/configs
    -v /location/of/logs:/logs
    -e DOCKER_ENABLE_SECURITY=false
    --name stirling-pdf
    frooodle/s-pdf:latest

    With Docker, I have no issue running the this container. Under Podman the container immediately exits without logs - podman logs stirling-pdf shows nothing.

    The same thing happens running the same command with sudo or without sudo but using --rootful. I've also tried removing '-e DOCKER_ENABLE_SECURITY=false ' since it's very Docker specific.

    I can run podman run -dt --name webserver -p 8081:80 quay.io/libpod/banner with no issues, so is this something incompatible with the container?

    I feel like I'm missing something obvious - like where are the logs?

    I'm running on OpenSUSE-Tumbleweed, Podman version 4.9.0

    view more: next ›