In this guide we will cover two main cases:
- Ember specific library
- vendor library
The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, list = require('./routes/list.js') | |
var app = module.exports = express.createServer(); |
var db = require('../database.js'); | |
//creates a new entry | |
exports.getList = function(req, res){ | |
db.ListEntry.find(function(err, entries){ | |
if(err){ | |
console.log(err); | |
} | |
// console.log(entries); | |
// var content = {content: entries}; |
/* | |
Copyright (c) 2008 - 2016 MongoDB, Inc. <http://mongodb.com> | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
/* | |
Copyright (c) 2008 - 2016 MongoDB, Inc. <http://mongodb.com> | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
ember test --filter "some string to match in test title" | |
ember test --server --filter "something to match" |
import discord | |
import random | |
import time | |
import traceback | |
import os | |
from reply_generator import genReply | |
client = discord.Client() | |
client.login('******@**', '****') |
# Imports | |
import nltk.corpus | |
import nltk.tokenize.punkt | |
import nltk.stem.snowball | |
from nltk.corpus import wordnet | |
import string | |
from chatterbot.adapters.logic import LogicAdapter | |
class ApproximateSentenceMatchingAdapter(LogicAdapter): | |
""" |
# -*- coding: utf-8 -*- | |
# Imports | |
from .base_match import BaseMatchAdapter | |
import nltk.corpus | |
import nltk.tokenize.punkt | |
import nltk.stem.snowball | |
from nltk.corpus import wordnet | |
import string | |
from chatterbot.adapters import Adapter | |
from fuzzywuzzy import fuzz |
var express = require('express') | |
var bodyParser = require('body-parser') | |
var request = require('request') | |
var app = express() | |
var Mailjet = require('node-mailjet').connect( | |
process.env.MJ_APIKEY_PUBLIC, | |
process.env.MJ_APIKEY_PRIVATE | |
); | |
app.set('port', (process.env.PORT || 3030)) |