This file contains 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
const parallelApis = Machine({ | |
id: "Parallel-apis", | |
type: "parallel", | |
states: { | |
userInfo: { | |
initial: "apiCall", | |
states: { | |
apiCall: { | |
on: { | |
RESPONSE: "buildUserMap" |
This file contains 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
const patientSelectionMachine = Machine({ | |
id: "patientSelector", | |
initial: "pickPatients", | |
states: { | |
pickPatients: { | |
on: { | |
FROM_MEASURE: "measure", | |
FROM_ADT: "activity", | |
FROM_CSV: "customCsv" | |
} |
This file contains 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 nltk | |
from nltk.corpus import stopwords | |
text = "Hi, Laptops from Hewlett-Packard aren't running MacOS. We would love an Apple Mac for our work." | |
print('Word tokenization - ') | |
word_token = nltk.word_tokenize(text) | |
print(word_token) |
This file contains 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 flask import Flask, request,jsonify | |
from pymongo import MongoClient | |
from bson.objectid import ObjectId | |
from datetime import datetime | |
app = Flask(__name__) | |
client = MongoClient() | |
db = client.blogdb | |
blogs = db.blogs |
This file contains 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 flask import Flask | |
from flask import request | |
import json | |
import requests | |
import hashlib as hasher | |
import datetime as date | |
node = Flask(__name__) | |
# Define what a Snakecoin block is | |
class Block: |
This file contains 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 code is a sample code written to explain MongoDB and how to integrate it in Flask. | |
For full blog visit - http://www.eazydevelop.com/2018/03/mongodb-and-integration-with-flask.html | |
''' | |
from flask import Flask, request, jsonify | |
from pymongo import MongoClient | |
import pymongo |