#!/usr/bin/env python # -*- coding: utf-8 -*- # # osim-extract.py -- Extract information from .osim file # # Copyright (C) 2013 Tobias Klauser # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import os import sys import getopt import xml.etree.ElementTree as ET def usage(): print("""usage: {} [OPTION...] FILE options: -b print only body names -j print only joint names -m print only muscle names -v verbose mode -h show this help and exit""".format(os.path.basname(sys.argv[0]))) def main(): try: opts, args = getopt.getopt(sys.argv[1:], "bjmvh") except getopt.GetoptError as err: print(str(err)) usage() sys.exit(-1) do_print = { 'b': False, 'j': False, 'm': False } verbose = False for o, a in opts: if o == '-b': do_print['b'] = True; elif o == '-j': do_print['j'] = True; elif o == '-m': do_print['m'] = True; elif o == '-v': verbose = True elif o == '-h': usage() sys.exit(0) else: assert False, "unhandled option" if len(args) < 1: print("Error: no .osim model file specified") usage() sys.exit(-1) if not True in do_print.values(): for k in do_print.iterkeys(): do_print[k] = True try: tree = ET.parse(args[0]) except: print("Error: failed to parse .osim model file") sys.exit(-1) root = tree.getroot() if verbose: print("Found root with version {}".format(root.attrib['Version'])) model = tree.find('Model') if verbose: print("Found model '{}'".format(model.attrib['name'])) if do_print['b']: bodies = [ body.attrib['name'] for body in root.findall('Model/BodySet/objects/Body') ] if verbose: print("bodies:") print(','.join(bodies)) if do_print['j']: joints = [ joint.attrib['name'] for joint in root.findall('Model/BodySet/objects/Body/Joint/*') ] if verbose: print("joints:") print(','.join(joints)) if do_print['m']: muscles = [ force.attrib['name'] for force in root.findall('Model/ForceSet/objects/Thelen2003Muscle') ] if verbose: print("muscles:") print(','.join(muscles)) if __name__ == '__main__': main() lue='nds-private-remove'/>
path: root/arch/arm/boot/dts/omap5-cm-t54.dts
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2016-10-20 15:44:19 +0200
committerTobias Klauser <tklauser@distanz.ch>2017-02-15 10:34:18 +0100
commit5db4992d8f040b8d8db0b86d42806e0c417f7ccf (patch)
tree5b06e952af482d45f3ade64e77824662e34b7fa2 /arch/arm/boot/dts/omap5-cm-t54.dts
parent370ebb0ef6255132373ed35d13e7b1d8d2eb7003 (diff)
usbnet: pegasus: Use net_device_stats from struct net_devicends-private-remove
Instead of using a private copy of struct net_device_stats in struct pegasus, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Cc: Petko Manolov <petkan@nucleusys.com> Cc: linux-usb@vger.kernel.org Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'arch/arm/boot/dts/omap5-cm-t54.dts')