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
#pip install langchain openai chromadb tiktoken unstructured beautifulsoup4 | |
#how to run: | |
#export OPENAI_API_KEY="sk------" && python3 chatgpt.py https://yoursite.com | |
import sys | |
import requests | |
from bs4 import BeautifulSoup | |
from langchain.document_loaders import TextLoader | |
from langchain.indexes import VectorstoreIndexCreator | |
from langchain.chains import ConversationalRetrievalChain |
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 express = require("express"); | |
const ytdl = require("ytdl-core"); | |
const ffmpegPath = require("ffmpeg-static"); | |
const spawn = require("child_process").spawn; | |
const fs = require("fs"); | |
const app = express(); | |
const port = 3000; | |
const startMinute = 3; | |
const startSecond = 51; |
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 express = require('express'); | |
const ytdl = require('ytdl-core'); | |
const ffmpeg = require('fluent-ffmpeg'); | |
const fs = require('fs'); | |
const app = express(); | |
const port = 3000; | |
const startMinute = 3; | |
const startSecond = 51; | |
const endMinute = 4; |
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 { Storage } = require('@google-cloud/storage'); | |
const request = require('request'); | |
const { v4: uuidv4 } = require('uuid'); | |
const bucket = ''; | |
const storage = new Storage(); | |
const imageDownloader = (url) => { | |
const filename = uuidv4(); |
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 React, { useState, useEffect, useRef } from "react"; | |
import decodeQRCode from "jsqr"; | |
const QRCodeScanner = () => { | |
const [result, setResult] = useState(null); | |
const videoRef = useRef(null); | |
const canvasRef = useRef(null); | |
const scanInterval = 1000; | |
useEffect(() => { |
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 React, { useState } from "react"; | |
import { QrReader } from "react-qr-reader"; | |
import invertColor from "invert-color"; | |
const QRCodeScanner = () => { | |
const [result, setResult] = useState(null); | |
const [camera, setCamera] = useState(true); | |
const [color, setColor] = useState(true); | |
const handleScan = (data) => { |
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
.App { | |
background-color: #282c34; | |
display: flex; | |
justify-content: center; | |
height: 100vh; | |
align-items: center; | |
} | |
.login-button { | |
width: 200px; |
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 { useState, useEffect } from 'react'; | |
import { database } from './'; | |
import UserStorage from '../shared/UserStorage'; | |
export async function save(data) { | |
const { uid } = await UserStorage.getUser(); | |
const request = await database.ref(`user/${uid}/decks`); | |
await request.push({ ...data }); | |
} |
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
<div id="order-print" style="display: none; width: 80mm; font-family: Courier New;"> | |
<hr> | |
<h3 style="font-size: 40px; font-family: Courier New;">PEDIDO #77 - 15/11/2018 14:28</h3> | |
<h4 style="font-size: 40px; font-family: Courier New;">DADOS DO CLIENTE</h4> | |
<div style="display: flex; flex-direction: column;"> | |
<strong style="margin-bottom: 5px; font-family: Courier New; font-size: 30px;">Nome: Nikollas Tenutes Betiol</strong><strong style="margin-bottom: 5px; font-family: Courier New; font-size: 30px;">Tel.: (65) 99218-9772</strong><strong style="margin-bottom: 5px; font-family: Courier New; font-size: 30px;">End.: Av Pantaneira, 06</strong><strong style="margin-bottom: 5px; font-family: Courier New; font-size: 30px;">Compl.: -</strong><strong style="margin-bottom: 5px; font-family: Courier New; font-size: 30px;">Bairro: Costa Verde</strong><strong style="margin-bottom: 5px; font-family: Courier New; font-size: 30px;">Cidade.: Cuiabá-MT</strong> | |
<h4 style="font-size: 40px; font-family: C |
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
{ | |
"order": { | |
"id": 14, | |
"created_at": "2018-10-18T13:35:20.186-03:00", | |
"updated_at": "2018-10-18T13:35:20.186-03:00", | |
"number": 8, | |
"status": "in_progress", | |
"status_i18n": "Em aberto", | |
"customer": { | |
"id": 5, |
NewerOlder