-- Leo's gemini proxy

-- Connecting to gemini.tuxmachines.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-GB

Tux Machines


Programming Leftovers


Posted by Roy Schestowitz on Dec 29, 2022


today's leftovers

Red Hat Leftovers



A Complete Guide to Check If File Exists in Bash | Unixmen


↺ A Complete Guide to Check If File Exists in Bash | Unixmen


> A Shell script might demand that you check whether a file exists before doing a task.


> You could always assume that the programmer or user that will run the script will do their due diligence and ensure the file is present. But bash offers the ability to check that a file exists, and leaving it to chance will be the clumsy thing to do.


> Also, assuming a file is present isn’t the right way to go if the script is distributed on various operating systems.



Python readlines() Method - TecAdmin


↺ Python readlines() Method - TecAdmin


> Have you ever wanted to read a file line by line in Python? Then you should be familiar with the Python `readlines()` Method! This powerful Python Method is used to read a file line by line and store each line in a list. This means you can access each line of the file using a simple list index, and you can easily manipulate the contents of the file.


> The `readlines()` Method is very useful for reading files that contain lots of information or have many lines of text. You can also use the `readlines()` Method to read a file one line at a time, which is great for file-processing tasks. What’s even better is that the `readlines()` Method is easy to use and can be implemented in just a few lines of code. So if you’re looking for a reliable way to read files in Python, look no further than the `readlines()` Method!



Shortest Time-to-Launch


↺ Shortest Time-to-Launch


> There's a class of software that solves the simplest case and optimizes for the shortest time-to-launch (a different sort of TTL). When code is a liability, sometimes these are the best options. Think of this post as a continuation or list of examples for Solving the Simple Case. While these products aren't always the best for real stacks, they can be invaluable for a proof-of-concept or demo app. I imagine looking back at this list in a few years will be interesting.



MIDI madness with ChatGPT: the AI-powered tunes that will make you laugh, cry, and dance | R-bloggers


↺ MIDI madness with ChatGPT: the AI-powered tunes that will make you laugh, cry, and dance | R-bloggers


> ChatGPT seems to be taking the world by storm. This is version of the GPT3 language model which is somehow optimised for chat dominates my Mastodon feed and inspired countless articles and discussion. 1


> A decent chunk of the discourse has been about how the outputs of the models sound very plausible and even authoritative but lack any connection with reality because the model is train to mimic language, not to give truth. Another chunk of the discourse is dominated by funny responses and creations. Things like poems, stories, limericks.



A Personal File Share CLI — Andrew Healey


↺ A Personal File Share CLI — Andrew Healey


> There are a few ways around this problem without paying for a subscription. Like emailing the PDF as an attachment or uploading it to Google Drive with share permissions.


> None of the alternatives are perfect. When I need to quickly share a file during an online conversation (on a platform without unrestrictive, native file upload) I waste time.


> I estimated that by building a custom solution within a time budget of two hours, I would start saving time within one year.


> This is where I lose time when I have to share a file.



Announcing GoReleaser v1.14 — the Christmas release


↺ Announcing GoReleaser v1.14 — the Christmas release


> Another month, another release! In fact, the last release of the year.


> This one in particular marks the 6 years anniversary of GoReleaser, and is packed with new features and improvements.




gemini.tuxmachines.org

-- Response ended

-- Page fetched on Thu Jun 13 15:54:39 2024