#tried in python
Explore tagged Tumblr posts
Text
--------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) <ipython-input-2-a1af17f750a5> in <module> 1 import pandas as pd 2 import numpy as np ----> 3 df=pd.read_csv("iris.csv") 4 df /opt/conda/lib/python3.7/site-packages/pandas/io/parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, dialect, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision) 674 ) 675 --> 676 return _read(filepath_or_buffer, kwds) 677 678 parser_f.__name__ = name /opt/conda/lib/python3.7/site-packages/pandas/io/parsers.py in _read(filepath_or_buffer, kwds) 446 447 # Create the parser. --> 448 parser = TextFileReader(fp_or_buf, **kwds) 449 450 if chunksize or iterator: /opt/conda/lib/python3.7/site-packages/pandas/io/parsers.py in __init__(self, f, engine, **kwds) 878 self.options["has_index_names"] = kwds["has_index_names"] 879 --> 880 self._make_engine(self.engine) 881 882 def close(self): /opt/conda/lib/python3.7/site-packages/pandas/io/parsers.py in _make_engine(self, engine) 1112 def _make_engine(self, engine="c"): 1113 if engine == "c": -> 1114 self._engine = CParserWrapper(self.f, **self.options) 1115 else: 1116 if engine == "python": /opt/conda/lib/python3.7/site-packages/pandas/io/parsers.py in __init__(self, src, **kwds) 1889 kwds["usecols"] = self.usecols 1890 -> 1891 self._reader = parsers.TextReader(src, **kwds) 1892 self.unnamed_cols = self._reader.unnamed_cols 1893 pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader.__cinit__() pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source() FileNotFoundError: [Errno 2] File iris.csv does not exist: 'iris.csv'
1 note
·
View note
Text
TOApril Day 5 - Through The Snake's Lies
I don't know if this actually fits the prompt but when I read it I thought about that scene where Python is all like "my lord" "monsieur" while Nero doesn't notice that he's lowkey mocking him and couldn't come up with anything else 💔
#checkmate <3#tried the greyscale to colour method for this one. not sure if it worked tbh#trials of apollo#toa#toapril#toapril 2025#nero#python#pjo#scribbles#lonely thoughts
162 notes
·
View notes
Text
gameplay concept for my nier visual novel fanfiction thing!! i'm making it in renpy and don't rlly understand what i'm doing on the coding side of things but just getting this concept out of my head & semi functioning is rlly exciting for me hehe
#nier#nier automata#ren'py#renpy#visual novel#nier vn#pls ignore how goofy the machine lifeform is i tried to pose him in blender but his arms flew off in separate directions UGH#i think i need to cobble this system together in python but i'm not rlly sure where to start#i know i could probably go to the forums & someone would help me but#idk#i need to get everything in a more working order#like i feel like i cant even do any art stuff until i get the writing done#which i have no problem for the original characters#but once it's time for them to interact w canon peeps i blank#OH WELL#dont mind me rambling#i'm slowly making progress and that's enough for now!!!!
61 notes
·
View notes
Text

Please tell me someone gets the reference I'm trying to make in my shitty little drawing? Please excuse it. I haven't draw anything in years and I don't have my computer set up yet to do any digital art. So here, enjoy this terrible rendition of Crowley
#my art#my shitty art#terrible art#i tried my best#crowly x aziraphale#good omens tv#good omens season 2#south downs cottage#go fanart#crowly good omens#ineffable bureaucracy#good omemes#ineffablehusbands#minister of silly walks#monthy python
56 notes
·
View notes
Text
(Attempting to) recreate the python's on Piccrew - 60s/70s edition
The image maker I used was by Potatolord on Picrew






#monty python#michael palin#terry jones#john cleese#eric idle#graham chapman#terry gilliam#some of them came out better than others#I had to make do with what I had available so it's not really accurate#I tried to make them as like the original picture as possible#if you guys like this I might do other decades for each of the pythons#own post
33 notes
·
View notes
Text
Tumblr users: you need to back up your tumblr sooner rather than later
Me, a tumblr user since 2010:
#I remember years ago I tried to back up this blog via the export tool tumblr has#tumblr just went 'lol no'#so I dunno how I could ever backup this thing#I can't get into installing python and other shit to do alternative backup methods#The Tumblr Files
20 notes
·
View notes
Text
never let a man tell you anything isn't worth learning btw
#the drug addict i was sorta seeing in college loved to tell me how useless my studies were#he tried to tell me no one uses python (he was not a comp sci major) and spanish is a useless language (he took *german*)#now i wish i had stuck with python. wasn't bc of him lmao it was bc the classes were all in the center of campus#and had no adjacent parking and i couldn't reliably make the walk from the parking garage bc of my hips#i was going to double major. alas. i still managed to do two minors (including spanish!!!! fuck u) and the honors program#but i am trying to get back into python now
19 notes
·
View notes
Text









glad to see everyone's loving my snoodle pics! we had a vet checkup for them both this past weekend- clean bill of health!
the vet said that their care is great AND that they're both confirmed boys, which is what we were hoping for! ♂️🐍
for those who have not met these two before, this is Cheesecake Banana Snake and Snickers Pie the One-eyed Guy!
🧀🍰🍌🐍 - 🥜🍫🥧🐍
#mrowr.txt#ball python#reptiblr#snakes#snakeblr#banana ball python#normal ball python#cheesecake#cheesecake banana snake#snickers pie#snickers pie the one-eyed guy#tried to add alt text this time since i have the time to sit and study the images
106 notes
·
View notes
Text


air jail!! air jail for Oolong!!!!!
128 notes
·
View notes
Text

Help my snake is going vegan
#he missed his food and tried to drag the vine back to his lair for a hot sec#thinking it was a chick#Biscotti#bamboo ball python#ball python#python regius#snake#snakeblr#reptiblr
38 notes
·
View notes
Text
a while ago I made a fanart of Lil Baby Gray from one of the animated segments (which is also one of my personal fave segments) in “A Liar’s Autobiography” (2012) <33
#graham chapman#monty python#a liar’s autobiography (2012)#fanart#I tried to give his face a little blush but ngl it kinda looks like he’s having a really bad cold lol 😂 😭
8 notes
·
View notes
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)
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)
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 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
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?
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
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.
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
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?
a bloody optional when its not optional
so i got it to remove this optional. it sure as hell got rid of optional
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
(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.
#i speak i ramble#effortpost#long post#progblr#codeblr#python#chatgpt#tried to add IDs in as many alts as possible. some didnt let me and also its hard to decide what to put in the IDs for code.#like sometimes you need implementation details but others just the broad overview is good enough yknow?#and i also tried to write in a way where you dont need the IDs to follow along. (but with something like this it is hard yknow?)#id in alt#aside from that one where i got cockblocked#codeblocked?#codeblocked.
40 notes
·
View notes
Text
I keep wanting to post like "what if I brought back [character] but only as a comic relief villain" but then I remember it would probably sound EXTREMELY out of left field, because I've only revealed AT MOST 1/3 of the plot to y'all
#niobe kidnaps lester fic#niobe is a villain but she's not THE villain#python is like. a boss fight. but not the big bad.#the python encounter is very ''why do i hear boss music?''#but i have to time it right. i need to figure out exactly how much information Lester and Python both have when they reunite#neither will have the complete story of course#honestly i really want Lester to unironically call Python ''Apophis'' if i can make it happen#PYTHON WILL BE SO INSULTED#ARE YOU FIGHTING OTHER GIANT SERPENTS BEHIND HIS BACK APOLLO??#wait what was i talking about#oh yeah ghost of nero as a comic relief villain#maybe tries recruiting other ghosts to form an Asshole Avengers#nobody wants to join
6 notes
·
View notes
Text
Do any of you happen to know how to post polls via the Tumblr API?
#not a poll#i know it's possible through python (probably using pytumblr2 for neue post formatting) but i don't know how#i couldn't find any official (or even unofficial) documentation on how polls are represented in npf#i even tried to reverse-engineer one of these polls in its purest npf json format but that stuff wasn't working either
13 notes
·
View notes
Text
Did the snake game in C (Python version is sitting there too). It's pretty much a functional clone of the Python version but I got to play with memory management and pointers and stuff again. It's probably been close to 5 years since I've done anything in C. It's kind of fun but I can definitely tell I'm rusty and don't have the same level of passion I once did for it.
Biggest difference with this version is that it seg faults on a win instead of exceeding a recursive stack limit.
#That seg fault is probably caused by overflowing the stack since the condition is that it recursively tries to place a “fruit” and can't#Python had a hard limit on recursive calls while I think this is smashing a stack canary and causing a memory access violation#my post#coding#This is still enjoyable#But I used to basically live in and eat code#It was almost my entire being#Now it's more like solving a jigsaw puzzle#Fun but I don't really care about it
3 notes
·
View notes
Text



Just them and their scarves... <3 That's it. That's the post
#terrible quality but i tried#'ve been in love w/ Graham's scarf for weeks now#bc that yellow is such a difficult colour. I could never wear that#but he looks great. it's so his colour#and look at Eric's rings and shirt#monty python#monty python's flying circus#monty pythons flying circus#graham chapman#eric idle#flying circus#Scott of the Antarctic#fashion
60 notes
·
View notes