8bba0b88fd9329b44a53fcf43413e78ff2a55a30,homeassistant/__main__.py,,install_osx,#,164

Before Change


def install_osx():
     Setup to run via launchd on OS X 
    hass_path = os.popen("which hass").read().strip()
    user = os.popen("whoami").read().strip()

    cwd = os.path.dirname(__file__)
    template_path = os.path.join(cwd, "startup", "launchd.plist")

After Change



def install_osx():
     Setup to run via launchd on OS X 
    with os.popen("which hass") as inp:
      hass_path = inp.read().strip()

    with os.popen("whoami") as inp:
      user = inp.read().strip()

    cwd = os.path.dirname(__file__)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: home-assistant/home-assistant
Commit Name: 8bba0b88fd9329b44a53fcf43413e78ff2a55a30
Time: 2015-09-14
Author: jon@jonmaddox.com
File Name: homeassistant/__main__.py
Class Name:
Method Name: install_osx


Project Name: undertheseanlp/underthesea
Commit Name: 80ee39154b951c2c50ae2067f560aad81510a13f
Time: 2017-07-04
Author: brother.rain.1024@gmail.com
File Name: underthesea/corpus/ws.py
Class Name: WSCorpus
Method Name: load


Project Name: nltk/nltk
Commit Name: 5686688867ac2b47b9472a58647e520c3aed150e
Time: 2020-12-09
Author: prtpydv@aol.com
File Name: nltk/corpus/reader/crubadan.py
Class Name: CrubadanCorpusReader
Method Name: _load_lang_mapping_data


Project Name: undertheseanlp/underthesea
Commit Name: 80ee39154b951c2c50ae2067f560aad81510a13f
Time: 2017-07-04
Author: brother.rain.1024@gmail.com
File Name: tests/word_sent/test_word_sent.py
Class Name:
Method Name: load_output