60 | if "deps" in project: |
61 | toml.dump(project["deps"], f) |
62 | with open(out_path / path / Path("Versions.toml"), "w") as f: |
63 | f.write('["%s"]\n' % info["version"]) |
64 | f.write('git-tree-sha1 = "%s"\n' % info["treehash"]) |
65 | with open(out_path / path / Path("Package.toml"), "w") as f: |
66 | toml.dump({ |
67 | "name": info["name"], |
91 | toml.dump(versions_to_keep, f) |
214 | with open(llms_path, "w", encoding="utf-8") as file: |
215 | toml.dump(llms, file) |
216 | st.session_state.save = True |
261 | toml.dump(llms, f) |
262 | with open(whisper_path, 'w') as f: |
263 | whispers["Mode"]["WhisperMode"] = whisper_mode |
264 | whispers["OpenAI"]["Temp"] = whisper_temp |
265 | whispers["OpenAI"]["Prompt"] = whisper_prompt |
266 | toml.dump(whispers, f) |
36 | f.seek(0) |
37 | toml.dump(config, f) |
38 | f.truncate() |
183 | with open("config.toml", "w") as f: |
184 | toml.dump(self.config, f) |
194 | f.seek(0) |
195 | toml.dump(config, f) |
198 | with open(jsonrpc_config, 'wt') as stream: |
199 | toml.dump(jsonrpc_data, stream) |
206 | with open(network_config, 'wt') as stream: |
207 | toml.dump(network_data, stream) |
266 | with open(forever_config, 'wt') as stream: |
267 | toml.dump(forever_data, stream) |
283 | toml.dump(jsonrpc_data, stream) |
77 | br_conf = self._build_br_conf(topo_id, topo["isd_as"], base, k, v) |
78 | write_file(os.path.join(base, "%s.toml" % k), toml.dumps(br_conf)) |
107 | write_file(os.path.join(base, "%s.toml" % elem_id), |
108 | toml.dumps(bs_conf)) |
143 | sciond_conf = self._build_sciond_conf(topo_id, topo["isd_as"], base) |
144 | write_file(os.path.join(base, SD_CONFIG_NAME), toml.dumps(sciond_conf)) |
182 | write_file(config_file_path, toml.dumps(self._build_disp_conf( |
150 | with open(current_path + "/setting.toml", "w", encoding="utf-8") as file: |
151 | toml.dump(web_setting, file) |
152 | st.session_state.success = True |
201 | with open(current_path + "/setting.toml", "w", encoding="utf-8") as file: |
202 | toml.dump(web_setting, file) |
203 | st.rerun() |
747 | with open(current_path + "/setting.toml", "w", encoding="utf-8") as f: |
748 | toml.dump(web_setting, f) |
65 | if "file_out" in options: |
66 | return toml.dump(obj, options["file_out"], **options) |
67 | else: |
68 | return toml.dumps(obj, **options) |
69 | except Exception as error: # pylint: disable=broad-except |
26 | def test_bug_148(): |
27 | assert 'a = "\\u0064"\n' == toml.dumps({'a': '\\x64'}) |
28 | assert 'a = "\\\\x64"\n' == toml.dumps({'a': '\\\\x64'}) |
29 | assert 'a = "\\\\\\u0064"\n' == toml.dumps({'a': '\\\\\\x64'}) |
36 | bug_dict = {'username': '\xd7\xa9\xd7\x9c\xd7\x95\xd7\x9d'} |
37 | round_trip_bug_dict = toml.loads(toml.dumps(bug_dict)) |
38 | unicoded_bug_dict = {'username': bug_dict['username'].decode('utf-8')} |
48 | round_trip_bug_dict = toml.loads(toml.dumps(bug_dict)) |
24 | with open(filename, "w") as fd: |
25 | toml.dump(cls._str(configuration), fd) |
37 | def _serialize(cls, configuration: _Config) -> str: |
38 | return toml.dumps(cls._str(configuration)) |
483 | with open(SUBSCRIPTIONS_FILE, 'w') as writer: |
484 | writer.write(toml.dumps(subscriptions)) |
485 | writer.close() |
580 | with open(SUBSCRIPTIONS_FILE, 'w') as writer: |
581 | writer.write(toml.dumps(subscriptions)) |
582 | writer.close() |
1061 | with open(SUBSCRIPTIONS_FILE, 'w') as writer: |
1062 | writer.write(toml.dumps(subs)) |