How to use the interface.Interface function in Interface

To help you get started, we’ve selected a few Interface examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rbavishi / Habitican-Curse / habitica.py View on Github external
def main(curses_screen):
    G.screen = Screen(curses_screen)
    G.screen.Initialize()
    C.ConfigureRuntime(curses_screen)
    G.reqManager = RM.RequestManager() 
    G.reqManager.FetchData()
    G.intf = I.Interface()
    G.intf.Init()
    bookThread = threading.Thread(target=BookKeepingThread)
    bookThread.start()
    #inputThread = threading.Thread(target=G.intf.Input)
    #inputThread.start()


    try:
	G.intf.Input()
    except:
	DEBUG.Display("Cleaning up...")
	bookThread.join()
github kynikos / outspline / src / outspline / plugins / wxscheduler_basicrules / occur_every_month_weekday.py View on Github external
def __init__(self, parent, filename, id_, standard, rule):
        self.original_values = self._compute_values(standard, rule)
        self.ui = interface.Interface(parent, filename, id_,
                                               (interface.StartNthWeekDay,
                                               interface.EndTime,
                                               interface.AlarmTime,
                                               interface.Standard),
                                      self.original_values)
github Nic0 / tyrs / src / tyrs / tyrs.py View on Github external
def init_interface():
    user_interface = Interface()
    container.add('interface', user_interface)
github kynikos / outspline / src / outspline / plugins / wxscheduler_basicrules / occur_every_interval.py View on Github external
def __init__(self, parent, filename, id_, standard, rule):
        self.original_values = self._compute_values(standard, rule)
        self.ui = interface.Interface(parent, filename, id_,
                                            (interface.StartDateSample,
                                            interface.Interval,
                                            interface.EndDateSample,
                                            interface.AlarmDateSample,
                                            interface.Standard),
                                      self.original_values)
github nocproject / noc / inv / models / link.py View on Github external
class Link(Document):
    """
    Network links.
    Always contains a list of 2*N references.
    2 - for fully resolved links
    2*N for unresolved N-link portchannel
    N, N > 2 - broadcast media
    """
    meta = {
        "collection": "noc.links",
        "allow_inheritance": False,
        "indexes": ["interfaces"]
    }

    interfaces = PlainReferenceListField(Interface)
    discovery_method = StringField()

    def __unicode__(self):
        return u"(%s)" % ", ".join([unicode(i) for i in self.interfaces])

    def contains(self, iface):
        """
        Check link contains interface
        :return: boolean
        """
        return iface in self.interfaces

    @property
    def is_ptp(self):
        """
        Check link is point-to-point link
github danielgerlag / liteflow / core / liteflow / core / abstractions / workflow_registry.py View on Github external
from typing import List
from interface import Interface
from liteflow.core.models import WorkflowDefinition, Workflow


class IWorkflowRegistry(Interface):

    def get_definition(self, id, version) -> WorkflowDefinition:
        pass

    def register_workflow(self, workflow: Workflow):
        pass
github nocproject / noc / inv / models / link.py View on Github external
def object_links_count(cls, object):
        ifaces = Interface.objects.filter(managed_object=object.id).values_list("id")
        return cls.objects.filter(interfaces__in=ifaces).count()
github ryanbhayward / games-puzzles-algorithms / lib / games_puzzles_algorithms / ui / main.py View on Github external
"""Main function to get and respond to user input."""
    puzzle = 'solvable_sliding_tile'
    solver = 'A*'
    if len(sys.argv) > 1:
        if sys.argv[1] in Interface.PUZZLES.keys():
            puzzle = sys.argv[1]
        else:
            print('Error: invalid puzzle name')
            return
    if len(sys.argv) > 2:
        if sys.argv[2] in Interface.SOLVERS.keys():
            solver = sys.argv[2]
        else:
            print('Error: invalid solver name')
            return
    interface = Interface(puzzle, solver)
    interface.prompt = '\n'
    interface.cmdloop()
github kynikos / outspline / src / outspline / plugins / wxscheduler_basicrules / occur_selected_weekdays.py View on Github external
def __init__(self, parent, filename, id_, standard, rule):
        self.original_values = self._compute_values(standard, rule)
        self.ui = interface.Interface(parent, filename, id_,
                                            (interface.WeekDays,
                                            interface.StartTime,
                                            interface.EndTime,
                                            interface.AlarmTime,
                                            interface.Standard),
                                      self.original_values)
github araobp / stm32-mcu / NUCLEO-F401RE / Thermography / thermography / thermography.py View on Github external
import os

import matplotlib.pyplot as plt

import interface
import heatmap

import argparse
parser = argparse.ArgumentParser()
parser.add_argument("port", help="serial port identifier")
parser.add_argument("-g", "--grid_data", help="Apply griddata filter", action='store_true')
args = parser.parse_args()

if __name__ == '__main__':

    itfc = interface.Interface(port = args.port)
    gui = heatmap.GUI(interface=itfc, grid_data=args.grid_data)

    PADX = 6
    PADX_GRID = 2
    PADY_GRID = 2

    root = Tk.Tk()
    root.wm_title("Thermography for ML with Keras/TensorFlow")

    if args.grid_data:
        fig, axes = plt.subplots(1, 2, figsize=(6, 5), gridspec_kw = {'width_ratios':[20, 1]})
    else:
        fig, axes = plt.subplots(1, 2, figsize=(10, 5))
    
    fig.subplots_adjust(bottom=0.15)