This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| This gist shows how to run asyncio loop in a separate thread. | |
| It could be useful if you want to mix sync and async code together. | |
| Python 3.7+ | |
| """ | |
| import asyncio | |
| from datetime import datetime | |
| from threading import Thread | |
| from typing import Tuple, List, Iterable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Numerical matrix examples | |
| let x: Matrix = [[10, 9, 8], [3, 2, 1]] | |
| let y: Matrix = [[1, 2, 3], [4, 5, 6]] | |
| let z: Matrix = [[1, 2], [3, 4], [5, 6]] | |
| x + y // [[11, 11, 11], [7, 7, 7]] | |
| x * y // [[10, 18, 24], [12, 10, 6]] | |
| 2 * x // [[20, 18, 16], [6, 4, 2]] | |
| y ** z // [[22, 28], [49, 64]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // SKMultilineLabel.swift | |
| // | |
| // Created by Craig on 10/04/2015. | |
| // Copyright (c) 2015 Interactive Coconut. All rights reserved. | |
| // | |
| /* USE: | |
| (most component parameters have defaults) |