Skip to content

MindReading toolbox for SDF and latency detection#43

Open
StavHertz wants to merge 1 commit intoAllenInstitute:masterfrom
StavHertz:stav_branch
Open

MindReading toolbox for SDF and latency detection#43
StavHertz wants to merge 1 commit intoAllenInstitute:masterfrom
StavHertz:stav_branch

Conversation

@StavHertz
Copy link
Contributor

Please let this in.

MindReading toolbox for SDF and latency detection
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@@ -0,0 +1,39 @@
import numpy as np
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of constants hardcoded in this script that could be made into default parameter values. Instead of:

def my_function(x):
    return 5 * x

write:

def my_function(x, other_number=5):
    return other_number * x

This does the same thing, but is clearer and more flexible.

@NileGraddis
Copy link
Contributor

A general comment: it is cool that you are writing standalone scripts! You can make these easier to use by allowing them to admit command line arguments. This looks like:

import argparse # a default Python package

parser = argparse.ArgumentParser()
parser.add_argument('some_integer', type=int, help='this integer will be printed') # define and document a command line parameter
args = parser.parse_args()

print(args.some_integer)

If someone then calls:

>>>python <path_to_your_script>.py 10

This script should print 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants