James Powell's Avatar

James Powell

@dontusethiscode.bsky.social

140 Followers  |  125 Following  |  14 Posts  |  Joined: 14.11.2024  |  1.4598

Latest posts by dontusethiscode.bsky.social on Bluesky

Preview
DUTC Open Science Scavenger Hunt Welcome to the DUTC Open Science Scavenger Hunt! Explore key platforms and resources in the open science movement. Answer each clue based on the websites provided. RECOGNITION & PRIZES ๐Ÿฅ‡ First to co...

Bรบsqueda del Tesoro de #CienciaAbierta
Organizada por Don't Use This Code @dontusethiscode.bsky.social
๐Ÿ™‹โ€โ™€๏ธ๐Ÿ™‹โ€โ™‚๏ธ Es una actividad educativa y divertida (en inglรฉs) que guรญa a quienes participen por recursos fundamentales para la investigaciรณn abierta.

Puedes participar en este enlace ๐Ÿ‘‡

14.07.2025 17:53 โ€” ๐Ÿ‘ 1    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

As I understand it from the interface, we can delete memories, to eliminate risk it retains an unproductive memory.

That said, I am not a very advanced or very sophisticated user of these tools, but I don't really see what memory offers, other than the risk of being fooled more effectively.

24.04.2025 22:38 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image Post image Post image Post image

What am I even doing here?

24.04.2025 21:13 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

I recently became a heavy user of LLMs. I have, at points, been a daily user (though I have yet to use them when coding.)

An obvious risk is that these tools are quite convincing, even when dangerously wrong.

Perhaps an equal risk is how readily we manage convince ourselvesโ€ฆ

24.04.2025 21:07 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image Post image Post image Post image

In fact, I asked it to explain the output, and what I got back was almost literally a horoscope.

It appears that the corroboration mostly references the conversation itself. This is probably because I have memory disabled. That's a horoscope if I ever saw one.โ€ฆ

24.04.2025 21:01 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

I tried this prompt and strongly suspect the output (like much of this kind of unrestrained prompting?) is a horoscope.

24.04.2025 20:54 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 1

Should I be embarrassed by how many times `pacman -Qqn | pacman -Syyu -` has fixed things after I have made a dumb, avoidable mistake (e.g., like rebooting in the middle of a `pacman -Syyu` whole-system-upgradeโ€ฆ)

06.12.2024 11:51 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

In single-user mode, the fix is easy, obvious, but a bit irritating.

# using Arch install media
$ cryptsetup luksOpen /dev/nvme1n1p2 root
$ mount /dev/mapper/root /mnt
$ mount /dev/nvme1n1p1 /mnt/boot
$ arch-chroot /mnt /bin/zsh

# inside chroot
$ pacman -S pam{,base,openssh,sudo,util-linux}

06.12.2024 11:49 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

#linux #puzzler

How do you recover from `rm /etc/pam.d -rf` on a machine you control *without* booting into single-user mode?

06.12.2024 11:44 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Friends, I'm #OpenToWork and I'd appreciate any leads, and networking opportunities.

Don't miss this rare opportunity to work with the one and only Mariatta.

๐ŸŽฏ Lead Software Engineer roles
โœ… 20+ years experience
โœ… award winning open source contributor
โœ… Expert in #Python #Django APIs automations

02.12.2024 15:49 โ€” ๐Ÿ‘ 64    ๐Ÿ” 37    ๐Ÿ’ฌ 5    ๐Ÿ“Œ 0

# hmm

from dataclasses import dataclass

@dataclass
class T:
value : int = None

obj = T()
for obj.value in range(3):
print(f'{obj = }')

20.11.2024 15:28 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image Post image

What better way to start a Thursday than by announcing our #PyTexas 2025 Keynote speakers! We're overjoyed to be joined by @mariatta.ca and @kjaymiller.com this year as our Keynoters! ๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰

Want to join us? Early Bird Tickets go on sale tomorrow!

14.11.2024 15:30 โ€” ๐Ÿ‘ 8    ๐Ÿ” 3    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 1

Posting to Bluesky using Python API.

Code: gist.github.com/dutc/50f54d50afa16c16ddc78c463d1fdac5

API documentation: atproto.blue
API examples: github.com/MarshalX/atproto/tree/main/examples

@marshal.dev

18.11.2024 18:44 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Security means securing people where they are https://blog.yossarian.net/2024/11/18/Security-means-securing-people-where-they-are

18.11.2024 15:42 โ€” ๐Ÿ‘ 17    ๐Ÿ” 11    ๐Ÿ’ฌ 3    ๐Ÿ“Œ 2

if __name__ == '__main__':
with open(__file__) as f:
code = f.read().replace(' ' * 4, '\t')
run(main(handle=environ['HANDLE'], password=environ['PASSWORD'], code=code))
### 04/04

18.11.2024 18:33 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

for msg in messages:
post = await client.send_post(
client_utils.TextBuilder().text(msg),
reply_to=models.AppBskyFeedPost.ReplyRef(parent=last_ref, root=root_ref) if root_ref else None,
)
last_ref = models.create_strong_ref(post)
root_ref = root_ref or last_ref

### 03/04

18.11.2024 18:33 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

async def main(handle, password, code):
parts = [*chunked(code, size=290)]
messages = [
f'{txt}\n### {idx:02d}/{len(parts):02d}'
for idx, txt in enumerate(parts, start=1)
]

client = AsyncClient()
profile = await client.login(handle, password)

root_ref = last_ref = None
### 02/04

18.11.2024 18:33 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

from asyncio import run
from os import environ

from atproto import AsyncClient, client_utils, models

def chunked(text, *, size):
buf = []
for ln in text.splitlines():
if sum(map(len, buf)) + len(ln) >= size:
yield '\n'.join(buf)
buf = []
buf.append(ln)
yield '\n'.join(buf)

### 01/04

18.11.2024 18:33 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 1
Ron Pressler - Pull Push: Please stop polluting our imperative languages with pure concepts-Curry On
YouTube video by Curry On! Ron Pressler - Pull Push: Please stop polluting our imperative languages with pure concepts-Curry On

Ironically the language that has the best answer today to async/await is โ€ฆ Java. And that's I think mostly thanks to Ron Pressler. This video from years ago is a must-watch for anyone who is interested in the failures of async/await and rethinking that entire idea. www.youtube.com/watch?v=449j...

14.11.2024 21:40 โ€” ๐Ÿ‘ 57    ๐Ÿ” 6    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 1

I made a Python core team starter pack:
go.bsky.app/AgFvebt

Let me know if I've missed anyone!

#Python #CPython #PythonCoreTeam #StarterPack

13.11.2024 10:34 โ€” ๐Ÿ‘ 95    ๐Ÿ” 41    ๐Ÿ’ฌ 7    ๐Ÿ“Œ 1

@dontusethiscode is following 19 prominent accounts