Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "python3"
-
Someone on the IP 127.0.0.1 has been creating a lot of bugs in my code, please beware of you notice any connections from that address.15
-
Don't know if it's up here, found it on r/ProgrammerHumor and thought it deserved to be shared :)28
-
Customer at a first meeting:
- "Didn't realize you're a developer, you're almost good looking!"
Never got a more bittersweet compliment.20 -
I accidentally created a bug that became an amazing feature at my last job.
It was for a program to read barcode tickets (we created software and web solutions for events), and to register the barcode sacnners to the computer I had to do some magic with USB-detection since it was not specified which brand the scanners would be (so no SDK would be available).
When the scanner was plugged in it would create its own thread so it wouldn't interfere with the UI of the program when it was reading/sending data.
Somehow I messed up with the thread termination for new scanners so it would accept to connect more than one scanner and it would work flawless since it was its own thread in the program.
When I tried to think out a solution for multiple scanners when planning it I got a headache and thought that's something for later. Turned out alright in the end apparently.8 -
When you've been getting lots of comments on your pull request and have to keep asking for approval.7
-
"It must work in IE6, we still use it in our offices."
While developing a JavaScript web app for a bank with 10 000+ employees. In 2014.8 -
Coolest project: I once worked for a customer who hosted an exhibition for a few thousand visitors in a big event arena in Stockholm.
They didn't want to use the existing ticket reading system on the arena so I had to build my own application compatible with barcode scanners (they said this about one week before the event).
It wasn't a complicated application to dev but with the tight deadline and no time to actually stress test it, it was the coolest thing to see hundreds of people streaming through the ticket station flawlessly.
Day 2 of the event I built a simple web application so I could see the flow rate of read tickets while I sat in the arena pub with a beer.6 -
Had to wake four people up at 2 am to fix a crashing service.
10/10 would deploy to production on Friday night again.24 -
Lmao I’ve never learned how to program. I’m just winging it and have been able to fool everyone the last 10 years.
Senior engineer checking in.11 -
At introduction of new class teacher asked which _one_ of the following isn't a programming language:
- Swift
- Pseudocode
- Haskell
- HTML
Took my chance on HTML, but apperantly pseudocode is less of a programming language according to him.30 -
Was scrolling through LinkedIn and had forgotten i wasn't on devRant. Just thought:
- "Man, these rants really suck." -
”Are you planning on having kids in the near future?”
Literally (very) illegal to ask where I live. Too bad I was too young to understand the severity of him asking.
Worst place I’ve ever worked.8 -
Servers down.....
Everyone : Best day ever. 😎 Screw you guys , I'm going home.
Network Engineers : 😭😲😰2 -
After working as a developer for 4-5 years I finally took up school again.
The teacher at our first programming course insisted that we named all our variables in our locale language (swedish) and always started arrays at index 1.18 -
Best and worst customer I've had: A bank.
Great because they had so much money for projects.
Unbearable because everything needed to work in IE6.6 -
Biggest dev insecurity?
Probably http://
It’s not secure at all, never feeling very confident when browsing that protocol.5 -
So, I was out cruising in my sports car the other day. Porsche, two seater, about 400 hp.
When I stopped at a red light I was next to a man driving his family of four in his Volkswagen. I revved my car to show my power, but he seemed unfazed by my superior engine. When the light became green I floored it, he didn't have a chance of catching up, I just left him behind and laughed. He's so stupid for driving that slow car.
I can't understand why anyone would ever want to drive a Volkswagen when they are just so obviously slow?
👆This is how you sound like when you compare languages only based on how fast they are.10 -
OMFG it happened again. I'm always very explicit with recruiters that I don't take full time employment while I'm studying. This one was very understanding about it and said he found a great match for my skillset.
I just had a meeting with the CEO of this great match of a company.
- "No, we only seek people who can work full time, let's keep in touch when you've graduated".
What the fuck, way to waste everyones time.10 -
Due to the coronavirus we are currently required to develop all our web services with SOAP and sanitise all our input for at least 20 seconds.2
-
What the fuck, it says on both my LinkedIn profile and on my CV that I'm a student but I can take on part time projects, and I also told a recruiter the same thing over phone (after he found me on LinkedIn).
Today I had lunch with said recruiter. Guess who had no clue I was a student?9 -
Now, instead of shouting, I can just type "fuck"
The Fuck is a magnificent app that corrects errors in previous console commands.
inspired by a @liamosaur tweet
https://twitter.com/liamosaur/...
Some gems:
➜ apt-get install vim
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
➜ fuck
sudo apt-get install vim [enter/↑/↓/ctrl+c]
[sudo] password for nvbn:
Reading package lists... Done
...
➜ git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
➜ fuck
git push --set-upstream origin master [enter/↑/↓/ctrl+c]
Counting objects: 9, done.
...
➜ puthon
No command 'puthon' found, did you mean:
Command 'python' from package 'python-minimal' (main)
Command 'python' from package 'python3' (main)
zsh: command not found: puthon
➜ fuck
python [enter/↑/↓/ctrl+c]
Python 3.4.2 (default, Oct 8 2014, 13:08:17)
...
➜ git brnch
git: 'brnch' is not a git command. See 'git --help'.
Did you mean this?
branch
➜ fuck
git branch [enter/↑/↓/ctrl+c]
* master
➜ lein rpl
'rpl' is not a task. See 'lein help'.
Did you mean this?
repl
➜ fuck
lein repl [enter/↑/↓/ctrl+c]
nREPL server started on port 54848 on host 127.0.0.1 - nrepl://127.0.0.1:54848
REPL-y 0.3.1
...
Get fuckked at
https://github.com/nvbn/thefuck10 -
Few weeks ago I was having a few beers and messing around with a Minimax AI that could be used for different games as long as you fed it possible moves and win/loose-conditions. Could be used for like Tic Tac Toe on a 5x5 field, connect four etc.
I hadn't got it to work yet as I tried to implement alpha-beta pruning to optimize it. When I was playing against it I thought "Damn you're stupid, why would you even make that move" but still finished the game.
Before I knew it I had fucking lost. It outplayed me like 6 moves before I even knew what was happening.
And that's one of the top coolest feelings I've had as a developer, got destroyed by my own program.3 -
A Geologist and a developer are sitting next to each other on a long flight from LA to NY. The Geologist leans over to the developer and asks if he would like to play a fun game. The Developer just wants to take a nap, so he politely declines and rolls over to the window to catch a few winks. The Geologist persists and explains that the game is real easy and a lotta fun. He explains, "I ask you a question, and if you don't know the answer, you pay me $5. Then you ask me a question, and if I don't know the answer, I'll pay you $5." Again, the Developer politely declines and tries to get to sleep. The Geologist now somewhat agitated, says, "OK, if you don't know the answer you pay me $5, and if I don't know the answer, I'll pay you $50!"
This catches the Developer's attention, and he sees no end to this torment unless he plays, so he agrees to the game. The Geologist asks the first question. "What's the distance from the Earth to the moon?"
The Developer doesn't say a word, but reaches into his wallet, pulls out a five dollar bill and hands it to the Geologist.
Now, it's the developer's turn. He asks the Geologist, "What goes up a hill with three legs, and comes down on four?" The Geologist looks up at him with a puzzled look. He takes out his laptop computer and searches all of his references. He taps into the Airphone with his modem and searches the net and the Library of Congress. Frustrated, he sends e-mail to his co-workers -- all to no avail.
After about an hour, he wakes the Engineer and hands him $50. The developer politely takes the $50 and turns away to try to get back to sleep.
The Geologist is more than a little miffed, shakes the developer and asks, "Well, so what's the answer?"
Without a word, the developer reaches into his wallet, hands the Geologist $5, and turns away to get back to sleep.3 -
Told the recruiter about 4 times before my lunch interview that I was a working student (I could only take part time jobs).
Just as we sat down and got our food he asked me where I currently worked, and I gently reminded him that I was still, in fact, a student.
He had this weir look on his face as I had tried to trick him into a free lunch, as all the positions he had was for full time jobs.
Still ate the lunch and had awkward small talk the entire time.6 -
It’s actually pretty neat. I constantly suffer from impostor syndrome, so I always have keep learning to keep up the facade.5
-
This guy's calculator program in python has 20000 + lines of code
Link: https://github.com/AceLewis/...17 -
Adding a feature to 18 000 undocumented lines of code, written in PL/SQL. Oh, did I mention it was just a single function?3
-
Apparently you make more money if you use spaces than if you use tabs
https://stackoverflow.blog/2017/06/...9 -
Took me longer than I'd like to admit before I realized why my function always returned zero.
Too quick with the constructor it seemed.6 -
Good to see instagram move to python3 without an exception. Literally that was smooth. Cheers to those who think Python is not scalable. 95 million photos on daily basis. 400 daily users.
https://thenewstack.io/instagram-ma...5 -
During mockup presentation where everything is perfectly vertically aligned:
Dev: "How should the surrounding content behave if the article is longer?"
Designer: "That won't happen."3 -
So I created this really cool messaging program for my CS class in high school. Though when I say for - I mean for the students which were bored when the teacher told us how to "resize images in Word".
I used python and tkinter to create it all, and didn't even need to touch sockets. (Mostly because I didn't know how to use them back then, but also because I kept the messages in a file on the school nas.)
Anyway, the program worked and we used it every week, with me listening to suggestions and improving it each week. I even managed to create a sort of notification system.
But sadly, my teacher found out about it and shut it down.
Have you ever had a similar experience?9 -
Some back info that you need to know for this rant:
1) I am a Canadain, so I spell 'color' like: colour.
2) Americans spell 'colour' like color.
Today I was debugging a Python file that I and my team of Americans and Canadians were working on. I ran the code and got an error that one of our variables was named incorrectly. I searched the code up and down for 3+ hours looking for the issue. After taking my lunch break I came back and read the file again. Then I realized it: I had started working on one part spelling color like colour, and then an American finished the project, spelling colour like color, so there were two different variables. This really pissed me off because we could have fixed it by deciding on a language before we started the project. I fixed it quickly and now we have a new rule at the office: always use American English when naming variables.
Moral of the story: decide which language to use for variables when working on a multi-national team.10 -
CAPTCHA meaning: "Completely Automated Public Turing test to tell Computers and Humans Apart".
Proof the the CS community is bad at creating acronyms.4 -
Once worked for a guy who lectured me in front of the whole office because I didn't continued work at home after I stayed 3h unpaid overtime at the office.
I quit soon after that.3 -
Always use SELECT-query with the same conditions before you DELETE/UPDATE in a production database.1
-
Worked as a web developer on a really small agency and we always said to customers that were not designers so they need to provide us with a mockup if they want it fancy.
One customer wanted us to design a campaign site for an event and we asked for a design mockup.
"Sure, I'll send it right over!"
About 2 hours later a bike messenger knocked on our door and gave us a coaster from the merchandise. -
Porting over code to python3 from python2 be like:
(Cakechat, in this case)
Day 0 of n of python 3 compatibility work:
This should be _easy_, just use six and do magic!
Day 1 of n:
Oh, true division is default instead of integer division, so I need to replace `/` with `//` in a few places.
Day 2 of n:
Oh, map in python2 behaves differently than map in python3, one returns a list, other an iterator. Time to replace it with `list(map())` then.
Day 3 of n:
Argh, lambdas don't evaluate automatically, time to fix that too.
Day 4 of n:
Why did I bother trying to port this code in the first place? It's been so long and I DON'T EVEN KNOW WHAT IS BROKEN BECAUSE THE STUFF RUNS WHEN I BREAKPOINT AND STEP THROUGH BUT NOT WHEN I RUN IT DIRECTLY?!
Day ??? of n:
[predicted]
*gives up*
I've had enough.4 -
Favourite code editor?
Hands down, it’s actually Vim.
It’s mostly because I haven’t been able to exit it though. Actually it’s the only reason. I’m stuck. Someone please send help.9 -
the biggest lie in human history : "we will keep your information on file in our database and it may be evaluated with respect to other positions that become available in the future."3
-
I'm a DevOps engineer. It's my job to understand why this type of shit is broken, and when I finally figure it out, I get so mad at bullish players like AWS.
It's simple. Install Python3 from apt.
`apt-get update && apt-get install -y python3-dev`
I've done this thousands of times, and it just works.
Docker? Yup.
AWS AMI? Yup.
Automation? Nope.
WTF? Let's waste 2.5 hours and figure out why this morning.
In docker: `apt-cache policy python3-dev` shows us:
python3-dev:
http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
But in AWS instance, we see we're reading from "http://us-east-1.ec2.archive.ubuntu.com/... focal/main" instead!
Ah, but why does it fail? AWS is just using a mirror, right? Not quite.
When the automation script is running, it's beating AWS to the apt mirror update! My instance, running on AWS is trying to access the same archive.ubuntu.com that the Docker container tried to use. "python3-dev" was not a candidate for installation! WTF Amazon? Shouldn't that just work, even if I'm not using your mirror?
So I try again, and again, and again. It works, on average, 1 out of every 5 times. I'm assuming this means we're seeing some strange shit configuration between EC2 racks where some are configured to redirect archive.ubuntu.com to the ec2 mirror, and others are configured to block. I haven't dug this far into the issue yet, because by the time I can SSH into the machine after automation, the apt list has already received it's blessed update from EC2.
Now I have to build a graceful delay into my automation while I wait for AWS to mangle, I mean "fix up" my apt sources list to their whim.
After completely blowing my allotted time on this task, I just shipped a "sleep" statement in my code. I feel so dirty. I'm going to go brew some more coffee to be okay with my life. Then figure out a proper wait statement.7 -
Runs some python3 script in terminal
Me: This script is going to take an hour to complete.
#After 50 minutes...
Me: better copy this line...
#Presses CTRL+C instead of CTRL+SHIFT+C
Me: Wahhhhhhh7 -
Apparently the firewall at work has blocked access our git repo since there are too many consecutive requests to it.3
-
I've set up my server to only accept logins with SSH-keys, and permanently banning all IP:s that attempt login with passwords.
Now I can't stop watching the banned IP:s stacking up, it's like drugs to me.6 -
Worst job I had as a developer:
Convert all Python2.7 code the team wrote for the last 5 years to Python3 alone.9 -
I'm currently reading a course in Project Management and I have yet to find an image in the course literature with a person that doesn't suffers from a headache.1
-
After hours of debugging and trying to find a solution online I got frustrated and started working on a different module, thinking will come back to it later. Next day when I Google the errors I find a similar question in stack overflow which might have a solution. Feeling delighted I check the question but no answers. So I see the date and the user who posted it, found out it was my colleague who was also debugging the same problem.
-
I hate when idiots make assumptions without basis. My company so higher up idiots decided not to use Python. I said why they said it’s not scalable. I asked have anyone of you ever wrote micro service which can handle millions request every hours? Have you ever wrote service in Python? Have you ever worked on Python? Architect said but Python doesn’t have type support? I said there is use Python3. He said I want to validate my request payload. I told have you tried form and decorators. I told, I have 8 years experience. I worked in every language and I one has advantage over others depending on situation. Then they said, but we want only Java as finding resources is easy. I said have you checked git Python overtook Java in case resources, you are outdated. I don’t want to leave company but even after so many argument these idiots just dropping Python and because of that I am loosing so many good resources.8
-
Who the fuck at Microsoft decided to put python on their store? I don’t care if it’s on the store. What I do give many shits about is that I spent 20 minutes uninstalling and reinstalling and reconfiguring my fucking PATH because the python & python3 commands did not work but instead SENT ME TO THE FUCKING STORE PAGE FOR PYTHON 3.7
THEN I FIND OUT ITS NOT A PROBLEM WITH THE PATH MICROSOFT PURPOSELY CREATED ALIASES FOR BOTH COMMANDS SO THEY HAVE TO SEND YOU TO THE STORE PAGE WHEN YOU TYPE python OR python3 INTO THE CMD OR POWERSHELL.
I turned it off after finding that out, but I’m still furious. Fuck Windows.22 -
I once added a semicolon at the end of a line when coding in Python.
I’ve brought shame on my family.4 -
Quitting my last job. I had been there for about 3 years and had a great time there.
It was only my boss and I, we were developing software and websites for events so we were quite often out meeting and partying with people, it kinda became a part of the job. We had a fridge always stacked with beer and champagne which was for us and our friends to use. The office was located in the middle of the most exclusive business and club district in the city, so I could use the office as I wanted during evenings to meet up with friends and drinking beer.
But it was expected to work a lot of overtime. I was single and young and really liked what I was doing so I didn't mind. But then I met the love of my life and started to spend more time with her. I couldn't stay and work as often and would rather be with her on weekends.
It became quite hard to live up to my boss's expectations and it always felt like I disappointed him if I didn't (or couldn't) stay for an after work, and when I did, it felt like I disappointed my new girlfriend instead.
Ultimately I felt I had to choose one of them, or I would definitely loose her. It was a no-brainer since I knew I couldn't keep working like that forever, and didn't want to risque a relationship because of work.
It took all of my courage to do it and I felt so bad because I knew my boss (and my friend) would feel like I betrayed him, but I knew it was the right thing to do.
I can still miss it sometimes, but I don't regret it.3 -
WORST interaction with management?
Wouldn’t it be more rare to find a GOOD interaction, am I right fellas?3 -
I've always been critical of python as a development language because of it's efficiency issues and the fact that it's essentially pseudocode. However, today I had to reflect 200 coordinated over the line x=355 for a course lab and I hella didn't feel like doing it in my normal languages. Wrote it using python in less than 2 minutes. It might be a bad language for efficiency, but it's one hell of a scripting language. Sorry, python. I never fully appreciated you until now.15
-
I just had my first "Group project"-experience and holy fucking shit am I about to explode right now.
I messaged you one fucking week before the project is due and ask for your input that none of you contributed to and if that was too advanced for you imbeciles to handle then HOW THE HELL ARE YOU SUPPOSED TO SURVIVE THREE MORE FUCKING YEARS IN CS. THEN YOU HAVE THE DECENCY TO RESPOND SIX FUCKING HOURS AFTER THE PROJECT IS DUE AND COMPLAIN ABOUT THE WORK.
WELL GUESS WHAT YOU FUCKING WASTE OF MOLECULES, I ALREADY TURNED IT IN AND THE ONLY REGRET I HAVE IS PUTTING YOUR FUCKING NAMES ON THE PROJECT.
I DRAGGED YOUR SORRY ASSES TO THE FINISH LINE AND THEN YOU HAVE THE COURAGE TO ASK "WHAT TOOK YOU SO LONG"?
NEXT TIME AT LEAST HAVE THE COURTESY TO SPIT BEFORE YOU FUCK SOMEONE OVER4 -
Reviewing code in a project, found this one:
# Todo: Fix horrible parent member check. People may have been killed for better code
-- horrible code here -- -
About every project at my last job. Impossible to like any project with a boss that legitimately thinks frames and tables are a better option than learning css.
But why not, attribute styling on html-elements are the future indeed.7 -
I have started my first job as a web developer since February 1st. During the one month training period which is in progress, one of the training sessions was on Git and believe me Git is the most fascinating thing came to know me since I have joined computer science field. In love with it.2
-
These two strings walk into a bar and sit down. The bartender says, "So what'll it be?"
The first string says, "I think I'll have a beer quag fulk boorg jdk^CjfdLk jk3s d#f67howe%^U r89nvy owmc63^Dz x.xvcu"
"Please excuse my friend," the second string says, "He isn't null-terminated." -
Got an assignment in school to make an easy project in c for embedded real time processors with a free complexity level (it was really early in the course and many had never been programming before).
Since I've been working a few years in development I decided to create an own transmitter and receiver for an own protocol between processors (we had just spent a week to understand how to use existing protocols, but I made my own).
The protocol used only 1 line to communicate with half-duplex and we're self adjusting the syncing frequency during the transmission. I managed to transmit data up to 1 kbps after tweaking it a bit (the only holdback was the processors clock frequency).
Then I got the feedback from our teacher, which basically said:
"Your protocol looks like any other protocol out there. Have you considered using an UART?"
Like yeah, I see the car you built there looks like any other car out there, have you considered using a Volvo instead?1 -
The new iPhone is gonna have an odd number of pixels in width. I can already feel the anxiety of trying to achieve pixel perfection.7
-
Speaking of fragile environments, what the hell is going on with the absolute dependency on python...?
I mean, I'm as reluctant to upgrade my system's python version as libc's.
How to break at least half of your system:
1. python3 --version
Python 3.8.10
2. rm -f /usr/bin/python3
3. ln -s /usr/bin/python3.13 /usr/bin/python3
And good luck opening most of the UI utilities and some of the terminal-based ones.
wtf... While everyone's barking at systemd, python quietly crawls in and claims the system's flexibility for itself w/o any resistance.
I imagine that's one of the aspects making NixOS a resilient solution...12 -
Shoutout to all the sales people in every organisation: the thing that you are selling with so much pride, someone smarter than you is making it. Don't be an asshole to the developer.
-
!rant
Looking for advice, serious advices.
I work in C.
Also, I work in Python.
I have worked for a couple of year in C++.
I have a fair knowledge of the Data Science workflow, and some experience in Machine Learning.
I have tinkered with some other languages (Java, Ruby, Go, JS among the others, nothing serious nor professional)
I'm the kind of person who needs constant problems to face in order to keep engaged, satisfied, happy. And I need to learn new stuff, or refining my knowledge constantly, or I stagnate. I believe that this is true for quite a share of people here.
I would like to spend some spare time (I seldom have) in a project. Personal projects are rarely good enough to improve one's cv, so I thought I could partecipate in some Open Source projects.
Does anyone here have some suggestion about some interesting and satisfying OSProject, or some general suggestion on the matter?
It would be so apreciated.3 -
I'm looking for a Python mentor. I need someone I can PM for clarification so I can wrap my head around things.
Is anyone up to the challenge?15 -
What kind of sick joke is it that the url for camelCase on wikipedia is www.wikipedia.org/wiki/Camel_case2
-
!rant
I'm so happy with my full stack basic test web application made with: raspberrypi, uwsgi,nginx,python3,flask,sqlite3,render_template,html
I have 2 pages:
/users where I can see the whole users table and filter by id
/insertuser (in the image) where I can add an user to the table users4 -
My last boss insisted on using tables instead of divs and then asked me to make it responsive (every damn time). Also, functions that were over 10k of lines.4
-
Life is a constant battle of not knowing whether I want to quit programming forever, or if I just need 8 hours sleep.1
-
My final exam for Python3. I had previously failed this course, and the exam only had three questions. If I failed to answer one question I would have to take the course over, and my GPA would fall so hard that I wouldn't be able to take the course again. So I was extremely grave, and extremely anxious beyond belief.
I uploaded the two easy answers to the site.
And the last one was so baffling to me I stayed 5 minutes extra to figure it out. I nearly failed so badly.
My GPA is now 3.6 again. (😤 "Triumph" emoji)2 -
!rant
That level of satisfaction when you successfully port a Python2 Project to Python3 and implement proper backward-compatibility - without 2to3! -
I basically need a select few contributors to speed up the development process. Python3 developers, testers and researchers are all welcome6
-
The fuck is up with venv, conda, pip, pip3, python3, CRYPTOGRAPHY_OPENSSL_NO_LEGACY and "you can't install packages in docker based environments" DUDE STOP WHAT THE FUCK
How the fuck is that the scripting language of choice? It has by far the most confusing and messy runtime setup. Like it's easier to make sense of Javas version-shenanigans than this bullshit.
And then you think well what gives. Runs > python ...
"This environment is externally managed and you can go kill yourself, JUST LOOK UP PEP-666" LIKE NO YOU FUCK, JUST RUN THE FUCKING SCRIPT!
It's nice you thought about separation of versions but DOCKRR DOCKER DOCKER THERE ARE CONTAINERS WHY THE FUCK DO YOU DO SOME BULLSHIT WITH ENVS IN FOLDERS REQUIRING SOME RUNTIME BULLSHIT WHAT NO STOP WWHYYY7 -
I became good enough to be hired as a developer by reinventing lots of wheels and making mistakes. A lot of mistakes.2
-
I'm learning python3 right now, advises or exercises to practice? I want to learn machine learning. I'm developng on elixir for now. But I hear good stuff about python.6
-
So I wrote an algo in python3 for a challenge in codechef.com but it raised this exception !
If I put the input() built-in method in a try/catch , how do i know what the input was in order to pass the test case?3 -
Switched from Python 2 to Python3 a while ago. The biggest challenge for me is still remembering to use print as a function.2
-
Lmao probably the time I worked 150 hours over two weeks (had to sleep on the job) for a project. During delivery I worked 09-22 during the weekend (unpaid) while my boss was out on his boat.4
-
Worst mistake ever :
Didn't care for changing environment while pip or apt, always did sudo for no reason.
One day installed Conda and unity. Didn't realise it changed everything to python3-gi. Everything fucked up.
Tried to fix by started removing Conda removed gnome*, lost GUI.
For first time worked on tty, after a 6 hour redbull session. Got back the system working.
First thing then done is learn to install in virtual and local environments.1 -
What do you guys think about Visual Studio Code?
I personally like it, just wondering your opinions.11 -
My python brings all the devs to the cloud,
cause my code is bigger than yours
damn right its cleaner than yours
I can teach you but I have charge5 -
Guys, I have recently made a python package which is published on PyPI.
I am a very junior python lover 😍6 -
Going to release the biggest feature I have implemented for Product I work on. Change in more than 150 files and it is very very critical.
Wish me luck..3 -
I made 60 lines of modern, clean, multi threaded, optimized python3 code to deliver data from GIT to IBM ClearCase, on old Windows VM, hundreds of files (CC is file-based version control, every file has it's own change)
This calls for sauna today to definitely get rid of this dirt :)
And they said devops is all around docker nowadays :)2 -
I fucked up. I used the shebang line #!/usr/bin/env python3 in a script that was being ran every 5 minutes with a cron job. This generated an email to a system that dropped a file for processing and sent an age email for each file every minute. Because the Linux OS generated emails didn’t contain a keyword the script closed by design but I forgot to uncomment the delete temp file line. This started on Wednesday before a 4 day weekend. By the time I got in on Monday I was 40GB over my email quota and receiving 2500 emails a minute. I fixed the script and stopped the emails but down I have to clear out those emails. Here it is Wednesday and I am deleting 1 MB every 3 seconds. This is painful.1
-
About 4-5 hours ago I wanted to make simple websocket to get input from textarea and parse it on server and somehow got myself into developing in asyncio -> aiohttp -> graphql-core -> graphql-ws -> aioredis
and svelte-> typescript
I still didn’t make the stuff I wanted but I’m very close on backend at least.
I have some frontend part somewhere in my old prototypes so it will be faster if I figure out svelte.
Still don’t understand what the fuck just happened.
Maybe it’s because I wanted try those frameworks for a long time.
All ‘simple’ examples I found have around 20-30 files for backend and same amount for frontend so more then 50 files to get this shit working.
They’re called oh irony “simple chat”.
Now I see why no one fucking understands this shit.
I’m trying to cut mine to 5 files.
I thought developers are lazy bastards who don’t like write code.
But now after this they’re all looking like adhd coders.
Looks like Monday won’t be my best day.9 -
I 'm working with python 3:
Was about to make my app print a text letter by letter (same as somebody's typing the text) and read it at the same time.
I wrote a method for typing and works fine but cannot find a solution for the tts and make them run at the same time.
Can U halp me please ?
Thanks in advance 😊2 -
Do we actually know how many people there are on devRant?
Just wondering to see which percent of the community liked the top posts.9 -
I was trying to watch an instructional YouTube Python video (on my Android phone) while it was dark in my bedroom, and then I remembered that Youtube for Android doesn't have a damn dark mode... NOOOOOOOO!!! :( :(
Why did you do this to us Google!5 -
If you start coding in Python3, don't use both tabs and spaces. Just decide for one. It'll save you a good amount of time on bigger projects 😉2
-
I don't know how many hours in a row it was, but one month I put down about 340 hours of work.
My boss had taken upon this massive project with a deadline at the end of the month. I basically lived at the office (I actually spent the night there more than once), meanwhile he was out sailing.1 -
Booting up my Windows computer at work after 1 year leave. I'm gonna do a Windows Update.
I suspect I'm not going to get anything else done today.6 -
So what do you all believe the best first language is and why? I personally say Python or JavaScript because they are simple, and easy to understand8
-
I'm using Manjaro now. And I have two questions: How do I install idle3 for python3 and how the fuck do I get rid of this stupid panel?4
-
I was making coffee this morning when one of my managers walked up and asked me if I could make a cup for him too.
I was like sure, anything to make you happy. (Maybe you'll lessen the amount of work I have to do today 😀)
I finished making both the cups of coffee and the brought his over to his desk. He drank some and then almost spit it out. He complained about how the coffee was not dark roast it was medium roast, and he could tell the difference and I should have known that.
I was like "well if you're going to complain about how I make your coffee go make your fucking own". (I didn't say that out loud though, I probably would have been fired!)8 -
DO NOT, i repeat, DO NOT USE "scapy.all" in python3.
I spend hours figuring this one out. In one commit i added tests and other tests not connected to my tests started failing. I ran the tests several times and also checked the rng-states, but everything was the same as on the commit before...
There was one additional error message i decided to check out, which was the result of "import scapy.all" (that's a module that contains all the scapy-exports). I removed that import and used the right packages and suddenly: all tests passed.
Fuck this inconsistent piece of crapware that has its python2-files in the pip3-repo and gave me that hell to debug.2 -
TFW the mock class has way more code than the real one.
Testing big infrastructures can be a pain...
Or maybe my team is just not so good at it.
My time spent:
Adding new feature to the real class 15%
Extending the mock with the same feature 55%
Writing tests 30%7 -
My upwork account is banned for sending too many proposals without getting too many jobs.
Got 2 jobs out of 35-40 proposals sent.4 -
Cakechat.
Not going to deny Lukalabs' credit where it's due, it's an actually good NN chatbot. Works pretty decently even on my poor old Haswell i3.
But... the things you do, Lukalabs.
First off... PYTHON 2?!?! IN ${CURRENT_YEAR}?
Jokes aside, there's a lot of things that could've been done better, or in a more compatible way, or both. Such as:
tokenized_dialog_context = imap(get_tokens_sequence, dialog_context)
tokenized_dialog_contexts = [tokenized_dialog_context]
1. imap doesn't exist in python3, but whatever, doesn't make a big difference.
2. why wrap it in another array?
3. *two* variables, and the first one just used to create the second?
I will admit, Cakechat works well, but it's one of those things where if you try to run it on anything other than the recommended settings, it's not very fun.
Right now, I'm porting it to python3 with six, and making small refactor adjustments in random places to clean up the code.
(Official live demo at https://cakechat.replika.ai/, if you want to try it out.) -
Pursuing knowledge in python, as my first "real" programming language (does bash count? 😂) - wish me luck guys!4
-
Once I was using rsync to copy some large files from a cloud to my local machine. So right after I started it, I went out for some coffee and when I came back it was not done. And to my horror I forgot to use --progress. For people who don't know what it does is , it only shows you how much copying is done. So now after about 45 mins of copying done , I had to stop it start all over again with --progress so that I can see the progress as it completed. 🤔2
-
Google Assistant in iPhone? Seriously? In the opposite way Siri should be introduced to android phones else I would be unable to understand this business decision!6
-
Fuck UPS and their API Documentation. Has anyone here ever integrated their API ?
Their API documentation doesn't mention any sandbox or testing accounts.
If I click on their create access key button, it takes me to a form which requires a real payment method and address which seems like it's meant for real stuff not testing.4 -
Just happened 4 days ago.
I was writing a thesis and at the same time creating a tool which automates my measurements.
It was written in Python and everything worked very well.
Of course I left it to my advisor for further measurement, telling him that if he want to measure multiple times he just need to loop over the measure-function.
I left him an example-file which looked a little like this:
example.py:
"""
import measurement_class
# Parameters
if __name__ "__main__":
m_class = measurement_class.coordinator(#Parameters)
m_class.measure(#someotherparameters)
"""
So after a few weeks I came back to my advisor (four days ago) to see this:
loop_over.py:
"""
import os
for _ in range(0,100):
os.system("python3 example.py")
"""
I'm not sure how I should feel about it...2 -
Doing a physical scan of PC's in my network for anything that shouldn't be there. Find a Filezilla open for a "Roblox Generator"
Spent rest of day making a bot in Python to spam the registration with fake accounts.
Not on my network you don't!
Anybody else got stories like this? -
Python is really beginning to turn horrible now. Legacy codes...argh!! why don't developers move already to python3? and all those horrible third party dependencies for only 2 which somehow break after even some mending. God save them. Horrible night.2
-
I received devRant stickers a couple of months ago, but I forgot to post a picture. Would you guys believe me or I have to prove.4
-
My friend complain to me Python tutorial on YouTube doesn't work. He can't import any packages. I looked at it and found that he installed package into one Python version while his IDE is using another version installed in his machine.
And then I even find third one in another location...2 -
Just spent a lot of development hours today! Quite more than routine! Not even tired because had great sync with the partner dev! Cheers!
-
!rant
Started learning Python today, whats ur opinion on Jupyter? I thought it to be quite nice:)
Also, Python 2.7 or 3? Im using 2.7 right now. Is the transition from 2.7 to three all that big?7 -
The worst part about switching code from python 2 to python 3:
`map(myfunc, mylist)`, behaves differently, but won't throw an error. It will just show up as nothing.3 -
I always feel python3 and pip3 are enemy of pip and python. My Mac always is in conflict of each other... Its feels like they are trying to prove each other3
-
This happened today !
Mom : Son, there is a python sleeping at the door, I need some help.
Me : Don't worry mom, I have anaconda, type conda activate and then python run. Matter is solved.
Mom : Anaconda ?? 🙄
Meaanwhile Me : Ohh shit, I need to rest 🤣2 -
Not a single year passes that the problem of python2 vs python3, as a dependency, doesn’t bite me in the ass. Node modules frequently fail to build, awscli suddenly can’t find the python it needs because homebrew apparently hard-links to python3 in Cellar... Seriously, W T F?! Fuck you python!!!! You fucking assholes!!! Fuck you and go fucking die!!
-
We have a school project where we're supposed to develop a project for a company. In order to finish the project before our presentation I put in over 40h per week (on top of other classes). The only thing missing is the design, only placeholder buttons at the moment. Ask the designer 2 weeks in advance if he'll be able to provide me with the design: "Sure, I'll do it soon".
And now the presentation is in one day and the app looks like shit because we don't have any design for it. -
I just wasted a good half hour trying to figure out why my Python dictionary was in alphabetical order.
I’ve had issues with dictionary order before with 3.5, but that was more or less Python just wanting to put shit in the order IT wants, not alphabetical. And I haven’t had that in months, not since updating to 3.6.
Long story short, VS Code has decided to show me my dictionaries in alphabetical order when I hover over them while stepping code. If I do a print statement, it shows the dictionary in the correct order.
Seriously, you don’t need to do me any favors here.
Oh, the adventures I have with Visual Studio when Python is involved...3 -
New piece of code which should work perfectly and solve your problem but it is not working just because you forgot to remove an old piece of code you were trying to fix the same problem! Fuck my life!1
-
This popped up when I was searching for SimpleHTTPServer in pip.
`pip3 search SimpleHTTPServer` and I don't know whether its good or bad. -
Finally got around to re-aliasing `pip` to reach `pip3` on my mac. That feels so good. Why didn't I do that earlier?
-
After learning programming language, Which one earning source is the best one?
A) YouTube
B) Freelancing
C) IT Job
D) Own Business38 -
Installation instruction for a program written in Python:
> pip install MyProgram
Ok but I do not have pip, so I install it... Oops, needs Python 3 but linux has Python 2 installed by default. I try to start the program; it crashes.,...
People using Python, are you serious??????????? 👏👏😳 So it is possible to install a program written in Python only if I f*ck around with Python versions? I have both 2 and 3 installed but how the hell do I know what version is used when I run pip? I set global alias python=python3 but it did not help. RIP.8 -
WHY does VS code load up Pandas dataframes so damn slowly? It’s bad enough that it seems to take an extra few seconds to get PyQt5 going, but the dataframes are awful, even with small 50 record Parquet files.
I don’t have the attention span to sit there and wait for this without finding myself playing with my phone or surfing.
I guess for debugging and testing I should just create a column A, column B, column C dataframe on the fly and give it some 1, 2, 3 kind of values.
But, Jesus, man... This shouldn’t take 30 seconds to load a simple form. 🙄2 -
!something annoying
I've always had this in the back of my head, and off lately it's eating me alive.
Why don't we just rename python3 to python and Python to python2?
no I'm not gonna alias it in my shell. I'm talking about renaming them in all the distros.
there've been talks about renaming python3 to python and marking it as the default for quite long, but nothing has come of it yet.
I get that a lot of shit is gonna go down if this happens rn, systems breaking, migrations, panic, a lot of systems still working on python2 but we need to migrate.
we've also been hearing a lot of speculation about "Python 4", from earlier this year.
WHAT IS HAPPENING UGHHHH
pls revolution now7 -
Trying to contribute to a translation project on Crowdin, then remembering that my 14 day trial is expired.
Why does Crowdin, a platform trying to help people get translations for their projects make you pay? Couldn't they have more of like a GitHub payment model (free for basic features, pay to get more)?1 -
Looking for advice...
I'm working on a personal assistant type application, my own Jarvis.
I've been using Python3 and it's at a point I'm confident to host it on server, but it consists of no commands.
Just a server, communication and other functions.
What process would you use for commands?
As in, would you just have loads of if statements? If so, what about plugins?
I'm using Yapsy as a plugin framework, so I'd like to be able to drop plugin files and build up the command list.
This is why I haven't done commands yet...2 -
I love python, when it works.
Im really new and retarded at the language, but i managed to make a small useful program for my dad.
It works perfectly on Windows, yay.
It needs to run on a CentOS server, and for some reason, smtplib wont allow me to log into my gmail when i run it on CentOS :(
And yes, i did install all packages with pip, and i do run it with Python3, same version as i wrote it in.
I also added that nifty shebang that doesnt appear to do shet for me xD3 -
If we want to learn machine learning & artificial intelligence programming for IOS, which is the tools , languages, modules ?2
-
After trying to print colored text to the console using a portable Python 3 interpreter on Windows I came up with a "solution". I tried pretty much everything possible (I could think of): curses couldn't be loaded, ansi didn't work and installing libraries wasn't really an option, because it's not my device. Fuck portable interpreters and have fun with the "solution".
Def color_print(text, color):
text = text.replace("\n", "\\\" \\\"")
os.system ("powershell \"$host.ui.RawUi.ForegroundColor = \\\"" + color + "\\\"; echo \\\"" + test + "\\\"; $host.ui.RawUi.ForegroundColor = \\\"Gray\\\"")
It's slow, unreadable, only works for on Windows and requires powershell and is probably the worst piece of code I ever wrote, but it works 👍.2 -
So in PEP 594 of Python, some standard library modules are getting deprecated. Sorry for anyone who still uses aifc or crypt.
-
So I have my little program which originally was written with intention to be useful for academics to deal with old fuck HPLC, but they got new one so I am not sure about it usefulness anymore. Basicly it reads HPLC report and take from it table and dilution number from name.
I spend like 2 hours trying to read all numbers from string which are between two given chars. Probably I could do it easier with regular expression or not being fucking moron or use sheet of paper to figure it out. Eventually I take traditional pen and paper and solve it in 10 minutes...
How to be unproductive 101 -
Python Developers, if you are working on a python project or Library developers(python)(3rd party) please move to Python3 there's no need to get stuck on python2. it's fucking horrible when those dependencies break.
-
Python3's asyncio is awesome.
In an IoT server we used python2 socket programming with multi-threading. Recently I have changed the socket layer to python 3 asyncio and performance was far better. I am not gonna use multi-threading anymore.
What do you guys think about asyncio?1 -
How do you guys monitor programs on your servers?
For example, I have a raspberry pi zero w running raspbian (headless). On this pi, I have a bunch of discord bots and web scrapers running at the same time. My solution was to run them all from a bash file:
Python3 discordbot1.py &
Python3 discordbot2.py &
Python3 webscraper1.py &
Node webscraper2.js & etc.
Is there a better way I could be running these services? How is stuff like this usually done?7 -
The highlighted lines are a part of a flask app I'm writing in Python2(not python3 because I'm a bit too lazy to fix few dependency errors). All functions work as expected and all templates are rendered individually, and routes are all defined. check_date checks for invalid dates like 32Jan, 2018. It returns 0 if date is valid. add_data basically returns 0 if it decides to add user data into the database(db).
The problem is that line 60 renders but lines 54,57 don't. Any ideas as to what might be going wrong.?
PS: I'm building this app for learning and not for a production environment...1 -
In the last days, my developer was working with different kinds of databases.
He uses a database, named TimeScale DB (Timescale). This is the plugin of a famous SQL database PostgreSQL.
He imports the same data in PostgreSQL and timescale DB.
Size in Timescale DB is = 24KB
Size in Simple PostgreSQL = 166MB
This is the record of 1000000 rows, 12 columns.
Data fetching is the same on both databases, But if we fetch time-based data, (e.g 2 days, 24 hours, From Date to Date) we have a 50% to 200% difference depending on the query. python3 & elixir is also working fine with DB.
Results are also nearly the same with InfluxDB.
For a specific use-case, we have software that is handling Simple and time-series data at the same time. If anyone wants to suggest something new, Also tell us. -
In python, is there a way to make this work?
----------
# list of people
people = ["Nick", "Sue", "Bob"]
# class instance
Bob.pockets = ["gum", "paperclip", "coins"]
# convert string to prefix of a class instance
Print(people[2].pockets())
----------
This is the simplest way to show what I'm needing to figure out.
I need to convert a string into the prefix of a class instance.
I'm having trouble figuring it out.7 -
I just spent 6 hours trying to get JupyterHub working with Real-time collaboration.
Time. Fucking. Wasted.
Outdated or non-existent documentation. Weird conventions. Everything is just annoying.
Is it really just hard to push a complete product to production instead of an half-ass untested mess?1 -
Based on previous experience, I am planning to write a devbox script as and when I installed required softwares. I will mostly be working in Python and fedora already seems to have virtual envs and python3 built-in. Anyway can you guys suggest existing scripts for reference
-
can you please help me with this.
I'm creating dataset of [Leet words][1].
This code is for generating [Leet words][1]. it is working fine with less number of strings but I've nearly 3,800+ strings and my pc is not capable to do so. I've Tried to run this on cloud(30gb RAM) not worked for me. but I think possible solution is to convert this code into numpy but I don't know how. if you know any other efficient way to do this it will be helpful.
Thanks!
from itertools import product
import pandas as pd
REPLACE = {'a': '@', 'i': '*', 'o': '*', 'u': '*', 'v': '*',
'l': '1', 'e': '*', 's': '$', 't': '7'}
def Leet2Combos(word):
possibles = []
for l in word.lower():
ll = REPLACE.get(l, l)
possibles.append( (l,) if ll == l else (l, ll) )
return [ ''.join(t) for t in product(*possibles) ]
s="""india
love
USA"""
words = s.split('\n')
print(words)
lst=[]
# ['india', 'love', 'USA']
for word in words:
lst.append(Leet2Combos(word))
k = pd.DataFrame(lst)
k.head()3 -
Are there any good SAML 2.0 libraries out there for Node.js or Python?
Background: I'm working with SAML 2.0 SSO through ADFS at my current job. Our application server is a Java/Tomcat/Spring beast that I'm becoming more familiar with, and disliking more each time I toy with it. I'd like to move to something I and my team are more familiar with, and can better maintain/update/enhance.
So far I've tried (for Node.js) passport-saml and samlify, but neither have great documentation. I've also used python3-saml and it worked well. We're mainly a JavaScript shop, at least in my department, so Node.js would be preferable.3 -
I've been stuck with bootstrap in the last projects at work but I wish to break free. Been looking a bit on material design. What other UI frameworks do you guys use?7
-
Sooo. My team and I have module we're supposed to be porting to async code and aiohttp will not work. The server keeps rejecting the byte payload, but if we use synch code like the requests library, it works fine. The code is like identical, the only difference is async. It's been really frustrating because another drop in async version of requests (httpx) works just fine! I don't want to use httpx, the rest of our codebase is already using aiohttp! We think the problem is with gzip encoding being handled incorrectly by aiohttp. I've reported the issue.1
-
Another reason why google sucks! Earth Engine Python Api deprecated.
This has been my day:
"ee.mapclient: python3 do not support cStringIO"
On the sample code instructions it says to use ee.mapclient. As I google for answers I find this problem is labeled as #won'tfix without any workaround.
Fml. There goes research. -
After python should i learn java, like, is it worth it????? or should i directly go into the c family????12
-
Hey guys!
Once again, I got a little stumped when writing one thingmajig in Python.
I am normally not a programmer (Work as sysadmin), so I don't really know all the fancy abstract ways things are done "properly", which is why I need to ask here:
I have a program, separated into parts. The "core" is a part that sets commandline argument structure (using the argparse library), loads master configuration file, sets up the main logging facility, and then proceeds to load "plugins" - python files with one or more classes that implement one specific abstract class that forces them to implement a common interface of init, run, cleanup functions.
The core then proceeds to initialize those classes, run the "run" function, and run the "cleanup" function.
If the plugin class throws a Warning, it is only logged and runtime continues. If it is anything else, the program logs it and stops.
Now, the issue is, sometimes, a user may want to continue even if a non-warning occurs.
Lets say that I am creating a user, and the user already exists. Sometimes, the program user might want to continue with further plugin execution. And what I was told was to implement specific commandline switches that force continuation of runtime despite the plugin failing.
How should I implement it? The most obvious thing is to add a specific switch for every plugin, but that is exactly what I am trying to evade. I want to have the core as abstract as possible.
Other solution I thought of is to have a file of some sort that would list extra switches to implement, then it would be up to the class to implement if it uses the switch or not (I pretty much pass the entire Namespace received from parse_args() function), but this also feels kinda hackish.
I thought about having some sort of function that the plugin could call in the core to add a new argument, but at the point that plugins start loading, the argument parser is already compiled and cannot be changed further.
Any other ideas of how to re-implement the program are also welcome! I may not do it this times, but I'd at least learn something new again.3 -
Design question for y'all
Context: python lambda
Better to make classes for dictionary objects holding strings between methods
Throw strings around separately
Throw the dictionary around6 -
why google???? I mean how hard for them to update a reference document. The reference of gmail api for python2 and python2 is in EOL. The first error I found for python3 is reported in 2015 on GitHub and now is 2019. I mean, seriously the bigB_Company don't have time to update their document. I scratched my head for an hour, what the fuck did goes wrong.
-
I learned Python3, HTML5, CSS3, JavaScript and Bootstrap 4. I also did some web design project. But I think I need more practice for being a good programmer. Now, I need A platform that will give me some design or programming exercises for practicing. The platform can be any website or android app. I don't looking for something that will say, "design a calendar or make a calculator" or something like that. I'm looking for more specific task. Example for html:- I need all tags and attribute based task. so that I can learn everything properly. something that will say do the array task in JavaScript, do the h1 task in html. I want to see the result of an exercise if I failed in that exercise. So that I can learn from there. I want to make sure that the exercise will cover all topic of that language. so that I can learn everything topic of a language.
IF YOU KNOW ABOUT THAT KIND OF APP OR WEBSITE THEN PLEASE HELP ME. I'M NEW IN PROGRAMMING.15 -
Not my fav because I'm not proficient in anything and don't consider myself a programmer. But, I use many languages day to day as a sysadmin.
I come across Perl enough to know I don't like how their modules and dependencies work. I have the most difficulty when dealing with this. PHP, Python, Ruby, and GoLang never give me as much trouble as Perl.
Also, coming across more Python3 dependencies, dealing with older Python2 environments, as stated by many others as well, is becoming more and more painful.
Maybe all of this can be solved with some unifying virtualenv for all popular languages/environments, supported fully by the underlying OS. -
I’m trying to add caching functionality in my scalable spark cluster on Docker. I am able to add redis to my Docker container, but that doesn’t add redis-CLI or any other useful tools that I need. And there are some redis-cache projects on PyPi, but they are very old and not compatible with python3.5
-
!rant && needAdvice
I want to start learning python..
My question now is: Should I go with Python 2 or 3? I heard there are some rather major differences6 -
Does anyone have any recommendations for command line parsers for Python? I've looked at argparse click docopt so far. I am clearly bad at making informed decisions.
-
WHAT THE FUCK IS THE GOOGLE SDK FOR?
ya I get it you connect to it.
It doesnt give local directory to Google Directory, it doesnt run ssh commands nor python commands. WHAT THE FUCK IS IT FOR?
DO I MAKE A BUCKET NOT COMPUTE ENGINE?
DO I SHOOT MYSELF IN THE FOOT AND DELETE THE PROJECT DUE TO HAVING AN OVERFLOW OF PYTHON FILES IN WRONG DIRECTORIES?
LIKE FOR REAL -
Help. Has Python changed in version 3.6.5, or is there something wrong with my code?!
The following doesn't work:
import os
def main():
console = input("...")
rom = input("...")
The following does work:
import os
console = input("...")
rom = input("...")
def main() :12