Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
parquet
Sub-tasks:
language-modeling
Languages:
code
Size:
100K - 1M
License:
update function comments
Browse files- preprocessing.py +2 -2
preprocessing.py
CHANGED
|
@@ -50,12 +50,12 @@ def parse_data(ds):
|
|
| 50 |
|
| 51 |
|
| 52 |
def get_hash(example):
|
| 53 |
-
"""Get hash of
|
| 54 |
text = example["markdown"] + example["code"]
|
| 55 |
return {"hash": hashlib.md5(re.sub(PATTERN, "", text).encode("utf-8")).hexdigest()}
|
| 56 |
|
| 57 |
def preprocess(example):
|
| 58 |
-
"""
|
| 59 |
results = dict()
|
| 60 |
results.update(get_hash(example))
|
| 61 |
return results
|
|
|
|
| 50 |
|
| 51 |
|
| 52 |
def get_hash(example):
|
| 53 |
+
"""Get hash of markdown + code"""
|
| 54 |
text = example["markdown"] + example["code"]
|
| 55 |
return {"hash": hashlib.md5(re.sub(PATTERN, "", text).encode("utf-8")).hexdigest()}
|
| 56 |
|
| 57 |
def preprocess(example):
|
| 58 |
+
"""add hash column to dataset."""
|
| 59 |
results = dict()
|
| 60 |
results.update(get_hash(example))
|
| 61 |
return results
|