text:
.. _ug_task_passwords_passwordstore_ex1:

Example 1: Update passwords or create them if do not exist
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Let's start with no passwords stored in `passwordstore <single:
password; passwordstore>` for users at host *test_01*. The command
shows no results

.. code-block:: YAML
   :emphasize-lines: 1

   shell> pass test_01

Create a playbook

.. code-block:: YAML
   :emphasize-lines: 1

   shell> cat lp.yml
   - hosts: test_01
     become: true
     roles:
       - vbotka.linux_postinstall

Create *host_vars/test_01/lp-users.yml* with two users *user1* and
*user2*

.. code-block:: YAML
   :emphasize-lines: 1

    shell> cat host_vars/test_01/lp-users.yml
    lp_users:
      - {name: user1, shell: /bin/sh}
      - {name: user2, shell: /bin/bash}
      - {name: user3, shell: /bin/bash, disabled_password: true}

.. note::
   * If `disabled_password` is set *true (default: false)* the
     password won't be created, but login is still possible (for
     example with SSH RSA keys).

Create users. This step will create the users and configure
their login shell. Other parameters of the Ansible module `user
<https://docs.ansible.com/ansible/latest/modules/user_module.html>`_
will be omitted because the only required parameter is *name*. It's a
good idea to create one account with the login shell */bin/sh* and use
it as Ansible `remote_user
<https://docs.ansible.com/ansible/latest/user_guide/connection_details.html#setting-a-remote-user>`_.

.. code-block:: YAML
   :emphasize-lines: 1

    shell> ansible-playbook lp.yml -t lp_users
    ...
    TASK [vbotka.linux_postinstall : users: Manage user accounts] *********
    changed: [test_01] => (item=user1)
    changed: [test_01] => (item=user2)

Create *host_vars/test_01/lp-passwords.yml*

.. code-block:: YAML
   :emphasize-lines: 1

    shell> cat host_vars/test_01/lp-passwords.yml
    lp_passwords: true
    lp_passwordstore: true
    lp_passwordstore_create: false
    lp_passwordstore_overwrite: false

Create passwords. This step will use *passwordstore* to create the
passwords and configure them. New passwords will be created only if
allowed by the configuration of *lp_passwordstore_create*. We set this
variable to *True* in this command but keep it *False* in the
configuration to keep the passwords once created. The value of
*lp_passwordstore_overwrite* is *False*. New passwords will be
assigned to the users if no passwords have been assigned to the users
before. To change the passwords in the future set both variables
*True* on the command-line.

.. code-block:: YAML
   :emphasize-lines: 1-2

   shell> ansible-playbook lp.yml -t lp_passwords \
                                  -e lp_passwordstore_create=True
   ...

   TASK [vbotka.ansible_lib : al_pws_user_host: Retrieve, create or update ...]
   ok: [test_01] => (item=user1)
   ok: [test_01] => (item=user2)
   ...
   TASK [vbotka.linux_postinstall : users: Manage user accounts] **********
   changed: [test_01] => (item=user1)
   changed: [test_01] => (item=user2)

The command is `idempotent`

.. code-block:: Bash
   :emphasize-lines: 1

   shell> ansible-playbook lp.yml -t lp_passwords
   ...
   PLAY RECAP *************************************************************
   test_01: ok=18 changed=0 unreachable=0 failed=0 skipped=20 rescued=0 ...

Show the passwords stored in *passwordstore* at the controller

.. code-block:: Bash
   :emphasize-lines: 1,6,10

   shell> pass test_01
   test_01
   ├── user1
   └── user2

   shell> pass test_01/user1
   1rLy0eVpJiTpzj-4
   lookup_pass: First generated by ansible on 01/07/2020 16:59:00

   shell> pass test_01/user2
   u4FLTCkKOHAyJxkg
   lookup_pass: First generated by ansible on 01/07/2020 16:59:00

Show the *passwordstore* log at the controller

.. code-block:: Bash
   :emphasize-lines: 1,2

   shell> cd ~/.password-store
   shell> git log

   commit 61bb8bcd7c2a359f53c8b3d4bacb8854b4dd9f89 (HEAD -> master)
   Author: Vladimir Botka <vbotka@gmail.com>
   Date:   Wed Jul 1 16:59:00 2020 +0200

       Add given password for test_01/user2 to store.

   commit 97b23a5221e721fb892d739b2817923a6db8614b
   Author: Vladimir Botka <vbotka@gmail.com>
   Date:   Wed Jul 1 16:59:00 2020 +0200

       Add given password for test_01/user1 to store.

Show the created users at the remote host

.. code-block:: Bash
   :emphasize-lines: 1

   test_01> grep user /etc/passwd
   user1:x:1003:1003::/home/user1:/bin/sh
   user2:x:1004:1004::/home/user2:/bin/bash

redpajama_set_name: RedPajamaGithub


3.5 years after registration as a CDM Project with the UNFCCC, the Bagepalli Biogas CDM project got registered as Gold Standard Project on 22 July 2009. Please see https://gs1.apx.com/mymodule/ProjectDoc/EditProjectDoc.asp?id1=410 for details. It was certified that emission reductions generated from this CDM Project are not only real and verifiable, but also make measurable contribution to sustainable development of the poor and benefit their communities.
Replacing traditional cook stoves with biogas has eliminated indoor air pollution and has improved the health of women and children.
Converting dung to slurry, a large number of bacteria are destroyed, thus decreasing pathogen loads.
Viogas slurry manure is far superior to farm yard manure in respect of NPK contents. It reduced the use of chemical fertilizers and increases crop production.
The project activity reduces pressure on natural forests and common property resources, thus arresting degradation of forests and deforestation and leading habitat conservation.
The Project has created job opportunities to local communities.
The use of biogas as a cooking fuel brings an improvement in the overall quality of life in many ways for End User families as a whole, and women in particular. The project has reduced drudgery of women and children. Women have easy access to energy at the turn of a knob, while earlier they faced severe hardship to collect fuel wood on a weekly basis, and get kerosene through the public distribution system once a month.
Benefits are in terms of time saved in fuel procurement and cooking, improved kitchens and convenience, and reduction of drudgery of transporting fuel wood to the homesteads. Since the time saved is used to take up an additional economic activity and earn a little, or to look after their children. Thus the project has resulted in social, environmental and economic development for local communities.


text:
'I crave social contact' – How has loneliness in lockdown been affecting young people?
By Reemul Balla
August 10 2020, 14.25
"Loneliness is difficult to explain. It feels like my head is a warzone of emotions. Questioning myself all the time…Why am I not like other people?"
Ben Cromack, a 20-year-old media student at Nottingham Trent University, says his battle with loneliness has been fraught with anxiety and self-criticism.
As someone who felt insecure and lacking in self-confidence during his teenage years, Ben retracted to speaking only to his family and a couple of his very close friends.
"When I talk to people, I often feel distant. I can't bond or feel comfortable with them. The more I think about it, I've never felt comfortable in myself.
"This was especially the case whilst attending secondary school. As someone who struggled with dyslexia, I overthought everything and felt like a failure," he said.
Lockdown was not a welcome call for Ben, as for many young people in the UK.
A study by the Office for National Statistics (ONS) from the April 3 to May 3 reported 50.8% of people aged 16-24 in the UK suffered from 'lockdown loneliness', compared to 24.1% of those aged 55-69 years.
According to the ONS, these figures echo previous research into chronic loneliness, which indicates the younger demographic were more likely to report loneliness than older age groups.
James (not his real name), 24, is a part time film student. He initially enjoyed the lockdown, but as time passed, staying at home took its toll.
"At first, the lockdown was a blessing for me. I was able to do my part-time course at home, meaning I had more time to cook, watch films on the list and relax, as opposed to commuting to the course centre during the week," he said.
James' motivation dwindled in the latter stages of lockdown and he found himself more and more inclined to do nothing with his days.
"There was not as much pressure on me to complete tasks from my film course and I couldn't see my classmates either. I'd put off reading or watching a film until the day after," he said.
"As we know, tomorrow never comes, and soon I found myself lazing around in the lounge gambling on online casinos."
For James, the thrill of gambling was a past vice he aimed to distance himself from, but the claws of temptation were too much to resist as he spent endless hours playing cards online for a loss.
As lockdown has officially eased in the UK, both Ben and James are finding their feet and their friends.
Ben said: "I've transformed my mindset of being alone from negative to positive. I developed different coping strategies to deal with my anxiety like focused breathing and imagining myself to be in a safe place.
"Spending time with my family is also key, and I've seen my mates a couple of times already."
James admitted: "I'm still fluttering with gambling, but far less now. I can go out, have a socially distanced pint and a laugh with a couple of mates.
"That said, I crave social contact. Seeing others posting stories of themselves going out on Instagram when I'm at home makes me feel left out. But it's no one else's fault. I'm reaching out more to old friends and trying to meet up whenever possible."
For many, loneliness cannot be alleviated that easily and some people have nobody to speak to.
Lewis Baxter, 21, is a law student at Durham University. He is also the founder of Chit-Chat Britain, a national non-profit organisation that aims to 'connect the nation through conversation'.
"I came up with the idea on 21 March when the lockdown was imminent. People were going to be locked in for many months and stuck without conversation," Lewis said.
"There are mental helplines and counselling services out there, but there isn't a place for people of all backgrounds to just go for a chat."
Lewis stresses Chit-Chat Britain is not a mental health line nor has any link to the clinical field, and since its inauguration they have chatted to over 500 people.
Lewis expected people who felt socially isolated to predominantly call, but many calls came from university students or people who began to work from home for the first time and felt disconnected from their group of friends and colleagues.
"We pride ourselves on people being able to have a positive and uplifting conversation with us – whether it is about movies, music, sports, or the weather," Lewis said.
"There was one chap who lived alone who gave us a call. He played chess at a club once a week with people in his neighbourhood, but that completely stopped. He was left to play chess against the computer, which obviously isn't the same experience. In the end we spoke about chess for half an hour even though I don't play!
"The most startling thing was that he began the conversation with 'you're the first person I've spoken to in about three weeks'."
As social contact gradually becomes the norm once more, not everyone has someone to talk to or have a meaningful conversation with.
Lewis' aims for Chit-Chat is to get connected with more people regardless of the social climate.
"Our vision is to create a space where everyone has someone to talk to," he said.
The anonymous phone line is manned by 35 volunteers currently and runs from 9am to 9pm daily – 0333 002 0333.
Met Police launches internship scheme for London teenagers
anxietyconversationsCoronavirusHealthisolationlockdownLonelinessMental Healthsocial isolationsocial mediayoung people

redpajama_set_name: RedPajamaCommonCrawl


New 2015 Polaris Ranger Crew 900-6 EPS Sunset Red in Cleburne, TX ATVs for Sale Traded Price Of $16,299, 2015 Polaris Ranger Crew 900-6 EPS Sunset Red, FREIGHT AND ASSEMBLY NOT INCLUDED IN PRICE. 2015 Polaris® Ranger Crew® 900-6 EPS Sunset Red Hardest Working Features The ProStar® Engine Advantage The RANGER CREW® 900-6 ProStar engine is purpose built, tuned and designed alongside the vehicle resulting in an optimal balance of smooth, reliable power. The ProStar CREW 900 engine was developed with the ultimate combination of high power density, excellent fuel efficiency and ease of maintenance. On-Demand True All-Wheel Drive With the Polaris true AWD advantage, all four wheels engage automatically when your vehicle needs more forward traction and reverts back to 2WD when it doesn t. When in 2WD, the VersaTrac Turf Mode switch unlocks the rear differential for easier, tighter turns that won t tear up your lawn. Engine ManaGement System The engine manaGement system (EMS) delivers optimal torque and horsepower at all speeds and altitudes, plus smooth throttle at all speeds and reverse. The EMS, paired with the ProStar® engine and clutching advantage, also allows for optimal fuel economy. Class-leading Towing and Payload With a monstrous class-leading 2,000 lbs. towing capacity and standard 2 receiver, the RANGER CREW 900-6 allows you to tackle the toughest jobs with confidence. Additionally, a class-leading 1,750 lbs payload capacity is highlighted by a rear box with gas-assist dumping operation that can tote up to 1,000 lbs. of materials and a full-sized pallet. Smoothest Riding Features All-Day Riding Comfort We designed the RANGER CREW 900-6 with an ideal seat height combined with wide foot clearance for easy entry and exit. Plus, experience a plush seating with adjustable driver s seat, a full 10 inches of tilt steering adjustment and room for six adults. Electronic Power Steering The smoothest, most responsive electronic power steering available, with Variable Assist for easier steering at lower speeds. Our EPS lets you work and ride all day with less fatigue. Smooth and Robust Suspension A full 10 (25.4 cm) of Dual A-Arm suspension travel up front and 10 (25.4 cm) of Independent Rear Suspension travel keeps the ride smooth, even when hauling up to 1,750 lbs. (793.8 kg) of payload and towing up to a full ton! High Ground Clearance Polaris engineers designed the RANGER CREW 900-6 with a perfect balance of smooth riding, handling and turning radius from an ideal 113 (287 cm) wheelbase paired with 11.3 (28.7 cm) of ground clearance. Premium PXT Tires and Cast Aluminum Wheels Premium PXT tires mated to durable rolled steel wheels for ultimate traction and durability, on the farm, jobsite or trail to the Back Forty.,Update April/21/2019 Polaris ATVs for Sale Sales $16,299, 2015 Polaris Ranger Crew 900-6 EPS Sunset Red in Cleburne, TX ,Total N/A,You can choose Black,gray,red,white,Brand Launch Cleburne, TX it's here Polaris.com, Address: Freedom Powersports Cleburne, 1731 N Main St, Cleburne, TX 76033,Phone call:(855) 403-1073.


I visited six or seven houses in South Minneapolis during the 2008 Minneapolis/Saint Paul Home Tour-which has come and gone. The most interesting was the house that was remodeled—and the owners put in a geothermal heating and cooling system.
What are geothermal heating and cooling? I'm glad you asked. These days, people are more concerned about the environment. The typical forced-air heating/cooling system uses a lot of fuel as well as electricity in order to run. Logically, the more heat you use in the winter, the more fuel you need to burn.
Conversely, geothermal heating and cooling do not use any fuel at all because they draw on the heat and coolness of the earth, mostly via a geothermal heat pump and a loop—which is usually a vertical or horizontal loop. There is a liquid (coolant) that circulates throughout this pump. The pump runs on electricity. It heats the coolant in the winter and cools it in the summer, with no use of fuel. The heat is put back into the earth in the summer and drawn from the earth in the winter, banking on the earth's constant temperature of around 50 degrees to disperse the heat easily in summer (rather than trying to disperse 90 degree heat in 80 degree air). In the winter, it draws five degree of heat from the earth's core, and the compressor takes that five degrees and expands it to as much as 165 degrees to heat your house.
I know, it's a lot to take in, but all you need to know is that it will lower your heating and cooling bills by quite a bit. The system is not cheap in the beginning . It will cost anywhere from $12,000 to $18,000 to install depending on the size of your house, but the system will eventually pay for itself, and it will leave the earth a better place, too.


Line following robot is an autonomous robot which detects and follows the black line drawn on the floor.
It uses L293 motor driver and 2 IR sensor so it doesn't require any mocro-controller hence no coding/programming required.
Its very easy and fun to build this robot. Its attractive design and color combination makes it more beautiful.
You get everything in ready to use format. Your student just need to build, plug and play this amazing robot.
The kit includes everything you need to conduct your designing session. Its a Plug and play type kit. Motors are pre-soldered and all the components are packed in box for easy distribution among your students/groups/teams.


In mid-2011, the Ministry of Economic Development and Innovation, Ministry of Citizenship and Immigration, and Ministry of Children and Youth Services contracted Ontario Centres of Excellence (OCE) to create and deliver a pilot program that represents a new area of focus at OCE: Social Innovation.
Social Innovation is about new ideas, products, services, and processes that address tough social and environmental challenges. OCE's Social Innovation Program builds new and enhances existing partnerships between industry, not-for-profit, social entrepreneurs and academic partners. The program is designed to support these cross-sector partnerships in the development of innovative products, services, and business models that address unmet needs in the social and environmental space.
OCE worked closely with strategic partner SiG@MaRS and Pillar Nonprofit Network to launch the first Social Innovation Partnership Challenge forum. With over 50 attendees from industry, academia, not-for-profits, social enterprises and social purpose businesses, the forum was a great success. Over the course of one day, the cross-section of individuals in the social innovation space shared their insights, strengthened relationships and built new partnerships.
Participants across a variety sectors described the event as effective and necessary, allowing them the opportunity to collaborate with like-minded people they wouldn't have met otherwise. Participants found that while they came from different backgrounds, they shared similar goals of having a positive social and environmental impact and a need to address society's most pressing challenges.
The first forum resulted in proposals that touched on many health issues, including diabetes, cardiovascular health, food security, mental health, health services accessibility and pervasive developmental disorders. Stay tuned for the results of the call for proposals of the first Social Innovation Forum on Health Improvement in early 2012.
The next Social Innovation Partnership Challenge Forum on the Environment and Sustainability will be Feb. 29 in Guelph.
Later in 2012, the Social Innovation Program will debut its exciting student competition. Designed to launch the next generation of social entrepreneurs and provide support to students and recent graduates to start their own social enterprise, the student competition will challenge finalists to create a social enterprise plan and elevator pitch with an industry partner, providing them the real-world experience they need to contribute in the Social Innovation space. Awards will be presented at Discovery 12, May 14-15, 2012 in Toronto.


I almost never do things like this. I respect my doctors and other medical professionals immensely, but I am genuinely desperate. In October (about 5 months ago) I visited my PCP after feeling sickly for weeks on end. I had been having low-grade fevers on a daily basis, joint pain and general aches, and fatigue so bad I would sleep for 16 hours. My blood work came back with normal CBC, but positive for mono. I was given prednisone (which did nothing) and told I would feel better in a week or two. 5 months later, my symptoms have only gotten worse. With my fevers come a bright red butterfly shaped rash across my face, and I am often too sick to get out of bed. I visited the doctor once again, who agreed that the fevers were not likely caused by the mono I had five months ago. She thought there was a chance of an autoimmune condition, so tested my ANA, CRP, CBC, ESR, and for lyme (for good measure). Yet, every single test came back within the normal range. I had been treated for kidney pain recently as well, but all that showed up in my urine was a little protein and white blood cells (but not an amount too excessive). With having tested negative for lupus, lyme, and any sort of infection, I do not know what to think. My fevers have not subsided, and the rash on my face shows up a few times a week at least (it's not itchy, just hot). I also continuously break out in hives, despite having had allergy testing (not sure if this is related). If I don't have an autoimmune condition, lyme, mono, or any infection, why on earth am I feeling so sick and what can I do to feel better? I feel like I have tried everything, and I eat and exercise well. Even pain meds do a poor job of relieving my symptoms. If anyone has any ideas on what I can do to feel better or what the issue is, it would be greatly appreciated.
Can it be stress related? I'm experiencing weight loss, stiff neck and jerk like movements. All my tests have come back negative so far. I think I'll visit neurologist and ask for more tests. I don't know.
Maybe you should visit a psychologist to see whether it's stress related or not.


text:
Q: shell script looping in folder structure and excute shell script i've the following the folder stucrtre
/var/data/2017/01/$day/files
i want to excute shell script to for loop in the all months  / day and run shell script against  all files
DIR_PROC = /var/data/2017/01/$day/$file
for day  in  {1..30}   do
        echo "processing file  $file
        sh  /opt/myscript.sh   /var/data/2017/1/$day/$file

    done

i'm not sure about the logic here i missed the file listing how i can get it
any advise here

A: dir_proc=/var/data/2017/01
# maybe {1..31} because month can have 31 days
for day in {1..30}; do
    # check directory exist || otherwise continue with next day
    [[ -e $dir_proc/$day ]] || continue
    for file in "$dir_proc/$day/"*; do
        # check file exist      || otherwise continue with next file
        [[ -e $file ]] || continue
        # do something with "$file"
    done
done

EDIT with months:
dir_proc=/var/data/2017
for month in {01..12}; do
    for day in {01..31}; do
        # check directory exist || otherwise continue with next day
        [[ -e $dir_proc/$month/$day ]] || continue
        for file in "$dir_proc/$month/$day/"*; do
            # check file exist      || otherwise continue with next file
            [[ -e $file ]] || continue
            # do something with "$file"
        done
    done
done

Or shorter, with one for
dir_proc=/var/data/2017
for month_day in {01..12}/{01..31}; do
    # check directory exist || otherwise continue with next day
    [[ -e $dir_proc/${month_day} ]] || continue
    for file in "$dir_proc/${month_day}/"*; do
        # check file exist      || otherwise continue with next file
        [[ -e $file ]] || continue
        # do something with "$file"
    done
done

A: If you want to run the script for all files in the directory structure, just use find:
find /var/data/2017/01 -type f -exec sh /opt/myscript.sh {} \;

Or with the Processing... lines (with GNU find):
find /var/data/2017/01 -type f -printf "Processing %p\n" -exec sh /opt/myscript.sh {} \;

If you only want to run on some subdirectories in the tree, you'll need to use -path or -name and -prune to limit the matches.

redpajama_set_name: RedPajamaStackExchange


These guys are really tight and well rehearsed as a band. Individually they all put in great performances too. As you can tell we were really pleased we chose them. We had lots of comments from our guests asking where we found the band and had sore feet from dancing at the end of the night. If you like soul and soulful music, this is the band you want. Live they're as good as their linked demos.
So many things to say about this band Completely took our entire wedding by surprise with the quality of music they produce, by the neatness of every member and the fact they were on par with everything we had asked for. Honestly couldn't have asked for a better band on the day!!! Several of guests will be in touch soon as they want you to play at theirs as well. To all from Funk The Revolution that made last night what it was, We thank you. Kyle & Julia Hiener.
We booked Funk The Revolution for our wedding in Leatherhead through Alive Network, The only way we could see them in action was through the website. While they were great on these videos, we were still a little nervous about how they would shape up live. We needn't have been! The band were absolutely fantastic. They were discretion itself on the big day, arriving promptly, setting up and sound-checking without any fuss. Their sets were superb, filling the dance floor for the full 2 hours. The band were warm and welcoming and all members took the time to congratulate us. I can't recommend Funk The Revolution highly enough. The live music was one of the biggest financial outlays on our wedding day, so we were nervous about our guests enjoying it, but they were worth every penny. Loads of our guests were raving about them afterwards, and they even got my 83 year-old gran dancing. High praise indeed!
Fun and great band with top sounding musicians. Everyone loved their music and were hugely impressed, good stage presence too. The communication ahead of the event. They play an array of classics with some contemporary to suit all our guests musical tastes.
The band were very easy and professional from the moment we sent them our first email. They promptly answered all concerns that we had and did not make us feel like we were asking too many. What a great performance, If you want your guests to dance all night book Funk The Revolution.
The wonderful Funk The Revolution recently played at our wedding and were truly spectacular. So many guests commented how amazing they were - we would recommend them in a heart beat. Nothing was too much trouble and how many bands let the groom up to take the stage and drum one of the songs with the master of ceremonies on the mic!? A memory we will never forget! We absolutely loved them at our wedding and are so truly grateful that they played a part in our big day!
We just want to say a massive thank you to the band. You guys were brilliant and everyone said how amazing you were. We certainly hope to have the opportunity to use you guys again, maybe my 40th in a couple of years!
You guys were amazing. Thank you for the best night of our lives and hope to see you at some of our friends future events.
Funk the Revolution were absolutely amazing! We asked them to learn and perform our first dance, a song they'd never done before, and they did an incredible job we loved it! Us and our guests had such a great party to the soulful sound and upbeat vibes they bought to the evening. The band are really friendly and love interacting with guests. Very happy and would highly recommend!
Thank you so much for such an amazing evening. We could not of asked for a better band to play at our wedding. Our guests were so impressed. What a blinding performance guys.


* A genuinely educational experience - all lessons, activities and visits have a linguistic and cultural purpose, as well as being enjoyable.
* UK teenagers act as Teaching Assistants enabling students to meet local young people of a similar age.
* The maximum class size is 16.
* Students are tested before being placed in classes with students of a similar language level.
* Placement is kept under review, ensuring that each student is in the most appropriate group.
* The latest Cambridge University Press course books are used for each level, together with specially selected materials relevant to the age and interests of the students.
* Attention is paid to accuracy as well as fluency, and help is offered when grammatical difficulties arise.
* Classroom activities such as role-plays, simulations and language games give students practice in communicative language skills.
* Language connected to excursions is introduced and followed up in the classroom.
* Students take home a work file as a permanent record of course achievement.
* An Attendance Certificate and a detailed record of achievement are provided for all students on course completion.


text:
using System;
using NUnit.Framework;

namespace Katas.UnitTests
{
    [TestFixture]
    public class CalculatorShould
    {
        [TestCase( "", 0 )]
        [TestCase( "13", 13 )]
        [TestCase( "1,2", 3 )]
        [TestCase( "1,2,3", 6 )]
        [TestCase( "1,2,3,4,5,6,7", 28 )]
        [TestCase( "1\n2,3", 6 )]
        public void return_the_sum_of_all_given_numbers( string numbers, int expected )
        {
            var calculator = new Calculator();

            var result = calculator.Add( numbers );

            Assert.That( result, Is.EqualTo( expected ) );
        }

        [Test]
        public void throw_argument_exception_when_the_input_is_words()
        {
            var calculator = new Calculator();

            Assert.That( () => calculator.Add( "FOURTY TWO" ), Throws.Exception.InstanceOf<ArgumentException>() );
        }

        [Test]
        public void throw_argument_exception_when_the_input_contains_nothing_between_two_seperators()
        {
            var calculator = new Calculator();

            Assert.That( () => calculator.Add( "1,\n2,3" ), Throws.Exception.InstanceOf<ArgumentException>() );
        }

        [TestCase( "//;\n1;2", 3 )]
        public void return_the_sum_of_all_given_numbers_separated_by_a_custom_delimiter( string numbers, int expected )
        {
            var calculator = new Calculator();

            var result = calculator.Add( numbers );

            Assert.That( result, Is.EqualTo( expected ) );
        }

    }

}


text:
Tag Archives: Madre de Dios
Environment Mongabay: Government takedown of illegal gold mining in Peru shows promise, but at a cost
This drone shot of La Pampa in Madre de Dios shows the widespread environmental devastation from alluvial goal mining. A few years ago, that area was entirely dense jungle. In the middle of the photo are military outposts, Peru's unprecedented attempt to reduce gold mining in one of the most notorious regions for such illegal extraction on earth. Photo by Jorge Caballero Espejo/CINCIA
Because of widespread media attention over the past five years or more — who can resist a story that combines gold, organized crime, prostitution and environmental devastation of a pristine rain forest? — Madre de Dios in the southern Peruvian Amazon has become known worldwide as a kind of hell on earth.
But as my story for Mongbay explains, a lot can happen in a year. La Pampa, the worst but by no means only large-scale illegal mining operation, was raided and largely shut down by the national government in February 2019. And the previous month, Madre de Dios — a region about the size of South Carolina known as the most biodiverse place on earth — elected a governor who wasn't a miner. Instead, Luis Hidalgo Okimura is intent on reducing mining, formalizing and taxing miners who remain, and rescuing his home region from further environmental destruction.
I got to interview Hidalgo with three of my students in his government conference room not far from our hotel in Puerto Maldonado. After an hour and a half, I knew I had the makings of a good story. Specials thanks to my colleague Cesar Ascorra, national director of CINCIA, for arranging the interview. CINCIA is a Wake Forest-led science project that has developed proven strategies to repair deforested tropical areas and mitigate the public health threat of 185 tons of mercury dumped a year in Madre de Dios.
It was also a pleasure to work again with Mongabay editor Morgan Erikson-Davis. She not only accepted my story pitch, she enhanced the story by both downloading and analyzing satellite images that showed expanding deforestation outside La Pampa.
Riverside alluvial gold mining continues unhindered throughout Madre de Dios, especically along the Rio Inambari and Rio Malinowski. Photo by Jason Houston
This photo was taken by a member of Gov. Hidalgo's staff after our 90-minute interview with him. My friend and translator Marianne Van Vlaardingen is on the left, then Wake journalism minor Juliana Marino, me, Hidalgo, Cesar Ascorra, and Wake journalism minors Kat Boulton and Renting Cai.
This entry was posted in Environment and tagged Acre Brazil, Amazon basin, Amazonia, CINCIA, deforestation, Enrique Ortiz, indigenous peoples, Luis Hidalgo Okimura, Madre de Dios, mercury poisoning, Mongabay, Norway, Peru, Puerto Maldonado, Rain forest, World Wildlife Fund on August 10, 2019 by Justin Catanoso.
Environment Mongabay: In Peru, a new president is faced with old conservation challenges
A giant otter in Cashu Lake at Cocha Cashu Biological Station in Manu National Park, Peru. Photo by Jason Houston
In early May 2018, I called Mongabay special project editor Erik Hoffner with a vague idea. I would be spending six weeks in Peru between May 25 and July 5. Most of it would be in the Amazon, save for a week in Lima at the outset. I wanted to write a story that somehow captured the majesty of the Peruvian Amazon and what's at stake as climate change and assaults such as mining, timbering and extraction put large swaths of the rainforest at risk. I'd be working with environmental photographer Jason Houston.
"I don't exactly know what I'll come up with, but I think we have a shot at something unique and interesting." Erik was familiar with Jason's extraordinary photography. He said, in essence, go for it.
We did. Here's the result.
And an excerpt: Eavesdropping on nature from above is an unparalleled thrill. Even more thrilling is understanding the interconnectedness of the forest below, and everything in it; the mutual support and subtle language of various species that keep the forest thriving. Every living thing has a role to play, and it all adds up to provide ecosystem services such as carbon sequestration and cloud production that the developed world depends on, whether we know it or not.
The story turns on a simple premise: A new Peruvian president took power in Lima in April 2018 after the fourth consecutive president had been felled by corruption and scandal. Each promised to protect the Amazon, seeing sweeping environmental laws passed. Yet with only sporadic enforcement in limited areas, Peru has some of Latin America's highest rates of deforestation. Much is at stake for biodiversity and the health of the planet. That's the story Jason and I sought to tell in both my words and his powerful photos. Special thanks to Mongabay editor Genevieve Belmaker for her careful editing and layout.
This gigantic mahogany is Cocha Cashu is a rich target for illegal timbering. That's me in the background. Photo by Jason Houston
This entry was posted in Environment and tagged Andes Amazon Fund, biodiversity, Climate change, Gabriel Quijandaria, Green Climate Fund, Jason Houston, Los Amigos Biological Concession, Madre de Dios, Manu National Park, Martin Vizcarra, Miles Silman, Mongabay, Pedro Pablo Kuczynski, Peru on August 5, 2018 by Justin Catanoso.
Environment Mongabay: Peru's new environmental policies: What are they and will they work?
The reality of illegal gold mining: total environmental devastation in the Peruvian Amazon. Photo by Rhett Butler of Mongabay.com
In the waning days of President Ollanta Humala's administration in July 2016, Peru's National Congress approved a set of innovative climate change-related policies designed to reduce deforestation, protect watersheds and biodiversity, and provide the tools needed to leverage international investment through UN programs such as REDD+ and the Green Climate Fund.
But a new administration has taken over and lawlessness is often the rule in the Amazon basin. My story for Mongabay.com looks at the new policies and the challenges for implementation. First time with with Mongabay editor Morgan Erickson-Davis, who did a great job with my story.
This entry was posted in Environment and tagged Amazon basin, Climate change, Gena Gammie, global warming, Green Climate Fund, Loreto, Madre de Dios, Manuel Pulgar-Vidal, Michael Jenkins, mongabay.com, Morgan Erickson-Davis, Peru, Rain forest, REDD on August 6, 2016 by Justin Catanoso.


text:
Paly welcomes several new staff members
Paly welcomes new staff members to campus
Emma Todd
Tracey Atkinson,
Visual Arts teacher
isual Arts teacher Tracey Atkinson has loved art as long as she could remember.
"Helping students to find ways to express themselves and gain confidence in their abilities to think creatively is very rewarding," Atkinson said.
Atkinson taught art in Pennsylvania and then at Santa Clara High School. A reason she wanted to teach at Paly was because she believes in the school's values.
"Both encouraging creativity and independent thinking, and fostering growth and learning as an essential part of life are both important to me," Atkinson said. In addition to loving drawing, painting and creating digital art, the artistic Atkinson loves traveling.
Clarisse Haxton,
ssistant Principal Clarisse Haxton grew up on Guam. Her dad was Chamorro, Japanese and Filipino, and her mom was white.
"Growing up multiracial taught me to appreciate multiple perspectives and to care about getting to know people as individuals," Haxton said.
Before coming to Paly, she worked in District Office as a program evaluation coordinator .
"I enjoyed my role at the District Office but missed being at a school and working with teachers and students every day," Haxton said. "I am excited to grow and make an impact at Paly, working with the leadership team, teachers and students to create systems that support equity and excellence on our campus."
Laura Heslop,
Science Dept.
efore coming to California, teacher Laura Heslop lived on Oahu for two years and majored in Dance Performance in college. "I teach biology, and I enjoy teaching this subject because it is exciting to guide students through understanding life and phenomena that surround us," Heslop said. "I was thrilled to return to PAUSD after completing my master's degree, as I greatly enjoyed the students, colleagues, and families I previously worked with in the district." Heslop also previously taught at Greene Middle and Gunn High School.
Jonathan Kessler, P.E. Dept.
onathan Kessler splits his time working at Paly as a wrestling coach and teaching zero period PE class with being a PE teacher at Addison Elementary. Kessler began as a Paly wrestling coach in 2015.
"Luckily the next year kindergarten opened up to a full day and there was a need for an elementary PE teacher," Kessler said. "I received the position and it's been an amazing experience." Before working at Paly and Addison, he worked for 1 year as an elementary PE specialist in the San Francisco Unified School District.
Michael Mishali, Science teacher
ichael Mishali taught at Greene Middle School from 2013-2017 before coming to Paly.
"I know chemistry can be really heady and nuanced, but I think it's fascinating. I hope that I can help kids feel successful and interested in Chemistry," said Mishali. "Of course I find the content itself to be interesting, but I like that I can (hopefully) be a part of a kid's positive educational story, a story in which that student feels good about themselves as a person and a student in science class."
Mishali compared high schoolers and middle schoolers.
"Like middle schoolers, high schoolers are complex and interesting, but because they're older, we get to have different, bigger, deeper conversations about life and science; I think that's really special."
Sheila Morrissey, Science Dept.:
long with many other teachers, physics teacher Sheila Morrissey taught at Greene last year. "It's been fun to see some of my former students at Paly," said Morrissey. Growing up in going to the Palo Alto schools, she has always enjoyed learning about the natural sciences. "I came to Paly because I enjoy working with our community. "The students, teachers, aides, custodial staff, counselors, administration, tech team-everyone- has been so welcoming."
Caterina Porcella, World Lang. Dept:
he first time Caterina Porcella ever learned Spanish was in 7th grade when she attended Greene middle school, where she would end up teaching there for 14 years.
"I remember the first time I understood something in Spanish back in Ms. Bryson's Spanish 1A class," Porcella said. "I was very excited that I could say and understand something in Spanish."
Porcella attended both Paly and Greene when she was a student. Porcella also loves traveling and learning about other cultures with different culinary traditions.
She started teaching at Paly due a shift in the number of students at Greene and Paly.
"I wanted to work only 60% because I was also taking care of my elderly mother and Paly had a 60% Spanish position so I was transferred over to Paly," said Porcella.
Kelly Slaughter, English:
efore teaching at Paly, Kelly Slaughter taught 7th grade at Fletcher Middle School. She loves teaching English because of the creativity that comes with Project Based Learning.
"I wanted to grow professionally and Paly's English department is well received in our community," Slaughter said when asked about her reasons for coming to teach in Palo Alto. "Also ," she said, "the students are simply amazing."
She has two daughters at home, Sophia and Bella. When she's not teaching, Slaughter likes to volunteer in schools. "I also am a Barry's Bootcamp Ambassador at the Stanford Mall," said Slaughter, enjoying pilates.
Jing Xu,
World Lang. Dept:
efore coming to work here, Xu taught in the Sequoia Unified High School District after graduating from the teacher education program at Stanford. Mandarin teacher Jin Xu is not only passionate about the language, but also the culture surrounding it.
"It's the language I speak and the culture I'm passionate about," said Xu. Besides teaching a language at Paly, Xu teaches vinyasa and restorative Yoga at Yoga Wave Cupertino. She also owns an electric unicycle and skateboard. Xu loves Paly because of the community. "I like the students, my lovely colleagues in the World Language Department, the friendly staff at school, and the convenient access of various yummy food and Boba across the street."
Editor's note: Two new staff members did not respond to our request for photos and/or interviews.
facultymembersnewstaffteachers
Teachers should return tests to promote learning from mistakes
New teachers elaborate on paths to Paly
Isabella Bian


text:
"""Test pysat Files object and code."""

import datetime as dt
import functools
from importlib import reload
from multiprocessing import Pool
import numpy as np
import os
import pandas as pds
import tempfile
import time

import pytest

import pysat
from pysat.instruments.methods.testing import create_files
import pysat.instruments.pysat_testing
from pysat.tests.classes.cls_ci import CICleanSetup

def create_dir(inst=None, temporary_file_list=False):
    """Create a temporary datset directory for a test instrument."""
    if inst is None:
        # create instrument
        inst = pysat.Instrument(platform='pysat', name='testing',
                                temporary_file_list=temporary_file_list,
                                update_files=True)

    # create data directories
    try:
        os.makedirs(inst.files.data_path)
    except OSError:
        # File already exists
        pass
    return

def list_files(tag=None, inst_id=None, data_path=None, format_str=None,
               version=False):
    """Return a Pandas Series of every file for chosen instrument data."""

    if format_str is None:
        if version:
            format_str = ''.join(('pysat_testing_junk_{year:04d}_{month:02d}_',
                                  '{day:03d}{hour:02d}{minute:02d}{second:02d}',
                                  '_stuff_{version:02d}_{revision:03d}_',
                                  '{cycle:02d}.pysat_testing_file'))
        else:
            format_str = ''.join(('pysat_testing_junk_{year:04d}_gold_',
                                  '{day:03d}_stuff_{month:02d}_{hour:02d}_',
                                  '{minute:02d}_{second:02d}.',
                                  'pysat_testing_file'))

    if tag is not None:
        if tag == '':
            return pysat.Files.from_os(data_path=data_path,
                                       format_str=format_str)
        else:
            raise ValueError('Unrecognized tag name')
    else:
        raise ValueError('A tag name must be passed ')
    return

class TestNoDataDir(object):
    """Test cases where data directory is not specified."""

    def setup(self):
        """Set up the unit test environment for each method."""
        self.temporary_file_list = False

        # Store the current pysat directory
        self.saved_data_path = pysat.params['data_dirs']

        pysat.params.data['data_dirs'] = []
        reload(pysat._files)
        return

    def teardown(self):
        """Clean up the unit test environment after each method."""
        pysat.params.data['data_dirs'] = self.saved_data_path
        reload(pysat._files)
        return

    def test_no_data_dir(self):
        """Test that error is raised if no data directory is specified."""
        with pytest.raises(NameError) as nerr:
            pysat.Instrument()
        assert str(nerr).find("Please set a top-level directory path") >= 0
        return

class TestBasics(object):
    """Unit tests for `pysat._files`."""

    def setup_class(self):
        """Initialize the testing setup once before all tests are run."""
        self.temporary_file_list = False
        self.version = False
        return

    def teardown_class(self):
        """Clean up class-level variables after all tests are run."""
        del self.temporary_file_list, self.version
        return

    def setup(self):
        """Set up the unit test environment for each method."""
        self.out = ''

        # Use a two-year as default.  Some tests will use custom ranges.
        self.start = dt.datetime(2008, 1, 1)
        self.stop = dt.datetime(2009, 12, 31)

        # Store current pysat directory
        self.data_paths = pysat.params['data_dirs']

        # Create temporary directory
        self.tempdir = tempfile.TemporaryDirectory()
        pysat.params['data_dirs'] = [self.tempdir.name]

        self.testInst = pysat.Instrument(
            inst_module=pysat.instruments.pysat_testing, clean_level='clean',
            temporary_file_list=self.temporary_file_list, update_files=True)

        # Create instrument directories in tempdir
        create_dir(self.testInst)
        return

    def teardown(self):
        """Clean up the unit test environment after each method."""
        pysat.params['data_dirs'] = self.data_paths
        self.tempdir.cleanup()
        del self.testInst, self.out, self.tempdir, self.start, self.stop
        return

    def test_basic_repr(self):
        """Test the standard `__repr__` output."""
        self.out = self.testInst.files.__repr__()
        assert isinstance(self.out, str)
        assert self.out.find("pysat.Files(") >= 0
        return

    def test_eval_repr(self):
        """Test that eval of repr recreates object."""
        # Evaluate __repr__ string
        self.out = eval(self.testInst.files.__repr__())

        # Confirm new Instrument equal to original
        assert self.out == self.testInst.files
        return

    def test_eval_repr_and_copy(self):
        """Test that eval of repr consistent with object copy."""
        # Evaluate __repr__ string
        self.out = eval(self.testInst.files.__repr__())

        # Get copy of original object
        second_out = self.testInst.files.copy()

        # Confirm new object equal to copy
        assert self.out == second_out

        return

    def test_basic_str(self):
        """Check for lines from each decision point in str."""
        self.out = self.testInst.files.__str__()
        assert isinstance(self.out, str)

        # Test basic file output
        assert self.out.find('Number of files') > 0

        # Test no files
        assert self.out.find('Date Range') > 0
        return

    def test_equality_with_copy(self):
        """Test that copy is the same as original."""
        # Create copy
        self.out = self.testInst.files.copy()

        # Confirm equal to original
        assert self.out == self.testInst.files
        return

    def test_equality_with_copy_with_data(self):
        """Test that copy is the same as original, loaded `inst.data`."""
        # Load data
        self.testInst.load(date=self.start, use_header=True)

        # Make copy
        self.out = self.testInst.files.copy()

        # Test for equality
        assert self.out == self.testInst.files
        return

    def test_inequality_modified_object(self):
        """Test that equality is false if other missing attributes."""
        # Copy files class
        self.out = self.testInst.files.copy()

        # Remove attribute
        del self.out.start_date

        # Confirm not equal
        assert self.testInst.files != self.out
        return

    def test_inequality_reduced_object(self):
        """Test that equality is false if self missing attributes."""
        self.out = self.testInst.files.copy()
        self.out.hi_there = 'hi'
        assert self.testInst.files != self.out
        return

    def test_inequality_different_data(self):
        """Test that equality is false if different data."""
        self.out = self.testInst.files.copy()
        self.out.files = pds.Series()
        assert self.out != self.testInst.files
        return

    def test_inequality_different_type(self):
        """Test that equality is false if different type."""
        assert self.testInst.files != self.testInst
        return

    def test_from_os_requires_data_path(self):
        """Check that path required for from_os."""
        with pytest.raises(ValueError) as verr:
            self.testInst.files.from_os()
        assert str(verr).find('Must supply instrument') > 0
        return

    def test_year_doy_files_directly_call_from_os(self):
        """Check that Files.from_os generates file list."""
        # create a bunch of files by year and doy
        root_fname = ''.join(('pysat_testing_junk_{year:04d}_gold_',
                              '{day:03d}_stuff.pysat_testing_file'))
        create_files(self.testInst, self.start, self.stop, freq='1D',
                     root_fname=root_fname, version=self.version)
        # use from_os function to get pandas Series of files and dates
        files = pysat.Files.from_os(data_path=self.testInst.files.data_path,
                                    format_str=root_fname)
        # check overall length
        assert len(files) == (365 + 366)
        # check specific dates
        assert pds.to_datetime(files.index[0]) == dt.datetime(2008, 1, 1)
        assert pds.to_datetime(files.index[365]) == dt.datetime(2008, 12, 31)
        assert pds.to_datetime(files.index[-1]) == dt.datetime(2009, 12, 31)
        return

    def test_year_doy_files_no_gap_in_name_directly_call_from_os(self):
        """Test that `Files.from_os` makes file list for date w/o delimiter."""

        # create a bunch of files by year and doy
        root_fname = ''.join(('pysat_testing_junk_{year:04d}{day:03d}_stuff.',
                              'pysat_testing_file'))
        create_files(self.testInst, self.start, self.stop, freq='1D',
                     root_fname=root_fname, version=self.version)
        # use from_os function to get pandas Series of files and dates
        files = pysat.Files.from_os(data_path=self.testInst.files.data_path,
                                    format_str=root_fname)
        # check overall length
        assert len(files) == (365 + 366)
        # check specific dates
        assert pds.to_datetime(files.index[0]) == dt.datetime(2008, 1, 1)
        assert pds.to_datetime(files.index[365]) == dt.datetime(2008, 12, 31)
        assert pds.to_datetime(files.index[-1]) == dt.datetime(2009, 12, 31)
        return

    def test_year_month_day_files_directly_call_from_os(self):
        """Test that `Files.from_os` generates file list for date w/ month."""
        # create a bunch of files by year and doy
        root_fname = ''.join(('pysat_testing_junk_{year:04d}_gold_{day:03d}',
                              '_stuff_{month:02d}.pysat_testing_file'))
        create_files(self.testInst, self.start, self.stop, freq='1D',
                     use_doy=False, root_fname=root_fname, version=self.version)
        # use from_os function to get pandas Series of files and dates
        files = pysat.Files.from_os(data_path=self.testInst.files.data_path,
                                    format_str=root_fname)
        # check overall length
        assert len(files) == (365 + 366)
        # check specific dates
        assert pds.to_datetime(files.index[0]) == dt.datetime(2008, 1, 1)
        assert pds.to_datetime(files.index[365]) == dt.datetime(2008, 12, 31)
        assert pds.to_datetime(files.index[-1]) == dt.datetime(2009, 12, 31)
        return

    def test_year_month_day_hour_files_directly_call_from_os(self):
        """Test that `Files.from_os` generates file list for date w hours."""
        # create a bunch of files by year and doy
        root_fname = ''.join(('pysat_testing_junk_{year:04d}_gold_{day:03d}',
                              '_stuff_{month:02d}_{hour:02d}.pysat_testing',
                              '_file'))
        create_files(self.testInst, self.start, self.stop, freq='6h',
                     use_doy=False, root_fname=root_fname, version=self.version)
        # use from_os function to get pandas Series of files and dates
        files = pysat.Files.from_os(data_path=self.testInst.files.data_path,
                                    format_str=root_fname)
        # check overall length
        assert len(files) == (365 + 366) * 4 - 3
        # check specific dates
        assert pds.to_datetime(files.index[0]) == dt.datetime(2008, 1, 1)
        assert pds.to_datetime(files.index[1460]) == dt.datetime(2008, 12, 31)
        assert pds.to_datetime(files.index[-1]) == dt.datetime(2009, 12, 31)
        return

    def test_year_month_day_hour_minute_files_directly_call_from_os(self):
        """Test `Files.from_os` generates file list w/ hours and minutes."""
        root_fname = ''.join(('pysat_testing_fromos_{year:04d}_gold_{day:03d}_',
                              'stuff_{month:02d}_{hour:02d}{minute:02d}.',
                              'pysat_testing_file'))
        # create a bunch of files by year and doy
        start = dt.datetime(2008, 1, 1)
        stop = dt.datetime(2008, 1, 4)
        create_files(self.testInst, start, stop, freq='30min',
                     use_doy=False, root_fname=root_fname, version=self.version)
        # use from_os function to get pandas Series of files and dates
        files = pysat.Files.from_os(data_path=self.testInst.files.data_path,
                                    format_str=root_fname)
        # check overall length
        assert len(files) == 145
        # check specific dates
        assert pds.to_datetime(files.index[0]) == dt.datetime(2008, 1, 1)
        assert pds.to_datetime(files.index[1]) == dt.datetime(2008, 1, 1, 0, 30)
        assert pds.to_datetime(files.index[10]) == dt.datetime(2008, 1, 1, 5, 0)
        assert pds.to_datetime(files.index[-1]) == dt.datetime(2008, 1, 4)
        return

    def test_year_month_day_hms_files_directly_call_from_os(self):
        """Test `Files.from_os` generates file list for date w/ hour/min/sec."""
        root_fname = ''.join(('pysat_testing_hms_{year:04d}_gold_{day:03d}_',
                              'stuff_{month:02d}_{hour:02d}_{minute:02d}_',
                              '{second:02d}.pysat_testing_file'))
        # create a bunch of files by year and doy
        start = dt.datetime(2008, 1, 1)
        stop = dt.datetime(2008, 1, 3)
        create_files(self.testInst, start, stop, freq='30s',
                     use_doy=False, root_fname=root_fname, version=self.version)
        # use from_os function to get pandas Series of files and dates
        files = pysat.Files.from_os(data_path=self.testInst.files.data_path,
                                    format_str=root_fname)
        # check overall length
        assert len(files) == 5761
        # check specific dates
        assert pds.to_datetime(files.index[0]) == dt.datetime(2008, 1, 1)
        assert (pds.to_datetime(files.index[1])
                == dt.datetime(2008, 1, 1, 0, 0, 30))
        assert pds.to_datetime(files.index[-1]) == dt.datetime(2008, 1, 3)
        return

    def test_year_month_files_direct_call_to_from_os(self):
        """Test that `Files.from_os` generates file list for monthly files."""
        # create a bunch of files by year and doy
        root_fname = ''.join(('pysat_testing_junk_{year:04d}_gold_stuff',
                              '_{month:02d}.pysat_testing_file'))
        create_files(self.testInst, self.start, self.stop, freq='1MS',
                     root_fname=root_fname, version=self.version)
        # use from_os function to get pandas Series of files and dates
        files = pysat.Files.from_os(data_path=self.testInst.files.data_path,
                                    format_str=root_fname)
        # check overall length
        assert len(files) == 24
        # check specific dates
        assert pds.to_datetime(files.index[0]) == dt.datetime(2008, 1, 1)
        assert pds.to_datetime(files.index[11]) == dt.datetime(2008, 12, 1)
        assert pds.to_datetime(files.index[-1]) == dt.datetime(2009, 12, 1)
        return

    def test_instrument_has_no_files(self):
        """Test that instrument generates empty file list if no files."""

        pysat.instruments.pysat_testing.list_files = functools.partial(
            list_files, version=self.version)
        inst = pysat.Instrument(platform='pysat', name='testing',
                                update_files=True)
        reload(pysat.instruments.pysat_testing)
        assert(inst.files.files.empty)
        return

    def test_instrument_has_files(self):
        """Test that instrument generates file list if there are files."""
        import pysat.instruments.pysat_testing

        root_fname = ''.join(('pysat_testing_junk_{year:04d}_gold_{day:03d}_'
                              'stuff_{month:02d}_{hour:02d}_{minute:02d}_'
                              '{second:02d}.pysat_testing_file'))
        # create a bunch of files by year and doy
        start = dt.datetime(2007, 12, 31)
        stop = dt.datetime(2008, 1, 10)
        create_files(self.testInst, start, stop, freq='100min',
                     use_doy=False, root_fname=root_fname)
        # create the same range of dates
        dates = pysat.utils.time.create_date_range(start, stop, freq='100min')

        pysat.instruments.pysat_testing.list_files = functools.partial(
            list_files, version=self.version)
        inst = pysat.Instrument(platform='pysat', name='testing',
                                update_files=True)
        reload(pysat.instruments.pysat_testing)

        assert (np.all(inst.files.files.index == dates))
        return

    def test_get_file_array_single(self):
        """Test `get_file_array` basic access."""

        files = self.testInst.files.get_file_array(self.testInst.files[0],
                                                   self.testInst.files[-1])

        # Ensure we have the right number files
        assert len(files) == len(self.testInst.files.files)
        assert len(files) > 0

        # Ensure it stores strings
        assert isinstance(files[0], str)
        return

    def test_get_file_array_multiple(self):
        """Test `get_file_array` basic access with a list of strings."""

        start1 = self.testInst.files[0]
        stop1 = self.testInst.files[10]

        start2 = self.testInst.files[11]
        stop2 = self.testInst.files[-1]

        # Get list of files
        files = self.testInst.files.get_file_array([start1, start2],
                                                   [stop1, stop2])

        # Get what should be same list of files
        files2 = self.testInst.files.get_file_array(start1, stop2)

        # Ensure we have the right files
        assert np.all(files == files2)
        return

    def test_get_index(self):
        """Ensure `test_index` working as expected."""
        in_idxs = [0, 10, 100]
        for in_idx in in_idxs:
            idx = self.testInst.files.get_index(self.testInst.files[in_idx])
            assert idx == in_idx
        return

    def test_get_index_nonexistent_file(self):
        """Ensure test_index working as expected file not found."""
        in_idxs = [0, 10, 100]
        for in_idx in in_idxs:
            test_str = ''.join(('_', self.testInst.files[in_idx]))
            with pytest.raises(ValueError) as verr:
                self.testInst.files.get_index(test_str)
            assert str(verr).find('in available file list') > 0
        return

    def test_default_directory_format(self):
        """Ensure default directory format from params is used."""
        files = pysat.Files(self.testInst)
        assert files.directory_format == pysat.params['directory_format']
        return

class TestBasicsNoFileListStorage(TestBasics):
    """Repeat basic tests with temporary file list."""

    def setup_class(self):
        """Initialize the testing setup once before all tests are run."""
        self.temporary_file_list = True
        self.version = False
        return

    def teardown_class(self):
        """Clean up class-level variables after all tests are run."""
        del self.temporary_file_list, self.version
        return

class TestInstWithFiles(object):
    """Test basic file operations within an instrument."""

    def setup_class(self):
        """Initialize the testing setup once before all tests are run."""
        self.temporary_file_list = False
        self.version = False
        return

    def teardown_class(self):
        """Clean up class-level variables after all tests are run."""
        del self.temporary_file_list, self.version
        return

    def setup(self):
        """Set up the unit test environment for each method."""
        # Store current pysat directory
        self.data_paths = pysat.params['data_dirs']

        # Create temporary directory
        self.tempdir = tempfile.TemporaryDirectory()
        pysat.params['data_dirs'] = [self.tempdir.name]

        # Create the testing directory
        create_dir(temporary_file_list=self.temporary_file_list)

        # create a test instrument, make sure it is getting files from
        # filesystem
        reload(pysat.instruments.pysat_testing)
        pysat.instruments.pysat_testing.list_files = functools.partial(
            list_files, version=self.version)
        # create a bunch of files by year and doy
        self.testInst = pysat.Instrument(
            inst_module=pysat.instruments.pysat_testing,
            clean_level='clean',
            temporary_file_list=self.temporary_file_list,
            update_files=True)

        self.root_fname = ''.join(('pysat_testing_junk_{year:04d}_gold_',
                                   '{day:03d}_stuff_{month:02d}_{hour:02d}_',
                                   '{minute:02d}_{second:02d}.pysat_testing_',
                                   'file'))
        # Default file range.  Some tests will use custom ranges.
        self.start = dt.datetime(2007, 12, 31)
        self.stop = dt.datetime(2008, 1, 10)
        self.start2 = dt.datetime(2008, 1, 11)
        self.stop2 = dt.datetime(2008, 1, 12)

        create_files(self.testInst, self.start, self.stop, freq='100min',
                     use_doy=False, root_fname=self.root_fname,
                     version=self.version)

        self.testInst = pysat.Instrument(
            inst_module=pysat.instruments.pysat_testing,
            clean_level='clean',
            update_files=True,
            file_format=self.root_fname,
            temporary_file_list=self.temporary_file_list)
        return

    def teardown(self):
        """Clean up the unit test environment after each method."""
        del self.testInst
        reload(pysat.instruments.pysat_testing)
        reload(pysat.instruments)

        # Make sure everything about instrument state is restored. In
        # particular, restore the original file list (no files)
        pysat.Instrument(inst_module=pysat.instruments.pysat_testing,
                         clean_level='clean',
                         update_files=True,
                         temporary_file_list=self.temporary_file_list)
        pysat.params['data_dirs'] = self.data_paths
        self.tempdir.cleanup()
        del self.tempdir, self.start, self.stop, self.start2, self.stop2
        return

    def test_refresh(self):
        """Check that refresh updates the files."""
        # Create new files and make sure that new files are captured
        start = dt.datetime(2008, 1, 10)
        stop = dt.datetime(2008, 1, 12)

        create_files(self.testInst, start, stop, freq='100min',
                     use_doy=False, root_fname=self.root_fname,
                     version=self.version)
        start = dt.datetime(2007, 12, 31)
        dates = pysat.utils.time.create_date_range(start, stop, freq='100min')
        self.testInst.files.refresh()
        assert (np.all(self.testInst.files.files.index == dates))
        return

    def test_refresh_on_ignore_empty_files(self):
        """Check that refresh can ignore empty files."""
        # Setup created empty files - make sure such files can be ignored
        self.testInst.files.ignore_empty_files = True
        self.testInst.files.refresh()
        assert len(self.testInst.files.files) == 0
        return

        # Create new files with content and make sure they are captured
        create_files(self.testInst, self.start, self.stop, freq='100min',
                     use_doy=False,
                     root_fname=self.root_fname,
                     content='test', version=self.version)
        dates = pysat.utils.time.create_date_range(self.start, self.stop,
                                                   freq='100min')
        self.testInst.files.refresh()
        assert (np.all(self.testInst.files.files.index == dates))
        return

    def test_refresh_on_unchanged_files(self):
        """Make sure new refresh does not duplicate files."""
        dates = pysat.utils.time.create_date_range(self.start, self.stop,
                                                   freq='100min')
        assert (np.all(self.testInst.files.files.index == dates))
        self.testInst.files.refresh()
        assert (np.all(self.testInst.files.files.index == dates))
        return

    def test_instrument_with_ignore_empty_files(self):
        """Make sure new instruments can ignore empty files."""
        self.testInst = pysat.Instrument(
            inst_module=pysat.instruments.pysat_testing,
            clean_level='clean', update_files=True,
            temporary_file_list=self.temporary_file_list,
            file_format=self.root_fname,
            ignore_empty_files=True)

        assert len(self.testInst.files.files) == 0

        # create new files with content and make sure they are captured
        create_files(self.testInst, self.start, self.stop, freq='100min',
                     use_doy=False, root_fname=self.root_fname, content='test',
                     version=self.version)
        dates = pysat.utils.time.create_date_range(self.start, self.stop,
                                                   freq='100min')
        self.testInst.files.refresh()
        assert (np.all(self.testInst.files.files.index == dates))
        return

    def test_get_new_files_after_adding_files(self):
        """Check that get_new locates new files."""
        # create new files and make sure that new files are captured
        create_files(self.testInst, self.start2, self.stop2, freq='100min',
                     use_doy=False, root_fname=self.root_fname,
                     version=self.version)
        dates = pysat.utils.time.create_date_range(self.start2, self.stop2,
                                                   freq='100min')
        new_files = self.testInst.files.get_new()
        assert (np.all(new_files.index == dates))
        return

    def test_get_new_files_after_refresh(self):
        """Check that get_new locates new files after refresh."""
        # Create new files and make sure that new files are captured
        create_files(self.testInst, self.start2, self.stop2, freq='100min',
                     use_doy=False, root_fname=self.root_fname,
                     version=self.version)
        dates = pysat.utils.time.create_date_range(self.start2, self.stop2,
                                                   freq='100min')
        self.testInst.files.refresh()
        new_files = self.testInst.files.get_new()

        assert (np.all(new_files.index == dates))
        return

    def test_get_new_files_after_multiple_refreshes(self):
        """Check that get_new locates new files after multiple refreshes."""
        # Create new files and make sure that new files are captured
        create_files(self.testInst, self.start2, self.stop2, freq='100min',
                     use_doy=False, root_fname=self.root_fname,
                     version=self.version)
        dates = pysat.utils.time.create_date_range(self.start2, self.stop2,
                                                   freq='100min')
        self.testInst.files.refresh()
        self.testInst.files.refresh()
        self.testInst.files.refresh()
        new_files = self.testInst.files.get_new()
        assert (np.all(new_files.index == dates))
        return

    def test_get_new_files_after_adding_files_and_adding_file(self):
        """Check that get_new works after multiple rounds of added files."""
        # Create new files and make sure that new files are captured
        create_files(self.testInst, self.start2, self.stop2, freq='100min',
                     use_doy=False,
                     root_fname=self.root_fname)
        dates = pysat.utils.time.create_date_range(self.start2, self.stop2,
                                                   freq='100min')
        new_files = self.testInst.files.get_new()

        start = dt.datetime(2008, 1, 15)
        stop = dt.datetime(2008, 1, 18)

        create_files(self.testInst, start, stop, freq='100min',
                     use_doy=False, root_fname=self.root_fname,
                     version=self.version)
        dates2 = pysat.utils.time.create_date_range(start, stop, freq='100min')
        new_files2 = self.testInst.files.get_new()
        assert np.all(new_files.index == dates)
        assert np.all(new_files2.index == dates2)
        return

    def test_get_new_files_after_deleting_files_and_adding_files(self):
        """Check that get_new works after deleting and adding files."""
        # Create new files and make sure that new files are captured
        dates = pysat.utils.time.create_date_range(self.start2, self.stop2,
                                                   freq='100min')

        # Remove files, same number as will be added
        to_be_removed = len(dates)
        for the_file in os.listdir(self.testInst.files.data_path):
            if (the_file[0:13] == 'pysat_testing') & \
                    (the_file[-19:] == '.pysat_testing_file'):
                file_path = os.path.join(self.testInst.files.data_path,
                                         the_file)
                if os.path.isfile(file_path) & (to_be_removed > 0):
                    to_be_removed -= 1
                    os.unlink(file_path)

        # Add new files
        create_files(self.testInst, self.start2, self.stop2, freq='100min',
                     use_doy=False, root_fname=self.root_fname,
                     version=self.version)

        # Get new files
        new_files = self.testInst.files.get_new()

        assert np.all(new_files.index == dates)
        return

class TestInstWithFilesNonStandard(object):
    """Specialized tests for instruments with non-standard setups."""

    def setup_class(self):
        """Initialize the testing setup once before all tests are run."""
        self.temporary_file_list = False
        self.version = False
        return

    def teardown_class(self):
        """Clean up class-level variables after all tests are run."""
        del self.temporary_file_list, self.version
        return

    def setup(self):
        """Set up the unit test environment for each method."""
        # Store current pysat directory
        self.data_paths = pysat.params['data_dirs']

        # Create temporary directory
        self.tempdir = tempfile.TemporaryDirectory()
        pysat.params['data_dirs'] = [self.tempdir.name]

        self.start = dt.datetime(2008, 1, 11)
        self.stop = dt.datetime(2008, 1, 15)
        self.root_fname = ''.join(('pysat_testing_junk_{year:04d}_gold_',
                                   '{day:03d}_stuff_{month:02d}_{hour:02d}_',
                                   '{minute:02d}_{second:02d}.pysat_testing_',
                                   'file'))
        reload(pysat.instruments.pysat_testing)

        # Use custom list_files routine
        pysat.instruments.pysat_testing.list_files = functools.partial(
            list_files, version=self.version)
        return

    def teardown(self):
        """Clean up the unit test environment after each method."""
        self.tempdir.cleanup()
        del self.tempdir
        if hasattr(self, 'testInst'):
            # The two tests for error do not generate testInst
            del self.testInst
        reload(pysat.instruments.pysat_testing)
        reload(pysat.instruments)

        # Make sure everything about instrument state is restored. In
        # particular, restore the original file list (no files)
        pysat.params['data_dirs'] = self.data_paths
        pysat.Instrument(inst_module=pysat.instruments.pysat_testing,
                         clean_level='clean',
                         update_files=True,
                         temporary_file_list=self.temporary_file_list)
        del self.start, self.stop
        return

    def test_files_non_standard_pysat_directory(self):
        """Check that files work with a weird directory structure."""
        # Create new files and make sure that new files are captured
        dates = pysat.utils.time.create_date_range(self.start, self.stop,
                                                   freq='100min')

        nonstandard_dir = 'pysat_testing_{tag}_{inst_id}'

        self.testInst = pysat.Instrument(
            inst_module=pysat.instruments.pysat_testing,
            clean_level='clean',
            directory_format=nonstandard_dir,
            update_files=True, file_format=self.root_fname,
            temporary_file_list=self.temporary_file_list)

        # Add new files
        create_dir(self.testInst)
        create_files(self.testInst, self.start, self.stop, freq='100min',
                     use_doy=False, root_fname=self.root_fname,
                     version=self.version)

        # Refresh file list
        self.testInst.files.refresh()

        # Get new files
        new_files = self.testInst.files.get_new()
        assert np.all(self.testInst.files.files.index == dates)
        assert np.all(new_files.index == dates)
        return

    def test_files_non_standard_directory(self):
        """Check that files work with a specific directory supplied."""
        # Create new files and make sure that new files are captured
        dates = pysat.utils.time.create_date_range(self.start, self.stop,
                                                   freq='100min')

        nonstandard_dir = os.path.join(self.tempdir.name, 'temp_dir')

        self.testInst = pysat.Instrument()
        self.testInst.files.data_path = nonstandard_dir

        # Add new files
        create_dir(self.testInst)
        create_files(self.testInst, self.start, self.stop, freq='100min',
                     use_doy=False, root_fname=self.root_fname,
                     version=self.version)

        # Create an instrument, specifying the desired path
        self.testInst = pysat.Instrument(
            inst_module=pysat.instruments.pysat_testing, clean_level='clean',
            data_dir=nonstandard_dir, update_files=True,
            file_format=self.root_fname,
            temporary_file_list=self.temporary_file_list)

        # Get new files
        new_files = self.testInst.files.get_new()
        assert np.all(self.testInst.files.files.index == dates)
        assert np.all(new_files.index == dates)
        return

    def test_files_non_standard_file_format_template(self):
        """Check that files work if format has a weird heirarchy."""
        # create new files and make sure that new files are captured
        dates = pysat.utils.time.create_date_range(self.start, self.stop,
                                                   freq='1D')
        if self.version:
            root_fname = ''.join(('pysat_testing_unique_{version:02d}_',
                                  '{revision:03d}_{cycle:02d}_{year:04d}',
                                  '_g_{day:03d}_st.pysat_testing_file'))
        else:
            root_fname = ''.join(('pysat_testing_unique_junk_{year:04d}_gold',
                                  '_{day:03d}_stuff.pysat_testing_file'))

        self.testInst = pysat.Instrument(
            inst_module=pysat.instruments.pysat_testing,
            clean_level='clean',
            file_format=root_fname,
            update_files=True,
            temporary_file_list=self.temporary_file_list)

        # Add new files
        create_dir(self.testInst)
        create_files(self.testInst, self.start, self.stop, freq='1D',
                     use_doy=False, root_fname=root_fname, version=self.version)

        # Refresh file list
        self.testInst.files.refresh()

        assert (np.all(self.testInst.files.files.index == dates))
        return

    def test_files_non_standard_file_format_template_no_variables(self):
        """Test instrument raises error if format template has no variables."""

        with pytest.raises(ValueError) as verr:
            self.testInst = pysat.Instrument(
                inst_module=pysat.instruments.pysat_testing,
                clean_level='clean',
                file_format=''.join(('pysat_testing_unique_junk_stuff.',
                                     'pysat_testing_file')),
                update_files=True,
                temporary_file_list=self.temporary_file_list)
        assert str(verr).find('file format set to default') > 0
        return

    def test_files_non_standard_file_format_template_wrong_type(self):
        """Test instrument raises error if format template is not a string."""

        with pytest.raises(ValueError) as verr:
            self.testInst = pysat.Instrument(
                inst_module=pysat.instruments.pysat_testing,
                clean_level='clean',
                file_format=15,
                update_files=True,
                temporary_file_list=self.temporary_file_list)
        assert str(verr).find('file format set to default') >= 0
        return

class TestInstWithFilesNoFileListStorage(TestInstWithFiles):
    """Repeat all file tests with a temporary file list."""

    def setup_class(self):
        """Initialize the testing setup once before all tests are run."""
        self.temporary_file_list = True
        self.version = False
        return

    def teardown_class(self):
        """Clean up class-level variables after all tests are run."""
        del self.temporary_file_list, self.version
        return

class TestInstWithFilesNoFileListStorageNonStd(TestInstWithFilesNonStandard):
    """Repeat all file tests with a temporary file list."""

    def setup_class(self):
        """Initialize the testing setup once before all tests are run."""
        self.temporary_file_list = True
        self.version = False
        return

    def teardown_class(self):
        """Clean up class-level variables after all tests are run."""
        del self.temporary_file_list, self.version
        return

class TestInstWithVersionedFiles(TestInstWithFiles):
    """Repeat all file tests with versioned files."""

    def setup_class(self):
        """Initialize the testing setup once before all tests are run."""
        self.temporary_file_list = False
        self.version = True
        return

    def teardown_class(self):
        """Clean up class-level variables after all tests are run."""
        del self.temporary_file_list, self.version
        return

class TestInstWithVersionedFilesNonStandard(TestInstWithFilesNonStandard):
    """Repeat all non-standard file tests with versioned files.

    Note
    ----
    Includes additional tests for versioned strings.

    """

    def setup_class(self):
        """Initialize the testing setup once before all tests are run."""
        self.temporary_file_list = False
        self.version = True
        return

    def teardown_class(self):
        """Clean up class-level variables after all tests are run."""
        del self.temporary_file_list, self.version
        return

    def test_files_when_duplicates_forced(self):
        """Test that new files are captured when duplicates are forced."""
        # Create new files and make sure that new files are captured
        dates = pysat.utils.time.create_date_range(self.start, self.stop,
                                                   freq='1D')

        file_format = ''.join(('pysat_testing_unique_{version:02d}_',
                               '{revision:03d}_{cycle:02d}_{year:04d}',
                               '_g_{day:03d}_st.pysat_testing_file'))
        self.testInst = pysat.Instrument(
            inst_module=pysat.instruments.pysat_testing,
            clean_level='clean',
            file_format=file_format,
            update_files=True,
            temporary_file_list=self.temporary_file_list)

        # add new files
        create_dir(self.testInst)
        create_files(self.testInst, self.start, self.stop, freq='1D',
                     use_doy=False, root_fname=file_format,
                     version=self.version)

        pysat.instruments.pysat_testing.list_files = functools.partial(
            list_files, version=self.version)
        self.testInst = pysat.Instrument(
            inst_module=pysat.instruments.pysat_testing,
            clean_level='clean', file_format=file_format,
            update_files=True,
            temporary_file_list=self.temporary_file_list)
        assert (np.all(self.testInst.files.files.index == dates))
        return

def create_instrument(j):
    """Create new instrument with files for unit tests.

    Note
    ----
    This function must be in the top level to be picklable.

    update_files should update the file list in .pysat

    """
    root_fname = ''.join(('pysat_testing_junk_{year:04d}_{month:02d}',
                          '_{day:03d}{hour:02d}{minute:02d}',
                          '{second:02d}_stuff_{version:02d}_',
                          '{revision:03d}_{cycle:02d}.pysat_testing_file'))

    testInst = pysat.Instrument(inst_module=pysat.instruments.pysat_testing,
                                clean_level='clean',
                                update_files=True,
                                temporary_file_list=False)

    start = dt.datetime(2007, 12, 30)
    stop = dt.datetime(2007, 12, 31)
    create_files(testInst, start, stop, freq='1D', use_doy=False,
                 root_fname=root_fname, timeout=0.5, version=True)

    testInst = pysat.Instrument(inst_module=pysat.instruments.pysat_testing,
                                clean_level='clean',
                                update_files=True,
                                temporary_file_list=False)

    print('initial files created in {}:'.format(testInst.files.data_path))

    return 'instrument {}'.format(j)

class TestFilesRaceCondition(object):
    """Tests for multiple instances of pysat running simultaneously."""

    def setup_class(self):
        """Initialize the testing setup once before all tests are run."""
        self.temporary_file_list = False
        return

    def teardown_class(self):
        """Clean up class-level variables after all tests are run."""
        del self.temporary_file_list
        return

    def setup(self):
        """Set up the unit test environment for each method."""
        # Store current pysat directory
        self.data_paths = pysat.params['data_dirs']

        # Create temporary directory
        self.tempdir = tempfile.TemporaryDirectory()
        pysat.params['data_dirs'] = [self.tempdir.name]

        # Create testing directory
        create_dir(temporary_file_list=self.temporary_file_list)

        # Create a test instrument, make sure it is getting files from
        # filesystem
        reload(pysat.instruments.pysat_testing)
        pysat.instruments.pysat_testing.list_files = functools.partial(
            list_files, version=True)

        # Create a bunch of files by year and doy
        self.testInst = pysat.Instrument(
            inst_module=pysat.instruments.pysat_testing,
            clean_level='clean',
            temporary_file_list=self.temporary_file_list,
            update_files=True)

        self.root_fname = ''.join(('pysat_testing_junk_{year:04d}_{month:02d}',
                                   '_{day:03d}{hour:02d}{minute:02d}',
                                   '{second:02d}_stuff_{version:02d}_',
                                   '{revision:03d}_{cycle:02d}',
                                   '.pysat_testing_file'))
        start = dt.datetime(2007, 12, 30)
        stop = dt.datetime(2008, 12, 31)
        create_files(self.testInst, start, stop, freq='1D',
                     use_doy=False, root_fname=self.root_fname, version=True)

        self.testInst = pysat.Instrument(
            inst_module=pysat.instruments.pysat_testing,
            clean_level='clean',
            update_files=True,
            temporary_file_list=self.temporary_file_list)

        print(' '.join(('initial files created in ',
                        self.testInst.files.data_path)))

    def teardown(self):
        """Clean up the unit test environment after each method."""
        self.tempdir.cleanup()
        del self.testInst, self.tempdir
        reload(pysat.instruments.pysat_testing)
        reload(pysat.instruments)
        # make sure everything about instrument state is restored
        # restore original file list, no files
        pysat.Instrument(inst_module=pysat.instruments.pysat_testing,
                         clean_level='clean',
                         update_files=True,
                         temporary_file_list=self.temporary_file_list)
        pysat.params['data_dirs'] = self.data_paths

# TODO(#871): This needs to be replaced or expanded based on the tests that
# portalocker uses
    def test_race_condition(self):
        """Test that multiple instances of pysat instrument creation run."""
        processes = 5
        proc_pool = Pool(processes)
        pysat.file_timeout = 1

        proc_pool.map(create_instrument, range(processes))
        return

class TestCIonly(CICleanSetup):
    """Tests where we mess with local settings.

    Note
    ----
    These only run in CI environments to avoid breaking an end user's setup

    """

    def test_initial_pysat_load(self, capsys):
        """Ensure data_dirs check in Files works."""

        # Ensure pysat is running in 'first-time' mode
        reload(pysat)
        captured = capsys.readouterr()
        assert captured.out.find("Hi there!") >= 0

        # Ensure the pysat 'data_dirs' param is empty list on both
        # local systems and CI.
        pysat.params.data['data_dirs'] = []

        # Try to instantiate Instrument
        with pytest.raises(NameError) as nerr:
            pysat.Instrument('pysat', 'testing')

        # Confirm we have the correct error
        assert str(nerr).find("pysat's `data_dirs` hasn't been set.") >= 0
        return


Do you have photos, historical accounts or other items pertaining to the Blue Earth area? Would you like to share this historical information with the world? LakesnWoods.com would like to publish your Blue Earth photos (current or historical) or historical accounts on this website. Original materials can be returned and your privacy will be respected.
Blue Earth gets its name from the Blue Earth River that surrounds the town. The river was given the Native American name "Mahkota" (meaning Blue Earth) for the blue-black clay found in the river banks.
A sesquicentennial community founded in 1856.
The birthplace of the ice cream sandwich.
The center of America's longest highway, Interstate 90.
The home of Minnesota's first stained-glass window.
The seat of Faribault County and home to the historic 19th century County Courthouse.
Home of the world's largest statue of the Jolly Green Giant, overlooking some of America's richest farmland.
Visit the GIANT Museum featuring Jolly Green Giant and Little Green Sprout memorabilia! The museum is located at 113 South Nicollet Street and is open Monday - Friday, 9:00 a.m. to 3:00 p.m. or by special appointment. (The museum is closed over the noon hour.) Tour groups welcome. Free will donation. Contact the Blue Earth Chamber for more information at (507) 526-2916 or email chamber@bevcomm.net.
Blue Earth is a city in Faribault County, Minnesota, at the confluence of the east and west branches of the Blue Earth River. Interstate Highway 90 and U.S. Highway 169 are two of the main routes in the city. Blue Earth is 125 miles southwest of the Twin Cities. According to the United States Census Bureau, the city has a total area of 3.36 square miles (8.70 km2), of which 3.27 square miles (8.47 km2) is land and 0.09 square miles (0.23 km2) is water. The elevation is 1,089 ft (332 m).
As of the census of 2010, there were 3,353 people, 1,453 households, and 888 families residing in the city. The population density was 1,025.4 inhabitants per square mile (395.9 /km2). There were 1,638 housing units at an average density of 500.9 per square mile (193.4 /km2). The racial makeup of the city was 96.0% White, 0.1% African American, 0.6% Native American, 0.2% Asian, 2.1% from other races, and 0.9% from two or more races. Hispanic or Latino of any race were 6.9% of the population.
There were 1,453 households of which 25.7% had children under the age of 18 living with them, 48.0% were married couples living together, 9.9% had a female householder with no husband present, 3.2% had a male householder with no wife present, and 38.9% were non-families. 35.5% of all households were made up of individuals and 20% had someone living alone who was 65 years of age or older. The average household size was 2.19 and the average family size was 2.81.
The median age in the city was 46.4 years. 21.4% of residents were under the age of 18; 6.9% were between the ages of 18 and 24; 20.4% were from 25 to 44; 26.7% were from 45 to 64; and 24.7% were 65 years of age or older. The gender makeup of the city was 46.8% male and 53.2% female.
André Pénicaut's Relation of Le Sueur's expedition was translated by Alfred J. Hill in the Minnesota Historical Society Collections (vol. III, 1880, pp. 1-12), and a map showing the locations of the fort and mine, ascertained by Hughes, was published in 1911 by Newton H. Winchell, on p. 493, The Aborigines of Minnesota (1911). From that expedition and the mine, we have the name of the Blue Earth River and of this county, and also of the township and city of Blue Earth in Faribault County.
Located 1/4 mile east of Blue Earth on County Road 16. The 33 acre park provides a natural setting for visitors to enjoy native prairie plants, river views, woodlands, birding and natural habitat. The Steinberg Nature Park has a 1/2 mile crushed limestone trail that is accessible for all users.
Located at the south end of Main Street. This park is home to our municipal pool and the city's disc golf course. The Bicentennial Trail sprouts from this park and follows the Blue Earth River west. Putnam Park also offers tennis courts, playground equipment and bathrooms.
Dr Brent Griffin is in private practice in Blue Earth, MN. He is board certified in Family Medicine and has a special interest in dermatology and cosmetic laser medicine. Dr. Griffin is a member of the American Society for Laser Medicine and Surgery and a Diplomate of the American Board of Family Practice.
We offer comprehensive general surgical services, including medical and surgical weight management. Providing laparoscopic adjustable gastric banding, the least invasive bariatric surgical procedure, to help you eat smaller portions and gradually lose excess weight. We are devoted to providing continued personalized attention to help our patients reach their weight-loss goals.
At United Hospital District, you will find providers that are committed to providing you and your family with the highest level of healthcare. From primary care physicians to specialists, you will find a provider who will always be there for you and provide you with expertise you need.
Weekly newspaper published on Mondays with a circulation of 3,368.
We are proud to provide the amenities you want most at our hotel in Blue Earth Minnesota, and we deliver them at the highest level possible, starting with quiet rooms. We have a variety of room types, including suites with whirlpools and fireplaces that are perfect for business or leisure travelers. Welcome to a warm smile, great service, an inviting pool, free breakfast, and quiet nights!
We have 42 well appointed guest rooms, all of which feature wireless high speed internet, coffee makers, irons and boards and hair dryers. The minute you walk through the front door you'll feel right at home. Our surroundings offer a unique feel that will put you at ease the minute you arrive. Enjoy our cozy lobby or unwind at our outdoor patio area.
The Fairgrounds offer ball fields, a walking/biking trail, grandstands, stables, camping and bathrooms. The campground has 9 electrical sites, 4 tent sites and is free for the first twenty-four hours. After that there is a fee of $20.00 per night for the electrical sites and $10.00 per night for the tent sites. The City allows a maximum of five consecutive nights of camping at the campground unless prior arrangements have been made.
The Blue Earth Business Directory is Coming Soon!


What is GOD EATER 3?
GOD EATER 3 is a Action, Anime, Character Customization PC game, developed by BANDAI NAMCO Studios Inc., available on Steam and published by BANDAI NAMCO Entertainment.
According to Steam user reviews, 0% of the 0 user reviews in the last 30 days are positive. For all time, 0% of the 0 user reviews for GOD EATER 3 are positive.