Skip to content

Instantly share code, notes, and snippets.

View jjn1056's full-sized avatar

John Napiorkowski jjn1056

View GitHub Profile
[info] Application powered by Catalyst 5.90130
main: seed = 1683661395
llama_model_load: loading model from 'ggml-alpaca-7b-q4.bin' - please wait ...
llama_model_load: ggml ctx size = 6065.34 MB
llama_model_load: memory_size = 2048.00 MB, n_mem = 65536
llama_model_load: loading model part 1/1 from 'ggml-alpaca-7b-q4.bin'
llama_model_load: .................................... done
llama_model_load: model size = 4017.27 MB / num tensors = 291
system_info: n_threads = 4 / 16 | AVX = 1 | AVX2 = 1 | AVX512 = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | VSX = 0 |
SELECT COUNT( * ) FROM (
SELECT
id,
person_id as author_id,
? as reader_id,
title,
content,
created_at
FROM posts
) "me": '333'
package Example::Model::RegistrationInterfaceModel;
use Valiant::IM::Form;
field user_name => type=>'InputGroup', %opts;
field first_name => type=>'InputGroup', %opts;
field last_name => type=>'InputGroup', %opts;
1;
package Example::Controller::Register;
use Moose;
use MooseX::MethodAttributes;
use Example::Syntax;
extends 'Example::Controller';
has registration => (is=>'ro', lazy=>1, default=>sub($self) { $self->ctx->users->registration } );
has view => (is=>'ro', lazy=>1, default=>sub($self) { $self->ctx->view('HTML::Register', registration => $self->registration } );
package Example::View::HTML::Todos;
use Moose;
use Example::Syntax;
use Valiant::HTML::TagBuilder 'div', 'fieldset', 'table', 'thead','trow', 'tbody', 'td', 'th', 'a', 'b', 'u', ':utils';
use Valiant::HTML::Form 'form_for';
use CatalystX::Wire 'wire', 'Controller';
extends 'Example::View::HTML';
package MyApp::Controller::Account;
sub update_account
:Does(RequestModel)
:RequestModel(AccountRequest)
:Does(RenderErrors)
:Errors(BadCSRFToken, InvalidJSON)
($self, $c, $request)
{
## etc
package Example::Controller::Register;
use Moose;
use MooseX::MethodAttributes;
use Example::Syntax;
extends 'Example::ControllerPerRequest',
'Example::ViewModelController';
has registration => (
package Example::Controller::Todos;
use Moose;
use MooseX::MethodAttributes;
use Example::Syntax;
use CatalystX::Controller::ACCEPT_CONTEXT::DependencyInjectionImports;
use HTTP::Status 'HTTP_OK', 'HTTP_BAD_REQUEST';
use Example::Types 'TodoResultset', 'TodoResult';
extends 'CatalystX::Controller::ACCEPT_CONTEXT';
package Example::Controller::Todos;
use Moose;
use MooseX::MethodAttributes;
use Example::Syntax;
extends 'Catalyst::Controller';
sub root :Chained(/auth) PathPart('todos') CaptureArgs(0) ($self, $c) {
$c->send(my $list = $c->user->todos);
package Example::Controller::Todos;
use Moose;
use MooseX::MethodAttributes;
use Example::Syntax;
extends 'Catalyst::Controller';
sub root :Chained(/auth) PathPart('todos') CaptureArgs(0) ($self, $c) { }