Skip to content

Instantly share code, notes, and snippets.

View mattflo's full-sized avatar

Matt Florence mattflo

View GitHub Profile
@mattflo
mattflo / chatbot_talk.md
Created September 11, 2023 19:16
Building a conversational recommender system with LangChain and OpenAI

Building a conversational recommender system with LangChain and OpenAI

Denver-Boulder AI Tinkerers Meetup - September 12th, 2023

I'll explain how we built a virtual concierge for one of the largest hotel chains in the world. We set out to create a chatbot with three main goals:

  1. Style: Use brand voice.
  2. Content: Recommend highly curated niche "finds" to explore in the area.
  3. Safety: Prevent the chatbot from talking about sensitive topics.
@mattflo
mattflo / DataMunger.iced
Last active August 29, 2015 13:56
DataMunger.iced
# The data munging kata - http://codekata.com/kata/kata04-data-munging/
fs = require("fs")
readline = require("readline")
footballParseJob =
file: "./football.dat"
max_column: 6
min_column: 8
id: 1
@mattflo
mattflo / gist:8164428
Last active January 1, 2016 15:29
Google analytics code snippet for ghost blog.
//These lines were added in core/server/helpers/index.js
//on line 225, towards the end of the function: ghost.registerThemeHelper('ghost_head'..
var ga_code= "<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ \
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), \
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) \
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');"
head.push(ga_code);
head.push("ga('create', '[your analytics site id]', '[your domain]');");
HOMEBREW_VERSION: 0.9.4
ORIGIN: (none)
HEAD: a14e1f21053711ac73692a6d27e8b952fa9febd4
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.8.3-x86_64
Xcode: 4.6.1
CLT: 4.6.0.0.1.1362189000
GCC-4.2: build 5666
These are some features. They can be implemented in any order you prefer.
* an elevator responds to calls containing a source floor and direction
* an elevator delivers passengers to requested floors
* an elevator doesn't respond immediately. consider options to simulate time
* elevator calls are queued not necessarily FIFO
* you may validate passenger floor requests
* you may implement current floor monitor
* you may implement direction arrows
* you may implement doors (opening and closing)
# node, jasmine, coffeescript, and rake installed/configured using
# steps outlined at this website:
# http://brizzled.clapper.org/id/117/index.html
# gem install guard
# gem install guard-shell
# guard init
# then put the following in GuardFile
# guard :shell do
# watch('.*') {`rake`}
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
namespace describe_MacalaKata
{
public class Mancala : List<int>
{
public void Sow(int well)
@mattflo
mattflo / primeskata.coffee
Created January 24, 2012 23:08
exploring coffeescript
# node, jasmine, coffeescript, and rake installed/configured using
# steps outlined at this website:
# http://brizzled.clapper.org/id/117/index.html
# gem install guard
# gem install guard-shell
# guard init
# then put the following in GuardFile
# guard :shell do
# watch('.*') {`rake`}
primes = function(number){
divisor = 2;
while (divisor<number)
{
if (number % divisor == 0) return [divisor].concat(primes(number/divisor));
divisor = divisor + 1;
}
if (number == 1) return [];
@mattflo
mattflo / PokerKata.cs
Created December 1, 2011 02:21
Poker Kata
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
namespace PokerKata
{
[TestFixture]
public class describe_Hand
{
[Test]