IO Class
lib/yui3/src/simpleyui/js/concat.js:15343
The io class is a utility that brokers HTTP requests through a simplified interface. Specifically, it allows JavaScript to make HTTP requests to a resource without a page reload. The underlying transport for making same-domain requests is the XMLHttpRequest object. YUI.io can also use Flash, if specified as a transport, for cross-domain requests.
Constructor
IO
-
config
Defined in
lib/yui3/src/simpleyui/js/concat.js:15343
Parameters:
-
config
ObjectObject of EventTarget's publish method configurations used to configure IO's events.
Item Index
Methods
- _abort
- _abort
- _abort
- _cFrame
- _clearTimeout static
- _clearTimeout
- _clearTimeout
- _concat
- _concat
- _create
- _create
- _data
- _dFrame
- _evt
- _evt
- _ieEvt static
- _isInProgress
- _qShift static
- _removeData static
- _resetAttrs static
- _result static
- _result static
- _retry
- _retry
- _rS
- _rS
- _serialize static
- _setAttrs static
- _setHeader
- _setHeaders
- _setHeaders
- _size static
- _startTimeout static
- _startTimeout
- _startTimeout
- _stop static
- _swf
- _upload static
- _uploadComplete static
- _xdrReady
- appendData static
- complete
- complete
- end
- end
- failure
- failure
- io static
- promote static
- queue static
- remove static
- send
- send
- setHeader
- start
- start
- success
- success
- transport
- xdr
- xdrReady static
- xdrResponse
Properties
Methods
_abort
-
o
-
s
Defined in
lib/yui3/src/simpleyui/js/concat.js:15739
Terminates a transaction due to an explicit abort or timeout.
Parameters:
Returns:
_abort
-
o
-
c
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:87
Method for intiating an XDR transaction abort.
_abort
-
transaction
-
type
Defined in
lib/yui3/src/io/js/io-base.js:445
Terminates a transaction due to an explicit abort or timeout.
_cFrame
-
o
-
c
-
io
Provided by the io-upload-iframe module.
Defined in
lib/yui3/src/io/js/io-upload-iframe.js:14
Creates the iframe transported used in file upload transactions, and binds the response event handler.
_clearTimeout
-
id
Provided by the io-upload-iframe module.
Defined in
lib/yui3/src/io/js/io-upload-iframe.js:158
Clears the timeout interval started by _startTimeout().
Parameters:
-
id
Number- Transaction ID.
_clearTimeout
-
id
Defined in
lib/yui3/src/simpleyui/js/concat.js:15680
Clears the timeout interval started by _startTimeout().
Parameters:
-
id
Number- Transaction id.
Returns:
_clearTimeout
-
id
Defined in
lib/yui3/src/io/js/io-base.js:380
Clears the timeout interval started by _startTimeout().
Parameters:
-
id
Number- Transaction id.
_concat
-
s
-
d
Defined in
lib/yui3/src/simpleyui/js/concat.js:15613
Method that concatenates string data for HTTP GET transactions.
Returns:
_concat
-
uri
-
data
Defined in
lib/yui3/src/io/js/io-base.js:315
Method that concatenates string data for HTTP GET transactions.
Returns:
_create
-
c
-
i
Defined in
lib/yui3/src/simpleyui/js/concat.js:15419
Method that creates a unique transaction object for each request.
Parameters:
Returns:
_create
-
config
-
id
Defined in
lib/yui3/src/io/js/io-base.js:98
Method that creates a unique transaction object for each request.
Parameters:
Returns:
_data
-
o
-
u
-
d
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:64
Creates a response object for XDR transactions, for success and failure cases.
Parameters:
Returns:
_dFrame
-
id
Provided by the io-upload-iframe module.
Defined in
lib/yui3/src/io/js/io-upload-iframe.js:34
Removes the iframe transport used in the file upload transaction.
Parameters:
-
id
NumberThe transaction ID used in the iframe's creation.
_evt
-
eventName
-
transaction
-
config
Defined in
lib/yui3/src/io/js/io-base.js:156
Method for creating and firing events.
_evt
-
e
-
o
-
c
Defined in
lib/yui3/src/simpleyui/js/concat.js:15469
Method for creating and firing events.
Parameters:
Returns:
_ieEvt
-
o
-
c
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:122
Sets event handlers for XDomainRequest transactions.
_isInProgress
-
o
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:99
Method for determining if an XDR transaction has completed and all data are received.
Parameters:
-
o
Object- Transaction object generated by _create() in io-base.
_qShift
()
private
static
Provided by the io-queue module.
Defined in
lib/yui3/src/io/js/io-queue.js:34
Method Process the first transaction from the queue in FIFO order.
_removeData
-
f
-
o
Provided by the io-upload-iframe module.
Defined in
lib/yui3/src/io/js/io-upload-iframe.js:82
Removes the custom fields created to pass additional POST data, along with the HTML form fields.
_resetAttrs
-
f
-
a
Provided by the io-upload-iframe module.
Defined in
lib/yui3/src/io/js/io-upload-iframe.js:116
Reset the HTML form attributes to their original values.
_result
-
transaction
-
config
Defined in
lib/yui3/src/io/js/io-base.js:392
Method that determines if a transaction response qualifies as success or failure, based on the response HTTP status code, and fires the appropriate success or failure events.
_result
-
o
-
c
Defined in
lib/yui3/src/simpleyui/js/concat.js:15693
Method that determines if a transaction response qualifies as success or failure, based on the response HTTP status code, and fires the appropriate success or failure events.
Parameters:
Returns:
_retry
-
o
-
uri
-
c
Defined in
lib/yui3/src/simpleyui/js/concat.js:15594
Retry an XDR transaction, using the Flash tranport, if the native transport fails.
Parameters:
Returns:
_retry
-
transaction
-
uri
-
config
Defined in
lib/yui3/src/io/js/io-base.js:299
Retry an XDR transaction, using the Flash tranport, if the native transport fails.
_rS
-
transaction
-
config
Defined in
lib/yui3/src/io/js/io-base.js:421
Event handler bound to onreadystatechange.
_rS
-
o
-
c
Defined in
lib/yui3/src/simpleyui/js/concat.js:15717
Event handler bound to onreadystatechange.
Parameters:
Returns:
_serialize
-
c
-
s
Provided by the io-form module.
Defined in
lib/yui3/src/io/js/io-form.js:12
Method to enumerate through an HTML form's elements collection and return a string comprised of key-value pairs.
Parameters:
Returns:
_setAttrs
-
f
-
id
-
uri
Provided by the io-upload-iframe module.
Defined in
lib/yui3/src/io/js/io-upload-iframe.js:99
Sets the appropriate attributes and values to the HTML form, in preparation of a file upload transaction.
_setHeader
-
l
-
v
Defined in
lib/yui3/src/simpleyui/js/concat.js:15627
Method that stores default client headers for all transactions. If a label is passed with no value argument, the header will be deleted.
Returns:
_setHeaders
-
o
-
h
Defined in
lib/yui3/src/simpleyui/js/concat.js:15646
Method that sets all HTTP headers to be sent in a transaction.
Parameters:
Returns:
_setHeaders
-
transaction
-
headers
Defined in
lib/yui3/src/io/js/io-base.js:345
Method that sets all HTTP headers to be sent in a transaction.
_size
()
Number
private
static
Provided by the io-queue module.
Defined in
lib/yui3/src/io/js/io-queue.js:131
Method to query the current size of the queue.
Returns:
_startTimeout
-
o
-
c
Provided by the io-upload-iframe module.
Defined in
lib/yui3/src/io/js/io-upload-iframe.js:135
Starts timeout count if the configuration object has a defined timeout property.
_startTimeout
-
o
-
t
Defined in
lib/yui3/src/simpleyui/js/concat.js:15665
Starts timeout count if the configuration object has a defined timeout property.
Returns:
_startTimeout
-
transaction
-
timeout
Defined in
lib/yui3/src/io/js/io-base.js:363
Starts timeout count if the configuration object has a defined timeout property.
_stop
()
private
static
Provided by the io-queue module.
Defined in
lib/yui3/src/io/js/io-queue.js:117
Method for setting queue processing to inactive. Transaction requests to YUI.io.queue() will be stored in the queue, but not processed until the queue is reset to "active".
_swf
-
uri
-
yid
-
yid
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:42
Method that creates the Flash transport swf.
_upload
-
o
-
uri
-
c
Provided by the io-upload-iframe module.
Defined in
lib/yui3/src/io/js/io-upload-iframe.js:216
Uploads HTML form data, inclusive of files/attachments, using the iframe created in _create to facilitate the transaction.
_uploadComplete
-
o
-
c
Provided by the io-upload-iframe module.
Defined in
lib/yui3/src/io/js/io-upload-iframe.js:172
Bound to the iframe's Load event and processes the response data.
_xdrReady
-
yid
-
uid
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:245
Fires event "io:xdrReady"
appendData
-
f
-
s
Provided by the io-upload-iframe module.
Defined in
lib/yui3/src/io/js/io-upload-iframe.js:49
Parses the POST data object and creates hidden form elements for each key-value, and appends them to the HTML form object.
Returns:
complete
-
transaction
-
config
Defined in
lib/yui3/src/io/js/io-base.js:227
Fires event "io:complete" and creates, fires a transaction-specific "complete" event, if config.on.complete is defined.
complete
-
o
-
c
Defined in
lib/yui3/src/simpleyui/js/concat.js:15527
Fires event "io:complete" and creates, fires a transaction-specific "complete" event, if config.on.complete is defined.
Returns:
end
-
transaction
-
config
Defined in
lib/yui3/src/io/js/io-base.js:246
Fires event "io:end" and creates, fires a transaction-specific "end" event, if config.on.end is defined.
end
-
o
-
c
Defined in
lib/yui3/src/simpleyui/js/concat.js:15543
Fires event "io:end" and creates, fires a transaction-specific "end" event, if config.on.end is defined.
Returns:
failure
-
o
-
c
Defined in
lib/yui3/src/simpleyui/js/concat.js:15577
Fires event "io:failure" and creates, fires a transaction-specific "failure" event, if config.on.failure is defined.
Returns:
failure
-
transaction
-
config
Defined in
lib/yui3/src/io/js/io-base.js:281
Fires event "io:failure" and creates, fires a transaction-specific "failure" event, if config.on.failure is defined.
io
-
u
-
c
Defined in
lib/yui3/src/simpleyui/js/concat.js:15967
Method for requesting a transaction.
Parameters:
Returns:
promote
()
static
Provided by the io-queue module.
Defined in
lib/yui3/src/io/js/io-queue.js:85
Method for promoting a transaction to the top of the queue.
queue
()
Object
static
Provided by the io-queue module.
Defined in
lib/yui3/src/io/js/io-queue.js:51
Method for queueing a transaction before the request is sent to the resource, to ensure sequential processing.
Returns:
remove
()
private
static
Provided by the io-queue module.
Defined in
lib/yui3/src/io/js/io-queue.js:95
Method for removing a specific, pending transaction from the queue.
send
-
uri
-
c
-
i
Defined in
lib/yui3/src/simpleyui/js/concat.js:15757
Method for requesting a transaction. send() is implemented as yui.io(). Each transaction may include a configuration object. Its properties are:
method: HTTP method verb (e.g., GET or POST). If this property is not not defined, the default value will be GET.
data: This is the name-value string that will be sent as the transaction data. If the request is HTTP GET, the data become part of querystring. If HTTP POST, the data are sent in the message body.
xdr: Defines the transport to be used for cross-domain requests. By setting this property, the transaction will use the specified transport instead of XMLHttpRequest. The properties are: { use: Specify the transport to be used: 'flash' and 'native' dataType: Set the value to 'XML' if that is the expected response content type. }
form: This is a defined object used to process HTML form as data. The properties are: { id: Node object or id of HTML form. useDisabled: Boolean value to allow disabled HTML form field values to be sent as part of the data. }
on: This is a defined object used to create and handle specific events during a transaction lifecycle. These events will fire in addition to the global io events. The events are: start - This event is fired when a request is sent to a resource. complete - This event fires when the transaction is complete. success - This event fires when the response status resolves to HTTP 2xx. failure - This event fires when the response status resolves to HTTP 4xx, 5xx; and, for all transaction exceptions, including aborted transactions and transaction timeouts. end - This even is fired at the conclusion of the transaction lifecycle, after a success or failure resolution.
The properties are:
{
start: function(id, arguments){},
complete: function(id, responseobject, arguments){},
success: function(id, responseobject, arguments){},
failure: function(id, responseobject, arguments){},
end: function(id, arguments){}
}
Each property can reference a function or be written as an
inline function.
sync: To enable synchronous transactions, set the configuration property "sync" to true. Synchronous requests are limited to same-domain requests only.
context: Object reference for all defined transaction event handlers when it is implemented as a method of a base object. Defining "context" will set the reference of "this," used in the event handlers, to the context value. In the case where different event handlers all have different contexts, use Y.bind() to set the execution context, instead.
headers: This is a defined object of client headers, as many as desired for this specific transaction. The object pattern is: { 'header': 'value' }.
timeout: This value, defined as milliseconds, is a time threshold for the transaction. When this threshold is reached, and the transaction's Complete event has not yet fired, the transaction will be aborted.
arguments: User-defined data passed to all registered event handlers. This value is available as the second argument in the "start" and "end" event handlers. It is the third argument in the "complete", "success", and "failure" event handlers.
Parameters:
Returns:
send
-
uri
-
config
-
id
Defined in
lib/yui3/src/io/js/io-base.js:460
Requests a transaction. send()
is implemented as Y.io()
. Each
transaction may include a configuration object. Its properties are:
- method
- HTTP method verb (e.g., GET or POST). If this property is not not defined, the default value will be GET.
- data
- This is the name-value string that will be sent as the transaction data. If the request is HTTP GET, the data become part of querystring. If HTTP POST, the data are sent in the message body.
- xdr
- Defines the transport to be used for cross-domain requests.
By setting this property, the transaction will use the specified
transport instead of XMLHttpRequest. The properties of the
transport object are:
- use
- The transport to be used: 'flash' or 'native'
- dataType
- Set the value to 'XML' if that is the expected response content type.
- form
- Form serialization configuration object. Its properties are:
- id
- Node object or id of HTML form
- useDisabled
true
to also serialize disabled form field values (defaults tofalse
)
- on
- Assigns transaction event subscriptions. Available events are:
- start
- Fires when a request is sent to a resource.
- complete
- Fires when the transaction is complete.
- success
- Fires when the HTTP response status is within the 2xx range.
- failure
- Fires when the HTTP response status is outside the 2xx
range, if an exception occurs, if the transation is aborted,
or if the transaction exceeds a configured
timeout
. - end
- Fires at the conclusion of the transaction
lifecycle, after
success
orfailure
.
Callback functions for
start
andend
receive the id of the transaction as a first argument. Forcomplete
,success
, andfailure
, callbacks receive the id and the response object (usually the XMLHttpRequest instance). If thearguments
property was included in the configuration object passed toY.io()
, the configured data will be passed to all callbacks as the last argument. - sync
- Pass
true
to make a same-domain transaction synchronous. CAVEAT: This will negatively impact the user experience. Have a very good reason if you intend to use this. - context
- The "`this'" object for all configured event handlers. If a
specific context is needed for individual callbacks, bind the
callback to a context using
Y.bind()
. - headers
- Object map of transaction headers to send to the server. The object keys are the header names and the values are the header values.
- timeout
- Millisecond threshold for the transaction before being automatically aborted.
- arguments
- User-defined data passed to all registered event handlers.
This value is available as the second argument in the "start" and
"end" event handlers. It is the third argument in the "complete",
"success", and "failure" event handlers. Be sure to quote
this property name in the transaction configuration as
"arguments" is a reserved word in JavaScript (e.g.
Y.io({ ..., "arguments": stuff })
).
Parameters:
Returns:
setHeader
-
name
-
value
Defined in
lib/yui3/src/io/js/io-base.js:329
Stores default client headers for all transactions. If a label is passed with no value argument, the header will be deleted.
start
-
o
-
c
Defined in
lib/yui3/src/simpleyui/js/concat.js:15511
Fires event "io:start" and creates, fires a transaction-specific start event, if config.on.start is defined.
Returns:
start
-
transaction
-
config
Defined in
lib/yui3/src/io/js/io-base.js:211
Fires event "io:start" and creates, fires a transaction-specific
start event, if config.on.start
is defined.
success
-
transaction
-
config
Defined in
lib/yui3/src/io/js/io-base.js:263
Fires event "io:success" and creates, fires a transaction-specific "success" event, if config.on.success is defined.
success
-
o
-
c
Defined in
lib/yui3/src/simpleyui/js/concat.js:15560
Fires event "io:success" and creates, fires a transaction-specific "success" event, if config.on.success is defined.
Returns:
transport
-
o
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:257
Initializes the desired transport.
Parameters:
-
o
Object- object of transport configurations.
xdr
-
uri
-
o
-
c
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:154
Method for accessing the transport's interface for making a cross-domain transaction.
xdrReady
-
yid
-
uid
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:272
Fires event "io:xdrReady"
xdrResponse
-
e
-
o
-
c
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:205
Response controller for cross-domain requests when using the Flash transport or IE8's XDomainRequest object.
Parameters:
Returns:
Properties
_cB
Object
private
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:15
Map of stored configuration objects when using Flash as the transport for cross-domain requests.
_headers
Object
private
Defined in
lib/yui3/src/simpleyui/js/concat.js:15377
Object of IO HTTP headers sent with each transaction.
_headers
Object
private
Defined in
lib/yui3/src/io/js/io-base.js:56
Object of IO HTTP headers sent with each transaction.
_id
Number
private
Defined in
lib/yui3/src/io/js/io-base.js:47
A counter that increments for each transaction.
_id
Int
private
Defined in
lib/yui3/src/simpleyui/js/concat.js:15368
A counter that increments for each transaction.
_q
Object
private
static
Provided by the io-queue module.
Defined in
lib/yui3/src/io/js/io-queue.js:11
Array of transactions queued for processing
_qState
Number
private
static
Provided by the io-queue module.
Defined in
lib/yui3/src/io/js/io-queue.js:22
Property to determine whether the queue is set to 1 (active) or 0 (inactive). When inactive, transactions will be stored in the queue until the queue is set to active.
_rS
Object
private
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:25
Map of transaction simulated readyState values when XDomainRequest is the transport.
_timeout
Object
private
Defined in
lib/yui3/src/io/js/io-base.js:67
Object that stores timeout values for any transaction with a defined "timeout" configuration property.
_timeout
Object
private
Defined in
lib/yui3/src/simpleyui/js/concat.js:15388
Object that stores timeout values for any transaction with a defined "timeout" configuration property.
_transport
Object
private
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:113
Map of io transports.
delay
Number
static
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:298
Delay value to calling the Flash transport, in the event io.swf has not finished loading. Once the EXDRREADY event is fired, this value will be set to 0.
Events
io:complete
Defined in
lib/yui3/src/io/js/io-base.js:237
Signals the completion of the request-response phase of a transaction. Response status and data are accessible, if available, in this event.
io:failure
Defined in
lib/yui3/src/io/js/io-base.js:290
Signals an HTTP response with status outside of the 2xx range. Fires after io:complete.
io:success
Defined in
lib/yui3/src/io/js/io-base.js:272
Signals an HTTP response with status in the 2xx range. Fires after io:complete.
io:xdrReady
Provided by the io-xdr module.
Defined in
lib/yui3/src/io/js/io-xdr.js:9
Fires when the XDR transport is ready for use.


Redirect
{{slug}}
/
No leading or trailing slashes. Slug is always from the root path.
Use site absolute URL with a leading slash (like
/collection/funny-stuff
, or a full URL).


Toggle navigation
Needle Xchange
Refer a Friend
Sign Up
Create Event
Local Needle Share
Organizer
Sarah Smith
Phone:<PHONE_NUMBER>
Email<EMAIL_ADDRESS>Event Location
44 E Market St
Bethlehem, PA 18018
Phone:<PHONE_NUMBER>


Toggle navigation
Haushalte Münster
Map
Data Sheet
Vocabulary
Münster house hold data visualized
Select a data set
Select a dataset
Select a gender
Select an age group
Select a year
Show me
Data Sheet for District
General statistics
Single Household statistics
Household with Child statistics
Neighboring districts statistics
Upper administrative district statistics


{% extends 'layouts/main.html' %} {% block title %}Contact{% endblock %} {% block content %}
This is just a placeholder page which should be replaced with a contact form.


Home
Home 1
Home 2
Home 3
Home 4
Listings
Map - Grid Layout
Map - List Layout
Doctor - Layout (1)
Doctor - Layout (2)
Single Listings
Dashboard
Dashboard Home
My Listings
My Favorites
Reviews
Bookings
Add Listing
Packages
My Profile
Blog
Blog Grid
Blog List
Blog Classic
Blog Single
Pages
About Us
Add Listing
Login Page
sign up
Pricing Tables
Contact Us
Pages 404
Conact Us
Add list
Login
All Categories
Doctors
Clinics
Pharmacies
Labs
Search Now
14 Results Found
California
Alrayan Eye Clinic
Open Now!
Save
Hospital
California
Alrayan Eye Clinic
Open Now!
Save
Hospital
California
Alrayan Eye Clinic
Open Now!
Save
Hospital
California
Alrayan Eye Clinic
Open Now!
Save
Hospital
Previous
1
2
3
Next


The Tiaquin Hotel
Home
Suites
Activities
Sign In
Sign Up
booking
Restraunt
FullName:
Password:
Submit


Specifies the artifact to upload. Dependency-Track supports uploading of Dependency-Check
XML scan results and the uploading of CycloneDX and
SPDX bill-of-material documents. For Dependency-Check results
on a multi-module project, the aggregate should be used. Paths may contain Jenkins environment
variables such as ${WORKSPACE} and ${BUILD_NUMBER}.


Id: 304
Name: Scary Brandon
Status: Alive
Species: Humanoid
Type: Monster
Gender: Male
OriginName: Mr. Goldenfold's dream
OriginUrl: https://rickandmortyapi.com/api/location/18
LocationName: Mr. Goldenfold's dream
LocationUrl: https://rickandmortyapi.com/api/location/18
Image: https://rickandmortyapi.com/api/character/avatar/304.jpeg
Episode: ['https://rickandmortyapi.com/api/episode/2']
Url: https://rickandmortyapi.com/api/character/304
Created: 2018-01-05T14:11:17.550Z


WITNESS LIST Appropriations Committee (Subcommittee on Regulatory) January 30, 2001-8:00A Budget For: Ewing, Leon (self) Scurlock, Steve (self) On: Almason, Deborah (State Board of Barber Examiners) Brown, Will (State Board of Barber Examiners) Cottrell, Comer (Texas Cosmetology Commission) Crawford, Denise (State Securities Board) Feeney, Harold (Credit Union Department) Flowerday, Paula (Texas Racing Commission) Gillen, Gary (Texas Structural Pest Control Board) Herman, Richard (Texas State Board of Pluming Examiners) Holifield, Henry (Texas Cosmetology Commission) James, Randall (Finance Commission of Texas) James, Randall (Texas Department of Banking) Kovacevich, Debbie (Finance Commission of Texas) Kubicek, Edward (Texas Funeral Service Commission) Lacy, Terri (Texas Racing Commission) Liner, Renil (Texas Appraiser Licensing and Certification Board) Mathis, Benny (Structural Pest Control Board) Maxwell, Robert (Texas State Board of Plumbing Examiners) Nall, Don (Texas Cosmetology Commission) Osborn, Art (Texas Board of Professional Land Surveying) Pettijohn, Leslie (Office of Consumer Credit) Pledger, Jim (Texas Savings and Loan Department) Robbins, Chet (Texas Funeral Service Commission) Smith, Sandra (Texas Funeral Service Commission) Smith, Sandy (Texas Board of Professional Land Surveying) Spradlin, Tom (State Securities Board) Synatzske, James (Texas Appraiser Licensing and Certification Board) Taylor, Clare (TCC) Thomas, Hal (Credit Union Commission) Thorburn, Wayne (Texas Real Estate Commission) Whittington, Harry (TFSC) Williams, Charles (State Barber Board of Examiners) Registering, but not testifying: For: Schroeder, Buddy (self) On: Borgfeld, Walter (Texas State Board of Plumbing Examiners) Craig, Tim (Texas Racing Commission) Hassumani, Sabrina (Texas Real Estate Commission) Hofer, Steven (Texas Board of Professional Land Surveying) Perez, Elizabeth (Texas Cosmetology Commission) Rocha, Joe (Texas Plumbing Board of Examiners) Turner, Dougals (Texas Board of Professional Land Surveying) Waters, Alan (Texas Real Estate Commission)


Thou art my master, and my author thou, Thou art alone the one from whom I took The beautiful style that has done honour to me.
>
<


Your browser is out of date and/or incompatible with our website. Simply click on an icon below for instructions on installing a compatible browser.


Introduction
Though it is natural to have low expectations when it comes to Mojang’s work, the wolves added to Minecraft version 1.4 are notable for their particularly shoddy functionality. The many flaws in the original implementation notwithstanding, the principle qualm players have faced is an issue of omission: while you can feed and even tame a wolf, there is currently no way to capture a wolf in minecraft. While many initially hoped this obvious inadvertence would be rectified by Mojang, much in the same way that sheep were updated to eat grass subsequent to their initial release, this seems unlikely in the foreseeable future given Mojang’s preoccupation with petty non-canine issues.
Seeing how this great injustice was severely limiting the depth of wolf-based play in minecraft we, the creators of WolfNet, decided to do something about it.This mod’s aim is to provide a complete, photo-realistic, biologically accurate, engaging replacement to minecraft’s wolf system. Though many changes have been made, we’ve tried to make it as balanced and lore-friendly as possible.


Thank's what were talking about
A website, also written as web site,[1] or simply site,[2] is a set of related web pages typically served from a single web domain. A website is hosted on at least one web server, accessible via a network such as the Internet or a private local area network through an Internet address known as a Uniform resource locator.
A webpage may incorporate elements from other websites with suitable markup anchors


from IPython.display import Image
Image(filename='images/aiayn.png')
The Transformer from "Attention is All You Need" has been on a lot of people's minds over the last year. Besides producing major improvements in translation quality, it provides a new architecture for many other NLP tasks. The paper itself is very clearly written, but the conventional wisdom has been that it is quite difficult to implement correctly.
In this post I present an "annotated" version of the paper in the form of a line-by-line implementation. I have reordered and deleted some sections from the original paper and added comments throughout. This document itself is a working notebook, and should be a completely usable implementation. In total there are 400 lines of library code which can process 27,000 tokens per second on 4 GPUs.
To follow along you will first need to install PyTorch. The complete notebook is also available on github or on Google Colab.
Note this is merely a starting point for researchers and interested developers. The code here is based heavily on our OpenNMT packages. (If helpful feel free to cite.) For other full-sevice implementations of the model check-out Tensor2Tensor (tensorflow) and Sockeye (mxnet).
# !pip install http://download.pytorch.org/whl/cu80/torch-0.3.0.post4-cp36-cp36m-linux_x86_64.whl numpy matplotlib spacy torchtext seaborn
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import math, copy, time
from torch.autograd import Variable
import matplotlib.pyplot as plt
import seaborn
seaborn.set_context(context="talk")
%matplotlib inline
Table of Contents
My comments are blockquoted. The main text is all from the paper itself.
The goal of reducing sequential computation also forms the foundation of the Extended Neural GPU, ByteNet and ConvS2S, all of which use convolutional neural networks as basic building block, computing hidden representations in parallel for all input and output positions. In these models, the number of operations required to relate signals from two arbitrary input or output positions grows in the distance between positions, linearly for ConvS2S and logarithmically for ByteNet. This makes it more difficult to learn dependencies between distant positions. In the Transformer this is reduced to a constant number of operations, albeit at the cost of reduced effective resolution due to averaging attention-weighted positions, an effect we counteract with Multi-Head Attention.
Self-attention, sometimes called intra-attention is an attention mechanism relating different positions of a single sequence in order to compute a representation of the sequence. Self-attention has been used successfully in a variety of tasks including reading comprehension, abstractive summarization, textual entailment and learning task-independent sentence representations. End-to-end memory networks are based on a recurrent attention mechanism instead of sequencealigned recurrence and have been shown to perform well on simple-language question answering and language modeling tasks.
To the best of our knowledge, however, the Transformer is the first transduction model relying entirely on self-attention to compute representations of its input and output without using sequence aligned RNNs or convolution.
Most competitive neural sequence transduction models have an encoder-decoder structure (cite). Here, the encoder maps an input sequence of symbol representations $(x_1, ..., x_n)$ to a sequence of continuous representations $\mathbf{z} = (z_1, ..., z_n)$. Given $\mathbf{z}$, the decoder then generates an output sequence $(y_1,...,y_m)$ of symbols one element at a time. At each step the model is auto-regressive (cite), consuming the previously generated symbols as additional input when generating the next.
class EncoderDecoder(nn.Module):
"""
A standard Encoder-Decoder architecture. Base for this and many
other models.
"""
def __init__(self, encoder, decoder, src_embed, tgt_embed, generator):
super(EncoderDecoder, self).__init__()
self.encoder = encoder
self.decoder = decoder
self.src_embed = src_embed
self.tgt_embed = tgt_embed
self.generator = generator
def forward(self, src, tgt, src_mask, tgt_mask):
"Take in and process masked src and target sequences."
return self.decode(self.encode(src, src_mask), src_mask,
tgt, tgt_mask)
def encode(self, src, src_mask):
return self.encoder(self.src_embed(src), src_mask)
def decode(self, memory, src_mask, tgt, tgt_mask):
return self.decoder(self.tgt_embed(tgt), memory, src_mask, tgt_mask)
class Generator(nn.Module):
"Define standard linear + softmax generation step."
def __init__(self, d_model, vocab):
super(Generator, self).__init__()
self.proj = nn.Linear(d_model, vocab)
def forward(self, x):
return F.log_softmax(self.proj(x), dim=-1)
The Transformer follows this overall architecture using stacked self-attention and point-wise, fully connected layers for both the encoder and decoder, shown in the left and right halves of Figure 1, respectively.
Image(filename='images/ModalNet-21.png')
def clones(module, N):
"Produce N identical layers."
return nn.ModuleList([copy.deepcopy(module) for _ in range(N)])
class Encoder(nn.Module):
"Core encoder is a stack of N layers"
def __init__(self, layer, N):
super(Encoder, self).__init__()
self.layers = clones(layer, N)
self.norm = LayerNorm(layer.size)
def forward(self, x, mask):
"Pass the input (and mask) through each layer in turn."
for layer in self.layers:
x = layer(x, mask)
return self.norm(x)
class LayerNorm(nn.Module):
"Construct a layernorm module (See citation for details)."
def __init__(self, features, eps=1e-6):
super(LayerNorm, self).__init__()
self.a_2 = nn.Parameter(torch.ones(features))
self.b_2 = nn.Parameter(torch.zeros(features))
self.eps = eps
def forward(self, x):
mean = x.mean(-1, keepdim=True)
std = x.std(-1, keepdim=True)
return self.a_2 * (x - mean) / (std + self.eps) + self.b_2
That is, the output of each sub-layer is $\mathrm{LayerNorm}(x + \mathrm{Sublayer}(x))$, where $\mathrm{Sublayer}(x)$ is the function implemented by the sub-layer itself. We apply dropout (cite) to the output of each sub-layer, before it is added to the sub-layer input and normalized.
To facilitate these residual connections, all sub-layers in the model, as well as the embedding layers, produce outputs of dimension $d_{\text{model}}=512$.
class SublayerConnection(nn.Module):
"""
A residual connection followed by a layer norm.
Note for code simplicity the norm is first as opposed to last.
"""
def __init__(self, size, dropout):
super(SublayerConnection, self).__init__()
self.norm = LayerNorm(size)
self.dropout = nn.Dropout(dropout)
def forward(self, x, sublayer):
"Apply residual connection to any sublayer with the same size."
return x + self.dropout(sublayer(self.norm(x)))
Each layer has two sub-layers. The first is a multi-head self-attention mechanism, and the second is a simple, position-wise fully connected feed-forward network.
class EncoderLayer(nn.Module):
"Encoder is made up of self-attn and feed forward (defined below)"
def __init__(self, size, self_attn, feed_forward, dropout):
super(EncoderLayer, self).__init__()
self.self_attn = self_attn
self.feed_forward = feed_forward
self.sublayer = clones(SublayerConnection(size, dropout), 2)
self.size = size
def forward(self, x, mask):
"Follow Figure 1 (left) for connections."
x = self.sublayer[0](x, lambda x: self.self_attn(x, x, x, mask))
return self.sublayer[1](x, self.feed_forward)
The decoder is also composed of a stack of $N=6$ identical layers.
class Decoder(nn.Module):
"Generic N layer decoder with masking."
def __init__(self, layer, N):
super(Decoder, self).__init__()
self.layers = clones(layer, N)
self.norm = LayerNorm(layer.size)
def forward(self, x, memory, src_mask, tgt_mask):
for layer in self.layers:
x = layer(x, memory, src_mask, tgt_mask)
return self.norm(x)
In addition to the two sub-layers in each encoder layer, the decoder inserts a third sub-layer, which performs multi-head attention over the output of the encoder stack. Similar to the encoder, we employ residual connections around each of the sub-layers, followed by layer normalization.
class DecoderLayer(nn.Module):
"Decoder is made of self-attn, src-attn, and feed forward (defined below)"
def __init__(self, size, self_attn, src_attn, feed_forward, dropout):
super(DecoderLayer, self).__init__()
self.size = size
self.self_attn = self_attn
self.src_attn = src_attn
self.feed_forward = feed_forward
self.sublayer = clones(SublayerConnection(size, dropout), 3)
def forward(self, x, memory, src_mask, tgt_mask):
"Follow Figure 1 (right) for connections."
m = memory
x = self.sublayer[0](x, lambda x: self.self_attn(x, x, x, tgt_mask))
x = self.sublayer[1](x, lambda x: self.src_attn(x, m, m, src_mask))
return self.sublayer[2](x, self.feed_forward)
We also modify the self-attention sub-layer in the decoder stack to prevent positions from attending to subsequent positions. This masking, combined with fact that the output embeddings are offset by one position, ensures that the predictions for position $i$ can depend only on the known outputs at positions less than $i$.
def subsequent_mask(size):
"Mask out subsequent positions."
attn_shape = (1, size, size)
subsequent_mask = np.triu(np.ones(attn_shape), k=1).astype('uint8')
return torch.from_numpy(subsequent_mask) == 0
Below the attention mask shows the position each tgt word (row) is allowed to look at (column). Words are blocked for attending to future words during training.
plt.figure(figsize=(5,5))
plt.imshow(subsequent_mask(20)[0])
None
An attention function can be described as mapping a query and a set of key-value pairs to an output, where the query, keys, values, and output are all vectors. The output is computed as a weighted sum of the values, where the weight assigned to each value is computed by a compatibility function of the query with the corresponding key.
We call our particular attention "Scaled Dot-Product Attention". The input consists of queries and keys of dimension $d_k$, and values of dimension $d_v$. We compute the dot products of the query with all keys, divide each by $\sqrt{d_k}$, and apply a softmax function to obtain the weights on the values.
Image(filename='images/ModalNet-19.png')
In practice, we compute the attention function on a set of queries simultaneously, packed together into a matrix $Q$. The keys and values are also packed together into matrices $K$ and $V$. We compute the matrix of outputs as:
$$ \mathrm{Attention}(Q, K, V) = \mathrm{softmax}(\frac{QK^T}{\sqrt{d_k}})V $$def attention(query, key, value, mask=None, dropout=None):
"Compute 'Scaled Dot Product Attention'"
d_k = query.size(-1)
scores = torch.matmul(query, key.transpose(-2, -1)) \
/ math.sqrt(d_k)
if mask is not None:
scores = scores.masked_fill(mask == 0, -1e9)
p_attn = F.softmax(scores, dim = -1)
if dropout is not None:
p_attn = dropout(p_attn)
return torch.matmul(p_attn, value), p_attn
The two most commonly used attention functions are additive attention (cite), and dot-product (multiplicative) attention. Dot-product attention is identical to our algorithm, except for the scaling factor of $\frac{1}{\sqrt{d_k}}$. Additive attention computes the compatibility function using a feed-forward network with a single hidden layer. While the two are similar in theoretical complexity, dot-product attention is much faster and more space-efficient in practice, since it can be implemented using highly optimized matrix multiplication code.
While for small values of $d_k$ the two mechanisms perform similarly, additive attention outperforms dot product attention without scaling for larger values of $d_k$ (cite). We suspect that for large values of $d_k$, the dot products grow large in magnitude, pushing the softmax function into regions where it has extremely small gradients (To illustrate why the dot products get large, assume that the components of $q$ and $k$ are independent random variables with mean $0$ and variance $1$. Then their dot product, $q \cdot k = \sum_{i=1}^{d_k} q_ik_i$, has mean $0$ and variance $d_k$.). To counteract this effect, we scale the dot products by $\frac{1}{\sqrt{d_k}}$.
Image(filename='images/ModalNet-20.png')
Multi-head attention allows the model to jointly attend to information from different representation subspaces at different positions. With a single attention head, averaging inhibits this.
$$
\mathrm{MultiHead}(Q, K, V) = \mathrm{Concat}(\mathrm{head_1}, ..., \mathrm{head_h})W^O \\
\text{where}~\mathrm{head_i} = \mathrm{Attention}(QW^Q_i, KW^K_i, VW^V_i)
$$
Where the projections are parameter matrices $W^Q_i \in \mathbb{R}^{d_{\text{model}} \times d_k}$, $W^K_i \in \mathbb{R}^{d_{\text{model}} \times d_k}$, $W^V_i \in \mathbb{R}^{d_{\text{model}} \times d_v}$ and $W^O \in \mathbb{R}^{hd_v \times d_{\text{model}}}$. In this work we employ $h=8$ parallel attention layers, or heads. For each of these we use $d_k=d_v=d_{\text{model}}/h=64$. Due to the reduced dimension of each head, the total computational cost is similar to that of single-head attention with full dimensionality.
class MultiHeadedAttention(nn.Module):
def __init__(self, h, d_model, dropout=0.1):
"Take in model size and number of heads."
super(MultiHeadedAttention, self).__init__()
assert d_model % h == 0
# We assume d_v always equals d_k
self.d_k = d_model // h
self.h = h
self.linears = clones(nn.Linear(d_model, d_model), 4)
self.attn = None
self.dropout = nn.Dropout(p=dropout)
def forward(self, query, key, value, mask=None):
"Implements Figure 2"
if mask is not None:
# Same mask applied to all h heads.
mask = mask.unsqueeze(1)
nbatches = query.size(0)
# 1) Do all the linear projections in batch from d_model => h x d_k
query, key, value = \
[l(x).view(nbatches, -1, self.h, self.d_k).transpose(1, 2)
for l, x in zip(self.linears, (query, key, value))]
# 2) Apply attention on all the projected vectors in batch.
x, self.attn = attention(query, key, value, mask=mask,
dropout=self.dropout)
# 3) "Concat" using a view and apply a final linear.
x = x.transpose(1, 2).contiguous() \
.view(nbatches, -1, self.h * self.d_k)
return self.linears[-1](x)
The Transformer uses multi-head attention in three different ways:
1) In "encoder-decoder attention" layers, the queries come from the previous decoder layer, and the memory keys and values come from the output of the encoder. This allows every position in the decoder to attend over all positions in the input sequence. This mimics the typical encoder-decoder attention mechanisms in sequence-to-sequence models such as (cite).
2) The encoder contains self-attention layers. In a self-attention layer all of the keys, values and queries come from the same place, in this case, the output of the previous layer in the encoder. Each position in the encoder can attend to all positions in the previous layer of the encoder.
3) Similarly, self-attention layers in the decoder allow each position in the decoder to attend to all positions in the decoder up to and including that position. We need to prevent leftward information flow in the decoder to preserve the auto-regressive property. We implement this inside of scaled dot-product attention by masking out (setting to $-\infty$) all values in the input of the softmax which correspond to illegal connections.
In addition to attention sub-layers, each of the layers in our encoder and decoder contains a fully connected feed-forward network, which is applied to each position separately and identically. This consists of two linear transformations with a ReLU activation in between.
$$\mathrm{FFN}(x)=\max(0, xW_1 + b_1) W_2 + b_2$$
While the linear transformations are the same across different positions, they use different parameters from layer to layer. Another way of describing this is as two convolutions with kernel size 1. The dimensionality of input and output is $d_{\text{model}}=512$, and the inner-layer has dimensionality $d_{ff}=2048$.
class PositionwiseFeedForward(nn.Module):
"Implements FFN equation."
def __init__(self, d_model, d_ff, dropout=0.1):
super(PositionwiseFeedForward, self).__init__()
self.w_1 = nn.Linear(d_model, d_ff)
self.w_2 = nn.Linear(d_ff, d_model)
self.dropout = nn.Dropout(dropout)
def forward(self, x):
return self.w_2(self.dropout(F.relu(self.w_1(x))))
Similarly to other sequence transduction models, we use learned embeddings to convert the input tokens and output tokens to vectors of dimension $d_{\text{model}}$. We also use the usual learned linear transformation and softmax function to convert the decoder output to predicted next-token probabilities. In our model, we share the same weight matrix between the two embedding layers and the pre-softmax linear transformation, similar to (cite). In the embedding layers, we multiply those weights by $\sqrt{d_{\text{model}}}$.
class Embeddings(nn.Module):
def __init__(self, d_model, vocab):
super(Embeddings, self).__init__()
self.lut = nn.Embedding(vocab, d_model)
self.d_model = d_model
def forward(self, x):
return self.lut(x) * math.sqrt(self.d_model)
Since our model contains no recurrence and no convolution, in order for the model to make use of the order of the sequence, we must inject some information about the relative or absolute position of the tokens in the sequence. To this end, we add "positional encodings" to the input embeddings at the bottoms of the encoder and decoder stacks. The positional encodings have the same dimension $d_{\text{model}}$ as the embeddings, so that the two can be summed. There are many choices of positional encodings, learned and fixed (cite).
In this work, we use sine and cosine functions of different frequencies:
$$PE_{(pos,2i)} = sin(pos / 10000^{2i/d_{\text{model}}})$$
where $pos$ is the position and $i$ is the dimension. That is, each dimension of the positional encoding corresponds to a sinusoid. The wavelengths form a geometric progression from $2\pi$ to $10000 \cdot 2\pi$. We chose this function because we hypothesized it would allow the model to easily learn to attend by relative positions, since for any fixed offset $k$, $PE_{pos+k}$ can be represented as a linear function of $PE_{pos}$.
In addition, we apply dropout to the sums of the embeddings and the positional encodings in both the encoder and decoder stacks. For the base model, we use a rate of $P_{drop}=0.1$.
class PositionalEncoding(nn.Module):
"Implement the PE function."
def __init__(self, d_model, dropout, max_len=5000):
super(PositionalEncoding, self).__init__()
self.dropout = nn.Dropout(p=dropout)
# Compute the positional encodings once in log space.
pe = torch.zeros(max_len, d_model)
position = torch.arange(0, max_len).unsqueeze(1)
div_term = torch.exp(torch.arange(0, d_model, 2) *
-(math.log(10000.0) / d_model))
pe[:, 0::2] = torch.sin(position * div_term)
pe[:, 1::2] = torch.cos(position * div_term)
pe = pe.unsqueeze(0)
self.register_buffer('pe', pe)
def forward(self, x):
x = x + Variable(self.pe[:, :x.size(1)],
requires_grad=False)
return self.dropout(x)
Below the positional encoding will add in a sine wave based on position. The frequency and offset of the wave is different for each dimension.
plt.figure(figsize=(15, 5))
pe = PositionalEncoding(20, 0)
y = pe.forward(Variable(torch.zeros(1, 100, 20)))
plt.plot(np.arange(100), y[0, :, 4:8].data.numpy())
plt.legend(["dim %d"%p for p in [4,5,6,7]])
None
We also experimented with using learned positional embeddings (cite) instead, and found that the two versions produced nearly identical results. We chose the sinusoidal version because it may allow the model to extrapolate to sequence lengths longer than the ones encountered during training.
Here we define a function from hyperparameters to a full model.
def make_model(src_vocab, tgt_vocab, N=6,
d_model=512, d_ff=2048, h=8, dropout=0.1):
"Helper: Construct a model from hyperparameters."
c = copy.deepcopy
attn = MultiHeadedAttention(h, d_model)
ff = PositionwiseFeedForward(d_model, d_ff, dropout)
position = PositionalEncoding(d_model, dropout)
model = EncoderDecoder(
Encoder(EncoderLayer(d_model, c(attn), c(ff), dropout), N),
Decoder(DecoderLayer(d_model, c(attn), c(attn),
c(ff), dropout), N),
nn.Sequential(Embeddings(d_model, src_vocab), c(position)),
nn.Sequential(Embeddings(d_model, tgt_vocab), c(position)),
Generator(d_model, tgt_vocab))
# This was important from their code.
# Initialize parameters with Glorot / fan_avg.
for p in model.parameters():
if p.dim() > 1:
nn.init.xavier_uniform(p)
return model
# Small example model.
tmp_model = make_model(10, 10, 2)
None
This section describes the training regime for our models.
We stop for a quick interlude to introduce some of the tools needed to train a standard encoder decoder model. First we define a batch object that holds the src and target sentences for training, as well as constructing the masks.
class Batch:
"Object for holding a batch of data with mask during training."
def __init__(self, src, trg=None, pad=0):
self.src = src
self.src_mask = (src != pad).unsqueeze(-2)
if trg is not None:
self.trg = trg[:, :-1]
self.trg_y = trg[:, 1:]
self.trg_mask = \
self.make_std_mask(self.trg, pad)
self.ntokens = (self.trg_y != pad).data.sum()
@staticmethod
def make_std_mask(tgt, pad):
"Create a mask to hide padding and future words."
tgt_mask = (tgt != pad).unsqueeze(-2)
tgt_mask = tgt_mask & Variable(
subsequent_mask(tgt.size(-1)).type_as(tgt_mask.data))
return tgt_mask
Next we create a generic training and scoring function to keep track of loss. We pass in a generic loss compute function that also handles parameter updates.
def run_epoch(data_iter, model, loss_compute):
"Standard Training and Logging Function"
start = time.time()
total_tokens = 0
total_loss = 0
tokens = 0
for i, batch in enumerate(data_iter):
out = model.forward(batch.src, batch.trg,
batch.src_mask, batch.trg_mask)
loss = loss_compute(out, batch.trg_y, batch.ntokens)
total_loss += loss
total_tokens += batch.ntokens
tokens += batch.ntokens
if i % 50 == 1:
elapsed = time.time() - start
print("Epoch Step: %d Loss: %f Tokens per Sec: %f" %
(i, loss / batch.ntokens, tokens / elapsed))
start = time.time()
tokens = 0
return total_loss / total_tokens
We trained on the standard WMT 2014 English-German dataset consisting of about 4.5 million sentence pairs. Sentences were encoded using byte-pair encoding, which has a shared source-target vocabulary of about 37000 tokens. For English-French, we used the significantly larger WMT 2014 English-French dataset consisting of 36M sentences and split tokens into a 32000 word-piece vocabulary.
Sentence pairs were batched together by approximate sequence length. Each training batch contained a set of sentence pairs containing approximately 25000 source tokens and 25000 target tokens.
We will use torch text for batching. This is discussed in more detail below. Here we create batches in a torchtext function that ensures our batch size padded to the maximum batchsize does not surpass a threshold (25000 if we have 8 gpus).
global max_src_in_batch, max_tgt_in_batch
def batch_size_fn(new, count, sofar):
"Keep augmenting batch and calculate total number of tokens + padding."
global max_src_in_batch, max_tgt_in_batch
if count == 1:
max_src_in_batch = 0
max_tgt_in_batch = 0
max_src_in_batch = max(max_src_in_batch, len(new.src))
max_tgt_in_batch = max(max_tgt_in_batch, len(new.trg) + 2)
src_elements = count * max_src_in_batch
tgt_elements = count * max_tgt_in_batch
return max(src_elements, tgt_elements)
We trained our models on one machine with 8 NVIDIA P100 GPUs. For our base models using the hyperparameters described throughout the paper, each training step took about 0.4 seconds. We trained the base models for a total of 100,000 steps or 12 hours. For our big models, step time was 1.0 seconds. The big models were trained for 300,000 steps (3.5 days).
We used the Adam optimizer (cite) with $\beta_1=0.9$, $\beta_2=0.98$ and $\epsilon=10^{-9}$. We varied the learning rate over the course of training, according to the formula:
$$
lrate = d_{\text{model}}^{-0.5} \cdot
\min({step\_num}^{-0.5},
{step\_num} \cdot {warmup\_steps}^{-1.5})
$$
This corresponds to increasing the learning rate linearly for the first $warmup\_steps$ training steps, and decreasing it thereafter proportionally to the inverse square root of the step number. We used $warmup\_steps=4000$.
Note: This part is very important. Need to train with this setup of the model.
class NoamOpt:
"Optim wrapper that implements rate."
def __init__(self, model_size, factor, warmup, optimizer):
self.optimizer = optimizer
self._step = 0
self.warmup = warmup
self.factor = factor
self.model_size = model_size
self._rate = 0
def step(self):
"Update parameters and rate"
self._step += 1
rate = self.rate()
for p in self.optimizer.param_groups:
p['lr'] = rate
self._rate = rate
self.optimizer.step()
def rate(self, step = None):
"Implement `lrate` above"
if step is None:
step = self._step
return self.factor * \
(self.model_size ** (-0.5) *
min(step ** (-0.5), step * self.warmup ** (-1.5)))
def get_std_opt(model):
return NoamOpt(model.src_embed[0].d_model, 2, 4000,
torch.optim.Adam(model.parameters(), lr=0, betas=(0.9, 0.98), eps=1e-9))
Example of the curves of this model for different model sizes and for optimization hyperparameters.
# Three settings of the lrate hyperparameters.
opts = [NoamOpt(512, 1, 4000, None),
NoamOpt(512, 1, 8000, None),
NoamOpt(256, 1, 4000, None)]
plt.plot(np.arange(1, 20000), [[opt.rate(i) for opt in opts] for i in range(1, 20000)])
plt.legend(["512:4000", "512:8000", "256:4000"])
None
We implement label smoothing using the KL div loss. Instead of using a one-hot target distribution, we create a distribution that has
confidence
of the correct word and the rest of thesmoothing
mass distributed throughout the vocabulary.
class LabelSmoothing(nn.Module):
"Implement label smoothing."
def __init__(self, size, padding_idx, smoothing=0.0):
super(LabelSmoothing, self).__init__()
self.criterion = nn.KLDivLoss(size_average=False)
self.padding_idx = padding_idx
self.confidence = 1.0 - smoothing
self.smoothing = smoothing
self.size = size
self.true_dist = None
def forward(self, x, target):
assert x.size(1) == self.size
true_dist = x.data.clone()
true_dist.fill_(self.smoothing / (self.size - 2))
true_dist.scatter_(1, target.data.unsqueeze(1), self.confidence)
true_dist[:, self.padding_idx] = 0
mask = torch.nonzero(target.data == self.padding_idx)
if mask.dim() > 0:
true_dist.index_fill_(0, mask.squeeze(), 0.0)
self.true_dist = true_dist
return self.criterion(x, Variable(true_dist, requires_grad=False))
Here we can see an example of how the mass is distributed to the words based on confidence.
#Example of label smoothing.
crit = LabelSmoothing(5, 0, 0.4)
predict = torch.FloatTensor([[0, 0.2, 0.7, 0.1, 0],
[0, 0.2, 0.7, 0.1, 0],
[0, 0.2, 0.7, 0.1, 0]])
v = crit(Variable(predict.log()),
Variable(torch.LongTensor([2, 1, 0])))
# Show the target distributions expected by the system.
plt.imshow(crit.true_dist)
None
Label smoothing actually starts to penalize the model if it gets very confident about a given choice.
crit = LabelSmoothing(5, 0, 0.1)
def loss(x):
d = x + 3 * 1
predict = torch.FloatTensor([[0, x / d, 1 / d, 1 / d, 1 / d],
])
#print(predict)
return crit(Variable(predict.log()),
Variable(torch.LongTensor([1]))).data[0]
plt.plot(np.arange(1, 100), [loss(x) for x in range(1, 100)])
None
We can begin by trying out a simple copy-task. Given a random set of input symbols from a small vocabulary, the goal is to generate back those same symbols.
def data_gen(V, batch, nbatches):
"Generate random data for a src-tgt copy task."
for i in range(nbatches):
data = torch.from_numpy(np.random.randint(1, V, size=(batch, 10)))
data[:, 0] = 1
src = Variable(data, requires_grad=False)
tgt = Variable(data, requires_grad=False)
yield Batch(src, tgt, 0)
class SimpleLossCompute:
"A simple loss compute and train function."
def __init__(self, generator, criterion, opt=None):
self.generator = generator
self.criterion = criterion
self.opt = opt
def __call__(self, x, y, norm):
x = self.generator(x)
loss = self.criterion(x.contiguous().view(-1, x.size(-1)),
y.contiguous().view(-1)) / norm
loss.backward()
if self.opt is not None:
self.opt.step()
self.opt.optimizer.zero_grad()
return loss.data[0] * norm
# Train the simple copy task.
V = 11
criterion = LabelSmoothing(size=V, padding_idx=0, smoothing=0.0)
model = make_model(V, V, N=2)
model_opt = NoamOpt(model.src_embed[0].d_model, 1, 400,
torch.optim.Adam(model.parameters(), lr=0, betas=(0.9, 0.98), eps=1e-9))
for epoch in range(10):
model.train()
run_epoch(data_gen(V, 30, 20), model,
SimpleLossCompute(model.generator, criterion, model_opt))
model.eval()
print(run_epoch(data_gen(V, 30, 5), model,
SimpleLossCompute(model.generator, criterion, None)))
This code predicts a translation using greedy decoding for simplicity.
def greedy_decode(model, src, src_mask, max_len, start_symbol):
memory = model.encode(src, src_mask)
ys = torch.ones(1, 1).fill_(start_symbol).type_as(src.data)
for i in range(max_len-1):
out = model.decode(memory, src_mask,
Variable(ys),
Variable(subsequent_mask(ys.size(1))
.type_as(src.data)))
prob = model.generator(out[:, -1])
_, next_word = torch.max(prob, dim = 1)
next_word = next_word.data[0]
ys = torch.cat([ys,
torch.ones(1, 1).type_as(src.data).fill_(next_word)], dim=1)
return ys
model.eval()
src = Variable(torch.LongTensor([[1,2,3,4,5,6,7,8,9,10]]) )
src_mask = Variable(torch.ones(1, 1, 10) )
print(greedy_decode(model, src, src_mask, max_len=10, start_symbol=1))
Now we consider a real-world example using the IWSLT German-English Translation task. This task is much smaller than the WMT task considered in the paper, but it illustrates the whole system. We also show how to use multi-gpu processing to make it really fast.
#!pip install torchtext spacy
#!python -m spacy download en
#!python -m spacy download de
We will load the dataset using torchtext and spacy for tokenization.
# For data loading.
from torchtext import data, datasets
if True:
import spacy
spacy_de = spacy.load('de')
spacy_en = spacy.load('en')
def tokenize_de(text):
return [tok.text for tok in spacy_de.tokenizer(text)]
def tokenize_en(text):
return [tok.text for tok in spacy_en.tokenizer(text)]
BOS_WORD = '<s>'
EOS_WORD = '</s>'
BLANK_WORD = "<blank>"
SRC = data.Field(tokenize=tokenize_de, pad_token=BLANK_WORD)
TGT = data.Field(tokenize=tokenize_en, init_token = BOS_WORD,
eos_token = EOS_WORD, pad_token=BLANK_WORD)
MAX_LEN = 100
train, val, test = datasets.IWSLT.splits(
exts=('.de', '.en'), fields=(SRC, TGT),
filter_pred=lambda x: len(vars(x)['src']) <= MAX_LEN and
len(vars(x)['trg']) <= MAX_LEN)
MIN_FREQ = 2
SRC.build_vocab(train.src, min_freq=MIN_FREQ)
TGT.build_vocab(train.trg, min_freq=MIN_FREQ)
Batching matters a ton for speed. We want to have very evenly divided batches, with absolutely minimal padding. To do this we have to hack a bit around the default torchtext batching. This code patches their default batching to make sure we search over enough sentences to find tight batches.
class MyIterator(data.Iterator):
def create_batches(self):
if self.train:
def pool(d, random_shuffler):
for p in data.batch(d, self.batch_size * 100):
p_batch = data.batch(
sorted(p, key=self.sort_key),
self.batch_size, self.batch_size_fn)
for b in random_shuffler(list(p_batch)):
yield b
self.batches = pool(self.data(), self.random_shuffler)
else:
self.batches = []
for b in data.batch(self.data(), self.batch_size,
self.batch_size_fn):
self.batches.append(sorted(b, key=self.sort_key))
def rebatch(pad_idx, batch):
"Fix order in torchtext to match ours"
src, trg = batch.src.transpose(0, 1), batch.trg.transpose(0, 1)
return Batch(src, trg, pad_idx)
Finally to really target fast training, we will use multi-gpu. This code implements multi-gpu word generation. It is not specific to transformer so I won't go into too much detail. The idea is to split up word generation at training time into chunks to be processed in parallel across many different gpus. We do this using pytorch parallel primitives:
# Skip if not interested in multigpu.
class MultiGPULossCompute:
"A multi-gpu loss compute and train function."
def __init__(self, generator, criterion, devices, opt=None, chunk_size=5):
# Send out to different gpus.
self.generator = generator
self.criterion = nn.parallel.replicate(criterion,
devices=devices)
self.opt = opt
self.devices = devices
self.chunk_size = chunk_size
def __call__(self, out, targets, normalize):
total = 0.0
generator = nn.parallel.replicate(self.generator,
devices=self.devices)
out_scatter = nn.parallel.scatter(out,
target_gpus=self.devices)
out_grad = [[] for _ in out_scatter]
targets = nn.parallel.scatter(targets,
target_gpus=self.devices)
# Divide generating into chunks.
chunk_size = self.chunk_size
for i in range(0, out_scatter[0].size(1), chunk_size):
# Predict distributions
out_column = [[Variable(o[:, i:i+chunk_size].data,
requires_grad=self.opt is not None)]
for o in out_scatter]
gen = nn.parallel.parallel_apply(generator, out_column)
# Compute loss.
y = [(g.contiguous().view(-1, g.size(-1)),
t[:, i:i+chunk_size].contiguous().view(-1))
for g, t in zip(gen, targets)]
loss = nn.parallel.parallel_apply(self.criterion, y)
# Sum and normalize loss
l = nn.parallel.gather(loss,
target_device=self.devices[0])
l = l.sum()[0] / normalize
total += l.data[0]
# Backprop loss to output of transformer
if self.opt is not None:
l.backward()
for j, l in enumerate(loss):
out_grad[j].append(out_column[j][0].grad.data.clone())
# Backprop all loss through transformer.
if self.opt is not None:
out_grad = [Variable(torch.cat(og, dim=1)) for og in out_grad]
o1 = out
o2 = nn.parallel.gather(out_grad,
target_device=self.devices[0])
o1.backward(gradient=o2)
self.opt.step()
self.opt.optimizer.zero_grad()
return total * normalize
Now we create our model, criterion, optimizer, data iterators, and paralelization
# GPUs to use
devices = [0, 1, 2, 3]
if True:
pad_idx = TGT.vocab.stoi["<blank>"]
model = make_model(len(SRC.vocab), len(TGT.vocab), N=6)
model.cuda()
criterion = LabelSmoothing(size=len(TGT.vocab), padding_idx=pad_idx, smoothing=0.1)
criterion.cuda()
BATCH_SIZE = 12000
train_iter = MyIterator(train, batch_size=BATCH_SIZE, device=0,
repeat=False, sort_key=lambda x: (len(x.src), len(x.trg)),
batch_size_fn=batch_size_fn, train=True)
valid_iter = MyIterator(val, batch_size=BATCH_SIZE, device=0,
repeat=False, sort_key=lambda x: (len(x.src), len(x.trg)),
batch_size_fn=batch_size_fn, train=False)
model_par = nn.DataParallel(model, device_ids=devices)
None
Now we train the model. I will play with the warmup steps a bit, but everything else uses the default parameters. On an AWS p3.8xlarge with 4 Tesla V100s, this runs at ~27,000 tokens per second with a batch size of 12,000
#!wget https://s3.amazonaws.com/opennmt-models/iwslt.pt
if False:
model_opt = NoamOpt(model.src_embed[0].d_model, 1, 2000,
torch.optim.Adam(model.parameters(), lr=0, betas=(0.9, 0.98), eps=1e-9))
for epoch in range(10):
model_par.train()
run_epoch((rebatch(pad_idx, b) for b in train_iter),
model_par,
MultiGPULossCompute(model.generator, criterion,
devices=devices, opt=model_opt))
model_par.eval()
loss = run_epoch((rebatch(pad_idx, b) for b in valid_iter),
model_par,
MultiGPULossCompute(model.generator, criterion,
devices=devices, opt=None))
print(loss)
else:
model = torch.load("iwslt.pt")
Once trained we can decode the model to produce a set of translations. Here we simply translate the first sentence in the validation set. This dataset is pretty small so the translations with greedy search are reasonably accurate.
for i, batch in enumerate(valid_iter):
src = batch.src.transpose(0, 1)[:1]
src_mask = (src != SRC.vocab.stoi["<blank>"]).unsqueeze(-2)
out = greedy_decode(model, src, src_mask,
max_len=60, start_symbol=TGT.vocab.stoi["<s>"])
print("Translation:", end="\t")
for i in range(1, out.size(1)):
sym = TGT.vocab.itos[out[0, i]]
if sym == "</s>": break
print(sym, end =" ")
print()
print("Target:", end="\t")
for i in range(1, batch.trg.size(0)):
sym = TGT.vocab.itos[batch.trg.data[i, 0]]
if sym == "</s>": break
print(sym, end =" ")
print()
break
So this mostly covers the transformer model itself. There are four aspects that we didn't cover explicitly. We also have all these additional features implemented in OpenNMT-py.
1) BPE/ Word-piece: We can use a library to first preprocess the data into subword units. See Rico Sennrich's subword-nmt implementation. These models will transform the training data to look like this:
▁Die ▁Protokoll datei ▁kann ▁ heimlich ▁per ▁E - Mail ▁oder ▁FTP ▁an ▁einen ▁bestimmte n ▁Empfänger ▁gesendet ▁werden .
2) Shared Embeddings: When using BPE with shared vocabulary we can share the same weight vectors between the source / target / generator. See the (cite) for details. To add this to the model simply do this:
if False:
model.src_embed[0].lut.weight = model.tgt_embeddings[0].lut.weight
model.generator.lut.weight = model.tgt_embed[0].lut.weight
3) Beam Search: This is a bit too complicated to cover here. See the OpenNMT-py for a pytorch implementation.
4) Model Averaging: The paper averages the last k checkpoints to create an ensembling effect. We can do this after the fact if we have a bunch of models:
def average(model, models):
"Average models into model"
for ps in zip(*[m.params() for m in [model] + models]):
p[0].copy_(torch.sum(*ps[1:]) / len(ps[1:]))
On the WMT 2014 English-to-German translation task, the big transformer model (Transformer (big) in Table 2) outperforms the best previously reported models (including ensembles) by more than 2.0 BLEU, establishing a new state-of-the-art BLEU score of 28.4. The configuration of this model is listed in the bottom line of Table 3. Training took 3.5 days on 8 P100 GPUs. Even our base model surpasses all previously published models and ensembles, at a fraction of the training cost of any of the competitive models.
On the WMT 2014 English-to-French translation task, our big model achieves a BLEU score of 41.0, outperforming all of the previously published single models, at less than 1/4 the training cost of the previous state-of-the-art model. The Transformer (big) model trained for English-to-French used dropout rate Pdrop = 0.1, instead of 0.3.
Image(filename="images/results.png")
The code we have written here is a version of the base model. There are fully trained version of this system available here (Example Models).
With the addtional extensions in the last section, the OpenNMT-py replication gets to 26.9 on EN-DE WMT. Here I have loaded in those parameters to our reimplemenation.
!wget https://s3.amazonaws.com/opennmt-models/en-de-model.pt
model, SRC, TGT = torch.load("en-de-model.pt")
model.eval()
sent = "▁The ▁log ▁file ▁can ▁be ▁sent ▁secret ly ▁with ▁email ▁or ▁FTP ▁to ▁a ▁specified ▁receiver".split()
src = torch.LongTensor([[SRC.stoi[w] for w in sent]])
src = Variable(src)
src_mask = (src != SRC.stoi["<blank>"]).unsqueeze(-2)
out = greedy_decode(model, src, src_mask,
max_len=60, start_symbol=TGT.stoi["<s>"])
print("Translation:", end="\t")
trans = "<s> "
for i in range(1, out.size(1)):
sym = TGT.itos[out[0, i]]
if sym == "</s>": break
trans += sym + " "
print(trans)
Even with a greedy decoder the translation looks pretty good. We can further visualize it to see what is happening at each layer of the attention
tgt_sent = trans.split()
def draw(data, x, y, ax):
seaborn.heatmap(data,
xticklabels=x, square=True, yticklabels=y, vmin=0.0, vmax=1.0,
cbar=False, ax=ax)
for layer in range(1, 6, 2):
fig, axs = plt.subplots(1,4, figsize=(20, 10))
print("Encoder Layer", layer+1)
for h in range(4):
draw(model.encoder.layers[layer].self_attn.attn[0, h].data,
sent, sent if h ==0 else [], ax=axs[h])
plt.show()
for layer in range(1, 6, 2):
fig, axs = plt.subplots(1,4, figsize=(20, 10))
print("Decoder Self Layer", layer+1)
for h in range(4):
draw(model.decoder.layers[layer].self_attn.attn[0, h].data[:len(tgt_sent), :len(tgt_sent)],
tgt_sent, tgt_sent if h ==0 else [], ax=axs[h])
plt.show()
print("Decoder Src Layer", layer+1)
fig, axs = plt.subplots(1,4, figsize=(20, 10))
for h in range(4):
draw(model.decoder.layers[layer].self_attn.attn[0, h].data[:len(tgt_sent), :len(sent)],
sent, tgt_sent if h ==0 else [], ax=axs[h])
plt.show()
Hopefully this code is useful for future research. Please reach out if you have any issues. If you find this code helpful, also check out our other OpenNMT tools.
@inproceedings{opennmt,
author = {Guillaume Klein and
Yoon Kim and
Yuntian Deng and
Jean Senellart and
Alexander M. Rush},
title = {OpenNMT: Open-Source Toolkit for Neural Machine Translation},
booktitle = {Proc. ACL},
year = {2017},
url = {https://doi.org/10.18653/v1/P17-4012},
doi = {10.18653/v1/P17-4012}
}
Cheers, srush
{::options parse_block_html="true" /}


Showing {{ results | count }} results for "{{ get:q }}".
{{ search:results supplement_data="true" collection:is="academy" }} {{ if no_results }}We didn't find anything for "{{ get:q }}".
Try searching with another term.
{{ else }} {{ partial:academy-card-h classes="max-w-3xl mb-8" }} {{ /if }} {{ /search:results }}


Account TypeWhat's this? Personal Musician Comedian Filmmaker
First Name
Last Name
Artist Name
Genre Select a genre 2-step A'cappella Acousmatic / Tape music Acoustic Afro-beat Alternative Ambient Americana Big Beat Black Metal Bluegrass Blues Bossa Nova Breakbeat Breakcore Celtic Chinese pop Chinese traditional Christian Christian Rap Classic Rock Classical Classical Opera and Vocal Club Comedy Concrete Country Crunk Death Metal Disco House Down-tempo Drum & Bass Dub Dutch pop Electro Electroacoustic Electronica Emo Emotronic Experimental Flamenco Folk Folk Rock Freestyle French pop Funk Fusion Garage German pop Ghettotech Glam Gospel Gothic Grime Grindcore Grunge Happy Hardcore Hard House Hardcore Hawaiian Healing & EasyListening Hip Hop House Hyphy IDM Idol Indie Industrial Italian pop Jam Band Japanese Classic Music Jazz J-POP Jungle K-POP Latin Live Electronics Lounge Lyrical Melodramatic Popular Song Metal Minimalist Neo-soul New Wave Nu-Jazz Other Pop Pop Punk Post punk Powerpop Progressive Progrsv House Psychedelic Psychobilly Punk R&B Rap Reggae Reggaeton Regional Mexican Religious Rock Rockabilly Roots Music Salsa Samba Screamo Shoegaze Showtunes Ska Soul Southern Rock Spanish pop Surf Swing Tango Techno Thrash Trance Trance Trip Hop Tropical Turntablism Visual Western Swing Zouk
Label Type Select a label Unsigned Major Indie
Email
Password
Confirm Password
Birthday Month Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Day 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Year 2010 2009 2008 2007 2006 2005 2004 2003 2002 2001 2000 1999 1998 1997 1996 1995 1994 1993 1992 1991 1990 1989 1988 1987 1986 1985 1984 1983 1982 1981 1980 1979 1978 1977 1976 1975 1974 1973 1972 1971 1970 1969 1968 1967 1966 1965 1964 1963 1962 1961 1960 1959 1958 1957 1956 1955 1954 1953 1952 1951 1950 1949 1948 1947 1946 1945 1944 1943 1942 1941 1940 1939 1938 1937 1936 1935 1934 1933 1932 1931 1930 1929 1928 1927 1926 1925 1924 1923 1922 1921 1920 1919 1918 1917 1916 1915 1914 1913 1912 1911 1910 1909 1908 1907 1906 1905 1904 1903 1902 1901 1900
Gender Male Female
By clicking Sign up free, you agree to Myspace terms of service and privacy policy.
By clicking Sign up free, you agree to Myspace profile usage and copyrights, terms of service and privacy policy.
Sign up free
Myspace Music Musician Profiles are for Musicians:
Uploading music you did not create or have rights to redistribute is a violation of Myspaceâs Terms of Use and may be against the law. Even if you lawfully own a copy of the music (you bought a CD or downloaded it from an Internet service), you do not necessarily have permission to upload the music to a Myspace Musician Profile. If you are not the Musician who created the music or that Musicianâs agent, do not upload music. If you violate this rule, your Musician Profile may be suspended and/or deleted. If you would like to show support for a Musician, search for or create a Musician fan club in Myspace Groups.
If you upload copyright protected music and are not cleared for uploading, you may be blocked:
If you distribute your music commercially, your record label and/or publisher may have already registered your music to prevent copyright infringement. If you are blocked during an upload, contact your record label representative to be cleared to upload your music to your Myspace Musician Profile.

Keep me logged in
Forgot password? Login
Need an account? Sign up


Plugin Information |
|---|
View GitHub SQS Build Trigger on the plugin site for more information. |
Github Amazon SQS Plugin
This plugin integrates Jenkins with Github projects via Amazon's Simple Queue Service
The plugin currently:
- Consumes a message from an SQS Queue and triggers any jobs that have a matching github repository configuration.
- Atomically adds and removes the Github SQS Service hook
- Trigger build job using GitHub Amazon SNS service hook that use a SQS topic subscription
Trigger a build when a change is pushed to GitHub using Amazon SQS
To use this feature, first go to the global configuration and add a SQS Profile
To verify that you have correctly configured the SQS profile you can click "Test Access" this checks to see if the Queue exists in your SQS account and tries to create it if it does not. You can always manually create the queue via Amazon AWS Management Console
Once that configuration is done, go to the project config and simply check "Build when a message is published to an SQS Queue" under "Build Triggers".
How to configure the GitHub SQS hook
You can choose to have Jenkins automatically manage the Github SQS hook automatically. You'll specify GitHub user names and passwords so that Jenkins can login as you to do this, and yes, we need your password and not API token because GitHub doesn't have an API for managing service hooks.
If you want to manually manage the service hook or inspect the config you navigate to the Admin -> Service Hooks section and select the SqsQueue hook and enter your AWS Access Key, the SQS Queue name and your AWS Secret key. The Queue name will need to match the Queue name you have configured in Jenkins
How to configure the GitHub SNS hook
To use the GitHub SNS service hook to trigger builds you need to manually configure it. You need to navigate to the Admin -> Service Hooks section and select the AmazonSNS hook and enter Aws Key, Aws Secret, Sns Topic and Sqs Queue. The Sqs queue is used by the SNS service to create a subscription for that queue. The queue name will need to match the queue you have configured in your Jenkins SQS Profile config.
Change Log
Version 1.5 (Apr 19, 2013)
- JENKINS-16617 - Github SQS plugin not starting jobs on Jenkins 1.500
Github SQS plugin not starting jobs on Jenkins 1.500 - JENKINS-16669 - GitHub SQS Plugin works only once after project config
Version 1.4 (Feb 04, 2013)
- JENKINS-16128 - Broken Jenkins Configuration page when Github SQS plugin is installed
Version 1.3 (Nov 23, 2012)
- support for triggering builds using GitHub Amazon SNS service hook that have been bridged to SQS Queue.
Version 1.2.1 (Nov 22, 2012)
- Correctly use the Github Credentials supplied in the SQS Profile config
- Atomically adds and removes the Github SQS Service hook
Version 1.0 (Mar 13, 2012)
- Support for consuming messages published to SQS queues with message body in the Github webook payload format and triggering the appropriate builds.
Attachments:
GithubSQSHook.png (image/png)
JenkinsGithubSQSHookConfig.png (image/png)
JenkinsGithubSQSHookConfig.png (image/png)
GithubSQSHookConfig.png (image/png)
GithubSQSHookConfig.png (image/png)
Screen Shot 2012-11-23 at 1.27.25 PM.png (image/png)
GitHubSNSConfig.png (image/png)
JenkinsPlugins.pdf (application/pdf)


American Medical Association announces support for US ban on conversion therapy
MEXICO CITY: The U.S. physicians' group the American Medical Association announced on Tuesday it would begin supporting a ban on so-called conversion therapy, as well as working toward more inclusive healthcare record-keeping for transgender patients.
Conversion therapy, now widely discredited, is rooted in the belief that LGBT+ people have a mental illness which can be cured through psychological, spiritual, or in extreme cases physical means.
"It is clear to the AMA that the conversion therapy needs to end in the United States given the risk of deliberate harm to LGBTQ people,” said AMA board member William E. Kobler in a statement.
"Conversion therapy has no foundation as scientifically valid medical care," Kobler said.
Eighteen U.S. states have banned conversion therapy for minors with legislation pending in some 20 others, according to Born Perfect, an advocacy group that is working to ban the practice.
The AMA said it would develop model state legislation and advocate for federal laws banning sexual orientation and gender identity conversion therapy, which a UCLA School of Law study found hundreds of thousands of LGBT+ Americans had undergone.
The AMA said conversion therapy, in which subjects are meant to be changed from homosexual to heterosexual, can trigger depression, post-traumatic stress disorder or suicidal thoughts.
Rights groups welcomed the move by the influential medical group, which came after its recent conference in San Diego.
"These new policies from the American Medical Association reaffirm the urgent need to protect LGBTQ youth from this dangerous practice,” said Alphonso David, president of the Human Rights Campaign, a national advocacy group.
"This policy will also be a critical resource for state legislators across the country as they work toward crafting legislation," he added in an email to the Thomson Reuters Foundation.
The AMA on Tuesday also announced a new policy to make electronic health records more inclusive for transgender people.
The changes would allow transgender people to use their chosen names and also include relevant anatomy pertaining to the patient’s sex in medical documents.
"Without this information, transgender patients and their specific health care needs cannot be identified or documented...and the provision of important health care services may not be delivered,” Kobler said.
Studies have found that transgender people in the United States face significant issues in accessing healthcare.
A 2015 survey from Trans Equality, a local advocacy group, found that a third of trans people had had a negative experience with a medical provider because of their gender identity, including verbal harassment and even refusal of treatment.
Almost a quarter said that they had foregone medical care fearing mistreatment.
The AMA also said it had adopted a new policy aimed at ensuring medical students have a better understanding of health issues related to sexual orientation and gender identity.
It said it would press educational accreditation bodies to encourage and periodically reassess education on health issues related to LGBT+ people.
Rights groups said the host of inclusive policies could help support LGBT+ rights more broadly.
"The voices of medical professionals have long been central to the growing support for LGBTQ-inclusive laws, policies and communities," said HRC's David, adding "These AMA policies continue that trend."
Read also
Read More
Men in UK and US seen growing less comfortable with women leaders
Less than 50% of American men would be "very comfortable" with a female head of government, according to a survey published on Tuesday that found men in Britain and the United States growing less comfortable with women in positions of power.
Read More
In war-ravaged Kabul, women throng parks for peace and picnics
The sound of women laughing and singing in public is rare in Kabul, where four decades of war have left a population anxious and on edge as they go about their daily lives - except on Wednesdays, when hundreds of Afghan women head to the parks.
Read More
UK urged to give women right to know what male colleagues earn
Employers should be forced to tell female staff if they are paid less than men doing the same job, a British women's rights group said on Thursday, arguing that secrecy perpetuates inequality.

Read More
New H&M tagline sparks outcry over gender violence association
A new collection from fashion giant H&M has unleashed protests from women's rights campaigners because it includes the slogan "I love GBV", the initials of the designer but also a widely used acronym for gender-based violence.
Read More
Apple Card and six other tech tools accused of gender bias
From recruitment software that favours male applicants to facial recognition technology that fails to recognise transgender people, a growing number of artificial intelligence (AI) programmes have been accused of holding human gender bias.


| Name | Birthdate | City | Gender | |
|---|---|---|---|---|
| Jaini |<EMAIL_ADDRESS>| 05-06-1999 | Ahmedabad | Female |
| Janvi |<EMAIL_ADDRESS>| 10-01-1999 | Ahmedabad | Female |
| Deep |<EMAIL_ADDRESS>| 05-12-1993 | Vadodara | Male |
| Raj |<EMAIL_ADDRESS>| 15-06-1989 | Gandhinagar | Male |
| Vishwa |<EMAIL_ADDRESS>| 13-12-1998 | Jaipur | Female |
| Akshar |<EMAIL_ADDRESS>| 23-06-1997 | Surat | Male |


3 Finalists Named For College Football’s Top Player Award
by Andrew HolleranThe Heisman Trophy won’t name its finalists for another two weeks, but the Maxwell Award, given to college football’s top player, has already named its finalists.
The Maxwell Award, presented each year by the Maxwell Football Club, has named three finalists:
- LSU QB Joe Burrow
- Oklahoma QB Jalen Hurts
- Ohio State DE Chase Young
The Maxwell Award and the Heisman Trophy don’t always line up exactly the same, but it’s usually a pretty good indication of who will end up in New York.
Burrow is a lock to be a Heisman Trophy finalist, while Hurts and Young are strong contenders, too.
The 2018 Maxwell Award went to Alabama QB Tua Tagovailoa, while Oklahoma QB Kyler Murray won the Heisman Trophy.


The Sphinx-4 audio endpointer is composed of three data processors that carry out different functions:
SpeechClassifier - classifies chunks of audio into speech and non-speech.
SpeechMarker - marks the audio stream into speech and non-speech regions, by inserting SpeechStartSignals and SpeechEndSignals into the data stream, while giving some 'cushion areas' around these regions.
NonSpeechDataFilter - removes the non-speech regions from the audio.


{% verbatim %}
Currently Paddle Fluid use parameter server architecture to support distributed training.
For synchronous and asynchronous training, the differences are mostly in the logic of parameter server. Now we have already support synchronous training.
The training process of synchronous training is:
barrier_condition_
to 0 and waits for trainers to send gradient.BATCH_BARRIER_MESSAGE
to all pservers.barrier_condition_
on pserver to be 1.BATCH_BARRIER_MESSAGE
.BATCH_BARRIER_MESSAGE
is equal to the number of Trainer. Pserver thinks it received all gradient from all trainers.barrier_condition_
to 1.FETCH_BARRIER_MESSAGE
.FETCH_BARRIER_MESSAGE
to each pserver.FETCH_BARRIER_MESSAGE
reach the number of all trainers. Pserver think all the parameters have been got. it will go back to 1. to set barrier_condition_
to 0.In the above process. There are two barriers for all trainers to synchronize with each other. In asynchronous training, these two barriers are not needed. The trainer can just send gradients to pserver and then get parameters back.
The training process of asynchronous training can be:
Pserver:
GetVariable
for trainers to get parameters back.(Maybe here we should use a thread pool to speed up fetching the parameters.)Trainer:
There are also some conditions that need to consider. For exmaple:
The above architecture of asynchronous training can support different mode, we can have a detailed test in the future for these problems.
{% endverbatim %}


|
|
BufPType | getNewest () |
| |
|
BufPType | getNext () |
| |
|
BufPType | getFreeBuffer () |
| |
|
void | addValidBuffer (BufPType bp) |
| |
|
void | returnOrAddUsedBuffer (BufPType bp) |
| |
|
size_t | AvailableFrames () const |
| |
|
size_t | EmptyBuffers () const |
| |
|
bool | DropNFrames (size_t n) |
| |
The documentation for this class was generated from the following file:
- /home/aoberai/programming/python/blind-navigation/display_3d/documentation/Pangolin/include/pangolin/utils/fix_size_buffer_queue.h


Created by Devan Huapaya / @devanipsum
* my thoughts are my own
Good grades & junk
Side projects, and extra curicular
Reasons People Don't do Side Projects
No one starts "good" at anything
Publishing your work in the app store
Launch your website
Go to irl interest groups
Write!
Tell people you're a start co-founder
Talking to peoples
Good grades & junk
Side projects, and extra curicular
Publishing your work in places
- What do you know now that you didn't know when you were in school?
- If you could go back would you do anything differently?
- What is your favorite resturant in College Station?
- What do I do if I can't get the job I want?


+++ title = "Breakfast at D'onofrio's" slug = "breakfast-at-donofrios" date = 2007-04-05T10:00:00+10:00 tags = ["repetitive", "tedious"] locations = ["peru/lima"] draft = false summary = """
As part of our board at the Flying Dog, we get free breakfast each morning at the D'onofrio café, which is just downstairs. However, D'onofrio's "free menu" is rather limited: either toast and jam; toast and egg; or fruit salad. Since I'm still (trying to) observe Pesach, I can only choose the latter option. And at this point, I'm starting to get sick of it.
""" [[comments]] title = "Lonely Planet" date = 2007-04-09T21:15:42+10:00 author_name = "sue g" content = """Jeremy,I feel like I am reading a Lonely Planet guide book after
reading and looking at your travel diary. I hope you are having
a good time and not spending toooo much time in creating this
very professional web-site. I don't think I have that much
time in the day to take it all in but I am jealous, jealous that
I am not young anymore. The most adventurous thing we did over
Pesach was watching the hot water system in the roof spring a
leak and making the walls in the dining room look like they were
crying!!!! I wanted to claim it as a religious appiration and
make loads of money from it, however all we did was call the
plumber.. Stay well . Suexxx
As part of our board at the Flying Dog, we get free breakfast each morning at the D'onofrio café, which is just downstairs. However, D'onofrio's "free menu" is rather limited: either toast and jam; toast and egg; or fruit salad. Since I'm still (trying to) observe Pesach, I can only choose the latter option. And at this point, I'm starting to get sick of it.
There's nothing wrong with what they serve down there. And I'm usually the last person in the world to complain about boring breakfasts — hell, back home I've been eating Weet-Bix and milk every morning since 1823. But their free breakfast isn't that big; and fruit salad, tea, and juice is just not something that I personally would choose to eat day in, day out.
But hey, at least it's free!


Posting a Flipnote
Press "Post" below to submit your flipnote. By posting your flipnote, you agree to the Terms of Use.


// multiplied by the given regularization gain
regularized_loss = loss + (main_eigenval ** 0.5) * self.k
return K.in_train_phase(regularized_loss[0, 0], loss)
class WeightRegularizer(Regularizer):
K.dot(K.transpose(main_eigenvect), main_eigenvect))
// Multiply by the given regularization gain.
regularization = (main_eigenval ** 0.5) * self.k
return K.sum(regularization)
class L1L2Regularizer(Regularizer):


Man and woman found dead in Birmingham home as murder detectives probe killings
We'll be bringing you the very latest updates, pictures and video on this breaking news story
by Chris Kitching, https://www.mirror.co.uk/authors/chris-kitching/A man and woman were found dead in a house this evening.
Emergency services were called to a property in Moseley, Birmingham, just before 5.30pm.
Officers found a man and a woman inside, both with serious injuries.
Both were confirmed dead at the scene.
Homicide detectives are currently trying to establish how they came about their injuries.
At this stage they do not suspect anyone else to be involved and the couple were known to each other.
A cordon has been put in place at the property for forensic examinations and officers are speaking to neighbours.
We'll be bringing you the very latest updates, pictures and video on this breaking news story.
Please check back regularly for updates on this developing story here at Mirror.co.uk.
For the latest news and breaking news visit Mirror.co.uk/news.
Get all the big headlines, pictures, analysis, opinion and video on the stories that matter to you.
Follow us on Twitter @DailyMirror - the official Daily Mirror & Mirror Online Twitter account - real news in real time.
We're also on Facebook /dailymirror - your must-see news, features, videos and pictures throughout the day from the Daily Mirror, Sunday Mirror and Mirror Online.


Configuring SSL for your domains is still not as simple as it can be. Everytime I do that, I need to refer to my previous notes. Recently, I was using AWS Certificate Manager
to setup a PositiveSSL Wildcard certificate, so I thought of putting up my notes on the blog.
Note: This post focuses on configuring SSL, and very less on details about what & why.
Step 1: Generate Certificate Signing Request (CSR) and Private key
openssl req -new -newkey rsa:2048 -nodes -keyout mydomain.key -out mydomain.csr
Enter the details like country, state etc when asked. After this step you will have two files:
Content of these files look like following:
mydomain.csr
-----BEGIN CERTIFICATE REQUEST-----
:
-----END CERTIFICATE REQUEST-----
mydomain.key
-----BEGIN PRIVATE KEY-----
:
-----END PRIVATE KEY-----
Step 2: Buying the certificate from providers
When requesting for your SSL certificate on the providers like namecheap, godaddy etc, you’ll be asked to enter your CSR content. Once you complete all the steps, you’ll receive following files from the provider (I’m taking the example of files from Namecheap where I purchased the certificate)
Step 3: Creating SSL Bundle
Using the files mentioned in Step 2, we’ll be creating a SSL bundle, which is very simple. Just concatenate the content of first three files in right order as mentioned in the command:
cat COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > ssl-bundle.crt
If you want to configure it for NGINX, then you need to concatenate your PositiveSSL certificate as well.
cat STAR_mydomain.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > ssl-bundle.crt
Content of the bundle file will look something like this: (for ACM, only three entries will be there)
-----BEGIN CERTIFICATE-----
: - STAR_mydomain.crt
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
: - COMODORSADomainValidationSecureServerCA.crt
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
: - COMODORSAAddTrustCA.crt
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
: - AddTrustExternalCARoot.crt
-----END CERTIFICATE-----
Note:
Step 4: Configuring on NGINX
If you wanted to configure on NGINX, you just need these two files:
In you NGINX configuration, point these parameters to right path, restart NGINX and you’re good to go:
ssl_certificate /etc/nginx/ssl/mydomain/ssl-bundle.crt;
ssl_certificate_key /etc/nginx/ssl/mydomain/mydomain.key;
Step 5: Configuring on Amazon Certificate Manager (ACM)
To configure it with ACM, you need to go through couple of more steps, as they required the certificates to be in certain format. First convert your private key to .pem format:
openssl rsa -in mydomain.key -text > mydomain-private-key.pem
Content:
-----BEGIN RSA PRIVATE KEY-----
:
-----END RSA PRIVATE KEY-----
At last, to upload these certificates on ACM, use the following command:
aws acm import-certificate \
--certificate file:///Users/rootcss/Downloads/ssl/STAR_mydomain.crt \
--private-key file:///Users/rootcss/Downloads/ssl/mydomain-private-key.pem \
--certificate-chain file:///Users/rootcss/Downloads/ssl/ssl-bundle.crt
Other notes:
openssl pkcs12 -in mydomain-private-key.pfx -out mydomain-private-key.pem -nodes
(Enter the created password when asked)
openssl x509 -inform PEM -in ssl-bundle.crt > ssl-bundle.crt
References:


HK financial markets show great resilience, for now
by Ko Tin-yauChinese e-commerce giant Alibaba is working toward a secondary listing in Hong Kong, aiming to make a debut on the local bourse as soon as Nov. 26. If things go without a hitch, the deal could represent the biggest share sale in Hong Kong in nearly a decade.
Alibaba announced Friday the offering of 500 million new shares, priced at up to HK$188 per unit. Shares will trade under the stock code “9988”, in board lots of 100 shares each.
The listing marks a vote of confidence in Hong Kong’s financial markets, as it comes despite months of social unrest in the city.
Office workers in Central may be getting jittery as they see street battles between the police and protestors, but the conflicts and violence don’t seem to have shaken the faith of overseas investors and companies too much in Hong Kong and its status as a key financial hub.
As long as there is a good internet connection and free information flow, what happens in the physical world does not appear to matter much to deal arrangers and traders.
Hong Kong stock exchange and most financial organizations have already got emergency plans in place. By using multiple data centers and backup systems scattered across the city, most of the jobs can be done from home to keep the operations going in the face of crisis.
Instead of working from the central business district, bankers and lawyers can always talk to their clients from somewhere else.
At the moment, advantages like free capital flows still can only be found in Hong Kong, and not in mainland financial centers like Shanghai and Shenzhen.
Also, compared to Western markets, Hong Kong investors are more receptive to mainland companies, which account for the biggest source of IPOs here.
That is why despite the unrest and chaos, Hong Kong continues to attract major deals like the Alibaba listing.
That being said, the increasing danger and hassle of doing business in Hong Kong, as well as the failure of the local administration to put things back under control, raises the risk of the city’s appeal getting eroded eventually.
This article appeared in the Hong Kong Economic Journal on Nov 13
Translation by Julie Zhu with additional reporting
– Contact us at<EMAIL_ADDRESS>RC


Page 2 of 3
Posted:
Fri Feb 02, 2007 4:18 pm
by Vitriol
I do remember reading that the name of Xenimus came from the word Nex backwards + "imus" which is some form of magic.

Posted:
Fri Feb 02, 2007 9:59 pm
by Karl G.
Well, after all, the only thing he has done on the forums is create an entire account to insult me about something that isn't really a big enough issue to warrant that, so one can only assume he's trying to make himself feel awesome at other's expense.  If the individual had perhaps offered some evidence or made a rational case that didn't try to be offensive, that would be an entirely different issue.
Posted:
Fri Feb 02, 2007 11:46 pm
by 9sam1
suppose your right lol.
Posted:
Fri Feb 02, 2007 11:55 pm
by You are wrong
D:
Posted:
Tue Feb 06, 2007 3:33 pm
by Vitriol
BAN! BAN! BAN! BAN!
er.. sorry. I cant help myself.
Posted:
Wed Feb 07, 2007 9:46 pm
by logitech
lol call it Siob Nikz Nexhahahha but seriously
Xenroost?
Xenticle
Xanctus? <--- i like that one
Posted:
Wed Feb 07, 2007 10:02 pm
by 9sam1
logitech wrote:lol call it Siob Nikz Nexhahahha but seriously
Xenroost?
Xenticle
Xanctus? <--- i like that one
wtf? lol
Posted:
Wed Feb 07, 2007 10:27 pm
by logitech
isnt xanctus cool?
Posted:
Thu Feb 08, 2007 4:28 pm
by 9sam1
its ok but xenroost and xenticle(testicle?) sound weird
Posted:
Thu Feb 08, 2007 4:33 pm
by logitech
lol ya, i was joking bout those 2
Posted:
Thu Feb 08, 2007 9:06 pm
by kuba
if your saying xenticle might as well throw in xengina
haha jk
Posted:
Thu Feb 08, 2007 10:31 pm
by logitech
lol , ok enough before someone bans us from boards lol
Posted:
Sat Feb 10, 2007 9:31 pm
by lawn gnome
how about.... land of the lawn gnomes!!!! lol jk
Posted:
Sun Feb 11, 2007 5:10 pm
by logitech
xenticle it is!

Posted:
Tue Sep 11, 2007 8:10 am
by Massive
Sanctus is pretty cool, and is derivative of the Xenimus world without being too obvious.
Perhaps you should allow the largest donation to name the game...
(Or perhaps not!)
Posted:
Tue Sep 18, 2007 10:08 am
by JSunJShineR
I like Nex but really i think it might be to short. maybe its just because i'm not sure as to how it would be designed and implemented into the game? someone should make a design of the top 5 names or top 3 and we can all vote on it.
lol
Posted:
Wed Sep 19, 2007 3:50 am
by Richard. UK
The World of Nexcraft
Xenhammer Online: Age of Volucris
Nexhammer 40Km
Nexcraft 3 Reign of K-aos
Super Nexio Brothers
Teenage Nexant Ninja Xentants
Lego Xenonicle
Lord of the Xen: The Nex of the Sumin
Hope you guys have a laugh as much as i did thinking of them. lol Good luck with programming this game Karl keep it up. been a while since i posted, keeping quiet for a while, patiently waiting
Posted:
Wed Sep 19, 2007 8:41 pm
by Karl G.
hahaha I like "lego xenonicle"
Things have been quiet, but I'm still working daily on the project and I'm making a lot of progress! New resource editor is alllllllmost here!
Posted:
Thu Sep 20, 2007 1:33 pm
by thadiusofx3
im getting so used to project volucris lol
Posted:
Thu Sep 20, 2007 7:02 pm
by Paz the Spaz
And since Project Volucris is such a great name. . .
"Project Volucris: Xenimus Evolved" Genius!
lol
Posted:
Fri Sep 21, 2007 4:28 am
by Richard. UK
i literally laughed out loud in my office when i started writing teenage nexant ninja xentants....such a funny name
Posted:
Thu Sep 27, 2007 11:02 pm
by ziggman
we cant just leave it as "Volucris"? does ej have some kind of copywrite on that?
Posted:
Fri Sep 28, 2007 6:30 am
by Karl G.
Well, we could leave it as Volucris but I just came up with that name as a temporary placeholder. If people like it, it can stick
Another one I was considering was "Volucris: Resurrection" or "Project Volucris: Resurrection" (although that's a bit long)