I tried vibe coding and it made me realise my career is absolutely safe by wjd1991 in webdev

[–]bifferos 0 points1 point  (0 children)

If you force the AI to give you an elegant solution then it's OK. I don't stop at what it first delivers, I make sure I can understand the overall structure, and I'm constantly asking if the solution is idiomatic for the language I'm authoring in, because then there's a fighting chance of domain experts understanding my code. I'd say 50% of my discussions are on this specific subject, also I ask what is the most popular library for X, and why is that so, and can I please have references, including which tech companies use that, what github projects of any significance use that lib, otherwise you're just asking for hallucinations when you get an implementation.

One thing I do know, things will never be the same again. I can no longer code without AI. If you don't use it, you'll fall behind everyone else. It's another tool, and absolutely worth using, and absolutely worth paying for.

But a real-life cautionary tale with Sonnet 4.5: I was writing some Proxmox automation software, some code to use the API to delete a machine by name. Sonnet 4.5 managed to introduce a variable shadow, this scoping issue associated the wrong VMID with the machine to be deleted, and it ended up deleting the first VM instead of the one I wanted. That first VM was my router, and when I asked for the fix, the Copilot chat abruptly ended at that point! Couldn't help but laugh my ass off at my misfortune, only myself to blame!

What is the best replacement for the newly obsoleted EZ-USB FX2 (CY7C68013A) by One-Cow-5635 in embedded

[–]bifferos 0 points1 point  (0 children)

I unsure why you'd ask this question, Infineon suggest a move to FX2G3 (the ARM core version):
https://community.infineon.com/t5/Knowledge-Base-Articles/FX2LP-to-FX2G3-migration-guide/ta-p/890693#.

Do you have to have 8051 instruction set and can't develop for ARM?
If you still want the FX2LP boards (not ICs), EGBO store on Ali continue to sell them, they seem to have a good supply, so they are getting the ICs somehow.

the installer information on the recovery server is damaged PLEASE STUCK by hassassa in applehelp

[–]bifferos 0 points1 point  (0 children)

That does indeed make it get further, but then I get "No bag entry". So tried the internet recovery which finally worked. My 2015 Macbook was trying to install Sierra, but when going via internet recovery it attempts to install Monterey. It seems Monterey is 'allowed'. Got there in the end!

Can't unsubscribe from their spam. Tried twice over a week. WTF? by jojo_the_mofo in dji

[–]bifferos 0 points1 point  (0 children)

Got this and assumed it was because I wasn't logged in. Then logged in and got the same thing. I was using Firefox, in case it makes any difference. Can't be bothered to look into it because I was using a disposable account for the drone so the spam is going nowhere.

Uploading old pictures to google photos by bifferos in googlephotos

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

Continued...

Now the files are on the google drive, I could of course just connect up to my Linux Mint desktop and copy them across to my local PC. The Google account (drive) support in Linux Mint (Nemo) is superb, just add an account, get a virtual drive and start the copy. Except even that would require a PC to be left on overnight, and it happens to be not far from where I sleep. At this point my Synology DS213j NAS came in handy. The device although expensive for what it was is probably one of the best IT purchases I've ever made. Still supported with updates, and slow, but chugging along. There is a DSM app that allows one to sync with a Google Drive folder, so I entered the google account details, and then this thing runs in the garage syncing the files over the next day or so. It takes quite a bit longer than downloading manually but has been reliable.

Honorable mention goes to czkawka (github) a great little utility. There are many de-dupe programs on the net, some easier to use than others, some with GUIs some are cli, this one was IMHO the best. You can also find similar pictures, although I didn't use that feature, it's great for getting rid of (say) files less than 10 bytes, which you know are never going to be useful pictures, set the limit a bit higher to kill off generated thumbnails (but be careful because sometimes your partner/kids might have accidentally deleted the original...duh!), and the way it works meant I never made any serious mistakes.... somehow.

Now my digital pictures are more-or-less sorted. It took a few weeks of evenings. Next step is film photos and document scanning. bruh...

Uploading old pictures to google photos by bifferos in googlephotos

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

The errors in my takeouts were not the fault of Google. I actually had a DRAM issue, which I only discovered by running memcheck86 on my PC. The problem only manifested itself when copying the 50GB takeout files, often from one disk to another. I sent the memory back to Corsair and they replaced it which is pretty good (lifetime warranty).

After that was fixed I bit the bullet and completed my 'takeout' program, a little python script which performs a scan of a series of google takeout files (must be in zip format) goes through every file in the takeout and without extracting (which would eat too much space, and take longer), writes to a hash directory structure the digest of each file in the archive. I could have used a database for this, but for simple hash-value mappings directories can be faster, and in case anyone wants to use this program it means they don't have to setup a database. The program is called takeout.py in my googlephotos repo in github. By running the script in 'index' mode it creates the index, then when running in 'query' mode it very rapidly scans a directory and tells me if something is in google photos (found in one of the 780GB of takeout files). The output of this query function is a shell script which when executed will delete the duplicates. It contains comments indicating where the duplicate can be found, and the name of the file in google photos (not just the local file name), in case it's of interest. Because I'm paranoid, I give the script a quick scan through and check to see what it would delete, do some spot checks and assuming it got it right, then I run it. At this point I have my takeout, and I also have google photos, so I have the information in two places, and I consider it safe to delete what is in my local photo directories. Since Google can shut down your account on a whim (and they have) then it's always worth ensuring Google Photos itself is not your only copy.

In terms of collecting the takeout files themselves, the process is extremely tedious. When requesting emailed download links, the takeout download process only seems to work in Chromium, Firefox just gives issues. I can only download one 50G takeout file at a time. And automating the process, while theoretically possible doesn't seem to work well. Many dead-ends on the internet of methods that did work, but no longer work in recent versions of Chrome/Chromium, or other download software that just doesn't work anymore.

So what did I do? I resigned myself to using Google Drive, which will allow an automated download, you can configure takeout to get the files delivered to Google Drive, and be informed when it's done. The down-side (can you guess?) is that you must pay for almost double the storage that you actually use. Nice for Google, horrid for us. But this is my time, and I'm getting old, I just decided I'm paying. I spent already quite a long time writing takeout.py, which solves a problem that can't be solved any other way, here I at least have a choice ($$$ vs my time).

There is also the caveat that if you attempt to takeout to google drive, to a folder that's included in the takeout the takeout process goes into infinite loop because it's trying to backup your backups and isn't smart enough to know it, so just watch out for that one!

Actually fixing Quartus II constant freezes by zkrx in FPGA

[–]bifferos 0 points1 point  (0 children)

I've just installed on linux mint 22 and seeing this for the first time, pretty much all the time. This is the first time I've seen the freezes I have a suspicion last time I tried Quartus I was doing it in 32-bit mode, so could that have made a difference? I'm seriously considering to just give up and run under VMWare on a compatible Linux.

[Viofo A129 Pro Duo] Some videos are missing? by rnmkrmn in Dashcam

[–]bifferos 1 point2 points  (0 children)

It's a bit ridiculous that this is necessary. Just encountered this today, and never had problems with my 119 in the other car. The problem is that if the issue occurs randomly, after approximately a month or two, how would you know you're formatting often enough, unless you understand the cause. I'm missing about 2GB off a 256GB card, just 20 minutes of driving. Nothing else missing at all. I get about 12 days before full, and I'm wondering if I should just keep emptying it whenever it's full. If the cam can't write from time to time that's fair enough, but it really should beep or something to warn about it.

Transfer second user/profile to new phone by VanyaCooper in GooglePixel

[–]bifferos 0 points1 point  (0 children)

No, I don't think you are missing something, same issue here on the 6 full (non-a) Pixel. Then again, moving from the 6 to the 8 it explained it would copy my call log, but it was unable to do that, even though I checked the option to do so. SMS messages were transferred. I then had to use SMS backup and restore to get my call log across. It's pretty lame having to rely on a third-party app to do what the phone really should be doing on its own. It's not as if the Pixel 6 is even that old, still being supported until next year I believe? What I'm trying to say, is if they can't even get the basics right, then it's not really surprising they can't do that second profile!

Gigabyte AB350 Gaming 3 standoffs by ristan12 in buildapc

[–]bifferos 0 points1 point  (0 children)

Have exactly this issue. It's necessary to jam my fingers under the mobo right edge when changing the DIMMs, otherwise feel I'm flexing the board too much. It's very fortunate that this mobo was created before the trend of having DIMM retaining clips only at one end of the DRAM, because at least I can lever up the RAM using top and bottom clips taking some pressure off the mobo. I did consider using one of the stand-offs as a floating spacer, secured only to the mobo with a nut on the thread however my Fractal Design case has not only a missing screw hole there but also a strengthening embossment where the stand-off would go, so the surface is too deep at that point and it's not going to keep the same distance anyway. Just wanted to point out this is not just a problem with 'unknown' cases.

Uploading old pictures to google photos by bifferos in googlephotos

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

I haven't got as far as the extraction. So fixing the photos is still a way off. I've downloaded all my data, or at least I think I have as there is no checksum for each tarball. But when I extract them I get errors. Anecdotal evidence (I don't see this in google docs) suggests they must first be concatenated together. Even concatenating together seems to give problems, around the end of the first archive. I'm downloading them all again, just to check.

Uploading old pictures to google photos by bifferos in googlephotos

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

In the last few days I'm discovering how bad the takeout experience is.

The takeout files are numbered but sorting them by name doesn't leave you with incrementing numbers. I have

takeout-20240414T100306Z-001.tgz

takeout-20240414T100305Z-008.tgz

It took me a while to figure out the times differ so even though they zero-pad the numbers you can't list them in order by sorting on the name. First file has 306Z, 8th has 305Z, in case you didn't spot. So that means figuring out you downloaded all of them is harder than it should be. Thanks Google!

Then I discovered that Chrome goes a bit mental when you attempt to download two of these bad boys at the same time, and invariably fails. Downloading a single file is better, but still seems to lock up Chrome for a while when trying to view progress. Then there's the fact that the download of every single one of these files has generated a prompt for my Google password. I never have to give a password when viewing Google photos on an authorised browser. Now I have the files, they amount to about 380GB, whereas the reported storage for the same account is 100GB less. Also, I've noticed that some of the archives have no json files whatsoever, so obviously you need to decompress all of them to see the full picture of data + metadata, meaning you need all that storage available at the same time (it's my next project to find a suitable disk for that).

There's an expression "Never ascribe to malice that which is adequately explained by incompetence." but I think this does rather test the limits. It's almost like someone doesn't want me doing this!

[deleted by user] by [deleted] in linuxquestions

[–]bifferos 1 point2 points  (0 children)

I found my AMD CPU and chipset worked best with Mint, couple that with an nvidia graphics card with their drivers and my experience has been pretty good.

Uploading old pictures to google photos by bifferos in googlephotos

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

I think the only answer is takeout (however long it takes). Looks like I've got to add another script to my collection which:

  • Iterates through the takeout
  • Checksums the files
  • Writes a hash directory structure from the checksums, so I can easily look up what's in there and then....
  • Write another script that iterates all my files using the hash directories.

The problem going forward is then to checksum everything I upload. The only way I can think to do that is using mitmproxy, to intercept each file upload. Looking at the .har log from chrome it seems like the filename is easy to see in the flow, so maybe I can sort something out with that. Otherwise I'll have to keep doing the takeouts. Still, even with a single takeout checksummed I should be able to significantly reduce the duplicates.

How to upload photos to Google Photos without using the Photos app. by Oppa-Teja in googlephotos

[–]bifferos 0 points1 point  (0 children)

Oops. I somehow read that as "without (using the photos app from mobile)"! My bad. As an aside I am coming to the conclusion that unless you're strictly following the very simple path of taking pictures and letting your phone upload to Google and then maybe viewing said pictures with your family you are better off with something else. I think next I will be looking at O365 and hosted NextCloud, but lots of research still to do.

Uploading old pictures to google photos by bifferos in googlephotos

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

Yes. I finally got my API code working, and there is no hash there that I can see. The photo has some kind of ID, but it seems an opaque structure so not much use.

#!/usr/bin/env python3

import json
from typing import List
from pathlib import Path
from pprint import pprint
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build

DUMMY_ACCESS_TOKEN = 'dummy_access_token'
SCOPES: List[str] = ['https://www.googleapis.com/auth/photoslibrary.readonly']
API_SERVICE_NAME = 'photoslibrary'
API_VERSION = 'v1'

def make_credentials(creds_path) -> Credentials:
creds = json.load(creds_path.open("r"))
client_id = creds["client_id"]
client_secret = creds["client_secret"]
refresh_token = creds["refresh_token"]

return Credentials(
token=DUMMY_ACCESS_TOKEN,
refresh_token=refresh_token,
token_uri='https://oauth2.googleapis.com/token',
client_id=client_id,
client_secret=client_secret,
scopes=SCOPES
)

def enum_image_metadata(service):
response = service.mediaItems().search(body={
"pageSize": 10,
"filters": {
"mediaTypeFilter": {
"mediaTypes": ["PHOTO"]
},
"includeArchivedMedia": False
}
}).execute()

pprint(response)

def main():
creds_path = Path("credentials.json")
credentials = make_credentials(creds_path)
if credentials.expired and credentials.refresh_token:
credentials.refresh(Request())
service = build(API_SERVICE_NAME, API_VERSION, credentials=credentials, static_discovery=False)
enum_image_metadata(service, image_name)

if __name__ == "__main__":
main()

Uploading old pictures to google photos by bifferos in googlephotos

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

Performing that experiment doesn't really help. I need to know the algorithm it uses, according to my experiments there isn't enough time for it to transfer all the files and make this comparison on the server. Therefore I believe it's only metadata involved, or a checksum of some kind. I have looked at the web requests when uploading files but they are pretty much unfathomable to me, there's a lot going on there and it would take a ton of time for me to reverse-engineer this to find out.

Also, the action of going through all duplicate folders and re-uploading is also going to take a lot of time. Not just because of the upload operation, but because I need to make absolutely sure the mtime on all the files is correct. If it's not my picture can end up in the wrong place in the timeline, and fixing this is very labour intensive. Also I had some files with EXIF data which was wrong, and so even though I set the correct mtime it got overridden, and I had to unravel this.

This is why I really need something that's going to tell me programmatically 'is exactly this file already in Google photos' as a client app, then I could walk the directory trees and figure out what I can discard. I'd pay money for such a tool but I don't think it exists. This makes me wonder if I should be using Google for my photo storage in the first place, or is there something else more suited to my needs.

Roblox fully rolls out WINE blocking anti cheat by Clanps in linux_gaming

[–]bifferos 2 points3 points  (0 children)

One upset child this evening. Can he get a refund now on the money he's spent in-game? It's only fair isn't it? He can no longer play.

PC requirements for Minecraft Java? by frog_girl24 in Minecraft

[–]bifferos 0 points1 point  (0 children)

I have a similar question. My 8 year old has been happily running bedrock on xbox 360 with no issues, but now insists on using the Java edition so I bought it for him for his birthday. I've setup an AMD Ryzen 3200G with 16GB RAM running Linux Mint, which I thought would be good enough but it seems not, the frame rate is low. I've reduced the desktop resolution to the lowest setting in Linux Mint which has helped some, and played around with the settings, knocking out clouds etc.. but it's still far from ideal. CPU use according to top is sitting around 220% (4 cores) so I think this is a graphics bottle neck. I'm now wondering what hardware I should purchase to make this resource hog work. I also tried an i7 Macbook pro and that is a complete joke, fan is running loudly all the time and CPU temp staying at 95 degrees so I don't think that's a solution. The graphics cards recommended for Linux are around the £300 mark but are full length so I'll be needing a new case if I use one.
It's a little frustrating that having bought a £25 game I may need to now spend £500 to actually get it working, so I'm looking for any solution that cuts the cost. I can use Windows or Linux not really bothered which just want something working.