Skip to content

Instantly share code, notes, and snippets.

View marcosbarker's full-sized avatar
🧙‍♂️
code == There and back again

Marcos Paulo Marques Corrêa marcosbarker

🧙‍♂️
code == There and back again
View GitHub Profile
@marcosbarker
marcosbarker / lorenz_da_magic.ipynb
Created February 9, 2023 15:43
Lorenz_DA_Magic.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marcosbarker
marcosbarker / -sw2d_kf_rna_notebook.ipynb
Last active February 10, 2023 14:02
sw2d_kf_rna_notebook.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marcosbarker
marcosbarker / codificaPdfEmBase64.java
Last active April 11, 2023 16:04
Codifica PDF em Base64 puro texto
import java.util.Base64;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
String filePath = "pdfTeste.pdf";
File file = new File(filePath);
byte[] bytes = Files.readAllBytes(file.toPath());
@marcosbarker
marcosbarker / calculaPosicaoXML.py
Last active December 20, 2024 21:41
Retorna linha (Propriedade 'Tag' + Conteúdo) de XML baseado na posição passada.
xml =
"""
<COLAR XML AQUI>
"""
posicao = <COLOCAR POSIÇÃO AQUI>
if posicao > len(xml) or posicao <= 0:
print(f"Erro: posicao {posicao} fora do intervalo do XML.")