Esempio n. 1
0
 def ls(self, line):
     system(self.git_call, 'status ' + line)
Esempio n. 2
0
 def edit(self, line):
     system(editor, line)
Esempio n. 3
0
 def git(self, line):
     system(self.git_call, line)
Esempio n. 4
0
# EXAMPLE ############################################################

if __name__ == "__main__":

    from sys import version as pythonVersion

    print("file: clock.py")
    print("content: clock device")
    print("created: 2021 March 14 Sunday")
    print("author: Roch Schanen")
    print("comment:")
    print("run python3:" + pythonVersion)

    from core import system

    # build system
    S = system("version 0.00")

    S.add(clock())  # clk 0
    S.add(clock(shift=11, count=3))  # clk 1
    S.add(clock(shift=9, count=3))  # clk 2
    S.add(clock(55, 10, 30, None))  # clk 3
    S.add(clock(55, 10, 30, 2))  # clk 4
    S.add(clock(width=9, shift=10, count=3))

    # simulate
    S.displayDevices()
    S.openFile()
    S.runUntil(200)
    S.closeFile()
Esempio n. 5
0
 def cd(self, line):
     system(self.git_call, 'checkout ' + line)
Esempio n. 6
0
from __future__ import division
import core

system = core.system('S.I.')

m = core.base_unit('length', 'meter', 'm', system)
kg = core.base_unit('mass', 'kilogram', 'kg', system)
s = core.base_unit('time', 'second', 's', system)
A = core.base_unit('electric current', 'ampere', 'A', system)
K = core.base_unit('thermodynamic temperature ', 'kelvin', 'K', system)
mol = core.base_unit('amount of substance', 'mole', 'mol', system)
cd = core.base_unit('luminous intensity', 'candela', 'cd', system)

no_unit = core.none_unit('no unit', '')
none = core.none_unit('no unit', '')

named = core.named_unit


#SI prefixes
def deca(unit):
    """si prefix"""
    return core.factor_unit(10.,
                            unit,
                            name='deca' + unit.name,
                            symbol='da' + unit.symbol)


def hecto(unit):
    """si prefix"""
    return core.factor_unit(100.,
Esempio n. 7
0
 def ls(self, line):
     system(self.git_call, 'status ' + line)
Esempio n. 8
0
 def git(self, line):
     system(self.git_call, line)
Esempio n. 9
0
 def edit(self, line):
     system(editor, line)
Esempio n. 10
0
 def cd(self, line):
     system(self.git_call, 'checkout ' + line)