Skip to content

Instantly share code, notes, and snippets.

View vsiegel's full-sized avatar

Volker Siegel vsiegel

  • Berlin, Germany
View GitHub Profile
@JackTheEngineer
JackTheEngineer / ScrolledFrame.py
Last active February 10, 2024 16:26
Tkinter python Scrolled Window / Frame / Canvas with Mousewheel support ( based upon EugeneBakin 's scrframe.py )
from tkinter import ttk
import tkinter as tk
import functools
fp = functools.partial
class VerticalScrolledFrame(ttk.Frame):
"""
A pure Tkinter scrollable frame that actually works!
* Use the 'interior' attribute to place widgets inside the scrollable frame
* Construct and pack/place/grid normally
@krishvishal
krishvishal / plot_kernels.py
Last active October 22, 2022 18:27
Visualize weights in pytorch
from model import Net
from trainer import Trainer
import torch
from torch import nn
from matplotlib import pyplot as plt
model = Net()
ckpt = torch.load('path_to_checkpoint')
model.load_state_dict(ckpt['state_dict'])
filter = model.conv1.weight.data.numpy()
@boredstiff
boredstiff / pycharm.txt
Created April 21, 2017 22:01
PyCharm Live Templates
# RST =====================
============================
# Code block for RST #
============================
.. code-block:: python
$END$
=============================
# Inline code block for RST #
=============================