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
| { | |
| "configurations": [ | |
| { | |
| "type": "OctaveDebugger", | |
| "request": "launch", | |
| "name": "Octave Program", | |
| "program": "${workspaceFolder}/${fileBasenameNoExtension}.m", | |
| "octave": "octave-cli", | |
| "sourceFolder": "${workspaceFolder}", | |
| "autoTerminate": true, |
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
| disp("multi-class classification with softmax regression from scratch......"); | |
| function [h, display_array] = displayData(X, example_width) | |
| %DISPLAYDATA Display 2D data in a nice grid | |
| % [h, display_array] = DISPLAYDATA(X, example_width) displays 2D data | |
| % stored in X in a nice grid. It returns the figure handle h and the | |
| % displayed array if requested. | |
| % Set example_width automatically if not passed in | |
| if ~exist('example_width', 'var') || isempty(example_width) |
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
| disp("The numerical gradient check......"); | |
| function W = randWeights(in, out) | |
| epsilon_init = sqrt(6) / sqrt(in + out); | |
| W = rand(in, out) * 2 * epsilon_init - epsilon_init; | |
| endfunction | |
| function numericalGrads = applyNumericalGradients(costFunc, nn_params) | |
| % Apply partial derivative of costFunc with respect to the | |
| % i-th input argument. |
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
| disp("k-nearest neighbors algorithm (Simple and plain implementation)"); | |
| function [prediction, selected_by_K, distances] = kNN(X, model, K, MODE) | |
| % X is a feature vector to query data in model with nearest distance. | |
| % model contains the "trained" data, actually for KNN we don't train and there aren't parameters, | |
| % we compare distance with the ground-truth data. | |
| % Last column of model is label column. | |
| % K is the first K result to select. | |
| % MODE for "regression" , "classification" or "sortOnly". |
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
| disp("Use the normal equations without training to get linear regression weights..."); | |
| function W = randWeights(in, out) | |
| epsilon_init = sqrt(6) / sqrt(in + out); | |
| W = rand(in, out) * 2 * epsilon_init - epsilon_init; | |
| endfunction | |
| % Gen data with m rows and n feature columns. | |
| m = 5000; % m rows data | |
| n = 100; % input features numbers |
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
| extension StreamControllerExtension<T> on StreamController<T> { | |
| setStreamListener(void onData(T event), | |
| {Function onError, void onDone(), bool cancelOnError}) { | |
| if (!this.hasListener) { | |
| this.stream.listen(onData, | |
| onError: onError, onDone: onDone, cancelOnError: cancelOnError); | |
| } | |
| } | |
| } |
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
| Wrap_content ,Wrap_content : | |
| //use this as child | |
| Wrap( | |
| children: <Widget>[*your_child*]) | |
| Match_parent,Match_parent: | |
| //use this as child | |
| Container( | |
| height: double.infinity, |
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://gitee.com/shetj/codes/90wfc8hoqbnesdy3gvzkm14 |
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
| package com.aniketkadam.sharevideoshortcut | |
| import kotlinx.coroutines.Dispatchers | |
| import kotlinx.coroutines.ExperimentalCoroutinesApi | |
| import kotlinx.coroutines.test.TestCoroutineDispatcher | |
| import kotlinx.coroutines.test.resetMain | |
| import kotlinx.coroutines.test.setMain | |
| import org.junit.rules.TestRule | |
| import org.junit.runner.Description | |
| import org.junit.runners.model.Statement |
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
| $ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" |