1a73cc59012b886b917f4d58fc01e085053566ce,tensorforce/contrib/openai_gym.py,OpenAIGym,unflatten_action,#Any#,203

Before Change


            return action
        elif all(
            name[:6] == "action" and
            (name[6:name.index("-")].isnumeric() if "-" in name else name[6:].isnumeric())
            for name in action
        ):
            actions = list()

After Change


        elif all(name.startswith("gymmdc") for name in action) or \
                all(name.startswith("gymbox") for name in action) or \
                all(name.startswith("gymtpl") for name in action):
            space_type = next(iter(action))[:6]
            actions = list()
            n = 0
            while True:
                if any(name.startswith(space_type + str(n) + "-") for name in action):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: reinforceio/tensorforce
Commit Name: 1a73cc59012b886b917f4d58fc01e085053566ce
Time: 2018-08-31
Author: alexkuhnle@t-online.de
File Name: tensorforce/contrib/openai_gym.py
Class Name: OpenAIGym
Method Name: unflatten_action


Project Name: home-assistant/home-assistant
Commit Name: 7a979e9f720fb03af107bb89ad94247d76e150df
Time: 2018-03-02
Author: jeroen_ter_heerdt@hotmail.com
File Name: homeassistant/components/alarm_control_panel/egardia.py
Class Name: EgardiaAlarm
Method Name: lookupstatusfromcode


Project Name: sentinel-hub/eo-learn
Commit Name: bf49375b5f60b5668f874a2f704fa718735e2ded
Time: 2018-08-08
Author: matej.aleksandrov@sinergise.com
File Name: features/eolearn/features/interpolation.py
Class Name: InterpolationTask
Method Name: execute