Skip to content

Instantly share code, notes, and snippets.

View elowy01's full-sized avatar

Ernesto Lowy elowy01

  • Biofidelity
  • Cambridge, UK
View GitHub Profile
import tkinter as tk
import matplotlib
matplotlib.use('TkAgg')
from matplotlib.figure import Figure
from matplotlib.backends.backend_tkagg import (
FigureCanvasTkAgg,
NavigationToolbar2Tk
)
import tkinter as tk
from tkinter import ttk
class App(tk.Tk):
def __init__(self):
super().__init__()
self.geometry("240x100")
self.title('Login')
import tkinter as tk
from tkinter import ttk
from tkinter.messagebox import showinfo
# root window
root = tk.Tk()
root.geometry('300x220')
root.resizable(False, False)
root.title('Radio Button Demo')
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')
# 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
import tkinter as tk
# Basic button
import tkinter as tk
window = tk.Tk()
button = tk.Button(
text="Click me!",
width=25,
height=5,
bg="blue",
# 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()
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)
# 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)
https://support.illumina.com/help/BaseSpace_OLH_009008/Content/Source/Informatics/BS/ViewingData_Intro_swBS.htm