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
| const fetchToken = () => { | |
| return new Promise((resolve) => { | |
| chrome.storage.sync.get(["userToken"], (obj) => { | |
| resolve(obj["userToken"] ? obj["userToken"] : ""); | |
| }); | |
| }); | |
| }; | |
| const fetchRefreshToken = () => { | |
| return new Promise((resolve) => { |
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
| https://www.buycott.com/campaign/browse | |
| https://www.buycott.com/campaign/browse#campaign_trending | |
| https://www.buycott.com/campaign/browse#campaign_popular | |
| https://www.buycott.com/campaign/1317/boycott-trump-products | |
| https://www.buycott.com/campaign/1177/save-and-support-the-bees-as-much-as-you-can | |
| https://www.buycott.com/campaign/1193/stop-buying-products-manufactured-using-prison-slave-labor | |
| https://www.buycott.com/campaign/613/boycott-russian-products-because-of-homophobic-lgbt-policies | |
| https://www.buycott.com/campaign/412/reject-magic-hat-s-frivolous-lawsuit-against-west-sixth | |
| https://www.buycott.com/campaign/211/pro-gmo-or-pro-right-to-know | |
| https://www.buycott.com/campaign/354/say-no-to-palm-oil-products |
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
| { | |
| "geocoding": { | |
| "version": "0.2", | |
| "attribution": "https://geocode.earth/guidelines", | |
| "query": { | |
| "parsed_text": { | |
| "postalcode": "87801" | |
| }, | |
| "size": 10, | |
| "private": false, |
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
| { | |
| "logger": { | |
| "level": "info", | |
| "timestamp": false | |
| }, | |
| "esclient": { | |
| "hosts": [ | |
| { "host": "0.0.0.0" } | |
| ] | |
| }, |
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
| for i in range(200): | |
| for j in range(300): | |
| print("hello") | |
| print("hello") | |
| for i in range(200): | |
| for j in range(300): | |
| print("hello") | |
| print("hello") |
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
| { | |
| "logger": { | |
| "level": "info", | |
| "timestamp": false | |
| }, | |
| "esclient": { | |
| "hosts": [ | |
| { "host": "elasticsearch" } | |
| ] | |
| }, |
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
| for i in range(100): | |
| for a in range(250): | |
| for b in range(200): | |
| print "abba" | |
| for j in range(300): | |
| print "hello" |
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
| MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder() | |
| .seed(12345) | |
| .optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT).iterations(1) | |
| .iterations(1) | |
| .activation(Activation.RELU) | |
| .weightInit(WeightInit.XAVIER) | |
| .learningRate(0.1) | |
| .list() | |
| .layer(0, new DenseLayer.Builder().nIn(402).nOut(1024).build()) | |
| .layer(1, new DenseLayer.Builder().nIn(1024).nOut(2048).build()) |
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
| public static void predict(SentimentExampleIterator iter,MultiLayerNetwork net,String sentence) { | |
| DataSet dataSet=iter.reviewEncode(sentence); | |
| INDArray features = dataSet.getFeatureMatrix(); | |
| INDArray inMask = dataSet.getFeaturesMaskArray(); | |
| INDArray outMask = dataSet.getLabelsMaskArray(); | |
| INDArray predicted = net.output(features,false,inMask,outMask); | |
| INDArray output=predicted.get(NDArrayIndex.point(0), NDArrayIndex.all(), NDArrayIndex.point(predicted.shape()[2]-1)); | |
| System.out.println(output); | |
| } | |
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
| //Prediction logic | |
| public void predict(MultiLayerNetwork net,String sentence) { | |
| SentimentExampleIterator iter = null; | |
| DataSet dataSet=iter.reviewEncode("hello world"); | |
| INDArray features = dataSet.getFeatureMatrix(); | |
| INDArray inMask = dataSet.getFeaturesMaskArray(); | |
| INDArray outMask = dataSet.getLabelsMaskArray(); | |
| INDArray predicted = net.output(features,false,inMask,outMask); | |
| } |
NewerOlder