Skip to content

Instantly share code, notes, and snippets.

configuration = mparticle.Configuration()
configuration = mparticle.Configuration()
configuration.api_key = settings.MPARTICLE_API_KEY
configuration.api_secret = settings.MPARTICLE_API_SECRET
batch = mparticle.Batch()
batch.environment = 'production'
batch.user_identities = mparticle.UserIdentities(customerid=profile_id)
batch.events = [mparticle.AppEvent(
def paths_from_to(graph, source, dest):
"Find paths in graph from vertex source to vertex dest."
a = graph.get_adjlist()
n = source.index
m = dest.index
return adjlist_find_paths(a, n, m)
@maxgutman
maxgutman / adsnative_devops_coding_challenge.md
Last active October 30, 2018 13:05
AdsNative: Devops Coding Challenge

AdsNative: Devops Coding Challenge

Get this simple Flask app up and running on a Vagrant VM using your known best devops practices as well as the instructions in the guidelines below. You must use Ansible as your provisioner to install and configure everything. When you're done, we should be able to type vagrant up and our app will be running and reachable on http port 80 at http://192.168.33.15 and http://devops.adsnative.com

Guidelines:

  • The provisioner should clone this github repo into the VM under /webapps/adsnative
  • You should be able to find what system packages are needed by looking through the app
  • You should not need to change the app code in any way
  • The app should be running as a non-privileged user
  • The app should be automatically restarted if crashes or is killed
# bash
alias rr=". ~/.bash_profile"
# django
alias dm="./manage.py"
alias dmt="dm test"
function dr() {
COMMAND='./manage.py runserver'