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
-- accounts_tags definição | |
CREATE TABLE "accounts_tags" ("account_id" bigint NOT NULL, "tag_id" bigint NOT NULL, PRIMARY KEY ("tag_id", "account_id")); | |
CREATE INDEX "index_accounts_tags_on_account_id_and_tag_id" ON "accounts_tags" ("account_id", "tag_id"); | |
-- account_warning_presets definição | |
CREATE TABLE "account_warning_presets" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text DEFAULT '' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "title" varchar DEFAULT '' NOT NULL); |
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
// pages/api/webdav/[[...file]].ts | |
import type { NextApiRequest, NextApiResponse } from 'next'; | |
import { v2 as webdav } from 'webdav-server'; | |
export const config = { | |
api: { | |
// Desabilita o bodyParser para preservar o corpo "cru" da requisição, essencial para WebDAV. | |
bodyParser: false, | |
}, | |
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import re | |
from langchain.text_splitter import RecursiveCharacterTextSplitter | |
import tiktoken | |
# Define o limite de caracteres para cada split | |
chunk_size = 200 | |
# Função para remover separadores de um texto | |
def remove_separators(text, separators): | |
pattern = '|'.join(map(re.escape, separators)) |
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
// https://webbrowsertools.com/screen-size | |
class Screen { | |
constructor() { | |
ratio: 8; | |
} | |
gcd(a, b) { | |
return 0 === b ? a : this.gcd(b, a % b); | |
} |
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
#!/bin/bash | |
#################################### | |
# | |
# Backup TAR script. | |
# | |
#################################### | |
find /home/jadson/Área\ de\ trabalho/ -type f | grep -v -E '*node_modules*|*App/chromium*' > /tmp/archiveFileList.txt && tar -I 'zstd --ultra -22 -T1' -cvf /home/jadson/Público/1-bkp.tar.zst -T /tmp/archiveFileList.txt && mv /tmp/archiveFileList.txt /home/jadson/Público/ |
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
// 57.23 dec | |
r = "" | |
a = 0.23 | |
b = 0; | |
for (let index = 0; index < 52; index++) { | |
b = a * 2 | |
console.log(b) | |
if(b > 1){ | |
a = b - 1; | |
r = r + "1" |
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
const vec = [0,1,2,4,8,16,32,64,128]; | |
const string = compressVec(vec); | |
const decompress = decompressVec(string); | |
function compressVec(vec) { | |
let result = ""; | |
for (let i = 0; i < vec.length; i++) { | |
// parseInt("1"+String("0000000" + vec[i].toString(2)).slice(-7), 2) == vec[i] + 128 ? | |
result = result + String.fromCharCode(vec[i] + 128); |