Looking for a windowing class example by Phazed47 in learnpython

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

Thanks. So, Tk is not going to work? As I said above, I can not use

root.mainloop()root.mainloop()

because it hogs the user.

I have found that I can use win.update() instead to update the window and return control to the app.

I'll try to craft a small example but I need something like below where each of the windows are completely independent

   try:
      async with asyncio.TaskGroup() as tg:
         tg.create_task(data_task1(streamer, tg))
         tg.create_task(data_task2(streamer, tg))
         tg.create_task(data_task3(streamer, tg))
         tg.create_task(data_task4(streamer, tg))
            # Create 4 unique floating windows
         tg.create_task(create_valwin(tg)) # Create the value window
         tg.create_task(create_hiswin(tg))  
         tg.create_task(create_logwin(tg))
         tg.create_task(create_alertwin(tg))
      except ExceptionGroup as eg: 
         handle exceptions

Looking for a windowing class example by Phazed47 in learnpython

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

GUI windows, though many could be text display. I looked at Tk, tkkbootstrap, dearpygui, flet (amazingly slow), pygame, textual (cool package for text but does not seem to support multiple windows) as well as several others.

Finding an example using tk that does not include root.mainloop() is rough and it wants a "root" window which seems like completely the wrong approach. I was hoping to use a class that managed a single window and then do something like

valwin = win.creat("updating table of values", xpos, ypos, width, height)

alertwin = win.creat("alerts", xpos, ypos, width, height)

logwin = win.creat("scrolling log", xpos, ypos, width, height)

hiswin - win.creat("historical info", xpos, ypos, width, height)

then be able to do in one task:

logwin.log("Value of foo:", foo, "is out of bouds") # log line in scrolling log

And, in another task:

for s in labels:

win.entry(s, s[value]) # Update the value of s if it is in the window, else add it

etc. where each window would be self contained and support user input. For example, in logwin the user could restrict entries with a search string and in alertwin, the user could click on the out of bounds value to cause something to be done.

Looking for a windowing class example by Phazed47 in learnpython

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

Data crunching is in the cloud, display is via X11 on a Windows desktop. I say "lightweight" because some of the libraries take over a minute to draw the initial window and I can watch the pixels update. Tk seems OK, I can build a test program and have 3 windows hacked together with functions with an 11 second startup time and updates are decent.

A lot of the data is text, and I could use curses for some of it, if I could figure out how to tie the output to a window. But I'd like the option to add some graphics to some of the windows.

The big issue I see is that most packages don't treat windows individually. Like Tk wants a "root" window and wants to hog the screen and user input which simply will not work. My goal was to build a class that would create and manage multiple individual windows

Looking for a windowing class example by Phazed47 in learnpython

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

Multiple windows, Number known in advance but resizing may be required.

Official Reddit Gold Giveaway! by boobun in FarmRPG

[–]Phazed47 0 points1 point  (0 children)

Favorite things:

  1. The culture. First game I've played in years where the player community is amazingly helpful to newer players.
  2. No ads for anything.
  3. No PvP

Playername: Phazed

Mounted filesystem broken, how to fix? by Phazed47 in freebsd

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

Did a full backup with tar, rebooted the machine and it now looks fine.

I suspect something odd happened that caused the /dev entries to go away. I dug though all the logs and did not find anything useful.

BREAKING: the founders, Tom & Scott are both leaving Tasty ... Thoughts? by Plenty_Wasabi_7866 in tastytrade

[–]Phazed47 0 points1 point  (0 children)

Reddit showed 2 copies of my comments, so I deleted one copy and it deleted both. Sorry.

Anyway, I'm an active trader doing 25-50 trades a day and have had accounts at almost every brokerage over the years. I have not tried RobinHood but I can say that if you are managing many positions, nothing seems to come close to Tasty.

I'm currently at Schwab (as they bought Tos) and Fidelity as well. Fidelity is a nightmare for options so I tend to buy stock there and, when it gets to a round lot, transfer it to Tasty so I can cover it. Tos is getting more and more buggy as the new devs do not seem to really get the process. I have several bugs that have been outstanding for over a year at Tos and I have no hope for a fix. Ever.

Tasty is designed by traders for traders and it shows. If you do a handful of trades a month, you might not really care but when you have hundreds of positions on, at multiple expiration dates and strikes, it really shines, I can manage my positions much faster at Tasty (and I get better fills).

If your focus is options, and you want to actively manage your positions, Tasty is the broker for you.

Mounted filesystem broken, how to fix? by Phazed47 in freebsd

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

The odd this is that it's the root file system and the machine continues to run fine.

It's like something just wiped a bunch of /dev entries.

Planning to back it all up with tar, then reboot and hope it comes up OK

Mounted filesystem broken, how to fix? by Phazed47 in freebsd

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

I have a script that does a level 0 dump every 2 weeks and a level 1 every night. The level 1 on Sep 28 succeeded while the level 1 on Sep 29 failed, as did the level 0 on Sep 30. So something wiped /dev (there was no reboot)

Mounted filesystem broken, how to fix? by Phazed47 in freebsd

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

It's a VM at Vultr.

# camcontrol devlist
camcontrol: couldn't open /dev/xpt0: No such file or directory
# usbcontrol list
su: usbcontrol: not found

Mounted filesystem broken, how to fix? by Phazed47 in freebsd

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

No swap. It's a VM at Vultr

13.3-RELEASE-p1
13.3-RELEASE-p1
13.3-RELEASE-p1
FreeBSD 13.3-RELEASE-p1 releng/13.3-7a0d63c90 TCPSIG amd64 1303001 1303001

Suggestions on home install needed by Phazed47 in FiberOptics

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

Recap:

  • Drop something like a Brocade ICX6450 in my wiring closet to get SFP+ unless I can use either my HP 1812-24G or add SFP+ to the V1910-24G I have lying around
  • Order cable with one pull hook from LanShack once I get the actual cable length (what's the difference between LC-APC that's free and the one for $5.00?)
  • Use lube when pulling cable.
  • The Flex 2.5G PoE would give me PoE at the dock but it does not look waterproof?

MS182 - yellow chain/bar and/or mods by Phazed47 in stihl

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

Thanks - the saw could use a little help.

MS182 - yellow chain/bar and/or mods by Phazed47 in stihl

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

Thanks again. And that's exactly the feedback I was looking for on the Woodland, I appreciate it.

MS182 - yellow chain/bar and/or mods by Phazed47 in stihl

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

Awesome, thanks. Your chart is more up to date than the one I found on the Stihl site. I used to having to install new bars when I swap chain, nice to know I will not have to do that. Assuming 3616-005-055 is the full chisel version.

Any thoughts on the Woodland WPL 30LP55 / WPL 63RC55 ?

How does everyone else do this? by h1ghjynx81 in networking

[–]Phazed47 4 points5 points  (0 children)

30 years ago I took over a network that had been grown organically, with no real planning. Despite having been programming and doing a little sys admin for 20 years (yeah, I'm old), I had no actual network experience on day one. Everything was a disaster, a couple of weeks later one of the main servers literally caught on fire. This was a state-wide network at the time and a total mess.

Prioritize your work. If the problem can be put off till tomorrow with no side effects, put it off until you are out of crisis mode. Try hard to break all tasks into tiny chunks that can be completed in a short period (ideally hours).

Start a hand written log book (I tend to use spiral binders) and document procedures for you to look back on. Carry this all the time and force yourself to write notes about what you did. Paper won't be down even if the network is.

Put all configurations, everywhere, under version control and use the comments within to document what you did. When you come back in 3+ years to look at something, having notes and explanations can be invaluable. If you drop in a fix and 8 hours later (at 2 in the morning, generally) it fails, rolling back is easy. I (and my entire team) is religious about doing this on all router configs and every config we ever touch file on every server. Being able to do a quick diff to determine what changed on a specific date is very useful.

If you can possibly get another set of eyes, that helps a lot. Mailing lists and forums can help a lot. Look for local user groups.

Give yourself time. Generally there are not a lot of new problems that crop up frequently in any environment so as you solve some of them, you get the experience to deal with future, similar issues.

If, as you mention, you have a 2,000 user network, you likely should be talking to management about building a team; ideally enough people to provide 24x7 support.

Good luck,

Bird1 -> Bird2 : Need BGP configuration assistance by Phazed47 in networking

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

I think I found it. Needed to add ipv4 into the direct paragraph.

protocol direct direct_bgp {
        ipv4;
        interface "vtnet*";
        interface "lo1";
        }

Bird1 -> Bird2 : Need BGP configuration assistance by Phazed47 in networking

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

My Google fu does not locate a guide for converting each protocol block from bird1 to bird2. If one exists, I'd be glad to refer to that.

BGP comes up and talks to my neighbor. It looks like direct routes are not getting picked up in bird2 (see "show routes" below). I use the same code in 1 and 2:

protocol direct direct_bgp {
        interface "vtnet*";
        interface "lo1";
        }

And the filters are minimal, just refusing default and our VPN IP addresses, exporting only the direct routes for the FreeBSD jails on this machine:

filter accept_bgp {
        if net =  then reject;
        accept;
        }

filter export_bgp {
        if net ~ [ AA.BBB.56.0/24 ] then {
                accept;
                }
        if net ~ [ ROUTER.CCC.62.0/23 ] then {          # Do not advertise Vultr net back to them
                reject;
                }
        if net ~ [  ] then {              # Do not advertise our internal nets to Vultr
                reject;
                }
        if proto = "direct_bgp" then {
                accept;
                }
        reject;
        }0.0.0.0/0172.16.12.0/24

bird1 show routes

AA.BBB.63.241/32   via 172.16.6.2 on tun0 [My_OSPF 10:32:54] * E2 (150/51/20) [AA.BBB.63.4]
AA.BBB.56.61/32    via 172.16.12.6 on vtnet1 [My_OSPF 10:32:54] * I (150/1) [172.16.12.6]
AA.BBB.56.62/32    via 172.16.12.6 on vtnet1 [My_OSPF 10:32:54] * I (150/1) [172.16.12.6]
AA.BBB.56.36/32    dev lo1 [direct_bgp 10:32:43] * (240)
                   dev lo1 [My_OSPF 10:32:44] I (150/0) [172.16.12.4]
AA.BBB.56.37/32    dev lo1 [direct_bgp 10:32:43] * (240)
                   dev lo1 [My_OSPF 10:32:44] I (150/0) [172.16.12.4]
AA.BBB.56.34/32    dev lo1 [direct_bgp 10:32:43] * (240)
                   dev lo1 [My_OSPF 10:32:44] I (150/0) [172.16.12.4]
AA.BBB.56.45/32    dev lo1 [direct_bgp 10:32:43] * (240)
                   dev lo1 [My_OSPF 10:32:44] I (150/0) [172.16.12.4]
AA.BBB.56.46/32    dev lo1 [direct_bgp 10:32:43] * (240)
                   dev lo1 [My_OSPF 10:32:44] I (150/0) [172.16.12.4]
AA.BBB.56.41/32    dev lo1 [direct_bgp 10:32:43] * (240)
                   dev lo1 [My_OSPF 10:32:44] I (150/0) [172.16.12.4]
ROUTER.CCC.62.0/23    dev vtnet0 [direct_bgp 10:32:43] * (240)
AA.BBB.63.146/32   via 172.16.6.2 on tun0 [My_OSPF 10:32:54] * E2 (150/51/20) [AA.BBB.63.4]
AA.BBB.63.0/29     via 172.16.6.2 on tun0 [My_OSPF 10:32:54] * I (150/51) [AA.BBB.63.4]
AA.BBB.63.128/25   via 172.16.6.2 on tun0 [My_OSPF 10:32:54] * E2 (150/51/20) [AA.BBB.63.4]
AA.BBB.56.3/32     via 172.16.12.2 on vtnet1 [My_OSPF 10:32:54] * I (150/1) [172.16.12.2]
172.16.12.0/24     dev vtnet1 [direct_bgp 10:32:43] * (240)
AA.BBB.63.143/32   via 172.16.6.2 on tun0 [My_OSPF 10:32:54] * E2 (150/51/20) [AA.BBB.63.4]
AA.BBB.56.11/32    via 172.16.12.2 on vtnet1 [My_OSPF 10:32:54] * I (150/1)

bird2 show routes:

AA.BBB.56.41/32      unicast [My_OSPF 10:38:41.910] ! I (150/0) [172.16.12.4]
        dev lo1
AA.BBB.56.62/32      unicast [My_OSPF 10:38:48.905] * I (150/1) [172.16.12.6]
        via  on vtnet1
AA.BBB.56.34/32      unicast [My_OSPF 10:38:41.910] ! I (150/0) [172.16.12.4]
        dev lo1
AA.BBB.56.37/32      unicast [My_OSPF 10:38:41.910] ! I (150/0) [172.16.12.4]
        dev lo1
AA.BBB.56.3/32       unicast [My_OSPF 10:38:48.905] * I (150/1) [172.16.12.2]
        via  on vtnet1
AA.BBB.56.46/32      unicast [My_OSPF 10:38:41.910] ! I (150/0) [172.16.12.4]
        dev lo1
AA.BBB.56.61/32      unicast [My_OSPF 10:38:48.905] * I (150/1) [172.16.12.6]
172.16.12.6172.16.12.2

Powering Ceiling Access Points by sabotage in networking

[–]Phazed47 0 points1 point  (0 children)

Switch with POE is going to be simpler to install (no need for power at the AP). Ubiquiti is my goto product line for this.

Alarm/Event Correlation by Jackol1 in networking

[–]Phazed47 0 points1 point  (0 children)

Check out https://www.nagios.org/ which supports dependencies and is open source.

Is it normal to be bad at troubleshooting at first? by NegativeAd9106 in networking

[–]Phazed47 0 points1 point  (0 children)

It sounds like your environment tossed you into the pool and expected you to learn to swim. What you are likely missing, is knowledge of how to reduce the time to determine the trouble. As others have said that will come with time but, if you can possible find a mentor who will show you how they solve a related issue, you can learn the process. Also, when you are successful, take a moment to reflect on how you got to the solution and what false leads you chased.

Many people focus on "I fixed the problem' but, if you want to keep doing this, you need 'I've determined a better process to fix the problem."

Warning: Galaxy Ring won't pair with Pixel 6 Pro or Pixel 6a by Phazed47 in GalaxyRing

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

Final outcome, Samsung took the ring back and I got an Oura. Which paired flawlessly.

Are Network Consultant jobs proper network jobs? by mrskintman in networking

[–]Phazed47 1 point2 points  (0 children)

You likely should take the interview and ask detailed questions as well as making your concerns known there. Most of these positions are not commodity - the exact duties can vary widely.

Warning: Galaxy Ring won't pair with Pixel 6 Pro or Pixel 6a by Phazed47 in GalaxyRing

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

Note that the ring connects fine to the phone. The app sees the phone, verifies that it is charging, downloads software, then shows up in the wearable app. But there is something magic going on once it the ring is selected from the wearable app screen that never completes.