Skip to content

Instantly share code, notes, and snippets.

Avatar

Robin Wilson robintw

View GitHub Profile
View StackStac_Show_Example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View stackstac_mosaic_issue.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Untitled-1
====
With normal output
====
2021-10-09 21:50:37.540 | DEBUG | prompt_toolkit.key_binding.bindings.focus:focus_next:21 - Set focus to [('[SetMenuPosition]', ''), ('class:dropdown.text', ' Select column ',...
2021-10-09 21:50:38.057 | DEBUG | prompt_toolkit.key_binding.bindings.focus:focus_next:21 - Set focus to [('[SetMenuPosition]', ''), ('class:dropdown.text', ' = ',...
===
With DummyOutput
===
2021-10-09 21:51:12.538 | DEBUG | prompt_toolkit.key_binding.bindings.focus:focus_next:21 - Set focus to [('class:button.arrow', '<', <function Button._get_text_fragments.<locals>.handler at 0x119a321f0>), ('[SetCursorPosition]', ''), ('class:button.text', 'Add filter condition'...
View test_gui_interactively.py
import asyncio
from prompt_toolkit.application import create_app_session
from prompt_toolkit.input.base import DummyInput
from prompt_toolkit.key_binding.key_processor import KeyPress
from prompt_toolkit.keys import Keys
from prompt_toolkit.output import DummyOutput
from pepys_admin.maintenance.dialogs.help_dialog import HelpDialog
from pepys_admin.maintenance.gui import MaintenanceGUI
View Untitled-1
async def test_select_platform_type(test_datastore):
# Test application in a dummy session.
input = DummyInput()
output = DummyOutput()
# output = None
with create_app_session(output=output, input=input):
gui = MaintenanceGUI(test_datastore)
task = asyncio.create_task(gui.app.run_async())
View test_pepys_gui_v2.py
import asyncio
from contextlib import asynccontextmanager
from prompt_toolkit.application import create_app_session
from prompt_toolkit.input import create_pipe_input
from prompt_toolkit.input.ansi_escape_sequences import REVERSE_ANSI_SEQUENCES
from prompt_toolkit.input.base import DummyInput
from prompt_toolkit.key_binding.key_processor import KeyPress
from prompt_toolkit.keys import Keys
from prompt_toolkit.output import DummyOutput
View test_pepys_gui.py
async def test_select_platform_type(test_datastore):
# Test application in a dummy session.
input = DummyInput()
# output = DummyOutput()
output = None
with create_app_session(output=output, input=input):
gui = MaintenanceGUI(test_datastore)
# Run the application.
View Example Periodic Callback.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Example Periodic Callback.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:a555b81f29c9b40581c510dea67e6351
[Info - 7:54:19 PM] Pylance language server 2020.6.1 starting
[Info - 7:54:19 PM] Server root directory: /Users/robin/.vscode-insiders/extensions/ms-python.vscode-pylance-2020.6.1/server
[Info - 7:54:19 PM] No configuration file found.
[Info - 7:54:19 PM] Setting pythonPath for service "pepys-import": "/Users/robin/anaconda3/envs/pepys/bin/python"
[Info - 7:54:20 PM] stubPath /Users/robin/Documents/IanMayo/pepys-import/typings is not a valid directory.
[Info - 7:54:20 PM] Assuming Python version 3.7
[Info - 7:54:20 PM] Assuming Python platform Darwin
[Info - 7:54:20 PM] Searching for source files
[Info - 7:54:20 PM] Found 181 source files
[Info - 7:54:20 PM] Background analysis root directory: /Users/robin/.vscode-insiders/extensions/ms-python.vscode-pylance-2020.6.1/server