Showing 313 of 313 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

(function (root, factory) {
  if (typeof module !== "undefined" && module.exports) {
    module.exports = factory(require("d3"))
  } else if (typeof define === "function" && define.amd) {
    define(["d3"], factory)
Severity: Major
Found in people/a/AlammarJay/js/d3-jetpack.js and 1 other location - About 2 wks to fix
people/a/AlammarJay/feedforward-neural-networks-visual-interactive/index_files/d3-jetpack.js on lines 1..215

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 2463.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

(function (root, factory) {
  if (typeof module !== "undefined" && module.exports) {
    module.exports = factory(require("d3"))
  } else if (typeof define === "function" && define.amd) {
    define(["d3"], factory)
people/a/AlammarJay/js/d3-jetpack.js on lines 1..215

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 2463.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

angular.module("rr0").service("matrixService", ["$log", "$q", "$rootScope", "$http", function ($log, $q, $rootScope, $http) {
  "use strict"

  function Question(t, i) {
    this.title = t
Severity: Major
Found in time/1/9/7/7/Poher_Matrice/matrix.es5.js and 1 other location - About 1 wk to fix
time/1/9/7/7/Poher_Matrice/matrix.js on lines 1..221

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 2050.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

angular.module('rr0')
    .service('matrixService', ['$log', '$q', '$rootScope', '$http', function ($log, $q, $rootScope, $http) {
        'use strict';

        function Question(t, i) {
Severity: Major
Found in time/1/9/7/7/Poher_Matrice/matrix.js and 1 other location - About 1 wk to fix
time/1/9/7/7/Poher_Matrice/matrix.es5.js on lines 2..217

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 2050.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function wrapAPIs has 957 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    const wrapAPIs = extensionAPIs => {
      // NOTE: apiMetadata is associated to the content of the api-metadata.json file
      // at build time by replacing the following "include" with the content of the
      // JSON file.
      const apiMetadata = {
Severity: Major
Found in extension/Shared (Extension)/Resources/browser-polyfill.js - About 4 days to fix

    File nn_calc.js has 1464 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    (function (global, factory) {
      typeof exports === "object" && typeof module !== "undefined" ? factory() :
        typeof define === "function" && define.amd ? define(factory) :
          (factory())
    }(this, (function () {
    Severity: Major
    Found in people/a/AlammarJay/js/nn_calc.js - About 3 days to fix

      File browser-polyfill.js has 983 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      (function (global, factory) {
        if (typeof define === "function" && define.amd) {
          define("webextension-polyfill", ["module"], factory)
        } else if (typeof exports !== "undefined") {
          factory(module)
      Severity: Major
      Found in extension/Shared (Extension)/Resources/browser-polyfill.js - About 2 days to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        sigmoidGraph.prototype.updateGraph = function () {
        
          var obj = this;
          this.width = this.graphWidth - this.margin.left - this.margin.right;
          this.height = this.graphHeight - this.margin.top - this.margin.bottom;
        Severity: Major
        Found in people/a/AlammarJay/js/sigmoid_graph.js and 1 other location - About 2 days to fix
        people/a/AlammarJay/js/relu_graph.js on lines 145..178

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 382.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        reluGraph.prototype.updateGraph = function () {
        
          var obj = this
          this.width = this.graphWidth - this.margin.left - this.margin.right
          this.height = this.graphHeight - this.margin.top - this.margin.bottom
        Severity: Major
        Found in people/a/AlammarJay/js/relu_graph.js and 1 other location - About 2 days to fix
        people/a/AlammarJay/js/sigmoid_graph.js on lines 145..178

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 382.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        shallowNeuralNetworkGrapher.prototype.graphBiasToSoftmaxArrows = function (data) {
          var inputToBiasLines = this.neuralNetworkG.selectAll(this.svgElement + " .bias-to-softmax-line")
            .data(data);
        
          inputToBiasLines.exit()
        Severity: Major
        Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 1 day to fix
        people/a/AlammarJay/js/nn_calc.js on lines 1031..1076

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 267.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

          function graphBiasToSoftmaxArrows(data) {
        
            var inputToBiasLines = this.neuralNetworkG.selectAll(this.svgElement + " .bias-to-softmax-line")
              .data(data)
        
        
        Severity: Major
        Found in people/a/AlammarJay/js/nn_calc.js and 1 other location - About 1 day to fix
        people/a/AlammarJay/js/shallow_nn_grapher.js on lines 429..472

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 267.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        File simple_nn.js has 583 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * Created by alammar on 11/16/16.
         */
        
        
        
        Severity: Major
        Found in people/a/AlammarJay/js/simple_nn.js - About 1 day to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          multiVariableNeuralNetworkTrainer.prototype.batchAddErrorPoint = function (valuesArray) {
          
            this.error_history = this.error_history.concat(valuesArray);
          
            // Cut the needed number of elements to be within our specified error_chart_history_x
          Severity: Major
          Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 day to fix
          people/a/AlammarJay/js/simple_nn.js on lines 289..310

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 197.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          NN_trainer.prototype.batchAddErrorPoint = function (valuesArray) {
          
            this.error_history = this.error_history.concat(valuesArray);
          
          
          
          Severity: Major
          Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 1 day to fix
          people/a/AlammarJay/js/two_variable_nn.js on lines 224..243

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 197.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            softmax = function (input) {
          
              if (!(input instanceof Array))
                throw (TypeError("Input passed into softmax() is not an array. softmax() expects an array. Input: " + input, "nnVizUtils.js"))
          
          
          Severity: Major
          Found in people/a/AlammarJay/js/nn_calc.js and 1 other location - About 7 hrs to fix
          people/a/AlammarJay/js/nnVizUtils.js on lines 71..90

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 190.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          softmax = function (input) {
          
            if (!(input instanceof Array))
              throw(TypeError("Input passed into softmax() is not an array. softmax() expects an array. Input: " + input, "nnVizUtils.js"));
          
          
          Severity: Major
          Found in people/a/AlammarJay/js/nnVizUtils.js and 1 other location - About 7 hrs to fix
          people/a/AlammarJay/js/nn_calc.js on lines 733..752

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 190.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          var sigmoidGraph = function (containerElement, xStart, xEnd, xDefault, sliderElement, sigmoidInputElement,
                                       sigmoidFormulaInputElement, sigmoidResult, sigmoidGraphResult) {
            this.containerElement = containerElement;
            this.graphWidth = 400;
            this.graphHeight = 160;
          Severity: Major
          Found in people/a/AlammarJay/js/sigmoid_graph.js and 1 other location - About 7 hrs to fix
          people/a/AlammarJay/js/relu_graph.js on lines 5..23

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 187.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          var reluGraph = function (containerElement, xStart, xEnd, xDefault, sliderElement, reluInputElement,
                                    reluFormulaInputElement, reluResult, reluGraphResult) {
            this.containerElement = containerElement
            this.graphWidth = 400
            this.graphHeight = 160
          Severity: Major
          Found in people/a/AlammarJay/js/relu_graph.js and 1 other location - About 7 hrs to fix
          people/a/AlammarJay/js/sigmoid_graph.js on lines 5..23

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 187.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          File shallow_nn_grapher.js has 442 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * Created by alammar on 12/8/16.
           */
          
          var shallowNeuralNetworkGrapher = function (inputNodeCount, outputNodeCount, svgElement, analyticsCategory) {
          Severity: Minor
          Found in people/a/AlammarJay/js/shallow_nn_grapher.js - About 6 hrs to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            reluGraph.prototype.attachEventsToSlider = function () {
              console.log("attach", this.sliderElement)
              // Attach events to react to the user moving the sliders
              var self = this
              $(this.sliderElement).on("input change", (function () {
            Severity: Major
            Found in people/a/AlammarJay/js/relu_graph.js and 1 other location - About 6 hrs to fix
            people/a/AlammarJay/js/sigmoid_graph.js on lines 181..192

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 165.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Severity
            Category
            Status
            Source
            Language