This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated from discussions in hashicorp/vagrant-vmware-desktop#22
First install Rosetta if not already done, this is needed to run x86 code:
defmodule PostgresHybridSearch do | |
@moduledoc """ | |
Postgres Hybrid Search | |
Loosely based on: | |
- https://github.com/pgvector/pgvector-python/blob/master/examples/hybrid_search_rrf.py | |
- https://github.com/Azure-Samples/rag-postgres-openai-python/blob/e30ea96ca11ca6578ca38d3428594bd98d704900/src/fastapi_app/postgres_searcher.py#L2 | |
- https://supabase.com/docs/guides/ai/hybrid-search | |
- https://github.com/toranb/rag-n-drop/blob/main/lib/demo/section.ex#L30 | |
""" |
This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated from discussions in hashicorp/vagrant-vmware-desktop#22
First install Rosetta if not already done, this is needed to run x86 code:
use actix::prelude::*; | |
/// Define message | |
#[derive(Message)] | |
#[rtype(result = "Result<String, std::io::Error>")] | |
struct WhatsYourName; | |
#[derive(Message)] | |
#[rtype(result = "()")] | |
struct SetYourName { |
I was drawn to programming, science, technology and science fiction | |
ever since I was a little kid. I can't say it's because I wanted to | |
make the world a better place. Not really. I was simply drawn to it | |
because I was drawn to it. Writing programs was fun. Figuring out how | |
nature works was fascinating. Science fiction felt like a grand | |
adventure. | |
Then I started a software company and poured every ounce of energy | |
into it. It failed. That hurt, but that part is ok. I made a lot of | |
mistakes and learned from them. This experience made me much, much |
defmodule MyApp.Redix do | |
@pool_size 5 | |
# How long, in seconds, to keep messages in the backlog | |
@max_backlog_age 604800 | |
# How many messages may be kept in the global backlog | |
@max_global_backlog_size 2000 | |
# How many messages may be kep in the per-channel backlog | |
@max_backlog_size 1000 |
These are my notes from deploying a boilerplate Rails app to AWS Lambda (yeah, you read that right) using Lamby. Basically this is me going through the Quick Start guide.
Questions/comments: https://twitter.com/heyjoshwood
This repo is my experiment in deploying a basic Phoenix app using the
release
feature from elixir 1.9 (https://elixir-lang.org/blog/2019/06/24/elixir-v1-9-0-released/)
and docker, via a multi-stage Dockerfile (https://docs.docker.com/develop/develop-images/multistage-build/)
leveraging bitwalker's docker images for Elixir and Phoenix.
The simplest way to manage Elixir versions is to use asdf
.
require 'aws-sdk' | |
require 'active_support' | |
require 'active_support/core_ext' | |
# http://docs.aws.amazon.com/sdkforruby/api/Aws/S3/Object.html#copy_to-instance_method | |
COPY_TO_OPTIONS = [:multipart_copy, :content_length, :copy_source_client, :copy_source_region, :acl, :cache_control, :content_disposition, :content_encoding, :content_language, :content_type, :copy_source_if_match, :copy_source_if_modified_since, :copy_source_if_none_match, :copy_source_if_unmodified_since, :expires, :grant_full_control, :grant_read, :grant_read_acp, :grant_write_acp, :metadata, :metadata_directive, :tagging_directive, :server_side_encryption, :storage_class, :website_redirect_location, :sse_customer_algorithm, :sse_customer_key, :sse_customer_key_md5, :ssekms_key_id, :copy_source_sse_customer_algorithm, :copy_source_sse_customer_key, :copy_source_sse_customer_key_md5, :request_payer, :tagging, :use_accelerate_endpoint] | |
Aws.config.update({ | |
region: 'us-east-1', | |
credentials: Aws::Credentials.new(AWS_ACCESS_KEY, AWS_SECRET_KEY) |
This is a Gistified version of https://gist.github.com/hfreire/5846b7aa4ac9209699ba#gistcomment-2833377