@pnutzh4x0r@lemmy.ndlug.org avatar

pnutzh4x0r

@pnutzh4x0r@lemmy.ndlug.org

This profile is from a federated server and may be incomplete. Browse more on the original instance.

pnutzh4x0r,
@pnutzh4x0r@lemmy.ndlug.org avatar

I’ve used Fastmail with a custom domain for a few years now… (5+?) and have been really happy with it. I wish it was a bit cheaper (or had a better family plan), but it works well with my terminal email client (mutt).

The web client is pretty quick and I use the calendar there all the time. Fastmail supports all the normal standards such as CalDAV, so you can use it with third party applications.

Snap Trap: The Hidden Dangers Within Ubuntu's Package Suggestion System (www.aquasec.com)

Aqua Nautilus researchers have identified a security issue that arises from the interaction between Ubuntu’s command-not-found package and the snap package repository. While command-not-found serves as a convenient tool for suggesting installations for uninstalled commands, it can be inadvertently manipulated by attackers...

Mozilla names new CEO as it pivots to data privacy (fortune.com)

Mozilla Corp., which manages the open-source Firefox browser, announced today that Mitchell Baker is stepping down as CEO to focus on AI and internet safety as chair of the nonprofit foundation. Laura Chambers, a Mozilla board member and entrepreneur with experience at Airbnb, PayPal, and eBay, will step in as interim CEO to run...

Damn Small Linux 2024 (www.damnsmalllinux.org)

The New DSL 2024 has been reborn as a compact Linux distribution tailored for low-spec x86 computers. It packs a lot of applications into a small package. All the applications are chosen for their functionality, small size, and low dependencies. DSL 2024 also has many text-based applications that make it handy to use in a term...

The 6.7 kernel has been released (lwn.net)

Some of the headline features in this release are: the removal of support for the Itanium architecture, the first part of the futex2 API, futex support in io_uring, the BPF exceptions mechanism, the bcachefs filesystem, the TCP authentication option, the kernel samepage merging smart scan mode, and networking support for the...

Gentoo goes Binary (packages) (www.gentoo.org)

To speed up working with slow hardware and for overall convenience, we’re now also offering binary packages for download and direct installation! For most architectures, this is limited to the core system and weekly updates - not so for amd64 and arm64 however. There we’ve got a stunning >20 GByte of packages on our mirrors,...

Cosmic Terminal (fosstodon.org)

This is cosmic-term, a very WIP project that takes the alacritty_terminal crate providing the majority of terminal code but rewrites the renderer to support additional features such as bidirectional text and ligatures. It will support both software and GPU rendering, and will have additional UI sugar provided by libcosmic as...

Performance engineering on Ubuntu leaps forward with frame pointers by default in Ubuntu 24.04 LTS (ubuntu.com)

In collaboration with Polar Signals we have committed that beginning with Ubuntu 24.04 LTS, our GNU Compiler Collection (GCC) package will enable frame pointers by default for 64-bit platforms. All packages in Ubuntu, with very few exceptions, will be rebuilt with frame pointers enabled, making them easier to profile and...

pnutzh4x0r,
@pnutzh4x0r@lemmy.ndlug.org avatar

Language: Python

Part 1Pretty straightforward. Took advantage of itertools.pairwise. def predict(history: list[int]) -> int: sequences = [history] while len(set(sequences[-1])) > 1: sequences.append([b - a for a, b in itertools.pairwise(sequences[-1])]) return sum(sequence[-1] for sequence in sequences) def main(stream=sys.stdin) -> None: histories = [list(map(int, line.split())) for line in stream] predictions = [predict(history) for history in histories] print(sum(predictions))

Part 2Only thing that changed from the first part was that I used functools.reduce to take the differences of the first elements of the generated sequences (rather than the sum of the last elements for Part 1). def predict(history: list[int]) -> int: sequences = [history] while len(set(sequences[-1])) > 1: sequences.append([b - a for a, b in itertools.pairwise(sequences[-1])]) return functools.reduce( lambda a, b: b - a, [sequence[0] for sequence in reversed(sequences)] ) def main(stream=sys.stdin) -> None: histories = [list(map(int, line.split())) for line in stream] predictions = [predict(history) for history in histories] print(sum(predictions))

GitHub Repo

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • osvaldo12
  • ngwrru68w68
  • GTA5RPClips
  • provamag3
  • InstantRegret
  • everett
  • Durango
  • cisconetworking
  • khanakhh
  • ethstaker
  • tester
  • anitta
  • Leos
  • normalnudes
  • modclub
  • megavids
  • lostlight
  • All magazines