python script to split a (large) file into multiple (smaller ... - GitHub Gist
#!/usr/bin/env python. # -*- coding: utf-8 -*-. import sys. import os. class FileSplitter: def __init__(self):. self.parse_args(sys.argv). @staticmethod.
#!/usr/bin/env python. # -*- coding: utf-8 -*-. import sys. import os. class FileSplitter: def __init__(self):. self.parse_args(sys.argv). @staticmethod.
- Direct source files from GitHub repositories. - Pre-organized by language subdirectory. - `content` column has the full file text.ds = load_dataset("nvidia/Nemotron-Pretraining-Code-v2", name="Synthetic-Rewriting", split="train", streaming=True).
Python-like string format in JavaScript. GitHub Gist: instantly share code, notes, and snippets.
Split.java. This file contains hidden or 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.
#!/usr/bin/env python3. # -*- coding: utf-8 -*-. """Utils scripts to split the pages of a pdf. Example: $ python pdf_split.py -i "path_to_pdf/sample.pdf" -o ...
This file contains hidden or 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.# define the function to split the file into smaller chunks.
Sep 18, 2021 ... python guide. GitHub Gist: instantly share code, notes, and snippets.
split_lines.py. This file contains hidden or 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.
const range = (s, t = 0, a = 1) => [...Array(Math.abs(s - t))].map((x, i) => Math.min(s, t) + i * a).filter(x => x < Math.max(s, t));.
We then create a file containing random characters between ASCII byte 65 (A) and ASCII byte 122 (I think it's small-case z, not sure! But they are all printable). Now let's run Python split on it, and time it using time utility
Instantly share code, notes, and snippets. @JesperDramsch · JesperDramsch ... Clone this repository at <script src="https://gist.github.com ...
For example, get_str_between(html_code,'/*','*/') would return the first boxed javascript snippet that it could find. There's also get_every_str_between() which ...