This file contains 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 => { |
This file contains 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 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 |
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 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] |
This file contains 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 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
from datetime import datetime | |
from ftputil import FTPHost | |
import tempfile | |
import awswrangler as wr | |
import zipfile | |
from io import BytesIO | |
import pandas as pd | |
host = FTPHost('ftp.dadosabertos.ans.gov.br', 'anonymous') | |
BUCKET_NAME = 'vidi-gift' |
This file contains 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
input: '$11#1#' | |
blank: ' ' | |
start state: start | |
table: | |
start: | |
$: {R: soma1} | |
soma1: | |
1: {write: X, R: procuraBranco1} | |
'#': {R: soma2} | |
procuraBranco1: |
This file contains 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
# use in https://turingmachine.io/ | |
input: '0111' # try 1100 | |
blank: ' ' | |
start state: passo2 | |
synonyms: | |
accept: {R: accept} | |
reject: {R: reject} | |
table: |
This file contains 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
DEBUG::Isso é uma log de debug | |
INFO::Isso é uma log de info | |
WARNING::Isso é uma log de warning | |
ERROR::Isso é uma log de erro | |
DEBUG::Chamado em root |
NewerOlder