| FROM python:latest | |
| WORKDIR /test | |
| ADD ./app.py /test | |
| RUN pip install flask psycopg2-binary pytest | |
| CMD ["pytest", "app.py"] | 
| //! # Bitmask Battleship | |
| //! | |
| //! The ship sections and their status are maintained in a 17-bit mapping. A | |
| //! zero bit means the section is OK and a one means the section has been hit. | |
| //! | |
| //! ```text,ignore | |
| //! 1 | |
| //! 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 | |
| //! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
| //! | C | b | c | s | d | | 
| use std::fmt; | |
| use std::str; | |
| #[derive(Debug)] | |
| pub enum Rank { | |
| Ace, | |
| Two, | |
| Three, | |
| Four, | |
| Five, | 
These are the steps I followed enable VirtualBox on my laptop without disabling UEFI Secure Boot. They're nearly identical to the process described on [Øyvind Stegard's blog][blog], save for a few key details. The images here are borrowed from the [Systemtap UEFI Secure Boot Wiki][systemtap].
- Install the VirtualBox package (this might be different for your platform).
src='https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo'
The URL https://git.io/this-time-for-real-tho links to the win10-usb.sh script below. It created something bootable from my Fedora 29 workstation.
Try to run
curl -L https://git.io/this-time-for-real-tho | shand if that doesn't work try explicitly setting an environment variable for the location of the .iso file
The Python here works just fine, but mypy doesn't like it...
example.py:14: error: Argument 1 to "callback" has incompatible type "Optional[str]"; expected "str"
The if url is None: conditional should prevent the url in the else block from ever being None,
but maybe it doesn't work like that? Or I'm just wrong...
This is perfectly fine Python. It outputs
Opening...
Opening...
1337
Closing...
when run, but Mypy complains...
example.py:29: error: Incompatible default for argument "cls" (default has type "Type[Concrete]", argument has type "SupportsOpenClose")
| def fn( | |
| url: str, | |
| state: State, | |
| payload_type: PayloadType, | |
| verify: bool = True, | |
| method: Callable[..., Response] = requests.post, | |
| ) -> None: | |
| """ | |
| Given a function with the above signature, how can the type of | |
| ``method`` be made more specific? | 
| #!/usr/bin/env python3.6 | |
| # Copyright © 2018, Reilly Tucker Siemens <[email protected]> | |
| # | |
| # Permission to use, copy, modify, and/or distribute this software for any | |
| # purpose with or without fee is hereby granted, provided that the above | |
| # copyright notice and this permission notice appear in all copies. | |
| # | |
| # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |