#pythex
Explore tagged Tumblr posts
Note
Ex x Python?
Python: How come nobody else talks about how beautiful your smile is?
EX: Cause you’re the only one that makes me smile
#hermitcraft shipping#hermitshipping#hermitship#incorrect hermitship quotes#incorrect quotes#python x ex#pythex
78 notes
·
View notes
Note
Because Ex x Python is adorable, imagine a love spell having little effect on them because they already have crushes on each other. The effect it has is that they become more open about their crushes, often giving each other gifts or "platonic" kisses and cuddles
Does it make them fess up about their love, though?
44 notes
·
View notes
Text
Parsing data from strings with Python and Regular Expressions
Author: Kev Kalis
Where do we use RegEx?
You have a page of strings, say... an essay. You want to find all words that has an exclamation mark at the end.
string = "here! comes, the boom!" # I should be able to capture `here!` and `boom!`
We can deal with this task using RegEx!
What are regular expressions?
A sequence of characters that define a search pattern.
With RegEx, we can spot patterns in strings.
Here is an exciting poem with a ton of exclamation marks!
Oh noble exclamation mark! I expel! I exclaim! Oh most excitable exclamation mark!
Oh, to see you sends blood racing
"exciting poem with exclamation marks!!!" - Raj Arumugam
Let's say you want to put all the words with exclamation marks into a list. You can just copy-and-paste those words into a text file and you're done!
mark!
expel!
exclaim!
mark!
Did not break a sweat. Why would I still need your proposal, Kev?
Alright, alright. Calm down.
The next day, you receive another poem.
"There it is!" Diane exclaimed; But did we need that tag? The ! mark told us how Di spoke The author needn't nag.
It was red! or It was black! (Should readers be surprised at that?) Real people don't "exclaim" all day They're much more likely just to "say". "It was sudden! She was there!" Too much exclaiming, here, to bear.
When !!! infests your screen When !!! is all about Remember - few make better sense And weed those !!!!s out.
More exclamation marks. This time there are tons of them. And there are exclamation marks that are not preceded by words/alphabet.
Looking up these words by eye is tedious work. What if you get a 5 page poem (or not), and you need to scan through 3000 words to see if any of them have exclamation marks?
RegEx to the rescue!
One way to start learning regular expressions is to use a playground.
Pythex can help with this. An interactive playground that gives the users the ability to try out, build, or test their regular expressions.
I am in no way affiliated with Pythex. I only find the tool useful in testing regular expressions.
Back to our problem, we want to get all occurences of words with exclamation marks on the end.
An example of regular expression to parse this pattern is /(\w+\!)/.
Breakdown
() - This tells the parser that the pattern inside is one group
\w+ - This tells the parser that we are looking for a "word"
\! - This tells the parser that we are looking for a !. The extra \ is the character that tells our engine to escape !, since the exclamation mark is a valid parsing character in RegEx.
Let's see it in action!
Zero misses. We got is!, red!, black!, sudden!, and there!. image is cut.
With Python
Finding patterns with RegEx with Python comes with the re package.
For now, we can just use the findall method.
findall looks for all occurrences of a pattern in a string and returns a list of the matches.
import re string = 'here! comes the boom!' matches = re.findall('(\w+\!)', string) print(matches) # ['here!', 'boom!']
There it is. All piled up in a nifty list.
0 notes
Note
Consider the following. Ex and Python both have slightly sore throats from yelling all day so Ex makes them tea or hot cocoa. They sip it and bask in each other's presence. Sometimes they smooch each other and just fall asleep on each other with their tea on the table. Other times they makeout and, again, forget their tea. OEA
That’s so cute... gotta take care of the boyfriend... IRL though hot cocoa will make a sore throat feel worse. Learned that the hard way.
41 notes
·
View notes
Note
Have you ever WATCHED a Python video? That man radiates loud energy. And Ex tries to be intimidating and he only knows loud makes people flinch. Imagine them just yelling at each other and people think they're fighting but, in reality, they're excited. OEA
Oh, absolutely. Also its projection time, they both have problems with noise regulation so they have 2 modes: loud as fuck and literally whispering, which also interferes with communication.
Also I legit haven’t watched any Python videos and I kinda don’t plan to, sorry :(
38 notes
·
View notes
Note
Ex TRIES to make gifts for Python. He can only really knit and sew though so he often patches up Python's suit after mob fights.
Python always appreciates the help. EX thinks his skills aren’t useful, but without him Python would be wearing threads by now.
32 notes
·
View notes
Note
Since my current hypeefixation is Ex x Python, imagine this. Ex can't fight for the life of him. Yet, he wants cool items only gotten from mobs. So, Python, being pretty skilled at PvE, will get these items for him and wrap them up nice and neat as gifts. Never fails to surprise Ex and make him blush.
Does EX ever make gifts for Python?
#hermitshipping#ask#evil xisuma tag#python tag#pythex#if that isnt the ship name please tell me <3#ender-hydra
32 notes
·
View notes
Note
Python x Evil Xisuma playlist?
Playlist #9
Spotify Link
The Predatory Wasp of the Palisades is Out to Get Us by Sufjan Stevens
Symphony by Clean Bandit and Zara Larson
I Wouldn’t Mind by He is We
The One Moment by OK GO
Fall For You by Second Hand Serenade
Would You be so Kind by dodie
Welcome to the Family by Watzky
Baby Hotline by Jack Stauber
Run to You by Pentatonix
UFOF by Big Theif
A Case of You by Joni Mitchell
23 notes
·
View notes