This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import pickle | |
| from sklearn.feature_extraction.text import TfidfVectorizer | |
| from sklearn.naive_bayes import MultinomialNB | |
| from sklearn.pipeline import Pipeline | |
| def train(X, y,outpath=None, verbose=True): | |
| def build(X, y=None): | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sklearn.feature_extraction.text import TfidfVectorizer | |
| from sklearn.naive_bayes import MultinomialNB | |
| from sklearn.pipeline import Pipeline | |
| from NLTKPreprocessor import NLTKPreprocessor | |
| import os | |
| import json | |
| PATH = "new.model" | |
| model = Pipeline([ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "text": "How would you describe yourself?", | |
| "intentName": "personal-bio" | |
| }, | |
| { | |
| "text": "When is your birthday?", | |
| "intentName": "personal-birthday" | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var colors = { | |
| 1:"#ff1123", | |
| 2:"#000000", | |
| 3:"#010101" | |
| } | |
| function getRandomInt(min, max) { | |
| return Math.floor(Math.random() * (max - min + 1)) + min; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * This is a version of Facebook's React Conditional Rendering | |
| * example modified to support firebase authentication. | |
| * https://facebook.github.io/react/docs/conditional-rendering.html | |
| */ | |
| import React, { Component, PropTypes } from 'react'; | |
| import * as firebase from 'firebase'; | |
| function UserAvatar(props) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| import logging.handlers | |
| import time | |
| logging.basicConfig(level=logging.DEBUG, | |
| format='%(asctime)s %(levelname)-8s %(message)s') | |
| logging.getLogger().addHandler(logging.handlers.DatagramHandler('localhost', 8045)) | |
| while True: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pymongo | |
| import sys | |
| connection = pymongo.Connection("mongodb://localhost", safe=True) | |
| db=connection.nooora | |
| coll = db.nooracollection | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Michael, 29 | |
| Andy, 30 | |
| Justin, 19 | |
| Arun, 20 | |
| Alfred, 22 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Imports iTextSharp.text.pdf | |
| Imports iTextSharp.text | |
| Imports System.IO | |
| Imports iTextSharp.text.io | |
| Imports System.Drawing | |
| Imports System.Drawing.Imaging | |
| Imports System | |
| Imports System.Collections.Generic | |
| Imports System.Windows.Forms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "currencycode": "Afghani", | |
| "code": "AFN" | |
| }, | |
| { | |
| "currencycode": "Euro", | |
| "code": "EUR" | |
| }, | |
| { |