[PYTHON] Compare the fonts of jupyter-themes

background

There are many fonts that can be set with jupyter-themes, so I have to be particular about fonts as well! I thought it was a trigger

Then please

スクリーンショット 2020-04-11 15.16.37.png スクリーンショット 2020-04-11 15.16.53.png スクリーンショット 2020-04-11 15.17.12.png スクリーンショット 2020-04-11 15.17.33.png スクリーンショット 2020-04-11 15.17.57.png スクリーンショット 2020-04-11 15.18.17.png スクリーンショット 2020-04-11 15.18.33.png スクリーンショット 2020-04-11 15.18.54.png スクリーンショット 2020-04-11 15.22.20.png スクリーンショット 2020-04-11 15.23.13.png スクリーンショット 2020-04-11 15.23.43.png スクリーンショット 2020-04-11 15.24.11.png スクリーンショット 2020-04-11 15.24.43.png スクリーンショット 2020-04-11 15.25.00.png スクリーンショット 2020-04-11 15.25.19.png スクリーンショット 2020-04-11 15.25.37.png スクリーンショット 2020-04-11 15.25.53.png スクリーンショット 2020-04-11 15.26.08.png スクリーンショット 2020-04-11 15.26.23.png スクリーンショット 2020-04-11 15.26.39.png スクリーンショット 2020-04-11 15.26.55.png スクリーンショット 2020-04-11 15.27.10.png スクリーンショット 2020-04-11 15.27.25.png スクリーンショット 2020-04-11 15.27.51.png スクリーンショット 2020-04-11 15.28.05.png スクリーンショット 2020-04-11 15.28.18.png スクリーンショット 2020-04-11 15.28.31.png

Conclusion

--Fonts to avoid: --Jupyter default font: Not a monospaced font --saxMono: 1 and lowercase L are indistinguishable, 0 and uppercase O are indistinguishable --Liberation Mono: 0 and uppercase O are indistinguishable --Aurulent Sans Mono: 0 and uppercase O are indistinguishable -Other than "fonts to avoid", the rest is your choice. Meslo was selected because it is easy to distinguish between l and 1 + diagonal line 0 + slightly stronger than office.

Remarks

Code created so that you can change the theme while fluttering

import subprocess

font_raw = """anka	Anka/Coder
anonymous	Anonymous Pro
aurulent	Aurulent Sans Mono
bitstream	Bitstream Vera Sans Mono
bpmono	BPmono
code	Code New Roman
consolamono	Consolamono
cousine	Cousine
dejavu	DejaVu Sans Mono
droidmono	Droid Sans Mono
fira	Fira Mono
firacode	Fira Code
generic	Generic Mono
hack	Hack
hasklig	Hasklig
inconsolata	Inconsolata-g
inputmono	Input Mono
iosevka	Iosevka
liberation	Liberation Mono
meslo	Meslo
office	Office Code Pro
oxygen	Oxygen Mono
roboto	Roboto Mono
saxmono	saxMono
source	Source Code Pro
sourcemed	Source Code Pro Medium
ptmono	PT Mono
ubuntu	Ubuntu Mono"""

font_list = []
for i in font_raw.split('\n'):
    f_arg     = i.split('\t')[0]
    font_name = i.split('\t')[1]
    font_list.append((f_arg,font_name))

def generateCmd():
    base_cmd = 'jt -t gruvboxd -T -N -ofs 12 -f %(font_name)s'
    for font in font_list:
        print(font[1])
        yield base_cmd % {'font_name':font[0]}, font[1]

changeTheme= generateCmd()
cmd, font_name = next(changeTheme)
print(cmd)
res = subprocess.run(cmd,shell =True)

user_acc = { 'user': 'l1l1_aa_0O0O_2S2S', 'password': 'abcdefghijklmnopqrstuvwxyz0123456789', 'database': 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'}
print('font_name:'+font_name)
print('cmd:'+cmd)
for i in user_acc:
    print(i.ljust(15,' ')+user_acc[i])

Recommended Posts

Compare the fonts of jupyter-themes
Compare the speed of Python append and map
The meaning of self
the zen of Python
The story of sys.path.append ()
Revenge of the Types: Revenge of types
Align the version of chromedriver_binary
Scraping the result of "Schedule-kun"
10. Counting the number of lines
Towards the retirement of Python2
About the ease of Python
Get the number of digits
Explain the code of Tensorflow_in_ROS
Reuse the results of clustering
GoPiGo3 of the old man
Calculate the number of changes
Make the function of drawing Japanese fonts in OpenCV general
Change the theme of Jupyter
The popularity of programming languages
Change the style of matplotlib
Visualize the orbit of Hayabusa2
About the components of Luigi
Connected components of the graph
Filter the output of tracemalloc
About the features of Python
Simulation of the contents of the wallet
The Power of Pandas: Python
Let's compare the Fourier transform of the synthesized sound source and the composition of the Fourier transform.
Compare the scores of the M-1 Grand Prix in terms of deviation values
The specifications of pytz have changed
Test the version of the argparse module
The day of docker run (note)
Plot the spread of the new coronavirus
Raise the version of pyenv itself
[Python] The stumbling block of import
First Python 3 ~ The beginning of repetition ~
Japanese translation of the e2fsprogs manual
The story of participating in AtCoder
Change the background of Ubuntu (GNOME)
Is the probability of precipitation correct?
I investigated the mechanism of flask-login!
Understand the contents of sklearn's pipeline
The world of control engineering books
Step into the darkness of msync
Take the execution log of Celery
Test the goodness of fit of the distribution
Existence from the viewpoint of Python
Calculation of the number of Klamer correlations
pyenv-change the python version of virtualenv
About the return value of pthread_mutex_init ()
Combine the overlap of one-dimensional intervals
Get the attributes of an object
Solve the delay of interferometer observation
Distinguishing the agari shape of mahjong
Python-Simulation of the Epidemic Model (Kermack-McKendrick Model)
Change the Python version of Homebrew
Power the brushless motor of Oriental motor
The power of combinatorial optimization solvers
About the return value of the histogram.
Get the first element of queryset
About the basic type of Go