Update to a newer version of anaconda
conda update --prefix /anaconda3 anaconda
Upgrade all conda packages to their latest version
conda update --all
conda update --prefix /anaconda3 anaconda
conda update --all
git remote prune origin
prunes tracking branches not on the remote. Run with a -n
flag to do a dry run. Source
class WrapperComponent extends React.Component { | |
render() { | |
const style = { border: "solid 1px " + this.props.color }; | |
return <div style={style}>{this.props.children}</div>; | |
} | |
} | |
class HelloMessage extends React.Component { | |
render() { | |
var Wrapper = this.props.wrapper; |
# Remove untagged docker images | |
docker rmi (docker images | awk '/<none>/ {print $3}') |
const myObject: { [key: string]: string } = {foo: 'bar'}
With target=es2017
and TypeScript 2.8
# via https://stackoverflow.com/questions/7726949/remove-local-branches-no-longer-on-remote#28464339 | |
# prunes tracking branches not on the remote. | |
git remote prune origin | |
# lists branches that have been merged into the current branch. | |
git branch --merged | |
# deletes branches listed on standard input. | |
xargs git branch -d |
// Assuming the delta is entirely insert operations, | |
// this example wouuld convert bolded text to html bolded text. | |
// The key logic here is mapping over the insert ops, | |
// then joining the resulting array on the empty string | |
html = delta.slice(0, 500).ops.map(function(op) { | |
if (typeof op.insert !== 'string') return ''; | |
let html = op.insert; | |
if (op.attributes.bold) { | |
html = '<strong>' + html + '</strong>'; | |
} |
const Quill = require('quill'); | |
// https://github.com/quilljs/quill/blob/develop/formats/link.js | |
const Link = Quill.import('formats/link'); | |
class Timestamp extends Link { | |
static create(value) { | |
let node = super.create(value); | |
value = this.sanitize(value); | |
node.setAttribute('href', value); |
```python | |
import matplotlib.pyplot as plt | |
from matplotlib import colors | |
import numpy as np | |
def make_forest( height, width, density ): | |
''' | |
This function will take in a width, height, and density specified by the user and use those values | |
to generate a forest (2-d numpy array) matching those characteristics. A 0 will represent an empty | |
space, a 1 will represent a tree |