currently software engineer at ๐ sourcegraph.
previously wrote code at ๐ riot games, ๐ก sumus, ๐ข rtrade, the ๐ bc genome sciences centre, and ๐๏ธ nwplus. studied mathematics at ๐ ubc, where i helped run ๐ ubc launch pad.
:poultry_leg: a Facebook Messenger bot in Golang for all your calorie-tracking needs
License: MIT License
currently software engineer at ๐ sourcegraph.
previously wrote code at ๐ riot games, ๐ก sumus, ๐ข rtrade, the ๐ bc genome sciences centre, and ๐๏ธ nwplus. studied mathematics at ๐ ubc, where i helped run ๐ ubc launch pad.
change:
// function : Does this, this, that
to:
// function does this, this, that
in accordance with standard godoc practices (oops)
So we can see the contents of our database tables without doing that janky command line stuff
Can use heroku pg:psql
, don't really need this endpoint (yet)
I am getting the following error.
All configuration variables in EnvConfig must be set in your deployment environment
Can someone print their heroku config
? I have FB_PAGE_ID, FB_TOKEN, HEROKU_URL.
timezone
: signed integer value relative to GMT, e.g. "-7"name
: some string, e.g. "Robert"Todo:
models.go
QuickReply
is one option, but need a way to track more complicated responses, ie:
user: I ate cookies today
calories: How many cookies?
user: 3
// make use of response "3" within the context of "I ate cookies today"
And update our API and Handlers to allow for this.
Likely have to implement some sort of "state management", possibly in memory but maybe in database would be better - should ideally take into account:
context
struct already available in package bot
(expand on functionality of that struct if needed)e.g. update my timezone, delete my data, etc
also somehow estimate caloric worth
ask for feedback?
dependent on #31
Travis should:
Add thoughts to the wiki
Reset daily calorie count based on user timezone (possibly at same time the summaries are sent out) and pipe data into a new activity_archive
table
Possibly also include functions for pulling from archive and making this data upon request from the user
Become familiar with syntax, structure, etc
Add SQL query function to server.go
that sums the caloric value of all of a user's events
https://wger.de/en/software/api
Possibly implement together with #35 as a single "activity search" component that takes parameter search string and type
for sending scheduled summaries
Code coverage report is incorrect hm
see the wiki for schemas
add to server.go
reference the example function I added, and use the example handler to test
see the wiki for schemas
add to server.go
reference the example function I added, and use the example handler to test
Some way to check that the database tables match what we expect when the app starts, and crash the app if it doesn't
Probably put it in server.go and call it from main
What should this bot be able to do?
What kind of features do we want to support?
dep is on track to replace Glide as the de-facto dependency manager for Go
e.g. when I say:
Hey Calories! I ate a cookie today.
should recognize that this is a command for eat
which is passed to a handler that adds a positive-calory-value entry
Look into POS recognition APIs:
A handler in bot/commands.go
that determines what part of a message's content refers to a food, estimate its caloric value and insert it as an entry into database
ask for feedback and train bot???
based on user timezone, send messages to registered users every day with daily summaries
possibly ask user to when they would like to receive summaries (early evening vs late evening)
dependent on #29
https://ndb.nal.usda.gov/ndb/doc/apilist/API-FOOD-REPORT.md
Possibly implement together with #36 as a single "activity search" component that takes parameter search string and type
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.