Let's look at some basic kubectl output options.
Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).
We can start with:
kubectl get no
## Split into holdout for purposes of imputation and encoding | |
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = .2, random_state=2019) | |
class_labels = df['segment_label'].cat.categories | |
## Preprocessing pipeline | |
# Define transforms on numeric types | |
numeric_features = X.select_dtypes(np.number).columns | |
numeric_transformer = Pipeline(steps=[ | |
('imputer', SimpleImputer(strategy='median')), |
Recently when refactoring a Vue 1.0 application, I utilized ES6 arrow functions to clean up the code and make things a bit more consistent before updating to Vue 2.0. Along the way I made a few mistakes and wanted to share the lessons I learned as well as offer a few conventions that I will be using in my Vue applications moving forward.
The best way to explain this is with an example so lets start there. I'm going to throw a rather large block of code at you here, but stick with me and we will move through it a piece at a time.
<script>
// require vue-resource...
new Vue({
// connect() is a function that injects Redux-related props into your component. | |
// You can inject data and callbacks that change that data by dispatching actions. | |
function connect(mapStateToProps, mapDispatchToProps) { | |
// It lets us inject component as the last step so people can use it as a decorator. | |
// Generally you don't need to worry about it. | |
return function (WrappedComponent) { | |
// It returns a component | |
return class extends React.Component { | |
render() { | |
return ( |