 use `.fasta` as the file extension instead, nothing happens. This is because basename only works when it exactly matches a string in the file.

~~~
$ basename SRR097977.fastq.fasta
~~~
{:.bash}

~~~
SRR097977.fastq
~~~
{:.output}

Basename is really powerful when used in a for loop. It allows to access just the file prefix, which you can use to name things. Let's try this.

Inside our for loop, we create a new name variable. 
We call the basename function inside the parenthesis, passing in our variable name from the for loop, in this case `${filename}`.
Finally we state that `.fastq` should be removed from the file name. 
It’s important to note that we’re not changing the actual files, we’re creating a new variable called "name". 
The line > echo $name will print to the terminal the variable name each time the for loop runs. 
Because we are iterating over two files, we expect to see two lines of output.

~~~
$ for filename in *.fastq
> do
> name=$(basename ${filename}.fastq)
> echo ${name}
> done
~~~
{:.bash}

Let's unpack `name=$(basename ${filename}.fastq)`. 
The first `$` is actually part of a `$( command )` pattern. 
In this case the command is `basename ${filename}.fastq`. 
So the second `$` is part of a `${variable}` pattern. 
The value of the `filename` variable is "expanded" into the `basename` command before the command is executed.
Finally, the result of the `basename` command is stored in the `name` variable.
Later, when we want to **use** the value of the `name` variable, we'll need to stick a `$` in front as either `$name` or perhaps `${name}`.

> ## Exercise
>
> Print the file prefix of all of the `.txt` files in our current directory.
>
>> ## Solution
>>  
>>
>> ~~~
>> $ for filename in *.txt
>> > do
>> > name=$(basename ${filename}.txt)
>> > echo ${name}
>> > done
>> ~~~
>> {:.bash}
>>
> {:.solution}
{:.challenge}

One way this is really useful is to move files. 
Let's rename all of our.txt files using `mv` so that they have the years on them, which will document when we created them. 

~~~
$ for filename in *.txt
> do
> name=$(basename ${filename}.txt)
> mv ${filename}  ${name}_2020.txt
> done
~~~
{:.bash}


> ## Exercise
>
> Remove `_2020` from all of the `.txt` files. 
>
>> ## Solution
>>  
>>
>> ~~~
>> $ for filename in *_2020.txt
>> > do
>> > name=$(basename ${filename} _2020.txt)
>> > mv ${filename} ${name}.txt
>> > done
>> ~~~
>> {:.bash}
>>
> {:.solution}
{:.challenge}


<gh_stars>1-10
/**  \file indexvector.hpp \brief Generators for index vectors. */
/*
-------------------------------------------------------------------------
   This file is part of BayesOpt, an efficient C++ library for 
   Bayesian optimization.

   Copyright (C) 2011-2015 <NAME> <<EMAIL>>
 
   BayesOpt is free software: you can redistribute it and/or modify it 
   under the terms of the GNU Affero General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   BayesOpt is distributed in the hope that it will be useful, but 
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU Affero General Public License for more details.

   You should have received a copy of the GNU Affero General Public License
   along with BayesOpt.  If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------------
*/

#ifndef __INDEX_VECTOR_HPP__
#define __INDEX_VECTOR_HPP__

#include <algorithm>

namespace bayesopt
{
  namespace utils
  {
    /**
     * \brief Simple class to generate sequences of unique numbers
     */
    class CUnique 
    {
    private:
      int current;
    public:
      CUnique(int initial = 1) {current=initial-1;}
      int operator()() {return ++current;}
    };

    /** 
     * Generates a vector of indexes (1..n)
     * @param n vector size
     * @return index vector
     */
    inline std::vector<int> return_index_vector(size_t n)
    {
      CUnique UniqueNumber;
      std::vector<int> arr(n);
      generate (arr.begin(), arr.end(), UniqueNumber);
      return arr;
    };

    /** 
     * Generates a vector of indexes starting at A and size_t n
     * @param a starting point
     * @param n vector size
     * @return index vector
     */
    inline std::vector<int> return_index_vector(int a, size_t n)
    {
      CUnique UniqueNumber(a);
      std::vector<int> arr(n);
      generate (arr.begin(), arr.end(), UniqueNumber);
      return arr;
    };


    /** 
     * Modify a vector of indexes (0..n)
     * @param arr vector
     */
    inline void modify_index_vector(std::vector<int>& arr)
    {
      CUnique UniqueNumber;
      generate (arr.begin(), arr.end(), UniqueNumber);
    };

  } //namespace utils
} //namespace bayesopt

#endif
Who is the NFL's most dominant pass rusher?
The 2020 NFL season felt like a transition year for defensive linemen. A few of the older names we are used to hearing dominate weekly headlines either sat out the season had injuries that hobbled them or just were not performing to their usual standard. In their absence, a few young talented kids in the NFL stepped up and made their claim to be considered among the NFL's most dominant pass rushers.
TJ Watt or Xavien Howard will be an interesting defensive player of the year race. The younger Watt brother has emerged as the new face of this current Pittsburgh Steelers era(well until the draft a QB).
Leonard Williams finally lived up to the hype.
When you weigh QB pressures against sacks it becomes clear that Pittsburgh Steelers linebacker T.J. Watt has been the class of his position group all season. T.J. Watt has surprisingly emerged as the face of the franchise and has led the change in perception of the Steelers back to a defense-first led team after a few flashy seasons with the triple B's (Big Ben, Antonio Brown, and Le'Veon Bell). TJ. Watt is one of the leaders of this new school group of NFL pass rushers. Watt is disruptive, plays violently which sets the tone for the Steelers, and has impressive agility for his size.
In 2nd place among all NFL defensive linemen is star D-Tackle Aaron Donald. Donald is in what I would consider the middle of one of the NFL's most impressive prime stretches. Aaron Donald has now made six straight first-team all pros, seven straight pro bowlers and despite playing defensive tackle, Donald has five double-digit sack seasons in his last six seasons in the NFL. Aaron Donald, while being beaten out this year, has been among the NFL's most disruptive pass rushers since his 2nd season in the NFL.
For the third defensive lineman, we are going to take a look at New York Giants defensive end Leonard Williams. Coming into the NFL from USC Williams was a well-regarded prospect who was routinely mocked in the top 5 as the NFL draft approached.
Williams was drafted by the dysfunctional New York Jets 6th overall and failed to live up to the lofty draft expectations as the franchise floated through abject mediocrity. In 2019, Leonard Williams was traded (maybe freed) from the New York Jets for a third-rounder in 2020 and a fifth rounder in 2021. Since leaving that horrible franchise Leonard Williams has been a player reborn in the very same city.
Going into the 2020 season Leonard Williams was playing on the franchise tag with the opportunity to finally fulfill his potential on a new young, dynamic but immature defense. Leonard has had a mini T.J. Watt impression in helping turn the New York Giants back into a defense-first led team.
The Giants were a tough nut for any NFL team and Leonard Williams was one of the major reasons why. Leonard Williams