Skip to content

Instantly share code, notes, and snippets.

View betiol's full-sized avatar
🏠
Working from home

Nikollas Betiol betiol

🏠
Working from home
View GitHub Profile
@betiol
betiol / chatgpt.py
Created December 11, 2023 13:51
Chat GPT with your data
#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
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;
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;
@betiol
betiol / image-downloader.js
Created October 4, 2023 13:48
Image Downloader
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();
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(() => {
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) => {
.App {
background-color: #282c34;
display: flex;
justify-content: center;
height: 100vh;
align-items: center;
}
.login-button {
width: 200px;
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 });
}
<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
@betiol
betiol / array.js
Last active October 24, 2018 01:17
{
"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,