Tutorial by Examples: book

Jupyter Notebooks are an interactive, browser-based development environment. They were originally developed to run computation python and as such play very well with numpy. To try numpy in a Jupyter notebook without fully installing either on one's local system Rackspace provides free temporary note...
Create a file named launch-server.yaml, that will be our playbook. The first part of the playbook is a list of hosts that your playbook will run on, we only have one, localhost. - hosts: localhost Then we need to define a list of tasks to perform in this playbook. We will only have one that lau...
Run the Ansible playbook: $ ansible-playbook launch-server.yaml You should see output like PLAY [localhost] *************************************************************** TASK [setup] ******************************************************************* ok: [localhost] TASK [launch an U...
app.ts import {Component} from '@angular/core'; import {Platform, ionicBootstrap} from 'ionic-angular'; import {StatusBar} from 'ionic-native'; import {LoginPage} from './pages/login/login'; import {FIREBASE_PROVIDERS, defaultFirebase, AuthMethods, AuthProviders, firebaseAuthConfig} from 'angul...
Use the following commands to create bookmarks and access bookmarks from within Emacs. Let us say that you are editing a file called foobar.org and suppose that you visit this file frequently to edit / view contents. It would be convenient to access this file with couple of key strokes rather than...
To create a template for the single posts of our custom post type, we need to create a file called single-post_type_name.php where post_type_name is the name of our custom post type. For example, if our custom post type is called “Books”, we need to create a PHP file called single-book.php. Note th...
package com.mcf7.spring.domain; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import java.io.Serializable;...
package com.mcf7.spring.domain; import org.springframework.data.repository.PagingAndSortingRepository; public interface BookRepository extends PagingAndSortingRepository<Book, Long> { } Basic Spring Repository pattern, except we enabled a Paging and Sorting Repository for extra featu...
Objective-C First add the Social Framework to the XCode project. Import the #import "Social/Social.h" class to the required ViewController Twitter with text, image and link //- - To Share text on twitter - - if([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) ...
This document details the steps to obtain the facebook access tokens and the using the tokens to fetch FB feeds. Example: A live example is available in https://newtonjoshua.com Introduction to Graph API: The Graph API is the primary way to get data in and out of Facebook's platform. It's a...
Go to the [https://developers.facebook.com/](https://developers.facebook.com/) and create your app. Click Add product and choose Facebook Login
If you enable prettyUrl in your yii2-app, your redirect_uri will be: http://<base_url>/web/site/auth And disable pretty url: http://<base_url>/web/index.php?r=site%2Fauth Example:
The passport-facebook module is used to implement a Facebook authentication. In this example, if the user does not exist on sign-in, he is created. Implementing strategy : const passport = require('passport'); const FacebookStrategy = require('passport-facebook').Strategy; // Strategy is name...
Let use 'os_server' command from module 'Cloud' [http://docs.ansible.com/ansible/os_server_module.html]. Variables are defined in ./group_vars/all. $vi launch_compute.yml - name: launch a compute instance hosts: localhost gather_facts: False tasks: - name: Create and launch the VM ...
Here is a simple example of how to use Bokeh in Jupyter Notebook: import numpy as np from bokeh.plotting import figure # Make Bokeh Push push output to Jupyter Notebook. from bokeh.io import push_notebook, show, output_notebook from bokeh.resources import INLINE output_notebook(resources=INLIN...
import java.util.*; class Book { int id; String name,author,publisher; int quantity; public Book(int id, String name, String author, String publisher, int quantity) { this.id = id; this.name = name; this.author = author; this.publisher = p...
It is a powerful and mostly used keyword in Ansible to run Playbook using Ad-Hoc commands Example: ansible-playbook demo.yml Further Reading on ansible-plabook
You can create a new notebook in RStudio with the menu command File -> New File -> R Notebook If you don't see the option for R Notebook, then you need to update your version of RStudio. For installation of RStudio follow this guide

Page 2 of 2