text:
# Selenium
Selenium is a test tool for web applications. It can be used for writting spiders.

# 1. Getting Started
## 1.1. Simple Usage

Once the package selenium is installed and can be found using the variable **auto_path**,  you can start using it:

```tcl
package require selenium::chrome

namespace import ::selenium::ChromeDriver

set driver [ChromeDriver new]

$driver get http://wiki.tcl.tk/

puts [$driver title]
set input_search [$driver find_element_by_id searchtxt]
$driver send_keys $input_search selenium
$driver send_keys $input_search $selenium::Key(RETURN)
after 4000
$driver close
```

The above script can be saved into a file (eg:- wiki_tcl_search.tcl), then it can be run like this:

    tclsh wiki_tcl_search.tcl

## 1.2. Walk through of the example

The ::selenium namespace contains all the WebDriver implementations.
Currently supported WebDriver implementations are:

    - FirefoxDriver
    - ChromeDriver
    - ChromiumDriver
    - PhantomJSdriver
    - IEdriver

The Key array provide symbolic names for keyboard keys like RETURN, F1, ALT etc.

The first step is to explicitly require chrome driver.

```tcl
package require selenium::chrome
```

When a driver is required, all the selenium package is loaded. This means that it's not necessary to require
selenium.

We import the ChromeDriver class, and the instance of Chrome WebDriver is created.

```tcl
namespace import ::selenium::ChromeDriver

set driver [ChromeDriver new]
```

The driver *get* method will navigate to a page given by the URL. WebDriver will wait until the page has fully loaded (that is, the “onload” event has fired) before returning control to your  script. It’s worth noting that if your page uses a lot of AJAX on load then WebDriver may not know when it has completely loaded.:

```tcl
$driver get http://wiki.tcl.tk/
```

The next line prints the title.
```tcl
puts [$driver title]
```

WebDriver offers a number of ways to find elements using one of the *find_element_by_* methods. For example, the input text element can be located by its name attribute using find_element_by_name method. Detailed explanation of finding elements is available in the Locating Elements chapter:
```tcl
set q [$driver find_element_by_name q]
```

Next we are sending keys, this is similar to entering keys using your keyboard. Special keys can be send using Key array imported from the selenium namespace:
```tcl
$driver send_keys $q "hello world"
$driver send_keys $q $Key(RETURN)
```
(Remember to upvar Key array from selenium namespace or specify the complete name ::selenium::Key)

After submission of the page, you should get the result if there is any.
Finally, the browser window is closed. You can also call quit method instead of close. The quit will exit entire browser whereas close` will close one tab, but if just one tab was open, by default most browser will exit entirely.:
```tcl
$driver close
```

It's also possible to create a command for each web element retrieved instead of using the selenium ID provided.
In this case, the user indicates the variable containing the command name with the option *-command_var*
```tcl
$driver find_element -css form.search -command_var form
$form find_element -name q -command_var query
$query send_keys {hello world!}
$query send_keys $Keys(RETURN)

$form find_element -css {input[type="submit"]} -command_var submit
$submit click
```

## 2. Drivers of selenium
### 2.1 Chrome
Chrome driver requires chromedriver. chromedriver can be explicitly passed to the constructor

```tcl
    ChromeDriver -binary path_to_chromedriver
```

Or it should be in the current working directory, or its directory should be added to the enviroment variable PATH.

Chrome driver can be downloaded here:
   http://sites.google.com/a/chromium.org/chromedriver/downloads

### 2.2 Chromium
Chromium driver has the same options than chrome. It use the same driver
```tcl
    ChromiumDriver -binary path_to_chromedriver
```

### 2.3 Firefox
#### 2.3.1 Firefox using geckodriver
Firefox version 47 and onwards require geckodriver

Geckodriver can be downloaded here:
   http://github.com/mozilla/geckodriver/releases

geckodriver can be explicitly passed to the constructor

```tcl
    FirefoxDriver -binary path_to_geckodriver
```

Or it should be in the current working directory, or its directory should be added to the enviroment variable PATH.

There is some difference between this driver and the other drivers:

   - The click method in the other drivers scroll into view the element and then make a click. The click method using geckodriver doesnt scroll into view the element. The user has to make this call first:
```
    $driver scroll_into_view $element
```

#### 2.2.3 Firefox using extension
Firefox version before 47 requires:

    - 7z or its standlone version 7za
    - the Tcl extension tdom.

The path to this executable 7za or 7z can be passed to the constructor of FirefoxDriver with this option *-7z*.

```tcl
    FirefoxDriver -7z path_to_7z
```

Another possibility is to add the 7za executable in the current working directory or add the directory containing
 7z or 7za to the enviroment variable PATH.

7z and its standlone version 7za can be downloaded here:
http://www.7-zip.org/download.html

Activestate Tcl has tdom included in its batteries. If you need to install this extension, you can download it
here:
https://tdom.github.io/

### 2.4 PhantomJS
This driver requires the headless browser PhantomJS. This headless browser can be downloaded here:
   http://phantomjs.org/download.html

The executable can be provided explicitly to the PhantomJSdriver constructor through the *-binary* option,
or should be in the current working directory or its directory should be added to the PATH.

```tcl
    PhantomJSdriver -binary path_to_phantomjs
```

### 2.5 Internet Explorer
This driver requires  *IEDriverServer.exe*.

This executable can be downloaded here:
   http://docs.seleniumhq.org/download/

And can be passed explicitly with the *-binary* option of the constructor or should be in the current working directory or its
directory should be added to the PATH.

```tcl
    IEDriver -binary path_to_iedriverserver_exe
```

The IE driver require some extra steps depending of the internet explorer version:
https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver

### 2.6 HTMLUNIT
HTMLUNIT requires the selenium stanlone server can be downloaded here:
   http://www.seleniumhq.org/download/

``` tcl
    package require selenium
    package require selenium::utils::port

    set port [::selenium::utils::port::get_free_port]
    exec java -jar selenium-server-standlone-version.jar -port $port &

    set driver [::selenium::WebDriver new http://<IP_ADDRESS>:4444/wd/hub $::selenium::DesiredCapabilities(HTMLUNITWITHJS)]
    $driver get http://www.uab.es
```

## 3. Selenium Grid
Selenium grid requires de *seleniumjar* file.

The selenium stanlone server can be downloaded here:
   http://www.seleniumhq.org/download/

Documentation for selenium grid:
   https://github.com/SeleniumHQ/selenium/wiki/Grid2

Example:
```tcl
    package require selenium
    package require selenium::utils::port

    set port [::selenium::utils::port::get_free_port]
    exec java -jar seleniumjar.version.jar -Dwebdriver.chrome.driver=./chromedriver -port $port &

    # Create a desired capabilities object as a starting point.
    set capabilities $::selenium::DesiredCapabilities(FIREFOX)
    dict set capabilities platform "WINDOWS"
    dict set capabilities version "10"

    # Instantiate an instance of Remote WebDriver with the desired capabilities.
    set driver [::selenium::WebDriver new http:://localhost:$port $capabilities]
```

## 4. Driver
The driver object has these subcommands:
  - **start_client**

    Called before starting a new session. This method may be overridden to define custom startup behavior.

  - **start_session**

    Creates a new session with the desired capabilities.

    Arguments:
    -  desiredCapabilities: It's a dictionary with these keys:
        - browser_name - The name of the browser to request.
        - version - Which browser version to request.
        - platform - Which platform to request the browser on.
        - javascript_enabled - Whether the new session should support JavaScript.
        - browser_profile - A selenium.driver.firefox.firefox_profile.FirefoxProfile object. Only used if Firefox is requested.

  - **get**

    Loads a web page in the current browser session.

    Arguments:
    - url

  - **title**

    Returns the title of the current page.

    Usage:
    ```tcl
   	driver title
    ```

  - **execute_javascript** script args

    Executes JavaScript in the current window/frame synchronously or asynchronously.

    Arguments:
    - script: The JavaScript to execute.

    :Options:

    - arguments spec1? arg1? spec2? arg2?...: Pairs of json specifications and tcl values as arguments for your JavaScript.
    - async: Execute javascript asyncronously
    - command_var: Variable to store the new command for the element/s
    - returns_element: Flag indicating that the script returns an element
    - returns_elements: Flag indicating that the script returns a list of elements

    Usage:
    ```tcl
    	driver execute_javascript {return document.title}
    ```

  - **execute_script** script args

    Forward method to *execute_javascript"

  - **remove_webelement_from_DOM**

    It removes a webelement from DOM

    Arguments:
    - element_ID: The element ID of the webelement to remove

  - **get_base64_image**

    Arguments:
    - image_webelement

  - **is_select_element**

    Arguments:
    - element_ID

  - **tag_name**

    Gets this element's tagName property.

    Arguments:
    - element_ID

  - **get_visible_text**

    Gets the visible text of the element.

    Arguments:
    - element_ID

  - **get_text**

    Gets the text of the element.

    Arguments:
    - element_ID

  - **clear_text**

    Clears the text if it's a text entry element.

    Arguments:
    - element_ID

  - **get_attribute**

    Gets the given attribute or property of the element.

    This method will return the value of the given property if this is set,
    otherwise it returns the value of the attribute with the same name if
    that exists, or None.

    Arguments:
    - element_ID
    - attribute_name - Name of the attribute/property to retrieve.

    Example:

    Check if the "active" CSS class is applied to an element

    ```
    	set class_attribute	[$driver get_element_attribute $target_element class]
		set is_active [expr {[string first $class_attribute active]!=-1}]
    ```

  - **is_selected**

    Whether the element is selected.

    Can be used to check if a checkbox or radio button is selected.

    Arguments:
    - element_ID

  - **is_enabled**

    Whether the element is enabled.

    Arguments:
    - element_ID

  - **location_once_scrolled_into_view**

    CONSIDERED LIABLE TO CHANGE WITHOUT WARNING. Use this to discover where on the screen an
    element is so that we can click it. This method should cause the element to be scrolled
    into view.

    Returns the top lefthand corner location on the screen, or None if the element is not visible

    Arguments:
    - element_ID

  - **size**

    Returns the size of the element

    Arguments:
    - element_ID

  - **get_location**

    Returns the location of the element in the renderable canvas

    Arguments:
    - element_ID

  - **get_rect**

    Returns a dictionary with the size and location of the element

    Arguments:
    - element_ID

  - **page_source**

    Gets the source of the current page.

    Usage:
    ```tcl
    	driver page_source
    ```

  - **close**

    Closes the current window.

    Usage:
    ```tcl
    	driver close
    ```

  - **quit**

    Quits the driver and closes every associated window.

    Usage:
    	driver quit

  - **current_window_handle**

    Returns the handle of the current window.

    Usage:
    ```tcl
    	driver current_window_handle
    ```

  - **window_handles**

    Returns the handles of all windows within the current session.

    Usage:
    ```tcl
    	driver window_handles
    ```

  - **maximize_window**

    Maximizes the current window that driver is using

  - **back**

    Goes one step backward in the browser history.

    Usage:
    ```tcl
    	driver back
    ```

  - **forward**

    Goes one step forward in the browser history.

    Usage:
    ```tcl
    	driver forward
    ```

  - **refresh**

    Refreshes the current page.

  - **get_cookies**

    Returns a set of dictionaries, corresponding to cookies visible in the current session.

    Usage:
    ```tcl
    	driver get_cookies
    ```

  - **get_cookie** name

    Get a single cookie by name. Returns the cookie if found, None if not.

    Usage:
    ```tcl
        driver get_cookie 'my_cookie'
    ```

  - **delete_cookie**

    Deletes a single cookie with the given name.

    Arguments:
    - cookie_name

  - **add_cookie**

    Adds a cookie to your current session.

    Arguments:
    - cookie_dict: A dict object, with required keys: "name" and "value";

    <pre>
    optional keys - "path", "domain", "secure", "expiry"

    Key 		Type 		Description
    name 		string 		The name of the cookie.
    value 	    string 		The cookie value.
    path 		string 		(Optional) The cookie path.1
    domain 	    string 		(Optional) The domain the cookie is visible to.1
    secure 	    boolean 	(Optional) Whether the cookie is a secure cookie.1
    httpOnly 	boolean 	(Optional) Whether the cookie is an httpOnly cookie.1
    expiry 	    number 		(Optional) When the cookie expires, specified in seconds since midnight, January 1, 1970 UTC.1
    </pre>

    Usage:
    ```tcl
    	driver add_cookie  name foo  value bar
    	driver add_cookie  name foo  value bar  path /
    	driver add_cookie  name foo  value bar  path /  secure true
    ```

  - **delete_all_cookies**

    Delete all cookies in the scope of the session.

  - **freeze**

    Freeze element or container of webelements
    The command will not be deleted when the program execution leaves the frame

    Arguments:
    - varname

  - **implicitly_wait**

    Sets a sticky timeout to implicitly wait for an element to be found,
    or a command to complete. This method only needs to be called one
    time per session. To set the timeout for calls to
    execute_async_script, see set_script_timeout.

    Arguments:
    - time_to_wait: Amount of time to wait (in seconds)

    Usage:
    ```tcl
    	driver implicitly_wait 30
    ```
  - **set_script_timeout**

    Set the amount of time that the script should wait during an
    execute_async_script call before throwing an error.

    Arguments:
    - time_to_wait: The amount of time to wait (in seconds)

  - **set_page_load_timeout**

    Set the amount of time to wait for a page load to complete
    before throwing an error.

    Arguments:
    - time_to_wait: The amount of time to wait

    Usage:
    ```tcl
    driver set_page_load_timeout 30
    ```

  - **current_capabilities**

    returns the drivers current desired capabilities being used

  - **get_screenshot_as_file**

    Gets the screenshot of the current window. Returns False if there is
    any IOError, else returns True. Use full paths in your filename.

    Arguments:
    - filename: The full path you wish to save your screenshot to.

    Usage:
    ```tcl
    	driver get_screenshot_as_file /Screenshots/foo.png
    ```

  - **get_screenshot_as_png**

    Gets the screenshot of the current window as a binary data.

  - **get_screenshot_as_base64**

    Gets the screenshot of the current window as a base64 encoded string
    which is useful in embedded images in HTML.

    Usage:
    	driver get_screenshot_as_base64

  - **set_window_size**

    Sets the width and height of the current window.

    Arguments:
    - width: the width in pixels to set the window to
    - height: the height in pixels to set the window to
    - windowHandle (Optional): Default value current

    Usage:
    ```tcl
    	driver set_window_size 800 600
    ```

  - **get_window_size**

    Gets the width and height of the current window.

    Arguments:
    - windowHandle (Optional): Default value 'current'.

    Usage:
    ```tcl
        driver get_window_size
    ```

  - **set_window_position**

    Sets the x,y position of the current window. (window.moveTo)

    Arguments:
    - x: the x-coordinate in pixels to set the window position
    - y: the y-coordinate in pixels to set the window position
    - windowHandle (Optional). Default value is 'current'

    Usage:
    ```tcl
    	driver set_window_position 0 0
    ```

  - **get_window_position**

    Arguments:
    - windowHandle (Optional). Default value is 'current'

    Gets the x,y position of the current window.

  - **get_screen_orientation**

    Gets the current orientation of the device

  - **set_screen_orientation**

    Sets the current orientation of the device

    Arguments:
    - value: orientation to set it to.

    Usage:
    ```tcl
    	driver set_orientation "landscape"
    ```

  - **available_log_types**
    Gets a list of the available log types

    Usage:
    ```tcl
    	driver log_types
    ```

  - **get_log**

    Gets the log for a given log type

    Arguments:

    - log_type: type of log that which will be returned

    Usage:
     ```tcl
    	driver get_log browser
    	driver get_log driver
    	driver get_log client
    	driver get_log server
     ```

  - **alert_text**

    Gets the text of the Alert.

  - **dismiss_alert**

    Dismisses the alert available.

  - **accept_alert**

    Accepts the alert available.

    Usage::
    	driver accept_alert # Confirm a alert dialog.

  - **send_keys_to_alert**

    Send Keys to the Alert.

    Arguments:
    - keysToSend: The text to be sent to Alert.

  - **get_app_cache_status**

    Returns a current status of application cache.

  - **scroll_into_view**

    Scroll element into view

    Arguments:
    - element_ID

  - **scroll_to_bottom**

    scroll to bottom of webpage

  - **scrolling_position**

    Get the scrolling position

  - **scroll_to_bottom_infinitely**

    Scroll to bottom until condition provided is true or it's not possible to scroll more

    Arguments:
    - condition_command
    - timeout

  - **switch_to_default_frame**

    Switch focus to the default frame.

    Usage:
    ```tcl
    	driver switch_to_default_frame
    ```

  - **switch_to_frame**

    Switches focus to the specified frame, by index, name, or webelement.

    Arguments:
    - by
    - frame_reference: The name of the window to switch to, an integer representing the index,
    or a webelement that is an (i)frame to switch to.

    Usage:
    ```tcl
    	driver switch_to_frame -name $frame_name
    	driver switch_to_frame -index 1
    	driver switch_to_frame -element [[driver find_elements_by_tag_name iframe] index 0]
    ```

  - **switch_to_parent_frame**

    Switches focus to the parent context. If the current context is the top
    level browsing context, the context remains unchanged.

    Usage:
    ```tcl
    	driver switch_to_parent_frame
    ```

  - **switch_to_window**

    Switches focus to the specified window.

    Arguments:
    - window_name: The name or window handle of the window to switch to.

    Usage:
    ```tcl
    	driver switch_to_window main
    ```

  - **move_mouse_to**

    Move the mouse by an offset of the specificed element.
    If no element is specified, the move is relative to the current mouse cursor
    If an element is provided but no offset, the mouse will be moved to the center of the element.
    If the element is not visible, it will be scrolled into view.

    Arguments:
      - element: ID assigned to the webelement to move to, as described in the WebElement JSON Object.
      If not specified or is null, the offset is relative to current position of the mouse.

      - xoffset: X offset to move to, relative to the top-left corner of the element.
      If not specified, the mouse will move to the middle of the element.

      - yoffset: Y offset to move to, relative to the top-left corner of the element.
      If not specified, the mouse will move to the middle of the element.

    Usage:
    ```tcl
    	driver move_mouse_to 10 21 $element
    ```

  - **network_connection**

    ConnectionType is a bitmask to represent a device's network connection
    <PRE>
    Data | WIFI | Airplane
    0 	   0 	 1 			== 1
    1 	   1 	 0 			== 6
    1 	   0 	 0 			== 4
    0 	   1 	 0			== 2
    0 	   0 	 0 			== 0
    </PRE>

    Giving "Data" the first bit positions in order to give room for the future of enabling specific types of data (Edge / 2G, 3G, 4G, LTE, etc) if the device allows it.

  - **set_network_connection**

    Set the Connection type
    Not all connection type combinations are valid for an individual type of device
    and the remote endpoint will make a best effort to set the type as requested

  - **double_click**

    Make double click

  - **move_mouse**

    Moving the mouse to an offset from current mouse position.

    Arguments:
    - xoffset
    - yoffset

  - **move_mouse_to_element**

    Moving the mouse to the middle of an element, possibly adding some offsets

    - element_ID
    - xoffset (Optional)
    - yoffset (Optional)

  - **mouse_down**

    Press mouse button.

    Arguments:
    - buttonName

  - **mouse_up**

    Release mouse button

    Arguments:
    - buttonName

  - **find_element**

    Find element by strategy location

    Arguments:
    - strategy location:

   		-id
   		-xpath
   		-name
   		-link_text
   		-tag_name
   		-partial_link_text
   		-css
   		-class
   		-link_text
    - It's possible to find a descendant element from another element, indicating its element ID
    ```tcl
           -root *element_ID*
    ```
    - Build a new command if you want to apply several acctions to this element to avoid adding
    always its element ID. A new webelement object will be created.
    ```tcl
          - command_var *name_of_command_variable*
    ```

    Usage:
    ```tcl
   	driver find_element -css ".foo"
    ```

  - **find_elements**

    Finds elements by strategy location

    It has the same options than find_element.
    The option "-command_var" builds a container of webelements object.

    Usage:
    ```tcl
   	driver find_elements -css ".foo"
    ```

  - **find_element_by_id**

    Finds an element by id.

    Arguments:
    - id - The id of the element to be found.

    Usage:
    ```tcl
       $driver find_element_by_id foo
    ```

  - **find_elements_by_id**

    Finds multiple elements by id.

    Arguments:
    - id - The id of the elements to be found.

    Usage:
    ```
       $driver find_element_by_id foo
    ```

  - **find_element_by_xpath**

    Finds an element by xpath.

    Arguments:
    - xpath - The xpath locator of the element to find.

    Usage:
    ```tcl
       $driver find_element_by_xpath {//div/td[1 -level 1 {*}$args]}
    ```

  - **find_elements_by_xpath**

    Finds multiple elements by xpath.

    Arguments:
    - xpath - The xpath locator of the elements to be found.

    Usage:
    ```tcl
       $driver find_elements_by_xpath {//div[contains(@class, foo -level 1 {*}$args]}
    ```

  - **find_element_by_link_text**

    Finds an element by link text.

    Arguments:
    - link_text: The text of the element to be found.

    Usage:
    ```tcl
       $driver find_element_by_link_text {Sign In}
    ```

  - **find_elements_by_link_text**

    Finds elements by link text.

    Arguments:
    - link_text: The text of the elements to be found.

    Usage:
    ```tcl
       $driver find_elements_by_link_text 'Sign In'
    ```

  - **find_element_by_partial_link_text** link_text

    Finds an element by a partial match of its link text.

    Arguments:
    - link_text: The text of the element to partially match on.

    Usage:
    ```tcl
       $driver find_element_by_partial_link_text Sign
    ```

  - **find_elements_by_partial_link_text** link_text

    Finds elements by a partial match of their link text.

    Arguments:
    - link_text: The text of the element to partial match on.

    Usage:
    ```tcl
       $driver find_element_by_partial_link_text Sign
    ```

  - **find_element_by_name**

    Finds an element by name.

    Arguments:
    - name: The name of the element to find.

    Usage:
    ```tcl
       $driver find_element_by_name foo
    ```

  - **find_elements_by_name**

    Finds elements by name.

    Arguments:
    - name: The name of the elements to find.

    Usage:
    ```tcl
       $driver find_elements_by_name foo
    ```

  - **find_element_by_tag_name**

    Finds an element by tag name.

    Arguments:
    - tag_name: The tag name of the element to find.

    Usage:
    ```tcl
       $driver find_element_by_tag_name foo
    ```

  - **find_elements_by_tag_name**

    Finds elements by tag name.

    Arguments:
    - tag_name: The tag name the use when finding elements.

    Usage:
    ```tcl
       $driver find_elements_by_tag_name foo
    ```
  - **find_element_by_class_name**

    Finds an element by class name.

    Arguments:
    - class_name: The class name of the element to find.

    Usage:
    ```tcl
       $driver find_element_by_class_name foo
    ```

  - **find_elements_by_class_name**

    Finds elements by class name.

    Arguments:
    - class_name: The class name of the elements to find.

    Usage:
    ```tcl
       $driver find_elements_by_class_name foo
    ```

  - **find_element_by_css_selector**

    Finds an element by css selector.

    Arguments:
    - css_selector: The css selector to use when finding elements.

    Usage:
    ```tcl
       $driver find_element_by_css_selector #foo
    ```

  - **find_elements_by_css_selector**

    Finds elements by css selector.

    Arguments:
    - css_selector: The css selector to use when finding elements.

    Usage:
    ```tcl
       $driver find_elements_by_css_selector .foo
    ```

## 5. Expected conditions
It's possible to wait until some condition on the webpage happens.

For example, to wait 3 seconds until "seleninum is great" appears on the title of the window.
```tcl
    ::selenium::wait_until -driver $driver -condition [::selenium::expected_condition title_is "seleninum is great"] -timeout 4
```

If after this 3 seconds, the condition didn't happen a "Exception(Timeout)" is raised.

It's also possible to use this abbrevation `::selenium::EC`. For example, to wait 4 seconds until confirm_button
is nos present in the DOM:
```tcl
    ::selenium::wait_until -driver $driver -condition [::selenium::EC staleness_of $confirm_button] -timeout 4
```

This is a complete list of expected conditions:

   - **title_is** title

        An expectation for checking the title of a page.

        Arguments:
        - title: It's the expected title, which must be an exact match

   - **title_contains** text

        An expectation for checking that the title contains a case-sensitive substring.

        Arguments:
        - text: It's the fragment of title expected

   - **presence_of_element_located** by value element

        An expectation for checking that an element is present on the DOM
        of a page. This does not necessarily mean that the element is visible.

   - **visibility_of_element_located** by value

        An expectation for checking that an element is present on the DOM of a
        page and visible. Visibility means that the element is not only displayed
        but also has a height and width that is greater than 0.

    - **visibility_of** element

        An expectation for checking that an element, known to be present on the
        DOM of a page, is visible. Visibility means that the element is not only
        displayed but also has a height and width that is greater than 0.

        Arguments:
        - element: the element to wait of its visibility

    - **text_to_be_present_in_element** by value text

        An expectation for checking if the given text is present in the specified element by locator.

    - **text_to_be_present_in_element_value** by value text

        An expectation for checking if the given text is present in the element's locator, text

    - **element_has_this_attribute_value** element attribute_name attribute_value

        An expectation for checking if the given element has an specific attribute name and value

   - **frame_to_be_available_and_switch_to_it** optionName optionValue

        An expectation for checking whether the given frame is available to
        switch to.  If the frame is available it switches the given driver to the
        specified frame.

   - **invisibility_of_element_located** by value

        An Expectation for checking that an element is either invisible or not present on the DOM.
        In the case of NoSuchElement, returns true because the element is
        not present in DOM. The try block checks if the element is present but is invisible.

        In the case of StaleElementReference, returns true because stale element reference
        implies that element is no longer visible.

   - **invisibility_of_all_elements_located** by value

        An Expectation for checking that all elements indicated are invisible

   - **element_to_be_clickable** by value

        An Expectation for checking an element is visible and enabled such that you can click it.

   - **staleness_of** element

        Wait until an element is no longer attached to the DOM.

        Arguments:
        - element: The element to wait for.

   - **element_to_be_selected** element

        An expectation for checking the selection is selected.
        element is WebElement object

    - **element_located_to_be_selected** by value

        An expectation for the element to be located is selected.

    - **element_selection_state_to_be** element is_selected

        An expectation for checking if the given element is selected.

        Arguments:
        - element
        - is_selected: Boolean indicating whether to wait for select or not select

    - **element_located_selection_state_to_be** by value is_selected

        An expectation to locate an element and check if the selection state
        specified is in that state.

        Arguments:
        - by: The strategy of location
        - value: The parameter value for that strategy
        - is_selected: Boolean indicating whether to wait for select or not select

    - **alert_is_present**

        Expect an alert to be present.

## 6. Xvfb
Tcl wrapper to xvfb server.

Example of usage:
```tcl
   package require selenium::firefox
   package require xvfbwrapper

   set xvfb [::xvfb::Xvfb new -width 342 -height 234]
   $xvfb start
     set driver [::selenium::FirefoxDriver -binary \path\to\geckodriver]
     $driver get http://www.google.es
   $xvfb stop
```

## 7. Constants

### Mouse Buttons
We have these symbolic names for the mouse buttons in the selenium namespace:
```
    Mouse_Button(LEFT)
    Mouse_Button(MIDDLE)
    Mouse_Button(RIGHT)
```

### Keys
We have these symbolic keys in the selenenium namespace:

```
    Key(CANCEL)
    Key(HELP)
    Key(BACKSPACE)
    Key(TAB)
    Key(CLEAR)
    Key(RETURN)
    Key(ENTER)
    Key(SHIFT)
    Key(CONTROL)
    Key(ALT)
    Key(PAUSE)
    Key(ESCAPE)
    Key(SPACE)
    Key(PAGEUP)
    Key(PAGEDOWN)
    Key(END)
    Key(HOME)
    Key(LEFTARROW)
    Key(UPARROW)
    Key(RIGHTARROW)
    Key(DOWNARROW)
    Key(INSERT)
    Key(DELETE)
    Key(EQUALS)
    Key(NUMPAD0)
    Key(NUMPAD1)
    Key(NUMPAD2)
    Key(NUMPAD3)
    Key(NUMPAD4)
    Key(NUMPAD5)
    Key(NUMPAD6)
    Key(NUMPAD7)
    Key(NUMPAD8)
    Key(NUMPAD9)
    Key(MULTIPLY)
    Key(ADD)
    Key(SEPARATOR)
    Key(SUBTRACT)
    Key(DECIMAL)
    Key(DIVIDE)
    Key(F1)
    Key(F2)
    Key(F3)
    Key(F4)
    Key(F5)
    Key(F6)
    Key(F7)
    Key(F8)
    Key(F9)
    Key(F10)
    Key(F11)
    Key(F12)
    Key(META)
```

### StatusCache

These are the symbolic values for the status cache:
```
	StatusCache(UNCACHED)
    StatusCache(IDLE)
    StatusCache(CHECKING)
    StatusCache(DOWNLOADING)
    StatusCache(UPDATE_READY)
    StatusCache(OBSOLETE)
```

### Exceptions
List of exceptions:

```
    Exception(ConnectionRefused)
        Connection refused. It's not possible to reach webdriver server.

    Exception(ElementIsNotSelectable)
        An attempt was made to select an element that cannot be selected.

    Exception(ElementNotSelectable)
        Thrown when trying to select an unselectable element.

        For example, selecting a 'script' element.

    Exception(ElementNotVisible)
        Thrown when an element is present on the DOM, but
        it is not visible, and so is not able to be interacted with.

        Most commonly encountered when trying to click or read text
        of an element that is hidden from view.

    Exception(ErrorInResponse)
        Thrown when an error has occurred on the server side.

        This may happen when communicating with the firefox extension or the remote driver server.

    Exception(IMEEngineActivationFailed)
        Thrown when activating an IME engine has failed.

    Exception(IMENotAvailable)
        Thrown when IME support is not available. This exception is thrown for every IME-related
        method call if IME support is not available on the machine.

    Exception(InvalidCommandMethod)
        If a request path maps to a valid resource, but that resource does not respond to the request method,
        the server should respond with a 405 Method Not Allowed. The response must include an Allows header with a
        list of the allowed methods for the requested resource.

    Exception(InvalidCookieDomain)
        Thrown when attempting to add a cookie under a different domain
        than the current URL.

    Exception(InvalidElementCoordinates)
         The coordinates provided to an interactions operation are invalid.

    Exception(InvalidElementState)
        Thrown when an unexpected alert is appeared.

        Usually raised when when an expected modal is blocking webdriver form executing any
        more commands.

    Exception(InvalidSelector)
        Thrown when the selector which is used to find an element does not return
        a WebElement. Currently this only happens when the selector is an xpath
        expression and it is either syntactically invalid (i.e. it is not a
        xpath expression) or the expression does not select WebElements
        (e.g. "count(//input)").

    Exception(InvalidSwitchToTarget)
        Thrown when frame or window target to be switched doesn't exist.

    Exception(JavaScriptError)
        An error occurred while executing user supplied JavaScript.

    Exception(MissingCommandParameters)
        If a POST/PUT command maps to a resource that expects a set of JSON parameters, and the response body does
        not include one of those parameters, the server should respond with a 400 Bad Request.
        The response body should list the missing parameters.

    Exception(MoveTargetOutOfBounds)
        Thrown when the target provided to the `ActionsChains` move
        method is invalid, i.e. out of document.

    Exception(NoAlertOpen)
        An attempt was made to operate on a modal dialog when one was not open.

    Exception(NoSuchAttribute)
        Thrown when the attribute of element could not be found.

        You may want to check if the attribute exists in the particular browser you are
        testing against.  Some browsers may have different property names for the same
        property.  (IE8's .innerText vs. Firefox .textContent)

    Exception(NoSuchDriver)
        A session is either terminated or not started

    Exception(NoSuchElement)
        Thrown when element could not be found.

        If you encounter this exception, you may want to check the following:
        * Check your selector used in your find_by...
        * Element may not yet be on the screen at the time of the find operation,
        (webpage is still loading)

    Exception(NoSuchFrame)
        Thrown when frame target to be switched doesn't exist.

    Exception(NoSuchWindow)
        Thrown when window target to be switched doesn't exist.

        To find the current set of active window handles, you can get a list
        of the active window handles in the following way::

        puts [$driver window_handles]

    Exception(ScriptTimeout)
        A script did not complete before its timeout expired.

    Exception(SessionNotCreated)
        A new session could not be created.

    Exception(StaleElementReference)
        Thrown when a reference to an element is now "stale".

        Stale means the element no longer appears on the DOM of the page.

        Possible causes of StaleElementReferenceException include, but not limited to:
        * You are no longer on the same page, or the page may have refreshed since the element was located.
        * The element may have been removed and re-added to the screen, since it was located.
        Such as an element being relocated.
        This can happen typically with a javascript framework when values are updated and the node is rebuilt.
        * Element may have been inside an iframe or another context which was refreshed.

    Exception(Timeout)
        Thrown when a command does not complete in enough time.

    Exception(UnableToSetCookie)
        Thrown when a driver fails to set a cookie.

    Exception(UnexpectedAlertOpen)
        Thrown when an unexpected alert is appeared.

        Usually raised when when an expected modal is blocking webdriver form executing any
        more commands.

    Exception(UnexpectedTagName)
        Thrown when a support class did not get an expected web element.

    Exception(UnknownCommand)
        The requested resource could not be found, or a request was received using an HTTP method that is not
        supported by the mapped resource.

    Exception(UnknownError)
         An unknown server-side error occurred while processing the command.

    Exception(WebdriverException)
        Unknown webdriver exception

    Exception(XPathLookupError)
         An error occurred while searching for an element by XPath.
```

repository: gromgit/selenium-tcl

repo_name: gromgit/selenium-tcl


text:
---
Module Name: PnP.PowerShell
schema: 2.0.0
applicable: SharePoint Online
online version: https://pnp.github.io/powershell/cmdlets/Add-PnPSiteDesign.html
external help file: PnP.PowerShell.dll-Help.xml
title: Add-PnPSiteDesign
---

# Add-PnPSiteDesign

## SYNOPSIS

**Required Permissions**

* SharePoint: Access to the SharePoint Tenant Administration site

Creates a new Site Design on the current tenant

## SYNTAX

### By SiteScript Instance (Default)

```powershell
Add-PnPSiteDesign -Title <String> -SiteScript <TenantSiteScriptPipeBind> [-Description <String>] [-IsDefault]
 [-PreviewImageAltText <String>] [-PreviewImageUrl <String>] [-WebTemplate <SiteWebTemplate>]
 [-ThumbnailUrl <String>] [-DesignPackageId <Guid>] [-Connection <PnPConnection>]
```

### By SiteScript Ids

```powershell
Add-PnPSiteDesign -Title <String> -SiteScriptIds <Guid[]> [-Description <String>] [-IsDefault]
 [-PreviewImageAltText <String>] [-PreviewImageUrl <String>] [-WebTemplate <SiteWebTemplate>]
 [-ThumbnailUrl <String>] [-DesignPackageId <Guid>] [-Connection <PnPConnection>]
```

## DESCRIPTION

Allows to add a new Site Design on the current tenant.

## EXAMPLES

### EXAMPLE 1
```powershell
Add-PnPSiteDesign -Title "My Company Design" -SiteScriptIds "e84dcb46-3ab9-4456-a136-66fc6ae3d3c5","6def687f-0e08-4f1e-999c-791f3af9a600" -Description "My description" -WebTemplate TeamSite
```

Adds a new Site Design, with the specified title and description. When applied it will run the scripts as referenced by the IDs. Use Get-PnPSiteScript to receive Site Scripts. The WebTemplate parameter specifies that this design applies to modern Team Sites.

### EXAMPLE 2
```powershell
Add-PnPSiteDesign -Title "My Company Design" -SiteScriptIds "e84dcb46-3ab9-4456-a136-66fc6ae3d3c5","6def687f-0e08-4f1e-999c-791f3af9a600" -Description "My description" -WebTemplate TeamSite -ThumbnailUrl https://contoso.sharepoint.com/sites/templates/siteassets/logo.png
```

Adds a new Site Design, with the specified title, description and logo to be shown in the template picker. When applied it will run the scripts as referenced by the IDs. Use Get-PnPSiteScript to receive Site Scripts. The WebTemplate parameter specifies that this design applies to modern Team Sites.

### EXAMPLE 3
```powershell
Add-PnPSiteDesign -Title "My Company Design" -SiteScriptIds "e84dcb46-3ab9-4456-a136-66fc6ae3d3c5","6def687f-0e08-4f1e-999c-791f3af9a600" -Description "My description" -WebTemplate TeamSite -ThumbnailUrl "https://contoso.sharepoint.com/sites/templates/my images/logo.png"
```

Adds a new Site Design, with the specified title, description and logo to be shown in the template picker. When applied it will run the scripts as referenced by the IDs. Use Get-PnPSiteScript to receive Site Scripts. The WebTemplate parameter specifies that this design applies to modern Team Sites. Notice that when the location for the ThumbnailUrl contains a space, it should be provided URL decoded, so i.e. no %20 for spaces.

### EXAMPLE 4
```powershell
Get-PnPSiteScriptFromWeb -IncludeAll | Add-PnPSiteScript -Title "My Site Script" | Add-PnPSiteDesign -Title "My Site Design" -WebTemplate TeamSite
```

Adds a new Site Design based on the currently connected to site, with the specified title to be shown in the template picker.

## PARAMETERS

### -Confirm
Prompts you for confirmation before running the cmdlet.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

```yaml
Type: PnPConnection
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Description
The description of the site design

```yaml
Type: String
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -IsDefault
Specifies that the site design is a default site design

```yaml
Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -PreviewImageAltText
Sets the text for the preview image. This was used in the old site designs approach and currently has no function anymore.

```yaml
Type: String
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -PreviewImageUrl
Sets the url to the preview image. This was used in the old site designs approach and currently has no function anymore. Use ThumbnailUrl instead.

```yaml
Type: String
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -SiteScript
An instance, id or title of a site script to use for the site design

```yaml
Type: TenantSiteScriptPipeBind
Parameter Sets: By SiteScript Instance

Required: True
Position: Named
Default value: None
Accept pipeline input: True
Accept wildcard characters: False
```

### -SiteScriptIds
An array of guids of site scripts to use for the site design

```yaml
Type: Guid[]
Parameter Sets: By SiteScript Ids

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Title
The title of the site design

```yaml
Type: String
Parameter Sets: (All)

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -WebTemplate
Specifies the type of site to which this design applies

```yaml
Type: SiteWebTemplate
Parameter Sets: (All)
Accepted values: TeamSite, CommunicationSite, GrouplessTeamSite, ChannelSite

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ThumbnailUrl
The full URL of a thumbnail image, i.e. https://contoso.sharepoint/siteassets/image.png. If none is specified, SharePoint uses a generic image. Recommended size is 400 x 300 pixels. This is the image that will be shown when selecting a template through "Apply a site template" or "Browse templates" shown in "Start designing your site" shown when creating a new site. If there are spaces in the URL, do not URL encode them, so i.e. do not use %20 where there is a space, but instead just provide the link with the space inside.

```yaml
Type: String
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -DesignPackageId
Sets the design package Id of this site design.

```yaml
Type: Guid
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

## RELATED LINKS

[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)

license: MIT

repository: radityoardi/PnP-PowerShell

branch_name: refs/heads/dev

extension: md

gha_license_id: NOASSERTION

license_type: permissive

repo_name: radityoardi/PnP-PowerShell


text:
# NSVAnimatedTabBar

[![CI Status](https://img.shields.io/travis/Narek1994/NSVAnimatedTabBar.svg?style=flat)](https://travis-ci.org/Narek1994/NSVAnimatedTabBar)
[![Version](https://img.shields.io/cocoapods/v/NSVAnimatedTabBar.svg?style=flat)](https://cocoapods.org/pods/NSVAnimatedTabBar)
[![License](https://img.shields.io/cocoapods/l/NSVAnimatedTabBar.svg?style=flat)](https://cocoapods.org/pods/NSVAnimatedTabBar)
[![Platform](https://img.shields.io/cocoapods/p/NSVAnimatedTabBar.svg?style=flat)](https://cocoapods.org/pods/NSVAnimatedTabBar)

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements

Swift 5.0

## Installation

NSVAnimatedTabBar is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'NSVAnimatedTabBar'
```

## About

NSVAnimatedTabBar is fully customizable animated tab bar where center item can be used for more options to show.

## Usage

NSVAnimatedTabBar constructed on 5 protocols, so you will need to create corresponding realization of that protocols to be able to use animated tab bar. You can customize almost everything.

Confirm to ```NSVAnimatedTabControllerDelegate```  to get each tab or center item sub option selection.

**NSVAnimatedTabOptions**

Main protocol to provide all all neccesary information.

```tabHeight: CGFloat```
Height for tab bar

```tabInsets: UIEdgeInsets```
Insets for tab bar

```tabBackgroundColor: UIColor```
Tab bar background color

```selectedItemColor: UIColor```
Tab bar selected item color

```unselectedItemColor: UIColor```
Tab bar unselected item color

```cornerRadius: CGFloat```
Tab bar corner radius

```corners: [RadiusCorners]```
Tab bar curved corners

```unselectedItemColor```
Tab bar unselected item color

```shadowInfo: ShadowInfo```
Set this to have a shadow on top of tab bar

```options: [NSVTabItemOptions]```
Array of tab bar items

```animationOptions: NSVTabAnimationOptions```
Animation options of tab bar

```centerItemOptions: NSVCenterItemOptions```
Option for tab bar's center item

```coverAlpha: CGFloat```
Alpha value for cover view when center item is selected

```mainBackgroundColor: UIColor?```
Background color for main view, will be visible for curved tab bar and if  ```tabInsets```  is set to none zero. Set to nil if you want to automatically have a same color as selected view controller's view

**NSVTabAnimationOptions**

Animation protocol to provide main animation options.

```mainAnimationDuration: Double```
Center item and tab bar animation duration

```options: UIView.AnimationOptions```
Center item and tab bar animation options

```usingSpringWithDamping: CGFloat```
Center item and tab bar animation spring and damping value

```initialSpringVelocity: CGFloat```
Center item and tab bar animation initial spring velocity

```delay: Double```
Center item and tab bar animation delay

```tabMovePercentage: CGFloat?```
Tab bar change percentage based of it's height, set to 1 if you want to fully hide it, or nil, if you don't want an animation.

```centerItemMovePercentage: CGFloat?```
Center item change percentage based of it's height, set nil, if you don't want an animation.

```subOptionsAnimationtype: SubOptionsAnimationType```
Center item sub options animation type:
```.basic```  - first gif, just hides/shows all sub items at the same time.
```.fading```  - second gif, hides/shows one by one with changing each item alpha.
```.movingByOne```  - third gif, hides/shows one by one, with scaling, if needed.

```tabSelectionAnimationType: TabSelectionAnimationType```
Each tab selection animation, used also to animate center item selection/deselection, can be none.

```shouldAnimateScreenChanges: Bool```
Should animate selected view controller change.

**NSVTabItemOptions**

Tab bar each item options

```title: String?```
Tab bar item title, set nil, if you want to have only image

```image: UIImage?```
Tab bar item image, set nil, if you want to have only title

```selectedImage: UIImage?```
Tab bar selected item image, if set to nil, it will use provided selectedItemColor(use template mode images, if you want to have color changes for an image)

```itemInsets: UIEdgeInsets```
Tab bar item insets

```spacing: CGFloat?```
Spacing between image and title

```font: UIFont?```
Tab bar item title font

**NSVCenterItemOptions**

Center item options.

```size: CGSize```
Center item size

```subOptionsSize: CGSize```
Center item sub options size

```insets: UIEdgeInsets```
Center item insets

```options: NSVTabItemOptions```
Center item configuration option, similar to tab bar items.

```subOptions: [NSCenterItemSubOptions]```
Array of center item's sub options

```backgroundColor: UIColor```
Center item background color

```cornerRadius: CGFloat```
Center item corner radius, set to size.width/2 to have rounded button

```shadowInfo: ShadowInfo?```
Center item shadow

```distributionType: SubOptionsDistributionType```
Center item sub options layout options
For example ```.custom(itemsSpacing: 40, minYOffset: 50, maxYOffset: 50)```
```itemsSpacing``` - spacing between items X axis
```minYOffset``` - minimal position for Y axis
```maxYOffset``` - maximal position for Y axis
set ```minYOffset``` and ```maxYOffset``` to equal values, if you want to have sub options on the same line

```curveType: CurveType```
Set to .bottom if you want to have a curve under center item

**NSVCenterItemSubOptions**

Center item sub options

```image: UIImage```
Sub option image

```backgroundColor: UIColor```
Sub option background color

```cornerRadius: CGFloat```
Sub option corner radius

```shadowInfo: ShadowInfo```
Sub option shadow

Check an example app, to see NSVAnimatedTabBar in usage.

## What's next

Animations, Animations, Animations. I will try to add more animations for everything(item selection, sub option's appearance, etc...), add top curve option for center item, add option to open new screen instead of sub options, etc...

## Author

Narek1994<EMAIL_ADDRESS>
https://www.linkedin.com/in/narek-simonyan-b3974b120/

## License

NSVAnimatedTabBar is available under the MIT license. See the LICENSE file for more info.

repository: mfarghal/NSVAnimatedTabBar

branch_name: refs/heads/master

repo_name: mfarghal/NSVAnimatedTabBar


text:
# NFLSCORES

This is a simple command-line utility which scrapes all of the NFL scores
and dumps them to the terminal in CSV format. This utility was written over
a weekend for a friend, and will likely not see active development again
unless somebody opens an issue.

## Installing

`go get git.sr.ht/~ocelotsloth/nflscores/nflscores` should get you where you
need to go.

You will need to install golang first, of course. At this time I will not
be distributing precompiled binaries.

## Usage

Simply type `nflscores` after installing the binary. To bring up the help
message.

## Architecture

Note that the library I defined is in the `git.sr.ht/~ocelotsloth/nflscores`
package, while the actual executable command is defined in the
`git.sr.ht/~ocelotsloth/nflscores/nflscores` package. You need to install the
executable to work with this tool. Look in that directory for the `main.go`
file if you are looking to read how this tool functions.

repository: ocelotsloth/nflscores

gha_language: Go

gha_license_id: MIT

repo_name: ocelotsloth/nflscores


text:
![Icon](https://github.com/geeklearningio/gl-vsts-tasks-azure/blob/master/Extension/extension-icon.png)

# Microsoft Azure Build and Release Tasks

[![Build status](https://geeklearning.visualstudio.com/gl-github/_apis/build/status/Azure%20Pipelines%20Tasks/gl-vsts-tasks-azure)](https://geeklearning.visualstudio.com/gl-github/_build/latest?definitionId=37)

Visual Studio Team Services Build and Release Management extensions that help you to build and publish your applications on Microsoft Azure.

[Learn more](https://github.com/geeklearningio/gl-vsts-tasks-azure/wiki) about this extension on the wiki!

## Tasks included

* **[Azure Web App Slots Swap](https://github.com/geeklearningio/gl-vsts-tasks-azure/wiki/Azure-Web-App-Slots-Swap)**: Swap two deployment slots of an Azure Web App
* **[Azure Web App Start](https://github.com/geeklearningio/gl-vsts-tasks-azure/wiki/Azure-Web-App-Start)**: Start an Azure Web App, or one of its slot
* **[Azure Web App Stop](https://github.com/geeklearningio/gl-vsts-tasks-azure/wiki/Azure-Web-App-Stop)**: Stop an Azure Web App, or one of its slot
* **[Azure SQL Execute Query](https://github.com/geeklearningio/gl-vsts-tasks-azure/wiki/Azure-SQL-Execute-Query)**: Execute a SQL query on an Azure SQL Database
* **[Azure SQL Database Restore](https://github.com/geeklearningio/gl-vsts-tasks-azure/wiki/Azure-SQL-Database-Restore)**: Restore an Azure SQL Database to another Azure SQL Database on the same server using the latest point-in-time backup
* **[Azure SQL Database Incremental Deployment](https://github.com/geeklearningio/gl-vsts-tasks-azure/wiki/Azure-SQL-Database-Incremental-Deployment)**: Deploy an Azure SQL Database using multiple DACPAC and performing incremental deployments based on current Data-Tier Application version
* **[Azure Copy Files](https://github.com/geeklearningio/gl-vsts-tasks-azure/wiki/AzCopy)**: Copy blobs across Azure Storage accounts using AzCopy

## To contribute

1. Globally install typescript and tfx-cli (to package VSTS extensions): `npm install -g typescript tfx-cli`
2. From the root of the repo run `npm install`. This will pull down the necessary modules for the different tasks and for the build tools.
3. Run `npm run build` to compile the build tasks.
4. Run `npm run package -- --version <version>` to create the .vsix extension packages (supports multiple environments) that includes the build tasks.

## Release Notes

> **10-24-2016**
> - Added: AzCopy Tool Task

> **8-19-2016**
> - Added: Azure SQL Database Incremental Deployment

> **8-1-2016**
> - Added: Azure SQL Execute Query
> - New build tools for all GL tasks

> **7-31-2016**
> - Added: Azure RM Support

## Contributors

This extension was created by [Geek Learning](http://geeklearning.io/), with help from the community.

## Attributions

* [AzureWebPowerShellDeployment icon from the VSTS Tasks project](https://github.com/Microsoft/vsts-tasks)
* [SqlAzureDacpacDeployment icon from the VSTS Tasks project](https://github.com/Microsoft/vsts-tasks)
* [Lightning by Carla Dias from the Noun Project](https://thenounproject.com/search/?q=lightning&i=542899)
* [Restore by Arthur Shlain from the Noun Project](https://thenounproject.com/search/?q=restore&i=52760)
* [Trade by Michelle Fosse from the Noun Project](https://thenounproject.com/search/?q=swap&i=560173)
* [Stop by NAS from the Noun Project](https://thenounproject.com/search/?q=stop&i=55668)
* [Play by NAS from the Noun Project](https://thenounproject.com/search/?q=play&i=55667)
* [Checkmarks by Matt Saling from the Noun Project](https://thenounproject.com/search/?q=Checkmarks&i=202337)

repository: geeklearningio/gl-vsts-tasks-azure

gha_language: PowerShell

repo_name: geeklearningio/gl-vsts-tasks-azure


text:
---
layout: post
title:  "Neural Process"
date:   2018-08-30 14:51:59
author: Sungwon Lyu
categories: studies
tags: deep-learning deep-learning
---
## WHY?
Gaussian process has several advantages. Based on robust statistical assumptions, GP does not require expensive training phase and can represent uncertainty of unobserved areas. However, HP is computationally expensive. Neural process tried to combine the best of Gaussian process and neural network.

## WHAT?
Neural process satisfy two condtions of stochastic process: exchageability and consistency. To represent GP with neural network, stochastic process F can be parameterised by random vector z.

![image](/assets/images/np1.png){: .body-image}

$$
F(x) = g(x, z)\\
p(z, y_{1:n}|x_{1:n}) = p(z)\prod^n_{i=1} N(y_i|g(x_i, z), \sigma^2)
$$

We can split the dataset into a context set $$x_{1:m}, y_{1:m}$$ and a target set $$x_{m+1:n}, y_{m+1:n}$$. Variational inference is used to estimate the log likelihood, and intractable conditional prior $$p(z|x_{1:m}, y_{1:m})$$ is approximated using another variational inference.

$$
\log p(y_{m+1:n}|x_{1:n}, y_{1:m}) \geq \mathbb{E}_{q(z|x_{1:n},y_{1:n})}[\sum^n_{i=m+1}\log p(y_i|z, x_i) + \log\frac{p(z|x_{1:m}, y_{1:m})}{q(z|x_{1:n},y_{1:n})}] \geq \\
\mathbb{E}_{q(z|x_{1:n},y_{1:n})}[\sum^n_{i=m+1}\log p(y_i|z, x_i) + \log\frac{q(z|x_{1:m}, y_{1:m})}{q(z|x_{1:n},y_{1:n})}]
$$

![image](/assets/images/np2.png){: .body-image}

To train this model to represent the distribution of functions, dataset have to be divided into context points and target points. Encoder parameterized with a neural network takes pairs of context points($$x_i, y_i$$) and produce each representation $$r_i$$. In order to represent order-invariant global representation r, aggregator takes means of each representation.

$$
z\sim N(\mu(r), I\sigma(r))\\
r = a(r_i) = \frac{1}{n}\sum_{i=1}^n r_i
$$

A conditional decoder takes a global latent variable and new target locations to make prediction.

## So?
NP showed fine performance on 1-D function regression, 2-D function regression, black-boc optimiation with thompson sampling, and contextual bandits.

## Critic
Frankly, I think I need to implement this in order to fully understand this.

[Garnelo, Marta, et al. "Neural processes." arXiv preprint arXiv:1807.01622 (2018).](https://arxiv.org/abs/1807.01622)

extension: markdown

gha_language: HTML


text:
# Native Regex Tool

An executable tool to allow the compiling of Regex engines into programming language source code.

Pleas see the [this](https://github.com/ray33ee/native-regex-lib) repository for more information.


text:
#Inspur ICKS
## Prepare

1. Prepare at least three node with an operation system.
2. Upload ICKS installation package to the master node on which you are running the deploy scripts.

## Installation

1. Planning your cluster , insert or modify the node information into file `tmp/inventory.ini` and insert node name to corresponding group.For example if you want a node named k8s1 to be the k8s master, you need insert k8s1 below "[kube-master]".
2. Execute the following commands
```
# user means linux username
# password means the linux password
# localNodeIP means the ip address of the node where you execute the command
$ bash setup.sh -u <user> -p <password>-i <localNodeIP> -m icks cluster
```
3. After all process complete, all the nodes will reach "Ready" status and pods will reach "Running" status.

## Run Conformance Test

1. Download a binary release of the sonobuoy CLI from https://github.com/heptio/sonobuoy/releases：
```
$ sonobuoy run --mode=certified-conformance
```

2. Get the results:
```
$ outfile=$(sonobuoy retrieve)
$ mkdir ./results; tar xzf $outfile -C ./results
```

3. Then grab `plugins/e2e/results/global/{e2e.log,junit_01.xml}` from results folder, add them to this PR.


text:
---
layout: post
title: ! 'Issue #15'
author: ceberhardt
---

## Latest News

### [Making WebAssembly even faster: Firefox’s new streaming and tiering compiler](https://hacks.mozilla.org/2018/01/making-webassembly-even-faster-firefoxs-new-streaming-and-tiering-compiler/)

MOZILLA.ORG

When you see  new blog post from Lin Clark appear, you know you're in for a treat! - In this post Lin discusses how the design of WebAssembly allows compilation to start before the entire module is downloaded. Mozilla now compiles WebAssemby across multiple threads in parallel, allowing it to compile faster than the network can deliver the code!

### [Oxidizing Source Maps with Rust and WebAssembly](https://hacks.mozilla.org/2018/01/oxidizing-source-maps-with-rust-and-webassembly/)

MOZILLA.ORG

This is another great (and epic) post from Mozilla, here Nick and Tom describe the work they've been doing to take the source-map JavaScript library and migrate it to Rust. This allows them to compile it to WebAssembly resulting in a x5 performance boost. This highly detailed blog post shares their findings.

### [Mono and WebAssembly - Updates on Static Compilation](http://www.mono-project.com/news/2018/01/16/mono-static-webassembly-compilation/)

MONO-PROJECT.COM

The Mono team have been exploring two different approaching to bringing C# to the web, the first is a WebAssembly interpreter that processes the .NET Intermediate Language within the browser. The second, more efficient, approach is static compilation of C# into WebAssembly. This blog post gives an update on how this work is progressing.

### And Finally ...

The Meltdown / Spectre fixes that broke WebAssembly on iOS [are fixed and will be with us soon](https://github.com/kripken/emscripten/issues/6042#issuecomment-356412040)!

repository: ColinEberhardt/wasmweekly

repo_name: ColinEberhardt/wasmweekly


text:
[This document is automatically generated. All changed made to it WILL be lost]: <>

# SQL Server Rule: SRD0050

|    |    |
|----|----|
| Assembly | SqlServer.Rules.dll   |
| Namespace | SqlServer.Rules.Design |
| Class | AvoidStaticPredicateCompareRule |

## Rule Information

|    |    |
|----|----|
| Id | SRD0050 |
| Friendly Name | Expression reducible to constaint |
| Category | Design |
| Ignorable | true |
| Applicable Types | Procedure  |
|   | Scalar Function |
|   | Table Valued Function |
|   | View |

## Description

The comparison expression always evaluates to TRUE or FALSE.

## Summary

The comparison expression always evaluates to TRUE or FALSE

### Examples

Catches:
```sql
FROM a
JOIN b ON a.id = b.a_id AND 4 < 3 + 2
```

equivalent to
```sql
FROM a
JOIN b ON a.id = b.a_id /* true */
```


text:
# README

The Rook/Ceph dashboards were found through [this page](https://rook.io/docs/rook/v1.6/ceph-monitoring.html).

- Ceph cluster: https://grafana.com/dashboards/2842
- Ceph OSD (Single): https://grafana.com/dashboards/5336
- Ceph pools: https://grafana.com/dashboards/5342

repository: DutchEllie/compliantkubernetes-apps

branch_name: refs/heads/main

repo_name: DutchEllie/compliantkubernetes-apps


text:
# DiceTechJobs - Relevancy Tuning
Dice.com tutorial on using black box optimization algorithms to tune your Solr search engine configuration, by Simon Hughes ( Dice Data Scientist ). See _'Automated Relevancy Tuning using Black Box Optimization Algorithms.ipynb'_ for Jupyter Notebook tutorial on using black box optimization algorithms from sci-kit optimize to tune your solr config. Example fake Dice jobs data and a solr core are provided for this example. They are not representative of our real data, nor of our actual Solr search implementation.

## Required software
Solr (Solr core is for 5.0+, for earlier solr versions or later ones, you will need to modify the configs and re-index the data from the notebook).

Python 2.7

Python libraries:
* solrpy
* pandas
* numpy
* scikit-optimize

[Slides from my talk](http://www.slideshare.net/SimonHughes13/evolving-the-optimal-relevancy-ranking-model-at-dicecom)

[Video of my talk](https://www.youtube.com/watch?v=z4c1xU7arhc&index=24&list=PLU6n9Voqu_1F1Skr8qlaO8_VtF4D8JEhm)

## Related Projects
* https://github.com/mitre/quaerite - uses a GA to optimize Solr parameters

repository: sony-git/RelevancyTuning

repo_name: sony-git/RelevancyTuning


text:
---
type: TutorialStep
date: 2021-05-20
title: Walking Through Your Spring Boot Project
technologies: []
topics: []
author: hs
subtitle: Let's take a look at what IntelliJ IDEA has created for us and why.
thumbnail: ./thumbnail.png
longVideo:
  poster: ./poster_long.png
  url: https://youtu.be/XkO1ana4nqI
---

## Project Walk-through
In the previous step we asked IntelliJ IDEA to create us a Spring Boot project with **Spring Web** as a dependency. Let's now take a look at what has been automatically created, so that we can build on that understanding in the next step.

Let's take a look around some aspects of the project. The easiest way to do this is from the Project tool window which you can access with **⌘1** on macOS, or **Ctrl**+**1** on Windows and Linux. We will look at:

- The .mvn Folder
- The pom.xml File
- HelloWorldApplication.java
- HelloWorldApplicationTests.java

### The .mvn Folder
This folder has been created because Spring Boot uses the Maven wrapper when you create a Spring Boot project with the Maven build system. This means you don't have to install Maven locally to run your Spring Boot project.

### The Maven pom.xml File
This file is generated with the dependencies that you selected when we created this project.

```xml
<dependencies>
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
  </dependency>

  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-test</artifactId>
    <scope>test</scope>
  </dependency>
</dependencies>
```
The first dependency on ```spring-boot-starter-web``` is there because we selected **Spring Web** as a dependency. The second dependency on ```spring-boot-starter-test``` is something you get with any Spring application. It gives you the ability to create tests with various testing libraries.

It's very easy to add dependencies to your ```pom.xml``` file once you have created your Project. Use **⌘N** (macOS), or **Alt+Ins** (Windows/Linux) and then browse for your dependency. However, for our demo, these are the only dependencies that we need.

### The SpringHelloWorldDemoApplication.java File
Inside your **main** > **java** > **com.example.helloworld** file structure you'll see your `HelloWorldApplication.java` file. Let's take a look in more detail.

This is what your Java file will look like. The name will be whatever your called the file with _Application_ appended to it.

```java
package com.example.helloworld;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class HelloWorldApplication {

    public static void main(String[] args) {
        SpringApplication.run(HelloWorld.class, args);
    }
}
```

We've got our package at the top of the class as you'd expect followed by our import statements.

This `@SpringBootApplication` annotation  enables additional Spring Boot functionality which is useful to know in case you find yourself troubleshooting your code.

The main line here is:
`SpringApplication.run(HelloWorldApplication.class, args);`

This makes a call to SpringBoot's `run` method, and we need to pass the main class of our project to Spring, in this case, it's the same class.

When you run this method, Spring looks at what Maven has pulled in to the class path from the dependencies in our pom.xml file among other things, and makes assumptions about the shape of your project from there.  Transitive dependencies are dependencies that your dependencies are reliant on.

For example, we have a dependency in our Maven pom.xml called  `spring_boot_starter_web`. That in turn, has a transitive dependency on `spring-boot-starter-tomcat`. In this instance, when the Spring `run` method is called, it checks the class path and your `application.properties` file (which is empty) among other things, and sees that you want a Tomcat webserver, so it creates one for you.

### The HelloWorldApplicationTests.java File
If you head down to the **test** > **java** > **com.example.springhelloworlddemo** folder you'll see you have another class called ```SpringHelloWorldDemoApplicationTests.java```. This is a test you get for free with Spring Boot. It checks if the Application Context can start, it will fail if not. The test can be a useful starting point for creating your own integration tests.

## Running your Spring Boot Application
We have the basics of our Spring Boot Application at this point. You can run it with **Ctrl**+**R** (macOS), or **Shift**+**F10** (Windows/Linux). Alternatively you can use the gutter icons:

![Gutter icon to run the application](gutter-icon-run-application.png)

The application will run using the Tomcat webserver. You can verify it's working by going to your web browser and typing `localhost:8080`. Port 8080 is the default port for Tomcat.

You should get a 404 response which will look similar to this:

![White label 404 response](white-label-404-response.png)

We're getting this page because we have support for REST Controllers with the `spring-boot-starter-web` dependency, but we also need to create a controller and add a request mapping for that controller. We will do both of those things in the next step.

Lastly, before we do any more development it's a good idea to stop your server from running. You can do this with **⌘F2** (macOS), or **Ctrl**+**F2** on Windows and Linux.


text:
---
id: 99
title: Links of the Day
date: 2018-04-10T12:12:45+00:00
author: Alex C-G
guid: http://remix.zone/?p=99
permalink: /2018/04/10/links-of-the-day-6/
categories:
  - Links
tags:
  - links
---
  * [The evolutionary advantage of having eyebrows](http://theconversation.com/the-evolutionary-advantage-of-having-eyebrows-94599)
  * [What makes a tree a tree?](https://www.knowablemagazine.org/article/living-world/2018/what-makes-tree-tree)
  * [Dead medium: Eighteenth Century English mail hacks](http://www.deadmedia.org/notes/6/061.html)
  * [The Relativity of Wrong By Isaac Asimov](http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm)
  * [Beautiful Lofty Things: The Practice of Mathematics](https://video.ias.edu/The-Practice-of-Mathematics)


text:
# JavaScript Debugging Exercise

Our team has been asked to create a premium advertising experience for MegaBaby SuperWipes™. The ad experience should allow users to drag and drop labels into two columns, allowing our loyal customers to vote with their minds and mice. They're hoping to get a sense of how well they are executing their refreshed company goals in the wake of the Great MegaBaby Warehouse Wipeout Incident of 2017.

<img width="556" alt="megababy_start" src="https://user-images.githubusercontent.com/848147/40733513-718dc0ec-63fb-11e8-9b08-5235cc6b6a04.png">

The design team has created an amazing mockup for us, and our code is almost there! The CSS and HTML is bulletproof, thankfully.

But we're using the lovely [dragula](https://bevacqua.github.io/dragula/) open-source drag & drop JavaScript library — and we're having some problems:

## The Problems

1. The dragging doesn't work yet 😱 this feature is pretty important to this advertising experience!
1. We've written some CSS to target cards that are being dragged with the `.is-moving` class, which adds a grimacing emoji. It's supposed to be applied using JavaScript so that it appears in the "landing zone" ghost-looking card below the one attached to the user's mouse, [like in this screenshot](https://www.dropbox.com/s/vpqu6l8qhhd2d7n/megababy_dragging.png?dl=0). But it isn't working, because the same emoji _before_ the drag action persists. Help!
1. When a card is dropped in a column, the big emoji below the heading is supposed to change to be a smiley (if there are more "Yes" than "No" cards), a sad little face (if the "No" cards outnumber the "Yes" cards), or a grimacing face (if there are an equal number of "Yes" and "No" cards). [Just like this screenshot](https://www.dropbox.com/s/13a4aaq09wv5ysp/megababy_complete.png?dl=0). But we seem to be getting a JavaScript error.
1. Even when the JavaScript isn't erroring out, the emoji still isn't getting updated below the header. The advertiser _really_ wants this feature, so it would be ideal if we could ship a working version.
1. We're pretty sure after #4 is fixed, the emoji is updating! But it doesn't seem to be updating to the correct emoji, as stated as the specifications in #3. Let's try to get this last detail squared away, and the client will be so excited.

## Instructions

- Debug the JavaScript code to attempt to fix as many issues as you can. Don't worry if you can't get around to fixing everything; we're more interested in hearing about your process.
- Don't worry about digging too deep into the `dragula` docs. There are two things you should take note of: the query selectors we are targeting in the HTML, and the specific events `dragula` provides for callbacks.

## Expected questions and discussion

- What steps did you take to debug the JavaScript problems above? There is no "wrong" answer here - everyone has their own ways of debugging code!
- What resources did you use to hunt down issues?

## Code

**[Here's a CodePen link for you to fork!](https://codepen.io/jplhomer/pen/LrELOW/)**

Here's our JavaScript code so far:

```js
dragula([
   document.querySelector('#col-start'),
   document.querySelector('#col-yes'),
   document.querySelector('#col-no')
]).on('move', function(el) {
   el.classList.add('is-moving')
}).on('moveend', function(el) {
   el.classList.remove('is-moving');

   updateEmoji();
});

function updateEmoji() {
   let numberYes = getNumberYes();
   let numberNo = getNumberNo();
   let emoji;

   if (numberNo === 0 && numberYes === 0) {
      emoji = '🤔';
   } else {
      if (numberYes > numberNo) {
         emoji = '😄';
      }

      if (numberNo > numberYes) {
         emoji = '😢';
      }

      if (numberNo = numberYes) {
         emoji = '😬';
      }
   }

   document.querySelectorAll('.emoji').innerHTML = emoji;
}

function getNumberYes() {
   return document.querySelector('.col-yes').children().length;
}

function getNumberNo() {
   return document.querySelector('.col-no').children().length;
}
```

And the accompanying HTML, for your reference:

```html
<div class="container">
   <h1>What comes to mind when you think about MegaBaby SuperWipes™?</h1>

   <p class="emoji">🤔</p>

   <div class="heds">
      <div></div>
      <div><h2>Yes</h2></div>
      <div><h2>No</h2></div>
   </div>
   <div class="cols">
      <div class="col-start">
         <div>Family-friendly</div>
         <div>Safe for babies</div>
         <div>Fun to use</div>
         <div>Environmentally-safe</div>
         <div>Trusted by parents</div>
         <div>I'm gonna use them</div>
      </div>
      <div class="col-yes"></div>
      <div class="col-no"></div>
   </div>
</div>
```

repository: voxmedia/revenue-hiring

gha_language: Ruby

repo_name: voxmedia/revenue-hiring


text:
# rxterm

A C++ library for functional-reactive terminals. rxterm is a lean alternative to ncurses for many applications.

## Build Instructions

The library builds with [Buckaroo](https://buckaroo.pm) and [Buck](https://www.buckbuild.com). It requires a C++ 14 compiler.

```bash=
buckaroo install
buck build :rxterm
```

To run the demo:

```bash=
buck run :main
```

## Usage

To install this library into your project:

```bash=
buckaroo install github+loopperfect/rxterm
```

Refer to `rxterm/apps/main.cpp` for an example.

repository: njlr/rxterm

repo_name: njlr/rxterm


text:
# pyfakefs [![PyPI version](https://badge.fury.io/py/pyfakefs.svg)](https://badge.fury.io/py/pyfakefs) [![Python version](https://img.shields.io/pypi/pyversions/pyfakefs.svg)](https://img.shields.io/pypi/pyversions/pyfakefs.svg)

pyfakefs implements a fake file system that mocks the Python file system modules.
Using pyfakefs, your tests operate on a fake file system in memory without
touching the real disk.  The software under test requires no modification to
work with pyfakefs.

pyfakefs works with Linux, Windows and MacOS.

## Documentation

This file provides general usage instructions for pyfakefs.  There is more:

* The documentation at [GitHub Pages:](http://jmcgeheeiv.github.io/pyfakefs)
  * The [Release documentation](http://jmcgeheeiv.github.io/pyfakefs/release)
    contains usage documentation for pyfakefs and a description of the
    most relevent classes, methods and functions for the last version
    released on PyPi
  * The [Development documentation](http://jmcgeheeiv.github.io/pyfakefs/master)
    contains the same documentation for the current master branch
  * The [Release 3.7 documentation](http://jmcgeheeiv.github.io/pyfakefs/release37)
    contains usage documentation for the last version of pyfakefs
    supporting Python 2.7
  * The [Release 3.3 documentation](http://jmcgeheeiv.github.io/pyfakefs/release33)
    contains usage documentation for the last version of pyfakefs
    supporting Python 2.6, and for the old-style API (which is still
    supported but not documented in the current release)
* The [Release Notes](https://github.com/jmcgeheeiv/pyfakefs/blob/master/CHANGES.md)
  show a list of changes in the latest versions

### Linking to pyfakefs

In your own documentation, please link to pyfakefs using the canonical URL <http://pyfakefs.org>.
This URL always points to the most relevant top page for pyfakefs.

## Usage

pyfakefs has support for `unittest` and `pytest`, but can also be used
directly using `fake_filesystem_unittest.Patcher`. Refer to the
[usage documentation](http://jmcgeheeiv.github.io/pyfakefs/master/usage.html)
for more information on test scenarios, test customization and
using convenience functions.

## Compatibility
pyfakefs works with CPython 3.5 and above, on Linux, Windows and OSX
(MacOS), and with PyPy3.

pyfakefs works with [PyTest](http://doc.pytest.org) version 2.8.6 or above.

pyfakefs will not work with Python libraries that use C libraries to access the
file system.  This is because pyfakefs cannot patch the underlying C libraries'
file access functions--the C libraries will always access the real file system.
For example, pyfakefs will not work with [`lxml`](http://lxml.de/).  In this case
`lxml` must be replaced with a pure Python alternative such as
[`xml.etree.ElementTree`](https://docs.python.org/3/library/xml.etree.elementtree.html).

## Development

### Continuous integration

pyfakefs is currently automatically tested:
* [![Build Status](https://travis-ci.org/jmcgeheeiv/pyfakefs.svg)](https://travis-ci.org/jmcgeheeiv/pyfakefs)
  on Linux, with Python 3.5 to 3.8, using [Travis](https://travis-ci.org/jmcgeheeiv/pyfakefs)
* [![Build Status](https://travis-ci.org/jmcgeheeiv/pyfakefs.svg)](https://travis-ci.org/jmcgeheeiv/pyfakefs)
  on MacOS, with Python 3.6 to 3.8, using [Travis](https://travis-ci.org/jmcgeheeiv/pyfakefs)
* [![Build status](https://ci.appveyor.com/api/projects/status/4o8j21ufuo056873/branch/master?svg=true)](https://ci.appveyor.com/project/jmcgeheeiv/pyfakefs/branch/master)
  on Windows, with Python 3.5 to 3.8 using [Appveyor](https://ci.appveyor.com/project/jmcgeheeiv/pyfakefs)

### Running pyfakefs unit tests

#### On the command line
pyfakefs unit tests can be run using `unittest` or `pytest`:

```bash
$ cd pyfakefs/
$ export PYTHONPATH=$PWD

$ python -m pyfakefs.tests.all_tests
$ python -m pyfakefs.tests.all_tests_without_extra_packages
$ python -m pytest pyfakefs/pytest_tests/pytest_plugin_test.py
```

These scripts are called by `tox` and Travis-CI. `tox` can be used to run tests
locally against supported python versions:

```bash
$ tox
```

#### In a Docker container

The `Dockerfile` at the top of the repository will run the tests on the latest
Ubuntu version.  Build the container:
```bash
cd pyfakefs/
docker build -t pyfakefs .
```
Run the unit tests in the container:
```bash
docker run -t pyfakefs
```

### Contributing to pyfakefs

We always welcome contributions to the library. Check out the [Contributing
Guide](https://github.com/jmcgeheeiv/pyfakefs/blob/master/CONTRIBUTING.md)
for more information.

## History
pyfakefs.py was initially developed at Google by Mike Bland as a modest fake
implementation of core Python modules.  It was introduced to all of Google
in September 2006. Since then, it has been enhanced to extend its
functionality and usefulness.  At last count, pyfakefs is used in over 2,000
Python tests at Google.

Google released pyfakefs to the public in 2011 as Google Code project
[pyfakefs](http://code.google.com/p/pyfakefs/):
* Fork
  [jmcgeheeiv-pyfakefs](http://code.google.com/p/jmcgeheeiv-pyfakefs/) added
  [direct support for unittest and doctest](../../wiki/Automatically-find-and-patch-file-functions-and-modules)
* Fork
  [shiffdane-jmcgeheeiv-pyfakefs](http://code.google.com/p/shiffdane-jmcgeheeiv-pyfakefs/)
  added further corrections

After the [shutdown of Google Code](http://google-opensource.blogspot.com/2015/03/farewell-to-google-code.html)
was announced, [John McGehee](https://github.com/jmcgeheeiv) merged all three Google Code projects together
[here on GitHub](https://github.com/jmcgeheeiv/pyfakefs) where an enthusiastic community actively supports, maintains
and extends pyfakefs.

repository: pexip/os-python-pyfakefs

repo_name: pexip/os-python-pyfakefs


text:
# Incompatible

This document records the incompatible updates between each version. You need to check this document before you upgrade to related version.

## dev

* Change regex matching sql params in SQL task plugin ([#13378](https://github.com/apache/dolphinscheduler/pull/13378))
* Remove the spark version of spark task ([#11860](https://github.com/apache/dolphinscheduler/pull/11860)).
* Change the default unix shell executor from sh to bash ([#12180](https://github.com/apache/dolphinscheduler/pull/12180)).
* Remove `deleteSource` in `download()` of `StorageOperate` ([#14084](https://github.com/apache/dolphinscheduler/pull/14084))

## 3.2.0

* Remove parameter `description` from public interfaces of new resource center  ([#14394](https://github.com/apache/dolphinscheduler/pull/14394))

## 3.0.0

* Copy and import workflow without 'copy' suffix [#10607](https://github.com/apache/dolphinscheduler/pull/10607)
* Use semicolon as default sql segment separator [#10869](https://github.com/apache/dolphinscheduler/pull/10869)

repository: RebieKong/EasyScheduler

repo_name: RebieKong/EasyScheduler


text:
# Yet Another Hints Extension

I wasn't fully satisfied with the hit-a-hint extensions available for Chrome and Firefox, so I made my own.
These are the existing extensions that worked as inspiration for this one:

* [Hints script in DWB][hhdwb]
* [Hit-a-Hint for Opera][hhopera] (hint code generation)
* [Keyboard Navigation by xnoreq][kbnav]

## Usage

1. Press the hint key to activate the hints. The default hint key is `ctrl-m`.
2. Type the code of the hint you want to activate.
3. Once hint is highlighted, press enter key to simulate a mouse click on the
   link. You can the key press with modifiers like Ctrl and Shift to simulate a
   click with modifiers.
4. After activating a hint, the typing buffer is cleared, so you can continue
   by typing another code.

You can deactivate the hints by pressing the escape key. Pressing the hint key
after typing some characters clears the typing buffer, and pressing it again
deactivates the hints.

In Chrome, you can customize the hint key and hint characters in the extension's options page.

## Installation

### Chrome

Install from [Chrome Web Store][cws].

### Firefox

1. Install [Greasemonkey][] addon for Firefox.
2. Open [yahe.user.js][yahejs] in Firefox, and click install.

### Chrome

There are two ways to install this extension: from this extension's
[Chrome Web Store][cws] page or from repository sources.

### Installing for Chrome from repository sources

1. Clone YAHE Git repository: `git clone git://github.com/Lepovirta/yahe.git`
2. Fire up you Chrome/Chromium browser, and go to the extensions section of the
   settings page.
3. Enable the developer mode by checking the developer mode checkbox.
4. Click the **Load unpacked extension...** button.
5. Select the directory where you cloned the repository to.

If you want to update the extension, pull the latest changes from the
repository to your cloned directory (`git pull`), and either restart your
browser or hit the extension's reload button in extensions page.

## Extending the script

If you want to edit the source code, I recommend installing the following
tools:

* [Node.JS][nodejs]
* [NPM][] (usually ships with Node.JS)
* [Browserify][] with NPM

All the code for YAHE is located in the `src/` directory, and `yahe.js` and `yahe.user.js` are just the build outputs.
If you have Browserify installed, you can execute `build.sh`
file using a Bourne shell (`sh`) compatible shell to build the final script.

The entry point for YAHE is in the `main.js` file, which does all the
initialization. It imports most of the code from other source files, and it's a
good place to start reading the code.

If you want to change the settings for the script, change the values in
`defaults.js` source file. Remember to rebuild the final script.

## License

(2-clause BSD license)

Copyright (c) 2012-2014, Jaakko Pallari
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

repository: jkpl/yahe

gha_language: JavaScript

repo_name: jkpl/yahe


text:
This is a tool helping you to create and debug scripts for AID.

- It concatenates several file to create the 4 files you can copy/paste on AID
(the shared library, the input modifier, the context modifier and the output modifer).

- When creating the files, if you have archiver (a node extension: https://www.archiverjs.com/) installed, it will creat the zip file.
You can directly upload this zip on AID. (It you don't have archiver, it shouldn't crash... not tested).

- Then it creates a webpage you can open on your computer to test and debug the scripts.
This allows you to make some basic debug, and correct the bugs directly on your local computer -
instead of correcting on AID and then backcopy the corrections on your local computer.

You'll still have to debug some parts on AID; at least, you'll have to test the AI's reaction on AID.
Moreover, the way I emulate AID cripting is far from perfect, and there may be some difference on the actual AID
(eg, you may use a deactivated function).

This require node.js (an extension of js intended to create servers). Even if you only intend to use the offline
version, you'll need node.js: vanilla js can't read or write file (and that's necessary to concatenate files).

# Disclaimer (important)

I am in no way a js specialist, and even less a server specialist. The server created by the localServer.js script
has probabibly some security issue...

/!\ If you can't understand the localServer.js script, you shouldn't use it and use only the offlineVersion.js. Or maybe you should not use my work at all. /!\

Use my work at your own risk.

# Usage

## Server version

- create a new working directory.

- copy localServer.js, ScriptGenerator.js, config.json and buildFiles.json in your working directory.
Copy the folder 'webpage' with its content in your working directory.

- open buildFiles.json: it's a json file with the lists sharedLiraryFiles, inputModFiles, contextModFiles, and outputModFiles.
those are the list of files that will be concatenated to create the 4 scripts. Modify those lists to suit your need. Note: the default values are the files given here
in the templates and examples folders.

- open a terminal in your working directory (if you use Visual Studio Code, you have a terminal at the bottom of the window).
Type: ```node localServer.js``` . This create a server on the port 8080 of your computer.

- /!\ You should get a message from your firewall, asking if it should open open port 8080. /!\
Tell it **you don't want to open the port**: you don't want other people to mess with this server.

- open a browser and type http://localhost:8080/ in the adress bar: you're connected to the server you just created!

- each time to connected to the server (ie, at first connection, but when you reload the page as well),
the script are re-concatenated. This means, you can test your scripts, make corrections on your local versions,
and just press "f5" to reload your page to test if the corrections work (... and this is, actually, the
only interest of the server version.  You can open those
files and copy/paste their content in the corresponding scripts on AID.

- if you have archiver (a node extension: https://www.archiverjs.com/) installed, you have
an archive "scripts.zip" in the folder "generated". You can directly upload it on AID.

- You're done!

## No-server version

- create a new working directory.

- copy offlineVersion.js, ScriptGenerator.js, config.json and buildFiles.json in your working directory. Copy the folder 'webpage' with its content in your working directory.

- open buildFiles.json: it's a json file with the lists sharedLiraryFiles, inputModFiles, contextModFiles, and outputModFiles.
those are the list of files that will be concatenated to create the 4 scripts. Modify those list to suit your need. Note: the default values are the files given here
in the templates and examples folders.

- open a terminal in your working directory (if you use Visual Studio Code, you have a terminal at the bottom of the window).
Type ```node offlineVersion.js``` . This concatenate the script.

- go into the 'webpage' folder and open 'index.html' in a browser.

- You can test your scripts. Correct the local version of the scripts, and each time, re-run "node offlineVersion.js" on the terminal
to re-create the script, then re-actualize index.html in your browser.

- Once you're satisfied, you'll find a "generated" folder in your working directory, containing the files "shared.js",
"inputModifier.js", "contextModifier.js" and "outputModifier.js". You can open those
files and copy/paste their content in the corresponding scripts on AID.

- if you have archiver (a node extension: https://www.archiverjs.com/) installed, you have
an archive "scripts.zip" in the folder "generated". You can directly upload it on AID.

- You're done!

## Handle several projects

When you call node in the terminal, there's a second optional argument: if you give it a folder name,
the script will search for the buildFile.json file in this folder, and create in this folder a subfolder
"generated scripts" to put the generated scripts. This allow you to work in separate folders, with different
fils to concatenate, and without destroying the generated scripts for this project.

Eg :

```node localServer.js "my subfolder"```

```node offlineVersion.js "my subfolder"```

# Changelog

- 10/10/20
    - Handle several projects
    - better emulation of AID: now the shared library is copied in the three modifier,
hence it's hidden from the outside and it can't be used to save stuff outside of the state.

- 19/10/20
    - correction of a big bug which was preventing a good emulation of AID.
    - handle memory object
    - added the folders modules with:
        - folder modules/base containing the work of Devon on module (available at https://github.com/Devon7925/AID-Scripting)
        - folder modules/commandHandler with a module to handle commands (not debugged)
        - folder modules/debugCommands with... No module for now, but the buildFiles.jon file concatening
        the commandHandler and the module to obtain scripts that can directly be copied on AID.
        type "node offlineVersion.js "modules/debugCommands" to obtain the generated files.

- 20/10/20
    - change name of generated files for direct upload.

- 24/10/20
    - create the zip files.
    - some corrections.
    - a box containing state.message in the debug page.
    - debugCommand finished.

# TODO (...Maybe one day)

when creating scripts:

- [x] create the zip file.

In the debug page:

- [x] handle the quests object

- [x] emulate the way state.memory.frontMemory, state.memory.context and state.memory.authorsNote are used to create the text sent to the context modifier

- [ ] spinbox to set the info.actionCount

- [ ] spinbox to set info.maxChars (it's easier to test if the context modifier cuts text properly if info.maxChars is low)

- [ ] emulate the memory box.

- [ ] emulate the author's note box.

- [ ] emulate quest system.

- [ ] emulate world infos...

repository: myGat/AI-dungeon

repo_name: myGat/AI-dungeon


text:
# Mato-bot terms of service

Last updated: November 17, 2021

Please read these terms and conditions carefully before using mato-bot.

## Definitions

The words of which the initial letter is capitalized have meanings defined under the following conditions.

For the purposes of these Terms and Conditions:

- **Terms and Conditions** mean this file which forms the entire agreement between You and the Mato regarding the use of mato-bot.

- **Licence** refers to the licence agreement regarding use of mato-bot's source code, available [here](https://github.com/Matojeje/mato-bot/blob/master/LICENSE).

- **Mato** refers to the developer of mato-bot and owner of its [GitHub repository](https://github.com/Matojeje/mato-bot).

- **You** means the individual accessing or using mato-bot, either as a User or a Provider.

- **User** means a Discord account sending commands for an Instance of mato-bot to execute.

- **Provider** means a person owning a [Discord application](https://discord.com/developers/applications) used by an individual Instance of mato-bot.

- **Instance** means a copy of mato-bot's code running either locally in [node.js](https://nodejs.org/), or in cloud hosting platforms.

- **Official Instance** refers to an Instance of mato-bot whose Provider is Mato and is publicly available.

## Rules of Conduct

Your access to and use of mato-bot is also conditioned on Your acceptance of and compliance with the following restrictions:

- Since mato-bot is a [Discord](https://discord.com/) bot, its usage is inherently subject to Discord's
[community guidelines](https://discord.com/guidelines),
[terms of service](https://discord.com/terms) and
[privacy policy](https://discord.com/privacy).

- The Provider also agrees to comply with
the [Licence](https://github.com/Matojeje/mato-bot/blob/master/LICENSE),
Discord's [developer terms of service](https://discord.com/developers/docs/legal)
and [developer policy](https://discord.com/developers/docs/policy).

Additionally, when using the the Official Instance of mato-bot, the following restrictions also apply:

- Mato-bot has built-in command cooldowns.
The User agrees to not attempt to bypass these cooldowns
nor do any other malicious spam-like behavior,
or use mato-bot for causing such activity itself.

- The User agrees that when debating or in any other way expressing their opinions
on Mato's appearance, personality, talent, likability etc.,
they will only do so in a deprecating manner;
calling Mato ‘cute’ (or similar) will void result in voiding this point.

The Provider may restrict any Users of the Provider's Instance under the same restrictions as those exclusive to the Official Instance specified above, and is hereby encouraged to do so.

## Miscellaneous

### Acknowledgement

These are the Terms and Conditions governing the use of mato-bot and the agreement that operates between You and Mato.
Your access to and use of mato-bot is conditioned on Your acceptance of and compliance with these Terms and Conditions.

### Limitation of Liability

Some of mato-bot's commands access third-party sources such as CDNs and APIs.
Mato is not responsible for any viruses, spyware, device damage, inaccuracies, errors and other damage caused by these third parties.

Likewise, the same applies to any malfunctions that should happen when using the Official Instance of mato-bot ran on [Heroku](https://www.heroku.com/).

### Disclaimer

Mato does not guarantee 100% uptime of any mato-bot Instances due to development time, cloud platform outages or any other reasons.

### Translation Interpretation

These Terms and Conditions have been converted by a Markdown parser from a [GitHub Flavored Markdown](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github) source. The resulting human-readable page is the intended version for reading.

When reading a language translation of the Terms and Conditions, the original English text shall prevail in the case of a dispute.

### Changes to These Terms and Conditions

Mato reserves the right to modify or replace these Terms of Service at any time.

In case of a change, no notice will be provided beforehand and the changes will become effective upon publication.
However, You can opt in for automatic notifications including but not limited to Terms of Service changes by watching the mato-bot repository on GitHub.

repository: Matojeje/mato-bot

repo_name: Matojeje/mato-bot