Python Cheat Sheet
This report presents the forensic synthetic code analysis of crazyguitar/pysheeet, a Python project with 8,150 GitHub stars. SynthScan v2.0 examined 14,832 lines of code across 83 source files, recording 139 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 17.6 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 139 distinct pattern matches across 11 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | src/basic/heap.py | 258 | h.push("a", 3) | CODE |
| HIGH⚡ | src/basic/heap.py | 259 | h.push("b", 1) | CODE |
| HIGH⚡ | src/basic/heap.py | 260 | h.push("c", 2) | CODE |
| HIGH⚡ | src/basic/heap.py | 265 | h.push("task1", 3) | CODE |
| HIGH⚡ | src/basic/heap.py | 266 | h.push("task2", 1) | CODE |
| HIGH⚡ | src/basic/heap.py | 267 | h.push("task1", 0) # update priority | CODE |
| HIGH⚡ | src/basic/list.py | 181 | s.push(1) | CODE |
| HIGH⚡ | src/basic/list.py | 182 | s.push(2) | CODE |
| HIGH⚡ | src/basic/list.py | 188 | s.push(1) | CODE |
| HIGH⚡ | src/basic/list.py | 195 | s.push(1) | CODE |
| HIGH | src/basic/typing_.py | 202 | s.push(1) | CODE |
| HIGH | src/basic/typing_.py | 203 | s.push(2) | CODE |
| HIGH | src/cext/test_cext.py | 8 | mkdir build && cd build && cmake .. && make | STRING |
| HIGH⚡ | src/cext/test_cext.py | 85 | assert abs(v.length() - 5.0) < 1e-10 | CODE |
| HIGH⚡ | src/cext/test_cext.py | 88 | assert v.length() == 0 | CODE |
| HIGH⚡ | src/cext/test_cext.py | 98 | assert abs(n.length() - 1.0) < 1e-10 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | app_test.py | 62 | def test_index_redirection_req(self): | CODE |
| LOW | app_test.py | 152 | def test_legacy_rtd_path_redirect(self): | CODE |
| LOW⚡ | app_test.py | 169 | def test_redirect_legacy_rtd_paths_passthrough(self): | CODE |
| LOW⚡ | app_test.py | 174 | def test_redirect_legacy_rtd_paths_match(self): | CODE |
| LOW⚡ | app_test.py | 181 | def test_resolve_legacy_flat_target_known(self): | CODE |
| LOW⚡ | app_test.py | 231 | def test_resolve_legacy_flat_target_unknown(self): | CODE |
| LOW⚡ | app_test.py | 241 | def test_redirect_legacy_flat_paths_passthrough(self): | CODE |
| LOW⚡ | app_test.py | 246 | def test_redirect_legacy_flat_paths_match(self): | CODE |
| LOW | app_test.py | 257 | def test_redirect_canonical_host_bare(self): | CODE |
| LOW | app_test.py | 271 | def test_redirect_canonical_host_preserves_query(self): | CODE |
| LOW | app_test.py | 284 | def test_redirect_canonical_host_passthrough(self): | CODE |
| LOW | app.py | 134 | def _resolve_legacy_flat_target(path): | CODE |
| LOW | app.py | 223 | def redirect_legacy_rtd_paths(): | CODE |
| LOW | app.py | 231 | def redirect_legacy_flat_paths(): | CODE |
| LOW | src/security/vulnerability_.py | 69 | def test_vulnerable_query_building(self): | CODE |
| LOW | src/security/vulnerability_.py | 101 | def test_vulnerable_shell_command(self): | CODE |
| LOW | src/security/vulnerability_.py | 136 | def test_pickle_code_execution(self): | CODE |
| LOW | src/security/vulnerability_.py | 169 | def test_environment_variables(self): | CODE |
| LOW | src/security/vulnerability_.py | 189 | def test_ecb_mode_pattern_leak(self): | CODE |
| LOW | src/security/vulnerability_.py | 212 | def test_cbc_needs_authentication(self): | CODE |
| LOW | src/security/vulnerability_.py | 240 | def test_secure_password_hash(self): | CODE |
| LOW | src/basic/object.py | 364 | def test_abstract_instantiation(self): | CODE |
| LOW | src/basic/fileio_.py | 253 | def test_zipfile_create_extract(tmp_path): | CODE |
| LOW | src/basic/fileio_.py | 346 | def test_shutil_copytree_ignore(tmp_path): | CODE |
| LOW | src/basic/fileio_.py | 362 | def test_shutil_copytree_dirs_exist_ok(tmp_path): | CODE |
| LOW | src/basic/fileio_.py | 450 | def test_shutil_unpack_archive(tmp_path): | CODE |
| LOW | src/basic/asyncio_.py | 58 | def test_wait_first_completed(self): | CODE |
| LOW | src/basic/asyncio_.py | 132 | def test_async_context_manager(self): | CODE |
| LOW | src/basic/asyncio_.py | 154 | def test_asynccontextmanager_decorator(self): | CODE |
| LOW | src/basic/asyncio_.py | 299 | def test_gather_return_exceptions(self): | CODE |
| LOW⚡ | src/basic/sqlalchemy_core.py | 46 | def test_create_sqlite_memory(self): | CODE |
| LOW | src/basic/socket_.py | 17 | def test_gethostbyname_localhost(self): | CODE |
| LOW | src/basic/concurrency_.py | 52 | def test_thread_with_return_value(self): | CODE |
| LOW | src/basic/concurrency_.py | 398 | def test_basic_producer_consumer(self): | CODE |
| LOW | src/basic/cext_.py | 297 | def test_python_fib_iterative(self): | CODE |
| LOW | src/basic/unicode_.py | 87 | def test_encode_errors_ignore(self): | CODE |
| LOW | src/basic/unicode_.py | 90 | def test_encode_errors_replace(self): | CODE |
| LOW | src/basic/unicode_.py | 121 | def test_normalization_equality(self): | CODE |
| LOW | src/basic/dict.py | 22 | def create_dict_comprehension(n: int) -> dict: | CODE |
| LOW | src/basic/dict.py | 76 | def dict_comprehension_filter(n: int) -> dict: | CODE |
| LOW | src/basic/future_.py | 94 | def test_annotations_are_strings(self): | CODE |
| LOW | src/basic/set.py | 36 | def set_comprehension_squares(n: int) -> set: | CODE |
| LOW | src/basic/set.py | 219 | def test_symmetric_difference(self): | CODE |
| LOW | src/basic/datetime_.py | 34 | def test_timestamp_conversion(): | CODE |
| LOW | src/basic/datetime_.py | 68 | def test_timedelta_arithmetic(): | CODE |
| LOW | src/basic/func.py | 231 | def test_keyword_only_default(self): | CODE |
| LOW | src/basic/crypto_.py | 89 | def test_hmac_tamper_detection(self): | CODE |
| LOW | src/basic/crypto_.py | 158 | def test_with_associated_data(self): | CODE |
| LOW | src/basic/crypto_.py | 238 | def test_oaep_encrypt_decrypt(self): | CODE |
| LOW | src/basic/crypto_.py | 329 | def test_hybrid_encrypt_decrypt(self): | CODE |
| LOW | src/cext/test_cext.py | 149 | def test_add_arrays_length_mismatch(self): | CODE |
| LOW | src/cext/test_cext.py | 173 | def test_slow_operation_parallel(self): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | app.py | 19 | CODE | |
| LOW | src/llm/vllm/offline_bench.py | 25 | CODE | |
| LOW | src/llm/vllm/offline_bench.py | 28 | CODE | |
| LOW | src/security/vulnerability_.py | 116 | CODE | |
| LOW | src/basic/heap.py | 8 | CODE | |
| LOW | src/basic/list.py | 12 | CODE | |
| LOW | src/basic/sqlalchemy_core.py | 3 | CODE | |
| LOW | src/basic/sqlalchemy_core.py | 4 | CODE | |
| LOW | src/basic/sqlalchemy_core.py | 5 | CODE | |
| LOW | src/basic/sqlalchemy_core.py | 5 | CODE | |
| LOW | src/basic/sqlalchemy_core.py | 5 | CODE | |
| LOW | src/basic/sqlalchemy_core.py | 5 | CODE | |
| LOW | src/basic/sqlalchemy_core.py | 5 | CODE | |
| LOW | src/basic/sqlalchemy_core.py | 5 | CODE | |
| LOW | src/basic/sqlalchemy_core.py | 29 | CODE | |
| LOW | src/basic/sqlalchemy_core.py | 29 | CODE | |
| LOW | src/basic/sqlalchemy_core.py | 29 | CODE | |
| LOW | src/basic/sqlalchemy_core.py | 29 | CODE | |
| LOW | src/basic/sqlalchemy_core.py | 29 | CODE | |
| LOW | src/basic/sqlalchemy_core.py | 36 | CODE | |
| LOW | src/basic/socket_.py | 5 | CODE | |
| LOW | src/basic/socket_.py | 6 | CODE | |
| LOW | src/basic/generator.py | 10 | CODE | |
| LOW | src/basic/sqlalchemy_orm.py | 3 | CODE | |
| LOW | src/basic/sqlalchemy_orm.py | 4 | CODE | |
| LOW | src/basic/sqlalchemy_query.py | 3 | CODE | |
| LOW | src/basic/sqlalchemy_query.py | 4 | CODE | |
| LOW | src/basic/sqlalchemy_query.py | 20 | CODE | |
| LOW | src/basic/rexp.py | 9 | CODE | |
| LOW | src/basic/cext_.py | 10 | CODE | |
| LOW | src/basic/cext_.py | 13 | CODE | |
| LOW | src/basic/unicode_.py | 6 | CODE | |
| LOW | src/basic/dict.py | 6 | CODE | |
| LOW | src/basic/future_.py | 9 | CODE | |
| LOW | src/basic/typing_.py | 6 | CODE | |
| LOW | src/basic/typing_.py | 7 | CODE | |
| LOW | src/basic/func.py | 8 | CODE | |
| LOW | src/cext/test_cext.py | 11 | CODE | |
| LOW | src/cext/setup.py | 10 | CODE | |
| LOW | src/megatron/viztracer_plugin.py | 15 | CODE | |
| LOW | src/megatron/viztracer_plugin.py | 18 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | src/basic/sqlalchemy_core.py | 38 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | src/basic/sqlalchemy_core.py | 40 | # ============================================================================ | COMMENT |
| MEDIUM | src/basic/sqlalchemy_orm.py | 27 | # ============================================================================ | COMMENT |
| MEDIUM | src/basic/sqlalchemy_orm.py | 29 | # ============================================================================ | COMMENT |
| MEDIUM | src/basic/sqlalchemy_query.py | 27 | # ============================================================================ | COMMENT |
| MEDIUM | src/basic/sqlalchemy_query.py | 29 | # ============================================================================ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/conf.py | 1 | # -*- coding: utf-8 -*- | COMMENT |
| LOW | docs/conf.py | 81 | # General information about the project. | COMMENT |
| LOW | docs/conf.py | 101 | language = 'en' | COMMENT |
| LOW | docs/conf.py | 121 | # unit titles (such as .. function::). | COMMENT |
| LOW | docs/conf.py | 221 | #html_domain_indices = True | COMMENT |
| LOW | docs/conf.py | 241 | #html_use_opensearch = '' | COMMENT |
| LOW | docs/conf.py | 261 | htmlhelp_basename = 'python-cheatsheetdoc' | COMMENT |
| LOW | docs/conf.py | 281 | # author, documentclass [howto, manual, or own class]). | COMMENT |
| LOW | src/llm/vllm/sweep.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | src/cpp_from_python/cpp_from_py.cpp | 1 | /* | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/conf.py | 6 | # This file is execfile()d with the current directory set to its | COMMENT |
| MEDIUM | src/basic/dict.py | 11 | # Create a Dictionary | COMMENT |
| MEDIUM | src/basic/set.py | 9 | # Create a Set | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/nixl/bench.sh | 3 | # Usage: | COMMENT |
| LOW | src/llm/vllm/bench.sh | 3 | # Usage: | COMMENT |
| LOW | src/llm/vllm/sweep.sh | 8 | # Usage: | COMMENT |
| LOW | src/llm/vllm/offline_bench.sh | 3 | # Usage: | COMMENT |
| LOW | src/llm/tensorrt-llm/bench.sh | 4 | # Usage: | COMMENT |
| LOW | src/llm/sglang/bench.sh | 3 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/basic/rexp.py | 281 | assert find_before_at("user@example.com") == ["user"] | CODE |
| LOW | src/basic/rexp.py | 304 | assert is_valid_email("user@example.com") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/llm/vllm/offline_bench.py | 328 | # Check if detailed metrics are available | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/security/vulnerability_.py | 144 | # For safety, we just return a harmless function | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/basic/object.py | 198 | except Exception: | CODE |