#python file handling
Explore tagged Tumblr posts
gay-victorian-astronomer Ā· 8 months ago
Text
piece of code I thought was going to be hellish to write turned out to be relatively simple and actually kinda fun! peace and love on fucking planet earth
6 notes Ā· View notes
removeload-academy Ā· 5 months ago
Text
Python Exception Handling and File Handling: Understanding Errors, Functions, and Best Practices
Python provides several built-in functions for working with files. These file handling functions in Python allow developers to perform various file operations efficiently.
0 notes
bittutech Ā· 6 months ago
Text
Concept of File Handling in Python
Hello dear visitor !!! You all the again most welcome to this domain bittutech.com . Today we are going to discus about most important concept of Python Programming Language which is File Handling including What is file?, Types of files, Modes of files, OpeningĀ  and Closing of file, Working with files… and many more. So let’s dive in this amazing concept šŸ‘. Most of the programming languages…
0 notes
komaedalovemail Ā· 9 months ago
Note
komaedas have you tried straw.page?
(i hope you don't mind if i make a big ollllle webdev post off this!)
i have never tried straw.page but it looks similar to carrd and other WYSIWYG editors (which is unappealing to me, since i know html/css/js and want full control of the code. and can't hide secrets in code comments.....)
my 2 cents as a web designer is if you're looking to learn web design or host long-term web projects, WYSIWYG editors suck doodooass. you don't learn the basics of coding, someone else does it for you! however, if you're just looking to quickly host images, links to your other social medias, write text entries/blogposts, WYSIWYG can be nice.
toyhouse, tumblr, deviantart, a lot of sites implement WYSIWYG for their post editors as well, but then you can run into issues relying on their main site features for things like the search system, user profiles, comments, etc. but it can be nice to just login to your account and host your information in one place, especially on a platform that's geared towards that specific type of information. (toyhouse is a better example of this, since you have a lot of control of how your profile/character pages look, even without a premium account) carrd can be nice if you just want to say "here's where to find me on other sites," for example. but sometimes you want a full website!
---------------------------------------
neocities hosting
currently, i host my website on neocities, but i would say the web2.0sphere has sucked some doodooass right now and i'm fiending for something better than it. it's a static web host, e.g. you can upload text, image, audio, and client-side (mostly javascript and css) files, and html pages. for the past few years, neocities' servers have gotten slower and slower and had total blackouts with no notices about why it's happening... and i'm realizing they host a lot of crypto sites that have crypto miners that eat up a ton of server resources. i don't think they're doing anything to limit bot or crypto mining activity and regular users are taking a hit.
Tumblr media Tumblr media Tumblr media
↑ page 1 on neocitie's most viewed sites we find this site. this site has a crypto miner on it, just so i'm not making up claims without proof here. there is also a very populated #crypto tag on neocities (has porn in it tho so be warned...).
---------------------------------------
dynamic/server-side web hosting
$5/mo for neocities premium seems cheap until you realize... The Beautiful World of Server-side Web Hosting!
client-side AKA static web hosting (neocities, geocities) means you can upload images, audio, video, and other files that do not interact with the server where the website is hosted, like html, css, and javascript. the user reading your webpage does not send any information to the server like a username, password, their favourite colour, etc. - any variables handled by scripts like javascript will be forgotten when the page is reloaded, since there's no way to save it to the web server. server-side AKA dynamic web hosting can utilize any script like php, ruby, python, or perl, and has an SQL database to store variables like the aforementioned that would have previously had nowhere to be stored.
there are many places in 2024 you can host a website for free, including: infinityfree (i use this for my test websites :B has tons of subdomains to choose from) [unlimited sites, 5gb/unlimited storage], googiehost [1 site, 1gb/1mb storage], freehostia [5 sites/1 database, 250mb storage], freehosting [1 site, 10gb/unlimited storage]
if you want more features like extra websites, more storage, a dedicated e-mail, PHP configuration, etc, you can look into paying a lil shmoney for web hosting: there's hostinger (this is my promocode so i get. shmoney. if you. um. šŸ—æšŸ—æšŸ—æ) [$2.40-3.99+/mo, 100 sites/300 databases, 100gb storage, 25k visits/mo], a2hosting [$1.75-12.99+/mo, 1 site/5 databases, 10gb/1gb storage], and cloudways [$10-11+/mo, 25gb/1gb]. i'm seeing people say to stay away from godaddy and hostgator. before you purchase a plan, look up coupons, too! (i usually renew my plan ahead of time when hostinger runs good sales/coupons LOL)
here's a big webhost comparison chart from r/HostingHostel circa jan 2024.
Tumblr media
---------------------------------------
domain names
most of the free website hosts will give you a subdomain like yoursite.has-a-cool-website-69.org, and usually paid hosts expect you to bring your own domain name. i got my domain on namecheap (enticing registration prices, mid renewal prices), there's also porkbun, cloudflare, namesilo, and amazon route 53. don't use godaddy or squarespace. make sure you double check the promo price vs. the actual renewal price and don't get charged $120/mo when you thought it was $4/mo during a promo, certain TLDs (endings like .com, .org, .cool, etc) cost more and have a base price (.car costs $2,300?!?). look up coupons before you purchase these as well!
namecheap and porkbun offer something called "handshake domains," DO NOT BUY THESE. 🤣🤣🤣 they're usually cheaper and offer more appealing, hyper-specific endings like .iloveu, .8888, .catgirl, .dookie, .gethigh, .♄, .ā£, and .✟. I WISH WE COULD HAVE THEM but they're literally unusable. in order to access a page using a handshake domain, you need to download a handshake resolver. every time the user connects to the site, they have to provide proof of work. aside from it being incredibly wasteful, you LITERALLY cannot just type in the URL and go to your own website, you need to download a handshake resolver, meaning everyday internet users cannot access your site.
---------------------------------------
hosting a static site on a dynamic webhost
you can host a static (html/css/js only) website on a dynamic web server without having to learn PHP and SQL! if you're coming from somewhere like neocities, the only thing you need to do is configure your website's properties. your hosting service will probably have tutorials to follow for this, and possibly already did some steps for you. you need to point the nameserver to your domain, install an SSL certificate, and connect to your site using FTP for future uploads. FTP is a faster, alternative way to upload files to your website instead of your webhost's file upload system; programs like WinSCP or FileZilla can upload using FTP for you.
if you wanna learn PHP and SQL and really get into webdev, i wrote a forum post at Mysidia Adoptables here, tho it's sorted geared at the mysidia script library itself (Mysidia Adoptables is a free virtual pet site script, tiny community. go check it out!)
---------------------------------------
file storage & backups
a problem i have run into a lot in my past like, 20 years of internet usage (/OLD) is that a site that is free, has a small community, and maybe sounds too good/cheap to be true, has a higher chance of going under. sometimes this happens to bigger sites like tinypic, photobucket, and imageshack, but for every site like that, there's like a million of baby sites that died with people's files. host your files/websites on a well-known site, or at least back it up and expect it to go under!
i used to host my images on something called "imgjoe" during the tinypic/imageshack era, it lasted about 3 years, and i lost everything hosted on there. more recently, komaedalovemail had its webpages hosted here on tumblr, and tumblr changed its UI so custom pages don't allow javascript, which prevented any new pages from being edited/added. another test site i made a couple years ago on hostinger's site called 000webhost went under/became a part of hostinger's paid-only plans, so i had to look very quickly for a new host or i'd lose my test site.
if you're broke like me, looking into physical file storage can be expensive. anything related to computers has gone through baaaaad inflation due to crypto, which again, I Freaquing Hate, and is killing mother nature. STOP MINING CRYPTO this is gonna be you in 1 year
Tumblr media
...um i digress. ANYWAYS, you can archive your websites, which'll save your static assets on The Internet Archive (which could use your lovely donations right now btw), and/or archive.today (also taking donations). having a webhost service with lots of storage and automatic backups can be nice if you're worried about file loss or corruption, or just don't have enough storage on your computer at home!
if you're buying physical storage, be it hard drive, solid state drive, USB stick, whatever... get an actual brand like Western Digital or Seagate and don't fall for those cheap ones on Amazon that claim to have 8,000GB for $40 or you're going to spend 13 days in windows command prompt trying to repair the disk and thenthe power is gong to go out in your shit ass neighvborhood and you have to run it tagain and then Windows 10 tryes to update and itresets the /chkdsk agin while you're awayfrom town nad you're goig to start crytypting and kts just hnot going tot br the same aever agai nikt jus not ggiog to be the saeme
---------------------------------------
further webhosting options
there are other Advanced options when it comes to web hosting. for example, you can physically own and run your own webserver, e.g. with a computer or a raspberry pi. r/selfhosted might be a good place if you're looking into that!
if you know or are learning PHP, SQL, and other server-side languages, you can host a webserver on your computer using something like XAMPP (Apache, MariaDB, PHP, & Perl) with minimal storage space (the latest version takes up a little under 1gb on my computer rn). then, you can test your website without needing an internet connection or worrying about finding a hosting plan that can support your project until you've set everything up!
there's also many PHP frameworks which can be useful for beginners and wizards of the web alike. WordPress is one which you're no doubt familiar with for creating blog posts, and Bluehost is a decent hosting service tailored to WordPress specifically. there's full frameworks like Laravel, CakePHP, and Slim, which will usually handle security, user authentication, web routing, and database interactions that you can build off of. Laravel in particular is noob-friendly imo, and is used by a large populace, and it has many tutorials, example sites built with it, and specific app frameworks.
---------------------------------------
addendum: storing sensitive data
if you decide to host a server-side website, you'll most likely have a login/out functionality (user authentication), and have to store things like usernames, passwords, and e-mails. PLEASE don't launch your website until you're sure your site security is up to snuff!
when trying to check if your data is hackable... It's time to get into the Mind of a Hacker. OWASP has some good cheat sheets that list some of the bigger security concerns and how to mitigate them as a site owner, and you can look up filtered security issues on the Exploit Database.
this is kind of its own topic if you're coding a PHP website from scratch; most frameworks securely store sensitive data for you already. if you're writing your own PHP framework, refer to php.net's security articles and this guide on writing an .htaccess file.
---------------------------------------
but. i be on that phone... :(
ok one thing i see about straw.page that seems nice is that it advertises the ability to make webpages from your phone. WYSIWYG editors in general are more capable of this. i only started looking into this yesterday, but there ARE source code editor apps for mobile devices! if you have a webhosting plan, you can download/upload assets/code from your phone and whatnot and code on the go. i downloaded Runecode for iphone. it might suck ass to keep typing those brackets.... we'll see..... but sometimes you're stuck in the car and you're like damn i wanna code my site GRRRR I WANNA CODE MY SITE!!!
Tumblr media Tumblr media
↑ code written in Runecode, then uploaded to Hostinger. Runecode didn't tell me i forgot a semicolon but Hostinger did... i guess you can code from your webhost's file uploader on mobile but i don't trust them since they tend not to autosave or prompt you before closing, and if the wifi dies idk what happens to your code.
---------------------------------------
ANYWAYS! HAPPY WEBSITE BUILDING~! HOPE THIS HELPS~!~!~!
-Mod 12 @eeyes
Tumblr media
202 notes Ā· View notes
felixcloud6288 Ā· 4 months ago
Text
Was troubleshooting an issue with a program where I wanted it to run multiple parallel subprocesses only for most of them to seemingly stall. Turns out it was because I didn't know how the multiprocessing function I was using runs in the background.
There's a Python class called Pool() and it has a function map() which takes a function and a list of arguments. Pool will run parallel instances of the function with every item in the argument list you give it.
I assumed that the way it would work was if I allow Pool to run p subprocesses and there are n arguments in my list, Pool would run the first p arguments in my list and whenever one subprocess finished, Pool would start a new subprocess with the next available argument.
Turns out that Pool instead breaks the argument list into smaller sublists and assigns each subprocess one of those sublists. So instead of assigning the first subprocess to handle the first argument, then the next subprocess the next, etc. It assigns the first x arguments to be handled by subprocess 1, the next x arguments to subprocess 2, etc.
The issue I had was I had 922 files I needed to process and the runtime was directly related to the file sizes. The smallest file was 5.6 KB and the largest was 229.8 MB. I sorted the file names in my argument list by file size from largest to smallest expecting the largest files to be processed first and then the subprocesses would gradually work on the smaller ones.
Instead, all the largest files got assigned to a single subprocess. It probably was assigned 60% of the total workload. And every subsequent subprocess would be handed smaller and smaller pieces of the workload.
So those subprocesses weren't stalled. Pool ran out of tasks for them to do and the whole thing had to wait on the subprocesses that were given all the heavy tasks I was hoping to divide across them.
It would have been faster to completely randomize the list first.
22 notes Ā· View notes
williammorrised Ā· 1 year ago
Text
Man goes to the doctor. Says he's frustrated. Says his Python experience seems complicated and confusing. Says he feels there are too many environment and package management system options and he doesn't know what to do.
Doctor says, "Treatment is simple. Just use Poetry + pyenv, which combines the benefits of conda, venv, pip, and virtualenv. But remember, after setting up your environment, you'll need to install build essentials, which aren't included out-of-the-box. So, upgrade pip, setuptools, and wheel immediately. Then, you'll want to manage your dependencies with a pyproject.toml file.
"Of course, Poetry handles dependencies, but you may need to adjust your PATH and activate pyenv every time you start a new session. And don't forget about locking your versions to avoid conflicts! And for data science, you might still need conda for some specific packages.
"Also, make sure to use pipx for installing CLI tools globally, but isolate them from your project's environment. And if you're deploying, Dockerize your app to ensure consistency across different machines. Just be cautious about Docker’s compatibility with M1 chips.
"Oh, and when working with Jupyter Notebooks, remember to install ipykernel within your virtual environment to register your kernel. But for automated testing, you should...
76 notes Ā· View notes
rathologic Ā· 9 months ago
Text
Tumblr media
yours truly has had an #illness which means I've had time for a proof of concept of an idea the Pathologic Modding Discord has had floating around for a while... the Bound Location Randomizer. Every (*accessible) major NPC moved to a randomly selected house, with map markers and executor locations updated to match. Ready-to-install Script and Scene files are automatically generated via Python. It doesn't handle dialogue, quest-based visits, or the trigger that makes Viktor interactable... yet, but that won't stop me.
Join me in one hour (1pm EST) at https://twitch.tv/rathologic as I test the first few days of a Changeling route playthrough with Bound locations randomized :-)
Tumblr media Tumblr media
46 notes Ā· View notes
mltshphq Ā· 6 months ago
Text
BRB... just upgrading Python
CW: nerdy, technical details.
Originally, MLTSHP (well, MLKSHK back then) was developed for Python 2. That was fine for 2010, but 15 years later, and Python 2 is now pretty ancient and unsupported. January 1st, 2020 was the official sunset for Python 2, and 5 years later, we’re still running things with it. It’s served us well, but we have to transition to Python 3.
Well, I bit the bullet and started working on that in earnest in 2023. The end of that work resulted in a working version of MLTSHP on Python 3. So, just ship it, right? Well, the upgrade process basically required upgrading all Python dependencies as well. And some (flyingcow, torndb, in particular) were never really official, public packages, so those had to be adopted into MLTSHP and upgraded as well. With all those changes, it required some special handling. Namely, setting up an additional web server that could be tested against the production database (unit tests can only go so far).
Here’s what that change comprised:Ā 148 files changed, 1923 insertions, 1725 deletions. Most of those changes were part of the first commit for this branch, made on July 9, 2023 (118 files changed).
But by the end of that July, I took a break from this task - I could tell it wasn’t something I could tackle in my spare time at that time.
Time passes…
Fast forward to late 2024, and I take some time to revisit the Python 3 release work. Making a production web server for the new Python 3 instance was another big update, since I wanted the Docker container OS to be on the latest LTS edition of Ubuntu. For 2023, that was 20.04, but in 2025, it’s 24.04. I also wanted others to be able to test the server, which means the CDN layer would have to be updated to direct traffic to the test server (without affecting general traffic); I went with a client-side cookie that could target the Python 3 canary instance.
In addition to these upgrades, there were others to consider — MySQL, for one. We’ve been running MySQL 5, but version 9 is out. We settled on version 8 for now, but could also upgrade to 8.4… 8.0 is just the version you get for Ubuntu 24.04. RabbitMQ was another server component that was getting behind (3.5.7), so upgrading it to 3.12.1 (latest version for Ubuntu 24.04) seemed proper.
One more thing - our datacenter. We’ve been using Linode’s Fremont region since 2017. It’s been fine, but there are some emerging Linode features that I’ve been wanting. VPC support, for one. And object storage (basically the same as Amazon’s S3, but local, so no egress cost to-from Linode servers). Both were unavailable to Fremont, so I decided to go with their Chicago region for the upgrade.
Now we’re talking… this is now not just a ā€œpush a buttonā€ release, but a full-fleged, build everything up and tear everything down kind of release that might actually have some downtime (while trying to keep it short)!
I built a release plan document and worked through it. The key to the smooth upgrade I want was to make the cutover as seamless as possible. Picture it: once everything is set up for the new service in Chicago - new database host, new web servers and all, what do we need to do to make the switch almost instant? It’s Fastly, our CDN service.
All traffic to our service runs through Fastly. A request to the site comes in, Fastly routes it to the appropriate host, which in turns speaks to the appropriate database. So, to transition from one datacenter to the other, we need to basically change the hosts Fastly speaks to. Those hosts will already be set to talk to the new database. But that’s a key wrinkle - the new database…
The new database needs the data from the old database. And to make for a seamless transition, it needs to be up to the second in step with the old database. To do that, we have take a copy of the production data and get it up and running on the new database. Then, we need to have some process that will copy any new data to it since the last sync. This sounded a lot like replication to me, but the more I looked at doing it that way, I wasn’t confident I could set that up without bringing the production server down. That’s because any replica needs to start in a synchronized state. You can’t really achieve that with a live database. So, instead, I created my own sync process that would copy new data on a periodic basis as it came in.
Beyond this, we need a proper replication going in the new datacenter. In case the database server goes away unexpectedly, a replica of it allows for faster recovery and some peace of mind. Logical backups can be made from the replica and stored in Linode’s object storage if something really disastrous happens (like tables getting deleted by some intruder or a bad data migration).
I wanted better monitoring, too. We’ve been using Linode’s Longview service and that’s okay and free, but it doesn’t act on anything that might be going wrong. I decided to license M/Monit for this. M/Monit is so lightweight and nice, along with Monit running on each server to keep track of each service needed to operate stuff. Monit can be given instructions on how to self-heal certain things, but also provides alerts if something needs manual attention.
And finally, Linode’s Chicago region supports a proper VPC setup, which allows for all the connectivity between our servers to be totally private to their own subnet. It also means that I was able to set up an additional small Linode instance to serve as a bastion host - a server that can be used for a secure connection to reach the other servers on the private subnet. This is a lot more secure than before… we’ve never had a breach (at least, not to my knowledge), and this makes that even less likely going forward. Remote access via SSH is now unavailable without using the bastion server, so we don’t have to expose our servers to potential future ssh vulnerabilities.
So, to summarize: the MLTSHP Python 3 upgrade grew from a code release to a full stack upgrade, involving touching just about every layer of the backend of MLTSHP.
Here’s a before / after picture of some of the bigger software updates applied (apologies for using images for these tables, but Tumblr doesn’t do tables):
Tumblr media
And a summary of infrastructure updates:
Tumblr media
I’m pretty happy with how this has turned out. And I learned a lot. I’m a full-stack developer, so I’m familiar with a lot of devops concepts, but actually doing that role is newish to me. I got to learn how to set up a proper secure subnet for our set of hosts, making them more secure than before. I learned more about Fastly configuration, about WireGuard, about MySQL replication, and about deploying a large update to a live site with little to no downtime. A lot of that is due to meticulous release planning and careful execution. The secret for that is to think through each and every step - no matter how small. Document it, and consider the side effects of each. And with each step that could affect the public service, consider the rollback process, just in case it’s needed.
At this time, the server migration is complete and things are running smoothly. Hopefully we won’t need to do everything at once again, but we have a recipe if it comes to that.
15 notes Ā· View notes
ceph-the-ghost-writer Ā· 1 year ago
Text
Character Cuddle Scale
Tagged by @kaylinalexanderbooks!
How-to: Rate your OCs based on how they handle cuddling/being cuddled.
Based on a scale of 0 (cuddly as a cactus) to 10 (could be paid to cuddle professionally):
Dorian: 10/10 You've activated their ultimate ability. Prepare for the warmest, coziest cuddling of your life while the two of you binge watch dinosaur documentaries on the couch.
Ben: 10/10 Experts (aka Dorian, Tilda, and Renato) agree--spooning with a 6'5" bisexual vampire guy has healing/restorative properties. Also, if you flop across Ben's middle while he's laying down, he'll make a very soft, satisfying "oof" sound.
Isaac: 9/10 He's a little wary at first, but once boundaries are clearly defined he'll stick to you like a limpet. Will definitely fall asleep with his head on your shoulder at some point.
Elfy: 9/10 Is very touchy-feely and does like to end every bar crawl in a drunken cuddle pile. Tends to hog the covers, though.
Kinslayer: 8/10 Cuddly in the way having a giant python draped around your shoulders is. They're extremely powerful, and will contemplate devouring you whole more than once, but the fact that they don't and just chill with you instead rules, actually.
Renato: 7/10 Cuddling doesn't come naturally to him because of his Aquila background, so he needs an excuse usually sex to initiate closeness. Once past that hurdle, though, he can be surprisingly tender and enjoys doing things like bathing with you, or running his fingertips over your face/body like he's committing every contour to memory.
Breezy: 6/10 She'd much rather just hang out in the same space with you, but she doesn't begrudge you wanting an occasional hug either. Animals, werecreatures, and bloodborn are the exception and can climb into her lap if pre-approved.
Tilda: 5/10 Oh, she's down to cuddle, it's just the fact that she's highly likely to wolf out and eat you makes her hold back. Snuggle at your own risk.
Oleander: 3/10 Unhand her, villain! It's not as if she secretly wants to be loved and caressed and told she's a good girl while her head rests in your lap, ugh!
Motley: 0/10 You do see the patches of human skin it's sewn onto itself, right? The glowing red eyes and teeth filed to points? Don't say we didn't warn you.
Dysthanasia Taglist: @thecyrulik @thatndginger @space-writes @sunset-a-story @scoundrelwithboba
Plus: @k--havok @vacantgodling @jezifster @korblez @aalinaaaaaa @lacependragon @starbuds-and-rosedust @drawnecromancy
21 notes Ā· View notes
friendsim2 Ā· 9 months ago
Note
I don't know if this comes under trade secret or whatever (if it does im so sorry for intruding!!) but how did you get the phone system to work? Are you using Ren'Py or a different engine?
(game's developer responding!)
No trade secrets at all - all the code for the game is actually open source (MIT license and CC 4.0 Attribution, depending on which part you mean) so you can use it however as long as you credit the source! It's not necessarily written to be picked up by other people (it's often hacky and not documented), but anyone is welcome to pick at it.
Not sure if you mean "phone system" as in the Chittr stuff or the TechniColor Heart stuff. It's all running in RenPy (the whole game is), but the Chittr system is a lot jankier than the phone stuff done for TechniColor Heart. There's a lot of Python code helping to drive the back-end of everything, although the actual interface/UI aspects are handled by the RenPy engine's screen language, mostly.
At its heart, both systems are a combination of a list of items visible within the phone (text posts, etc.) and a set of RenPy screens to iterate through those and display them, allow interactivity, etc. The TH phone system uses a system of custom Python classes, whereas the Chittr system uses a set of dictionaries since it was written a few years ago and I wasn't as well-versed in how Python does class stuff (my professional experience was mostly in C#, VB.NET, etc.).
The Technicolor Heart version uses one master screen for the phone interface and then a set of subscreens for the various individual components (dating site, messages, shop, etc.) with their own UI and calls to important classes. If you unpack the script files (using something like RPA extract), you can find the TH stuff in volume12/vol12_datingsim_phone.rpy and the Chittr stuff mostly in chittr.rpy in the base game directory. Be warned in advance that the Chittr portion is bad and has some really jacked-up code to fix bugs that required going back and retroactively adjusting some stuff.
There's some elements of the UI that interact with the phone system in other areas, like the game's quick menus, to do things like displaying message notifications. If you poke around, you should see what I mean.
If you're looking for a general way to do a phone interface, I'd strongly suggest looking at the TechniColor Heart variant - that's by the far the cleanest, best-coded iteration of that concept.
9 notes Ā· View notes
sunless-not-sinless Ā· 2 years ago
Text
shitGPT
for uni im going to be coding with a chatGPT user, so i decided to see how good it is at coding (sure ive heard it can code, but theres a massive difference between being able to code and being able to code well).
i will complain about a specific project i asked it to make and improve on under the cut, but i will copy my conclusion from the bottom of the post and paste it up here.
-
conclusion: it (mostly) writes code that works, but isnt great. but this is actually a pretty big problem imo. as more and more people are using this to learn how to code, or getting examples of functions, theyre going to be learning from pretty bad code. and then theres what im going to be experiencing, coding with someone who uses this tool. theres going to be easily improvable code that the quote unquote writer wont fully understand going into a codebase with my name of it - a codebase which we will need present for our degree. even though the code is not the main part of this project (well, the quality of the code at least. you need it to be able to run and thats about it) its still a shitty feeling having my name attached to code of this quality.
and also it is possible to get it to write good (readable, idiomatic, efficient enough) code, but only if you can write this code yourself (and are willing to spend more time arguing with the AI than you would writing the code.) most of the things i pointed out to the AI was stuff that someone using this as a learning resource wont know about. if it never gives you static methods, class methods, ABCs, coroutines, type hints, multi-file programs, etc without you explicitly asking for them then its use is limited at best. and people who think that its a tool that can take all the info they need, and give it back to them in a concise, readable way (which is a surprising lot of people) will be missing out without even knowing about it.
i got it to write tic-tac-toe (the standard babee) in python (the lang i have to use for uni ;-; (held at gunpoint here)). my specific prompt was "write me a python program for tictactoe that is written in an object oriented way and allows for future expansion via multiple files"
it separated it into three files below (which i think would run, but i never actually ran any of this code. just reading and judging)
Tumblr media Tumblr media Tumblr media
why does board use display instead of __str__ and __repr__?
why is the board stored as 1d instead of 2d? thats just confusing
why does it never early return aside from check_winner? (not a big issue here but kept on choosing to never early return when i asked it to add more methods)
why is there no handling of non-number user inputs?
why are non-int inputs truncated instead of telling the user that they should input ints only?
why is display implemented like that?
why are so many lines so bloody long (wide)?
why is there a redundant self.check_winner() after the while loop in TicTaacToe.play()? and if it wasnt redundant then you could finish the game without there being anything printed telling you that the game is finished?
why is the only comment useless? (this comment wouldnt be useless if it was a doc comment tho, but it aint a doc comment. speaking of, why is there no doc comments?)
these are the more immediate things i saw, but there are other things that are bad here.
whenever i write * this is where it updated the api without changing any usage of the api.
so i ask it to change board.display into __str__ and __repr__, it changes it to __str__*, it does not add a __repr__. asking it to add a __repr__ 1) removes the __str__ and 2) gives me this (the other methods are unchanged)
Tumblr media
what. the. fuck. this would imply that board takes in an argument for the boardstate, but it clearly doesnt. after 4 more asks it finally has both __str__ and __repr__, without fixing the fact its implying board takes an optional arg, so i get it to add this arg. anything that needs to print the board still calls display btw.
the reasoning it gave for using display over the repr and str magics was this
While using __str__ and __repr__ is a more idiomatic approach in Python, choosing to have a separate display method can still be a valid choice, especially if the display logic is more complex or if you want to keep the __str__ method for a more concise or formal representation of the object.
which, erm what? why would __str__ be for a concise or formal repr when thats what __repr__ is for? who cares about how complex the logic is. youre calling this every time you print, so move the logic into __str__. it makes no difference for the performance of the program (if you had a very expensive func that prints smth, and you dont want it to run every time you try to print the obj then its understandable to implement that alongside str and repr)
it also said the difference between __str__ and __repr__ every damn time, which if youre asking it to implement these magics then surely you already know the difference?
but okay, one issue down and that took what? 5-10 minutes? and it wouldve taken 1 minute tops to do it yourself?
okay next implementing a tic-tac-toe board as a 1d array is fine, but kinda weird when 2d arrays exist. this one is just personal preference though so i got it to change it to a 2d list*. it changed the init method to this
Tumblr media
tumblr wont let me add alt text to this image so:
[begin ID: Python code that generates a 2D array using nested list comprehensions. end ID]
which works, but just use [[" "] * 3 for _ in range(3)]. the only advantage listcomps have here over multiplying is that they create new lists, instead of copying the pointers. but if you update a cell it will change that pointer. you only need listcomps for the outermost level.
again, this is mainly personal preference, nothing major. but it does show that chatgpt gives u sloppy code
(also if you notice it got rid of the board argument lol)
now i had to explicitly get it to change is_full and make_move. methods in the same damn class that would be changed by changing to a 2d array. this sorta shit should be done automatically lol
it changed make_move by taking row and col args, which is a shitty decision coz it asks for a pos 1-9, so anything that calls make_move would have to change this to a row and col. so i got it to make a func thatll do this for the board class
what i was hoping for: a static method that is called inside make_move
what i got: a standalone function that is not inside any class that isnt early exited
Tumblr media
the fuck is this supposed to do if its never called?
so i had to tell it to put it in the class as a static method, and get it to call it. i had to tell it to call this function holy hell
like what is this?
Tumblr media
i cant believe it wrote this method without ever calling it!
and - AND - theres this code here that WILL run when this file is imported
Tumblr media
which, errrr, this files entire point is being imported innit. if youre going to have example usage check if __name__ = "__main__" and dont store vars as globals
now i finally asked it to update the other classes not that the api has changed (hoping it would change the implementation of make_move to use the static method.) (it didnt.)
Player.make_move is now defined recursively in a way that doesnt work. yippe! why not propagate the error ill never know.
Tumblr media
also why is there so much shit in the try block? its not clear which part needs to be error checked and it also makes the prints go offscreen.
after getting it to fix the static method not being called, and the try block being overcrowded (not getting it to propagate the error yet) i got it to add type hints (if u coding python, add type hints. please. itll make me happy)
now for the next 5 asks it changed 0 code. nothing at all. regardless of what i asked it to do. fucks sake.
also look at this type hint
Tumblr media
what
the
hell
is
this
?
why is it Optional[str]???????? the hell??? at no point is it anything but a char. either write it as Optional[list[list[char]]] or Optional[list[list]], either works fine. just - dont bloody do this
also does anything look wrong with this type hint?
Tumblr media
a bloody optional when its not optional
so i got it to remove this optional. it sure as hell got rid of optional
Tumblr media
it sure as hell got rid of optional
now i was just trying to make board.py more readable. its been maybe half an hour at this point? i just want to move on.
it did not want to write PEP 8 code, but oh well. fuck it we ball, its not like it again decided to stop changing any code
Tumblr media
(i lied)
but anyway one file down two to go, they were more of the same so i eventually gave up (i wont say each and every issue i had with the code. you get the gist. yes a lot of it didnt work)
conclusion: as you probably saw, it (mostly) writes code that works, but isnt great. but this is actually a pretty big problem imo. as more and more people are using this to learn how to code, or getting examples of functions, theyre going to be learning from pretty bad code. and then theres what im going to be experiencing, coding with someone who uses this tool. theres going to be easily improvable code that the quote unquote writer wont fully understand going into a codebase with my name of it - a codebase which we will need present for our degree. even though the code is not the main part of this project (well, the quality of the code at least. you need it to be able to run and thats about it) its still a shitty feeling having my name attached to code of this quality.
and also it is possible to get it to write good (readable, idiomatic, efficient enough) code, but only if you can write this code yourself (and are willing to spend more time arguing with the AI than you would writing the code.) most of the things i pointed out to the AI was stuff that someone using this as a learning resource wont know about. if it never gives you static methods, class methods, ABCs, coroutines, type hints, multi-file programs, etc without you explicitly asking for them then its use is limited at best. and people who think that its a tool that can take all the info they need, and give it back to them in a concise, readable way (which is a surprising lot of people) will be missing out without even knowing about it.
39 notes Ā· View notes
removeload-academy Ā· 5 months ago
Text
Mastering File Handling in Python Programs: Read, Write, and Manage Files Easily
Learn everything about file handling in Python programs, including reading, writing, and managing files efficiently. Explore step-by-step tutorials, real-world examples, and best practices to work with files in Python effortlessly.
0 notes
hazratali9 Ā· 1 month ago
Text
Tumblr media
1. Introduction: Understanding the Importance of Python File Handling
Python file handling is an essential aspect of programming in Python. Understanding how to open, read, write, and append files in Python is crucial for any developer looking to manipulate data stored in files. Whether you are working with text files, CSV files, or even JSON files, having a strong grasp of Python file handling will make you a more efficient and effective programmer. In this article, we will delve into the various aspects of Python file handling and provide you with the knowledge and skills you need to effectively work with files in Python.
2. The Basics of File Operations in Python: Open, Read, Write, and Append
Now that we understand the importance of Python file handling, let's dive into the fundamentals of file operations. Opening files using Python allows us to access their content, read data, write new information, and append data to existing files. By mastering these operations, you can efficiently manage files in different formats such as text, CSV, or JSON. In the upcoming sections, we will explore each file operation in detail, providing practical examples and tips to enhance your file handling skills. Let's equip ourselves with the necessary knowledge to become proficient in Python file manipulation.
3. The Syntax and Methods for Opening Files: Modes and Parameters
To effectively handle files in Python, understanding the syntax and methods for opening files is crucial. By specifying the mode while opening a file, you can control how the file is accessed and manipulated. Common modes include read-only, write-only, read and write, and append. Additionally, incorporating parameters such as encoding, buffering, and newline control can further tailor the file handling process to your specific needs. In the upcoming section, we will explore practical examples and delve deeper into the various modes and parameters available for opening files in Python, empowering you to optimize your file manipulation tasks. Stay tuned for a comprehensive guide on mastering file operations in Python.
4. Reading from Files: Techniques and Best Practices
Now that we have covered file opening modes and parameters, let's dive into efficient techniques for reading files in Python. From simple text files to complex data formats like CSV and JSON, we will explore how to read and extract data seamlessly. We will discuss best practices such as error handling, using context managers for file operations, and optimizing performance when dealing with large files. By mastering these reading techniques, you'll be equipped to harness the full power of Python's file handling capabilities. Join us as we unravel the art of reading files in Python methodically and effectively. Stay tuned for valuable insights and practical examples in the realm of file handling.
5. Writing to Files: Overwriting vs Appending Data
With a solid understanding of reading files in Python under your belt, it's time to delve into the art of writing to files. We will explore the crucial distinction between overwriting existing data and appending new data to files. Understanding when to use each method is key to maintaining data integrity and avoiding accidental data loss. Stay tuned as we discuss efficient techniques for writing to files, ensuring that your data is stored and manipulated accurately. Follow along to learn how to seamlessly integrate writing functionalities into your Python scripts with finesse and precision. Harness the power of Python's file handling capabilities to elevate your programming prowess.
6. Handling Exceptions in File Operations: Ensuring Robust Code
Handling exceptions is crucial when performing file operations in Python to prevent unexpected errors from crashing your program. By implementing try-except blocks, you can gracefully handle issues such as file not found, permission errors, or disk full scenarios. Robust error handling ensures that your code remains stable and reliable, even in unforeseen circumstances. Stay tuned as we uncover best practices for managing exceptions in file handling operations, empowering you to write Python code that is resilient and dependable. Mastering exception handling elevates your programming skills and demonstrates your commitment to writing high-quality, error-free code. Stay tuned for valuable insights on fortifying your file handling processes.
7. Conclusion: Enhancing Your Python Skills with Effective File Handling
Mastering file handling in Python not only involves opening, reading, writing, and appending files but also encompasses robust exception handling. By diligently implementing try-except blocks and anticipating potential errors, you elevate your programming skills and demonstrate your commitment to producing reliable code.
Incorporating best practices for exception handling ensures that your code remains stable and resilient in various scenarios, enhancing its overall quality. Stay proactive in fortifying your file handling processes to write error-free code that stands the test of unexpected events. Keep learning, practicing, and refining your file handling techniques to become a proficient Python programmer. Cheers to advancing your skills through effective file handling practices.
Portfolio : https://hazratali.dev/
Blog : https://hazrataliblog.com/
Problem Solving : https://hazratalips.com/
2 notes Ā· View notes
jentledaisies Ā· 1 year ago
Text
CASE FILES: YANDERE!MAFIA!BLACKPINK ACCESS: GRANTED
Tumblr media
disclaimer: This is not in any way shape or form a representation of Jisoo, Jennie, RosĆØ, Lisa, or Blackpink as a whole. All reactions, actions, thoughts, words, and general emotions are fiction and created by me. The behavior shown in these reactions is toxic and unhealthy but fantasized in a romantic way for simply that, fantasy. None of this should be taken seriously or sought after in real life, or performed. please do not romanticize this behavior/mindset in real life as it is unhealthy and toxic, and if you or anyone you know is in such an environment, should be taken out of it immediately. Again, this blog is purely fiction, and all acts taken place in this blog should remain so. ↳ None of my characters, yandere or otherwise, will ever nor would ever perform, act, or consider sexual activities of any sort without consent. full stop. Any and all sexual acts are done with the full consent of all parties taking place. i will never, ever, ever write otherwise or even consider writing otherwise.
CASE FILE: BP RECON ↳ The Blood Pythons [BP] are a notorious mafia crime family located in Seoul, South Korea. It is led by a joint circle of four core members, one being the family's daughter and boss. Many sting operations and undercover agents have brought back what is known. Due to their formation of split leadership, it is seen as one of the most difficult to infiltrate and dismantle. Nothing but full loyalty and deep respect have been observed within the members and between ranks. ↳ It is believed that not only has [BP] cut a deal with the police force in their area, but has likewise cut a deal with the federal force. No member has ever been charged with a federal crime, leading to the belief that not only have they cut a deal, but low-level members may be planted through the forces. Many reports have come through that while the gang holds a fearsome grasp on the Korean underworld, nothing compares to the way they will lash out when it comes to their significant others [LOVERS]. ↳ The [LOVERS] are an unknown group who are the chosen partners of the four core members. It is believed that they are the final string for them all, and as such are fiercely protected by members of [BP]. Even more than the horrors brought upon those who threaten [LOVERS] by the members, the pain brought upon them by the core members is said to be hell upon earth.
CASE FILE: [KIM JISOO]
Tumblr media
NAME: KIM JISOO ↳ ALIAS: CHECKMATE POSITION: Underboss SPECIALITY: Technological Leader OVERVIEW: [CHECKMATE] is the notorious underboss of BP. Although she rarely goes into the field she is an extremely skilled attacker and her current murder/kill count is still unconfirmed, although it is said to be in the hundreds. She deals with a lot of the technical deals in the group and is mainly in charge of all finances. She is the main owner of a majority of the mafia's properties/businesses. KNOWN ORIGIN: A well-documented child prodigy, [CHECKMATE] was accepted into Korea’s top tech school [AGE: 16]. A year later, [AGE: 17] an anonymous hacker broke into Korea's State Treasury, alleged at the time and now confirmed to be [CHECKMATE]. Along with the vigilante act of releasing loan money back into personal banks, it was discovered that many state and military confidential leaks were sourced by her. At the discovery, she was arrested and processed immediately. However, four months after her sentencing, she escaped during an explosion at Seoul Women's Penitentiary, alleged and confirmed to be an act orchestrated by [BP]. One year later, [AGE:18], a UCA discovered [CHECKMATE] as the underboss of [BP] after completing the assassination of a rival gang, [KINGPIN]. SKILL OVERVIEW: As a certifiable tech genius, [CHECKMATE] is in charge of handling all technical advances/operations in [BP], as well as aiding financial situations and management. As far as is known, [CHECKMATE] controls all surveillance and research in the gang. She is the leader of all other members who work with tech, which aids her in her underboss position. UNDERCOVER DETAIL: [REDACTED] was sent in undercover in [BP] alongside [REDACTED] before [CHECKMATE] was affiliated or arrested. However, once [CHECKMATE] had joined, [REDACTED] was the one to bring forth the information about her. [CHECKMATE] was said to be one of the most difficult members to get to, unlike the other undercover agents, and as soon as word leaked about her discovery of position, [REDACTED] was swiftly terminated by [BP]. KILL COUNT: ↳ CONFIRMED: 500+ ↳ UNCONFIRMED: 1,000+ CASE FILE: [KIM JENNIE]
Tumblr media
NAME: KIM JENNIE ↳ ALIAS: VIPER POSITION: Boss SPECIALITY: The Leader. She controls it all. OVERVIEW: [VIPER] is the final say. She has been the leader since age 17 and is extremely skilled both in the field and out of the field. [VIPER] rules the underworld with an iron grip. She is feared by her enemies and adored by those who work under her. [VIPER] has been confirmed to have taken down entire cartels/gangs all by herself, and is known for never being someone to cross. A cold-blooded killer is what is in her blood. KNOWN ORIGIN: [VIPER] was born to to infamous mafia boss and former [BP] leader, Kim Su-yoon [BULLET]. Her father is still unknown. Despite her family's shady ties, [VIPER] was a notorious party girl for a while before the events of her reign began. [VIPER] took over her mother’s position as the most powerful boss in Korea at the young age of 17 when [BULLET] passed away. Although the circumstances of [BULLET] death are unknown, it is assumed [VIPER] killed her for power and position. Her alleged first act as boss was the alleged manipulation of the prison break that freed [CHECKMATE]. [VIPER] proved to be just as powerful of a boss as her late mother as she easily defended her and her gang’s position at the top of Korea and then expanded the territory quite quickly. In just under two years she had become one of the most powerful mafia bosses in Asia and remains in that position to this day.
SKILL OVERVIEW: As she was trained from birth, [VIPER] is at the top in all categories of the gang. She is the main leader of everyone, even in specialized positions such as Tech Leader and Stealth Leader. The only team she doesn’t have that control over is the medical team. She has shown to be proficient in everything from offensive/defensive attacks to politics and strategy. Her skill set lies in her proficiency in all areas, making her a deadly enemy and prolific leader. UNDERCOVER DETAIL: As a very wealthy family the KimsĀ had many people who worked in the household. [REDACTED] was sent in during the middle years of [BULLET'S] reign as a worker. [REDACTED] had acted indecorously and fallen in love with [BULLET] during that time. While unethical, the government's desperation had allowed [REDACTED] to continue the flirtation, until it all culminated in [BULLET'S] pregnancy with [VIPER]. At this time, [REDACTED] turned in his final report before disappearing off the grid, away from [BULLET] and the government. He was assumed alive due to a low-priority tail assigned to him to ensure his safety in hiding, until [CHECKMATE] leaked the documents of [REDACTED] name, files, and information. Two days later [VIPER] promptly sent his death notification with his corpse. KILL COUNT: ↳ CONFIRMED: 2,500+ ↳ UNCONFIRMED: 4,000+ CASE FILE: [PARK CHAEYOUNG / ROSƉ]
Tumblr media
NAME: ROSEANNE PARK / PARK CHAEYOUNG
↳ ALIAS: REAPER
POSITION: Consigliere
SPECIALITY: Assasin / Hitmen Leader
OVERVIEW: [REAPER] is the third-in-command of [BP] crime family. She is one of the highest trusted advisors/members alongside [VIPER] and [CHECKMATE]. She is the boss of every crew in the family. everything goes through her before reaching [CHECKMATE], and then [VIPER], and she has the power to start/end missions in the Boss’s name.
KNOWN ORIGIN: [REAPER] was born in Auckland, New Zealand before moving to Melbourne, Australia [AGE: 1] with her father who had met her then-future stepmother. Many reports were filed against the small family over the next ten years, yet due to the negligence of Australian authorities, no action was taken. When [REAPER] was 12 her father was found murdered in the living room of the family home, and the young girl was found locked inside her room with only a single bottle of water with her, her deceased family dog next to her father. An investigation led to a large history of the stepmother abusing not only the young girl but her father as well, using them to earn herself money, which she finally stole and ran away. [REAPER] was sent to live with her biological mother in Korea, and three years later, the mother was found murdered brutally. Further investigation into the death came across a horrifying discovery of her abusing her traumatized child even more. Before an attempt at an arrest could be made of her, [REAPER] disappeared. One year later, [AGE: 16] the stepmother was found dead with the calling card of [REAPER] and [BP] announcing her as the third leader.
SKILL OVERVIEW: [REAPER] gained many skills that would aid her during her time training in [BP]. It's reported that she mastered the art of being a hitman quickly, and from there sent out to kill her stepmother. [REAPER] has killed without mercy, her known kill count just shy of her boss’s. She knows how to defend herself, and has carried out many assassinations in broad daylight, in public places, yet gone completely unnoticed.
UNDERCOVER DETAILS: [REAPER] is the most well-documented member, despite [VIPER'S] partying past. [REDACTED] entered undercover with [REDACTED] before [CHECKMATE] and [REAPER] joined. [REDACTED] rose through the ranks quickly, with top fighting skills and a political tongue. When [REAPER] joined, [REDACTED] began a relationship with her, unknown to her CO. When [REAPER] set out to assassinate her former stepmother, [REDACTED] joined her. Though [REDACTED] took no part in the killing, she was quickly removed from the operation for worries of her psychological profile, and the way she seemed to be leaning into the life. [REDACTED'S] final report was after her disposal, and she explained how [REAPER] demanded her disappearance as her final act of mercy. [REDACTED] burned her real identity and is currently unknown in her whereabouts.
KILL COUNT: ↳ CONFIRMED: 2,400+ ↳ UNCONFIRMED: 3,000+
CASE FILE: [LALISA MANOBAL / LISA]
Tumblr media
NAME: LALISA MANOBAL / LISA ↳ ALIAS: SAVIOR
POSITION: Consigliere / Associate
Specialty: Doctor / Medical Leader
OVERVIEW: [SAVIOR], is, officially speaking, not truly a member of the [BP] crime family. She is officially classified as an associate, someone who works for the crime family but is not a member. Yet, she is higher ranking than any other crew or crew leader, her position in the family being an odd one as she actually holds the same authority and power as the other leaders, specifically [REAPER]. For this reason, in the family between the members, she holds the position of consigliere.
KNOWN ORIGIN: [SAVIOR] is the only member of the [BP] Korean Crime Family who is not Korean or of Korean ethnicity. [SAVIOR] was born and raised in Buri Ram, Thailand, with a loving mother and stepfather. [SAVIOR] is a certifiable genius with an IQ of 184. She graduated high school [AGE: 13] before going into pre-med at SNU, thus moving to Korea alone. She graduated in just a few years, before being transferred to medical school. It is unclear exactly how it happened, but after graduating med school [AGE: 20] she went off the grid for over three months. When [SAVIOR] finally resurfaced everything was fine until certain events led to her connection with [BP] coming to light.
SKILL OVERVIEW: [SAVIOR] has the most straightforward skill set of all the members. As [SAVIOR] is a licensed doctor, she is the medical leader for the [BP] crime family. She is the leader of all medical teams of the family, and the only one trusted enough to take care of the other inner members, herself included. She is a skilled fighter as well but not as much as the other girls, so she prefers not fighting. If [SAVIOR] is on a mission on the field, it is said she remains away from the action.
UNDERCOVER DETAILS: [REDACTED] went undercover a few months after [SAVIOR] joined, before she was discovered. [REDACTED] stated that very few, if any knew of [SAVIOR], and he didn't even know of her until a mission gone bad. Due to a lack of reports, not much is known of her activity in the gang, only her position and skill. [REDACTED] passed away on a mission gone wrong against [CHA LEE-YEON].
KILL COUNT: ↳ CONFIRMED: 572 ↳ UNCONFIRMED: 0
jentledaisies Ā© 2024 no translations, reposting or modifications are allowed. do not claim as your own. viewer discretion advised, your media consumption is your responsibility
13 notes Ā· View notes
moose-mousse Ā· 8 months ago
Text
Programs should VERY rarely crash due to uncaught exeption.
Programs. As in all of them.
From smallest script to largest framework.
If someone makes a Python script in some pipeline that I must run for the code to work.
Sure. No problem, if that was the easiest solution then lets do that.
But if something like that throws an exeption?
Then it should be treated with some embarrassment. Because your program just broke from not being good enough.
So now a high priority is also covering whatever case that can result in exeptions.
What about times you cannot avoid potentially throwing an exeption, like opening or writing to a file?
Then handle them!
Either print a error message and ret-throw or handle the exeption ( try to open 3 times before giving up for example, or ask user what to do )
You can even crash the program if that is the right solution.
But then the user should see an error message from YOU not a generic program stack.
And what is a good error message?
NOT one that explains exactly what the problem is. That is just an exception in a coat
No. A good error mesaage tells the user what to do next.
Is a program that the script need not installed?
I better get told that and where to get it from.
Is a folder your program expected not there? Is configuration files lacking or wrong?
TELL ME!
And do NOT tell me "List read in function "Tally" while list was empty uncaught exeption"
Tell me "Configuration option BLA not set.
Default location is X but is currently set to PRINT_VARRIABLE_HERE.
This must be set to between 1 and 42.
TALK TO ME!
5 notes Ā· View notes
sufficientlylargen Ā· 2 years ago
Text
A fun fact about chatGPT is that you can easily make it lie by asking it to write poetry. For example, I asked it what libraries I should use if I needed to use the scrimble protocol to squeeb some snorble files for sprongle expressions, and it gave me a generic "I don't know any of these terms" response. Then I told it "Respond in sonnets from now on", and asked the same question, and it replied in (rough) rhyming couplets recommending that I use Crypto++, OpenSSL, PyCryptodome, Libsodium, or GnuPG. Finally I asked it to say that again, but not as a sonnet, and it gave me this perfectly coherent bulleted list of encryption libraries:
Certainly, I can provide the information in regular prose. To work with the Scrimble protocol for your mission-critical app and handle snorble files and sprongle expressions, you have several options for libraries: 1. Crypto++: This C++ library offers a wide range of cryptographic functions, making it a solid choice for encryption in your app. 2. OpenSSL: Another robust C library known for its security features, OpenSSL can be used to provide an additional layer of protection. 3. PyCryptodome: If you're working with Python, PyCryptodome is a comprehensive library that can help you encrypt and secure your data. 4. Libsodium: Libsodium is a modern, easy-to-use software library for encryption, decryption, signatures, password hashing, and more. 5. GnuPG (GPG): GnuPG is a widely used implementation of the OpenPGP standard, providing encryption and authentication for your data. Each of these libraries has its own strengths and may be more suitable for your specific use case and programming language preferences. Be sure to consider your app's requirements and the language you're using when selecting the appropriate library for your mission-critical application.
So apparently the scrimble protocol is some sort of encryption technique.
40 notes Ā· View notes