[-] spacemanspiffy@lemmy.world 4 points 12 hours ago

My idea would be to load one larger file one time and not parse anything, and keep it in memory the entire time. Versus what it does now which is load the files and parse them and keep everything in memory.

But three people responding here so far with "pickle" so maybe that is the way.

27

Background: I am working on a Python project where, given a set of input files (text/image/audio), it generates an executable game. The text files are there to describe the rules of the game.

Currently, the program reads and parses the files upon each startup, and builds a Python class that contains these rules, as well as links to image/audio files. This is fine for now, but I don't want the end executable to have to bundle these files and re-parse them each time it gets run.

My question: Is there a way to persist the instance of my class to disk, as it exists in memory? Kind of like a snapshot of the object. Since this is a Python project, my question is specific to Python. But, I'd be curious if this concept exists anywhere else. I've never heard of it.

My aim is not to serialize/de-serialize the class to a text file, but instead load the 1's and 0's that existed before into an instance of a class.

[-] spacemanspiffy@lemmy.world 2 points 2 days ago

Fractal on mobile and Element on desktop. Both are just fine.

[-] spacemanspiffy@lemmy.world 38 points 4 days ago

That whole community is just one guy posting memes. Some are funny but mostly its just odd how much he hates Linux.

Whatever :)

[-] spacemanspiffy@lemmy.world 28 points 4 days ago

Finally some good fucking news.

[-] spacemanspiffy@lemmy.world 9 points 6 days ago

Yes. I want all fediverse apps to grow to the point of being the default.

[-] spacemanspiffy@lemmy.world 50 points 1 month ago

SMB2 doesn't have to be a like other MArio games to be a superb game.

https://yt.artemislena.eu/watch?v=Os0zmiMfRjM

I'll listen to this any time, any day.

148
submitted 1 month ago* (last edited 1 month ago) by spacemanspiffy@lemmy.world to c/nostupidquestions@lemmy.world

Why doesn't this exist?

Take dried beans, roast 'em, grind 'em, and brew some bean juice?

I have no idea if it would taste good or not, but we don't know if we don't try.

Edit: I need to see what dried beans I have and maybe go shopping. I will give this a try with a couple different types of beans and report back if I fart or not.

[-] spacemanspiffy@lemmy.world 49 points 1 month ago

This show was underrated. I would take more of this over more Futurama at this point.

[-] spacemanspiffy@lemmy.world 50 points 3 months ago

I'm still running 4.20.0 like a gangster

39
[-] spacemanspiffy@lemmy.world 38 points 5 months ago

If this gets updated and ported to Linux, I'd switch. Until then, Sayonara Player is still the best I have found on Linux.

9
submitted 5 months ago* (last edited 5 months ago) by spacemanspiffy@lemmy.world to c/homeassistant@lemmy.world

cross-posted from: https://lemmy.world/post/15144957

Can anyone help me figure out Frigate/go2rtc

I have two cameras in Frigate.

One is a Raspberry Pi 3 running Monocle server, and this stopped working in Frigate some time back (driveway). The second is a Galayou G7 (nursery). The nursery camera is the one I am concerned about with this post.

Problem: Up until a month or two ago (I must have ran an update but I don't know) the audio from the Galayou camera worked in Home Assistant. I'd like to get that working again. Some searching led me to try setting up go2rtc in my config.

Here is my config before making any changes:

mqtt:
  host: 192.168.1.10
cameras:
  nursery:
    ffmpeg:
      inputs:
        - path: rtsp://redacted:redacted@192.168.1.241:554/live/ch1
          roles:
            - detect
    detect:
      width: 1280
      height: 720
  driveway:
    ffmpeg:
      inputs:
        - path: rtsp://192.168.1.240:554/recording/7824851880350319106/replay?trackid=8836591
          roles:
            - detect
    detect:
      width: 1920
      height: 1080

This currently provides only jsmpeg video in Frigate. If I add something like this to the end:

go2rtc:
  streams:
    nursery:
      - rtsp://redacted:redacted@192.168.1.241:554/live/ch1

this adds mse and webrtc as options in Frigate. But, mse plays only video, no audio. And webrtc loads neither audio nor video. I have tried adding lines like - "ffmpeg:nursery#video=h264#audio=aac" and also with opus but to no avail.

Finally, if I ffplay rtsp://redacted:redacted@192.168.1.241:554/live/ch1 it loads audio/video without a problem. I'm also able to connect via ONVIF at onvif://192.168.1.241:8899 from onvif-gui.

So, something is wrong in my Frigate config, and I don't know what. I'm hoping someone here is a little more familiar and can give me a pointer or two here?

Update: Here is the fix, in case anyone comes across this later:

go2rtc:
  streams:
    nursery:
      - "ffmpeg:rtsp://redacted@192.168.1.241:554/live/ch1#video=copy#audio=copy#audio=opus"
  webrtc:
    candidates:
      - <server-ip>:8555

The webrtc section got webrtc to work in the Frigate and video back in HASS. The #audio=copy#audio=opus got audio working in webrtc.

14

I have two cameras in Frigate.

One is a Raspberry Pi 3 running Monocle server, and this stopped working in Frigate some time back (driveway). The second is a Galayou G7 (nursery). The nursery camera is the one I am concerned about with this post.

Problem: Up until a month or two ago (I must have ran an update but I don't know) the audio from the Galayou camera worked in Home Assistant. I'd like to get that working again. Some searching led me to try setting up go2rtc in my config.

Here is my config before making any changes:

mqtt:
  host: 192.168.1.10
cameras:
  nursery:
    ffmpeg:
      inputs:
        - path: rtsp://redacted:redacted@192.168.1.241:554/live/ch1
          roles:
            - detect
    detect:
      width: 1280
      height: 720
  driveway:
    ffmpeg:
      inputs:
        - path: rtsp://192.168.1.240:554/recording/7824851880350319106/replay?trackid=8836591
          roles:
            - detect
    detect:
      width: 1920
      height: 1080

This currently provides only jsmpeg video in Frigate. If I add something like this to the end:

go2rtc:
  streams:
    nursery:
      - rtsp://redacted:redacted@192.168.1.241:554/live/ch1

this adds mse and webrtc as options in Frigate. But, mse plays only video, no audio. And webrtc loads neither audio nor video. I have tried adding lines like - "ffmpeg:nursery#video=h264#audio=aac" and also with opus but to no avail.

Finally, if I ffplay rtsp://redacted:redacted@192.168.1.241:554/live/ch1 it loads audio/video without a problem. I'm also able to connect via ONVIF at onvif://192.168.1.241:8899 from onvif-gui.

So, something is wrong in my Frigate config, and I don't know what. I'm hoping someone here is a little more familiar and can give me a pointer or two here?

16

https://www.amazon.com/dp/B07RR9XBXJ?ref=ppx_yo2ov_dt_b_product_details&th=1

I ordered one of these a few months back.

Then I installed it.

Then I realized that this wasn't the same Zigbee Dimmer switch I was already using elsewhere, and that this wouldn't work for me :)

It's now past the return window for Amazon. I have zero use for this.

tl;dr - Me dumb. If you live in the continental US and want this, I will pay the couple bucks to ship it to you so I can get it off my table.

5
submitted 9 months ago* (last edited 9 months ago) by spacemanspiffy@lemmy.world to c/linuxquestions@lemmy.zip

Here is my problem:

Our TV is connected to a SBC running a GNOME/Wayland desktop, where we watch Jellyfin and sometimes Netflix/Hulu through Firefox.

I'd like to be able to trigger pause/play (space button) from Home Assistant, which is running on my home server.

What I am thinking of would be a server/daemon running on the TV computer that my home server would be able to send keys to via a CLI tool (in this case the space key). I am surprised to find that I cannot locate any program like this.

Can anyone provide any suggestions here?

Other ideas:

  • Jellyfin's HA integration doesn't let me pause/play from it, and that still doesn't handle Hulu/Netflix.
  • I was able to get this working through SSH and there are tools like ydotool/wtype here that work, but I found waiting for SSH to be a bit slow to connect.

Update: I got frustrated and coded up a solution: https://gitlab.com/neilsimp1/kbsrv

8

Hi

As the title suggests, I want to set something up so that while trouble is_open(), I have a keyboard shortcut that cycles through the various modes listed at https://github.com/folke/trouble.nvim/tree/main#commands.

I see how I can assign shortcuts to jump directly to the different modes, but I want to remember only one shortcut.

Writing a bit of lua to do this is easy enough, but I can't find any way to see what mode it's currently in, in order to write some function that toggles to the next one.

Is there any way to accomplish this?

Bonus question: Is there any way to get trouble to display on screen what mode it's currently in? Such as at the top or bottom of the trouble panel.

[-] spacemanspiffy@lemmy.world 37 points 10 months ago

Not a chance. We have several more years of x86 dominance.

[-] spacemanspiffy@lemmy.world 43 points 11 months ago

Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos Jeff Bezos

Just maybe?

32
submitted 1 year ago* (last edited 1 year ago) by spacemanspiffy@lemmy.world to c/nostupidquestions@lemmy.world

This is probably a stupid question, since 2 > 1, but here goes...

I have a home server. It's a ComputerLINK 1U rack server I bought off eBay some years back. It has 2 CPUs, Intel Xeon E5645 2.4Ghz(https://ark.intel.com/content/www/us/en/ark/products/48768/intel-xeon-processor-e5645-12m-cache-2-40-ghz-5-86-gt-s-intel-qpi.html). It also has two 750W power supplies, but I have one unplugged. It also has RAM and 5 HDDs.

I also have the guts of my old desktop PC. The CPU is an AMD FX8350 4Ghz(https://www.amd.com/en/products/cpu/fx-8350). The motherboard is some ASUS model, I forget and don't want to check right now. A potential PSU would be 500-600W range.

My question: I am considering moving to use my old PC parts as a new home server. One benefit is to cut down on the noise (rack mount PC fans are LOUD). But the real gain I would want is on power savings. So, if RAM and the multiple HDDs all stay the same, but I moved them to the AMD/ASUS CPU/motherboard, can anyone definitively say this will be more power-efficient?

I am not very knowledgeable when it comes to electrics or power consumption, and am just looking for someone to confirm for me. I am aware that the AMD CPU still isn't an excellent choice for an always-on machine, but it could be an improvement.

[-] spacemanspiffy@lemmy.world 63 points 1 year ago

Not enough people understand how great of a show Bojack Horsman was.

30
384
submitted 1 year ago* (last edited 1 year ago) by spacemanspiffy@lemmy.world to c/gardening@lemmy.world

I have about this much left again still to pick too :)

90

The thing i said in the title

view more: next ›

spacemanspiffy

joined 1 year ago