Beispiel #1
0
 def make_outputpopup(self):
     '''Creates a popup window in which output can be printed'''
     self.outputframe = wx.Frame(
         None, title="Output Panel")  # creation of a Frame with a title
     self.output = output.create(
         self.outputframe, style=wx.VSCROLL
         | wx.HSCROLL)  # creation of a richtextctrl in the frame
Beispiel #2
0
	def view_output(self, evt):	
		'''Make an output window in which things can be printed'''
		self.outputframe = wx.Frame(self, title="Output Panel") # creation of a Frame with a title
		self.outputwindow = output.create(self.outputframe, style=wx.VSCROLL|wx.HSCROLL) # creation of a richtextctrl in the frame
		sizer = wx.BoxSizer(wx.VERTICAL) #make sizer
		sizer.Add(item=self.outputwindow, proportion=-1, flag=wx.EXPAND)	#put panel in sizer
		self.outputframe.SetSizer(sizer) #assign sizer to window
		self.outputframe.Show()		
Beispiel #3
0
 def view_output(self, evt):
     '''Make an output window in which things can be printed'''
     self.outputframe = wx.Frame(
         self, title="Output Panel")  # creation of a Frame with a title
     self.outputwindow = output.create(
         self.outputframe, style=wx.VSCROLL
         | wx.HSCROLL)  # creation of a richtextctrl in the frame
     sizer = wx.BoxSizer(wx.VERTICAL)  #make sizer
     sizer.Add(item=self.outputwindow, proportion=-1,
               flag=wx.EXPAND)  #put panel in sizer
     self.outputframe.SetSizer(sizer)  #assign sizer to window
     self.outputframe.Show()
Beispiel #4
0
def main(build=None):
    LOGGER.info("Starting compare for cid=%s, pids=%s...",
                settings.DEFAULT.campaigns, settings.DEFAULT.publishers)
    output.aggregate()

    if not build:
        build = output.generate_build_string()
    jobname = "compare_" + build
    pb = output.create(build=jobname)

    cids = placelocal.get_cids_from_settings()
    compare(pb, cids=cids)
    return pb
Beispiel #5
0
def main(build=None):
    LOGGER.info("Starting compare for cid=%s, pids=%s...",
                settings.DEFAULT.campaigns, settings.DEFAULT.publishers)
    output.aggregate()

    if not build:
        build = output.generate_build_string()
    jobname = "compare_" + build
    pb = output.create(build=jobname)

    cids = placelocal.get_cids_from_settings()
    compare(pb, cids=cids)
    return pb
Beispiel #6
0
def main():
    """
    Runs capture, returns the job name for the capture job
    :param cids:
    :param pids:
    :return:
    """

    original_build = output.generate_build_string()
    build = "capture_" + original_build
    pathbuilder = output.create(build=build)
    cids = placelocal.get_cids_from_settings()
    LOGGER.info("Starting capture against %s for %s campaigns: %s...",
                settings.DEFAULT.domain,
                len(cids), cids)
    output.aggregate()

    configs = settings.DEFAULT.configs_in_comparisons()
    __capture_tags_for_configs(cids=cids, pathbuilder=pathbuilder, configs=configs)
    return original_build
Beispiel #7
0
def main():
    """
    Runs capture, returns the job name for the capture job
    :param cids:
    :param pids:
    :return:
    """

    original_build = output.generate_build_string()
    build = "capture_" + original_build
    pathbuilder = output.create(build=build)
    cids = placelocal.get_cids_from_settings()
    LOGGER.info("Starting capture against %s for %s campaigns: %s...",
                settings.DEFAULT.domain, len(cids), cids)
    output.aggregate()

    configs = settings.DEFAULT.configs_in_comparisons()
    __capture_tags_for_configs(cids=cids,
                               pathbuilder=pathbuilder,
                               configs=configs)
    return original_build
Beispiel #8
0
	def make_outputpopup(self):
		'''Creates a popup window in which output can be printed'''
		self.outputframe = wx.Frame(None, title="Output Panel") # creation of a Frame with a title
		self.output = output.create(self.outputframe, style=wx.VSCROLL|wx.HSCROLL) # creation of a richtextctrl in the frame
Beispiel #9
0
# G.add_edge(4, 13)
# G.add_edge(5, 6)
# G.add_edge(5, 9)
# G.add_edge(6, 7)
# G.add_edge(7, 8)
# G.add_edge(7, 9)
# G.add_edge(9, 15)
# G.add_edge(8, 14)

print(G.number_of_nodes(), 'nodes and', G.number_of_edges(), 'edges')

# Draw graph. If you don't like the layout that was selected,
# you may have to try different seed values until you get
# one that you do like. note this will only work for
# relatively small graphs.
from output import create, path

create('output', G)

color_map = {}
color_map[0] = 'm'
color_map[(5, 4)] = 'r'
create('output2', G, color_map=color_map)

color_map[1] = 'y'
color_map[2] = 'm'
create('output3', G, color_map=color_map)

color_map[0] = 'red'
create('output4', G, color_map=color_map)
Beispiel #10
0
import output

def eval_bool( b ):
    return b( true )( false )

def eval_num( n ):
    return n( lambda v : v + 1 )( 0 ) 

funcs = output.create()

# The factorial of 5 is 120
suc = funcs['suc']
zero = funcs['zero']
factorial = funcs['factorial']

assert( eval_num( factorial( suc( suc( suc( suc( suc( zero ) ) ) ) ) ) ) == 120 )

print(  eval_num( factorial( suc( suc( suc( suc( suc( zero ) ) ) ) ) ) ) )