text:
<?php

namespace Elastica\Test\Query;

use Elastica\Mapping;
use Elastica\Query\AbstractQuery;
use Elastica\Query\HasChild;
use Elastica\Query\InnerHits;
use Elastica\Query\MatchAll;
use Elastica\Query\Nested;
use Elastica\Query\SimpleQueryString;
use Elastica\Script\Script;
use Elastica\Script\ScriptFields;
use Elastica\Test\Base as BaseTest;

/**
 * @internal
 */
class InnerHitsTest extends BaseTest
{
    /**
     * @group unit
     */
    public function testSetSize(): void
    {
        $innerHits = (new InnerHits())
            ->setSize(12)
        ;

        $this->assertSame(12, $innerHits->getParam('size'));
    }

    /**
     * @group unit
     */
    public function testSetFrom(): void
    {
        $innerHits = (new InnerHits())
            ->setFrom(12)
        ;

        $this->assertSame(12, $innerHits->getParam('from'));
    }

    /**
     * @group unit
     */
    public function testSetSort(): void
    {
        $sort = ['last_activity_date' => ['order' => 'desc']];
        $innerHits = (new InnerHits())
            ->setSort($sort)
        ;

        $this->assertSame($sort, $innerHits->getParam('sort'));
    }

    /**
     * @group unit
     */
    public function testSetSource(): void
    {
        $fields = ['title', 'tags'];
        $innerHits = (new InnerHits())
            ->setSource($fields)
        ;

        $this->assertSame($fields, $innerHits->getParam('_source'));
    }

    /**
     * @group unit
     */
    public function testSetVersion(): void
    {
        $innerHits = (new InnerHits())
            ->setVersion(true)
        ;

        $this->assertTrue($innerHits->getParam('version'));

        $innerHits->setVersion(false);

        $this->assertFalse($innerHits->getParam('version'));
    }

    /**
     * @group unit
     */
    public function testSetExplain(): void
    {
        $innerHits = (new InnerHits())
            ->setExplain(true)
        ;

        $this->assertTrue($innerHits->getParam('explain'));

        $innerHits->setExplain(false);

        $this->assertFalse($innerHits->getParam('explain'));
    }

    /**
     * @group unit
     */
    public function testSetHighlight(): void
    {
        $highlight = [
            'fields' => [
                'title',
            ],
        ];
        $innerHits = (new InnerHits())
            ->setHighlight($highlight)
        ;

        $this->assertSame($highlight, $innerHits->getParam('highlight'));
    }

    /**
     * @group unit
     */
    public function testSetFieldDataFields(): void
    {
        $fields = ['title', 'tags'];
        $innerHits = (new InnerHits())
            ->setFieldDataFields($fields)
        ;

        $this->assertSame($fields, $innerHits->getParam('docvalue_fields'));
    }

    /**
     * @group unit
     */
    public function testSetScriptFields(): void
    {
        $script = new Script('1 + 2');
        $scriptFields = new ScriptFields(['three' => $script]);

        $innerHits = (new InnerHits())
            ->setScriptFields($scriptFields)
        ;

        $this->assertSame($scriptFields, $innerHits->getParam('script_fields'));
    }

    /**
     * @group unit
     */
    public function testAddScriptField(): void
    {
        $script = new Script('2+3');
        $innerHits = (new InnerHits())
            ->addScriptField('five', $script)
        ;

        $this->assertSame(['five' => $script->toArray()], $innerHits->getParam('script_fields')->toArray());
    }

    /**
     * @group functional
     */
    public function testInnerHitsNested(): void
    {
        $queryString = new SimpleQueryString('windows newton', ['title', 'users.name']);
        $innerHits = new InnerHits();

        $results = $this->getNestedQuery($queryString, $innerHits);
        $firstResult = \current($results->getResults());

        $innerHitsResults = $firstResult->getInnerHits();

        $this->assertEquals(4, $firstResult->getId());
        $this->assertEquals('Newton', $innerHitsResults['users']['hits']['hits'][0]['_source']['name']);
    }

    /**
     * @group functional
     */
    public function testInnerHitsParentChildren(): void
    {
        $queryString = new SimpleQueryString('linux cool');
        $innerHits = new InnerHits();

        $results = $this->getParentChildQuery($queryString, $innerHits);
        $firstResult = \current($results->getResults());

        $innerHits = $firstResult->getInnerHits();

        $responses = $innerHits['answers']['hits']['hits'];
        $responsesId = [];

        foreach ($responses as $response) {
            $responsesId[] = $response['_id'];
        }

        $this->assertEquals(1, $firstResult->getId());
        $this->assertEquals([6, 7], $responsesId);
    }

    /**
     * @group functional
     */
    public function testInnerHitsLimitedSource(): void
    {
        $this->markTestSkipped('Source filtering on inner hits is bugged. See https://github.com/elastic/elasticsearch/issues/21312');

        $innerHits = new InnerHits();
        $innerHits->setSource(['includes' => ['name'], 'excludes' => ['last_activity_date']]);

        $results = $this->getNestedQuery(new MatchAll(), $innerHits);

        foreach ($results as $row) {
            $innerHitsResult = $row->getInnerHits();
            foreach ($innerHitsResult['users']['hits']['hits'] as $doc) {
                $this->assertArrayHasKey('name', $doc['_source']['users']);
                $this->assertArrayNotHasKey('last_activity_date', $doc['_source']['users']);
            }
        }
    }

    /**
     * @group functional
     */
    public function testInnerHitsWithOffset(): void
    {
        $queryString = new SimpleQueryString('linux cool');
        $innerHits = new InnerHits();
        $innerHits->setFrom(1);

        $results = $this->getParentChildQuery($queryString, $innerHits);
        $firstResult = \current($results->getResults());

        $innerHits = $firstResult->getInnerHits();

        $responses = $innerHits['answers']['hits']['hits'];

        $this->assertCount(1, $responses);
        $this->assertEquals(7, $responses[0]['_id']);
    }

    /**
     * @group functional
     */
    public function testInnerHitsWithSort(): void
    {
        $queryString = new SimpleQueryString('linux cool');
        $innerHits = new InnerHits();
        $innerHits->setSort(['answer' => 'asc']);

        $results = $this->getParentChildQuery($queryString, $innerHits);
        $firstResult = \current($results->getResults());

        $innerHits = $firstResult->getInnerHits();

        $responses = $innerHits['answers']['hits']['hits'];
        $responsesId = [];

        foreach ($responses as $response) {
            $responsesId[] = $response['_id'];
        }

        $this->assertEquals(1, $firstResult->getId());
        $this->assertEquals([7, 6], $responsesId);
    }

    /**
     * @group functional
     */
    public function testInnerHitsWithExplain(): void
    {
        $matchAll = new MatchAll();
        $innerHits = new InnerHits();
        $innerHits->setExplain(true);

        $results = $this->getNestedQuery($matchAll, $innerHits);

        foreach ($results as $row) {
            $innerHitsResult = $row->getInnerHits();
            foreach ($innerHitsResult['users']['hits']['hits'] as $doc) {
                $this->assertArrayHasKey('_explanation', $doc);
            }
        }
    }

    /**
     * @group functional
     */
    public function testInnerHitsWithVersion(): void
    {
        $matchAll = new MatchAll();
        $innerHits = new InnerHits();
        $innerHits->setVersion(true);

        $results = $this->getNestedQuery($matchAll, $innerHits);

        foreach ($results as $row) {
            $innerHitsResult = $row->getInnerHits();
            foreach ($innerHitsResult['users']['hits']['hits'] as $doc) {
                $this->assertArrayHasKey('_version', $doc);
            }
        }
    }

    /**
     * @group functional
     */
    public function testInnerHitsWithScriptFields(): void
    {
        $matchAll = new MatchAll();
        $innerHits = new InnerHits();
        $innerHits->setSize(1);
        $scriptFields = new ScriptFields();
        $scriptFields->addScript('three', new Script('1 + 2'));
        $scriptFields->addScript('five', new Script('3 + 2'));
        $innerHits->setScriptFields($scriptFields);

        $results = $this->getNestedQuery($matchAll, $innerHits);

        foreach ($results as $row) {
            $innerHitsResult = $row->getInnerHits();
            foreach ($innerHitsResult['users']['hits']['hits'] as $doc) {
                $this->assertEquals(3, $doc['fields']['three'][0]);
                $this->assertEquals(5, $doc['fields']['five'][0]);
            }
        }
    }

    /**
     * @group functional
     */
    public function testInnerHitsWithHighlight(): void
    {
        $queryString = new SimpleQueryString('question simon', ['title', 'users.name']);
        $innerHits = new InnerHits();
        $innerHits->setHighlight(['fields' => ['users.name' => new \stdClass()]]);

        $results = $this->getNestedQuery($queryString, $innerHits);

        foreach ($results as $row) {
            $innerHitsResult = $row->getInnerHits();
            foreach ($innerHitsResult['users']['hits']['hits'] as $doc) {
                $this->assertArrayHasKey('highlight', $doc);
                if (\method_exists($this, 'assertMatchesRegularExpression')) {
                    $this->assertMatchesRegularExpression('#Simon#', $doc['highlight']['users.name'][0]);
                } else {
                    $this->assertRegExp('#Simon#', $doc['highlight']['users.name'][0]);
                }
            }
        }
    }

    /**
     * @group functional
     */
    public function testInnerHitsWithFieldData(): void
    {
        $queryString = new SimpleQueryString('question simon', ['title', 'users.name']);
        $innerHits = new InnerHits();

        $innerHits->setFieldDataFields(['users.name']);

        $results = $this->getNestedQuery($queryString, $innerHits);

        foreach ($results as $row) {
            $innerHitsResult = $row->getInnerHits();
            foreach ($innerHitsResult['users']['hits']['hits'] as $doc) {
                $this->assertArrayHasKey('fields', $doc);
                $this->assertArrayHasKey('users.name', $doc['fields']);
                $this->assertArrayNotHasKey('users.last_activity_date', $doc['fields']);
            }
        }
    }

    private function _getIndexForNestedTest()
    {
        $index = $this->_createIndex();
        $index->setMapping(new Mapping([
            'users' => [
                'type' => 'nested',
                'properties' => [
                    'name' => ['type' => 'text', 'fielddata' => true],
                ],
            ],
            'title' => ['type' => 'text'],
            'last_activity_date' => ['type' => 'date'],
        ]));

        $index->addDocuments([
            $index->createDocument(1, [
                'users' => [
                    ['name' => 'John Smith', 'last_activity_date' => '2015-01-05'],
                    ['name' => 'Conan', 'last_activity_date' => '2015-01-05'],
                ],
                'last_activity_date' => '2015-01-05',
                'title' => 'Question about linux #1',
            ]),
            $index->createDocument(2, [
                'users' => [
                    ['name' => 'John Doe', 'last_activity_date' => '2015-01-05'],
                    ['name' => 'Simon', 'last_activity_date' => '2015-01-05'],
                ],
                'last_activity_date' => '2014-12-23',
                'title' => 'Question about linux #2',
            ]),
            $index->createDocument(3, [
                'users' => [
                    ['name' => 'Simon', 'last_activity_date' => '2015-01-05'],
                    ['name' => 'Garfunkel', 'last_activity_date' => '2015-01-05'],
                ],
                'last_activity_date' => '2015-01-05',
                'title' => 'Question about windows #1',
            ]),
            $index->createDocument(4, [
                'users' => [
                    ['name' => 'Einstein'],
                    ['name' => 'Newton'],
                    ['name' => 'Maxwell'],
                ],
                'last_activity_date' => '2014-12-23',
                'title' => 'Question about windows #2',
            ]),
            $index->createDocument(5, [
                'users' => [
                    ['name' => 'Faraday'],
                    ['name' => 'Leibniz'],
                    ['name' => 'Descartes'],
                ],
                'last_activity_date' => '2014-12-23',
                'title' => 'Question about osx',
            ]),
        ]);

        $index->refresh();

        return $index;
    }

    private function _getIndexForParentChildrenTest()
    {
        $index = $this->_createIndex();
        $mappingQuestion = new Mapping();
        $mappingQuestion->setProperties([
            'title' => ['type' => 'text'],
            'answer' => ['type' => 'text', 'fielddata' => true],
            'last_activity_date' => ['type' => 'date'],
            'my_join_field' => [
                'type' => 'join',
                'relations' => [
                    'questions' => 'answers',
                ],
            ],
        ]);

        $index->setMapping($mappingQuestion);
        $index->addDocuments([
            $index->createDocument(1, [
                'last_activity_date' => '2015-01-05',
                'title' => 'Question about linux #1',
                'my_join_field' => [
                    'name' => 'questions',
                ],
            ]),
            $index->createDocument(2, [
                'last_activity_date' => '2014-12-23',
                'title' => 'Question about linux #2',
                'my_join_field' => [
                    'name' => 'questions',
                ],
            ]),
            $index->createDocument(3, [
                'last_activity_date' => '2015-01-05',
                'title' => 'Question about windows #1',
                'my_join_field' => [
                    'name' => 'questions',
                ],
            ]),
            $index->createDocument(4, [
                'last_activity_date' => '2014-12-23',
                'title' => 'Question about windows #2',
                'my_join_field' => [
                    'name' => 'questions',
                ],
            ]),
            $index->createDocument(5, [
                'last_activity_date' => '2014-12-23',
                'title' => 'Question about osx',
                'my_join_field' => [
                    'name' => 'questions',
                ],
            ]),
        ]);

        $doc1 = $index->createDocument(6, [
            'answer' => 'linux is cool',
            'last_activity_date' => '2016-01-05',
            'my_join_field' => [
                'name' => 'answers',
                'parent' => 1,
            ],
        ]);

        $doc2 = $index->createDocument(7, [
            'answer' => 'linux is bad',
            'last_activity_date' => '2005-01-05',
            'my_join_field' => [
                'name' => 'answers',
                'parent' => 1,
            ],
        ]);

        $doc3 = $index->createDocument(8, [
            'answer' => 'windows was cool',
            'last_activity_date' => '2005-01-05',
            'my_join_field' => [
                'name' => 'answers',
                'parent' => 2,
            ],
        ]);

        $this->_getClient()->addDocuments([$doc1, $doc2, $doc3], ['routing' => 1]);

        $index->refresh();

        return $index;
    }

    private function getNestedQuery(AbstractQuery $query, InnerHits $innerHits)
    {
        $nested = (new Nested())
            ->setInnerHits($innerHits)
            ->setPath('users')
            ->setQuery($query)
        ;

        return $this->_getIndexForNestedTest()->search($nested);
    }

    private function getParentChildQuery(AbstractQuery $query, InnerHits $innerHits)
    {
        $child = (new HasChild($query, 'answers'))->setInnerHits($innerHits);

        return $this->_getIndexForParentChildrenTest()->search($child);
    }
}

redpajama_set_name: RedPajamaGithub


text:
Cracking The Data Science Interview
Datacast Episode 15: Thoughts on Data Science from the perspective of a behavioral scientist with Nick Gaylord
James Le
Datacast's 15th episode is my conversation with Nick Gaylord, currently a Senior Data Science Manager at Johnson and Johnson's Health Technology. Give a listen to learn about his experience working in the Bay Area in the last 6 years, his transition from studying Linguistics to being a data scientist in the industry, and his advice for graduate students looking to make similar jumps.
Nick Gaylord has worked as a data scientist in the Bay Area for about the last 5 years. Currently, he's a member of the Johnson & Johnson Health Technology team, and prior to that, he has worked in different fields ranging from small business revenue analytics to enterprise machine-learning-as-a-service platforms. Like many data scientists, he started out as an academic before transitioning to industry, in his case earning a Ph.D. in Psycholinguistics from the University of Texas at Austin in 2013.
(2:06) Nick talked about earning his Ph.D. degree in Psycho-Linguistics from the University of Texas at Austin.
(3:58) Nick discussed his Ph.D. dissertation, in which he looked at the role of domain-general decision making processes in human language comprehension.
(8:41) Nick talked about his teaching experience in graduate school, as well as why UT-Austin is a perfect place to study linguistics.
(12:29) Nick delved into his first job out of school as a Linguistic Associate at Lexicon Branding, a world's premier naming agency with over 30 years of experience in the business
(14:50) Nick talked about his next role as a Data Scientist at Idibon, a dated AI-startup based in Silicon Valley that helped companies understand their language data.
(18:55) Nick mentioned his next job as a Senior Data Scientist at CrowdFlower (now known as Figure Eight), a human-in-the-loop ML and AI company based in San Francisco.
(23:19) Nick talked about his next Senior Data Scientist role — working on Engagement Lead at Change Healthcare, a healthcare technology company that offers software, analytics, network solutions, and technology-enabled services to help create a stronger, more collaborative healthcare system.
(26:28) Nick discussed his transition to become a Senior Data Scientist at Womply, a SaaS-based software that is powered by transaction and online review data for millions of small businesses.
(30:08) Nick talked about his current role as a Senior Manager in the Data Science department at Johnson & Johnson's Health Technology group and shared the challenges of putting AI/ML algorithms into production in the healthcare domain.
(34:11) Nick shared his narrative of being a person who can facilitate communication between technical and nontechnical teams in the blog post "Drinks with a businessman" (with an anecdote including his grandfather).
(39:27) In reference to "A few thoughts on ML from the perspective of a behavioral scientist," Nick shared his advice for data scientists who want to develop the core skills including being able to generate and test hypotheses, to think critically about unfamiliar data, and to gauge how much you trust your result.
(41:37) Nick shared his findings in his 3-part blog series title "Being a grad student is a lot like being a startup" (Part 1, Part 2, and Part 3).
(46:21) In reference to "Data science — the way I see it," Nick talked about the methodological side of data science.
(49:05) Nick discussed how graduate students can leverage their skills to qualify for an industry role.
(52:17) Nick reflected on his efforts to stay active in academia while holding an industry job.
(54:09) Closing segment.
His Contact Info
His Recommended Resources
Stitch Fix Technology
Netflix Research
Fast Company's Most Innovative Data Science Companies in 2019
Going Pro in Data Science by Jerry Overton
Smart Thinking, Smart Change, and Brain Briefs by Art Markman
Data science is different now by Vicki Boykis
If you enjoyed this piece, I'd love it if you hit the clap button 👏 so others might stumble upon it. You can find my own code on GitHub and more of my writing and projects at https://jameskle.com/. You can also follow me on Twitter, email me directly or find me on LinkedIn.
Your Ultimate Guide to Data Science Interviews
Blue Ocean Thinker (https://jameskle.com/)

redpajama_set_name: RedPajamaCommonCrawl


The European Union has taken the priority to use materials more effi- ciently with the presentation of the action plan on the transition to circular economy in 2015. The aim is to reduce material intensity as well as to prevent the waste production and to treat waste in more sustainable and economically meaningful way. Plastic waste represent substantial challenge in this context. More than 25 million tonnes of plastic waste are produced in the Union every year. It represents one of the largest and the fastest growing categories of waste in Europe. Moreover the demand for plastic has been increasing over the years too due to its wide range of use in various sectors and industries.
At the same time, only approximately 30 percent of plastic waste is collected and recycled which is indeed very low gure. e remaining volume of plastic is incinerated, landfilled or littered, hence, contributing to large environmental problems such as greenhouse gas emissions, local pollution or marine litter. For example, 4 percent of the plastics production end up in the oceans every year, damaging the maritime ecosystems and negatively a ecting communities dependent on fisheries or tourism. Another example of the environmental impact of the unsus- tainable practices in plastic waste treatment is the fact that its incineration represents around one percent of global CO2 emissions. Simply by eliminating this practice we would be able to cut the emissions by 400 million tonnes a year.
It is evident that we need to adopt more sustainable ways we use plastic. Our priority should be to prevent the waste production, therefore, to support reuse of the plastic products which goes hand in hand with their better design. Also it will be important to limit the consumption of "single-use" plastics. ere has been some progress when it comes for example to plastic backs. However, we will have to focus on other items such as small packaging, disposable cups, lids, cutlery and other products of everyday use.
Nonetheless, it will not be possible to eliminate plastic waste production at all. For this reason, the new European plastic strategy will have to focus in particular on recycling. There is still substantial potential for improvement. As it has been already mentioned, almost 70 percent of the plastic waste is incinerated or landfilled, hence the material is lost for secondary use. e current practices are therefore highly ine cient from the economic and environmental point of view. There are two issues which will have to be addressed in order to improve the sit- uation. First, the European Union will have to support the market for secondary plastics. At the moment the demand for recycled plastics is approximately 6 percent of overall demand for plastics in the Union. Instead the majority of the plastic waste is exported and treated in third countries, for example China. e aim of the strategy should be to stimulate innovation in this sector, to increase the potential of the use of plastics as secondary material and to improve the design of products to make them more recyclable. Investments in new recycling and production capacities will have to be supported while at the same time product manufactures will have be stimulated to take more recycled plastics and integrate it into their production processes. For this purpose, economic instruments to reward the use of recycled material should be developed at the level of both the European Union and the Member States.
However, we will have to focus on the consumers and their behaviour too. With substantial amount of plastic to be mixed with other communal waste, it makes it more difficult and more expensive to separate it from other materials. Therefore, the con- sumers should be motivated to change their behaviour and attitudes to waste. More active information campaigns and education focused on more responsible handling of the waste will be important part of our future plastic strategy. Another possibility how consumers can play an active role in changing the situation is by changing their shopping behaviour. If con- sumers demand that products they purchase contain recycled plastics, the manufactures will have to re ect it in their design.
It is more than clear that tackling the issue of plastic waste will not be easy and will require various actions that will address di erent parts of the problem. However, we cannot achieve truly circular economy if we will keep irre- trievably losing two-thirds of plastic waste on land lls or in incineration plants.


The Racing Collection Series by Silhouette is perfect for those who want to infuse some playful style into their look. They feature a range of options to let you personalize your frames even further. Six different lens shapes range from rectangular to rounded. Plus, the six color combos feature a main color along the thin metal arm and a complementary color lining the temple tips. These edgy eyeglasses infuse some excitement into usually humdrum rimless frames.
When you choose Silhouette, you're saying goodbye to discomfort and the hassle of constantly adjusting your frames. Their lightweight frames are made using a premier titanium injection process. This ensures durability that won't warp or break over time.
Kounopt is proud to provide stylish designer eyewear like Silhouette Eyeglasses. Our team includes top optometrists and opticians who make it their goal to provide exceptional service. Once your eyeglasses are completed, they'll be shipped in fewer than 24 hours free of charge on orders over $30. Browse online to see our vast selection of eyewear.


St. Genevieve was born around 419 in Nanterre, near Paris. She moved to Paris after meeting Germanus of Auxerre and Lupus of Troyes and dedicated herself to a Christian life. In 451 she led a "prayer marathon" that was said to have saved Paris by diverting Attila's Huns away from the city. When Childeric I, besieged the city in 464 and conquered it, acting as an intermediary between the city and its conqueror. She convinced Childeric to release his prisoners.
Genevieve was described as a peasant girl born to a Frankish father and a Gallo-Roman mother. Germanus of Auxerre encouraged her, and she only wanted to live for God. She became a Nun at the age of fifteen. As a young woman, she was admired for her piety and devotion to works of charity, which included corporal austerities, and a vegetarian diet. These mortifications were continued for over thirty years, until her superiors thought it was their duty to make her diminish her austerities.
St. Genevieve had frequent visions of heavenly saints and angels. She reported her visions and prophesies, until her enemies conspired to drown her in a lake of fire. Through the intervention of St. Germain, their animosity was finally overcome. The Bishop appointed her to look after the welfare of the Nuns dedicated to God. By her instruction and example she led them to a high degree of sanctity.
In 451, just before the attack of the Huns under Attila, Genevieve, with the help of Germanus' Archdeacon, persuaded the panic-stricken people of Paris not to leave their homes and to pray. The intercession of St. Genevieve's prayers caused Attila's army to go to Orleans instead. During Childeric's siege and blockade of Paris in 464, she passed through the siege lines in a boat to Troyes, bringing grain to the city. She also pleaded to Childeric for the welfare of his prisoners of war, and received a favorable response. Later, Clovis I, liberated captives and showed greater lenience after Genevieve urged him to do so. He founded an abbey where Genevieve would minister, and where she herself was later buried. Under the care of the Benedictines, a monastery was established there. The Church witnessed numerous miracles at her tomb. St. Genevieve was canonized and the Church was rededicated in her name.
St. Genevieve was a spiritual young girl, and became a Nun at that age of fifteen. She led a "prayer marathon" that was said to have saved Paris by diverting Attila's Huns away from the city. St. Genevieve had frequent visions of heavenly saints and angels. She spent her time totally devoted to God, and bringing others to come to know Him. She was canonized and the Church celebrates her Feast Day on January 3rd.


text:
#37: OpenAI's neural network taxonomy, decoding text from brain implants, and models that don't exist
Hey everyone, welcome to Dynamically Typed #37! I've pushed the ML research section to the top of tod
Hey everyone, welcome to Dynamically Typed #37! I've pushed the ML research section to the top of today's newsletter because OpenAI's new Distill article is one of the most exciting things I've read in a long time: they investigated the early layers of Google's InceptionV1 vision network to an incredible level of detail, resulting in a first-of-its-kind taxonomy of "neuron groups." It's really cool stuff, so I'm covering it in depth.
Beyond that, I've got links to neurological work on decoding text from brain implant signals, and to Wayve's new LIDAR data augmentation tech. For productized AI, I'm covering a startup that's using GANs to synthesize fake models for ads, as well as links about AR acquisitions and more. Finally, for cool stuff, I found a paper that generates 2.5D-perspective images based on a single photo with depth information.
The largest neuron groups in the `mixed3a` layer of InceptionV1. (Olah et al., 2020)
Chris Olah and his OpenAI collaborators published a new Distill article: An Overview of Early Vision in InceptionV1. This work is part of Distill's Circuits thread, which aims to understand how convolutional neural networks work by investigating individual features and how they interact through the formation of logical circuits (see DT #35). In this new article, Olah et al. explore the first five layers of Google's InceptionV1 network:
Over the course of these layers, we see the network go from raw pixels up to sophisticated boundary detection, basic shape detection (eg. curves, circles, spirals, triangles), eye detectors, and even crude detectors for very small heads. Along the way, we see a variety of interesting intermediate features, including Complex Gabor detectors (similar to some classic "complex cells" of neuroscience), black and white vs color detectors, and small circle formation from curves.
Each of these five layers contains dozens to hundreds of features (a.k.a. channels or filters) that the authors categorize into human-understandable groups, which consist of features that detect similar things for inputs with slightly different orientations, frequencies, or colors. This goes from `conv2d0`, the first layer where 85% of filters fall into two simple categories (detectors for lines and for contrasting colors, in various orientations), all the way up to `mixed3b`, the fifth layer where there are over a dozen complex categories (detectors for small heads, for circles/loops, and much more). We've known that there are line detectors in early network layers for a long time, but this detailed taxonomy of later-layer features is novel—and it must've been an enormous amount of work to create.
A cicuits-based visualization of the black & white detector neuron group in layer `mixed3a` of InceptionV1. (Olah et al., 2020)
For a few of the categories, like black & white and small circle detectors in `mixed3a`, and boundary and fur detectors in `mixed3b`, the article also investigates the "circuits" that formed them. Such circuits show how strongly the presence of a feature in the input positively or negatively influences ("excites" or "inhibits") different regions of the current feature. One of the most interesting aspects of this research is that some of these circuits—which were learned by the network, not explicitly programmed!—are super intuitive once you think about them for a bit. The black & white detector above, for example, consists mostly of negative weights that inhibit colorful input features: the more color features in the input, the less likely it is to be black & white.
The simplicity of many of these circuits suggests, to me at least, that Olah et al. are currently exploring one of the most promising paths in AI explainability research. (Although there is an alternate possibility, as pointed out by the authors: that they've found a "taxonomy that might be helpful to humans but [that] is ultimately somewhat arbitrary.")
Anyway, An Overview of Early Vision in InceptionV1 is one of the most fascinating machine learning papers I've read in a long time, and I spent a solid hour zooming in on different parts of the taxonomy. The groups for layer `mixed3a` are probably my favorite. I'm also curious about how much these early-layer neuron groups generalize to other vision architectures and types of networks—to what extent, for example, do these same neuron categories show up in the first layers of binarized neural networks?
If you read the article and have more thoughts about it that I didn't cover here, I'd love to hear them. :)
Quick ML research + resource links 🎛 (see all 59 resources)
🧠 Neurologists Joseph Makin et al. at UC San Francisco used a-250 electrode brain implant to decode human brain signals into text with techniques from machine translation—at a word error rate of only 3%. The implant technology won't be widely usable anytime soon, if ever, but you can download the code it runs on anyway: jgmakin/machine_learning.
🚘 Shuyang Cheng et al. at self-driving car company Waymo have extended Google's reinforcement-learned image data augmentation technique, AutoAugment, to work with LIDAR data. Elon Musk still believes LIDAR sensors are useless "appendices" for self-driving cars but the rest of the industry, Waymo included, is evidently not getting anywhere closer to agreeing with that thesis.
None of these models exist. (Rosebud AI)
Rosebud AI uses generative adversarial networks (GANs) to synthesize photos of fake people for ads. We've of course seen a lot of GAN face generation in the past (see DT #6, #8, #23), but this is one of the first startups I've come across that's building a product around it. Their pitch to advertisers is simple: take photos from your previous photoshoots, and we'll automatically swap out the model's face with one better suited to the demographic you're targeting. The new face can either be GAN-generated or licensed from real models on the generative.photos platform. But either way, Rosebud AI's software takes care of inserting the face in a natural-looking way.
This raises some obvious questions: is it OK to advertise using nonexistent people? Do you need models' explicit consent to reuse their body with a new face? How does copyright work when your model is half real, half generated? I'm sure Rosebud AI's founders spend a lot of time thinking about these questions; and as they do, you can follow their along with their thoughts on Twitter and Instagram.
📓 I recently came across Martin Zinkevich's 24-page Rules of Machine Learning (PDF), "intended to help those with a basic knowledge of machine learning get the benefit of best practices in machine learning from around Google." Lots of good stuff in here.
💸 Acquisitions in the augmented reality space are heating up: in the past two weeks alone, Ikea bought Geomagical Labs (which works on placing virtual furniture in rooms; an obvious fit) and Pokémon Go developer Niantic acquired 6D.ai (which works on indoor mapping; another obvious fit).
📸 Cool new paper from Liu et al. (2020): Learning to See Through Obstructions proposes a learning-based approach that can remove things like chain fences and window reflections from photos (see the paper PDF for examples). This isn't yet productized, but of the collaborators works at Google—so: how long until this shows up up in the camera app for Pixel phones?
Cool Things ✨
Layered depth inpainting. (Shih et al., 2020)
Here's another cool AI art piece that can't be done justice using just the static screenshot above: Shih et al. (2020) published 3D Photography using Context-aware Layered Depth Inpainting at this year's CVPR conference. Here's what that means:
We propose a method for converting a single RGB-D input image into a 3D photo, i.e., a multi-layer representation for novel view synthesis that contains hallucinated color and depth structures in regions occluded in the original view.
Based on a single image (plus depth information), they can generate a 2.5-dimensional representation, realistically re-rendering the scene from slightly different perspectives from which it was originally taken. Contrast that with recent work on neural radiance fields, which requires on the order of 20 - 50 images to work (see DT #36).
Shih et al. set up a website with some fancy demos, which is definitely worth a look; see these gifs on Twitter too. One of the authors also works at Facebook, so I wonder if we'll one day see Instagram filters with this effect—or if it'll be a part of Facebook's virtual reality ambitions. Since the next generation of iPhones will likely have a depth sensor on the back too, I expect we'll see a lot of this 2.5D photography stuff in the coming years.
If you enjoyed this issue of Dynamically Typed, why not forward it to a friend? It's by far the best thing you can do to help me grow this newsletter. 🌞


Driving on a suspended is defined as "Any resident or non-resident who operates a motor vehicle in the commonwealth (while their) driver's license, learner's permit or privilege to drive a motor vehicle has been suspended or revoked or who has been directed not to drive by any court, by the DMV Commissioner, or by operation of law or who has been forbidden as prescribed by law, by the DMV Commissioner, the State Corporation Commission, the Commonwealth Transportation Commissioner, any court, or the Superintendent of the State Police.
What are the penalties for Driving on a Suspended License charge in Virginia?
It depends on if you've been convicted before. If a judge finds you guilty of driving on a suspended license and the violation is your first offense, you are guilty of a class 2 misdemeanor. The punishment for a class 2 misdemeanor is up to six months in jail and/or up to a $1,000.00 fine. If this is your second or subsequent offense, you are guilty of a class 1 misdemeanor. The punishment for a class 1 misdemeanor is up to 12 months in jail and/or up to a $2,500.00 fine. Also, for any conviction, the judge shall suspend your license further for the same period for which it had been previously suspended or revoked when you violated the law by driving on the suspended or revoked license.
Notice required for conviction: For the judge to find you guilty of driving on a suspended license, there must be proof that you knew your license was suspended. If the police officer asks you and you tell him or her your license is suspended when you are pulled over, that could be enough proof to convict you. If you told the officer you did not know your license was suspended, the officer will have to offer some other proof to the court to prove you knew it was suspended. A certified DMV abstract showing you were notified by the court or by a police officer would be adequate proof. A DMV abstract showing notice was mailed to you, it can be argued, is not adequate proof, because there is no way for the court to establish you actually received the notice.
1) Serious traffic/criminal infractions-If you are convicted of driving under the influence of alcohol or drugs, reckless driving, marijuana possession, and/or driving while your driving privilege is suspended or revoked, the judge can and in some cases must suspend your license to drive.
2) Failure to pay court fines/costs-If you fail to pay court fines and costs within 10 days of your court date, your license to drive will automatically be suspended by the court and DMV. You can request that the court clerk give you more than 10 days to pay the fines and court costs. If you do not pay the fines and court costs in full by the date set by the clerk, your license to drive will be suspended.
3) DMV demerit points- Your license will be automatically suspended by the DMW if you accumulate too many demerit points on your driving record within a specified period of time, or if you accumulate demerit points while on probation. The only way to avoid this suspension is to attend driving school and/or accumulate positive DMV points. You accumulate positive points for attending driving school and one positive DMV point for every year you drive without traffic convictions.
4) Civil judgement from auto accident- You can also have your driver' license suspended if someone has a civil judgement against you for damages arising from an automobile accident. The only way to have your license reinstated is to pay the judgment in full or have the judgment marked satisfied by the judgment holder.
If suspended, do not elude the police- If you know your license is suspended and find yourself being stopped by a police officer, resist the urge to elude the officer; you will just make the situation much, much worse. The police officer has the authority to arrest you on site for driving on a suspended license. The officer can decide; however, not to arrest you and might just give you a summons to appear in court. If you are uncooperative or if you try to flee, you can count on being charged with a felony and being arrested immediately.
Do I need an attorney? - If you are arrested for driving on a suspended license, speak to an attorney that concentrates on traffic infractions as soon as possible. A good attorney can evaluate your case and discover any defenses or mitigating circumstances. The attorney can present evidence; examine you, the police officer, and any witnesses; and negotiate with the commonwealth attorney prosecuting your case to achieve the best possible result when you go to court. Be sure to hire an attorney who specializes in traffic defense and who regularly practices in the jurisdiction where you were charged.
The best way to avoid having to face a driving on a suspended charge is not to drive when your license is suspended. If you did not know your license was suspended, be sure to tell the judge that fact on your return date.


text:
Q: Won't run based on condition a1 = int(0)
a2 = int(0)
b1 = int(0)
b2 = int(0)

while a1 and a2 != 10 or b1 and b2 != 10:
something

Basically the code won't run something, I'm not too sure what's wrong with my While conditions, any ideas?

A: while a1 and a2 != 10

does not check if both a1 and a2 are 10. It is two conditions, a1 and a2 != 10. And a1 evaluates to False since it is 0.
Also, you don't need to say int(0); just 0 is fine.

redpajama_set_name: RedPajamaStackExchange


Melatonin in a fragrance free and organic skin lotion to be used before bed time.
Ancient Minerals Magnesium Lotion Goodnight is a smooth, quickly absorbed emulsion of magnesium, MSM and melatonin in a skin-nourishing base of certified organic oils. Ancient Minerals Magnesium Lotion Goodnight is fragrance free, does not contain any formaldehyde releasing preservatives, and delivers 3mg melatonin and 25mg elemental magnesium per 1 mL.
Melatonin is a ubiquitous and powerful free radical scavenger. Production of melatonin is thought to decrease as we age. Rich in plant moisturizers including coconut oil and shea butter, this lotion soothes and hydrates without leaving your skin feeling waxy or greasy.
25mg elemental magnesium with 3mg melatonin and 25mg elemental organic sulfur (from OptiMSM®) per 1 ml / 1 full pump press.
Melatonin is an antioxidant hormone naturally produced in the body. Melatonin supports a healthy sle..
Melatonin can:Promote high-quality sleep and balance your "body clock"Offer antioxidant protection a..


text:
Russian Court Says No Need To Comply With $2 Billion Yukos Ruling
By RFE/RL
Once Russia's largest oil company, Yukos was broken up and sold at auction more than 10 years ago (file photo).
The Russian Constitutional Court has declared that Moscow has no obligation to comply with a European Court of Human Rights (ECHR) ruling that it pay nearly 1.9 billion euros ($2 billion) to shareholders of the defunct oil company Yukos.
Court Chairman Valery Zorkin pronounced the decision on January 19, saying that the Strasbourg court's judgments "cannot overrule the [Russian] constitution's priority in the Russian judicial system" and that the ECHR ruling violated the human rights of Russian citizens.
The court said the ECHR ruling violated Russia's constitution by seeking to force the Russian government to pay a large amount money that should instead be spent on domestic Russian needs.
Once Russia's largest oil company, Yukos was broken up and sold at auction after CEO Mikhail Khodorkovsky was arrested on financial crimes charges in 2003.
Khodorkovsky, who spent 10 years in prison, says his arrest and the breakup of Yukos were aimed at punishing him for challenging President Vladimir Putin and handing the company's assets to the state.
The former shareholders say the dismantling of Yukos was illegal and politically motivated and sued Russia in 2004, seeking $98 billion in compensation.
In 2015, Russia adopted a law saying that its constitution supersedes ECHR rulings.
Daniel Holtgen, spokesman for the secretary-general of the Council of Europe, called the Russian court's decision a "matter of concern" and said that the council's member states, which include Russia, "are bound by the European Convention on Human Rights to implement decisions of the Strasbourg Court."
With reporting by AP, dpa, Interfax, TASS and RIA
RFE/RL
RFE/RL journalists report the news in 26 languages in 22 countries where a free press is banned by the government or not fully established. We provide what many people cannot get locally: uncensored news, responsible discussion, and open debate.
LIKE FOLLOW Subscribe via RSS
Lawyers For Yukos, Russian Government Prepare For $50 Billion Appeal Case


Just in case you've read my sad tale in the latest issue of Threads Magazine (Issue 192/August/September 2017) about my doggie eating the wedding dress, I thought you might like to see some pictures of the actual dress. OK - so I don't have pictures of the destruction done. I wasn't "into" taking pictures back then, and I probably wouldn't have wanted to remind myself of the disaster. But I did borrow the dress to take some pictures of the "fixes". At the time, I was so sure that my patches were oh, so obvious to the whole world. So many years later, I had to really, really look to find my patches. Guess I didn't do so bad a job.
The edge of this shoulder was totally shredded.
This sleeve was also a chewed up mess. It required extra embroidery to cover up the edges of the patches, and that in turn required extra embroidery on the other sleeve so that they would match.
What really did allow me to make the "patches", was the fact that the skirt had to be shortened. The tulle layer of the skirt being somewhat A-line, I was able to salvage some of the skirt trim to use as patches elsewhere.
The dress did sustain some damage during the wedding. (All that delicate tulle was not meant for dancing with wild abandon.) And since I did borrow it for my pictures, I suppose I'll be nice and fix it as best as possible, in case they decide to have the dress cleaned and boxed.
Surprisingly innocent-looking. He's been gone to the big dog park in the sky for well over a year, but I still miss him terribly. I was amazed that the artist who drew the cartoon picture for the magazine got the essence of my "puppy" so right.
Instead of the usual pyjama pants class, this summer we're calling them shorts. We're using different patterns for the class, but these were made from Kwik Sew 3793. Yup, I managed to use some of that Canada Day fabric. And yes, these will be sent off to my son once they've done their duty showing off at the store.
Yet another class for beginners - summer tops. Kwik Sew has this same style in all sizes from Misses (K3610) to Girls (K3768) to Toddlers (K3934). I used a quilting cotton. Sewing up the tie as the pattern instructs would just make for a thick mess, so I substituted a length of ribbon. Much less work, and it does the job just as well. (Slides through that casing much more easily.) I had thought to make this for myself, but luckily had second thoughts. I'd look ridiculous trying to pull off this look. I know two sisters who will look adorable in these tops ... and they're due for presents.
Last but not least ... a tunic class. We sell Kwik Sew patterns at the shop, so the pattern choices had to come from there. Mine is (as the previous one you saw) Kwik Sew 3161. This is my final version. (Stay tuned - there's another version that came in between.) And since the linen/cotton mix was too plain - I had to add some embellishment.
I've bee feeling guilty about not yet answering a question in Comments from a while back. Here goes. The question posed by Audrey was, essentially, whether I am reimbursed for my samples. The answer is no, at least in my experience. Samples are the responsibility of the teacher. Because I imagine that seeing new and (hopefully) appealing samples will entice people to sign up for classes, I put a lot of effort into these items. I also try to plan things so that these samples will eventually end up in my wardrobe or be used as gifts. I also don't feel comfortable hanging up items for show that have been worn, so every time I churn out new stuff. I do wonder how others handle this situation. If anyone has any brilliant ideas to make my life easier - please do let me know. I'm already dreading the sewing marathon in August, getting ready for classes starting in September.
I am no quilter ... have I mentioned this before? But with Canada's Sesquicentennial, all sorts of Canada-themed fabrics started showing up at the sewing shop. For some unknown reason I had to join in the "fun".
One of the collections had a fabric with Canadian trivia questions (and answers) printed all over. I thought this would make an interesting wall hanging for my son. Unfortunately, whoever designed this fabric most probably had no intention of all 47 (I think it was 47) questions staying in one block to actually be read. Hence the rather odd shape of the middle piece. I nearly went crazy making sure that I didn't chop off anything important.
Among the questions of historical and geographic importance there is also such important information as: "Q.7. What type of shop does Canada have per capita, more than anywhere else? A. 7. Doughnut." We certainly have our priorities straight.
The questions fabric was hand stitched to the red fabric. Things started going a bit wonky at some point. Never mind - we're going for the "rustic look". By some miracle I did manage to finish by the beginning of the week and Canada Post actually managed to deliver yesterday. This will be hanging at Smugglers Smokehouse in Penticton, B.C.
There will be no more attempts at quilt-making for a very long time.


text:
Le canton d'Auch-Sud-Est-Seissan est une ancienne division administrative française située dans le département du Gers et la région Midi-Pyrénées.

Composition
Le canton d'Auch-Sud-Est-Seissan regroupait dix communes et comptait  habitants (population municipale) au  janvier .

|-
|Auch||align="right"|21 838||align="right"|32000||align="right"|32013
|-
|Auterive||align="right"|508||align="right"|32550||align="right"|32019
|-
|Boucagnères||align="right"|141||align="right"|32550||align="right"|32060
|-
|Haulies||align="right"|81||align="right"|32550||align="right"|32153
|-
|Labarthe||align="right"|142||align="right"|32260||align="right"|32169
|-
|Orbessan||align="right"|213||align="right"|32260||align="right"|32300
|-
|Ornézan||align="right"|237||align="right"|32260||align="right"|32302
|-
|Pessan||align="right"|634||align="right"|32550||align="right"|32312
|-
|Sansan||align="right"|89||align="right"|32260||align="right"|32411
|-
|Seissan||align="right"|1 002||align="right"|32260||align="right"|32426
|}
(1) fraction de commune, Auch quartiers Sud-Est.

Administration

Démographie

Voir aussi
 Gers
 Arrondissements du Gers
 Cantons du Gers
 Communes du Gers
 Liste des conseillers généraux du Gers

Liens externes
 Le canton d'Auch-Sud-Est-Seissan sur le site de l'Insee
 plan du canton d'Auch-Sud-Est-Seissan sur Mapquest
 Localisation du canton d'Auch-Sud-Est-Seissan sur une carte de France

Notes et références

Auch-Sud-Est-Seissan
Auch

redpajama_set_name: RedPajamaWikipedia


text:
Page 1,038
Wichita dog park to be named for fallen police K-9
admin June 13, 2017 0
The Wichita City Council has approved naming a local dog park after a police K-9 killed in the line of duty earlier this year. Wichita Parks and Recreation Director Troy Houtman said Meridian Dog Park at 2127 North Meridian will be named "K-9 Rooster Park. Link.
Wichita renames park in honor of slain police dog Rooster
the Wichita police dog killed in the line of duty in March. The Wichita City Council voted unanimously Tuesday to rename the Meridian Dog Park at 2127 N Meridian as "K-9 Rooster Park." Three police officers and their canine partners watched from the … Link.
Paw Patrol: Police Force Introduces Its Newest K-9 Members and They're Too Cute
The puppies will be trained in NPA's K-9 Anti Bomb and Drug unit based in Taipei and when they're older, they will help sniff out bombs and drugs. Their mother is one of 22 adult dogs inside the police force's K-9 unit. The puppies — Lucky Star … Link.
Police dog handler visits Kingwood School for gifted and talented fair
Some topics included World War 1, optical illusions, fishing, and Rock n Roll. Riley Donnelly, a 6 th grader at KTS, researched police K-9 dogs and the vests they wear to keep them safe. Sgt. and handler, Carlos Ferreiro and K-9, Polis, from the Readington … Link.
Taiwanese Police K-9 Unit's Newest Recruits Are the Most Adorable Puppies on the Force
These police puppies are taking the phrase good dog to a whole other level. The K-9 unit of Taiwan's National Police Agency (NPA) has announced the arrival of a few new recruits, a litter of six puppies, who will use their powers of extreme cuteness to … Link.
Three Injured in Crash Involving Trooper, K-9
ORANGE COUNTY, Florida — Three people were injured Monday in a crash involving a Florida Highway Patrol trooper and his police dog on State Road 528 in Orange County, authorities said. The crash happened about 2:45 p.m. as the trooper was trying to pull … Link.
Larger K9 service dogs can find homes in HDB flats under new scheme
Have you ever wondered what happens to 'K9' dogs in the Singapore Police Force (SPF) dog unit once they retire? For many K9 handlers who have forged a bond with their furry partners, the right thing to do would be to bring these dogs home and provide for them. Link.
Must see: 'Vicious' police puppies steal hearts
The National Police Agency in Taiwan has a few new recruits … but for now their only job is to look cute. The six dogs will train to be part of NPA's K-9 Anti Bomb and Drug unit and will be based in Taipei, following in their mom's paw-steps … Link.
Meet 'the cutest police dog ever': One-month-old Labrador 'Fushin' is the newest member of a Taiwanese squad
They were debuted to the public after officers at the New Taipei City Police Department uploaded pictures of the canines to the department's Facebook account. Their parents, Leader and Yellow, are both two years old. They are sniffer dogs at the K9 Unit … Link.
South Bend police donating K9 vehicle to a department in need
Recently, the police department in Alexandria, Ind. had to remove its K9 officer from duty because the frame of the vehicle equipped to transport the dog started to crack and was no longer safe. This was a major setback for the town of about 5,000 located … Link.


Lovelovelove the rug. The colors are so pretty, and the quality is about as good as you can possibly get for $257. ALSO lovelovelove the green flower chair. In another room they would work together, but it just didn't mesh in real life in the boys room. I want their room to feel simple, and the combo felt complicated. On paper it worked, so what happened?
Designing a room is not necessarily a sleek and linear process. You can have the best, most complete, well thought out plan ready to go, and then something doesn't work in real life. Case in point: fabulous chair + dreamy rug = decor competition that doesn't mesh.
Which leads to this point: STAY FLEXIBLE. Allow for plans to change. The main direction of the boys bedroom is the same, and most of the elements are just what I initially planned… but now we are on the third rug. And you know what they say about the third time being the charm? It's true.
Once I nailed down that it was the rug that had to change (not moving that chair!!), I decided a giant neutral shag was the way to go. My younger son comes to hang out in my office just to lie on my shag rug.
But have you ever shopped for a 9x12 rug? $$$!!!
I was shopping on a site that had 45% off advertised, and kept trying to do the calculations, all the while wondering why they weren't showing the sale price, as they usually did. Then I realized they WERE showing the sale price, and $500+ was about as good as it got. Buh-byeeee!
Thanks to trusty old Amazon for a 9x12 shag with great reviews for $155! Remember, boys are kind of gross. I might have cleaned boogers off the wall before I repainted their room. So we're not spending big bucks on their rug. Maybe when they are older. Though do boys ever get less gross? I feel like we're just going to move from boogers to modeling clay and stinky socks.
This bedroom has the unique challenges of no ceiling light and only 2 outlets. So I have to run the cord for the floor lamp 13 feet across the room and behind the bookcase to plug it in. The extra bonus of the larger rug (my poor little zebra that is no more was only 7'6" x 9'6") is that I can run the extension cord UNDER the rug. Yes. I agree it would be better to install another outlet, but it's not in the works right this second.
The next best surprise was that the rug arrived a week early, tonight as we were sitting down to dinner! Due to it's giant size, it was folded in half after being rolled, and then plastic wrapped into a giant green blob, so I'm going to let it flatten out a bit more before any pictures happen.
One of the biggest projects I tackled this week was painting the boys doors. The door into their room is in the same corner as their closet door, at 90 degrees from each other. Together they provide an irresistible opportunity to introduce a little more color into the room.
I've been debating green vs. blue and bold vs. subtle for weeks, and finally decided yesterday morning it was time to bite the bullet. After pinning about 40 doors, I picked three green colors and painted samples on one of the doors. That clarified things immediately! Green was out of the running, and I would stick to a light blue… or two… Benjamin Moore's Watercolor Blue (793) and Mystical Blue (792).
One more area I made (some) progress in this week was lighting. I ordered small wall-mounted sconces from Urban Outfitters, and when they arrived it took about 20 minutes to get them both mounted by their beds. So simple! I wanted something low profile so the boys don't bump into them at night, particularly on the lower bunk. You will notice, though, that the Emperor has no clothes. I still don't have the right light bulbs almost a full week later. I also need to get a flat-head extension cord to plug in instead of having both cords sticking out of the outlet.
I know. This looks mostly the same, except the books are slightly tidier and I swapped out the bins for baskets.
I've done the black-wash treatment to the wood for the KALLAX unit, and thanks to my dad have also cut it down to size (I don't have a table saw of my own… yet.). Next I need to sand/poly/sand/poly it, then attach the wood. So that will be another week or two, depending on weather and time management.
Plenty still to come, from art and textiles to dressing up their curtain panels, finding the perfect thrifted footstool / side table for next to the chair, sorting out bedding, and pulling together the ceiling treatment. Moving full speed ahead!
Be sure to check out the 20 featured designers and all the guest participants on the One Room Challenge Blog, link below! There are some great projects happening, and I'll be sharing about some of them coming up soon on Instagram. Be sure to follow me on the 'gram to be in the know!
It's only been a few days, and the moodboard for the boys room has already seen significant changes. It started out with a geometric rug that I'd had my eye on for some time… but that rug didn't really work with my craigslist chair find.
So I went back to the drawing board, and focused on light colored neutral rugs. I was almost sold on a plush cream shag, when I came across this zebra print from RugsUSA. It was an "aha" moment, but it's so different from what I'd initially had in mind that I decided to run it by my two favorite decor buddies. They both agreed that it added the right touch, so I immediately pulled the trigger to take advantage of the 55% off Columbus Day sale. Usually I'd sleep on it, but I didn't want it to get sold out and go on backorder past the One Room Challenge deadline!
Yes, it is a very light colored rug. Yes, it's going into a boys room. But we are a no shoes in the house family, and I'm going to Scotchguard the crap out of it. And then cross my fingers that we never have another Blueberry Vomit Situation again.
The addition of the chair and change in rug have clarified the direction of the room, and I'm so excited to see it all move forward. Now that I've painted the trim, walls, and ceiling, I can get going on some of the fun stuff.
The boys already have the KURA loft bed from IKEA, and I'm going to be adding blue and white stripe curtains on the side and end. My three year old loves to have a cave-like bed, and currently has most of his dress up clothes tucked in various places. When you duck down and look in, you can see his Batman cape and policeman jacket hanging side by side from the slats that hold big bro's mattress up. On the long side he has scarves tied on, and the latest addition today was a scarf that he fashioned into a hammock for his favorite stuffie.
Customizing their KALLAX shelving unit. I have an image in my head of a wood wrap that waterfalls into legs that hold it up about 4 inches off the ground. And I'm sure that makes no sense to most people because as of right now it only exists in my head, but in my head it's really cool.
Grosgrain ribbon detailing on the existing blackout curtains in a grid pattern. The curtains are staying because these boys NEED blackout curtains. Our lives are all miserable without them.
As mentioned above, bed curtains. And tomorrow I'll be taking advantage of the warmer weather to spray paint the cafe curtain clips to hold said curtains on the rod. Black rod + oil rubbed bronze clips = blech! I looked everywhere for black clips, but they don't exist (Amazon, you let me down!) so spray paint it is.
I MIGHT also spray paint a set of lamps that I have for their room, but am torn between finding something new (old) on craigslist and selling these, or spray painting them. We'll see.
Art. ART! Finally. I'm planning a giant map above their shelving unit. And have a couple other ideas percolating.
I have an idea for a sort of miniature bunting that would hang at ceiling level and cris-cross from wall to wall. Kind of like string art, but on a larger scale. And with color. And again, impossible to show an example of before I just do it. This one's going to either be really really cool, or really really awful. Totally depends on execution, I think.
And with that, I'm off to get sewing!


text:
Q: Loading an object within an add to linked list method Here is the code I am having trouble with as well as a link to the classes that I am working with https://github.com/felipeachavoya/Projects.git.
public void addInterest(Interest interest) {
    interest = new Interest();
    interest = interest.Interest();
    topics.add(interest);
}

The addInterest() method within the member class is supposed to create an instance of an interest using the class Interest, and then add that interest object into a linked list within the member class. However, when the addInterest() method is called, it also needs to  prompt the user to input the topic (String) and the level of interest to said topic (int) before that object is added to the linked list. I don't know how to do that though and when I tried using it gave me an error saying the method Interest() in the type Interest is not applicable for the arguments (). Any ideas?
EDIT: I don't know if the link I posted is working so I'm just going to post here the interest class with the two private variables and constructor method.
public class Interest extends Member implements Serializable {
    private String topic;
    private int level;

    public void Interest(String topic, int level) {
        Scanner in = new Scanner(System.in);

        System.out.print("Topic: ");
        this.topic = in.nextLine();

        System.out.println("Level (1 - 10): ");
        this.level = in.nextInt();

        in.close();
       }
    }

A: You can solve this in several ways, but I will try to give you as much of a helping hand as I can.
public void addInterest(String topic, int level) {
    Interest interest = new Interest(topic, level);
    /*YOUR CODE HERE TO ADD interest TO THE LINKD LIST*/
}

This is most likely the easiest way of doing it. But I don't know the context of your program. With the solution above, each time you call the addInterest method, all you need to provide is the topic and the level of interest.
You can get the topic and level of interest from the user.
See: https://www.w3schools.com/java/java_user_input.asp
Hope this helps! Ask away if this did not solve your problem


text:
@implementation LBMineCenterHotPickView

@end


text:
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** @author  John Miller
 *  @version 1.2
 *  @date    Mon Nov  2 15:05:06 EDT 2009
 *  @see     LICENSE (MIT style license file).
 */

package apps.process

import scalation.model.Modelable
import scalation.process._
import scalation.random.{Exponential, Uniform, Variate}

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** The `Machine` object defines a particular scenario under which to execute the
 *  machine model.
 *  > run-main apps.process.Machine
 */
object Machine extends App with Modelable
{
    val lambda   = 6.0       // part arrival rate (per hour)
    val mu       = 7.5       // part service rate (per hour)
    val nUnits   = 1         // the number of machines at each stage/station
    val maxParts = 50        // stopping rule: simulate maxParts parts

    //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    /** Run the simulation of the `MachineModel`.
     *  @param startTime  the start time for the simulation
     */
    def simulate (startTime: Double)
    {
        val mm = new MachineModel ("Machine", maxParts, Exponential (HOUR/lambda), nUnits, Exponential (HOUR/mu),
                                   Uniform (30*MINUTE-10, 30*MINUTE+10))
        mm.simulate ()
    } // simulate

    simulate (0.0)

} // Machine object

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** The `MachineModel` class defines a process-interaction model of a simple
 *  two-stage manufacturing process.
 *  @param name        the name of the machine model
 *  @param nArrivals   the number of arrivals to generate (stopping condition)
 *  @param iArrivalRV  the inter-arrival time distribution
 *  @param nUnits      the number of service units
 *  @param serviceRV   the service time distribution
 *  @param moveRV      the time distribution for motion along transports
 */
class MachineModel (name: String, nArrivals: Int, iArrivalRV: Variate,
                    nUnits: Int, serviceRV: Variate, moveRV: Variate)
      extends Model (name)
{
    val entry       = Source ("entry", this, Part, 0, nArrivals, iArrivalRV, (100, 390))
    val machine1Q   = WaitQueue ("machine1Q", (330, 390), 3)
    val machine1    = Resource ("machine1", machine1Q, nUnits, serviceRV, (350, 385))
    val machine2Q   = WaitQueue ("machine2Q", (530, 390), 3)
    val machine2    = Resource ("machine2", machine2Q, nUnits, serviceRV, (550, 385))
    val ship        = Sink ("ship", (800, 390))
    val scrap       = Sink ("scrap", (430, 600))
    val toMachine1Q = new Transport ("toMachine1Q", entry, machine1Q, moveRV)
    val toMachine2Q = new Transport ("toMachine2Q", machine1, machine2Q, moveRV)
    val toShip      = new Transport ("toShip", machine2, ship, moveRV)
    val toScrap1    = new Transport ("toScrap1", machine1Q, scrap, moveRV)
    val toScrap2    = new Transport ("toScrap2", machine2Q, scrap, moveRV)

    addComponent (entry, machine1Q, machine1, machine2Q, machine2, ship, scrap,
                  toMachine1Q, toMachine2Q, toShip, toScrap1, toScrap2)

    case class Part () extends SimActor ("p", this)
    {
        def act ()
        {
            toMachine1Q.move ()
            if (machine1.busy) {
                if (! machine1Q.waitIn ()) {
                   toScrap1.move ()
                   scrap.leave ()
                   return
                 } // if
            } else {
                machine1Q.noWait ()
            } // if
            machine1.utilize ()
            machine1.release ()

            toMachine2Q.move ()
            if (machine2.busy) {
                if (! machine2Q.waitIn ()) {
                   toScrap2.move ()
                   scrap.leave ()
                   return
                 } // if
            } else {
                machine2Q.noWait ()
            } // if
            machine2.utilize ()
            machine2.release ()

            toShip.move ()
            ship.leave ()
        } // act

    } // Part

} // MachimeModel class


text:
By Request: How the Delta Wave has ravaged Red America, month by month.
Instead of looking at the cumulative county-level COVID death rates by 2020 partisan lean since the Delta Variant wave hit the United States in June, the graphs below look at how that has played out for each individual month since then.
Again, the COVID death data comes from Johns Hopkins University for 47 states + DC; the data for Nebraska and Utah comes from the New York Times COVID tracker github; and for Florida, it comes from the White House COVID-19 Team Community Profile Report.
The data does not include the U.S. territories (since they don't vote in the November Presidential election), and it's also missing around 4% of total COVID deaths across the 50 states + DC due to their county of residence being unknown.
With that in mind, here's what the Delta wave has looked like in June, July, August, September, October, November and the first 2 weeks of December 2021:
The first thing worth noticing is that while Delta hit the U.S. shores sometime in June, the death toll from it didn't really start hitting on a significant scale until August. In fact, August is when the Red/Blue death rate ratio has been the highest since the Delta wave started, which surprised me (I assumed the gap was highest in October). During the full month of August 2021, the COVID death rate was over 7.3x higher in the reddest tenth of the U.S. than in the bluest tenth.
The next thing to note is that September has been by far the ugliest month of the Delta wave to date (so far). Over 65,000 Americans died in September 2021. The reddest bracket was nearly 6.9x higher than the bluest:
Finally, here's what it looks like for the first 2 weeks of December. Notice how, after the red/blue ratio dropped substantially from October to November (from 5.8x to 4.7x), it's since shot back up again for the first half of December:
Update 8:05am 12/17/21: Welcome NY Times readers! My original graph for December only included 12/01 - 12/14; I've updated it to include 2 more days, and have also added a projection for the full month of December based on the first 16 days of the month.
Update 12/20/21: I've updated the December-only graph to run from 12/01 - 12/19. The gap isn't quite as steep as my projection from last week but the reddest bracket is still running 5.6x higher than the bluest bracket.
Update 10:05am 12/17/21: In response to some frequently asked questions:
"What about adjusting for age? Don't Republicans tend to be older than Democrats?"
This has been addressed by Gregory Travis and myself here.
"Aren't you cherry picking by only starting in June 2021? What about all those heavily-Dem cities which were hit hard in the first wave?"
Here's a look at how the COVID death rate has broken out by county-level partisan lean over time since the pandemic started in early 2020.
"All this shows is WHERE Americans are dying, not WHO'S dying. Even deep red counties still have blue patches and vice-versa, so for all you know, most of the deaths in the red counties could still be Democrats!"
You're correct, and I've made that point repeatedly. I have attempted to estimate how many actual GOP vs. Dem voters have died of COVID based on the county-level data since the 2020 election, and my crude estimate suggests that perhaps 50% more Republicans have died than Democrats...but this estimate makes some big assumptions.