Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for read_text (0.21 sec)

  1. scripts/docs.py

        en_index = en_docs_path / "docs" / "index.md"
        content = en_index.read_text("utf-8")
        match_pre = re.search(r"</style>\n\n", content)
        match_start = re.search(r"<!-- sponsors -->", content)
        match_end = re.search(r"<!-- /sponsors -->", content)
        sponsors_data_path = en_docs_path / "data" / "sponsors.yml"
        sponsors = mkdocs.utils.yaml_load(sponsors_data_path.read_text(encoding="utf-8"))
        if not (match_start and match_end):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  2. docs_src/generate_clients/tutorial004.py

    import json
    from pathlib import Path
    
    file_path = Path("./openapi.json")
    openapi_content = json.loads(file_path.read_text())
    
    for path_data in openapi_content["paths"].values():
        for operation in path_data.values():
            tag = operation["tags"][0]
            operation_id = operation["operationId"]
            to_remove = f"{tag}-"
            new_operation_id = operation_id[len(to_remove) :]
            operation["operationId"] = new_operation_id
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 04 22:02:18 GMT 2022
    - 493 bytes
    - Viewed (0)
  3. scripts/mkdocs_hooks.py

    @lru_cache
    def get_missing_translation_content(docs_dir: str) -> str:
        docs_dir_path = Path(docs_dir)
        missing_translation_path = docs_dir_path.parent.parent / "missing-translation.md"
        return missing_translation_path.read_text(encoding="utf-8")
    
    
    @lru_cache
    def get_mkdocs_material_langs() -> List[str]:
        material_path = Path(material.__file__).parent
        material_langs_path = material_path / "templates" / "partials" / "languages"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  4. .github/actions/people/app/main.py

        people_path = Path("./docs/en/data/people.yml")
        github_sponsors_path = Path("./docs/en/data/github_sponsors.yml")
        people_old_content = people_path.read_text(encoding="utf-8")
        github_sponsors_old_content = github_sponsors_path.read_text(encoding="utf-8")
        new_people_content = yaml.dump(
            people, sort_keys=False, width=200, allow_unicode=True
        )
        new_github_sponsors_content = yaml.dump(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  5. .github/actions/notify-translations/app/main.py

        if not settings.github_event_path.is_file():
            raise RuntimeError(
                f"No github event file available at: {settings.github_event_path}"
            )
        contents = settings.github_event_path.read_text()
        github_event = PartialGitHubEvent.parse_raw(contents)
    
        # Avoid race conditions with multiple labels
        sleep_time = random.random() * 10  # random number between 0 and 10 seconds
        logging.info(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Sep 27 23:01:46 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/io/FileUtil.java

         */
        public static String readText(final String path) {
            assertArgumentNotEmpty("path", path);
            return readText(path, Charset.defaultCharset().name());
        }
    
        /**
         * デフォルトエンコーディングでファイルからテキストを読み込みます。
         *
         * @param file
         *            ファイル。{@literal null}であってはいけません
         * @return 読み込んだテキスト
         */
        public static String readText(final File file) {
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 9K bytes
    - Viewed (0)
  7. build-logic/build-update-utils/src/main/kotlin/gradlebuild.wrapper.gradle.kts

        inputs.property("jvmOpts", jvmOpts)
        doLast {
            val optsEnvVar = "DEFAULT_JVM_OPTS"
            scriptFile.writeText(scriptFile.readText().replace("$optsEnvVar='", "$optsEnvVar='$jvmOpts "))
            batchScript.writeText(batchScript.readText().replace("set $optsEnvVar=", "set $optsEnvVar=$jvmOpts "))
        }
    }
    
    fun Project.wrapperUpdateTask(name: String, label: String) {
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Sat Sep 30 16:17:28 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  8. build-logic/cleanup/src/main/kotlin/gradlebuild/testing/services/BuildBucketProvider.kt

                println("Tests to be included:\n$content")
                IncludeTestClassProvider(readTestClasses(content))
            }
            parameters.excludeTestClasses.get().isNotBlank() -> {
                val content = parameters.repoRoot.file("test-splits/exclude-test-classes.properties").get().asFile.readText()
                println("Tests to be excluded:\n$content")
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Thu Dec 08 06:28:57 GMT 2022
    - 4.9K bytes
    - Viewed (0)
  9. build-logic/build-update-utils/src/main/kotlin/gradlebuild/buildutils/tasks/CheckSubprojectsInfo.kt

    
    @DisableCachingByDefault(because = "Not worth caching")
    abstract class CheckSubprojectsInfo : SubprojectsInfo() {
    
        @TaskAction
        fun checkSubprojectsInfo() {
            if (subprojectsJson.asFile.readText() != generateSubprojectsJson()) {
                throw GradleException(
                    "New project(s) added without updating subproject JSON. Please run `:${GenerateSubprojectsInfo.TASK_NAME}` task."
                )
            }
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Wed Jul 07 13:12:26 GMT 2021
    - 1.2K bytes
    - Viewed (0)
  10. build-logic/binary-compatibility/src/test/kotlin/gradlebuild/binarycompatibility/SortAcceptedApiChangesTaskIntegrationTest.kt

                                ]
                            }
                        ]
                    }
                """)
            val actualJson = loadChangesJson(acceptedApiChangesFile.readText())
    
            Assertions.assertEquals(expectedJson, actualJson)
        }
    
        private
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Fri Sep 30 18:18:04 GMT 2022
    - 7.5K bytes
    - Viewed (0)
Back to top