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
| """ | |
| Example of using Keras to implement a 1D convolutional neural network (CNN) for timeseries prediction. | |
| """ | |
| inData.head() | |
| def buildConvModel(nFilters,lenFilters,windowSize,nFeat): | |
| model = Sequential(( | |
| #Layer 1: 1D Convolution |
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
| Verifying my Blockstack ID is secured with the address | |
| 1PNzdnhcrJtu5fdu7DEfiee7MBD8A1H24h https://explorer.blockstack.org/address/1PNzdnhcrJtu5fdu7DEfiee7MBD8A1H24h |
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
| 04642eb14538f598ca95458a2e38d3360ce813394feb09c36b21b511416f489c62bcbd539f4584d194bd5f9ff8fa04c5fb70284880298a5bbd89a38807c2deebd1;elaberge |
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 as logger | |
| from flask import Blueprint, jsonify, request | |
| from .GoodReadsGraph import BuildGraph | |
| main = Blueprint('main', __name__) | |
| logger.debug("App starting") | |
| # Build our Graph | |
| BigGraph, titles_dict = BuildGraph() | |
| logger.debug("Graph is built service") | |
| output_URL = "" | |
| @main.route('/input_book', methods=['POST']) |
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 as logger | |
| from flask import Flask | |
| def create_app(): | |
| app = Flask(__name__) | |
| from .app import main | |
| app.register_blueprint(main) | |
| logger.debug("App registered") | |
| return app |
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
| class Graph(object): | |
| def __init__(self, reads): | |
| """ | |
| """ | |
| # Edges in our graph | |
| self.reads = reads | |
| def _find_a_user(self, input_User, debug=False): | |
| """ |
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
| class Read(object): | |
| def __init__(self, User, Book, Author, rating=None): | |
| """ | |
| The edge connecting User, Book, and Author nodes | |
| """ | |
| if Book not in User.shelf: | |
| User.shelf.append((Book, rating)) # User read this book and rated it. | |
| if Author not in User.author_list: | |
| User.author_list.append(Author) | |
| self.user = User |
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
| class User(object): | |
| def __init__(self,user_id): | |
| self.user_id = user_id | |
| self.shelf = [] # Books read | |
| self.author_list = [] # Authors read | |
| class Book(object): | |
| def __init__(self, book_id, Author, ratings_5, popularity, image_url): | |
| self.book_id = book_id | |
| self.author = Author | |
| self.author_id = Author.author_id |
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 React, {Component} from "react"; | |
| import './App.css'; | |
| import { Container } from "semantic-ui-react"; | |
| import { BookEntry } from "./components/BookEntry"; | |
| import { GrabBook } from "./components/GrabBook"; | |
| // Want to build this App? | |
| // $ npm start | |
| // Inside the directory with the src/ directory | |
| function App() { | |
| return ( |
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 React, { useState } from 'react'; | |
| import { Form, Input, Button } from 'semantic-ui-react'; | |
| export const BookEntry = () => { | |
| const [title, setTitle] = useState(''); // Empty String | |
| return ( | |
| <Form> | |
| <Form.Field> | |
| <Input |
OlderNewer