ipy -m ironstubs RhinoCommon --overwrite Options: <assembly-name> Name of Dll Assembly to load --all Process all Assemblies in the default_settings.py --folder=<dir> Name of Output Directory [default: {out_dir}] --directory=<dir> Additional Directory to add to Path [default: ] --overwrite Force Overwrite if stub already exists [default: False]. --no-json Disables Json Log --debug Enables Debug Messages -h, --help Show this screen. """.format(out_dir='stubs', version=__version__) arguments = docopt(__doc__, version=__version__) # OPTIONS option_assembly_name = arguments['<assembly-name>'] option_all = arguments['--all'] option_output_dir = arguments['--folder'] option_overwrite = arguments['--overwrite'] option_json = not arguments['--no-json'] option_directory = arguments['--directory'] if arguments['--debug']: logger.enable_debug() # PROJECT_DIR = os.getcwd() # Must execute from project dir PKG_DIR = os.path.dirname(__file__) PROJECT_DIR = os.path.dirname(PKG_DIR)
Usage: stem.py <StemmerID> <InputFile> <OutputFile> stem.py -h | --help stem.py --version Options: -h --help Show this screen. --version Show version. """ from utils.docopt import docopt if __name__ == '__main__': arguments = docopt(__doc__, version="1.0.0") from subprocess import call import urllib, os, platform # Parse command line arguments stemmerID = arguments["<StemmerID>"] inputFile = arguments["<InputFile>"] outputFile = arguments["<OutputFile>"] is_windows = True if platform.system() == "Windows" else False command = "java -jar SCStemmers.jar".split() # Check if SCStemmers.jar is in the current directory if (not os.path.isfile("SCStemmers.jar")): print("Downloading SCStemmers.jar...")
from keras.callbacks import EarlyStopping, ModelCheckpoint, CSVLogger, Callback from utils.global_config import __DEF_HEIGHT, __DEF_WIDTH, __CHANNEL from utils.metrics_functions import dice_coef, dice_coef_loss from utils.models import get_encoder_decoder, build_refinement from utils.data_generator import generator_batch from keras.optimizers import Adam from keras import backend as K from utils.docopt import docopt import tensorflow as tf import os.path as P import numpy as np import keras import glob import cv2 arguments = docopt(__doc__, version='FIXME') print(arguments) config = tf.ConfigProto() config.gpu_options.allow_growth = True config.gpu_options.per_process_gpu_memory_fraction = float(arguments['--gpu']) sess = tf.Session(config=config) try: K.set_session(sess) except: pass train_steps = int(arguments['--train-steps']) valid_steps = int(arguments['--valid-steps']) train_samples = arguments['--train-samples'] valid_samples = arguments['--valid-samples'] bs = int(arguments['--bs'])
--dist=<> Distance name. Valid are {L1,L2} [default: L2] --delimiter=<> Delimiter used in the csv files [default: ,] --pcapl=<> Compute results for pca-power law descr [default: no] For more visit: https://github.com/hpatches/ """ from utils.hpatch import * from utils.tasks import * from utils.misc import * from utils.docopt import docopt import os import time import dill if __name__ == '__main__': opts = docopt(__doc__, version='HPatches 1.0') path = os.path.join(opts['--descr-dir'], opts['--descr-name']) try: assert os.path.exists(path) except: print("%r does not exist." % (path)) exit(0) if not os.path.exists('results'): os.makedirs('results') descr_name = opts['--descr-name'] print('\n>> Running HPatch evaluation for %s' % blue(descr_name)) descr = load_descrs(path, dist=opts['--dist'], sep=opts['--delimiter'])
Usage: main.py [-l | -s] [(-o <path>)] Options: -h, --help Show this help -l, -large Use large pool of words to guess -s, -small Use small pool of words to guess -o <path> Open external file as a pool of words: not implemented yet Pikabou! """ # enjoy )))) import utils.game_docopt as hangman from utils.docopt import docopt doc = ''' Usage: my_program tcp <host> <port> [--timeout=<seconds>] my_program serial <port> [--baud=<n>] [--timeout=<seconds>] my_program (-h | --help | --version) Options: -h, --help Show this screen and exit. --version Show version. --baud=<n> Baudrate [default: 9600] ''' #argv = ['tcp', '127.0.0.1', '80', '--timeout', '30'] #docopt(doc, argv) docopt(__doc__, version='0.2') game = hangman.Hangman() game.start_game()