Dates from ancient Greek times, where "deus ex machina" ("god from the machine") in a play referred to the act of lowering a god on stage using a cable device (therefore, a god from a machine) to decide in a dilemma and give fate a nudge, so to say.
These days, deus ex machina has the negative connotation of an utterly improbable, illogical or baseless plot twist that drastically alters the situation, as if the "deus ex machina" came down to give fate that little push.
I liked the movie, but the ending was total crap...they could've come up with a better way to beat the villain than the deus ex machina ending of that guy miraculously coming back to life.
From Deus Ex Machina, A Penis Ex Machina is when a sex scene is unnecessarily dropped into the plot of an otherwise decent film or story in order to boost the ratings.
Some sex scenes are vital to plot, but this describes only when they blatantly serve no relevant purpose to the story-telling.
Alternatively, it can be used to describe a twist in the plot of a pornographic film in order to bring about the vital sex scene. When a girl in the plot is constantly refusing sex, and then something triggers her suddenly to lust after the male protagonist, this is a Penis Ex Machina.
Person 1: "I heard the movie we're going to has a spicy sex scene!"
Person 2: "Is it part of the plot, or does it come about through Penis Ex Machina?"
For all those times you were stuck on the john hoping against hell for that number 2 to just slide out nice and easy and end your misery, this would be the expression used.
Inspired by deus ex machina or basically the idea of a god coming down from the sky to end the story.
"Where is a deuce ex machina when you need one? My meeting starts in five minutes!"
"OMG. It must have been by the sweet atoning grace of a deuce ex machina that I passed that shit."
A movie where the characters (especially the protagonist) repeatedly does things that are either impossible or highly improbable, usually in an action movie.
(Sees Tomb Raider 2018 trailer where Laura Croft does some stupidly impossiblestunt)
Friend: Wow, I guess they're making Tomb Raider Ex Machina