All Projects → sngjuk → argparse-to-class

sngjuk / argparse-to-class

Licence: MIT license
Transform argparse into class format for Jupyter Notebook execution

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to argparse-to-class

pytest-notebook
A pytest plugin for regression testing and regenerating Jupyter Notebooks
Stars: ✭ 35 (+75%)
Mutual labels:  jupyter, ipython-notebook
Ansible Jupyterhub
Ansible role to setup jupyterhub server (deprecated)
Stars: ✭ 14 (-30%)
Mutual labels:  jupyter, ipython-notebook
nbtop
IPython Notebook server monitor inspired by htop
Stars: ✭ 50 (+150%)
Mutual labels:  jupyter, ipython-notebook
args-parser
args-parser is a small C++ header-only library for parsing command line arguments.
Stars: ✭ 53 (+165%)
Mutual labels:  argument-parser, arguments
Ipytracer
📊 Algorithm Visualizer for IPython/Jupyter Notebook
Stars: ✭ 138 (+590%)
Mutual labels:  jupyter, ipython-notebook
minimist2
TypeScript/JavaScript ES6 rewrite of popular Minimist argument parser
Stars: ✭ 20 (+0%)
Mutual labels:  argument-parser, argparse
Nbstripout
strip output from Jupyter and IPython notebooks
Stars: ✭ 738 (+3590%)
Mutual labels:  jupyter, ipython-notebook
Vscodejupyter
Jupyter for Visual Studio Code
Stars: ✭ 337 (+1585%)
Mutual labels:  jupyter, ipython-notebook
Sci Pype
A Machine Learning API with native redis caching and export + import using S3. Analyze entire datasets using an API for building, training, testing, analyzing, extracting, importing, and archiving. This repository can run from a docker container or from the repository.
Stars: ✭ 90 (+350%)
Mutual labels:  jupyter, ipython-notebook
Flasked Notebooks
Rendering IPython Notebooks using Flask
Stars: ✭ 59 (+195%)
Mutual labels:  jupyter, ipython-notebook
declarative-parser
Modern, declarative argument parser for Python 3.6+
Stars: ✭ 31 (+55%)
Mutual labels:  argument-parser, argparse
Ipywebrtc
WebRTC for Jupyter notebook/lab
Stars: ✭ 171 (+755%)
Mutual labels:  jupyter, ipython-notebook
docopt-ng
Humane command line arguments parser. Now with maintenance, typehints, and complete test coverage.
Stars: ✭ 94 (+370%)
Mutual labels:  argument-parser, argparse
itikz
Cell and line magic for PGF/TikZ-to-SVG rendering in Jupyter notebooks
Stars: ✭ 55 (+175%)
Mutual labels:  jupyter, ipython-notebook
Telepyth
Telegram notification with IPython magics.
Stars: ✭ 54 (+170%)
Mutual labels:  jupyter, ipython-notebook
Sqlcell
SQLCell is a magic function for the Jupyter Notebook that executes raw, parallel, parameterized SQL queries with the ability to accept Python values as parameters and assign output data to Python variables while concurrently running Python code. And *much* more.
Stars: ✭ 145 (+625%)
Mutual labels:  jupyter, ipython-notebook
jsonargparse
Implement minimal boilerplate CLIs derived from type hints and parse from command line, config files and environment variables
Stars: ✭ 168 (+740%)
Mutual labels:  argument-parser, argparse
Machine-Learning-Notebooks
15+ Machine/Deep Learning Projects in Ipython Notebooks
Stars: ✭ 66 (+230%)
Mutual labels:  ipython-notebook
Machine-Learning-Algorithms-From-Scratch
A collection of commonly used machine learning algorithms implemented in Python/Numpy
Stars: ✭ 43 (+115%)
Mutual labels:  ipython-notebook
opzioni
The wanna-be-simplest command line arguments library for C++
Stars: ✭ 29 (+45%)
Mutual labels:  arguments

Argparse2class for Jupyter execution.

Argparse transformation for Jupyter Notebook execution. (for quick testing in .ipynb)
Copy & paste class-formatted arguments to replace argparse.

Notice! It's better to use args = parser.parse_args(args=[]) syntax - https://stackoverflow.com/a/47587545/3618853

quick web transformation :

http://35.192.144.192:8000/arg2cls.html

usage :

python3 arg2cls.py [target.py] [target2.py(optional)] ...

make argument parser into-

parser = argparse.ArgumentParser(description='PyTorch PennTreeBank RNN/LSTM Language Model')
parser.add_argument('--data', type=str, default='./data/penn',
                    help='location of the data corpus')
parser.add_argument('--model', type=str, default='LSTM',
                    help='type of recurrent net (RNN_TANH, RNN_RELU, LSTM, GRU)')
parser.add_argument('--emsize', type=int, default=200,
                    help='size of word embeddings')
parser.add_argument('--nhid', type=int, default=200,
                    help='number of hidden units per layer')

class format

class args:
    data = './data/penn'
    model = 'LSTM'
    emsize = 200
    nhid = 200

input (argparse lines) :

alt text

ouput (args class) :

alt text

transformed usage :

If there's no default value for argument, It will have warning value. (###manual_setting_required###)

alt text

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].