Map [1]
Operation | Time Complexity |
---|---|
Access | O(log n) |
Search | O(log n) |
Insertion | O(n) for <= 32 elements, O(log n) for > 32 elements [2] |
Deletion | O(n) for <= 32 elements, O(log n) for > 32 elements |
defmodule ElixirAiAgent do | |
@moduledoc """ | |
A minimal ai agent implementation showcasing how simple it is to build AI agents in Elixir. | |
Combines agent logic and server management in one module. | |
""" | |
use GenServer | |
alias LangChain.Chains.LLMChain | |
alias LangChain.Message |
Mix.install( | |
[ | |
{:ash, "~> 3.0"}, | |
{:ash_json_api, "~> 1.0"}, | |
{:plug_cowboy, "~> 2.5"}, | |
{:open_api_spex, "~> 3.16"} | |
], | |
consolidate_protocols: false | |
) |
ARG GOPROXY | |
##### Temporal server with Auto-Setup ##### | |
FROM temporalio/ui:2.27.2 as ui | |
FROM temporalio/server:1.24.1.0 as server | |
WORKDIR /etc/temporal | |
FROM temporalio/auto-setup:1.24.1.0 as final |
# lib/party_web/components/example_component.ex | |
defmodule PartyWeb.ExampleComponent do | |
@moduledoc """ | |
An example LiveComponent under test. | |
""" | |
use Phoenix.LiveComponent | |
def render(assigns) do | |
~H""" | |
<div> |
.env
file for me sparing me the need to pollute my session with environment variables.
I've been using Fish shell for years which is great and all, but one thing that has got me frustrated is using it with .env
files.
When attempting to run source .env
in a project, I usually encounter this problem:
// Utility types | |
type Length<T extends any[]> = T extends { length: infer L } ? L : never; | |
type BuildTuple<L extends number, T extends any[] = []> = | |
T extends { length: L } | |
? T | |
: BuildTuple<L, [...T, any]>; | |
type MultiAdd<N extends number, A extends number, I extends number> = | |
I extends 0 |
tmux, like other great software, is deceptive. On the one hand, it's fairly easy to get set up and start using right away. On the other hand, it's difficult to take advantage of tmux's adanced features without spending some quality alone time with the manual. But the problem with manuals is that they aren't geared toward beginners. They are geared toward helping seasoned developers and computer enthusiasts quickly obtain the
const axios = require('axios') | |
/* ... */ | |
const params = new URLSearchParams() | |
params.append('name', 'Akexorcist') | |
params.append('age', '28') | |
params.append('position', 'Android Developer') | |
params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/') | |
params.append('awesome', true) |