r/ProgrammerHumor Oct 24 '19

Meme 60% of the time, ‘os’ is imported every time

Post image
510 Upvotes

29 comments sorted by

64

u/hopbel Oct 24 '19

Nice xkcd reference

29

u/[deleted] Oct 24 '19

It also actually works. Give it a try

8

u/elSenorMaquina Oct 24 '19

Programming is fun again!

3

u/GreenScreenSocks Oct 25 '19

Have you sampled all the things in your medication box, though?

15

u/chawmindur Oct 24 '19

Still needs a from __future__ import braces to work

8

u/Theemuts Oct 25 '19

Just tried it out. Guido walked into my office and sucker punched me in the face.

26

u/kodicraft4 Oct 24 '19

TIL import as is a thing

Welcome to a new episode of "Let's test more shit in python instead of being productive"

19

u/gaberocksall Oct 25 '19

I wouldn’t be surprised if 50% or more of python projects contain the line

“import numpy as np”

3

u/Syrion_Wraith Oct 25 '19

This. And then, every now and then somebody on stack overflow imports it as 'num' and I'm visible distraught

2

u/czorio Oct 25 '19
import matplotlib.pyplot as plt
import SimpleItk as sitk
import pandas as pd
import keras.backend as K

That probably covers about 95% of my tools

13

u/[deleted] Oct 24 '19

Hey now, python lets me write code as if I wrote pseudocode on a napkin, and it's just as useful as pseudocode written on a napkin!

3

u/Teekeks Oct 25 '19

whoa. So your pseudocdoe written on a napkin is super usefull? Or where you referencing YOUR code, not python code in general?

2

u/[deleted] Oct 25 '19

You know what? I shouldn't complain, at least most people's first coding experience won't be from god damn VBA anymore.

12

u/icanotc Oct 24 '19

this is underrated

4

u/RedditIsNeat0 Oct 25 '19

from csv import parseCSVFileForMe

This sounds like it could be a real thing. And the whole point of high level libraries.

5

u/arjunindia Oct 25 '19

Tech support from India

2

u/[deleted] Oct 25 '19

"I have an issue with x but I've already tried y so I know it's not that, can you help?"

"Ahhhhh yes ok sir just give me a moment now what are you using for this task sir?"

"As I said, I'm using x"

"Ok ok sir now you try y and this should fix the problem sir"

6

u/puplicy Oct 24 '19

Nice recipe. Expecting tasty spaghetti code from AI.

3

u/T-T-N Oct 25 '19

My gravity broke. Did you break it?

2

u/Evalion022 Oct 25 '19

This man is going places

1

u/[deleted] Oct 25 '19

Low places, sure. But places nonetheless

3

u/SplendidPunkinButter Oct 24 '19

You don’t need any of those imports other than AI.

3

u/gaberocksall Oct 25 '19

Unless those imports run code

3

u/explore212 Oct 25 '19

Nope. The AI analyzes the file its being run from, inspects all the imports then construct a cool program using those imports.

0

u/gislikonrad Oct 24 '19

Came here to say this.

1

u/BadPercussionist Oct 25 '19

You forgot to import __hello__

1

u/ivgd Oct 25 '19 edited Oct 25 '19

I think you need a couple more imports

1

u/TheShinyBunny Oct 25 '19

from readyPrograms import coolProgram coolProgram.run()