Search
Find a bite, explore a topic or look for a role.
Results for “Python”
Bites 291
How would you scale 1TB Pandas feature computation across machines?
This tests memory limits and distributed migration. A strong answer contrasts single-machine tactics, column pruning and efficient dtypes, with distributed frameworks like Dask or Spark, noting shuffle costs and API parity.

How do you guarantee identical feature engineering for training and real-time inference?
Tests unifying feature engineering across batch and online paths to eliminate skew. Answer: shared transformation libraries, versioned feature stores, and logged feature validation. Red flag: separate training and serving code without a single source of truth.
Parameterization: One Pipeline, Any Environment
Externalize every path, hyperparameter, and compute setting so one pipeline runs unchanged across dev, staging, and production. This enables reproducible experiments and safe CI/CD. The footgun is branch-per-environment repos that silently diverge.
Docker Image vs. Container: Blueprint vs. Runtime
A Docker image is a read-only blueprint; a container is a live instance with a writable layer. You build an image once in CI and run many containers from it in production. The footgun is mutating a running container without updating the image recipe.
MLflow Models Standardize Deployment Packaging
MLflow Models wrap artifacts into a standard package so one pipeline serves sklearn or PyTorch without new deployment code. Teams ship experiments to REST endpoints without Dockerfiles per model. Missing dependency logging lets model load but fail to predict.

Walk me through building a weather agent with get_weather
Register get_weather, let the model emit parameters, execute it yourself, feed the result back, then synthesize the answer.

How does function calling work in modern LLMs?
Schemas in the prompt; model emits JSON name and arguments; client executes and returns results.

Describe two prompt-based techniques to ensure valid LLM JSON output
This tests output constriction via prompt design. First, embed an exact JSON skeleton with empty values. Second, provide few-shot exemplars mapping inputs to valid JSON. A red flag is suggesting only post-hoc regex repair or larger models.
Function Calling: LLMs Using Tools
Function calling turns an LLM into an API translator: it reads input and emits JSON telling your code which tool to run. Use it when the model needs live data it cannot store in weights. The model never executes the call and can hallucinate arguments.

Describe the architecture for multi-touch attribution with time-decay
Stitch IDs, stream events to warehouse, sessionize journeys, then apply decay weights in SQL.

Propose a strategy to enforce a consistent analytics event schema
Schema registry with CI validation, typed SDK wrappers blocking bad builds, plus ingestion-time rejection.
What is the difference between Cargo.toml and Cargo.lock?
Cargo.toml declares broad requirements; Cargo.lock pins exact resolved versions.
How does Dart resolve mixin method conflicts and application order?
Tests understanding of Dart's mixin linearization. Answer: Dart applies mixins left-to-right, building a superclass chain where the last mixin wins conflicts. Red flag: claiming first mixin wins or confusing with multiple inheritance.
Container Images Are Stacked Deltas
Images stack read-only layers like transparent sheets, one per Dockerfile step, topped by a thin writable layer. This enables cache reuse and fast pulls. The footgun: removing a file in a later layer hides but does not delete it; those bytes still ship.
How would you standardize a 500GB dataset that does not fit in RAM?
This tests two-pass statistics for out-of-core scaling. A good answer outlines: first compute mean and variance via sums and counts; second apply z = (x - mean) / std; mention Dask-ML or PySpark. A red flag is averaging chunk-wise means without weighting.
Implement OAuth 2.0 flow to get an access token for API requests
Tests your grasp of OAuth 2.0 grant-type selection and token lifecycle. Strong answers match the script context to client credentials or authorization code flow, detail the token endpoint exchange, and address refresh and expiry.

How do you fetch JSON from a REST API and parse it?
This tests practical fluency with HTTP mechanics and JSON deserialization. A strong answer names the method, URL, and headers; checks the status code; then parses with r.json() or json.loads. A red flag is skipping error handling or confusing GET with POST.

Process a 50GB CSV with only 16GB RAM
Chunk with read_csv chunksize, filter columns via usecols, downcast int64 to int32/int16, skip rows.

Calculate total and average sales per region in pandas
Tests split-apply-combine fluency. A strong answer groups by Region then calls agg with a dict or named aggregation to return sum and mean of Sales_Amount together. Red flag: chaining separate groupby calls or looping rows manually.

Propose a strategy to migrate fragmented docs into a unified docs-as-code system
Inventory sources; choose SSG by team fit; automate extraction; phased rollout with redirects.