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
| Classify user search queries as either "Good Google Search Query" or "Bad Google Search Query" based on their likelihood of yielding relevant and helpful results from Google Search. | |
| Input: User search query (text string). | |
| Output: Classification label: | |
| * Good Google Search Query: The query is likely to be effectively answered by Google Search. | |
| * Bad Google Search Query: The query is unlikely to be effectively answered by Google Search. Further categorize "Bad" queries into subtypes for better understanding and classifier training (optional but highly recommended): | |
| * Chit-Chat/Conversational/Social | |
| * Personal/Subjective/Opinion-Based (Un-searchable) | |
| * Vague/Ambiguous/Lacking Specificity |
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
| #!/bin/bash | |
| set -e | |
| sudo -u ec2-user -i <<'EOP' | |
| ## INSTALL THEIA IDE FROM SOURCE | |
| EC2_HOME=/home/ec2-user | |
| mkdir ${EC2_HOME}/theia && cd ${EC2_HOME}/theia | |
| ### begin by installing NVM, NodeJS v10, and Yarn | |
| curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash |
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 math import sqrt | |
| def put_kernels_on_grid (kernel, pad = 1): | |
| '''Visualize conv. filters as an image (mostly for the 1st layer). | |
| Arranges filters into a grid, with some paddings between adjacent filters. | |
| Args: | |
| kernel: tensor of shape [Y, X, NumChannels, NumKernels] | |
| pad: number of black pixels around each filter (between them) |
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
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |

