Tutorial by Examples

filePath = "file.csv" data = np.genfromtxt(filePath) Many options are supported, see official documentation for full list: data = np.genfromtxt(filePath, dtype='float', delimiter=';', skip_header=1, usecols=(0,1,3) )
I have some data analysis done on some data and have many 'non-coding' people on the team, who have similar data like mine, and have similar analysis requirements. In such cases, I can build a web application with shiny, which takes in user specific input data files, and generate analyses. I ...
A nested loop is a loop within a loop, an inner loop within the body of an outer one. How this works is that the first pass of the outer loop triggers the inner loop, which executes to completion. Then the second pass of the outer loop triggers the inner loop again. This repeats until the outer loop...
ShortcutDescriptionCtrl + x, (start recording a macroCtrl + x, )stop recording a macroCtrl + x, eexecute the last recorded macro
With the bind command it is possible to define custom key bindings. The next example bind an Alt + w to >/dev/null 2>&1: bind '"\ew"':"\" >/dev/null 2>&1\"" If you want to execute the line immediately add \C-m (Enter) to it: bind '"\ew&quo...
When a Java virtual machine starts, it needs to know how big to make the Heap, and the default size for thread stacks. These can be specified using command-line options on the java command. For versions of Java prior to Java 8, you can also specify the size of the PermGen region of the Heap. Note...
Searching git log using some string in log: git log [options] --grep "search_string" Example: git log --all --grep "removed file" Will search for removed file string in all logs in all branches. Starting from git 2.4+, the search can be inverted using the --invert-grep...
Reading invalid UTF-8 When reading UTF-8 encoded data, it is important to be aware of the fact the UTF-8 encoded data can be invalid or malformed. Such data should usually not be accepted by your program (unless you know what you are doing). When unexpectedly encountering malformed data, different ...
The arrayref for @foo is \@foo. This is handy if you need to pass an array and other things to a subroutine. Passing @foo is like passing multiple scalars. But passing \@foo is a single scalar. Inside the subroutine: xyz(\@foo, 123); ... sub xyz { my ($arr, $etc) = @_; print $arr-&g...
Merges two collections (without removing duplicates) List<int> foo = new List<int> { 1, 2, 3 }; List<int> bar = new List<int> { 3, 4, 5 }; // Through Enumerable static class var result = Enumerable.Concat(foo, bar).ToList(); // 1,2,3,3,4,5 // Through extension method...
Objective C NSURL *url = [NSURL URLWithString:@"YOUR URL"]; AVPlayer *player = [AVPlayer playerWithURL:videoURL]; AVPlayerLayer *playerLayer = [AVPlayerLayer playerLayerWithPlayer:player]; playerLayer.frame = self.view.bounds; [self.view.layer addSublayer:playerLayer]; [player play];...
To unregister from Remote Notifications programatically you can use Objective-C [[UIApplication sharedApplication] unregisterForRemoteNotifications]; Swift UIApplication.sharedApplication().unregisterForRemoteNotifications() this is similar to going into the setting of your phone and manual...
Detailed instructions on getting api set up or installed.
NSMutableDictionary *attributesDictionary = [NSMutableDictionary dictionary]; [attributesDictionary setObject:[UIFont systemFontOfSize:14] forKey:NSFontAttributeName]; //[attributesDictionary setObject:[UIColor redColor] forKey:NSForegroundColorAttributeName]; NSMutableAttributedString *attri...
Task that return a value has return type of Task< TResult > where TResult is the type of value that needs to be returned. You can query the outcome of a Task by its Result property. Task<int> t = Task.Run(() => { int sum = 0; for(int i = 0; i < 500; i++) ...
To create a Swift Package, open a Terminal then create an empty folder: mkdir AwesomeProject cd AwesomeProject And init a Git repository: git init Then create the package itself. One could create the package structure manually but there's a simple way using the CLI command. If you want to ...
JSON Viewer SourceForge is a plugin for JSON visualization and formatting. It is useful for indenting /formatting JSON documents and can be used to browse complex JSON file using a treeview tool. The following image shows the commands offered by the plugin: Starting from an unformatted JSON frag...
EventNetworks returned by compile must be actuated before reactimated events have an effect. main = do (inputHandler, inputFire) <- newAddHandler eventNetwork <- compile $ do inputEvent <- fromAddHandler inputHandler let inputEventReaction = fmap putStrLn inp...
Here we will be checking out the latest copy of our project's code, run the tests and will make the application live.To achieve that, follow below steps: Open Jenkins in browser. Click the New Job link. Enter project name and select the Build a free-style software project link. Click on Ok but...
Java EE stands for Java Enterprise Edition. Java EE extends the Java SE (which stands for Java Standard Edition). Java EE is a set of technologies and related specifications that are oriented towards the development of large-scale enterprise applications. Java EE is developed in a community driven p...

Page 708 of 1336