Skip to content

Instantly share code, notes, and snippets.

View gschammah's full-sized avatar

Gabriel Schammah gschammah

View GitHub Profile

Redo Rank

RedoRank assigns a numerical value to each profile with the purpose of "measuring" how "good" is the availability of a given profile, for this, it takes into account the value of a specific weekday and time, for example "Friday 21:30" and assigns it a probability p. This probability p is then weighted with the following factors:

  • Block Time (bt)
  • Party Size (ps)
require "r_core/booking/availability/slot"
module RCore
module Booking::Availability
module Stages
class ChannelSchedulesSource < RCore::Booking::Pipeline::Stage
def initialize(following, channel_rules:, restaurant_rules:, clock:, **)
super(following)
@channel_rules = channel_rules
<?xml version="1.0" encoding="UTF-8" ?>
<Response>
<Say voice="alice" language="es-MX">Hola Franco! te llamamos de restorando. Queriamos avisarle que el restaurante La Cabrera Express tiene 4 reservas para el día de hoy.</Say>
<Pause length="10"/>
<Say voice="alice" language="es-MX">Espero que tenga un buen dia.</Say>
</Response>
@gschammah
gschammah / query_syntax.md
Created February 5, 2013 02:26
query syntax

Query ideas

saved queries lists (defined outside the template)

without_discount = (discount = 0)
with_discount = (discount > 0)
with_discount_ar = (discount > 0, country.id = ar)
with_high_discount = (discount > 20)
in_argentina = (country.id = 'ar')
@gschammah
gschammah / conditions.citrus
Created January 30, 2013 05:04
Attributes matcher using Citrus
# conditions.citrus
grammar AttributesMatcher
# Allows this kinds of grammar and evaluates it
#
# ((name=gabriel)&(age>20))|((name!=gabriel)&(age<=30))
# name=gabriel
# name=gabriel&age=23
# (name=gabriel&age=24)|age>30