NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
from django.contrib.admin import ModelAdmin | |
from .paginator import LargeTablePaginator | |
class MyTableAdmin(ModelAdmin): | |
... | |
paginator = LargeTablePaginator | |
show_full_result_count = False # Recommended to avoid another count() | |
... |
NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
An engineering manager that I have the privilege of working with just asked me for three expectations of a principal engineer for a project that he is working on to mentor senior engineers at Twilio. Here is the list that I came up with.
import time | |
import pandas as pd | |
import dask.dataframe as ddf | |
def benchmark(function, repetitions, name): | |
start = time.time() | |
function(repetitions) | |
end = time.time() |
const fs = require('fs'); | |
const path = require('path'); | |
const AWS = require('aws-sdk'); | |
const { BUCKET_NAME, AWS_ACCESS_ID, AWS_SECRET_KEY } = process.env; | |
// helpers | |
function uploadToS3(file, name, type) { |
Workaround for angular/angular-cli#9036.
In getErrorSpanForNode()
in node_modules/typescript/lib/typescript.js...
Add-
if (!sourceFile) {
return ts.createTextSpan(0, 0);
}
Hello!
I just finished planning the next edition of the Microservices with Docker, Flask, and React course and am looking for some feedback.
Major changes and updates:
Part | Change |
---|---|
1 | Replace Flask-Script with Flask-CLI/Click and add both Flask-RESTful and Flask-DebugToolbar |
2 | Add multistage Docker build for the React app and replace the pushstate server with nginx for the production React Dockerfile |