Best Python code snippet using slash
get_gallery_image.py
Source:get_gallery_image.py
...119 """120 return pulumi.get(self, "is_enabled")121 @property122 @pulumi.getter(name="isOverride")123 def is_override(self) -> Optional[bool]:124 """125 Indicates whether this gallery has been overridden for this lab account126 """127 return pulumi.get(self, "is_override")128 @property129 @pulumi.getter(name="isPlanAuthorized")130 def is_plan_authorized(self) -> Optional[bool]:131 """132 Indicates if the plan has been authorized for programmatic deployment.133 """134 return pulumi.get(self, "is_plan_authorized")135 @property136 @pulumi.getter(name="latestOperationResult")137 def latest_operation_result(self) -> 'outputs.LatestOperationResultResponse':...
state_config.py
Source:state_config.py
1from dataclasses import dataclass2from pollaris.app.views.utils import VoteType3# Fill in with spreadsheet of override data4SUPER_TUESDAY_OVERRIDES_GSHEET = ""5@dataclass6class FieldMap:7 """Spreadsheet header names for the state's spreadsheet"""8 van_precinct_id: str9 precinct_code: str10 county: str11 location_name: str12 street_address: str13 city: str14 zip: str15 dates_hours: str16 latitude: str = ""17 longitude: str = ""18 fips: str = ""19 location_id: str = ""20@dataclass21class StateInfo:22 """Info about the state's spreadsheet"""23 state_code: str24 gsheet_id: str25 worksheet_id: str26 field_mapping: FieldMap27 header_row: int = 2 # Row number of the header row28 is_override: bool = False29 vote_type: VoteType = VoteType.REGULAR_VOTE # Regular vs. early polling locations30GENERIC_PRECINCT_MAPPING = FieldMap(31 van_precinct_id="van_precinct_id",32 precinct_code="precinct_code",33 county="county",34 fips="fips",35 location_name="location_name",36 street_address="street_address",37 city="city",38 zip="zip",39 dates_hours="dates_hours",40 latitude="latitude",41 longitude="longitude",42 # Since there's no given location ID, use van precinct ID43 location_id="van_precinct_id",44)45OVERRIDE_MAPPING = FieldMap(46 van_precinct_id="van_precinct_id",47 precinct_code="precinct_code",48 county="county",49 fips="fips",50 location_name="location_name",51 street_address="street_address",52 city="city",53 zip="zip",54 dates_hours="dates_hours",55 latitude="latitude",56 longitude="longitude",57 location_id="location_id",58)59STATE_IMPORT_MAP = dict(60 # Full state creations61 MA_VAN=StateInfo(62 state_code="MA",63 gsheet_id="1lG9sO_5-A92Lz2yZ23wIEoY10vpCJZbetGJNzFZR5DU",64 worksheet_id="1147111917",65 field_mapping=GENERIC_PRECINCT_MAPPING,66 ),67 # Super Tuesday overrides -- by precinct68 AR=StateInfo(69 state_code="AR",70 gsheet_id=SUPER_TUESDAY_OVERRIDES_GSHEET,71 worksheet_id="2004775103",72 field_mapping=OVERRIDE_MAPPING,73 is_override=True,74 ),75 MA=StateInfo(76 state_code="MA",77 gsheet_id=SUPER_TUESDAY_OVERRIDES_GSHEET,78 worksheet_id="1794055790",79 field_mapping=OVERRIDE_MAPPING,80 is_override=True,81 ),82 ME=StateInfo(83 state_code="ME",84 gsheet_id=SUPER_TUESDAY_OVERRIDES_GSHEET,85 worksheet_id="58752002",86 field_mapping=OVERRIDE_MAPPING,87 is_override=True,88 ),89 MN=StateInfo(90 state_code="MN",91 gsheet_id=SUPER_TUESDAY_OVERRIDES_GSHEET,92 worksheet_id="36556781",93 field_mapping=OVERRIDE_MAPPING,94 is_override=True,95 ),96 NC=StateInfo(97 state_code="NC",98 gsheet_id=SUPER_TUESDAY_OVERRIDES_GSHEET,99 worksheet_id="1588697584",100 field_mapping=OVERRIDE_MAPPING,101 is_override=True,102 ),103 OK=StateInfo(104 state_code="OK",105 gsheet_id=SUPER_TUESDAY_OVERRIDES_GSHEET,106 worksheet_id="1147111917",107 field_mapping=OVERRIDE_MAPPING,108 is_override=True,109 ),110 TN=StateInfo(111 state_code="TN",112 gsheet_id=SUPER_TUESDAY_OVERRIDES_GSHEET,113 worksheet_id="2138641570",114 field_mapping=OVERRIDE_MAPPING,115 is_override=True,116 ),117 VA=StateInfo(118 state_code="VA",119 gsheet_id=SUPER_TUESDAY_OVERRIDES_GSHEET,120 worksheet_id="0",121 field_mapping=OVERRIDE_MAPPING,122 is_override=True,123 ),124 VT=StateInfo(125 state_code="VT",126 gsheet_id=SUPER_TUESDAY_OVERRIDES_GSHEET,127 worksheet_id="123451854",128 field_mapping=OVERRIDE_MAPPING,129 is_override=True,130 ),131 # Super Tuesday overrides - by location_id (for states with multiple locations per precinct)132 CA=StateInfo(133 state_code="CA",134 gsheet_id=SUPER_TUESDAY_OVERRIDES_GSHEET,135 worksheet_id="501646843",136 field_mapping=OVERRIDE_MAPPING,137 is_override=True,138 ),139 CO=StateInfo(140 state_code="CO",141 gsheet_id=SUPER_TUESDAY_OVERRIDES_GSHEET,142 worksheet_id="179131591",143 field_mapping=OVERRIDE_MAPPING,144 is_override=True,145 ),146 TX=StateInfo(147 state_code="TX",148 gsheet_id=SUPER_TUESDAY_OVERRIDES_GSHEET,149 worksheet_id="699997043",150 field_mapping=OVERRIDE_MAPPING,151 is_override=True,152 ),153 # Super Tuesday create rows154 AL=StateInfo(155 state_code="AL",156 gsheet_id=SUPER_TUESDAY_OVERRIDES_GSHEET,157 worksheet_id="1549361216",158 field_mapping=GENERIC_PRECINCT_MAPPING,159 ),160 UT=StateInfo(161 state_code="UT",162 gsheet_id=SUPER_TUESDAY_OVERRIDES_GSHEET,163 worksheet_id="387613178",164 field_mapping=GENERIC_PRECINCT_MAPPING,165 ),166)167FULL_IMPORTS = {168 key: state_info169 for (key, state_info) in STATE_IMPORT_MAP.items()170 if not state_info.is_override171}172OVERRIDES = {173 key: state_info174 for (key, state_info) in STATE_IMPORT_MAP.items()175 if state_info.is_override...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!