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 rust-script | |
//! ```cargo | |
//! [dependencies] | |
//! ruff_python_parser = { git = "https://github.com/astral-sh/ruff/" } | |
//! ``` | |
use std::fs; | |
fn main() { | |
let file_path = "example.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.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Automated reduction parameter finder | |
# Systematically finds optimal settings for each reduction step | |
set -e | |
LINES=(4 5 12 14 16 26) | |
# Test if a configuration preserves the bug (returns 0 if bug present, 1 if not) |
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 json | |
import random | |
# ISO-ish language codes to simulate | |
LANG_CODES = [ | |
"en", | |
"fr", | |
"de", | |
"es", | |
"it", |
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 json | |
import random | |
# ISO-ish language codes to simulate | |
LANG_CODES = [ | |
"en", | |
"fr", | |
"de", | |
"es", | |
"it", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 json | |
examples = [ | |
{ | |
"id": "Q1", | |
"aliases": ["Universe", "Cosmos"], # list of strings | |
"labels": { # categorical map | |
"en": "universe", | |
"fr": "univers", | |
"de": "Universum" |
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 polars as pl | |
import fastavro | |
from pathlib import Path | |
# Define an Avro schema with both record (struct) and map | |
schema = { | |
"type": "record", | |
"name": "Inventory", | |
"fields": [ | |
{"name": "id", "type": "int"}, |
NewerOlder