Naive bayes ranking of variables (using CV accuracy criterion) syntax: [ bestVariables bestToWorst accuracy ] = sortVariablesNB( featureVect, classLabels, ... numSamplesPerSubj, topVarsToKeep ) Inputs: featureVect: all the the data samples in (dim x numSamples) classLabels: all class labels (0 for not learned, 1 for learned, 2 unsure. The ones labeled class 2 will not be used. numSamplesPerSubj: featureVect assumed to be such that each subject has some number of samples (specified by each entry of numSamplesPerSubj), and they are grouped consecutively. This paramter is needed to do the leave 1 subject out cross validation. topVarsToKeep: index of number of best variables to return Outputs: bestVariables: indices of top variables to separate the classes bestToWorst: index ordering all the variables (not just the top) accuracy: associated number correct for those indices
0001 % Naive bayes ranking of variables (using CV accuracy criterion) 0002 % 0003 % syntax: [ bestVariables bestToWorst accuracy ] = sortVariablesNB( featureVect, classLabels, ... 0004 % numSamplesPerSubj, topVarsToKeep ) 0005 % 0006 % Inputs: 0007 % featureVect: all the the data samples in (dim x numSamples) 0008 % classLabels: all class labels (0 for not learned, 1 for learned, 2 unsure. 0009 % The ones labeled class 2 will not be used. 0010 % numSamplesPerSubj: featureVect assumed to be such that each subject has 0011 % some number of samples (specified by each entry of numSamplesPerSubj), 0012 % and they are grouped consecutively. This paramter is needed to do 0013 % the leave 1 subject out cross validation. 0014 % topVarsToKeep: index of number of best variables to return 0015 % 0016 % Outputs: 0017 % bestVariables: indices of top variables to separate the classes 0018 % bestToWorst: index ordering all the variables (not just the top) 0019 % accuracy: associated number correct for those indices 0020 % 0021 0022 function [ bestVariables, bestToWorst, accuracy ] = sortVariablesNB( featureVect, classLabels, ... 0023 numSamplesPerSubj, topVarsToKeep ) 0024 0025 if nargin < 4 || isempty( topVarsToKeep) 0026 topVarsToKeep = 10; 0027 end 0028 0029 % leave one subject out cross validation 0030 [ dim, numSamples] = size( featureVect); 0031 expLabels = getLeave1OutLabels( numSamples, numSamplesPerSubj); 0032 numTrials = length(expLabels); 0033 accuracy = zeros( dim,1); %,numTrials); 0034 0035 % center and scale variables to unit variance 0036 featureVect = featureVect - repmat( mean(featureVect,2), [1,numSamples] ); 0037 featStdev = std( featureVect, 0, 2); 0038 featureVect( featStdev ~= 0,:) = featureVect( featStdev ~= 0,:)./repmat(featStdev(featStdev ~= 0), [1,numSamples]); 0039 0040 for i1 = 1:numTrials 0041 0042 trainLabels = classLabels(:,expLabels(i1).train); 0043 trainFeatures = featureVect(:,expLabels(i1).train); 0044 trainFeatures( :, trainLabels==2) = []; 0045 trainLabels( :, trainLabels==2) = []; 0046 0047 testLabels = classLabels(:,expLabels(i1).test); 0048 testFeatures = featureVect(:,expLabels(i1).test); 0049 testFeatures( :, testLabels==2) = []; 0050 testLabels( :, testLabels==2) = []; 0051 0052 % do the tests on each feature 0053 for i2 = 1:dim 0054 if var( trainFeatures(i2,:)) < 1e-5 || ... 0055 var( trainFeatures(i2,trainLabels==0))< 1e-5 || ... 0056 var( trainFeatures(i2,trainLabels==1))< 1e-5 , 0057 else 0058 nb = NaiveBayes.fit(trainFeatures(i2,:)', trainLabels', 'Prior', 'uniform'); 0059 estimate = nb.predict(testFeatures(i2,:)'); 0060 accuracy(i2) = accuracy(i2) + sum( estimate == testLabels'); %/length(testLabels); 0061 end 0062 end 0063 % training is an N-by-D numeric matrix of training data. Rows of training 0064 % correspond to observations; columns correspond to features. class is a 0065 % classing variable for training (see Grouped Data) taking K distinct levels. 0066 % Each element of class defines which class the corresponding row of training 0067 % belongs to. training and class must have the same number of rows. 0068 0069 % 'Prior' – The prior probabilities for the classes, specified as one of the following: 0070 % 'empirical' (default) fit estimates the prior probabilities from the relative frequencies of the classes in training. 0071 0072 end 0073 0074 % sort variables in order best to worst 0075 [ accuracy bestToWorst] = sort( accuracy, 1,'descend'); 0076 0077 % remove redundancies 0078 unqIdx = findRedundancies( featureVect( bestToWorst,:) ); 0079 bestToWorst = bestToWorst(unqIdx); 0080 0081 bestVariables = bestToWorst(1:min(topVarsToKeep, length(bestToWorst) ));


Top
(current)
Live demo
Tables Page
Monitering
Monitering
Tables
Wiki
U.S.A. is one of the most convenient tool in the world!!!
Monitering
Knowledge Table


Builds cannot be performed on this repository because Quay Trust is
enabled, which requires that all operations be signed by a user.
Recent Builds
Last 48 Hours
Last 30 days
Build History
No matching builds found
Please change the filter above to search for more builds.
No build triggers defined
Build triggers invoke builds whenever the triggered condition is met (source control push, webhook, etc)
| Trigger Name |
Dockerfile Location |
Context Location |
Branches/Tags |
Pull Robot |
Tagging Options |
|
|
This build trigger has not had its setup completed.
Delete Trigger
|
|
{{ trigger.config.dockerfile_path || '/Dockerfile' }} |
{{ trigger.config.context || '/' }} |
{{ trigger.config.branchtag_regex || 'All' }} |
(None)
|
-
Branch/tag name
-
latest if default branch
-
{{ template }}
|
|
|
This build trigger is user disabled and will not build.
Re-enable this trigger
|
This build trigger was automatically disabled due to successive failures.
Re-enable this trigger
|
This build trigger was automatically disabled due to successive internal errors.
Re-enable this trigger
|
Are you sure you want to disableenable this trigger?
Are you sure you want to delete this build trigger? No further builds will be automatically
started.


In the Web environment, it is challenging to display a large amount of data in a list, such as displaying a contact list of over 1000 list items. It takes time to display the entire list in HTML and the DOM manipulation is complex.
The virtual list component is used to display a list of unlimited data elements. The component provides easy access to databases to retrieve and display data. The virtual list component is based on a result set which has a fixed size defined by the developer using the data-row attribute. A result set must be at least 3 times bigger than size of a clip (number of visible elements).
To add a virtual list component to the application:

  /* JSON DATA example in virtuallist-db-demo.js */ var JSON_DATA = [ {NAME:"Abdelnaby, Alaa"}, {NAME:"Abdul-Aziz, Zaid"}, {NAME:"Abdul-Jabbar, Kareem"}, {NAME:"Abdul-Rauf, Mahmoud"}, {NAME:"Abdul-Wahad, Tariq"} /* Other list items */ ]
/* Get HTML element reference */ var elList = document.getElementById("vlist"), /* All config options can be found in virtual list reference */ vlist = tau.widget.VirtualListview(elList, { dataLength: JSON_DATA.length, bufferSize: 40 }); /* Update list items */ vlist.setListItemUpdater(function(elListItem, newIndex) { var data = JSON_DATA[newIndex]; elListItem.innerHTML = '' + data.NAME + ''; });
The listItemUpdater attribute defines how the list element is updated depending on the data row index. If you do not define the attribute in the configuration, you can set the update feature with the setListItemUpdater() method.
| Note |
|---|
The virtual list manipulates DOM elements to be more efficient. It does not remove or create list elements before calling the list item update method. It means that the order of the
 elements is volatile, and you must keep the list element clean from custom classes and attributes. |
vlist.draw();
page.addEventListener("pagehide", function() { vlist.destroy(); });
The following table describes the virtual list configuration options.
| Option | Type | Mandatory | Description |
|---|---|---|---|
| dataLength | Number | Yes | Defines the number of all data rows. |
| bufferSize | Number | No | Defines the number of virtual list child elements in the result set.
The minimum value is 20 and default value is 100. As the value gets higher, the loading time increases while the system performance improves. Pick a value that provides the best performance without excessive loading time and is at least 3 times bigger than the number of displayed items on the device screen. |
| Orientation | String | No | Defines the scrolling orientation. The default value is VERTICAL. |
| listItemUpdater | Method reference | Yes | Defines the method which is called to draw a single list item.
The method takes the following parameters:
|
| Method | Description |
|---|---|
| draw() | When all configuration options are set, draws the child elements and implements the virtual list. |
| scrollTo(position) | Scrolls the list to a defined position in pixels. |
| scrollToIndex(index) | Scrolls the list to a defined index. |
| setListItemUpdater(function) | Sets the list item updater function. |


I speak of promised lands
Soil as soft as mama's hands
Running water, standing still
Endless fields of daffodils and chamomile
Rice under black beans
Walked into Apple with cracked screens
And told prophetic stories of freedom
Found warmth in a Black queen for when I get cold
Like Nat King, I'm doing the dad thing
I speak of wondrous unfamiliar lessons from childhood
Make you remember how to smile good
I'm pre-currency, post-language, anti-label
Pro-famous, I'm Broadway Joe Namath
Kanye's best prodigy
He ain't signed me but he proud of me
I got some ideas that you gotta see
Make a vid with shawty and they ship it like the Odyssey
They never seen a rapper practice modesty
I never practice, I only perform
I don't even warn, I don't eat it warm, I won't be reborn
I speak to God in public, I speak to God in public
He keep my rhymes in couplets
He think the new shit jam, I think we mutual fans
I used to dance to Michael, I used to dance in high school
I used to pass out music, I still pass out music
The people's champ must be everything the people can't be
I'm getting artsy-fartsy, house full of some Hebru Brantleys
You must’ve missed the come up, I must be all I can be
Call me Mister Mufasa, I had to master stampedes


|
Perl Weekly
Issue #93 - 2013-05-06 - DBIx::Class - the 'x' Now Stands for Xtremely Fast
latest | archive | by Yanick Champoux
|
|
Hi
this issue was put together by Yanick Champoux, I just added a few extra items. (Thanks Yanick!) If you follow my other Perl-related publication, the Perl Maven site, you saw that in the last two weeks I started to conduct interviews with Perl developers. Do you find these interviews interesting? What else would you like to ask? Who else would you like to see being interviewed? Let me know!
See you next week!
|
|
|
|
Sponsors
|
state51 is hiring Perl Developers to work with Music and Metadata
Based in London, state51 makes a platform to manage music and metadata. Working with distributors, indie and major labels we have delivered millions of tracks to hundreds of music services. The developer team is small and in control of its own tools (Catalyst, Moose, Git, Puppet, Jenkins) and environment. Full job posting here
|
|
Headlines
|
Perl DBIx::Class - An Awesome ORM Now With Super Speed!
A new release of DBIx::Class is out. Amongst the new stuff that it brings:performance improvements. How much performance improvements? According to some of the benchmarks, it is 20 very sweet percents faster than the previous release.
|
|
|
|
Articles
|
|
|
|
|
Web Frameworks Round 4
A benchmark of web frameworks in many languages. Perl being represented by Dancer, Kelp and Mojolicious.
|
|
Vintage Perl Articles by Dave Cross
Dave Cross's blog has a new 'article' section where he has put the articles that he wrote for perl.com... 10 years ago. Will you dare boarding this Nostalgia Ride?
|
|
|
|
Pinto Tutorial in 8 languages
Want to learn all about Pinto, but can't read English? You're in luck, its tutorial is now translated in 8 other langu-- hey, wait a second here, how come you can read this, then?
|
|
Discussions
|
/usr/local/bin rant
Vyacheslav Matyukhin gets bitten by the pesky peculiarities of PATH across platforms.
|
|
Perl Catalyst and the Crisis of Asynchronicity
Ah yes. Asynchronicity. Six syllables fit so send shivers down many a developer's spine. John Napiorkowski explains how much fun the Catalyst team is having with it nowadays, and ask for users' input to help trace the path forward.
|
|
Testing
|
The CPAN Testers game
One of the CPAN's strengths is its army of testers, relentlessly testing all new modules on all platforms under the sun. And one of the reasons why this army is so large is how easy it is to join. Alceu Rodrigues de Freitas Juniorreminds us how to join the corps and -- to keep things interesting -- how to turn the whole thing into a game.
|
|
Organizing Perl Test Files
So you have enough tests that you have to begin to think about how to organize them? Congratulations, that's an excellent problem to have! chromatic shows us here how he goes on organizing his own tests.
|
|
Code
|
|
|
Profiling in Production
Profiling software in production can sometimes feel like checking the oil level of cars on the highway. Rafael Garcia-Suarez shows us how Booking.com does it without any roadkill fatalities.
|
|
|
|
Fun
|
Raspberry Pi Modules and GUI App Released
What is niftier than a Raspberry Pi with Perl? A Raspberry Pi with Perl and(thanks to Mark Dootson) all the Wx/WxWidgets bindings, to provide nifty GUIs to your yummy Raspberry projects.
|
|
After the #masakism workshop
How Carl Masak led a bunch of people in the subway through Github while writing Perl and creating clickable maps.
|
|
Grants
|
2013Q2 Grant Proposals
The Perl Foundation has four grant proposals for this quarter, dealing with conference tools,rpms, web frameworks and pinto. Go, have a look, and don't be shy to leave comments.
|
|
Slides & Videos
|
|
|
Interview with Tadeusz Sosnierz
Gabor Szabo's interview with Tadeusz Sosnierz (aka tadzik),the developer of the Perl 6 Pod Parser and Panda, the Perl 6 module installer.
|
|
Weekly Collections
|
|
|
|
|
|
|
|
|
Events
I usually list the next 3-4 events here. The list of all the events can be found on the web site. If your Perl event is not listed there, please let me know.
|
|
|
|
|
|
|
YAPC::Asia Tokyo
September 19-21, 2013, Keio University Hiyoshi Campus, Tokyo, Japan
|
|
You know, you could get the Perl Weekly right in your mailbox. Every Week. Free of charge!
|


THE THREE MUSKETEERS (1948) A film review by Steve Rhodes Copyright 1996 Steve Rhodes
RATING (0 TO ****): ** 1/2
The 1948 version of THE THREE MUSKETEERS is the exact sort of film most people have in mind when they call something a "costume drama," usually implying sarcastically that the show is really all costume and no drama.
THE THREE MUSKETEERS (1948) was directed by the great musical director George Sidney. His pictures include ANNIE GET YOUR GUN, SHOW BOAT, and BYE BYE BIRDIE. His rendition of THE THREE MUSKETEERS is one of his non-musical movies, but he cast a musical star, Gene Kelly, in the title role of D'Artagnan. Although you are convinced that the scene where Kelly will either sing or dance is just around the corner, it never appears. To compensate for this Kelly has numerous athletic jumps, and, of course, he fences in every other scene. The chief motivation to see this version is to marvel at the costumes by Walter Plunkett and to watch the sword fighting.
Gene Kelly has long hair and neither looks nor acts like himself. His companions as the three musketeers are Van Heflin as Athos, Gig Young as Porthos and Robert Coote as Aramis. They dress in bright, frilly outfits of powder blue, lavender, rose, and salmon colors. It strains credulity to think of these as clothes to fight in, but at least they look magnificent. The women's gowns are even more outlandishly lavish. The wide spectrum of bright colors makes the show look like a test for a new film stock.
If you are looking for a lightweight show where all of the actors have a blast making it, then look no further. This is it. The good guys are never in any real danger, and the bad are not particularly threatening. A great costume romp, and high camp too. No one takes his part seriously.
A typical scene is when D'Artagnan first meets the three musketeers. One by one, he angers each of them and ends up being challenged to consecutive duels, scheduled one hour apart. These are abandoned when enemies of the king arrive, and the four of them band together to fight for the king.
The show appears cast for stars rather than roles. Lana Turner is haunting as Milady de Winter, and June Allyson is radiantly lovely as Constance Bonacieux. Less well thought out choices are Angela Lansbury who seems lost as Queen Anne, and Vincent Price who is never convincing as Cardinal Richelieu.
One of the old time classic lines is Athos's, "It's all for one, D'Artagnan, and one for all." Van Heflin takes this rousing anthem to bravery and camaraderie, and turns it into a trivial one, much like, "okay, let's go guys."
The music by Herbert Stothart borrows liberally from Tchaikovsky, which makes for some romantic tunes. The colorful cinematography by Robert H. Planck takes full advantage of the splendor of the costumes. The sets by Henry Grace and Edwin B. Willis stick to dull grays and browns, all the better to set off the colors of the gowns.
This version of THE THREE MUSKETEERS is only one of many film versions of the novel by Alexandre Dumas. I suspect there is a better version, but it has been so long since I have seen the others, I cannot say this confidently. I remember liking the 1974 version with Michael York, but that was twenty-two years ago, and I no longer remember precisely how good it was.
THE THREE MUSKETEERS runs 2:00. It is not rated, but would be G. There is no sex, nudity, or profanity. The violence is fairly bloodless, and most people die by having the sword clearly thrust into the air under their armpits. My son Jeffrey, age 7 1/2, gives it a thumb almost up. He liked the D'Artagnan part and the sword fighting, but the little blood in the show scared him. He says the film is for kids 5 1/2 and up, and I agree. I give the show a mild thumbs up for mindless, swashbuckling fun, and I award it ** 1/2.
**** = One of the top few films of this or any year. A must see film. *** = Excellent show. Look for it. ** = Average movie. Kind of enjoyable. * = Poor show.  Totally unbearable.
REVIEW WRITTEN ON: December 28, 1996
Opinions expressed are mine and not meant to reflect my employer's.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Radio
<mat-radio-group>
Radio buttons allow the user to select one option from a set. Use radio buttons for exclusive selection if you
think that the user needs to see all available options side-by-side.
Otherwise, consider a dropdown, which uses less space than displaying all options.


Nancy Swienton | Web Developer
GIS and CAD Work Examples
CAD Plan Set #1
AutoCAD Civil 3d
CAD Plan Set #2
AutoCAD Civil 3d
GIS Presentation
(large)
ArcMap / Powerpoint


Learn about all of the possibilities of web design in our latest CMS release.
Inc. magazine today ranked WebCorpCo as the 1,870th fastest growing company on the 34th annual Inc. 5000.
Finding a solution that can be tailored to support the needs of your business is more important than ever.
So many acronyms that most of us know a brief amount about, if at all, let alone the meaning of those three little letters we hear so often.


client module¶
-
class
client.
Client
(config_location)[source]¶ Client is the main class that carries out the task of talking with the oxd server. The oxd commands are provided as class methods that are called to send the command to the oxd-server or the oxd-https-extension
- Parameters:
- config_location (string): The complete path of the location
- of the config file. Sample config at (https://github.com/GluuFederation/oxd-python/blob/master/sample.cfg)
-
get_access_token_by_refresh_token
(refresh_token, scope=None)[source]¶ Function that is used to get a new access token using refresh token
- Parameters:
- refresh_token (str): refresh_token from get_tokens_by_code command
- scope (list, optional): a list of scopes. If not specified should grant access with scope provided in previous request
- Returns:
dict: the tokens with expiry time.
Example response:
{ "access_token":"SlAV32hkKG", "expires_in":3600, "refresh_token":"aaAV32hkKG1" }
Function to get the authorization url that can be opened in the browser for the user to provide authorization and authentication
- Parameters:
- acr_values (list, optional): acr values in the order of priority
- prompt (string, optional): prompt=login is required if you want to force alter current user session (in case user is already logged in from site1 and site2 constructs authorization request and want to force alter current user session)
- scope (list, optional): scopes required, takes the one provided during site registrations by default
- custom_params (dict, optional): Any custom arguments that the client wishes to pass on to the OP can be passed on as extra parameters to the function
- Returns:
- string: The authorization url that the user must access for authentication and authorization
- Raises:
- OxdServerError: If the oxd throws an error for any reason.
-
get_client_token
(client_id=None, client_secret=None, op_host=None, op_discovery_path=None, scope=None, auto_update=True)[source]¶ Function to get the client token which can be used for protection in all future communication. The access token received by this method is stored in the config file and used as the protection_access_token for all subsequent calls to oxd.
- Parameters:
- client_id (str, optional): client id from OP or from previous setup_client call
- client_secret (str, optional): client secret from the OP or from setup_client call
- op_host (str, optional): OP Host URL, default is read from the site configuration file
- op_discovery_path (str, optional): op discovery path provided by OP
- scope (list, optional): scopes of access required, default values are obtained from the config file
- auto_update(bool, optional): automatically get a new access_token when the current one expires. If this is set to False, then the application must call get_client_token when the token expires to update the client with a new access token.
- Returns:
dict: The client token and the refresh token in the form.
Example response
{ "access_token":"6F9619FF-8B86-D011-B42D-00CF4FC964FF", "expires_in": 399, "refresh_token": "fr459f", "scope": "openid" }
-
get_logout_uri
(id_token_hint=None, post_logout_redirect_uri=None, state=None, session_state=None)[source]¶ Function to logout the user.
- Parameters:
- id_token_hint (string, optional): oxd server will use last used ID Token, if not provided
- post_logout_redirect_uri (string, optional): URI to redirect, this uri would override the value given in the site-config
- state (string, optional): site state
- session_state (string, optional): session state
- Returns:
- string: The URI to which the user must be directed in order to perform the logout
-
get_tokens_by_code
(code, state)[source]¶ Function to get access code for getting the user details from the OP. It is called after the user authorizes by visiting the auth URL.
- Parameters:
- code (string): code, parse from the callback URL querystring
- state (string): state value parsed from the callback URL
- Returns:
dict: The tokens object with the following data structure.
Example response:
{ "access_token": "<token string>", "expires_in": 3600, "refresh_token": "<token string>", "id_token": "<token string>", "id_token_claims": { "iss": "https://server.example.com", "sub": "24400320", "aud": "s6BhdRkqt3", "nonce": "n-0S6_WzA2Mj", "exp":<PHONE_NUMBER>, "iat":<PHONE_NUMBER>, "at_hash": "MTIzNDU2Nzg5MDEyMzQ1Ng" } }
- Raises:
- OxdServerError: If oxd server throws an error OR if the params code
- and scopes are of improper data type.
-
get_user_info
(access_token)[source]¶ Function to get the information about the user using the access code obtained from the OP
- Note:
- Refer to the /.well-known/openid-configuration URL of your OP for the complete list of the claims for different scopes.
- Parameters:
- access_token (string): access token from the get_tokens_by_code function
- Returns:
dict: The user data claims that are returned by the OP in format
Example response:
{ "sub": ["248289761001"], "name": ["Jane Doe"], "given_name": ["Jane"], "family_name": ["Doe"], "preferred_username": ["j.doe"], "email"<EMAIL_ADDRESS>"picture": ["http://example.com/janedoe/me.jpg"] }
- Raises:
- OxdServerError: If the param access_token is empty OR if the oxd
- Server returns an error.
-
introspect_access_token
(access_token)[source]¶ Gives information about an access token.
- Parameters:
- access_token (str, required): access_token from get_tokens_by_code or get_client_token function
- Returns:
dict: The information about the access token.
Example response
{ "active":true, "client_id": "@6F96!19756yCF4F!C964FF", "username": "John Doe", "scopes": "openid", "token_type": "bearer", "sub": "John Doe", "aud": "@6F96!19756yCF4F!C964FF", "iss": "https://idp.example.com", "exp": "1518268876", "iat": "1518268576", "acr_values": null, "jti": null }
- Raises:
- OxdServerError if there was an issue with the operation
-
introspect_rpt
(rpt)[source]¶ Gives information about an RPT.
- Parameters:
- rpt (str, required): rpt from uma_rp_get_rpt function
- Returns:
dict: The information about the RPT.
Example response
{ "active": true, "exp":<PHONE_NUMBER>, "iat":<PHONE_NUMBER>, "nbf": null, "permissions": [{ "resource_id": "112210f47de98100", "resource_scopes": [ "view", "http://photoz.example.com/dev/actions/print" ], "exp":<PHONE_NUMBER> }], "client_id": "@6F96!19756yCF4F!C964FF", "sub": "John Doe", "aud": "@6F96!19756yCF4F!C964FF", "iss": "https://idp.example.com", "jti": null }
- Raises:
- OxdServerError if there was an issue with the operation
-
register_site
()[source]¶ Function to register the site and generate a unique ID for the site
- Returns:
- string: The ID of the site (also called client id) if the registration is successful
- Raises:
- OxdServerError: If the site registration fails.
-
remove_site
()[source]¶ Cleans up the data for the site.
- Returns:
- oxd_id if the process was completed without error
- Raises:
- OxdServerError if there was an issue with the operation
-
setup_client
()[source]¶ The command registers the client for communication protection. This will be used to obtain an access token via the Get Client Token command. The access token will be passed as a protection_access_token parameter to other commands.
- Note:
- If you are using the oxd-https-extension, you must setup the client
- Returns:
dict: the client setup information
Example response:
{ "oxd_id":"6F9619FF-8B86-D011-B42D-00CF4FC964FF", "op_host": "<op host>", "client_id":"<client id>", "client_secret":"<client secret>", "client_registration_access_token":"<Client registration access token>", "client_registration_client_uri":"<URI of client registration>", "client_id_issued_at":"<client_id issued at>", "client_secret_expires_at":"<client_secret expires at>" }
-
uma_rp_get_claims_gathering_url
(ticket)[source]¶ UMA RP function to get the claims gathering URL.
- Parameters:
- ticket (str): ticket to pass to the auth server. for 90% of the cases, this will be obtained from ‘need_info’ error of get_rpt
- Returns:
- string specifying the claims gathering url
-
uma_rp_get_rpt
(ticket, claim_token=None, claim_token_format=None, pct=None, rpt=None, scope=None, state=None)[source]¶ Function to be used by a UMA Requesting Party to get RPT token.
- Parameters:
- ticket (str, REQUIRED): ticket
- claim_token (str, OPTIONAL): claim token
- claim_token_format (str, OPTIONAL): claim token format
- pct (str, OPTIONAL): pct
- rpt (str, OPTIONAL): rpt
- scope (list, OPTIONAL): scope
- state (str, OPTIONAL): state that is returned from uma_rp_get_claims_gathering_url command
- Returns:
dict: The response from the OP.
Success response:
{ "status":"ok", "data":{ "access_token":"SSJHBSUSSJHVhjsgvhsgvshgsv", "token_type":"Bearer", "pct":"c2F2ZWRjb25zZW50", "upgraded":true } }
NeedInfoError response:
{ "error":"need_info", "ticket":"ZXJyb3JfZGV0YWlscw==", "required_claims":[ { "claim_token_format":[ "http://openid.net/specs/openid-connect-core-1_0.html#IDToken" ], "claim_type":"urn:oid:0.9.2342.192003<IP_ADDRESS>", "friendly_name":"email", "issuer":["https://example.com/idp"], "name":"email23423453ou453" } ], "redirect_user":"https://as.example.com/rqp_claims?id=2346576421" }
- Raises:
- OxdServerError: When oxd-server reports a generic internal_error InvalidTicketError: When the oxd server returns a “invalid_ticket” error
-
uma_rs_check_access
(rpt, path, http_method)[source]¶ Function to be used in a UMA Resource Server to check access.
- Parameters:
- rpt (string): RPT or blank value if absent (not send by RP)
- path (string): Path of resource (e.g. for http://rs.com/phones, /phones should be passed)
- http_method (string): Http method of RP request (GET, POST, PUT, DELETE)
- Returns:
dict: The access information received in the format below.
If the access is granted:
{ "access": "granted" }
If the access is denied with ticket response:
{ "access": "denied", "www-authenticate_header": "UMA realm='example', as_uri='https://as.example.com', error='insufficient_scope', ticket='016f84e8-f9b9-11e0-bd6f-0021cc6004de'", "ticket": "016f84e8-f9b9-11e0-bd6f-0021cc6004de" }
If the access is denied without ticket response:
{ "access": "denied" }
- Raises:
oxdpython.exceptions.InvalidRequestError
if the resource is not- protected
-
uma_rs_protect
(resources, overwrite=None)[source]¶ Function to be used in a UMA Resource Server to protect resources.
- Parameters:
- resources (list): list of resource to protect. See example at here
- overwrite (bool): If true, Allows to update existing resources
- Returns:
- bool: The status of the request.
-
update_site
(client_secret_expires_at=None)[source]¶ Function to update the site’s information with OpenID Provider. This should be called after changing the values in the cfg file.
- Parameters:
- client_secret_expires_at (long, OPTIONAL): milliseconds since 1970, can be used to extends client lifetime
- Returns:
- bool: The status for update. True for success and False for failure
- Raises:
- OxdServerError: When the update fails and oxd server returns error


org.elasticsearch.action.search
Classes
ClearScrollAction
ClearScrollRequest
ClearScrollRequestBuilder
ClearScrollResponse
MultiSearchAction
MultiSearchRequest
MultiSearchRequestBuilder
MultiSearchResponse
MultiSearchResponse.Item
SearchAction
SearchRequest
SearchRequestBuilder
SearchResponse
SearchScrollAction
SearchScrollRequest
SearchScrollRequestBuilder
ShardSearchFailure
TransportClearScrollAction
TransportMultiSearchAction
TransportSearchAction
TransportSearchScrollAction
Enums
SearchType
Exceptions
ReduceSearchPhaseException
SearchPhaseExecutionException


Easy Walk
Starting Location
Use Your Location
Destination
Find The Easiest Path!
Best out of 12 paths


Having been exposed to Salvia roughly two months prior to this experience, with results varying from being very relaxed, where each breath taken in seemed to actually push the drugs through my system and cause me to relax physically, until I was able to see something akin to a Pink Floyd laser light show behind my closed eyes when simply smoked, to taking a hit from a water bong and experience what could only be described as a shift in gravity, which ran from the middle of my thumb, outward to the deck that I had seen in my perepherial vision, where I was nervous of moving my thumb around, being scared to fall down.
This particular night, however, was different.
Tonight I had decided to relax and go to bed early, and since a majority of my times smoking Salvia had resulted in simply some pretty visualizations and maybe a visit from my Spirit and Reiki guides, I figured it'd be a fine night to just kick back and enjoy the small ride before falling asleep. Packing about 1/4 of a gram into my water bong, I lit up, and took in a good, solid hit, holding it in my lungs for about 25 seconds. Letting out the smoke (which certainly did smell like the Spearmint they said it would), I started my second hit, and immediately experienced another 'gravity pivot'.  Knowing that wasn't the most comfortable feeling, I stopped inhaling, and immediately pushed out what I had inhaled, wanting to be calm tonight, not worried about gravity.
Suddenly I felt my body moving, ripples moving from my toes all the way up my head, as the kitchen in sight before me started to change, flickering. It moved sideways, and instantly the world pivoted on that 'gravity line' in the middle of my head, and suddenly I felt myself traveling in a very large circle. Imagine if you would, one of the circular large CD holders, that hold large amounts of CD's in a ring, and that is how it felt. As if my body were going through the holes of the cd's, and each cd were a moment in time.
Turning my head to make a vertical cd horizontal, it would pause the sensation of traveling through time for a moment (the shivers were still there, as the rest of my body is still trying to catch up with me, mind you), and I would gaze at a particular moment in time. My first glimpse was of my grandparents old house in Ohio. The carpet was the same color, the end table I had set my water bong on had changed into the same potted plant stand that they had in their living room. It even smelled of the same house.
Being a bit alarmed, I tilted my head again, and once again, I began to rush through my CD's of time. Tilting my head once more, I this time experienced a point in my life when I was five years old. My parents and I were living in Georgia, and as a young child, while my father watched Nascar races on TV, I'd lay down on a big throw pillow on the floor and take a nap near him. Because of the way a 'horizontal cd' was, and how those equaled me staying in a given scene for that moment in time, it was positioned as if I were once again laying down on that throw pillow in that house. I could even hear the Nascar race on the television. Everything through my glasses looked like the house from when I was five, yet everything around my glasses (as if you were to push them down and look over the top) appeared as the normal apartment that I'm living in right now.
Again the sensation of moving through time began, and as I looked up, I could see the bottom half of my body lodged inside of the couch my father was on, as if I were climbing through the couch to travel through this circle of time (later, in retrospect, I had some jeans on the floor, so that must have been where that sensation came from, seeing the bottom half of my body). It was when this sensation of being about to change times again put me into a panic. I was suddenly awash in a wave of feeling that maybe if I could somehow change something in this time in my life, things would be different in the future. After all, the setting was so vivid. I could feel the pillow, hear the race, heard my dad cheering on some car, my mother in the kitchen cooking some lunch...it was all so surreal.
Knowing that this was indeed too much for me to handle, I tried to calm myself down and come out of this experience, reminding myself over and over it would be short. Looking up, it was as though my circle of CD's had changed into a long hallway of mirrors, and each row began to tilt back and forth, until my 'normal' kitchen came back into focus. At this point I realized just what was happening, and reached for the phone. Calling up my friend, I took several deep breaths, and as I felt the events returning back to normal, began to explain to him what had happened. During the talk, I was so overwhelmed with emotion, I broke down and began to cry. Whether it was due to experiencing such a vivid event, or the fact and understanding that I couldn't change anything within it, I still have yet to truly know, yet as I write this again, an hour after the experience, I'm still brought to tears.
I have learned a very serious lesson with Salvia, and will treat this with a very high amount of respect.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


ptr_fun
|
|
|
|
| Categories: functors, adaptors |
Component type: function |
Prototype
template <class Arg, class Result>
pointer_to_unary_function<Arg, Result>
ptr_fun(Result (*x)(Arg));
template <class Arg1, class Arg2, class Result>
pointer_to_binary_function<Arg1, Arg2, Result>
ptr_fun(Result (*x)(Arg1, Arg2));
Description
Ptr_fun takes a function pointer as its argument and
returns a function pointer adaptor, a type of function object.
It is actually two different functions, not one (that is, the name
ptr_fun is overloaded). If its argument is of type
Result (*)(Arg) then ptr_fun creates a
pointer_to_unary_function, and if its argument is of type
Result (*)(Arg1, Arg2) then ptr_fun creates a
pointer_to_binary_function.
Definition
Defined in function.h.
Requirements on types
The argument must be a pointer to a function that takes either
one or two arguments. The argument type(s) and the return type
of the function are arbitrary, with the restriction that the function
must return a value; it may not be a void function.
Preconditions
Complexity
Example
See the examples in the discussions of pointer_to_unary_function
and pointer_to_binary_function.
Notes
See also
Function Objects, pointer_to_unary_function,
pointer_to_binary_function, Adaptable Unary Function,
Adaptable Binary Function
Copyright © 1996 Silicon Graphics, Inc.
|


Suchin Gururangan
sg01 at cs dot washington dot edu
I’m a PhD student in Computer Science at the University of Washington, advised by Noah Smith and Luke Zettlemoyer. I also work part-time as a visiting researcher at Facebook AI Research. I do research in natural language processing and machine learning. My research aims to make tools for language understanding and generation democratized and safe.
I previously worked on the AllenNLP team at AI2, and I completed my masters in NLP at the University of Washington. Before graduate school, I was a data scientist and software engineer at several companies in Seattle and Boston.
news
| Jun 12, 2021 | Our paper, a collaboration between Berkeley NLP and UWNLP, “Detoxifying Language Models Risks Marginalizing Minority Voices” appeared in NAACL 2021. |
| Jun 12, 2021 | Our paper, “All That’s ‘Human’ Is Not Gold” will appear in ACL 2021. |
| Oct 25, 2020 | Our paper “RealToxicityPrompts” will appear in WeCNLP 2020! Schedule here. |
| Oct 13, 2020 | Our paper “RealToxicityPrompts” will appear in Findings of EMNLP 2020. |
| Jul 8, 2020 | Our paper “Don’t Stop Pretraining” won an Honorable Mention for Best Paper Award at ACL 2020! |


Zero-cost futures in Rust
One of the key gaps in Rust’s ecosystem has been a strong story for fast and productive asynchronous I/O. We have solid foundations, like the mio library, but they’re very low level: you have to wire up state machines and juggle callbacks directly.
We’ve wanted something higher level, with better ergonomics, but also better composability, supporting an ecosystem of asynchronous abstractions that all work together. This story might sound familiar: it’s the same goal that’s led to the introduction of futures (aka promises) in many languages, with some supporting async/await sugar on top.
A major tenet of Rust is the ability to build zero-cost abstractions, and that leads to one additional goal for our async I/O story: ideally, an abstraction like futures should compile down to something equivalent to the state-machine-and-callback-juggling code we’re writing today (with no additional runtime overhead).
Over the past couple of months, Alex Crichton and I have developed a zero-cost futures library for Rust, one that we believe achieves these goals. (Thanks to Carl Lerche, Yehuda Katz, and Nicholas Matsakis for insights along the way.)
Today, we’re excited to kick off a blog series about the new library. This post gives the highlights, a few key ideas, and some preliminary benchmarks. Follow-up posts will showcase how Rust’s features come together in the design of this zero-cost abstraction. And there’s already a tutorial to get you going.
Why async I/O?
Before delving into futures, it’ll be helpful to talk a bit about the past.
Let’s start with a simple piece of I/O you might want to perform: reading a
certain number of bytes from a socket. Rust provides a function,
read_exact
,
to do this:
// reads 256 bytes into `my_vec`
socket.read_exact(&mut my_vec[..256]);
Quick quiz: what happens if we haven’t received enough bytes from the socket yet?
In today’s Rust, the answer is that the current thread blocks, sleeping until more bytes are available. But that wasn’t always the case.
Early on, Rust had a “green threading” model, not unlike Go’s. You could spin up
a large number of lightweight tasks, which were then scheduled onto real OS
threads (sometimes called “M:N threading”). In the green threading model, a
function like read_exact
blocks the current task, but not the
underlying OS thread; instead, the task scheduler switches to another
task. That’s great, because you can scale up to a very large number of tasks,
most of which are blocked, while using only a small number of OS threads.
The problem is that green threads were at odds with Rust’s ambitions to be a true C replacement, with no imposed runtime system or FFI costs: we were unable to find an implementation strategy that didn’t impose serious global costs. You can read more in the RFC that removed green threading.
So if we want to handle a large number of simultaneous connections, many of which are waiting for I/O, but we want to keep the number of OS threads to a minimum, what else can we do?
Asynchronous I/O is the answer – and in fact, it’s used to implement green threading as well.
In a nutshell, with async I/O you can attempt an I/O operation without blocking. If it can’t complete immediately, you can retry at some later point. To make this work, the OS provides tools like epoll, allowing you to query which of a large set of I/O objects are ready for reading or writing – which is essentially the API that mio provides.
The problem is that there’s a lot of painful work tracking all of the I/O events you’re interested in, and dispatching those to the right callbacks (not to mention programming in a purely callback-driven way). That’s one of the key problems that futures solve.
Futures
So what is a future?
In essence, a future represents a value that might not be ready yet. Usually, the future becomes complete (the value is ready) due to an event happening somewhere else. While we’ve been looking at this from the perspective of basic I/O, you can use a future to represent a wide range of events, e.g.:
A database query that’s executing in a thread pool. When the query finishes, the future is completed, and its value is the result of the query.
An RPC invocation to a server. When the server replies, the future is completed, and its value is the server’s response.
A timeout. When time is up, the future is completed, and its value is just
()
(the “unit” value in Rust).A long-running CPU-intensive task, running on a thread pool. When the task finishes, the future is completed, and its value is the return value of the task.
Reading bytes from a socket. When the bytes are ready, the future is completed – and depending on the buffering strategy, the bytes might be returned directly, or written as a side-effect into some existing buffer.
And so on. The point is that futures are applicable to asynchronous events of all shapes and sizes. The asynchrony is reflected in the fact that you get a future right away, without blocking, even though the value the future represents will become ready only at some unknown time in the… future.
In Rust, we represent futures as a trait (i.e., an interface), roughly:
trait Future {
type Item;
// ... lots more elided ...
}
The Item
type says what kind of value the future will yield once it’s complete.
Going back to our earlier list of examples, we can write several functions
producing different futures (using
impl
syntax):
// Lookup a row in a table by the given id, yielding the row when finished
fn get_row(id: i32) -> impl Future<Item = Row>;
// Makes an RPC call that will yield an i32
fn id_rpc(server: &RpcServer) -> impl Future<Item = i32>;
// Writes an entire string to a TcpStream, yielding back the stream when finished
fn write_string(socket: TcpStream, data: String) -> impl Future<Item = TcpStream>;
All of these functions will return their future immediately, whether or not the event the future represents is complete; the functions are non-blocking.
Things really start getting interesting with futures when you combine them. There are endless ways of doing so, e.g.:
Sequential composition:
f.and_then(|val| some_new_future(val))
. Gives you a future that executes the futuref
, takes theval
it produces to build another futuresome_new_future(val)
, and then executes that future.Mapping:
f.map(|val| some_new_value(val))
. Gives you a future that executes the futuref
and yields the result ofsome_new_value(val)
.Joining:
f.join(g)
. Gives you a future that executes the futuresf
andg
in parallel, and completes when both of them are complete, returning both of their values.Selecting:
f.select(g)
. Gives you a future that executes the futuresf
andg
in parallel, and completes when one of them is complete, returning its value and the other future. (Want to add a timeout to any future? Just do aselect
of that future and a timeout future!)
As a simple example using the futures above, we might write something like:
id_rpc(&my_server).and_then(|id| {
get_row(id)
}).map(|row| {
json::encode(row)
}).and_then(|encoded| {
write_string(my_socket, encoded)
})
See this code for a more fleshed out example.
This is non-blocking code that moves through several states: first we do an RPC
call to acquire an ID; then we look up the corresponding row; then we encode it
to json; then we write it to a socket. Under the hood, this code will compile
down to an actual state machine which progresses via callbacks (with no
overhead), but we get to write it in a style that’s not far from simple
blocking code. (Rustaceans will note that this story is very similar to
Iterator
in the standard library.) Ergonomic, high-level code that compiles
to state-machine-and-callbacks: that’s what we were after!
It’s also worth considering that each of the futures being used here might come from a different library. The futures abstraction allows them to all be combined seamlessly together.
Streams
But wait – there’s more! As you keep pushing on the future “combinators”, you’re able to not just reach parity with simple blocking code, but to do things that can be tricky or painful to write otherwise. To see an example, we’ll need one more concept: streams.
Futures are all about a single value that will eventually be produced, but many event sources naturally produce a stream of values over time. For example, incoming TCP connections or incoming requests on a socket are both naturally streams.
The futures library includes a
Stream
trait
as well, which is very similar to futures, but set up to produce a sequence of
values over time. It has a set of combinators, some of which work with
futures. For example, if s
is a stream, you can write:
s.and_then(|val| some_future(val))
This code will give you a new stream that works by first pulling a value val
from s
, then computing some_future(val)
from it, then executing that future
and yielding its value – then doing it all over again to produce the next value
in the stream.
Let’s see a real example:
// Given an `input` I/O object create a stream of requests
let requests = ParseStream::new(input);
// For each request, run our service's `process` function to handle the request
// and generate a response
let responses = requests.and_then(|req| service.process(req));
// Create a new future that'll write out each response to an `output` I/O object
StreamWriter::new(responses, output)
Here, we’ve written the core of a simple server by operating on streams. It’s
not rocket science, but it is a bit exciting to be manipulating values like
responses
that represent the entirety of what the server is producing.
Let’s make things more interesting. Assume the protocol is pipelined, i.e., that the client can send additional requests on the socket before hearing back from the ones being processed. We want to actually process the requests sequentially, but there’s an opportunity for some parallelism here: we could read and parse a few requests ahead, while the current request is being processed. Doing so is as easy as inserting one more combinator in the right place:
let requests = ParseStream::new(input);
let responses = requests.map(|req| service.process(req)).buffered(32); // <--
StreamWriter::new(responsesm, output)
The
buffered
combinator
takes a stream of futures and buffers it by some fixed amount. Buffering the
stream means that it will eagerly pull out more than the requested number of
items, and stash the resulting futures in a buffer for later processing. In this
case, that means that we will read and parse up to 32 extra requests in parallel,
while running process
on the current one.
These are relatively simple examples of using futures and streams, but hopefully they convey some sense of how the combinators can empower you to do very high-level async programming.
Zero cost?
I’ve claimed a few times that our futures library provides a zero-cost abstraction, in that it compiles to something very close to the state machine code you’d write by hand. To make that a bit more concrete:
None of the future combinators impose any allocation. When we do things like chain uses of
and_then
, not only are we not allocating, we are in fact building up a bigenum
that represents the state machine. (There is one allocation needed per “task”, which usually works out to one per connection.)When an event arrives, only one dynamic dispatch is required.
There are essentially no imposed synchronization costs; if you want to associate data that lives on your event loop and access it in a single-threaded way from futures, we give you the tools to do so.
And so on. Later blog posts will get into the details of these claims and show how we leverage Rust to get to zero cost.
But the proof is in the pudding. We wrote a simple HTTP server framework, minihttp, which supports pipelining and TLS. This server uses futures at every level of its implementation, from reading bytes off a socket to processing streams of requests. Besides being a pleasant way to write the server, this provides a pretty strong stress test for the overhead of the futures abstraction.
To get a basic assessment of that overhead, we then implemented the TechEmpower “plaintext” benchmark. This microbenchmark tests a “hello world” HTTP server by throwing a huge number of concurrent and pipelined requests at it. Since the “work” that the server is doing to process the requests is trivial, the performance is largely a reflection of the basic overhead of the server framework (and in our case, the futures framework).
TechEmpower is used to compare a very large number of web frameworks across many different languages. We compared minihttp to a few of the top contenders:
rapidoid, a Java framework, which was the top performer in the last round of official benchmarks.
Go, an implementation that uses Go’s standard library’s HTTP support.
fasthttp, a competitor to Go’s standard library.
Here are the results, in number of “Hello world!"s served per second on an 8 core Linux machine:
It seems safe to say that futures are not imposing significant overhead.
Update: to provide some extra evidence, we’ve added a comparison of minihttp against a directly-coded state machine version in Rust (see "raw mio” in the link). The two are within 0.3% of each other.
The future
Thus concludes our whirlwind introduction to zero-cost futures in Rust. We’ll see more details about the design in the posts to come.
At this point, the library is quite usable, and pretty thoroughly documented; it comes with a tutorial and plenty of examples, including:
- a simple TCP echo server;
- an efficient SOCKSv5 proxy server;
minihttp
, a highly-efficient HTTP server that supports TLS and uses Hyper’s parser;- an example use of minihttp for TLS connections,
as well as a variety of integrations, e.g. a futures-based interface to curl. We’re actively working with several people in the Rust community to integrate with their work; if you’re interested, please reach out to Alex or myself!
If you want to do low-level I/O programming with futures, you can use futures-mio to do so on top of mio. We think this is an exciting direction to take async I/O programming in general in Rust, and follow up posts will go into more detail on the mechanics.
Alternatively, if you just want to speak HTTP, you can work on top of minihttp by providing a service: a function that takes an HTTP request, and returns a future of an HTTP response. This kind of RPC/service abstraction opens the door to writing a lot of reusable “middleware” for servers, and has gotten a lot of traction in Twitter’s Finagle library for Scala; it’s also being used in Facebook’s Wangle library. In the Rust world, there’s already a library called Tokio in the works that builds a general service abstraction on our futures library, and could serve a role similar to Finagle.
There’s an enormous amount of work ahead:
First off, we’re eager to hear feedback on the core future and stream abstractions, and there are some specific design details for some combinators we’re unsure about.
Second, while we’ve built a number of future abstractions around basic I/O concepts, there’s definitely more room to explore, and we’d appreciate help exploring it.
More broadly, there are endless futures “bindings” for various libraries (both in C and in Rust) to write; if you’ve got a library you’d like futures bindings for, we’re excited to help!
Thinking more long term, an obvious eventual step would be to explore
async
/await
notation on top of futures, perhaps in the same way as proposed in Javascript. But we want to gain more experience using futures directly as a library, first, before considering such a step.
Whatever your interests might be, we’d love to hear from you – we’re acrichto
and aturon
on Rust’s
IRC channels. Come say hi!


If you would like a formal offer from mac of all trades, please complete the Seller Form below. All personal information remains confidential. Offers may vary from the estimate depending on configuration, upgrades, and condition.
Fields marked with an asterisk (*) are required.
Please describe any upgrades or additional peripherals you are including:


When going back to the index page using browser's back button and then forward to land on this page again, a 'Navigation detected!' message should be rendered on this page as a result of the navigation detection.


Our team develops statistical methods and analytical tools to help people make sense of data. Building on close collaborative relationships with public health practicitioners from across the world -- from Denver to San Juan to Bangkok -- we use modern statistical and machine learning tools to gain insights into complex disease systems.
We build software packages, maintain code repositories, develop SQL databases, create interactive data visualizations, and run computationally intensive simulation studies. We use the R programming language for most of our work, but also use some C, C++, Perl, and Python.
Our team develops models for understanding complex and dynamic systems of infectious disease. We have developed real-time forecasts of dengue fever in Thailand, estimated the duration of cross-protection between serotypes of dengue, and predicted the start of the flu season using hospital data.


Search terms entered in Pubmed (last check on 12/02/2018) were: «(ADHD OR adhd OR attention deﬁcit disorder with hyperactivity OR minimal brain disorders OR syndrome hyperkinetic OR hyperkinetic syndrome OR hyperactivity disorder OR hyperactive child syndrome OR childhood hyperkinetic syndrome OR attention deﬁcit hyperactivity disorders OR attention deﬁcit hyperactivity disorder OR adhd attention deﬁcit hyperactivity disorder OR addh OR overactive child syndrome OR attention deﬁcit hyperkinetic disorder OR hyperkinetic disorder OR attention deﬁcit disorder hyperactivity OR attention deﬁcit disorders hyperactivity OR child attention deﬁcit disorder OR hyperkinetic syndromes OR syndromes hyperkinetic OR hyperkinetic syndrome childhood) AND (randomized control trial OR RCT OR randomized control study OR Pilot Study OR Study OR Trial OR randomized trial) AND (neurofeedback OR “EEG biofeedback” OR neurotherapy OR SCP OR “slow cortical potentials OR Theta Beta Ratio or TBR)”».
To conduct meta-analysis, diﬀerent software exist: for instance Cortese et al. [2016] used RevMan 5.3 [Cochrane Collaboration, 2011] that computes the between-Eﬀect Size (ES) and its variance of each included study by applying the formula presented in Morris [2008]. However, in order to compute the variance of the between-ES, the pooled within-group Pearson correlation (i.e. the pre-post correlation) is required [James et al., 2013]. In our case, this correlation was not known and the raw data were not available so we took an approximation: Balk et al. [2012] found that a value of 0.5 yields values close to those computed with the actual value of the correlation.
In this replication of the work of Cortese et al., the same formulas were used [Borenstein et al., 2009], but instead of using RevMan, a Python code was developed in order to perform the meta-analysis. To increase replicability and transparency and promote open science, we provide the full raw data used for this research as well as the Python code on a GitHub repository [Bussalb, 2019]; it was tested with Cortese et al. [2016] raw data to verify that the same results were found.
To perform the meta-analysis several steps must be followed. First the choice of the model: this analysis is based on either one of the following statistical models [Borenstein et al., 2009]:
In the present case, although the studies included into the meta-analysis met the same criteria, they remained diﬀerent from each other on various aspects, so the random eﬀects model is more appropriate than the ﬁxed-eﬀect model.
First, the scores presented in the articles were extracted and the between-ES of each study as deﬁned in Morris [2008] was computed:
| (1) |
An between-ES is equivalent to a z-score of a standard normal distribution. It is computed as mean pre- to post-treatment score change in the neurofeedback (NFB) group (, ) minus the mean pre- to post- treatment score change in the control group (, ), divided by the pooled pre-test standard deviation ():
| (2) |
where indicates the standard deviation for group at time and deﬁnes the sample size of each group; is a bias adjustment typically used for small sample sizes:
| (3) |
Then, the variance of each between-ES was computed [Morris, 2008]:
| (4) |
To compute the variance of the between-ES, the pooled within-group Pearson correlation (i.e. the pre-post correlation) is required [James et al., 2013]:
| (5) |
where is the number of patients included in a study, , are score values for patient at pre- and post-test respectively, and , the mean scores over all patients. It is a measure of linear correlation between two variables. A value of 1 means that there is a positive correlation whereas a value of -1 means a negative correlation. When , there is no linear correlation. In our case, this correlation was not known and the raw data were not available so we took an approximation following Balk et al. [2012], who found that a value of 0.5 yielded values close to those computed with the actual value of the correlation.
Once variances were obtained with Eq. (4), we could compute the standard error and the 95% conﬁdence interval of each between-ES.
To compute the Summary Eﬀect (SE) a weight must be assigned to each study. To obtain them several steps must be followed. At ﬁrst, the ﬁxed-eﬀects model weight of each study was computed as deﬁned in Borenstein et al. [2009]:
| (6) |
Nevertheless, we choose to use the random eﬀects model, so the weights () associated to this model are diﬀerent. To compute them, the between-studies variance is required. It was calculated in three steps described in Eq. (7), Eq. (8) and Eq. (9) [Borenstein et al., 2009]:
| (7) |
| (8) |
with the total number of included studies, and
| (9) |
with the degrees of freedom.
The random-eﬀects model takes into account the diﬀerences between the studies, so the weights are equal to the inverse of the sum between the within-study variance (the variance of the between-ES) and the between-studies variance:
| (10) |
Finally, the weighted average of the between-ES was computed to obtain the SE as described in Eq. (11) [Borenstein et al., 2009]:
| (11) |
Once the SE is obtained, we can compute its variance, its standard error, its 95% conﬁdence interval, its p-value, and estimating between-ES’s between studies heterogeneity.
All scales used for the meta-analysis are summarized in Table 1 in order to facilitate the replication of this work.
Three diﬀerent methods were used to perform the Systematic Analysis of Biases (SAOB):
We ﬁrst applied the WLS as described in Eq. (12):
| (12) |
is a full rank matrix and represents observations on each independent variables and an intercept term, is a vector of associated regression coeﬃcients, is a diagonal matrix with weights, is a vector of dependent variables and is a vector of errors. The aim of the WLS is to estimate the vector of coeﬃcients by minimizing the Weighted Residual Sum of Squares (WRSS):
| (13) |
A signiﬁcant coeﬃcient (meaning signiﬁcantly diﬀerent from 0) indicates that the associated factor has an inﬂuence on NFB eﬃcacy and the sign of the coeﬃcient indicates the direction of the eﬀect.
The second method applied was the LASSO, which naturally incorporates variable selection in the linear model thanks to -norm applied on the coeﬃcients. The coeﬃcients are obtained by minimizing the cost:
| (14) |
where is the regularization parameter setting more coeﬃcients to zero as it increases. The optimal tuning parameter was determined by a leave-one-out cross-validation. This method retains one observation as the validation data for testing the model and the remaining - 1 observations are used as training data. The cross-validation process is then repeated times with each of the observation used exactly once as the testing data. For each fold, the Mean Square Error (MSE) on the test set was computed and eventually the results can be averaged to produce a single observation that enables to ﬁnd the optimal : it corresponds to the abscissa of the minimum value of the MSE on the mean fold computed for a large range of [James et al., 2013]. A coeﬃcient not set at zero means that the associated factor may have an inﬂuence on NFB and once again, the sign of the coeﬃcient indicates the direction of the eﬀect.
The last method used to determine factors inﬂuencing NFB was the decision tree [Quinlan, 1986], a non linear method. It brakes down a dataset into smaller and smaller subsets using at each iteration a variable and a threshold chosen to optimize a simple MSE criterion:
| (15) |
with the predicted values.
First, when using the between-ES found by Cortese et al. [2016] thanks to RevMan [Cochrane Collaboration, 2011], and then performed the following steps of meta-analysis with the Python code, we observed no major diﬀerences between these results and those obtained with RevMan [Cochrane Collaboration, 2011] as listed in Table 2. The sign diﬀerence is explained by our choice that a negative between-ES is in favor of NFB. The minor discrepancies, especially observed at the p-values level, were due to our choice to always use a pre-post correlation of 0.5 when computing the variance of each between-ES. Moreover, a sensitivity analysis was conducted to ensure the minor impact of the pre-post correlation value: when it varied between 0.2 and 0.8 the signiﬁcance of the SE did not change.
Thanks to the previous step, we could conclude that the Python code yielded results close to those returned by RevMan Cochrane Collaboration [2011].
To assess the variability of each factor, box plots of their standardized values were displayed in Figure 1: the variability in treatment and sessions length as well as the number of sessions is more important between studies than the number of sessions per week and the age bounds.
The ﬁrst method used to detect the inﬂuencing factors was the WLS. The assumptions inherent to this method were checked:
These assumptions were also satisﬁed for the Ordinary Least Squares (OLS).
L. E. Arnold, N. Lofthouse, S. Hersch, X. Pan, E. Hurt, B. Bates, K. Kassouf, S. Moone, and C. Grantier. Eeg neurofeedback for attention-deﬁcit/hyperactivity disorder: Double-blind sham-controlled randomized pilot feasibility trial. Journal of Atention Disorder, 2014. doi: 10.1177/1087054712446173.
A. R. Bakhshayesh, S. Hänsch, A. Wyschkon, M. J. Rezai, and G. Esser. Neurofeedback in adhd: a single-blind randomized controlled trial. European child & adolescent psychiatry, 20(9): 481, 2011. doi: 10.1007/s00787-011-0208-y.
E. M. Balk, A. Earley, K. Patel, T. A. Trikalinos, and I. J. Dahabreh. Empirical assessment of within-arm correlation imputation in trials of continuous outcomes. 2012.
S. Baumeister, I. Wolf, N. Holz, R. Boecker-Schlier, N. Adamo, M. Holtmann, M. Ruf, T. Banaschewski, S. Hohmann, and D. Brandeis. Neurofeedback training eﬀects on inhibitory brain activation in adhd: A matter of learning? Neuroscience, 2016. doi: 10.1016/j.neuroscience. 2016.09.025.
O. M. Bazanova, T. Auer, and E. A. Sapina. On the eﬃciency of individualized theta/beta ratio neurofeedback combined with forehead emg training in adhd children. Frontiers in human neuroscience, 12:3, 2018.
M. Beauregard and J. Levesque. Functional magnetic resonance imaging investigation of the eﬀects of neurofeedback training on the neural bases of selective attention and response inhibition in children with attention-deﬁcit/hyperactivity disorder. Applied psychophysiology and biofeedback, 31(1):3–20, 2006. doi: 10.1007/s10484-006-9001-y.
M. Bink, C. van Nieuwenhuizen, A. Popma, I. L. Bongers, and G. J. M. van Boxtel. Behavioral eﬀects of neurofeedback in adolescents with adhd: a randomized controlled trial. European Child and Adolescent Psychiatry, 2014. doi: 10.1007/s00787-014-0655-3.
M. Borenstein, L. V. Hedges, J. Higgins, and H. R. Rothstein. Introduction to meta-analysis. Wiley, 2009.
A. Bussalb. Meta-analysis statistical tools. https://github.com/AuroreBussalb/meta-analysis-statistical-tools, 2019.
H. Christiansen, V. Reh, M. H. Schmidt, and W. Rief. Slow cortical potential neurofeedback and self-management training in outpatient care for children with adhd: study protocol and ﬁrst preliminary results of a randomized controlled trial. Frontiers in human neuroscience, 8, 2014. doi: 10.3389/fnhum.2014.00943.
Cochrane Collaboration. Revman 5.1. https://community.cochrane.org/help/tools-and-software/revman-5, 2011.
S. Cortese, M. Ferrin, D. Brandeis, M. Holtmann, P. Aggensteiner, D. Daley, P. Santosh, E. Simonoﬀ, J. Stevenson, A. Stringaris, et al. Neurofeedback for attention-deﬁcit/hyperactivity disorder: meta-analysis of clinical and neuropsychological outcomes from randomized controlled trials. Journal of the American Academy of Child & Adolescent Psychiatry, 55(6):444–455, 2016. doi: 10.1016/j.jaac.2016.03.007.
H. Gevensleben, B. Holl, B. Albrecht, C. Vogel, D. Schlamp, O. Kratz, P. Studer, A. Rothenberger, G. H. Moll, and H. Heinrich. Is neurofeedback an eﬃcacious treatment for adhd? a randomised controlled clinical trial. Journal of Child Psychology and Psychiatry, 50(7):780–789, 2009. doi: 10.1111/j.1469-7610.2008.02033.x.
H. Heinrich, H. Gevensleben, F. J. Freisleder, G. H. Moll, and A. Rothenberger. Training of slow cortical potentials in attention-deﬁcit/hyperactivity disorder: evidence for positive behavioral and neurophysiological eﬀects. Biological psychiatry, 55(7):772–775, 2004. doi: 10.1016/j.biopsych. 2003.11.013.
M. Holtmann, D. Grasmann, E. Cionek-Szpak, V. Hager, N. Panzner, A. Beyer, F. Poustka, and C. Stadler. Speziﬁsche wirksamkeit von neurofeedback auf die impulsivität bei adhs. Kindheit und Entwicklung, 18(2):95–104, 2009. doi: 10.1026/0942-54<IP_ADDRESS>.
G. James, D. Witten, T. Hastie, and R. Tibshirani. An introduction to statistical learning. volume 112, chapter 8, pages 303–332. Springer, 2013.
M. Linden, T. Habib, and V. Radojevic. A controlled study of the eﬀects of eeg biofeedback on cognition and behavior of children with attention deﬁcit disorder and learning disabilities. Applied Psychophysiology and Biofeedback, 21(1):35–49, 1996.
S. Maurizio, M. D. Liechti, H. Heinrich, L. Jäncke, H.-C. Steinhausen, S. Walitza, D. Brandeis, and R. Drechsler. Comparing tomographic eeg neurofeedback and emg biofeedback in children with attention-deﬁcit/hyperactivity disorder. Biological psychology, 95:31–44, 2014. doi: 10.1016/j.biopsycho.2013.10.008.
D. C. Montgomery, E. A. Peck, and G. G. Vining. Introduction to linear regression analysis. volume 821, chapter 5, pages 190–191. John Wiley & Sons, 2012.
S. B. Morris. Estimating eﬀect sizes from pretest-posttest-control group designs. Organizational Research Methods, 11(2):364–386, 2008. doi: 10.1177/1094428106291059.
J. R. Quinlan. Induction of decision trees. Machine learning, 1(1):81–106, 1986.
N. J. Steiner, R. C. Sheldrick, D. Gotthelf, and E. C. Perrin. Computer-based attention training in the schools for children with attention deﬁcit/hyperactivity disorder: a preliminary trial. Clinical pediatrics, 50(7):615–622, 2011. doi: 10.1177/0009922810397887.
N. J. Steiner, E. C. Frenette, K. M. Rene, R. T. Brennan, and E. C. Perrin. Neurofeedback and cognitive attention training for children with attention-deﬁcit hyperactivity disorder in schools. Journal of Developmental & Behavioral Pediatrics, 35(1):18–27, 2014. doi: 10.1097/DBP.<PHONE_NUMBER>000009.
U. Strehl, P. Aggensteiner, D. Wachtlin, D. Brandeis, B. Albrecht, M. Arana, C. Bach, T. Banaschewski, T. Bogen, A. Flaig-Rohr, et al. Neurofeedback of slow cortical potentials in children with attention-deﬁcit/hyperactivity disorder: A multicenter randomized trial controlling for unspeciﬁc eﬀects. Frontiers in human neuroscience, 11, 2017. doi: 10.3389/fnhum.2017.00135.
R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), pages 267–288, 1996.
M. van Dongen-Boomsma, M. A. Vollebregt, D. Slaats-Willemse, and J. K. Buitelaar. A randomized placebo-controlled trial of electroencephalographic (eeg) neurofeedback in children with attention-deﬁcit/hyperactivity disorder. J Clin Psychiatry, 74(8):821–827, 2013. doi: 10.4088/JCP.12m08321.
| Study | Outcome | Score Names - Parents ratings | Score Names - Teachers ratings |
| Total | SNAP IV | SNAP IV | |
| Inattention | SNAP IV | SNAP IV | |
| Hyperactivity | SNAP IV | SNAP IV | |
| Total | German ADHD-RS | German ADHD-RS | |
| Inattention | German ADHD-RS | German ADHD-RS | |
| Hyperactivity | German ADHD-RS | German ADHD-RS | |
| Total | DISYPS | - | |
| Total | SNAP IV | - | |
| Inattention | SNAP IV | - | |
| Hyperactivity | SNAP IV | - | |
| Total | CPRS | - | |
| Inattention | CPRS | - | |
| Hyperactivity | CPRS | - | |
| Total | ADHD-RS self report | - | |
| Inattention | ADHD-RS self report | - | |
| Hyperactivity | ADHD-RS self report | - | |
| Total | Conners-3 Parents | Conners-3 Teachers | |
| Total | German ADHD-RS | German ADHD-RS | |
| Inattention | German ADHD-RS | German ADHD-RS | |
| Hyperactivity | German ADHD-RS | German ADHD-RS | |
| Total | German ADHD-RS | - | |
| Total | German ADHD-RS | - | |
| Inattention | German ADHD-RS | - | |
| Hyperactivity | German ADHD-RS | - | |
| Total | IOWA Conners | - | |
| Inattention | IOWA Conners | - | |
| Total | CPRS | CTRS | |
| Inattention | CPRS | CTRS | |
| Hyperactivity | CPRS | CTRS | |
| Total | Conners Rating Scales Revised | Conners Rating Scales Revised | |
| Inattention | Conners Rating Scales Revised | Conners Rating Scales Revised | |
| Hyperactivity | Conners Rating Scales Revised | Conners Rating Scales Revised | |
| Total | Conners-3 Parents | Conners-3 Teachers | |
| Inattention | Conners-3 Parents | Conners-3 Teachers | |
| Hyperactivity | Conners-3 Parents | Conners-3 Teachers | |
| Total | German ADHD-RS | German ADHD-RS | |
| Inattention | German ADHD-RS | German ADHD-RS | |
| Hyperactivity | German ADHD-RS | German ADHD-RS | |
| Total | ADHD RS | ADHD RS | |
| Inattention | ADHD RS | ADHD RS | |
| Hyperactivity | ADHD RS | ADHD RS | |


Haxe resource is a wiki site that gathers haxe information such as articles and tutorials.
It contains features like article voting and tag groups to make it easier to find content. Because a lot of articles are scattered in blogs, it also features external articles with links only.
This site is built using meteorjs and haxe and is open source.
For more information, questions or suggestions head over to the forum. If you have tutorials to write or know some that should be listed here, feel free to signup and start posting.


|
Registers a callable to be executed when a module is imported. If the
module already exists then the callable will be executed immediately. You
can register the same module multiple times, the callables will be
executed in the order they were registered. The root module must exist
(i.e. be importable) otherwise an ImportError will be
thrown.
- Parameters:
mod (str ) - The fully qualified module string, as used in the imports
statement. E.g. 'foo.bar.baz'. The string must map to a module
otherwise the callable will not fire.
func (callable) - The function to call when mod is imported. This
function must take one arg, the newly imported
module object.
- Raises:
TypeError - func must be callable
|


sign in to your account
forgot your password?
Thank you
Check your email! If you are an existing user you will have an email with a link to reset your password momentarily.
Change Your Password
Sorry, Reset Passwork Link has either expired or is invalid. Please try to reset password again.
Error reseting password - {{resetPasswordMsg}}
Error changing password - {{upgPasswordErrorMsg}}
Password changed successfully. Please login now with your new password.
continue
Account has been locked!
Sorry, the max amount of password attempts has been exceeded.
For security reasons we have locked your account and sent a notification to your email with details of what to do next.