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 | |
| """cs — find and pick up coding-agent sessions (Claude Code + Codex), even after the transcript is gone. | |
| cs [query] fzf picker over every session, newest first | |
| cs pickup <id> [claude|codex] pick the session up in that tool (default: its own tool) | |
| cs resume <id> same as `pickup <id>` in its own tool | |
| cs restore <id> bring a purged transcript back from an Entire checkpoint | |
| cs attach <id> [--branch B] write an Entire checkpoint for the session straight to the | |
| checkpoint remote (never amends a commit, never touches main) | |
| cs --refresh (re)index Entire checkpoint remotes found in your projects |
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
| def convert_to_couples(row): | |
| return [n // 2 for n in row] | |
| def trim_couples(couples): | |
| return [ | |
| couples[i] for i in xrange(len(couples)) | |
| if couples[i//2*2] != couples[i//2*2+1] | |
| ] | |
| def reindex_by_appearance(sequence): |
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
| MIT License | |
| Copyright (c) 2020 rajat mehndiratta | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
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
| # To get this to work: install names (`pip3 install --user -U names`) | |
| import names | |
| import random | |
| # copied from https://pe.usps.com/text/pub28/28apc_002.htm | |
| # hardcoded because requests + BeautifulSoup got too ugly and it's faster to | |
| # just extract and prettify the words from the page manually | |
| STREET_SUFFIXES = { | |
| 'Alley', 'Annex', 'Arcade', 'Avenue', 'Bayou', 'Beach', 'Bend', 'Bluff', | |
| 'Bluffs', 'Bottom', 'Boulevard', 'Branch', 'Bridge', 'Brook', 'Brooks', |
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 argparse | |
| import cProfile | |
| import itertools | |
| import random | |
| import string | |
| ALL_FUNCTION_NAMES=[ | |
| 'using_choice', 'using_sample', 'using_randint', 'using_randint_with_offset', 'using_randbits', | |
| 'using_randbits_ascii_lowercase', 'using_one_long_randbits' | |
| ] |