Nice. Software developer, gamer, occasionally 3d printing, coffee lover.

  • 0 Posts
  • 398 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle
  • ZikejitoAdvent Of Code👻 - 2024 DAY 19 SOLUTIONS -👻
    link
    fedilink
    English
    arrow-up
    6
    ·
    3 days ago

    Javascript

    Behold an abomination!

    const input = require('fs').readFileSync(0, 'utf-8').toString();
    const towels = new Set(input.split(/\r?\n\r?\n/g)[0].split(', '));
    const count = (p, t) => [...new Array(p.length).keys()].reduce((acc, i) => [...new Array(i + 1).keys()].forEach(j => acc[j] > 0n && t.has(p.substring(j, i + 1)) ? acc[i + 1] += acc[j] : null) ? acc : acc, [1n, ...new Array(p.length).fill(0n)])[p.length];
    input.split(/\r?\n\r?\n/g)[1].split(/\r?\n/g).filter(p => p.length > 0).reduce((acc, p) => { let c = count(p, towels); acc[0] += c > 0 ? 1 : 0; acc[1] += c; return acc }, [0, 0n]).forEach((v, i) => console.log(`Part ${i+1}: ${v}`));
    


  • ZikejitoAMD@lemmy.zipAM5 CPU + Chipset for 2+ GPUs?
    link
    fedilink
    English
    arrow-up
    4
    ·
    4 days ago

    The AM5 chipset only supports up to 28.

    That being said, performance loss depends on your inference engine. You could try and find a older threadripper to get proper 2x 16x, but you’d still be spending a pretty penny for PCIe Gen 4.

    Unfortunately, whole gen 5 is twice the bandwidth as gen 4, 2x 8x PCIe 5 doesn’t become 2x 16x PCIe 4, though that would have been nice.



  • ZikejitoAdvent Of Code🦌 - 2024 DAY 16 SOLUTIONS -🦌
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    5 days ago

    Javascript

    So my friend tells me my solution is close to Dijkstra but honestly I just tried what made sense until it worked. I originally wanted to just bruteforce it and get every single possible path explored but uh… Yeah that wasn’t gonna work, I terminated that one after 1B operations.

    I created a class to store the state of the current path being explored, and basically just clone it, sending it in each direction (forward, 90 degrees, -90 degrees), then queue it up if it didn’t fail. Using a priority queue (array based) to store them, I inverted it for the second answer to reduce the memory footprint (though ultimately once I fixed the issue with the algorithm, which turned out to just be a less than or equal to that should have been a less than, I didn’t really need this).

    Part two “only” took 45 seconds to run on my Thinkpad P14 Gen1.

    My code was too powerful for Lemmy (or verbose): https://blocks.programming.dev/Zikeji/ae06ca1ca88649c99581eefce97a708e


  • ZikejitoADHD@lemmy.worldIs it normal to feel this way?
    link
    fedilink
    English
    arrow-up
    12
    ·
    9 days ago

    What you describe - that feeling when you think of doing those things, my personal experience has me classify it as overthinking becomes getting overwhelmed. And once I’m overwhelmed, I want to escape.

    Keeping in mind coping mechanisms aren’t one size fits all, the coping mechanism that helped me is to write out the problem step by step. This forces me to think slower, and helps me get out of that recursion of thinking about the same things.

    I’ve also found some success in the age of AI LLMs asking one to break it down as well.

    An example would be the dentist. First I need to find one, I need to look at reviews, I need to make sure they accept my insurance, I need to make sure they’re reasonably close by. Alright, I compile a list of a few options, now the next part is the hard part: I have to actually call to get scheduled. But once I have it scheduled, my social anxiety is superceded by my desire to just get it over with. Sure I may feel that anxiety once I get close to the appointment, but I can cope with that - the real trick is by breaking down the process I didn’t get overwhelmed as quick, and if I did I had notes to come back to.



  • ZikejitoAsk Lemmy@lemmy.worldWhats your advantage in life?
    link
    fedilink
    English
    arrow-up
    13
    ·
    11 days ago

    I used to have a fair bit of imposter syndrome but now that I’ve been working with a proper team I’ve come too accept I have an aptitude for code and logic in general, alongside a fairly good abstract memory.

    I’m not the best by any stretch of the imagination, but I’m a little more competent than the average software engineer, enough that it gets noticed.

    I also got lucky and scored a job at 17 in the field (with no nepotism involved), not a great one but enough to look good on my resume, and have been working in the industry for just over a decade with no college.




  • The ad serving companies (Google) don’t care about what happens after the click (yet). As far as I’m aware no “handshake” process exists that would allow an advertiser to communicate with the as server and validate a click (such a process could be abused).

    Most likely the advertiser would be using some form of client side analytics, so the click wouldn’t show up in their statistics, meaning the advertiser would see a huge discrepancy between the clicks they saw in the campaign and the clicks the ad server reports.


  • I’m not sure what you mean by “open source compatible”. Do you mean the camera itself can have open source firmware installed, or that it’s compatible with open source NVR software such as Shinobi or ZoneMinder?

    If the former, I know some of the Wyze cameras have that option. Like OpenMiko. There’s all OpenIPC, which does have a list of supported devices.

    If the latter, any camera with RTSP and some sort of API to expose PTZ controls would do. My personal recommendation would be Axis, which makes solid cameras.