# create dir
mkdir my-python-version
cd my-python-version
# Init pipenv with the desired Python version
pipenv install --python 3.12
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 type { ApplicationService } from '@adonisjs/core/types' | |
| export default class SocketProvider { | |
| constructor(protected app: ApplicationService) {} | |
| /** | |
| * Register bindings to the container | |
| */ | |
| register() {} |
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 off IETF draft, https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/ | |
| create or replace function uuid_generate_v7() | |
| returns uuid | |
| as $$ | |
| begin | |
| -- use random v4 uuid as starting point (which has the same variant we need) | |
| -- then overlay timestamp | |
| -- then set version 7 by flipping the 2 and 1 bit in the version 4 string | |
| return encode( |
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 { Worker } from 'worker_threads' | |
| import path from 'path' | |
| import Instance from '#models/Instance' | |
| import app from '@adonisjs/core/services/app' | |
| export class WhatsappManager { | |
| isBooted = false | |
| workers = new Map() | |
| constructor() { |
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 { WAMessage, downloadMediaMessage as downloadMediaSource } from '@whiskeysockets/baileys' | |
| import { saveMediaLocally } from '#helpers/general/saveMediaLocally' | |
| import { deepSearchKey } from '@igortrindade/lazyfy' | |
| import mime from 'mime-types' | |
| import logger from '@adonisjs/core/services/logger' | |
| import { MediaDownloadResult } from './types.js' | |
| const getMediaExtension = (message: WAMessage): { mimetype: string, extension: string } => { | |
| const mimetype = deepSearchKey(message, 'mimetype') as string |
#Qualidade razoavel - arquivo menor
ffmpeg -i \
input_tutorial.mp4 \
-vf "scale='min(1080,iw)':-2" \
-c:v libx264 \
-profile:v baseline \
-level 3.1 \OlderNewer