Coder Social home page Coder Social logo

tinyotter's Introduction

TinyOtter:

Slightly smaller than your average-sized otter.

Live Demo

Running the Python Scripts

To run the scripts in the Python folder, please be sure to first run pip install -r requirements.txt from that folder, which will ensure the PyMySql dependency is installed correctly.

Next, you'll need to open code_sample.py the file and change the values in default_login_data to contain the correct login credentials.

Then, run code_sample.py from the command line.

API

The serverless-tinyotter folder contains a serverless implementation of an API which exposes a single endpoint at api.tinyotter.com/getWordCounts. This will return a JSON object which contains an array of all words found in all utterances in the target database.

This is hosted on Amazon AWS using their Lambda, Cloudfront, and API Gateway features. It is also configured to prevent database information (login, password, etc.) from being accessed by unauthoriazed personnel.

JavaScript

The Javascript application compiled to the 'build' folder uses the exposed API to retrieve the unique word counts from AWS, which abstracts away the database call. It then uses React and Redux to render a webpage which allows the user to select which words to display, bsaed on the minimum number of times each word appears in the database.

Without an API, it would be extremely difficult to create a live application which securely accesses the database via JavaScript without exposing login information to the public.

Compiling, Running, and Syncing the JavaScript Application

  • If you don't have it, install node-js
  • Run npm install from the main project directory (with package.json)
  • Run npm start to start a local webserver, which will recompile the code after any changes.
    • Access this server at http://localhost:8080
  • Run npm run build to build the application to the /build directory.
  • Run npm run sync to sync the application to Amazon S3.
    • You probably won't be able to do this without my credentials!

tinyotter's People

Contributors

nesciosquid avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.