Links for April 2024

Updated on Saturday, April 20, 2024
NYTimes: This Artificially Intelligent Pin Wants to Free You From Your Phone

Nope: "To unlock the device with a passcode, hold out your hand to project a green laser onto your palm. Pulling your hand outward increases the number while pulling it inward decreases it, and you select each digit by pinching two fingers on the same hand." #ml #humane

--

Why did all the Little Chefs disappear?

Little Chef promise to swap your empty plate for our lollypop. Can't have been cheap. #littlechef

--

San Francisco’s Train System Still Uses Floppy Disks - and Will for Years

“The system is currently working just fine, but we know that with each increasing year, risk of data degradation on the floppy disks increases and that at some point there will be a catastrophic failure,” - maybe save $400M with a floppy emulator and a USB stick? #sfmta #muni #sanfrancisco

Add your comment...

Related Posts

(All Etc Posts)

Reviews for March 2024

Spoilers!

Books

Dead Fall

Dead Fall

Scot Harvath has little trouble killing some Wagner mercenaries in Ukraine. Throw the man some setbacks once in a while! Feels a little too soon as well to use this war as a backdrop. I'm a sucker for a series though and I will keep reading them.

System Collapse

Murderbot is [redacted]. This is book 7 and the concept of the reluctant hero SecUnit is not getting old yet. Continued breath of SciFi fresh air.

Movie

Expired

Expired

I can't believe it's not Blade Runner, but OK nonetheless.

Movies

Dream Scenario

Dream Scenario

Everyone starts dreaming about Nicolas Cage. Michael Cera and his agency are very funny and it's an interesting concept, but it runs out of steam and limps to a dark conclusion.

ISS

ISS

This was OK. Nuclear war breaks out on Earth, and this leads to the US and Russian crew of the ISS being ordered to kill each other and take over the station. There is some rationale for this later but it doesn't make much sense. Also, they seem pretty confused about what's going on given the obvious nuclear war. Also, the ISS isn't high enough for the view they get of the obvious war. Also, the Russians seem to be nuking Bakersfield for some reason. It's like their objective is disrupting our plans for high speed rail as if we can't do that by ourselves. Ignoring all that, it's entertaining enough.

Lift

Lift

Heist on a plane. Not very good.

Society of the Snow

Society of the Snow

It's that Uruguayan rugby team who crashed in the Andes and then ate each other. Great film to watch on a plane, which I did, awkwardly.

The Abyss

The Abyss

No, not that classic at the bottom of the ocean with early CGI living water. This abyss is a Swedish disaster movie where the disaster is the budget as most of the action is not falling into a hole inside a nondescript building. I think. I don't remember much.

Werewolves Within

Werewolves Within

This is exactly what you'd expect, it's funny and perfectly executed. Thank you.

TV

Beacon 23

Beacon 23

I had high hopes for this Hugh Howey adaptation but they were brutally dashed by leaden dialog and a lackluster story. The most interesting thing about it is that it was made by Boat Rocker Media and man,  did they make sure that their boats were not disturbed in any way.

Expats

Expats

My advice here would be to just watch the incredible feature length episode 5 and skip the rest of it. It's all nicely made although I was a little surprised at the contemporary setting instead of pre-handover glory days

(All images included with ITHCWY reviews are the property of their respective owners and are used to illustrate reviews only.)

Add your comment...

Related Posts

(All Reviews)

(Published to the Fediverse as: Reviews for March 2024 #reviews #marthawells #bradthor Reviews for March 2024 )

Vernal (Spring) Equinox 2024

Spring Equinox 2024

Spring starts now (03:07 UTC on March 20, 2024) in the Northern Hemisphere and Autumn for the equatorially challenged. The image above shows the precise moment of the equinox in Catfood Earth.

Add your comment...

Related Posts

(All Code Posts)

(Published to the Fediverse as: Vernal (Spring) Equinox 2024 #code #earth #equinox #spring #autumn #vernal The exact moment (03:07 UTC on March 20, 2024) of Spring Equinox 2024 rendered in Catfood Earth. )

MUC SFO

MUC SFO

Google Pixel 8 Pro 7mm f1.7 1/440s ISO21

LH458

Add your comment...

Related Posts

(Recent Photos)

(Published to the Fediverse as: MUC SFO #photo #plane #muc #sfo MUC SFO )

KRK MUC

KRK MUC

Google Pixel 8 Pro 7mm f1.7 1/1,250s ISO21

LH1621

Add your comment...

Related Posts

(Recent Photos)

(Published to the Fediverse as: KRK MUC #photo #plane #krk #muc KRK MUC )

Budapest

Budapest

Google Pixel 8 Pro 7mm f1.7 1/4s ISO88

Add your comment...

Related Posts

(Recent Photos)

(Published to the Fediverse as: Budapest #photo #budapest Budapest )

DXB BUD

DXB BUD

Google Pixel 8 Pro 7mm f1.7 1/20s ISO21

EK111

Add your comment...

Related Posts

(Recent Photos)

(Published to the Fediverse as: DXB BUD #photo #plane #dxb #bud DXB BUD )

BLR DXB

BLR DXB

Google Pixel 8 Pro 7mm f1.7 1/15s ISO165

EK569

Add your comment...

Related Posts

(Recent Photos)

(Published to the Fediverse as: BLR DXB #photo #plane #blr #dxb BLR DXB )

Download a Sharepoint File with GraphServiceClient (Microsoft Graph API)

Demons protect a PowerPoint presentation from developers trying to access it.

There is a stunningly simple way to get a file out of sharepoint and I'll get to that soon (or just skip to the very end of the post).

I have been automating the shit out of a lot of routine work in Microsoft Teams recently. Teams is the result of Skype and Sharepoint having too much to drink at the Microsoft holiday party. It often shows. One annoyance is that channel threads are ordered by the time that someone last responded. Useful for quickly seeing the latest gossip but a pain when you need to keep an eye on each individual thread. After listlessly scrolling around trying to keep up with the flow I came up with a dumb solution - I sync the channel to Obsidian (my choice of note app, could be anything) and then I can just check there for new threads. It's a small convenience but has meaningully improved my life.

Unfortunately I got greedy. These messages usually have a PowerPoint presentation attached to them and so why not have an LLM summarize this while updating my notes?

It doesn't look like Copilot has a useful API yet. You can build plug-ins, but I don't want to talk to Copilot about presentations, I just want it to do the heavy lifting while I sleep so I can read the summary in the morning. Hopefully in the future there will be a simple way to say hey, Copilot, summarize this PPTX. Not yet.

So the outline of a solution here is download the presentation, send it ChatGPT, generate a summary and stick that in Obsidian. This felt like a half hour type of project. And it should have been - getting GPT4 Turbo to summarize a PPTX file took about ten minutes. Downloading the file has taken days and sent my self esteem back to primary school.

You would think that downloading a file would be the Graph API's bread and butter. Especially as I have a ChatMessage from the channel that includes attachments and links. The link is for a logged in human, but it must be easy to translate from this to an API call, right?

It turns out that all you need is the site ID, the drive ID and the item ID.

These IDs are not in the attachment URL or the ChatMessageAttachment. It would be pretty RESTful to include the obvious next resource I'm going to need in that return type. No dice though.

I tried ChatGPT which helpfully suggested API calls that looked really plausible and helpful but that did not in fact exist. So I then read probably hundreds of blogs and forum posts from equally confused and desperate developers. Here is a typical example:

"Now how can I upload and download files to this library with the help of Graph API (GraphServiceClient)."

To which Microsoft, terrifyingly, reply:

"We are currently looking into this issue and will give you an update as soon as possible."

Before eventually suggesting:

"await graphClient.Drives["{drive-id}"].Items["{driveItem-id}"].Content.GetAsync();"

Ignoring the sharepoint part and glossing over where that drive ID is coming from. Other documentation suggests that you can lookup your site by the URL, and then download a list of drives to go looking for the right one. Well, the first page in paginated drive collection anyway implying that just finding the ID might get you a call from the quota police.

I know Microsoft is looking after a lot of files for a lot of organizations, but how can it be this hard?

It isn't. It's just hidden. I eventually found this post from Alex Terentiev that points out that you just need to base64 encode the sharing url, swap some characters around and then call:

"GET https://graph.microsoft.com/v1.0/shares/{sharing-url}/driveItem"

If Google was doing its job right this would be the top result. I should be grateful they're still serving results at all and not just telling me that my pastimes are all harmful.

The documentation is here and Microsoft should link to it on every page that discusses drives and DriveItems. For GraphServiceClient the call to get to an actual stream is:

"graphClient.Shares[encodedUrl].DriveItem.Content.GetAsync()"

Add your comment...

Related Posts

(All Code Posts)

(Published to the Fediverse as: Download a Sharepoint File with GraphServiceClient (Microsoft Graph API) #code #ml #graph #sharepoint #c# Everyone developing applications with the Graph API should know about the shares endpoint that allows you to download files easily. )

Links for March 2024

Updated on Sunday, March 31, 2024
InfoWorld: White House urges developers to dump C and C++

Developers urge White House to dump Electoral College and supermajority cloture. #politics #electoralcollege #cloture #c #c++

--

The New Yorker: What Have Fourteen Years of Conservative Rule Done to Britain?

"In messages during the pandemic, he referred to ministers as “useless fuckpigs,” “morons,” and “cunts.” The inquiry’s lawyer asked Cummings if he thought his language had been too strong. “I would say, if anything, it understated the position,” he replied." This is a depressing but definitive read as we wait for the UK election to be announced. #politics #uk

Add your comment...

Related Posts

(All Etc Posts)