- Create a new directory with these three files (requirements.txt, main.py, README.md)
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python main.py
- Update
main()
to run the example prompt chains
Discover gists
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
<!-- EDITE O ARQUIVO app/resources/system_welcome_pt.html --> | |
<!--[main]--> | |
<style> | |
.imagem { | |
position: absolute; | |
margin : auto; | |
height : 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
<?php | |
# 1 - SALVA O VALOR NO localStorage | |
$nome = 'Fabricio'; | |
TScript::create("localStorage.setItem('nome', '{$nome}')"); | |
# 2 - PEGA O VALOR E ENVIAR PARA O CAMPO OCULTO "THidden" DO FORMULÁRIO | |
TScript::create(" | |
var nome = localStorage.getItem('nome'); | |
if (nome != 'undefined') {document.getElementById('nome').value = nome; } |
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
Pieces for Developers | |
https://pieces.app/ | |
EXTENSÃO VSCODE: | |
https://marketplace.visualstudio.com/items?itemName=MeshIntelligentTechnologiesInc.pieces-vscode | |
SALVAR SNIPPET: SHIFT + CTRL + V | |
BUSCAR SNIPPET: CTRL + K |
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
#! /bin/sh | |
set -e | |
# Save the $timeout and $timeout_style values set by /etc/grub.d/00_header | |
# before /etc/grub.d/30_os-prober messes them up. | |
cat << EOF | |
set timeout_bak=\${timeout} | |
set timeout_style_bak=\${timeout_style} | |
EOF |
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
<?php | |
$tamanho = intval(filesize($arquivo) / (1024 * 1024)); | |
if ($tamanho > 50) | |
{ | |
if (file_exists($arquivo)) {unlink($arquivo)} | |
new TMessage('error', 'TAMANHO MÁXIMO DE ARQUIVO ATÉ 50 MEGAS'); | |
return; | |
} |
You need to do this if you try this command:
ssh -T git@github.com
and you get something that says
git@github.com: Permission denied (public key).
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
""" | |
Structlog example configuration with FastAPI. | |
Features: | |
- async bound logger | |
- contextvars to log request-id and other meta data | |
- custom format for default logging loggers and structlog loggers | |
""" | |
import asyncio | |
import logging |
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
<?php | |
class EmpresaForm extends TPage | |
{ | |
public function __construct( $param ) | |
{ | |
parent::__construct(); | |
parent::add($container); |
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
<?php | |
$this->form->setEditable(false); |
NewerOlder