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
// OUTPUT FROM WHISPER CAPTIONS | |
/* | |
const captions = [ | |
{ | |
"start": 22.64, | |
"end": 29.080000000000002, | |
"text": " rolas en el top 10, hubo un tiempo que tenía en Spotify las 5" | |
} | |
] |
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
export const getImageProfileMicrosoft = (accessToken: string) => { | |
const headers = new Headers(); | |
headers.append("Authorization", `Bearer ${accessToken}`); | |
fetch("https://graph.microsoft.com/v1.0/me/photo/$value", { | |
method: "GET", | |
headers: headers, | |
}) | |
.then((response) => { | |
if (!response.ok) { |
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 axios from 'axios'; | |
import fs from 'fs'; | |
const url = '<your-pre-signed-url>'; | |
const filePath = '<path-to-your-mp4-file>'; | |
const fileStream = fs.createReadStream(filePath); | |
axios.put(url, fileStream, { | |
headers: { |
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
version: "3.9" | |
services: | |
grafana: | |
image: grafana/grafana | |
ports: | |
- 3000:3000 | |
prometheus: | |
image: prom/prometheus | |
ports: |
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
version: "3.9" | |
services: | |
grafana: | |
image: grafana/grafana | |
ports: | |
- 3000:3000 | |
prometheus: | |
image: prom/prometheus | |
ports: |
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 { BlobServiceClient } from "@azure/storage-blob"; | |
import { config } from "dotenv"; | |
config(); | |
const blobService = BlobServiceClient.fromConnectionString( | |
process.env.AZURE_STORAGE_CONNECTION_STRING | |
); | |
// Methods for blobs (Files) |
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 os import path | |
import pickle | |
from google.auth.transport.requests import Request | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
from googleapiclient.discovery import build | |
# IF YOU MODIFY THE SCOPE DELETE THE TOKEN.TXT FILE | |
SCOPES = ['https://www.googleapis.com/auth/calendar.events', | |
'https://www.googleapis.com/auth/calendar'] |
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 os import getenv | |
from azure.storage.blob import BlobServiceClient | |
blob_service_client = BlobServiceClient.from_connection_string( | |
getenv("AZURE_STORAGE_CONNECTION_STRING")) | |
### Methods for blobs (Files) | |
def upload_blob(filename: str, container: str, data: BinaryIO): | |
try: |
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 fastapi import FastAPI, UploadFile, File, BackgroundTasks | |
from fastapi.responses import JSONResponse | |
from os import getcwd | |
from PIL import Image | |
app = FastAPI() | |
PATH_FILES = getcwd() + "/" | |
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 { Fragment, useState } from "react"; | |
function App() { | |
const [Autos] = useState(["volvo", "saab", "mercedes", "audi"]); | |
const [ValueSelected, setValueSelected] = useState(0); | |
const toggle = (AutoSeleccionado) => { | |
const indexSelected = Autos.findIndex((auto) => auto === AutoSeleccionado); | |
setValueSelected(indexSelected); |
NewerOlder