heroku ps:scale web=0 --app myAwesomeApp
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
| function upper(strings, ...values) { | |
| let result = ''; | |
| strings.forEach((string, i) => { | |
| result += string + (values[i] ? values[i].toUpperCase() : ''); | |
| }); | |
| return result; | |
| } |
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
| library(caret) | |
| library(reshape2) | |
| dataTrain <- data.frame(x = trainData$x[1:30000,], y = trainData$y[1:30000]) | |
| dataTest <- data.frame(x = testData$x, y = testData$y) | |
| # Train. | |
| trainctrl <- trainControl(verboseIter = TRUE, number=5, repeats=1, method='repeatedcv') | |
| results <- data.frame() |
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
| function Perceptron(opts) { | |
| if (!opts) opts = {} | |
| var debug = 'debug' in opts ? opts.debug : false; | |
| var weights = 'weights' in opts | |
| ? opts.weights.slice() | |
| : [] | |
| var threshold = 'threshold' in opts |
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
| // A | |
| if (isActive) | |
| doIt(); | |
| // B | |
| if (isActive) { | |
| doIt(); | |
| } | |
| // C |
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
| # | |
| # [2017-09-04] Challenge #330 [Easy] Surround the circles | |
| # https://www.reddit.com/r/dailyprogrammer/comments/6y19v2/20170904_challenge_330_easy_surround_the_circles/ | |
| # | |
| # Demo at http://www.r-fiddle.org/#/fiddle?id=xNcJwO6x&version=2 | |
| # | |
| # In this challenge, you will be given a set of circles, defined by their centers and radii. Your goal is to find the bounding rectangle which will contain all of the circles completely. | |
| # Write a program that determines the vertices of the bounding rectangle with sides parallel to the axes. | |
| # | |
| # by Kory Becker |
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
| ### | |
| ### Example of using word2vec. | |
| ### Kory Becker, August 16, 2017 | |
| ### | |
| library(devtools) | |
| library(httr) | |
| library(tm) | |
| set_config( |
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
| library(devtools) | |
| library(httr) | |
| # Set proxy. | |
| set_config( | |
| use_proxy(url="proxy.company.com", port=80), | |
| ) | |
| # Disable SSL verify check. | |
| set_config( config( ssl_verifypeer = 0L ) ) |