-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update Hugging Face sync action and add line ending conversion…
… script
- Loading branch information
Showing
5 changed files
with
49 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import pathlib | ||
|
||
|
||
HERE = pathlib.Path(__file__).parent.absolute() | ||
|
||
|
||
def convert_lf(): # pragma: no cover | ||
"""Convert line endings to LF""" | ||
crlf = b"\r\n" | ||
lf = b"\n" | ||
extensions = {".py", ".toml", ".lock", ".txt", ".yml", ".sh", ".md"} | ||
n = 0 | ||
for fp in HERE.parent.glob("**/*"): | ||
if fp.suffix in extensions: | ||
with open(fp, "rb") as infile: | ||
content = infile.read() | ||
if crlf in content: | ||
content = content.replace(crlf, lf) | ||
with open(fp, "wb") as outfile: | ||
outfile.write(content) | ||
n += 1 | ||
print(f"{n} files converted to LF") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
title: ISCC-LAB - Semantic-Code Text | ||
emoji: ▶️ | ||
colorFrom: red | ||
colorTo: blue | ||
sdk: gradio | ||
sdk_version: 4.41.0 | ||
pinned: true | ||
license: CC-BY-NC-SA-4.0 | ||
short_description: Cross Lingual Similarity Preserving Text Simprints |