Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.
日本語の概要は準備中です。原文の説明を表示しています。
Civilization 6 district mechanics library. Use when working with district placement validation, adjacency bonus calculations, or understanding Civ6 game rules.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Complete reference for Civilization 6 district placement and adjacency bonus systems (Gathering Storm).
For hex grid utilities (neighbors, distance, etc.), use the hex-grid-spatial skill or import from src.hex_utils.
from civ6lib import (
# Placement
DistrictType, Tile, PlacementRules, get_placement_rules,
validate_district_count, validate_district_uniqueness,
# Adjacency
AdjacencyCalculator, get_adjacency_calculator,
)
# Validate a placement
rules = get_placement_rules(tiles, city_center=(21, 13), population=7)
result = rules.validate_placement(DistrictType.CAMPUS, 21, 14, {})
if result.valid:
print("Valid placement!")
# Calculate adjacency bonus
calculator = get_adjacency_calculator(tiles)
total, per_district = calculator.calculate_total_adjacency(placements)
| Condition | Min Distance | Tiles Between |
|---|---|---|
| Same landmass | 4 tiles | 3 tiles |
| Different landmasses | 3 tiles | 2 tiles |
Settling a City Center on a tile with Geothermal Fissure or Luxury/Strategic Resources preserves them (they remain and provide adjacency bonuses to nearby districts). Districts cannot be placed on these tiles.
| Rule | Description |
|---|---|
| Distance | Within 3 tiles of City Center |
| Mountains | Cannot place |
| Natural Wonders | Cannot place |
| Strategic Resources | Cannot place (Iron, Horses, Niter, Coal, Oil, Aluminum, Uranium) |
| Luxury Resources | Cannot place |
| Existing District | Cannot place on occupied tile |
| Bonus Resources | CAN place (resource destroyed) |
| Woods/Rainforest/Marsh | CAN place (feature destroyed) |
| District | Special Requirement |
|---|---|
| Harbor | Must be on Coast/Lake, adjacent to land |
| Water Park | Must be on Coast/Lake, adjacent to land |
| Aerodrome | Must be on flat land |
| Spaceport | Must be on flat land |
| Encampment | NOT adjacent to City Center |
| Preserve | NOT adjacent to City Center |
| Aqueduct | Adjacent to City Center AND fresh water (Mountain, River, Lake, Oasis) |
| Dam | On Floodplains, river crosses 2+ edges |
max_specialty_districts = 1 + floor((population - 1) / 3)
| Population | Max Districts |
|---|---|
| 1-3 | 1 |
| 4-6 | 2 |
| 7-9 | 3 |
| 10-12 | 4 |
These can be built regardless of population limit:
| Rule | Districts |
|---|---|
| ONE per city | Campus, Holy Site, Theater Square, Commercial Hub, Harbor, Industrial Zone, Entertainment Complex, Water Park, Encampment, Aerodrome, Preserve |
| Multiple per city | Neighborhood |
| ONE per civilization | Government Plaza, Diplomatic Quarter |
Each +0.5 type is floored SEPARATELY, then summed!
WRONG:
IZ with 1 Mine + 1 Lumber Mill + 1 District
= floor(3/2) = 1 ❌
CORRECT:
Mine: floor(1/2) = 0
Lumber Mill: floor(1/2) = 0
District: floor(1/2) = 0
TOTAL = 0 ✓
| Bonus | Source |
|---|---|
| +2 each | Geothermal Fissure, Reef |
| +1 each | Mountain |
| +0.5 each | Rainforest (floor separately) |
| +0.5 each | District (floor separately) |
| Bonus | Source |
|---|---|
| +2 each | Natural Wonder |
| +1 each | Mountain |
| +0.5 each | Woods (floor separately) |
| +0.5 each | District (floor separately) |
| Bonus | Source |
|---|---|
| +2 each | Wonder (built wonder) |
| +2 each | Entertainment Complex, Water Park |
| +0.5 each | District (floor separately) |
| Bonus | Source |
|---|---|
| +2 | If tile is ON a river (binary!) |
| +2 each | Adjacent Harbor |
| +0.5 each | District (floor separately) |
| Bonus | Source |
|---|---|
| +2 each | Adjacent City Center |
| +1 each | Coastal Resource (Fish, Crabs, Whales, Pearls) |
| +0.5 each | District (floor separately) |
| Bonus | Source |
|---|---|
| +2 each | Aqueduct, Dam, Canal |
| +1 each | Quarry, Strategic Resource |
| +0.5 each | Mine (floor separately) |
| +0.5 each | Lumber Mill (floor separately) |
| +0.5 each | District (floor separately) |
Government Plaza gives +1 adjacency bonus to adjacent specialty districts.
Districts that benefit when adjacent to Government Plaza:
Note: Government Plaza also counts toward the +0.5 per district minor bonus.
Counts: Campus, Holy Site, Theater Square, Commercial Hub, Harbor, Industrial Zone, Entertainment Complex, Water Park, Encampment, Aerodrome, Spaceport, Government Plaza, Diplomatic Quarter, Preserve, City Center, Aqueduct, Dam, Canal, Neighborhood
Placing ANY district destroys:
This affects OTHER districts' adjacency!
All district types: CAMPUS, HOLY_SITE, THEATER_SQUARE, COMMERCIAL_HUB, HARBOR, INDUSTRIAL_ZONE, etc.
Represents a map tile with terrain, features, resources, rivers.
Validates district placements against all game rules.
Calculates adjacency bonuses based on surrounding tiles and districts.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.
日本語の概要は準備中です。原文の説明を表示しています。
AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching `acopf-math-model.md` and MATPOWER branch fields. Use when computing branch flows in either direction, aggregating bus injections for nodal balance, checking MVA (rateA) limits, computing branch loading %, or debugging sign/units issues in AC power flow.
日本語の概要は準備中です。原文の説明を表示しています。
Redact text from PDF documents for blind review anonymization
日本語の概要は準備中です。原文の説明を表示しています。
Use when checking simplified ADA-derived plan-view bathroom accessibility constraints such as turning space, door clear width, toilet centerline, grab bars, and lavatory knee/toe clearance.
日本語の概要は準備中です。原文の説明を表示しています。
Analyze failed GitHub Action jobs for a pull request.
日本語の概要は準備中です。原文の説明を表示しています。
Use when extracting plan-view architectural geometry from DXF files with semantic CAD layers, especially when outputs must normalize rooms, doors, fixtures, clearances, and grab bars into machine-checkable JSON.
日本語の概要は準備中です。原文の説明を表示しています。