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 bash | |
| # Self-contained script to extract text from a variety of file types | |
| # Supported file types -- https://textract.readthedocs.io/en/stable/#currently-supporting | |
| # Usage: ./textract <input.pdf> -o <output.csv> | |
| set -euo pipefail | |
| # Install uv if not available | |
| if ! command -v uv &> /dev/null; then | |
| echo "Installing uv..." |
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
| # Usage: | |
| # FLAKY_TEST="ClassNameTest#test_method_name" bin/rails test | |
| # | |
| # Make sure to have this file required before any tests are run, e.g., by placing it | |
| # at the top of the test/test_helper.rb file. | |
| if ENV["FLAKY_TEST"] | |
| ENV["SINGLE"] = "true" # Disable parallel test execution |
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
| from typing import Iterable, TypeVar | |
| T = TypeVar("T") | |
| def next_x(_i: Iterable[T], x: int) -> Iterable[Iterable[T]]: | |
| gen = (i for i in _i) | |
| batch = [] | |
| for item in gen: | |
| batch.append(item) | |
| if len(batch) == x: |
Thanks for contributing to this project! Your time and talents are hugely appreciated!
This project uses a Contribution License Agreement ("CLA") to preclude any legal questions that may arise about the ownership/usage of the code in this project over time. Without this CLA, any contributor could potentially wreck havoc on the project by arbitrarily seeking to retract his/her contribution at any point in time or by attempting to assert that the project owners don't have a right to use his/her contribution in one way or another.
While only the "Legal Agreement" section has legally binding provisions, the following summary may help you better understand what you are being asked to sign here.
- You are not being asked to give up your copyright to your contribution. You can still use your code in any other way you wish.
- You are being asked to grant the project owner a license to use your code as freely as you as the author can.
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
| import java.util.Scanner; | |
| public class Scratch { | |
| // Assign multiple double values from System.in | |
| // without writing `nextDouble()` more than once. | |
| public enum DoubleExample { | |
| A, B, C; | |
| public final double value; | |
| private DoubleExample() { value = new Scanner(System.in).nextDouble(); } |