14 integrations support setting a custom URL/endpoint.
| Integration | Field | Required? | Notes |
|---|---|---|---|
openai |
url |
optional | Enables any OpenAI-compatible server |
cohere |
url |
optional | Shared across all Cohere task types |
| #!/usr/bin/env python3 | |
| """ | |
| multimodal_index.py — Client-side multimodal indexing for Elasticsearch 9.4.x | |
| Replicates what semantic_text + automatic multimodal support does in 9.5+: | |
| detects file type, calls the EIS inference API to embed it, and stores the | |
| vector in a dense_vector field for kNN search. | |
| Handles: PDFs (native or page-by-page image fallback), images, plain text. |
14 integrations support setting a custom URL/endpoint.
| Integration | Field | Required? | Notes |
|---|---|---|---|
openai |
url |
optional | Enables any OpenAI-compatible server |
cohere |
url |
optional | Shared across all Cohere task types |
| # Given a list of integers representing the heights of buildings, | |
| # return the maximum number of buildings that can be seen when | |
| # looking from the left. A building can see another building if | |
| # it is taller than all the buildings to its left. The height of | |
| # the tallest building is included in the count. | |
| def see_buildings_left(buildings) | |
| return 0 if buildings.empty? | |
| buildings.each_cons(2).inject(1) do |count, (a, b)| | |
| count += 1 if a < b |
| MIN_LENGTH = 3 | |
| def max_product(collection) | |
| raise "Minimum collection size is #{MAX_LENGTH}" if collection.length < MIN_LENGTH | |
| collection.sort.last(MIN_LENGTH).reduce(:*) | |
| end | |
| max_product([2, 4, 1, 3, -5, 6]) | |
| # => 72 |
| irb(main):001:1* def make_methods(&blk) | |
| irb(main):002:1* (1..100).each { |i| define_method("number_#{i}".to_sym) { blk.call(i) } } | |
| irb(main):003:0> end | |
| => :make_methods | |
| irb(main):004:0> | |
| irb(main):005:0> make_methods { |i| i } | |
| => 1..100 | |
| irb(main):006:0> | |
| irb(main):007:0> puts number_2 # => 2 | |
| 2 |
| 10c10 | |
| < __faceIjkPentToGeoBoundary | |
| --- | |
| > __faceIjkPentToCellBoundary | |
| 13a14 | |
| > __faceIjkToCellBoundary | |
| 15d15 | |
| < __faceIjkToGeoBoundary | |
| 25a26 | |
| > __gridDiskDistancesInternal |
| # Greedy Approach with Array#product | |
| # | |
| # $ time ruby a.rb | |
| # Found it! Your raffle number is f8ryt | |
| # real 2m12.019s | |
| # user 2m7.764s | |
| # sys 0m3.383s | |
| require 'digest' |
| defmodule Plane do | |
| defstruct is_fueled?: false, has_pilot?: false | |
| def take_off(plane) do | |
| case plane do | |
| %Plane{ is_fueled?: false } -> | |
| :needs_fuel | |
| %Plane{ has_pilot?: false } -> | |
| :needs_pilot | |
| _ -> |
During the next few weeks as we encourage all staff to work from home, we'll be trying out a new "final stage" of the hiring process.
Typically, we'd invite the candidate to the office to meet members of the engineering team in person, have lunch, and chat with the hiring manager.
The hard part (technical testing) is over and the focus is on getting to know each other. As such, our remote version of this process should focus on:
Intcode is a simple virtual machine language devised for the advent of code programming challenge. It is comprised of a sequence of integer values, separated by commas.
A quine is a program which outputs its own source code.
A Ruby VM implementation to run Intcode is available here: https://github.com/seanhandley/adventofcode2019/tree/master/ruby/vm