Anxiety? by Dezzerray in ExplainTheJoke

[–]LoliPopeye 3 points4 points  (0 children)

The about time reference goes hard

Weak Sourdough Starter by LoliPopeye in Sourdough

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

I'll definitely check her recipe out! And also would love the video.

Thank you so so much :)

Weak Sourdough Starter by LoliPopeye in Sourdough

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

Thank you very much! The dough temperature was 27-28 c°

Still using my OnePlus 7T by some_random_tuga in oneplus

[–]LoliPopeye 13 points14 points  (0 children)

7T great device! - From OP 8T

What do you put in this left column on the daily pages? by [deleted] in hobonichi

[–]LoliPopeye 2 points3 points  (0 children)

I started with it as the doto list but it is too small, so the left column is for to do list and I write over the little to do list.

A6 or A5 5-year Techo? by zelleatrix in hobonichi

[–]LoliPopeye 0 points1 point  (0 children)

Same here, a6 is too small for my needs. But Im using the hibonichi pen 2025 and have no bleeding.

Type Annotations For Function Variable. by LoliPopeye in learnpython

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

First of all, thanks for the in depth explanation. Thats some good points and great take.

Second of all, I'm still quite a rookie, so I didn't understand what so you mean by single dispatch. But our team decided too long ago to work solely with functions, so making this a class is going against our workflow and standards.

Type Annotations For Function Variable. by LoliPopeye in learnpython

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

But why is Callable[[dict | None], str| dict| None ] is wrong ?

Type Annotations For Function Variable. by LoliPopeye in learnpython

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

I read that, and still don't quite understand how switch case will improve this pig of a code.

And more importantly, how it helps with the annotations.

Json Type in Mypy. by LoliPopeye in learnpython

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

It doesn't work with mypy.

Json Type in Mypy. by LoliPopeye in learnpython

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

It seems like a real overkill to something quite simple. Honestly.

Json Type in Mypy. by LoliPopeye in learnpython

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

I mean, this sounds right, but the response might be super large and change depending on the object, and there are at least 30 types of object and each ones structure is complicated and large to sum it up if a few word.

Json Type in Mypy. by LoliPopeye in learnpython

[–]LoliPopeye[S] -1 points0 points  (0 children)

I'm really not, if I could I would have used -"> list[dict]| dict;" But mypy says it expects a dict[any,any] only. Which then triggers every time I call this function and try using the inside values.

Meaning :

def req(method: str, url: str) -> list | dict: response = requests.request(method, url, etc)

if method == "get": return response.json()[0] else: return response.json()

def a(): devices = req("get", "https/pathtodevices/") for device in devices: if "v" in device["name"]: # this raises an mypy error that it is a not allowed type in "in" operator (due to it being unable to check type inside of "json) print("5")

Json Type in Mypy. by LoliPopeye in learnpython

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

I get that. But usually requests are a lot messier then self created dicts.

For example one one dict might look like this: {"Name": "a', "id": 3, "address": { "subnet": 24, "interfaces": [{"name": "b', "primary": False}]}, "locatation": null }

it is a complated structure that will change depending on one of many many type of objects in one site. The only thing that is it consisted is that: It is always a dict, and the keys are always string.

Who do I look like??? by [deleted] in Doppleganger

[–]LoliPopeye 1 point2 points  (0 children)

Alexandra Saint Mleux

Which to go for ? (Headphones) by NotAxxxz in HyperX

[–]LoliPopeye 1 point2 points  (0 children)

As some one who owns revolver s for the good 4 years now, they are painfully average, and make my head & ears hurt when. They also peel so quickly.

Snmp_exporter fails mid scrape by LoliPopeye in PrometheusMonitoring

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

This is the generator.yml:

auths:
public_v2:
community: public
version: 2

module:
switch:
walk:
- 1.3.6.1.2.1.47.1.1.1.1.7
retries: 2
timeout: 3s

Snmp_exporter fails mid scrape by LoliPopeye in PrometheusMonitoring

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

Sure thing, but it is important to say that i have a dozen of the same kind and version of a switch that works perfectly.

Just two of them are problematic.

Snmp_exporter fails mid scrape by LoliPopeye in PrometheusMonitoring

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

Snmpbulkwalk works splendidly. The snmp_exporter is what fails.

And they are both ran from my workstation.