text:
<file_sep>import { combineReducers } from 'redux';
import tourList from './tourList';
import detailView from './detailView';

export default combineReducers({
  tourList,
  detailView,
});
<file_sep>import { connect } from 'react-redux';

import Home from '../presenters/home';
import { fetchTourList, fetchTour } from '../actions/index';

const mapStateToProps = (state) => {
  {
    const { data, isFetched } = state.tourList;
    return {
      tourList: data,
      isFetched,
    };
  }
};

const mapDispatchToProps = (dispatch) => {
  return {
    genImage: () => {
      fetchTourList(dispatch);
    },
    onClick: (url) => {
      fetchTour(dispatch, url);
    },
  };
};

export default connect(
  mapStateToProps,
  mapDispatchToProps,
)(Home);
<file_sep># Trip_guru_assesment

*Steps to follow*
- Clone the repository
- Change path to the cloned repo and do *npm install*
- Run the app by using *npm start*
- The app will open in the browser at localhost:3000
<file_sep>import { connect } from 'react-redux';
import DetailView from '../presenters/detailView';

const mapStateToProps = (state) => {
  {
    const { data, isFetched } = state.detailView;
    return {
      tourDetails: data,
      isFetched,
    };
  }
};

const mapDispatchToProps = () => {
  return {
  };
};

export default connect(
  mapStateToProps,
  mapDispatchToProps,
)(DetailView);

languages: Markdown JavaScript


text:
<repo_name>RegToss/Vue-demos<file_sep>/README.md
# Vue-demos

##demo1： Vue实现简易的留言板
可以实现简单的增加删除功能。

##demo2：Vue仿百度下拉菜单
使用vue-resource库，实现jsonp交互。

branch_name: refs/heads/master

repo_language: Markdown

repo_name: RegToss/Vue-demos


text:
<repo_name>caseygillan/virtualassitant<file_sep>/README.md
# virtualassitant

Responsive landing page for Virtual Assistant site using HTML5 and Sass

repo_name: caseygillan/virtualassitant


text:
<repo_name>Jalaj-Maheshwari/Meridian-Lite-PWA<file_sep>/app/scripts/app.js
(function() {
  // Strict mode helps out in a couple ways:
  // 1. It catches some common coding bloopers, throwing exceptions.
  // 2. It prevents, or throws errors, when relatively "unsafe" actions are taken
  // (such as gaining access to the global object).
  'use strict';
  var app = {
    isLoading: true,
    visibleCards: {},
    callFromAddCityDialog : false,
    preferredLocations: [],
    preferredLocationLatLong: [],
    // querySelector(), on highest level, returns all the HTML code content defined for class
    // 'loader' in index.html webpage (document) file & assigns it to the Spinner sub-variable.
    //spinner: document.querySelector('.loader'),
    introMessage: document.querySelector('.intro-message'),
    cardTemplate: document.querySelector('.cardTemplate'),
    // 'container will hold html of Weather module'
    container: document.querySelector('.main'),
    addDialog: document.querySelector('.dialog-container'),
    daysOfWeek: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  };

  // Setting up toastr Notification
  toastr.options = {
    "positionClass": "toast-bottom-center",
     "timeOut": "2500"
  }
  /*****************************************************************************
   * Event listeners for UI elements
   ****************************************************************************/

  /* Event listener for refresh button */
  document.getElementById('butRefresh').addEventListener('click', function() {
    // Refreshing the forecasts if forecast cards exists
    if (app.preferredLocations.length == 0) {
        toastr.info('No weather cards to refresh');
    } else {
        app.updateForecasts();
        toastr.success('Weather Forecasts Updated');
      }
  });

  /* Event listener for add new city button */
  document.getElementById('butAdd').addEventListener('click', function() {
    // Open/show the add new city dialog
    app.toggleAddDialog(true);
  });

  /* Implementing the Location Autocomplete feature only if internet connection exists*/
  if (navigator.onLine) {
    google.maps.event.addDomListener(window, 'load', function () {
      if (navigator.onLine) {
        new google.maps.places.Autocomplete(document.getElementById('userInput'));
      }
    });
  }

  if(!navigator.onLine)
    toastr.info("App is in offline mode");

  /* Event listener for add city button in add city dialog */
  document.getElementById('butAddCity').addEventListener('click', function() {
    // Fetching the newly entered location
    var location = document.getElementById('userInput').value;
    // Setting the Textfield to empty inorder to remove any previous location value.
    document.getElementById('userInput').value = "";
    if(location === "") {
      toastr.error("Please enter a location");
    }
    else if(app.preferredLocations.indexOf(location) > -1) {
      toastr.info("Location already added");
    } else {
        // Initializing preferredLocations.
        if (!app.preferredLocations) {
          app.preferredLocations = [];
        }
        // Sending a 'true' parameter inorder to ensure that 'Location added Successfully'
        // message is only shown in such a condition and not during card refresh situation.
        if(!navigator.onLine){
            toastr.info("Details for entered location will be fetched once you are online!");
            app.preferredLocations.push(location);
            app.savePreferredLocations();
        }
        app.getForecast(location);
        app.callFromAddCityDialog  = true;
        app.toggleAddDialog(false);
        // Hiding the intro Message
        app.introMessage.setAttribute('hidden', true);
      }
  });

  /* Event listener for cancel button in add city dialog */
  document.getElementById('butAddCancel').addEventListener('click', function() {
    // Close the add new city dialog
    app.toggleAddDialog(false);
    // Setting the Textfield to empty inorder to remove any partially typed location value
    // which was neither added nor removed from textfield by the user.
    document.getElementById('userInput').value = "";
    // Make spinner visible if a cancel button of AddCity Dialog is clicked and user has
    // not entered any location ie. the app comes back to its default Loading state.
    if(app.isLoading){
      //app.spinner.removeAttribute('hidden');
      app.introMessage.removeAttribute('hidden');
    }

  });

  /*****************************************************************************
   * Methods to update/refresh the UI
   ****************************************************************************/

  // Toggles the visibility of the add new city dialog.
  app.toggleAddDialog = function(visible) {
    if (visible) {
      // The classList property in this case is useful to add, remove and 'toggle'
      // CSS classes in the HTML code class list defined inside <div class="dialog-container">
      // tag in index.html . Here the addition of dialog-container--visible class indirectly
      // applies its related CSS properties which makes the addDialog (having class
      // "dialog-container") visible & gives the'+'(AddCity) button the sense to respond
      // to the the touch events.
      app.addDialog.classList.add('dialog-container--visible');
      // Hide the Intro Message.
      app.introMessage.setAttribute('hidden', true);
    } else {
      app.addDialog.classList.remove('dialog-container--visible');
    }
  };

  // Updates a weather card with the latest weather forecast. If the card
  // doesn't already exist, it's cloned from the template.
  // 'data', is the API response.
  app.updateForecastCard = function(data) {
    // Here, dataLastUpdated is used to track the time when the data was last created
    // for a particular city on the API cloud from where responses are fetched.
    // Date() converts the API response into desired format.
    var dataLastUpdated = new Date(data.created);
    var sunrise = data.channel.astronomy.sunrise;
    var sunset = data.channel.astronomy.sunset;
    var current = data.channel.item.condition;
    var humidity = data.channel.atmosphere.humidity;
    var wind = data.channel.wind;
    // if card already exists, then add all HTML code structure along with prev values for a
    // location in visibleCards with name same as data.location ie particluar location will
    // be loaded into the card variable.
    var card = app.visibleCards[data.location];
    if (!card) {
      // cloneNode creates a copy of node from HTML Structure of app.cardTemplate
      // and returns the clone.
      card = app.cardTemplate.cloneNode(true);
      // Removed, as cardTemplate is no longer required in classList of HTML code of Card Element
      card.classList.remove('cardTemplate');
      card.querySelector('.location').textContent = data.location;
      card.removeAttribute('hidden');
      app.container.insertBefore(card, app.container.childNodes[0]);
      app.visibleCards[data.location] = card;
      // example of visibleCards variable after the above line is executed below-
      // {austin: div.card.weather-forecast, boston: div.card.weather-forecast}
      // data.location defines the 'location' by which 'value'(ie HTML Code of Card) should be
      // stored inside variable visibleCards.
      }

    /**
     * Verifies the data provide is newer than what's already visible
     * on the card and then update the card accordingly.
     **/
    var cardLastUpdatedElem = card.querySelector('.card-last-updated');
    // will be null, during first time, the card is added into the list of forecast cards.
    // will hold a value, the next time onwards the card is refreshed to fetch new updates.
    var cardLastUpdated = cardLastUpdatedElem.textContent;
    if (cardLastUpdated) {
      cardLastUpdated = new Date(cardLastUpdated);
      // Do Nothing, if the card has more recent data then the data that was last fetched
      // from Yahoo Weather Cloud.
      if (dataLastUpdated.getTime() < cardLastUpdated.getTime()) {
        return;
      }
    }
    cardLastUpdatedElem.textContent = data.created;
    // Alternative for above statement: card.querySelector('.card-last-updated').textContent = data.created;
    // Setting the values for textContent in card by fetching respective values
    // from server response.
    card.querySelector('.description').textContent = current.text;
    card.querySelector('.date').textContent = current.date;
    // appending the required CSS class to include the icon of current weather condition.
    // current.code contains the code value response sent by API for each weather type
    // and getIconClass() (user defined fucntion) returns the equivalent weather type
    // for a code passed to it which inturn acts as the CSS class for that weather type too.
    // eg : card.querySelector('.current .icon').classList.add("windy"); where
    // app.getIconClass returns 'windy' for that respective current.code
    card.querySelector('.current .icon').classList.add(app.getIconClass(current.code));
    card.querySelector('.current .visual .celcius-temperature .value').textContent =
      Math.round(current.temp);
    card.querySelector('.current .visual .fahrenheit-temperature .fahrenheit-value').textContent =
      Math.round((current.temp*1.8)+32);
    card.querySelector('.current .sunrise').textContent = sunrise;
    card.querySelector('.current .sunset').textContent = sunset;
    card.querySelector('.current .humidity').textContent =
      Math.round(humidity) + '%';
    card.querySelector('.current .wind .value').textContent =
      Math.round(wind.speed);
    card.querySelector('.current .wind .direction').textContent = wind.direction;
    var nextDays = card.querySelectorAll('.future .oneday');
    var today = new Date();
    // returns a numeric value for day of week starting from Sunday as 0 & so on.
    today = today.getDay();
    // Displaying weather details for next 7 days.
    for (var i = 0; i < 7; i++) {
      // Injecting the HTML code for a displaying a particular day into nextDay variable.
      var nextDay = nextDays[i];
      // Fetching Daily weather details for each of next day in each iteration.
      var daily = data.channel.item.forecast[i];
      // if both fields are non-empty, then write the weather details.
      if (daily && nextDay) {
        // Displaying the Next Day label with respective Day.
        nextDay.querySelector('.date').textContent =
          app.daysOfWeek[(i + today) % 7];
        // The below statement add a class to the classList to make a corresponding
        // CSS Class. eg: .icon + (daily.icon : say rain), makes the CSS class .icon.rain
        // which then displays the required image as mentioned in CSS code.
        nextDay.querySelector('.icon').classList.add(app.getIconClass(daily.code));
        nextDay.querySelector('.temp-high .value').textContent =
          Math.round(daily.high);
        nextDay.querySelector('.temp-low .value').textContent =
          Math.round(daily.low);
      }
    }
    // Hide the Intro Messagewhen the first forecast card ever, is done loading with details.
    if (app.isLoading) {
      app.introMessage.setAttribute('hidden', true);
      app.container.removeAttribute('hidden');
      app.isLoading = false;
    }
  };

  /*****************************************************************************
   * Methods for dealing with the model
   ****************************************************************************/

  /*
   * Gets a forecast for a specific location and updates the card with the data.
   * getForecast() first checks if the weather data is in the cache. If so,
   * then it gets that data and populates the card with the cached data.
   * Then, getForecast() goes to the network for fresh data. If the network
   * request goes through, then the card gets updated a second time with the
   * freshest data.
   * @param Location : location entered by User.
   * @param app.callFromAddCityDialog  : to determine the component which called the method
   * inorder to display appropriate user message.
   */
  app.getForecast = function(location) {
    // Details: https://developer.yahoo.com/weather/
    var statement = "select * from weather.forecast where woeid in" +
                    "(select woeid from geo.places(1) where text='" + location + "') and u='c'";
    var url = 'https://query.yahooapis.com/v1/public/yql?format=json&q=' + statement;

    /*
     * Check if the service worker has already cached this city's weather
     * data. If the service worker has the data, then display the cached
     * data while the app fetches the latest data via the XmlHttpRequest.
     */
    if ('caches' in window) {
        caches.match(url).then(function(response) {
        if (response) {
            response.json().then(function updateFromCache(json) {
              var results = json.query.results;
              results.location = location;
              results.created = json.query.created;
              app.updateForecastCard(results);
              var lat = json.query.results.channel.item.lat;
              console.log(lat);
              var long = json.query.results.channel.item.long;
              console.log(long);
              app.fetchAQIForecasts(location, lat, long);
            });
        }
      });
    }
    // Fetch the latest data.
    // Make the XHR to get the data, then update the card
    var request = new XMLHttpRequest();
    request.open('GET', url);
    request.send();
    // Proceed when any changes takes place in state of client while comunicating with server.
    // May be called multiple times.
    request.onreadystatechange = function() {
      // "===" means equality in both value and datatype of value.
      // eg: 1=="1" returns true, due to auto type conversion (typecasting).
      // 1==="1" returns false, because they are of a different type before typecasting.
      // XMLHttpRequest.DONE means that opeartion of downloading data from server is complete.
      if (request.readyState === XMLHttpRequest.DONE) {
        if (request.status === 200) {
          var response = JSON.parse(request.response);
          // Fetching results from desired attribute in API response.
          var results = response.query.results;
          // alerting user for invalid location
          if (!results) {
            toastr.error("Looks like an incorrect location");
            return;
          } else {
              var lat = results.channel.item.lat;
              var long = results.channel.item.long;
              results.location = location;
              results.created = response.query.created;
              window.localforage.setItem(location, lat+"/"+long);
              app.updateForecastCard(results);
              app.fetchAQIForecasts(location, lat, long);
              // Adding the new location into user preferences of locations for which user needs
              // to get weather details only if its not duplicate.
              if(app.preferredLocations.indexOf(location) === -1) {
                app.preferredLocations.push(location);
                app.savePreferredLocations();
              }
            }
        }
      }
    };
  };

  /* Function to configure the AQI UI in forecast card as per information fetched from the server */
  app.configureAqiUI = function(location, aqiResponse) {
    var aqi = aqiResponse.data.current.pollution.aqius;
    // Storing Dominant Pollutant information
    var dominantPol = aqiResponse.data.current.pollution.mainus.toUpperCase();
    // Defining proper pollutant value
    if (dominantPol == "P1")
      dominantPol = "PM 10";
    else if (dominantPol == "P2")
      dominantPol = "PM 2.5";
    else if (dominantPol == "CO")
      dominantPol = "Carbon Monoxide";
    else if (dominantPol == "O3")
      dominantPol = "Ozone";
    else if (dominantPol == "S2")
      dominantPol = "Sulphur Dioxide";
    else if (dominantPol == "N2")
      dominantPol = "Nitrogen Dioxide";
    // Storing Pollution Level information
    var pollutionLevel, pollutionLevelColor, healthMessage;
    if ((0 <= aqi) && (aqi <= 50)){
      pollutionLevel = "Good";
      // for color indication on forecast card.
      pollutionLevelColor = "green";
      healthMessage = "Air quality is considered satisfactory, and air pollution poses little or no risk.";
    } else if ((51 <= aqi) && (aqi <= 100)){
        pollutionLevel = "Moderate";
        pollutionLevelColor = "yellow";
        healthMessage ="Air quality is acceptable; however, for some pollutants there may be a moderate health concern for a very small number of people who are unusually sensitive to air pollution.";
    } else if ((101 <= aqi) && (aqi <= 150)){
        pollutionLevel = "Unhealthy for Sensitive Groups";
        pollutionLevelColor = "orange";
        healthMessage = "Members of sensitive groups may experience health effects. The general public is not likely to be affected.";
    } else if ((151 <= aqi) && (aqi <= 200)){
        pollutionLevel = "Unhealthy";
        pollutionLevelColor = "red";
        healthMessage = "Everyone may begin to experience health effects; members of sensitive groups may experience more serious health effects.";
    } else if ((201 <= aqi) && (aqi <= 300)){
        pollutionLevel = "Very Unhealthy";
        pollutionLevelColor = "purple";
        healthMessage = "Health alert: everyone may experience more serious health effects.";
    } else if ((301 <= aqi) && (aqi <= 500)){
        pollutionLevel = "Hazardous";
        pollutionLevelColor = "maroon";
        healthMessage = "Health warnings of emergency conditions. The entire population is more likely to be affected";
    }
    var card =  app.visibleCards[location];
    card.querySelector('.aqi-index').textContent = aqi;
    // add background & text color as per AQI levels using css.
    card.querySelector('.aqi-index').classList.add(pollutionLevelColor);
    card.querySelector('.pollution-level').textContent = pollutionLevel;
    card.querySelector('.dominant-pol').textContent = dominantPol;
    card.querySelector('.health-message').textContent = healthMessage;
  };

  /* Function to get AQI results from Information Sources
   * @param Location : Location asked by user
   * @param Lat : latitiude of location for which information is to be fetched from AQI server
   *              and to be passed in API url.
   * @param Long : longitude of location for which information is to be fetched from AQI server
   *               and to be passed in API url.
   */
  app.fetchAQIForecasts = function(location, lat, long){
    var request = new XMLHttpRequest();
    var url = 'https://api.airvisual.com/v2/nearest_city?lat='+lat+'&lon='+long+'&key=NesSiALyvM6HMhnCi';
    if('caches' in window) {
        caches.match(url).then(function(response) {
        if(response){
          response.json().then(function(json){
            app.configureAqiUI(location, json);
          });
        }
        });
    }
    request.open('GET', url);
    request.send();
    var aqiResponse;
    request.onreadystatechange = function(){
      if (request.readyState === XMLHttpRequest.DONE) {
        if (request.status === 404 || request.status === 403) {
          toastr.options = {
             "positionClass": "toast-bottom-center",
             "timeOut": "2500"
          }
        toastr.info("The information source for requested location looks down right now. Please try again later!");
        } else if (request.status === 200) {
            aqiResponse = JSON.parse(request.response);
            // Setting the results in the AQI art of forecast card.
            app.configureAqiUI(location, aqiResponse);
            if(app.callFromAddCityDialog ) {
              toastr.success("Location Successfully Added");
              app.callFromAddCityDialog  = false;
            }
          }
      }
    };
  };

  // Iterate all of the cards and attempt to get the latest forecast data
  app.updateForecasts = function() {
    // Object.keys() returns an array of key of each element associated
    // with the object passed as argument (ie. app.visibleCards) to it.
    // Eg: Contents of key array would be [ 'Location1', 'Location2'....]
    var keys = Object.keys(app.visibleCards);
    keys.forEach(function(location) {
      app.getForecast(location);
    });
  };

  app.getIconClass = function(weatherCode) {
    // Weather codes: https://developer.yahoo.com/weather/documentation.html#codes
    weatherCode = parseInt(weatherCode);
    switch (weatherCode) {
      case 25: // cold;
      case 32: // sunny
      case 33: // fair (night)
      case 34: // fair (day)
      case 36: // hot
      case 3200: // not available
        return 'clear-day';
      case 0: // tornado
      case 1: // tropical storm
      case 2: // hurricane
      case 6: // mixed rain and sleet
      case 8: // freezing drizzle
      case 9: // drizzle
      case 10: // freezing rain
      case 11: // showers
      case 12: // showers
      case 17: // hail
      case 35: // mixed rain and hail
      case 40: // scattered showers
        return 'rain';
      case 3: // severe thunderstorms
      case 4: // thunderstorms
      case 37: // isolated thunderstorms
      case 38: // scattered thunderstorms
      case 39: // scattered thunderstorms (not a typo)
      case 45: // thundershowers
      case 47: // isolated thundershowers
        return 'thunderstorms';
      case 5: // mixed rain and snow
      case 7: // mixed snow and sleet
      case 13: // snow flurries
      case 14: // light snow showers
      case 16: // snow
      case 18: // sleet
      case 41: // heavy snow
      case 42: // scattered snow showers
      case 43: // heavy snow
      case 46: // snow showers
        return 'snow';
      case 15: // blowing snow
      case 19: // dust
      case 20: // foggy
      case 21: // haze
      case 22: // smoky
        return 'fog';
      case 24: // windy
      case 23: // blustery
        return 'windy';
      case 26: // cloudy
      case 27: // mostly cloudy (night)
      case 28: // mostly cloudy (day)
      case 31: // clear (night)
        return 'cloudy';
      case 29: // partly cloudy (night)
      case 30: // partly cloudy (day)
      case 44: // partly cloudy
        return 'partly-cloudy-day';
    }
  };

/************************************************************************
   * Code required to start the app
   * NOTE: Here, initially we used localStorage, which we later changed because:
   *   localStorage is a synchronous API and has serious performance
   *   issues and also localStorage is a non-transactional storage meaning it does
   *   not implements ACID properties. Hence, It should not be used in production applications!
   *   Instead, we choose to store data in IndexedDB sort of implementation by using LocalForage.
   ************************************************************************/

  // Save list of locations using LocalForage.
  app.savePreferredLocations = function() {
  // IndexedDb has too many callbacks and is bit complex to be implemented raw.
  // Hence, we prefer using localForage which is a fast and simple storage library
  // for JavaScript. localForage improves the offline experience of web app by using
  // asynchronous storage (IndexedDB or WebSQL) with a simple, localStorage-like API.
  // It acts as a wrapper around IndexedDb and helps to use IndexedDb easily & value is
  // stored in a key-value pair format. It also stores data in Javascript object format, hence no need to convert Javascript
  // object into strings during saving or vice versa.
  // 'window' object represents an open window in a browser.
    window.localforage.setItem('preferredLocations',app.preferredLocations);
  };

  // err to instantiate an error object inroder to throw any runtime error.
  // 'preferredLocations' passed as 'LocationList'
  window.localforage.getItem('preferredLocations', function(err, locationList) {
    if (locationList) {
      if(navigator.onLine) {
        toastr.options = {
          "positionClass": "toast-bottom-center",
          "timeOut": "1000"
        }
        toastr.info("Loading recent forecast data!");
      }
      app.introMessage.setAttribute("hidden", true);
      //app.spinner.setAttribute("hidden");
      // No need to use JSON.parse() as data is fetched from LocalForage in String format.
      app.preferredLocations = locationList;
      // Muting the toastr notification for addition of new cards.
      app.callFromAddCityDialog  = false;
      app.preferredLocations.forEach(function(location) {
        app.getForecast(location);
      });
    } else {
      app.introMessage.removeAttribute("hidden", true);
      //app.spinner.setAttribute("hidden",true);
    }
  });

  /* Every time the app is accessed, user's locations has to be saved using IP lookup
   * and then injecting that data into the page.
  `*/
   // TODO: Add & modify the below Code for fetching the current location of user and
   // displaying the forecast card accordingly.
   /*
   app.updateForecastCard(initialWeatherForecast);
   app.preferredLocations = [
    { //add preferred location here.
    }
   ];
   app.savePreferredLocations();
  */

  // Checking if the browser supports service workers and registering if it does.
  if ('serviceWorker' in navigator) {
    // Delay registration until after the page has loaded, to ensure that our
    // precaching requests don't degrade the first visit experience.
    // See https://developers.google.com/web/fundamentals/instant-and-offline/service-worker/registration
    window.addEventListener('load', function() {
    // Your service-worker.js *must* be located at the top-level directory relative to your site.
    // It won't be able to control pages unless it's located at the same level or higher than them.
    // *Don't* register service worker file in, e.g., a scripts/ sub-directory!
    // See https://github.com/slightlyoff/ServiceWorker/issues/468
    navigator.serviceWorker.register('./sw.js').then(function(reg) {
      // updatefound is fired if service-worker.js changes.
      reg.onupdatefound = function() {
        // The updatefound event implies that reg.installing is set; see
        // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event
        var installingWorker = reg.installing;

        installingWorker.onstatechange = function() {
          switch (installingWorker.state) {
            case 'installed':
              if (navigator.serviceWorker.controller) {
                // At this point, the old content will have been purged and the fresh content will
                // have been added to the cache.
                // It's the perfect time to display a "New content is available; please refresh."
                // message in the page's interface.
                console.log('New or updated content is available.');
              } else {
                // At this point, everything has been precached.
                // It's the perfect time to display a "Content is cached for offline use." message.
                console.log('Content is now available offline!');
              }
              break;

            case 'redundant':
              console.error('The installing service worker became redundant.');
              break;
          }
        };
      };
    }).catch(function(e) {
      console.error('Error during service worker registration:', e);
      });
  });
  }
})();<file_sep>/README.md
# Meridian Lite

Progressive Web Application for Weather & Air Quality Index Updates.

repo_name: Jalaj-Maheshwari/Meridian-Lite-PWA


text:
<file_sep>+#!/bin/bash

function datee {
            echo "-----------------------------";
            echo $(date);
            echo "-----------------------------";

		}

function move {
			cd /home/sansforensics/Desktop/Evidence-Locker/;
		}

function findlist {
		find . -type f ! -name '*.list'  -exec echo -n "sha1 : " \; -exec sha1sum {} \; -exec echo -n "md5 : " \; -exec md5sum {} \;   >> /home/sansforensics/Desktop/Evidence-Locker/findlist.list;
	}
	#

function findtype {
			find . -type f ! -name '*.list'  -exec file {} \; >> /home/sansforensics/Desktop/Evidence-Locker/filetype.list;
		}

function new {
			echo $'\n';
		}

mkdir /home/sansforensics/Desktop/Evidence-Locker/;
mkdir /home/sansforensics/Desktop/Evidence-Locker/md5;
mkdir /home/sansforensics/Desktop/Evidence-Locker/sha1;
sudo dd if=/dev/sdc of=/home/sansforensics/Desktop/image.dd bs=512;
new;
move;
cd ..;
sudo chmod 444 image.dd;
sha1sum image.dd > image.sha1;
md5sum image.dd > image.md5;

mv image.sha1 /home/sansforensics/Desktop/Evidence-Locker/;
mv image.md5 /home/sansforensics/Desktop/Evidence-Locker/;
md5sum image.dd > tmp.md5;
sha1sum image.dd > tmp.sha1;
DIFF=$(diff tmp.md5 /home/sansforensics/Desktop/Evidence-Locker/image.md5);
if [ "$DIFF" != "" ]
then
    echo "The md5 was modified when you moved the files... INTEGRITY LOST --> Mr Ovens will not be happy0";
else
	echo "MD5 stayed the same when you moved the files, you are a CHAMP TIB"
fi

new;

DIFF=$(diff tmp.sha1 /home/sansforensics/Desktop/Evidence-Locker/image.sha1);
if [ "$DIFF" != "" ]
then
    echo "The SHA1 was modified when you moved the files... INTEGRITY LOST --> Mr Ovens will not be happy";
else
	echo "The SHA1 stayed the same when you moved the files, you are a CHAMP TIB"
fi

rm tmp.*;

sudo mkdir /mnt/analysis;
sudo mount -t vfat -o ro,noexec,loop,offset=32256 image.dd /mnt/analysis;

new;

if [[ (! -f /home/sansforensics/Desktop/Evidence-Locker/list.list )&&
	  ( ! -f /home/sansforensics/Desktop/Evidence-Locker/findlist.list )&&
	  ( ! -f /home/sansforensics/Desktop/Evidence-Locker/filetype.list)]];

        then
                move;
                touch list.list;
                touch findlist.list;
                touch filetype.list;
		fi

    datee >> /home/sansforensics/Desktop/Evidence-Locker/list.list;
	datee >> /home/sansforensics/Desktop/Evidence-Locker/findlist.list;
    datee >> /home/sansforensics/Desktop/Evidence-Locker/filetype.list;
	cd /mnt/analysis;
    ls -aliRU -I list.list -I filetype.list -I findlist.list >> /home/sansforensics/Desktop/Evidence-Locker/list.list;
    findtype;
    findlist;
	move
	sha1sum findlist.list > findlist.sha1
	md5sum findlist.list > findlist.md5
	sha1sum filetype.list > filetype.sha1
	md5sum filetype.list > filetype.md5
	sha1sum list.list > list.sha1
	md5sum list.list > list.md5

	####

	cd ..;
	echo "allt-na-reigh" > searchlist.txt;
	date > /home/sansforensics/Desktop/Evidence-Locker/searchresult.txt;
	grep -abif searchlist.txt image.dd > /home/sansforensics/Desktop/Evidence-Locker/searchresult.txt;

	mv searchlist.txt /home/sansforensics/Desktop/Evidence-Locker/;

	move;
	md5sum searchlist.txt > searchlist.md5
	sha1sum searchlist.txt > searchlist.sha1
	md5sum searchresult.txt > searchresult.md5
	sha1sum searchresult.txt > searchresult.sha1
	echo " You can find 'allt-na-reigh' here :";
	new;
	cat searchresult.txt;

	new;

cd ..

fls -rpd image.dd -o 63 | grep -Eo " [0-9]+([^0-9]){0}" | sed -e 's/^\s*//' > unalocated-deleted.txt

mkdir /home/sansforensics/Desktop/Evidence-Locker/Files-unalocated-deleted
cat unalocated-deleted.txt | while read line;
do
ss=`ffind -o 63 image.dd $line | sed 's:.*/::'`;
echo "$ss was created under /home/sansforensics/Desktop/Evidence-Locker/Files-unalocated-deleted/$ss";
icat -o 63 image.dd $line > /home/sansforensics/Desktop/Evidence-Locker/Files-unalocated-deleted/$ss;
done;

rm unalocated-deleted.txt;
blkls -o 63 image.dd > /home/sansforensics/Desktop/Evidence-Locker/huna.blkls
blkls -o 63 -s image.dd > /home/sansforensics/Desktop/Evidence-Locker/slack.blkls

sudo fls -o63 -r -m "/" image.dd > /home/sansforensics/Desktop/Evidence-Locker/body #http://sysforensics.org/2012/03/sleuth-kit-part-3-fls-mactime-and-icat/
mactime -b body > /home/sansforensics/Desktop/Evidence-Locker/timline.txt
move;

md5sum huna.blkls > huna.md5
sha1sum huna.blkls > huna.sha1
md5sum slack.blkls > slack.md5
sha1sum slack.blkls > slack.sha1
md5sum body > body.md5
sha1sum body >body.sha1
md5sum timline.txt > timline.md5
sha1sum timline.txt > timline.sha1

	mv *.sha1 sha1
	mv *.md5 md5
cd ..

mkdir /home/sansforensics/Desktop/Evidence-Locker/sorter/

	sudo sorter -d /home/sansforensics/Desktop/Evidence-Locker/sorter/ -o 63 -m "/" image.dd

for d in /home/sansforensics/Desktop/Evidence-Locker/sorter/*.*;
do
        echo $d
        sha1sum $d > $d.sha1
        md5sum $d > $d.md5
done

cd /home/sansforensics/Desktop/Evidence-Locker/sorter/
mv *.md5 /home/sansforensics/Desktop/Evidence-Locker/md5
mv *.sha1 /home/sansforensics/Desktop/Evidence-Locker/sha1

repo_language: Shell


text:
<repo_name>WalrusHailey/iCHEFXawoo<file_sep>/README.md
# iCHEFXawoo
有關於Squarespace後台Dev Mode調整說明

repo_name: WalrusHailey/iCHEFXawoo


text:
<file_sep># Roby on rails tutorial : Furst app

This is the first application for [*Ruby on rails tutorial*]

repo_name: SushiCat/jazzy


text:
<repo_name>yurisimoes/img-upload<file_sep>/src/app/app.component.ts
import { Component } from '@angular/core';
import { HttpClient } from '@angular/common/http';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.sass']
})
export class AppComponent {

  public imagePath;
  imgURL: any;

  constructor(private http: HttpClient) {

  }

  inputFileChange(event) {
    if (event.target.files && event.target.files[0]) {
      const picture = event.target.files[0];

      const formData = new FormData();
      formData.append('foto', picture);

      this.http.post('http://localhost:8080/fotos', formData)
        .subscribe(Response => console.log(Response, 'it works.'));

      const reader = new FileReader();
      this.imagePath = event.target.files;
      reader.readAsDataURL(event.target.files[0]);
      reader.onload = showIgm => {
        this.imgURL = reader.result;
      };
    }
  }
}

repo_language: TypeScript

repo_name: yurisimoes/img-upload


text:
<file_sep># first-attempt
first trial

repo_name: Chandana-divya/first-attempt


text:
<file_sep>package test.mav.string1;

import mav.string1.HasBad;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * HasBad Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
фев 20, 2017

 */
public class HasBadTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: hasBad(String str)
     * hasBad("badxx") → true
     * hasBad("xbadxx") → true
     * hasBad("xxbadxx") → false
     * hasBad("xba") → false
     * hasBad("code") → false
     * hasBad("xbad") → true
     * hasBad("bad") → true
     */
    @Test
    public void testHasBad() throws Exception {

        HasBad hasBad = new HasBad();
        assertEquals(true, hasBad.hasBad("badxx"));
        assertEquals(true, hasBad.hasBad("xbadxx"));
        assertEquals(false, hasBad.hasBad("xxbadxx"));
        assertEquals(false, hasBad.hasBad("xba"));
        assertEquals(false, hasBad.hasBad("code"));
        assertEquals(true, hasBad.hasBad("xbad"));
        assertEquals(true, hasBad.hasBad("bad"));
    }

}
<file_sep>package test.mav.string1;

import mav.string1.MakeOutWord;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static junit.framework.TestCase.assertEquals;

/**
 * MakeOutWord Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
фев 2, 2017

 */
public class MakeOutWordTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: makeOutWord(String out, String word)
     * makeOutWord("<<>>", "Yay") → "<<Yay>>"
     * makeOutWord("<<>>", "WooHoo") → "<<WooHoo>>"
     * makeOutWord("[[]]", "word") → "[[word]]"
     */
    @Test
    public void testMakeOutWord() throws Exception {

        MakeOutWord makeOutWord = new MakeOutWord();
        assertEquals("<<Yay>>", makeOutWord.makeOutWord("<<>>", "Yay"));
        assertEquals("<<WooHoo>>", makeOutWord.makeOutWord("<<>>", "WooHoo"));
        assertEquals("[[word]]", makeOutWord.makeOutWord("[[]]", "word"));
    }

}
<file_sep>package mav.warmup1;

/**
 *
 Given a string, take the first 2 chars and return the string with the 2 chars added at both the front and back,
 so "kitten" yields"kikittenki". If the string length is less than 2, use whatever chars are there.
 */
public class Front22 {

    public String front22(String str) {

        int st = 2;
        if (st > str.length()) {
            st = str.length();
        }
        String res = str.substring(0, st);
        return res + str + res;
    }
}
<file_sep>package test.mav.string1;

import mav.string1.FirstTwo;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * FirstTwo Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
фев 3, 2017

 */
public class FirstTwoTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: firstTwo(String str)
     * firstTwo("Hello") → "He"
     * firstTwo("abcdefg") → "ab"
     * firstTwo("ab") → "ab"
     */
    @Test
    public void testFirstTwo() throws Exception {

        FirstTwo firstTwo = new FirstTwo();
        assertEquals("He", firstTwo.firstTwo("Hello"));
        assertEquals("ab", firstTwo.firstTwo("abcdefg"));
        assertEquals("ab", firstTwo.firstTwo("ab"));
    }

}
<file_sep>package test.mav.string1;

import mav.string1.SeeColor;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * SeeColor Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
мар 1, 2017

 */
public class SeeColorTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: seeColor(String str)
     * seeColor("redxx") → "red"
     * seeColor("xxred") → ""
     * seeColor("blueTimes") → "blue"
     * seeColor("blu") → ""
     * seeColor("red") → "red"
     */
    @Test
    public void testSeeColor() throws Exception {

        SeeColor seeColor = new SeeColor();
        assertEquals("red", seeColor.seeColor("redxx"));
        assertEquals("", seeColor.seeColor("xxred"));
        assertEquals("blue", seeColor.seeColor("blueTimes"));
        assertEquals("", seeColor.seeColor("blu"));
        assertEquals("red", seeColor.seeColor("red"));
    }

}
<file_sep>package test.mav.warmup1;

import mav.warmup1.In1020;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
* In1020 Tester.
*
* @author <Authors name>
* @since
янв 12, 2017

* @version 1.0
*/
public class In1020Test {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: in1020(int a, int b)
* in1020(12, 99) → true
 in1020(21, 12) → true
 in1020(8, 99) → false
*/
@Test
public void testIn1020() throws Exception {
    In1020 in1020 = new In1020();
    assertEquals(true, in1020.in1020(12, 99));
    assertEquals(true, in1020.in1020(21, 12));
    assertEquals(false, in1020.in1020(8, 99));
}

}
<file_sep>package test.mav.string1;

import mav.string1.NonStart;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * NonStart Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
фев 6, 2017

 */
public class NonStartTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: nonStart(String a, String b)
     * nonStart("Hello", "There") → "ellohere"
     * nonStart("java", "code") → "avaode"
     * nonStart("shotl", "java") → "hotlava"
     */
    @Test
    public void testNonStart() throws Exception {
        NonStart nonStart = new NonStart();
        assertEquals("ellohere", nonStart.nonStart("Hello", "There"));
        assertEquals("avaode", nonStart.nonStart("java", "code"));
        assertEquals("hotlava", nonStart.nonStart("shotl", "java"));
    }

}
<file_sep>package test.mav.string1;

import mav.string1.WithouEnd2;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * WithouEnd2 Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
фев 6, 2017

 */
public class WithouEnd2Test {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: withouEnd2(String str)
     * withouEnd2("Hello") → "ell"
     * withouEnd2("abc") → "b"
     * withouEnd2("ab") → ""
     */
    @Test
    public void testWithouEnd2() throws Exception {

        WithouEnd2 withouEnd2 = new WithouEnd2();
        assertEquals("ell", withouEnd2.withouEnd2("Hello"));
        assertEquals("b", withouEnd2.withouEnd2("abc"));
        assertEquals("", withouEnd2.withouEnd2("ab"));
    }

}
<file_sep>package test.mav.Array1;

import mav.Array1.Reverse3;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertArrayEquals;

/**
 * Reverse3 Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
мар 10, 2017

 */
public class Reverse3Test {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: reverse3(int[] nums)
     * reverse3([1, 2, 3]) → [3, 2, 1]
     * reverse3([5, 11, 9]) → [9, 11, 5]
     * reverse3([7, 0, 0]) → [0, 0, 7]
     */
    @Test
    public void testReverse3() throws Exception {

        Reverse3 reverse3 = new Reverse3();

        assertArrayEquals("wrong", new int[]{3, 2, 1}, reverse3.reverse3(new int[]{1, 2, 3}));
        assertArrayEquals("wrong", new int[]{9, 11, 5}, reverse3.reverse3(new int[]{5, 11, 9}));
        assertArrayEquals("wrong", new int[]{0, 0, 7}, reverse3.reverse3(new int[]{7, 0, 0}));
    }

}
<file_sep>package test.mav.warmup2;

import mav.warmup2.Has271;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * Has271 Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
фев 1, 2017

 */
public class Has271Test {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: has271(int[] nums)
     * has271([1, 2, 7, 1]) → true
     * has271([1, 2, 8, 1]) → false
     * has271([2, 7, 1]) → true
     * has271([3, 8, 2]) → true
     */
    @Test
    public void testHas271() throws Exception {

        Has271 has271 = new Has271();
        assertEquals(true, has271.has271(new int[]{1, 2, 7, 1}));
        assertEquals(false, has271.has271(new int[]{1, 2, 8, 1}));
        assertEquals(true, has271.has271(new int[]{2, 7, 1}));
        assertEquals(true, has271.has271(new int[]{3, 8, 2}));
    }

}
<file_sep>package test.mav.warmup2;

import mav.warmup2.CountXX;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static junit.framework.TestCase.assertEquals;

/**
* CountXX Tester.
*
* @author <Authors name>
* @since
янв 26, 2017

* @version 1.0
*/
public class CountXXTest {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: countXX(String str)
*countXX("abcxx") → 1
 countXX("xxx") → 2
 countXX("xxxx") → 3
 countXX("Hello there") → 0
*/
@Test
public void testCountXX() throws Exception {

    CountXX countXX = new CountXX();
    assertEquals(1, countXX.countXX("abcxx"));
    assertEquals(2, countXX.countXX("xxx"));
    assertEquals(3, countXX.countXX("xxxx"));
    assertEquals(0, countXX.countXX("Hello there"));
}

}
<file_sep>package mav.Array1;

/**
 * Given an int array, return a new array with double the length where its last element is the same as the original
 * array, and all the other elements are 0. The original array will be length 1 or more. Note: by default,
 * a new int array contains all 0's.
 */
public class MakeLast {

    public int[] makeLast(int[] nums) {

        int endIndex = nums.length * 2;
        int[] result = new int[endIndex];

        result[endIndex - 1] = nums[nums.length - 1];
        return result;
    }

}
<file_sep>package mav.warmup1;

/**
 * Given a string, take the last char and return a new string with the last char added at the front and back,
 * so "cat" yields "tcatt". The original string will be length 1 or more.
 */
public class BackAround {

    public String backAround(String str) {
        String result = "";
        if(str.length() > 0) {
            String t = str.substring(str.length() - 1);
            result = t + str + t;
        }
        return result;
    }
}
<file_sep>package mav.string1;

/**
 * Given a string of any length, return a new string where the last 2 chars, if present,
 * are swapped, so "coding" yields "codign".
 */
public class LastTwo {

    public String lastTwo(String str) {
        if (str.length() > 1) {
            return str.substring(0, str.length() - 2) + str.substring(str.length() - 1, str.length()) +
                    str.substring(str.length() - 2, str.length() - 1);
        }
        return str;
    }

}
<file_sep>package test.mav.Array1;

import mav.Array1.SameFirstLast;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * SameFirstLast Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
мар 9, 2017

 */
public class SameFirstLastTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: sameFirstLast(int[] nums)
     * sameFirstLast([1, 2, 3]) → false
     * sameFirstLast([1, 2, 3, 1]) → true
     * sameFirstLast([1, 2, 1]) → true
     * sameFirstLast([]) → false
     */
    @Test
    public void testSameFirstLast() throws Exception {

        SameFirstLast sameFirstLast = new SameFirstLast();

        assertEquals(false, sameFirstLast.sameFirstLast(new int[]{1, 2, 3}));
        assertEquals(true, sameFirstLast.sameFirstLast(new int[]{1, 2, 3, 1}));
        assertEquals(true, sameFirstLast.sameFirstLast(new int[]{1, 2, 1}));
        assertEquals(false, sameFirstLast.sameFirstLast(new int[]{}));
    }

}
<file_sep>package test.mav.warmup2;

import mav.warmup2.StringBits;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
* StringBits Tester.
*
* @author <Authors name>
* @since
янв 25, 2017

* @version 1.0
*/
public class StringBitsTest {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: stringBits(String str)
* stringBits("Hello") → "Hlo"
 stringBits("Hi") → "H"
 stringBits("Heeololeo") → "Hello"
*/
@Test
public void testStringBits() throws Exception {

    StringBits stringBits = new StringBits();
    assertEquals("Hlo", stringBits.stringBits("Hello"));
    assertEquals("H", stringBits.stringBits("Hi"));
    assertEquals("Hello", stringBits.stringBits("Heeololeo"));
}

}
<file_sep>package test.mav.Array1;

import mav.Array1.BiggerTwo;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static org.junit.Assert.assertArrayEquals;

/**
 * BiggerTwo Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
мар 15, 2017

 */
public class BiggerTwoTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: biggerTwo(int[] a, int[] b)
     * biggerTwo([1, 2], [3, 4]) → [3, 4]
     * biggerTwo([3, 4], [1, 2]) → [3, 4]
     * biggerTwo([1, 1], [1, 2]) → [1, 2]
     */
    @Test
    public void testBiggerTwo() throws Exception {

        BiggerTwo biggerTwo = new BiggerTwo();

        assertArrayEquals("wrong", new int[]{3, 4}, biggerTwo.biggerTwo(new int[]{1, 2}, new int[]{3, 4}));
        assertArrayEquals("wrong", new int[]{3, 4}, biggerTwo.biggerTwo(new int[]{3, 4}, new int[]{1, 2}));
        assertArrayEquals("wrong", new int[]{1, 2}, biggerTwo.biggerTwo(new int[]{1, 1}, new int[]{1, 2}));
    }

}
<file_sep>package test.mav.warmup1;

import mav.warmup1.StartOz;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
* StartOz Tester.
*
* @author <Authors name>
* @since
янв 23, 2017

* @version 1.0
*/
public class StartOzTest {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: startOz(String str)
* startOz("ozymandias") → "oz"
 startOz("bzoo") → "z"
 startOz("oxx") → "o"
 startOz("zoo") → "z"
*/
@Test
public void testStartOz() throws Exception {

    StartOz startOz = new StartOz();
    assertEquals("oz", startOz.startOz("ozymandias"));
    assertEquals("z", startOz.startOz("bzoo"));
//    assertEquals("o", startOz.startOz("oxx"));
//    assertEquals("", startOz.startOz("zoo"));
}

}
<file_sep>package test.mav.string1;

import mav.string1.DeFront;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * DeFront Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
мар 2, 2017

 */
public class DeFrontTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: deFront(String str)
     * deFront("Hello") → "llo"
     * deFront("java") → "va"
     * deFront("away") → "aay"
     * deFront("abc") → "abc
     * deFront("xbc") → "bc"
     * deFront("ba") → ""
     */
    @Test
    public void testDeFront() throws Exception {

        DeFront deFront = new DeFront();

        assertEquals("llo", deFront.deFront("Hello"));
        assertEquals("va", deFront.deFront("java"));
        assertEquals("aay", deFront.deFront("away"));
        assertEquals("abc", deFront.deFront("abc"));
        assertEquals("bc", deFront.deFront("xbc"));
        assertEquals("", deFront.deFront("ba"));
    }

}
<file_sep>package test.mav.Array1;

import mav.Array1.CommonEnd;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertTrue;

/**
 * CommonEnd Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
мар 9, 2017

 */
public class CommonEndTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: commonEnd(int[] a, int[] b)
     * commonEnd([1, 2, 3], [7, 3]) → true
     * commonEnd([1, 2, 3], [7, 3, 2]) → false
     * commonEnd([1, 2, 3], [1, 3]) → true
     */
    @Test
    public void testCommonEnd() throws Exception {

        CommonEnd commonEnd = new CommonEnd();

        assertEquals(true, commonEnd.commonEnd(new int[]{1, 2, 3}, new int[]{7, 3}));
        assertEquals(false, commonEnd.commonEnd(new int[]{1, 2, 3}, new int[]{7, 3, 2}));
        assertEquals(true, commonEnd.commonEnd(new int[]{1, 2, 3}, new int[]{1, 3}));

        assertTrue(commonEnd.commonEnd(new int[]{1, 2, 3}, new int[]{7, 3}));
    }

}
<file_sep>package test.mav.string1;

import mav.string1.ComboString;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * ComboString Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
фев 3, 2017

 */
public class ComboStringTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: comboString(String a, String b)
     * comboString("Hello", "hi") → "hiHellohi"
     * comboString("hi", "Hello") → "hiHellohi"
     * comboString("aaa", "b") → "baaab"
     */
    @Test
    public void testComboString() throws Exception {

        ComboString comboString = new ComboString();
        assertEquals("hiHellohi", comboString.comboString("Hello", "hi"));
        assertEquals("hiHellohi", comboString.comboString("hi", "Hello"));
        assertEquals("baaab", comboString.comboString("aaa", "b"));
    }

}
<file_sep>package test.mav.warmup1;

import mav.warmup1.ParrotTrouble;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
* ParrotTrouble Tester.
*
* @author <Authors name>
* @since
дек 18, 2016

* @version 1.0
*/
public class ParrotTroubleTest {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: parrotTrouble(boolean talking, int hour)
* parrotTrouble(true, 6) → true
 parrotTrouble(true, 7) → false
 parrotTrouble(false, 6) → false
*/
@Test
public void testParrotTrouble() throws Exception {
    ParrotTrouble parrotTrouble = new ParrotTrouble();
    assertEquals(true, parrotTrouble.parrotTrouble(true, 6));
    assertEquals(false, parrotTrouble.parrotTrouble(true, 7));
    assertEquals(false, parrotTrouble.parrotTrouble(false, 6));
}

}
<file_sep>package test.mav.warmup1;

import mav.warmup1.IntMax;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * IntMax Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
янв 23, 2017

 */
public class IntMaxTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: intMax(int a, int b, int c)
     * intMax(1, 2, 3) → 3
     * intMax(1, 3, 2) → 3
     * intMax(3, 2, 1) → 3
     */
    @Test
    public void testIntMax() throws Exception {

        IntMax intMax = new IntMax();
        assertEquals(3, intMax.intMax(1,2,3));
        assertEquals(3, intMax.intMax(1,3,2));
        assertEquals(3, intMax.intMax(3,2,1));
    }

}
<file_sep>package test.mav.warmup2;

import mav.warmup2.DoubleX;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
* DoubleX Tester.
*
* @author <Authors name>
* @since
янв 25, 2017

* @version 1.0
*/
public class DoubleXTest {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: doubleX(String str)
*
 doubleX("axxbb") → true
 doubleX("axaxax") → false
 doubleX("xxxxx") → true
 doubleX("xaxxx") → false
 doubleX("xaxx") → false
*/
@Test
public void testDoubleX() throws Exception {

    DoubleX doubleX = new DoubleX();
    assertEquals(true, doubleX.doubleX("axxbb"));
    assertEquals(false, doubleX.doubleX("axaxax"));
    assertEquals(true, doubleX.doubleX("xxxxx"));
    assertEquals(false, doubleX.doubleX("xaxxx"));
    assertEquals(false, doubleX.doubleX("xaxx"));
}

}
<file_sep>package mav.Array1;

/**
 * Given an array of ints length 3, return a new array with the elements in reverse order, so {1, 2, 3} becomes {3, 2, 1}.
 */
public class Reverse3 {

    public int[] reverse3(int[] nums) {
        int[] result = new int[nums.length];
        if (nums.length >= 2) {
            int endArray = nums.length - 1;
            for (int i = endArray; i >= 0; i--) {
                result[endArray - i] = nums[i];
            }
        }
        return result;
//        return new int[] {nums[2], nums[1], nums[0]};
    }

}
<file_sep>package test.mav.Array1;

import mav.Array1.RotateLeft3;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static org.junit.Assert.assertArrayEquals;

/**
 * RotateLeft3 Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
мар 10, 2017

 */
public class RotateLeft3Test {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: rotateLeft3(int[] nums)
     * rotateLeft3([1, 2, 3]) → [2, 3, 1]
     * rotateLeft3([5, 11, 9]) → [11, 9, 5]
     * rotateLeft3([7, 0, 0]) → [0, 0, 7]
     */
    @Test
    public void testRotateLeft3() throws Exception {

        RotateLeft3 rotateLeft3 = new RotateLeft3();

        assertArrayEquals("Wrong", new int[]{2, 3, 1}, rotateLeft3.rotateLeft3(new int[]{1, 2, 3}));
        assertArrayEquals("Wrong", new int[]{11, 9, 5}, rotateLeft3.rotateLeft3(new int[]{5, 11, 9}));
        assertArrayEquals("Wrong", new int[]{0, 0, 7}, rotateLeft3.rotateLeft3(new int[]{7, 0, 0}));
    }

}
<file_sep>package test.mav.Array1;

import mav.Array1.MiddleWay;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static org.junit.Assert.assertArrayEquals;

/**
* MiddleWay Tester.
*
* @author <Authors name>
* @since
мар 13, 2017

* @version 1.0
*/
public class MiddleWayTest {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: middleWay(int[] a, int[] b)
* middleWay([1, 2, 3], [4, 5, 6]) → [2, 5]
 middleWay([7, 7, 7], [3, 8, 0]) → [7, 8]
 middleWay([5, 2, 9], [1, 4, 5]) → [2, 4]
*/
@Test
public void testMiddleWay() throws Exception {

    MiddleWay middleWay = new MiddleWay();

    assertArrayEquals("wrong", new int[]{2, 5}, middleWay.middleWay(new int[]{1, 2, 3}, new int[]{4, 5, 6}));
    assertArrayEquals("wrong", new int[]{7, 8}, middleWay.middleWay(new int[]{7, 7, 7}, new int[]{3, 8, 0}));
    assertArrayEquals("wrong", new int[]{2, 4}, middleWay.middleWay(new int[]{5, 2, 9}, new int[]{1, 4, 5}));
}

}
<file_sep>package test.mav.warmup1;

import mav.warmup1.BackAround;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
* BackAround Tester.
*
* @author <Authors name>
* @since
янв 11, 2017

* @version 1.0
*/
public class BackAroundTest {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: backAround(String str)
* backAround("cat") → "tcatt"
 backAround("Hello") → "oHelloo"
 backAround("a") → "aaa"
*/
@Test
public void testBackAround() throws Exception {

    BackAround backAround = new BackAround();
    assertEquals("tcatt", backAround.backAround("cat"));
    assertEquals("oHelloo", backAround.backAround("Hello"));
    assertEquals("aaa", backAround.backAround("a"));
}

}
<file_sep>package mav.string1;

/**
 *
 Given a string, if one or both of the first 2 chars is 'x', return the string without those 'x' chars,
 and otherwise return the string unchanged. This is a little harder than it looks.
 */
public class WithoutX2 {

    public String withoutX2(String str) {
        int length = str.length();

        if(length < 1){
            return str;
        }

        if(length == 1 && str.charAt(0) == 'x'){
            return "";
        }

        if(str.charAt(1) == 'x'){
            str = str.charAt(0) + str.substring(2);
        }

        if(str.charAt(0) == 'x'){
            str=  str.substring(1);
        }
        return str;
    }
}
<file_sep>package test.mav.Array1;

import mav.Array1.Unlucky1;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertFalse;

/**
 * Unlucky1 Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
мар 21, 2017

 */
public class Unlucky1Test {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: unlucky1(int[] nums)
     * unlucky1([1, 3, 4, 5]) → true
     * unlucky1([2, 1, 3, 4, 5]) → true
     * unlucky1([1, 1, 1]) → false
     */
    @Test
    public void testUnlucky1() throws Exception {

        Unlucky1 unlucky1 = new Unlucky1();

        assertTrue("wrong", unlucky1.unlucky1(new int[] {1, 3, 4, 5}));
        assertTrue("wrong", unlucky1.unlucky1(new int[] {2, 1, 3, 4, 5}));
        assertFalse("wrong", unlucky1.unlucky1(new int[] {1, 1, 1}));
    }

}
<file_sep>package test.mav.warmup1;

import mav.warmup1.Close10;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
* Close10 Tester.
*
* @author <Authors name>
* @since
янв 23, 2017

* @version 1.0
*/
public class Close10Test {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: close10(int a, int b)
* close10(8, 13) → 8
 close10(13, 8) → 8
 close10(7, 13) → 0
 close10(9, 13) → 9
 close10(13, 8) → 8
 close10(10, 12) → 10
 close10(11, 10) → 10
 close10(5, 21) → 5
 close10(0, 20) → 0
 close10(10, 10) → 0
*/
@Test
public void testClose10() throws Exception {

    Close10 close10 = new Close10();
    assertEquals(8, close10.close10(8, 13));
    assertEquals(8, close10.close10(13, 8));
    assertEquals(0, close10.close10(13, 7));
    assertEquals(9, close10.close10(9, 13));
    assertEquals(8, close10.close10(13, 8));
    assertEquals(10, close10.close10(10, 12));
    assertEquals(10, close10.close10(11, 10));
    assertEquals(5, close10.close10(5, 21));
    assertEquals(0, close10.close10(0, 20));
    assertEquals(0, close10.close10(10, 10));
}

}
<file_sep>package mav.Array1;

/**
 * Given 2 int arrays, a and b, of any length, return a new array with the first element of each array.
 * If either array is length 0, ignore that array.
 */
public class Front11 {
    public int[] front11(int[] a, int[] b) {
        int[] result = new int[0];
        if (a.length >= 1 && b.length >= 1) {
            result = new int[2];
            result[0] = a[0];
            result[1] = b[0];
        }
        if (a.length == 0 && b.length >= 1) {
            result = new int[1];
            result[0] = b[0];
        }
        if (a.length >= 1 && b.length == 0) {
            result = new int[1];
            result[0] = a[0];
        }
        return result;
    }

}
<file_sep>package test.mav.warmup1;

import mav.warmup1.NearHundred;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
 * NearHundred Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
дек 18, 2016

 */
public class NearHundredTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: nearHundred(int n)
     * nearHundred(93) → true
     * nearHundred(90) → true
     * nearHundred(89) → false
     */
    @Test
    public void testNearHundred() throws Exception {
        NearHundred nearHundred = new NearHundred();
        assertEquals(true, nearHundred.nearHundred(93));
        assertEquals(true, nearHundred.nearHundred(90));
        assertEquals(false, nearHundred.nearHundred(89));
    }

}
<file_sep>package test.mav.string1;

import mav.string1.MiddleTwo;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static junit.framework.TestCase.assertEquals;

/**
 * MiddleTwo Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
фев 14, 2017

 */
public class MiddleTwoTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: middleTwo(String str)
     * middleTwo("string") → "ri"
     * middleTwo("code") → "od"
     * middleTwo("Practice") → "ct"
     */
    @Test
    public void testMiddleTwo() throws Exception {

        MiddleTwo middleTwo = new MiddleTwo();
        assertEquals("ri", middleTwo.middleTwo("string"));
        assertEquals("od", middleTwo.middleTwo("code"));
        assertEquals("ct", middleTwo.middleTwo("Practice"));
    }

}
<file_sep>package test.mav.warmup2;

import mav.warmup2.Array123;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * Array123 Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
янв 26, 2017

 */
public class Array123Test {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: array123(int[] nums)
     * array123([1, 1, 2, 3, 1]) → true
     * array123([1, 1, 2, 4, 1]) → false
     * array123([1, 1, 2, 1, 2, 3]) → true
     * array123([1, 2, 3]) → true
     */
    @Test
    public void testArray123() throws Exception {

        Array123 array123 = new Array123();

        assertEquals(true, array123.array123(new int[]{1, 1, 2, 3, 1}));
        assertEquals(false, array123.array123(new int[]{1, 1, 2, 4, 1}));
        assertEquals(true, array123.array123(new int[]{1, 1, 2, 1, 2, 3}));
        assertEquals(true, array123.array123(new int[]{1, 2, 3}));
    }

}
<file_sep>package test.mav.warmup1;

import mav.warmup1.PosNeg;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
* PosNeg Tester.
*
* @author <Authors name>
* @since
дек 18, 2016

* @version 1.0
*/
public class PosNegTest {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: posNeg(int a, int b, boolean negative)
* posNeg(1, -1, false) → true
 posNeg(-1, 1, false) → true
 posNeg(-4, -5, true) → true
 posNeg(-4, 5, true) → false
*/
@Test
public void testPosNeg() throws Exception {
    PosNeg posNeg = new PosNeg();
    assertEquals(true, posNeg.posNeg(1, -1, false));
    assertEquals(true, posNeg.posNeg(-1, 1, false));
    assertEquals(true, posNeg.posNeg(-4, -5, true));
    assertEquals(false, posNeg.posNeg(-4, 5, true));
}

}
<file_sep>package test.mav.Logic1;

import mav.Logic1.CigarParty;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static org.junit.Assert.assertEquals;

/**
 * CigarParty Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
мая 17, 2017

 */
public class CigarPartyTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: cigarParty(int cigars, boolean isWeekend)
     * cigarParty(30, false) → false
     * cigarParty(50, false) → true
     * cigarParty(70, true) → true
     * cigarParty(30, true) → false
     */
    @Test
    public void testCigarParty() throws Exception {

        CigarParty cigarParty = new CigarParty();

        assertEquals(false, cigarParty.cigarParty(30, false));
        assertEquals(true, cigarParty.cigarParty(50, false));
        assertEquals(true, cigarParty.cigarParty(70, true));
        assertEquals(false, cigarParty.cigarParty(30, true));

    }

}
<file_sep>package test.mav.Array1;

import mav.Array1.FrontPiece;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static org.junit.Assert.assertArrayEquals;

/**
 * FrontPiece Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
мая 17, 2017

 */
public class FrontPieceTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * frontPiece([1, 2, 3]) → [1, 2]
     * frontPiece([1, 2]) → [1, 2]
     * frontPiece([1]) → [1]
     * frontPiece([]) → []
     */
    @Test
    public void test() throws Exception {
        FrontPiece frontPiece = new FrontPiece();

        assertArrayEquals("wrong", new int[]{1, 2}, frontPiece.frontPiece(new int[]{1, 2, 3}));
        assertArrayEquals("wrong", new int[]{1, 2}, frontPiece.frontPiece(new int[]{1, 2}));
        assertArrayEquals("wrong", new int[]{1}, frontPiece.frontPiece(new int[]{1}));
        assertArrayEquals("wrong", new int[]{}, frontPiece.frontPiece(new int[]{}));
    }

}
<file_sep>package test.mav.warmup1;

import mav.warmup1.HasTeen;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * HasTeen Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
янв 13, 2017

 */
public class HasTeenTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: hasTeen(int a, int b, int c)
     * hasTeen(13, 20, 10) → true
     * hasTeen(20, 19, 10) → true
     * hasTeen(20, 10, 13) → true
     */
    @Test
    public void testHasTeen() throws Exception {
        HasTeen hasTeen = new HasTeen();
        assertEquals(true, hasTeen.hasTeen(13, 20, 10));
        assertEquals(true, hasTeen.hasTeen(20, 19, 10));
        assertEquals(true, hasTeen.hasTeen(20, 10, 13));
    }

}
<file_sep>package mav.warmup1;

/**
 * Given a string, return a string made of the first 2 chars (if present), however include first char only if it is 'o' and include the second only if it is 'z', so "ozymandias" yields "oz".
 */
public class StartOz {

    public String startOz(String str) {
        String result = "";
        if (str.length() == 1 && str.substring(0, 1).equals("o")) {
            result = "o";
        } else if (str.length() > 1) {
            if (str.substring(0, 2).equals("oz")) {
                result = "oz";
            } else if (str.substring(1, 2).equals("z")) {
                result = "z";
            }else if(str.substring(0, 1).equals("o")){
                result = "o";
            }
        }
        return result;
    }
}
<file_sep>package test.mav.string1;

import mav.string1.ExtraEnd;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static junit.framework.TestCase.assertEquals;

/**
 * ExtraEnd Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
фев 2, 2017

 */
public class ExtraEndTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: extraEnd(String str)
     * extraEnd("Hello") → "lololo"
     * extraEnd("ab") → "ababab"
     * extraEnd("Hi") → "HiHiHi"
     */
    @Test
    public void testExtraEnd() throws Exception {

        ExtraEnd extraEnd = new ExtraEnd();
        assertEquals("lololo", extraEnd.extraEnd("lo"));
        assertEquals("ababab", extraEnd.extraEnd("ab"));
        assertEquals("HiHiHi", extraEnd.extraEnd("Hi"));
    }

}
<file_sep>package test.mav.Array1;

import mav.Array1.MakeEnds;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static org.junit.Assert.assertArrayEquals;

/**
 * MakeEnds Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
мар 13, 2017

 */
public class MakeEndsTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: makeEnds(int[] nums)
     * makeEnds([1, 2, 3]) → [1, 3]
     * makeEnds([1, 2, 3, 4]) → [1, 4]
     * makeEnds([7, 4, 6, 2]) → [7, 2]
     */
    @Test
    public void testMakeEnds() throws Exception {

        MakeEnds makeEnds = new MakeEnds();

        assertArrayEquals("wrong", new int[]{1, 3}, makeEnds.makeEnds(new int[]{1, 2, 3}));
        assertArrayEquals("wrong", new int[]{1, 4}, makeEnds.makeEnds(new int[]{1, 2, 3, 4}));
        assertArrayEquals("wrong", new int[]{7, 2}, makeEnds.makeEnds(new int[]{7, 4, 6, 2}));
    }

}
<file_sep>package mav.string1;

/**
 * Given a string, if the first or last chars are 'x', return the string without those 'x' chars, and otherwise
 * return the string unchanged.
 */
public class WithoutX {

    public String withoutX(String str) {
        int end = str.length();

        if (end > 1) {
            if ((str.charAt(0) == 'x') && (str.charAt(end - 1) == 'x')) {
                return str.substring(1, end - 1);
            } else {
                if (str.charAt(0) == 'x') {
                    return str.substring(1, end);
                } else {
                    if (str.charAt(end - 1) == 'x') {
                        return str.substring(0, end - 1);
                    }
                }
            }
        } else {
            return "";
        }
        return str;
    }

}
<file_sep>package mav.string1;

/**
 * Given a string, if a length 2 substring appears at both its beginning and end, return a string without the
 * substring at the beginning, so "HelloHe" yields "lloHe". The substring may overlap with itself, so "Hi" yields "".
 * Otherwise, return the original string unchanged.
 */
public class Without2 {

    public String without2(String str) {
        if (str.length() > 1) {
            if (str.substring(str.length() - 2, str.length()).equals(str.substring(0, 2))) {
                return str.substring(2, str.length());
            }
        } else {
            if (str.length() > 0 && str.length() != 1) {
                return "";
            }
        }
        return str;
    }

}
<file_sep>package test.mav.string1;

import mav.string1.FrontAgain;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * FrontAgain Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
мар 2, 2017

 */
public class FrontAgainTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: frontAgain(String str)
     * frontAgain("edited") → true
     * frontAgain("edit") → false
     * frontAgain("ed") → true
     * frontAgain("jj") → true
     */
    @Test
    public void testFrontAgain() throws Exception {

        FrontAgain frontAgain = new FrontAgain();

        assertEquals(true, frontAgain.frontAgain("edited"));
        assertEquals(false, frontAgain.frontAgain("edit"));
        assertEquals(true, frontAgain.frontAgain("ed"));
        assertEquals(true, frontAgain.frontAgain("jj"));
    }

}
<file_sep>package test.mav.warmup1;

import mav.warmup1.IcyHot;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
* IcyHot Tester.
*
* @author <Authors name>
* @since
янв 12, 2017

* @version 1.0
*/
public class IcyHotTest {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: icyHot(int temp1, int temp2)
* icyHot(120, -1) → true
 icyHot(-1, 120) → true
 icyHot(2, 120) → false
*/
@Test
public void testIcyHot() throws Exception {
    IcyHot icyHot = new IcyHot();
    assertEquals(true, icyHot.icyHot(120, -1));
    assertEquals(true, icyHot.icyHot(-1, 120));
    assertEquals(false, icyHot.icyHot(2, 120));
}

}
<file_sep>package test.mav.warmup1;

import mav.warmup1.StartHi;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
* StartHi Tester.
*
* @author <Authors name>
* @since
янв 12, 2017

* @version 1.0
*/
public class StartHiTest {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: startHi(String str)
* startHi("hi there") → true
 startHi("hi") → true
 startHi("hello hi") → false

 */
@Test
public void testStartHi() throws Exception {
    StartHi startHi = new StartHi();
    assertEquals(true, startHi.startHi("hi there"));
    assertEquals(true, startHi.startHi("hi"));
    assertEquals(false, startHi.startHi("hello hi"));
}

}
<file_sep>package test.mav.string1;

import mav.string1.ConCat;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * ConCat Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
фев 21, 2017

 */
public class ConCatTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: conCat(String a, String b)
     * conCat("abc", "cat") → "abcat"
     * conCat("dog", "cat") → "dogcat"
     * conCat("abc", "") → "abc"
     */
    @Test
    public void testConCat() throws Exception {

        ConCat conCat = new ConCat();
        assertEquals("abcat", conCat.conCat("abc", "cat"));
        assertEquals("dogcat", conCat.conCat("dog", "cat"));
        assertEquals("abc", conCat.conCat("abc", ""));
    }

}
<file_sep>package test.mav.array3;

import mav.array3.MaxSpan;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static junit.framework.TestCase.assertEquals;

/**
 * maxSpan Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
мая 23, 2017

 */
public class maxSpanTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: maxSpan(int[] nums)
     * maxSpan([1, 2, 1, 1, 3]) → 4
     maxSpan([1, 4, 2, 1, 4, 1, 4]) → 6
     maxSpan([1, 4, 2, 1, 4, 4, 4]) → 6
     maxSpan([3, 3]) → 2
     maxSpan([]) → 0
     */
    @Test
    public void testMaxSpan() throws Exception {

        MaxSpan maxSpan = new MaxSpan();

        assertEquals( 4, maxSpan.maxSpan(new int [] {1, 2, 1, 1, 3}));
        assertEquals( 6, maxSpan.maxSpan(new int [] {1, 4, 2, 1, 4, 1, 4}));
        assertEquals( 6, maxSpan.maxSpan(new int [] {1, 4, 2, 1, 4, 4, 4}));
        assertEquals( 2, maxSpan.maxSpan(new int [] {3, 3}));
        assertEquals( 0, maxSpan.maxSpan(new int [] {}));
    }

}
<file_sep>package test.mav.array3;

import mav.array3.Fix34;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertArrayEquals;

/**
 * Fix34 Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
мая 23, 2017

 */
public class Fix34Test {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: fix34(int[] nums)
     * fix34([1, 3, 1, 4]) → [1, 3, 4, 1]
     * fix34([1, 3, 1, 4, 4, 3, 1]) → [1, 3, 4, 1, 1, 3, 4]
     * fix34([3, 2, 2, 4]) → [3, 4, 2, 2]
     */
    @Test
    public void testFix34() throws Exception {
        Fix34 fix34 = new Fix34();

        assertArrayEquals("wrong", new int[]{1, 3, 4, 1}, fix34.fix34(new int[]{1, 3, 1, 4}));
        assertArrayEquals("wrong", new int[]{1, 3, 4, 1, 1, 3, 4}, fix34.fix34(new int[]{1, 3, 1, 4, 4, 3, 1}));
        assertArrayEquals("wrong", new int[]{3, 4, 2, 2}, fix34.fix34(new int[]{3, 2, 2, 4}));
    }

}
<file_sep>package test.mav.string1;

import mav.string1.Without2;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * Without2 Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
мар 2, 2017

 */
public class Without2Test {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: without2(String str)
     * without2("HelloHe") → "lloHe"
     * without2("HelloHi") → "HelloHi"
     * without2("Hi") → ""
     * without2("x") → "x"
     */
    @Test
    public void testWithout2() throws Exception {

        Without2 without2 = new Without2();

        assertEquals("lloHe", without2.without2("HelloHe"));
        assertEquals("HelloHi", without2.without2("HelloHi"));
        assertEquals("", without2.without2("Hi"));
        assertEquals("x", without2.without2("x"));
    }

}
<file_sep>package test.mav.warmup2;

import mav.warmup2.Array667;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * Array667 Tester.
 *
 * @author <Authors name>
 * @version 1.0
 * @since
янв 31, 2017

 */
public class Array667Test {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: array667(int[] nums)
     * array667([6, 6, 2]) → 1
     * array667([6, 6, 2, 6]) → 1
     * array667([6, 7, 2, 6]) → 1
     * array667([6, 6, 2, 6, 7]) → 2
     */
    @Test
    public void testArray667() throws Exception {

        Array667 array667 = new Array667();
        assertEquals(1, array667.array667(new int[]{6, 6, 2}));
        assertEquals(1, array667.array667(new int[]{6, 6, 2, 6}));
        assertEquals(1, array667.array667(new int[]{6, 7, 2, 6}));
        assertEquals(2, array667.array667(new int[]{6, 6, 2, 6, 7}));
    }

}
<file_sep>package test.mav.Array1;

import mav.Array1.MidThree;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static org.junit.Assert.assertArrayEquals;

/**
 * MidThree Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
мар 20, 2017

 */
public class MidThreeTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: midThree(int[] nums)
     * midThree([1, 2, 3, 4, 5]) → [2, 3, 4]
     * midThree([8, 6, 7, 5, 3, 0, 9]) → [7, 5, 3]
     * midThree([1, 2, 3]) → [1, 2, 3]
     */
    @Test
    public void testMidThree() throws Exception {

        MidThree midThree = new MidThree();

        assertArrayEquals("wrong", new int[]{2, 3, 4}, midThree.midThree(new int[]{1, 2, 3, 4, 5}));
        assertArrayEquals("wrong", new int[]{7, 5, 3}, midThree.midThree(new int[]{8, 6, 7, 5, 3, 0, 9}));
        assertArrayEquals("wrong", new int[]{1, 2, 3}, midThree.midThree(new int[]{1, 2, 3}));
    }

}
<file_sep>package test.mav.string1;

import mav.string1.ExtraFront;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * ExtraFront Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
мар 2, 2017

 */
public class ExtraFrontTest {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: extraFront(String str)
     * extraFront("Hello") → "HeHeHe"
     * extraFront("ab") → "ababab"
     * extraFront("H") → "HHH"
     */
    @Test
    public void testExtraFront() throws Exception {

        ExtraFront extraFront = new ExtraFront();

        assertEquals("HeHeHe", extraFront.extraFront("Hello"));
        assertEquals("ababab", extraFront.extraFront("ab"));
        assertEquals("HHH", extraFront.extraFront("H"));
    }

}
<file_sep>package mav.warmup1;

public class FrontBack {
    /*Given a string, return a new string where the first and last chars have been exchanged.*/
    public String frontBack(String str) {
        if(str.length() >= 2){
            return str.substring(str.length() - 1) + str.substring(1, str.length() - 1) + str.substring(0, 1);
        }else if (str.length() == 1){
            return str;
        }else{
            return "";
        }
    }
}
<file_sep>package mav.string1;

/**
 * Given a string, return a new string made of 3 copies of the first 2 chars of the original string.
 * The string may be any length. If there are fewer than 2 chars, use whatever is there.
 */
public class ExtraFront {

    public String extraFront(String str) {
        String result = "";
        if (str.length() > 1) {
            for (int i = 0; i < 3; i++) {
                result += str.substring(0, 2);
            }
        } else if (str.length() > 0) {
            for (int i = 0; i < 3; i++) {
                result += str.substring(0, 1);
            }
        }
        return result;
    }

}
<file_sep>package mav.warmup1;

public class Diff21 {
    /*Given an int n, return the absolute difference between n and 21, except return double the absolute difference if n is over 21.*/
    public int diff21(int n) {
        int result = 21 -n;
        if(result < 0){
            return result * -2;
        }else {
            return result;
        }
    }
}
<file_sep>package test.mav.warmup1;

import mav.warmup1.Makes10;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
* Makes10 Tester.
*
* @author <Authors name>
* @since
дек 18, 2016

* @version 1.0
*/
public class Makes10Test {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: makes10(int a, int b)
* makes10(9, 10) → true
 makes10(9, 9) → false
 makes10(1, 9) → true
*/
@Test
public void testMakes10() throws Exception {
    Makes10 makes10 = new Makes10();
    assertEquals(true, makes10.makes10(9, 10));
    assertEquals(false, makes10.makes10(9, 9));
    assertEquals(true, makes10.makes10(1, 9));
}

}
<file_sep>package test.mav.Array1;

import mav.Array1.SwapEnds;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertArrayEquals;

/**
* SwapEnds Tester.
*
* @author <Authors name>
* @since
мар 17, 2017

* @version 1.0
*/
public class SwapEndsTest {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

    /**
     * Method: SwapEnds(int[] a,)
     * swapEnds([1, 2, 3, 4]) → [4, 2, 3, 1]
     *swapEnds([1, 2, 3]) → [3, 2, 1]
     *swapEnds([8, 6, 7, 9, 5]) → [5, 6, 7, 9, 8]
     */
    @Test
    public void testSwapEnds() throws Exception {

        SwapEnds swapEnds = new SwapEnds();

        assertArrayEquals("wrong", new int[]{4, 2, 3, 1}, swapEnds.swapEnds(new int[]{1, 2, 3, 4}));
        assertArrayEquals("wrong", new int[]{3, 2, 1}, swapEnds.swapEnds(new int[]{1, 2, 3}));
        assertArrayEquals("wrong", new int[]{5, 6, 7, 9, 8}, swapEnds.swapEnds(new int[]{8, 6, 7, 9, 5}));
    }

}
<file_sep>package test.mav.string1;

import mav.string1.Left2;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * Left2 Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
фев 6, 2017

 */
public class Left2Test {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: left2(String str)
     * left2("Hello") → "lloHe"
     * left2("java") → "vaja"
     * left2("Hi") → "Hi"
     */
    @Test
    public void testLeft2() throws Exception {

        Left2 left2 = new Left2();
        assertEquals("lloHe", left2.left2("Hello"));
        assertEquals("vaja", left2.left2("java"));
        assertEquals("Hi", left2.left2("Hi"));
    }

}
<file_sep>package test.mav.Array1;

import mav.Array1.Sum2;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
 * Sum2 Tester.
 *
 * @author <<NAME>>
 * @version 1.0
 * @since
мар 13, 2017

 */
public class Sum2Test {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    /**
     * Method: sum2(int[] nums)
     * sum2([1, 2, 3]) → 3
     * sum2([1, 1]) → 2
     * sum2([1, 1, 1, 1]) → 2
     * sum2([1]) → 1
     */
    @Test
    public void testSum2() throws Exception {

        Sum2 sum2 = new Sum2();

        assertEquals(3, sum2.sum2(new int[]{1, 2, 3}));
        assertEquals(2, sum2.sum2(new int[]{1, 1}));
        assertEquals(2, sum2.sum2(new int[]{1, 1, 1, 1}));
        assertEquals(1, sum2.sum2(new int[]{1}));
    }

}
<file_sep>package mav.string1;

/**
 * Given a string, return a version without the first 2 chars. Except keep the first char if it is 'a'
 * and keep the second char if it is 'b'. The string may be any length. Harder than it looks.
 */
public class DeFront {

    public String deFront(String str) {
        if (str.charAt(0) == 'a') {
            if (str.charAt(1) == 'b') {
                return str;
            }
            return str.substring(0, 1) + str.substring(2, str.length());
        }
        if (str.charAt(1) == 'b') {
            return str.substring(1, str.length());
        }
        return str.substring(2, str.length());
    }

}
<file_sep>package test.mav.warmup1;

import mav.warmup1.NotString;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
* NotString Tester.
*
* @author <Authors name>
* @since
дек 18, 2016

* @version 1.0
*/
public class NotStringTest {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: notString(String str)
* notString("candy") → "not candy"
 notString("x") → "not x"
 notString("not bad") → "not bad"
*/
@Test
public void testNotString() throws Exception {
    NotString notString = new NotString();
    assertEquals("not candy", notString.notString("candy"));
    assertEquals("not x", notString.notString("x"));
    assertEquals("not bad", notString.notString("not bad"));
}

}
<file_sep>package mav.warmup2;

/**
 * Given 2 strings, a and b, return the number of the positions where they contain the same length 2 substring.
 * So "xxcaazz" and "xxbaaz" yields 3, since the "xx", "aa", and "az" substrings appear in the same place in both strings.
 */
public class StringMatch {

    public int stringMatch(String a, String b) {
        int count = 0;
        int length = Math.min(a.length(), b.length());

        for (int i = 0; i < length - 1; i++) {
            String strA = a.substring(i, i + 2);
            String strB = b.substring(i, i + 2);
            if (strA.equals(strB)) {
                count++;
            }
        }
        return count;
    }
}
<file_sep>package test.mav.warmup1;

import mav.warmup1.EndUp;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

import static junit.framework.TestCase.assertEquals;

/**
* EndUp Tester.
*
* @author <Authors name>
* @since
янв 24, 2017

* @version 1.0
*/
public class EndUpTest {

@Before
public void before() throws Exception {
}

@After
public void after() throws Exception {
}

/**
*
* Method: endUp(String str)
* endUp("Hello") → "HeLLO"
 endUp("hi there") → "hi thERE"
 endUp("hi") → "HI"
*/
@Test
public void testEndUp() throws Exception {

    EndUp endUp = new EndUp();
    assertEquals("HeLLO", endUp.endUp("Hello"));
    assertEquals("hi thERE", endUp.endUp("hi there"));
    assertEquals("HI", endUp.endUp("hi"));
}

}

repo_language: Java


text:
<file_sep><?php

namespace Database\Seeders;

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Seeder;
use App\Models\User;
use App\Models\Category;
use App\Models\Question;
use App\Models\Reply;
use App\Models\Like;

class DatabaseSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        \App\Models\User::factory(10)->create();
        // \App\Models\Category::factory(5)->create();
        \App\Models\Question::factory(10)->create();
        // \App\Models\Reply::factory(10)->create()->each(function($reply){
        //     return $reply->like()->save(\App\Models\Like::factory()->make());
        // });
        // factory(User::class, 10)->create();
        // factory(Category::class, 5)->create();
        // factory(Question::class, 10)->create();
        // factory(Reply::class, 50)->create()->each(function ($reply){
        //     return $reply->like()->save(factory(Like::class)->make());
        // });
    }
}

repo_language: PHP


text:
<repo_name>DanielKorsa/stonks_monitoring_dashboard<file_sep>/sample.py
#
#import quandl
import dash
import dash_table
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html

#from pandas_datareader import data as web
import pandas as pd
from pandas_datareader import data as pdr
import datetime as dt
import yfinance as yf
yf.pdr_override()#! Connector from pandas_datareader to Yahoo Finance

user_stonks_df = pd.read_csv('my_stonks.csv')

today = dt.datetime.now()
week = today - dt.timedelta(days=7)
span_7_days = week.replace(hour=0, minute=0, second=0, microsecond=0)
month = today - dt.timedelta(days=30)
span_30_days = month.replace(hour=0, minute=0, second=0, microsecond=0)
year = today - dt.timedelta(days=365)
span_365_days = year.replace(hour=0, minute=0, second=0, microsecond=0)

app = dash.Dash('Stonks Dashboard')

app.layout = html.Div(children=[
    html.H1(children='Stonks Monitor'),

    dcc.Dropdown(
        id='my-dropdown',
        options=[
            {'label': 'Blizzard', 'value': 'ACTIVISION BLIZZARD'},
            {'label': 'Alibaba', 'value': 'ALIBABA'},
            {'label': 'Nio', 'value': 'NIO'},
            {'label': 'Apple', 'value': 'AAPL'}
        ],
        value='NIO'
    ),
    dcc.Graph(id='my-graph'),
    html.Div(children='''
        Time Span
    '''),
    dcc.RadioItems(
        options=[
            {'label': 'Day', 'value': 'day'},
            {'label': 'Week', 'value': 'week'},
            {'label': 'Month', 'value': 'month'}
        ],
        value='day',
        labelStyle={'display': 'inline-block'},
        style={'padding':'300'}
    ),
    dash_table.DataTable(
    id='stonk_table',
    columns=[{"name": i, "id": i} for i in user_stonks_df.columns],
    data=user_stonks_df.to_dict('records'),
)
], style={'width': '200'}
)

@app.callback(Output('my-graph', 'figure'), [Input('my-dropdown', 'value')])
def update_graph(selected_dropdown_value):
    df = pdr.get_data_yahoo(selected_dropdown_value, start=span_7_days, end=today)

    return {
        'data': [{
            'x': df.index,
            'y': df.Close
        }],
        'layout': {'margin': {'l': 40, 'r': 0, 't': 20, 'b': 30}}
    }

app.css.append_css({'external_url': 'https://codepen.io/chriddyp/pen/bWLwgP.css'})

if __name__ == '__main__':
    app.run_server(debug=False)<file_sep>/data_parser.py
from pandas_datareader import data as web
import pandas as pd
#from datetime import datetime as dt
import datetime as dt
import pprint

# today = dt.datetime.now()
# week = today - dt.timedelta(days=7)
# span_7_days = week.replace(hour=0, minute=0, second=0, microsecond=0)
# month = today - dt.timedelta(days=30)
# span_30_days = month.replace(hour=0, minute=0, second=0, microsecond=0)
# year = today - dt.timedelta(days=365)
# span_365_days = year.replace(hour=0, minute=0, second=0, microsecond=0)

import yfinance as yf

company = 'NIO'

def get_ticker_ref(ticker_name):
    '''
    '''

    return yf.Ticker(ticker_name)

def get_ticker_info(ticker_ref):
    '''
    '''
    return ticker_ref.info

stonk_ref = get_ticker_ref(company)
stonk_info = get_ticker_info(stonk_ref)

stonk_data = stonk_ref.history(interval='5d')
#pprint.pprint(stonk_data)
pprint.pprint(stonk_info)

def calc_win(buy_in, current_price, shares_n):
    '''
    '''
    return (current_price - buy_in) * shares_n

alibaba = calc_win(240, 2500, 50)
print(alibaba)

nio = calc_win(21.57, 33.30, 30)
print(nio)<file_sep>/requirements.txt
Brotli==1.0.9
certifi==2020.6.20
chardet==3.0.4
click==7.1.2
dash==1.17.0
dash-core-components==1.13.0
dash-html-components==1.1.1
dash-renderer==1.8.3
dash-table==4.11.0
Flask==1.1.2
Flask-Compress==1.8.0
future==0.18.2
idna==2.10
inflection==0.5.1
itsdangerous==1.1.0
Jinja2==2.11.2
lxml==4.6.1
MarkupSafe==1.1.1
more-itertools==8.6.0
multitasking==0.0.9
numpy==1.19.3
pandas==1.1.4
pandas-datareader==0.9.0
plotly==4.12.0
python-dateutil==2.8.1
pytz==2020.4
Quandl==3.5.3
requests==2.24.0
retrying==1.3.3
six==1.15.0
urllib3==1.25.11
Werkzeug==1.0.1
yfinance==0.1.55

languages: Text Python

repo_language: Text