def set_config(key, value):
    """
    Set a config key with specific value
    """
    # Modify value
    if value.isdigit():
        value = int(value)
    elif value.lower() == 'true':
        value = True
    elif value.lower() == 'false':
        value = False
    # Update global config
    c[key] = value
    # Load current user config
    path = os.path.expanduser("~") + os.sep + '.rainbow_config.json'
    data = {}
    try:
        data = load_config(path)
    except:
        return
    # Update config file
    if data in key:
        fixup(data, key, value)
    else:
        data[key] = value
    # Save
    with open(path, 'w') as out:
        json.dump(data, out, indent=4)
    os.system('chmod 777 ' + path)
dataset/ETHPy150Open DTVD/rainbowstream/rainbowstream/config.py/set_config/swapped operands of `in`