Exemple #1
0
    KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands

Redistribution and use in source and binary forms, with or without
modification, are permitted according to the terms listed in the file
LICENSE.
"""

from escore import ConfigObject, Chain
from escore import DataStore
from escore import core_ops
from escore import process_manager
from escore.logger import Logger

logger = Logger()

logger.debug('Now parsing configuration file esk109_debugging_tips')

#########################################################################################
# --- minimal analysis information

settings = process_manager.service(ConfigObject)
settings['analysisName'] = 'esk109_debugging_tips'
settings['version'] = 0

#########################################################################################
# --- Analysis values, settings, helper functions, configuration flags.

msg = r"""

To end the eskapade_run session with a python console,
from the cmd line use the this flag: -i
Authors:
    Your name(s) here

Redistribution and use in source and binary forms, with or without
modification, are permitted according to the terms listed in the file
LICENSE.
"""

from escore import process_manager, Chain, ConfigObject, core_ops
from escore.logger import Logger, LogLevel



logger = Logger()
logger.debug('Now parsing configuration file esk112_parallel_fork_demo.')

# --- minimal analysis information

settings = process_manager.service(ConfigObject)
settings['analysisName'] = 'esk112_parallel_fork_demo'
settings['version'] = 0

# --- now set up the chains and links

ch = Chain('Start')
ch.n_fork = 100
fe = core_ops.ForkExample()
fe.store_key = 'forkstoredemo'
fe.logger.log_level = LogLevel.DEBUG
ch.add(fe)
Exemple #3
0
    datastore at the state of running

Authors:
    KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands

Redistribution and use in source and binary forms, with or without
modification, are permitted according to the terms listed in the file
LICENSE.
"""

from escore import core_ops, process_manager, ConfigObject, DataStore, Chain
from escore.logger import Logger

logger = Logger()

logger.debug('Now parsing configuration file esk103_printdatastore')

#########################################################################################
# --- minimal analysis information

settings = process_manager.service(ConfigObject)
settings['analysisName'] = 'esk103_printdatastore'
settings['version'] = 0

#########################################################################################
# --- for this macro, fill the datastore with some dummy information

process_manager.service(DataStore)['hello'] = 'world'
process_manager.service(DataStore)['d'] = {'a': 1, 'b': 2, 'c': 3}

#########################################################################################
Authors:
    KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands

Redistribution and use in source and binary forms, with or without
modification, are permitted according to the terms listed in the file
LICENSE.
"""

from escore import ConfigObject, Chain
from escore import core_ops
from escore import process_manager
from escore.logger import Logger

logger = Logger()

logger.debug('Now parsing configuration file esk102_multiple_chains')

#########################################################################################
# --- minimal analysis information

settings = process_manager.service(ConfigObject)
settings['analysisName'] = 'esk102_multiple_chains'
settings['version'] = 0

#########################################################################################
# --- Analysis values, settings, helper functions, configuration flags.

settings['do_chain0'] = True
settings['do_chain1'] = True
settings['do_chain2'] = True
Exemple #5
0
Authors:
    KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands

Redistribution and use in source and binary forms, with or without
modification, are permitted according to the terms listed in the file
LICENSE.
"""

from escore import ConfigObject, Chain
from escore import core_ops
from escore import process_manager
from escore.logger import Logger

logger = Logger()

logger.debug('Now parsing configuration file esk104_basic_datastore_operations.')

#########################################################################################
# --- minimal analysis information

settings = process_manager.service(ConfigObject)
settings['analysisName'] = 'esk104_basic_datastore_operations'
settings['version'] = 0

#########################################################################################
# --- Analysis values, settings, helper functions, configuration flags.

# some dummy information to use in this macro
f = {'hello': 'world', 'v': [3, 1, 4, 1, 5], 'n_favorite': 7}
g = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 'favorite'}
Exemple #6
0
Authors:
    KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands

Redistribution and use in source and binary forms, with or without
modification, are permitted according to the terms listed in the file
LICENSE.
"""

from escore import ConfigObject, Chain
from escore import core_ops
from escore import process_manager
from escore.logger import Logger, LogLevel

logger = Logger()

logger.debug('Now parsing configuration file esk107_chain_looper')

#########################################################################################
# --- minimal analysis information

settings = process_manager.service(ConfigObject)
settings['analysisName'] = 'esk107_chain_looper'
settings['version'] = 0

#########################################################################################
# --- Analysis configuration flags.
#     E.g. use these flags turn on or off certain chains with links.
#     by default all set to false, unless already configured in
#     configobject or vars()

# turn on/off the example
Authors:
    KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands

Redistribution and use in source and binary forms, with or without
modification, are permitted according to the terms listed in the file
LICENSE.
"""

from escore import ConfigObject, Chain
from escore import core_ops
from escore import process_manager
from escore.logger import Logger

logger = Logger()

logger.debug('Now parsing configuration file esk106_cmdline_options')

#########################################################################################
# --- minimal analysis information
settings = process_manager.service(ConfigObject)
settings['analysisName'] = 'esk106_cmdline_options'
settings['version'] = 0

msg = r"""

The two flags below control whether chains are turned on or off. (default=on)
from the cmd line, control these with:

-c do_chain0=False -c do_chain1=False

Try it; No Hello Worlds will be printed.
Exemple #8
0
Authors:
    KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands

Redistribution and use in source and binary forms, with or without
modification, are permitted according to the terms listed in the file
LICENSE.
"""

from escore import ConfigObject, Chain
from escore import core_ops
from escore import process_manager
from escore.logger import Logger, LogLevel

logger = Logger()

logger.debug('Now parsing configuration file esk101_helloworld')

#########################################################################################
# --- minimal analysis information

settings = process_manager.service(ConfigObject)
settings['analysisName'] = 'esk101_helloworld'
settings['version'] = 0

#########################################################################################
# --- Analysis values, settings, helper functions, configuration flags.

#     E.g. define flags turn on or off certain chains with links.
#     by default all set to false, unless already configured in
#     configobject or vars()
Authors:
    KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands

Redistribution and use in source and binary forms, with or without
modification, are permitted according to the terms listed in the file
LICENSE.
"""

from escore import ConfigObject, Chain
from escore import core_ops
from escore import process_manager
from escore.logger import Logger

logger = Logger()

logger.debug('Now parsing configuration file esk105_datastore_pickling.')

#########################################################################################
# --- minimal analysis information
settings = process_manager.service(ConfigObject)
settings['analysisName'] = 'esk105_datastore_pickling'
settings['version'] = 0

#########################################################################################
# --- Analysis values, settings, helper functions, configuration flags.

msg = r"""

The setup consists of three simple chains that add progressively more information to the datastore.
In the examples the datastore gets persisted after the execution of each chain, and can be picked
up again as input for the next chain.
Authors:
    KMPG AA&BD team

Redistribution and use in source and binary forms, with or without
modification, are permitted according to the terms listed in the file
LICENSE.
"""

import shutil
from escore import process_manager, Chain, ConfigObject, DataStore, core_ops
from escore.logger import Logger, LogLevel
from escore.core import persistence

logger = Logger()

logger.debug('Now parsing configuration file esk111_load_datastore_from_file.')

# --- minimal analysis information

settings = process_manager.service(ConfigObject)
settings['analysisName'] = 'esk111_load_datastore_from_file'
settings['version'] = 0

ds = process_manager.service(DataStore)
ds['number'] = 1
file_path = persistence.io_path('proc_service_data', 'temp_datastore.pkl')
ds.persist_in_file(file_path)

# --- update the number
ds['number'] = 2
Exemple #11
0
Authors:
    KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands

Redistribution and use in source and binary forms, with or without
modification, are permitted according to the terms listed in the file
LICENSE.
"""

from escore import ConfigObject
from escore import process_manager
from escore.logger import Logger

logger = Logger()

logger.debug('Now parsing configuration file esk110_code_profiling.')

#########################################################################################
# --- minimal analysis information

settings = process_manager.service(ConfigObject)
settings['analysisName'] = 'esk110_code_profiling'
settings['version'] = 0

#########################################################################################
# --- Analysis values, settings, helper functions, configuration flags.

msg = r"""

Your can profile the speed of your analysis functions by running with the cmd line option: -P
You will need to select the order in which the profile output is shown on screen.