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 { api } from "@/services"; | |
import { useQuery } from "@tanstack/react-query"; | |
export type Document = { | |
id: string; | |
title: string; | |
description: string; | |
link: string; | |
created_at: Date; | |
updated_at: Date; |
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
class DocumentsController < ApplicationController | |
before_action :set_document, only: %i[ show update destroy ] | |
# GET /documents | |
def index | |
@documents = Document.all | |
render json: @documents | |
end |
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 os | |
import time | |
import threading | |
import firebase_admin | |
from dotenv import load_dotenv | |
from firebase_admin import firestore, credentials | |
from langchain.schema import AIMessage | |
from flask import Flask, request |
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 functions = require("firebase-functions"); | |
require("dotenv").config(); | |
exports.answerQuestion = functions.firestore | |
.document("/questions/{questionId}") | |
.onCreate((snap, context) => { | |
const data = snap.data(); | |
functions.logger.log( |
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
#include <Arduino.h> | |
#include <SPI.h> | |
#include <SD.h> | |
#include "AutoAnalogAudio.h" | |
/******** User Config ************************************/ | |
#define SD_CS_PIN 5 | |
#define AUDIO_DEBUG |
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
#include "SD.h" | |
#include "utils.h" | |
void setup(){ | |
Serial.begin(115200); | |
if(!SD.begin()){ | |
Serial.println("Card Mount Failed"); | |
return; | |
} | |
uint8_t cardType = SD.cardType(); |
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
/* | |
File Name: spy-recorder.ino | |
Created on: 7-Jan-2021 | |
Author: Noyel Seth ([email protected]) | |
https://circuitdigest.com/microcontroller-projects/simple-arduino-voice-recorder-for-spy-bug-voice-recording | |
*/ | |
/* | |
Hardware Pinout Connection | |
Arduino Nano SD Pin | |
5v ------------ VCC |
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 { Configuration, OpenAIApi } = require("openai"); | |
const configuration = new Configuration({ | |
apiKey: process.env.OPENAI_API_KEY, | |
}); | |
const openai = new OpenAIApi(configuration); | |
const response = await openai.createCompletion({ | |
model: "text-davinci-003", | |
prompt: "escreva um texto sucinto sobre a Microsoft e seu CEO, informando dados de localização atual e telefone.\n\nA Microsoft é uma empresa americana com sede em Redmond, Washington, fundada em 1975 por Bill Gates e Paul Allen. É a maior empresa de software do mundo, oferecendo produtos e serviços como Windows, Office, Skype, Xbox, Bing e muito mais. O CEO da Microsoft é Satya Nadella, que assumiu o cargo em 2014. Ele tem uma forte visão de liderança para ajudar a empresa a crescer e ganhar mercado. A Microsoft possui escritórios em todo o mundo, incluindo em São Francisco, CA, EUA, e em Londres, Reino Unido. O número de telefone da Microsoft é: +1 425 882 8080.\n\nNome: Microsoft\nCEO:", |
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
select agreement_uuid, term->'uuid' from new_agreements | |
CROSS JOIN LATERAL jsonb_array_elements(royalties_terms) term | |
where id = 26 | |
create type royalties_terms as (uuid text); | |
select term.*, agreement_uuid as new_agreement_uuid from new_agreements | |
CROSS JOIN LATERAL jsonb_populate_recordset(null::agreements_royalty_terms, royalties_terms) term | |
where id = 26 | |
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
'+5533991998109'.replace(/[\S](?=[\w]{4})/g, 'X'); |
NewerOlder