cherrykraken

joined 2 years ago
[–] cherrykraken@lemmy.ca 12 points 3 months ago* (last edited 3 months ago) (2 children)

I use it mainly for code completion, and it's great until I hit <tab> to indent and accidentally accept a 50 line suggestion.

[–] cherrykraken@lemmy.ca 1 points 3 months ago

Agreed, but I'm pretty sure the auto-formatters available do alignment indentation anyway as it is part of the style guides.

Otherwise, I think some of the lines have too much nesting and could be broken up, and the ifcond-then-else blocks aren't indented enough in the last example.

[–] cherrykraken@lemmy.ca 10 points 3 months ago

Or, if the business is 24/7, make sure they have an explicit on-call policy with designated shifts. (e.g. who is allowed to call you, what is the expected response time, is an issue disruptive enough that it needs resolving at 3am on a holiday, etc.)

My current job (IT for a non-profit research facility) pays a sweet daily bonus just for having my phone on me, even if I don't get called over a week, plus double overtime pay when I do get called afterhours. I've had 13 shifts over the past couple years, and was called only 7-8 times, 3 of those on the same weekend for the same issue (couldn't make a permanent fix until the following Monday).

In any other job, I definitely wouldn't accept a manager or random coworkers sending me messages out of the blue on a weekend and getting mad when I don't respond.

[–] cherrykraken@lemmy.ca 3 points 3 months ago

No, you're absolutely correct! I meant it more along the lines of the "We take nothing by conquest" rhetoric, which is equally hypocritical considering the reality. I didn't really want to add an "/s" to the statement... Yes, the US killed a lot of people in Mexican territory, but then they made up a treaty and paid $15mil for half of the land 🤷 (heavily simplified).

But it's 2025, and I'm honestly not sure if the geopolitical climate is in a better or worse state than it was 170 years ago. And if not worse on average, it's definitely widely polarized.

[–] cherrykraken@lemmy.ca 2 points 3 months ago

Well you're not wrong, I think some dummies would say "acktually we bought it from Mexico".

I liked this article from a couple months ago on the whole situation: https://www.dal.ca/news/2025/01/09/united-states-canada-state-51st.html

[–] cherrykraken@lemmy.ca 1 points 3 months ago (17 children)

Is it bad that I want him to try?

Historically, the US has never acquired territory by force, and even then Emperor Clementine would need a 2/3 majority vote in the Senate to ratify and prove the annexation was legal, which I doubt he'll get.

F*ck around and find out, as it were.

[–] cherrykraken@lemmy.ca 2 points 4 months ago

Gahh, serves me right for blindly writing code on my phone!

[–] cherrykraken@lemmy.ca 6 points 4 months ago* (last edited 4 months ago) (2 children)

Functions in Python can only return a single value. While you are allowed to comma-separate additional values, as you have done, they are combined into a single tuple object that wraps the intended values.

As such, your splitter function is returning a single tuple containing three strings. Your calculate function is expecting three individual arguments (I'm guessing that the error trace mentions this).

To get around this, you can use the splat/asterisk operator to "unpack" the items from the tuple:

a, b, c = splitter(expression)
# or, inline
calculate(*splitter(expression))

Edit: removed bad asterisk

[–] cherrykraken@lemmy.ca 8 points 4 months ago (1 children)

The code basically tracks mouse movements, or the lack thereof. If a bot is using a cursor, it might move in a straight line at constant speed to the "I'm not a robot" checkbox. Most bots though just check the HTML and jump directly to the checkbox. There are other checks it might do as well, e.g. the user-agent of the browser, whether the user came from a search engine, etc.

That being said it's that not difficult to break, e.g. Puppeteer has a plugin specifically for getting around Captchas and Cloudflare's offerings.

All this is to say: automatic captchas are better at allowing legitimate users than they are at blocking bots entirely.

[–] cherrykraken@lemmy.ca 3 points 5 months ago

During a high school English class, we had a section on fairytales and their origins in old European folklore (think stories that inspired The Witcher, the gorier version of Cinderella, etc.)

One of the assignments was to write our own short fairytales, but apparently I was the only person that got a memo that these should have a darker style and tone as well... I don't remember the whole of what I wrote, only that it involved trying to kill a witch, if you failed you died, and the winning method was using a pencil (this was 3-4 years before John Wick).

After I read it to the entire class... well if there wasn't a whispered "WTF" to break the silence, there should've been.

I think I got a B minus.

[–] cherrykraken@lemmy.ca 24 points 5 months ago* (last edited 5 months ago) (1 children)

Carmy: "Cooking is not fun for me."

Richie: "Yeah, but you love it."

Carmy: "That doesn't mean it's fun."

Richie: "If this shit is not fun for you, Cousin,what the fuck is fun for you?"

-- The Bear, S2 E1

[–] cherrykraken@lemmy.ca 3 points 5 months ago (1 children)

Regarding access tokens, there's a third party credential helper for Linux that uses OAuth. I recently found it and started using it a month ago. Works pretty much the same as Git + Windows Credential Manager. In case you are running headless, there is a device mode flag that will allow you to login with the GitHub app on your phone.

https://github.com/hickford/git-credential-oauth

(And if you layer a timed cache helper before the OAuth helper... well you shouldn't have to reauthenticate every time!)

Otherwise, the Git manual lists some other credential helpers that interface with some password managers.

https://git-scm.com/doc/credential-helpers

view more: next ›