Discriminative classifiers divide the feature space into regions that separate the data belonging to different classes such that every separate region contains samples belonging to a single class. The decision boundary is determined by constructing and solving equations of the form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| from keras import layers as L | |
| from keras import backend as K | |
| from keras.models import Model | |
| import tensorflow as tf | |
| import numpy as np | |
| _epsilon = tf.convert_to_tensor(K.epsilon(), np.float32) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import request, Flask | |
| app = Flask(__name__) | |
| @app.route("/", methods=["POST"]) | |
| def index(): | |
| if request.content_type == 'application/pdf': | |
| with open('request.pdf', 'wb') as fout: | |
| fout.write(request.data) |
Suppose you have
Now, between any two random variables
(where
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| X <- numeric(length=1000) | |
| params.a <- sqrt(30) / 4 | |
| params.c <- 0.811 | |
| sqrt.fx <- function(x) { | |
| f <- (x ^ 4) - 2 * (x ^ 3) + (x ^ 2) | |
| return(sqrt(30 * f)) | |
| } | |
| sample <- function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let g:python3_host_prog="~/conda/bin/python" | |
| let g:python2_host_prog="~/conda/bin/python" | |
| call plug#begin('~/.local/share/nvim/plugged') | |
| " Autocomplete stuff | |
| if has('nvim') | |
| Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } |
Hypothesis:
For a given package ABC, if conda installs it without any additional arguments, pip install the same package without any additional arguments, they are not coming from the same source. They will have a slightly different version, patch or minor.
Procedure:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Generate an HTML page that embeds an image as a data URL. | |
| Usage: | |
| python embed_image.py path/to/image.png output.html | |
| """ | |
| import argparse | |
| import base64 |
OlderNewer