Instantly share code, notes, and snippets.

import PySimpleGUI as sg
layout = [ [sg.Text('Drawing on a 400x400 Grid')],
[sg.Graph((400,400), (0,0), (400,400), key='GRAPH')],
window = sg.Window('My new window').Layout(layout)
graph = window.Element('GRAPH')
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""This module's docstring summary line.
This is a multi-line docstring. Paragraphs are separated with blank lines.
Lines conform to 79-column limit.
Module and packages names should be short, lower_case_with_underscores.
Notice that this in not
""" Shows how to use flask and matplotlib together.
Shows SVG, and png.
The SVG is easier to style with CSS, and hook JS events to in browser.
python3 -m venv venv
. ./venv/bin/activate
pip install flask matplotlib
#!/usr/bin/env python
mocking requests calls
import mock
import unittest
import requests
from requests.exceptions import HTTPError