• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. best way to go about with a script that seems to need both bash and python functionality

      Gonna try and put this into words. I am pretty familiar with bash and python. used both quite a bit and feel more or less comfortable with them. My issue is I often do a thing where if I want to...

      Gonna try and put this into words.

      I am pretty familiar with bash and python. used both quite a bit and feel more or less comfortable with them.

      My issue is I often do a thing where if I want to accomplish a task that is maybe a bit complex, I feel like I have to wind up making a script, let's call it hello_word.sh but then I also make a script called .hello_world.py

      and basically what I do is almost the first line of the bash script, I call the python script like ./hello_world.py $@ and take advtange of the argparse library in python to determine what the user wants to do amongst other tasks that are easier to do in python like for loops and etc.

      I try to do the meat of the logic in the python scripts before I write to an .env file from it and then in the bash script, I will do

      set -o allexport
      source "${DIR}"/"${ENV_FILE}"
      set +o allexport
      

      and then use the variable from that env file to do the rest of the logic in bash.

      why do I do anything in bash?

      cause I very much prefer being able to see a terminal command being executed in real-time and see what it does and be able to Ctrl+c if I see the command go awry.

      in python, you can run a command with subprocess or other similar system libraries but you can't get the output in real-time or terminate a command preemptively and I really hate that. you have to wait for the command to end to see what happened.

      But I feel like there is something obvious I am missing (like maybe bash has an argparse library I don't know about and there is some way to inject the concept of types into it) or if there is another language entirely that fits my needs?

      6 votes
    2. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      11 votes
    3. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      16 votes
    4. [Home networking] Setting my Ruckus APs to DFS channels manually, any chance of running afoul of the FCC?

      Hi everyone, I recently finally setup the Ruckus AP unleased system that came with my townhome. After spending a long night learning how to properly configure the system I finally set it up in a...

      Hi everyone, I recently finally setup the Ruckus AP unleased system that came with my townhome. After spending a long night learning how to properly configure the system I finally set it up in a way that provided me the best speeds/range without interference.

      This was achieved by setting my Ruckus APs to manually sit on the DFS channels (60-140) via the Ruckus configuration app (shown here)

      This has been working great as I'm avoiding the 10~ other wifi networks in the area that are all set to the standard 36-48 and 149-160 channels (wifi analyzer screenshot here) but I'm concerned I may be inadvertently violating FCC guidelines. Note I do not live near any military installations, but I am about 13 miles away from a major airport. Will the Ruckus APs automatically change channels if they detect radar interference or am I causing trouble for someone?

      11 votes
    5. Looking for portable keyboard recommendations: must have USB-C connectivity, not just bluetooth

      TL;DR: recommendations for a small or folding keyboard that in addition to Bluetooth, also connects directly by USB C. Hello all. I'm a contractor who does a bunch of different stuff, and one of...

      TL;DR: recommendations for a small or folding keyboard that in addition to Bluetooth, also connects directly by USB C.

      Hello all. I'm a contractor who does a bunch of different stuff, and one of the areas I occasionally do is on-site IT work.

      I'm always looking for better tools, and while I can and do keep a standard full-size USB keyboard in my van, I'd like something more space efficient that I can fit in a small toolbag. There are tons of mini and/or folding Bluetooth keyboards out there, and some of them have USB-C or mini-USB ports, but so many of them are either only for charging, or just don't tell you if you can connect to a computer by USB. Since most rack servers aren't going to have Bluetooth and I want an option that involves the least number of steps (trying to avoid a bluetooth keyboard and having to use a USB bluetooth adapter), I'd really like a mini or folding keyboard that, while it can do Bluetooth, also can connect to a computer by standard USB. I specifically want a USB C port since I'm trying to standardize my gear on that.

      Thank you everyone!

      23 votes
    6. Day 22: Sand Slabs

      Today's problem description: https://adventofcode.com/2023/day/22 Please post your solutions in your own top-level comment. Here's a template you can copy-paste into your comment to format it...

      Today's problem description: https://adventofcode.com/2023/day/22

      Please post your solutions in your own top-level comment. Here's a template you can copy-paste into your comment to format it nicely, with the code collapsed by default inside an expandable section with syntax highlighting (you can replace python with any of the "short names" listed in this page of supported languages):

      <details>
      <summary>Part 1</summary>
      
      ```python
      Your code here.
      ```
      
      </details>
      
      6 votes
    7. What is a software you wish existed?

      I've been feeling pretty bored for a while and my job isn't really giving something fulfilling to do, So I want to make something. However, I don't want to make something useless. unfortunately, I...

      I've been feeling pretty bored for a while and my job isn't really giving something fulfilling to do, So I want to make something.

      However, I don't want to make something useless. unfortunately, I can't think of any software I'm in a particular need for. I would love to make something that solves a real problem for a real human.

      So, please tell me, what's something that you wish existed because it would reduce suffering in your life that little (or big) bit?


      Edit: Wow wow and wow, I didn't expect this thread that I made on a whim to blow up so much. So many idead!

      69 votes
    8. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      13 votes
    9. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      6 votes
    10. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      9 votes
    11. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      8 votes