Skip to content

Commit d9cfce6

Browse files
committed
Happy Easter ;-)
1 parent 8f3959f commit d9cfce6

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

bidscoin/bidseditor.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import csv
1212
import nibabel as nib
1313
import pandas as pd
14+
import random
1415
from bids_validator import BIDSValidator
1516
from typing import Union
1617
from pydicom import dcmread, datadict, config
@@ -2070,6 +2071,14 @@ def get_help(self):
20702071
help_url = HELP_URLS.get(self.target_run.datatype, HELP_URL_DEFAULT)
20712072
webbrowser.open(help_url)
20722073

2074+
messagebox = QMessageBox(self)
2075+
messagebox.setText(f"\n{get_douglas_adams_quote()}")
2076+
messagebox.setWindowTitle("Don't panic")
2077+
messagebox.setIconPixmap(QtGui.QPixmap(str(Path(__file__).parent/'egg.png')).scaled(150, 150, Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.SmoothTransformation))
2078+
messagebox.setToolTip("Thanks for all the fish!")
2079+
messagebox.setFont(QtGui.QFont('Courier New', pointSize=13))
2080+
messagebox.show()
2081+
20732082

20742083
class CompareWindow(QDialog):
20752084

@@ -2430,6 +2439,34 @@ def get_eventshelp(eventkey: str) -> str:
24302439
return f"{eventkey}\nA custom column name"
24312440

24322441

2442+
def get_douglas_adams_quote():
2443+
quotes = ['The answer to the ultimate question of life, the universe, and everything is 42.',
2444+
"Don't Panic and always carry a towel!",
2445+
'I love deadlines. I love the whooshing noise they make as they go by.',
2446+
'A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.',
2447+
'Time is an illusion. Lunchtime doubly so.',
2448+
'Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so.',
2449+
'Flying is learning how to throw yourself at the ground and miss.',
2450+
'It is a mistake to think you can solve any major problems just with potatoes.',
2451+
'The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair.',
2452+
"The chances of finding out what's really going on in the universe are so remote, the only thing to do is hang the sense of it and keep yourself occupied.",
2453+
'This must be Thursday. I never could get the hang of Thursdays.',
2454+
'For a moment, nothing happened. Then, after a second or so, nothing continued to happen.',
2455+
"The ships hung in the sky in much the same way that bricks don't.",
2456+
'In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move.',
2457+
'I may not have gone where I intended to go, but I think I have ended up where I needed to be.',
2458+
'He was a dreamer, a thinker, a speculative philosopher... or, as his wife would have it, an idiot.',
2459+
"Coding is simple. You just have to gaze at an empty IDE until your forehead develops a persistent twitch and your keyboard starts typing 'Hello World' by itself out of sheer pity.",
2460+
"Debugging follows the same principles as flying: The trick is to throw yourself at the keyboard, miss completely, and by some miraculous oversight of the universe's quality assurance process, end up with working code.",
2461+
"Space is big. Really big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's long way down the road to the chemist's, but that's just peanuts to space.",
2462+
"There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.\n\nThere is another theory which states that this has already happened.",
2463+
"You live and learn. At any rate, you live.",
2464+
"Anyone who is capable of getting themselves made President should on no account be allowed to do the job.",
2465+
"If it looks like a duck, and quacks like a duck, we have at least to consider the possibility that we have a small aquatic bird of the family anatidae on our hands."]
2466+
2467+
return random.choice(quotes)
2468+
2469+
24332470
def bidseditor(bidsfolder: str, bidsmap: str='', template: str=bidsmap_template) -> None:
24342471
"""
24352472
Collects input and launches the bidseditor GUI

bidscoin/egg.png

32 KB
Loading

0 commit comments

Comments
 (0)