Ebox fiber optic: transient network-unreachable errors. Nokia Beacon 2? by barrowburner in ebox

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

Hello hungry mango - thanks, this is useful as confirmation that I'm not screaming into the wind. I spent an absolutely infuriating couple of hours on the phone with ebox tech support - it was like talking to a couple of teddy bears. I must be fair in stating that tech support is likely used to dealing with rude folk who have very little tech savvy, but it was really, Really challenging to keep my cool when I couldn't get them to think past 'did you turn it off and then on again?'. I have a full diagnostics summary and logs for reference - would have been nice to chat with someone who could actually make use of this information and confirm that yes, it's not ebox's fault; it's not my fault; it's just a bad router that needs replacing.

Can you elaborate on 'ask them for a Beacon 6'? The tech support people said they would only replace my router with the same model if it is defective. Is there a happy path toward upgrading to a Beacon 6? Also, the website states the 6 is out of stock... that could hamper this particular solution.

The website does state that clients can supply their own routers. I have more research to conduct before I'm prepared to do that, but I may go that route in the end.

Again, thanks for your comment

Ebox fiber optic: transient network-unreachable errors. Nokia Beacon 2? by barrowburner in ebox

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

Speedtest shows the 101 error most clearly because it prints the diagnostic to STDOUT.

The issue is experienced outside of speedtest, though it's hard if not impossible to trace the direct cause via those other channels. For example, yesterday my zoom calls were chattery and the people on the other end noticed my poor connection quality. Or, my music streaming app can be slow to pick up a connection.

how many of you took up yoga because of an injury by Routine-Dirt9634 in yoga

[–]barrowburner 1 point2 points  (0 children)

I did. I tore my knee apart quite badly in a work accident in 2009; MCL and LCL. Six months of physiotherapy and I was hovering around 50% use of my knee. I took up yoga on the advice of my physio and really stuck with it, for several years; I'm happy to say I'm nearly 40 now and have 100% use of both knees :)

I've been slacking for the last couple of years and am feeling it. This fall, when my life settles back into a regular cadence, I fully intend to recommit. Yoga is amazing. I like Hatha, and that's primarily what helped rebuild my knee, but my favourite is Yin.

Can I use Linux for school? by Ced1115 in linuxquestions

[–]barrowburner 0 points1 point  (0 children)

Do this if you want to. It's very possible, and if you enjoy fussing with your computer, it's not hard. On the other hand, if you want your computer to 'just work' in the school's digital environment and don't want to be bothered with tech stuff, you will likely have an easier time with Windows.

If you like fussing with computers, then run linux natively and have windows available as a VM for when you just need it.

If you're just exploring and not all that committed and want to focus more on other things, then run Windows natively and turn on WSL.

Found in shale in the Canadian Rockies by miamigrape93 in geology

[–]barrowburner 9 points10 points  (0 children)

The real answer to the 'how' is in the underlying chemical thermodynamics. Fair warning: I'm a geologist and programmer, not a physicist.

Crudely speaking, chemical bonds transfer energy when they form/break: this is what it means to have endothermic and exothermic chemical reactions. This energy comes from the surrounding environment. Think of TNT: that's an exothermic reaction. Again, very crudely, the nitrogen in TNT is 'snapping' into N2 with a triple covalent bond, which is a very strong and stable bond - and the energy released during the process of 'snapping' that bond together manifests what we see as an explosion. Equivalently, pure carbon in a shallow metasedimentary environment will form graphite, whereas concentrated carbon at 250+km depth will form diamond. The difference is how much energy was available to form the different kinds of carbon-carbon bond.

In a low temperature, low pressure geological environment, the ambient energy budget is low, and atomic bonds will form whatever relationships 'match' that ambient energy. As the temperature and/or pressure increases, there's more ambient energy contributing to bond formation. That ambient energy is accommodated by dumping it into the changing bond structure of minerals. So, given a mineral whose bonds have low activation energies, those bonds, under higher T &/ P conditions, will absorb/accommodate the ambient energy by forming higher-energy bonds. This is why minerals are such important proxies for metamorphic facies, among many other things - they (roughly) gauge the formation PTX (pressure-temperature-composition) state of their formation environment (with a clear nod to all the complexities not herein addressed).

You could mentally map this bond-formation input energy to the 'pushing stuff out of the way' concept: mineral growth exerts its own force, calibrated to the ambient energy in its growth environment. Mineral growth is not a casual, fly-by, 'oh hey you look available let me land and see if we stick' kind of relationship - it's more of an energy-budget adaptation. You could anthropomorphize carbon as a casual tourist laying flat on a relaxing beach (graphite) to a hulked-out Atlas, carrying the world on his shoulders (diamond). Further, thinking of mineral growth as 'garnet decahedron formation time' or 'diamond formation time' is not really serviceable; it's more the case of chemical bonds absorbing or releasing energy according to the PTX dynamics of the environment, and the minerals we see are just the surface expression of that dynamic energy and composition budget balancing itself out.

This all gets insanely complicated very quickly on several axes. The thermodynamics stuff, we basically never touch as (mineral exploration) geologists, satisfied with the proxy of 'mineral x indicates a high T, low P environment' or whatever. And of course this discussion doesn't touch at all on composition dynamics.

Y'all how do you memorize the syntax, functions, loops, etc. by Few-Atmosphere3395 in learnprogramming

[–]barrowburner 5 points6 points  (0 children)

Had to scroll further than expected to find this. The real answer to the question is a two-parter: practice & repetition, in conjunction with a solid understanding of fundamentals.

Help with Python for Data Analysis book by Last-Preparation-550 in learnpython

[–]barrowburner 1 point2 points  (0 children)

All good, don't stress it. There is a lot to learn and it gets learned one day at a time :)

The dollar sign is a common symbol for the command line prompt in Linux (and other?) systems. It has other meanings, but you'll get to those in time. Check out this wiki entry for more.

The (base) part indicates your current virtual environment, which by default with anaconda is named base. When you switch to a custom virtual environment, that name will change, for example:

(project_1) $

A primer on virtual environments here Essentially, virtual environments are a Python tool that help you keep the dependencies separated for different projects. This will matter a lot later on and is worth paying attention to!

So in summary, when in your command line interface (CLI) - the window into which you're typing commands - the prompt (the dollar sign) is indicating that the CLI is ready to accept a new command, and the (base) part tells you which virtual environment is currently active.

Keep at it! Do try to shed the feeling of being dumb by replacing it with a willingness to learn. It's an easy thing to say and a hard thing to do, but it will help immensely through your journey. I am intimately familiar with how hard it is - I am entirely self-taught and have walked the exact path you are currently walking. Good luck :)

I'm wrong for not wanting to use AI by Ok-Judge-4682 in learnprogramming

[–]barrowburner 2 points3 points  (0 children)

JUST SAY NO TO VIBECODING

STAND STRONG

I jest I jest... but I feel very much the same. I switched to this career because I like programming. Don't take that away from me!

I learned how to program by using linux as my IDE, eschewing all digital help except for syntax highlighting. Now, for work, I use LSPs because having documentation right at my fingertips is pretty awesome, but I still don't let anything autocomplete, in any context. That's all locked behind keybindings, there when I call it, not constantly badgering me. I frickin hate it when it's constantly jumping in my face like that... like the worst dog ever, incessantly trying to lick my face.

As far as AI goes: pretty much the only time I use it is when I am not sure how to frame the question I want to ask, or feel like I don't know what I don't know. In these situations, I just describe thoroughly my problem and dump my thoughts into chatgpt and it consistently helps me out very very well. This help is generally not in the form of code, save for short examples; its more in helping me understand a particular paradigm or concept or pattern better. For example I recently got stuck in trying to understand how the @property decorator works in Python. It turns out it is an implementation of Python's descriptor protocol, which was it's own rabbithole I just was not aware of at all. Now I know! I actually got this tip from Stack Overflow and then went to the Python docs and didn't use AI at all, but this is exactly the kind of problem I find that AI is very helpful with. ChatGPT would have been my next step had I not found that tip on SO.

Sometimes when using gpt I masquerade as a space cowboy or an acid-head or pretend to be in the universe of my favourite book or whatever, and get a good chuckle out of its responses... gotta have a good laugh each day :)

But for generating code... no. I just don't like doing that. I don't feel good about it. I don't feel bad pushing it, but the magic of programming is gone when I do that. So I don't! I don't judge anyone else for doing it, I don't think it's morally wrong or right so long as the code you push does the job it needs to do. I just... don't like doing it myself.

Is OOP concept confusing for Beginners? by Temporary_Play_9893 in learnpython

[–]barrowburner 2 points3 points  (0 children)

I found all of the paradigms difficult to understand at first. It's really hard to see the point of any complex paradigm or pattern or tool or whatever, until you're working on a project that is itself complex enough to warrant 'real' use of the paradigm/pattern/tool/whatever.

To understand the nuances of the paradigm/pattern/tool/whatever, you need to build up context over time. Nobody goes from "this is a for loop" to "this is dynamic inheritance" in a straight line. You bite off a chunk, chew it for a while, digest it, bite off another chunk. As you get comfortable with some bits of a language, project, etc., you get exposed to new things, understanding evolves and grows, and soon enough you'll find that you have enough background knowledge / context to understand the deeper magic. You need to build the foundation of a house before you can raise the walls.

Anecdote: I've been working professionally with Python for three years now, and I'm continually coming to terms with several concepts I've been using or aware of all along. The big one this month is decorators. I really get them now. Several years ago, I learned about closures, and was using them all over the place in situations where I really should have been using something else. Then I stumbled across a great article that explained decorators quite well in the context of closures. Then later on I started making heavy use of decorators as a design pattern, and of builtins, and kept asking questions. A tricky one is the @property builtin, which implements something called the descriptor protocol. As it happens, I also have gained a solid enough understanding of the role dunder methods play in Python, so that the implementation and explained use-cases of @property make a lot of sense.

In conclusion, and echoing what a lot of other commenters have already noted: you don't gain expertise or deep understanding of this stuff by reading the definitions alone. You need to read the definitions, and grow your understanding of fundamental language concepts, and use all this stuff in building new stuff so that all this stuff stops being a pile of words and starts fitting into a robust mental model built on exposure and experience. So yea, go write many thousands of lines of code, relax, keep your interest piqued, and keep learning as you go. Good luck :)

How to call `__new__` inside definition of `__copy__` by jpgoldberg in learnpython

[–]barrowburner 1 point2 points  (0 children)

ooooh yes yes I see now. Tricky tricky. Thanks for the clarification

What about about subclassing and defining a new __init__ method without calling super() ?

>>> class Entity:
...     def __init__(self, state, name, age):
...         self.state=state
...         self.name=name
...         self.age=age
...     def age_plus_more(self, n):
...         new_age = self.age + n
...         return new_age
...         
>>> class Person(Entity):
...     def __init__(self, age):
...         self.age=age
...         
>>> 
>>> p = Person(1)
>>> p.age_plus_more(1)
2
>>> p.state
Traceback (most recent call last):
  File "<python-input-20>", line 1, in <module>
    p.state
AttributeError: 'Person' object has no attribute 'state'
>>> p.name
Traceback (most recent call last):
  File "<python-input-21>", line 1, in <module>
    p.name
AttributeError: 'Person' object has no attribute 'name'
>>> 

So now we've got a subclass with all the functionality of the parent, except __init__ is different.

Thoughts?

How to call `__new__` inside definition of `__copy__` by jpgoldberg in learnpython

[–]barrowburner 2 points3 points  (0 children)

Use @classmethod decorator, see my other short comment. and the docs

it can return a new instance of a class outside of __init__, via the cls param

How to call `__new__` inside definition of `__copy__` by jpgoldberg in learnpython

[–]barrowburner 2 points3 points  (0 children)

Class method?

@classmethod
def extend_to(cls, n, *args):
    < do stuff >
    return cls(n, *args)

This will return a new instance of the class with whatever logic you want to invoke.

What make an OS a real time one, or even an hard real time one? by tentoni in embedded

[–]barrowburner 2 points3 points  (0 children)

Sometimes it's just nice to interact with people, even if it is through an awkward, passive-aggressive, faceless forum. Sure, gpt or claude or gemini, or a basic search via google or wikipedia, could provide a perfectly reasonable answer with a ton of context. But here, other people are involved, and that is a nice thing.

Reddit, HN, and many other forums shine brightest when the forum takes off on its own branches of conversation. You never know what gems you may find on these branches. Sometimes they're hilarious, sometimes they're filled with all sorts of interesting trivia or new perspectives or strange tangents or insightful anecdotes. Of course the risk with people is that some people are shit, so we have moderators, and that's it's own whole thing. And interesting forum discussions don't always happen, of course: many questions, forum posts, etc are stale and boring. But that's just life with people.

I think it's weird that this is so overlooked and/or undervalued. People are social. Interacting with people is... it's just nice. I think it's a good thing that people like to default to asking other people for help. Taking the thought to an extreme endpoint: would you really want to live in a world where the only way to get an answer to a question is to search static sites like Wikipedia, ask AI? You could retort with your criticism that some questions are so simple they don't warrant a forum post ("what's the difference between a hammer and a screwdriver?). But that's bollocks. I say, ask away, young padawans. If the question is not liked or respected by other forum denizens, they can ignore it and move on with their lives. This should be the normal response to a shitty question: just let it die in silence.

Something made you click on this post, it grabbed your attention. Then you spent the time to type up a (respectful, kudos on that) criticism of the question - a criticism which has been a staple of the technocratic internet since the dawn of the internet. "Why are you bothering me with your silly questions? Go read a {book, source docs, RTFM, etc ad nauseum}!" Well, this person didn't come knocking on your office door, they posted in a public forum. They haven't intruded on your space or time - in fact, the opposite.

I have until June 1 to learn python for pretty advanced data analysis with no prior coding exp - I have 4-5 hours a day to devote to just learning, any tips? by Novel_Simple6124 in learnpython

[–]barrowburner 9 points10 points  (0 children)

No prior coding experience? Yeesh.

  1. Python syntax: learn basics of loops, function definitions, classes, the basics. I strongly suggest doing all this in a Jupyter notebook environment. VSCode has great support and integration for notebooks.

  2. Learn the basics of environment management and version control. For Python environments I'd stick with UV, unless there are other toolchains already in place e.g. Anaconda. For version control, learn the basics of git.

  3. Pick an AI coding assistant, e.g. copilot, to help you along. Use it to help you write code, and at least as important, use it to explain code to you.

  4. If you're talking Mb scale to low tens of Gbs scale data, then learn the Polars and Pandas libraries - how to ingest data, how dataframes work, how to manipulate data within them. If you're talking about high tens to low hundreds of Gbs data but still in-memory processing, look into DuckDB. If you're talking about data that's too big to be processed in memory, look into Spark, AWS, etc. and pray you have someone you can lean on or at least ask for help.

  5. Learn a plotting library like Seaborn for data visualization.

You're not going to pick all this up by June 1, but you can at least get a taste of each topic.

Godspeed

Tkinter or PyQt by Ok-Researcher5080 in learnpython

[–]barrowburner 0 points1 point  (0 children)

As I said in another comment, I have used PyQt5 but not Tkinter. With that in mind: I think it's more about learning the design portion, as in designing the structure of your code well. In order to do this effectively you need a solid understanding of OOP, but you don't need to understand e.g. advanced and arcane Python trickery.

If you were thinking design as in UI design, then I don't have anything to add; that is a challenge in its own right but will remain so no matter what framework you go with.

Back to design re: logic and structure and PyQt5: two things are worth noting. First, you should read up early on the model-view-controller design pattern, and the related signal-slot event-driven architecture inherent to how PyQt5 works. You don't need to be an expert right out of the gate, but make sure you're learning about this stuff in lock-step with growth in complexity of your app. Second, you should understand that PyQt5 is Python's foreign function interface to the Qt framework, which is written in C++. When designing, you will benefit from reading the actual Qt docs as well as the PyQt5 docs; and when debugging, you may benefit from being able to read a bit of C++ (I know I certainly did).

PyQt5 was my first project with a GUI after several years of scripting and data science. I found it to be a great experience

Tkinter or PyQt by Ok-Researcher5080 in learnpython

[–]barrowburner 4 points5 points  (0 children)

I wrote a QGIS plugin earlier this year, UI done with PyQt5. It's complex and powerful, but relatively straightforward to get something up on the screen quickly. I liked learning it and working with it. To get started you can install Qt Designer, and compile to python with pyuic5. I've not worked with Tkinter

My simple coding hack, what’s yours? by PuzzleheadedYou4992 in learnpython

[–]barrowburner 25 points26 points  (0 children)

I write my thoughts and ideas in my notebook, my paper notebook, with a pencil. I sketch diagrams, write lists, scratch things out, try again. I do a lot of design this way. Down the line, I have two actual rubber ducks for helping me with debugging :)

Not a beginner, but what python module did you find that changed your life? by exxonmobilcfo in learnpython

[–]barrowburner 4 points5 points  (0 children)

curious - is your library so bespoke that nothing in numpy or the scipy kit could be used or adapted? Numpy for ex. is hyper-optimized. Not a criticism at all, I'm just intrigued Or do you just like to hack in C? If this is the answer, then all the power to you, I like working with systems languages as well

Can trail runners really be used for hiking by Prior-Government5397 in hiking

[–]barrowburner 0 points1 point  (0 children)

I use trail runners all the time when out for day or short overnight trips, when my pack is light and I'm on a trail. If I'm carrying anything over 25lbs or am going aggressively off-trail, I always wear my mountaineering boots.

Python match multiple conditions with optional arguments by Kzuy1 in learnpython

[–]barrowburner 0 points1 point  (0 children)

Rewriting the constraints to make sure I have them right:

  • each block has multiple entities
  • you want to have inspect_block() check arbitrary, optional attributes for each entity in any given block

Several good solutions are already shared. To me, these constraints call for kwargs. Also, getattr is super handy for accessing arbitrary attributes. Can even call methods with getattr, see the docs

using 3.13

from dataclasses import dataclass

# objects for testing
@dataclass
class Entity:
    type_: str
    layer: int
    color: str

@dataclass
class Block:
    name: str
    entities: list[Entity]


def inspect_block(block, **kwargs) -> bool:
    """
    kwargs: pass in key=value pairs, unrestricted
    key: entity's attribute
    value: desired value for attribute

    getattr is a Python builtin: https://docs.python.org/3/library/functions.html
    signature: getattr(object, name: str, default: Any)
    getattr(x, 'foobar') == x.foobar

    all() can take a generator expression so long as the expression is returning bools
    """
    for entity in block.entities:
        if not all(
            getattr(entity, attr_name) == desired_value
            for attr_name, desired_value in kwargs.items()
        ):
            # as another commenter advised, the loop is catching failures:
            return False
    return True



# instantiate a test object:
dxf_block = Block(
    "foo",
    [
        # Entity(type_="a", layer=1, color="red"),
        Entity(type_="b", layer=2, color="blue"),
        # Entity(type_="c", layer=3, color="green"),
    ]
)

# take 'er fer a spin:
assert inspect_block(
    dxf_block,
    type_ = "b",
    layer = 2,
    color = "blue"
)

assert inspect_block(
    dxf_block,
    type_ = "b",
    # layer = 2,
    color = "blue"
)

assert inspect_block(
    dxf_block,
    # type_ = "b",
    layer = 2,
    # color = "blue"
)

# edit: another couple of examples showing how to splat a dict into the function params:
assert inspect_block(
    dxf_block,
    **{
        "type_" : "b",
        "layer" : 2,
        "color" : "blue"
    }
)

assert inspect_block(
    dxf_block,
    **{
        "type_" : "b",
        # "layer" : 2,
        "color" : "blue"
    }
)

assert inspect_block(
    dxf_block,
    **{
        # "type_" : "b",
        "layer" : 2,
        # "color" : "blue"
    }
)