element
is a Selenium WebElement given by <a href="page.html" target="_blank">link<\a>
. Which of the following returns "page.html"
? element.get_attribute("href")
element.get_attribute("text")
element.text
element.href
element
is an HTML table WebElement with 3 rows and 3 columns, which of the following code finds the text in the first cell of the last row in the table? element.find_elements("tag name", "tr")[2].find_element("tag name", "td").text
element.find_elements("tag name", "tr")[2].find_elements("tag name", "td")[2].text
element.find_element("tag name", "tr").find_elements("tag name", "td")[2].text
element.find_element("tag name", "tr").find_element("tag name", "td").text
{node: "A", g: 1, h: 10}
, {node: "B", g: 3, h: 7}
, {node: "C", g: 5, h: 3}
, {node: "D", g: 7, h: 2}
, where "g" represents the distance from the initial node and "h" represents an admissible heuristic (estimated distance to the goal node). Which node will A* search check next? (0, 0), (0, 1), (0, 2), ..., (1, 0), (1, 1), ...
and page (i, j)
contains links to pages (i + 1, j)
and (i, j + 1)
. Suppose we start at page (0, 0)
and the goal is to find page (10, 10)
, which one of the following search heuristic is NOT admissible? h((i, j)) = 1
h((i, j)) = 0
h((i, j)) = |10 - i| + |10 - j|
h((i, j)) = max(|10 - i|, |10 - j|)
data
that produces dict(flask.request.args) = {"from": "A", "to": "B"}
IP:5000/data?from=A&to=B
IP:5000/data?from="A"&to="B"
IP:5000/data?from=A,to=B
IP:5000/data?from="A",to="B"
@app.route("/aaa")
def aaa():
return "bbb"
@app.route("/")
def bbb():
return "aaa"
http://127.0.0.1:5000/
http://127.0.0.1:5000/aaa
http://127.0.0.1:5000/index
http://127.0.0.1:5000/bbb
flask.request.remote_addr
? app.route("/index/<x>")
binds the function index(x)
return x
. What will visits to "/index/2?x=1" display? scipy.stats.fisher_exact(df)
returns 0.005 for table 1, 0.05 for table 2, and 0.5 for table 3. At a threshold for significance of 10 percent, for how many tests do we have statistically significant evidence that B has a different click-through-rate than A? DataFrame
with columns c1
, c2
, c3
, c4
containing categorical data with 2, 3, 4, 5 categories respectively, how many subplots (axes) will seaborn.relplot(data, x = "c1", y = "c2", col= "c3", row = "c4")
make? transform
will give you the circle that looks the largest on the screen?
fig, ax = plt.subplots()
ax.set_xlim(0, 2)
ax.set_ylim(0, 2)
circle = plt.Circle((0.5, 0.5), 0.5, transform = ??)
??.add_artist(circle)
fig.transFigure
ax.transAxes
ax.transData
matplotlib.patches.FancyArrowPatch((10, 10), (0, 0), connectionstyle=ConnectionStyle.Angle3(135, 90)
has three control points (10, 10), (a, b), (0, 0)
, what is the value of (a, b)
? (0, 20)
(10, 0)
(0, 10)
(20, 0)
x = shapely.geometry.box(0, 0, 2, 2)
, y = shapely.geometry.box(1, 1, 3, 3)
? x.union(y)
x.intersection(y)
x.convex_hull
x = shapely.box(0, 0, 1, 1)
and y = shapely.box(a, b, c, d)
for some a < c, b < d
, z = x.union(y)
, what is the maximum number of vertices the polygon z
will have? len(matches)
given the code below? (Note there is no space between CS
and 320
)
courses = "CS320, CS 368, CS 540, CS 559"
matches = re.findall("([A-Z]+)(\d{3})", courses)
1 re.sub(r"(((\d)\d)\d)", "\g<3>\g<2>\g<1>", "123 320")
? "112123 332320"
"321 023"
"123121 320323"
"123 320 12 32 1 3"
Last Updated: November 30, 2024 at 4:34 AM