Skip to content

Commit cada838

Browse files
authored
Merge pull request #908 from cal-itp/gtfs_quality_check
Gtfs quality check
2 parents 4c7fe4e + 90f3f03 commit cada838

File tree

2 files changed

+1719
-0
lines changed

2 files changed

+1719
-0
lines changed

ah_starterkit/Untitled.ipynb

+151
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 12,
6+
"id": "3423feb2-b10a-4573-9c51-d91c1bbc9bf3",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"from typing import Literal, cast"
11+
]
12+
},
13+
{
14+
"cell_type": "code",
15+
"execution_count": 13,
16+
"id": "e8758d7d-aaf3-4522-86eb-eb26d2d2596e",
17+
"metadata": {},
18+
"outputs": [],
19+
"source": [
20+
"hello_t = Literal['Hello there', 'Hello world']"
21+
]
22+
},
23+
{
24+
"cell_type": "code",
25+
"execution_count": 14,
26+
"id": "10b142a1-a184-4cb4-9e26-f52aad555c0a",
27+
"metadata": {},
28+
"outputs": [
29+
{
30+
"data": {
31+
"text/plain": [
32+
"typing.Literal['Hello there', 'Hello world']"
33+
]
34+
},
35+
"execution_count": 14,
36+
"metadata": {},
37+
"output_type": "execute_result"
38+
}
39+
],
40+
"source": [
41+
"hello_t"
42+
]
43+
},
44+
{
45+
"cell_type": "code",
46+
"execution_count": 15,
47+
"id": "fcef3360-c76a-4340-a4b9-4c7857ff8a2f",
48+
"metadata": {},
49+
"outputs": [],
50+
"source": [
51+
"def verify(word: Literal['there', 'world']) -> hello_t:\n",
52+
" a = cast(hello_t, word)\n",
53+
" return a"
54+
]
55+
},
56+
{
57+
"cell_type": "code",
58+
"execution_count": 16,
59+
"id": "c0a7c587-78b6-4939-a20c-9dcd087642ce",
60+
"metadata": {},
61+
"outputs": [],
62+
"source": [
63+
"a = verify('there')"
64+
]
65+
},
66+
{
67+
"cell_type": "code",
68+
"execution_count": 17,
69+
"id": "88135247-761c-4e98-98ba-d0850c17dfc9",
70+
"metadata": {},
71+
"outputs": [
72+
{
73+
"data": {
74+
"text/plain": [
75+
"'there'"
76+
]
77+
},
78+
"execution_count": 17,
79+
"metadata": {},
80+
"output_type": "execute_result"
81+
}
82+
],
83+
"source": [
84+
"a"
85+
]
86+
},
87+
{
88+
"cell_type": "code",
89+
"execution_count": 18,
90+
"id": "822bd804-c832-4bd6-b08a-ac4eaaa2c831",
91+
"metadata": {},
92+
"outputs": [
93+
{
94+
"data": {
95+
"text/plain": [
96+
"'world'"
97+
]
98+
},
99+
"execution_count": 18,
100+
"metadata": {},
101+
"output_type": "execute_result"
102+
}
103+
],
104+
"source": [
105+
"verify('world')"
106+
]
107+
},
108+
{
109+
"cell_type": "code",
110+
"execution_count": 19,
111+
"id": "997c2d77-c496-41d3-b6bc-5c61b46782ad",
112+
"metadata": {},
113+
"outputs": [
114+
{
115+
"data": {
116+
"text/plain": [
117+
"'candy'"
118+
]
119+
},
120+
"execution_count": 19,
121+
"metadata": {},
122+
"output_type": "execute_result"
123+
}
124+
],
125+
"source": [
126+
"verify('candy')"
127+
]
128+
}
129+
],
130+
"metadata": {
131+
"kernelspec": {
132+
"display_name": "Python 3 (ipykernel)",
133+
"language": "python",
134+
"name": "python3"
135+
},
136+
"language_info": {
137+
"codemirror_mode": {
138+
"name": "ipython",
139+
"version": 3
140+
},
141+
"file_extension": ".py",
142+
"mimetype": "text/x-python",
143+
"name": "python",
144+
"nbconvert_exporter": "python",
145+
"pygments_lexer": "ipython3",
146+
"version": "3.9.13"
147+
}
148+
},
149+
"nbformat": 4,
150+
"nbformat_minor": 5
151+
}

0 commit comments

Comments
 (0)