The following sections show how to install CDT and the UPC features on several versions of Eclipse. Scroll to the bottom of the page and Using UPC Features for instructions on using them.
Install Eclipse (unzip or untar the downloaded archive).
Bring up eclipse by executing the 'eclipse' executable in the 'eclipse' folder.
Check the features you want to install.
Under the "Programming Languages" category, check C/C++ Development Tools.
First, uncheck "Group items by category" near the bottom of the dialog.
Parallel Tools Platform - the PTP End-User Runtime is a collection of PTP plug-ins that comprise what most users will need.
PTP Parallel Performance Wizard (PPW) - adds support for PGAS performance tuning.
If you used any filters, turn them back off ("X" at right edge of filter text box) before continuing. If you don't, and you selected anything besides what's in the current filter, it won't be installed.
Review the items that appear in the "Install Details" Page, and click "Next >"
Accept the license terms, and click "Finish"
The features you selected are downloaded and installed; restart Eclipse when prompted.
With CDT 7.0, there is more UPC features that you may want to install that are not on the Helios Software site. They are optional features of the CDT 7.0 release.
The CDT update site has been added to the list. Select it in the '"Work with:" drop-down field.
Click "Next >" and "Next >" and proceed to accept the license agreement, Finish, etc.
Expand the item to see the features it includes.
Check the features you want to install. For example, check the CDT Main Features, and under CDT Optional Features, check "Unified Parallel C Support" - suggest you also OMIT the "Eclipse CDT Testing Feature" as it can be confusing for users.
Click the "Install" Button in the upper right corner.
Review the items that appear in the "Install" Dialog, and click "Next>"
The CDT features are downloaded and installed; restart Eclipse when prompted.
Download the "cdt master" file from the CDT builds site - choose the 6.0.x (whatever is latest) release of CDT and download the lastest "cdt-master-YYMMDD.zip" file. Save it on your computer.
If you aren't sure which to install, get the final version of CDT 6.0.2.
Help, Install New Software... Click "Add" then click "Archive..."
Enter the location of the cdt-master zip you downloaded.
Continue as above and select the CDT and/or UPC features you want to install.
Download the "Eclipse IDE for C/C++ Developers" from the Eclipse 3.4 (Ganymede) downloads site which already includes basic Eclipse + CDT (without Java, Plug-in development environment, etc. - but also without the optional features including UPC support).
Check the features you want to install. For example, check the CDT Main Features, and under CDT Optional Features, check "Unified Parallel C Support"
Download the "cdt master" file from the CDT builds site - choose the 5.0.x (whatever is latest) release of CDT and download the lastest "cdt-master-YYMMDD.zip" file. Save it on your computer.
Help, Software Updates... Under Available Software, Click "Add Site" then click "Archive..."
Note: this is similar to http://www.eclipse.org/ptp/docs/install.html which includes screen shots, but that describes an older release of Eclipse and CDT. This description is a bit newer and mentions UPC..
Help > Software Updates > Find and Install ... Search for New Features to Install, hit Next.
Select "New Remote Site" and enter http://download.eclipse.org/tools/cdt/releases/europa which can be named e.g. "CDT 4.0 Update Site"
Make sure it's checked, and hit Finish.
Select a mirror; if you have trouble with mirrors, scroll to the bottom and select the last one. Hit OK.
When the Update site is loaded you see another Dialog. Expand the item for the new update site and check the features you want to install. Either the CDT runtime as well as the UPC feature, or just the UPC feature.
Step through the next few screens to accept license agreements, etc. and restart Eclipse when prompted.
Download the "cdt master" file from the CDT builds site - choose the 4.0.x (whatever is latest) release of CDT and download the lastest "cdt-master-YYMMDD.zip" file. Save it on your computer.
Help, Software Updates, Find and Install... Search for New Features to Install, hit Next.
Select "New Archived Site" and enter the location of the cdt-master zip you downloaded.
Create a C project in CDT, and edit a file whose extension is ".upc" and you will get the UPC extensions to the editor.
Switch to the C/C++ Perspective if it's not already active (Window -> Open Perspective...) Create a C project in CDT, and edit a file whose extension is ".upc" and you will get the UPC extensions to the editor, e.g. syntax highlighting on UPC language features.
Click the "Add..." button to add a Language mapping.
For Content Type, select "C Source File"
Select C/C++ General and check "enable project-specific settings"
Under C/C++ General, select "Language Mappings" and click the "Add..." button to add a Language mapping.
You probably also want to change some build settings in CDT to match your UPC compiler. See project properties for this.
Note: for some more features specific to UPC, see the Parallel Tools Platform (PTP), its Parallel Language Development Tools (PLDT) have some PLDT UPC features.
Note that you need at least 3.0 version of PTP for Eclipse 3.5 (Galileo), and PTP 4.0 for Eclipse 3.6 (Helios) to get the UPC features.
This page was last modified 12:51, 16 December 2013 by Beth Tibbitts. Based on work by Beth Tibbitts.


text:
USWNT Announces Olympic Roster For Tokyo Games
Filed Under:Ryan Mayer, USWNT
(CBS Chicago)- The United States Soccer Federation and head coach Vlatko Andonovski announced the 18-player USWNT roster for this summer's Olympic tournament on Wednesday. The defending World Cup Champions will look to retake the Olympic gold after a disappointing quarterfinals exit at the 2016 Rio Games.
The 18-player roster consists of 17 members of the 2019 World Cup winning squad, with Kristie Mewis joining her sister Samantha as the newcomer to the group.
READ MORE: Biden Administration To Hand Out 400M Free N95 Masks
"It's been a long process to get to this point, longer than anyone thought it would be, but we collected a lot of information on the players over the past year and half in trainings, in their club matches and in international games and we're confident that we've selected the team with the best chance for success in Japan," said Andonovski in a statement.
Carli Lloyd and Tobin Heath are making their fourth Olympic appearance, tying Christie Rampone for the most in USWNT history. The soon to be 39-year-old Lloyd becomes the oldest-ever U.S. Women's Soccer Olympian passing Rampone for that mark.
While Lloyd and Heath are playing for the U.S. in the Olympics for the fourth time, this year's roster sees seven newly minted Olympians in defenders Abby Dahlkemper, Tierna Davidson and Emily Sonnett, midfielders Samantha and Kristie Mewis and Rose Lavelle along with goalkeeper Adrianna Franch.
The full roster for the U.S. is below. CBSSports.com's Sandra Herrera analyzed the roster position by position this morning.
READ MORE: Texas Attorney General Ken Paxton Tests Positive For COVID-19
GOALKEEPERS (2): Adrianna Franch (Portland Thorns FC), Alyssa Naeher (Chicago Red Stars)
DEFENDERS (6): Abby Dahlkemper (Manchester City/ENG), Tierna Davidson (Chicago Red Stars), Crystal Dunn (Portland Thorns FC), Kelley O'Hara (Washington Spirit), Becky Sauerbrunn (Portland Thorns FC), Emily Sonnett (Washington Spirit)
MIDFIELDERS (5): Julie Ertz (Chicago Red Stars), Lindsey Horan (Portland Thorns FC), Rose Lavelle (OL Reign), Kristie Mewis (Houston Dash), Samantha Mewis (North Carolina Courage)
FORWARDS (5): Tobin Heath (Unattached), Carli Lloyd (NJ/NY Gotham FC), Alex Morgan (Orlando Pride), Christen Press (Unattached), Megan Rapinoe (OL Reign)
The team will play a pair of send off matches against Mexico in Connecticut on July 1 and 5 before leaving for Japan. Once there, Olympic play for the U.S. begins on July 21 when the team meets Sweden, who knocked them out of the last Olympic tournament in 2016. Group play continues with matches against New Zealand (July 24) and Australia (July 27) before potential knockout stage play.
MORE NEWS: Gardening 101: Flowering Shrubs Provide Spring-Like Color During Cold Winter
The U.S. has medaled in five of the six Olympic Women's Soccer Tournaments since it was first held in 1996. They've won gold four times ('96, '04, '08, '12) and silver once (2000).

redpajama_set_name: RedPajamaCommonCrawl


text:
HomeArizona Daily Independent headlinesOne Man Stood Out Amid Milwaukee Destruction
One Man Stood Out Amid Milwaukee Destruction
August 22, 2016 M Jennins
Quinlan Bishop
In the wake of violent protest in Milwaukee, one man, Quinlan Bishop, captured the nation's attention. Bishop's interview with Fox 6's Brad Hicks in front of a destroyed gas station in Sherman Park went viral and began a national conversation.
His message is simple. "We have to choose between right and wrong," Bishop told popular radio show host James T. Harris last week.
Listen to the interview here
"I can understand that things will happen to us every day of our lives… but we do have a choice if we're going to react right or if we're going to react wrong," said Bishop referring to the protest. "If there was an agenda, it wasn't a positive one, because nothing positive can come from destruction."
The destruction Bishop refers to includes burning cars and buildings, attacks on police and media, and even murders. The rioting and destruction was so severe that Milwaukee County Sheriff David Clarke recommended that the national guard be sent in to intervene.
Bishop describes himself as a "Humble servant of the Lord" and has taken to social media to condemn violence. He is an advocate for peaceful negotiation to solve the problems in his community. He uses the hashtag #QBSpeaks when speaking or writing.
The most recent post from Bishop reads: "People, stop labeling human beings as animals because they behave in a manner that you don't agree with. We don't know what they may be dealing with. Pray for them. They need it. Misguided souls are what they are. Help them…" By posting this and other posts advocating non-violence, Bishop hopes that he can make his community a more peaceful and productive one.
Emails Show Pressure On Pueblo Teacher In TUSD Grade Changing Scandal
What Happened To Our National "Can Do" Ethic?
Stop the government lies says:
Trump put it best in asking them for their vote. "What the hell do you have to lose?"
70 years of Democratic promises were topped off by the first black President and they are still where they have been kept. At the bottom.
Please take a chance people. For yourselves. For your future.
The Great Society was nothing more than a pathway to continued slavery for Black Americans. The democrat party was successful in rounding them up as a voting bloc lying to them just for their votes. Government became the "provider", young black men were told they were no longer needed except to make more babies (voters). It is no wonder that we have so many angry black men. I hope one day they figure this out because the cycle is spiraling downward. We need more voices from Black men like Mr. Bishop, and our own J T Harris. There are lots more, but the MSM will not let their voices be heard, because the supply of democrat voters will dry up. What is good for America is good for all Americans. All Lives Matter! Especially the unborn!
With "leadership" like Jessie Jackson and Al Sharpton,black America is a rudderless ship adrift in a sea of recklessness.
Burning,looting and violence is never going to accomplish anything for blank America.
Somehow, somewhere along the path, black America never rose to MLK's dream.
Aric says:
And that is the real tragedy, MLK may not have been perfect but at least he had a Dream, which is more than the jacksons and sharptons have! They just want to be worshiped by the black people and leftist politicians and of course,rake in the money.
Billy B says:
Prayer, Trust in God, Positive vs Negative, Right vs Wrong – in the last days there will come times of difficulty. For people will be lovers of self, lovers of money, proud, arrogant, abusive, disobedient to their parents, ungrateful, unholy, heartless, unappeasable, slanderous,without self control, brutal, not loving good, treacherous, reckless, swollen with conceit, lovers of pleasure rather than lovers of God, having the appearance of godliness, but denying its power. Avoid such people. Are we there yet?
Just look around and Yes, we are there now. It's nothing but Me me me, But have hope, there are many who are who,who,can I help? Doing that which is right and seeking others that are righteous. We may be few in number and definitely not perfect but we need to keep doing that which is right in God's eyes. God Bless America!


text:
Кујунџилук једна је од најстаријих градских улица у Мостару. Протеже се од Старог моста до Мале тепе. To je најстарија зона Мостара позната као стари базар.

Име улице

Кујунџилук улица потиче још из средине 16. века, тачније пре 1554. године. То је калдрмом постављена улица у којој се данас налазе занатлијски дућани, као и ресторани у традиционалном стилу са понудом традиционалне хране. Ту је настала синтеза домаћих медитеранских и оријенталнох елемената. Протеже се до пијаце која се назива и старим називом тепа.

Историја
У прошлости Кујунџилук је био стари базар. За време Отоманског царства базар је бројао више од 500 дућана. Био је жила куцавица трговине целе регије. Током времена улица је задржавала своју аутентичност, тако да и данас изгледа као у старим временима. Задржала је и сачувала неке од карактеристичних старих заната као што је ручна обрада бакра и ткање тепиха.
Уз мост, на левој обали Неретве кујунџије (златари) имали су своје радње, па је по њима овај део града и назван Кујунџилук. Први кујунџија, Хаџи Осман, спомиње се 1631. године. Златари су посебно лепо израђивали споне за појасеве као и украшене женске појасеве (пафте и кабаре).
Године 1861. Кујунџилук је скоро цео изгорео, а запалио се и врх куле Таре где је била смештена муниција (џебана). На срећу, није дошло до паљења муниције, а причало се да би у том случају цео Мостар отишао у ваздух. После овог догађаја су изместили муницију. Тај пожар је имао велике последице по трговину коју су у то време углавном водили Срби.

Кујунџилук улицом
Овај најстарији привредни део града је добро очуван. Ту се налазе камене магазе и дућани са ћепенцима.

Суседне улице
 Маршала Тита
 Бајатова
 Мала тепа

Види још
 Мостар

Референце

Литература
 Мостар / С.[Синиша] Мишић. - Текст штампан двостубачно. - Библиографија на крају текста. - У: Лексикон градова и тргова средњовековних српских земаља / редактор Синиша Мишић. - Београд : Завод за уџбенике, 2010. - (Едиција Посебна издања). - . - стр. 181-182.
 О поријеклу топонима Мостар / Асим Пецо. - У: Књижевност и језик. - ISSN 0454-0689. - Год. 41, бр. 1/2 (1994), стр. [63]-65.
 New urbanisms : Mostar, Bosnia & Herzegovina / edited by Richard Plunz, Mojdeh Baratloo, and Michael Conard. - New York : Columbia University, Graduate School of Architecture, Planning and Preservation, cop. 1998. - 83 стр. : ill. (some col.) ; 23 cm. - (CBA/studio works ; 6) (MSAUD new urbanisms ; 3)

Спољашње везе

 Херцеговина и Херцеговци. - У: Време, 18. август 1940, стр. 10
Улице Мостара
Туристичке атракције у Мостару
Пешачке улице

redpajama_set_name: RedPajamaWikipedia


text:
Historic UN-Resolution to tackle illicit trafficking in wildlife
Leider ist der Eintrag nur auf Englisch. Der Inhalt wird unten in einer verfügbaren Sprache angezeigt. Klicken Sie auf den Link, um die aktuelle Sprache zu ändern.
After years of diplomatic efforts, Resolution A/RES/69/314 on Tackling the Illicit Trafficking in Wildlife was adopted at the 69th session of the General Assembly of the United Nations on 30th July 2015. The resolution was co-sponsored by Gabon and Germany, responding to the explosion of wildlife crime including poaching and illegal trafficking of wildlife.
"This resolution is historic, and of the highest level. The International Council for Game and Wildlife Conservation (CIC) in representation of the global hunting community welcomes the resolution and at the same time is proud to have contributed to its development" – said Bernard Lozé, President of the CIC.
Although the resolution does not explicitly mention hunters and hunting as actors and tool for the battle against wildlife crime, the sustainable use of natural resources is strongly embedded into the resolution as important contributor to the conservation of wildlife.
The resolution welcomes the efforts of and the cooperation between member states, intergovernmental organisations and non-governmental organisations, as well as activities of United Nations agencies and other entities aimed at preventing and fighting illicit trafficking in wildlife. The CIC is particularly proud to have played a crucial role in the creation of the Collaborative Partnership on Sustainable Wildlife Management (CPW) which ensures cooperation between now 13 international organisations with mandates related to different aspects of wildlife conservation (http://www.fao.org/forestry/wildlife-partnership/en/). The CIC hopes that this UN-Resolution will have the required effect on additional resource mobilisation not only for the purposes of wildlife crime prosecution, but also to improve all possible prevention measures, which need to cater for the changed environment in wildlife crime, now with a huge drive by international crime syndicates.
"We are pleased that the resolution calls for illicit trafficking of wild fauna and flora involving organised criminal groups being regarded as a serious crime, and the CIC welcomes the call for the appointment of a Special Envoy of the Secretary General of the United Nations to promote awareness and to galvanize international action. Hereby, it would be of imminent importance that such a Special Envoy has a balanced view on wildlife conservation, which includes the sustainable use of wildlife", said Bernard Lozé.
Please see also the joint press release (in German language) of the German Hunting Federation (DJV) and the German Delegation of the CIC: https://www.jagdverband.de/content/djv-und-cic-begr%C3%BC%C3%9Fen-un-resolution-gegen-wilderei
If you have any questions, do not hesitate to contact us at office@cic-wildlife.org or Tel.: +36-23-453 830 (website: cic-wildlife.org)
Vision of the CIC: A world that values and supports sustainable hunting for the benefit of people and nature.
Mission of the CIC: To promote – across the globe – sustainable hunting to conserve wildlife and wild lands, support communities and preserve our hunting heritage.
Ungarn tritt der Initiative 1 Euro pro Jäger bei
Africa Collaborative Partnership on Sustainable Wildlife Management European Commission General Assembly hunting and sustainability Hunting is Conservation


text:
Home COLUMNS LITE BLOGS Brexit talks not likely to end by Oct
Brexit talks not likely to end by Oct
The Brexit talks between London and Brussels may not meet their self-imposed October deadline for a divorce deal, Britain's Brexit Secretary Dominic Raab has said… reports Asian Lite News
He told a parliamentary committee that October remains the goal but there was a "possibility it may creep beyond that", Xinhua news agency reported on Thursday.
Britain and the European Union (EU) aim to hammer out an agreement on divorce terms and future trade by a European Council summit in October so that it can be approved by individual EU countries before the UK leaves the bloc on March 29, 2019.
But talks have stalled amid divisions within Britain's Conservative government over how close an economic relationship to seek with the EU, and the UK has ramped up planning for a disruptive "no deal" Brexit.
A divorce agreement, hammered out by British Prime Minister Theresa May's government in July, proposed to keep the UK close to EU regulations in return for free trade in goods.
The proposal, known as the Chequers plan, was intended to keep Britain within a single market for goods within the EU while excluding services and other free movement obligations.
It was rejected by Michel Barnier, EU's chief negotiator.
EU leaders claim that Britain wants to "cherry pick" aspects of membership in the bloc without the full cost and responsibilities.
Raab said Britain and the bloc were 80 per cent of the way to a withdrawal deal and urged the EU to show "pragmatism" in the negotiations.
"I'm confident that a deal is within our sights," the British official added.
Previous articleRohit-Rahul to launch Indian couture
Next articleAugust 30 – Britain's Cupid day


My client's penthouse is gradually taking shape! Paint job in the living room done and just waiting for more furnitures and home accessories to arrive next week! This project is by far my favorite! Happy client, happy me! ? What else can one ask! Stay tune for more news!


text:
Q: How to use the head() function in R for multiple dataframes? How can I use the head() function for multiple files at the same time?
The following script does not work.
head(c(mtcars, airquality))

$mpg
 [1] 21.0 21.0 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 17.8 16.4 17.3 15.2 10.4 10.4
[17] 14.7 32.4 30.4 33.9 21.5 15.5 15.2 13.3 19.2 27.3 26.0 30.4 15.8 19.7 15.0 21.4

$cyl
 [1] 6 6 4 6 8 6 8 4 4 6 6 8 8 8 8 8 8 4 4 4 4 8 8 8 8 4 4 4 8 6 8 4

$disp
 [1] 160.0 160.0 108.0 258.0 360.0 225.0 360.0 146.7 140.8 167.6 167.6 275.8 275.8
[14] 275.8 472.0 460.0 440.0  78.7  75.7  71.1 120.1 318.0 304.0 350.0 400.0  79.0
[27] 120.3  95.1 351.0 145.0 301.0 121.0

$hp
 [1] 110 110  93 110 175 105 245  62  95 123 123 180 180 180 205 215 230  66  52  65
[21]  97 150 150 245 175  66  91 113 264 175 335 109

$drat
 [1] 3.90 3.90 3.85 3.08 3.15 2.76 3.21 3.69 3.92 3.92 3.92 3.07 3.07 3.07 2.93 3.00
[17] 3.23 4.08 4.93 4.22 3.70 2.76 3.15 3.73 3.08 4.08 4.43 3.77 4.22 3.62 3.54 4.11

$wt
 [1] 2.620 2.875 2.320 3.215 3.440 3.460 3.570 3.190 3.150 3.440 3.440 4.070 3.730
[14] 3.780 5.250 5.424 5.345 2.200 1.615 1.835 2.465 3.520 3.435 3.840 3.845 1.935
[27] 2.140 1.513 3.170 2.770 3.570 2.780

Expectation:
To see the first six lines of mtcars, the fist six lines of airquality,  and so on if I use other files as well.

A: Put the items in a list and use sapply to iterate over them calling head each time.
sapply(list(mtcars, airquality), head, n = 6)

redpajama_set_name: RedPajamaStackExchange


ethnicity discerns it in cultural practices or beliefs (e.g. dress, language, religion), race in perceived physical traits, and nationality through geographic location—yet they all aim to convey an accounting of origins or ancestry.
To create the book, we designed a survey that we updated regularly. All the questions we ever asked are listed below. We put our favorite 20 questions first, but feel free to answer any of the questions on this list.


text:
Q: How to get value from multiple select option in controller I want get all selected from me result,for using in my  controller.

        {{att.name}}

        <select class="form-control" ng-model="user.charactValue" multiple="true">
            <option ng-repeat="itemss in att.value track by $index" value="{{itemss}}" >{{itemss}}</option>
        </select>

Добави

<input type="submit" ng-click="companyBusinessAsset">

$scope.companyBusinessAsset = function() {
    console.log ($scope.charactValue);
    // this return Undefined
};

Down  code is using, but each time they enter into if.
$scope.charactValue = [];

$scope.$watch ('selected', function(nowSelected) {
    $scope.selectedValues = [];
    console.log(nowSelected)
    // this return Undefined
    console.log('dddd')
    if (!nowSelected) {
        console.log("IFFFFFF");
        return;
    }
    angular.forEach ($scope.charactValue, function(val) {
        console.log(val);
        $scope.charactValue.push (val.id.toString());
    });
});

A: Try adding ng-multiple="true" to your select.

A: I did this in one of my projects as below, hope this helps:
 <select multiple="multiple" name="selectedRoleId" ng-model="user.selectedRole" class="form-control">
      <option ng:repeat="role in roleList" value="{{role.Name}}">{{role.Name}}</option>
 </select>

then in the submit function in the controller:
//declare $scope.user to avoid undefined/notfound error
$scope.user = {}; //above the function
//and inside the function
$scope.submitForm=function() {
    var reguser = new models.register($scope.user);
};

you will get the multiple selected values in $scope.user's selectedRole property


Rehman lauded the service of women leaders and activists in attempting to change the conditions, discourse and rights agenda for women over the years, saying that she was fortunate to have worked with the greatest leader of them all, Shaheed Mohtarma Benazir Bhutto, who had been an invaluable proponent of women's rights, inclusions and empowerment at every level.
"The PPP did not accept such forced exclusions and marginalization of women when SMBB was alive; she always tried to ensure that all those who coerce women from exercising their fundamental rights will be penalized. Taking that vision forward, I am on the eve of Women's Day, asking the parliament of Pakistan to disallow the alarming rise in such forced exclusions of women both as voters and as candidates in many constituencies and stories we don't always hear about," said Rehman on the floor of the upper House.
"Women's votes are increasingly showing a disturbing downward trend, despite an uptick in broader votes registered. Official data tells us there were 86.24m registered voters in 2013, including 48.61m men and 37.63m women. The latest figures show an overall increase in registered voters to 93.06m; within that group however, male voters grew up to 52.36m while female voters add up to 40.7m, revealing that voter registration of women has not kept pace with that of men," said the Senator, citing disturbing statistics.
"This is bad news, especially when reports from Dir, Hangu and other areas consistently show that the local bosses are using verbal agreements to keep women from voting," she added.
The PPP Vice President, making her case, also referenced previous court rulings.
"I want to remind this House that court judgements also rule that 'The right to vote is a fundamental right and not a statutory right'," she said, citing the Province of Sindh vs. MQM [PLD 2014 Supreme Court 531]).
"Under Article 17 of the Constitution every citizen has right to vote to participate in the governance of the country through their chosen representatives," she reiterated.
"I also state on record the view that while tribal custom or culture is cited to enforce such denial of rights on women, our religion is cited wrongly for such practices, whereby Islam accords frontline status even in wars to women," maintained Rehman.
"Pakistan must take the lead among developing countries in empowering and mainstreaming women. The right to vote is the first building block of a democracy, and must be ensured if we are to fight for a country governed by rights and the rule of law, the Senator declared.
"This is not an issue anyone should play politics on, nor must we delay such laws. I believe we owe this much, and way more, to the people of Pakistan. We have been left behind by history and our own conduct. It is high time we started reform at the bottom, and included the vulnerable and the excluded in all democratic practices and procedures," she stated.
"This bill is just another first step needed in mainstreaming women. We will need civil society, media and other lawmakers to remain vigilant against abuse and urge the current government of the day to enhance the number of women in decision-making places, including federal ministries and public sector posts. It gives me no joy to say that I do not even see a federal minister among the cabinet that is a woman. For a country where a woman has been twice elected PM, this is a backward slide. I hope this can change," concluded Rehman.


text:
from itertools import chain
from numbers import Integral, Real
import string

import numpy as np

import openmc.checkvalue as cv
import openmc.data

# Supported keywords for continuous-energy cross section plotting
PLOT_TYPES = ['total', 'scatter', 'elastic', 'inelastic', 'fission',
              'absorption', 'capture', 'nu-fission', 'nu-scatter', 'unity',
              'slowing-down power', 'damage']

# Supported keywords for multi-group cross section plotting
PLOT_TYPES_MGXS = ['total', 'absorption', 'scatter', 'fission',
                   'kappa-fission', 'nu-fission', 'prompt-nu-fission',
                   'deleyed-nu-fission', 'chi', 'chi-prompt', 'chi-delayed',
                   'inverse-velocity', 'beta', 'decay-rate', 'unity']
# Create a dictionary which can be used to convert PLOT_TYPES_MGXS to the
# openmc.XSdata attribute name needed to access the data
_PLOT_MGXS_ATTR = {line: line.replace(' ', '_').replace('-', '_')
                   for line in PLOT_TYPES_MGXS}
_PLOT_MGXS_ATTR['scatter'] = 'scatter_matrix'

# Special MT values
UNITY_MT = -1
XI_MT = -2

# MTs to combine to generate associated plot_types
_INELASTIC = [mt for mt in openmc.data.SUM_RULES[3] if mt != 27]
PLOT_TYPES_MT = {
    'total': openmc.data.SUM_RULES[1],
    'scatter': [2] + _INELASTIC,
    'elastic': [2],
    'inelastic': _INELASTIC,
    'fission': [18],
    'absorption': [27],
    'capture': [101],
    'nu-fission': [18],
    'nu-scatter': [2] + _INELASTIC,
    'unity': [UNITY_MT],
    'slowing-down power': [2] + [XI_MT],
    'damage': [444]
}

# Types of plots to plot linearly in y
PLOT_TYPES_LINEAR = {'nu-fission / fission', 'nu-scatter / scatter',
                     'nu-fission / absorption', 'fission / absorption'}

# Minimum and maximum energies for plotting (units of eV)
_MIN_E = 1.e-5
_MAX_E = 20.e6

def plot_xs(this, types, divisor_types=None, temperature=294., data_type=None,
            axis=None, sab_name=None, ce_cross_sections=None,
            mg_cross_sections=None, enrichment=None, plot_CE=True, orders=None,
            divisor_orders=None, **kwargs):
    """Creates a figure of continuous-energy cross sections for this item.

    Parameters
    ----------
    this : str or openmc.Material
        Object to source data from
    types : Iterable of values of PLOT_TYPES
        The type of cross sections to include in the plot.
    divisor_types : Iterable of values of PLOT_TYPES, optional
        Cross section types which will divide those produced by types
        before plotting. A type of 'unity' can be used to effectively not
        divide some types.
    temperature : float, optional
        Temperature in Kelvin to plot. If not specified, a default
        temperature of 294K will be plotted. Note that the nearest
        temperature in the library for each nuclide will be used as opposed
        to using any interpolation.
    data_type : {'nuclide', 'element', 'material', 'macroscopic'}, optional
        Type of object to plot. If not specified, a guess is made based on the
        `this` argument.
    axis : matplotlib.axes, optional
        A previously generated axis to use for plotting. If not specified,
        a new axis and figure will be generated.
    sab_name : str, optional
        Name of S(a,b) library to apply to MT=2 data when applicable; only used
        for items which are instances of openmc.Element or openmc.Nuclide
    ce_cross_sections : str, optional
        Location of cross_sections.xml file. Default is None.
    mg_cross_sections : str, optional
        Location of MGXS HDF5 Library file. Default is None.
    enrichment : float, optional
        Enrichment for U235 in weight percent. For example, input 4.95 for
        4.95 weight percent enriched U. Default is None. This is only used for
        items which are instances of openmc.Element
    plot_CE : bool, optional
        Denotes whether or not continuous-energy will be plotted. Defaults to
        plotting the continuous-energy data.
    orders : Iterable of Integral, optional
        The scattering order or delayed group index to use for the
        corresponding entry in types. Defaults to the 0th order for scattering
        and the total delayed neutron data. This only applies to plots of
        multi-group data.
    divisor_orders : Iterable of Integral, optional
        Same as orders, but for divisor_types
    **kwargs
        All keyword arguments are passed to
        :func:`matplotlib.pyplot.figure`.

    Returns
    -------
    fig : matplotlib.figure.Figure
        If axis is None, then a Matplotlib Figure of the generated
        cross section will be returned. Otherwise, a value of
        None will be returned as the figure and axes have already been
        generated.

    """
    import matplotlib.pyplot as plt

    cv.check_type("plot_CE", plot_CE, bool)

    if data_type is None:
        if isinstance(this, openmc.Nuclide):
            data_type = 'nuclide'
        elif isinstance(this, openmc.Element):
            data_type = 'element'
        elif isinstance(this, openmc.Material):
            data_type = 'material'
        elif isinstance(this, openmc.Macroscopic):
            data_type = 'macroscopic'
        elif isinstance(this, str):
            if this[-1] in string.digits:
                data_type = 'nuclide'
            else:
                data_type = 'element'
        else:
            raise TypeError("Invalid type for plotting")

    if plot_CE:
        # Calculate for the CE cross sections
        E, data = calculate_cexs(this, data_type, types, temperature, sab_name,
                                 ce_cross_sections, enrichment)
        if divisor_types:
            cv.check_length('divisor types', divisor_types, len(types))
            Ediv, data_div = calculate_cexs(this, divisor_types, temperature,
                                            sab_name, ce_cross_sections,
                                            enrichment)

            # Create a new union grid, interpolate data and data_div on to that
            # grid, and then do the actual division
            Enum = E[:]
            E = np.union1d(Enum, Ediv)
            data_new = np.zeros((len(types), len(E)))

            for line in range(len(types)):
                data_new[line, :] = \
                    np.divide(np.interp(E, Enum, data[line, :]),
                              np.interp(E, Ediv, data_div[line, :]))
                if divisor_types[line] != 'unity':
                    types[line] = types[line] + ' / ' + divisor_types[line]
            data = data_new
    else:
        # Calculate for MG cross sections
        E, data = calculate_mgxs(this, data_type, types, orders, temperature,
                                 mg_cross_sections, ce_cross_sections,
                                 enrichment)

        if divisor_types:
            cv.check_length('divisor types', divisor_types, len(types))
            Ediv, data_div = calculate_mgxs(this, data_type, divisor_types,
                                            divisor_orders, temperature,
                                            mg_cross_sections,
                                            ce_cross_sections, enrichment)

            # Perform the division
            for line in range(len(types)):
                data[line, :] /= data_div[line, :]
                if divisor_types[line] != 'unity':
                    types[line] += ' / ' + divisor_types[line]

    # Generate the plot
    if axis is None:
        fig, ax = plt.subplots()
    else:
        fig = None
        ax = axis
    # Set to loglog or semilogx depending on if we are plotting a data
    # type which we expect to vary linearly
    if set(types).issubset(PLOT_TYPES_LINEAR):
        plot_func = ax.semilogx
    else:
        plot_func = ax.loglog

    # Plot the data
    for i in range(len(data)):
        data[i, :] = np.nan_to_num(data[i, :])
        if np.sum(data[i, :]) > 0.:
            plot_func(E, data[i, :], label=types[i])

    ax.set_xlabel('Energy [eV]')
    if plot_CE:
        ax.set_xlim(_MIN_E, _MAX_E)
    else:
        ax.set_xlim(E[-1], E[0])
    if divisor_types:
        if data_type == 'nuclide':
            ylabel = 'Nuclidic Microscopic Data'
        elif data_type == 'element':
            ylabel = 'Elemental Microscopic Data'
        elif data_type == 'material' or data_type == 'macroscopic':
            ylabel = 'Macroscopic Data'
    else:
        if data_type == 'nuclide':
            ylabel = 'Microscopic Cross Section [b]'
        elif data_type == 'element':
            ylabel = 'Elemental Cross Section [b]'
        elif data_type == 'material' or data_type == 'macroscopic':
            ylabel = 'Macroscopic Cross Section [1/cm]'
    ax.set_ylabel(ylabel)
    ax.legend(loc='best')
    name = this.name if data_type == 'material' else this
    if len(types) > 1:
        ax.set_title('Cross Sections for ' + name)
    else:
        ax.set_title('Cross Section for ' + name)

    return fig

def calculate_cexs(this, data_type, types, temperature=294., sab_name=None,
                   cross_sections=None, enrichment=None):
    """Calculates continuous-energy cross sections of a requested type.

    Parameters
    ----------
    this : {str, openmc.Nuclide, openmc.Element, openmc.Material}
        Object to source data from
    data_type : {'nuclide', 'element', 'material'}
        Type of object to plot
    types : Iterable of values of PLOT_TYPES
        The type of cross sections to calculate
    temperature : float, optional
        Temperature in Kelvin to plot. If not specified, a default
        temperature of 294K will be plotted. Note that the nearest
        temperature in the library for each nuclide will be used as opposed
        to using any interpolation.
    sab_name : str, optional
        Name of S(a,b) library to apply to MT=2 data when applicable.
    cross_sections : str, optional
        Location of cross_sections.xml file. Default is None.
    enrichment : float, optional
        Enrichment for U235 in weight percent. For example, input 4.95 for
        4.95 weight percent enriched U. Default is None
        (natural composition).

    Returns
    -------
    energy_grid : numpy.ndarray
        Energies at which cross sections are calculated, in units of eV
    data : numpy.ndarray
        Cross sections calculated at the energy grid described by energy_grid

    """

    # Check types
    cv.check_type('temperature', temperature, Real)
    if sab_name:
        cv.check_type('sab_name', sab_name, str)
    if enrichment:
        cv.check_type('enrichment', enrichment, Real)

    if data_type == 'nuclide':
        if isinstance(this, str):
            nuc = openmc.Nuclide(this)
        else:
            nuc = this
        energy_grid, xs = _calculate_cexs_nuclide(nuc, types, temperature,
                                                  sab_name, cross_sections)
        # Convert xs (Iterable of Callable) to a grid of cross section values
        # calculated on the points in energy_grid for consistency with the
        # element and material functions.
        data = np.zeros((len(types), len(energy_grid)))
        for line in range(len(types)):
            data[line, :] = xs[line](energy_grid)
    elif data_type == 'element':
        if isinstance(this, str):
            elem = openmc.Element(this)
        else:
            elem = this
        energy_grid, data = _calculate_cexs_elem_mat(elem, types, temperature,
                                                     cross_sections, sab_name,
                                                     enrichment)
    elif data_type == 'material':
        cv.check_type('this', this, openmc.Material)
        energy_grid, data = _calculate_cexs_elem_mat(this, types, temperature,
                                                     cross_sections)
    else:
        raise TypeError("Invalid type")

    return energy_grid, data

def _calculate_cexs_nuclide(this, types, temperature=294., sab_name=None,
                            cross_sections=None):
    """Calculates continuous-energy cross sections of a requested type.

    Parameters
    ----------
    this : openmc.Nuclide
        Nuclide object to source data from
    types : Iterable of str or Integral
        The type of cross sections to calculate; values can either be those
        in openmc.PLOT_TYPES or keys from openmc.data.REACTION_MT which
        correspond to a reaction description e.g '(n,2n)' or integers which
        correspond to reaction channel (MT) numbers.
    temperature : float, optional
        Temperature in Kelvin to plot. If not specified, a default
        temperature of 294K will be plotted. Note that the nearest
        temperature in the library for each nuclide will be used as opposed
        to using any interpolation.
    sab_name : str, optional
        Name of S(a,b) library to apply to MT=2 data when applicable.
    cross_sections : str, optional
        Location of cross_sections.xml file. Default is None.

    Returns
    -------
    energy_grid : numpy.ndarray
        Energies at which cross sections are calculated, in units of eV
    data : Iterable of Callable
        Requested cross section functions

    """

    # Load the library
    library = openmc.data.DataLibrary.from_xml(cross_sections)

    # Convert temperature to format needed for access in the library
    strT = f"{int(round(temperature))}K"
    T = temperature

    # Now we can create the data sets to be plotted
    energy_grid = []
    xs = []
    lib = library.get_by_material(this)
    if lib is not None:
        nuc = openmc.data.IncidentNeutron.from_hdf5(lib['path'])
        # Obtain the nearest temperature
        if strT in nuc.temperatures:
            nucT = strT
        else:
            delta_T = np.array(nuc.kTs) - T * openmc.data.K_BOLTZMANN
            closest_index = np.argmin(np.abs(delta_T))
            nucT = nuc.temperatures[closest_index]

        # Prep S(a,b) data if needed
        if sab_name:
            sab = openmc.data.ThermalScattering.from_hdf5(sab_name)
            # Obtain the nearest temperature
            if strT in sab.temperatures:
                sabT = strT
            else:
                delta_T = np.array(sab.kTs) - T * openmc.data.K_BOLTZMANN
                closest_index = np.argmin(np.abs(delta_T))
                sabT = sab.temperatures[closest_index]

            # Create an energy grid composed the S(a,b) and the nuclide's grid
            grid = nuc.energy[nucT]
            sab_Emax = 0.
            sab_funcs = []
            if sab.elastic is not None:
                elastic = sab.elastic.xs[sabT]
                if isinstance(elastic, openmc.data.CoherentElastic):
                    grid = np.union1d(grid, elastic.bragg_edges)
                    if elastic.bragg_edges[-1] > sab_Emax:
                        sab_Emax = elastic.bragg_edges[-1]
                elif isinstance(elastic, openmc.data.Tabulated1D):
                    grid = np.union1d(grid, elastic.x)
                    if elastic.x[-1] > sab_Emax:
                        sab_Emax = elastic.x[-1]
                sab_funcs.append(elastic)
            if sab.inelastic is not None:
                inelastic = sab.inelastic.xs[sabT]
                grid = np.union1d(grid, inelastic.x)
                if inelastic.x[-1] > sab_Emax:
                        sab_Emax = inelastic.x[-1]
                sab_funcs.append(inelastic)
            energy_grid = grid
        else:
            energy_grid = nuc.energy[nucT]

        # Parse the types
        mts = []
        ops = []
        yields = []
        for line in types:
            if line in PLOT_TYPES:
                tmp_mts = [mtj for mti in PLOT_TYPES_MT[line] for mtj in
                           nuc.get_reaction_components(mti)]
                mts.append(tmp_mts)
                if line.startswith('nu'):
                    yields.append(True)
                else:
                    yields.append(False)
                if XI_MT in tmp_mts:
                    ops.append((np.add,) * (len(tmp_mts) - 2) + (np.multiply,))
                else:
                    ops.append((np.add,) * (len(tmp_mts) - 1))
            elif line in openmc.data.REACTION_MT:
                mt_number = openmc.data.REACTION_MT[line]
                cv.check_type('MT in types', mt_number, Integral)
                cv.check_greater_than('MT in types', mt_number, 0)
                tmp_mts = nuc.get_reaction_components(mt_number)
                mts.append(tmp_mts)
                ops.append((np.add,) * (len(tmp_mts) - 1))
                yields.append(False)
            elif isinstance(line, int):
                # Not a built-in type, we have to parse it ourselves
                cv.check_type('MT in types', line, Integral)
                cv.check_greater_than('MT in types', line, 0)
                tmp_mts = nuc.get_reaction_components(line)
                mts.append(tmp_mts)
                ops.append((np.add,) * (len(tmp_mts) - 1))
                yields.append(False)
            else:
                raise TypeError("Invalid type", line)

        for i, mt_set in enumerate(mts):
            # Get the reaction xs data from the nuclide
            funcs = []
            op = ops[i]
            for mt in mt_set:
                if mt == 2:
                    if sab_name:
                        # Then we need to do a piece-wise function of
                        # The S(a,b) and non-thermal data
                        sab_sum = openmc.data.Sum(sab_funcs)
                        pw_funcs = openmc.data.Regions1D(
                            [sab_sum, nuc[mt].xs[nucT]],
                            [sab_Emax])
                        funcs.append(pw_funcs)
                    else:
                        funcs.append(nuc[mt].xs[nucT])
                elif mt in nuc:
                    if yields[i]:
                        # Get the total yield first if available. This will be
                        # used primarily for fission.
                        for prod in chain(nuc[mt].products,
                                          nuc[mt].derived_products):
                            if prod.particle == 'neutron' and \
                                prod.emission_mode == 'total':
                                func = openmc.data.Combination(
                                    [nuc[mt].xs[nucT], prod.yield_],
                                    [np.multiply])
                                funcs.append(func)
                                break
                        else:
                            # Total doesn't exist so we have to create from
                            # prompt and delayed. This is used for scatter
                            # multiplication.
                            func = None
                            for prod in chain(nuc[mt].products,
                                              nuc[mt].derived_products):
                                if prod.particle == 'neutron' and \
                                    prod.emission_mode != 'total':
                                    if func:
                                        func = openmc.data.Combination(
                                            [prod.yield_, func], [np.add])
                                    else:
                                        func = prod.yield_
                            if func:
                                funcs.append(openmc.data.Combination(
                                    [func, nuc[mt].xs[nucT]], [np.multiply]))
                            else:
                                # If func is still None, then there were no
                                # products. In that case, assume the yield is
                                # one as its not provided for some summed
                                # reactions like MT=4
                                funcs.append(nuc[mt].xs[nucT])
                    else:
                        funcs.append(nuc[mt].xs[nucT])
                elif mt == UNITY_MT:
                    funcs.append(lambda x: 1.)
                elif mt == XI_MT:
                    awr = nuc.atomic_weight_ratio
                    alpha = ((awr - 1.) / (awr + 1.))**2
                    xi = 1. + alpha * np.log(alpha) / (1. - alpha)
                    funcs.append(lambda x: xi)
                else:
                    funcs.append(lambda x: 0.)
            funcs = funcs if funcs else [lambda x: 0.]
            xs.append(openmc.data.Combination(funcs, op))
    else:
        raise ValueError(this + " not in library")

    return energy_grid, xs

def _calculate_cexs_elem_mat(this, types, temperature=294.,
                             cross_sections=None, sab_name=None,
                             enrichment=None):
    """Calculates continuous-energy cross sections of a requested type.

    Parameters
    ----------
    this : openmc.Material or openmc.Element
        Object to source data from
    types : Iterable of values of PLOT_TYPES
        The type of cross sections to calculate
    temperature : float, optional
        Temperature in Kelvin to plot. If not specified, a default
        temperature of 294K will be plotted. Note that the nearest
        temperature in the library for each nuclide will be used as opposed
        to using any interpolation.
    cross_sections : str, optional
        Location of cross_sections.xml file. Default is None.
    sab_name : str, optional
        Name of S(a,b) library to apply to MT=2 data when applicable.
    enrichment : float, optional
        Enrichment for U235 in weight percent. For example, input 4.95 for
        4.95 weight percent enriched U. Default is None
        (natural composition).

    Returns
    -------
    energy_grid : numpy.ndarray
        Energies at which cross sections are calculated, in units of eV
    data : numpy.ndarray
        Cross sections calculated at the energy grid described by energy_grid

    """

    if isinstance(this, openmc.Material):
        if this.temperature is not None:
            T = this.temperature
        else:
            T = temperature
    else:
        T = temperature

    # Load the library
    library = openmc.data.DataLibrary.from_xml(cross_sections)

    if isinstance(this, openmc.Material):
        # Expand elements in to nuclides with atomic densities
        nuclides = this.get_nuclide_atom_densities()
        # For ease of processing split out the nuclide and its fraction
        nuc_fractions = {nuclide[1][0]: nuclide[1][1]
                         for nuclide in nuclides.items()}
        # Create a dict of [nuclide name] = nuclide object to carry forward
        # with a common nuclides format between openmc.Material and
        # openmc.Element objects
        nuclides = {nuclide[1][0]: nuclide[1][0]
                    for nuclide in nuclides.items()}
    else:
        # Expand elements in to nuclides with atomic densities
        nuclides = this.expand(1., 'ao', enrichment=enrichment,
                               cross_sections=cross_sections)
        # For ease of processing split out the nuclide and its fraction
        nuc_fractions = {nuclide[0]: nuclide[1] for nuclide in nuclides}
        # Create a dict of [nuclide name] = nuclide object to carry forward
        # with a common nuclides format between openmc.Material and
        # openmc.Element objects
        nuclides = {nuclide[0]: nuclide[0] for nuclide in nuclides}

    # Identify the nuclides which have S(a,b) data
    sabs = {}
    for nuclide in nuclides.items():
        sabs[nuclide[0]] = None
    if isinstance(this, openmc.Material):
        for sab_name in this._sab:
            sab = openmc.data.ThermalScattering.from_hdf5(
                library.get_by_material(sab_name, data_type='thermal')['path'])
            for nuc in sab.nuclides:
                sabs[nuc] = library.get_by_material(sab_name,
                        data_type='thermal')['path']
    else:
        if sab_name:
            sab = openmc.data.ThermalScattering.from_hdf5(sab_name)
            for nuc in sab.nuclides:
                sabs[nuc] = library.get_by_material(sab_name,
                        data_type='thermal')['path']

    # Now we can create the data sets to be plotted
    xs = {}
    E = []
    for nuclide in nuclides.items():
        name = nuclide[0]
        nuc = nuclide[1]
        sab_tab = sabs[name]
        temp_E, temp_xs = calculate_cexs(nuc, 'nuclide', types, T, sab_tab,
                                         cross_sections)
        E.append(temp_E)
        # Since the energy grids are different, store the cross sections as
        # a tabulated function so they can be calculated on any grid needed.
        xs[name] = [openmc.data.Tabulated1D(temp_E, temp_xs[line])
                    for line in range(len(types))]

    # Condense the data for every nuclide
    # First create a union energy grid
    energy_grid = E[0]
    for grid in E[1:]:
        energy_grid = np.union1d(energy_grid, grid)

    # Now we can combine all the nuclidic data
    data = np.zeros((len(types), len(energy_grid)))
    for line in range(len(types)):
        if types[line] == 'unity':
            data[line, :] = 1.
        else:
            for nuclide in nuclides.items():
                name = nuclide[0]
                data[line, :] += (nuc_fractions[name] *
                                  xs[name][line](energy_grid))

    return energy_grid, data

def calculate_mgxs(this, data_type, types, orders=None, temperature=294.,
                   cross_sections=None, ce_cross_sections=None,
                   enrichment=None):
    """Calculates multi-group cross sections of a requested type.

    If the data for the nuclide or macroscopic object in the library is
    represented as angle-dependent data then this method will return the
    geometric average cross section over all angles.

    Parameters
    ----------
    this : str or openmc.Material
        Object to source data from
    data_type : {'nuclide', 'element', 'material', 'macroscopic'}
        Type of object to plot
    types : Iterable of values of PLOT_TYPES_MGXS
        The type of cross sections to calculate
    orders : Iterable of Integral, optional
        The scattering order or delayed group index to use for the
        corresponding entry in types. Defaults to the 0th order for scattering
        and the total delayed neutron data.
    temperature : float, optional
        Temperature in Kelvin to plot. If not specified, a default
        temperature of 294K will be plotted. Note that the nearest
        temperature in the library for each nuclide will be used as opposed
        to using any interpolation.
    cross_sections : str, optional
        Location of MGXS HDF5 Library file. Default is None.
    ce_cross_sections : str, optional
        Location of continuous-energy cross_sections.xml file. Default is None.
        This is used only for expanding an openmc.Element object passed as this
    enrichment : float, optional
        Enrichment for U235 in weight percent. For example, input 4.95 for
        4.95 weight percent enriched U. Default is None
        (natural composition).

    Returns
    -------
    energy_grid : numpy.ndarray
        Energies at which cross sections are calculated, in units of eV
    data : numpy.ndarray
        Cross sections calculated at the energy grid described by energy_grid

    """

    # Check types
    cv.check_type('temperature', temperature, Real)
    if enrichment:
        cv.check_type('enrichment', enrichment, Real)
    cv.check_iterable_type('types', types, str)

    cv.check_type("cross_sections", cross_sections, str)
    library = openmc.MGXSLibrary.from_hdf5(cross_sections)

    if data_type in ('nuclide', 'macroscopic'):
        mgxs = _calculate_mgxs_nuc_macro(this, types, library, orders,
                                         temperature)
    elif data_type in ('element', 'material'):
        mgxs = _calculate_mgxs_elem_mat(this, types, library, orders,
                                        temperature, ce_cross_sections,
                                        enrichment)
    else:
        raise TypeError("Invalid type")

    # Convert the data to the format needed
    data = np.zeros((len(types), 2 * library.energy_groups.num_groups))
    energy_grid = np.zeros(2 * library.energy_groups.num_groups)
    for g in range(library.energy_groups.num_groups):
        energy_grid[g * 2: g * 2 + 2] = \
            library.energy_groups.group_edges[g: g + 2]
    # Ensure the energy will show on a log-axis by replacing 0s with a
    # sufficiently small number
    energy_grid[0] = max(energy_grid[0], _MIN_E)

    for line in range(len(types)):
        for g in range(library.energy_groups.num_groups):
            data[line, g * 2: g * 2 + 2] = mgxs[line, g]

    return energy_grid[::-1], data

def _calculate_mgxs_nuc_macro(this, types, library, orders=None,
                              temperature=294.):
    """Determines the multi-group cross sections of a nuclide or macroscopic
    object.

    If the data for the nuclide or macroscopic object in the library is
    represented as angle-dependent data then this method will return the
    geometric average cross section over all angles.

    Parameters
    ----------
    this : openmc.Nuclide or openmc.Macroscopic
        Object to source data from
    types : Iterable of str
        The type of cross sections to calculate; values can either be those
        in openmc.PLOT_TYPES_MGXS
    library : openmc.MGXSLibrary
        MGXS Library containing the data of interest
    orders : Iterable of Integral, optional
        The scattering order or delayed group index to use for the
        corresponding entry in types. Defaults to the 0th order for scattering
        and the total delayed neutron data.
    temperature : float, optional
        Temperature in Kelvin to plot. If not specified, a default
        temperature of 294K will be plotted. Note that the nearest
        temperature in the library for each nuclide will be used as opposed
        to using any interpolation.

    Returns
    -------
    data : numpy.ndarray
        Cross sections calculated at the energy grid described by energy_grid

    """

    # Check the parameters and grab order/delayed groups
    if orders:
        cv.check_iterable_type('orders', orders, Integral,
                               min_depth=len(types), max_depth=len(types))
    else:
        orders = [None] * len(types)
    for i, line in enumerate(types):
        cv.check_type("line", line, str)
        cv.check_value("line", line, PLOT_TYPES_MGXS)
        if orders[i]:
            cv.check_greater_than("order value", orders[i], 0, equality=True)

    xsdata = library.get_by_name(this)

    if xsdata is not None:
        # Obtain the nearest temperature
        t = np.abs(xsdata.temperatures - temperature).argmin()

        # Get the data
        data = np.zeros((len(types), library.energy_groups.num_groups))
        for i, line in enumerate(types):
            if 'fission' in line and not xsdata.fissionable:
                continue
            elif line == 'unity':
                data[i, :] = 1.
            else:
                # Now we have to get the cross section data and properly
                # treat it depending on the requested type.
                # First get the data in a generic fashion
                temp_data = getattr(xsdata, _PLOT_MGXS_ATTR[line])[t]
                shape = temp_data.shape[:]
                # If we have angular data, then want the geometric
                # average over all provided angles.  Since the angles are
                # equi-distant, un-weighted averaging will suffice
                if xsdata.representation == 'angle':
                    temp_data = np.mean(temp_data, axis=(0, 1))

                # Now we can look at the shape of the data to identify how
                # it should be modified to produce an array of values
                # with groups.
                if shape in (xsdata.xs_shapes["[G']"],
                             xsdata.xs_shapes["[G]"]):
                    # Then the data is already an array vs groups so copy
                    # and move along
                    data[i, :] = temp_data
                elif shape == xsdata.xs_shapes["[G][G']"]:
                    # Sum the data over outgoing groups to create our array vs
                    # groups
                    data[i, :] = np.sum(temp_data, axis=1)
                elif shape == xsdata.xs_shapes["[DG]"]:
                    # Then we have a constant vs groups with a value for each
                    # delayed group. The user-provided value of orders tells us
                    # which delayed group we want. If none are provided, then
                    # we sum all the delayed groups together.
                    if orders[i]:
                        if orders[i] < len(shape[0]):
                            data[i, :] = temp_data[orders[i]]
                    else:
                        data[i, :] = np.sum(temp_data[:])
                elif shape in (xsdata.xs_shapes["[DG][G']"],
                               xsdata.xs_shapes["[DG][G]"]):
                    # Then we have an array vs groups with values for each
                    # delayed group. The user-provided value of orders tells us
                    # which delayed group we want. If none are provided, then
                    # we sum all the delayed groups together.
                    if orders[i]:
                        if orders[i] < len(shape[0]):
                            data[i, :] = temp_data[orders[i], :]
                    else:
                        data[i, :] = np.sum(temp_data[:, :], axis=0)
                elif shape == xsdata.xs_shapes["[DG][G][G']"]:
                    # Then we have a delayed group matrix. We will first
                    # remove the outgoing group dependency
                    temp_data = np.sum(temp_data, axis=-1)
                    # And then proceed in exactly the same manner as the
                    # "[DG][G']" or "[DG][G]" shapes in the previous block.
                    if orders[i]:
                        if orders[i] < len(shape[0]):
                            data[i, :] = temp_data[orders[i], :]
                    else:
                        data[i, :] = np.sum(temp_data[:, :], axis=0)
                elif shape == xsdata.xs_shapes["[G][G'][Order]"]:
                    # This is a scattering matrix with angular data
                    # First remove the outgoing group dependence
                    temp_data = np.sum(temp_data, axis=1)
                    # The user either provided a specific order or we resort
                    # to the default 0th order
                    if orders[i]:
                        order = orders[i]
                    else:
                        order = 0
                    # If the order is available, store the data for that order
                    # if it is not available, then the expansion coefficient
                    # is zero and thus we already have the correct value.
                    if order < shape[1]:
                        data[i, :] = temp_data[:, order]
    else:
        raise ValueError(f"{this} not present in provided MGXS library")

    return data

def _calculate_mgxs_elem_mat(this, types, library, orders=None,
                             temperature=294., ce_cross_sections=None,
                             enrichment=None):
    """Determines the multi-group cross sections of an element or material
    object.

    If the data for the nuclide or macroscopic object in the library is
    represented as angle-dependent data then this method will return the
    geometric average cross section over all angles.

    Parameters
    ----------
    this : openmc.Element or openmc.Material
        Object to source data from
    types : Iterable of str
        The type of cross sections to calculate; values can either be those
        in openmc.PLOT_TYPES_MGXS
    library : openmc.MGXSLibrary
        MGXS Library containing the data of interest
    orders : Iterable of Integral, optional
        The scattering order or delayed group index to use for the
        corresponding entry in types. Defaults to the 0th order for scattering
        and the total delayed neutron data.
    temperature : float, optional
        Temperature in Kelvin to plot. If not specified, a default
        temperature of 294K will be plotted. Note that the nearest
        temperature in the library for each nuclide will be used as opposed
        to using any interpolation.
    ce_cross_sections : str, optional
        Location of continuous-energy cross_sections.xml file. Default is None.
        This is used only for expanding the elements
    enrichment : float, optional
        Enrichment for U235 in weight percent. For example, input 4.95 for
        4.95 weight percent enriched U. Default is None
        (natural composition).

    Returns
    -------
    data : numpy.ndarray
        Cross sections calculated at the energy grid described by energy_grid

    """

    if isinstance(this, openmc.Material):
        if this.temperature is not None:
            T = this.temperature
        else:
            T = temperature

        # Check to see if we have nuclides/elements or a macrocopic object
        if this._macroscopic is not None:
            # We have macroscopics
            nuclides = {this._macroscopic: (this._macroscopic, this.density)}
        else:
            # Expand elements in to nuclides with atomic densities
            nuclides = this.get_nuclide_atom_densities()

        # For ease of processing split out nuc and nuc_density
        nuc_fraction = [nuclide[1][1] for nuclide in nuclides.items()]
    else:
        T = temperature
        # Expand elements in to nuclides with atomic densities
        nuclides = this.expand(100., 'ao', enrichment=enrichment,
                               cross_sections=ce_cross_sections)

        # For ease of processing split out nuc and nuc_fractions
        nuc_fraction = [nuclide[1] for nuclide in nuclides]

    nuc_data = []
    for nuclide in nuclides.items():
        nuc_data.append(_calculate_mgxs_nuc_macro(nuclide[0], types, library,
                                                  orders, T))

    # Combine across the nuclides
    data = np.zeros((len(types), library.energy_groups.num_groups))
    for line in range(len(types)):
        if types[line] == 'unity':
            data[line, :] = 1.
        else:
            for n in range(len(nuclides)):
                data[line, :] += nuc_fraction[n] * nuc_data[n][line, :]

    return data

redpajama_set_name: RedPajamaGithub


text:
Electric Cars, New Lab Helping Bolster Green Commitment
UT has expanded its role in green technology over the past few years, adding everything from car charging stations to classes designed to tackle issues in the emerging and burgeoning field.
Now, thanks to support from Eaton Corporation, Nissan USA, and the University of Tennessee System, that growth includes both a new lab for engineers and a pair of Nissan LEAFs—all-electric, zero-emission cars—for university use.
From left to right, Nissan USA's Gary Edwards, University of Tennessee System associate vice president and director of research Stacey Patterson, UT Knoxville Department of Electrical Engineering and Computer Science head Leon Tolbert, Eaton Coporation's Jim Batey, and UT Knoxville College of Engineering Dean Wayne Davis stand together at the dedication of the Solar Convergence Lab.
"This latest example of our university partnering with the corporate sector to provide new and exciting opportunities for our students also highlights our devotion to a greener campus," said Wayne Davis, dean of the College of Engineering. "It's a true win-win for us and our partners."
The Solar Convergence Laboratory draws upon the Eaton Laboratory and the Power Electronics Lab, both located in the Min H. Kao Electrical Engineering and Computer Science Building, the solar array on the Eleventh Street Garage, and the West Tennessee Solar Farm to create a virtual lab space, giving students the opportunity to collect and analyze data in real time.
Revenue from the solar farm, located about fifty miles northeast of Memphis, also helped fund the project, according to Stacey Patterson, University of Tennessee System associate vice president and director of research.
That data will play a key role in helping students draw conclusions about solar energy and its changing role in the overall power grid, according to Leon Tolbert, head of the Department of Electrical Engineering and Computer Science.
"This lab will help further our efforts to improve not only solar energy as a viable widespread source of power, but also our focus on energy in general within our department," said Tolbert, who also serves as the Min H. Kao Professor in the department.
"Through CURENT (the Center for Ultra-Wide-Area Resilient Electric Energy Transmission Networks), students will be able to take information from the arrays and from our West Tennessee solar farm to learn more about current technology while working on developing next-generation technology."
Tolbert said that Eaton helped make those studies possible by donating not only the technology that helps students interact with the solar arrays, but also the garage's car charging stations.
The Nissan LEAF electric vehicles are the newest additions to the partnership between UT and Nissan.
"Nissan is recognized as one of the world's greenest brands, so we are pleased to support the University of Tennessee's efforts to advance sustainable energy and sustainable mobility," said Gary Edwards, vice president, Nissan Powertrain Operations. "These LEAF units will not only serve as valuable research tools, but they will allow students and faculty to experience the benefits of going electric and to enjoy LEAF's performance as a fun-to-drive car."
Nissan actively recruits students from the university for co-ops and internships, and earlier this summer the company invited a student from the College of Engineering to participate in a national design competition to design a test track.
Nissan is the global leader in electric vehicles, with more than 188,000 LEAF sales globally and more than 84,000 in the United States. Each Nissan LEAF is powered by an advanced lithium-ion battery and an 80kW motor. The new model boasts an EPA-rated driving range of 107 miles on a fully charged battery and a starting price of less than $30,000.
About Nissan North America
Nissan's operations include automotive styling, engineering, consumer and corporate financing, sales and marketing, distribution, and manufacturing. Nissan's Green Program has been recognized annually by the US Environmental Protection Agency as an ENERGY STAR® Partner of the Year since 2010. Information and news about the company can be found here and here, respectively.
About Nissan Motor Co.
Nissan Motor Co. Ltd., Japan's second-largest automotive company, is headquartered in Yokohama, Japan, and is part of the Renault-Nissan Alliance. Operating with more than 247,500 employees globally, Nissan sold 5.32 million vehicles and generated revenue of $103.6 billion in fiscal year 2014. Nissan manufactures more than sixty models under the Nissan, Infiniti, and Datsun brands. Nissan leads the world in zero-emission mobility, dominated by sales of the LEAF, the first mass-market pure-electric vehicle. It is the best-selling EV in history.
David Goddard (865-974-0683, david.goddard@utk.edu)
CURENT
Department of Electrical Engineering and Computer Science
Leon Tolbert
Tickle College of Engineering


Improving your diet can give you more energy!
Data has shown that eating more sugar, saturated fat, and less fiber can contribute to lighter and less restoration during sleep.
Copyright 2019 Booty Lab Inc.


One of the questions often asked is "When did they stop using asbestos?". It is a question often many people want to know especially if one is buying a house or renting so as to be aware of the presence of asbestos related issues. When did they stop using asbestos? is also a question which comes up when people are looking at Asbestos related cancers especially Mesothelioma cancer and lung cancer.
In Australia, Asbestos use was stopped for domestic building materials in the mid 1980's however it was not until 31 December 2003 that asbestos and all products containing asbestos were banned throughout Australia.
The city of Baltimore has its roots as far back as July 30, 1729. The city of Baltimore is named after Lord Baltimore, the first Governor of the Province of Maryland.
Baltimore grew in the mid-18th century mostly due to the fact that it was a granary for sugar producing colonies located in the Caribbean.
The city of Baltimore also played a pivotal role in events leading to the American Revolution. Baltimore joined other cities in protesting Boston's punishment by the British by banding together the merchants to sign agreements to not import from or export to Britain. During the War of 1812, the British declared Baltimore a "nest of Pirates."
The Baltimore City Circuit Court is the trial court of general jurisdiction. It has full common law and equity powers in all civil, juvenile and criminal cases, along with additional powers and jurisdiction conferred by the Constitution and Maryland State law.
The Baltimore City Circuit Court is the only court in the county that has authority to conduct jury trials. It hears major civil cases, highly sensitive criminal matters even death penalty cases, juvenile and family law cases.
The Circuit Court is open from 8:30 a.m. to 4:30 p.m., Monday through Friday except when we have Court Holidays.


text:
The Cornell Daily Sun (https://cornellsun.com/2019/10/11/lim-depoliticizing-apples-and-mooncakes/)
LIM | Depoliticizing Apples and Mooncakes
By Kristi Lim | October 11, 2019
More on Columns
Subscribe to Columns
The most alarming thing I've heard since coming to America is, "Since when were you so anti-China?" This came from my brother, who can tell me the angles six different international news agencies take on various issues, while I — reliant on my free student subscription of The New York Times — could reference only one. I decided that my brother's balance on issues is something I need to learn from, as shown when he responded on what he thought a friend's stance on Hong Kong was with: "Pro-stability."
The tendency of American college activism to personify governments and populations into single entities with moral character is something I've since tried to distance myself from. In particular, the way this habit voids "the enemy's" perspective. When I juxtapose this tendency with our campus climate's simultaneous desire to give her diverse student body equal cultural voice, I am puzzled by the contradiction and cognizant of the way it politicizes aspects of culture that I grew up believing are better unpoliticized. Yet, reflecting on recent Rosh Hashanah and Mid-Autumn Festival festivities, I realize I too am homogenizing cultural expression when I carry this belief.
America's relative "freedom of speech" doesn't guarantee balance if all voices still start from the same premises, and if a failure to recognize this convinces the minority to have their perspectives rewritten. Growing up in a small country, where diplomacy is central to defense, I had been taught to track world events as actions and reactions more than as justifications for intervention or boycotts. Coming here, the new light in which Xinjiang was cast initially felt like a revelation, and the necessity of Israel and Palestine's diaspora and respective allies playing out these moralized divisions abroad an awakening.
Yet, if I made Rosh Hashanah and Mid-Autumn Festival, celebrated by cultures affiliated with Israel and China (not exclusively), a call to lay down arms to reaffirm the culture and humanity of domestic populations and diasporas beyond moralization, I would be dismissing the existence of perspectives like my own. Believing that the health of any system — from gene pools to workplaces — is diversity, I wonder what can be done for campus discourse today to feel more like a stacked cord of every student's proto-framework shaped by their background and less like a dominant wave whose premises newcomers have to tune their frequencies to.
Perhaps promoting a variety of perspectives starts from catching myself in the act of homogenization: De-conflating identities with organizations, and organizations with the people in them. Watermargin's Rosh Hashanah "potluck," where our brisket and kugel were greeted with challah and bagels, was intended by our Jewish housemate foremost as an accessible platform for Jewish cultural expression on campus that didn't have to entail Israel or religious beliefs. But even within organizations whose stated affiliations seem more guaranteed lie a diversity of opinions: I have been told that participants in Hillel's programming hold a range of opinions on Israel, some more publicly expressed, even if the organization itself has obligations to specific positions. Organizations might bear political inflections, but occasions of cultural expression invite disentanglement. The Cornell Chinese Student's Association's Mid-Autumn festival last Friday included Cornell Taiwanese American Society. While the various organizations' identities could have me recognize this as an act of cultural unity across political differences, I could also opt to not politicize a non-political organization on its behalf at all and view all festival celebrants simply as people.
Sure, there are instances where it is not an external voice, but a prominent internal voice, that politicizes cultural expression. But actions are reactions, and these strike me as a litmus test for the level of politicization in dominant discourse more broadly. They make me listen more carefully when peers note how America's growing criticisms of China's moral character coincide with the threat of her growing economy, for example. Politically-motivated images that redefine a culture on its behalf naturally invite a similarly political voice from said culture. It's less easy to criticize a community's decision to create politically-motivated holidays, or politicize an existing holiday if aggressors choose occasions as sacred as Easter for bombings, or Yom Kippur for a mass shooting.
The voice that uses mooncakes as an instrument of protest in Hong Kong should be recognized equal alongside the voice that sees Mid-Autumn festival, an occasion of family unity, as a non-political opportunity to culturally unite a diaspora. Just as my brother references a variety of news agencies in understanding an issue, I hope to have as ready an access to variegated self-definitions of culture, political or otherwise.
Kristi Lim is a junior in the College of Arts and Sciences. She can be reached at [email protected] Riskit Kristi runs every other Wednesday this semester.
Cornell Rings in Jewish New Year With In-Person Meals, Services
By Vee Cipperman September 13, 2021
Students celebrated Rosh Hashanah from the evening of Sept. 6 though Sept. 8 with services, meals and gatherings — all slightly modified to fit the ongoing pandemic, but much closer to tradition than last year's.
ROSENBAND | May Her Memory Be A Revolution
By Odeya Rosenband September 21, 2020
On the night of Sept. 18 the world lost a shining light and a bulwark of our democracy with the passing of Supreme Court Justice Ruth Bader Ginsburg '54.


text:
"""Tests for gcp module."""

from absl.testing import absltest

from tensorflow_cloud.core import gcp
from tensorflow_cloud.core import machine_config

class TestGcp(absltest.TestCase):

    def test_get_region(self):
        assert gcp.get_region() == "us-central1"

    def test_get_accelerator_type(self):
        assert gcp.get_accelerator_type("CPU") == "ACCELERATOR_TYPE_UNSPECIFIED"
        assert gcp.get_accelerator_type("K80") == "NVIDIA_TESLA_K80"
        assert gcp.get_accelerator_type("P100") == "NVIDIA_TESLA_P100"
        assert gcp.get_accelerator_type("V100") == "NVIDIA_TESLA_V100"
        assert gcp.get_accelerator_type("P4") == "NVIDIA_TESLA_P4"
        assert gcp.get_accelerator_type("T4") == "NVIDIA_TESLA_T4"
        assert gcp.get_accelerator_type("TPU_V2") == "TPU_V2"
        assert gcp.get_accelerator_type("TPU_V3") == "TPU_V3"

    def test_get_machine_type(self):
        assert (
            gcp.get_machine_type(4, 15,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-standard-4"
        )
        assert (
            gcp.get_machine_type(8, 30,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-standard-8"
        )
        assert (
            gcp.get_machine_type(16, 60,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-standard-16"
        )
        assert (
            gcp.get_machine_type(32, 120,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-standard-32"
        )
        assert (
            gcp.get_machine_type(64, 240,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-standard-64"
        )
        assert (
            gcp.get_machine_type(96, 360,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-standard-96"
        )
        assert (
            gcp.get_machine_type(2, 13,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-highmem-2"
        )
        assert (
            gcp.get_machine_type(4, 26,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-highmem-4"
        )
        assert (
            gcp.get_machine_type(8, 52,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-highmem-8"
        )
        assert (
            gcp.get_machine_type(16, 104,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-highmem-16"
        )
        assert (
            gcp.get_machine_type(32, 208,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-highmem-32"
        )
        assert (
            gcp.get_machine_type(64, 416,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-highmem-64"
        )
        assert (
            gcp.get_machine_type(96, 624,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-highmem-96"
        )
        assert (
            gcp.get_machine_type(16, 14.4,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-highcpu-16"
        )
        assert (
            gcp.get_machine_type(32, 28.8,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-highcpu-32"
        )
        assert (
            gcp.get_machine_type(
                64, 57.6, machine_config.AcceleratorType.NO_ACCELERATOR
            )
            == "n1-highcpu-64"
        )
        assert (
            gcp.get_machine_type(96, 86.4,
                                 machine_config.AcceleratorType.NO_ACCELERATOR)
            == "n1-highcpu-96"
        )
        assert (
            gcp.get_machine_type(96, 86.4,
                                 machine_config.AcceleratorType.TPU_V3)
            == "cloud_tpu"
        )
        assert (
            gcp.get_machine_type(96, 86.4,
                                 machine_config.AcceleratorType.TPU_V2)
            == "cloud_tpu"
        )

    def test_get_cloud_tpu_supported_tf_versions(self):
        self.assertListEqual(gcp.get_cloud_tpu_supported_tf_versions(), ["2.1"])

    def test_validate_machine_configuration(self):
        # valid GPU config
        gcp.validate_machine_configuration(
            4, 15, machine_config.AcceleratorType.NVIDIA_TESLA_K80, 4
        )

        # valid TPU config
        gcp.validate_machine_configuration(
            4, 15, machine_config.AcceleratorType.TPU_V3, 8
        )

        # test invalid config
        with self.assertRaisesRegex(ValueError,
                                    r"Invalid machine configuration"):
            gcp.validate_machine_configuration(
                1, 15, machine_config.AcceleratorType.NVIDIA_TESLA_K80, 4
            )

    def test_validate_invalid_job_label(self):
        with self.assertRaisesRegex(ValueError, r"Invalid job labels"):
            # must start with lower case
            gcp.validate_job_labels(job_labels={"": ""},)

        with self.assertRaisesRegex(ValueError, r"Invalid job labels"):
            # must start with lower case
            gcp.validate_job_labels(job_labels={"test": "-label"})

        with self.assertRaisesRegex(ValueError, r"Invalid job labels"):
            # must start with lower case
            gcp.validate_job_labels(job_labels={"Test": "label"})

        with self.assertRaisesRegex(ValueError, r"Invalid job labels"):
            # no upper case
            gcp.validate_job_labels(job_labels={"test": "labelA"})

        with self.assertRaisesRegex(ValueError, r"Invalid job labels"):
            # no symbol
            gcp.validate_job_labels(job_labels={"test": "label@"})

        with self.assertRaisesRegex(ValueError, r"Invalid job labels"):
            # label cannot be too long
            gcp.validate_job_labels(job_labels={"test": "a" * 64})

        with self.assertRaisesRegex(ValueError, r"Invalid job labels"):
            # label cannot be too many
            gcp.validate_job_labels(
                job_labels={"key{}".format(i):
                            "val{}".format(i) for i in range(65)}
            )

    def testValidateServiceAccount_NotEndWithCorrectDomain_RaisesValueError(
        self):
        with self.assertRaisesRegex(ValueError, r"Invalid service_account"):
            # must end with .iam.gserviceaccount.com
            gcp.validate_service_account(
                "test_sa_name@test-project.wrong_domain.com")

    def testValidateServiceAccount_ShortProjectId_RaisesValueError(self):
        with self.assertRaisesRegex(ValueError, r"Invalid service_account"):
            # Project id must be greater than 6 characters
            short_project_id = "a" * 5
            gcp.validate_service_account(
                f"test_sa_name@{short_project_id}.iam.gserviceaccount.com")

    def testValidateServiceAccount_LongProjectId_RaisesValueError(self):
        with self.assertRaisesRegex(ValueError, r"Invalid service_account"):
            # Project id must be less than 30 characters
            long_project_id = "a" * 31
            gcp.validate_service_account(
                f"test_sa_name@{long_project_id}.iam.gserviceaccount.com")

    def testValidateServiceAccount_ProjectIdWithDot_RaisesValueError(self):
        with self.assertRaisesRegex(ValueError, r"Invalid service_account"):
            # Project id can not contain .
            gcp.validate_service_account(
                "test_sa_name@test.projectid.iam.gserviceaccount.com")

    def testValidateServiceAccount_ProjectIdWithUnderScore_RaisesValueError(
        self):
        with self.assertRaisesRegex(ValueError, r"Invalid service_account"):
            # Project id can not contain _
            gcp.validate_service_account(
                "test_sa_name@test_projectid.iam.gserviceaccount.com")

if __name__ == "__main__":
    absltest.main()


Steven visited GIGABYTE's Taipei 101 product suite last week at Computex Taipei 2017 and reports back with what he saw.
GIGABYTE always goes big when it comes to Computex; a gathering focused on computer technology based in their home country of Taiwan. Every year we fly over to the technology-centric island-country to get a firsthand account of the latest and greatest hardware directly from the source.
Computex is where you find unreleased hardware and booth girls. During our Facebook live stream of GIGABYTE's suite, most of our readers liked the model in GIGABYTE's suite a lot, so I made sure to deliver after the video, and here is the picture in case you missed it!
Many people were shocked to see X399 AMD ThreadRipper motherboards in the flesh, and so was I. On the day GIGABYTE was to display it in their suite, I snuck in and did a Facebook Live overview of the motherboard and took these pictures. X399 is AMD's soon to be released platform, but it is not coming anytime soon, so the real focus of the show was X299, with vendors showing just a single X399 motherboard each.
Taking a look at IO, we see a lot of slots and features. AMD claims Threadripper will have 64 PCI-E lanes from the CPU, we hope that is true, and the number of M.2 slots and PCI-E slots are very high, so hopefully that number will stay true when the products launch. The X399 Gaming 7 features many PCI-E slots and could possibly support 4-way SLI/CrossFireX. The motherboard has updated audio, three M.2 slots, overclocking features, and some really killer aesthetics.
A new feature I have only seen on GIGABYTE motherboards this round is digital RGB headers. These are also found on GIGABYTE's X299 motherboards, and they complement the typical RGBW headers we see on GIGABYTE motherboards. Digital RGB Headers allow the controller to address individual LEDs, so you can do some cool RGB LED tricks, and the effects are actually quite impressive. It is also a three-wire protocol; voltage, data, and ground.
Taking a look at a platform that will launch much sooner than the X399 platform, GIGABYTE's top X299 motherboard is the X399-Gaming 9, which offers a slew of features and aesthetics. Turn off the many RGB LEDs built into the motherboard and you get an almost black motherboard, so those who love RGB LEDs and those who hate them will both be happy. On the Gaming 9, each of the M.2 slots gets a metal heat sink with a thermal pad, and it's easy to use and install as it holds the M.2 screw in place, so you won't lose it.
The Gaming 9 also features the digital RGB LED header, but it offers a special header that supports both 5v and 12v digital RGB LEDs, so GIGABYTE adds a special splitter so you can use either.
The back of the motherboard features a metal bracket that adds weight to the motherboard and should ensure the PCB stays straight. GIGABYTE has even integrated the IO panel into the rear IO, something some users had requested.


text:
U.S. Virgin Islands competed at the 2019 World Athletics Championships in Doha, Qatar, from 27 September–6 October 2019. U.S. Virgin Islands had entered 1 athlete.

Result

Men
Track and road events

References

External links
Doha|WCH 19|World Athletics

2019 in United States Virgin Islands sports
U.S. Virgin Islands
2019