Showing 109 of 313 total issues

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

        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

          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

            File two_variable_nn.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            var multiVariableNeuralNetworkTrainer = function (numberOfInputNodes,
                                                              svg_el, table_el,
                                                              dataPoints, labels,
                                                              weights, bias,
                                                              gradientDescentButton, gradientDescent10Button, gradientDescent100Button,
            Severity: Minor
            Found in people/a/AlammarJay/js/two_variable_nn.js - About 5 hrs to fix

              Function run has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

                async run(context: SsgContext, inputPattern: string): Promise<void> {
                  const inputFiles = await glob(inputPattern)
                  const dictionary = new Dictionary(this.logger)
                  const dictWords = await dictionary.read(this.dictionaryFile)
                  this.logger.debug("Looking for files", inputPattern)
              Severity: Minor
              Found in WordFinder.ts - About 5 hrs to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function initializeNeuralNetworkGraph has 121 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              multiVariableNeuralNetworkTrainer.prototype.initializeNeuralNetworkGraph = function () {
                this.nnGraphHolder = d3.select(this.neuralNetworkGraphEl) // select the 'body' element
                  .append("svg")           // append an SVG element to the body
                  .attr("width", this.graphWidth)      // make the SVG element 449 pixels wide
                  .attr("height", 250);    // make the SVG element 249 pixels high
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js - About 4 hrs to fix

                Function createReplacer has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                Open

                  protected async createReplacer(context: HtmlRR0SsgContext): Promise<DomReplacer<HTMLImageElement>> {
                    return {
                      replace: async (imgEl: HTMLImageElement): Promise<HTMLImageElement> => {
                        const src = imgEl.src
                        const imgParentEl = imgEl.parentElement
                Severity: Minor
                Found in ImageCommand.ts - About 4 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function initializeGraph has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                accuracyGraph.prototype.initializeGraph = function (containerElement, data) {
                
                  this.graphHolder = d3.select(this.containerElement) // select the 'body' element
                    .append("svg")
                    .attr("class", "accuracy-graph")
                Severity: Major
                Found in people/a/AlammarJay/js/accuracy-graph.js - About 4 hrs to fix

                  File build.ts has 346 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import {
                    AngularExpressionReplaceCommand,
                    ClassDomReplaceCommand,
                    ContentStepConfig,
                    CopyStep,
                  Severity: Minor
                  Found in build.ts - About 4 hrs to fix

                    Function drawGraph has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    shallowNeuralNetworkGrapher.prototype.drawGraph = function () {
                      var grapher = this;
                      this.nodeRadius = 15;
                      this.weightNodeWidthRatio = 1.7;
                      // Let's calculate our coordinates for all the nodes
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js - About 3 hrs to fix

                      Function draw has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          draw: function (layer, properties, activeRegionSVGGroup, layerInputs, tooltipDiv) {
                            console.log("layer", layer)
                            var data = layer.nodeRenderingDetails,
                              containerElement = properties.containerElement
                      
                      
                      Severity: Major
                      Found in people/a/AlammarJay/js/nn_calc.js - About 3 hrs to fix

                        Function portSearchChange has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function portSearchChange (filter) {
                          tableBody.innerHTML = ""
                          const input = (portSearchInput.value || "").toLowerCase().trim()
                        
                          /**
                        Severity: Minor
                        Found in tech/info/soft/net/protocole/index.js - About 3 hrs to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function initializeGraph has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        sigmoidGraph.prototype.initializeGraph = function () {
                          var obj = this;
                          this.graphHolder = d3.select(this.containerElement) // select the container element
                            .append("svg")           // append an SVG element to the body
                            .attr("class", "activation-graph")
                        Severity: Major
                        Found in people/a/AlammarJay/js/sigmoid_graph.js - About 3 hrs to fix

                          Function initializeGraph has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          reluGraph.prototype.initializeGraph = function () {
                            var obj = this
                            this.graphHolder = d3.select(this.containerElement) // select the 'body' element
                              .append("svg")           // append an SVG element to the body
                              .attr("class", "activation-graph")
                          Severity: Major
                          Found in people/a/AlammarJay/js/relu_graph.js - About 3 hrs to fix

                            Function graphNode has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function graphNode(data) {
                            
                                var grapher = this
                                // JOIN
                                var inputGroups = this.neuralNetworkG.selectAll(this.svgElement + " .output-group")
                            Severity: Major
                            Found in people/a/AlammarJay/js/nn_calc.js - About 3 hrs to fix

                              Function graphSoftmax has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function graphSoftmax(data) {
                              
                                  var softmax = this.neuralNetworkG.selectAll(this.svgElement + " .softmax")
                                    .data([data])
                              
                              
                              Severity: Major
                              Found in people/a/AlammarJay/js/nn_calc.js - About 3 hrs to fix

                                Function graphWeightNodes has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function graphWeightNodes(data) {
                                    var radius = this.nodeRadius * this.weightNodeSizeScale
                                    var grapher = this
                                    var t = d3.transition()
                                      .duration(750)
                                Severity: Major
                                Found in people/a/AlammarJay/js/nn_calc.js - About 3 hrs to fix

                                  Function initializeNeuralNetworkGraph has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  NN_trainer.prototype.initializeNeuralNetworkGraph = function () {
                                    this.nnGraphHolder = d3.select(this.neuralNetworkGraphEl) // select the 'body' element
                                      .append("svg")           // append an SVG element to the body
                                      .attr("width", this.graphWidth)      // make the SVG element 449 pixels wide
                                      .attr("height", 150);    // make the SVG element 249 pixels high
                                  Severity: Major
                                  Found in people/a/AlammarJay/js/simple_nn.js - About 3 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language