This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter as tk | |
import matplotlib | |
matplotlib.use('TkAgg') | |
from matplotlib.figure import Figure | |
from matplotlib.backends.backend_tkagg import ( | |
FigureCanvasTkAgg, | |
NavigationToolbar2Tk | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter as tk | |
from tkinter import ttk | |
from tkinter.messagebox import showerror, showwarning, showinfo | |
# create the root window | |
root = tk.Tk() | |
root.title('Tkinter MessageBox') | |
root.resizable(False, False) | |
root.geometry('300x150') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic example | |
>>> import tkinter as tk | |
>>> window = tk.Tk() | |
>>> label = tk.Label(text="Name") | |
>>> entry = tk.Entry() | |
>>> label.pack() | |
>>> entry.pack() | |
>>> name = entry.get() | |
>>> name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From: https://stackoverflow.com/questions/2612802/how-do-i-clone-a-list-so-that-it-doesnt-change-unexpectedly-after-assignment | |
With new_list = my_list, you don't actually have two lists. The assignment just copies the reference to the list, not the actual list, | |
so both new_list and my_list refer to the same list after the assignment. | |
To actually copy the list, you have various possibilities: | |
-You can use the builtin list.copy() method (available since Python 3.3): | |
new_list = old_list.copy() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) | |
sudo yum install xorg-x11-server-Xorg xorg-x11-xauth xorg-x11-apps -y | |
2) | |
Check that X11Forwarding is yes | |
sudo cat /etc/ssh/sshd_config |grep X11 | |
You will see: | |
X11Forwarding yes | |
3) | |
touch ~/.Xauthority | |
4) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# list contents of a tar.gz file without actually decompressing | |
$ tar -ztvf file.tar.gz | |
# extract a specific file from a tar.gz file without decompressing | |
tar -zxvf Biofidelity_NS215_0137.tar.gz 220414_NS500215_0137_AHLLKVBGXL/SampleSheet.csv | |
# untar a non-compressed file | |
tar -xvf file.tar | |
# symbolic link (myfile is the name of the link) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://support.illumina.com/help/BaseSpace_OLH_009008/Content/Source/Informatics/BS/ViewingData_Intro_swBS.htm |