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
| import numpy as np | |
| from numpy import isclose | |
| from ex1 import eig_pot | |
| from ex2 import crit_sassenfeld, solve_sor, eig_potinv | |
| def assertVector(a, b, **kwargs): | |
| for exp, act in zip(a, b): | |
| assert isclose(exp, act, **kwargs) | |
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
| import numpy as np | |
| from math import ceil | |
| from sympy import Symbol | |
| from prettytable import PrettyTable | |
| # [a0, a1, a2, ...] | |
| k = Symbol('k') | |
| # coef = [1, 2, 3, 4, 5] | |
| coef = [1, 8, 32, k] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| # Based in https://github.com/cuducos/chunk | |
| from asyncio import Semaphore, gather, run | |
| import httpx | |
| from loguru import logger | |
| url = "https://dadosabertos.rfb.gov.br/CNPJ/Empresas1.zip" | |
| default_chunk_size = 2**20 # 1MB | |
| # DefaultMaxRetries sets the maximum download attempt for each chunk |
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
| inline fun <T> Iterable<T>.chunkedBy( | |
| predicate: (T) -> Boolean | |
| ): List<List<T>> { | |
| val iterator = this.iterator() | |
| if (!iterator.hasNext()) { | |
| return emptyList() | |
| } | |
| var lastElem = iterator.next() | |
| var lastList = mutableListOf(lastElem) |
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
| diff --git a/assets/js/app.js b/assets/js/app.js | |
| index ad4168c..74b2716 100644 | |
| --- a/assets/js/app.js | |
| +++ b/assets/js/app.js | |
| @@ -32,7 +32,20 @@ let liveSocket = new LiveSocket("/live", Socket, { | |
| // Show progress bar on live navigation and form submits | |
| topbar.config({barColors: {0: "#29d"}, shadowColor: "rgba(0, 0, 0, .3)"}) | |
| window.addEventListener("phx:page-loading-start", _info => topbar.show(300)) | |
| -window.addEventListener("phx:page-loading-stop", _info => topbar.hide()) | |
| +window.addEventListener("phx:page-loading-stop", info => { |
OlderNewer