- /goal . Constraints: validation must pass, commits must be atomic, PR must be opened, stop only for irreversible choices or missing credentials.
- Create a series of PRs, each covering one small group of atomic changes. Each PR must pass validation before moving on.
- Assess the current state first. Identify risks, missing tests, and broken assumptions. Then implement the smallest safe next step.
- Fetch all PR comments, address unresolved feedback, mark resolved only after verification, and summarize the final commit.
- Use this context packet: target, prior artifact, constraints, alternative datapoints. Do not overfit to one source; synthesize into the deliverable.
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 | |
| """ | |
| Scholar's Mate Around Europe | |
| Deterministic infographic map generator. | |
| Install: | |
| pip install geopandas matplotlib shapely pyproj requests pillow arabic-reshaper python-bidi | |
| Run: | |
| python scholars_mate_map.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
| import multiprocessing as mp | |
| import os | |
| import time | |
| from dataclasses import dataclass | |
| from datetime import datetime | |
| @dataclass | |
| class JobItem: | |
| x: int | |
| y: int |
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
| -------- BEGIN argv --------- | |
| local foo = ARGV[1] -- foo | |
| local bar = ARGV[2] -- foo:bar | |
| local baz = ARGV[3] -- foo:baz | |
| local val = ARGV[4] | |
| local ttl = ARGV[5] | |
| -------- END argv --------- | |
| local key = "sessions::" .. foo .. "::" .. bar .. "::" .. baz |
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
| N = 8 -- board size | |
| function isplaceok(a, n, c) | |
| for i = 1, n - 1 do -- for each queen already placed | |
| if (a[i] == c) or -- same column? | |
| (a[i] - i == c - n) or -- same diagonal? | |
| (a[i] + i == c + n) then -- same diagonal? | |
| return false -- place can be attacked | |
| end | |
| end |
https://www.ruby-lang.org/en/news/2017/12/25/ruby-2-5-0-released/
- rescue/else/ensure in do..end blocks :
# https://bugs.ruby-lang.org/issues/12906
my_func = lamdbda do
begin
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 perl -w | |
| use 5.006; | |
| use strict; | |
| use warnings; | |
| use YAML::Tiny; | |
| use Cwd qw( cwd ); | |
| use File::Spec::Functions qw( catfile catdir ); | |
| # This scripts allows to find out which files are excluded in .rubocop.yml |
Let's suppose that we want to keep two different tag versioning on the same repo:
v[0-9]*for master branch versionsd[0-9]*for development branch versions
Basic commands: https://git-scm.com/book/en/v2/Git-Basics-Tagging
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 perl -w | |
| use 5.006; | |
| use strict; | |
| use warnings; | |
| use YAML::Tiny; | |
| use Cwd qw( cwd ); | |
| use File::Spec::Functions qw( catfile catdir ); | |
| my $yaml = YAML::Tiny->read( |
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 | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| PROJECT_DIR=$(git rev-parse --show-toplevel) | |
| # Base branch for rebasing | |
| BASE_BRANCH="master" | |
| # Enter here the name of the branches to rebase |
NewerOlder