Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/c/e/census_explorer-HEAD/scripts/translation_for_i18next.py   census_explorer(Download)
    ('district', path.join(config.DIR_DATA_GEO_NAME, 'translation-districts.json')),
    ('region', path.join(config.DIR_DATA_GEO_NAME, 'translation-regions.json')),
    ('column', path.join(config.DIR_DATA_CLEAN_JSON, 'translation-column.json')),
    ('row', path.join(config.DIR_DATA_CLEAN_JSON, 'translation-row.json')),
    ('table', path.join(config.DIR_DATA_CLEAN_JSON, 'translation-table.json')),

src/c/e/census_explorer-HEAD/scripts/combine_json.py   census_explorer(Download)
def get_all_json_files():
    files = []
    for area in geo_naming.ALL_AREA_CODES:
        for table in range(21): # 0 - 20
            filename = '%s/areas/%s/table%s.json' % (config.DIR_DATA_CLEAN_JSON, area.upper(), table)
    dataframe_district = load_trans_dataframe(path.join(config.DIR_DATA_GEO_NAME, 'translation-districts.json'), 'district', 'district_name', language)
    dataframe_area = load_trans_dataframe(path.join(config.DIR_DATA_GEO_NAME, 'translation-areas.json'), 'area', 'area_name', language)
    dataframe_table = load_trans_dataframe(path.join(config.DIR_DATA_CLEAN_JSON, 'translation-table.json'), 'table', 'table_name', language)
    dataframe_row = load_trans_dataframe(path.join(config.DIR_DATA_CLEAN_JSON, 'translation-row.json'), 'row', 'row_name', language)
    dataframe_column = load_trans_dataframe(path.join(config.DIR_DATA_CLEAN_JSON, 'translation-column.json'), 'column', 'column_name', language)

src/c/e/census_explorer-HEAD/scripts/public_facilities.py   census_explorer(Download)
def append_row_translations(features, force=False):
    # Need to add to translation-row.json for each category
    with open(os.path.join(config.DIR_DATA_CLEAN_JSON, 'translation-row.json'), 'rb') as f:
        row_translations = json.loads(f.read())
    new_translation = create_translation(features)
        else:
            logger.info("{} already in translation table".format(k))
    with open(os.path.join(config.DIR_DATA_CLEAN_JSON, 'translation-row.json'), 'wb') as f:
        f.write(json.dumps(row_translations))
 
    # only need to add a single row for the tables and columns
    # We need to add these here for the translated, combined CSV files
    with open(os.path.join(config.DIR_DATA_CLEAN_JSON, 'translation-table.json'), 'rb') as f:
    else:
        logger.info("Table translation already in translation table")
    with open(os.path.join(config.DIR_DATA_CLEAN_JSON, 'translation-table.json'), 'wb') as f:
        f.write(json.dumps(table_translations))
 
    # Column translation
    with open(os.path.join(config.DIR_DATA_CLEAN_JSON, 'translation-column.json'), 'rb') as f:

src/c/e/census_explorer-HEAD/scripts/extract_data_from_xls.py   census_explorer(Download)
#        }
#]
OUTPUT_PREFIX = config.DIR_DATA_CLEAN_JSON
INPUT_PREFIX = config.DIR_DATA_DOWNLOAD
 
            defaultdict(dict))
 
    with open(os.path.join(config.DIR_DATA_CLEAN_JSON, 'translation.json'), 'w') as outfile:
        json.dump(translate_dict_all, outfile)
    with open(os.path.join(config.DIR_DATA_CLEAN_JSON, 'translation-row.json'), 'w') as outfile:
        json.dump(translate_dict_row, outfile)
    with open(os.path.join(config.DIR_DATA_CLEAN_JSON, 'translation-column.json'), 'w') as outfile:
 
    # table translations from table_meta_data.py
    with open(os.path.join(config.DIR_DATA_CLEAN_JSON, 'translation-table.json'), 'w') as outfile:
        json.dump(gen_translation_for_table(), outfile)