Say I have a multi-index DataFrame that looks like this:
In [5]: sales
Out[5]:
eggs salt spam
state month
CA 1 47 12.0 17
2 110 50.0 31
NY 1 221 89.0 72
Say I have a multi-index DataFrame that looks like this:
In [5]: sales
Out[5]:
eggs salt spam
state month
CA 1 47 12.0 17
2 110 50.0 31
NY 1 221 89.0 72
pre.highlight, | |
.highlight pre { background-color: #272822; } | |
.highlight .hll { background-color: #22282A } | |
.highlight .c { color: #99AA8A } /* Comment */ | |
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */ | |
.highlight .k { color: #93C763 } /* Keyword */ | |
.highlight .l { color: #ae81ff } /* Literal */ | |
.highlight .n { color: #F1F2F3 } /* Name */ | |
.highlight .o { color: #E8E2B7 } /* Operator */ | |
.highlight .p { color: #F1F2F3 } /* Punctuation */ |
/* Based on Sublime Text's Monokai theme */ | |
.cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;} | |
.cm-s-monokai div.CodeMirror-selected {background: #49483E !important;} | |
.cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;} | |
.cm-s-monokai .CodeMirror-linenumber {color: #d0d0d0;} | |
.cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;} | |
.cm-s-monokai span.cm-comment {color: #75715e;} | |
.cm-s-monokai span.cm-atom {color: #ae81ff;} |
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}'
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
const shuffleArray = arr => arr.sort(() => Math.random() - 0.5) | |
shuffleArray([1, 2, 3]) //[3, 1, 2] |
'use strict'; | |
/*****************NATIVE forEACH*********************/ | |
Array.prototype.myEach = function(callback) { | |
for (var i = 0; i < this.length; i++) | |
callback(this[i], i, this); | |
}; | |
//tests |
TensorFlow SERVING is Googles' recommended way to deploy TensorFlow models. Without proper computer engineering background, it can be quite intimidating, even for people who feel comfortable with TensorFlow itself. Few things that I've found particularly hard were:
After all, it worked just fine. Here I present an easiest possible way to deploy your models with TensorFlow Serving. You will have your self-built model running inside TF-Serving by the end of this tutorial. It will be scalable, and you will be able to query it via REST.
GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.