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
const cnpjPattern = /^(\d{2}[-.\s]?\d{3}[-.\s]?\d{3}[-.\s/]?\d{4}[-.\s]?\d{2})$/ | |
function calcDigit(cnpjArray: number[]) { | |
const x = cnpjArray.length | |
const { sum } = cnpjArray.reduce( | |
(acc, curr) => ({ | |
sum: acc.sum + curr * acc.factor, | |
factor: acc.factor > 2 ? acc.factor - 1 : 9, | |
}), |
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
$steamFolder = "C:\{PATH-TO-YOUR-STEAMAPPS/COMMON-FOLDER}" | |
$gamesFolder = "C:\{PATH-TO-YOUR-GAMES-FOLDER}" | |
function printArt { | |
Write-Host "`n" | |
Write-Host " ███████╗████████╗███████╗ █████╗ ███╗ ███╗ ███████╗██╗ ██╗███╗ ███╗██╗ ██╗███╗ ██╗██╗ ██╗" -ForegroundColor DarkCyan | |
Write-Host " ██╔════╝╚══██╔══╝██╔════╝██╔══██╗████╗ ████║ ██╔════╝╚██╗ ██╔╝████╗ ████║██║ ██║████╗ ██║██║ ██╔╝" -ForegroundColor DarkCyan | |
Write-Host " ███████╗ ██║ █████╗ ███████║██╔████╔██║ ███████╗ ╚████╔╝ ██╔████╔██║██║ ██║██╔██╗ ██║█████╔╝ " -ForegroundColor DarkCyan | |
Write-Host " ╚════██║ ██║ ██╔══╝ ██╔══██║██║╚██╔╝██║ ╚════██║ ╚██╔╝ ██║╚██╔╝██║██║ ██║██║╚██╗██║██╔═██╗ " -ForegroundColor DarkCyan |
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 ffmpeg | |
import numpy as np | |
import functools as f | |
from whispercpp import Whisper | |
from pathlib import Path | |
def convert_to_numpy_array(file_path: str | Path): | |
try: | |
out, _ = ( |
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
@ECHO OFF | |
CHCP 65001 | |
CLS | |
SET steamFolder=C:\Gaming\Stores\Steam\steamapps\common\ | |
SET gamesFolder=C:\Gaming\Games\ | |
GOTO:MAIN | |
:linkFolder |
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 requests | |
def validateYoutube(self, youtube_id): | |
response = requests.head('https://img.youtube.com/vi/' + youtube_id + '/mqdefault.jpg') | |
if response.status_code == 200: | |
return True | |
else: | |
return False |
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
const cpfPattern = /^(\d{11}|\d{3}\.\d{3}\.\d{3}-\d{2})$/ | |
export function validateCPF(value: string): boolean { | |
if (!value.match(cpfPattern)) return false | |
// Remove caracteres especiais e espaços | |
const unformattedCpf = value.replace(/[^A-z\d][\\^\s]?/g, '') | |
// Separa os dígitos verificadores do parâmetro | |
const checkDigits = unformattedCpf |
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
{ | |
"terminal.integrated.fontSize": 14, | |
"workbench.iconTheme": "material-icon-theme", | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.tabSize": 2, | |
"editor.fontSize": 15, | |
"editor.lineHeight": 26, | |
"editor.fontFamily": "Fira Code", |