content
stringlengths 7
1.05M
| fixed_cases
stringlengths 1
1.28M
|
|---|---|
#!/usr/bin/python3
"""Alta3 Research | RZFeeser
Review of Lists and Dictionaries"""
# define a short data set (in real world, we want to read this from a file or API)
munsters = {'endDate': 1966, 'startDate': 1964,\
'names':['Lily', 'Herman', 'Grandpa', 'Eddie', 'Marilyn']} # {} creates dict
# Your solution goes below this line
# ----------------------------------
# Display the value mapped to names
names = munsters["names"]
for i in range(len(names)):
print(names[i])
# Display the value mapped to endDate
print(munsters["endDate"])
# Display the value mapped to startDate
print(munsters["startDate"])
# Add a new key, episodes mapped to the value of 70
munsters["episodes"] = 70
print(munsters)
|
"""Alta3 Research | RZFeeser
Review of Lists and Dictionaries"""
munsters = {'endDate': 1966, 'startDate': 1964, 'names': ['Lily', 'Herman', 'Grandpa', 'Eddie', 'Marilyn']}
names = munsters['names']
for i in range(len(names)):
print(names[i])
print(munsters['endDate'])
print(munsters['startDate'])
munsters['episodes'] = 70
print(munsters)
|
with open('assets/day09.txt', 'r') as file:
lines = [line for line in file.read().splitlines()]
depths = [[9] + [int(d) for d in line] + [9] for line in lines]
depths = [[9] * len(depths[0])] + depths + [[9] * len(depths[0])]
minimums = []
for y in range(1, len(depths) - 1):
for x in range(1, len(depths[y]) - 1):
depth = depths[y][x]
minimum_depth = min(depths[y - 1][x], depths[y + 1][x], depths[y][x - 1], depths[y][x + 1])
if depth < minimum_depth:
minimums.append(depth)
print(f"Minimum risk level: {sum(minimums) + len(minimums)}")
|
with open('assets/day09.txt', 'r') as file:
lines = [line for line in file.read().splitlines()]
depths = [[9] + [int(d) for d in line] + [9] for line in lines]
depths = [[9] * len(depths[0])] + depths + [[9] * len(depths[0])]
minimums = []
for y in range(1, len(depths) - 1):
for x in range(1, len(depths[y]) - 1):
depth = depths[y][x]
minimum_depth = min(depths[y - 1][x], depths[y + 1][x], depths[y][x - 1], depths[y][x + 1])
if depth < minimum_depth:
minimums.append(depth)
print(f'Minimum risk level: {sum(minimums) + len(minimums)}')
|
CONTENT = """huc basin
<!--10n 60s-->
01 New England
0101 St. John
010100 St. John
01010001 Upper St. John
01010002 Allagash
01010003 Fish
01010004 Aroostook
01010005 Meduxnekeag
0102 Penobscot
010200 Penobscot
01020001 West Branch Penobscot
01020002 East Branch Penobscot
01020003 Mattawamkeag
01020004 Piscataquis
01020005 Lower Penobscot
0103 Kennebec
010300 Kennebec
01030001 Upper Kennebec
01030002 Dead
01030003 Lower Kennebec
0104 Androscoggin
010400 Androscoggin
01040001 Upper Androscoggin
01040002 Lower Androscoggin
0105 Maine Coastal
010500 Maine Coastal
01050001 St. Croix
01050002 Maine Coastal
01050003 St. George-Sheepscot
0106 Saco
010600 Saco
01060001 Presumpscot
01060002 Saco
01060003 Piscataqua-Salmon Falls
0107 Merrimack
010700 Merrimack
01070001 Pemigewasset
01070002 Merrimack
01070003 Contoocook
01070004 Nashua
01070005 Concord
0108 Connecticut
010801 Upper Connecticut
01080101 Upper Connecticut
01080102 Passumpsic
01080103 Waits
01080104 Upper Connecticut-Mascoma
01080105 White
01080106 Black-Ottauquechee
01080107 West
010802 Lower Connecticut
01080201 Middle Connecticut
01080202 Miller
01080203 Deerfield
01080204 Chicopee
01080205 Lower Connecticut
01080206 Westfield
01080207 Farmington
0109 Massachusetts-Rhode Island Coastal
010900 Massachusetts-Rhode Island Coastal
01090001 Charles
01090002 Cape Cod
01090003 Blackstone
01090004 Narragansett
01090005 Pawcatuck-Wood
0110 Connecticut Coastal
011000 Connecticut Coastal
01100001 Quinebaug
01100002 Shetucket
01100003 Thames
01100004 Quinnipiac
01100005 Housatonic
01100006 Saugatuck
01100007 Long Island Sound
0111 St. Francois
011100 St. Francois
01110000 St. Francois
02 Mid Atlantic
0201 Richelieu
020100 Richelieu
02010001 Lake George
02010002 Otter
02010003 Winooski
02010004 Ausable
02010005 Lamoille
02010006 Great Chazy-Saranac
02010007 Missisquoi
0202 Upper Hudson
020200 Upper Hudson
02020001 Upper Hudson
02020002 Sacandaga
02020003 Hudson-Hoosic
02020004 Mohawk
02020005 Schoharie
02020006 Middle Hudson
02020007 Rondout
02020008 Hudson-Wappinger
0203 Lower Hudson-Long Island
020301 Lower Hudson
02030101 Lower Hudson
02030102 Bronx
02030103 Hackensack-Passaic
02030104 Sandy Hook-Staten Island
02030105 Raritan
020302 Long Island
02030201 Northern Long Island
02030202 Southern Long Island
0204 Delaware
020401 Upper Delaware
02040101 Upper Delaware
02040102 East Branch Delaware
02040103 Lackawaxen
02040104 Middle Delaware-Mongaup-Brodhead
02040105 Middle Delaware-Musconetcong
02040106 Lehigh
020402 Lower Delaware
02040201 Crosswicks-Neshaminy
02040202 Lower Delaware
02040203 Schuylkill
02040204 Delaware Bay
02040205 Brandywine-Christina
02040206 Cohansey-Maurice
02040207 Broadkill-Smyrna
020403 New Jersey Coastal
02040301 Mullica-Toms
02040302 Great Egg Harbor
0205 Susquehanna
020501 Upper Susquehanna
02050101 Upper Susquehanna
02050102 Chenango
02050103 Owego-Wappasening
02050104 Tioga
02050105 Chemung
02050106 Upper Susquehanna-Tunkhannock
02050107 Upper Susquehanna-Lackawanna
020502 West Branch Susquehanna
02050201 Upper West Branch Susquehanna
02050202 Sinnemahoning
02050203 Middle West Branch Susquehanna
02050204 Bald Eagle
02050205 Pine
02050206 Lower West Branch Susquehanna
020503 Lower Susquehanna
02050301 Lower Susquehanna-Penns
02050302 Upper Juniata
02050303 Raystown
02050304 Lower Juniata
02050305 Lower Susquehanna-Swatara
02050306 Lower Susquehanna
0206 Upper Chesapeake
020600 Upper Chesapeake
02060001 Upper Chesapeake Bay
02060002 Chester-Sassafras
02060003 Gunpowder-Patapsco
02060004 Severn
02060005 Choptank
02060006 Patuxent
02060007 Blackwater-Wicomico
02060008 Nanticoke
02060009 Pocomoke
02060010 Chincoteague
0207 Potomac
020700 Potomac
02070001 South Branch Potomac
02070002 North Branch Potomac
02070003 Cacapon-Town
02070004 Conococheague-Opequon
02070005 South Fork Shenandoah
02070006 North Fork Shenandoah
02070007 Shenandoah
02070008 Middle Potomac-Catoctin
02070009 Monocacy
02070010 Middle Potomac-Anacostia-Occoquan
02070011 Lower Potomac
0208 Lower Chesapeake
020801 Lower Chesapeake
02080101 Lower Chesapeake Bay
02080102 Great Wicomico-Piankatank
02080103 Rapidan-Upper Rappahannock
02080104 Lower Rappahannock
02080105 Mattaponi
02080106 Pamunkey
02080107 York
02080108 Lynnhaven-Poquoson
02080109 Western Lower Delmarva
02080110 Eastern Lower Delmarva
020802 James
02080201 Upper James
02080202 Maury
02080203 Middle James-Buffalo
02080204 Rivanna
02080205 Middle James-Willis
02080206 Lower James
02080207 Appomattox
02080208 Hampton Roads
03 South Atlantic-Gulf
0301 Chowan-Roanoke
030101 Roanoke
03010101 Upper Roanoke
03010102 Middle Roanoke
03010103 Upper Dan
03010104 Lower Dan
03010105 Banister
03010106 Roanoke Rapids
03010107 Lower Roanoke
030102 Albemarle-Chowan
03010201 Nottoway
03010202 Blackwater
03010203 Chowan
03010204 Meherrin
03010205 Albemarle
0302 Neuse-Pamlico
030201 Pamlico
03020101 Upper Tar
03020102 Fishing
03020103 Lower Tar
03020104 Pamlico
03020105 Pamlico Sound
03020106 Bogue-Core Sounds
030202 Neuse
03020201 Upper Neuse
03020202 Middle Neuse
03020203 Contentnea
03020204 Lower Neuse
0303 Cape Fear
030300 Cape Fear
03030001 New
03030002 Haw
03030003 Deep
03030004 Upper Cape Fear
03030005 Lower Cape Fear
03030006 Black
03030007 Northeast Cape Fear
0304 Pee Dee
030401 Upper Pee Dee
03040101 Upper Yadkin
03040102 South Yadkin
03040103 Lower Yadkin
03040104 Upper Pee Dee
03040105 Rocky
030402 Lower Pee Dee
03040201 Lower Pee Dee
03040202 Lynches
03040203 Lumber
03040204 Little Pee Dee
03040205 Black
03040206 Waccamaw
03040207 Carolina Coastal-Sampit
0305 Edisto-Santee
030501 Santee
03050101 Upper Catawba
03050102 South Fork Catawba
03050103 Lower Catawba
03050104 Wateree
03050105 Upper Broad
03050106 Lower Broad
03050107 Tyger
03050108 Enoree
03050109 Saluda
03050110 Congaree
03050111 Lake Marion
03050112 Santee
030502 Edisto-South Carolina Coastal
03050201 Cooper
03050202 South Carolina Coastal
03050203 North Fork Edisto
03050204 South Fork Edisto
03050205 Edisto
03050206 Four Hole Swamp
03050207 Salkehatchie
03050208 Broad-St. Helena
0306 Ogeechee-Savannah
030601 Savannah
03060101 Seneca
03060102 Tugaloo
03060103 Upper Savannah
03060104 Broad
03060105 Little
03060106 Middle Savannah
03060107 Stevens
03060108 Brier
03060109 Lower Savannah
030602 Ogeechee
03060201 Upper Ogeechee
03060202 Lower Ogeechee
03060203 Canoochee
03060204 Ogeechee Coastal
0307 Altamaha - St. Marys
030701 Altamaha
03070101 Upper Oconee
03070102 Lower Oconee
03070103 Upper Ocmulgee
03070104 Lower Ocmulgee
03070105 Little Ocmulgee
03070106 Altamaha
03070107 Ohoopee
030702 St. Marys - Satilla
03070201 Satilla
03070202 Little Satilla
03070203 Cumberland-St. Simons
03070204 St. Marys
03070205 Nassau
0308 St. Johns
030801 St. Johns
03080101 Upper St. Johns
03080102 Oklawaha
03080103 Lower St. Johns
030802 East Florida Coastal
03080201 Daytona - St. Augustine
03080202 Cape Canaveral
03080203 Vero Beach
0309 Southern Florida
030901 Kissimmee
03090101 Kissimmee
03090102 Northern Okeechobee Inflow
03090103 Western Okeechobee Inflow
030902 Southern Florida
03090201 Lake Okeechobee
03090202 Everglades
03090203 Florida Bay-Florida Keys
03090204 Big Cypress Swamp
03090205 Caloosahatchee
0310 Peace-Tampa Bay
031001 Peace
03100101 Peace
03100102 Myakka
03100103 Charlotte Harbor
031002 Tampa Bay
03100201 Sarasota Bay
03100202 Manatee
03100203 Little Manatee
03100204 Alafia
03100205 Hillsborough
03100206 Tampa Bay
03100207 Crystal-Pithlachascotee
03100208 Withlacoochee
0311 Suwannee
031101 Aucilla-Waccasassa
03110101 Waccasassa
03110102 Econfina-Steinhatchee
03110103 Aucilla
031102 Suwannee
03110201 Upper Suwannee
03110202 Alapaha
03110203 withlacoochee
03110204 Little
03110205 Lower Suwannee
03110206 Santa Fe
0312 Ochlockonee
031200 Ochlockonee. Georgia
03120001 Apalachee Bay-St. Marks
03120002 Upper Ochlockonee
03120003 Lower Ochlockonee
0313 Apalachicola
031300 Apalachicola
03130001 Upper Chattahoochee
03130002 Middle Chattahoochee-Lake Harding
03130003 Middle Chattahoochee-Walter F. George Reservoir
03130004 Lower Chattahoochee
03130005 Upper Flint
03130006 Middle Flint
03130007 Kinchafoonee-Muckalee
03130008 Lower Flint
03130009 Ichawaynochaway
03130010 Spring
03130011 Apalachicola
03130012 Chipola
03130013 New
03130014 Apalachicola Bay
0314 Choctawhatchee - Escambia
031401 Florida Panhandle Coastal
03140101 St. Andrew-St. Joseph Bays
03140102 Choctawhatchee Bay
03140103 Yellow
03140104 Blackwater
03140105 Pensacola Bay
03140106 Perdido
03140107 Perdido Bay
031402 Choctawhatchee
03140201 Upper Choctawhatchee
03140202 Pea
03140203 Lower Choctawhatchee
031403 Escambia
03140301 Upper Conecuh
03140302 Patsaliga
03140303 Sepulga
03140304 Lower Conecuh
03140305 Escambia
0315 Alabama
031501 Coosa-Tallapoosa
03150101 Conasauga
03150102 Coosawattee
03150103 Oostanaula
03150104 Etowah
03150105 Upper Coosa
03150106 Middle Coosa
03150107 Lower Coosa
03150108 Upper Tallapoosa
03150109 Middle Tallapoosa
03150110 Lower Tallapoosa
031502 Alabama
03150201 Upper Alabama
03150202 Cahaba
03150203 Middle Alabama
03150204 Lower Alabama
0316 Mobile - Tombigbee
031601 Black Warrior - Tombigbee
03160101 Upper Tombigbee
03160102 Town
03160103 Buttahatchee
03160104 Tibbee
03160105 Luxapallila
03160106 Middle Tombigbee-Lubbub
03160107 Sipsey
03160108 Noxubee
03160109 Mulberry
03160110 Sipsey Fork
03160111 Locust
03160112 Upper Black Warrior
03160113 Lower Black Warrior
031602 Mobile Bay- Tombigbee
03160201 Middle Tombigbee-Chickasaw
03160202 Sucarnoochee
03160203 Lower Tambigbee
03160204 Mobile - Tensaw
03160205 Mobile Bay
0317 Pascagoula
031700 Pascagoula. Mississippi
03170001 Chunky-Okatibbee
03170002 Upper Chickasawhay
03170003 Lower Chickasawhay
03170004 Upper Leaf
03170005 Lower Leaf
03170006 Pascagoula
03170007 Black
03170008 Escatawpa
03170009 Mississippi Coastal
0318 Pearl
031800 Pearl
03180001 Upper Pearl
03180002 Middle Pearl-Strong
03180003 Middle Pearl-Silver
03180004 Lower Pearl. Mississippi
03180005 Bogue Chitto
04 Great Lakes
0401 Western Lake Superior
040101 Northwestern Lake Superior
04010101 Baptism-Brule
04010102 Beaver-Lester
040102 St. Louis
04010201 St. Louis
04010202 Cloquet
040103 Southwestern Lake Superior
04010301 Beartrap-Nemadji
04010302 Bad-Montreal
0402 Southern Lake Superior-Lake Superior
040201 Southcentral Lake Superior
04020101 Black-Presque Isle
04020102 Ontonagon
04020103 Keweenaw Peninsula
04020104 Sturgeon
04020105 Dead-Kelsey
040202 Southeastern Lake Superior
04020201 Betsy-Chocolay
04020202 Tahquamenon
04020203 Waiska
040203 Lake Superior
04020300 Lake Superior
0403 Northwestern Lake Michigan
040301 Northwestern Lake Michigan
04030101 Manitowoc-Sheboygan
04030102 Door-Kewaunee
04030103 Duck-Pensaukee
04030104 Oconto
04030105 Peshtigo
04030106 Brule
04030107 Michigamme
04030108 Menominee
04030109 Cedar-Ford
04030110 Escanaba
04030111 Tacoosh-Whitefish
04030112 Fishdam-Sturgeon
040302 Fox
04030201 Upper Fox
04030202 Wolf
04030203 Lake Winnebago
04030204 Lower Fox
0404 Southwestern Lake Michigan
040400 Southwestern Lake Michigan
04040001 Little Calumet-Galien
04040002 Pike-Root
04040003 Milwaukee
0405 Southeastern Lake Michigan
040500 Southeastern Lake Michigan
04050001 St. Joseph
04050002 Black-Macatawa
04050003 Kalamazoo
04050004 Upper Grand
04050005 Maple
04050006 Lower Grand
04050007 Thornapple
0406 Northeastern Lake Michigan-Lake Michigan
040601 Northeastern Lake Michigan
04060101 Pere Marquette-White
04060102 Muskegon
04060103 Manistee
04060104 Betsie-Platte
04060105 Boardman-Charlevoix
04060106 Manistique
04060107 Brevoort-Millecoquins
040602 Lake Michigan
04060200 Lake Michigan
0407 Northwestern Lake Huron
040700 Northwestern Lake Huron
04070001 St. Marys
04070002 Carp-Pine
04070003 Lone Lake-Ocqueoc
04070004 Cheboygan
04070005 Black
04070006 Thunder Bay
04070007 Au Sable
0408 Southwestern Lake Huron-Lake Huron
040801 Southwestern Lake Huron
04080101 Au Gres-Rifle
04080102 Kawkawlin-Pine
04080103 Pigeon-Wiscoggin
04080104 Birch-Willow
040802 Saginaw
04080201 Tittabawassee
04080202 Pine
04080203 Shiawassee
04080204 Flint
04080205 Cass
04080206 Saginaw
040803 Lake Huron
04080300 Lake Huron
0409 St. Clair-Detroit
040900 St. Clair-Detroit
04090001 St. Clair
04090002 Lake St. Clair
04090003 Clinton
04090004 Detroit
04090005 Huron
0410 Western Lake Erie
041000 Western Lake Erie
04100001 Ottawa-Stony
04100002 Raisin
04100003 St. Joseph
04100004 St. Marys
04100005 Upper Maumee
04100006 Tiffin
04100007 Auglaize
04100008 Blanchard
04100009 Lower Maumee
04100010 Cedar-Portage
04100011 Sandusky
04100012 Huron-Vermilion
0411 Southern Lake Erie
041100 Southern Lake Erie
04110001 Black-Rocky
04110002 Cuyahoga
04110003 Ashtabula-Chagrin
04110004 Grand
0412 Eastern Lake Erie-Lake Erie
041201 Eastern Lake Erie
04120101 Chautauqua-Conneaut
04120102 Cattaraugus
04120103 Buffalo-Eighteenmile
04120104 Niagara
041202 Lake Erie
04120200 Lake Erie
0413 Southwestern Lake Ontario
041300 Southwestern Lake Ontario
04130001 Oak Orchard-Twelvemile
04130002 Upper Genesee
04130003 Lower Genesee
0414 Southeastern Lake Ontario
041401 Southeastern Lake Ontario
04140101 Irondequoit-Ninemile
04140102 Salmon-Sandy
041402 Oswego
04140201 Seneca
04140202 Oneida
04140203 Oswego
0415 Northeastern Lake Ontario-Lake Ontario-St. Lawrence
041501 Northeastern Lake Ontario
04150101 Black
04150102 Chaumont-Perch
041502 Lake Ontario
04150200 Lake Ontario
041503 St. Lawrence
04150301 Upper St. Lawrence
04150302 Oswegatchie
04150303 Indian
04150304 Grass
04150305 Raquette
04150306 St. Regis
04150307 English-Salmon
05 Ohio
0501 Allegheny
050100 Allegheny
05010001 Upper Allegheny
05010002 Conewango
05010003 Middle Allegheny-Tionesta
05010004 French
05010005 Clarion
05010006 Middle Allegheny-Redbank
05010007 Conemaugh
05010008 Kiskiminetas
05010009 Lower Allegheny
0502 Monongahela
050200 Monongahela
05020001 Tygart Valley
05020002 West Fork
05020003 Upper Monongahela
05020004 Cheat
05020005 Lower Monongahela
05020006 Youghiogheny
0503 Upper Ohio
050301 Upper Ohio-Beaver
05030101 Upper Ohio
05030102 Shenango
05030103 Mahoning
05030104 Beaver
05030105 Connoquenessing
05030106 Upper Ohio-Wheeling
050302 Upper Ohio-Little Kanawha
05030201 Little Muskingum-Middle Island
05030202 Upper Ohio-Shade
05030203 Little Kanawha
05030204 Hocking
0504 Muskingum
050400 Muskingum
05040001 Tuscarawas
05040002 Mohican
05040003 Walhonding
05040004 Muskingum
05040005 Wills
05040006 Licking
0505 Kanawha
050500 Kanawha
05050001 Upper New
05050002 Middle New
05050003 Greenbrier
05050004 Lower New
05050005 Gauley
05050006 Upper Kanawha
05050007 Elk
05050008 Lower Kanawha
05050009 Coal
0506 Scioto
050600 Scioto
05060001 Upper Scioto
05060002 Lower Scioto
05060003 Paint
0507 Big Sandy-Guyandotte
050701 Guyandotte
05070101 Upper Guyandotte
05070102 Lower Guyandotte
050702 Big Sandy
05070201 Tug
05070202 Upper Levisa
05070203 Lower Levisa
05070204 Big Sandy
0508 Great Miami
050800 Great Miami
05080001 Upper Great Miami
05080002 Lower Great Miami
05080003 Whitewater
0509 Middle Ohio
050901 Middle Ohio-Raccoon
05090101 Raccoon-Symmes
05090102 Twelvepole
05090103 Little Scioto-Tygarts
05090104 Little Sandy
050902 Middle Ohio-Little Miami
05090201 Ohio Brush-Whiteoak
05090202 Little Miami
05090203 Middle Ohio-Laughery
0510 Kentucky-Licking
051001 Licking
05100101 Licking
05100102 South Fork Licking
051002 Kentucky
05100201 North Fork Kentucky
05100202 Middle Fork Kentucky
05100203 South Fork Kentucky
05100204 Upper Kentucky
05100205 Lower Kentucky
0511 Green
051100 Green
05110001 Upper Green
05110002 Barren
05110003 Middle Green
05110004 Rough
05110005 Lower Green
05110006 Pond
0512 Wabash
051201 Wabash
05120101 Upper Wabash
05120102 Salamonie
05120103 Mississinewa
05120104 Eel
05120105 Middle Wabash-Deer
05120106 Tippecanoe
05120107 Wildcat
05120108 Middle Wabash-Little Vermilion
05120109 Vermilion
05120110 Sugar
05120111 Middle Wabash-Busseron
05120112 Embarras
05120113 Lower Wabash
05120114 Little Wabash
05120115 Skillet
051202 Patoka-White
05120201 Upper White
05120202 Lower White
05120203 Eel
05120204 Driftwood
05120205 Flatrock-Haw
05120206 Upper East Fork White
05120207 Muscatatuck
05120208 Lower East Fork White
05120209 Patoka
0513 Cumberland
051301 Upper Cumberland
05130101 Upper Cumberland
05130102 Rockcastle
05130103 Upper Cumberland-Lake Cumberland
05130104 South Fork Cumberland
05130105 Obey
05130106 Upper Cumberland-Cordell Hull
05130107 Collins
05130108 Caney
051302 Lower Cumberland
05130201 Lower Cumberland-Old Hickory Lake
05130202 Lower Cumberland-Sycamore
05130203 Stones
05130204 Harpeth
05130205 Lower Cumberland
05130206 Red
0514 Lower Ohio
051401 Lower Ohio-Salt
05140101 Silver-Little Kentucky
05140102 Salt
05140103 Rolling Fork
05140104 Blue-Sinking
051402 Lower Ohio
05140201 Lower Ohio-Little Pigeon
05140202 Highland-Pigeon
05140203 Lower Ohio-Bay
05140204 Saline
05140205 Tradewater
05140206 Lower Ohio
06 Tennessee
0601 Upper Tennessee
060101 French Broad-Holston
06010101 North Fork Holston
06010102 South Fork Holston
06010103 Watauga
06010104 Holston
06010105 Upper French Broad
06010106 Pigeon
06010107 Lower French Broad
06010108 Nolichucky
060102 Upper Tennessee
06010201 Watts Bar Lake
06010202 Upper Little Tennessee
06010203 Tuckasegee
06010204 Lower Little Tennessee
06010205 Upper Clinch
06010206 Powell
06010207 Lower Clinch
06010208 Emory
0602 Middle Tennessee-Hiwassee
060200 Middle Tennessee-Hiwassee
06020001 Middle Tennessee-Chickamauga
06020002 Hiwassee
06020003 Ocoee
06020004 Sequatchie
0603 Middle Tennessee-Elk
060300 Middle Tennessee-Elk
06030001 Guntersville Lake
06030002 Wheeler Lake
06030003 Upper Elk
06030004 Lower Elk
06030005 Pickwick Lake
06030006 Bear
0604 Lower Tennessee
060400 Lower Tennessee
06040001 Lower Tennessee-Beech
06040002 Upper Duck
06040003 Lower Duck
06040004 Buffalo
06040005 Kentucky Lake
06040006 Lower Tennessee
07 Upper Mississippi
0701 Mississippi Headwaters
070101 Mississippi Headwaters
07010101 Mississippi Headwaters
07010102 Leech Lake
07010103 Prairie-Willow
07010104 Elk-Nokasippi
07010105 Pine
07010106 Crow Wing
07010107 Redeye
07010108 Long Prairie
070102 Upper Mississippi-Crow-Rum
07010201 Platte-Spunk
07010202 Sauk
07010203 Clearwater-Elk
07010204 Crow
07010205 South Fork Crow
07010206 Twin Cities
07010207 Rum
0702 Minnesota
070200 Minnesota
07020001 Upper Minnesota
07020002 Pomme De Terre
07020003 Lac Qui Parle
07020004 Hawk-Yellow Medicine
07020005 Chippewa
07020006 Redwood
07020007 Middle Minnesota
07020008 Cottonwood
07020009 Blue Earth
07020010 Watonwan
07020011 Le Sueur
07020012 Lower Minnesota
0703 St. Croix
070300 St. Croix
07030001 Upper St. Croix
07030002 Namekagon
07030003 Kettle
07030004 Snake
07030005 Lower St. Croix
0704 Upper Mississippi-Black-Root
070400 Upper Mississippi-Black-Root
07040001 Rush-Vermillion
07040002 Cannon
07040003 Buffalo-Whitewater
07040004 Zumbro
07040005 Trempealeau
07040006 La Crosse-Pine
07040007 Black
07040008 Root
0705 Chippewa
070500 Chippewa
07050001 Upper Chippewa
07050002 Flambeau
07050003 South Fork Flambeau
07050004 Jump
07050005 Lower Chippewa
07050006 Eau Claire
07050007 Red Cedar
0706 Upper Mississippi-Maquoketa-Plum
070600 Upper Mississippi-Maquoketa-Plum
07060001 Coon-Yellow
07060002 Upper Iowa
07060003 Grant-Little Maquoketa
07060004 Turkey
07060005 Apple-Plum
07060006 Maquoketa
0707 Wisconsin
070700 Wisconsin
07070001 Upper Wisconsin
07070002 Lake Dubay
07070003 Castle Rock
07070004 Baraboo
07070005 Lower Wisconsin
07070006 Kickapoo
0708 Upper Mississippi-Iowa-Skunk-Wapsipinicon
070801 Upper Mississippi-Skunk-Wapsipinicon
07080101 Copperas-Duck
07080102 Upper Wapsipinicon
07080103 Lower Wapsipinicon
07080104 Flint-Henderson
07080105 South Skunk
07080106 North Skunk
07080107 Skunk
070802 Iowa
07080201 Upper Cedar
07080202 Shell Rock
07080203 Winnebago
07080204 West Fork Cedar
07080205 Middle Cedar
07080206 Lower Cedar
07080207 Upper Iowa
07080208 Middle Iowa
07080209 Lower Iowa
0709 Rock
070900 Rock
07090001 Upper Rock
07090002 Crawfish
07090003 Pecatonica
07090004 Sugar
07090005 Lower Rock
07090006 Kishwaukee
07090007 Green
0710 Des Moines
071000 Des Moines
07100001 Des Moines Headwaters
07100002 Upper Des Moines
07100003 East Fork Des Moines
07100004 Middle Des Moines
07100005 Boone
07100006 North Raccoon
07100007 South Raccoon
07100008 Lake Red Rock
07100009 Lower Des Moines
0711 Upper Mississippi-Salt
071100 Upper Mississippi-Salt
07110001 Bear-Wyaconda
07110002 North Fabius
07110003 South Fabius
07110004 The Sny
07110005 North Fork Salt
07110006 South Fork Salt
07110007 Salt
07110008 Cuivre
07110009 Peruque-Piasa
0712 Upper Illinois
071200 Upper Illinois
07120001 Kankakee
07120002 Iroquois
07120003 Chicago
07120004 Des Plaines
07120005 Upper Illinois
07120006 Upper Fox
07120007 Lower Fox
0713 Lower Illinois
071300 Lower Illinois
07130001 Lower Illinois-Senachwine Lake
07130002 Vermilion
07130003 Lower Illinois-Lake Chautauqua
07130004 Mackinaw
07130005 Spoon
07130006 Upper Sangamon
07130007 South Fork Sangamon
07130008 Lower Sangamon
07130009 Salt
07130010 La Moine
07130011 Lower Illinois
07130012 Macoupin
0714 Upper Mississippi-Kaskaskia-Meramec
071401 Upper Mississippi-Meramec
07140101 Cahokia-Joachim
07140102 Meramec
07140103 Bourbeuse
07140104 Big
07140105 Upper Mississippi-Cape Girardeau
07140106 Big Muddy
07140107 Whitewater
07140108 Cache
071402 Kaskaskia
07140201 Upper Kaskaskia
07140202 Middle Kaskaskia
07140203 Shoal
07140204 Lower Kaskaskia
08 Lower Mississippi
0801 Lower Mississippi-Hatchie
080101 Lower Mississippi-Memphis
08010100 Lower Mississippi-Memphis
080102 Hatchie-Obion
08010201 Bayou De Chien-Mayfield
08010202 Obion
08010203 South Fork Obion
08010204 North Fork Forked Deer
08010205 South Fork Forked Deer
08010206 Forked Deer
08010207 Upper Hatchie
08010208 Lower Hatchie
08010209 Loosahatchie
08010210 Wolf
08010211 Horn Lake-Nonconnah
0802 Lower Mississippi - St. Francis
080201 Lower Mississippi-Helena
08020100 Lower Mississippi-Helena
080202 St. Francis
08020201 New Madrid-St. Johns
08020202 Upper St. Francis
08020203 Lower St. Francis
08020204 Little River Ditches
08020205 L'anguille
080203 Lower White
08020301 Lower White-Bayou Des Arc
08020302 Cache
08020303 Lower White
08020304 Big
080204 Lower Arkansas
08020401 Lower Arkansas
08020402 Bayou Meto
0803 Lower Mississippi - Yazoo
080301 Lower Mississippi-Greenville
08030100 Lower Mississippi-Greenville
080302 Yazoo
08030201 Little Tallahatchie
08030202 Tallahatchie
08030203 Yocona
08030204 Coldwater
08030205 Yalobusha
08030206 Upper Yazoo
08030207 Big Sunflower
08030208 Lower Yazoo
08030209 Deer-Steele
0804 Lower Red - Ouachita
080401 Upper Ouachita
08040101 Ouachita Headwaters
08040102 Upper Ouachita
08040103 Little Missouri
080402 Lower Ouachita
08040201 Lower Ouachita-Smackover
08040202 Lower Ouachita-Bayou De Loutre
08040203 Upper Saline
08040204 Lower Saline
08040205 Bayou Bartholomew
08040206 Bayou D'arbonne
08040207 Lower Ouachita
080403 Lower Red
08040301 Lower Red
08040302 Castor
08040303 Dugdemona
08040304 Little
08040305 Black
08040306 Bayou Cocodrie
0805 Boeuf-Tensas
080500 Boeuf-Tensas
08050001 Boeuf
08050002 Bayou Macon
08050003 Tensas
0806 Lower Mississippi - Big Black
080601 Lower Mississippi-Natchez
08060100 Lower Mississippi-Natchez
080602 Big Black - Homochitto
08060201 Upper Big Black
08060202 Lower Big Black
08060203 Bayou Pierre
08060204 Coles Creek
08060205 Homochitto
08060206 Buffalo
0807 Lower Mississippi-Lake Maurepas
080701 Lower Mississippi-Baton Rouge
08070100 Lower Mississippi-Baton Rouge
080702 Lake Maurepas
08070201 Bayou Sara-Thompson
08070202 Amite
08070203 Tickfaw
08070204 Lake Maurepas
08070205 Tangipahoa
080703 Lower Grand
08070300 Lower Grand
0808 Louisiana Coastal
080801 Atchafalaya - Vermilion
08080101 Atchafalaya
08080102 Bayou Teche
08080103 Vermilion
080802 Calcasieu - Mermentau
08080201 Mermentau Headwaters
08080202 Mermentau
08080203 Upper Calcasieu
08080204 Whisky Chitto
08080205 West Fork Calcasieu
08080206 Lower Calcasieu
0809 Lower Mississippi
080901 Lower Mississippi-New Orleans
08090100 Lower Mississippi-New Orleans
080902 Lake Pontchartrain
08090201 Liberty Bayou-Tchefuncta
08090202 Lake Pontchartrain
08090203 Eastern Louisiana Coastal
080903 Central Louisiana Coastal
08090301 East Central Louisiana Coastal
08090302 West Central Louisiana Coastal
09 Souris-Red-Rainy
0901 Souris
090100 Souris
09010001 Upper Souris
09010002 Des Lacs
09010003 Lower Souris
09010004 Willow
09010005 Deep
0902 Red
090201 Upper Red
09020101 Bois De Sioux
09020102 Mustinka
09020103 Otter Tail
09020104 Upper Red
09020105 Western Wild Rice
09020106 Buffalo
09020107 Elm-Marsh
09020108 Eastern Wild Rice
09020109 Goose
090202 Devils Lake-Sheyenne
09020201 Devils Lake
09020202 Upper Sheyenne
09020203 Middle Sheyenne
09020204 Lower Sheyenne
09020205 Maple
090203 Lower Red
09020301 Sandhill-Wilson
09020302 Red Lakes
09020303 Red Lake
09020304 Thief
09020305 Clearwater
09020306 Grand Marais-Red
09020307 Turtle
09020308 Forest
09020309 Snake
09020310 Park
09020311 Lower Red
09020312 Two Rivers
09020313 Pembina
09020314 Roseau
0903 Rainy
090300 Rainy
09030001 Rainy Headwaters
09030002 Vermilion
09030003 Rainy Lake
09030004 Upper Rainy
09030005 Little Fork
09030006 Big Fork
09030007 Rapid
09030008 Lower Rainy
09030009 Lake of the Woods
10 Missouri
1001 Saskatchewan
100100 Saskatchewan
10010001 Belly
10010002 St. Mary
1002 Missouri Headwaters
100200 Missouri Headwaters
10020001 Red Rock
10020002 Beaverhead
10020003 Ruby
10020004 Big Hole
10020005 Jefferson
10020006 Boulder
10020007 Madison
10020008 Gallatin
1003 Missouri-Marias
100301 Upper Missouri
10030101 Upper Missouri
10030102 Upper Missouri-Dearborn
10030103 Smith
10030104 Sun
10030105 Belt
100302 Marias
10030201 Two Medicine
10030202 Cut Bank
10030203 Marias
10030204 Willow
10030205 Teton
1004 Missouri-Musselshell
100401 Fort Peck Lake
10040101 Bullwhacker-Dog
10040102 Arrow
10040103 Judith
10040104 Fort Peck Reservoir
10040105 Big Dry
10040106 Little Dry
100402 Musselshell
10040201 Upper Musselshell
10040202 Middle Musselshell
10040203 Flatwillow
10040204 Box Elder
10040205 Lower Musselshell
1005 Milk
100500 Milk
10050001 Milk Headwaters
10050002 Upper Milk
10050003 Wild Horse Lake
10050004 Middle Milk
10050005 Big Sandy
10050006 Sage
10050007 Lodge
10050008 Battle
10050009 Peoples
10050010 Cottonwood
10050011 Whitewater
10050012 Lower Milk
10050013 Frenchman
10050014 Beaver
10050015 Rock
10050016 Porcupine
1006 Missouri-Poplar
100600 Missouri-Poplar
10060001 Prarie Elk-Wolf
10060002 Redwater
10060003 Poplar
10060004 West Fork Poplar
10060005 Charlie-Little Muddy
10060006 Big Muddy
10060007 Brush Lake closed basin
1007 Upper Yellowstone
100700 Upper Yellowstone
10070001 Yellowstone Headwaters
10070002 Upper Yellowstone
10070003 Shields
10070004 Upper Yellowstone-Lake Basin
10070005 Stillwater
10070006 Clarks Fork Yellowstone
10070007 Upper Yellowstone-Pompeys Pillar
10070008 Pryor
1008 Big Horn
100800 Big Horn
10080001 Upper Wind
10080002 Little Wind
10080003 Popo Agie
10080004 Muskrat
10080005 Lower Wind
10080006 Badwater
10080007 Upper Bighorn
10080008 Nowood
10080009 Greybull
10080010 Big Horn Lake
10080011 Dry
10080012 North Fork Shoshone
10080013 South Fork Shoshone
10080014 Shoshone
10080015 Lower Bighorn
10080016 Little Bighorn
1009 Powder-Tongue
100901 Tongue
10090101 Upper Tongue
10090102 Lower Tongue
100902 Powder
10090201 Middle Fork Powder
10090202 Upper Powder
10090203 South Fork Powder
10090204 Salt
10090205 Crazy Woman
10090206 Clear
10090207 Middle Powder
10090208 Little Powder
10090209 Lower Powder
10090210 Mizpah
1010 Lower Yellowstone
101000 Lower Yellowstone
10100001 Lower Yellowstone-Sunday
10100002 Big Porcupine
10100003 Rosebud
10100004 Lower Yellowstone
10100005 O'fallon
1011 Missouri-Little Missouri
101101 Lake Sakakawea
10110101 Lake Sakakawea
10110102 Little Muddy
101102 Little Missouri
10110201 Upper Little Missouri
10110202 Boxelder
10110203 Middle Little Missouri
10110204 Beaver
10110205 Lower Little Missouri
1012 Cheyenne
101201 Cheyenne
10120101 Antelope
10120102 Dry Fork Cheyenne
10120103 Upper Cheyenne
10120104 Lance
10120105 Lightning
10120106 Angostura Reservoir
10120107 Beaver
10120108 Hat
10120109 Middle Cheyenne-Spring
10120110 Rapid
10120111 Middle Cheyenne-Elk
10120112 Lower Cheyenne
10120113 Cherry
101202 Belle Fourche
10120201 Upper Belle Fourche
10120202 Lower Belle Fourche
10120203 Redwater
1013 Missouri-Oahe
101301 Lake Oahe
10130101 Painted Woods-Square Butte
10130102 Upper Lake Oahe
10130103 Apple
10130104 Beaver
10130105 Lower Lake Oahe
10130106 West Missouri Coteau
101302 Cannonball-Heart-Knife
10130201 Knife
10130202 Upper Heart
10130203 Lower Heart
10130204 Upper Cannonball
10130205 Cedar
10130206 Lower Cannonball
101303 Grand-Moreau
10130301 North Fork Grand
10130302 South Fork Grand
10130303 Grand
10130304 South Fork Moreau
10130305 Upper Moreau
10130306 Lower Moreau
1014 Missouri-White
101401 Fort Randall Reservoir
10140101 Fort Randall Reservoir
10140102 Bad
10140103 Medicine Knoll
10140104 Medicine
10140105 Crow
101402 White
10140201 Upper White
10140202 Middle White
10140203 Little White
10140204 Lower White
1015 Niobrara
101500 Niobrara
10150001 Ponca
10150002 Niobrara Headwaters
10150003 Upper Niobrara
10150004 Middle Niobrara
10150005 Snake
10150006 Keya Paha
10150007 Lower Niobrara
1016 James
101600 James
10160001 James Headwaters
10160002 Pipestem
10160003 Upper James
10160004 Elm
10160005 Mud
10160006 Middle James
10160007 East Missouri Coteau
10160008 Snake
10160009 Turtle
10160010 North Big Sioux Coteau
10160011 Lower James
1017 Missouri-Big Sioux
101701 Lewis and Clark Lake
10170101 Lewis and Clark Lake
10170102 Vermillion
10170103 South Big Sioux Coteau
101702 Big Sioux
10170201 Middle Big Sioux Coteau
10170202 Upper Big Sioux
10170203 Lower Big Sioux
10170204 Rock
1018 North Platte
101800 North Platte
10180001 North Platte Headwaters
10180002 Upper North Platte
10180003 Pathfinder-Seminoe Reservoirs
10180004 Medicine Bow
10180005 Little Medicine Bow
10180006 Sweetwater
10180007 Middle North Platte-Casper
10180008 Glendo Reservoir
10180009 Middle North Platte-Scotts Bluff
10180010 Upper Laramie
10180011 Lower Laramie
10180012 Horse
10180013 Pumpkin
10180014 Lower North Platte
1019 South Platte
101900 South Platte
10190001 South Platte Headwaters
10190002 Upper South Platte
10190003 Middle South Platte-Cherry Creek
10190004 Clear
10190005 St. Vrain
10190006 Big Thompson
10190007 Cache La Poudre
10190008 Lone Tree-Owl
10190009 Crow
10190010 Kiowa
10190011 Bijou
10190012 Middle South Platte-Sterling
10190013 Beaver
10190014 Pawnee
10190015 Upper Lodgepole
10190016 Lower Lodgepole
10190017 Sidney Draw
10190018 Lower South Platte
1020 Platte
102001 Middle Platte
10200101 Middle Platte-Buffalo
10200102 Wood
10200103 Middle Platte-Prairie
102002 Lower Platte
10200201 Lower Platte-Shell
10200202 Lower Platte
10200203 Salt
1021 Loup
102100 Loup
10210001 Upper Middle Loup
10210002 Dismal
10210003 Lower Middle Loup
10210004 South Loup
10210005 Mud
10210006 Upper North Loup
10210007 Lower North Loup
10210008 Calamus
10210009 Loup
10210010 Cedar
1022 Elkhorn
102200 Elkhorn
10220001 Upper Elkhorn
10220002 North Fork Elkhorn
10220003 Lower Elkhorn
10220004 Logan
1023 Missouri-Little Sioux
102300 Missouri-Little Sioux
10230001 Blackbird-Soldier
10230002 Floyd
10230003 Little Sioux
10230004 Monona-Harrison Ditch
10230005 Maple
10230006 Big Papillion-Mosquito
10230007 Boyer
1024 Missouri-Nishnabotna
102400 Missouri-Nishnabotna
10240001 Keg-Weeping Water
10240002 West Nishnabotna
10240003 East Nishnabotna
10240004 Nishnabotna
10240005 Tarkio-Wolf
10240006 Little Nemaha
10240007 South Fork Big Nemaha
10240008 Big Nemaha
10240009 West Nodaway
10240010 Nodaway
10240011 Independence-Sugar
10240012 Platte
10240013 One Hundred and Two
1025 Republican
102500 Republican
10250001 Arikaree
10250002 North Fork Republican
10250003 South Fork Republican
10250004 Upper Republican
10250005 Frenchman
10250006 Stinking Water
10250007 Red Willow
10250008 Medicine
10250009 Harlan County Reservoir
10250010 Upper Sappa
10250011 Lower Sappa
10250012 South Fork Beaver
10250013 Little Beaver
10250014 Beaver
10250015 Prairie Dog
10250016 Middle Republican
10250017 Lower Republican
1026 Smoky Hill
102600 Smoky Hill
10260001 Smoky Hill Headwaters
10260002 North Fork Smoky Hill
10260003 Upper Smoky Hill
10260004 Ladder
10260005 Hackberry
10260006 Middle Smoky Hill
10260007 Big
10260008 Lower Smoky Hill
10260009 Upper Saline
10260010 Lower Saline
10260011 Upper North Fork Solomon
10260012 Lower North Fork Solomon
10260013 Upper South Fork Solomon
10260014 Lower South Fork Solomon
10260015 Solomon
1027 Kansas
102701 Kansas
10270101 Upper Kansas
10270102 Middle Kansas
10270103 Delaware
10270104 Lower Kansas
102702 Big Blue
10270201 Upper Big Blue
10270202 Middle Big Blue
10270203 West Fork Big Blue
10270204 Turkey
10270205 Lower Big Blue
10270206 Upper Little Blue
10270207 Lower Little Blue
1028 Chariton-Grand
102801 Grand
10280101 Upper Grand
10280102 Thompson
10280103 Lower Grand
102802 Chariton
10280201 Upper Chariton
10280202 Lower Chariton
10280203 Little Chariton
1029 Gasconade-Osage
102901 Osage
10290101 Upper Marais Des Cygnes
10290102 Lower Marais Des Cygnes
10290103 Little Osage
10290104 Marmaton
10290105 Harry S. Missouri
10290106 Sac
10290107 Pomme De Terre
10290108 South Grand
10290109 Lake of the Ozarks
10290110 Niangua
10290111 Lower Osage
102902 Gasconade
10290201 Upper Gasconade
10290202 Big Piney
10290203 Lower Gasconade
1030 Lower Missouri
103001 Lower Missouri-Blackwater
10300101 Lower Missouri-Crooked
10300102 Lower Missouri-Moreau
10300103 Lamine
10300104 Blackwater
103002 Lower Missouri
10300200 Lower Missouri
11 Arkansas-White-Red
1101 Upper White
110100 Upper White
11010001 Beaver Reservoir
11010002 James
11010003 Bull Shoals Lake
11010004 Middle White
11010005 Buffalo
11010006 North Fork White
11010007 Upper Black
11010008 Current
11010009 Lower Black
11010010 Spring
11010011 Eleven Point
11010012 Strawberry
11010013 Upper White-Village
11010014 Little Red
1102 Upper Arkansas
110200 Upper Arkansas
11020001 Arkansas Headwaters
11020002 Upper Arkansas
11020003 Fountain
11020004 Chico
11020005 Upper Arkansas-Lake Meredith
11020006 Huerfano
11020007 Apishapa
11020008 Horse
11020009 Upper Arkansas-John Martin
11020010 Purgatoire
11020011 Big Sandy
11020012 Rush
11020013 Two Butte
1103 Middle Arkansas
110300 Middle Arkansas
11030001 Middle Arkansas-Lake Mckinney
11030002 Whitewoman
11030003 Arkansas-Dodge City
11030004 Coon-Pickerel
11030005 Pawnee
11030006 Buckner
11030007 Upper Walnut Creek
11030008 Lower Walnut Creek
11030009 Rattlesnake
11030010 Gar-Peace
11030011 Cow
11030012 Little Arkansas
11030013 Middle Arkansas-Slate
11030014 North Fork Ninnescah
11030015 South Fork Ninnescah
11030016 Ninnescah
11030017 Upper Walnut River
11030018 Lower Walnut River
1104 Upper Cimarron
110400 Upper Cimarron
11040001 Cimarron headwaters
11040002 Upper Cimarron
11040003 North Fork Cimarron
11040004 Sand Arroyo
11040005 Bear
11040006 Upper Cimarron-Liberal
11040007 Crooked
11040008 Upper Cimarron-Bluff
1105 Lower Cimarron
110500 Lower Cimarron
11050001 Lower Cimarron-Eagle Chief
11050002 Lower Cimarron-Skeleton
11050003 Lower Cimarron
1106 Arkansas - Keystone
110600 Arkansas - Keystone
11060001 Kaw Lake
11060002 Upper Salt Fork Arkansas
11060003 Medicine Lodge
11060004 Lower Salt Fork Arkansas
11060005 Chikaskia
11060006 Black Bear-Red Rock
1107 Neosho - Verdigris
110701 Verdigris
11070101 Upper Verdigris
11070102 Fall
11070103 Middle Verdigris
11070104 Elk
11070105 Lower Verdigris
11070106 Caney
11070107 Bird
110702 Neosho
11070201 Neosho headwaters
11070202 Upper Cottonwood
11070203 Lower Cottonwood
11070204 Upper Neosho
11070205 Middle Neosho
11070206 Lake O' the Cherokees
11070207 Spring
11070208 Elk
11070209 Lower Neosho
1108 Upper Canadian
110800 Upper Canadian
11080001 Canadian headwaters
11080002 Cimarron
11080003 Upper Canadian
11080004 Mora
11080005 Conchas
11080006 Upper Canadian-Ute Reservoir
11080007 Ute
11080008 Revuelto
1109 Lower Canadian
110901 Middle Canadian
11090101 Middle Canadian-Trujillo
11090102 Punta De Agua
11090103 Rita Blanca
11090104 Carrizo
11090105 Lake Meredith
11090106 Middle Canadian-Spring
110902 Lower Canadian
11090201 Lower Canadian-Deer
11090202 Lower Canadian-Walnut
11090203 Little
11090204 Lower Canadian
1110 North Canadian
111001 Upper Beaver
11100101 Upper Beaver
11100102 Middle Beaver
11100103 Coldwater
11100104 Palo Duro
111002 Lower Beaver
11100201 Lower Beaver
11100202 Upper Wolf
11100203 Lower Wolf
111003 Lower North Canadian
11100301 Middle North Canadian
11100302 Lower North Canadian
11100303 Deep Fork
1111 Lower Arkansas
111101 Robert S. Kerr Reservoir
11110101 Polecat-Snake
11110102 Dirty-Greenleaf
11110103 Illinois
11110104 Robert S. Kerr Reservoir
11110105 Poteau
111102 Lower Arkansas-Fourche La Fave
11110201 Frog-Mulberry
11110202 Dardanelle Reservoir
11110203 Lake Conway-Point Remove
11110204 Petit Jean
11110205 Cadron
11110206 Fourche La Fave
11110207 Lower Arkansas-Maumelle
1112 Red headwaters
111201 Prairie Dog Town Fork Red
11120101 Tierra Blanca
11120102 Palo Duro
11120103 Upper Prairie Dog Town Fork Red
11120104 Tule
11120105 Lower Prairie Dog Town Fork Red
111202 Salt Fork Red
11120201 Upper Salt Fork Red
11120202 Lower Salt Fork Red
111203 North Fork Red
11120301 Upper North Fork Red
11120302 Middle North Fork Red
11120303 Lower North Fork Red
11120304 Elm Fork Red
1113 Red - Washita
111301 Red-Pease
11130101 Groesbeck-Sandy
11130102 Blue-China
11130103 North Pease
11130104 Middle Pease
11130105 Pease
111302 Red-Lake Texoma
11130201 Farmers-Mud
11130202 Cache
11130203 West Cache
11130204 North Wichita
11130205 South Wichita
11130206 Wichita
11130207 Southern Beaver
11130208 Northern Beaver
11130209 Little Wichita
11130210 Lake Texoma
111303 Washita
11130301 Washita headwaters
11130302 Upper Washita
11130303 Middle Washita
11130304 Lower Washita
1114 Red-Sulphur
111401 Red-Little
11140101 Bois D'arc-Island
11140102 Blue
11140103 Muddy Boggy
11140104 Clear Boggy
11140105 Kiamichi
11140106 Pecan-Waterhole
11140107 Upper Little
11140108 Mountain Fork
11140109 Lower Little
111402 Red-Saline
11140201 Mckinney-Posten Bayous
11140202 Middle Red-Coushatta
11140203 Loggy Bayou
11140204 Red Chute
11140205 Bodcau Bayou
11140206 Bayou Pierre
11140207 Lower Red-Lake Iatt
11140208 Saline Bayou
11140209 Black Lake Bayou
111403 Big Cypress - Sulphur
11140301 Sulphur headwaters
11140302 Lower Sulphur
11140303 White Oak Bayou
11140304 Cross Bayou
11140305 Lake O'the Pines
11140306 Caddo Lake
11140307 Little Cypress
12 Texas-Gulf
1201 Sabine
120100 Sabine
12010001 Upper Sabine
12010002 Middle Sabine
12010003 Lake Fork
12010004 Toledo Bend Reservoir
12010005 Lower Sabine
1202 Neches
120200 Neches
12020001 Upper Neches
12020002 Middle Neches
12020003 Lower Neches
12020004 Upper Angelina
12020005 Lower Angelina
12020006 Village
12020007 Pine Island Bayou
1203 Trinity
120301 Upper Trinity
12030101 Upper West Fork Trinity
12030102 Lower West Fork Trinity
12030103 Elm Fork Trinity
12030104 Denton
12030105 Upper Trinity
12030106 East Fork Trinity
12030107 Cedar
12030108 Richland
12030109 Chambers
120302 Lower Trinity
12030201 Lower Trinity-Tehuacana
12030202 Lower Trinity-Kickapoo
12030203 Lower Trinity
1204 Galveston Bay-San Jacinto
120401 San Jacinto
12040101 West Fork San Jacinto
12040102 Spring
12040103 East Fork San Jacinto
12040104 Buffalo-San Jacinto
120402 Galveston Bay-Sabine Lake
12040201 Sabine Lake
12040202 East Galveston Bay
12040203 North Galveston Bay
12040204 West Galveston Bay
12040205 Austin-Oyster
1205 Brazos headwaters
120500 Brazos headwaters
12050001 Yellow House Draw
12050002 Blackwater Draw
12050003 North Fork Double Mountain Fork
12050004 Double Moutain Fork Brazos
12050005 Running Water Draw
12050006 White
12050007 Salt Fork Brazos
1206 Middle Brazos
120601 Middle Brazos-Clear Fork
12060101 Middle Brazos-Millers
12060102 Upper Clear Fork Brazos
12060103 Paint
12060104 Lower Clear Fork Brazos
12060105 Hubbard
120602 Middle Brazos-Bosque
12060201 Middle Brazos-Palo Pinto
12060202 Middle Brazos-Lake Whitney
12060203 Bosque
12060204 North Bosque
1207 Lower Brazos
120701 Lower Brazos
12070101 Lower Brazos-Little Brazos
12070102 Yegua
12070103 Navasota
12070104 Lower Brazos
120702 Little
12070201 Leon
12070202 Cowhouse
12070203 Lampasas
12070204 Little
12070205 San Gabriel
1208 Upper Colorado
120800 Upper Colorado
12080001 Lost Draw
12080002 Colorado headwaters
12080003 Monument-Seminole Draws
12080004 Mustang Draw
12080005 Johnson Draw
12080006 Sulphur Springs Draw
12080007 Beals
12080008 Upper Colorado
1209 Lower Colorado-San Bernard Coastal
120901 Middle Colorado-Concho
12090101 Middle Colorado-Elm
12090102 South Concho
12090103 Middle Concho
12090104 North Concho
12090105 Concho
12090106 Middle Colorado
12090107 Pecan Bayou
12090108 Jim Ned
12090109 San Saba
12090110 Brady
120902 Middle Colorado-Llano
12090201 Buchanan-Lyndon B
12090202 North Llano
12090203 South Llano
12090204 Llano
12090205 Austin-Travis Lakes
12090206 Pedernales
120903 Lower Colorado
12090301 Lower Colorado-Cummins
12090302 Lower Colorado
120904 San Bernard Coastal
12090401 San Bernard
12090402 East Matagorda Bay
1210 Central Texas Coastal
121001 Lavaca
12100101 Lavaca
12100102 Navidad
121002 Guadalupe
12100201 Upper Guadalupe
12100202 Middle Guadalupe
12100203 San Marcos
12100204 Lower Guadalupe
121003 San Antonio
12100301 Upper San Antonio
12100302 Medina
12100303 Lower San Antonio
12100304 Cibolo
121004 Central Texas Coastal
12100401 Central Matagorda Bay
12100402 West Matagorda Bay
12100403 East San Antonio Bay
12100404 West San Antonio Bay
12100405 Aransas Bay
12100406 Mission
12100407 Aransas
1211 Nueces-Southwestern Texas Coastal
121101 Nueces
12110101 Nueces headwaters
12110102 West Nueces
12110103 Upper Nueces
12110104 Turkey
12110105 Middle Nueces
12110106 Upper Frio
12110107 Hondo
12110108 Lower Frio
12110109 San Miguel
12110110 Atascosa
12110111 Lower Nueces
121102 Southwestern Texas Coastal
12110201 North Corpus Christi Bay
12110202 South Corpus Christi Bay
12110203 North Laguna Madre
12110204 San Fernando
12110205 Baffin Bay
12110206 Palo Blanco
12110207 Central Laguna Madre
12110208 South Laguna Madre
13 Rio Grande
1301 Rio Grande headwaters
130100 Rio Grande headwaters
13010001 Rio Grande headwaters
13010002 Alamosa-Trinchera
13010003 San Luis
13010004 Saguache
13010005 Conejos
1302 Rio Grande-Elephant Butte
130201 Upper Rio Grande
13020101 Upper Rio Grande
13020102 Rio Chama
130202 Rio Grande-Elephant Butte
13020201 Rio Grande-Santa Fe
13020202 Jemez
13020203 Rio Grande-Albuquerque
13020204 Rio Puerco
13020205 Arroyo Chico
13020206 North Plains
13020207 Rio San Jose
13020208 Plains of San Agustin
13020209 Rio Salado
13020210 Jornada Del Muerto
13020211 Elephant Butte Reservoir
1303 Rio Grande-Mimbres
130301 Rio Grande-Caballo
13030101 Caballo
13030102 El Paso-Las Cruces
13030103 Jornada Draw
130302 Mimbres
13030201 Playas Lake
13030202 Mimbres
1304 Rio Grande-Amistad
130401 Rio Grande-Fort Quitman
13040100 Rio Grande-Fort Quitman
130402 Rio Grande-Amistad
13040201 Cibolo-Red Light
13040202 Alamito
13040203 Black Hills-Fresno
13040204 Terlingua
13040205 Big Bend
13040206 Maravillas
13040207 Santiago Draw
13040208 Reagan-Sanderson
13040209 San Francisco
13040210 Lozier Canyon
13040211 Big Canyon
13040212 Amistad Reservoir
130403 Devils
13040301 Upper Devils
13040302 Lower Devils
13040303 Dry Devils
1305 Rio Grande closed basins
130500 Rio Grande closed basins
13050001 Western Estancia
13050002 Eastern Estancia
13050003 Tularosa Valley
13050004 Salt Basin
1306 Upper Pecos
130600 Upper Pecos
13060001 Pecos headwaters
13060002 Pintada Arroyo
13060003 Upper Pecos
13060004 Taiban
13060005 Arroyo Del Macho
13060006 Gallo Arroyo
13060007 Upper Pecos-Long Arroyo
13060008 Rio Hondo
13060009 Rio Felix
13060010 Rio Penasco
13060011 Upper Pecos-Black
1307 Lower Pecos
130700 Lower Pecos
13070001 Lower Pecos-Red Bluff Reservoir
13070002 Delaware
13070003 Toyah
13070004 Salt Draw
13070005 Barrilla Draw
13070006 Coyanosa-Hackberry Draws
13070007 Landreth-Monument Draws
13070008 Lower Pecos
13070009 Tunas
13070010 Independence
13070011 Howard Draw
1308 Rio Grande-Falcon
130800 Rio Grande-Falcon
13080001 Elm-Sycamore
13080002 San Ambrosia-Santa Isabel
13080003 International Falcon Reservoir
1309 Lower Rio Grande
130900 Lower Rio Grande
13090001 Los Olmos
13090002 Lower Rio Grande
14 Upper Colorado
1401 Colorado headwaters
140100 Colorado headwaters
14010001 Colorado headwaters
14010002 Blue
14010003 Eagle
14010004 Roaring Fork
14010005 Colorado headwaters-Plateau
14010006 Parachute-Roan
1402 Gunnison
140200 Gunnison
14020001 East-Taylor
14020002 Upper Gunnison
14020003 Tomichi
14020004 North Fork Gunnison
14020005 Lower Gunnison
14020006 Uncompahange
1403 Upper Colorado-Dolores
140300 Upper Colorado-Dolores
14030001 Westwater Canyon
14030002 Upper Dolores
14030003 San Miguel
14030004 Lower Dolores
14030005 Upper Colorado-Kane Springs
1404 Great Divide - Upper Green
140401 Upper Green
14040101 Upper Green
14040102 New Fork
14040103 Upper Green-Slate
14040104 Big Sandy
14040105 Bitter
14040106 Upper Green-Flaming Gorge Reservoir
14040107 Blacks Fork
14040108 Muddy
14040109 Vermilion
140402 Great Divide closed basin
14040200 Great Divide closed basin
1405 White-Yampa
140500 White - Yampa
14050001 Upper Yampa
14050002 Lower Yampa
14050003 Little Snake
14050004 Muddy
14050005 Upper White
14050006 Piceance-Yellow
14050007 Lower White
1406 Lower Green
140600 Lower Green
14060001 Lower Green-Diamond
14060002 Ashley-Brush
14060003 Duchesne
14060004 Strawberry
14060005 Lower Green-Desolation Canyon
14060006 Willow
14060007 Price
14060008 Lower Green
14060009 San Rafael
1407 Upper Colorado-Dirty Devil
140700 Upper Colorado-Dirty Devil
14070001 Upper Lake Powell
14070002 Muddy
14070003 Fremont
14070004 Dirty Devil
14070005 Escalante
14070006 Lower Lake Powell
14070007 Paria
1408 San Juan
140801 Upper San Juan
14080101 Upper San Juan
14080102 Piedra
14080103 Blanco Canyon
14080104 Animas
14080105 Middle San Juan
14080106 Chaco
14080107 Mancos
140802 Lower San Juan
14080201 Lower San Juan-Four Corners
14080202 Mcelmo
14080203 Montezuma
14080204 Chinle
14080205 Lower San Juan
15 Lower Colorado
1501 Lower Colorado-Lake Mead
150100 Lower Colorado-Lake Mead
15010001 Lower Colorado-Marble Canyon
15010002 Grand Canyon
15010003 Kanab
15010004 Havasu Canyon
15010005 Lake Mead
15010006 Grand Wash
15010007 Hualapai Wash
15010008 Upper Virgin
15010009 Fort Pierce Wash
15010010 Lower Virgin
15010011 White
15010012 Muddy
15010013 Meadow Valley Wash
15010014 Detrital Wash
15010015 Las Vegas Wash
1502 Little Colorado
150200 Little Colorado
15020001 Little Colorado headwaters
15020002 Upper Little Colorado
15020003 Carrizo Wash
15020004 Zuni
15020005 Silver
15020006 Upper Puerco
15020007 Lower Puerco
15020008 Middle Little Colorado
15020009 Leroux Wash
15020010 Chevelon Canyon
15020011 Cottonwood Wash
15020012 Corn-Oraibi
15020013 Polacca Wash
15020014 Jadito Wash
15020015 Canyon Diablo
15020016 Lower Little Colorado
15020017 Dinnebito Wash
15020018 Moenkopi Wash
1503 Lower Colorado
150301 Lower Colorado
15030101 Havasu-Mohave Lakes
15030102 Piute Wash
15030103 Sacramento Wash
15030104 Imperial Reservoir
15030105 Bouse Wash
15030106 Tyson Wash
15030107 Lower Colorado
15030108 Yuma Desert
150302 Bill Williams
15030201 Big Sandy
15030202 Burro
15030203 Santa Maria
15030204 Bill Williams
1504 Upper Gila
150400 Upper Gila
15040001 Upper Gila
15040002 Upper Gila-Mangas
15040003 Animas Valley
15040004 San Francisco
15040005 Upper Gila-San Carlos Reservoir
15040006 San Simon
15040007 San Carlos
1505 Middle Gila
150501 Middle Gila
15050100 Middle Gila
150502 San Pedro-Willcox
15050201 Willcox Playa
15050202 Upper San Pedro
15050203 Lower San Pedro
150503 Santa Cruz
15050301 Upper Santa Cruz
15050302 Rillito
15050303 Lower Santa Cruz
15050304 Brawley Wash
15050305 Aguirre Valley
15050306 Santa Rosa Wash
1506 Salt
150601 Salt
15060101 Black
15060102 White
15060103 Upper Salt
15060104 Carrizo
15060105 Tonto
15060106 Lower Salt
150602 Verde
15060201 Big Chino-Williamson Valley
15060202 Upper Verde
15060203 Lower Verde
1507 Lower Gila
150701 Lower Gila-Agua Fria
15070101 Lower Gila-Painted Rock Reservoir
15070102 Agua Fria
15070103 Hassayampa
15070104 Centennial Wash
150702 Lower Gila
15070201 Lower Gila
15070202 Tenmile Wash
15070203 San Cristobal Wash
1508 Sonora
150801 Rio Sonoyta
15080101 San Simon Wash
15080102 Rio Sonoyta
15080103 Tule Desert
150802 Rio De La Concepcion
15080200 Rio De La Concepcion
150803 Rio De Bavispe
15080301 Whitewater Draw
15080302 San Bernardino Valley
15080303 Cloverdale
16 Great Basin
1601 Bear
160101 Upper Bear
16010101 Upper Bear
16010102 Central Bear
160102 Lower Bear
16010201 Bear Lake
16010202 Middle Bear
16010203 Little Bear-Logan
16010204 Lower Bear-Malad
1602 Great Salt Lake
160201 Weber
16020101 Upper Weber
16020102 Lower Weber
160202 Jordan
16020201 Utah Lake
16020202 Spanish Fork
16020203 Provo
16020204 Jordan
160203 Great Salt Lake
16020301 Hamlin-Snake Valleys
16020302 Pine Valley
16020303 Tule Valley
16020304 Rush-Tooele Valleys
16020305 Skull Valley
16020306 Southern Great Salt Lake Desert
16020307 Pilot-Thousand Springs
16020308 Northern Great Salt Lake Desert
16020309 Curlew Valley
16020310 Great Salt Lake
1603 Escalante Desert-Sevier Lake
160300 Escalante Desert-Sevier Lake
16030001 Upper Sevier
16030002 East Fork Sevier
16030003 Middle Sevier
16030004 San Pitch
16030005 Lower Sevier
16030006 Escalante Desert
16030007 Beaver Bottoms-Upper Beaver
16030008 Lower Beaver
16030009 Sevier Lake
1604 Black Rock Desert-Humboldt
160401 Humboldt
16040101 Upper Humboldt
16040102 North Fork Humboldt
16040103 South Fork Humboldt
16040104 Pine
16040105 Middle Humboldt
16040106 Rock
16040107 Reese
16040108 Lower Humboldt
16040109 Little Humboldt
160402 Black Rock Desert
16040201 Upper Quinn
16040202 Lower Quinn
16040203 Smoke Creek Desert
16040204 Massacre Lake
16040205 Thousand-Virgin
1605 Central Lahontan
160501 Truckee
16050101 Lake Tahoe
16050102 Truckee
16050103 Pyramid-Winnemucca Lakes
16050104 Granite Springs Valley
160502 Carson
16050201 Upper Carson
16050202 Middle Carson
16050203 Carson Desert
160503 Walker
16050301 East Walker
16050302 West Walker
16050303 Walker
16050304 Walker Lake
1606 Central Nevada Desert Basins
160600 Central Nevada Desert Basins
16060001 Dixie Valley
16060002 Gabbs Valley
16060003 Southern Big Smoky Valley
16060004 Northern Big Smoky Valley
16060005 Diamond-Monitor Valleys
16060006 Little Smoky-Newark Valleys
16060007 Long-Ruby Valleys
16060008 Spring-Steptoe Valleys
16060009 Dry Lake Valley
16060010 Fish Lake-Soda Spring Valleys
16060011 Ralston-Stone Cabin Valleys
16060012 Hot Creek-Railroad Valleys
16060013 Cactus-Sarcobatus Flats
16060014 Sand Spring-Tikaboo Valleys
16060015 Ivanpah-Pahrump Valleys
17 Pacific Northwest
1701 Kootenai-Pend Oreille-Spokane
170101 Kootenai
17010101 Upper Kootenai
17010102 Fisher
17010103 Yaak
17010104 Lower Kootenai
17010105 Moyie
170102 Pend Oreille
17010201 Upper Clark Fork
17010202 Flint-Rock
17010203 Blackfoot
17010204 Middle Clark Fork
17010205 Bitterroot
17010206 North Fork Flathead
17010207 Middle Fork Flathead
17010208 Flathead Lake
17010209 South Fork Flathead
17010210 Stillwater
17010211 Swan
17010212 Lower Flathead
17010213 Lower Clark Fork
17010214 Pend Oreille Lake
17010215 Priest
17010216 Pend Oreille
170103 Spokane
17010301 Upper Coeur D'alene
17010302 South Fork Coeur D'alene
17010303 Coeur D'alene Lake
17010304 St. Joe
17010305 Upper Spokane
17010306 Hangman
17010307 Lower Spokane
17010308 Little Spokane
1702 Upper Columbia
170200 Upper Columbia
17020001 Franklin D. Roosevelt Lake
17020002 Kettle
17020003 Colville
17020004 Sanpoil
17020005 Chief Joseph
17020006 Okanogan
17020007 Similkameen
17020008 Methow
17020009 Lake Chelan
17020010 Upper Columbia-Entiat
17020011 Wenatchee
17020012 Moses Coulee
17020013 Upper Crab
17020014 Banks Lake
17020015 Lower Crab
17020016 Upper Columbia-Priest Rapids
1703 Yakima
170300 Yakima
17030001 Upper Yakima
17030002 Naches
17030003 Lower Yakima, Washington
1704 Upper Snake
170401 Snake headwaters
17040101 Snake headwaters
17040102 Gros Ventre
17040103 Greys-Hobock
17040104 Palisades
17040105 Salt
170402 Upper Snake
17040201 Idaho Falls
17040202 Upper Henrys
17040203 Lower Henrys
17040204 Teton
17040205 Willow
17040206 American Falls
17040207 Blackfoot
17040208 Portneuf
17040209 Lake Walcott
17040210 Raft
17040211 Goose
17040212 Upper Snake-Rock
17040213 Salmon Falls
17040214 Beaver-Camas
17040215 Medicine Lodge
17040216 Birch
17040217 Little Lost
17040218 Big Lost
17040219 Big Wood
17040220 Camas
17040221 Little Wood
1705 Middle Snake
170501 Middle Snake-Boise
17050101 C. J. Idaho
17050102 Bruneau
17050103 Middle Snake-Succor
17050104 Upper Owyhee
17050105 South Fork Owyhee
17050106 East Little Owyhee. Nevada,
17050107 Middle Owyhee
17050108 Jordan
17050109 Crooked-Rattlesnake
17050110 Lower Owyhee
17050111 North and Middle Forks Boise
17050112 Boise-Mores
17050113 South Fork Boise
17050114 Lower Boise
17050115 Middle Snake-Payette
17050116 Upper Malheur
17050117 Lower Malheur
17050118 Bully
17050119 Willow
17050120 South Fork Payette
17050121 Middle Fork Payette
17050122 Payette
17050123 North Fork Payette
17050124 Weiser
170502 Middle Snake-Powder
17050201 Brownlee Reservoir
17050202 Burnt
17050203 Powder
1706 Lower Snake
170601 Lower Snake
17060101 Hells Canyon
17060102 Imnaha
17060103 Lower Snake-Asotin
17060104 Upper Grande Ronde
17060105 Wallowa
17060106 Lower Grande Ronde
17060107 Lower Snake-Tucannon
17060108 Palouse
17060109 Rock
17060110 Lower Snake
170602 Salmon
17060201 Upper Salmon
17060202 Pahsimeroi
17060203 Middle Salmon-Panther
17060204 Lemhi
17060205 Upper Middle Fork Salmon
17060206 Lower Middle Fork Salmon
17060207 Middle Salmon-Chamberlain
17060208 South Fork Salmon
17060209 Lower Salmon
17060210 Little Salmon
170603 Clearwater
17060301 Upper Selway
17060302 Lower Selway
17060303 Lochsa
17060304 Middle Fork Clearwater
17060305 South Fork Clearwater
17060306 Clearwater
17060307 Upper North Fork Clearwater
17060308 Lower North Fork Clearwater
1707 Middle Columbia
170701 Middle Columbia
17070101 Middle Columbia-Lake Wallula
17070102 Walla Walla
17070103 Umatilla
17070104 Willow
17070105 Middle Columbia-Hood
17070106 Klickitat
170702 John Day
17070201 Upper John Day
17070202 North Fork John Day
17070203 Middle Fork John Day
17070204 Lower John Day
170703 Deschutes
17070301 Upper Deschutes
17070302 Little Deschutes
17070303 Beaver-South Fork
17070304 Upper Crooked
17070305 Lower Crooked
17070306 Lower Deschutes
17070307 Trout
1708 Lower Columbia
170800 Lower Columbia
17080001 Lower Columbia-Sandy
17080002 Lewis
17080003 Lower Columbia-Clatskanie
17080004 Upper Cowlitz
17080005 Lower Cowlitz
17080006 Lower Columbia
1709 Willamette
170900 Willamette
17090001 Middle Fork Willamette
17090002 Coast Fork Willamette
17090003 Upper Willamette
17090004 Mckenzie
17090005 North Santiam
17090006 South Santiam
17090007 Middle Willamette
17090008 Yamhill
17090009 Molalla-Pudding
17090010 Tualatin
17090011 Clackamas
17090012 Lower Willamette
1710 Oregon-Washington Coastal
171001 Washington Coastal
17100101 Hoh-Quillayute
17100102 Queets-Quinault
17100103 Upper Chehalis
17100104 Lower Chehalis
17100105 Grays Harbor
17100106 Willapa Bay
171002 Northern Oregon Coastal
17100201 Necanicum
17100202 Nehalem
17100203 Wilson-Trask-Nestucca
17100204 Siletz-Yaquina
17100205 Alsea
17100206 Siuslaw
17100207 Siltcoos
171003 Southern Oregon Coastal
17100301 North Umpqua
17100302 South Umpqua
17100303 Umpqua
17100304 Coos
17100305 Coquille
17100306 Sixes
17100307 Upper Rogue
17100308 Middle Rogue
17100309 Applegate
17100310 Lower Rogue
17100311 Illinois
17100312 Chetco
1711 Puget Sound
171100 Puget Sound
17110001 Fraser
17110002 Strait of Georgia
17110003 San Juan Islands
17110004 Nooksack
17110005 Upper Skagit
17110006 Sauk
17110007 Lower Skagit
17110008 Stillaguamish
17110009 Skykomish
17110010 Snoqualmie
17110011 Snohomish
17110012 Lake Washington
17110013 Duwamish
17110014 Puyallup
17110015 Nisqually
17110016 Deschutes
17110017 Skokomish
17110018 Hood Canal
17110019 Puget Sound
17110020 Dungeness-Elwha
17110021 Crescent-Hoko
1712 Oregon closed basins
171200 Oregon closed basins
17120001 Harney-Malheur Lakes
17120002 Silvies
17120003 Donner Und Blitzen
17120004 Silver
17120005 Summer Lake
17120006 Lake Abert
17120007 Warner Lakes
17120008 Guano
17120009 Alvord Lake
18 California
1801 Klamath-Northern California Coastal
180101 Northern California Coastal
18010101 Smith
18010102 Mad-Redwood
18010103 Upper Eel
18010104 Middle Fork Eel
18010105 Lower Eel
18010106 South Fork Eel
18010107 Mattole
18010108 Big-Navarro-Garcia
18010109 Gualala-Salmon
18010110 Russian
18010111 Bodega Bay
180102 Klamath
18010201 Williamson
18010202 Sprague
18010203 Upper Klamath Lake
18010204 Lost
18010205 Butte
18010206 Upper Klamath
18010207 Shasta
18010208 Scott
18010209 Lower Klamath
18010210 Salmon
18010211 Trinity
18010212 South Fork Trinity
1802 Sacramento
180200 Upper Sacramento
18020001 Goose Lake
18020002 Upper Pit
18020003 Lower Pit
18020004 Mccloud
18020005 Sacramento headwaters
180201 Lower Sacramento
18020101 Sacramento-Lower Cow-Lower Clear
18020102 Lower Cottonwood
18020103 Sacramento-Lower Thomes
18020104 Sacramento-Stone Corral
18020105 Lower Butte
18020106 Lower Feather
18020107 Lower Yuba
18020108 Lower Bear
18020109 Lower Sacramento
18020110 Lower Cache
18020111 Lower American
18020112 Sacramento-Upper Clear
18020113 Cottonwood headwaters
18020114 Upper Elder-Upper Thomes
18020115 Upper Stony
18020116 Upper Cache
18020117 Upper Putah
18020118 Upper Cow-Battle
18020119 Mill-Big Chico
18020120 Upper Butte
18020121 North Fork Feather
18020122 East Branch North Fork Feather
18020123 Middle Fork Feather
18020124 Honcut headwaters
18020125 Upper Yuba
18020126 Upper Bear
18020127 Upper Coon-Upper Auburn
18020128 North Fork American
18020129 South Fork American
1803 Tulare-Buena Vista Lakes
180300 Tulare-Buena Vista Lakes
18030001 Upper Kern
18030002 South Fork Kern
18030003 Middle Kern-Upper Tehachapi-
18030004 Upper Poso
18030005 Upper Deer-Upper White
18030006 Upper Tule
18030007 Upper Kaweah
18030008 Mill
18030009 Upper Dry
18030010 Upper King
18030011 Upper Los Gatos-Avenal
18030012 Tulare-Buena Vista Lakes
1804 San Joaquin
180400 San Joaquin
18040001 Middle San Joaquin-Lower
18040002 Middle San Joaquin-Lower
18040003 San Joaquin Delta
18040004 Lower Calaveras-Mormon Slough
18040005 Lower Cosumnes-Lower Mokelumne
18040006 Upper San Joaquin
18040007 Upper Chowchilla-Upper Fresno
18040008 Upper Merced
18040009 Upper Tuolumne
18040010 Upper Stanislaus
18040011 Upper Calaveras
18040012 Upper Mokelumne
18040013 Upper Cosumnes
18040014 Panoche-San Luis Reservoir
1805 San Francisco Bay
180500 San Francisco Bay
18050001 Suisun Bay
18050002 San Pablo Bay
18050003 Coyote
18050004 San Francisco Bay
18050005 Tomales-Drake Bays
18050006 San Francisco Coastal South
1806 Central California Coastal
180600 Central California Coastal
18060001 San Lorenzo-Soquel
18060002 Pajaro
18060003 Carrizo Plain
18060004 Estrella
18060005 Salinas
18060006 Central Coastal
18060007 Cuyama
18060008 Santa Maria
18060009 San Antonio
18060010 Santa Ynez
18060011 Alisal-Elkhorn Sloughs
18060012 Carmel
18060013 Santa Barbara Coastal
18060014 Santa Barbara Channel Islands
1807 Southern California Coastal
180701 Ventura-San Gabriel Coastal
18070101 Ventura
18070102 Santa Clara
18070103 Calleguas
18070104 Santa Monica Bay
18070105 Los Angeles
18070106 San Gabriel
18070107 San Pedro Channel Islands
180702 Santa Ana
18070201 Seal Beach
18070202 San Jacinto
18070203 Santa Ana
18070204 Newport Bay
180703 Laguna-San Diego Coastal
18070301 Aliso-San Onofre
18070302 Santa Margarita
18070303 San Luis Rey-Escondido
18070304 San Diego
18070305 Cottonwood-Tijuana
1808 North Lahontan
180800 North Lahontan
18080001 Surprise Valley
18080002 Madeline Plains
18080003 Honey-Eagle Lakes
1809 Northern Mojave-Mono Lake
180901 Mono-Owens Lakes
18090101 Mono Lake
18090102 Crowley Lake
18090103 Owens Lake
180902 Northern Mojave
18090201 Eureka-Saline Valleys
18090202 Upper Amargosa
18090203 Death Valley-Lower Amargosa
18090204 Panamint Valley
18090205 Indian Wells-Searles Valleys
18090206 Antelope-Fremont Valleys
18090207 Coyote-Cuddeback Lakes
18090208 Mojave
1810 Southern Mojave-Salton Sea
181001 Southern Mojave
18100100 Southern Mojave
181002 Salton Sea
18100200 Salton Sea
19 Alaska
1901 Southeast
190101 Southern Southeast
19010101 Southeast Mainland
19010102 Ketchikan
19010103 Prince of Wales
190102 Central Southeast
19010201 Mainland
19010202 Kuiu-Kupreanof-Mitkof-Etolin-Zarembo-Wrangell Islands
19010203 Baranof-Chichagof Islands
19010204 Admiralty Island
190103 Northern Southeast
19010301 Lynn Canal
19010302 Glacier Bay
19010303 Chilkat-Skagway Rivers
190104 Gulf of Alaska
19010401 Yakutat Bay
19010402 Bering Glacier
1902 Southcentral
190201 Copper River
19020101 Upper Copper River
19020102 Middle Copper River
19020103 Chitina River
19020104 Lower Copper River
190202 Prince William Sound
19020201 Eastern Prince William Sound
19020202 Western Prince William Sound
190203 Kenai Peninsula
19020301 Lower Kenai Peninsula
19020302 Upper Kenai Peninsula
190204 Knik Arm
19020401 Anchorage
19020402 Matansuka
190205 Susitna River
19020501 Upper Susitna River
19020502 Chulitna River
19020503 Talkeetna River
19020504 Yentna River
19020505 Lower Susitna River
190206 Western Cook Inlet
19020601 Redoubt-Trading Bays
19020602 Tuxdeni-Kamishak Bays
190207 Kodiak-Shelikof
19020701 Kodiak-Afognak Islands
19020702 Shelikof Straight
1903 Southwest
190301 Aleutian Islands
19030101 Cold Bay
19030102 Fox Islands
19030103 Western Aleutian
19030104 Pribilof Islands
190302 Kvichak-Port Heiden
19030201 Port Heiden
19030202 Ugashik Bay
19030203 Egegik Bay
19030204 Naknek
19030205 Lake Clark
19030206 Lake Iliamna
190303 Nushagak River
19030301 Upper Nushagak River
19030302 Mulchatna River
19030303 Lower Nushagak River
19030304 Wood River
19030305 Togiak
190304 Upper Kuskokwim River
19030401 North Fork Kuskokwim River
19030402 Farewll Lake
19030403 Takotna River
19030404 Holitna River
19030405 Stony River
190305 Lower Kuskokwim River
19030501 Aniak
19030502 Kuskokwim Delta
19030503 Nunavak-St. Matthew Islands
1904 Yukon
190401 Canada
19040101 White River
19040102 Ladue River
19040103 Sixtymile River
19040104 Fortymile River
190402 Porcupine River
19040201 Old Crow River
19040202 Coleen River
19040203 Sheenjek River
19040204 Black River
19040205 Porcupine Flats
190403 Chandalar-Christian Rivers
19040301 Middle Fork-North Fork Chandalar Rivers
19040302 East Fork Chandalar River
19040303 Christian River
19040304 Lower Chandalar River
190404 Upper Yukon River
19040401 Eagle To Circle
19040402 Birch-Beaver Creeks
19040403 Yukon Flats
19040404 Ramparts
190405 Tanana River
19040501 Nebesna-Chisana Rivers
19040502 Tok
19040503 Healy Lake
19040504 Delta River
19040505 Salcha River
19040506 Chena River
19040507 Tanana River
19040508 Nenana River
19040509 Tolovana River
19040510 Kantishna River
19040511 Lower Tanana River
190406 Koyukuk River
19040601 Upper Koyukuk River
19040602 South Fork Koyukuk River
19040603 Alatna River
19040604 Kanuti River
19040605 Allakaket River
19040606 Huslia River
19040607 Dulbi River
19040608 Koyukuk Flats
19040609 Kateel River
190407 Central Yukon
19040701 Tozitna River
19040702 Nowitna River
19040703 Melozitna River
19040704 Ramparts to Ruby
19040705 Galena
190408 Lower Yukon
19040801 Anvik River
19040802 Upper Innoko River
19040803 Lower Innoko River
19040804 Anvik to Pilot Station
19040805 Yukon Delta
1905 Northwest
190501 Norton Sound
19050101 St. Lawrence Island
19050102 Unalakleet
19050103 Norton Bay
19050104 Nome
19050105 Imuruk Basin
190502 Northern Seward Peninsula
19050201 Shishmaref
19050202 Goodhope-Spafarief Bay
19050203 Buckland River
190503 Kobuk-Selawik Rivers
19050301 Selawik Lake
19050302 Upper Kobuk River
19050303 Middle Kobuk River
19050304 Lower Kobuk River
190504 Noatak River-Lisburne Peninsula
19050401 Upper Noatak River
19050402 Middle Noatak River
19050403 Lower Noatak River
19050404 Wulik-Kivalina Rivers
19050405 Lisburne Peninsula
1906 Arctic
190601 Western Arctic
19060101 Kukpowruk River
19060102 Kokolik River
19060103 Utukok River
190602 Barrow
19060201 Kuk River
19060202 Northwest Coast
19060203 Meade River
19060204 Ikpikpuk River
19060205 Harrison Bay
190603 Colville River
19060301 Upper Colville River
19060302 Killik River
19060303 Chandler-Anaktuvuk Rivers
19060304 Lower Colville River
190604 Prudhoe Bay
19060401 Kuparuk River
19060402 Sagavanirktok River
19060403 Mikkelson Bay
190605 Eastern Arctic
19060501 Canning River
19060502 Camden Bay
19060503 Beaufort Lagoon
20 Hawaii
2001 Hawaii
200100 Hawaii
20010000 Hawaii
2002 Maui
200200 Maui
20020000 Maui
2003 Kahoolawe
200300 Kahoolawe
20030000 Kahoolawe
2004 Lanai
200400 Lanai
20040000 Lanai
2005 Molokai
200500 Molokai
20050000 Molokai
2006 Oahu
200600 Oahu
20060000 Oahu
2007 Kauai
200700 Kauai
20070000 Kauai
2008 Niihau
200800 Niihau
20080000 Niihau
2009 Northwestern Hawaiian Islands
200900 Northwestern Hawaiian Islands
20090000 Northwestern Hawaiian Islands
21 Caribbean
2101 Puerto Rico
210100 Puerto Rico
21010001 Interior Puerto Rico
21010002 Cibuco-Guajataca
21010003 Culebrinas-Guanajibo
21010004 Southern Puerto Rico
21010005 Eastern Puerto Rico
21010006 Puerto Rican Islands
2102 Virgin Islands
210200 Virgin Islands
21020001 St. John-St. Thomas
21020002 St. Croix
2103 Caribbean Outlying Areas
210300 Caribbean Outlying Areas
21030001 Canal Zone
21030002 Navassa
21030003 Roncador-Serrana
</pre>
</td>
</tr>
</tbody>
</table>
<div align="center" class="bottombox"><span class="info"></span></div>
<!--#include virtual="/inc/footer_water.html" -->
<!--#include virtual="/inc/footer.html" -->
</body>
</html>"""
|
content = 'huc\tbasin\n<!--10n\t60s-->\n01\tNew England\n0101\tSt. John\n010100\tSt. John\n01010001\tUpper St. John\n01010002\tAllagash\n01010003\tFish\n01010004\tAroostook\n01010005\tMeduxnekeag\n0102\tPenobscot\n010200\tPenobscot\n01020001\tWest Branch Penobscot\n01020002\tEast Branch Penobscot\n01020003\tMattawamkeag\n01020004\tPiscataquis\n01020005\tLower Penobscot\n0103\tKennebec\n010300\tKennebec\n01030001\tUpper Kennebec\n01030002\tDead\n01030003\tLower Kennebec\n0104\tAndroscoggin\n010400\tAndroscoggin\n01040001\tUpper Androscoggin\n01040002\tLower Androscoggin\n0105\tMaine Coastal\n010500\tMaine Coastal\n01050001\tSt. Croix\n01050002\tMaine Coastal\n01050003\tSt. George-Sheepscot\n0106\tSaco\n010600\tSaco\n01060001\tPresumpscot\n01060002\tSaco\n01060003\tPiscataqua-Salmon Falls\n0107\tMerrimack\n010700\tMerrimack\n01070001\tPemigewasset\n01070002\tMerrimack\n01070003\tContoocook\n01070004\tNashua\n01070005\tConcord\n0108\tConnecticut\n010801\tUpper Connecticut\n01080101\tUpper Connecticut\n01080102\tPassumpsic\n01080103\tWaits\n01080104\tUpper Connecticut-Mascoma\n01080105\tWhite\n01080106\tBlack-Ottauquechee\n01080107\tWest\n010802\tLower Connecticut\n01080201\tMiddle Connecticut\n01080202\tMiller\n01080203\tDeerfield\n01080204\tChicopee\n01080205\tLower Connecticut\n01080206\tWestfield\n01080207\tFarmington\n0109\tMassachusetts-Rhode Island Coastal\n010900\tMassachusetts-Rhode Island Coastal\n01090001\tCharles\n01090002\tCape Cod\n01090003\tBlackstone\n01090004\tNarragansett\n01090005\tPawcatuck-Wood\n0110\tConnecticut Coastal\n011000\tConnecticut Coastal\n01100001\tQuinebaug\n01100002\tShetucket\n01100003\tThames\n01100004\tQuinnipiac\n01100005\tHousatonic\n01100006\tSaugatuck\n01100007\tLong Island Sound\n0111\tSt. Francois\n011100\tSt. Francois\n01110000\tSt. Francois\n02\tMid Atlantic\n0201\tRichelieu\n020100\tRichelieu\n02010001\tLake George\n02010002\tOtter\n02010003\tWinooski\n02010004\tAusable\n02010005\tLamoille\n02010006\tGreat Chazy-Saranac\n02010007\tMissisquoi\n0202\tUpper Hudson\n020200\tUpper Hudson\n02020001\tUpper Hudson\n02020002\tSacandaga\n02020003\tHudson-Hoosic\n02020004\tMohawk\n02020005\tSchoharie\n02020006\tMiddle Hudson\n02020007\tRondout\n02020008\tHudson-Wappinger\n0203\tLower Hudson-Long Island\n020301\tLower Hudson\n02030101\tLower Hudson\n02030102\tBronx\n02030103\tHackensack-Passaic\n02030104\tSandy Hook-Staten Island\n02030105\tRaritan\n020302\tLong Island\n02030201\tNorthern Long Island\n02030202\tSouthern Long Island\n0204\tDelaware\n020401\tUpper Delaware\n02040101\tUpper Delaware\n02040102\tEast Branch Delaware\n02040103\tLackawaxen\n02040104\tMiddle Delaware-Mongaup-Brodhead\n02040105\tMiddle Delaware-Musconetcong\n02040106\tLehigh\n020402\tLower Delaware\n02040201\tCrosswicks-Neshaminy\n02040202\tLower Delaware\n02040203\tSchuylkill\n02040204\tDelaware Bay\n02040205\tBrandywine-Christina\n02040206\tCohansey-Maurice\n02040207\tBroadkill-Smyrna\n020403\tNew Jersey Coastal\n02040301\tMullica-Toms\n02040302\tGreat Egg Harbor\n0205\tSusquehanna\n020501\tUpper Susquehanna\n02050101\tUpper Susquehanna\n02050102\tChenango\n02050103\tOwego-Wappasening\n02050104\tTioga\n02050105\tChemung\n02050106\tUpper Susquehanna-Tunkhannock\n02050107\tUpper Susquehanna-Lackawanna\n020502\tWest Branch Susquehanna\n02050201\tUpper West Branch Susquehanna\n02050202\tSinnemahoning\n02050203\tMiddle West Branch Susquehanna\n02050204\tBald Eagle\n02050205\tPine\n02050206\tLower West Branch Susquehanna\n020503\tLower Susquehanna\n02050301\tLower Susquehanna-Penns\n02050302\tUpper Juniata\n02050303\tRaystown\n02050304\tLower Juniata\n02050305\tLower Susquehanna-Swatara\n02050306\tLower Susquehanna\n0206\tUpper Chesapeake\n020600\tUpper Chesapeake\n02060001\tUpper Chesapeake Bay\n02060002\tChester-Sassafras\n02060003\tGunpowder-Patapsco\n02060004\tSevern\n02060005\tChoptank\n02060006\tPatuxent\n02060007\tBlackwater-Wicomico\n02060008\tNanticoke\n02060009\tPocomoke\n02060010\tChincoteague\n0207\tPotomac\n020700\tPotomac\n02070001\tSouth Branch Potomac\n02070002\tNorth Branch Potomac\n02070003\tCacapon-Town\n02070004\tConococheague-Opequon\n02070005\tSouth Fork Shenandoah\n02070006\tNorth Fork Shenandoah\n02070007\tShenandoah\n02070008\tMiddle Potomac-Catoctin\n02070009\tMonocacy\n02070010\tMiddle Potomac-Anacostia-Occoquan\n02070011\tLower Potomac\n0208\tLower Chesapeake\n020801\tLower Chesapeake\n02080101\tLower Chesapeake Bay\n02080102\tGreat Wicomico-Piankatank\n02080103\tRapidan-Upper Rappahannock\n02080104\tLower Rappahannock\n02080105\tMattaponi\n02080106\tPamunkey\n02080107\tYork\n02080108\tLynnhaven-Poquoson\n02080109\tWestern Lower Delmarva\n02080110\tEastern Lower Delmarva\n020802\tJames\n02080201\tUpper James\n02080202\tMaury\n02080203\tMiddle James-Buffalo\n02080204\tRivanna\n02080205\tMiddle James-Willis\n02080206\tLower James\n02080207\tAppomattox\n02080208\tHampton Roads\n03\tSouth Atlantic-Gulf\n0301\tChowan-Roanoke\n030101\tRoanoke\n03010101\tUpper Roanoke\n03010102\tMiddle Roanoke\n03010103\tUpper Dan\n03010104\tLower Dan\n03010105\tBanister\n03010106\tRoanoke Rapids\n03010107\tLower Roanoke\n030102\tAlbemarle-Chowan\n03010201\tNottoway\n03010202\tBlackwater\n03010203\tChowan\n03010204\tMeherrin\n03010205\tAlbemarle\n0302\tNeuse-Pamlico\n030201\tPamlico\n03020101\tUpper Tar\n03020102\tFishing\n03020103\tLower Tar\n03020104\tPamlico\n03020105\tPamlico Sound\n03020106\tBogue-Core Sounds\n030202\tNeuse\n03020201\tUpper Neuse\n03020202\tMiddle Neuse\n03020203\tContentnea\n03020204\tLower Neuse\n0303\tCape Fear\n030300\tCape Fear\n03030001\tNew\n03030002\tHaw\n03030003\tDeep\n03030004\tUpper Cape Fear\n03030005\tLower Cape Fear\n03030006\tBlack\n03030007\tNortheast Cape Fear\n0304\tPee Dee\n030401\tUpper Pee Dee\n03040101\tUpper Yadkin\n03040102\tSouth Yadkin\n03040103\tLower Yadkin\n03040104\tUpper Pee Dee\n03040105\tRocky\n030402\tLower Pee Dee\n03040201\tLower Pee Dee\n03040202\tLynches\n03040203\tLumber\n03040204\tLittle Pee Dee\n03040205\tBlack\n03040206\tWaccamaw\n03040207\tCarolina Coastal-Sampit\n0305\tEdisto-Santee\n030501\tSantee\n03050101\tUpper Catawba\n03050102\tSouth Fork Catawba\n03050103\tLower Catawba\n03050104\tWateree\n03050105\tUpper Broad\n03050106\tLower Broad\n03050107\tTyger\n03050108\tEnoree\n03050109\tSaluda\n03050110\tCongaree\n03050111\tLake Marion\n03050112\tSantee\n030502\tEdisto-South Carolina Coastal\n03050201\tCooper\n03050202\tSouth Carolina Coastal\n03050203\tNorth Fork Edisto\n03050204\tSouth Fork Edisto\n03050205\tEdisto\n03050206\tFour Hole Swamp\n03050207\tSalkehatchie\n03050208\tBroad-St. Helena\n0306\tOgeechee-Savannah\n030601\tSavannah\n03060101\tSeneca\n03060102\tTugaloo\n03060103\tUpper Savannah\n03060104\tBroad\n03060105\tLittle\n03060106\tMiddle Savannah\n03060107\tStevens\n03060108\tBrier\n03060109\tLower Savannah\n030602\tOgeechee\n03060201\tUpper Ogeechee\n03060202\tLower Ogeechee\n03060203\tCanoochee\n03060204\tOgeechee Coastal\n0307\tAltamaha - St. Marys\n030701\tAltamaha\n03070101\tUpper Oconee\n03070102\tLower Oconee\n03070103\tUpper Ocmulgee\n03070104\tLower Ocmulgee\n03070105\tLittle Ocmulgee\n03070106\tAltamaha\n03070107\tOhoopee\n030702\tSt. Marys - Satilla\n03070201\tSatilla\n03070202\tLittle Satilla\n03070203\tCumberland-St. Simons\n03070204\tSt. Marys\n03070205\tNassau\n0308\tSt. Johns\n030801\tSt. Johns\n03080101\tUpper St. Johns\n03080102\tOklawaha\n03080103\tLower St. Johns\n030802\tEast Florida Coastal\n03080201\tDaytona - St. Augustine\n03080202\tCape Canaveral\n03080203\tVero Beach\n0309\tSouthern Florida\n030901\tKissimmee\n03090101\tKissimmee\n03090102\tNorthern Okeechobee Inflow\n03090103\tWestern Okeechobee Inflow\n030902\tSouthern Florida\n03090201\tLake Okeechobee\n03090202\tEverglades\n03090203\tFlorida Bay-Florida Keys\n03090204\tBig Cypress Swamp\n03090205\tCaloosahatchee\n0310\tPeace-Tampa Bay\n031001\tPeace\n03100101\tPeace\n03100102\tMyakka\n03100103\tCharlotte Harbor\n031002\tTampa Bay\n03100201\tSarasota Bay\n03100202\tManatee\n03100203\tLittle Manatee\n03100204\tAlafia\n03100205\tHillsborough\n03100206\tTampa Bay\n03100207\tCrystal-Pithlachascotee\n03100208\tWithlacoochee\n0311\tSuwannee\n031101\tAucilla-Waccasassa\n03110101\tWaccasassa\n03110102\tEconfina-Steinhatchee\n03110103\tAucilla\n031102\tSuwannee\n03110201\tUpper Suwannee\n03110202\tAlapaha\n03110203\twithlacoochee\n03110204\tLittle\n03110205\tLower Suwannee\n03110206\tSanta Fe\n0312\tOchlockonee\n031200\tOchlockonee. Georgia\n03120001\tApalachee Bay-St. Marks\n03120002\tUpper Ochlockonee\n03120003\tLower Ochlockonee\n0313\tApalachicola\n031300\tApalachicola\n03130001\tUpper Chattahoochee\n03130002\tMiddle Chattahoochee-Lake Harding\n03130003\tMiddle Chattahoochee-Walter F. George Reservoir\n03130004\tLower Chattahoochee\n03130005\tUpper Flint\n03130006\tMiddle Flint\n03130007\tKinchafoonee-Muckalee\n03130008\tLower Flint\n03130009\tIchawaynochaway\n03130010\tSpring\n03130011\tApalachicola\n03130012\tChipola\n03130013\tNew\n03130014\tApalachicola Bay\n0314\tChoctawhatchee - Escambia\n031401\tFlorida Panhandle Coastal\n03140101\tSt. Andrew-St. Joseph Bays\n03140102\tChoctawhatchee Bay\n03140103\tYellow\n03140104\tBlackwater\n03140105\tPensacola Bay\n03140106\tPerdido\n03140107\tPerdido Bay\n031402\tChoctawhatchee\n03140201\tUpper Choctawhatchee\n03140202\tPea\n03140203\tLower Choctawhatchee\n031403\tEscambia\n03140301\tUpper Conecuh\n03140302\tPatsaliga\n03140303\tSepulga\n03140304\tLower Conecuh\n03140305\tEscambia\n0315\tAlabama\n031501\tCoosa-Tallapoosa\n03150101\tConasauga\n03150102\tCoosawattee\n03150103\tOostanaula\n03150104\tEtowah\n03150105\tUpper Coosa\n03150106\tMiddle Coosa\n03150107\tLower Coosa\n03150108\tUpper Tallapoosa\n03150109\tMiddle Tallapoosa\n03150110\tLower Tallapoosa\n031502\tAlabama\n03150201\tUpper Alabama\n03150202\tCahaba\n03150203\tMiddle Alabama\n03150204\tLower Alabama\n0316\tMobile - Tombigbee\n031601\tBlack Warrior - Tombigbee\n03160101\tUpper Tombigbee\n03160102\tTown\n03160103\tButtahatchee\n03160104\tTibbee\n03160105\tLuxapallila\n03160106\tMiddle Tombigbee-Lubbub\n03160107\tSipsey\n03160108\tNoxubee\n03160109\tMulberry\n03160110\tSipsey Fork\n03160111\tLocust\n03160112\tUpper Black Warrior\n03160113\tLower Black Warrior\n031602\tMobile Bay- Tombigbee\n03160201\tMiddle Tombigbee-Chickasaw\n03160202\tSucarnoochee\n03160203\tLower Tambigbee\n03160204\tMobile - Tensaw\n03160205\tMobile Bay\n0317\tPascagoula\n031700\tPascagoula. Mississippi\n03170001\tChunky-Okatibbee\n03170002\tUpper Chickasawhay\n03170003\tLower Chickasawhay\n03170004\tUpper Leaf\n03170005\tLower Leaf\n03170006\tPascagoula\n03170007\tBlack\n03170008\tEscatawpa\n03170009\tMississippi Coastal\n0318\tPearl\n031800\tPearl\n03180001\tUpper Pearl\n03180002\tMiddle Pearl-Strong\n03180003\tMiddle Pearl-Silver\n03180004\tLower Pearl. Mississippi\n03180005\tBogue Chitto\n04\tGreat Lakes\n0401\tWestern Lake Superior\n040101\tNorthwestern Lake Superior\n04010101\tBaptism-Brule\n04010102\tBeaver-Lester\n040102\tSt. Louis\n04010201\tSt. Louis\n04010202\tCloquet\n040103\tSouthwestern Lake Superior\n04010301\tBeartrap-Nemadji\n04010302\tBad-Montreal\n0402\tSouthern Lake Superior-Lake Superior\n040201\tSouthcentral Lake Superior\n04020101\tBlack-Presque Isle\n04020102\tOntonagon\n04020103\tKeweenaw Peninsula\n04020104\tSturgeon\n04020105\tDead-Kelsey\n040202\tSoutheastern Lake Superior\n04020201\tBetsy-Chocolay\n04020202\tTahquamenon\n04020203\tWaiska\n040203\tLake Superior\n04020300\tLake Superior\n0403\tNorthwestern Lake Michigan\n040301\tNorthwestern Lake Michigan\n04030101\tManitowoc-Sheboygan\n04030102\tDoor-Kewaunee\n04030103\tDuck-Pensaukee\n04030104\tOconto\n04030105\tPeshtigo\n04030106\tBrule\n04030107\tMichigamme\n04030108\tMenominee\n04030109\tCedar-Ford\n04030110\tEscanaba\n04030111\tTacoosh-Whitefish\n04030112\tFishdam-Sturgeon\n040302\tFox\n04030201\tUpper Fox\n04030202\tWolf\n04030203\tLake Winnebago\n04030204\tLower Fox\n0404\tSouthwestern Lake Michigan\n040400\tSouthwestern Lake Michigan\n04040001\tLittle Calumet-Galien\n04040002\tPike-Root\n04040003\tMilwaukee\n0405\tSoutheastern Lake Michigan\n040500\tSoutheastern Lake Michigan\n04050001\tSt. Joseph\n04050002\tBlack-Macatawa\n04050003\tKalamazoo\n04050004\tUpper Grand\n04050005\tMaple\n04050006\tLower Grand\n04050007\tThornapple\n0406\tNortheastern Lake Michigan-Lake Michigan\n040601\tNortheastern Lake Michigan\n04060101\tPere Marquette-White\n04060102\tMuskegon\n04060103\tManistee\n04060104\tBetsie-Platte\n04060105\tBoardman-Charlevoix\n04060106\tManistique\n04060107\tBrevoort-Millecoquins\n040602\tLake Michigan\n04060200\tLake Michigan\n0407\tNorthwestern Lake Huron\n040700\tNorthwestern Lake Huron\n04070001\tSt. Marys\n04070002\tCarp-Pine\n04070003\tLone Lake-Ocqueoc\n04070004\tCheboygan\n04070005\tBlack\n04070006\tThunder Bay\n04070007\tAu Sable\n0408\tSouthwestern Lake Huron-Lake Huron\n040801\tSouthwestern Lake Huron\n04080101\tAu Gres-Rifle\n04080102\tKawkawlin-Pine\n04080103\tPigeon-Wiscoggin\n04080104\tBirch-Willow\n040802\tSaginaw\n04080201\tTittabawassee\n04080202\tPine\n04080203\tShiawassee\n04080204\tFlint\n04080205\tCass\n04080206\tSaginaw\n040803\tLake Huron\n04080300\tLake Huron\n0409\tSt. Clair-Detroit\n040900\tSt. Clair-Detroit\n04090001\tSt. Clair\n04090002\tLake St. Clair\n04090003\tClinton\n04090004\tDetroit\n04090005\tHuron\n0410\tWestern Lake Erie\n041000\tWestern Lake Erie\n04100001\tOttawa-Stony\n04100002\tRaisin\n04100003\tSt. Joseph\n04100004\tSt. Marys\n04100005\tUpper Maumee\n04100006\tTiffin\n04100007\tAuglaize\n04100008\tBlanchard\n04100009\tLower Maumee\n04100010\tCedar-Portage\n04100011\tSandusky\n04100012\tHuron-Vermilion\n0411\tSouthern Lake Erie\n041100\tSouthern Lake Erie\n04110001\tBlack-Rocky\n04110002\tCuyahoga\n04110003\tAshtabula-Chagrin\n04110004\tGrand\n0412\tEastern Lake Erie-Lake Erie\n041201\tEastern Lake Erie\n04120101\tChautauqua-Conneaut\n04120102\tCattaraugus\n04120103\tBuffalo-Eighteenmile\n04120104\tNiagara\n041202\tLake Erie\n04120200\tLake Erie\n0413\tSouthwestern Lake Ontario\n041300\tSouthwestern Lake Ontario\n04130001\tOak Orchard-Twelvemile\n04130002\tUpper Genesee\n04130003\tLower Genesee\n0414\tSoutheastern Lake Ontario\n041401\tSoutheastern Lake Ontario\n04140101\tIrondequoit-Ninemile\n04140102\tSalmon-Sandy\n041402\tOswego\n04140201\tSeneca\n04140202\tOneida\n04140203\tOswego\n0415\tNortheastern Lake Ontario-Lake Ontario-St. Lawrence\n041501\tNortheastern Lake Ontario\n04150101\tBlack\n04150102\tChaumont-Perch\n041502\tLake Ontario\n04150200\tLake Ontario\n041503\tSt. Lawrence\n04150301\tUpper St. Lawrence\n04150302\tOswegatchie\n04150303\tIndian\n04150304\tGrass\n04150305\tRaquette\n04150306\tSt. Regis\n04150307\tEnglish-Salmon\n05\tOhio\n0501\tAllegheny\n050100\tAllegheny\n05010001\tUpper Allegheny\n05010002\tConewango\n05010003\tMiddle Allegheny-Tionesta\n05010004\tFrench\n05010005\tClarion\n05010006\tMiddle Allegheny-Redbank\n05010007\tConemaugh\n05010008\tKiskiminetas\n05010009\tLower Allegheny\n0502\tMonongahela\n050200\tMonongahela\n05020001\tTygart Valley\n05020002\tWest Fork\n05020003\tUpper Monongahela\n05020004\tCheat\n05020005\tLower Monongahela\n05020006\tYoughiogheny\n0503\tUpper Ohio\n050301\tUpper Ohio-Beaver\n05030101\tUpper Ohio\n05030102\tShenango\n05030103\tMahoning\n05030104\tBeaver\n05030105\tConnoquenessing\n05030106\tUpper Ohio-Wheeling\n050302\tUpper Ohio-Little Kanawha\n05030201\tLittle Muskingum-Middle Island\n05030202\tUpper Ohio-Shade\n05030203\tLittle Kanawha\n05030204\tHocking\n0504\tMuskingum\n050400\tMuskingum\n05040001\tTuscarawas\n05040002\tMohican\n05040003\tWalhonding\n05040004\tMuskingum\n05040005\tWills\n05040006\tLicking\n0505\tKanawha\n050500\tKanawha\n05050001\tUpper New\n05050002\tMiddle New\n05050003\tGreenbrier\n05050004\tLower New\n05050005\tGauley\n05050006\tUpper Kanawha\n05050007\tElk\n05050008\tLower Kanawha\n05050009\tCoal\n0506\tScioto\n050600\tScioto\n05060001\tUpper Scioto\n05060002\tLower Scioto\n05060003\tPaint\n0507\tBig Sandy-Guyandotte\n050701\tGuyandotte\n05070101\tUpper Guyandotte\n05070102\tLower Guyandotte\n050702\tBig Sandy\n05070201\tTug\n05070202\tUpper Levisa\n05070203\tLower Levisa\n05070204\tBig Sandy\n0508\tGreat Miami\n050800\tGreat Miami\n05080001\tUpper Great Miami\n05080002\tLower Great Miami\n05080003\tWhitewater\n0509\tMiddle Ohio\n050901\tMiddle Ohio-Raccoon\n05090101\tRaccoon-Symmes\n05090102\tTwelvepole\n05090103\tLittle Scioto-Tygarts\n05090104\tLittle Sandy\n050902\tMiddle Ohio-Little Miami\n05090201\tOhio Brush-Whiteoak\n05090202\tLittle Miami\n05090203\tMiddle Ohio-Laughery\n0510\tKentucky-Licking\n051001\tLicking\n05100101\tLicking\n05100102\tSouth Fork Licking\n051002\tKentucky\n05100201\tNorth Fork Kentucky\n05100202\tMiddle Fork Kentucky\n05100203\tSouth Fork Kentucky\n05100204\tUpper Kentucky\n05100205\tLower Kentucky\n0511\tGreen\n051100\tGreen\n05110001\tUpper Green\n05110002\tBarren\n05110003\tMiddle Green\n05110004\tRough\n05110005\tLower Green\n05110006\tPond\n0512\tWabash\n051201\tWabash\n05120101\tUpper Wabash\n05120102\tSalamonie\n05120103\tMississinewa\n05120104\tEel\n05120105\tMiddle Wabash-Deer\n05120106\tTippecanoe\n05120107\tWildcat\n05120108\tMiddle Wabash-Little Vermilion\n05120109\tVermilion\n05120110\tSugar\n05120111\tMiddle Wabash-Busseron\n05120112\tEmbarras\n05120113\tLower Wabash\n05120114\tLittle Wabash\n05120115\tSkillet\n051202\tPatoka-White\n05120201\tUpper White\n05120202\tLower White\n05120203\tEel\n05120204\tDriftwood\n05120205\tFlatrock-Haw\n05120206\tUpper East Fork White\n05120207\tMuscatatuck\n05120208\tLower East Fork White\n05120209\tPatoka\n0513\tCumberland\n051301\tUpper Cumberland\n05130101\tUpper Cumberland\n05130102\tRockcastle\n05130103\tUpper Cumberland-Lake Cumberland\n05130104\tSouth Fork Cumberland\n05130105\tObey\n05130106\tUpper Cumberland-Cordell Hull\n05130107\tCollins\n05130108\tCaney\n051302\tLower Cumberland\n05130201\tLower Cumberland-Old Hickory Lake\n05130202\tLower Cumberland-Sycamore\n05130203\tStones\n05130204\tHarpeth\n05130205\tLower Cumberland\n05130206\tRed\n0514\tLower Ohio\n051401\tLower Ohio-Salt\n05140101\tSilver-Little Kentucky\n05140102\tSalt\n05140103\tRolling Fork\n05140104\tBlue-Sinking\n051402\tLower Ohio\n05140201\tLower Ohio-Little Pigeon\n05140202\tHighland-Pigeon\n05140203\tLower Ohio-Bay\n05140204\tSaline\n05140205\tTradewater\n05140206\tLower Ohio\n06\tTennessee\n0601\tUpper Tennessee\n060101\tFrench Broad-Holston\n06010101\tNorth Fork Holston\n06010102\tSouth Fork Holston\n06010103\tWatauga\n06010104\tHolston\n06010105\tUpper French Broad\n06010106\tPigeon\n06010107\tLower French Broad\n06010108\tNolichucky\n060102\tUpper Tennessee\n06010201\tWatts Bar Lake\n06010202\tUpper Little Tennessee\n06010203\tTuckasegee\n06010204\tLower Little Tennessee\n06010205\tUpper Clinch\n06010206\tPowell\n06010207\tLower Clinch\n06010208\tEmory\n0602\tMiddle Tennessee-Hiwassee\n060200\tMiddle Tennessee-Hiwassee\n06020001\tMiddle Tennessee-Chickamauga\n06020002\tHiwassee\n06020003\tOcoee\n06020004\tSequatchie\n0603\tMiddle Tennessee-Elk\n060300\tMiddle Tennessee-Elk\n06030001\tGuntersville Lake\n06030002\tWheeler Lake\n06030003\tUpper Elk\n06030004\tLower Elk\n06030005\tPickwick Lake\n06030006\tBear\n0604\tLower Tennessee\n060400\tLower Tennessee\n06040001\tLower Tennessee-Beech\n06040002\tUpper Duck\n06040003\tLower Duck\n06040004\tBuffalo\n06040005\tKentucky Lake\n06040006\tLower Tennessee\n07\tUpper Mississippi\n0701\tMississippi Headwaters\n070101\tMississippi Headwaters\n07010101\tMississippi Headwaters\n07010102\tLeech Lake\n07010103\tPrairie-Willow\n07010104\tElk-Nokasippi\n07010105\tPine\n07010106\tCrow Wing\n07010107\tRedeye\n07010108\tLong Prairie\n070102\tUpper Mississippi-Crow-Rum\n07010201\tPlatte-Spunk\n07010202\tSauk\n07010203\tClearwater-Elk\n07010204\tCrow\n07010205\tSouth Fork Crow\n07010206\tTwin Cities\n07010207\tRum\n0702\tMinnesota\n070200\tMinnesota\n07020001\tUpper Minnesota\n07020002\tPomme De Terre\n07020003\tLac Qui Parle\n07020004\tHawk-Yellow Medicine\n07020005\tChippewa\n07020006\tRedwood\n07020007\tMiddle Minnesota\n07020008\tCottonwood\n07020009\tBlue Earth\n07020010\tWatonwan\n07020011\tLe Sueur\n07020012\tLower Minnesota\n0703\tSt. Croix\n070300\tSt. Croix\n07030001\tUpper St. Croix\n07030002\tNamekagon\n07030003\tKettle\n07030004\tSnake\n07030005\tLower St. Croix\n0704\tUpper Mississippi-Black-Root\n070400\tUpper Mississippi-Black-Root\n07040001\tRush-Vermillion\n07040002\tCannon\n07040003\tBuffalo-Whitewater\n07040004\tZumbro\n07040005\tTrempealeau\n07040006\tLa Crosse-Pine\n07040007\tBlack\n07040008\tRoot\n0705\tChippewa\n070500\tChippewa\n07050001\tUpper Chippewa\n07050002\tFlambeau\n07050003\tSouth Fork Flambeau\n07050004\tJump\n07050005\tLower Chippewa\n07050006\tEau Claire\n07050007\tRed Cedar\n0706\tUpper Mississippi-Maquoketa-Plum\n070600\tUpper Mississippi-Maquoketa-Plum\n07060001\tCoon-Yellow\n07060002\tUpper Iowa\n07060003\tGrant-Little Maquoketa\n07060004\tTurkey\n07060005\tApple-Plum\n07060006\tMaquoketa\n0707\tWisconsin\n070700\tWisconsin\n07070001\tUpper Wisconsin\n07070002\tLake Dubay\n07070003\tCastle Rock\n07070004\tBaraboo\n07070005\tLower Wisconsin\n07070006\tKickapoo\n0708\tUpper Mississippi-Iowa-Skunk-Wapsipinicon\n070801\tUpper Mississippi-Skunk-Wapsipinicon\n07080101\tCopperas-Duck\n07080102\tUpper Wapsipinicon\n07080103\tLower Wapsipinicon\n07080104\tFlint-Henderson\n07080105\tSouth Skunk\n07080106\tNorth Skunk\n07080107\tSkunk\n070802\tIowa\n07080201\tUpper Cedar\n07080202\tShell Rock\n07080203\tWinnebago\n07080204\tWest Fork Cedar\n07080205\tMiddle Cedar\n07080206\tLower Cedar\n07080207\tUpper Iowa\n07080208\tMiddle Iowa\n07080209\tLower Iowa\n0709\tRock\n070900\tRock\n07090001\tUpper Rock\n07090002\tCrawfish\n07090003\tPecatonica\n07090004\tSugar\n07090005\tLower Rock\n07090006\tKishwaukee\n07090007\tGreen\n0710\tDes Moines\n071000\tDes Moines\n07100001\tDes Moines Headwaters\n07100002\tUpper Des Moines\n07100003\tEast Fork Des Moines\n07100004\tMiddle Des Moines\n07100005\tBoone\n07100006\tNorth Raccoon\n07100007\tSouth Raccoon\n07100008\tLake Red Rock\n07100009\tLower Des Moines\n0711\tUpper Mississippi-Salt\n071100\tUpper Mississippi-Salt\n07110001\tBear-Wyaconda\n07110002\tNorth Fabius\n07110003\tSouth Fabius\n07110004\tThe Sny\n07110005\tNorth Fork Salt\n07110006\tSouth Fork Salt\n07110007\tSalt\n07110008\tCuivre\n07110009\tPeruque-Piasa\n0712\tUpper Illinois\n071200\tUpper Illinois\n07120001\tKankakee\n07120002\tIroquois\n07120003\tChicago\n07120004\tDes Plaines\n07120005\tUpper Illinois\n07120006\tUpper Fox\n07120007\tLower Fox\n0713\tLower Illinois\n071300\tLower Illinois\n07130001\tLower Illinois-Senachwine Lake\n07130002\tVermilion\n07130003\tLower Illinois-Lake Chautauqua\n07130004\tMackinaw\n07130005\tSpoon\n07130006\tUpper Sangamon\n07130007\tSouth Fork Sangamon\n07130008\tLower Sangamon\n07130009\tSalt\n07130010\tLa Moine\n07130011\tLower Illinois\n07130012\tMacoupin\n0714\tUpper Mississippi-Kaskaskia-Meramec\n071401\tUpper Mississippi-Meramec\n07140101\tCahokia-Joachim\n07140102\tMeramec\n07140103\tBourbeuse\n07140104\tBig\n07140105\tUpper Mississippi-Cape Girardeau\n07140106\tBig Muddy\n07140107\tWhitewater\n07140108\tCache\n071402\tKaskaskia\n07140201\tUpper Kaskaskia\n07140202\tMiddle Kaskaskia\n07140203\tShoal\n07140204\tLower Kaskaskia\n08\tLower Mississippi\n0801\tLower Mississippi-Hatchie\n080101\tLower Mississippi-Memphis\n08010100\tLower Mississippi-Memphis\n080102\tHatchie-Obion\n08010201\tBayou De Chien-Mayfield\n08010202\tObion\n08010203\tSouth Fork Obion\n08010204\tNorth Fork Forked Deer\n08010205\tSouth Fork Forked Deer\n08010206\tForked Deer\n08010207\tUpper Hatchie\n08010208\tLower Hatchie\n08010209\tLoosahatchie\n08010210\tWolf\n08010211\tHorn Lake-Nonconnah\n0802\tLower Mississippi - St. Francis\n080201\tLower Mississippi-Helena\n08020100\tLower Mississippi-Helena\n080202\tSt. Francis\n08020201\tNew Madrid-St. Johns\n08020202\tUpper St. Francis\n08020203\tLower St. Francis\n08020204\tLittle River Ditches\n08020205\tL\'anguille\n080203\tLower White\n08020301\tLower White-Bayou Des Arc\n08020302\tCache\n08020303\tLower White\n08020304\tBig\n080204\tLower Arkansas\n08020401\tLower Arkansas\n08020402\tBayou Meto\n0803\tLower Mississippi - Yazoo\n080301\tLower Mississippi-Greenville\n08030100\tLower Mississippi-Greenville\n080302\tYazoo\n08030201\tLittle Tallahatchie\n08030202\tTallahatchie\n08030203\tYocona\n08030204\tColdwater\n08030205\tYalobusha\n08030206\tUpper Yazoo\n08030207\tBig Sunflower\n08030208\tLower Yazoo\n08030209\tDeer-Steele\n0804\tLower Red - Ouachita\n080401\tUpper Ouachita\n08040101\tOuachita Headwaters\n08040102\tUpper Ouachita\n08040103\tLittle Missouri\n080402\tLower Ouachita\n08040201\tLower Ouachita-Smackover\n08040202\tLower Ouachita-Bayou De Loutre\n08040203\tUpper Saline\n08040204\tLower Saline\n08040205\tBayou Bartholomew\n08040206\tBayou D\'arbonne\n08040207\tLower Ouachita\n080403\tLower Red\n08040301\tLower Red\n08040302\tCastor\n08040303\tDugdemona\n08040304\tLittle\n08040305\tBlack\n08040306\tBayou Cocodrie\n0805\tBoeuf-Tensas\n080500\tBoeuf-Tensas\n08050001\tBoeuf\n08050002\tBayou Macon\n08050003\tTensas\n0806\tLower Mississippi - Big Black\n080601\tLower Mississippi-Natchez\n08060100\tLower Mississippi-Natchez\n080602\tBig Black - Homochitto\n08060201\tUpper Big Black\n08060202\tLower Big Black\n08060203\tBayou Pierre\n08060204\tColes Creek\n08060205\tHomochitto\n08060206\tBuffalo\n0807\tLower Mississippi-Lake Maurepas\n080701\tLower Mississippi-Baton Rouge\n08070100\tLower Mississippi-Baton Rouge\n080702\tLake Maurepas\n08070201\tBayou Sara-Thompson\n08070202\tAmite\n08070203\tTickfaw\n08070204\tLake Maurepas\n08070205\tTangipahoa\n080703\tLower Grand\n08070300\tLower Grand\n0808\tLouisiana Coastal\n080801\tAtchafalaya - Vermilion\n08080101\tAtchafalaya\n08080102\tBayou Teche\n08080103\tVermilion\n080802\tCalcasieu - Mermentau\n08080201\tMermentau Headwaters\n08080202\tMermentau\n08080203\tUpper Calcasieu\n08080204\tWhisky Chitto\n08080205\tWest Fork Calcasieu\n08080206\tLower Calcasieu\n0809\tLower Mississippi\n080901\tLower Mississippi-New Orleans\n08090100\tLower Mississippi-New Orleans\n080902\tLake Pontchartrain\n08090201\tLiberty Bayou-Tchefuncta\n08090202\tLake Pontchartrain\n08090203\tEastern Louisiana Coastal\n080903\tCentral Louisiana Coastal\n08090301\tEast Central Louisiana Coastal\n08090302\tWest Central Louisiana Coastal\n09\tSouris-Red-Rainy\n0901\tSouris\n090100\tSouris\n09010001\tUpper Souris\n09010002\tDes Lacs\n09010003\tLower Souris\n09010004\tWillow\n09010005\tDeep\n0902\tRed\n090201\tUpper Red\n09020101\tBois De Sioux\n09020102\tMustinka\n09020103\tOtter Tail\n09020104\tUpper Red\n09020105\tWestern Wild Rice\n09020106\tBuffalo\n09020107\tElm-Marsh\n09020108\tEastern Wild Rice\n09020109\tGoose\n090202\tDevils Lake-Sheyenne\n09020201\tDevils Lake\n09020202\tUpper Sheyenne\n09020203\tMiddle Sheyenne\n09020204\tLower Sheyenne\n09020205\tMaple\n090203\tLower Red\n09020301\tSandhill-Wilson\n09020302\tRed Lakes\n09020303\tRed Lake\n09020304\tThief\n09020305\tClearwater\n09020306\tGrand Marais-Red\n09020307\tTurtle\n09020308\tForest\n09020309\tSnake\n09020310\tPark\n09020311\tLower Red\n09020312\tTwo Rivers\n09020313\tPembina\n09020314\tRoseau\n0903\tRainy\n090300\tRainy\n09030001\tRainy Headwaters\n09030002\tVermilion\n09030003\tRainy Lake\n09030004\tUpper Rainy\n09030005\tLittle Fork\n09030006\tBig Fork\n09030007\tRapid\n09030008\tLower Rainy\n09030009\tLake of the Woods\n10\tMissouri\n1001\tSaskatchewan\n100100\tSaskatchewan\n10010001\tBelly\n10010002\tSt. Mary\n1002\tMissouri Headwaters\n100200\tMissouri Headwaters\n10020001\tRed Rock\n10020002\tBeaverhead\n10020003\tRuby\n10020004\tBig Hole\n10020005\tJefferson\n10020006\tBoulder\n10020007\tMadison\n10020008\tGallatin\n1003\tMissouri-Marias\n100301\tUpper Missouri\n10030101\tUpper Missouri\n10030102\tUpper Missouri-Dearborn\n10030103\tSmith\n10030104\tSun\n10030105\tBelt\n100302\tMarias\n10030201\tTwo Medicine\n10030202\tCut Bank\n10030203\tMarias\n10030204\tWillow\n10030205\tTeton\n1004\tMissouri-Musselshell\n100401\tFort Peck Lake\n10040101\tBullwhacker-Dog\n10040102\tArrow\n10040103\tJudith\n10040104\tFort Peck Reservoir\n10040105\tBig Dry\n10040106\tLittle Dry\n100402\tMusselshell\n10040201\tUpper Musselshell\n10040202\tMiddle Musselshell\n10040203\tFlatwillow\n10040204\tBox Elder\n10040205\tLower Musselshell\n1005\tMilk\n100500\tMilk\n10050001\tMilk Headwaters\n10050002\tUpper Milk\n10050003\tWild Horse Lake\n10050004\tMiddle Milk\n10050005\tBig Sandy\n10050006\tSage\n10050007\tLodge\n10050008\tBattle\n10050009\tPeoples\n10050010\tCottonwood\n10050011\tWhitewater\n10050012\tLower Milk\n10050013\tFrenchman\n10050014\tBeaver\n10050015\tRock\n10050016\tPorcupine\n1006\tMissouri-Poplar\n100600\tMissouri-Poplar\n10060001\tPrarie Elk-Wolf\n10060002\tRedwater\n10060003\tPoplar\n10060004\tWest Fork Poplar\n10060005\tCharlie-Little Muddy\n10060006\tBig Muddy\n10060007\tBrush Lake closed basin\n1007\tUpper Yellowstone\n100700\tUpper Yellowstone\n10070001\tYellowstone Headwaters\n10070002\tUpper Yellowstone\n10070003\tShields\n10070004\tUpper Yellowstone-Lake Basin\n10070005\tStillwater\n10070006\tClarks Fork Yellowstone\n10070007\tUpper Yellowstone-Pompeys Pillar\n10070008\tPryor\n1008\tBig Horn\n100800\tBig Horn\n10080001\tUpper Wind\n10080002\tLittle Wind\n10080003\tPopo Agie\n10080004\tMuskrat\n10080005\tLower Wind\n10080006\tBadwater\n10080007\tUpper Bighorn\n10080008\tNowood\n10080009\tGreybull\n10080010\tBig Horn Lake\n10080011\tDry\n10080012\tNorth Fork Shoshone\n10080013\tSouth Fork Shoshone\n10080014\tShoshone\n10080015\tLower Bighorn\n10080016\tLittle Bighorn\n1009\tPowder-Tongue\n100901\tTongue\n10090101\tUpper Tongue\n10090102\tLower Tongue\n100902\tPowder\n10090201\tMiddle Fork Powder\n10090202\tUpper Powder\n10090203\tSouth Fork Powder\n10090204\tSalt\n10090205\tCrazy Woman\n10090206\tClear\n10090207\tMiddle Powder\n10090208\tLittle Powder\n10090209\tLower Powder\n10090210\tMizpah\n1010\tLower Yellowstone\n101000\tLower Yellowstone\n10100001\tLower Yellowstone-Sunday\n10100002\tBig Porcupine\n10100003\tRosebud\n10100004\tLower Yellowstone\n10100005\tO\'fallon\n1011\tMissouri-Little Missouri\n101101\tLake Sakakawea\n10110101\tLake Sakakawea\n10110102\tLittle Muddy\n101102\tLittle Missouri\n10110201\tUpper Little Missouri\n10110202\tBoxelder\n10110203\tMiddle Little Missouri\n10110204\tBeaver\n10110205\tLower Little Missouri\n1012\tCheyenne\n101201\tCheyenne\n10120101\tAntelope\n10120102\tDry Fork Cheyenne\n10120103\tUpper Cheyenne\n10120104\tLance\n10120105\tLightning\n10120106\tAngostura Reservoir\n10120107\tBeaver\n10120108\tHat\n10120109\tMiddle Cheyenne-Spring\n10120110\tRapid\n10120111\tMiddle Cheyenne-Elk\n10120112\tLower Cheyenne\n10120113\tCherry\n101202\tBelle Fourche\n10120201\tUpper Belle Fourche\n10120202\tLower Belle Fourche\n10120203\tRedwater\n1013\tMissouri-Oahe\n101301\tLake Oahe\n10130101\tPainted Woods-Square Butte\n10130102\tUpper Lake Oahe\n10130103\tApple\n10130104\tBeaver\n10130105\tLower Lake Oahe\n10130106\tWest Missouri Coteau\n101302\tCannonball-Heart-Knife\n10130201\tKnife\n10130202\tUpper Heart\n10130203\tLower Heart\n10130204\tUpper Cannonball\n10130205\tCedar\n10130206\tLower Cannonball\n101303\tGrand-Moreau\n10130301\tNorth Fork Grand\n10130302\tSouth Fork Grand\n10130303\tGrand\n10130304\tSouth Fork Moreau\n10130305\tUpper Moreau\n10130306\tLower Moreau\n1014\tMissouri-White\n101401\tFort Randall Reservoir\n10140101\tFort Randall Reservoir\n10140102\tBad\n10140103\tMedicine Knoll\n10140104\tMedicine\n10140105\tCrow\n101402\tWhite\n10140201\tUpper White\n10140202\tMiddle White\n10140203\tLittle White\n10140204\tLower White\n1015\tNiobrara\n101500\tNiobrara\n10150001\tPonca\n10150002\tNiobrara Headwaters\n10150003\tUpper Niobrara\n10150004\tMiddle Niobrara\n10150005\tSnake\n10150006\tKeya Paha\n10150007\tLower Niobrara\n1016\tJames\n101600\tJames\n10160001\tJames Headwaters\n10160002\tPipestem\n10160003\tUpper James\n10160004\tElm\n10160005\tMud\n10160006\tMiddle James\n10160007\tEast Missouri Coteau\n10160008\tSnake\n10160009\tTurtle\n10160010\tNorth Big Sioux Coteau\n10160011\tLower James\n1017\tMissouri-Big Sioux\n101701\tLewis and Clark Lake\n10170101\tLewis and Clark Lake\n10170102\tVermillion\n10170103\tSouth Big Sioux Coteau\n101702\tBig Sioux\n10170201\tMiddle Big Sioux Coteau\n10170202\tUpper Big Sioux\n10170203\tLower Big Sioux\n10170204\tRock\n1018\tNorth Platte\n101800\tNorth Platte\n10180001\tNorth Platte Headwaters\n10180002\tUpper North Platte\n10180003\tPathfinder-Seminoe Reservoirs\n10180004\tMedicine Bow\n10180005\tLittle Medicine Bow\n10180006\tSweetwater\n10180007\tMiddle North Platte-Casper\n10180008\tGlendo Reservoir\n10180009\tMiddle North Platte-Scotts Bluff\n10180010\tUpper Laramie\n10180011\tLower Laramie\n10180012\tHorse\n10180013\tPumpkin\n10180014\tLower North Platte\n1019\tSouth Platte\n101900\tSouth Platte\n10190001\tSouth Platte Headwaters\n10190002\tUpper South Platte\n10190003\tMiddle South Platte-Cherry Creek\n10190004\tClear\n10190005\tSt. Vrain\n10190006\tBig Thompson\n10190007\tCache La Poudre\n10190008\tLone Tree-Owl\n10190009\tCrow\n10190010\tKiowa\n10190011\tBijou\n10190012\tMiddle South Platte-Sterling\n10190013\tBeaver\n10190014\tPawnee\n10190015\tUpper Lodgepole\n10190016\tLower Lodgepole\n10190017\tSidney Draw\n10190018\tLower South Platte\n1020\tPlatte\n102001\tMiddle Platte\n10200101\tMiddle Platte-Buffalo\n10200102\tWood\n10200103\tMiddle Platte-Prairie\n102002\tLower Platte\n10200201\tLower Platte-Shell\n10200202\tLower Platte\n10200203\tSalt\n1021\tLoup\n102100\tLoup\n10210001\tUpper Middle Loup\n10210002\tDismal\n10210003\tLower Middle Loup\n10210004\tSouth Loup\n10210005\tMud\n10210006\tUpper North Loup\n10210007\tLower North Loup\n10210008\tCalamus\n10210009\tLoup\n10210010\tCedar\n1022\tElkhorn\n102200\tElkhorn\n10220001\tUpper Elkhorn\n10220002\tNorth Fork Elkhorn\n10220003\tLower Elkhorn\n10220004\tLogan\n1023\tMissouri-Little Sioux\n102300\tMissouri-Little Sioux\n10230001\tBlackbird-Soldier\n10230002\tFloyd\n10230003\tLittle Sioux\n10230004\tMonona-Harrison Ditch\n10230005\tMaple\n10230006\tBig Papillion-Mosquito\n10230007\tBoyer\n1024\tMissouri-Nishnabotna\n102400\tMissouri-Nishnabotna\n10240001\tKeg-Weeping Water\n10240002\tWest Nishnabotna\n10240003\tEast Nishnabotna\n10240004\tNishnabotna\n10240005\tTarkio-Wolf\n10240006\tLittle Nemaha\n10240007\tSouth Fork Big Nemaha\n10240008\tBig Nemaha\n10240009\tWest Nodaway\n10240010\tNodaway\n10240011\tIndependence-Sugar\n10240012\tPlatte\n10240013\tOne Hundred and Two\n1025\tRepublican\n102500\tRepublican\n10250001\tArikaree\n10250002\tNorth Fork Republican\n10250003\tSouth Fork Republican\n10250004\tUpper Republican\n10250005\tFrenchman\n10250006\tStinking Water\n10250007\tRed Willow\n10250008\tMedicine\n10250009\tHarlan County Reservoir\n10250010\tUpper Sappa\n10250011\tLower Sappa\n10250012\tSouth Fork Beaver\n10250013\tLittle Beaver\n10250014\tBeaver\n10250015\tPrairie Dog\n10250016\tMiddle Republican\n10250017\tLower Republican\n1026\tSmoky Hill\n102600\tSmoky Hill\n10260001\tSmoky Hill Headwaters\n10260002\tNorth Fork Smoky Hill\n10260003\tUpper Smoky Hill\n10260004\tLadder\n10260005\tHackberry\n10260006\tMiddle Smoky Hill\n10260007\tBig\n10260008\tLower Smoky Hill\n10260009\tUpper Saline\n10260010\tLower Saline\n10260011\tUpper North Fork Solomon\n10260012\tLower North Fork Solomon\n10260013\tUpper South Fork Solomon\n10260014\tLower South Fork Solomon\n10260015\tSolomon\n1027\tKansas\n102701\tKansas\n10270101\tUpper Kansas\n10270102\tMiddle Kansas\n10270103\tDelaware\n10270104\tLower Kansas\n102702\tBig Blue\n10270201\tUpper Big Blue\n10270202\tMiddle Big Blue\n10270203\tWest Fork Big Blue\n10270204\tTurkey\n10270205\tLower Big Blue\n10270206\tUpper Little Blue\n10270207\tLower Little Blue\n1028\tChariton-Grand\n102801\tGrand\n10280101\tUpper Grand\n10280102\tThompson\n10280103\tLower Grand\n102802\tChariton\n10280201\tUpper Chariton\n10280202\tLower Chariton\n10280203\tLittle Chariton\n1029\tGasconade-Osage\n102901\tOsage\n10290101\tUpper Marais Des Cygnes\n10290102\tLower Marais Des Cygnes\n10290103\tLittle Osage\n10290104\tMarmaton\n10290105\tHarry S. Missouri\n10290106\tSac\n10290107\tPomme De Terre\n10290108\tSouth Grand\n10290109\tLake of the Ozarks\n10290110\tNiangua\n10290111\tLower Osage\n102902\tGasconade\n10290201\tUpper Gasconade\n10290202\tBig Piney\n10290203\tLower Gasconade\n1030\tLower Missouri\n103001\tLower Missouri-Blackwater\n10300101\tLower Missouri-Crooked\n10300102\tLower Missouri-Moreau\n10300103\tLamine\n10300104\tBlackwater\n103002\tLower Missouri\n10300200\tLower Missouri\n11\tArkansas-White-Red\n1101\tUpper White\n110100\tUpper White\n11010001\tBeaver Reservoir\n11010002\tJames\n11010003\tBull Shoals Lake\n11010004\tMiddle White\n11010005\tBuffalo\n11010006\tNorth Fork White\n11010007\tUpper Black\n11010008\tCurrent\n11010009\tLower Black\n11010010\tSpring\n11010011\tEleven Point\n11010012\tStrawberry\n11010013\tUpper White-Village\n11010014\tLittle Red\n1102\tUpper Arkansas\n110200\tUpper Arkansas\n11020001\tArkansas Headwaters\n11020002\tUpper Arkansas\n11020003\tFountain\n11020004\tChico\n11020005\tUpper Arkansas-Lake Meredith\n11020006\tHuerfano\n11020007\tApishapa\n11020008\tHorse\n11020009\tUpper Arkansas-John Martin\n11020010\tPurgatoire\n11020011\tBig Sandy\n11020012\tRush\n11020013\tTwo Butte\n1103\tMiddle Arkansas\n110300\tMiddle Arkansas\n11030001\tMiddle Arkansas-Lake Mckinney\n11030002\tWhitewoman\n11030003\tArkansas-Dodge City\n11030004\tCoon-Pickerel\n11030005\tPawnee\n11030006\tBuckner\n11030007\tUpper Walnut Creek\n11030008\tLower Walnut Creek\n11030009\tRattlesnake\n11030010\tGar-Peace\n11030011\tCow\n11030012\tLittle Arkansas\n11030013\tMiddle Arkansas-Slate\n11030014\tNorth Fork Ninnescah\n11030015\tSouth Fork Ninnescah\n11030016\tNinnescah\n11030017\tUpper Walnut River\n11030018\tLower Walnut River\n1104\tUpper Cimarron\n110400\tUpper Cimarron\n11040001\tCimarron headwaters\n11040002\tUpper Cimarron\n11040003\tNorth Fork Cimarron\n11040004\tSand Arroyo\n11040005\tBear\n11040006\tUpper Cimarron-Liberal\n11040007\tCrooked\n11040008\tUpper Cimarron-Bluff\n1105\tLower Cimarron\n110500\tLower Cimarron\n11050001\tLower Cimarron-Eagle Chief\n11050002\tLower Cimarron-Skeleton\n11050003\tLower Cimarron\n1106\tArkansas - Keystone\n110600\tArkansas - Keystone\n11060001\tKaw Lake\n11060002\tUpper Salt Fork Arkansas\n11060003\tMedicine Lodge\n11060004\tLower Salt Fork Arkansas\n11060005\tChikaskia\n11060006\tBlack Bear-Red Rock\n1107\tNeosho - Verdigris\n110701\tVerdigris\n11070101\tUpper Verdigris\n11070102\tFall\n11070103\tMiddle Verdigris\n11070104\tElk\n11070105\tLower Verdigris\n11070106\tCaney\n11070107\tBird\n110702\tNeosho\n11070201\tNeosho headwaters\n11070202\tUpper Cottonwood\n11070203\tLower Cottonwood\n11070204\tUpper Neosho\n11070205\tMiddle Neosho\n11070206\tLake O\' the Cherokees\n11070207\tSpring\n11070208\tElk\n11070209\tLower Neosho\n1108\tUpper Canadian\n110800\tUpper Canadian\n11080001\tCanadian headwaters\n11080002\tCimarron\n11080003\tUpper Canadian\n11080004\tMora\n11080005\tConchas\n11080006\tUpper Canadian-Ute Reservoir\n11080007\tUte\n11080008\tRevuelto\n1109\tLower Canadian\n110901\tMiddle Canadian\n11090101\tMiddle Canadian-Trujillo\n11090102\tPunta De Agua\n11090103\tRita Blanca\n11090104\tCarrizo\n11090105\tLake Meredith\n11090106\tMiddle Canadian-Spring\n110902\tLower Canadian\n11090201\tLower Canadian-Deer\n11090202\tLower Canadian-Walnut\n11090203\tLittle\n11090204\tLower Canadian\n1110\tNorth Canadian\n111001\tUpper Beaver\n11100101\tUpper Beaver\n11100102\tMiddle Beaver\n11100103\tColdwater\n11100104\tPalo Duro\n111002\tLower Beaver\n11100201\tLower Beaver\n11100202\tUpper Wolf\n11100203\tLower Wolf\n111003\tLower North Canadian\n11100301\tMiddle North Canadian\n11100302\tLower North Canadian\n11100303\tDeep Fork\n1111\tLower Arkansas\n111101\tRobert S. Kerr Reservoir\n11110101\tPolecat-Snake\n11110102\tDirty-Greenleaf\n11110103\tIllinois\n11110104\tRobert S. Kerr Reservoir\n11110105\tPoteau\n111102\tLower Arkansas-Fourche La Fave\n11110201\tFrog-Mulberry\n11110202\tDardanelle Reservoir\n11110203\tLake Conway-Point Remove\n11110204\tPetit Jean\n11110205\tCadron\n11110206\tFourche La Fave\n11110207\tLower Arkansas-Maumelle\n1112\tRed headwaters\n111201\tPrairie Dog Town Fork Red\n11120101\tTierra Blanca\n11120102\tPalo Duro\n11120103\tUpper Prairie Dog Town Fork Red\n11120104\tTule\n11120105\tLower Prairie Dog Town Fork Red\n111202\tSalt Fork Red\n11120201\tUpper Salt Fork Red\n11120202\tLower Salt Fork Red\n111203\tNorth Fork Red\n11120301\tUpper North Fork Red\n11120302\tMiddle North Fork Red\n11120303\tLower North Fork Red\n11120304\tElm Fork Red\n1113\tRed - Washita\n111301\tRed-Pease\n11130101\tGroesbeck-Sandy\n11130102\tBlue-China\n11130103\tNorth Pease\n11130104\tMiddle Pease\n11130105\tPease\n111302\tRed-Lake Texoma\n11130201\tFarmers-Mud\n11130202\tCache\n11130203\tWest Cache\n11130204\tNorth Wichita\n11130205\tSouth Wichita\n11130206\tWichita\n11130207\tSouthern Beaver\n11130208\tNorthern Beaver\n11130209\tLittle Wichita\n11130210\tLake Texoma\n111303\tWashita\n11130301\tWashita headwaters\n11130302\tUpper Washita\n11130303\tMiddle Washita\n11130304\tLower Washita\n1114\tRed-Sulphur\n111401\tRed-Little\n11140101\tBois D\'arc-Island\n11140102\tBlue\n11140103\tMuddy Boggy\n11140104\tClear Boggy\n11140105\tKiamichi\n11140106\tPecan-Waterhole\n11140107\tUpper Little\n11140108\tMountain Fork\n11140109\tLower Little\n111402\tRed-Saline\n11140201\tMckinney-Posten Bayous\n11140202\tMiddle Red-Coushatta\n11140203\tLoggy Bayou\n11140204\tRed Chute\n11140205\tBodcau Bayou\n11140206\tBayou Pierre\n11140207\tLower Red-Lake Iatt\n11140208\tSaline Bayou\n11140209\tBlack Lake Bayou\n111403\tBig Cypress - Sulphur\n11140301\tSulphur headwaters\n11140302\tLower Sulphur\n11140303\tWhite Oak Bayou\n11140304\tCross Bayou\n11140305\tLake O\'the Pines\n11140306\tCaddo Lake\n11140307\tLittle Cypress\n12\tTexas-Gulf\n1201\tSabine\n120100\tSabine\n12010001\tUpper Sabine\n12010002\tMiddle Sabine\n12010003\tLake Fork\n12010004\tToledo Bend Reservoir\n12010005\tLower Sabine\n1202\tNeches\n120200\tNeches\n12020001\tUpper Neches\n12020002\tMiddle Neches\n12020003\tLower Neches\n12020004\tUpper Angelina\n12020005\tLower Angelina\n12020006\tVillage\n12020007\tPine Island Bayou\n1203\tTrinity\n120301\tUpper Trinity\n12030101\tUpper West Fork Trinity\n12030102\tLower West Fork Trinity\n12030103\tElm Fork Trinity\n12030104\tDenton\n12030105\tUpper Trinity\n12030106\tEast Fork Trinity\n12030107\tCedar\n12030108\tRichland\n12030109\tChambers\n120302\tLower Trinity\n12030201\tLower Trinity-Tehuacana\n12030202\tLower Trinity-Kickapoo\n12030203\tLower Trinity\n1204\tGalveston Bay-San Jacinto\n120401\tSan Jacinto\n12040101\tWest Fork San Jacinto\n12040102\tSpring\n12040103\tEast Fork San Jacinto\n12040104\tBuffalo-San Jacinto\n120402\tGalveston Bay-Sabine Lake\n12040201\tSabine Lake\n12040202\tEast Galveston Bay\n12040203\tNorth Galveston Bay\n12040204\tWest Galveston Bay\n12040205\tAustin-Oyster\n1205\tBrazos headwaters\n120500\tBrazos headwaters\n12050001\tYellow House Draw\n12050002\tBlackwater Draw\n12050003\tNorth Fork Double Mountain Fork\n12050004\tDouble Moutain Fork Brazos\n12050005\tRunning Water Draw\n12050006\tWhite\n12050007\tSalt Fork Brazos\n1206\tMiddle Brazos\n120601\tMiddle Brazos-Clear Fork\n12060101\tMiddle Brazos-Millers\n12060102\tUpper Clear Fork Brazos\n12060103\tPaint\n12060104\tLower Clear Fork Brazos\n12060105\tHubbard\n120602\tMiddle Brazos-Bosque\n12060201\tMiddle Brazos-Palo Pinto\n12060202\tMiddle Brazos-Lake Whitney\n12060203\tBosque\n12060204\tNorth Bosque\n1207\tLower Brazos\n120701\tLower Brazos\n12070101\tLower Brazos-Little Brazos\n12070102\tYegua\n12070103\tNavasota\n12070104\tLower Brazos\n120702\tLittle\n12070201\tLeon\n12070202\tCowhouse\n12070203\tLampasas\n12070204\tLittle\n12070205\tSan Gabriel\n1208\tUpper Colorado\n120800\tUpper Colorado\n12080001\tLost Draw\n12080002\tColorado headwaters\n12080003\tMonument-Seminole Draws\n12080004\tMustang Draw\n12080005\tJohnson Draw\n12080006\tSulphur Springs Draw\n12080007\tBeals\n12080008\tUpper Colorado\n1209\tLower Colorado-San Bernard Coastal\n120901\tMiddle Colorado-Concho\n12090101\tMiddle Colorado-Elm\n12090102\tSouth Concho\n12090103\tMiddle Concho\n12090104\tNorth Concho\n12090105\tConcho\n12090106\tMiddle Colorado\n12090107\tPecan Bayou\n12090108\tJim Ned\n12090109\tSan Saba\n12090110\tBrady\n120902\tMiddle Colorado-Llano\n12090201\tBuchanan-Lyndon B\n12090202\tNorth Llano\n12090203\tSouth Llano\n12090204\tLlano\n12090205\tAustin-Travis Lakes\n12090206\tPedernales\n120903\tLower Colorado\n12090301\tLower Colorado-Cummins\n12090302\tLower Colorado\n120904\tSan Bernard Coastal\n12090401\tSan Bernard\n12090402\tEast Matagorda Bay\n1210\tCentral Texas Coastal\n121001\tLavaca\n12100101\tLavaca\n12100102\tNavidad\n121002\tGuadalupe\n12100201\tUpper Guadalupe\n12100202\tMiddle Guadalupe\n12100203\tSan Marcos\n12100204\tLower Guadalupe\n121003\tSan Antonio\n12100301\tUpper San Antonio\n12100302\tMedina\n12100303\tLower San Antonio\n12100304\tCibolo\n121004\tCentral Texas Coastal\n12100401\tCentral Matagorda Bay\n12100402\tWest Matagorda Bay\n12100403\tEast San Antonio Bay\n12100404\tWest San Antonio Bay\n12100405\tAransas Bay\n12100406\tMission\n12100407\tAransas\n1211\tNueces-Southwestern Texas Coastal\n121101\tNueces\n12110101\tNueces headwaters\n12110102\tWest Nueces\n12110103\tUpper Nueces\n12110104\tTurkey\n12110105\tMiddle Nueces\n12110106\tUpper Frio\n12110107\tHondo\n12110108\tLower Frio\n12110109\tSan Miguel\n12110110\tAtascosa\n12110111\tLower Nueces\n121102\tSouthwestern Texas Coastal\n12110201\tNorth Corpus Christi Bay\n12110202\tSouth Corpus Christi Bay\n12110203\tNorth Laguna Madre\n12110204\tSan Fernando\n12110205\tBaffin Bay\n12110206\tPalo Blanco\n12110207\tCentral Laguna Madre\n12110208\tSouth Laguna Madre\n13\tRio Grande\n1301\tRio Grande headwaters\n130100\tRio Grande headwaters\n13010001\tRio Grande headwaters\n13010002\tAlamosa-Trinchera\n13010003\tSan Luis\n13010004\tSaguache\n13010005\tConejos\n1302\tRio Grande-Elephant Butte\n130201\tUpper Rio Grande\n13020101\tUpper Rio Grande\n13020102\tRio Chama\n130202\tRio Grande-Elephant Butte\n13020201\tRio Grande-Santa Fe\n13020202\tJemez\n13020203\tRio Grande-Albuquerque\n13020204\tRio Puerco\n13020205\tArroyo Chico\n13020206\tNorth Plains\n13020207\tRio San Jose\n13020208\tPlains of San Agustin\n13020209\tRio Salado\n13020210\tJornada Del Muerto\n13020211\tElephant Butte Reservoir\n1303\tRio Grande-Mimbres\n130301\tRio Grande-Caballo\n13030101\tCaballo\n13030102\tEl Paso-Las Cruces\n13030103\tJornada Draw\n130302\tMimbres\n13030201\tPlayas Lake\n13030202\tMimbres\n1304\tRio Grande-Amistad\n130401\tRio Grande-Fort Quitman\n13040100\tRio Grande-Fort Quitman\n130402\tRio Grande-Amistad\n13040201\tCibolo-Red Light\n13040202\tAlamito\n13040203\tBlack Hills-Fresno\n13040204\tTerlingua\n13040205\tBig Bend\n13040206\tMaravillas\n13040207\tSantiago Draw\n13040208\tReagan-Sanderson\n13040209\tSan Francisco\n13040210\tLozier Canyon\n13040211\tBig Canyon\n13040212\tAmistad Reservoir\n130403\tDevils\n13040301\tUpper Devils\n13040302\tLower Devils\n13040303\tDry Devils\n1305\tRio Grande closed basins\n130500\tRio Grande closed basins\n13050001\tWestern Estancia\n13050002\tEastern Estancia\n13050003\tTularosa Valley\n13050004\tSalt Basin\n1306\tUpper Pecos\n130600\tUpper Pecos\n13060001\tPecos headwaters\n13060002\tPintada Arroyo\n13060003\tUpper Pecos\n13060004\tTaiban\n13060005\tArroyo Del Macho\n13060006\tGallo Arroyo\n13060007\tUpper Pecos-Long Arroyo\n13060008\tRio Hondo\n13060009\tRio Felix\n13060010\tRio Penasco\n13060011\tUpper Pecos-Black\n1307\tLower Pecos\n130700\tLower Pecos\n13070001\tLower Pecos-Red Bluff Reservoir\n13070002\tDelaware\n13070003\tToyah\n13070004\tSalt Draw\n13070005\tBarrilla Draw\n13070006\tCoyanosa-Hackberry Draws\n13070007\tLandreth-Monument Draws\n13070008\tLower Pecos\n13070009\tTunas\n13070010\tIndependence\n13070011\tHoward Draw\n1308\tRio Grande-Falcon\n130800\tRio Grande-Falcon\n13080001\tElm-Sycamore\n13080002\tSan Ambrosia-Santa Isabel\n13080003\tInternational Falcon Reservoir\n1309\tLower Rio Grande\n130900\tLower Rio Grande\n13090001\tLos Olmos\n13090002\tLower Rio Grande\n14\tUpper Colorado\n1401\tColorado headwaters\n140100\tColorado headwaters\n14010001\tColorado headwaters\n14010002\tBlue\n14010003\tEagle\n14010004\tRoaring Fork\n14010005\tColorado headwaters-Plateau\n14010006\tParachute-Roan\n1402\tGunnison\n140200\tGunnison\n14020001\tEast-Taylor\n14020002\tUpper Gunnison\n14020003\tTomichi\n14020004\tNorth Fork Gunnison\n14020005\tLower Gunnison\n14020006\tUncompahange\n1403\tUpper Colorado-Dolores\n140300\tUpper Colorado-Dolores\n14030001\tWestwater Canyon\n14030002\tUpper Dolores\n14030003\tSan Miguel\n14030004\tLower Dolores\n14030005\tUpper Colorado-Kane Springs\n1404\tGreat Divide - Upper Green\n140401\tUpper Green\n14040101\tUpper Green\n14040102\tNew Fork\n14040103\tUpper Green-Slate\n14040104\tBig Sandy\n14040105\tBitter\n14040106\tUpper Green-Flaming Gorge Reservoir\n14040107\tBlacks Fork\n14040108\tMuddy\n14040109\tVermilion\n140402\tGreat Divide closed basin\n14040200\tGreat Divide closed basin\n1405\tWhite-Yampa\n140500\tWhite - Yampa\n14050001\tUpper Yampa\n14050002\tLower Yampa\n14050003\tLittle Snake\n14050004\tMuddy\n14050005\tUpper White\n14050006\tPiceance-Yellow\n14050007\tLower White\n1406\tLower Green\n140600\tLower Green\n14060001\tLower Green-Diamond\n14060002\tAshley-Brush\n14060003\tDuchesne\n14060004\tStrawberry\n14060005\tLower Green-Desolation Canyon\n14060006\tWillow\n14060007\tPrice\n14060008\tLower Green\n14060009\tSan Rafael\n1407\tUpper Colorado-Dirty Devil\n140700\tUpper Colorado-Dirty Devil\n14070001\tUpper Lake Powell\n14070002\tMuddy\n14070003\tFremont\n14070004\tDirty Devil\n14070005\tEscalante\n14070006\tLower Lake Powell\n14070007\tParia\n1408\tSan Juan\n140801\tUpper San Juan\n14080101\tUpper San Juan\n14080102\tPiedra\n14080103\tBlanco Canyon\n14080104\tAnimas\n14080105\tMiddle San Juan\n14080106\tChaco\n14080107\tMancos\n140802\tLower San Juan\n14080201\tLower San Juan-Four Corners\n14080202\tMcelmo\n14080203\tMontezuma\n14080204\tChinle\n14080205\tLower San Juan\n15\tLower Colorado\n1501\tLower Colorado-Lake Mead\n150100\tLower Colorado-Lake Mead\n15010001\tLower Colorado-Marble Canyon\n15010002\tGrand Canyon\n15010003\tKanab\n15010004\tHavasu Canyon\n15010005\tLake Mead\n15010006\tGrand Wash\n15010007\tHualapai Wash\n15010008\tUpper Virgin\n15010009\tFort Pierce Wash\n15010010\tLower Virgin\n15010011\tWhite\n15010012\tMuddy\n15010013\tMeadow Valley Wash\n15010014\tDetrital Wash\n15010015\tLas Vegas Wash\n1502\tLittle Colorado\n150200\tLittle Colorado\n15020001\tLittle Colorado headwaters\n15020002\tUpper Little Colorado\n15020003\tCarrizo Wash\n15020004\tZuni\n15020005\tSilver\n15020006\tUpper Puerco\n15020007\tLower Puerco\n15020008\tMiddle Little Colorado\n15020009\tLeroux Wash\n15020010\tChevelon Canyon\n15020011\tCottonwood Wash\n15020012\tCorn-Oraibi\n15020013\tPolacca Wash\n15020014\tJadito Wash\n15020015\tCanyon Diablo\n15020016\tLower Little Colorado\n15020017\tDinnebito Wash\n15020018\tMoenkopi Wash\n1503\tLower Colorado\n150301\tLower Colorado\n15030101\tHavasu-Mohave Lakes\n15030102\tPiute Wash\n15030103\tSacramento Wash\n15030104\tImperial Reservoir\n15030105\tBouse Wash\n15030106\tTyson Wash\n15030107\tLower Colorado\n15030108\tYuma Desert\n150302\tBill Williams\n15030201\tBig Sandy\n15030202\tBurro\n15030203\tSanta Maria\n15030204\tBill Williams\n1504\tUpper Gila\n150400\tUpper Gila\n15040001\tUpper Gila\n15040002\tUpper Gila-Mangas\n15040003\tAnimas Valley\n15040004\tSan Francisco\n15040005\tUpper Gila-San Carlos Reservoir\n15040006\tSan Simon\n15040007\tSan Carlos\n1505\tMiddle Gila\n150501\tMiddle Gila\n15050100\tMiddle Gila\n150502\tSan Pedro-Willcox\n15050201\tWillcox Playa\n15050202\tUpper San Pedro\n15050203\tLower San Pedro\n150503\tSanta Cruz\n15050301\tUpper Santa Cruz\n15050302\tRillito\n15050303\tLower Santa Cruz\n15050304\tBrawley Wash\n15050305\tAguirre Valley\n15050306\tSanta Rosa Wash\n1506\tSalt\n150601\tSalt\n15060101\tBlack\n15060102\tWhite\n15060103\tUpper Salt\n15060104\tCarrizo\n15060105\tTonto\n15060106\tLower Salt\n150602\tVerde\n15060201\tBig Chino-Williamson Valley\n15060202\tUpper Verde\n15060203\tLower Verde\n1507\tLower Gila\n150701\tLower Gila-Agua Fria\n15070101\tLower Gila-Painted Rock Reservoir\n15070102\tAgua Fria\n15070103\tHassayampa\n15070104\tCentennial Wash\n150702\tLower Gila\n15070201\tLower Gila\n15070202\tTenmile Wash\n15070203\tSan Cristobal Wash\n1508\tSonora\n150801\tRio Sonoyta\n15080101\tSan Simon Wash\n15080102\tRio Sonoyta\n15080103\tTule Desert\n150802\tRio De La Concepcion\n15080200\tRio De La Concepcion\n150803\tRio De Bavispe\n15080301\tWhitewater Draw\n15080302\tSan Bernardino Valley\n15080303\tCloverdale\n16\tGreat Basin\n1601\tBear\n160101\tUpper Bear\n16010101\tUpper Bear\n16010102\tCentral Bear\n160102\tLower Bear\n16010201\tBear Lake\n16010202\tMiddle Bear\n16010203\tLittle Bear-Logan\n16010204\tLower Bear-Malad\n1602\tGreat Salt Lake\n160201\tWeber\n16020101\tUpper Weber\n16020102\tLower Weber\n160202\tJordan\n16020201\tUtah Lake\n16020202\tSpanish Fork\n16020203\tProvo\n16020204\tJordan\n160203\tGreat Salt Lake\n16020301\tHamlin-Snake Valleys\n16020302\tPine Valley\n16020303\tTule Valley\n16020304\tRush-Tooele Valleys\n16020305\tSkull Valley\n16020306\tSouthern Great Salt Lake Desert\n16020307\tPilot-Thousand Springs\n16020308\tNorthern Great Salt Lake Desert\n16020309\tCurlew Valley\n16020310\tGreat Salt Lake\n1603\tEscalante Desert-Sevier Lake\n160300\tEscalante Desert-Sevier Lake\n16030001\tUpper Sevier\n16030002\tEast Fork Sevier\n16030003\tMiddle Sevier\n16030004\tSan Pitch\n16030005\tLower Sevier\n16030006\tEscalante Desert\n16030007\tBeaver Bottoms-Upper Beaver\n16030008\tLower Beaver\n16030009\tSevier Lake\n1604\tBlack Rock Desert-Humboldt\n160401\tHumboldt\n16040101\tUpper Humboldt\n16040102\tNorth Fork Humboldt\n16040103\tSouth Fork Humboldt\n16040104\tPine\n16040105\tMiddle Humboldt\n16040106\tRock\n16040107\tReese\n16040108\tLower Humboldt\n16040109\tLittle Humboldt\n160402\tBlack Rock Desert\n16040201\tUpper Quinn\n16040202\tLower Quinn\n16040203\tSmoke Creek Desert\n16040204\tMassacre Lake\n16040205\tThousand-Virgin\n1605\tCentral Lahontan\n160501\tTruckee\n16050101\tLake Tahoe\n16050102\tTruckee\n16050103\tPyramid-Winnemucca Lakes\n16050104\tGranite Springs Valley\n160502\tCarson\n16050201\tUpper Carson\n16050202\tMiddle Carson\n16050203\tCarson Desert\n160503\tWalker\n16050301\tEast Walker\n16050302\tWest Walker\n16050303\tWalker\n16050304\tWalker Lake\n1606\tCentral Nevada Desert Basins\n160600\tCentral Nevada Desert Basins\n16060001\tDixie Valley\n16060002\tGabbs Valley\n16060003\tSouthern Big Smoky Valley\n16060004\tNorthern Big Smoky Valley\n16060005\tDiamond-Monitor Valleys\n16060006\tLittle Smoky-Newark Valleys\n16060007\tLong-Ruby Valleys\n16060008\tSpring-Steptoe Valleys\n16060009\tDry Lake Valley\n16060010\tFish Lake-Soda Spring Valleys\n16060011\tRalston-Stone Cabin Valleys\n16060012\tHot Creek-Railroad Valleys\n16060013\tCactus-Sarcobatus Flats\n16060014\tSand Spring-Tikaboo Valleys\n16060015\tIvanpah-Pahrump Valleys\n17\tPacific Northwest\n1701\tKootenai-Pend Oreille-Spokane\n170101\tKootenai\n17010101\tUpper Kootenai\n17010102\tFisher\n17010103\tYaak\n17010104\tLower Kootenai\n17010105\tMoyie\n170102\tPend Oreille\n17010201\tUpper Clark Fork\n17010202\tFlint-Rock\n17010203\tBlackfoot\n17010204\tMiddle Clark Fork\n17010205\tBitterroot\n17010206\tNorth Fork Flathead\n17010207\tMiddle Fork Flathead\n17010208\tFlathead Lake\n17010209\tSouth Fork Flathead\n17010210\tStillwater\n17010211\tSwan\n17010212\tLower Flathead\n17010213\tLower Clark Fork\n17010214\tPend Oreille Lake\n17010215\tPriest\n17010216\tPend Oreille\n170103\tSpokane\n17010301\tUpper Coeur D\'alene\n17010302\tSouth Fork Coeur D\'alene\n17010303\tCoeur D\'alene Lake\n17010304\tSt. Joe\n17010305\tUpper Spokane\n17010306\tHangman\n17010307\tLower Spokane\n17010308\tLittle Spokane\n1702\tUpper Columbia\n170200\tUpper Columbia\n17020001\tFranklin D. Roosevelt Lake\n17020002\tKettle\n17020003\tColville\n17020004\tSanpoil\n17020005\tChief Joseph\n17020006\tOkanogan\n17020007\tSimilkameen\n17020008\tMethow\n17020009\tLake Chelan\n17020010\tUpper Columbia-Entiat\n17020011\tWenatchee\n17020012\tMoses Coulee\n17020013\tUpper Crab\n17020014\tBanks Lake\n17020015\tLower Crab\n17020016\tUpper Columbia-Priest Rapids\n1703\tYakima\n170300\tYakima\n17030001\tUpper Yakima\n17030002\tNaches\n17030003\tLower Yakima, Washington\n1704\tUpper Snake\n170401\tSnake headwaters\n17040101\tSnake headwaters\n17040102\tGros Ventre\n17040103\tGreys-Hobock\n17040104\tPalisades\n17040105\tSalt\n170402\tUpper Snake\n17040201\tIdaho Falls\n17040202\tUpper Henrys\n17040203\tLower Henrys\n17040204\tTeton\n17040205\tWillow\n17040206\tAmerican Falls\n17040207\tBlackfoot\n17040208\tPortneuf\n17040209\tLake Walcott\n17040210\tRaft\n17040211\tGoose\n17040212\tUpper Snake-Rock\n17040213\tSalmon Falls\n17040214\tBeaver-Camas\n17040215\tMedicine Lodge\n17040216\tBirch\n17040217\tLittle Lost\n17040218\tBig Lost\n17040219\tBig Wood\n17040220\tCamas\n17040221\tLittle Wood\n1705\tMiddle Snake\n170501\tMiddle Snake-Boise\n17050101\tC. J. Idaho\n17050102\tBruneau\n17050103\tMiddle Snake-Succor\n17050104\tUpper Owyhee\n17050105\tSouth Fork Owyhee\n17050106\tEast Little Owyhee. Nevada,\n17050107\tMiddle Owyhee\n17050108\tJordan\n17050109\tCrooked-Rattlesnake\n17050110\tLower Owyhee\n17050111\tNorth and Middle Forks Boise\n17050112\tBoise-Mores\n17050113\tSouth Fork Boise\n17050114\tLower Boise\n17050115\tMiddle Snake-Payette\n17050116\tUpper Malheur\n17050117\tLower Malheur\n17050118\tBully\n17050119\tWillow\n17050120\tSouth Fork Payette\n17050121\tMiddle Fork Payette\n17050122\tPayette\n17050123\tNorth Fork Payette\n17050124\tWeiser\n170502\tMiddle Snake-Powder\n17050201\tBrownlee Reservoir\n17050202\tBurnt\n17050203\tPowder\n1706\tLower Snake\n170601\tLower Snake\n17060101\tHells Canyon\n17060102\tImnaha\n17060103\tLower Snake-Asotin\n17060104\tUpper Grande Ronde\n17060105\tWallowa\n17060106\tLower Grande Ronde\n17060107\tLower Snake-Tucannon\n17060108\tPalouse\n17060109\tRock\n17060110\tLower Snake\n170602\tSalmon\n17060201\tUpper Salmon\n17060202\tPahsimeroi\n17060203\tMiddle Salmon-Panther\n17060204\tLemhi\n17060205\tUpper Middle Fork Salmon\n17060206\tLower Middle Fork Salmon\n17060207\tMiddle Salmon-Chamberlain\n17060208\tSouth Fork Salmon\n17060209\tLower Salmon\n17060210\tLittle Salmon\n170603\tClearwater\n17060301\tUpper Selway\n17060302\tLower Selway\n17060303\tLochsa\n17060304\tMiddle Fork Clearwater\n17060305\tSouth Fork Clearwater\n17060306\tClearwater\n17060307\tUpper North Fork Clearwater\n17060308\tLower North Fork Clearwater\n1707\tMiddle Columbia\n170701\tMiddle Columbia\n17070101\tMiddle Columbia-Lake Wallula\n17070102\tWalla Walla\n17070103\tUmatilla\n17070104\tWillow\n17070105\tMiddle Columbia-Hood\n17070106\tKlickitat\n170702\tJohn Day\n17070201\tUpper John Day\n17070202\tNorth Fork John Day\n17070203\tMiddle Fork John Day\n17070204\tLower John Day\n170703\tDeschutes\n17070301\tUpper Deschutes\n17070302\tLittle Deschutes\n17070303\tBeaver-South Fork\n17070304\tUpper Crooked\n17070305\tLower Crooked\n17070306\tLower Deschutes\n17070307\tTrout\n1708\tLower Columbia\n170800\tLower Columbia\n17080001\tLower Columbia-Sandy\n17080002\tLewis\n17080003\tLower Columbia-Clatskanie\n17080004\tUpper Cowlitz\n17080005\tLower Cowlitz\n17080006\tLower Columbia\n1709\tWillamette\n170900\tWillamette\n17090001\tMiddle Fork Willamette\n17090002\tCoast Fork Willamette\n17090003\tUpper Willamette\n17090004\tMckenzie\n17090005\tNorth Santiam\n17090006\tSouth Santiam\n17090007\tMiddle Willamette\n17090008\tYamhill\n17090009\tMolalla-Pudding\n17090010\tTualatin\n17090011\tClackamas\n17090012\tLower Willamette\n1710\tOregon-Washington Coastal\n171001\tWashington Coastal\n17100101\tHoh-Quillayute\n17100102\tQueets-Quinault\n17100103\tUpper Chehalis\n17100104\tLower Chehalis\n17100105\tGrays Harbor\n17100106\tWillapa Bay\n171002\tNorthern Oregon Coastal\n17100201\tNecanicum\n17100202\tNehalem\n17100203\tWilson-Trask-Nestucca\n17100204\tSiletz-Yaquina\n17100205\tAlsea\n17100206\tSiuslaw\n17100207\tSiltcoos\n171003\tSouthern Oregon Coastal\n17100301\tNorth Umpqua\n17100302\tSouth Umpqua\n17100303\tUmpqua\n17100304\tCoos\n17100305\tCoquille\n17100306\tSixes\n17100307\tUpper Rogue\n17100308\tMiddle Rogue\n17100309\tApplegate\n17100310\tLower Rogue\n17100311\tIllinois\n17100312\tChetco\n1711\tPuget Sound\n171100\tPuget Sound\n17110001\tFraser\n17110002\tStrait of Georgia\n17110003\tSan Juan Islands\n17110004\tNooksack\n17110005\tUpper Skagit\n17110006\tSauk\n17110007\tLower Skagit\n17110008\tStillaguamish\n17110009\tSkykomish\n17110010\tSnoqualmie\n17110011\tSnohomish\n17110012\tLake Washington\n17110013\tDuwamish\n17110014\tPuyallup\n17110015\tNisqually\n17110016\tDeschutes\n17110017\tSkokomish\n17110018\tHood Canal\n17110019\tPuget Sound\n17110020\tDungeness-Elwha\n17110021\tCrescent-Hoko\n1712\tOregon closed basins\n171200\tOregon closed basins\n17120001\tHarney-Malheur Lakes\n17120002\tSilvies\n17120003\tDonner Und Blitzen\n17120004\tSilver\n17120005\tSummer Lake\n17120006\tLake Abert\n17120007\tWarner Lakes\n17120008\tGuano\n17120009\tAlvord Lake\n18\tCalifornia\n1801\tKlamath-Northern California Coastal\n180101\tNorthern California Coastal\n18010101\tSmith\n18010102\tMad-Redwood\n18010103\tUpper Eel\n18010104\tMiddle Fork Eel\n18010105\tLower Eel\n18010106\tSouth Fork Eel\n18010107\tMattole\n18010108\tBig-Navarro-Garcia\n18010109\tGualala-Salmon\n18010110\tRussian\n18010111\tBodega Bay\n180102\tKlamath\n18010201\tWilliamson\n18010202\tSprague\n18010203\tUpper Klamath Lake\n18010204\tLost\n18010205\tButte\n18010206\tUpper Klamath\n18010207\tShasta\n18010208\tScott\n18010209\tLower Klamath\n18010210\tSalmon\n18010211\tTrinity\n18010212\tSouth Fork Trinity\n1802\tSacramento\n180200\tUpper Sacramento\n18020001\tGoose Lake\n18020002\tUpper Pit\n18020003\tLower Pit\n18020004\tMccloud\n18020005\tSacramento headwaters\n180201\tLower Sacramento\n18020101\tSacramento-Lower Cow-Lower Clear\n18020102\tLower Cottonwood\n18020103\tSacramento-Lower Thomes\n18020104\tSacramento-Stone Corral\n18020105\tLower Butte\n18020106\tLower Feather\n18020107\tLower Yuba\n18020108\tLower Bear\n18020109\tLower Sacramento\n18020110\tLower Cache\n18020111\tLower American\n18020112\tSacramento-Upper Clear\n18020113\tCottonwood headwaters\n18020114\tUpper Elder-Upper Thomes\n18020115\tUpper Stony\n18020116\tUpper Cache\n18020117\tUpper Putah\n18020118\tUpper Cow-Battle\n18020119\tMill-Big Chico\n18020120\tUpper Butte\n18020121\tNorth Fork Feather\n18020122\tEast Branch North Fork Feather\n18020123\tMiddle Fork Feather\n18020124\tHoncut headwaters\n18020125\tUpper Yuba\n18020126\tUpper Bear\n18020127\tUpper Coon-Upper Auburn\n18020128\tNorth Fork American\n18020129\tSouth Fork American\n1803\tTulare-Buena Vista Lakes\n180300\tTulare-Buena Vista Lakes\n18030001\tUpper Kern\n18030002\tSouth Fork Kern\n18030003\tMiddle Kern-Upper Tehachapi-\n18030004\tUpper Poso\n18030005\tUpper Deer-Upper White\n18030006\tUpper Tule\n18030007\tUpper Kaweah\n18030008\tMill\n18030009\tUpper Dry\n18030010\tUpper King\n18030011\tUpper Los Gatos-Avenal\n18030012\tTulare-Buena Vista Lakes\n1804\tSan Joaquin\n180400\tSan Joaquin\n18040001\tMiddle San Joaquin-Lower\n18040002\tMiddle San Joaquin-Lower\n18040003\tSan Joaquin Delta\n18040004\tLower Calaveras-Mormon Slough\n18040005\tLower Cosumnes-Lower Mokelumne\n18040006\tUpper San Joaquin\n18040007\tUpper Chowchilla-Upper Fresno\n18040008\tUpper Merced\n18040009\tUpper Tuolumne\n18040010\tUpper Stanislaus\n18040011\tUpper Calaveras\n18040012\tUpper Mokelumne\n18040013\tUpper Cosumnes\n18040014\tPanoche-San Luis Reservoir\n1805\tSan Francisco Bay\n180500\tSan Francisco Bay\n18050001\tSuisun Bay\n18050002\tSan Pablo Bay\n18050003\tCoyote\n18050004\tSan Francisco Bay\n18050005\tTomales-Drake Bays\n18050006\tSan Francisco Coastal South\n1806\tCentral California Coastal\n180600\tCentral California Coastal\n18060001\tSan Lorenzo-Soquel\n18060002\tPajaro\n18060003\tCarrizo Plain\n18060004\tEstrella\n18060005\tSalinas\n18060006\tCentral Coastal\n18060007\tCuyama\n18060008\tSanta Maria\n18060009\tSan Antonio\n18060010\tSanta Ynez\n18060011\tAlisal-Elkhorn Sloughs\n18060012\tCarmel\n18060013\tSanta Barbara Coastal\n18060014\tSanta Barbara Channel Islands\n1807\tSouthern California Coastal\n180701\tVentura-San Gabriel Coastal\n18070101\tVentura\n18070102\tSanta Clara\n18070103\tCalleguas\n18070104\tSanta Monica Bay\n18070105\tLos Angeles\n18070106\tSan Gabriel\n18070107\tSan Pedro Channel Islands\n180702\tSanta Ana\n18070201\tSeal Beach\n18070202\tSan Jacinto\n18070203\tSanta Ana\n18070204\tNewport Bay\n180703\tLaguna-San Diego Coastal\n18070301\tAliso-San Onofre\n18070302\tSanta Margarita\n18070303\tSan Luis Rey-Escondido\n18070304\tSan Diego\n18070305\tCottonwood-Tijuana\n1808\tNorth Lahontan\n180800\tNorth Lahontan\n18080001\tSurprise Valley\n18080002\tMadeline Plains\n18080003\tHoney-Eagle Lakes\n1809\tNorthern Mojave-Mono Lake\n180901\tMono-Owens Lakes\n18090101\tMono Lake\n18090102\tCrowley Lake\n18090103\tOwens Lake\n180902\tNorthern Mojave\n18090201\tEureka-Saline Valleys\n18090202\tUpper Amargosa\n18090203\tDeath Valley-Lower Amargosa\n18090204\tPanamint Valley\n18090205\tIndian Wells-Searles Valleys\n18090206\tAntelope-Fremont Valleys\n18090207\tCoyote-Cuddeback Lakes\n18090208\tMojave\n1810\tSouthern Mojave-Salton Sea\n181001\tSouthern Mojave\n18100100\tSouthern Mojave\n181002\tSalton Sea\n18100200\tSalton Sea\n19\tAlaska\n1901\tSoutheast\n190101\tSouthern Southeast\n19010101\tSoutheast Mainland\n19010102\tKetchikan\n19010103\tPrince of Wales\n190102\tCentral Southeast\n19010201\tMainland\n19010202\tKuiu-Kupreanof-Mitkof-Etolin-Zarembo-Wrangell Islands\n19010203\tBaranof-Chichagof Islands\n19010204\tAdmiralty Island\n190103\tNorthern Southeast\n19010301\tLynn Canal\n19010302\tGlacier Bay\n19010303\tChilkat-Skagway Rivers\n190104\tGulf of Alaska\n19010401\tYakutat Bay\n19010402\tBering Glacier\n1902\tSouthcentral\n190201\tCopper River\n19020101\tUpper Copper River\n19020102\tMiddle Copper River\n19020103\tChitina River\n19020104\tLower Copper River\n190202\tPrince William Sound\n19020201\tEastern Prince William Sound\n19020202\tWestern Prince William Sound\n190203\tKenai Peninsula\n19020301\tLower Kenai Peninsula\n19020302\tUpper Kenai Peninsula\n190204\tKnik Arm\n19020401\tAnchorage\n19020402\tMatansuka\n190205\tSusitna River\n19020501\tUpper Susitna River\n19020502\tChulitna River\n19020503\tTalkeetna River\n19020504\tYentna River\n19020505\tLower Susitna River\n190206\tWestern Cook Inlet\n19020601\tRedoubt-Trading Bays\n19020602\tTuxdeni-Kamishak Bays\n190207\tKodiak-Shelikof\n19020701\tKodiak-Afognak Islands\n19020702\tShelikof Straight\n1903\tSouthwest\n190301\tAleutian Islands\n19030101\tCold Bay\n19030102\tFox Islands\n19030103\tWestern Aleutian\n19030104\tPribilof Islands\n190302\tKvichak-Port Heiden\n19030201\tPort Heiden\n19030202\tUgashik Bay\n19030203\tEgegik Bay\n19030204\tNaknek\n19030205\tLake Clark\n19030206\tLake Iliamna\n190303\tNushagak River\n19030301\tUpper Nushagak River\n19030302\tMulchatna River\n19030303\tLower Nushagak River\n19030304\tWood River\n19030305\tTogiak\n190304\tUpper Kuskokwim River\n19030401\tNorth Fork Kuskokwim River\n19030402\tFarewll Lake\n19030403\tTakotna River\n19030404\tHolitna River\n19030405\tStony River\n190305\tLower Kuskokwim River\n19030501\tAniak\n19030502\tKuskokwim Delta\n19030503\tNunavak-St. Matthew Islands\n1904\tYukon\n190401\tCanada\n19040101\tWhite River\n19040102\tLadue River\n19040103\tSixtymile River\n19040104\tFortymile River\n190402\tPorcupine River\n19040201\tOld Crow River\n19040202\tColeen River\n19040203\tSheenjek River\n19040204\tBlack River\n19040205\tPorcupine Flats\n190403\tChandalar-Christian Rivers\n19040301\tMiddle Fork-North Fork Chandalar Rivers\n19040302\tEast Fork Chandalar River\n19040303\tChristian River\n19040304\tLower Chandalar River\n190404\tUpper Yukon River\n19040401\tEagle To Circle\n19040402\tBirch-Beaver Creeks\n19040403\tYukon Flats\n19040404\tRamparts\n190405\tTanana River\n19040501\tNebesna-Chisana Rivers\n19040502\tTok\n19040503\tHealy Lake\n19040504\tDelta River\n19040505\tSalcha River\n19040506\tChena River\n19040507\tTanana River\n19040508\tNenana River\n19040509\tTolovana River\n19040510\tKantishna River\n19040511\tLower Tanana River\n190406\tKoyukuk River\n19040601\tUpper Koyukuk River\n19040602\tSouth Fork Koyukuk River\n19040603\tAlatna River\n19040604\tKanuti River\n19040605\tAllakaket River\n19040606\tHuslia River\n19040607\tDulbi River\n19040608\tKoyukuk Flats\n19040609\tKateel River\n190407\tCentral Yukon\n19040701\tTozitna River\n19040702\tNowitna River\n19040703\tMelozitna River\n19040704\tRamparts to Ruby\n19040705\tGalena\n190408\tLower Yukon\n19040801\tAnvik River\n19040802\tUpper Innoko River\n19040803\tLower Innoko River\n19040804\tAnvik to Pilot Station\n19040805\tYukon Delta\n1905\tNorthwest\n190501\tNorton Sound\n19050101\tSt. Lawrence Island\n19050102\tUnalakleet\n19050103\tNorton Bay\n19050104\tNome\n19050105\tImuruk Basin\n190502\tNorthern Seward Peninsula\n19050201\tShishmaref\n19050202\tGoodhope-Spafarief Bay\n19050203\tBuckland River\n190503\tKobuk-Selawik Rivers\n19050301\tSelawik Lake\n19050302\tUpper Kobuk River\n19050303\tMiddle Kobuk River\n19050304\tLower Kobuk River\n190504\tNoatak River-Lisburne Peninsula\n19050401\tUpper Noatak River\n19050402\tMiddle Noatak River\n19050403\tLower Noatak River\n19050404\tWulik-Kivalina Rivers\n19050405\tLisburne Peninsula\n1906\tArctic\n190601\tWestern Arctic\n19060101\tKukpowruk River\n19060102\tKokolik River\n19060103\tUtukok River\n190602\tBarrow\n19060201\tKuk River\n19060202\tNorthwest Coast\n19060203\tMeade River\n19060204\tIkpikpuk River\n19060205\tHarrison Bay\n190603\tColville River\n19060301\tUpper Colville River\n19060302\tKillik River\n19060303\tChandler-Anaktuvuk Rivers\n19060304\tLower Colville River\n190604\tPrudhoe Bay\n19060401\tKuparuk River\n19060402\tSagavanirktok River\n19060403\tMikkelson Bay\n190605\tEastern Arctic\n19060501\tCanning River\n19060502\tCamden Bay\n19060503\tBeaufort Lagoon\n20\tHawaii\n2001\tHawaii\n200100\tHawaii\n20010000\tHawaii\n2002\tMaui\n200200\tMaui\n20020000\tMaui\n2003\tKahoolawe\n200300\tKahoolawe\n20030000\tKahoolawe\n2004\tLanai\n200400\tLanai\n20040000\tLanai\n2005\tMolokai\n200500\tMolokai\n20050000\tMolokai\n2006\tOahu\n200600\tOahu\n20060000\tOahu\n2007\tKauai\n200700\tKauai\n20070000\tKauai\n2008\tNiihau\n200800\tNiihau\n20080000\tNiihau\n2009\tNorthwestern Hawaiian Islands\n200900\tNorthwestern Hawaiian Islands\n20090000\tNorthwestern Hawaiian Islands\n21\tCaribbean\n2101\tPuerto Rico\n210100\tPuerto Rico\n21010001\tInterior Puerto Rico\n21010002\tCibuco-Guajataca\n21010003\tCulebrinas-Guanajibo\n21010004\tSouthern Puerto Rico\n21010005\tEastern Puerto Rico\n21010006\tPuerto Rican Islands\n2102\tVirgin Islands\n210200\tVirgin Islands\n21020001\tSt. John-St. Thomas\n21020002\tSt. Croix\n2103\tCaribbean Outlying Areas\n210300\tCaribbean Outlying Areas\n21030001\tCanal Zone\n21030002\tNavassa\n21030003\tRoncador-Serrana\n</pre>\n\t\t</td>\n </tr>\n </tbody>\n </table>\n\t<div align="center" class="bottombox"><span class="info"></span></div>\n\t<!--#include virtual="/inc/footer_water.html" -->\n <!--#include virtual="/inc/footer.html" -->\n</body>\n</html>'
|
# Copyright 2020 Joshua Laniado and Todd O. Yeates.
__author__ = "Joshua Laniado and Todd O. Yeates"
__copyright__ = "Copyright 2020, Nanohedra"
__version__ = "1.0"
# SYMMETRY COMBINATION MATERIAL TABLE (T.O.Y and J.L, 2020)
sym_comb_dict = {
1: [1, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'C2', 1, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'D2', 'D2', 0, 'N/A', 4, 2],
2: [2, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'C3', 2, ['r:<0,0,1,c>'], 1, '<e,0.577350*e,0>', 'C6', 'p6', 2, '(2*e, 2*e), 120', 4, 6],
3: [3, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'D3', 'D3', 0, 'N/A', 4, 2],
4: [4, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 6, '<e,0,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'D3', 'p312', 2, '(2*e, 2*e), 120', 5, 6],
5: [5, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 4, '<0,0,0>', 'T', 'T', 0, 'N/A', 4, 3],
6: [6, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,e,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 4, '<0,0,0>', 'T', 'I213', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 5, 10],
7: [7, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,0,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 4, '<0,0,0>', 'O', 'O', 0, 'N/A', 4, 4],
8: [8, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<2*e,e,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 4, '<0,0,0>', 'O', 'P4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 5, 10],
9: [9, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 7, '<0,0,0>', 'I', 'I', 0, 'N/A', 4, 5],
10: [10, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'C4', 3, ['r:<0,0,1,c>'], 1, '<0,0,0>', 'C4', 'p4', 2, '(2*e, 2*e), 90', 4, 4],
11: [11, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'C4', 3, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'D4', 'D4', 0, 'N/A', 4, 2],
12: [12, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 8, '<0,0,0>', 'C4', 3, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<e,0,0>', 'D4', 'p4212', 2, '(2*e, 2*e), 90', 5, 4],
13: [13, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,0,0>', 'C4', 3, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'O', 'O', 0, 'N/A', 4, 3],
14: [14, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<2*e,e,0>', 'C4', 3, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 5, 8],
15: [15, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'C5', 4, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'D5', 'D5', 0, 'N/A', 4, 2],
16: [16, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'C5', 4, ['r:<0,0,1,c>', 't:<0,0,d>'], 9, '<0,0,0>', 'I', 'I', 0, 'N/A', 4, 3],
17: [17, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'C6', 5, ['r:<0,0,1,c>'], 1, '<0,0,0>', 'C6', 'p6', 2, '(2*e, 2*e), 120', 4, 3],
18: [18, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'C6', 5, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'D6', 'D6', 0, 'N/A', 4, 2],
19: [19, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 6, '<e,0,0>', 'C6', 5, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 5, 4],
20: [20, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,f,0>', 'D2', 6, ['None'], 1, '<0,0,0>', 'D2', 'c222', 2, '(4*e, 4*f), 90', 4, 4],
21: [21, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 8, '<0,0,0>', 'D2', 6, ['None'], 1, '<e,0,0>', 'D4', 'p422', 2, '(2*e, 2*e), 90', 3, 4],
22: [22, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,e,f>', 'D2', 6, ['None'], 5, '<0,0,0>', 'D4', 'I4122', 3, '(4*e, 4*e, 8*f), (90, 90, 90)', 4, 6],
23: [23, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 10, '<0,0,0>', 'D2', 6, ['None'], 1, '<e,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 3],
24: [24, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 10, '<0,0,e>', 'D2', 6, ['None'], 1, '<f,0,0>', 'D6', 'P6222', 3, '(2*f, 2*f, 6*e), (90, 90, 120)', 4, 6],
25: [25, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,0,0>', 'D2', 6, ['None'], 5, '<2*e,0,e>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 4],
26: [26, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<-2*e,3*e,0>', 'D2', 6, ['None'], 5, '<0,2*e,e>', 'O', 'I4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 3, 3],
27: [27, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 6, '<e,0,0>', 'D3', 7, ['None'], 11, '<0,0,0>', 'D3', 'p312', 2, '(2*e, 2*e), 120', 3, 3],
28: [28, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,e,f>', 'D3', 7, ['None'], 1, '<0,0,0>', 'D3', 'R32', 3, '(3.4641*e, 3.4641*e, 3*f), (90, 90, 120)', 4, 4],
29: [29, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 2],
30: [30, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 2],
31: [31, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,f>', 'D6', 'P6322', 3, '(2*e, 2*e, 4*f), (90, 90, 120)', 4, 4],
32: [32, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'D3', 7, ['None'], 4, '<e,e,e>', 'O', 'F4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 3, 3],
33: [33, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,2*e,0>', 'D3', 7, ['None'], 4, '<e,e,e>', 'O', 'I4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 3, 2],
34: [34, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,0,0>', 'D3', 7, ['None'], 4, '<e,e,e>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 4],
35: [35, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,e,-2*e>', 'D3', 7, ['None'], 4, '<e,e,e>', 'O', 'I4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 3, 2],
36: [36, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,e,-2*e>', 'D3', 7, ['None'], 4, '<3*e,3*e,3*e>', 'O', 'P4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 3, 3],
37: [37, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 'p422', 2, '(2*e, 2*e), 90', 3, 2],
38: [38, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,e,0>', 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 'p422', 2, '(2*e, 2*e), 90', 3, 2],
39: [39, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 8, '<0,e,f>', 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 'I422', 3, '(2*e, 2*e, 4*f), (90, 90, 90)', 4, 4],
40: [40, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,0,0>', 'D4', 8, ['None'], 1, '<0,0,e>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 3],
41: [41, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<2*e,e,0>', 'D4', 8, ['None'], 1, '<2*e,2*e,0>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 2],
42: [42, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 2],
43: [43, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 6, '<e,0,0>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 2],
44: [44, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 6, '<e,0,f>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'P622', 3, '(2*e, 2*e, 2*f), (90, 90, 120)', 4, 4],
45: [45, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'T', 10, ['None'], 1, '<0,0,0>', 'T', 'P23', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2],
46: [46, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,e,0>', 'T', 10, ['None'], 1, '<0,0,0>', 'T', 'F23', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 3],
47: [47, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<2*e,3*e,0>', 'T', 10, ['None'], 1, '<0,4*e,0>', 'O', 'F4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 3, 2],
48: [48, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2],
49: [49, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,e,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'F432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 2],
50: [50, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<e,0,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'F432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2],
51: [51, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,e,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2],
52: [52, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<-e,e,e>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 2],
53: [53, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'C3', 2, ['r:<0,0,1,c>'], 1, '<e,0.57735*e,0>', 'C3', 'p3', 2, '(2*e, 2*e), 120', 4, 3],
54: [54, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 12, '<0,0,0>', 'T', 'T', 0, 'N/A', 4, 2],
55: [55, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 12, '<e,0,0>', 'T', 'P213', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 5, 5],
56: [56, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'C4', 3, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'O', 'O', 0, 'N/A', 4, 2],
57: [57, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'C4', 3, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<e,0,0>', 'O', 'F432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 5, 6],
58: [58, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 7, '<0,0,0>', 'C5', 4, ['r:<0,0,1,c>', 't:<0,0,d>'], 9, '<0,0,0>', 'I', 'I', 0, 'N/A', 4, 2],
59: [59, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0.57735*e,0>', 'C6', 5, ['r:<0,0,1,c>'], 1, '<0,0,0>', 'C6', 'p6', 2, '(2*e, 2*e), 120', 4, 2],
60: [60, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0.57735*e,0>', 'D2', 6, ['None'], 1, '<e,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 2],
61: [61, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'D2', 6, ['None'], 1, '<e,0,0>', 'T', 'P23', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 3],
62: [62, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'D2', 6, ['None'], 3, '<e,0,e>', 'O', 'F432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 3],
63: [63, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'D2', 6, ['None'], 3, '<2*e,e,0>', 'O', 'I4132', 3, '(8*e,8*e, 8*e), (90, 90, 90)', 3, 2],
64: [64, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0.57735*e,0>', 'D3', 7, ['None'], 11, '<0,0,0>', 'D3', 'p312', 2, '(2*e, 2*e), 120', 3, 2],
65: [65, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0.57735*e,0>', 'D3', 7, ['None'], 1, '<0,0,0>', 'D3', 'p321', 2, '(2*e, 2*e), 120', 3, 2],
66: [66, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 12, '<4*e,0,0>', 'D3', 7, ['None'], 4, '<3*e,3*e,3*e>', 'O', 'P4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 3, 4],
67: [67, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'D4', 8, ['None'], 1, '<0,0,e>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2],
68: [68, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0.57735*e,0>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 2],
69: [69, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<e,0,0>', 'T', 10, ['None'], 1, '<0,0,0>', 'T', 'F23', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2],
70: [70, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<e,0,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'F432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2],
71: [71, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'C4', 3, ['r:<0,0,1,c>'], 1, '<e,e,0>', 'C4', 'p4', 2, '(2*e, 2*e), 90', 4, 2],
72: [72, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'C4', 3, ['r:<0,0,1,c>', 't:<0,0,d>'], 2, '<0,e,e>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 5, 4],
73: [73, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'D2', 6, ['None'], 1, '<e,0,0>', 'D4', 'p422', 2, '(2*e, 2*e), 90', 3, 2],
74: [74, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'D2', 6, ['None'], 5, '<0,0,0>', 'D4', 'p4212', 2, '(2*e, 2*e), 90', 3, 2],
75: [75, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'D2', 6, ['None'], 3, '<2*e,e,0>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 2],
76: [76, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'D2', 6, ['None'], 3, '<e,0,e>', 'O', 'F432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 3],
77: [77, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'D3', 7, ['None'], 4, '<e,e,e>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 2],
78: [78, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,e,0>', 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 'p422', 2, '(2*e, 2*e), 90', 3, 2],
79: [79, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'D4', 8, ['None'], 1, '<e,e,0>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2],
80: [80, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'T', 10, ['None'], 1, '<e,e,e>', 'O', 'F432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 2],
81: [81, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,e,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2],
82: [82, 'C6', 5, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'D2', 6, ['None'], 1, '<e,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 2],
83: [83, 'C6', 5, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 2, 2],
84: [84, 'D2', 6, ['None'], 1, '<0,0,0>', 'D2', 6, ['None'], 1, '<e,f,0>', 'D2', 'p222', 2, '(2*e, 2*f), 90', 2, 2],
85: [85, 'D2', 6, ['None'], 1, '<0,0,0>', 'D2', 6, ['None'], 1, '<e,f,g>', 'D2', 'F222', 3, '(4*e, 4*f, 4*g), (90, 90, 90)', 3, 3],
86: [86, 'D2', 6, ['None'], 1, '<e,0,0>', 'D2', 6, ['None'], 5, '<0,0,f>', 'D4', 'P4222', 3, '(2*e, 2*e, 4*f), (90, 90, 90)', 2, 2],
87: [87, 'D2', 6, ['None'], 1, '<e,0,0>', 'D2', 6, ['None'], 13, '<0,0,-f>', 'D6', 'P6222', 3, '(2*e, 2*e, 6*f), (90, 90, 120)', 2, 2],
88: [88, 'D2', 6, ['None'], 3, '<0,e,2*e>', 'D2', 6, ['None'], 5, '<0,2*e,e>', 'O', 'P4232', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 2],
89: [89, 'D2', 6, ['None'], 1, '<e,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 1, 1],
90: [90, 'D2', 6, ['None'], 1, '<e,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,f>', 'D6', 'P622', 3, '(2*e, 2*e, 2*f), (90, 90, 120)', 2, 2],
91: [91, 'D2', 6, ['None'], 1, '<0,0,2*e>', 'D3', 7, ['None'], 4, '<e,e,e>', 'D6', 'P4232', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 2],
92: [92, 'D2', 6, ['None'], 3, '<2*e,e,0>', 'D3', 7, ['None'], 4, '<e,e,e>', 'O', 'I4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 1, 1],
93: [93, 'D2', 6, ['None'], 1, '<e,0,0>', 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 'p422', 2, '(2*e, 2*e), 90', 1, 1],
94: [94, 'D2', 6, ['None'], 1, '<e,0,f>', 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 'P422', 3, '(2*e, 2*e, 2*f), (90, 90,90)', 2, 2],
95: [95, 'D2', 6, ['None'], 5, '<e,0,f>', 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 'I422', 3, '(2*e, 2*e, 4*f), (90, 90,90)', 2, 2],
96: [96, 'D2', 6, ['None'], 3, '<0,e,2*e>', 'D4', 8, ['None'], 1, '<0,0,2*e>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 1],
97: [97, 'D2', 6, ['None'], 1, '<e,0,0>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 1, 1],
98: [98, 'D2', 6, ['None'], 1, '<e,0,f>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'P622', 3, '(2*e, 2*e, 2*f), (90, 90, 120)', 2, 2],
99: [99, 'D2', 6, ['None'], 1, '<e,0,0>', 'T', 10, ['None'], 1, '<0,0,0>', 'T', 'P23', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 1],
100: [100, 'D2', 6, ['None'], 1, '<e,e,0>', 'T', 10, ['None'], 1, '<0,0,0>', 'T', 'P23', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 2],
101: [101, 'D2', 6, ['None'], 3, '<e,0,e>', 'T', 10, ['None'], 1, '<e,e,e>', 'O', 'F432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 1],
102: [102, 'D2', 6, ['None'], 3, '<2*e,e,0>', 'T', 10, ['None'], 1, '<0,0,0>', 'O', 'P4232', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 2],
103: [103, 'D2', 6, ['None'], 3, '<e,0,e>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'F432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 1],
104: [104, 'D2', 6, ['None'], 3, '<2*e,e,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 2],
105: [105, 'D3', 7, ['None'], 11, '<0,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,0>', 'D3', 'p312', 2, '(2*e, 2*e), 120', 1, 1],
106: [106, 'D3', 7, ['None'], 11, '<0,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,f>', 'D3', 'P312', 3, '(2*e, 2*e, 2*f), (90, 90, 120)', 2, 2],
107: [107, 'D3', 7, ['None'], 1, '<0,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,f>', 'D6', 'P6322', 3, '(2*e, 2*e, 4*f), (90, 90, 120)', 2, 2],
108: [108, 'D3', 7, ['None'], 4, '<e,e,e>', 'D3', 7, ['None'], 12, '<e,3*e,e>', 'O', 'P4232', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 2],
109: [109, 'D3', 7, ['None'], 4, '<3*e,3*e,3*e>', 'D3', 7, ['None'], 12, '<e,3*e,5*e>', 'O', 'P4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 1, 1],
110: [110, 'D3', 7, ['None'], 4, '<e,e,e>', 'D4', 8, ['None'], 1, '<0,0,2*e>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 2],
111: [111, 'D3', 7, ['None'], 11, '<e,0.57735*e,0>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 1, 1],
112: [112, 'D3', 7, ['None'], 11, '<e,0.57735*e,f>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'P622', 3, '(2*e, 2*e, 2*f), (90, 90, 120)', 2, 2],
113: [113, 'D3', 7, ['None'], 4, '<e,e,e>', 'T', 10, ['None'], 1, '<0,0,0>', 'O', 'F4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 1, 1],
114: [114, 'D3', 7, ['None'], 4, '<e,e,e>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 1],
115: [115, 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 8, ['None'], 1, '<e,e,0>', 'D4', 'p422', 2, '(2*e, 2*e), 90', 1, 1],
116: [116, 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 8, ['None'], 1, '<e,e,f>', 'D4', 'P422', 3, '(2*e, 2*e, 2*f), (90, 90,90)', 2, 2],
117: [117, 'D4', 8, ['None'], 1, '<0,0,e>', 'D4', 8, ['None'], 2, '<0,e,e>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 1],
118: [118, 'D4', 8, ['None'], 1, '<0,0,e>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 1],
119: [119, 'D4', 8, ['None'], 1, '<e,e,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 1],
120: [120, 'T', 10, ['None'], 1, '<0,0,0>', 'T', 10, ['None'], 1, '<e,e,e>', 'T', 'F23', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 1],
121: [121, 'T', 10, ['None'], 1, '<0,0,0>', 'T', 10, ['None'], 1, '<e,0,0>', 'T', 'F23', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 1],
122: [122, 'T', 10, ['None'], 1, '<e,e,e>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'F432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 1],
123: [123, 'O', 11, ['None'], 1, '<0,0,0>', 'O', 11, ['None'], 1, '<e,e,e>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 1],
124: [124, 'O', 11, ['None'], 1, '<0,0,0>', 'O', 11, ['None'], 1, '<e,0,0>', 'O', 'F432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 1]}
# ROTATION RANGE DEG
C2 = 180
C3 = 120
C4 = 90
C5 = 72
C6 = 60
RotRangeDict = {"C2": C2, "C3": C3, "C4": C4, "C5": C5, "C6": C6}
# ROTATION SETTING MATRICES
RotMat1 = [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]
RotMat2 = [[0.0, 0.0, 1.0], [0.0, 1.0, 0.0], [-1.0, 0.0, 0.0]]
RotMat3 = [[0.707107, 0.0, 0.707107], [0.0, 1.0, 0.0], [-0.707107, 0.0, 0.707107]]
RotMat4 = [[0.707107, 0.408248, 0.577350], [-0.707107, 0.408248, 0.577350], [0.0, -0.816497, 0.577350]]
RotMat5 = [[0.707107, 0.707107, 0.0], [-0.707107, 0.707107, 0.0], [0.0, 0.0, 1.0]]
RotMat6 = [[1.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, -1.0, 0.0]]
RotMat7 = [[1.0, 0.0, 0.0], [0.0, 0.934172, 0.356822], [0.0, -0.356822, 0.934172]]
RotMat8 = [[0.0, 0.707107, 0.707107], [0.0, -0.707107, 0.707107], [1.0, 0.0, 0.0]]
RotMat9 = [[0.850651, 0.0, 0.525732], [0.0, 1.0, 0.0], [-0.525732, 0.0, 0.850651]]
RotMat10 = [[0.0, 0.5, 0.866025], [0.0, -0.866025, 0.5], [1.0, 0.0, 0.0]]
RotMat11 = [[0.0, -1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, 1.0]]
RotMat12 = [[0.707107, -0.408248, 0.577350], [0.707107, 0.408248, -0.577350], [0.0, 0.816497, 0.577350]]
RotMat13 = [[0.5, -0.866025, 0.0], [0.866025, 0.5, 0.0], [0.0, 0.0, 1.0]]
RotSetDict = {1: RotMat1,
2: RotMat2,
3: RotMat3,
4: RotMat4,
5: RotMat5,
6: RotMat6,
7: RotMat7,
8: RotMat8,
9: RotMat9,
10: RotMat10,
11: RotMat11,
12: RotMat12,
13: RotMat13}
class SymEntry:
def __init__(self, entry):
if type(entry) == int and entry in range(1, 125):
# GETTING ENTRY INFORMATION FROM sym_comb_dict
self.entry_number = entry
sym_comb_info = sym_comb_dict[self.entry_number]
# ASSIGNING CLASS VARIABLES
self.group1 = sym_comb_info[1]
self.group1_indx = sym_comb_info[2]
self.int_dof_group1 = sym_comb_info[3]
self.rot_set_group1 = sym_comb_info[4]
self.ref_frame_tx_dof_group1 = sym_comb_info[5]
self.group2 = sym_comb_info[6]
self.group2_indx = sym_comb_info[7]
self.int_dof_group2 = sym_comb_info[8]
self.rot_set_group2 = sym_comb_info[9]
self.ref_frame_tx_dof_group2 = sym_comb_info[10]
self.pt_grp = sym_comb_info[11]
self.result = sym_comb_info[12]
self.dim = sym_comb_info[13]
self.unit_cell = sym_comb_info[14]
self.tot_dof = sym_comb_info[15]
self.cycle_size = sym_comb_info[16]
else:
raise ValueError("\nINVALID SYMMETRY ENTRY. SUPPORTED VALUES ARE: 1 to 124\n")
def get_group1_sym(self):
return self.group1
def get_group2_sym(self):
return self.group2
def get_pt_grp_sym(self):
return self.pt_grp
def get_rot_range_deg_1(self):
if self.group1 in RotRangeDict:
return RotRangeDict[self.group1]
else:
return 0
def get_rot_range_deg_2(self):
if self.group2 in RotRangeDict:
return RotRangeDict[self.group2]
else:
return 0
def get_rot_set_mat_group1(self):
return RotSetDict[self.rot_set_group1]
def get_ref_frame_tx_dof_group1(self):
return self.ref_frame_tx_dof_group1
def get_rot_set_mat_group2(self):
return RotSetDict[self.rot_set_group2]
def get_ref_frame_tx_dof_group2(self):
return self.ref_frame_tx_dof_group2
def get_result_design_sym(self):
return self.result
def get_design_dim(self):
return self.dim
def get_uc_spec_string(self):
return self.unit_cell
def is_internal_tx1(self):
if 't:<0,0,b>' in self.int_dof_group1:
return True
else:
return False
def is_internal_tx2(self):
if 't:<0,0,d>' in self.int_dof_group2:
return True
else:
return False
def get_internal_tx1(self):
if 't:<0,0,b>' in self.int_dof_group1:
return 't:<0,0,b>'
else:
return None
def get_internal_tx2(self):
if 't:<0,0,d>' in self.int_dof_group2:
return 't:<0,0,d>'
else:
return None
def is_internal_rot1(self):
if 'r:<0,0,1,a>' in self.int_dof_group1:
return True
else:
return False
def is_internal_rot2(self):
if 'r:<0,0,1,c>' in self.int_dof_group2:
return True
else:
return False
def get_internal_rot1(self):
if 'r:<0,0,1,a>' in self.int_dof_group1:
return 'r:<0,0,1,a>'
else:
return None
def get_internal_rot2(self):
if 'r:<0,0,1,c>' in self.int_dof_group2:
return 'r:<0,0,1,c>'
else:
return None
def is_ref_frame_tx_dof1(self):
if self.ref_frame_tx_dof_group1 != '<0,0,0>':
return True
else:
return False
def is_ref_frame_tx_dof2(self):
if self.ref_frame_tx_dof_group2 != '<0,0,0>':
return True
else:
return False
|
__author__ = 'Joshua Laniado and Todd O. Yeates'
__copyright__ = 'Copyright 2020, Nanohedra'
__version__ = '1.0'
sym_comb_dict = {1: [1, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'C2', 1, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'D2', 'D2', 0, 'N/A', 4, 2], 2: [2, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'C3', 2, ['r:<0,0,1,c>'], 1, '<e,0.577350*e,0>', 'C6', 'p6', 2, '(2*e, 2*e), 120', 4, 6], 3: [3, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'D3', 'D3', 0, 'N/A', 4, 2], 4: [4, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 6, '<e,0,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'D3', 'p312', 2, '(2*e, 2*e), 120', 5, 6], 5: [5, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 4, '<0,0,0>', 'T', 'T', 0, 'N/A', 4, 3], 6: [6, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,e,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 4, '<0,0,0>', 'T', 'I213', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 5, 10], 7: [7, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,0,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 4, '<0,0,0>', 'O', 'O', 0, 'N/A', 4, 4], 8: [8, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<2*e,e,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 4, '<0,0,0>', 'O', 'P4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 5, 10], 9: [9, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 7, '<0,0,0>', 'I', 'I', 0, 'N/A', 4, 5], 10: [10, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'C4', 3, ['r:<0,0,1,c>'], 1, '<0,0,0>', 'C4', 'p4', 2, '(2*e, 2*e), 90', 4, 4], 11: [11, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'C4', 3, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'D4', 'D4', 0, 'N/A', 4, 2], 12: [12, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 8, '<0,0,0>', 'C4', 3, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<e,0,0>', 'D4', 'p4212', 2, '(2*e, 2*e), 90', 5, 4], 13: [13, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,0,0>', 'C4', 3, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'O', 'O', 0, 'N/A', 4, 3], 14: [14, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<2*e,e,0>', 'C4', 3, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 5, 8], 15: [15, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'C5', 4, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'D5', 'D5', 0, 'N/A', 4, 2], 16: [16, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'C5', 4, ['r:<0,0,1,c>', 't:<0,0,d>'], 9, '<0,0,0>', 'I', 'I', 0, 'N/A', 4, 3], 17: [17, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'C6', 5, ['r:<0,0,1,c>'], 1, '<0,0,0>', 'C6', 'p6', 2, '(2*e, 2*e), 120', 4, 3], 18: [18, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'C6', 5, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'D6', 'D6', 0, 'N/A', 4, 2], 19: [19, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 6, '<e,0,0>', 'C6', 5, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 5, 4], 20: [20, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,f,0>', 'D2', 6, ['None'], 1, '<0,0,0>', 'D2', 'c222', 2, '(4*e, 4*f), 90', 4, 4], 21: [21, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 8, '<0,0,0>', 'D2', 6, ['None'], 1, '<e,0,0>', 'D4', 'p422', 2, '(2*e, 2*e), 90', 3, 4], 22: [22, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,e,f>', 'D2', 6, ['None'], 5, '<0,0,0>', 'D4', 'I4122', 3, '(4*e, 4*e, 8*f), (90, 90, 90)', 4, 6], 23: [23, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 10, '<0,0,0>', 'D2', 6, ['None'], 1, '<e,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 3], 24: [24, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 10, '<0,0,e>', 'D2', 6, ['None'], 1, '<f,0,0>', 'D6', 'P6222', 3, '(2*f, 2*f, 6*e), (90, 90, 120)', 4, 6], 25: [25, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,0,0>', 'D2', 6, ['None'], 5, '<2*e,0,e>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 4], 26: [26, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<-2*e,3*e,0>', 'D2', 6, ['None'], 5, '<0,2*e,e>', 'O', 'I4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 3, 3], 27: [27, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 6, '<e,0,0>', 'D3', 7, ['None'], 11, '<0,0,0>', 'D3', 'p312', 2, '(2*e, 2*e), 120', 3, 3], 28: [28, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,e,f>', 'D3', 7, ['None'], 1, '<0,0,0>', 'D3', 'R32', 3, '(3.4641*e, 3.4641*e, 3*f), (90, 90, 120)', 4, 4], 29: [29, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 2], 30: [30, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 2], 31: [31, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,f>', 'D6', 'P6322', 3, '(2*e, 2*e, 4*f), (90, 90, 120)', 4, 4], 32: [32, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'D3', 7, ['None'], 4, '<e,e,e>', 'O', 'F4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 3, 3], 33: [33, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,2*e,0>', 'D3', 7, ['None'], 4, '<e,e,e>', 'O', 'I4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 3, 2], 34: [34, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,0,0>', 'D3', 7, ['None'], 4, '<e,e,e>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 4], 35: [35, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,e,-2*e>', 'D3', 7, ['None'], 4, '<e,e,e>', 'O', 'I4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 3, 2], 36: [36, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,e,-2*e>', 'D3', 7, ['None'], 4, '<3*e,3*e,3*e>', 'O', 'P4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 3, 3], 37: [37, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 'p422', 2, '(2*e, 2*e), 90', 3, 2], 38: [38, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,e,0>', 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 'p422', 2, '(2*e, 2*e), 90', 3, 2], 39: [39, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 8, '<0,e,f>', 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 'I422', 3, '(2*e, 2*e, 4*f), (90, 90, 90)', 4, 4], 40: [40, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,0,0>', 'D4', 8, ['None'], 1, '<0,0,e>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 3], 41: [41, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<2*e,e,0>', 'D4', 8, ['None'], 1, '<2*e,2*e,0>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 2], 42: [42, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 2], 43: [43, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 6, '<e,0,0>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 2], 44: [44, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 6, '<e,0,f>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'P622', 3, '(2*e, 2*e, 2*f), (90, 90, 120)', 4, 4], 45: [45, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'T', 10, ['None'], 1, '<0,0,0>', 'T', 'P23', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2], 46: [46, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,e,0>', 'T', 10, ['None'], 1, '<0,0,0>', 'T', 'F23', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 3], 47: [47, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<2*e,3*e,0>', 'T', 10, ['None'], 1, '<0,4*e,0>', 'O', 'F4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 3, 2], 48: [48, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2], 49: [49, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,e,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'F432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 2], 50: [50, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<e,0,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'F432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2], 51: [51, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<0,e,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2], 52: [52, 'C2', 1, ['r:<0,0,1,a>', 't:<0,0,b>'], 3, '<-e,e,e>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 2], 53: [53, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'C3', 2, ['r:<0,0,1,c>'], 1, '<e,0.57735*e,0>', 'C3', 'p3', 2, '(2*e, 2*e), 120', 4, 3], 54: [54, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 12, '<0,0,0>', 'T', 'T', 0, 'N/A', 4, 2], 55: [55, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'C3', 2, ['r:<0,0,1,c>', 't:<0,0,d>'], 12, '<e,0,0>', 'T', 'P213', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 5, 5], 56: [56, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'C4', 3, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<0,0,0>', 'O', 'O', 0, 'N/A', 4, 2], 57: [57, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'C4', 3, ['r:<0,0,1,c>', 't:<0,0,d>'], 1, '<e,0,0>', 'O', 'F432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 5, 6], 58: [58, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 7, '<0,0,0>', 'C5', 4, ['r:<0,0,1,c>', 't:<0,0,d>'], 9, '<0,0,0>', 'I', 'I', 0, 'N/A', 4, 2], 59: [59, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0.57735*e,0>', 'C6', 5, ['r:<0,0,1,c>'], 1, '<0,0,0>', 'C6', 'p6', 2, '(2*e, 2*e), 120', 4, 2], 60: [60, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0.57735*e,0>', 'D2', 6, ['None'], 1, '<e,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 2], 61: [61, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'D2', 6, ['None'], 1, '<e,0,0>', 'T', 'P23', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 3], 62: [62, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'D2', 6, ['None'], 3, '<e,0,e>', 'O', 'F432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 3], 63: [63, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'D2', 6, ['None'], 3, '<2*e,e,0>', 'O', 'I4132', 3, '(8*e,8*e, 8*e), (90, 90, 90)', 3, 2], 64: [64, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0.57735*e,0>', 'D3', 7, ['None'], 11, '<0,0,0>', 'D3', 'p312', 2, '(2*e, 2*e), 120', 3, 2], 65: [65, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0.57735*e,0>', 'D3', 7, ['None'], 1, '<0,0,0>', 'D3', 'p321', 2, '(2*e, 2*e), 120', 3, 2], 66: [66, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 12, '<4*e,0,0>', 'D3', 7, ['None'], 4, '<3*e,3*e,3*e>', 'O', 'P4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 3, 4], 67: [67, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<0,0,0>', 'D4', 8, ['None'], 1, '<0,0,e>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2], 68: [68, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0.57735*e,0>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 2], 69: [69, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<e,0,0>', 'T', 10, ['None'], 1, '<0,0,0>', 'T', 'F23', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2], 70: [70, 'C3', 2, ['r:<0,0,1,a>', 't:<0,0,b>'], 4, '<e,0,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'F432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2], 71: [71, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'C4', 3, ['r:<0,0,1,c>'], 1, '<e,e,0>', 'C4', 'p4', 2, '(2*e, 2*e), 90', 4, 2], 72: [72, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'C4', 3, ['r:<0,0,1,c>', 't:<0,0,d>'], 2, '<0,e,e>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 5, 4], 73: [73, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'D2', 6, ['None'], 1, '<e,0,0>', 'D4', 'p422', 2, '(2*e, 2*e), 90', 3, 2], 74: [74, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,0,0>', 'D2', 6, ['None'], 5, '<0,0,0>', 'D4', 'p4212', 2, '(2*e, 2*e), 90', 3, 2], 75: [75, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'D2', 6, ['None'], 3, '<2*e,e,0>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 2], 76: [76, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'D2', 6, ['None'], 3, '<e,0,e>', 'O', 'F432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 3], 77: [77, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'D3', 7, ['None'], 4, '<e,e,e>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 2], 78: [78, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,e,0>', 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 'p422', 2, '(2*e, 2*e), 90', 3, 2], 79: [79, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 2, '<0,0,0>', 'D4', 8, ['None'], 1, '<e,e,0>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2], 80: [80, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'T', 10, ['None'], 1, '<e,e,e>', 'O', 'F432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 3, 2], 81: [81, 'C4', 3, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<e,e,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 3, 2], 82: [82, 'C6', 5, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'D2', 6, ['None'], 1, '<e,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 3, 2], 83: [83, 'C6', 5, ['r:<0,0,1,a>', 't:<0,0,b>'], 1, '<0,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 2, 2], 84: [84, 'D2', 6, ['None'], 1, '<0,0,0>', 'D2', 6, ['None'], 1, '<e,f,0>', 'D2', 'p222', 2, '(2*e, 2*f), 90', 2, 2], 85: [85, 'D2', 6, ['None'], 1, '<0,0,0>', 'D2', 6, ['None'], 1, '<e,f,g>', 'D2', 'F222', 3, '(4*e, 4*f, 4*g), (90, 90, 90)', 3, 3], 86: [86, 'D2', 6, ['None'], 1, '<e,0,0>', 'D2', 6, ['None'], 5, '<0,0,f>', 'D4', 'P4222', 3, '(2*e, 2*e, 4*f), (90, 90, 90)', 2, 2], 87: [87, 'D2', 6, ['None'], 1, '<e,0,0>', 'D2', 6, ['None'], 13, '<0,0,-f>', 'D6', 'P6222', 3, '(2*e, 2*e, 6*f), (90, 90, 120)', 2, 2], 88: [88, 'D2', 6, ['None'], 3, '<0,e,2*e>', 'D2', 6, ['None'], 5, '<0,2*e,e>', 'O', 'P4232', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 2], 89: [89, 'D2', 6, ['None'], 1, '<e,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 1, 1], 90: [90, 'D2', 6, ['None'], 1, '<e,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,f>', 'D6', 'P622', 3, '(2*e, 2*e, 2*f), (90, 90, 120)', 2, 2], 91: [91, 'D2', 6, ['None'], 1, '<0,0,2*e>', 'D3', 7, ['None'], 4, '<e,e,e>', 'D6', 'P4232', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 2], 92: [92, 'D2', 6, ['None'], 3, '<2*e,e,0>', 'D3', 7, ['None'], 4, '<e,e,e>', 'O', 'I4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 1, 1], 93: [93, 'D2', 6, ['None'], 1, '<e,0,0>', 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 'p422', 2, '(2*e, 2*e), 90', 1, 1], 94: [94, 'D2', 6, ['None'], 1, '<e,0,f>', 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 'P422', 3, '(2*e, 2*e, 2*f), (90, 90,90)', 2, 2], 95: [95, 'D2', 6, ['None'], 5, '<e,0,f>', 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 'I422', 3, '(2*e, 2*e, 4*f), (90, 90,90)', 2, 2], 96: [96, 'D2', 6, ['None'], 3, '<0,e,2*e>', 'D4', 8, ['None'], 1, '<0,0,2*e>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 1], 97: [97, 'D2', 6, ['None'], 1, '<e,0,0>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 1, 1], 98: [98, 'D2', 6, ['None'], 1, '<e,0,f>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'P622', 3, '(2*e, 2*e, 2*f), (90, 90, 120)', 2, 2], 99: [99, 'D2', 6, ['None'], 1, '<e,0,0>', 'T', 10, ['None'], 1, '<0,0,0>', 'T', 'P23', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 1], 100: [100, 'D2', 6, ['None'], 1, '<e,e,0>', 'T', 10, ['None'], 1, '<0,0,0>', 'T', 'P23', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 2], 101: [101, 'D2', 6, ['None'], 3, '<e,0,e>', 'T', 10, ['None'], 1, '<e,e,e>', 'O', 'F432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 1], 102: [102, 'D2', 6, ['None'], 3, '<2*e,e,0>', 'T', 10, ['None'], 1, '<0,0,0>', 'O', 'P4232', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 2], 103: [103, 'D2', 6, ['None'], 3, '<e,0,e>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'F432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 1], 104: [104, 'D2', 6, ['None'], 3, '<2*e,e,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 2], 105: [105, 'D3', 7, ['None'], 11, '<0,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,0>', 'D3', 'p312', 2, '(2*e, 2*e), 120', 1, 1], 106: [106, 'D3', 7, ['None'], 11, '<0,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,f>', 'D3', 'P312', 3, '(2*e, 2*e, 2*f), (90, 90, 120)', 2, 2], 107: [107, 'D3', 7, ['None'], 1, '<0,0,0>', 'D3', 7, ['None'], 11, '<e,0.57735*e,f>', 'D6', 'P6322', 3, '(2*e, 2*e, 4*f), (90, 90, 120)', 2, 2], 108: [108, 'D3', 7, ['None'], 4, '<e,e,e>', 'D3', 7, ['None'], 12, '<e,3*e,e>', 'O', 'P4232', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 2], 109: [109, 'D3', 7, ['None'], 4, '<3*e,3*e,3*e>', 'D3', 7, ['None'], 12, '<e,3*e,5*e>', 'O', 'P4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 1, 1], 110: [110, 'D3', 7, ['None'], 4, '<e,e,e>', 'D4', 8, ['None'], 1, '<0,0,2*e>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 2], 111: [111, 'D3', 7, ['None'], 11, '<e,0.57735*e,0>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'p622', 2, '(2*e, 2*e), 120', 1, 1], 112: [112, 'D3', 7, ['None'], 11, '<e,0.57735*e,f>', 'D6', 9, ['None'], 1, '<0,0,0>', 'D6', 'P622', 3, '(2*e, 2*e, 2*f), (90, 90, 120)', 2, 2], 113: [113, 'D3', 7, ['None'], 4, '<e,e,e>', 'T', 10, ['None'], 1, '<0,0,0>', 'O', 'F4132', 3, '(8*e, 8*e, 8*e), (90, 90, 90)', 1, 1], 114: [114, 'D3', 7, ['None'], 4, '<e,e,e>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'I432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 1], 115: [115, 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 8, ['None'], 1, '<e,e,0>', 'D4', 'p422', 2, '(2*e, 2*e), 90', 1, 1], 116: [116, 'D4', 8, ['None'], 1, '<0,0,0>', 'D4', 8, ['None'], 1, '<e,e,f>', 'D4', 'P422', 3, '(2*e, 2*e, 2*f), (90, 90,90)', 2, 2], 117: [117, 'D4', 8, ['None'], 1, '<0,0,e>', 'D4', 8, ['None'], 2, '<0,e,e>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 1], 118: [118, 'D4', 8, ['None'], 1, '<0,0,e>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 1], 119: [119, 'D4', 8, ['None'], 1, '<e,e,0>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 1], 120: [120, 'T', 10, ['None'], 1, '<0,0,0>', 'T', 10, ['None'], 1, '<e,e,e>', 'T', 'F23', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 1], 121: [121, 'T', 10, ['None'], 1, '<0,0,0>', 'T', 10, ['None'], 1, '<e,0,0>', 'T', 'F23', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 1], 122: [122, 'T', 10, ['None'], 1, '<e,e,e>', 'O', 11, ['None'], 1, '<0,0,0>', 'O', 'F432', 3, '(4*e, 4*e, 4*e), (90, 90, 90)', 1, 1], 123: [123, 'O', 11, ['None'], 1, '<0,0,0>', 'O', 11, ['None'], 1, '<e,e,e>', 'O', 'P432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 1], 124: [124, 'O', 11, ['None'], 1, '<0,0,0>', 'O', 11, ['None'], 1, '<e,0,0>', 'O', 'F432', 3, '(2*e, 2*e, 2*e), (90, 90, 90)', 1, 1]}
c2 = 180
c3 = 120
c4 = 90
c5 = 72
c6 = 60
rot_range_dict = {'C2': C2, 'C3': C3, 'C4': C4, 'C5': C5, 'C6': C6}
rot_mat1 = [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]
rot_mat2 = [[0.0, 0.0, 1.0], [0.0, 1.0, 0.0], [-1.0, 0.0, 0.0]]
rot_mat3 = [[0.707107, 0.0, 0.707107], [0.0, 1.0, 0.0], [-0.707107, 0.0, 0.707107]]
rot_mat4 = [[0.707107, 0.408248, 0.57735], [-0.707107, 0.408248, 0.57735], [0.0, -0.816497, 0.57735]]
rot_mat5 = [[0.707107, 0.707107, 0.0], [-0.707107, 0.707107, 0.0], [0.0, 0.0, 1.0]]
rot_mat6 = [[1.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, -1.0, 0.0]]
rot_mat7 = [[1.0, 0.0, 0.0], [0.0, 0.934172, 0.356822], [0.0, -0.356822, 0.934172]]
rot_mat8 = [[0.0, 0.707107, 0.707107], [0.0, -0.707107, 0.707107], [1.0, 0.0, 0.0]]
rot_mat9 = [[0.850651, 0.0, 0.525732], [0.0, 1.0, 0.0], [-0.525732, 0.0, 0.850651]]
rot_mat10 = [[0.0, 0.5, 0.866025], [0.0, -0.866025, 0.5], [1.0, 0.0, 0.0]]
rot_mat11 = [[0.0, -1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, 1.0]]
rot_mat12 = [[0.707107, -0.408248, 0.57735], [0.707107, 0.408248, -0.57735], [0.0, 0.816497, 0.57735]]
rot_mat13 = [[0.5, -0.866025, 0.0], [0.866025, 0.5, 0.0], [0.0, 0.0, 1.0]]
rot_set_dict = {1: RotMat1, 2: RotMat2, 3: RotMat3, 4: RotMat4, 5: RotMat5, 6: RotMat6, 7: RotMat7, 8: RotMat8, 9: RotMat9, 10: RotMat10, 11: RotMat11, 12: RotMat12, 13: RotMat13}
class Symentry:
def __init__(self, entry):
if type(entry) == int and entry in range(1, 125):
self.entry_number = entry
sym_comb_info = sym_comb_dict[self.entry_number]
self.group1 = sym_comb_info[1]
self.group1_indx = sym_comb_info[2]
self.int_dof_group1 = sym_comb_info[3]
self.rot_set_group1 = sym_comb_info[4]
self.ref_frame_tx_dof_group1 = sym_comb_info[5]
self.group2 = sym_comb_info[6]
self.group2_indx = sym_comb_info[7]
self.int_dof_group2 = sym_comb_info[8]
self.rot_set_group2 = sym_comb_info[9]
self.ref_frame_tx_dof_group2 = sym_comb_info[10]
self.pt_grp = sym_comb_info[11]
self.result = sym_comb_info[12]
self.dim = sym_comb_info[13]
self.unit_cell = sym_comb_info[14]
self.tot_dof = sym_comb_info[15]
self.cycle_size = sym_comb_info[16]
else:
raise value_error('\nINVALID SYMMETRY ENTRY. SUPPORTED VALUES ARE: 1 to 124\n')
def get_group1_sym(self):
return self.group1
def get_group2_sym(self):
return self.group2
def get_pt_grp_sym(self):
return self.pt_grp
def get_rot_range_deg_1(self):
if self.group1 in RotRangeDict:
return RotRangeDict[self.group1]
else:
return 0
def get_rot_range_deg_2(self):
if self.group2 in RotRangeDict:
return RotRangeDict[self.group2]
else:
return 0
def get_rot_set_mat_group1(self):
return RotSetDict[self.rot_set_group1]
def get_ref_frame_tx_dof_group1(self):
return self.ref_frame_tx_dof_group1
def get_rot_set_mat_group2(self):
return RotSetDict[self.rot_set_group2]
def get_ref_frame_tx_dof_group2(self):
return self.ref_frame_tx_dof_group2
def get_result_design_sym(self):
return self.result
def get_design_dim(self):
return self.dim
def get_uc_spec_string(self):
return self.unit_cell
def is_internal_tx1(self):
if 't:<0,0,b>' in self.int_dof_group1:
return True
else:
return False
def is_internal_tx2(self):
if 't:<0,0,d>' in self.int_dof_group2:
return True
else:
return False
def get_internal_tx1(self):
if 't:<0,0,b>' in self.int_dof_group1:
return 't:<0,0,b>'
else:
return None
def get_internal_tx2(self):
if 't:<0,0,d>' in self.int_dof_group2:
return 't:<0,0,d>'
else:
return None
def is_internal_rot1(self):
if 'r:<0,0,1,a>' in self.int_dof_group1:
return True
else:
return False
def is_internal_rot2(self):
if 'r:<0,0,1,c>' in self.int_dof_group2:
return True
else:
return False
def get_internal_rot1(self):
if 'r:<0,0,1,a>' in self.int_dof_group1:
return 'r:<0,0,1,a>'
else:
return None
def get_internal_rot2(self):
if 'r:<0,0,1,c>' in self.int_dof_group2:
return 'r:<0,0,1,c>'
else:
return None
def is_ref_frame_tx_dof1(self):
if self.ref_frame_tx_dof_group1 != '<0,0,0>':
return True
else:
return False
def is_ref_frame_tx_dof2(self):
if self.ref_frame_tx_dof_group2 != '<0,0,0>':
return True
else:
return False
|
n, k = map(int, input().split())
y = sorted(map(int, input().split()))
sol = 0
for i in y:
if k <= (5-i):
sol += 1
print(sol//3)
|
(n, k) = map(int, input().split())
y = sorted(map(int, input().split()))
sol = 0
for i in y:
if k <= 5 - i:
sol += 1
print(sol // 3)
|
# Enter your code here. Read input from STDIN. Print output to STDOUT
#with name and number input, divide both and enter into dict
phonebook = {}
number = int(input())
for _ in range(0, number):
item = str(input()).split(" ")
name = item[0]
phonenumber = int(item[1])
phonebook[name] = phonenumber
#check if name already in dict
for i in range(0, number):
name = input()
if name in phonebook:
print(name + "=" + str(phonebook[name]))
else:
print("Not found")
#the above code gave runtime error on test case 1
# Enter your code here. Read input from STDIN. Print output to STDOUT
#with name and number input, divide both and enter into dict
phonebook = {}
number = int(input())
for i in range(number):
text = input().split()
phonebook[text[0]] = text[1]
#check if name already in dict
while True:
try:
entry = input()
if entry in phonebook:
print(entry+"="+phonebook[entry])
else:
print("Not found")
except EOFError:
break
#so what's the difference?
|
phonebook = {}
number = int(input())
for _ in range(0, number):
item = str(input()).split(' ')
name = item[0]
phonenumber = int(item[1])
phonebook[name] = phonenumber
for i in range(0, number):
name = input()
if name in phonebook:
print(name + '=' + str(phonebook[name]))
else:
print('Not found')
phonebook = {}
number = int(input())
for i in range(number):
text = input().split()
phonebook[text[0]] = text[1]
while True:
try:
entry = input()
if entry in phonebook:
print(entry + '=' + phonebook[entry])
else:
print('Not found')
except EOFError:
break
|
{
"targets":[
{
"target_name":"pcap_addon",
"sources":[
"./src/winpcap/pcap_addon.cc",
"./src/winpcap/pcapObjFactory.cc",
"./src/winpcap/commLib.cc"],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"lib/winpcap/include",
"lib/winpcap/include/pcap",
"src/winpcap/include"
],
"defines":[
"HAVE_REMOTE"
],
"conditions":[
["OS==\"win\"", {
"conditions":[
['target_arch=="x64"',{
"libraries": [
"-l../lib/winpcap/lib/x64/wpcap",
"-l../lib/winpcap/lib/x64/Packet"
]
}],
['target_arch=="x86"',{
"libraries": [
"-l../lib/winpcap/lib/wpcap",
"-l../lib/winpcap/lib/Packet"
]
}]
]
}],
["OS==\"linux\"", {
"libraries": [
"lib/winpcap/Lib/libwpcap.a",
"lib/winpcap/Lib/libpacket.a"
]
}]
]
}
]
}
|
{'targets': [{'target_name': 'pcap_addon', 'sources': ['./src/winpcap/pcap_addon.cc', './src/winpcap/pcapObjFactory.cc', './src/winpcap/commLib.cc'], 'include_dirs': ['<!(node -e "require(\'nan\')")', 'lib/winpcap/include', 'lib/winpcap/include/pcap', 'src/winpcap/include'], 'defines': ['HAVE_REMOTE'], 'conditions': [['OS=="win"', {'conditions': [['target_arch=="x64"', {'libraries': ['-l../lib/winpcap/lib/x64/wpcap', '-l../lib/winpcap/lib/x64/Packet']}], ['target_arch=="x86"', {'libraries': ['-l../lib/winpcap/lib/wpcap', '-l../lib/winpcap/lib/Packet']}]]}], ['OS=="linux"', {'libraries': ['lib/winpcap/Lib/libwpcap.a', 'lib/winpcap/Lib/libpacket.a']}]]}]}
|
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
version = '1.9.0'
version_tuple = (1, 9, 0)
|
version = '1.9.0'
version_tuple = (1, 9, 0)
|
# -*- coding: utf-8 -*-
"""
Generate features from pandas dataframe, with columns statistics.
-------------------
Return dataframe, columns=[by, col]
"""
def get_count(df, by):
return df.groupby(by=by).count().iloc[:,0]
def get_sum(df, col, by):
return df.groupby(by=by).sum()[col]
def get_mean(df, col, by):
return df.groupby(by=by).mean()[col]
def get_std(df, col, by):
return df.groupby(by=by).std()[col]
def get_max(df, col, by):
return df.groupby(by=by).max()[col]
def get_min(df, col, by):
return df.groupby(by=by).min()[col]
def get_dum_sum(df, col, prefix, by, drop_first=False):
return pd.get_dummies(df[by + col], columns=col, prefix=prefix, drop_first=drop_first).groupby(by).sum()
def get_dum_has(df, col, prefix, by, drop_first=False):
return pd.get_dummies(df[by + col], columns=col, prefix=prefix, drop_first=drop_first).groupby(by).max()
|
"""
Generate features from pandas dataframe, with columns statistics.
-------------------
Return dataframe, columns=[by, col]
"""
def get_count(df, by):
return df.groupby(by=by).count().iloc[:, 0]
def get_sum(df, col, by):
return df.groupby(by=by).sum()[col]
def get_mean(df, col, by):
return df.groupby(by=by).mean()[col]
def get_std(df, col, by):
return df.groupby(by=by).std()[col]
def get_max(df, col, by):
return df.groupby(by=by).max()[col]
def get_min(df, col, by):
return df.groupby(by=by).min()[col]
def get_dum_sum(df, col, prefix, by, drop_first=False):
return pd.get_dummies(df[by + col], columns=col, prefix=prefix, drop_first=drop_first).groupby(by).sum()
def get_dum_has(df, col, prefix, by, drop_first=False):
return pd.get_dummies(df[by + col], columns=col, prefix=prefix, drop_first=drop_first).groupby(by).max()
|
LINKING_PROPERTY = "Transaction/generated/LinkedTransactionId"
INPUT_TXN_FILTER = "type in 'Buy','Purchase','Sell','FwdFxSell', 'FwdFxBuy','FxBuy','FxSell','StockIn'"
ENTITY_PROPERTY = "Portfolio/test/Entity"
BROKER_PROPERTY = "Portfolio/test/Broker"
COUNTRY_PROPERTY = "Instrument/test/Country"
PROPERTIES_REQUIRED = [
ENTITY_PROPERTY,
BROKER_PROPERTY,
COUNTRY_PROPERTY
]
|
linking_property = 'Transaction/generated/LinkedTransactionId'
input_txn_filter = "type in 'Buy','Purchase','Sell','FwdFxSell', 'FwdFxBuy','FxBuy','FxSell','StockIn'"
entity_property = 'Portfolio/test/Entity'
broker_property = 'Portfolio/test/Broker'
country_property = 'Instrument/test/Country'
properties_required = [ENTITY_PROPERTY, BROKER_PROPERTY, COUNTRY_PROPERTY]
|
"""
Given a lowercase string, s, return the index fo the first character that appears just once in a string.
If every character appears more than once, return -1
Example input:
s: "Who wants hot watermelon?"
Example Output:
8
Explanation:
"who wants hot watermelon?"
^
012345678
The first charactter that appears only once is "s" and it appears at index 8.
"""
def solution(s):
# Type your solution here
has_been_seen = {}
for i in range(len(s)):
if s[i] not in has_been_seen:
has_been_seen[s[i]] = 0
has_been_seen[s[i]] += 1
for i in range(len(s)):
if has_been_seen[s[i]] == 1:
return i
return -1
if __name__ == '__main__':
s = "who wants hot watermelon?"
print(solution(s=s))
|
"""
Given a lowercase string, s, return the index fo the first character that appears just once in a string.
If every character appears more than once, return -1
Example input:
s: "Who wants hot watermelon?"
Example Output:
8
Explanation:
"who wants hot watermelon?"
^
012345678
The first charactter that appears only once is "s" and it appears at index 8.
"""
def solution(s):
has_been_seen = {}
for i in range(len(s)):
if s[i] not in has_been_seen:
has_been_seen[s[i]] = 0
has_been_seen[s[i]] += 1
for i in range(len(s)):
if has_been_seen[s[i]] == 1:
return i
return -1
if __name__ == '__main__':
s = 'who wants hot watermelon?'
print(solution(s=s))
|
class Solution:
def reformatNumber(self, number: str) -> str:
number = number.replace(' ','')
number = number.replace('-','')
output = ''
count = len(number)
remain = count % 3
print(remain)
if remain == 0:
last = number[len(number)-3:]
end = len(number)-3
if remain == 2:
last = number[len(number)-2:]
end = len(number)-2
if remain == 1:
last = number[len(number)-4:len(number)-2] + '-' + number[len(number)-2:]
end = len(number)-4
for i,num in enumerate(number[:end]):
output += num
if (i+1)%3 == 0:
output += '-'
count -= 1
output += last
return output
|
class Solution:
def reformat_number(self, number: str) -> str:
number = number.replace(' ', '')
number = number.replace('-', '')
output = ''
count = len(number)
remain = count % 3
print(remain)
if remain == 0:
last = number[len(number) - 3:]
end = len(number) - 3
if remain == 2:
last = number[len(number) - 2:]
end = len(number) - 2
if remain == 1:
last = number[len(number) - 4:len(number) - 2] + '-' + number[len(number) - 2:]
end = len(number) - 4
for (i, num) in enumerate(number[:end]):
output += num
if (i + 1) % 3 == 0:
output += '-'
count -= 1
output += last
return output
|
numero = int(input('digite um numero: '))
u = numero // 1 % 10
d = numero // 10 % 10
c = numero // 100 % 10
m = numero // 1000 % 10
print('analisando numero {}'.format(numero))
print('unidades: {}'.format(u))
print('dezenas: {}'.format(d))
print('centenas: {}'.format(c))
print('milhares: {}'.format(m))
|
numero = int(input('digite um numero: '))
u = numero // 1 % 10
d = numero // 10 % 10
c = numero // 100 % 10
m = numero // 1000 % 10
print('analisando numero {}'.format(numero))
print('unidades: {}'.format(u))
print('dezenas: {}'.format(d))
print('centenas: {}'.format(c))
print('milhares: {}'.format(m))
|
SOURCE = "http://tabinstore.fr"
HEADER = "User-Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11"
MAX_IMG_SIZE = 71680 # In Bytes
|
source = 'http://tabinstore.fr'
header = 'User-Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11'
max_img_size = 71680
|
li = []
inp = input()
li = inp.split(' ' , 5)
print(1-int(li[0]),' ',1-int(li[1]),' ',2-int(li[2]),' ',2-int(li[3]),' ',2-int(li[4]),' ',8-int(li[5]), end = '')
|
li = []
inp = input()
li = inp.split(' ', 5)
print(1 - int(li[0]), ' ', 1 - int(li[1]), ' ', 2 - int(li[2]), ' ', 2 - int(li[3]), ' ', 2 - int(li[4]), ' ', 8 - int(li[5]), end='')
|
x,y = 8, 4
if x > y:
print("x es mayor que y")
print("x es el doble de y")
if x > y:
print("x es mayor que y")
else:
print("x es menor o igual que y")
if x < y:
print("x es menor que y")
elif x == y:
print("x es igual a y")
else:
print("x es mayor que y")
|
(x, y) = (8, 4)
if x > y:
print('x es mayor que y')
print('x es el doble de y')
if x > y:
print('x es mayor que y')
else:
print('x es menor o igual que y')
if x < y:
print('x es menor que y')
elif x == y:
print('x es igual a y')
else:
print('x es mayor que y')
|
set_name(0x8012EA14, "GameOnlyTestRoutine__Fv", SN_NOWARN)
set_name(0x8012EA1C, "vecleny__Fii", SN_NOWARN)
set_name(0x8012EA40, "veclenx__Fii", SN_NOWARN)
set_name(0x8012EA6C, "GetDamageAmt__FiPiT1", SN_NOWARN)
set_name(0x8012F0DC, "CheckBlock__Fiiii", SN_NOWARN)
set_name(0x8012F22C, "FindClosest__Fiii", SN_NOWARN)
set_name(0x8012F3C8, "GetSpellLevel__Fii", SN_NOWARN)
set_name(0x8012F49C, "GetDirection8__Fiiii", SN_NOWARN)
set_name(0x8012F6B8, "DeleteMissile__Fii", SN_NOWARN)
set_name(0x8012F778, "GetMissileVel__Fiiiiii", SN_NOWARN)
set_name(0x8012F8FC, "PutMissile__Fi", SN_NOWARN)
set_name(0x8012FA38, "GetMissilePos__Fi", SN_NOWARN)
set_name(0x8012FB88, "MoveMissilePos__Fi", SN_NOWARN)
set_name(0x8012FD10, "MonsterTrapHit__FiiiiiUc", SN_NOWARN)
set_name(0x801300D0, "MonsterMHit__FiiiiiiUc", SN_NOWARN)
set_name(0x801308AC, "PlayerMHit__FiiiiiiUcUc", SN_NOWARN)
set_name(0x8013133C, "Plr2PlrMHit__FiiiiiiUc", SN_NOWARN)
set_name(0x80131B3C, "CheckMissileCol__FiiiUciiUc", SN_NOWARN)
set_name(0x801322B8, "SetMissAnim__Fii", SN_NOWARN)
set_name(0x801323A8, "SetMissDir__Fii", SN_NOWARN)
set_name(0x80132420, "AddLArrow__Fiiiiiicii", SN_NOWARN)
set_name(0x80132620, "AddArrow__Fiiiiiicii", SN_NOWARN)
set_name(0x801327FC, "GetVileMissPos__Fiii", SN_NOWARN)
set_name(0x8013293C, "AddRndTeleport__Fiiiiiicii", SN_NOWARN)
set_name(0x80132CDC, "AddFirebolt__Fiiiiiicii", SN_NOWARN)
set_name(0x80132FBC, "AddMagmaball__Fiiiiiicii", SN_NOWARN)
set_name(0x801330F0, "AddTeleport__Fiiiiiicii", SN_NOWARN)
set_name(0x8013335C, "AddLightball__Fiiiiiicii", SN_NOWARN)
set_name(0x801334D0, "AddFirewall__Fiiiiiicii", SN_NOWARN)
set_name(0x801336D4, "AddFireball__Fiiiiiicii", SN_NOWARN)
set_name(0x8013394C, "AddLightctrl__Fiiiiiicii", SN_NOWARN)
set_name(0x80133A54, "AddLightning__Fiiiiiicii", SN_NOWARN)
set_name(0x80133C4C, "AddMisexp__Fiiiiiicii", SN_NOWARN)
set_name(0x80133EC0, "CheckIfTrig__Fii", SN_NOWARN)
set_name(0x80133FCC, "AddTown__Fiiiiiicii", SN_NOWARN)
set_name(0x8013442C, "AddFlash__Fiiiiiicii", SN_NOWARN)
set_name(0x8013465C, "AddFlash2__Fiiiiiicii", SN_NOWARN)
set_name(0x80134870, "AddManashield__Fiiiiiicii", SN_NOWARN)
set_name(0x80134970, "AddFiremove__Fiiiiiicii", SN_NOWARN)
set_name(0x80134AE8, "AddGuardian__Fiiiiiicii", SN_NOWARN)
set_name(0x80134FD0, "AddChain__Fiiiiiicii", SN_NOWARN)
set_name(0x80135068, "AddRhino__Fiiiiiicii", SN_NOWARN)
set_name(0x801352C8, "AddFlare__Fiiiiiicii", SN_NOWARN)
set_name(0x801355E0, "AddAcid__Fiiiiiicii", SN_NOWARN)
set_name(0x80135704, "AddAcidpud__Fiiiiiicii", SN_NOWARN)
set_name(0x801357FC, "AddStone__Fiiiiiicii", SN_NOWARN)
set_name(0x80135B48, "AddGolem__Fiiiiiicii", SN_NOWARN)
set_name(0x80135D4C, "AddBoom__Fiiiiiicii", SN_NOWARN)
set_name(0x80135E34, "AddHeal__Fiiiiiicii", SN_NOWARN)
set_name(0x8013607C, "AddHealOther__Fiiiiiicii", SN_NOWARN)
set_name(0x8013610C, "AddElement__Fiiiiiicii", SN_NOWARN)
set_name(0x80136354, "AddIdentify__Fiiiiiicii", SN_NOWARN)
set_name(0x80136424, "AddFirewallC__Fiiiiiicii", SN_NOWARN)
set_name(0x80136700, "AddInfra__Fiiiiiicii", SN_NOWARN)
set_name(0x80136830, "AddWave__Fiiiiiicii", SN_NOWARN)
set_name(0x801368B4, "AddNova__Fiiiiiicii", SN_NOWARN)
set_name(0x80136AEC, "AddRepair__Fiiiiiicii", SN_NOWARN)
set_name(0x80136BBC, "AddRecharge__Fiiiiiicii", SN_NOWARN)
set_name(0x80136C8C, "AddDisarm__Fiiiiiicii", SN_NOWARN)
set_name(0x80136D1C, "AddApoca__Fiiiiiicii", SN_NOWARN)
set_name(0x80136F7C, "AddFlame__Fiiiiiicii", SN_NOWARN)
set_name(0x801371F8, "AddFlamec__Fiiiiiicii", SN_NOWARN)
set_name(0x80137308, "AddCbolt__Fiiiiiicii", SN_NOWARN)
set_name(0x80137520, "AddHbolt__Fiiiiiicii", SN_NOWARN)
set_name(0x80137700, "AddResurrect__Fiiiiiicii", SN_NOWARN)
set_name(0x80137794, "AddResurrectBeam__Fiiiiiicii", SN_NOWARN)
set_name(0x8013786C, "AddTelekinesis__Fiiiiiicii", SN_NOWARN)
set_name(0x801378FC, "AddBoneSpirit__Fiiiiiicii", SN_NOWARN)
set_name(0x80137B14, "AddRportal__Fiiiiiicii", SN_NOWARN)
set_name(0x80137BF8, "AddDiabApoca__Fiiiiiicii", SN_NOWARN)
set_name(0x80137D54, "AddMissile__Fiiiiiiciii", SN_NOWARN)
set_name(0x801380A8, "Sentfire__Fiii", SN_NOWARN)
set_name(0x801382A8, "MI_Dummy__Fi", SN_NOWARN)
set_name(0x801382B0, "MI_Golem__Fi", SN_NOWARN)
set_name(0x8013852C, "MI_SetManashield__Fi", SN_NOWARN)
set_name(0x80138568, "MI_LArrow__Fi", SN_NOWARN)
set_name(0x80138D44, "MI_Arrow__Fi", SN_NOWARN)
set_name(0x80138F78, "MI_Firebolt__Fi", SN_NOWARN)
set_name(0x80139660, "MI_Lightball__Fi", SN_NOWARN)
set_name(0x80139904, "MI_Acidpud__Fi", SN_NOWARN)
set_name(0x80139A34, "MI_Firewall__Fi", SN_NOWARN)
set_name(0x80139D18, "MI_Fireball__Fi", SN_NOWARN)
set_name(0x8013A6F8, "MI_Lightctrl__Fi", SN_NOWARN)
set_name(0x8013ACA8, "MI_Lightning__Fi", SN_NOWARN)
set_name(0x8013AE40, "MI_Town__Fi", SN_NOWARN)
set_name(0x8013B104, "MI_Flash__Fi", SN_NOWARN)
set_name(0x8013B534, "MI_Flash2__Fi", SN_NOWARN)
set_name(0x8013B774, "MI_Manashield__Fi", SN_NOWARN)
set_name(0x8013BD98, "MI_Firemove__Fi", SN_NOWARN)
set_name(0x8013C1F4, "MI_Guardian__Fi", SN_NOWARN)
set_name(0x8013C5E0, "MI_Chain__Fi", SN_NOWARN)
set_name(0x8013C904, "MI_Misexp__Fi", SN_NOWARN)
set_name(0x8013CC24, "MI_Acidsplat__Fi", SN_NOWARN)
set_name(0x8013CDE8, "MI_Teleport__Fi", SN_NOWARN)
set_name(0x8013D1D0, "MI_Stone__Fi", SN_NOWARN)
set_name(0x8013D398, "MI_Boom__Fi", SN_NOWARN)
set_name(0x8013D4AC, "MI_Rhino__Fi", SN_NOWARN)
set_name(0x8013D894, "MI_FirewallC__Fi", SN_NOWARN)
set_name(0x8013DC88, "MI_Infra__Fi", SN_NOWARN)
set_name(0x8013DD68, "MI_Apoca__Fi", SN_NOWARN)
set_name(0x8013E01C, "MI_Wave__Fi", SN_NOWARN)
set_name(0x8013E5C4, "MI_Nova__Fi", SN_NOWARN)
set_name(0x8013E8A4, "MI_Flame__Fi", SN_NOWARN)
set_name(0x8013EAB8, "MI_Flamec__Fi", SN_NOWARN)
set_name(0x8013EDE8, "MI_Cbolt__Fi", SN_NOWARN)
set_name(0x8013F10C, "MI_Hbolt__Fi", SN_NOWARN)
set_name(0x8013F438, "MI_Element__Fi", SN_NOWARN)
set_name(0x8013FB0C, "MI_Bonespirit__Fi", SN_NOWARN)
set_name(0x8013FF30, "MI_ResurrectBeam__Fi", SN_NOWARN)
set_name(0x8013FFC8, "MI_Rportal__Fi", SN_NOWARN)
set_name(0x8014020C, "ProcessMissiles__Fv", SN_NOWARN)
set_name(0x80140600, "ClearMissileSpot__Fi", SN_NOWARN)
set_name(0x801406F0, "MoveToScrollTarget__7CBlocks", SN_NOWARN)
set_name(0x80140704, "MonstPartJump__Fi", SN_NOWARN)
set_name(0x80140898, "DeleteMonster__Fi", SN_NOWARN)
set_name(0x80140930, "M_GetDir__Fi", SN_NOWARN)
set_name(0x801409B4, "M_StartDelay__Fii", SN_NOWARN)
set_name(0x80140A40, "M_StartRAttack__Fiii", SN_NOWARN)
set_name(0x80140BA4, "M_StartRSpAttack__Fiii", SN_NOWARN)
set_name(0x80140D14, "M_StartSpAttack__Fi", SN_NOWARN)
set_name(0x80140E48, "M_StartEat__Fi", SN_NOWARN)
set_name(0x80140F64, "M_GetKnockback__Fi", SN_NOWARN)
set_name(0x801411C0, "M_StartHit__Fiii", SN_NOWARN)
set_name(0x801414F0, "M_DiabloDeath__FiUc", SN_NOWARN)
set_name(0x80141838, "M2MStartHit__Fiii", SN_NOWARN)
set_name(0x80141B28, "MonstStartKill__FiiUc", SN_NOWARN)
set_name(0x80141E40, "M2MStartKill__Fii", SN_NOWARN)
set_name(0x80142260, "M_StartKill__Fii", SN_NOWARN)
set_name(0x80142370, "M_StartFadein__FiiUc", SN_NOWARN)
set_name(0x80142510, "M_StartFadeout__FiiUc", SN_NOWARN)
set_name(0x801426A4, "M_StartHeal__Fi", SN_NOWARN)
set_name(0x80142778, "M_ChangeLightOffset__Fi", SN_NOWARN)
set_name(0x80142840, "M_DoStand__Fi", SN_NOWARN)
set_name(0x801428F8, "M_DoWalk__Fi", SN_NOWARN)
set_name(0x80142BC4, "M_DoWalk2__Fi", SN_NOWARN)
set_name(0x80142DF8, "M_DoWalk3__Fi", SN_NOWARN)
set_name(0x80143104, "M_TryM2MHit__Fiiiii", SN_NOWARN)
set_name(0x80143314, "M_TryH2HHit__Fiiiii", SN_NOWARN)
set_name(0x80143B38, "M_DoAttack__Fi", SN_NOWARN)
set_name(0x80143D24, "M_DoRAttack__Fi", SN_NOWARN)
set_name(0x80143EDC, "M_DoRSpAttack__Fi", SN_NOWARN)
set_name(0x80144118, "M_DoSAttack__Fi", SN_NOWARN)
set_name(0x80144230, "M_DoFadein__Fi", SN_NOWARN)
set_name(0x80144328, "M_DoFadeout__Fi", SN_NOWARN)
set_name(0x80144494, "M_DoHeal__Fi", SN_NOWARN)
set_name(0x80144570, "M_DoTalk__Fi", SN_NOWARN)
set_name(0x80144A78, "M_Teleport__Fi", SN_NOWARN)
set_name(0x80144D14, "M_DoGotHit__Fi", SN_NOWARN)
set_name(0x80144DCC, "DoEnding__Fv", SN_NOWARN)
set_name(0x80144DD4, "PrepDoEnding__Fv", SN_NOWARN)
set_name(0x80144F30, "M_DoDeath__Fi", SN_NOWARN)
set_name(0x801451F4, "M_DoSpStand__Fi", SN_NOWARN)
set_name(0x801452DC, "M_DoDelay__Fi", SN_NOWARN)
set_name(0x80145414, "M_DoStone__Fi", SN_NOWARN)
set_name(0x801454D4, "M_WalkDir__Fii", SN_NOWARN)
set_name(0x80145750, "GroupUnity__Fi", SN_NOWARN)
set_name(0x80145B84, "M_CallWalk__Fii", SN_NOWARN)
set_name(0x80145D70, "M_PathWalk__Fi", SN_NOWARN)
set_name(0x80145E50, "M_CallWalk2__Fii", SN_NOWARN)
set_name(0x80145F64, "M_DumbWalk__Fii", SN_NOWARN)
set_name(0x80145FB8, "M_RoundWalk__FiiRi", SN_NOWARN)
set_name(0x80146158, "MAI_Zombie__Fi", SN_NOWARN)
set_name(0x8014636C, "MAI_SkelSd__Fi", SN_NOWARN)
set_name(0x80146520, "MAI_Snake__Fi", SN_NOWARN)
set_name(0x80146944, "MAI_Bat__Fi", SN_NOWARN)
set_name(0x80146D18, "MAI_SkelBow__Fi", SN_NOWARN)
set_name(0x80146F20, "MAI_Fat__Fi", SN_NOWARN)
set_name(0x801470F0, "MAI_Sneak__Fi", SN_NOWARN)
set_name(0x801474F8, "MAI_Fireman__Fi", SN_NOWARN)
set_name(0x8014780C, "MAI_Fallen__Fi", SN_NOWARN)
set_name(0x80147B44, "MAI_Cleaver__Fi", SN_NOWARN)
set_name(0x80147C48, "MAI_Round__FiUc", SN_NOWARN)
set_name(0x801480D4, "MAI_GoatMc__Fi", SN_NOWARN)
set_name(0x801480F4, "MAI_Ranged__FiiUc", SN_NOWARN)
set_name(0x80148338, "MAI_GoatBow__Fi", SN_NOWARN)
set_name(0x8014835C, "MAI_Succ__Fi", SN_NOWARN)
set_name(0x80148380, "MAI_AcidUniq__Fi", SN_NOWARN)
set_name(0x801483A4, "MAI_Scav__Fi", SN_NOWARN)
set_name(0x801487D8, "MAI_Garg__Fi", SN_NOWARN)
set_name(0x801489D8, "MAI_RoundRanged__FiiUciUc", SN_NOWARN)
set_name(0x80148F10, "MAI_Magma__Fi", SN_NOWARN)
set_name(0x80148F3C, "MAI_Storm__Fi", SN_NOWARN)
set_name(0x80148F68, "MAI_Acid__Fi", SN_NOWARN)
set_name(0x80148F98, "MAI_Diablo__Fi", SN_NOWARN)
set_name(0x80148FC4, "MAI_RR2__Fiii", SN_NOWARN)
set_name(0x801494E0, "MAI_Mega__Fi", SN_NOWARN)
set_name(0x80149504, "MAI_SkelKing__Fi", SN_NOWARN)
set_name(0x80149A5C, "MAI_Rhino__Fi", SN_NOWARN)
set_name(0x80149F20, "MAI_Counselor__Fi", SN_NOWARN)
set_name(0x8014A408, "MAI_Garbud__Fi", SN_NOWARN)
set_name(0x8014A5D4, "MAI_Zhar__Fi", SN_NOWARN)
set_name(0x8014A7E8, "MAI_SnotSpil__Fi", SN_NOWARN)
set_name(0x8014AA38, "MAI_Lazurus__Fi", SN_NOWARN)
set_name(0x8014ACCC, "MAI_Lazhelp__Fi", SN_NOWARN)
set_name(0x8014AE08, "MAI_Lachdanan__Fi", SN_NOWARN)
set_name(0x8014AFB4, "MAI_Warlord__Fi", SN_NOWARN)
set_name(0x8014B11C, "DeleteMonsterList__Fv", SN_NOWARN)
set_name(0x8014B268, "ProcessMonsters__Fv", SN_NOWARN)
set_name(0x8014B8B8, "DirOK__Fii", SN_NOWARN)
set_name(0x8014BD10, "PosOkMissile__Fii", SN_NOWARN)
set_name(0x8014BD78, "CheckNoSolid__Fii", SN_NOWARN)
set_name(0x8014BDBC, "LineClearF__FPFii_Uciiii", SN_NOWARN)
set_name(0x8014C044, "LineClear__Fiiii", SN_NOWARN)
set_name(0x8014C084, "LineClearF1__FPFiii_Uciiiii", SN_NOWARN)
set_name(0x8014C318, "M_FallenFear__Fii", SN_NOWARN)
set_name(0x8014C50C, "PrintMonstHistory__Fi", SN_NOWARN)
set_name(0x8014C734, "PrintUniqueHistory__Fv", SN_NOWARN)
set_name(0x8014C858, "MissToMonst__Fiii", SN_NOWARN)
set_name(0x8014CD40, "PosOkMonst2__Fiii", SN_NOWARN)
set_name(0x8014CF5C, "PosOkMonst3__Fiii", SN_NOWARN)
set_name(0x8014D250, "M_SpawnSkel__Fiii", SN_NOWARN)
set_name(0x8014D3CC, "TalktoMonster__Fi", SN_NOWARN)
set_name(0x8014D50C, "SpawnGolum__Fiiii", SN_NOWARN)
set_name(0x8014D7A4, "CanTalkToMonst__Fi", SN_NOWARN)
set_name(0x8014D814, "CheckMonsterHit__FiRUc", SN_NOWARN)
set_name(0x8014D924, "MAI_Golum__Fi", SN_NOWARN)
set_name(0x8014DCB4, "MAI_Path__Fi", SN_NOWARN)
set_name(0x8014DE34, "M_StartAttack__Fi", SN_NOWARN)
set_name(0x8014DF68, "M_StartWalk__Fiiiiii", SN_NOWARN)
set_name(0x8014E194, "AddWarpMissile__Fiii", SN_NOWARN)
set_name(0x8014E29C, "SyncPortals__Fv", SN_NOWARN)
set_name(0x8014E3A4, "AddInTownPortal__Fi", SN_NOWARN)
set_name(0x8014E3E0, "ActivatePortal__FiiiiiUc", SN_NOWARN)
set_name(0x8014E4BC, "DeactivatePortal__Fi", SN_NOWARN)
set_name(0x8014E514, "PortalOnLevel__Fi", SN_NOWARN)
set_name(0x8014E584, "RemovePortalMissile__Fi", SN_NOWARN)
set_name(0x8014E720, "SetCurrentPortal__Fi", SN_NOWARN)
set_name(0x8014E72C, "GetPortalLevel__Fv", SN_NOWARN)
set_name(0x8014E91C, "GetPortalLvlPos__Fv", SN_NOWARN)
set_name(0x8014EA00, "FreeInvGFX__Fv", SN_NOWARN)
set_name(0x8014EA08, "InvDrawSlot__Fiii", SN_NOWARN)
set_name(0x8014EA8C, "InvDrawSlotBack__FiiiiUc", SN_NOWARN)
set_name(0x8014ECE0, "InvDrawItem__FiiiUci", SN_NOWARN)
set_name(0x8014EDB0, "InvDrawSlots__Fv", SN_NOWARN)
set_name(0x8014F0C4, "PrintStat__FiiPcUc", SN_NOWARN)
set_name(0x8014F190, "DrawInvStats__Fv", SN_NOWARN)
set_name(0x8014FD1C, "DrawInvBack__Fv", SN_NOWARN)
set_name(0x8014FDA4, "DrawInvCursor__Fv", SN_NOWARN)
set_name(0x80150280, "DrawInvMsg__Fv", SN_NOWARN)
set_name(0x80150448, "DrawInv__Fv", SN_NOWARN)
set_name(0x80150478, "DrawInvTSK__FP4TASK", SN_NOWARN)
set_name(0x80150744, "DoThatDrawInv__Fv", SN_NOWARN)
set_name(0x80151020, "AutoPlace__FiiiiUc", SN_NOWARN)
set_name(0x8015133C, "SpecialAutoPlace__FiiiiUc", SN_NOWARN)
set_name(0x801516D4, "GoldAutoPlace__Fi", SN_NOWARN)
set_name(0x80151BA0, "WeaponAutoPlace__Fi", SN_NOWARN)
set_name(0x80151E28, "SwapItem__FP10ItemStructT0", SN_NOWARN)
set_name(0x80151F18, "CheckInvPaste__Fiii", SN_NOWARN)
set_name(0x80153BA4, "CheckInvCut__Fiii", SN_NOWARN)
set_name(0x80154630, "RemoveInvItem__Fii", SN_NOWARN)
set_name(0x801548D4, "RemoveSpdBarItem__Fii", SN_NOWARN)
set_name(0x801549D4, "CheckInvScrn__Fv", SN_NOWARN)
set_name(0x80154A4C, "CheckItemStats__Fi", SN_NOWARN)
set_name(0x80154AD0, "CheckBookLevel__Fi", SN_NOWARN)
set_name(0x80154C04, "CheckQuestItem__Fi", SN_NOWARN)
set_name(0x8015502C, "InvGetItem__Fii", SN_NOWARN)
set_name(0x80155324, "AutoGetItem__Fii", SN_NOWARN)
set_name(0x80155D88, "FindGetItem__FiUsi", SN_NOWARN)
set_name(0x80155E3C, "SyncGetItem__FiiiUsi", SN_NOWARN)
set_name(0x80156048, "TryInvPut__Fv", SN_NOWARN)
set_name(0x80156210, "InvPutItem__Fiii", SN_NOWARN)
set_name(0x801566B4, "SyncPutItem__FiiiiUsiUciiiiiUl", SN_NOWARN)
set_name(0x80156C50, "CheckInvHLight__Fv", SN_NOWARN)
set_name(0x80156F94, "RemoveScroll__Fi", SN_NOWARN)
set_name(0x80157178, "UseScroll__Fv", SN_NOWARN)
set_name(0x801573E0, "UseStaffCharge__Fi", SN_NOWARN)
set_name(0x801574A0, "UseStaff__Fv", SN_NOWARN)
set_name(0x80157560, "StartGoldDrop__Fv", SN_NOWARN)
set_name(0x80157664, "UseInvItem__Fii", SN_NOWARN)
set_name(0x80157B8C, "DoTelekinesis__Fv", SN_NOWARN)
set_name(0x80157CB4, "CalculateGold__Fi", SN_NOWARN)
set_name(0x80157DEC, "DropItemBeforeTrig__Fv", SN_NOWARN)
set_name(0x80157E44, "ControlInv__Fv", SN_NOWARN)
set_name(0x801581CC, "InvGetItemWH__Fi", SN_NOWARN)
set_name(0x801582C4, "InvAlignObject__Fv", SN_NOWARN)
set_name(0x80158478, "InvSetItemCurs__Fv", SN_NOWARN)
set_name(0x8015860C, "InvMoveCursLeft__Fv", SN_NOWARN)
set_name(0x801587E8, "InvMoveCursRight__Fv", SN_NOWARN)
set_name(0x80158B00, "InvMoveCursUp__Fv", SN_NOWARN)
set_name(0x80158CE8, "InvMoveCursDown__Fv", SN_NOWARN)
set_name(0x80159000, "DumpMonsters__7CBlocks", SN_NOWARN)
set_name(0x80159028, "Flush__4CPad", SN_NOWARN)
set_name(0x8015904C, "SetRGB__6DialogUcUcUc", SN_NOWARN)
set_name(0x8015906C, "SetBack__6Dialogi", SN_NOWARN)
set_name(0x80159074, "SetBorder__6Dialogi", SN_NOWARN)
set_name(0x8015907C, "SetOTpos__6Dialogi", SN_NOWARN)
set_name(0x80159088, "___6Dialog", SN_NOWARN)
set_name(0x801590B0, "__6Dialog", SN_NOWARN)
set_name(0x8015910C, "StartAutomap__Fv", SN_NOWARN)
set_name(0x80159124, "AutomapUp__Fv", SN_NOWARN)
set_name(0x8015913C, "AutomapDown__Fv", SN_NOWARN)
set_name(0x80159154, "AutomapLeft__Fv", SN_NOWARN)
set_name(0x8015916C, "AutomapRight__Fv", SN_NOWARN)
set_name(0x80159184, "AMGetLine__FUcUcUc", SN_NOWARN)
set_name(0x80159230, "AmDrawLine__Fiiii", SN_NOWARN)
set_name(0x80159298, "DrawAutomapPlr__Fv", SN_NOWARN)
set_name(0x80159610, "DrawAutoMapVertWall__Fiii", SN_NOWARN)
set_name(0x801596B8, "DrawAutoMapHorzWall__Fiii", SN_NOWARN)
set_name(0x80159760, "DrawAutoMapVertDoor__Fii", SN_NOWARN)
set_name(0x801598D8, "DrawAutoMapHorzDoor__Fii", SN_NOWARN)
set_name(0x80159A58, "DrawAutoMapVertGrate__Fii", SN_NOWARN)
set_name(0x80159AEC, "DrawAutoMapHorzGrate__Fii", SN_NOWARN)
set_name(0x80159B80, "DrawAutoMapSquare__Fii", SN_NOWARN)
set_name(0x80159C98, "DrawAutoMapStairs__Fii", SN_NOWARN)
set_name(0x80159E40, "DrawAutomap__Fv", SN_NOWARN)
set_name(0x8015A19C, "PRIM_GetPrim__FPP7LINE_F2", SN_NOWARN)
|
set_name(2148723220, 'GameOnlyTestRoutine__Fv', SN_NOWARN)
set_name(2148723228, 'vecleny__Fii', SN_NOWARN)
set_name(2148723264, 'veclenx__Fii', SN_NOWARN)
set_name(2148723308, 'GetDamageAmt__FiPiT1', SN_NOWARN)
set_name(2148724956, 'CheckBlock__Fiiii', SN_NOWARN)
set_name(2148725292, 'FindClosest__Fiii', SN_NOWARN)
set_name(2148725704, 'GetSpellLevel__Fii', SN_NOWARN)
set_name(2148725916, 'GetDirection8__Fiiii', SN_NOWARN)
set_name(2148726456, 'DeleteMissile__Fii', SN_NOWARN)
set_name(2148726648, 'GetMissileVel__Fiiiiii', SN_NOWARN)
set_name(2148727036, 'PutMissile__Fi', SN_NOWARN)
set_name(2148727352, 'GetMissilePos__Fi', SN_NOWARN)
set_name(2148727688, 'MoveMissilePos__Fi', SN_NOWARN)
set_name(2148728080, 'MonsterTrapHit__FiiiiiUc', SN_NOWARN)
set_name(2148729040, 'MonsterMHit__FiiiiiiUc', SN_NOWARN)
set_name(2148731052, 'PlayerMHit__FiiiiiiUcUc', SN_NOWARN)
set_name(2148733756, 'Plr2PlrMHit__FiiiiiiUc', SN_NOWARN)
set_name(2148735804, 'CheckMissileCol__FiiiUciiUc', SN_NOWARN)
set_name(2148737720, 'SetMissAnim__Fii', SN_NOWARN)
set_name(2148737960, 'SetMissDir__Fii', SN_NOWARN)
set_name(2148738080, 'AddLArrow__Fiiiiiicii', SN_NOWARN)
set_name(2148738592, 'AddArrow__Fiiiiiicii', SN_NOWARN)
set_name(2148739068, 'GetVileMissPos__Fiii', SN_NOWARN)
set_name(2148739388, 'AddRndTeleport__Fiiiiiicii', SN_NOWARN)
set_name(2148740316, 'AddFirebolt__Fiiiiiicii', SN_NOWARN)
set_name(2148741052, 'AddMagmaball__Fiiiiiicii', SN_NOWARN)
set_name(2148741360, 'AddTeleport__Fiiiiiicii', SN_NOWARN)
set_name(2148741980, 'AddLightball__Fiiiiiicii', SN_NOWARN)
set_name(2148742352, 'AddFirewall__Fiiiiiicii', SN_NOWARN)
set_name(2148742868, 'AddFireball__Fiiiiiicii', SN_NOWARN)
set_name(2148743500, 'AddLightctrl__Fiiiiiicii', SN_NOWARN)
set_name(2148743764, 'AddLightning__Fiiiiiicii', SN_NOWARN)
set_name(2148744268, 'AddMisexp__Fiiiiiicii', SN_NOWARN)
set_name(2148744896, 'CheckIfTrig__Fii', SN_NOWARN)
set_name(2148745164, 'AddTown__Fiiiiiicii', SN_NOWARN)
set_name(2148746284, 'AddFlash__Fiiiiiicii', SN_NOWARN)
set_name(2148746844, 'AddFlash2__Fiiiiiicii', SN_NOWARN)
set_name(2148747376, 'AddManashield__Fiiiiiicii', SN_NOWARN)
set_name(2148747632, 'AddFiremove__Fiiiiiicii', SN_NOWARN)
set_name(2148748008, 'AddGuardian__Fiiiiiicii', SN_NOWARN)
set_name(2148749264, 'AddChain__Fiiiiiicii', SN_NOWARN)
set_name(2148749416, 'AddRhino__Fiiiiiicii', SN_NOWARN)
set_name(2148750024, 'AddFlare__Fiiiiiicii', SN_NOWARN)
set_name(2148750816, 'AddAcid__Fiiiiiicii', SN_NOWARN)
set_name(2148751108, 'AddAcidpud__Fiiiiiicii', SN_NOWARN)
set_name(2148751356, 'AddStone__Fiiiiiicii', SN_NOWARN)
set_name(2148752200, 'AddGolem__Fiiiiiicii', SN_NOWARN)
set_name(2148752716, 'AddBoom__Fiiiiiicii', SN_NOWARN)
set_name(2148752948, 'AddHeal__Fiiiiiicii', SN_NOWARN)
set_name(2148753532, 'AddHealOther__Fiiiiiicii', SN_NOWARN)
set_name(2148753676, 'AddElement__Fiiiiiicii', SN_NOWARN)
set_name(2148754260, 'AddIdentify__Fiiiiiicii', SN_NOWARN)
set_name(2148754468, 'AddFirewallC__Fiiiiiicii', SN_NOWARN)
set_name(2148755200, 'AddInfra__Fiiiiiicii', SN_NOWARN)
set_name(2148755504, 'AddWave__Fiiiiiicii', SN_NOWARN)
set_name(2148755636, 'AddNova__Fiiiiiicii', SN_NOWARN)
set_name(2148756204, 'AddRepair__Fiiiiiicii', SN_NOWARN)
set_name(2148756412, 'AddRecharge__Fiiiiiicii', SN_NOWARN)
set_name(2148756620, 'AddDisarm__Fiiiiiicii', SN_NOWARN)
set_name(2148756764, 'AddApoca__Fiiiiiicii', SN_NOWARN)
set_name(2148757372, 'AddFlame__Fiiiiiicii', SN_NOWARN)
set_name(2148758008, 'AddFlamec__Fiiiiiicii', SN_NOWARN)
set_name(2148758280, 'AddCbolt__Fiiiiiicii', SN_NOWARN)
set_name(2148758816, 'AddHbolt__Fiiiiiicii', SN_NOWARN)
set_name(2148759296, 'AddResurrect__Fiiiiiicii', SN_NOWARN)
set_name(2148759444, 'AddResurrectBeam__Fiiiiiicii', SN_NOWARN)
set_name(2148759660, 'AddTelekinesis__Fiiiiiicii', SN_NOWARN)
set_name(2148759804, 'AddBoneSpirit__Fiiiiiicii', SN_NOWARN)
set_name(2148760340, 'AddRportal__Fiiiiiicii', SN_NOWARN)
set_name(2148760568, 'AddDiabApoca__Fiiiiiicii', SN_NOWARN)
set_name(2148760916, 'AddMissile__Fiiiiiiciii', SN_NOWARN)
set_name(2148761768, 'Sentfire__Fiii', SN_NOWARN)
set_name(2148762280, 'MI_Dummy__Fi', SN_NOWARN)
set_name(2148762288, 'MI_Golem__Fi', SN_NOWARN)
set_name(2148762924, 'MI_SetManashield__Fi', SN_NOWARN)
set_name(2148762984, 'MI_LArrow__Fi', SN_NOWARN)
set_name(2148764996, 'MI_Arrow__Fi', SN_NOWARN)
set_name(2148765560, 'MI_Firebolt__Fi', SN_NOWARN)
set_name(2148767328, 'MI_Lightball__Fi', SN_NOWARN)
set_name(2148768004, 'MI_Acidpud__Fi', SN_NOWARN)
set_name(2148768308, 'MI_Firewall__Fi', SN_NOWARN)
set_name(2148769048, 'MI_Fireball__Fi', SN_NOWARN)
set_name(2148771576, 'MI_Lightctrl__Fi', SN_NOWARN)
set_name(2148773032, 'MI_Lightning__Fi', SN_NOWARN)
set_name(2148773440, 'MI_Town__Fi', SN_NOWARN)
set_name(2148774148, 'MI_Flash__Fi', SN_NOWARN)
set_name(2148775220, 'MI_Flash2__Fi', SN_NOWARN)
set_name(2148775796, 'MI_Manashield__Fi', SN_NOWARN)
set_name(2148777368, 'MI_Firemove__Fi', SN_NOWARN)
set_name(2148778484, 'MI_Guardian__Fi', SN_NOWARN)
set_name(2148779488, 'MI_Chain__Fi', SN_NOWARN)
set_name(2148780292, 'MI_Misexp__Fi', SN_NOWARN)
set_name(2148781092, 'MI_Acidsplat__Fi', SN_NOWARN)
set_name(2148781544, 'MI_Teleport__Fi', SN_NOWARN)
set_name(2148782544, 'MI_Stone__Fi', SN_NOWARN)
set_name(2148783000, 'MI_Boom__Fi', SN_NOWARN)
set_name(2148783276, 'MI_Rhino__Fi', SN_NOWARN)
set_name(2148784276, 'MI_FirewallC__Fi', SN_NOWARN)
set_name(2148785288, 'MI_Infra__Fi', SN_NOWARN)
set_name(2148785512, 'MI_Apoca__Fi', SN_NOWARN)
set_name(2148786204, 'MI_Wave__Fi', SN_NOWARN)
set_name(2148787652, 'MI_Nova__Fi', SN_NOWARN)
set_name(2148788388, 'MI_Flame__Fi', SN_NOWARN)
set_name(2148788920, 'MI_Flamec__Fi', SN_NOWARN)
set_name(2148789736, 'MI_Cbolt__Fi', SN_NOWARN)
set_name(2148790540, 'MI_Hbolt__Fi', SN_NOWARN)
set_name(2148791352, 'MI_Element__Fi', SN_NOWARN)
set_name(2148793100, 'MI_Bonespirit__Fi', SN_NOWARN)
set_name(2148794160, 'MI_ResurrectBeam__Fi', SN_NOWARN)
set_name(2148794312, 'MI_Rportal__Fi', SN_NOWARN)
set_name(2148794892, 'ProcessMissiles__Fv', SN_NOWARN)
set_name(2148795904, 'ClearMissileSpot__Fi', SN_NOWARN)
set_name(2148796144, 'MoveToScrollTarget__7CBlocks', SN_NOWARN)
set_name(2148796164, 'MonstPartJump__Fi', SN_NOWARN)
set_name(2148796568, 'DeleteMonster__Fi', SN_NOWARN)
set_name(2148796720, 'M_GetDir__Fi', SN_NOWARN)
set_name(2148796852, 'M_StartDelay__Fii', SN_NOWARN)
set_name(2148796992, 'M_StartRAttack__Fiii', SN_NOWARN)
set_name(2148797348, 'M_StartRSpAttack__Fiii', SN_NOWARN)
set_name(2148797716, 'M_StartSpAttack__Fi', SN_NOWARN)
set_name(2148798024, 'M_StartEat__Fi', SN_NOWARN)
set_name(2148798308, 'M_GetKnockback__Fi', SN_NOWARN)
set_name(2148798912, 'M_StartHit__Fiii', SN_NOWARN)
set_name(2148799728, 'M_DiabloDeath__FiUc', SN_NOWARN)
set_name(2148800568, 'M2MStartHit__Fiii', SN_NOWARN)
set_name(2148801320, 'MonstStartKill__FiiUc', SN_NOWARN)
set_name(2148802112, 'M2MStartKill__Fii', SN_NOWARN)
set_name(2148803168, 'M_StartKill__Fii', SN_NOWARN)
set_name(2148803440, 'M_StartFadein__FiiUc', SN_NOWARN)
set_name(2148803856, 'M_StartFadeout__FiiUc', SN_NOWARN)
set_name(2148804260, 'M_StartHeal__Fi', SN_NOWARN)
set_name(2148804472, 'M_ChangeLightOffset__Fi', SN_NOWARN)
set_name(2148804672, 'M_DoStand__Fi', SN_NOWARN)
set_name(2148804856, 'M_DoWalk__Fi', SN_NOWARN)
set_name(2148805572, 'M_DoWalk2__Fi', SN_NOWARN)
set_name(2148806136, 'M_DoWalk3__Fi', SN_NOWARN)
set_name(2148806916, 'M_TryM2MHit__Fiiiii', SN_NOWARN)
set_name(2148807444, 'M_TryH2HHit__Fiiiii', SN_NOWARN)
set_name(2148809528, 'M_DoAttack__Fi', SN_NOWARN)
set_name(2148810020, 'M_DoRAttack__Fi', SN_NOWARN)
set_name(2148810460, 'M_DoRSpAttack__Fi', SN_NOWARN)
set_name(2148811032, 'M_DoSAttack__Fi', SN_NOWARN)
set_name(2148811312, 'M_DoFadein__Fi', SN_NOWARN)
set_name(2148811560, 'M_DoFadeout__Fi', SN_NOWARN)
set_name(2148811924, 'M_DoHeal__Fi', SN_NOWARN)
set_name(2148812144, 'M_DoTalk__Fi', SN_NOWARN)
set_name(2148813432, 'M_Teleport__Fi', SN_NOWARN)
set_name(2148814100, 'M_DoGotHit__Fi', SN_NOWARN)
set_name(2148814284, 'DoEnding__Fv', SN_NOWARN)
set_name(2148814292, 'PrepDoEnding__Fv', SN_NOWARN)
set_name(2148814640, 'M_DoDeath__Fi', SN_NOWARN)
set_name(2148815348, 'M_DoSpStand__Fi', SN_NOWARN)
set_name(2148815580, 'M_DoDelay__Fi', SN_NOWARN)
set_name(2148815892, 'M_DoStone__Fi', SN_NOWARN)
set_name(2148816084, 'M_WalkDir__Fii', SN_NOWARN)
set_name(2148816720, 'GroupUnity__Fi', SN_NOWARN)
set_name(2148817796, 'M_CallWalk__Fii', SN_NOWARN)
set_name(2148818288, 'M_PathWalk__Fi', SN_NOWARN)
set_name(2148818512, 'M_CallWalk2__Fii', SN_NOWARN)
set_name(2148818788, 'M_DumbWalk__Fii', SN_NOWARN)
set_name(2148818872, 'M_RoundWalk__FiiRi', SN_NOWARN)
set_name(2148819288, 'MAI_Zombie__Fi', SN_NOWARN)
set_name(2148819820, 'MAI_SkelSd__Fi', SN_NOWARN)
set_name(2148820256, 'MAI_Snake__Fi', SN_NOWARN)
set_name(2148821316, 'MAI_Bat__Fi', SN_NOWARN)
set_name(2148822296, 'MAI_SkelBow__Fi', SN_NOWARN)
set_name(2148822816, 'MAI_Fat__Fi', SN_NOWARN)
set_name(2148823280, 'MAI_Sneak__Fi', SN_NOWARN)
set_name(2148824312, 'MAI_Fireman__Fi', SN_NOWARN)
set_name(2148825100, 'MAI_Fallen__Fi', SN_NOWARN)
set_name(2148825924, 'MAI_Cleaver__Fi', SN_NOWARN)
set_name(2148826184, 'MAI_Round__FiUc', SN_NOWARN)
set_name(2148827348, 'MAI_GoatMc__Fi', SN_NOWARN)
set_name(2148827380, 'MAI_Ranged__FiiUc', SN_NOWARN)
set_name(2148827960, 'MAI_GoatBow__Fi', SN_NOWARN)
set_name(2148827996, 'MAI_Succ__Fi', SN_NOWARN)
set_name(2148828032, 'MAI_AcidUniq__Fi', SN_NOWARN)
set_name(2148828068, 'MAI_Scav__Fi', SN_NOWARN)
set_name(2148829144, 'MAI_Garg__Fi', SN_NOWARN)
set_name(2148829656, 'MAI_RoundRanged__FiiUciUc', SN_NOWARN)
set_name(2148830992, 'MAI_Magma__Fi', SN_NOWARN)
set_name(2148831036, 'MAI_Storm__Fi', SN_NOWARN)
set_name(2148831080, 'MAI_Acid__Fi', SN_NOWARN)
set_name(2148831128, 'MAI_Diablo__Fi', SN_NOWARN)
set_name(2148831172, 'MAI_RR2__Fiii', SN_NOWARN)
set_name(2148832480, 'MAI_Mega__Fi', SN_NOWARN)
set_name(2148832516, 'MAI_SkelKing__Fi', SN_NOWARN)
set_name(2148833884, 'MAI_Rhino__Fi', SN_NOWARN)
set_name(2148835104, 'MAI_Counselor__Fi', SN_NOWARN)
set_name(2148836360, 'MAI_Garbud__Fi', SN_NOWARN)
set_name(2148836820, 'MAI_Zhar__Fi', SN_NOWARN)
set_name(2148837352, 'MAI_SnotSpil__Fi', SN_NOWARN)
set_name(2148837944, 'MAI_Lazurus__Fi', SN_NOWARN)
set_name(2148838604, 'MAI_Lazhelp__Fi', SN_NOWARN)
set_name(2148838920, 'MAI_Lachdanan__Fi', SN_NOWARN)
set_name(2148839348, 'MAI_Warlord__Fi', SN_NOWARN)
set_name(2148839708, 'DeleteMonsterList__Fv', SN_NOWARN)
set_name(2148840040, 'ProcessMonsters__Fv', SN_NOWARN)
set_name(2148841656, 'DirOK__Fii', SN_NOWARN)
set_name(2148842768, 'PosOkMissile__Fii', SN_NOWARN)
set_name(2148842872, 'CheckNoSolid__Fii', SN_NOWARN)
set_name(2148842940, 'LineClearF__FPFii_Uciiii', SN_NOWARN)
set_name(2148843588, 'LineClear__Fiiii', SN_NOWARN)
set_name(2148843652, 'LineClearF1__FPFiii_Uciiiii', SN_NOWARN)
set_name(2148844312, 'M_FallenFear__Fii', SN_NOWARN)
set_name(2148844812, 'PrintMonstHistory__Fi', SN_NOWARN)
set_name(2148845364, 'PrintUniqueHistory__Fv', SN_NOWARN)
set_name(2148845656, 'MissToMonst__Fiii', SN_NOWARN)
set_name(2148846912, 'PosOkMonst2__Fiii', SN_NOWARN)
set_name(2148847452, 'PosOkMonst3__Fiii', SN_NOWARN)
set_name(2148848208, 'M_SpawnSkel__Fiii', SN_NOWARN)
set_name(2148848588, 'TalktoMonster__Fi', SN_NOWARN)
set_name(2148848908, 'SpawnGolum__Fiiii', SN_NOWARN)
set_name(2148849572, 'CanTalkToMonst__Fi', SN_NOWARN)
set_name(2148849684, 'CheckMonsterHit__FiRUc', SN_NOWARN)
set_name(2148849956, 'MAI_Golum__Fi', SN_NOWARN)
set_name(2148850868, 'MAI_Path__Fi', SN_NOWARN)
set_name(2148851252, 'M_StartAttack__Fi', SN_NOWARN)
set_name(2148851560, 'M_StartWalk__Fiiiiii', SN_NOWARN)
set_name(2148852116, 'AddWarpMissile__Fiii', SN_NOWARN)
set_name(2148852380, 'SyncPortals__Fv', SN_NOWARN)
set_name(2148852644, 'AddInTownPortal__Fi', SN_NOWARN)
set_name(2148852704, 'ActivatePortal__FiiiiiUc', SN_NOWARN)
set_name(2148852924, 'DeactivatePortal__Fi', SN_NOWARN)
set_name(2148853012, 'PortalOnLevel__Fi', SN_NOWARN)
set_name(2148853124, 'RemovePortalMissile__Fi', SN_NOWARN)
set_name(2148853536, 'SetCurrentPortal__Fi', SN_NOWARN)
set_name(2148853548, 'GetPortalLevel__Fv', SN_NOWARN)
set_name(2148854044, 'GetPortalLvlPos__Fv', SN_NOWARN)
set_name(2148854272, 'FreeInvGFX__Fv', SN_NOWARN)
set_name(2148854280, 'InvDrawSlot__Fiii', SN_NOWARN)
set_name(2148854412, 'InvDrawSlotBack__FiiiiUc', SN_NOWARN)
set_name(2148855008, 'InvDrawItem__FiiiUci', SN_NOWARN)
set_name(2148855216, 'InvDrawSlots__Fv', SN_NOWARN)
set_name(2148856004, 'PrintStat__FiiPcUc', SN_NOWARN)
set_name(2148856208, 'DrawInvStats__Fv', SN_NOWARN)
set_name(2148859164, 'DrawInvBack__Fv', SN_NOWARN)
set_name(2148859300, 'DrawInvCursor__Fv', SN_NOWARN)
set_name(2148860544, 'DrawInvMsg__Fv', SN_NOWARN)
set_name(2148861000, 'DrawInv__Fv', SN_NOWARN)
set_name(2148861048, 'DrawInvTSK__FP4TASK', SN_NOWARN)
set_name(2148861764, 'DoThatDrawInv__Fv', SN_NOWARN)
set_name(2148864032, 'AutoPlace__FiiiiUc', SN_NOWARN)
set_name(2148864828, 'SpecialAutoPlace__FiiiiUc', SN_NOWARN)
set_name(2148865748, 'GoldAutoPlace__Fi', SN_NOWARN)
set_name(2148866976, 'WeaponAutoPlace__Fi', SN_NOWARN)
set_name(2148867624, 'SwapItem__FP10ItemStructT0', SN_NOWARN)
set_name(2148867864, 'CheckInvPaste__Fiii', SN_NOWARN)
set_name(2148875172, 'CheckInvCut__Fiii', SN_NOWARN)
set_name(2148877872, 'RemoveInvItem__Fii', SN_NOWARN)
set_name(2148878548, 'RemoveSpdBarItem__Fii', SN_NOWARN)
set_name(2148878804, 'CheckInvScrn__Fv', SN_NOWARN)
set_name(2148878924, 'CheckItemStats__Fi', SN_NOWARN)
set_name(2148879056, 'CheckBookLevel__Fi', SN_NOWARN)
set_name(2148879364, 'CheckQuestItem__Fi', SN_NOWARN)
set_name(2148880428, 'InvGetItem__Fii', SN_NOWARN)
set_name(2148881188, 'AutoGetItem__Fii', SN_NOWARN)
set_name(2148883848, 'FindGetItem__FiUsi', SN_NOWARN)
set_name(2148884028, 'SyncGetItem__FiiiUsi', SN_NOWARN)
set_name(2148884552, 'TryInvPut__Fv', SN_NOWARN)
set_name(2148885008, 'InvPutItem__Fiii', SN_NOWARN)
set_name(2148886196, 'SyncPutItem__FiiiiUsiUciiiiiUl', SN_NOWARN)
set_name(2148887632, 'CheckInvHLight__Fv', SN_NOWARN)
set_name(2148888468, 'RemoveScroll__Fi', SN_NOWARN)
set_name(2148888952, 'UseScroll__Fv', SN_NOWARN)
set_name(2148889568, 'UseStaffCharge__Fi', SN_NOWARN)
set_name(2148889760, 'UseStaff__Fv', SN_NOWARN)
set_name(2148889952, 'StartGoldDrop__Fv', SN_NOWARN)
set_name(2148890212, 'UseInvItem__Fii', SN_NOWARN)
set_name(2148891532, 'DoTelekinesis__Fv', SN_NOWARN)
set_name(2148891828, 'CalculateGold__Fi', SN_NOWARN)
set_name(2148892140, 'DropItemBeforeTrig__Fv', SN_NOWARN)
set_name(2148892228, 'ControlInv__Fv', SN_NOWARN)
set_name(2148893132, 'InvGetItemWH__Fi', SN_NOWARN)
set_name(2148893380, 'InvAlignObject__Fv', SN_NOWARN)
set_name(2148893816, 'InvSetItemCurs__Fv', SN_NOWARN)
set_name(2148894220, 'InvMoveCursLeft__Fv', SN_NOWARN)
set_name(2148894696, 'InvMoveCursRight__Fv', SN_NOWARN)
set_name(2148895488, 'InvMoveCursUp__Fv', SN_NOWARN)
set_name(2148895976, 'InvMoveCursDown__Fv', SN_NOWARN)
set_name(2148896768, 'DumpMonsters__7CBlocks', SN_NOWARN)
set_name(2148896808, 'Flush__4CPad', SN_NOWARN)
set_name(2148896844, 'SetRGB__6DialogUcUcUc', SN_NOWARN)
set_name(2148896876, 'SetBack__6Dialogi', SN_NOWARN)
set_name(2148896884, 'SetBorder__6Dialogi', SN_NOWARN)
set_name(2148896892, 'SetOTpos__6Dialogi', SN_NOWARN)
set_name(2148896904, '___6Dialog', SN_NOWARN)
set_name(2148896944, '__6Dialog', SN_NOWARN)
set_name(2148897036, 'StartAutomap__Fv', SN_NOWARN)
set_name(2148897060, 'AutomapUp__Fv', SN_NOWARN)
set_name(2148897084, 'AutomapDown__Fv', SN_NOWARN)
set_name(2148897108, 'AutomapLeft__Fv', SN_NOWARN)
set_name(2148897132, 'AutomapRight__Fv', SN_NOWARN)
set_name(2148897156, 'AMGetLine__FUcUcUc', SN_NOWARN)
set_name(2148897328, 'AmDrawLine__Fiiii', SN_NOWARN)
set_name(2148897432, 'DrawAutomapPlr__Fv', SN_NOWARN)
set_name(2148898320, 'DrawAutoMapVertWall__Fiii', SN_NOWARN)
set_name(2148898488, 'DrawAutoMapHorzWall__Fiii', SN_NOWARN)
set_name(2148898656, 'DrawAutoMapVertDoor__Fii', SN_NOWARN)
set_name(2148899032, 'DrawAutoMapHorzDoor__Fii', SN_NOWARN)
set_name(2148899416, 'DrawAutoMapVertGrate__Fii', SN_NOWARN)
set_name(2148899564, 'DrawAutoMapHorzGrate__Fii', SN_NOWARN)
set_name(2148899712, 'DrawAutoMapSquare__Fii', SN_NOWARN)
set_name(2148899992, 'DrawAutoMapStairs__Fii', SN_NOWARN)
set_name(2148900416, 'DrawAutomap__Fv', SN_NOWARN)
set_name(2148901276, 'PRIM_GetPrim__FPP7LINE_F2', SN_NOWARN)
|
""" Third party dependencies for this project. """
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def zola_deps():
""" Fetches the dependencies for the zola project. """
if "zola-v0-14-1-x86-64-unknown-linux-gnu" not in native.existing_rules():
http_archive(
name = "zola-v0-14-1-x86-64-unknown-linux-gnu",
url = "https://github.com/getzola/zola/releases/download/v0.14.1/zola-v0.14.1-x86_64-unknown-linux-gnu.tar.gz",
build_file = "@rules_zola//third_party:zola-v0-14-1-x86-64-unknown-linux-gnu.BUILD",
sha256 = "4223f57d9b60ad7217c44a815fa975b2229f692b7ef3de4b7ce61f1634e8dc33",
)
if "zola-v0-14-1-x86_64-apple-darwin" not in native.existing_rules():
http_archive(
name = "zola-v0-14-1-x86_64-apple-darwin",
url = "https://github.com/getzola/zola/releases/download/v0.14.1/zola-v0.14.1-x86_64-apple-darwin.tar.gz",
build_file = "@rules_zola//third_party:zola-v0-14-1-x86_64-apple-darwin.BUILD",
sha256 = "754d5e1b4ca67a13c6cb4741dbff5b248075f4f4a0353d6673aa4f5afb7ec0bf",
)
if "zola-v0-14-1-x86_64-pc-windows-msvc" not in native.existing_rules():
http_archive(
name = "zola-v0-14-1-x86_64-pc-windows-msvc",
url = "https://github.com/getzola/zola/releases/download/v0.14.1/zola-v0.14.1-x86_64-pc-windows-msvc.zip",
build_file = "@rules_zola//third_party:zola-v0-14-1-x86_64-pc-windows-msvc.BUILD",
sha256 = "62bf50a6e2b606faf80cdf9112deca945fe89f67863fb06f793c27a26c968a91",
)
if "bazel_skylib" not in native.existing_rules():
http_archive(
name = "bazel_skylib",
sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
urls = [
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
],
)
|
""" Third party dependencies for this project. """
load('@bazel_tools//tools/build_defs/repo:http.bzl', 'http_archive')
def zola_deps():
""" Fetches the dependencies for the zola project. """
if 'zola-v0-14-1-x86-64-unknown-linux-gnu' not in native.existing_rules():
http_archive(name='zola-v0-14-1-x86-64-unknown-linux-gnu', url='https://github.com/getzola/zola/releases/download/v0.14.1/zola-v0.14.1-x86_64-unknown-linux-gnu.tar.gz', build_file='@rules_zola//third_party:zola-v0-14-1-x86-64-unknown-linux-gnu.BUILD', sha256='4223f57d9b60ad7217c44a815fa975b2229f692b7ef3de4b7ce61f1634e8dc33')
if 'zola-v0-14-1-x86_64-apple-darwin' not in native.existing_rules():
http_archive(name='zola-v0-14-1-x86_64-apple-darwin', url='https://github.com/getzola/zola/releases/download/v0.14.1/zola-v0.14.1-x86_64-apple-darwin.tar.gz', build_file='@rules_zola//third_party:zola-v0-14-1-x86_64-apple-darwin.BUILD', sha256='754d5e1b4ca67a13c6cb4741dbff5b248075f4f4a0353d6673aa4f5afb7ec0bf')
if 'zola-v0-14-1-x86_64-pc-windows-msvc' not in native.existing_rules():
http_archive(name='zola-v0-14-1-x86_64-pc-windows-msvc', url='https://github.com/getzola/zola/releases/download/v0.14.1/zola-v0.14.1-x86_64-pc-windows-msvc.zip', build_file='@rules_zola//third_party:zola-v0-14-1-x86_64-pc-windows-msvc.BUILD', sha256='62bf50a6e2b606faf80cdf9112deca945fe89f67863fb06f793c27a26c968a91')
if 'bazel_skylib' not in native.existing_rules():
http_archive(name='bazel_skylib', sha256='c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d', urls=['https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz', 'https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz'])
|
#Printing stars in 'W' shape!
'''
* * *
* * * *
** **
* *
'''
i=0
j=3
for row in range(4):
for col in range(7):
if(col==0 or col==6) or (col==4 and row==1) or (col==5 and row==2):
print('*',end='')
elif row==i and col==j:
print('*', end='')
i+=1
j-=1
else:
print(end=' ')
print()
|
"""
* * *
* * * *
** **
* *
"""
i = 0
j = 3
for row in range(4):
for col in range(7):
if (col == 0 or col == 6) or (col == 4 and row == 1) or (col == 5 and row == 2):
print('*', end='')
elif row == i and col == j:
print('*', end='')
i += 1
j -= 1
else:
print(end=' ')
print()
|
def get():
return [
'const',
'var',
'import',
'require',
'using',
'load',
'from',
'as'
]
|
def get():
return ['const', 'var', 'import', 'require', 'using', 'load', 'from', 'as']
|
def inlookuptable(value: str, lookuptable: str):
with open(lookuptable, "r") as lookuptablestream:
for table in lookuptablestream:
if table.strip("\n") == value:
return True
return False
|
def inlookuptable(value: str, lookuptable: str):
with open(lookuptable, 'r') as lookuptablestream:
for table in lookuptablestream:
if table.strip('\n') == value:
return True
return False
|
# Labels for Nodes and Relationships
BOT_LABEL = "Bot"
USER_LABEL = "User"
TWEET_LABEL = "Tweet"
WROTE_LABEL = "WROTE"
RETWEET_LABEL = "RETWEETED"
QUOTE_LABEL = "QUOTED"
REPLY_LABEL = "REPLIED"
FOLLOW_LABEL = "FOLLOWS"
QUERY = "match (b:Bot) - [r] - (t:Tweet) - [r2] - (t2:Tweet)" \
"call apoc.cypher.run('with `t` as t match (u:User) -[]-(t) return u, t limit 50', {t:t}) " \
"Yield value "\
"return b, value.u, t, r2, t2 " \
"limit 150"
|
bot_label = 'Bot'
user_label = 'User'
tweet_label = 'Tweet'
wrote_label = 'WROTE'
retweet_label = 'RETWEETED'
quote_label = 'QUOTED'
reply_label = 'REPLIED'
follow_label = 'FOLLOWS'
query = "match (b:Bot) - [r] - (t:Tweet) - [r2] - (t2:Tweet)call apoc.cypher.run('with `t` as t match (u:User) -[]-(t) return u, t limit 50', {t:t}) Yield value return b, value.u, t, r2, t2 limit 150"
|
def my_first_module_func():
print('you are using my first created module')
def console_log(message):
print(message)
|
def my_first_module_func():
print('you are using my first created module')
def console_log(message):
print(message)
|
def cuadrado1(num1):
return num1**2
cuadrado2 = lambda num1: num1 ** 2
print(cuadrado1(5))
print(cuadrado2(5))
|
def cuadrado1(num1):
return num1 ** 2
cuadrado2 = lambda num1: num1 ** 2
print(cuadrado1(5))
print(cuadrado2(5))
|
MODE_5X11 = 0b00000011
class I2cConstants:
def __init__(self):
self.I2C_ADDR = 0x60
self.CMD_SET_MODE = 0x00
self.CMD_SET_BRIGHTNESS = 0x19
self.MODE_5X11 = 0b00000011
class IS31FL3730:
def __init__(self, smbus, font):
self.bus = smbus
self.font = font
self.i2cConstants = I2cConstants()
self._rotate = False
self.bus = self.bus.SMBus(1)
self.buffer = [0] * 11
self.offset = 0
self.error_count = 0
self.set_mode(self.i2cConstants.MODE_5X11)
def set_rotate(self, value):
self._rotate = value
def rotate5bits(self, x):
r = 0
if x & 16:
r = r | 1
if x & 8:
r = r | 2
if x & 4:
r = r | 4
if x & 2:
r = r | 8
if x & 1:
r = r | 16
return r
def update(self):
if self.offset + 11 <= len(self.buffer):
self.window = self.buffer[self.offset:self.offset + 11]
else:
self.window = self.buffer[self.offset:]
self.window += self.buffer[:11 - len(self.window)]
if self._rotate:
self.window.reverse()
for i in range(len(self.window)):
self.window[i] = self.rotate5bits(self.window[i])
self.window.append(0xff)
try:
self.bus.write_i2c_block_data(self.i2cConstants.I2C_ADDR, 0x01, self.window)
except IOError:
self.error_count += 1
if self.error_count == 10:
print("A high number of IO Errors have occurred, please check your soldering/connections.")
def set_mode(self, mode=MODE_5X11):
self.bus.write_i2c_block_data(self.i2cConstants.I2C_ADDR, self.i2cConstants.CMD_SET_MODE, [self.i2cConstants.MODE_5X11])
def get_brightness(self):
if hasattr(self, 'brightness'):
return self.brightness
return -1
def set_brightness(self, brightness):
self.brightness = brightness
self.bus.write_i2c_block_data(self.i2cConstants.I2C_ADDR, self.i2cConstants.CMD_SET_BRIGHTNESS, [self.brightness])
def set_col(self, x, value):
if len(self.buffer) <= x:
self.buffer += [0] * (x - len(self.buffer) + 1)
self.buffer[x] = value
def write_string(self, chars, x = 0):
for char in chars:
if ord(char) == 0x20 or ord(char) not in self.font:
self.set_col(x, 0)
x += 1
self.set_col(x, 0)
x += 1
self.set_col(x, 0)
x += 1
else:
font_char = self.font[ord(char)]
for i in range(0, len(font_char)):
self.set_col(x, font_char[i])
x += 1
self.set_col(x, 0)
x += 1 # space between chars
self.update()
# draw a graph across the screen either using
# the supplied min/max for scaling or auto
# scaling the output to the min/max values
# supplied
def graph(self, values, low=None, high=None):
values = [float(x) for x in values]
if low == None:
low = min(values)
if high == None:
high = max(values)
span = high - low
for col, value in enumerate(values):
value -= low
value /= span
value *= 5
if value > 5: value = 5
if value < 0: value = 0
self.set_col(col, [0,16,24,28,30,31][int(value)])
self.update()
def set_buffer(self, replacement):
self.buffer = replacement
def buffer_len(self):
return len(self.buffer)
def scroll(self, delta = 1):
self.offset += delta
self.offset %= len(self.buffer)
self.update()
def clear_buffer(self):
self.offset = 0
self.buffer = [0] * 11
def clear(self):
self.clear_buffer()
self.update()
def load_font(self, new_font):
self.font = new_font
def scroll_to(self, pos = 0):
self.offset = pos
self.offset %= len(self.buffer)
self.update()
def io_errors(self):
return self.error_count
def set_pixel(self, x,y,value):
if value:
self.buffer[x] |= (1 << y)
else:
self.buffer[x] &= ~(1 << y)
|
mode_5_x11 = 3
class I2Cconstants:
def __init__(self):
self.I2C_ADDR = 96
self.CMD_SET_MODE = 0
self.CMD_SET_BRIGHTNESS = 25
self.MODE_5X11 = 3
class Is31Fl3730:
def __init__(self, smbus, font):
self.bus = smbus
self.font = font
self.i2cConstants = i2c_constants()
self._rotate = False
self.bus = self.bus.SMBus(1)
self.buffer = [0] * 11
self.offset = 0
self.error_count = 0
self.set_mode(self.i2cConstants.MODE_5X11)
def set_rotate(self, value):
self._rotate = value
def rotate5bits(self, x):
r = 0
if x & 16:
r = r | 1
if x & 8:
r = r | 2
if x & 4:
r = r | 4
if x & 2:
r = r | 8
if x & 1:
r = r | 16
return r
def update(self):
if self.offset + 11 <= len(self.buffer):
self.window = self.buffer[self.offset:self.offset + 11]
else:
self.window = self.buffer[self.offset:]
self.window += self.buffer[:11 - len(self.window)]
if self._rotate:
self.window.reverse()
for i in range(len(self.window)):
self.window[i] = self.rotate5bits(self.window[i])
self.window.append(255)
try:
self.bus.write_i2c_block_data(self.i2cConstants.I2C_ADDR, 1, self.window)
except IOError:
self.error_count += 1
if self.error_count == 10:
print('A high number of IO Errors have occurred, please check your soldering/connections.')
def set_mode(self, mode=MODE_5X11):
self.bus.write_i2c_block_data(self.i2cConstants.I2C_ADDR, self.i2cConstants.CMD_SET_MODE, [self.i2cConstants.MODE_5X11])
def get_brightness(self):
if hasattr(self, 'brightness'):
return self.brightness
return -1
def set_brightness(self, brightness):
self.brightness = brightness
self.bus.write_i2c_block_data(self.i2cConstants.I2C_ADDR, self.i2cConstants.CMD_SET_BRIGHTNESS, [self.brightness])
def set_col(self, x, value):
if len(self.buffer) <= x:
self.buffer += [0] * (x - len(self.buffer) + 1)
self.buffer[x] = value
def write_string(self, chars, x=0):
for char in chars:
if ord(char) == 32 or ord(char) not in self.font:
self.set_col(x, 0)
x += 1
self.set_col(x, 0)
x += 1
self.set_col(x, 0)
x += 1
else:
font_char = self.font[ord(char)]
for i in range(0, len(font_char)):
self.set_col(x, font_char[i])
x += 1
self.set_col(x, 0)
x += 1
self.update()
def graph(self, values, low=None, high=None):
values = [float(x) for x in values]
if low == None:
low = min(values)
if high == None:
high = max(values)
span = high - low
for (col, value) in enumerate(values):
value -= low
value /= span
value *= 5
if value > 5:
value = 5
if value < 0:
value = 0
self.set_col(col, [0, 16, 24, 28, 30, 31][int(value)])
self.update()
def set_buffer(self, replacement):
self.buffer = replacement
def buffer_len(self):
return len(self.buffer)
def scroll(self, delta=1):
self.offset += delta
self.offset %= len(self.buffer)
self.update()
def clear_buffer(self):
self.offset = 0
self.buffer = [0] * 11
def clear(self):
self.clear_buffer()
self.update()
def load_font(self, new_font):
self.font = new_font
def scroll_to(self, pos=0):
self.offset = pos
self.offset %= len(self.buffer)
self.update()
def io_errors(self):
return self.error_count
def set_pixel(self, x, y, value):
if value:
self.buffer[x] |= 1 << y
else:
self.buffer[x] &= ~(1 << y)
|
def sum_list(numbers):
total = 0
for i in numbers:
total += i
return total
print(sum_list([1, 2, -8]))
"""
Write a Python program to sum all the items in a list
"""
|
def sum_list(numbers):
total = 0
for i in numbers:
total += i
return total
print(sum_list([1, 2, -8]))
'\n\n Write a Python program to sum all the items in a list\n \n'
|
#Imagine you are building a compiler. Before running any code, the compiler must check that the parentheses in the program are balanced. Every opening bracket must have a corresponding closing bracket. We can approximate this using strings.
#Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
#An input string is valid if:
#- Open brackets are closed by the same type of brackets.
#- Open brackets are closed in the correct order.
#- Note that an empty string is also considered valid.
#Example:
#Input: "((()))"
#Output: True
#Input: "[()]{}"
#Output: True
#Input: "({[)]"
#Output: False
class Solution:
def closePara (self, s):
if( s == '('):
return (')', False)
elif (s == '{'):
return ('}', False)
elif (s == '['):
return (']', False)
else:
return (s, True)
def appendStack (self, c, paraStack):
paraStack.append(c)
def isValid(self, s):
# Fill this in.
paraStack=[]
lastPara=''
for ch in s:
if(lastPara == ''):
lastPara = ch
paraStack.append(ch)
continue
nextPara, isclosed = self.closePara(ch)
if isclosed:
#pop stack
if(len(paraStack) <= 0):
return False
expectPara,isclosed = self.closePara(paraStack[-1:][0])
if(expectPara != ch):
return False
else:
paraStack.pop()
else:
#put stack
paraStack.append(ch)
if(len(paraStack) != 0 ):
return False
else:
return True
if __name__ == "__main__":
# Test Programs
s = "()(){(())"
# should return False
print(Solution().isValid(s))
s = ""
# should return True
print(Solution().isValid(s))
s = "([{}])()"
# should return True
print(Solution().isValid(s))
s = "([{}])())"
# should return True
print(Solution().isValid(s))
s = "([{}])("
# should return True
print(Solution().isValid(s))
|
class Solution:
def close_para(self, s):
if s == '(':
return (')', False)
elif s == '{':
return ('}', False)
elif s == '[':
return (']', False)
else:
return (s, True)
def append_stack(self, c, paraStack):
paraStack.append(c)
def is_valid(self, s):
para_stack = []
last_para = ''
for ch in s:
if lastPara == '':
last_para = ch
paraStack.append(ch)
continue
(next_para, isclosed) = self.closePara(ch)
if isclosed:
if len(paraStack) <= 0:
return False
(expect_para, isclosed) = self.closePara(paraStack[-1:][0])
if expectPara != ch:
return False
else:
paraStack.pop()
else:
paraStack.append(ch)
if len(paraStack) != 0:
return False
else:
return True
if __name__ == '__main__':
s = '()(){(())'
print(solution().isValid(s))
s = ''
print(solution().isValid(s))
s = '([{}])()'
print(solution().isValid(s))
s = '([{}])())'
print(solution().isValid(s))
s = '([{}])('
print(solution().isValid(s))
|
# -*- coding:utf-8 -*-
"""
@author: leonardo
@created time: 2020-11-03
@last modified time:2020-11-03
"""
def select(engine, backtesting_id):
"""
:param engine:
:param backtesting_id:
:return:
"""
sql = 'SELECT * from strategy_backtesting where backtesting_id="{}"'.format(backtesting_id)
return list(engine.execute(sql))
def insert_on_duplicate_update(engine, data):
"""
:param engine:
:param data:
:return:
"""
sql = 'insert into strategy_backtesting(backtesting_id,strategy_id ,strategy_param,backtesting_start_time,backtesting_end_time)' \
' values (%s,%s,%s,%s,%s)' \
' on duplicate key update backtesting_id=values(backtesting_id),strategy_id=values(strategy_id),strategy_param=values(strategy_param),backtesting_start_time=values(backtesting_start_time),backtesting_end_time=values(backtesting_end_time)'
return engine.execute(sql, data)
|
"""
@author: leonardo
@created time: 2020-11-03
@last modified time:2020-11-03
"""
def select(engine, backtesting_id):
"""
:param engine:
:param backtesting_id:
:return:
"""
sql = 'SELECT * from strategy_backtesting where backtesting_id="{}"'.format(backtesting_id)
return list(engine.execute(sql))
def insert_on_duplicate_update(engine, data):
"""
:param engine:
:param data:
:return:
"""
sql = 'insert into strategy_backtesting(backtesting_id,strategy_id ,strategy_param,backtesting_start_time,backtesting_end_time) values (%s,%s,%s,%s,%s) on duplicate key update backtesting_id=values(backtesting_id),strategy_id=values(strategy_id),strategy_param=values(strategy_param),backtesting_start_time=values(backtesting_start_time),backtesting_end_time=values(backtesting_end_time)'
return engine.execute(sql, data)
|
if type(Query.target) is IfStatement:
parent = Query.target.parent
parent.beginModification('If to while')
condition = Query.target.condition
thenBranch = Query.target.thenBranch
Query.target.replaceChild(condition, Node.createNewNode('Expression', None))
Query.target.replaceChild(thenBranch, Node.createNewNode('StatementItemList', None))
whileNode = Node.createNewNode('LoopStatement', None)
parent.replaceChild(Query.target, whileNode)
# The while needs to be attached to the tree before it can reuse the parts of the if
whileNode.condition = condition
whileNode.body = thenBranch
parent.endModification()
else:
raise Exception('ifToWhile command only works on if statements')
|
if type(Query.target) is IfStatement:
parent = Query.target.parent
parent.beginModification('If to while')
condition = Query.target.condition
then_branch = Query.target.thenBranch
Query.target.replaceChild(condition, Node.createNewNode('Expression', None))
Query.target.replaceChild(thenBranch, Node.createNewNode('StatementItemList', None))
while_node = Node.createNewNode('LoopStatement', None)
parent.replaceChild(Query.target, whileNode)
whileNode.condition = condition
whileNode.body = thenBranch
parent.endModification()
else:
raise exception('ifToWhile command only works on if statements')
|
# -*- coding:utf-8 -*-
class CocoException(Exception):
pass
class CoCoRuntimeError(RuntimeError):
pass
|
class Cocoexception(Exception):
pass
class Cocoruntimeerror(RuntimeError):
pass
|
#!/usr/bin/env python3
def exam_grade(score):
"""Students in a class receive their grades as Pass/Fail. Scores of 60 or more
(out of 100) mean that the grade is "Pass". For lower scores, the grade is
"Fail". In addition, scores above 95 (not included) are graded as "Top Score".
This function receives the score and returns the proper grade."""
if score == 100:
grade = "Top Score"
elif score >= 60:
grade = "Pass"
else:
grade = "Fail"
return grade
print(help(exam_grade))
print(exam_grade(65)) # Should be Pass
print(exam_grade(55)) # Should be Fail
print(exam_grade(60)) # Should be Pass
print(exam_grade(95)) # Should be Pass
print(exam_grade(100)) # Should be Top Score
print(exam_grade(0)) # Should be Fail
|
def exam_grade(score):
"""Students in a class receive their grades as Pass/Fail. Scores of 60 or more
(out of 100) mean that the grade is "Pass". For lower scores, the grade is
"Fail". In addition, scores above 95 (not included) are graded as "Top Score".
This function receives the score and returns the proper grade."""
if score == 100:
grade = 'Top Score'
elif score >= 60:
grade = 'Pass'
else:
grade = 'Fail'
return grade
print(help(exam_grade))
print(exam_grade(65))
print(exam_grade(55))
print(exam_grade(60))
print(exam_grade(95))
print(exam_grade(100))
print(exam_grade(0))
|
sampleJson = {
"id": 3,
"pin": "700014",
"cgst": 3241.53,
"date": "2021-04-16",
"igst": 0,
"name": "Subhajit Paul",
"sgst": 3241.53,
"type": "S",
"email": 'nulestu@gmail.com',
"gstin": 'KKHUU654343KL8',
"phone": 9165799976,
"mobile": "7059403006",
"ref_no": "GKUS/30/21",
"address": "7 Dr Suresh Sarkar road Kolkata",
"product": "D/CAMERA NIKON D3500COMBO",
"acc_name": "Credit Card HDFC Bank",
"stateCode":20,
"cgstRate": 9,
"sgstRate": 9,
"igstRate": 0,
"products": [
{
"hsn": "8525",
"qty": 2,
"item": "D/CAMERA",
"spec": "SL NO 5504415/25046293/20942790",
"brand": "NIKON",
"model": "D3500COMBO",
"price": 36016.95,
"discount": 0,
"code": 12122
},
{
"hsn": "8525",
"qty": 5,
"item": "D/CAMERA",
"spec": "SL NO 5504415/25046293/20942790",
"brand": "SONY",
"model": "D35",
"price": 22016.15,
"discount": 0,
"code": 12132
}
],
"roundoff": -0.01,
"bill_memo": "M",
"total_amt": 42500.29,
"companyInfo": {
"pan": "AACCC5685L",
"pin": "700013",
"addr1": "12 J.L.Nehru Road",
"addr2": "http://capital-chowringhee.com",
"email": "capitalch@gmail.com",
"free1": "Web site: http://capital-chowringhee.com",
"free2": "For warranty and replacement please contact respective manufacturer companies.",
"free3": "Materials will be delivered only after the cheque is cleared from our Bank.",
"free4": "All disputes to be resolved in Kolkata jurisdiction only.",
"gstin": "19AACCC5685L1Z3",
"phone": "8777399268, 9163055161, 9903177904",
"comp_name": "Capital Chowringhee Pvt Ltd"
},
"bill_memo_id": 95
}
|
sample_json = {'id': 3, 'pin': '700014', 'cgst': 3241.53, 'date': '2021-04-16', 'igst': 0, 'name': 'Subhajit Paul', 'sgst': 3241.53, 'type': 'S', 'email': 'nulestu@gmail.com', 'gstin': 'KKHUU654343KL8', 'phone': 9165799976, 'mobile': '7059403006', 'ref_no': 'GKUS/30/21', 'address': '7 Dr Suresh Sarkar road Kolkata', 'product': 'D/CAMERA NIKON D3500COMBO', 'acc_name': 'Credit Card HDFC Bank', 'stateCode': 20, 'cgstRate': 9, 'sgstRate': 9, 'igstRate': 0, 'products': [{'hsn': '8525', 'qty': 2, 'item': 'D/CAMERA', 'spec': 'SL NO 5504415/25046293/20942790', 'brand': 'NIKON', 'model': 'D3500COMBO', 'price': 36016.95, 'discount': 0, 'code': 12122}, {'hsn': '8525', 'qty': 5, 'item': 'D/CAMERA', 'spec': 'SL NO 5504415/25046293/20942790', 'brand': 'SONY', 'model': 'D35', 'price': 22016.15, 'discount': 0, 'code': 12132}], 'roundoff': -0.01, 'bill_memo': 'M', 'total_amt': 42500.29, 'companyInfo': {'pan': 'AACCC5685L', 'pin': '700013', 'addr1': '12 J.L.Nehru Road', 'addr2': 'http://capital-chowringhee.com', 'email': 'capitalch@gmail.com', 'free1': 'Web site: http://capital-chowringhee.com', 'free2': 'For warranty and replacement please contact respective manufacturer companies.', 'free3': 'Materials will be delivered only after the cheque is cleared from our Bank.', 'free4': 'All disputes to be resolved in Kolkata jurisdiction only.', 'gstin': '19AACCC5685L1Z3', 'phone': '8777399268, 9163055161, 9903177904', 'comp_name': 'Capital Chowringhee Pvt Ltd'}, 'bill_memo_id': 95}
|
def dot(data, compile_to=None):
notation_list = data.split('.')
compiling = ""
compiling += notation_list[0]
beginning_string = compile_to.split('{1}')[0]
compiling = beginning_string + compiling
dot_split = compile_to.replace(beginning_string + '{1}', '').split('{.}')
if any(len(x) > 1 for x in dot_split):
raise ValueError("Cannot have multiple values between {1} and {.}")
for notation in notation_list[1:]:
compiling += dot_split[0]
compiling += notation
compiling += dot_split[1]
return compiling
|
def dot(data, compile_to=None):
notation_list = data.split('.')
compiling = ''
compiling += notation_list[0]
beginning_string = compile_to.split('{1}')[0]
compiling = beginning_string + compiling
dot_split = compile_to.replace(beginning_string + '{1}', '').split('{.}')
if any((len(x) > 1 for x in dot_split)):
raise value_error('Cannot have multiple values between {1} and {.}')
for notation in notation_list[1:]:
compiling += dot_split[0]
compiling += notation
compiling += dot_split[1]
return compiling
|
"""Functions relating to grokking_algorithms qucksort chapter."""
def euclid_algorithm(area):
"""Return the largest square to subdivide area by."""
height = area[0]
width = area[1]
maxdim = max(height, width)
mindim = min(height, width)
remainder = maxdim % mindim
if remainder == 0:
return mindim
else:
return euclid_algorithm((mindim, remainder))
def recursive_sum(arr):
"""Return the sum of a 2D array."""
if len(arr) == 0:
return 0
else:
return arr[0] + recursive_sum(arr[1:])
def quicksort(arr, pivi=0):
"""Return a sorted 2D numerical array smallest -> largest."""
if len(arr) < 2:
return arr
else:
piv = arr[pivi]
lower = [v for v in arr[1:] if v <= piv]
higher = [v for v in arr[1:] if v > piv]
return quicksort(lower) + [piv] + quicksort(higher)
|
"""Functions relating to grokking_algorithms qucksort chapter."""
def euclid_algorithm(area):
"""Return the largest square to subdivide area by."""
height = area[0]
width = area[1]
maxdim = max(height, width)
mindim = min(height, width)
remainder = maxdim % mindim
if remainder == 0:
return mindim
else:
return euclid_algorithm((mindim, remainder))
def recursive_sum(arr):
"""Return the sum of a 2D array."""
if len(arr) == 0:
return 0
else:
return arr[0] + recursive_sum(arr[1:])
def quicksort(arr, pivi=0):
"""Return a sorted 2D numerical array smallest -> largest."""
if len(arr) < 2:
return arr
else:
piv = arr[pivi]
lower = [v for v in arr[1:] if v <= piv]
higher = [v for v in arr[1:] if v > piv]
return quicksort(lower) + [piv] + quicksort(higher)
|
expected_output = {
"tag": {
"test": {
"system_id": {
"R2_xr": {
"type": {
"L1L2": {
"area_address": ["49.0001"],
"circuit_id": "R1_xe.01",
"format": "Phase V",
"interface": "GigabitEthernet2.115",
"ip_address": ["10.12.115.2*"],
"ipv6_address": ["FE80::F816:3EFF:FE67:2452"],
"nsf": "capable",
"priority": 64,
"state": "up",
"topology": ["ipv4", "ipv6"],
"uptime": "3d04h",
}
}
},
"R3_nx": {
"type": {
"L1L2": {
"area_address": ["49.0001"],
"circuit_id": "R1_xe.02",
"format": "Phase V",
"interface": "GigabitEthernet3.115",
"ip_address": ["10.13.115.3*"],
"ipv6_address": ["FE80::5C01:FF:FE02:7"],
"nsf": "capable",
"priority": 64,
"state": "up",
"topology": ["ipv4", "ipv6"],
"uptime": "3d04h",
}
}
},
}
},
"test1": {
"system_id": {
"2222.22ff.4444": {
"type": {
"L1L2": {
"area_address": ["49.0001"],
"circuit_id": "2222.22ff.4444.01",
"format": "Phase V",
"interface": "GigabitEthernet2.415",
"ip_address": ["10.12.115.2*"],
"ipv6_address": ["FE80::F816:3EFF:FE67:2452"],
"nsf": "capable",
"priority": 128,
"state": "init",
"topology": ["ipv4", "ipv6"],
"uptime": "3d04h",
}
}
},
"R3_nx": {
"type": {
"L1L2": {
"area_address": ["49.0001"],
"circuit_id": "R1_xe.02",
"format": "Phase V",
"interface": "GigabitEthernet3.415",
"ip_address": ["10.13.115.3*"],
"ipv6_address": ["FE80::5C01:FF:FE02:7"],
"nsf": "capable",
"priority": 64,
"state": "up",
"topology": ["ipv4", "ipv6"],
"uptime": "3d04h",
}
}
},
}
},
}
}
|
expected_output = {'tag': {'test': {'system_id': {'R2_xr': {'type': {'L1L2': {'area_address': ['49.0001'], 'circuit_id': 'R1_xe.01', 'format': 'Phase V', 'interface': 'GigabitEthernet2.115', 'ip_address': ['10.12.115.2*'], 'ipv6_address': ['FE80::F816:3EFF:FE67:2452'], 'nsf': 'capable', 'priority': 64, 'state': 'up', 'topology': ['ipv4', 'ipv6'], 'uptime': '3d04h'}}}, 'R3_nx': {'type': {'L1L2': {'area_address': ['49.0001'], 'circuit_id': 'R1_xe.02', 'format': 'Phase V', 'interface': 'GigabitEthernet3.115', 'ip_address': ['10.13.115.3*'], 'ipv6_address': ['FE80::5C01:FF:FE02:7'], 'nsf': 'capable', 'priority': 64, 'state': 'up', 'topology': ['ipv4', 'ipv6'], 'uptime': '3d04h'}}}}}, 'test1': {'system_id': {'2222.22ff.4444': {'type': {'L1L2': {'area_address': ['49.0001'], 'circuit_id': '2222.22ff.4444.01', 'format': 'Phase V', 'interface': 'GigabitEthernet2.415', 'ip_address': ['10.12.115.2*'], 'ipv6_address': ['FE80::F816:3EFF:FE67:2452'], 'nsf': 'capable', 'priority': 128, 'state': 'init', 'topology': ['ipv4', 'ipv6'], 'uptime': '3d04h'}}}, 'R3_nx': {'type': {'L1L2': {'area_address': ['49.0001'], 'circuit_id': 'R1_xe.02', 'format': 'Phase V', 'interface': 'GigabitEthernet3.415', 'ip_address': ['10.13.115.3*'], 'ipv6_address': ['FE80::5C01:FF:FE02:7'], 'nsf': 'capable', 'priority': 64, 'state': 'up', 'topology': ['ipv4', 'ipv6'], 'uptime': '3d04h'}}}}}}}
|
class CliArgs(object):
def __init__(self):
self.search = []
self.all = False
self.slim = False
self.include = False
self.order = False
self.reverse = False
self.json = False
self.version = False
|
class Cliargs(object):
def __init__(self):
self.search = []
self.all = False
self.slim = False
self.include = False
self.order = False
self.reverse = False
self.json = False
self.version = False
|
# If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
# Find the sum of all the multiples of 3 or 5 below 1000.
# https://projecteuler.net/problem=1
# 1, 5, 10, 15, 20, ...
# 3, 6, 9, 12, 15, 18, 21, ...
limit = 1000
print( sum( set(range(5,limit,5)).union(set(range(3,limit,3))) ) )
|
limit = 1000
print(sum(set(range(5, limit, 5)).union(set(range(3, limit, 3)))))
|
def circ_supply(height: int, nano: bool = False) -> int:
"""
Circulating supply at given height, in ERG (or nanoERG).
"""
# Emission settings
initial_rate = 75
fixed_rate_blocks = 525600 - 1
epoch_length = 64800
step = 3
# At current height
completed_epochs = max(0, height - fixed_rate_blocks) // epoch_length
current_epoch = completed_epochs + min(1, completed_epochs)
blocks_in_current_epoch = max(0, height - fixed_rate_blocks) % epoch_length
current_rate = max(0, initial_rate - current_epoch * step)
# Components
fixed_period_cs = min(fixed_rate_blocks, height) * initial_rate
completed_epochs_cs = sum(
[
epoch_length * max(0, initial_rate - step * (i + 1))
for i in range(completed_epochs)
]
)
current_epoch_cs = blocks_in_current_epoch * current_rate
# Circulating supply
cs = fixed_period_cs + completed_epochs_cs + current_epoch_cs
if nano:
cs *= 10**9
return cs
# TODO turn this into tests
# assert(circ_supply(1000) == 75000)
# assert(circ_supply(608548) == 45337806)
# assert(circ_supply(2080800) == 97739925)
# assert(circ_supply(2180800) == 97739925)
# assert(circ_supply(9080800) == 97739925)
|
def circ_supply(height: int, nano: bool=False) -> int:
"""
Circulating supply at given height, in ERG (or nanoERG).
"""
initial_rate = 75
fixed_rate_blocks = 525600 - 1
epoch_length = 64800
step = 3
completed_epochs = max(0, height - fixed_rate_blocks) // epoch_length
current_epoch = completed_epochs + min(1, completed_epochs)
blocks_in_current_epoch = max(0, height - fixed_rate_blocks) % epoch_length
current_rate = max(0, initial_rate - current_epoch * step)
fixed_period_cs = min(fixed_rate_blocks, height) * initial_rate
completed_epochs_cs = sum([epoch_length * max(0, initial_rate - step * (i + 1)) for i in range(completed_epochs)])
current_epoch_cs = blocks_in_current_epoch * current_rate
cs = fixed_period_cs + completed_epochs_cs + current_epoch_cs
if nano:
cs *= 10 ** 9
return cs
|
# Resources for an MPMCT with n controls
def mpmct_depth(n):
return 28*n - 60
def mpmct_t_c(n):
return 12*n - 20
def mpmct_t_d(n):
return 4*(n-2)
def mpmct_h_c(n):
return 4*n - 6
def mpmct_cnot_c(n):
return 24*n - 40
|
def mpmct_depth(n):
return 28 * n - 60
def mpmct_t_c(n):
return 12 * n - 20
def mpmct_t_d(n):
return 4 * (n - 2)
def mpmct_h_c(n):
return 4 * n - 6
def mpmct_cnot_c(n):
return 24 * n - 40
|
class Equip():
def __init__(self, name, attribute, action):
self.name = name
self.attribute = attribute
self.action = action
class Item():
def __init__(self, name, attribute, buff):
self.name = name
self.attribute = attribute
self.buff = buff
class Attribute(dict): pass
|
class Equip:
def __init__(self, name, attribute, action):
self.name = name
self.attribute = attribute
self.action = action
class Item:
def __init__(self, name, attribute, buff):
self.name = name
self.attribute = attribute
self.buff = buff
class Attribute(dict):
pass
|
class ProxyException(Exception):
"""Proxy returned an error."""
def __init__(self, message='Proxy returned an error.'):
# Call the base class constructor with the parameters it needs
super(ProxyException, self).__init__(message)
|
class Proxyexception(Exception):
"""Proxy returned an error."""
def __init__(self, message='Proxy returned an error.'):
super(ProxyException, self).__init__(message)
|
H, W, N = map(int, input().split())
berry = [tuple(int(x) for x in input().split()) for _ in range(N)]
ans = []
for i in range(1, W+1):
up = 0
for x, y in berry:
if i * y == H * x:
break
elif i * y > H * x:
up += 1
else:
if up * 2 == N:
ans.append((i, H))
for i in range(1, H):
up = 0
for x, y in berry:
if W * y == i * x:
break
elif W * y > i * x:
up += 1
else:
if up * 2 == N:
ans.append((W, i))
ans.sort()
if ans:
for x, y in ans:
print('({},{})'.format(x, y))
else:
print(-1)
|
(h, w, n) = map(int, input().split())
berry = [tuple((int(x) for x in input().split())) for _ in range(N)]
ans = []
for i in range(1, W + 1):
up = 0
for (x, y) in berry:
if i * y == H * x:
break
elif i * y > H * x:
up += 1
else:
if up * 2 == N:
ans.append((i, H))
for i in range(1, H):
up = 0
for (x, y) in berry:
if W * y == i * x:
break
elif W * y > i * x:
up += 1
else:
if up * 2 == N:
ans.append((W, i))
ans.sort()
if ans:
for (x, y) in ans:
print('({},{})'.format(x, y))
else:
print(-1)
|
__author__ = 'lg'
a = raw_input()
if a > 0:
print('positive number')
elif a < 0:
print('negative number')
else:
print('the number is zero')
|
__author__ = 'lg'
a = raw_input()
if a > 0:
print('positive number')
elif a < 0:
print('negative number')
else:
print('the number is zero')
|
# Advent of Code - Day 7 - Part One
def parse(input):
return [int(n) for n in input[0].split(",")]
def result(input):
positions = parse(input)
fuel_cost_options = []
for i in range(min(positions), max(positions) + 1):
movements = [abs(n - i) for n in positions]
fuel_cost_options.append(sum(movements))
return min(fuel_cost_options)
sample_input = ["16,1,2,0,4,2,7,1,2,14"]
input = sample_input
print(result(input))
|
def parse(input):
return [int(n) for n in input[0].split(',')]
def result(input):
positions = parse(input)
fuel_cost_options = []
for i in range(min(positions), max(positions) + 1):
movements = [abs(n - i) for n in positions]
fuel_cost_options.append(sum(movements))
return min(fuel_cost_options)
sample_input = ['16,1,2,0,4,2,7,1,2,14']
input = sample_input
print(result(input))
|
'''
6. Write a Python program to create a histogram from a given list of integers.
'''
def histogram(values):
for n in values:
output = ''
x = n
while(x > 0):
output += '*'
x = x - 1
print(output)
histogram([1,2,3,4,5,6])
|
"""
6. Write a Python program to create a histogram from a given list of integers.
"""
def histogram(values):
for n in values:
output = ''
x = n
while x > 0:
output += '*'
x = x - 1
print(output)
histogram([1, 2, 3, 4, 5, 6])
|
print("#######################################")
print("## AVERAGE STUDENT HEIGHT CALCULATOR ##")
print("#######################################")
#test heights: 123 149 175 183 166 179 125
student_heights = input(" Input a list of student heights:\n>> ").split()
for n in range(0, len(student_heights)):
student_heights[n] = int(student_heights[n])
#print(student_heights)
total = 0
for num in student_heights:
total += num
#print(total)
def list_height(student_heights):
counter = 0
for char in student_heights:
counter += 1
return counter
length = list_height(student_heights)
#print(length)
ave = round(total / length)
print(f"Average student height is: {ave}")
|
print('#######################################')
print('## AVERAGE STUDENT HEIGHT CALCULATOR ##')
print('#######################################')
student_heights = input(' Input a list of student heights:\n>> ').split()
for n in range(0, len(student_heights)):
student_heights[n] = int(student_heights[n])
total = 0
for num in student_heights:
total += num
def list_height(student_heights):
counter = 0
for char in student_heights:
counter += 1
return counter
length = list_height(student_heights)
ave = round(total / length)
print(f'Average student height is: {ave}')
|
i = 1
while True:
print(i)
i += 1
if i > 10:
break
|
i = 1
while True:
print(i)
i += 1
if i > 10:
break
|
# Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com)
c = (a, b)
d = {e: 1, f: 2}
fun(a, b, *c, **d)
# EXPECTED:
[
...,
BUILD_TUPLE(2),
...,
BUILD_TUPLE_UNPACK_WITH_CALL(2),
...,
CALL_FUNCTION_EX(1),
...,
]
|
c = (a, b)
d = {e: 1, f: 2}
fun(a, b, *c, **d)
[..., build_tuple(2), ..., build_tuple_unpack_with_call(2), ..., call_function_ex(1), ...]
|
#A program that counts the number of characters up to the first $ in a text file.
file = open("poem.txt","r")
data = file.readlines()
for index in range(len(data)):
for secondIndex in range(len(data[index])):
if data[index][secondIndex] == "$":
break
print( "Total number of characters up to the first $ are = ",(index+secondIndex))
file.close()
|
file = open('poem.txt', 'r')
data = file.readlines()
for index in range(len(data)):
for second_index in range(len(data[index])):
if data[index][secondIndex] == '$':
break
print('Total number of characters up to the first $ are = ', index + secondIndex)
file.close()
|
def metade(valor = 0, format = False):
resp = valor/2
return resp if format is False else money(resp)
def dobro(valor = 0, format = False):
resp = valor*2
return resp if format is False else money(resp)
def dez_porcento(valor = 0, format = False):
resp = valor + (valor*10)/100
return resp if format is False else money(resp)
def quinze_porcento(valor = 0, format = False):
resp = valor - (valor*15)/100
return resp if format is False else money(resp)
def money(valor = 0, moeda = 'R$'):
return f'{moeda}{valor:.2f}'.replace('.',',')
|
def metade(valor=0, format=False):
resp = valor / 2
return resp if format is False else money(resp)
def dobro(valor=0, format=False):
resp = valor * 2
return resp if format is False else money(resp)
def dez_porcento(valor=0, format=False):
resp = valor + valor * 10 / 100
return resp if format is False else money(resp)
def quinze_porcento(valor=0, format=False):
resp = valor - valor * 15 / 100
return resp if format is False else money(resp)
def money(valor=0, moeda='R$'):
return f'{moeda}{valor:.2f}'.replace('.', ',')
|
'''
Created on 2020-04-15 14:50:02
Last modified on 2020-05-07 21:21:10
Python 2.7.16
v0.1
@author: L. F. Pereira (lfpereira@fe.up.pt)
Main goal
---------
Develop functions to get data from odb files.
'''
#%% history outputs
def get_xydata_from_nodes_history_output(odb, nodes, variable,
directions=(1, 2, 3),
step_name=None):
'''
Given a node array, returns the values for time and the given variable.
Assumes the variable was requested in history outputs.
Parameters
----------
odb : Abaqus odb object
nodes : array-like of Abaqus OdbMeshNode objects
variable : str
It only works for vector-like variables. e.g. 'U' and 'RF'
directions : array
Directions for which to extract values.
step_name : str
If None, it uses the last step.
Returns
-------
y : array-like, shape = [n_nodes x [n_increments x n_directions]]
Notes
-----
-Assumes all the nodes have history output and the array contains each node
only once.
'''
# initialization
if not step_name:
step_name = odb.steps.keys()[-1]
step = odb.steps[step_name]
# collect data
y = []
for node in nodes:
instance_name = node.instanceName if node.instanceName else 'ASSEMBLY'
name = 'Node ' + instance_name + '.' + str(node.label)
historyOutputs = step.historyRegions[name].historyOutputs
node_data = []
for direction in directions:
node_data.append([data[1] for data in historyOutputs['%s%i' % (variable, direction)].data])
y.append(node_data)
return y
#%% field outputs
def get_ydata_from_nodeSets_field_output(odb, nodeSet, variable,
directions=(1, 2, 3), step_name=None,
frames=None):
'''
Given a node set, returns the values for the given variable.
It may take a while to run.
Parameters
----------
odb : Abaqus odb object
nodeSet : Abaqus nodeSet object
variable : str
It only works for vector-like variables. e.g. 'U' and 'RF'
directions : array
Directions for which to extract values. The value will be subtracted
by 1 when accessing abaqus data.
frames : array-like of Abaqus OdbFrame objects
If frames are available from outside, use it because it may significantly
decreases the computational time.
step_name : str
If None, it uses the last step. Only required if frames=None.
Returns
-------
values : array-like, shape = [n_increments x n_directions x n_nodes]]
'''
# TODO: extend to scalar and tensor like variables
# TODO: change name to accept also elements (position should be an input)
# access frames
if not frames:
if not step_name:
step_name = odb.steps.keys()[-1]
frames = [frame for frame in odb.steps[step_name].frames]
# collect data
values = []
for frame in frames:
varFieldOutputs = frame.fieldOutputs[variable]
outputs = varFieldOutputs.getSubset(region=nodeSet).values
output_frame = []
for direction in directions:
output_frame.append([output.data[direction - 1] for output in outputs])
values.append(output_frame)
return values
#%% other
def get_eigenvalues(odb, frames=None, step_name=None):
'''
Parameters
----------
odb : Abaqus odb object
frames : array-like of Abaqus OdbFrame objects
step_name : str
If None, it uses the last step. Only required if frames=None.
'''
# access frames
if not frames:
if not step_name:
step_name = odb.steps.keys()[-1]
frames = [frame for frame in odb.steps[step_name].frames]
# get eigenvalues
eigenvalues = [float(frame.description.split('EigenValue =')[1]) for frame in list(frames)[1:]]
return eigenvalues
|
"""
Created on 2020-04-15 14:50:02
Last modified on 2020-05-07 21:21:10
Python 2.7.16
v0.1
@author: L. F. Pereira (lfpereira@fe.up.pt)
Main goal
---------
Develop functions to get data from odb files.
"""
def get_xydata_from_nodes_history_output(odb, nodes, variable, directions=(1, 2, 3), step_name=None):
"""
Given a node array, returns the values for time and the given variable.
Assumes the variable was requested in history outputs.
Parameters
----------
odb : Abaqus odb object
nodes : array-like of Abaqus OdbMeshNode objects
variable : str
It only works for vector-like variables. e.g. 'U' and 'RF'
directions : array
Directions for which to extract values.
step_name : str
If None, it uses the last step.
Returns
-------
y : array-like, shape = [n_nodes x [n_increments x n_directions]]
Notes
-----
-Assumes all the nodes have history output and the array contains each node
only once.
"""
if not step_name:
step_name = odb.steps.keys()[-1]
step = odb.steps[step_name]
y = []
for node in nodes:
instance_name = node.instanceName if node.instanceName else 'ASSEMBLY'
name = 'Node ' + instance_name + '.' + str(node.label)
history_outputs = step.historyRegions[name].historyOutputs
node_data = []
for direction in directions:
node_data.append([data[1] for data in historyOutputs['%s%i' % (variable, direction)].data])
y.append(node_data)
return y
def get_ydata_from_node_sets_field_output(odb, nodeSet, variable, directions=(1, 2, 3), step_name=None, frames=None):
"""
Given a node set, returns the values for the given variable.
It may take a while to run.
Parameters
----------
odb : Abaqus odb object
nodeSet : Abaqus nodeSet object
variable : str
It only works for vector-like variables. e.g. 'U' and 'RF'
directions : array
Directions for which to extract values. The value will be subtracted
by 1 when accessing abaqus data.
frames : array-like of Abaqus OdbFrame objects
If frames are available from outside, use it because it may significantly
decreases the computational time.
step_name : str
If None, it uses the last step. Only required if frames=None.
Returns
-------
values : array-like, shape = [n_increments x n_directions x n_nodes]]
"""
if not frames:
if not step_name:
step_name = odb.steps.keys()[-1]
frames = [frame for frame in odb.steps[step_name].frames]
values = []
for frame in frames:
var_field_outputs = frame.fieldOutputs[variable]
outputs = varFieldOutputs.getSubset(region=nodeSet).values
output_frame = []
for direction in directions:
output_frame.append([output.data[direction - 1] for output in outputs])
values.append(output_frame)
return values
def get_eigenvalues(odb, frames=None, step_name=None):
"""
Parameters
----------
odb : Abaqus odb object
frames : array-like of Abaqus OdbFrame objects
step_name : str
If None, it uses the last step. Only required if frames=None.
"""
if not frames:
if not step_name:
step_name = odb.steps.keys()[-1]
frames = [frame for frame in odb.steps[step_name].frames]
eigenvalues = [float(frame.description.split('EigenValue =')[1]) for frame in list(frames)[1:]]
return eigenvalues
|
P = {}
# Imputers
P['mean imp'] = {'strategy': 'mean'}
P['median imp'] = {'strategy': 'median'}
P['most freq imp'] = {'strategy': 'most_frequent'}
P['constant imp'] = {'strategy': 'constant'}
P['iterative imp'] = {'initial_strategy': 'mean',
'skip_complete': True}
|
p = {}
P['mean imp'] = {'strategy': 'mean'}
P['median imp'] = {'strategy': 'median'}
P['most freq imp'] = {'strategy': 'most_frequent'}
P['constant imp'] = {'strategy': 'constant'}
P['iterative imp'] = {'initial_strategy': 'mean', 'skip_complete': True}
|
#23212 | Contract with Mastema
isDS = chr.getJob() == 3100
sm.setSpeakerID(2450017)
if not sm.canHold(1142342):
sm.sendSayOkay("Please make space in your equip inventory.")
sm.dispose()
if sm.sendAskYesNo("Everything is ready. Let us begin the contract ritual. Focus on your mind."):
sm.jobAdvance(isDS and 3110 or 3120)
sm.giveItem(isDS and 1142342 or 1142554)
sm.giveAndEquip(isDS and 1099002 or 1099007) #todo: upgrade instead of replace secondary? (potentials)
sm.completeQuest(parentID)
sm.setPlayerAsSpeaker()
sm.sendNext("#b(You feel a curious energy flowing into you.)")
sm.setSpeakerID(2450017)
sm.sendNext("There... our contract is made. Now we can communicate through our minds. Isn't that neat?")
sm.dispose()
else:
sm.dispose()
|
is_ds = chr.getJob() == 3100
sm.setSpeakerID(2450017)
if not sm.canHold(1142342):
sm.sendSayOkay('Please make space in your equip inventory.')
sm.dispose()
if sm.sendAskYesNo('Everything is ready. Let us begin the contract ritual. Focus on your mind.'):
sm.jobAdvance(isDS and 3110 or 3120)
sm.giveItem(isDS and 1142342 or 1142554)
sm.giveAndEquip(isDS and 1099002 or 1099007)
sm.completeQuest(parentID)
sm.setPlayerAsSpeaker()
sm.sendNext('#b(You feel a curious energy flowing into you.)')
sm.setSpeakerID(2450017)
sm.sendNext("There... our contract is made. Now we can communicate through our minds. Isn't that neat?")
sm.dispose()
else:
sm.dispose()
|
#prob:lem statement: Make the below pattern. Here, n =4
#4 4 4 4 4 4 4
#4 3 3 3 3 3 4
#4 3 2 2 2 3 4
#4 3 2 1 2 3 4
#4 3 2 2 2 3 4
#4 3 3 3 3 3 4
#4 4 4 4 4 4 4
n=int(input("enter any number: "))
#n is the number for the outermost lines and val is the value to be printed in row i column j
#for first left quadrant
for i in range(1,n+1):
for j in range(1,n+1):
if(i<j):
val=i
else:
val=j
print(n-val+1, end = "")
#for right top quadrant
for j in range(n-1,0,-1):
if(i<j):
val=i
else:
val=j
print(n-val+1,end="")
print()
#for bottom left quadrant
for i in range(n-1,0,-1):
for j in range(1,n+1):
if(i<j):
val=i
else:
val=j
print(n-val+1,end="")
#for bottom right quadrant
for j in range(n-1,0,-1):
if(i<j):
val=i
else:
val=j
print(n-val+1,end="")
print()
|
n = int(input('enter any number: '))
for i in range(1, n + 1):
for j in range(1, n + 1):
if i < j:
val = i
else:
val = j
print(n - val + 1, end='')
for j in range(n - 1, 0, -1):
if i < j:
val = i
else:
val = j
print(n - val + 1, end='')
print()
for i in range(n - 1, 0, -1):
for j in range(1, n + 1):
if i < j:
val = i
else:
val = j
print(n - val + 1, end='')
for j in range(n - 1, 0, -1):
if i < j:
val = i
else:
val = j
print(n - val + 1, end='')
print()
|
# train-project/train_schedule/views/formatters.py
"""Helper functions to format data for display."""
def format_station(station, show_id=False):
"""Format station data for display"""
if station is None:
return "Unknown"
else:
fmt_str = "{city}, {country} ({code})"
if show_id:
fmt_str = "{id}: " + fmt_str
return fmt_str.format(**station.dict())
def format_datetime(time_value):
"""Format a datetime according to the current locale"""
return time_value.strftime("%c")
TrainFormatters = {
"station_from": format_station,
"station_to": format_station,
"departs_at": format_datetime,
"arrives_at": format_datetime,
}
"""Lookup table for functions to format various attributes of
a train"""
TrainAttributeNames = {
"station_from": "From",
"station_to": "To",
"departs_at": "Departs",
"arrives_at": "Arrives",
"first_class": "1st class cars",
"second_class": "2nd class cars",
"seats_per_car": "Seats/car",
}
"""Lookup table for display names of train attributes"""
def format_train_attr(train, attr):
"""Format a train attribute"""
value = getattr(train, attr)
formatter = TrainFormatters.get(attr)
if formatter:
value = formatter(value)
return value
def format_train(train, show_from=True, show_to=True):
"""Format train data for display"""
columns = TrainAttributeNames.copy()
if not show_from:
del columns["station_from"]
if not show_to:
del columns["station_to"]
return "\t".join(
f"{heading}: {format_train_attr(train, attr)}"
for attr, heading in columns.items()
)
|
"""Helper functions to format data for display."""
def format_station(station, show_id=False):
"""Format station data for display"""
if station is None:
return 'Unknown'
else:
fmt_str = '{city}, {country} ({code})'
if show_id:
fmt_str = '{id}: ' + fmt_str
return fmt_str.format(**station.dict())
def format_datetime(time_value):
"""Format a datetime according to the current locale"""
return time_value.strftime('%c')
train_formatters = {'station_from': format_station, 'station_to': format_station, 'departs_at': format_datetime, 'arrives_at': format_datetime}
'Lookup table for functions to format various attributes of\na train'
train_attribute_names = {'station_from': 'From', 'station_to': 'To', 'departs_at': 'Departs', 'arrives_at': 'Arrives', 'first_class': '1st class cars', 'second_class': '2nd class cars', 'seats_per_car': 'Seats/car'}
'Lookup table for display names of train attributes'
def format_train_attr(train, attr):
"""Format a train attribute"""
value = getattr(train, attr)
formatter = TrainFormatters.get(attr)
if formatter:
value = formatter(value)
return value
def format_train(train, show_from=True, show_to=True):
"""Format train data for display"""
columns = TrainAttributeNames.copy()
if not show_from:
del columns['station_from']
if not show_to:
del columns['station_to']
return '\t'.join((f'{heading}: {format_train_attr(train, attr)}' for (attr, heading) in columns.items()))
|
def index_settings(table_name):
"""
Return the Elasticsearch mapping for a given table in the database.
:param table_name: The name of the table in the upstream database.
:return:
"""
settings = {
"index": {
"number_of_shards": 18,
"number_of_replicas": 0,
"refresh_interval": "-1",
},
"analysis": {
"filter": {
"stem_overrides": {
"type": "stemmer_override",
"rules": [
# Override unwanted 'anim' stems
"animals => animal",
"animal => animal",
"anime => anime",
"animate => animate",
"animated => animate",
],
},
"english_stop": {"type": "stop", "stopwords": "_english_"},
"english_stemmer": {"type": "stemmer", "language": "english"},
"english_possessive_stemmer": {
"type": "stemmer",
"language": "possessive_english",
},
},
"analyzer": {
"custom_english": {
"tokenizer": "standard",
"filter": [
# Stem overrides must appear before the primary
# language stemmer.
"stem_overrides",
"english_possessive_stemmer",
"lowercase",
"english_stop",
"english_stemmer",
],
}
},
},
}
common_mappings = {
"properties": {
"id": {"type": "long"},
"identifier": {
"fields": {"keyword": {"type": "keyword", "ignore_above": 256}},
"type": "text",
},
"title": {
"type": "text",
"similarity": "boolean",
"fields": {"keyword": {"type": "keyword", "ignore_above": 256}},
"analyzer": "custom_english",
},
"foreign_landing_url": {
"fields": {"keyword": {"ignore_above": 256, "type": "keyword"}},
"type": "text",
},
"description": {
"fields": {"keyword": {"type": "keyword", "similarity": "boolean"}},
"type": "text",
"analyzer": "custom_english",
},
"creator": {
"type": "text",
"fields": {"keyword": {"type": "keyword", "ignore_above": 256}},
},
"url": {
"fields": {"keyword": {"type": "keyword", "ignore_above": 256}},
"type": "text",
},
"extension": {
"fields": {"keyword": {"ignore_above": 8, "type": "keyword"}},
"type": "text",
},
"license": {
"fields": {"keyword": {"ignore_above": 256, "type": "keyword"}},
"type": "text",
},
"license_version": {
"type": "text",
"fields": {"keyword": {"type": "keyword", "ignore_above": 256}},
},
"license_url": {
"fields": {"keyword": {"type": "keyword", "ignore_above": 256}},
"type": "text",
},
"provider": {
"type": "text",
"fields": {"keyword": {"type": "keyword", "ignore_above": 256}},
},
"source": {
"fields": {"keyword": {"ignore_above": 256, "type": "keyword"}},
"type": "text",
},
"created_on": {"type": "date"},
"tags": {
"properties": {
"accuracy": {"type": "float"},
"name": {
"type": "text",
"fields": {"keyword": {"type": "keyword", "ignore_above": 256}},
"analyzer": "custom_english",
},
}
},
"mature": {"type": "boolean"},
"standardized_popularity": {"type": "rank_feature"},
"authority_boost": {"type": "rank_feature"},
"authority_penalty": {
"type": "rank_feature",
"positive_score_impact": False,
},
"max_boost": {"type": "rank_feature"},
"min_boost": {"type": "rank_feature"},
}
}
media_properties = {
"image": {
"aspect_ratio": {
"fields": {"keyword": {"type": "keyword"}},
"type": "text",
},
"size": {"fields": {"keyword": {"type": "keyword"}}, "type": "text"},
},
"audio": {
"bit_rate": {"type": "integer"},
"sample_rate": {"type": "integer"},
"genres": {"fields": {"keyword": {"type": "keyword"}}, "type": "text"},
},
}
media_mappings = common_mappings.copy()
media_mappings["properties"].update(media_properties[table_name])
result = {"settings": settings.copy(), "mappings": media_mappings}
return result
|
def index_settings(table_name):
"""
Return the Elasticsearch mapping for a given table in the database.
:param table_name: The name of the table in the upstream database.
:return:
"""
settings = {'index': {'number_of_shards': 18, 'number_of_replicas': 0, 'refresh_interval': '-1'}, 'analysis': {'filter': {'stem_overrides': {'type': 'stemmer_override', 'rules': ['animals => animal', 'animal => animal', 'anime => anime', 'animate => animate', 'animated => animate']}, 'english_stop': {'type': 'stop', 'stopwords': '_english_'}, 'english_stemmer': {'type': 'stemmer', 'language': 'english'}, 'english_possessive_stemmer': {'type': 'stemmer', 'language': 'possessive_english'}}, 'analyzer': {'custom_english': {'tokenizer': 'standard', 'filter': ['stem_overrides', 'english_possessive_stemmer', 'lowercase', 'english_stop', 'english_stemmer']}}}}
common_mappings = {'properties': {'id': {'type': 'long'}, 'identifier': {'fields': {'keyword': {'type': 'keyword', 'ignore_above': 256}}, 'type': 'text'}, 'title': {'type': 'text', 'similarity': 'boolean', 'fields': {'keyword': {'type': 'keyword', 'ignore_above': 256}}, 'analyzer': 'custom_english'}, 'foreign_landing_url': {'fields': {'keyword': {'ignore_above': 256, 'type': 'keyword'}}, 'type': 'text'}, 'description': {'fields': {'keyword': {'type': 'keyword', 'similarity': 'boolean'}}, 'type': 'text', 'analyzer': 'custom_english'}, 'creator': {'type': 'text', 'fields': {'keyword': {'type': 'keyword', 'ignore_above': 256}}}, 'url': {'fields': {'keyword': {'type': 'keyword', 'ignore_above': 256}}, 'type': 'text'}, 'extension': {'fields': {'keyword': {'ignore_above': 8, 'type': 'keyword'}}, 'type': 'text'}, 'license': {'fields': {'keyword': {'ignore_above': 256, 'type': 'keyword'}}, 'type': 'text'}, 'license_version': {'type': 'text', 'fields': {'keyword': {'type': 'keyword', 'ignore_above': 256}}}, 'license_url': {'fields': {'keyword': {'type': 'keyword', 'ignore_above': 256}}, 'type': 'text'}, 'provider': {'type': 'text', 'fields': {'keyword': {'type': 'keyword', 'ignore_above': 256}}}, 'source': {'fields': {'keyword': {'ignore_above': 256, 'type': 'keyword'}}, 'type': 'text'}, 'created_on': {'type': 'date'}, 'tags': {'properties': {'accuracy': {'type': 'float'}, 'name': {'type': 'text', 'fields': {'keyword': {'type': 'keyword', 'ignore_above': 256}}, 'analyzer': 'custom_english'}}}, 'mature': {'type': 'boolean'}, 'standardized_popularity': {'type': 'rank_feature'}, 'authority_boost': {'type': 'rank_feature'}, 'authority_penalty': {'type': 'rank_feature', 'positive_score_impact': False}, 'max_boost': {'type': 'rank_feature'}, 'min_boost': {'type': 'rank_feature'}}}
media_properties = {'image': {'aspect_ratio': {'fields': {'keyword': {'type': 'keyword'}}, 'type': 'text'}, 'size': {'fields': {'keyword': {'type': 'keyword'}}, 'type': 'text'}}, 'audio': {'bit_rate': {'type': 'integer'}, 'sample_rate': {'type': 'integer'}, 'genres': {'fields': {'keyword': {'type': 'keyword'}}, 'type': 'text'}}}
media_mappings = common_mappings.copy()
media_mappings['properties'].update(media_properties[table_name])
result = {'settings': settings.copy(), 'mappings': media_mappings}
return result
|
class IntegralCalculator:
def __init__(self):
self.value = 0
self.last_time = 0
def get_current_integral(self) -> float:
return self.value
def get_and_update_integral(self, new_x, new_time) -> float:
self.update_integral(new_x, new_time)
return self.get_current_integral()
def update_integral(self, new_x, new_time):
if self.last_time == 0:
self.last_time = new_time
dt = new_time - self.last_time
self.value += dt * new_x
self.last_time = new_time
|
class Integralcalculator:
def __init__(self):
self.value = 0
self.last_time = 0
def get_current_integral(self) -> float:
return self.value
def get_and_update_integral(self, new_x, new_time) -> float:
self.update_integral(new_x, new_time)
return self.get_current_integral()
def update_integral(self, new_x, new_time):
if self.last_time == 0:
self.last_time = new_time
dt = new_time - self.last_time
self.value += dt * new_x
self.last_time = new_time
|
DEBUG = True
TEMPLATE_DEBUG = DEBUG
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = []
ADMINS = (
('Joe Admin', 'joe@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'chain',
'USER': 'yoda',
'PASSWORD': '123',
'HOST': 'localhost', # use domain socket (127.0.0.1 for TCP)
'PORT': '',
'CONN_MAX_AGE': 600, # keep connections open up to 10 minutes
}
}
# these will be used by the collector scripts and should match the username and
# password provided in the .htpasswd file that nginx is looking at
COLLECTOR_AUTH = ('yoda', '123')
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'jakd82l?las{19ka0n%laoeb*klanql0?kdj01kdnc1(n=lbac'
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'America/New_York'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
ZMQ_PASSTHROUGH_URL_PULL = 'tcp://127.0.0.1:31416'
ZMQ_PASSTHROUGH_URL_PUB = 'tcp://127.0.0.1:31417'
# leave the websocket host as None if it is the same as the Django host
WEBSOCKET_HOST = None
# this is the path the user will see in stream links, so it needs to match your
# front end webserver (e.g. nginx) configuration. Note this configuration has
# the trailing but not leading slash
WEBSOCKET_PATH = 'ws/'
|
debug = True
template_debug = DEBUG
allowed_hosts = []
admins = (('Joe Admin', 'joe@example.com'),)
managers = ADMINS
databases = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'chain', 'USER': 'yoda', 'PASSWORD': '123', 'HOST': 'localhost', 'PORT': '', 'CONN_MAX_AGE': 600}}
collector_auth = ('yoda', '123')
secret_key = 'jakd82l?las{19ka0n%laoeb*klanql0?kdj01kdnc1(n=lbac'
time_zone = 'America/New_York'
language_code = 'en-us'
zmq_passthrough_url_pull = 'tcp://127.0.0.1:31416'
zmq_passthrough_url_pub = 'tcp://127.0.0.1:31417'
websocket_host = None
websocket_path = 'ws/'
|
def countApplesAndOranges(s, t, a, b, apples, oranges):
# Write your code here
fallen_apples = 0
fallen_oranges = 0
for apple in apples:
if a + apple >= s and a + apple <= t:
fallen_apples += 1
for orange in oranges:
if b + orange >= s and b + orange <= t:
fallen_oranges += 1
print(fallen_apples)
print(fallen_oranges)
|
def count_apples_and_oranges(s, t, a, b, apples, oranges):
fallen_apples = 0
fallen_oranges = 0
for apple in apples:
if a + apple >= s and a + apple <= t:
fallen_apples += 1
for orange in oranges:
if b + orange >= s and b + orange <= t:
fallen_oranges += 1
print(fallen_apples)
print(fallen_oranges)
|
# Create a set and check if element already exists.
class Solution:
def containsDuplicate(self, nums: List[int]) -> bool:
return len(nums) != len(set(nums))
|
class Solution:
def contains_duplicate(self, nums: List[int]) -> bool:
return len(nums) != len(set(nums))
|
i = 2
while True:
if i % 3 == 0:
break
print(i)
i += 2
|
i = 2
while True:
if i % 3 == 0:
break
print(i)
i += 2
|
vector_collection = {
'none': None,
'empty': [],
'numerals': [1, 1, 2, 3, 5, 8, 13, 21],
'strings': ['foo', 'bar', 'zen'],
'cities': ['san fransisco', 'buenos aires', 'bern', 'kinshasa-brazzaville', 'nairobi']
}
|
vector_collection = {'none': None, 'empty': [], 'numerals': [1, 1, 2, 3, 5, 8, 13, 21], 'strings': ['foo', 'bar', 'zen'], 'cities': ['san fransisco', 'buenos aires', 'bern', 'kinshasa-brazzaville', 'nairobi']}
|
class Solution:
def moveZeroes(self, nums):
"""
:type nums: List[int]
:rtype: void Do not return anything, modify nums in-place instead.
"""
l=nums
j=0
for i in range(len(l)):
if l[i]!=0:
nums[j]=l[i]
j+=1
for k in range(j,len(nums)):
nums[k]=0
|
class Solution:
def move_zeroes(self, nums):
"""
:type nums: List[int]
:rtype: void Do not return anything, modify nums in-place instead.
"""
l = nums
j = 0
for i in range(len(l)):
if l[i] != 0:
nums[j] = l[i]
j += 1
for k in range(j, len(nums)):
nums[k] = 0
|
# list in python and follow indexing rule, start from 0
thisList = ["pooya","mohammad","Mahdi","Alireza"]
print(thisList)
thisList[1] = "Eshghe Man"
print(thisList)
# The list() constructor include add item to list and delete the item
listTwo = list(("apple","melon","orange"))
print(listTwo)
# append() use to add item to the list
listTwo.append("mandarin")
print(listTwo)
# instead the way I did for removing the element we can write the name of item
listTwo.remove(listTwo[2])
print(listTwo)
# get the length of the list
print(len(listTwo))
# remove all the element of the list
print(thisList)
print(thisList.clear())
# copy of list and store in new var and we can print it
x = listTwo.copy()
print(x)
# by count() we can get how many time variable repeat
listOne = ["waac","nowo","carea","jento","nowo","waac","nowo"]
z = listOne.count("nowo")
print(z)
print(listOne.count(listOne[0]))
# built in function extend use to concat two list
listOne.extend(listTwo)
print(listOne)
# extend with integers
points = (1,2,3,4,5,6)
listOne.extend(points)
print(listOne)
# get the index number of element in list, and you need to write the name of element
animal = ["horse","eagle","elephant","monkey"]
print(animal)
print(animal.index("horse"))
# insert element in specific position
animal.insert(1,"chipmunks")
print(animal)
# pop popout element from list by index number
animal.pop(0)
print(animal)
# reverse use to reverse the order of function
animal.reverse()
print(animal)
# sort use for sort elements
"""will back here after function"""
|
this_list = ['pooya', 'mohammad', 'Mahdi', 'Alireza']
print(thisList)
thisList[1] = 'Eshghe Man'
print(thisList)
list_two = list(('apple', 'melon', 'orange'))
print(listTwo)
listTwo.append('mandarin')
print(listTwo)
listTwo.remove(listTwo[2])
print(listTwo)
print(len(listTwo))
print(thisList)
print(thisList.clear())
x = listTwo.copy()
print(x)
list_one = ['waac', 'nowo', 'carea', 'jento', 'nowo', 'waac', 'nowo']
z = listOne.count('nowo')
print(z)
print(listOne.count(listOne[0]))
listOne.extend(listTwo)
print(listOne)
points = (1, 2, 3, 4, 5, 6)
listOne.extend(points)
print(listOne)
animal = ['horse', 'eagle', 'elephant', 'monkey']
print(animal)
print(animal.index('horse'))
animal.insert(1, 'chipmunks')
print(animal)
animal.pop(0)
print(animal)
animal.reverse()
print(animal)
'will back here after function'
|
'''
Key points:
- recognize that this is very similar to merging intervals (https://leetcode.com/problems/merge-intervals/description/)
- it doesn't matter which employee an interval belongs to, so just flatten
- can build result array while merging, don't have to do afterward (and don't need full merged arr)
'''
def employeeFreeTime(self, schedule):
ints = sorted([i for s in schedule for i in s], key=lambda x: x.start)
res, pre = [], ints[0]
for i in ints[1:]:
if i.start <= pre.end and i.end > pre.end:
pre.end = i.end
elif i.start > pre.end:
res.append(Interval(pre.end, i.start))
pre = i
return res
|
"""
Key points:
- recognize that this is very similar to merging intervals (https://leetcode.com/problems/merge-intervals/description/)
- it doesn't matter which employee an interval belongs to, so just flatten
- can build result array while merging, don't have to do afterward (and don't need full merged arr)
"""
def employee_free_time(self, schedule):
ints = sorted([i for s in schedule for i in s], key=lambda x: x.start)
(res, pre) = ([], ints[0])
for i in ints[1:]:
if i.start <= pre.end and i.end > pre.end:
pre.end = i.end
elif i.start > pre.end:
res.append(interval(pre.end, i.start))
pre = i
return res
|
ligne_vide = ['o','o','o','o','o','o','o','o','o']
ligne_courte = ['o','o','.','.','.','.','.','o','o']
ligne_longue = ['o','.','.','.','.','.','.','.','o']
arche_vide = [ligne_vide,ligne_courte,ligne_longue,ligne_longue,ligne_courte,ligne_vide]
#print(arche_vide)
def affiche_ligne (l) :
s=''
for c in l :
s+=c
print(s)
def affiche_grille (g) :
for i in range(len(g)-1,-1,-1) :
affiche_ligne(g[i])
#affiche_grille(arche_vide)
def copie_grille(g) :
r = []
for l in g :
r+=[list(l)]
return r
#arche_pleine=copie_grille(arche_vide)
#arche_pleine[2][1]='i'
#affiche_grille(arche_vide)
#affiche_grille(arche_pleine)
lion_1 = ('L',1,[(0,0),(1,0)])
lion_2 = ('L',2,[(0,0),(0,1),(1,1)])
girafe_1 = ('G',1,[(0,0),(1,0),(1,1)])
girafe_2 = ('G',2,[(0,0),(0,1)])
hippopotame_1 = ('H',1,[(0,0),(1,0)])
hippopotame_2 = ('H',2,[(0,0),(1,0),(2,0)])
zebre_1 = ('Z',1,[(0,0),(1,0)])
zebre_2 = ('Z',2,[(0,0),(0,1)])
elephant_1 = ('E',1,[(0,0),(1,0)])
elephant_2 = ('E',2,[(0,0),(0,1),(1,0)])
liste_animaux = [lion_1,lion_2,girafe_1,girafe_2,hippopotame_1,hippopotame_2,zebre_1,zebre_2,elephant_1,elephant_2]
#print(liste_animaux)
def est_dans_grille (position) :
return position[0] >= 0 and position[0]<=8 and position[1]>=0 and position[1]<=7
def case_libre (position,grille) :
return est_dans_grille(position) and grille[position[1]][position[0]] == '.'
def place_libre (position,grille,animal) :
r = True
(x,y) = position
for (dx,dy) in animal[2] :
p = (x+dx,y+dy)
r = r and case_libre(p,grille)
return r
#test, on attend False, True, False, True
#print(place_libre((0,0),arche_vide,elephant_2))
#print(place_libre((2,1),arche_vide,elephant_2))
#print(place_libre((5,4),arche_vide,elephant_2))
#print(place_libre((6,3),arche_vide,elephant_2))
def installe_animal (position,grille,animal) :
(x,y) = position
for (dx,dy) in animal[2] :
p = (x+dx,y+dy)
grille[p[1]][p[0]] = animal[0]
def enleve_animal (position,grille,animal) :
(x,y) = position
for (dx,dy) in animal[2] :
p = (x+dx,y+dy)
grille[p[1]][p[0]] = '.'
#arche_pleine = copie_grille(arche_vide)
#installe_animal((6,3),arche_pleine,elephant_2)
#affiche_grille(arche_pleine)
#enleve_animal((6,3),arche_pleine,elephant_2)
#affiche_grille(arche_pleine)
def installe_tous (placement,grille) :
for (a,p) in placement :
if not place_libre(p,grille,a) :
return False
else :
installe_animal(p,grille,a)
return True
placement_1 = [(lion_1,(2,4)),\
(lion_2,(4,3)),\
(girafe_1,(6,2)),\
(girafe_2,(6,3)),\
(hippopotame_1,(2,1)),\
(hippopotame_2,(4,1)),\
(zebre_1,(3,2)),\
(zebre_2,(5,2)),\
(elephant_1,(2,3)),\
(elephant_2,(1,2))]
arche_pleine = copie_grille (arche_vide)
print("installe tous = ", installe_tous(placement_1,arche_pleine))
affiche_grille(arche_pleine)
print("")
def decale_animal (animal,position) :
place = []
(x,y) = position
for (dx,dy) in animal[2] :
place += [(x+dx,y+dy)]
return place
def cases_voisines (place) :
voisines = []
for (x,y) in place :
voisines += [(x+1,y),(x,y+1),(x-1,y),(x,y-1)]
return voisines
def sont_voisins (a1,p1,a2,p2) :
place_1 = decale_animal(a1,p1)
place_2 = decale_animal(a2,p2)
voisines_1 = cases_voisines(place_1)
r = False
for c in voisines_1 :
r = r or ( c in place_2 )
return r
# test sur placement_1
#print(sont_voisins(lion_1,(2,4),lion_2,(4,3)))
#print(sont_voisins(girafe_1,(6,2),girafe_2,(6,3)))
#print(sont_voisins(lion_1,(2,4),girafe_2,(6,3)))
#print(sont_voisins(lion_2,(4,3),girafe_2,(6,3)))
def cherche_animal (type_anim,num,installation) :
for i in range(len(installation)) :
(a,p) = installation[i]
if a[0] == type_anim and a[1] == num :
return i
return -1
#print (cherche_animal('G',2,placement_1))
#print (cherche_animal('Z',1,placement_1))
#print (cherche_animal('G',3,placement_1))
def verifie_voisinages (installation) :
r = True
for t in ['L','G','H','Z','E'] :
i1 = cherche_animal(t,1,installation)
i2 = cherche_animal(t,2,installation)
(a1,p1) = installation[i1]
(a2,p2) = installation[i2]
r = r and sont_voisins (a1,p1,a2,p2)
# print (a1,a2,sont_voisins (a1,p1,a2,p2))
return r
#print(verifie_voisinages(placement_1))
def calculer_installation (grille, animaux, installation) :
if animaux == [] :
return verifie_voisinages(installation)
else :
a = animaux[0]
for y in range(len(grille)) :
for x in range(len(grille[0])) :
if place_libre((x,y),grille,a) :
installe_animal((x,y),grille,a)
r = calculer_installation(grille,animaux[1:],[(a,(x,y))] + installation)
if r :
return r
else :
enleve_animal((x,y),grille,a)
return False
arche = copie_grille(arche_vide)
installe_animal((4,1),arche,lion_2)
affiche_grille(arche)
installation = [(lion_2,(4,1))]
animaux = [lion_1,girafe_1,girafe_2,hippopotame_1,hippopotame_2,zebre_1,zebre_2,elephant_1,elephant_2]
calculer_installation(arche,animaux,installation)
affiche_grille(arche)
|
ligne_vide = ['o', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'o']
ligne_courte = ['o', 'o', '.', '.', '.', '.', '.', 'o', 'o']
ligne_longue = ['o', '.', '.', '.', '.', '.', '.', '.', 'o']
arche_vide = [ligne_vide, ligne_courte, ligne_longue, ligne_longue, ligne_courte, ligne_vide]
def affiche_ligne(l):
s = ''
for c in l:
s += c
print(s)
def affiche_grille(g):
for i in range(len(g) - 1, -1, -1):
affiche_ligne(g[i])
def copie_grille(g):
r = []
for l in g:
r += [list(l)]
return r
lion_1 = ('L', 1, [(0, 0), (1, 0)])
lion_2 = ('L', 2, [(0, 0), (0, 1), (1, 1)])
girafe_1 = ('G', 1, [(0, 0), (1, 0), (1, 1)])
girafe_2 = ('G', 2, [(0, 0), (0, 1)])
hippopotame_1 = ('H', 1, [(0, 0), (1, 0)])
hippopotame_2 = ('H', 2, [(0, 0), (1, 0), (2, 0)])
zebre_1 = ('Z', 1, [(0, 0), (1, 0)])
zebre_2 = ('Z', 2, [(0, 0), (0, 1)])
elephant_1 = ('E', 1, [(0, 0), (1, 0)])
elephant_2 = ('E', 2, [(0, 0), (0, 1), (1, 0)])
liste_animaux = [lion_1, lion_2, girafe_1, girafe_2, hippopotame_1, hippopotame_2, zebre_1, zebre_2, elephant_1, elephant_2]
def est_dans_grille(position):
return position[0] >= 0 and position[0] <= 8 and (position[1] >= 0) and (position[1] <= 7)
def case_libre(position, grille):
return est_dans_grille(position) and grille[position[1]][position[0]] == '.'
def place_libre(position, grille, animal):
r = True
(x, y) = position
for (dx, dy) in animal[2]:
p = (x + dx, y + dy)
r = r and case_libre(p, grille)
return r
def installe_animal(position, grille, animal):
(x, y) = position
for (dx, dy) in animal[2]:
p = (x + dx, y + dy)
grille[p[1]][p[0]] = animal[0]
def enleve_animal(position, grille, animal):
(x, y) = position
for (dx, dy) in animal[2]:
p = (x + dx, y + dy)
grille[p[1]][p[0]] = '.'
def installe_tous(placement, grille):
for (a, p) in placement:
if not place_libre(p, grille, a):
return False
else:
installe_animal(p, grille, a)
return True
placement_1 = [(lion_1, (2, 4)), (lion_2, (4, 3)), (girafe_1, (6, 2)), (girafe_2, (6, 3)), (hippopotame_1, (2, 1)), (hippopotame_2, (4, 1)), (zebre_1, (3, 2)), (zebre_2, (5, 2)), (elephant_1, (2, 3)), (elephant_2, (1, 2))]
arche_pleine = copie_grille(arche_vide)
print('installe tous = ', installe_tous(placement_1, arche_pleine))
affiche_grille(arche_pleine)
print('')
def decale_animal(animal, position):
place = []
(x, y) = position
for (dx, dy) in animal[2]:
place += [(x + dx, y + dy)]
return place
def cases_voisines(place):
voisines = []
for (x, y) in place:
voisines += [(x + 1, y), (x, y + 1), (x - 1, y), (x, y - 1)]
return voisines
def sont_voisins(a1, p1, a2, p2):
place_1 = decale_animal(a1, p1)
place_2 = decale_animal(a2, p2)
voisines_1 = cases_voisines(place_1)
r = False
for c in voisines_1:
r = r or c in place_2
return r
def cherche_animal(type_anim, num, installation):
for i in range(len(installation)):
(a, p) = installation[i]
if a[0] == type_anim and a[1] == num:
return i
return -1
def verifie_voisinages(installation):
r = True
for t in ['L', 'G', 'H', 'Z', 'E']:
i1 = cherche_animal(t, 1, installation)
i2 = cherche_animal(t, 2, installation)
(a1, p1) = installation[i1]
(a2, p2) = installation[i2]
r = r and sont_voisins(a1, p1, a2, p2)
return r
def calculer_installation(grille, animaux, installation):
if animaux == []:
return verifie_voisinages(installation)
else:
a = animaux[0]
for y in range(len(grille)):
for x in range(len(grille[0])):
if place_libre((x, y), grille, a):
installe_animal((x, y), grille, a)
r = calculer_installation(grille, animaux[1:], [(a, (x, y))] + installation)
if r:
return r
else:
enleve_animal((x, y), grille, a)
return False
arche = copie_grille(arche_vide)
installe_animal((4, 1), arche, lion_2)
affiche_grille(arche)
installation = [(lion_2, (4, 1))]
animaux = [lion_1, girafe_1, girafe_2, hippopotame_1, hippopotame_2, zebre_1, zebre_2, elephant_1, elephant_2]
calculer_installation(arche, animaux, installation)
affiche_grille(arche)
|
class TalkMessage:
def __init__(self, messageId, timeStamp, body, senderAvatarId, senderAvatarName, senderAccountId, senderAccountName, receiverAvatarId, receiverAvatarName, receiverAccountId, receiverAccountName, talkType, extraInfo=None):
self.timeStamp = timeStamp
self.body = body
self.senderAvatarId = senderAvatarId
self.senderAvatarName = senderAvatarName
self.senderAccountId = senderAccountId
self.senderAccountName = senderAccountName
self.receiverAvatarId = receiverAvatarId
self.receiverAvatarName = receiverAvatarName
self.receiverAccountId = receiverAccountId
self.receiverAccountName = receiverAccountName
self.talkType = talkType
self.extraInfo = extraInfo
self.messageId = messageId
def getMessageId(self):
return self.messageId
def setMessageId(self, id):
self.messageId = id
def getTimeStamp(self):
return self.timeStamp
def setTimeStamp(self, timeStamp):
self.timeStamp = timeStamp
def getBody(self):
return self.body
def setBody(self, body):
self.body = body
def getSenderAvatarId(self):
return self.senderAvatarId
def setSenderAvatarId(self, senderAvatarId):
self.senderAvatarId = senderAvatarId
def getSenderAvatarName(self):
return self.senderAvatarName
def setSenderAvatarName(self, senderAvatarName):
self.senderAvatarName = senderAvatarName
def getSenderAccountId(self):
return self.senderAccountId
def setSenderAccountId(self, senderAccountId):
self.senderAccountId = senderAccountId
def getSenderAccountName(self):
return self.senderAccountName
def setSenderAccountName(self, senderAccountName):
self.senderAccountName = senderAccountName
def getReceiverAvatarId(self):
return self.receiverAvatarId
def setReceiverAvatarId(self, receiverAvatarId):
self.receiverAvatarId = receiverAvatarId
def getReceiverAvatarName(self):
return self.receiverAvatarName
def setReceiverAvatarName(self, receiverAvatarName):
self.receiverAvatarName = receiverAvatarName
def getReceiverAccountId(self):
return self.receiverAccountId
def setReceiverAccountId(self, receiverAccountId):
self.receiverAccountId = receiverAccountId
def getReceiverAccountName(self):
return self.receiverAccountName
def setReceiverAccountName(self, receiverAccountName):
self.receiverAccountName = receiverAccountName
def getTalkType(self):
return self.talkType
def setTalkType(self, talkType):
self.talkType = talkType
def getExtraInfo(self):
return self.extraInfo
def setExtraInfo(self, extraInfo):
self.extraInfo = extraInfo
|
class Talkmessage:
def __init__(self, messageId, timeStamp, body, senderAvatarId, senderAvatarName, senderAccountId, senderAccountName, receiverAvatarId, receiverAvatarName, receiverAccountId, receiverAccountName, talkType, extraInfo=None):
self.timeStamp = timeStamp
self.body = body
self.senderAvatarId = senderAvatarId
self.senderAvatarName = senderAvatarName
self.senderAccountId = senderAccountId
self.senderAccountName = senderAccountName
self.receiverAvatarId = receiverAvatarId
self.receiverAvatarName = receiverAvatarName
self.receiverAccountId = receiverAccountId
self.receiverAccountName = receiverAccountName
self.talkType = talkType
self.extraInfo = extraInfo
self.messageId = messageId
def get_message_id(self):
return self.messageId
def set_message_id(self, id):
self.messageId = id
def get_time_stamp(self):
return self.timeStamp
def set_time_stamp(self, timeStamp):
self.timeStamp = timeStamp
def get_body(self):
return self.body
def set_body(self, body):
self.body = body
def get_sender_avatar_id(self):
return self.senderAvatarId
def set_sender_avatar_id(self, senderAvatarId):
self.senderAvatarId = senderAvatarId
def get_sender_avatar_name(self):
return self.senderAvatarName
def set_sender_avatar_name(self, senderAvatarName):
self.senderAvatarName = senderAvatarName
def get_sender_account_id(self):
return self.senderAccountId
def set_sender_account_id(self, senderAccountId):
self.senderAccountId = senderAccountId
def get_sender_account_name(self):
return self.senderAccountName
def set_sender_account_name(self, senderAccountName):
self.senderAccountName = senderAccountName
def get_receiver_avatar_id(self):
return self.receiverAvatarId
def set_receiver_avatar_id(self, receiverAvatarId):
self.receiverAvatarId = receiverAvatarId
def get_receiver_avatar_name(self):
return self.receiverAvatarName
def set_receiver_avatar_name(self, receiverAvatarName):
self.receiverAvatarName = receiverAvatarName
def get_receiver_account_id(self):
return self.receiverAccountId
def set_receiver_account_id(self, receiverAccountId):
self.receiverAccountId = receiverAccountId
def get_receiver_account_name(self):
return self.receiverAccountName
def set_receiver_account_name(self, receiverAccountName):
self.receiverAccountName = receiverAccountName
def get_talk_type(self):
return self.talkType
def set_talk_type(self, talkType):
self.talkType = talkType
def get_extra_info(self):
return self.extraInfo
def set_extra_info(self, extraInfo):
self.extraInfo = extraInfo
|
''' While Loops
Used to execute a set of statements(code) continuously as long as a condition is True.
The while loop needs to be setup in a way that as long as a condition is True, Then stop when the condition becomes False.
While loop can have optional else clause.
'''
i = 1
|
""" While Loops
Used to execute a set of statements(code) continuously as long as a condition is True.
The while loop needs to be setup in a way that as long as a condition is True, Then stop when the condition becomes False.
While loop can have optional else clause.
"""
i = 1
|
def get_f(f, i, mode):
try:
if mode == 0:
return f[f[i]]
if mode == 1:
return f[i]
except KeyError:
return 0
raise NotImplementedError
def set_f(f, value, i, mode):
if mode == 0:
f[f[i]] = value
return
if mode == 1:
f[i] = value
return
raise NotImplementedError
def main():
f = [int(i) for i in [line.rstrip("\n") for line in open("Data.txt")][0].split(",")]
input = 1
i = 0
while True:
opcode = int(str(f[i])[-2:])
try:
immediate = int(str(f[i])[:-2])
except ValueError:
immediate = 0
i1 = immediate % 10
i2 = immediate//10 % 10
if opcode == 99:
break
elif opcode == 1:
set_f(f, get_f(f, i + 1, i1) + get_f(f, i + 2, i2), i + 3, 0)
i += 4
elif opcode == 2:
set_f(f, get_f(f, i + 1, i1)*get_f(f, i + 2, i2), i + 3, 0)
i += 4
elif opcode == 3:
set_f(f, input, i + 1, 0)
i += 2
elif opcode == 4:
print(get_f(f, i + 1, i1))
i += 2
else:
raise NotImplementedError
if __name__ == "__main__":
main()
|
def get_f(f, i, mode):
try:
if mode == 0:
return f[f[i]]
if mode == 1:
return f[i]
except KeyError:
return 0
raise NotImplementedError
def set_f(f, value, i, mode):
if mode == 0:
f[f[i]] = value
return
if mode == 1:
f[i] = value
return
raise NotImplementedError
def main():
f = [int(i) for i in [line.rstrip('\n') for line in open('Data.txt')][0].split(',')]
input = 1
i = 0
while True:
opcode = int(str(f[i])[-2:])
try:
immediate = int(str(f[i])[:-2])
except ValueError:
immediate = 0
i1 = immediate % 10
i2 = immediate // 10 % 10
if opcode == 99:
break
elif opcode == 1:
set_f(f, get_f(f, i + 1, i1) + get_f(f, i + 2, i2), i + 3, 0)
i += 4
elif opcode == 2:
set_f(f, get_f(f, i + 1, i1) * get_f(f, i + 2, i2), i + 3, 0)
i += 4
elif opcode == 3:
set_f(f, input, i + 1, 0)
i += 2
elif opcode == 4:
print(get_f(f, i + 1, i1))
i += 2
else:
raise NotImplementedError
if __name__ == '__main__':
main()
|
"""
Provides hard-coded values used in this package. No imports are allowed
since many other modules import this one
"""
__copyright__ = "Copyright 2020, Datera, Inc."
VERSION = "1.2.26"
VERSION_HISTORY = """
Version History:
1.1.0 -- Initial Version
1.1.1 -- Metadata Endpoint, Pep8 cleanup, Logging revamp
Python 3 compatibility, Versioning and Version Headers,
1.1.2 -- User, Event_system, Internal, Alerts Endpoints/Entities
1.2.0 -- v2.2 support, API module refactor
1.2.1 -- Massive rewrite to use /api endpoints instead of manually
curated list. Log compression
1.2.2 -- Change python version check in Connection to be forgivness based
1.2.4 -- Named object support, hw metics support
1.2.5 -- v2.2 Paging support
1.2.6 -- Bugfix for API v2.1 limit parameter
1.2.7 -- Changed connection to use requests library, added support for
logs_upload endpoint. Added 'strict' parameter to constructor
which allows disabling endpoint validity checks if set to 'False'
1.2.8 -- Added support for certs, trace_ids and standard logging
1.2.9 -- Added stream call for use with Metrics style endpoints
1.2.10 -- Added back create/delete hooks, implemented hook loading and
a hook inheritance interface.
1.2.11 -- Increased log rotation size before compression to 50MB
and decreased number of retained rotations to 5
1.2.12 -- Added capability of adding custom headers to requests
1.2.13 -- Added LDAP support to UDC config
1.2.15 -- Fixed ldap server bug, dropped get_argparser requirement from
scaffold, changed required requests version because of security
vulnerability. Updated the readme.
1.2.16 -- 503 retry support
1.2.17 -- Bugfix for issue that prevented older API versions from being
used
1.2.18 -- Added TLS verification support. Fixed bug where params were not
preserved during accumulation.
1.2.19 -- Bugfix for disable_log parameter
1.2.20 -- Bugfix for incorrect API version request
1.2.21 -- Better support for Alert entities, basic healthcheck function,
parameter for changing cached-schema location
1.2.22 -- Better retry support. Bugfix for mutated arguments during
retries
1.2.23 -- Fix for failed retry POST requests
1.2.24 -- Accumulation skip for 3.2.X product versions when 'filter'
parameter is present. Added version check system and
local version update during login.
1.2.25 -- Version increment to workaround PyPI .24 version caching issue
1.2.26 -- Minor bugfix release.
"""
API_VERSIONS = ("v2", "v2.1", "v2.2")
REST_PORT = 7717
REST_PORT_HTTPS = 7718
DEFAULT_HTTP_TIMEOUT = 300
PYTHON_2_7_0_HEXVERSION = 0x020700f0
PYTHON_2_7_9_HEXVERSION = 0x020709f0
PYTHON_3_0_0_HEXVERSION = 0x030000f0
DEFAULT_CACHED_SCHEMA = "/tmp/.cached-schema"
RETRY_TIMEOUT = 300
|
"""
Provides hard-coded values used in this package. No imports are allowed
since many other modules import this one
"""
__copyright__ = 'Copyright 2020, Datera, Inc.'
version = '1.2.26'
version_history = "\nVersion History:\n 1.1.0 -- Initial Version\n 1.1.1 -- Metadata Endpoint, Pep8 cleanup, Logging revamp\n Python 3 compatibility, Versioning and Version Headers,\n 1.1.2 -- User, Event_system, Internal, Alerts Endpoints/Entities\n 1.2.0 -- v2.2 support, API module refactor\n 1.2.1 -- Massive rewrite to use /api endpoints instead of manually\n curated list. Log compression\n 1.2.2 -- Change python version check in Connection to be forgivness based\n 1.2.4 -- Named object support, hw metics support\n 1.2.5 -- v2.2 Paging support\n 1.2.6 -- Bugfix for API v2.1 limit parameter\n 1.2.7 -- Changed connection to use requests library, added support for\n logs_upload endpoint. Added 'strict' parameter to constructor\n which allows disabling endpoint validity checks if set to 'False'\n 1.2.8 -- Added support for certs, trace_ids and standard logging\n 1.2.9 -- Added stream call for use with Metrics style endpoints\n 1.2.10 -- Added back create/delete hooks, implemented hook loading and\n a hook inheritance interface.\n 1.2.11 -- Increased log rotation size before compression to 50MB\n and decreased number of retained rotations to 5\n 1.2.12 -- Added capability of adding custom headers to requests\n 1.2.13 -- Added LDAP support to UDC config\n 1.2.15 -- Fixed ldap server bug, dropped get_argparser requirement from\n scaffold, changed required requests version because of security\n vulnerability. Updated the readme.\n 1.2.16 -- 503 retry support\n 1.2.17 -- Bugfix for issue that prevented older API versions from being\n used\n 1.2.18 -- Added TLS verification support. Fixed bug where params were not\n preserved during accumulation.\n 1.2.19 -- Bugfix for disable_log parameter\n 1.2.20 -- Bugfix for incorrect API version request\n 1.2.21 -- Better support for Alert entities, basic healthcheck function,\n parameter for changing cached-schema location\n 1.2.22 -- Better retry support. Bugfix for mutated arguments during\n retries\n 1.2.23 -- Fix for failed retry POST requests\n 1.2.24 -- Accumulation skip for 3.2.X product versions when 'filter'\n parameter is present. Added version check system and\n local version update during login.\n 1.2.25 -- Version increment to workaround PyPI .24 version caching issue\n 1.2.26 -- Minor bugfix release.\n"
api_versions = ('v2', 'v2.1', 'v2.2')
rest_port = 7717
rest_port_https = 7718
default_http_timeout = 300
python_2_7_0_hexversion = 34013424
python_2_7_9_hexversion = 34015728
python_3_0_0_hexversion = 50331888
default_cached_schema = '/tmp/.cached-schema'
retry_timeout = 300
|
USER = "__DUMMY_TRANSFORMERS_USER__"
FULL_NAME = "Dummy User"
PASS = "__DUMMY_TRANSFORMERS_PASS__"
# Not critical, only usable on the sandboxed CI instance.
TOKEN = "hf_94wBhPGp6KrrTH3KDchhKpRxZwd6dmHWLL"
ENDPOINT_PRODUCTION = "https://huggingface.co"
ENDPOINT_STAGING = "https://hub-ci.huggingface.co"
ENDPOINT_STAGING_BASIC_AUTH = f"https://{USER}:{PASS}@hub-ci.huggingface.co"
ENDPOINT_PRODUCTION_URL_SCHEME = (
ENDPOINT_PRODUCTION + "/{repo_id}/resolve/{revision}/{filename}"
)
|
user = '__DUMMY_TRANSFORMERS_USER__'
full_name = 'Dummy User'
pass = '__DUMMY_TRANSFORMERS_PASS__'
token = 'hf_94wBhPGp6KrrTH3KDchhKpRxZwd6dmHWLL'
endpoint_production = 'https://huggingface.co'
endpoint_staging = 'https://hub-ci.huggingface.co'
endpoint_staging_basic_auth = f'https://{USER}:{PASS}@hub-ci.huggingface.co'
endpoint_production_url_scheme = ENDPOINT_PRODUCTION + '/{repo_id}/resolve/{revision}/{filename}'
|
print("copy content from auto created ex23_sample_05.txt to ex23_sample_06.txt using 1 line only")
input('In powershell: echo "This is a unicode Test." > ex23_sample_05.txt ')
in_file = open('c:\\users\\roy\\ex23_sample_05.txt', encoding = 'utf-16').read()
out_file = open('c:\\users\\roy\\ex23_sample_06.txt', 'w', encoding = 'utf-16').write(in_file)
print("DONE!\n")
#-------------------------------------------------------------------
print("-------------------------------------------------------------")
print("copy content from languages.txt within ex23 to languages2.txt using 1 line only")
in_file = open('c:\\users\\roy\\languages.txt', encoding = 'utf-8').read()
# When set encoding = utf-16 --> UnicodeDecodeError: 'utf-16-le' codec can't decode bytes in position 812-813: illegal UTF-16 surrogate
# When set encoding = utf-16, errors = 'ignore' --> UnicodeError: UTF-16 stream does not start with BOM
out_file = open('c:\\users\\roy\\languages2.txt', 'w', encoding = 'utf-8').write(in_file)
# Before add encoding = utf-8 -->UnicodeEncodeError: 'gbk' codec can't encode character '\u0a73' in position 4: illegal multibyte sequence
print("DONE!\n")
# bytes can only contain ASCII literal characters.
|
print('copy content from auto created ex23_sample_05.txt to ex23_sample_06.txt using 1 line only')
input('In powershell: echo "This is a unicode Test." > ex23_sample_05.txt ')
in_file = open('c:\\users\\roy\\ex23_sample_05.txt', encoding='utf-16').read()
out_file = open('c:\\users\\roy\\ex23_sample_06.txt', 'w', encoding='utf-16').write(in_file)
print('DONE!\n')
print('-------------------------------------------------------------')
print('copy content from languages.txt within ex23 to languages2.txt using 1 line only')
in_file = open('c:\\users\\roy\\languages.txt', encoding='utf-8').read()
out_file = open('c:\\users\\roy\\languages2.txt', 'w', encoding='utf-8').write(in_file)
print('DONE!\n')
|
sum = 0
count = 0
while True:
try:
name = input()
distance = int(input())
sum += distance
count += 1
except EOFError:
break
print("{:.1f}".format(sum/count))
|
sum = 0
count = 0
while True:
try:
name = input()
distance = int(input())
sum += distance
count += 1
except EOFError:
break
print('{:.1f}'.format(sum / count))
|
# -*- coding: utf-8 -*-
#from scrapy.settings.default_settings import DOWNLOAD_DELAY
#from scrapy.settings.default_settings import ITEM_PIPELINES
# Scrapy settings for fbo_scraper project
#
# For simplicity, this file contains only the most important settings by
# default. All the other settings are documented here:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
#
BOT_NAME = 'packard_scraper'
SPIDER_MODULES = ['packard_scraper.spiders']
ITEM_PIPELINES = {'packard_scraper.pipelines.FboScraperExcelPipeline':0}
NEWSPIDER_MODULE = 'packard_scraper.spiders'
ROBOTSTXT_OBEY = True
RANDOMIZE_DOWNLOAD_DELAY = True
DOWNLOAD_DELAY = 5.0
# Crawl responsibly by identifying yourself (and your website) on the user-agent
# !!! ATTENTION: PLEASE REPLACE WITH YOUR OWN WEBSITE IF YOU ARE GOING TO USE USER_AGENT!
USER_AGENT = 'packard_scraper (+http://research.umd.edu/)'
|
bot_name = 'packard_scraper'
spider_modules = ['packard_scraper.spiders']
item_pipelines = {'packard_scraper.pipelines.FboScraperExcelPipeline': 0}
newspider_module = 'packard_scraper.spiders'
robotstxt_obey = True
randomize_download_delay = True
download_delay = 5.0
user_agent = 'packard_scraper (+http://research.umd.edu/)'
|
#Factorial de un numero, usar recursividad.
def factorial(number):
if number == 0:
return 1
return number * factorial(number - 1)
if __name__ == '__main__':
number = int(input('Ingrese numero a convertir en factorial: '))
result = factorial(number)
print('El resultado es: {}'.format(result))
|
def factorial(number):
if number == 0:
return 1
return number * factorial(number - 1)
if __name__ == '__main__':
number = int(input('Ingrese numero a convertir en factorial: '))
result = factorial(number)
print('El resultado es: {}'.format(result))
|
class Student:
def __init__(self, name, school):
self.name = name
self.school = school
self.marks = []
def average(self):
return sum(self.marks) / len(self.marks)
def go_to_school(self):
return "I'm going to {}".format(self.school)
anna = Student("Anna", "Oxford")
rolf = Student("Rolf", "Harvard")
print(anna.go_to_school())
print(rolf.go_to_school())
###
class Student:
def __init__(self, name, school):
self.name = name
self.school = school
self.marks = []
def average(self):
return sum(self.marks) / len(self.marks)
def go_to_school(self):
return "I'm going to school"
anna = Student("Anna", "Oxford")
rolf = Student("Rolf", "Harvard")
print(anna.go_to_school())
print(rolf.go_to_school())
###
class Student:
def __init__(self, name, school):
self.name = name
self.school = school
self.marks = []
def average(self):
return sum(self.marks) / len(self.marks)
@staticmethod
def go_to_school():
return "I'm going to school"
anna = Student("Anna", "Oxford")
rolf = Student("Rolf", "Harvard")
print(anna.go_to_school())
print(rolf.go_to_school())
###
class Student:
def __init__(self, name, school):
self.name = name
self.school = school
self.marks = []
def average(self):
return sum(self.marks) / len(self.marks)
def friend(self, friend_name):
return Student(friend_name, self.school)
anna = Student("Anna", "Oxford")
friend = anna.friend("Greg")
print(friend.name)
print(friend.school)
|
class Student:
def __init__(self, name, school):
self.name = name
self.school = school
self.marks = []
def average(self):
return sum(self.marks) / len(self.marks)
def go_to_school(self):
return "I'm going to {}".format(self.school)
anna = student('Anna', 'Oxford')
rolf = student('Rolf', 'Harvard')
print(anna.go_to_school())
print(rolf.go_to_school())
class Student:
def __init__(self, name, school):
self.name = name
self.school = school
self.marks = []
def average(self):
return sum(self.marks) / len(self.marks)
def go_to_school(self):
return "I'm going to school"
anna = student('Anna', 'Oxford')
rolf = student('Rolf', 'Harvard')
print(anna.go_to_school())
print(rolf.go_to_school())
class Student:
def __init__(self, name, school):
self.name = name
self.school = school
self.marks = []
def average(self):
return sum(self.marks) / len(self.marks)
@staticmethod
def go_to_school():
return "I'm going to school"
anna = student('Anna', 'Oxford')
rolf = student('Rolf', 'Harvard')
print(anna.go_to_school())
print(rolf.go_to_school())
class Student:
def __init__(self, name, school):
self.name = name
self.school = school
self.marks = []
def average(self):
return sum(self.marks) / len(self.marks)
def friend(self, friend_name):
return student(friend_name, self.school)
anna = student('Anna', 'Oxford')
friend = anna.friend('Greg')
print(friend.name)
print(friend.school)
|
"""Top-level package for fdf."""
__author__ = """Ledenel Intelli"""
__email__ = 'ledenelintelli@gmail.com'
__version__ = '0.1.9'
|
"""Top-level package for fdf."""
__author__ = 'Ledenel Intelli'
__email__ = 'ledenelintelli@gmail.com'
__version__ = '0.1.9'
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Andy Wilson, Michael Darling, David Stracuzzi, Shelley Leger
Sandia National Laboratories
February 25, 2020
Defines set of test sudoku problems to use to test the sudoku infrastructure
"""
puzzles = {
'test2-i24e40': '300000700000001000000060000000700015400300000000000020610000800000540900002000000',
'test3-i29e35': '300000700000001000000060000000700015900500000000000020610000800000340900002000000',
'test4-i28e36': '300000700000001000000090000000700014800600000000000020610000800000540300002000000',
'test5-i23e41': '560000040000010700000000000000400060030000005018000000700604000200000100000000003',
'test6-i26e38': '560000040000010700000000000000800060030000005019000000700604000200000100000000003',
'test7-i26e36hp10': '010000200800300000000000500050000410000700060002008000900000073000050000000040000',
'test8-i32e32hp2': '010000208500406000000000000306000050000020700004000000020010000000300060800000000',
'test9-i29e35hp2': '083000200000091000000000000100000409020300000000070000007600500000800030900000000',
'test10-i29e35hp7': '000090750801000000000000000050000400000801000000600000470020000000100006300000080',
'test11-i36e28hp2': '000090800704000000100000000050480000000000010090000000200600500000107000000000308',
'test12-i36e28np1': '300000700000010400506000000000200035000000080000070000070600100040005000000300000',
'test13-i34e30np1': '100000300700600000000200000060030400025000000000000800007500002300080000000000010',
'test14-i24e38np3': '100000300800007000000200000027640000060500000000000100000000042300080000000000060',
'test15-i28e34np3': '100000305600900000000080200000760010020800000050000000400000700000001000000050000',
'test16-i26e36np3': '100000305800400000000070200000640080020700000050000000400000600000001000000050000',
'test17-i24e38np4hp4': '300000670000201000080000000000570800021000000400000000600030000000000042000000009',
'test18-i29e35np3hp4': '560000030000901000000000000809000010070060000000000000104800000000050607000000200',
'test19-i21e41np8hp3': '100000306070800000000000200000236000004000085000000000000500040390000000600000000',
'test20-i22e42np3hp7': '100000306500040000000010000000000051060000200030800000700000040000602000000300000',
'test21-i16e47np1hp2': '100000340406000800000900000800040000000700009000000000097000050000031000020000000',
'test22-i33e18nt1xw1': '000400067064200000007106042000860304401000700706940000170004000940000200000010400',
'test23-i16e32nt1xw1': '700000021500402000200807000021500000073200610045700230407000802302070100106020000',
'test24-i10e41nt2xw2': '000500061516020000970060000061400000000650910000000680100806000300000506600705108',
'test25-i16e32nt1xw1': '400000081300021000100700000048010000000060210016000000601000354700504108854136000',
'test26-i8e41pp1nt4xw2xyzw1': '000605021070302000020408000100960250032087400760020000200850000000700802600200000',
'test27-i32e31yw3': '560000040700003000000800000008000030090200000000040000600050100000000908000000200',
'test28-i27e36yw1': '205700000800050300000000000090000100000200000000000030030081000400000020000900007',
'test29-i27e36yw1': '700200050000030080100000000400060700060080000000000100039500000000700000080000000',
'test30-i29e34yw1': '080000670000310000000000000000200005240000000000000013501400000000007800300000000',
'test31-i36e27yw1': '080000670000510000000000000000200004230000000000000051405300000000007800100000000',
'test32-i25e38np2hp4yw1': '000200090010000030050008000200900000000400500000000100400006020000030700000010000',
'test33-i26e38np2hp3yw1': '042080000000000001080000000700103000000000480600000000150600000000000540000900000',
'test34-i26e38np2hp3yw1': '042080000000000001080000000700103000000000480900000000150600000000000540000700000',
'test35-i24e40np3hp2yw1': '000040380050070000010000000000502008600000700000100000000200010407000000300000000',
'test36-i30e33np2hp2yw1': '100036000020000840000000000603050000500700000000000020040800000000000503000200000',
'easy1': '..3.2.6..9..3.5..1..18.64....81.29..7.......8..67.82....26.95..8..2.3..9..5.1.3..',
'easy2': '......9.7...42.18....7.5.261..9.4....5.....4....5.7..992.1.8....34.59...5.7......',
'easy3': '...1254....84.....42.8......3.....95.6.9.2.1.51.....6......3.49.....72....1298...',
'easy4': '..61.24.......457..2.9.31.8.8...56.96...9...19.13...4.5.42.9.8..627.......85.13..',
'medium1': '...439...4..6..8..395.....472..8..9....217....3..9..282.....417..9..2..3...841...',
'hard1': '4.....8.5.3..........7......2.....6.....8.4......1.......6.3.7.5..2.....1.4......',
# 'hard2': '6.2.5.........3.4..........43...8....1....2........7..5..27...........81...6.....',
# 'hard3': '...5...........5.697.....2...48.2...25.1...3..8..3.........4.7..13.5..9..2...31..',
'hard4': '3..6.9.12..7.....6.2...1......74...3..29.65..1...23......8...9.5.....3..29.3.7..4',
'fiendish1': '.....5.8....6.1.43..........1.5........1.6...3.......553.....61........4.........',
'fiendish2': '85...24..72......9..4.........1.7..23.5...9...4...........8..7..17..........36.4.',
# 'fiendish3': '..53.....8......2..7..1.5..4....53...1..7...6..32...8..6.5....9..4....3......97..',
'fiendish4': '..32.4...24.5...7.......6..9..7..1...87...53...2..5..7..1.......3...6.98...8.23..',
'naked_single_test': '246.7..38...3.6.7437..4.6....8.2.7..1.......6..7.3.4....4.8..6986.4....791..6..42',
'naked_pair_test': '4.....938.32.941...953..24.37.6.9..4529..16736.47.3.9.957..83....39..4..24..3.7.9',
'naked_pair_test_2': '.8..9..3..3.....699.2.63158.2.8.459.8519.7.463946.587.563.4.9872......15.1..5..2.',
'hidden_pair_test': '.........9.46.7....768.41..3.97.1.8.7.8...3.1.513.87.2..75.261...54.32.8.........',
'hidden_pair_test_2': '72.4.8.3..8.....474.1.768.281.739......851......264.8.2.968.41334......8168943275',
'naked_triple_test': '.7.4.8.29..2.....4854.2...7..83742...2.........32617......936122.....4.313.642.7.',
'naked_triple_test_2': '294513..66..8423193..697254....56....4..8..6....47....73.164..59..735..14..928637',
'hidden_triple_test': '.....1.3.231.9.....65..31..6789243..1.3.5...6...1367....936.57...6.198433........',
'naked_quad_test': '....3..86....2..4..9..7852.3718562949..1423754..3976182..7.3859.392.54677..9.4132',
# 'hidden_quad_test': '9.15...46425.9..8186..1..2.5.2.......19...46.6.......2196.4.2532...6.817.....1694',
'pointing_pair_test': '.179.36......8....9.....5.7.72.1.43....4.2.7..6437.25.7.1....65....3......56.172.',
'pointing_pair_test_2': '.32..61..41..........9.1...5...9...4.6.....713...2...5...5.8.........519.57..986.',
'pointing_triple_test': '93..5....2..63..95856..2.....318.57...5.2.98..8...5......8..1595.821...4...56...8',
'box_line_reduction': '.16..78.3.9.8.....87...1.6..48...3..65...9.82.39...65..6.9...2..8...29369246..51.',
'box_line_reduction_2': '.2.9437159.4...6..75.....4.5..48....2.....4534..352....42....81..5..426..9.2.85.4',
'xwing_test': '1.....569492.561.8.561.924...964.8.1.64.1....218.356.4.4.5...169.5.614.2621.....5',
# 'xwing_test_2': '.......9476.91..5..9...2.81.7..5..1....7.9....8..31.6724.1...7..1..9..459.....1..',
'ywing_test': '9..24.....5.69.231.2..5..9..9.7..32...29356.7.7...29...69.2..7351..79.622.7.86..9',
# 'xyz_wing_test': '.92..175.5..2....8....3.2...75..496.2...6..75.697...3...8.9..2.7....3.899.38...4.',
# 'xyz_wing_test_2': '6.......85..9.8..782...1.3.34.2.9.8.2...8.3..18.3.7.2575.4...929....5..44...9...3',
# 'swordfish_test_333': '52941.7.3..6..3..2..32......523...76637.5.2..19.62753.3...6942.2..83.6..96.7423.5',
# 'swordfish_test_222': '926...1..537.1.42.841...6.3259734816714.6..3.36812..4.1.2....84485.7136.6.3.....1',
# 'swordfish_test_323': '.2..43.69..38962..96..25.3.89.56..136...3.....3..81.263...1..7...96743.227.358.9.',
# TODO MAL this and the others commented out don't finish without help
'underconstrained1': '.8...9743.5...8.1..1.......8....5......8.4......3....6.......7..3.5...8.9724...5.',
# 'underconstrained2': '53..7....6..1.5....98....6.8.......34..8.3..17...2...6.6....28....419..5....8..79',
# 'underconstrained3': '..97.......48.9.7......2.3....3.6...3..1....9..6....58..8.3....5.....1869.2......',
# 'underconstrained4': '......23....3.8.64....4.9.8573.......8652937.......8456.5.1....71...2....48......',
# 'underconstrained5': '.21...9.36........83962...19...31.....2...3.....9....87...69152........92.5...74.',
# 'underconstrained6': '.7.4.1..8.16.3...45.4........7.8..9.6..123........6......6...532.8.....6.......8.',
# INSOLUBLE BY PROPAGATION (BASED ON EASY 0)
'insoluble_by_propagation': '..3.2.6..9..3.5..1..18.64....81.29..7.......8..67.82....26.95..8..2.3..9..5.1.8..',
# INSOLUBLE BY INITIAL STATE CONFLICT (BASED ON EASY 0)
'insoluble_by_initial_state_conflict': '..3.2.6..9..3.5..1..18.64....81.29..7.......8..67.82....26.95..8..2.3..9..5.1.6..',
}
games = {
'test_game1_6_operators_open': {
'puzzles': ['test2-i24e40', 'easy1', 'xwing_test', 'hard4', 'underconstrained1', 'test7-i26e36hp10'],
'config_alterations': {}
},
'test_game1_6': {
'puzzles': ['test2-i24e40', 'easy1', 'xwing_test', 'hard4', 'underconstrained1', 'test7-i26e36hp10'],
'config_alterations': {'randomly_apply': ['select_ops_upfront']}
},
'test_game1_4': {
'puzzles': ['test2-i24e40', 'xwing_test', 'hard4', 'underconstrained1'],
'config_alterations': {'randomly_apply': ['select_ops_upfront']}
},
'test_game_ptgprs': {
'puzzles': ['pointing_pair_test...goal=A9', 'pointing_pair_test...goal=E2', 'pointing_pair_test...goal=B1'],
'config_alterations': {'randomly_apply': ['select_ops_upfront']}
},
'pilot_test_a_board': {
# 'test7-i26e36hp10?goal=C6?costlyops=inclusion,pointingpairs,nakedpairs,xwings?name=Pilot Test Board?select_ops_upfront'
'puzzles': ['test7-i26e36hp10...goal=C6...name=Pilot Test Board...question=Can C6 be a 7?',
'test7-i26e36hp10...goal=C6...name=Pilot Test Board2...select_ops_upfront...question=Can C6 be odd?'],
'config_alterations': {'costly_ops': ['inclusion', 'pointingpairs', 'nakedpairs', 'xwings']}
},
'test_logical_operators_in_sequence': {
'puzzles': ['test2-i24e40...name=Test Inclusion...goal=C6...question=Can C6 be 4?...answer=no',
'test9-i29e35hp2...name=Test Pointing Pairs...goal=C6...question=Can C6 equal A2 or A3?...answer=yes',
'test7-i26e36hp10...name=Test Naked Pairs...goal=C6...question=Can C6 be greater than 5?...answer=no',
'hidden_pair_test_2...name=Test Hidden Pairs...goal=F7...question=Can F7 be odd?...answer=yes',
'box_line_reduction_2...name=Test Pointing Triples...goal=C5...question=Can C5 be less than 5?...answer=yes',
'hidden_triple_test...name=Test Naked Triples...goal=A9...question=Can A9 be greater than 5?...answer=no',
#'...name=Test Hidden Triples...goal=...question=',
'xwing_test...name=Test X-Wings...goal=G6...question=Can G6 equal A7 or A8 or A9?...answer=no',
'test29-i27e36yw1...name=Test Y-Wings...goal=E8...question=Can E9 be a square (1 or 4 or 9)?',
#'...name=Test XYZ-Wings...goal=...question=',
#'...name=Test Naked Quads...goal=...question=',
#'...name=Test Hidden Quads...goal=...question=',
]
},
'training_games': {
'puzzles': [
# Requires 2 calls to inclusion, resolved after 1st call to inclusion (doesn't require 2nd)
'easy2...goal=E7...name=Training #1...question=Can E7 be 6?...answer=no',
'easy2...goal=E7...name=Training #1...question=Can E7 be 6?...answer=no...select_ops_upfront',
# Requires pointingpairs and inclusion, with final call to pointing pairs to resolve (no call to inclusion after pointing pairs)
'test11-i36e28hp2...goal=B8...name=Training #2...question=Can B8 be odd?...answer=yes',
'test11-i36e28hp2...goal=B8...name=Training #2...question=Can B8 be odd?...answer=yes...select_ops_upfront',
# Requires pointingpairs and inclusion, but doesn't require last call to inclusion _after_ pointing pairs
'test16-i26e36np3...goal=F3...name=Training #3...question=Can F3 be 3 or 7?...answer=no',
'test16-i26e36np3...goal=F3...name=Training #3...question=Can F3 be 3 or 7?...answer=no...select_ops_upfront',
]
},
'training_games_select_ops_upfront': {
'puzzles': [
'easy2...goal=E7...name=Training #1...question=Can E7 be 6?...answer=no...select_ops_upfront',
'test11-i36e28hp2...goal=B8...name=Training #2...question=Can B8 be odd?...answer=yes...select_ops_upfront',
'test16-i26e36np3...goal=F3...name=Training #3...question=Can F3 be 3 or 7?...answer=no...select_ops_upfront',
]
},
'training_games_always_select': {
'puzzles': [
'easy2...goal=E7...name=Training #1...question=Can E7 be 6?...answer=no',
'test11-i36e28hp2...goal=B8...name=Training #2...question=Can B8 be odd?...answer=yes',
'test16-i26e36np3...goal=F3...name=Training #3...question=Can F3 be 3 or 7?...answer=no',
]
},
'training_games1_select_ops_upfront': {
'puzzles': [
'easy2...goal=E7...name=Training #1...question=Can E7 be 6?...answer=no...select_ops_upfront',
]
},
'training_game2_select_ops_upfront': {
'puzzles': [
'test11-i36e28hp2...goal=B8...name=Training #2...question=Can B8 be odd?...answer=yes...select_ops_upfront',
]
},
'training_games3_select_ops_upfront': {
'puzzles': [
'test16-i26e36np3...goal=F3...name=Training #3...question=Can F3 be 3 or 7?...answer=no...select_ops_upfront',
]
},
'training_games1_always_select': {
'puzzles': [
'easy2...goal=E7...name=Training #1...question=Can E7 be 6?...answer=no',
]
},
'training_game2_always_select': {
'puzzles': [
'test11-i36e28hp2...goal=B8...name=Training #2...question=Can B8 be odd?...answer=yes',
]
},
'training_games3_always_select': {
'puzzles': [
'test16-i26e36np3...goal=F3...name=Training #3...question=Can F3 be 3 or 7?...answer=no',
]
},
'weedout_games': {
'puzzles': [
# Requires pointing pairs and inclusion; doesn't require last inclusion after pointing pairs (poss. 1 4 6 7 9)
'test36-i30e33np2hp2yw1...goal=F7...name=WeedOut #1...question=Can F7 be 1, 6, or 7?...answer=yes',
'test36-i30e33np2hp2yw1...goal=F7...name=WeedOut #1...question=Can F7 be 1, 6, or 7?...answer=yes...select_ops_upfront',
# Requires 4 calls to inclusion, resolved after 3rd call to inclusion (doesn't require 4th) (poss. 5 7 8 9)
'test4-i28e36...goal=B1...name=WeedOut #2...question=Can B1 be greater than 5?...answer=no',
'test4-i28e36...goal=B1...name=WeedOut #2...question=Can B1 be greater than 5?...answer=no...select_ops_upfront',
# Requires just 1 inclusion call to solve
'test22-i33e18nt1xw1...goal=A2...name=WeedOut #3...question=Can A2 be 3?...answer=no',
'test22-i33e18nt1xw1...goal=A2...name=WeedOut #3...question=Can A2 be 3?...answer=no...select_ops_upfront',
]
},
'weedout_games_always_select': {
'puzzles': [
'test36-i30e33np2hp2yw1...goal=F7...name=WeedOut #1...question=Can F7 be 1, 6, or 7?...answer=yes',
'test4-i28e36...goal=B1...name=WeedOut #2...question=Can B1 be greater than 5?...answer=no',
'test22-i33e18nt1xw1...goal=A2...name=WeedOut #3...question=Can A2 be 3?...answer=no',
]
},
'weedout_games_select_ops_upfront': {
'puzzles': [
'test36-i30e33np2hp2yw1...goal=F7...name=WeedOut #1...question=Can F7 be 1, 6, or 7?...answer=yes...select_ops_upfront',
'test4-i28e36...goal=B1...name=WeedOut #2...question=Can B1 be greater than 5?...answer=no...select_ops_upfront',
'test22-i33e18nt1xw1...goal=A2...name=WeedOut #3...question=Can A2 be 3?...answer=no...select_ops_upfront',
]
},
'weedout_games1_select_ops_upfront': {
'puzzles': [
'test36-i30e33np2hp2yw1...goal=F7...name=WeedOut #1...question=Can F7 be 1, 6, or 7?...answer=yes...select_ops_upfront',
]
},
'weedout_games2_select_ops_upfront': {
'puzzles': [
'test4-i28e36...goal=B1...name=WeedOut #2...question=Can B1 be greater than 5?...answer=no...select_ops_upfront',
]
},
'weedout_games3_select_ops_upfront': {
'puzzles': [
'test22-i33e18nt1xw1...goal=A2...name=WeedOut #3...question=Can A2 be 3?...answer=no...select_ops_upfront',
]
},
'weedout_games1_always_select': {
'puzzles': [
'test36-i30e33np2hp2yw1...goal=F7...name=WeedOut #1...question=Can F7 be 1, 6, or 7?...answer=yes',
]
},
'weedout_games2_always_select': {
'puzzles': [
'test4-i28e36...goal=B1...name=WeedOut #2...question=Can B1 be greater than 5?...answer=no',
]
},
'weedout_games3_always_select': {
'puzzles': [
'test22-i33e18nt1xw1...goal=A2...name=WeedOut #3...question=Can A2 be 3?...answer=no',
]
},
'logical_operators_mturk_test_suite': {
'puzzles': [
# Goal: something that gets resolved by second-to-last logical operator
# Inclusion
# Requires 1 call to inclusion; resolved after last (1) inclusion call
'medium1...goal=I3...name=Sudoku Test #01...question=Is I3 prime (2, 3, 5, or 7)?...answer=yes',
'medium1...goal=I3...name=Sudoku Test #01...question=Is I3 prime (2, 3, 5, or 7)?...answer=yes...select_ops_upfront',
# Requires 2 calls to inclusion; resolved after 1st call *** training / weed out ***
'naked_single_test...goal=E6...name=Sudoku Test #02...question=Is E6 less than 5?...answer=yes',
'naked_single_test...goal=E6...name=Sudoku Test #02...question=Is E6 less than 5?...answer=yes...select_ops_upfront',
# Requires 4 calls to inclusion; resolved by exclusion propagation of 3rd call
'test2-i24e40...goal=B2...name=Sudoku Test #03...question=Is B2 less than 6?...answer=no',
'test2-i24e40...goal=B2...name=Sudoku Test #03...question=Is B2 less than 6?...answer=no...select_ops_upfront',
# Requires 4 calls to inclusion; resolved on 3rd inclusion (no exclusion) to be 2
'test3-i29e35...goal=E2...name=Sudoku Test #04...question=Is E2 6?...answer=no',
'test3-i29e35...goal=E2...name=Sudoku Test #04...question=Is E2 6?...answer=no...select_ops_upfront',
# Requires 3 calls to inclusion; resolved after 2nd call
'test6-i26e38...goal=C5...name=Sudoku Test #05...question=Is C5 7?...answer=no',
'test6-i26e38...goal=C5...name=Sudoku Test #05...question=Is C5 7?...answer=no...select_ops_upfront',
# Process: search for last call to highest-level operator that has at least one non-exclusion operator call after it (if only one call, it can be the last).
# Pick most uncertain cell (or a cell if that call doesn't resolve any uncertainty) before the call as the goal.
# Determine how uncertainty changes before the next logical operator.
# Design a question that is answerable by how the uncertainty changes by the time the next logical operator is called.
# Do this experiment with all logical operators, not just the ones chosen for this test.
# Pointing Pairs
# Requires 1 pointing pairs call and 6 inclusion calls; 1 inclusion call happens after the pointing pairs call but is not required to answer.
'test8-i32e32hp2...goal=H2...name=Sudoku Test #06...question=Is H2 7?...answer=no',
'test8-i32e32hp2...goal=H2...name=Sudoku Test #06...question=Is H2 7?...answer=no...select_ops_upfront',
# Requires 2 pointing pairs calls. Question resolved by first, where following inclusion, pointing pairs, inclusion solves the board.
'test9-i29e35hp2...goal=C6...name=Sudoku Test #07...question=Is C6 equal to A2 or A3?...answer=yes',
'test9-i29e35hp2...goal=C6...name=Sudoku Test #07...question=Is C6 equal to A2 or A3?...answer=yes...select_ops_upfront',
# Requires 1 pointing pairs, 6 inclusions. Pointing pairs solves the board with exclusion.
'test15-i28e34np3...goal=F9...name=Sudoku Test #08...question=Is F9 odd?...answer=yes',
'test15-i28e34np3...goal=F9...name=Sudoku Test #08...question=Is F9 odd?...answer=yes...select_ops_upfront',
# Requires 1 pointing pairs, 6 inclusions. Board requires 2 inclusions afterwards, but question is resolved prior to those.
'test13-i34e30np1...goal=A6...name=Sudoku Test #09...question=Is A6 5?...answer=no',
'test13-i34e30np1...goal=A6...name=Sudoku Test #09...question=Is A6 5?...answer=no...select_ops_upfront',
# Requires 2 pointing pairs, 6 inclusions. Question resolved by first pointing pairs.
'hard1...goal=B9...name=Sudoku Test #10...question=Is B9 greater than 3?...answer=yes',
'hard1...goal=B9...name=Sudoku Test #10...question=Is B9 greater than 3?...answer=yes...select_ops_upfront',
# Naked Pairs
# 1 naked pairs, 2 pointingpairs, 7 inclusion. Solved by exclusion after nakedpairs
# C6 1, 2, 6, 9 -> 1, 2
'test7-i26e36hp10...name=Sudoku Test #11...goal=C6...question=Is C6 greater than 5?...answer=no',
'test7-i26e36hp10...name=Sudoku Test #11...goal=C6...question=Is C6 greater than 5?...answer=no...select_ops_upfront',
# 1 naked pair, 2 pointing pairs, 2 inclusions. Solved by exclusion after nakedpairs
# A6 -> 1, 2 -> 1
# Try operator before naked pairs. Pointing pairs.
# Still A6 -> 1, 2, not resolved by nakedpairs. Try to reduce uncertainty otherwise.
# B5 1, 2, 7, 8 -> 7, 8
'naked_pair_test_2...goal=B5...name=Sudoku Test #12...question=Is B5 greater than 5?...answer=yes',
'naked_pair_test_2...goal=B5...name=Sudoku Test #12...question=Is B5 greater than 5?...answer=yes...select_ops_upfront',
# 1 naked pairs, 2 pointing pairs, 5 inclusions. Requires 1 inclusion to solve after (followed by inclusion, pointingpairs to solve the board).
# I5 4, 5, 7 -> 4, 5, 7. Need better option, so look at what's resolved before next inclusion.
# A1 1, 5, 6, 7 -> 6, 7
'fiendish4...goal=A1...name=Sudoku Test #13...question=Is A1 greater than 5?...answer=yes',
'fiendish4...goal=A1...name=Sudoku Test #13...question=Is A1 greater than 5?...answer=yes...select_ops_upfront',
# 1 nakedpair, 3 pointingpairs, 10 inclusion. 1 inclusion after nakedpair.
# F6 2, 3, 4, 5, 7, 9 -> no change after nakedpair, requires an inclusion also to get to -> 2, 3, 4, 7, 9
'test10-i29e35hp7...goal=F6...name=Sudoku Test #14...question=Is F6 5?...answer=no',
'test10-i29e35hp7...goal=F6...name=Sudoku Test #14...question=Is F6 5?...answer=no...select_ops_upfront',
# 1 naked pair, 2 pointingpairs, 10 inclusions. Solved by exclusion after nakedpairs.
# B2 3, 4, 9 -> 3
'test14-i24e38np3...goal=B2...name=Sudoku Test #15...question=Is B2 a perfect square (1, 4, or 9)?...answer=no',
'test14-i24e38np3...goal=B2...name=Sudoku Test #15...question=Is B2 a perfect square (1, 4, or 9)?...answer=no...select_ops_upfront',
# Y Wings
# 1 ywings, 1 nakedpairs, 6 inclusion. Solved by exclusion immediately after y-wings
# H9 3, 5 -> 3
# 'test29-i27e36yw1...name=Sudoku Test #16...goal=E8...question=Can E9 be a square (1 or 4 or 9)?',
'test29-i27e36yw1...name=Sudoku Test #16...goal=H9...question=Is H9 3?...answer=yes',
'test29-i27e36yw1...name=Sudoku Test #16...goal=H9...question=Is H9 3?...answer=yes...select_ops_upfront',
# 1 ywings, 2 pointing pairs, 7 inclusions. solved by exclusion immediately after.
# H3 6, 9 -> 9
'test32-i25e38np2hp4yw1...goal=H3...name=Sudoku Test #17...question=Is H3 even?...answer=no',
'test32-i25e38np2hp4yw1...goal=H3...name=Sudoku Test #17...question=Is H3 even?...answer=no...select_ops_upfront',
# 1 ywings, 2 pointing pairs, 9 inclusions. Solved by exclusion after ywing
# I2 5, 7 -> 5
# 'test27-i32e31yw3...goal=%%...name=Sudoku Test #20...question=%%?...answer=%%',
# 1 ywing, 9 inclusion. solved by exclusion immediately after.
# B8 4, 8 -> 4
# Solve prior to ywing insted.
# B9 8, 9 -> No change prior to ywing. Try reducing uncertainty instead.
# G9 2, 6, 7 -> 7
'test30-i29e34yw1...goal=G9...name=Sudoku Test #18...question=Is G9 odd?...answer=yes',
'test30-i29e34yw1...goal=G9...name=Sudoku Test #18...question=Is G9 odd?...answer=yes...select_ops_upfront',
# 1 ywing, 2 pointing pairs, 2 inclusion. solved by exclusion immediately after
# F3 1, 3, 4, 5, 6, 8 -> 1, 3, 4, 5, 6
# 'ywing_test...goal=%%...name=Sudoku Test #18...question=%%?...answer=%%',
# 1 Ywing, 6 inclusion. Solved immediately after ywing by exclusion.
# E8 4, 6, 9 -> 4, 9
'test28-i27e36yw1...goal=E8...name=Sudoku Test #19...question=Is E8 a perfect square (1, 4, or 9)?...answer=yes',
'test28-i27e36yw1...goal=E8...name=Sudoku Test #19...question=Is E8 a perfect square (1, 4, or 9)?...answer=yes...select_ops_upfront',
# 1 ywings, 9 inclusion. Solved after ywing by exclusion.
# B8 3, 8 -> 3
# 'test31-i36e27yw1...goal=%%...name=Sudoku Test #20...question=%%?...answer=%%',
# 1 ywings, 2 pointing pairs, 7 inclusion. Solved immediately after ywings by exclusion
# H3 6, 9 -> 6
# 'test32-i25e38np2hp4yw1...goal=%%...name=Sudoku Test #20...question=%%?...answer=%%',
# 1 ywings, 2 pointing pairs, 5 inclusion. ywings followed by inclusion.
# D5 1, 2, 5, 6 -> no change. Need a different question prior to inclusion.
# C3 3, 5 -> 3
'box_line_reduction...goal=C3...name=Sudoku Test #20...question=Is C3 greater than 4?...answer=no',
'box_line_reduction...goal=C3...name=Sudoku Test #20...question=Is C3 greater than 4?...answer=no...select_ops_upfront',
]
},
'logical_operators_mturk_option1_select_upfront': {
'puzzles': [
# Inclusion 1
'medium1...goal=I3...name=Sudoku Test #01...question=Is I3 prime (2, 3, 5, or 7)?...answer=yes...select_ops_upfront',
'naked_single_test...goal=E6...name=Sudoku Test #02...question=Is E6 less than 5?...answer=yes...select_ops_upfront',
'test2-i24e40...goal=B2...name=Sudoku Test #03...question=Is B2 less than 6?...answer=no...select_ops_upfront',
# Pointing Pairs 1
'test15-i28e34np3...goal=F9...name=Sudoku Test #08...question=Is F9 odd?...answer=yes...select_ops_upfront',
'test13-i34e30np1...goal=A6...name=Sudoku Test #09...question=Is A6 5?...answer=no...select_ops_upfront',
# Naked Pairs 1
'naked_pair_test_2...goal=B5...name=Sudoku Test #12...question=Is B5 greater than 5?...answer=yes...select_ops_upfront',
'fiendish4...goal=A1...name=Sudoku Test #13...question=Is A1 greater than 5?...answer=yes...select_ops_upfront',
# Y Wings 1
'test32-i25e38np2hp4yw1...goal=H3...name=Sudoku Test #17...question=Is H3 even?...answer=no...select_ops_upfront',
'test28-i27e36yw1...goal=E8...name=Sudoku Test #19...question=Is E8 a perfect square (1, 4, or 9)?...answer=yes...select_ops_upfront',
'test30-i29e34yw1...goal=G9...name=Sudoku Test #18...question=Is G9 odd?...answer=yes...select_ops_upfront',
]
},
'logical_operators_mturk_option2_select_upfront': {
'puzzles': [
# Inclusion 2
'test3-i29e35...goal=E2...name=Sudoku Test #04...question=Is E2 6?...answer=no...select_ops_upfront',
'test6-i26e38...goal=C5...name=Sudoku Test #05...question=Is C5 7?...answer=no...select_ops_upfront',
# Pointing Pairs 2
'hard1...goal=B9...name=Sudoku Test #10...question=Is B9 greater than 3?...answer=yes...select_ops_upfront',
'test8-i32e32hp2...goal=H2...name=Sudoku Test #06...question=Is H2 7?...answer=no...select_ops_upfront',
'test9-i29e35hp2...goal=C6...name=Sudoku Test #07...question=Is C6 equal to A2 or A3?...answer=yes...select_ops_upfront',
# Naked Pairs 2
'test7-i26e36hp10...name=Sudoku Test #11...goal=C6...question=Is C6 greater than 5?...answer=no...select_ops_upfront',
'test10-i29e35hp7...goal=F6...name=Sudoku Test #14...question=Is F6 5?...answer=no...select_ops_upfront',
'test14-i24e38np3...goal=B2...name=Sudoku Test #15...question=Is B2 a perfect square (1, 4, or 9)?...answer=no...select_ops_upfront',
# Y Wings 2
'test29-i27e36yw1...name=Sudoku Test #16...goal=H9...question=Is H9 3?...answer=yes...select_ops_upfront',
'box_line_reduction...goal=C3...name=Sudoku Test #20...question=Is C3 greater than 4?...answer=no...select_ops_upfront',
]
},
'logical_operators_mturk_option1_always_select': {
'puzzles': [
# Inclusion 1
'medium1...goal=I3...name=Sudoku Test #01...question=Is I3 prime (2, 3, 5, or 7)?...answer=yes',
'naked_single_test...goal=E6...name=Sudoku Test #02...question=Is E6 less than 5?...answer=yes',
'test2-i24e40...goal=B2...name=Sudoku Test #03...question=Is B2 less than 6?...answer=no',
# Pointing Pairs 1
'test15-i28e34np3...goal=F9...name=Sudoku Test #08...question=Is F9 odd?...answer=yes',
'test13-i34e30np1...goal=A6...name=Sudoku Test #09...question=Is A6 5?...answer=no',
# Naked Pairs 1
'naked_pair_test_2...goal=B5...name=Sudoku Test #12...question=Is B5 greater than 5?...answer=yes',
'fiendish4...goal=A1...name=Sudoku Test #13...question=Is A1 greater than 5?...answer=yes',
# Y Wings 1
'test32-i25e38np2hp4yw1...goal=H3...name=Sudoku Test #17...question=Is H3 even?...answer=no',
'test28-i27e36yw1...goal=E8...name=Sudoku Test #19...question=Is E8 a perfect square (1, 4, or 9)?...answer=yes',
'test30-i29e34yw1...goal=G9...name=Sudoku Test #18...question=Is G9 odd?...answer=yes',
]
},
'logical_operators_mturk_option2_always_select': {
'puzzles': [
# Inclusion 2
'test3-i29e35...goal=E2...name=Sudoku Test #04...question=Is E2 6?...answer=no',
'test6-i26e38...goal=C5...name=Sudoku Test #05...question=Is C5 7?...answer=no',
# Pointing Pairs 2
'hard1...goal=B9...name=Sudoku Test #10...question=Is B9 greater than 3?...answer=yes',
'test8-i32e32hp2...goal=H2...name=Sudoku Test #06...question=Is H2 7?...answer=no',
'test9-i29e35hp2...goal=C6...name=Sudoku Test #07...question=Is C6 equal to A2 or A3?...answer=yes',
# Naked Pairs 2
'test7-i26e36hp10...name=Sudoku Test #11...goal=C6...question=Is C6 greater than 5?...answer=no',
'test10-i29e35hp7...goal=F6...name=Sudoku Test #14...question=Is F6 5?...answer=no',
'test14-i24e38np3...goal=B2...name=Sudoku Test #15...question=Is B2 a perfect square (1, 4, or 9)?...answer=no',
# Y Wings 2
'test29-i27e36yw1...name=Sudoku Test #16...goal=H9...question=Is H9 3?...answer=yes',
'box_line_reduction...goal=C3...name=Sudoku Test #20...question=Is C3 greater than 4?...answer=no',
]
},
'logical_operators_mturk_optionA_select_upfront': {
'puzzles': [
# Inclusion A
'medium1...goal=I3...name=Sudoku Test #01...question=Is I3 prime (2, 3, 5, or 7)?...answer=yes...select_ops_upfront',
# Pointing Pairs A
'test13-i34e30np1...goal=A6...name=Sudoku Test #09...question=Is A6 5?...answer=no...select_ops_upfront',
# Naked Pairs A
'fiendish4...goal=A1...name=Sudoku Test #13...question=Is A1 greater than 5?...answer=yes...select_ops_upfront',
# Y Wings A
'test28-i27e36yw1...goal=E8...name=Sudoku Test #19...question=Is E8 a perfect square (1, 4, or 9)?...answer=yes...select_ops_upfront',
'test30-i29e34yw1...goal=G9...name=Sudoku Test #18...question=Is G9 odd?...answer=yes...select_ops_upfront',
]
},
'logical_operators_mturk_optionB_select_upfront': {
'puzzles': [
# Inclusion B
'naked_single_test...goal=E6...name=Sudoku Test #02...question=Is E6 less than 5?...answer=yes...select_ops_upfront',
'test2-i24e40...goal=B2...name=Sudoku Test #03...question=Is B2 less than 6?...answer=no...select_ops_upfront',
# Pointing Pairs B
'test15-i28e34np3...goal=F9...name=Sudoku Test #08...question=Is F9 odd?...answer=yes...select_ops_upfront',
# Naked Pairs B
'naked_pair_test_2...goal=B5...name=Sudoku Test #12...question=Is B5 greater than 5?...answer=yes...select_ops_upfront',
# Y Wings B
'test32-i25e38np2hp4yw1...goal=H3...name=Sudoku Test #17...question=Is H3 even?...answer=no...select_ops_upfront',
]
},
'logical_operators_mturk_optionC_select_upfront': {
'puzzles': [
# Inclusion C
'test3-i29e35...goal=E2...name=Sudoku Test #04...question=Is E2 6?...answer=no...select_ops_upfront',
# Pointing Pairs C
'hard1...goal=B9...name=Sudoku Test #10...question=Is B9 greater than 3?...answer=yes...select_ops_upfront',
# Naked Pairs C
'test7-i26e36hp10...name=Sudoku Test #11...goal=C6...question=Is C6 greater than 5?...answer=no...select_ops_upfront',
'test14-i24e38np3...goal=B2...name=Sudoku Test #14...question=Is B2 a perfect square (1, 4, or 9)?...answer=no...select_ops_upfront',
# Y Wings C
'box_line_reduction...goal=C3...name=Sudoku Test #20...question=Is C3 greater than 4?...answer=no...select_ops_upfront',
]
},
'logical_operators_mturk_optionD_select_upfront': {
'puzzles': [
# Inclusion D
'test6-i26e38...goal=C5...name=Sudoku Test #05...question=Is C5 7?...answer=no...select_ops_upfront',
# Pointing Pairs D
'test8-i32e32hp2...goal=H2...name=Sudoku Test #06...question=Is H2 7?...answer=no...select_ops_upfront',
'test9-i29e35hp2...goal=C6...name=Sudoku Test #07...question=Is C6 equal to A2 or A3?...answer=yes...select_ops_upfront',
# Naked Pairs D
'test10-i29e35hp7...goal=F6...name=Sudoku Test #14...question=Is F6 5?...answer=no...select_ops_upfront',
# Y Wings D
'test29-i27e36yw1...name=Sudoku Test #16...goal=H9...question=Is H9 3?...answer=yes...select_ops_upfront',
]
},
'logical_operators_mturk_optionA_always_select': {
'puzzles': [
# Inclusion A
'medium1...goal=I3...name=Sudoku Test #01...question=Is I3 prime (2, 3, 5, or 7)?...answer=yes',
# Pointing Pairs A
'test13-i34e30np1...goal=A6...name=Sudoku Test #09...question=Is A6 5?...answer=no',
# Naked Pairs A
'fiendish4...goal=A1...name=Sudoku Test #13...question=Is A1 greater than 5?...answer=yes',
# Y Wings A
'test28-i27e36yw1...goal=E8...name=Sudoku Test #19...question=Is E8 a perfect square (1, 4, or 9)?...answer=yes',
'test30-i29e34yw1...goal=G9...name=Sudoku Test #18...question=Is G9 odd?...answer=yes',
]
},
'logical_operators_mturk_optionB_always_select': {
'puzzles': [
# Inclusion B
'naked_single_test...goal=E6...name=Sudoku Test #02...question=Is E6 less than 5?...answer=yes',
'test2-i24e40...goal=B2...name=Sudoku Test #03...question=Is B2 less than 6?...answer=no',
# Pointing Pairs B
'test15-i28e34np3...goal=F9...name=Sudoku Test #08...question=Is F9 odd?...answer=yes',
# Naked Pairs B
'naked_pair_test_2...goal=B5...name=Sudoku Test #12...question=Is B5 greater than 5?...answer=yes',
# Y Wings B
'test32-i25e38np2hp4yw1...goal=H3...name=Sudoku Test #17...question=Is H3 even?...answer=no',
]
},
'logical_operators_mturk_optionC_always_select': {
'puzzles': [
# Inclusion C
'test3-i29e35...goal=E2...name=Sudoku Test #04...question=Is E2 6?...answer=no',
# Pointing Pairs C
'hard1...goal=B9...name=Sudoku Test #10...question=Is B9 greater than 3?...answer=yes',
# Naked Pairs C
'test7-i26e36hp10...name=Sudoku Test #11...goal=C6...question=Is C6 greater than 5?...answer=no',
'test14-i24e38np3...goal=B2...name=Sudoku Test #14...question=Is B2 a perfect square (1, 4, or 9)?...answer=no',
# Y Wings C
'box_line_reduction...goal=C3...name=Sudoku Test #20...question=Is C3 greater than 4?...answer=no',
]
},
'logical_operators_mturk_optionD_always_select': {
'puzzles': [
# Inclusion D
'test6-i26e38...goal=C5...name=Sudoku Test #05...question=Is C5 7?...answer=no',
# Pointing Pairs D
'test8-i32e32hp2...goal=H2...name=Sudoku Test #06...question=Is H2 7?...answer=no',
'test9-i29e35hp2...goal=C6...name=Sudoku Test #07...question=Is C6 equal to A2 or A3?...answer=yes',
# Naked Pairs D
'test10-i29e35hp7...goal=F6...name=Sudoku Test #14...question=Is F6 5?...answer=no',
# Y Wings D
'test29-i27e36yw1...name=Sudoku Test #16...goal=H9...question=Is H9 3?...answer=yes',
]
},
'extra_games': {
'puzzles': [
# Exclusion only; resolved with anything
# These are un-checked by Shelley other than to confirm that they don't need any operators.
'easy1...goal=D2...name=No Logical Ops Required #1...question=Is D2 greater than 4?...answer=no',
'easy1...goal=D2...name=No Logical Ops Required #1...question=Is D2 greater than 4?...answer=no...select_ops_upfront',
'easy4...goal=A2...name=No Logical Ops Required #2...question=Is A2 odd?...answer=yes',
'easy4...goal=A2...name=No Logical Ops Required #2...question=Is A2 odd?...answer=yes...select_ops_upfront',
# May require intermediate operators.
'box_line_reduction_2...name=Extra Manipulations Required Beyond Logical Ops #1...goal=C5...question=Is C5 less than 5?...answer=yes',
'box_line_reduction_2...name=Extra Manipulations Required Beyond Logical Ops #1...goal=C5...question=Is C5 less than 5?...answer=yes...select_ops_upfront',
'hidden_pair_test_2...goal=F7...name=Extra Manipulations Required Beyond Logical Ops #2...question=Is F7 odd?...answer=yes',
'hidden_pair_test_2...goal=F7...name=Extra Manipulations Required Beyond Logical Ops #2...question=Is F7 odd?...answer=yes...select_ops_upfront',
'pointing_pair_test_2...goal=E7...name=Extra Manipulations Required Beyond Logical Ops #3...question=Is E7 8?...answer=no',
'pointing_pair_test_2...goal=E7...name=Extra Manipulations Required Beyond Logical Ops #3...question=Is E7 8?...answer=no...select_ops_upfront',
'pointing_pair_test...goal=H4...name=Extra Manipulations Required Beyond Logical Ops #4...question=Is H4 even?...answer=no',
'pointing_pair_test...goal=H4...name=Extra Manipulations Required Beyond Logical Ops #4...question=Is H4 even?...answer=no...select_ops_upfront',
'xwing_test...goal=E8...name=Extra Manipulations Required Beyond Logical Ops #5...question=Is E8 more than 5?...answer=no',
'xwing_test...goal=E8...name=Extra Manipulations Required Beyond Logical Ops #5...question=Is E8 more than 5?...answer=no...select_ops_upfront',
'hidden_triple_test...name=Extra Manipulations Required Beyond Logical Ops #6...goal=A9...question=Is A9 greater than 5?...answer=no',
'hidden_triple_test...name=Extra Manipulations Required Beyond Logical Ops #6...goal=A9...question=Is A9 greater than 5?...answer=no...select_ops_upfront',
'xwing_test...name=Extra Manipulations Required Beyond Logical Ops #7...goal=G6...question=Is G6 equal to A7 or A8 or A9?...answer=no',
'xwing_test...name=Extra Manipulations Required Beyond Logical Ops #7...goal=G6...question=Is G6 equal to A7 or A8 or A9?...answer=no...select_ops_upfront',
'naked_quad_test...goal=B2...name=Extra Manipulations Required Beyond Logical Ops #8...question=Is B2 a multiple of 3 (3 or 6 or 9)?...answer=yes',
'naked_quad_test...goal=B2...name=Extra Manipulations Required Beyond Logical Ops #8...question=Is B2 a multiple of 3 (3 or 6 or 9)?...answer=yes...select_ops_upfront',
# ...select_ops_upfront
# ...costly_ops': ['inclusion', 'pointingpairs', 'naked pairs', 'ywings']
]
}
}
|
"""
Andy Wilson, Michael Darling, David Stracuzzi, Shelley Leger
Sandia National Laboratories
February 25, 2020
Defines set of test sudoku problems to use to test the sudoku infrastructure
"""
puzzles = {'test2-i24e40': '300000700000001000000060000000700015400300000000000020610000800000540900002000000', 'test3-i29e35': '300000700000001000000060000000700015900500000000000020610000800000340900002000000', 'test4-i28e36': '300000700000001000000090000000700014800600000000000020610000800000540300002000000', 'test5-i23e41': '560000040000010700000000000000400060030000005018000000700604000200000100000000003', 'test6-i26e38': '560000040000010700000000000000800060030000005019000000700604000200000100000000003', 'test7-i26e36hp10': '010000200800300000000000500050000410000700060002008000900000073000050000000040000', 'test8-i32e32hp2': '010000208500406000000000000306000050000020700004000000020010000000300060800000000', 'test9-i29e35hp2': '083000200000091000000000000100000409020300000000070000007600500000800030900000000', 'test10-i29e35hp7': '000090750801000000000000000050000400000801000000600000470020000000100006300000080', 'test11-i36e28hp2': '000090800704000000100000000050480000000000010090000000200600500000107000000000308', 'test12-i36e28np1': '300000700000010400506000000000200035000000080000070000070600100040005000000300000', 'test13-i34e30np1': '100000300700600000000200000060030400025000000000000800007500002300080000000000010', 'test14-i24e38np3': '100000300800007000000200000027640000060500000000000100000000042300080000000000060', 'test15-i28e34np3': '100000305600900000000080200000760010020800000050000000400000700000001000000050000', 'test16-i26e36np3': '100000305800400000000070200000640080020700000050000000400000600000001000000050000', 'test17-i24e38np4hp4': '300000670000201000080000000000570800021000000400000000600030000000000042000000009', 'test18-i29e35np3hp4': '560000030000901000000000000809000010070060000000000000104800000000050607000000200', 'test19-i21e41np8hp3': '100000306070800000000000200000236000004000085000000000000500040390000000600000000', 'test20-i22e42np3hp7': '100000306500040000000010000000000051060000200030800000700000040000602000000300000', 'test21-i16e47np1hp2': '100000340406000800000900000800040000000700009000000000097000050000031000020000000', 'test22-i33e18nt1xw1': '000400067064200000007106042000860304401000700706940000170004000940000200000010400', 'test23-i16e32nt1xw1': '700000021500402000200807000021500000073200610045700230407000802302070100106020000', 'test24-i10e41nt2xw2': '000500061516020000970060000061400000000650910000000680100806000300000506600705108', 'test25-i16e32nt1xw1': '400000081300021000100700000048010000000060210016000000601000354700504108854136000', 'test26-i8e41pp1nt4xw2xyzw1': '000605021070302000020408000100960250032087400760020000200850000000700802600200000', 'test27-i32e31yw3': '560000040700003000000800000008000030090200000000040000600050100000000908000000200', 'test28-i27e36yw1': '205700000800050300000000000090000100000200000000000030030081000400000020000900007', 'test29-i27e36yw1': '700200050000030080100000000400060700060080000000000100039500000000700000080000000', 'test30-i29e34yw1': '080000670000310000000000000000200005240000000000000013501400000000007800300000000', 'test31-i36e27yw1': '080000670000510000000000000000200004230000000000000051405300000000007800100000000', 'test32-i25e38np2hp4yw1': '000200090010000030050008000200900000000400500000000100400006020000030700000010000', 'test33-i26e38np2hp3yw1': '042080000000000001080000000700103000000000480600000000150600000000000540000900000', 'test34-i26e38np2hp3yw1': '042080000000000001080000000700103000000000480900000000150600000000000540000700000', 'test35-i24e40np3hp2yw1': '000040380050070000010000000000502008600000700000100000000200010407000000300000000', 'test36-i30e33np2hp2yw1': '100036000020000840000000000603050000500700000000000020040800000000000503000200000', 'easy1': '..3.2.6..9..3.5..1..18.64....81.29..7.......8..67.82....26.95..8..2.3..9..5.1.3..', 'easy2': '......9.7...42.18....7.5.261..9.4....5.....4....5.7..992.1.8....34.59...5.7......', 'easy3': '...1254....84.....42.8......3.....95.6.9.2.1.51.....6......3.49.....72....1298...', 'easy4': '..61.24.......457..2.9.31.8.8...56.96...9...19.13...4.5.42.9.8..627.......85.13..', 'medium1': '...439...4..6..8..395.....472..8..9....217....3..9..282.....417..9..2..3...841...', 'hard1': '4.....8.5.3..........7......2.....6.....8.4......1.......6.3.7.5..2.....1.4......', 'hard4': '3..6.9.12..7.....6.2...1......74...3..29.65..1...23......8...9.5.....3..29.3.7..4', 'fiendish1': '.....5.8....6.1.43..........1.5........1.6...3.......553.....61........4.........', 'fiendish2': '85...24..72......9..4.........1.7..23.5...9...4...........8..7..17..........36.4.', 'fiendish4': '..32.4...24.5...7.......6..9..7..1...87...53...2..5..7..1.......3...6.98...8.23..', 'naked_single_test': '246.7..38...3.6.7437..4.6....8.2.7..1.......6..7.3.4....4.8..6986.4....791..6..42', 'naked_pair_test': '4.....938.32.941...953..24.37.6.9..4529..16736.47.3.9.957..83....39..4..24..3.7.9', 'naked_pair_test_2': '.8..9..3..3.....699.2.63158.2.8.459.8519.7.463946.587.563.4.9872......15.1..5..2.', 'hidden_pair_test': '.........9.46.7....768.41..3.97.1.8.7.8...3.1.513.87.2..75.261...54.32.8.........', 'hidden_pair_test_2': '72.4.8.3..8.....474.1.768.281.739......851......264.8.2.968.41334......8168943275', 'naked_triple_test': '.7.4.8.29..2.....4854.2...7..83742...2.........32617......936122.....4.313.642.7.', 'naked_triple_test_2': '294513..66..8423193..697254....56....4..8..6....47....73.164..59..735..14..928637', 'hidden_triple_test': '.....1.3.231.9.....65..31..6789243..1.3.5...6...1367....936.57...6.198433........', 'naked_quad_test': '....3..86....2..4..9..7852.3718562949..1423754..3976182..7.3859.392.54677..9.4132', 'pointing_pair_test': '.179.36......8....9.....5.7.72.1.43....4.2.7..6437.25.7.1....65....3......56.172.', 'pointing_pair_test_2': '.32..61..41..........9.1...5...9...4.6.....713...2...5...5.8.........519.57..986.', 'pointing_triple_test': '93..5....2..63..95856..2.....318.57...5.2.98..8...5......8..1595.821...4...56...8', 'box_line_reduction': '.16..78.3.9.8.....87...1.6..48...3..65...9.82.39...65..6.9...2..8...29369246..51.', 'box_line_reduction_2': '.2.9437159.4...6..75.....4.5..48....2.....4534..352....42....81..5..426..9.2.85.4', 'xwing_test': '1.....569492.561.8.561.924...964.8.1.64.1....218.356.4.4.5...169.5.614.2621.....5', 'ywing_test': '9..24.....5.69.231.2..5..9..9.7..32...29356.7.7...29...69.2..7351..79.622.7.86..9', 'underconstrained1': '.8...9743.5...8.1..1.......8....5......8.4......3....6.......7..3.5...8.9724...5.', 'insoluble_by_propagation': '..3.2.6..9..3.5..1..18.64....81.29..7.......8..67.82....26.95..8..2.3..9..5.1.8..', 'insoluble_by_initial_state_conflict': '..3.2.6..9..3.5..1..18.64....81.29..7.......8..67.82....26.95..8..2.3..9..5.1.6..'}
games = {'test_game1_6_operators_open': {'puzzles': ['test2-i24e40', 'easy1', 'xwing_test', 'hard4', 'underconstrained1', 'test7-i26e36hp10'], 'config_alterations': {}}, 'test_game1_6': {'puzzles': ['test2-i24e40', 'easy1', 'xwing_test', 'hard4', 'underconstrained1', 'test7-i26e36hp10'], 'config_alterations': {'randomly_apply': ['select_ops_upfront']}}, 'test_game1_4': {'puzzles': ['test2-i24e40', 'xwing_test', 'hard4', 'underconstrained1'], 'config_alterations': {'randomly_apply': ['select_ops_upfront']}}, 'test_game_ptgprs': {'puzzles': ['pointing_pair_test...goal=A9', 'pointing_pair_test...goal=E2', 'pointing_pair_test...goal=B1'], 'config_alterations': {'randomly_apply': ['select_ops_upfront']}}, 'pilot_test_a_board': {'puzzles': ['test7-i26e36hp10...goal=C6...name=Pilot Test Board...question=Can C6 be a 7?', 'test7-i26e36hp10...goal=C6...name=Pilot Test Board2...select_ops_upfront...question=Can C6 be odd?'], 'config_alterations': {'costly_ops': ['inclusion', 'pointingpairs', 'nakedpairs', 'xwings']}}, 'test_logical_operators_in_sequence': {'puzzles': ['test2-i24e40...name=Test Inclusion...goal=C6...question=Can C6 be 4?...answer=no', 'test9-i29e35hp2...name=Test Pointing Pairs...goal=C6...question=Can C6 equal A2 or A3?...answer=yes', 'test7-i26e36hp10...name=Test Naked Pairs...goal=C6...question=Can C6 be greater than 5?...answer=no', 'hidden_pair_test_2...name=Test Hidden Pairs...goal=F7...question=Can F7 be odd?...answer=yes', 'box_line_reduction_2...name=Test Pointing Triples...goal=C5...question=Can C5 be less than 5?...answer=yes', 'hidden_triple_test...name=Test Naked Triples...goal=A9...question=Can A9 be greater than 5?...answer=no', 'xwing_test...name=Test X-Wings...goal=G6...question=Can G6 equal A7 or A8 or A9?...answer=no', 'test29-i27e36yw1...name=Test Y-Wings...goal=E8...question=Can E9 be a square (1 or 4 or 9)?']}, 'training_games': {'puzzles': ['easy2...goal=E7...name=Training #1...question=Can E7 be 6?...answer=no', 'easy2...goal=E7...name=Training #1...question=Can E7 be 6?...answer=no...select_ops_upfront', 'test11-i36e28hp2...goal=B8...name=Training #2...question=Can B8 be odd?...answer=yes', 'test11-i36e28hp2...goal=B8...name=Training #2...question=Can B8 be odd?...answer=yes...select_ops_upfront', 'test16-i26e36np3...goal=F3...name=Training #3...question=Can F3 be 3 or 7?...answer=no', 'test16-i26e36np3...goal=F3...name=Training #3...question=Can F3 be 3 or 7?...answer=no...select_ops_upfront']}, 'training_games_select_ops_upfront': {'puzzles': ['easy2...goal=E7...name=Training #1...question=Can E7 be 6?...answer=no...select_ops_upfront', 'test11-i36e28hp2...goal=B8...name=Training #2...question=Can B8 be odd?...answer=yes...select_ops_upfront', 'test16-i26e36np3...goal=F3...name=Training #3...question=Can F3 be 3 or 7?...answer=no...select_ops_upfront']}, 'training_games_always_select': {'puzzles': ['easy2...goal=E7...name=Training #1...question=Can E7 be 6?...answer=no', 'test11-i36e28hp2...goal=B8...name=Training #2...question=Can B8 be odd?...answer=yes', 'test16-i26e36np3...goal=F3...name=Training #3...question=Can F3 be 3 or 7?...answer=no']}, 'training_games1_select_ops_upfront': {'puzzles': ['easy2...goal=E7...name=Training #1...question=Can E7 be 6?...answer=no...select_ops_upfront']}, 'training_game2_select_ops_upfront': {'puzzles': ['test11-i36e28hp2...goal=B8...name=Training #2...question=Can B8 be odd?...answer=yes...select_ops_upfront']}, 'training_games3_select_ops_upfront': {'puzzles': ['test16-i26e36np3...goal=F3...name=Training #3...question=Can F3 be 3 or 7?...answer=no...select_ops_upfront']}, 'training_games1_always_select': {'puzzles': ['easy2...goal=E7...name=Training #1...question=Can E7 be 6?...answer=no']}, 'training_game2_always_select': {'puzzles': ['test11-i36e28hp2...goal=B8...name=Training #2...question=Can B8 be odd?...answer=yes']}, 'training_games3_always_select': {'puzzles': ['test16-i26e36np3...goal=F3...name=Training #3...question=Can F3 be 3 or 7?...answer=no']}, 'weedout_games': {'puzzles': ['test36-i30e33np2hp2yw1...goal=F7...name=WeedOut #1...question=Can F7 be 1, 6, or 7?...answer=yes', 'test36-i30e33np2hp2yw1...goal=F7...name=WeedOut #1...question=Can F7 be 1, 6, or 7?...answer=yes...select_ops_upfront', 'test4-i28e36...goal=B1...name=WeedOut #2...question=Can B1 be greater than 5?...answer=no', 'test4-i28e36...goal=B1...name=WeedOut #2...question=Can B1 be greater than 5?...answer=no...select_ops_upfront', 'test22-i33e18nt1xw1...goal=A2...name=WeedOut #3...question=Can A2 be 3?...answer=no', 'test22-i33e18nt1xw1...goal=A2...name=WeedOut #3...question=Can A2 be 3?...answer=no...select_ops_upfront']}, 'weedout_games_always_select': {'puzzles': ['test36-i30e33np2hp2yw1...goal=F7...name=WeedOut #1...question=Can F7 be 1, 6, or 7?...answer=yes', 'test4-i28e36...goal=B1...name=WeedOut #2...question=Can B1 be greater than 5?...answer=no', 'test22-i33e18nt1xw1...goal=A2...name=WeedOut #3...question=Can A2 be 3?...answer=no']}, 'weedout_games_select_ops_upfront': {'puzzles': ['test36-i30e33np2hp2yw1...goal=F7...name=WeedOut #1...question=Can F7 be 1, 6, or 7?...answer=yes...select_ops_upfront', 'test4-i28e36...goal=B1...name=WeedOut #2...question=Can B1 be greater than 5?...answer=no...select_ops_upfront', 'test22-i33e18nt1xw1...goal=A2...name=WeedOut #3...question=Can A2 be 3?...answer=no...select_ops_upfront']}, 'weedout_games1_select_ops_upfront': {'puzzles': ['test36-i30e33np2hp2yw1...goal=F7...name=WeedOut #1...question=Can F7 be 1, 6, or 7?...answer=yes...select_ops_upfront']}, 'weedout_games2_select_ops_upfront': {'puzzles': ['test4-i28e36...goal=B1...name=WeedOut #2...question=Can B1 be greater than 5?...answer=no...select_ops_upfront']}, 'weedout_games3_select_ops_upfront': {'puzzles': ['test22-i33e18nt1xw1...goal=A2...name=WeedOut #3...question=Can A2 be 3?...answer=no...select_ops_upfront']}, 'weedout_games1_always_select': {'puzzles': ['test36-i30e33np2hp2yw1...goal=F7...name=WeedOut #1...question=Can F7 be 1, 6, or 7?...answer=yes']}, 'weedout_games2_always_select': {'puzzles': ['test4-i28e36...goal=B1...name=WeedOut #2...question=Can B1 be greater than 5?...answer=no']}, 'weedout_games3_always_select': {'puzzles': ['test22-i33e18nt1xw1...goal=A2...name=WeedOut #3...question=Can A2 be 3?...answer=no']}, 'logical_operators_mturk_test_suite': {'puzzles': ['medium1...goal=I3...name=Sudoku Test #01...question=Is I3 prime (2, 3, 5, or 7)?...answer=yes', 'medium1...goal=I3...name=Sudoku Test #01...question=Is I3 prime (2, 3, 5, or 7)?...answer=yes...select_ops_upfront', 'naked_single_test...goal=E6...name=Sudoku Test #02...question=Is E6 less than 5?...answer=yes', 'naked_single_test...goal=E6...name=Sudoku Test #02...question=Is E6 less than 5?...answer=yes...select_ops_upfront', 'test2-i24e40...goal=B2...name=Sudoku Test #03...question=Is B2 less than 6?...answer=no', 'test2-i24e40...goal=B2...name=Sudoku Test #03...question=Is B2 less than 6?...answer=no...select_ops_upfront', 'test3-i29e35...goal=E2...name=Sudoku Test #04...question=Is E2 6?...answer=no', 'test3-i29e35...goal=E2...name=Sudoku Test #04...question=Is E2 6?...answer=no...select_ops_upfront', 'test6-i26e38...goal=C5...name=Sudoku Test #05...question=Is C5 7?...answer=no', 'test6-i26e38...goal=C5...name=Sudoku Test #05...question=Is C5 7?...answer=no...select_ops_upfront', 'test8-i32e32hp2...goal=H2...name=Sudoku Test #06...question=Is H2 7?...answer=no', 'test8-i32e32hp2...goal=H2...name=Sudoku Test #06...question=Is H2 7?...answer=no...select_ops_upfront', 'test9-i29e35hp2...goal=C6...name=Sudoku Test #07...question=Is C6 equal to A2 or A3?...answer=yes', 'test9-i29e35hp2...goal=C6...name=Sudoku Test #07...question=Is C6 equal to A2 or A3?...answer=yes...select_ops_upfront', 'test15-i28e34np3...goal=F9...name=Sudoku Test #08...question=Is F9 odd?...answer=yes', 'test15-i28e34np3...goal=F9...name=Sudoku Test #08...question=Is F9 odd?...answer=yes...select_ops_upfront', 'test13-i34e30np1...goal=A6...name=Sudoku Test #09...question=Is A6 5?...answer=no', 'test13-i34e30np1...goal=A6...name=Sudoku Test #09...question=Is A6 5?...answer=no...select_ops_upfront', 'hard1...goal=B9...name=Sudoku Test #10...question=Is B9 greater than 3?...answer=yes', 'hard1...goal=B9...name=Sudoku Test #10...question=Is B9 greater than 3?...answer=yes...select_ops_upfront', 'test7-i26e36hp10...name=Sudoku Test #11...goal=C6...question=Is C6 greater than 5?...answer=no', 'test7-i26e36hp10...name=Sudoku Test #11...goal=C6...question=Is C6 greater than 5?...answer=no...select_ops_upfront', 'naked_pair_test_2...goal=B5...name=Sudoku Test #12...question=Is B5 greater than 5?...answer=yes', 'naked_pair_test_2...goal=B5...name=Sudoku Test #12...question=Is B5 greater than 5?...answer=yes...select_ops_upfront', 'fiendish4...goal=A1...name=Sudoku Test #13...question=Is A1 greater than 5?...answer=yes', 'fiendish4...goal=A1...name=Sudoku Test #13...question=Is A1 greater than 5?...answer=yes...select_ops_upfront', 'test10-i29e35hp7...goal=F6...name=Sudoku Test #14...question=Is F6 5?...answer=no', 'test10-i29e35hp7...goal=F6...name=Sudoku Test #14...question=Is F6 5?...answer=no...select_ops_upfront', 'test14-i24e38np3...goal=B2...name=Sudoku Test #15...question=Is B2 a perfect square (1, 4, or 9)?...answer=no', 'test14-i24e38np3...goal=B2...name=Sudoku Test #15...question=Is B2 a perfect square (1, 4, or 9)?...answer=no...select_ops_upfront', 'test29-i27e36yw1...name=Sudoku Test #16...goal=H9...question=Is H9 3?...answer=yes', 'test29-i27e36yw1...name=Sudoku Test #16...goal=H9...question=Is H9 3?...answer=yes...select_ops_upfront', 'test32-i25e38np2hp4yw1...goal=H3...name=Sudoku Test #17...question=Is H3 even?...answer=no', 'test32-i25e38np2hp4yw1...goal=H3...name=Sudoku Test #17...question=Is H3 even?...answer=no...select_ops_upfront', 'test30-i29e34yw1...goal=G9...name=Sudoku Test #18...question=Is G9 odd?...answer=yes', 'test30-i29e34yw1...goal=G9...name=Sudoku Test #18...question=Is G9 odd?...answer=yes...select_ops_upfront', 'test28-i27e36yw1...goal=E8...name=Sudoku Test #19...question=Is E8 a perfect square (1, 4, or 9)?...answer=yes', 'test28-i27e36yw1...goal=E8...name=Sudoku Test #19...question=Is E8 a perfect square (1, 4, or 9)?...answer=yes...select_ops_upfront', 'box_line_reduction...goal=C3...name=Sudoku Test #20...question=Is C3 greater than 4?...answer=no', 'box_line_reduction...goal=C3...name=Sudoku Test #20...question=Is C3 greater than 4?...answer=no...select_ops_upfront']}, 'logical_operators_mturk_option1_select_upfront': {'puzzles': ['medium1...goal=I3...name=Sudoku Test #01...question=Is I3 prime (2, 3, 5, or 7)?...answer=yes...select_ops_upfront', 'naked_single_test...goal=E6...name=Sudoku Test #02...question=Is E6 less than 5?...answer=yes...select_ops_upfront', 'test2-i24e40...goal=B2...name=Sudoku Test #03...question=Is B2 less than 6?...answer=no...select_ops_upfront', 'test15-i28e34np3...goal=F9...name=Sudoku Test #08...question=Is F9 odd?...answer=yes...select_ops_upfront', 'test13-i34e30np1...goal=A6...name=Sudoku Test #09...question=Is A6 5?...answer=no...select_ops_upfront', 'naked_pair_test_2...goal=B5...name=Sudoku Test #12...question=Is B5 greater than 5?...answer=yes...select_ops_upfront', 'fiendish4...goal=A1...name=Sudoku Test #13...question=Is A1 greater than 5?...answer=yes...select_ops_upfront', 'test32-i25e38np2hp4yw1...goal=H3...name=Sudoku Test #17...question=Is H3 even?...answer=no...select_ops_upfront', 'test28-i27e36yw1...goal=E8...name=Sudoku Test #19...question=Is E8 a perfect square (1, 4, or 9)?...answer=yes...select_ops_upfront', 'test30-i29e34yw1...goal=G9...name=Sudoku Test #18...question=Is G9 odd?...answer=yes...select_ops_upfront']}, 'logical_operators_mturk_option2_select_upfront': {'puzzles': ['test3-i29e35...goal=E2...name=Sudoku Test #04...question=Is E2 6?...answer=no...select_ops_upfront', 'test6-i26e38...goal=C5...name=Sudoku Test #05...question=Is C5 7?...answer=no...select_ops_upfront', 'hard1...goal=B9...name=Sudoku Test #10...question=Is B9 greater than 3?...answer=yes...select_ops_upfront', 'test8-i32e32hp2...goal=H2...name=Sudoku Test #06...question=Is H2 7?...answer=no...select_ops_upfront', 'test9-i29e35hp2...goal=C6...name=Sudoku Test #07...question=Is C6 equal to A2 or A3?...answer=yes...select_ops_upfront', 'test7-i26e36hp10...name=Sudoku Test #11...goal=C6...question=Is C6 greater than 5?...answer=no...select_ops_upfront', 'test10-i29e35hp7...goal=F6...name=Sudoku Test #14...question=Is F6 5?...answer=no...select_ops_upfront', 'test14-i24e38np3...goal=B2...name=Sudoku Test #15...question=Is B2 a perfect square (1, 4, or 9)?...answer=no...select_ops_upfront', 'test29-i27e36yw1...name=Sudoku Test #16...goal=H9...question=Is H9 3?...answer=yes...select_ops_upfront', 'box_line_reduction...goal=C3...name=Sudoku Test #20...question=Is C3 greater than 4?...answer=no...select_ops_upfront']}, 'logical_operators_mturk_option1_always_select': {'puzzles': ['medium1...goal=I3...name=Sudoku Test #01...question=Is I3 prime (2, 3, 5, or 7)?...answer=yes', 'naked_single_test...goal=E6...name=Sudoku Test #02...question=Is E6 less than 5?...answer=yes', 'test2-i24e40...goal=B2...name=Sudoku Test #03...question=Is B2 less than 6?...answer=no', 'test15-i28e34np3...goal=F9...name=Sudoku Test #08...question=Is F9 odd?...answer=yes', 'test13-i34e30np1...goal=A6...name=Sudoku Test #09...question=Is A6 5?...answer=no', 'naked_pair_test_2...goal=B5...name=Sudoku Test #12...question=Is B5 greater than 5?...answer=yes', 'fiendish4...goal=A1...name=Sudoku Test #13...question=Is A1 greater than 5?...answer=yes', 'test32-i25e38np2hp4yw1...goal=H3...name=Sudoku Test #17...question=Is H3 even?...answer=no', 'test28-i27e36yw1...goal=E8...name=Sudoku Test #19...question=Is E8 a perfect square (1, 4, or 9)?...answer=yes', 'test30-i29e34yw1...goal=G9...name=Sudoku Test #18...question=Is G9 odd?...answer=yes']}, 'logical_operators_mturk_option2_always_select': {'puzzles': ['test3-i29e35...goal=E2...name=Sudoku Test #04...question=Is E2 6?...answer=no', 'test6-i26e38...goal=C5...name=Sudoku Test #05...question=Is C5 7?...answer=no', 'hard1...goal=B9...name=Sudoku Test #10...question=Is B9 greater than 3?...answer=yes', 'test8-i32e32hp2...goal=H2...name=Sudoku Test #06...question=Is H2 7?...answer=no', 'test9-i29e35hp2...goal=C6...name=Sudoku Test #07...question=Is C6 equal to A2 or A3?...answer=yes', 'test7-i26e36hp10...name=Sudoku Test #11...goal=C6...question=Is C6 greater than 5?...answer=no', 'test10-i29e35hp7...goal=F6...name=Sudoku Test #14...question=Is F6 5?...answer=no', 'test14-i24e38np3...goal=B2...name=Sudoku Test #15...question=Is B2 a perfect square (1, 4, or 9)?...answer=no', 'test29-i27e36yw1...name=Sudoku Test #16...goal=H9...question=Is H9 3?...answer=yes', 'box_line_reduction...goal=C3...name=Sudoku Test #20...question=Is C3 greater than 4?...answer=no']}, 'logical_operators_mturk_optionA_select_upfront': {'puzzles': ['medium1...goal=I3...name=Sudoku Test #01...question=Is I3 prime (2, 3, 5, or 7)?...answer=yes...select_ops_upfront', 'test13-i34e30np1...goal=A6...name=Sudoku Test #09...question=Is A6 5?...answer=no...select_ops_upfront', 'fiendish4...goal=A1...name=Sudoku Test #13...question=Is A1 greater than 5?...answer=yes...select_ops_upfront', 'test28-i27e36yw1...goal=E8...name=Sudoku Test #19...question=Is E8 a perfect square (1, 4, or 9)?...answer=yes...select_ops_upfront', 'test30-i29e34yw1...goal=G9...name=Sudoku Test #18...question=Is G9 odd?...answer=yes...select_ops_upfront']}, 'logical_operators_mturk_optionB_select_upfront': {'puzzles': ['naked_single_test...goal=E6...name=Sudoku Test #02...question=Is E6 less than 5?...answer=yes...select_ops_upfront', 'test2-i24e40...goal=B2...name=Sudoku Test #03...question=Is B2 less than 6?...answer=no...select_ops_upfront', 'test15-i28e34np3...goal=F9...name=Sudoku Test #08...question=Is F9 odd?...answer=yes...select_ops_upfront', 'naked_pair_test_2...goal=B5...name=Sudoku Test #12...question=Is B5 greater than 5?...answer=yes...select_ops_upfront', 'test32-i25e38np2hp4yw1...goal=H3...name=Sudoku Test #17...question=Is H3 even?...answer=no...select_ops_upfront']}, 'logical_operators_mturk_optionC_select_upfront': {'puzzles': ['test3-i29e35...goal=E2...name=Sudoku Test #04...question=Is E2 6?...answer=no...select_ops_upfront', 'hard1...goal=B9...name=Sudoku Test #10...question=Is B9 greater than 3?...answer=yes...select_ops_upfront', 'test7-i26e36hp10...name=Sudoku Test #11...goal=C6...question=Is C6 greater than 5?...answer=no...select_ops_upfront', 'test14-i24e38np3...goal=B2...name=Sudoku Test #14...question=Is B2 a perfect square (1, 4, or 9)?...answer=no...select_ops_upfront', 'box_line_reduction...goal=C3...name=Sudoku Test #20...question=Is C3 greater than 4?...answer=no...select_ops_upfront']}, 'logical_operators_mturk_optionD_select_upfront': {'puzzles': ['test6-i26e38...goal=C5...name=Sudoku Test #05...question=Is C5 7?...answer=no...select_ops_upfront', 'test8-i32e32hp2...goal=H2...name=Sudoku Test #06...question=Is H2 7?...answer=no...select_ops_upfront', 'test9-i29e35hp2...goal=C6...name=Sudoku Test #07...question=Is C6 equal to A2 or A3?...answer=yes...select_ops_upfront', 'test10-i29e35hp7...goal=F6...name=Sudoku Test #14...question=Is F6 5?...answer=no...select_ops_upfront', 'test29-i27e36yw1...name=Sudoku Test #16...goal=H9...question=Is H9 3?...answer=yes...select_ops_upfront']}, 'logical_operators_mturk_optionA_always_select': {'puzzles': ['medium1...goal=I3...name=Sudoku Test #01...question=Is I3 prime (2, 3, 5, or 7)?...answer=yes', 'test13-i34e30np1...goal=A6...name=Sudoku Test #09...question=Is A6 5?...answer=no', 'fiendish4...goal=A1...name=Sudoku Test #13...question=Is A1 greater than 5?...answer=yes', 'test28-i27e36yw1...goal=E8...name=Sudoku Test #19...question=Is E8 a perfect square (1, 4, or 9)?...answer=yes', 'test30-i29e34yw1...goal=G9...name=Sudoku Test #18...question=Is G9 odd?...answer=yes']}, 'logical_operators_mturk_optionB_always_select': {'puzzles': ['naked_single_test...goal=E6...name=Sudoku Test #02...question=Is E6 less than 5?...answer=yes', 'test2-i24e40...goal=B2...name=Sudoku Test #03...question=Is B2 less than 6?...answer=no', 'test15-i28e34np3...goal=F9...name=Sudoku Test #08...question=Is F9 odd?...answer=yes', 'naked_pair_test_2...goal=B5...name=Sudoku Test #12...question=Is B5 greater than 5?...answer=yes', 'test32-i25e38np2hp4yw1...goal=H3...name=Sudoku Test #17...question=Is H3 even?...answer=no']}, 'logical_operators_mturk_optionC_always_select': {'puzzles': ['test3-i29e35...goal=E2...name=Sudoku Test #04...question=Is E2 6?...answer=no', 'hard1...goal=B9...name=Sudoku Test #10...question=Is B9 greater than 3?...answer=yes', 'test7-i26e36hp10...name=Sudoku Test #11...goal=C6...question=Is C6 greater than 5?...answer=no', 'test14-i24e38np3...goal=B2...name=Sudoku Test #14...question=Is B2 a perfect square (1, 4, or 9)?...answer=no', 'box_line_reduction...goal=C3...name=Sudoku Test #20...question=Is C3 greater than 4?...answer=no']}, 'logical_operators_mturk_optionD_always_select': {'puzzles': ['test6-i26e38...goal=C5...name=Sudoku Test #05...question=Is C5 7?...answer=no', 'test8-i32e32hp2...goal=H2...name=Sudoku Test #06...question=Is H2 7?...answer=no', 'test9-i29e35hp2...goal=C6...name=Sudoku Test #07...question=Is C6 equal to A2 or A3?...answer=yes', 'test10-i29e35hp7...goal=F6...name=Sudoku Test #14...question=Is F6 5?...answer=no', 'test29-i27e36yw1...name=Sudoku Test #16...goal=H9...question=Is H9 3?...answer=yes']}, 'extra_games': {'puzzles': ['easy1...goal=D2...name=No Logical Ops Required #1...question=Is D2 greater than 4?...answer=no', 'easy1...goal=D2...name=No Logical Ops Required #1...question=Is D2 greater than 4?...answer=no...select_ops_upfront', 'easy4...goal=A2...name=No Logical Ops Required #2...question=Is A2 odd?...answer=yes', 'easy4...goal=A2...name=No Logical Ops Required #2...question=Is A2 odd?...answer=yes...select_ops_upfront', 'box_line_reduction_2...name=Extra Manipulations Required Beyond Logical Ops #1...goal=C5...question=Is C5 less than 5?...answer=yes', 'box_line_reduction_2...name=Extra Manipulations Required Beyond Logical Ops #1...goal=C5...question=Is C5 less than 5?...answer=yes...select_ops_upfront', 'hidden_pair_test_2...goal=F7...name=Extra Manipulations Required Beyond Logical Ops #2...question=Is F7 odd?...answer=yes', 'hidden_pair_test_2...goal=F7...name=Extra Manipulations Required Beyond Logical Ops #2...question=Is F7 odd?...answer=yes...select_ops_upfront', 'pointing_pair_test_2...goal=E7...name=Extra Manipulations Required Beyond Logical Ops #3...question=Is E7 8?...answer=no', 'pointing_pair_test_2...goal=E7...name=Extra Manipulations Required Beyond Logical Ops #3...question=Is E7 8?...answer=no...select_ops_upfront', 'pointing_pair_test...goal=H4...name=Extra Manipulations Required Beyond Logical Ops #4...question=Is H4 even?...answer=no', 'pointing_pair_test...goal=H4...name=Extra Manipulations Required Beyond Logical Ops #4...question=Is H4 even?...answer=no...select_ops_upfront', 'xwing_test...goal=E8...name=Extra Manipulations Required Beyond Logical Ops #5...question=Is E8 more than 5?...answer=no', 'xwing_test...goal=E8...name=Extra Manipulations Required Beyond Logical Ops #5...question=Is E8 more than 5?...answer=no...select_ops_upfront', 'hidden_triple_test...name=Extra Manipulations Required Beyond Logical Ops #6...goal=A9...question=Is A9 greater than 5?...answer=no', 'hidden_triple_test...name=Extra Manipulations Required Beyond Logical Ops #6...goal=A9...question=Is A9 greater than 5?...answer=no...select_ops_upfront', 'xwing_test...name=Extra Manipulations Required Beyond Logical Ops #7...goal=G6...question=Is G6 equal to A7 or A8 or A9?...answer=no', 'xwing_test...name=Extra Manipulations Required Beyond Logical Ops #7...goal=G6...question=Is G6 equal to A7 or A8 or A9?...answer=no...select_ops_upfront', 'naked_quad_test...goal=B2...name=Extra Manipulations Required Beyond Logical Ops #8...question=Is B2 a multiple of 3 (3 or 6 or 9)?...answer=yes', 'naked_quad_test...goal=B2...name=Extra Manipulations Required Beyond Logical Ops #8...question=Is B2 a multiple of 3 (3 or 6 or 9)?...answer=yes...select_ops_upfront']}}
|
# Part 2 on day 2 on advent of code
#
# Tyler Stuessi
def get_bathroom_code():
# get input
code = ""
keypaths = []
try:
while True:
raw = input()
keypaths.append(raw)
except EOFError:
pass
# hard code the grid
grid = [["0", "0", "1", "0", "0"],
["0", "2", "3", "4", "0"],
["5", "6", "7", "8", "9"],
["0", "A", "B", "C", "0"],
["0", "0", "D", "0", "0"]]
row = 2
col = 2
for path in keypaths:
for c in path:
if c == "L" and col != 0 and grid[row][col-1] != "0":
col -= 1
elif c == "U" and row != 0 and grid[row-1][col] != "0":
row -= 1
elif c == "D" and row != len(grid)-1 and grid[row+1][col] != "0":
row += 1
elif c == "R" and col != len(grid[row])-1 and grid[row][col+1] != "0":
col += 1
code += grid[row][col]
return code
if __name__ == "__main__":
print(get_bathroom_code())
|
def get_bathroom_code():
code = ''
keypaths = []
try:
while True:
raw = input()
keypaths.append(raw)
except EOFError:
pass
grid = [['0', '0', '1', '0', '0'], ['0', '2', '3', '4', '0'], ['5', '6', '7', '8', '9'], ['0', 'A', 'B', 'C', '0'], ['0', '0', 'D', '0', '0']]
row = 2
col = 2
for path in keypaths:
for c in path:
if c == 'L' and col != 0 and (grid[row][col - 1] != '0'):
col -= 1
elif c == 'U' and row != 0 and (grid[row - 1][col] != '0'):
row -= 1
elif c == 'D' and row != len(grid) - 1 and (grid[row + 1][col] != '0'):
row += 1
elif c == 'R' and col != len(grid[row]) - 1 and (grid[row][col + 1] != '0'):
col += 1
code += grid[row][col]
return code
if __name__ == '__main__':
print(get_bathroom_code())
|
def fizz_buzz(input):
result = []
for x in range(1, input + 1):
value = ''
if x % 3 == 0:
value += 'Fizz'
if x % 5 == 0:
value += 'Buzz'
value = value or x
result.append(value)
return result
|
def fizz_buzz(input):
result = []
for x in range(1, input + 1):
value = ''
if x % 3 == 0:
value += 'Fizz'
if x % 5 == 0:
value += 'Buzz'
value = value or x
result.append(value)
return result
|
# This sample tests annotated types on global variables.
# This should generate an error because the declared
# type below does not match the assigned type.
glob_var1 = 4
# This should generate an error because the declared
# type doesn't match the later declared type.
glob_var1 = Exception() # type: str
glob_var1 = Exception() # type: Exception
# This should generate an error because the assigned
# type doesn't match the declared type.
glob_var1 = "hello" # type: Exception
# This should generate an error.
glob_var2 = 5
def func1():
global glob_var1
global glob_var2
# This should generate an error.
glob_var1 = 3
glob_var2 = "hello" # type: str
|
glob_var1 = 4
glob_var1 = exception()
glob_var1 = exception()
glob_var1 = 'hello'
glob_var2 = 5
def func1():
global glob_var1
global glob_var2
glob_var1 = 3
glob_var2 = 'hello'
|
"""
Mock for the figures.permissions model.
"""
def is_active_staff_or_superuser(request):
"""
Exact copy of Figures=0.4.x `figures.permissions.is_active_staff_or_superuser` helper.
"""
return request.user and request.user.is_active and (
request.user.is_staff or request.user.is_superuser)
|
"""
Mock for the figures.permissions model.
"""
def is_active_staff_or_superuser(request):
"""
Exact copy of Figures=0.4.x `figures.permissions.is_active_staff_or_superuser` helper.
"""
return request.user and request.user.is_active and (request.user.is_staff or request.user.is_superuser)
|
"""ssd_classes.py
This file was modified from:
http://github.com/AastaNV/TRT_object_detection/blob/master/coco.py
"""
COCO_CLASSES_LIST = [
'background', # was 'unlabeled'
'person',
'bicycle',
'car',
'motorcycle',
'airplane',
'bus',
'train',
'truck',
'boat',
'traffic light',
'fire hydrant',
'street sign',
'stop sign',
'parking meter',
'bench',
'bird',
'cat',
'dog',
'horse',
'sheep',
'cow',
'elephant',
'bear',
'zebra',
'giraffe',
'hat',
'backpack',
'umbrella',
'shoe',
'eye glasses',
'handbag',
'tie',
'suitcase',
'frisbee',
'skis',
'snowboard',
'sports ball',
'kite',
'baseball bat',
'baseball glove',
'skateboard',
'surfboard',
'tennis racket',
'bottle',
'plate',
'wine glass',
'cup',
'fork',
'knife',
'spoon',
'bowl',
'banana',
'apple',
'sandwich',
'orange',
'broccoli',
'carrot',
'hot dog',
'pizza',
'donut',
'cake',
'chair',
'couch',
'potted plant',
'bed',
'mirror',
'dining table',
'window',
'desk',
'toilet',
'door',
'tv',
'laptop',
'mouse',
'remote',
'keyboard',
'cell phone',
'microwave',
'oven',
'toaster',
'sink',
'refrigerator',
'blender',
'book',
'clock',
'vase',
'scissors',
'teddy bear',
'hair drier',
'toothbrush',
]
EGOHANDS_CLASSES_LIST = [
'background',
'hand',
]
def get_cls_dict(model):
"""Get the class ID to name translation dictionary."""
if model == 'coco':
cls_list = COCO_CLASSES_LIST
elif model == 'egohands':
cls_list = EGOHANDS_CLASSES_LIST
else:
raise ValueError('Bad model name')
return dict(enumerate(cls_list))
|
"""ssd_classes.py
This file was modified from:
http://github.com/AastaNV/TRT_object_detection/blob/master/coco.py
"""
coco_classes_list = ['background', 'person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'street sign', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe', 'hat', 'backpack', 'umbrella', 'shoe', 'eye glasses', 'handbag', 'tie', 'suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 'tennis racket', 'bottle', 'plate', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 'potted plant', 'bed', 'mirror', 'dining table', 'window', 'desk', 'toilet', 'door', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'blender', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush']
egohands_classes_list = ['background', 'hand']
def get_cls_dict(model):
"""Get the class ID to name translation dictionary."""
if model == 'coco':
cls_list = COCO_CLASSES_LIST
elif model == 'egohands':
cls_list = EGOHANDS_CLASSES_LIST
else:
raise value_error('Bad model name')
return dict(enumerate(cls_list))
|
"""Write a HashTable class that stores strings
in a hash table, where keys are calculated
using the first two letters of the string."""
class HashTable(object):
def __init__(self):
self.table = [None] * 10000
def store(self, string):
"""Input a string that's stored in
the table."""
hash_value = self.calculate_hash_value(string)
if self.table[hash_value] is None:
self.table[hash_value] = [string]
else:
self.table[hash_value].append(string)
def lookup(self, string):
"""Return the hash value if the
string is already in the table.
Return -1 otherwise."""
hash_value = self.calculate_hash_value(string)
if self.table[hash_value] is not None:
if string in self.table[hash_value]:
return hash_value
return -1
@staticmethod
def calculate_hash_value(string):
"""Helper function to calulate a
hash value from a string."""
return (ord(string[0]) * 100) + ord(string[1])
# Setup
hash_table = HashTable()
# Test calculate_hash_value
# Should be 8568
print(hash_table.calculate_hash_value('UDACITY'))
# Test lookup edge case
# Should be -1
print(hash_table.lookup('UDACITY'))
# Test store
hash_table.store('UDACITY')
# Should be 8568
print(hash_table.lookup('UDACITY'))
# Test store edge case
hash_table.store('UDACIOUS')
# Should be 8568
print(hash_table.lookup('UDACIOUS'))
|
"""Write a HashTable class that stores strings
in a hash table, where keys are calculated
using the first two letters of the string."""
class Hashtable(object):
def __init__(self):
self.table = [None] * 10000
def store(self, string):
"""Input a string that's stored in
the table."""
hash_value = self.calculate_hash_value(string)
if self.table[hash_value] is None:
self.table[hash_value] = [string]
else:
self.table[hash_value].append(string)
def lookup(self, string):
"""Return the hash value if the
string is already in the table.
Return -1 otherwise."""
hash_value = self.calculate_hash_value(string)
if self.table[hash_value] is not None:
if string in self.table[hash_value]:
return hash_value
return -1
@staticmethod
def calculate_hash_value(string):
"""Helper function to calulate a
hash value from a string."""
return ord(string[0]) * 100 + ord(string[1])
hash_table = hash_table()
print(hash_table.calculate_hash_value('UDACITY'))
print(hash_table.lookup('UDACITY'))
hash_table.store('UDACITY')
print(hash_table.lookup('UDACITY'))
hash_table.store('UDACIOUS')
print(hash_table.lookup('UDACIOUS'))
|
N = int(input())
for i in range(1, N):
print(' ' * (N - i) + '*' * ((i * 2) - 1))
for i in range(N, 0, -1):
print(' ' * (N - i) + '*' * ((i * 2) - 1))
|
n = int(input())
for i in range(1, N):
print(' ' * (N - i) + '*' * (i * 2 - 1))
for i in range(N, 0, -1):
print(' ' * (N - i) + '*' * (i * 2 - 1))
|
#!/usr/bin/env python
__all__ = [
"test_misc",
"test_dictarray",
"test_table",
"test_transform",
"test_recode_alignment",
"test_union_dict",
]
__author__ = ""
__copyright__ = "Copyright 2007-2022, The Cogent Project"
__credits__ = [
"Jeremy Widmann",
"Sandra Smit",
"Gavin Huttley",
"Rob Knight",
"Zongzhi Liu",
"Amanda Birmingham",
"Greg Caporaso",
]
__license__ = "BSD-3"
__version__ = "2022.4.20a1"
__maintainer__ = "Gavin Huttley"
__email__ = "Gavin.Huttley@anu.edu.au"
__status__ = "Production"
|
__all__ = ['test_misc', 'test_dictarray', 'test_table', 'test_transform', 'test_recode_alignment', 'test_union_dict']
__author__ = ''
__copyright__ = 'Copyright 2007-2022, The Cogent Project'
__credits__ = ['Jeremy Widmann', 'Sandra Smit', 'Gavin Huttley', 'Rob Knight', 'Zongzhi Liu', 'Amanda Birmingham', 'Greg Caporaso']
__license__ = 'BSD-3'
__version__ = '2022.4.20a1'
__maintainer__ = 'Gavin Huttley'
__email__ = 'Gavin.Huttley@anu.edu.au'
__status__ = 'Production'
|
class Config(object):
DEBUG = False
TESTING = False
SECRET_KEY = "B\xb2?.\xdf\x9f\xa7m\xf8\x8a%,\xf7\xc4\xfa\x91"
MONGO_URI="mongodb://localhost:27017/test"
IMAGE_UPLOADS = "/home/username/projects/my_app/app/static/images/uploads"
SESSION_COOKIE_SECURE = False
class ProductionConfig(Config):
DEBUG = False
MONGO_URI="mongodb://localhost:27017/"
DB_NAME="test"
IMAGE_UPLOADS = "/home/username/projects/my_app/app/static/images/uploads"
SESSION_COOKIE_SECURE = True
class DevelopmentConfig(Config):
DEBUG = True
MONGO_URI="mongodb://localhost:27017/"
DB_NAME="test"
IMAGE_UPLOADS = "/home/username/projects/my_app/app/static/images/uploads"
SESSION_COOKIE_SECURE = False
class TestingConfig(Config):
TESTING = True
MONGO_URI="mongodb://localhost:27017/test"
IMAGE_UPLOADS = "/home/username/projects/my_app/app/static/images/uploads"
SESSION_COOKIE_SECURE = False
|
class Config(object):
debug = False
testing = False
secret_key = 'B²?.ß\x9f§mø\x8a%,÷Äú\x91'
mongo_uri = 'mongodb://localhost:27017/test'
image_uploads = '/home/username/projects/my_app/app/static/images/uploads'
session_cookie_secure = False
class Productionconfig(Config):
debug = False
mongo_uri = 'mongodb://localhost:27017/'
db_name = 'test'
image_uploads = '/home/username/projects/my_app/app/static/images/uploads'
session_cookie_secure = True
class Developmentconfig(Config):
debug = True
mongo_uri = 'mongodb://localhost:27017/'
db_name = 'test'
image_uploads = '/home/username/projects/my_app/app/static/images/uploads'
session_cookie_secure = False
class Testingconfig(Config):
testing = True
mongo_uri = 'mongodb://localhost:27017/test'
image_uploads = '/home/username/projects/my_app/app/static/images/uploads'
session_cookie_secure = False
|
# Real part of spherical harmonic Y_(4,2)(theta,phi)
def Y(l,m):
def g(theta,phi):
R = abs(fp.re(fp.spherharm(l,m,theta,phi)))
x = R*fp.cos(phi)*fp.sin(theta)
y = R*fp.sin(phi)*fp.sin(theta)
z = R*fp.cos(theta)
return [x,y,z]
return g
fp.splot(Y(4,2), [0,fp.pi], [0,2*fp.pi], points=300)
|
def y(l, m):
def g(theta, phi):
r = abs(fp.re(fp.spherharm(l, m, theta, phi)))
x = R * fp.cos(phi) * fp.sin(theta)
y = R * fp.sin(phi) * fp.sin(theta)
z = R * fp.cos(theta)
return [x, y, z]
return g
fp.splot(y(4, 2), [0, fp.pi], [0, 2 * fp.pi], points=300)
|
number = int(input())
if number % 2 == 1 or 6 <= number <= 20:
print('Weird')
elif 2 <= number <= 5 or number > 20:
print('Not Weird')
|
number = int(input())
if number % 2 == 1 or 6 <= number <= 20:
print('Weird')
elif 2 <= number <= 5 or number > 20:
print('Not Weird')
|
'''
Exercise 5:
Take the following Python code that stores a string:
str = 'X-DSPAM-Confidence:0.8475'
Use find and string slicing to extract the portion of the string\
after the colon character and then use the float function to
convert the extracted string into a floating point number.
'''
string = 'X-DSPAM-Confidence:0.8475'
num_index = string.find(':')
num_float = float(string[num_index+1:])
print(num_float, type(num_float))
|
"""
Exercise 5:
Take the following Python code that stores a string:
str = 'X-DSPAM-Confidence:0.8475'
Use find and string slicing to extract the portion of the string after the colon character and then use the float function to
convert the extracted string into a floating point number.
"""
string = 'X-DSPAM-Confidence:0.8475'
num_index = string.find(':')
num_float = float(string[num_index + 1:])
print(num_float, type(num_float))
|
#$Id$
class Category:
"""This class is used to create object for category."""
def __init__(self):
"""Initialize parameters for Category."""
self.id = ""
self.name = ""
def set_id(self, id):
"""Set id.
Args:
id(str): Id.
"""
self.id = id
def get_id(self):
"""Get id.
Returns:
str: Id.
"""
return self.id
def set_name(self, name):
"""Set name.
Args:
name(str): name.
"""
self.name = name
def get_name(self):
"""Get name.
Returns:
str: name.
"""
return self.name
|
class Category:
"""This class is used to create object for category."""
def __init__(self):
"""Initialize parameters for Category."""
self.id = ''
self.name = ''
def set_id(self, id):
"""Set id.
Args:
id(str): Id.
"""
self.id = id
def get_id(self):
"""Get id.
Returns:
str: Id.
"""
return self.id
def set_name(self, name):
"""Set name.
Args:
name(str): name.
"""
self.name = name
def get_name(self):
"""Get name.
Returns:
str: name.
"""
return self.name
|
class Song:
def __init__(self, name, length, single):
self.name = name
self.length = length
self.single = single
def get_info(self):
return f"{self.name} - {self.length}"
#Test code
# song = Song("Running in the 90s", 3.45, False)
# print(song.get_info())
|
class Song:
def __init__(self, name, length, single):
self.name = name
self.length = length
self.single = single
def get_info(self):
return f'{self.name} - {self.length}'
|
class MyCircularQueue:
def __init__(self, k: int):
self.q = [None] * k
self.maxlen = k
self.front = 0
self.rear = 0
def enQueue(self, value: int) -> bool:
if self.q[self.rear] is None:
self.q[self.rear] = value
self.rear = (self.rear + 1 ) % self.maxlen
return True
return False
def deQueue(self) -> bool:
if self.front == self.rear and self.q[self.front] is None:
return False
self.q[self.front] = None
self.front = (self.front +1) % self.maxlen
return True
def Front(self) -> int:
if self.q[self.front] is None:
return -1
return self.q[self.front]
def Rear(self) -> int:
if self.q[self.rear -1] is None:
return -1
return self.q[self.rear-1]
def isEmpty(self) -> bool:
if self.front == self.rear and self.q[self.rear] is None:
return True
return False
def isFull(self) -> bool:
if self.front == self.rear and self.q[self.rear] is not None:
return True
return False
# Your MyCircularQueue object will be instantiated and called as such:
# obj = MyCircularQueue(k)
# param_1 = obj.enQueue(value)
# param_2 = obj.deQueue()
# param_3 = obj.Front()
# param_4 = obj.Rear()
# param_5 = obj.isEmpty()
# param_6 = obj.isFull()
|
class Mycircularqueue:
def __init__(self, k: int):
self.q = [None] * k
self.maxlen = k
self.front = 0
self.rear = 0
def en_queue(self, value: int) -> bool:
if self.q[self.rear] is None:
self.q[self.rear] = value
self.rear = (self.rear + 1) % self.maxlen
return True
return False
def de_queue(self) -> bool:
if self.front == self.rear and self.q[self.front] is None:
return False
self.q[self.front] = None
self.front = (self.front + 1) % self.maxlen
return True
def front(self) -> int:
if self.q[self.front] is None:
return -1
return self.q[self.front]
def rear(self) -> int:
if self.q[self.rear - 1] is None:
return -1
return self.q[self.rear - 1]
def is_empty(self) -> bool:
if self.front == self.rear and self.q[self.rear] is None:
return True
return False
def is_full(self) -> bool:
if self.front == self.rear and self.q[self.rear] is not None:
return True
return False
|
load("//tools:defaults.bzl", "protractor_web_test_suite")
"""
Macro that can be used to define a e2e test in `modules/benchmarks`. Targets created through
this macro differentiate from a "benchmark_test" as they will run on CI and do not run
with `@angular/benchpress`.
"""
def e2e_test(name, server, **kwargs):
protractor_web_test_suite(
name = name,
on_prepare = "@npm//@angular/dev-infra-private/bazel/benchmark/component_benchmark:start-server.js",
server = server,
**kwargs
)
|
load('//tools:defaults.bzl', 'protractor_web_test_suite')
'\n Macro that can be used to define a e2e test in `modules/benchmarks`. Targets created through\n this macro differentiate from a "benchmark_test" as they will run on CI and do not run\n with `@angular/benchpress`.\n'
def e2e_test(name, server, **kwargs):
protractor_web_test_suite(name=name, on_prepare='@npm//@angular/dev-infra-private/bazel/benchmark/component_benchmark:start-server.js', server=server, **kwargs)
|
_base_ = [
'../_base_/models/lxmert/lxmert_pretrain_config.py',
'../_base_/datasets/lxmert/lxmert_pretrain.py',
'../_base_/default_runtime.py',
]
|
_base_ = ['../_base_/models/lxmert/lxmert_pretrain_config.py', '../_base_/datasets/lxmert/lxmert_pretrain.py', '../_base_/default_runtime.py']
|
def print_all_binary_strings(n):
helper(n, "")
print("-------------------")
def helper(n, s, lvl = 0):
space = (" " * lvl) + s
print(space)
if(len(s) == n):
print(s)
else:
helper(n, s + "0", lvl + 1)
helper(n, s + "1", lvl + 1)
print_all_binary_strings(1)
print_all_binary_strings(2)
print_all_binary_strings(3)
print_all_binary_strings(4)
|
def print_all_binary_strings(n):
helper(n, '')
print('-------------------')
def helper(n, s, lvl=0):
space = ' ' * lvl + s
print(space)
if len(s) == n:
print(s)
else:
helper(n, s + '0', lvl + 1)
helper(n, s + '1', lvl + 1)
print_all_binary_strings(1)
print_all_binary_strings(2)
print_all_binary_strings(3)
print_all_binary_strings(4)
|
# DEBUG FLAGS
TRAIN_JUST_ONE_BATCH = False
TRAIN_JUST_ONE_ROUND = False
PROFILE = False
CHECK_GRADS = False
# Basic
LEARNING_RATE_DEFAULT = 1e-2 # 0.01
MAX_EPOCHS_DEFAULT = 100
EVAL_FREQ_DEFAULT = 5
BATCH_SIZE_DEFAULT = 5
WORKERS_DEFAULT = 4
OPTIMIZER_DEFAULT = 'ADAM'
WEIGHT_DECAY_DEFAULT = 0.01
DATA_DIR_DEFAULT = 'data/EEG_age_data/'
LOG_DIR_DEFAULT = 'log/'
USE_GPU_DEFAULT = 1
GPU_ID_DEFAULT = 0
NETWORK_DEFAULT = 'BAPM'
NETWORKS = ['FeedForward', 'GRUNet', 'BAPM', 'BAPM1', 'BAPM2']
MODE_DEFAULT = 'train'
EVAL_DEFAULT = 'model_save/eval.pt' # should be a model file name
MODEL_SAVE_DIR_DEFAULT = 'model_save/'
MAX_NORM_DEFAULT = 10.0
NUM_HEADS_DEFAULT = 3
FEAT_DIM_DEFAULT = 1
HIDDEN_DIM_DEFAULT = 5
LOSS_FUNC_DEFAULT = 'SmoothL1Loss'
SMOOTH_L1_LOSS_BETA_DEFAULT = 1
FOLDS_DEFAULT = 5
VALID_K_DEFAULT = -1
# DIY
TOTAL_TIMESTAMPS = 245760
EEG_FREQUENCY = 1024
NUM_NODES = 63
NUM_SUBJECTS = 111
BAD_SUBJECT_IDS = [2, 14, 17, 18, 19, 20, 26, 35, 41, 64, 72] # Delete bad samples
SAMPLE_SPLIT_DEFAULT = 16
NUM_SAMPLES_DEFAULT = -1
STCNN_STRIDE_FACTOR_DEFAULT = 4
SHUFFLE_RANDOM_SEED = 666
CUSTOMIZE_GRAPH_DEFAULT = 0
|
train_just_one_batch = False
train_just_one_round = False
profile = False
check_grads = False
learning_rate_default = 0.01
max_epochs_default = 100
eval_freq_default = 5
batch_size_default = 5
workers_default = 4
optimizer_default = 'ADAM'
weight_decay_default = 0.01
data_dir_default = 'data/EEG_age_data/'
log_dir_default = 'log/'
use_gpu_default = 1
gpu_id_default = 0
network_default = 'BAPM'
networks = ['FeedForward', 'GRUNet', 'BAPM', 'BAPM1', 'BAPM2']
mode_default = 'train'
eval_default = 'model_save/eval.pt'
model_save_dir_default = 'model_save/'
max_norm_default = 10.0
num_heads_default = 3
feat_dim_default = 1
hidden_dim_default = 5
loss_func_default = 'SmoothL1Loss'
smooth_l1_loss_beta_default = 1
folds_default = 5
valid_k_default = -1
total_timestamps = 245760
eeg_frequency = 1024
num_nodes = 63
num_subjects = 111
bad_subject_ids = [2, 14, 17, 18, 19, 20, 26, 35, 41, 64, 72]
sample_split_default = 16
num_samples_default = -1
stcnn_stride_factor_default = 4
shuffle_random_seed = 666
customize_graph_default = 0
|
# The contents of this file has been derived code from the Twisted project
# (http://twistedmatrix.com/). The original author is Jp Calderone.
# Twisted project license follows:
# 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:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
class FolderNameError(ValueError):
pass
def encode(s):
if isinstance(s, str) and sum(n for n in (ord(c) for c in s) if n > 127):
raise FolderNameError("%r contains characters not valid in a str folder name. "
"Convert to unicode first?" % s)
r = []
_in = []
for c in s:
if ord(c) in (range(0x20, 0x26) + range(0x27, 0x7f)):
if _in:
r.extend(['&', modified_base64(''.join(_in)), '-'])
del _in[:]
r.append(str(c))
elif c == '&':
if _in:
r.extend(['&', modified_base64(''.join(_in)), '-'])
del _in[:]
r.append('&-')
else:
_in.append(c)
if _in:
r.extend(['&', modified_base64(''.join(_in)), '-'])
return ''.join(r)
def decode(s):
r = []
decode = []
for c in s:
if c == '&' and not decode:
decode.append('&')
elif c == '-' and decode:
if len(decode) == 1:
r.append('&')
else:
r.append(modified_unbase64(''.join(decode[1:])))
decode = []
elif decode:
decode.append(c)
else:
r.append(c)
if decode:
r.append(modified_unbase64(''.join(decode[1:])))
out = ''.join(r)
if not isinstance(out, unicode):
out = unicode(out, 'latin-1')
return out
def modified_base64(s):
s_utf7 = s.encode('utf-7')
return s_utf7[1:-1].replace('/', ',')
def modified_unbase64(s):
s_utf7 = '+' + s.replace(',', '/') + '-'
return s_utf7.decode('utf-7')
|
class Foldernameerror(ValueError):
pass
def encode(s):
if isinstance(s, str) and sum((n for n in (ord(c) for c in s) if n > 127)):
raise folder_name_error('%r contains characters not valid in a str folder name. Convert to unicode first?' % s)
r = []
_in = []
for c in s:
if ord(c) in range(32, 38) + range(39, 127):
if _in:
r.extend(['&', modified_base64(''.join(_in)), '-'])
del _in[:]
r.append(str(c))
elif c == '&':
if _in:
r.extend(['&', modified_base64(''.join(_in)), '-'])
del _in[:]
r.append('&-')
else:
_in.append(c)
if _in:
r.extend(['&', modified_base64(''.join(_in)), '-'])
return ''.join(r)
def decode(s):
r = []
decode = []
for c in s:
if c == '&' and (not decode):
decode.append('&')
elif c == '-' and decode:
if len(decode) == 1:
r.append('&')
else:
r.append(modified_unbase64(''.join(decode[1:])))
decode = []
elif decode:
decode.append(c)
else:
r.append(c)
if decode:
r.append(modified_unbase64(''.join(decode[1:])))
out = ''.join(r)
if not isinstance(out, unicode):
out = unicode(out, 'latin-1')
return out
def modified_base64(s):
s_utf7 = s.encode('utf-7')
return s_utf7[1:-1].replace('/', ',')
def modified_unbase64(s):
s_utf7 = '+' + s.replace(',', '/') + '-'
return s_utf7.decode('utf-7')
|
# debug
DEBUG = False
|
debug = False
|
'''1. Write a Python function that takes a sequence of numbers and determines whether
all the numbers are different from each other.'''
def unique(string):
if len(string) == len(set(string)):
ans = 'True'
else:
ans = 'False'
return ans
print(unique((1, 2, 3, 4)))
print(unique((1, 3, 3, 4)))
|
"""1. Write a Python function that takes a sequence of numbers and determines whether
all the numbers are different from each other."""
def unique(string):
if len(string) == len(set(string)):
ans = 'True'
else:
ans = 'False'
return ans
print(unique((1, 2, 3, 4)))
print(unique((1, 3, 3, 4)))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.