text:
CascadiaJS is a community run conference by web developers for web developers. It has been run by volunteers since its inception in 2012, but has never made it clear how people can participate and contribute to the experience. This document, influenced heavily by the open source software community, hopes to [document explicitly](https://medium.com/node-js-javascript/building-a-better-node-community-3f8f45b45cb5#eaf0-117692598f79) how someone can contribute to CascadiaJS. Please read this document in its entirety if you're thinking about getting involved. If you have any questions or concerns about this document, please file an issue and we will respond promptly.

## Contents
* [The good, the bad and the ugly](#the-good--the-bad-and-the-ugly)
* [Roles and ownership](#roles-and-ownership)
* [Join the conversation](#join-the-conversation)
* [Reporting bugs](#reporting-bugs)
* [Be willing to add to your toolbelt](#be-willing-to-add-to-your-toolbelt)
* [Share your experiences](#share-your-experiences)
* [Be a good citizen ](#be-a-good-citizen)
* [Appendix](#appendix)

## The Good, The Bad and The Ugly

Contributing to CascadiaJS (or any community conference) can be a truly rewarding experience. It is an opportunity to create a shared experience that brings hundreds of people together to share knowledge, get to know one another and have a great time. You will play a part in giving brilliant people who have never spoken before a platform to express their ideas to the world. Products, platforms and companies will spin out of the conversations over Whiskey.js that you help facilitate.

But it's not all roses. In fact, it's often hard, dull, detailed-oriented work that starts 6-9 months prior to the conference. The tip of the iceberg that you can see (the conference) barely hints at the total amount of person-hours that go in to making it happen. Take an honest assessment of the spare time you have.

And finally, the very people you are working so hard for (the attendees) are often unappreciative of your hard work and sometimes downright mean. The people who get the most out of contributing to CascadiaJS are the kind of people for whom service to the community is its own reward.

## Roles and Ownership

If you'd like to contribute to CJS15, below is a list of roles that we could use some help with:

### Curator

This year's CascadiaJS is going to be different from year's past, we are going to curate [3 days of content](README.md#new-structure). Shared infrastructure that spans all 3 of these events will be taken care of: event space, ticketing, catering, Wi-Fi, etc. The responsibilities for the curator for individual days will be to build a small team that can handle everything else and really breath life into each day. It is a high stress, high reward role because at the end of the day you are responsible for the entire event.

[Learn More](https://github.com/cascadiajs/2015.cascadiajs.com/issues/6)

### Website

Own the web content cradle to grave, including updates as tickets go on sale, speakers are announced, etc. You are responsible for the design of the site, shipping timely updates and fixing bugs.

[Learn More](https://github.com/cascadiajs/2015.cascadiajs.com/issues/7)

### CFS/speakers

Manage the Call for Speakers and work aggressively to solicit submissions from a HIGHLY diverse group of people, where diversity includes but is not limited to: gender, race, geography, occupation and experience. Your responsibilities include: sourcing great submissions, building a committee to review submissions / select talks and taking care of the speakers during the conference.

[Learn More](https://github.com/cascadiajs/2015.cascadiajs.com/issues/8)

### Logistics

Manage the coordination of vendors and volunteers leading up to and during the conference.

[Learn More](https://github.com/cascadiajs/2015.cascadiajs.com/issues/9)

### Marketing

Spread the word far and wide about the conference.

[Learn More](https://github.com/cascadiajs/2015.cascadiajs.com/issues/10)

### Sponsors

Wrangle sponsors.

[Learn More](https://github.com/cascadiajs/2015.cascadiajs.com/issues/11)

## Join the conversation

There are several channels that the CascadiaJS community congregates, please feel free to join any/all of them and spend some time listening and getting to know people. To be honest, things are kind of quiet in between conferences. If you have any ideas on how to keep the conversation going, please let us know!

* [Gitter](https://gitter.im/cascadiajs/2015.cascadiajs.com)
* Twitter - @CascadiaJS or #CJS15
* IRC - #cascadiajs on irc.freenode.net

## Reporting bugs

Everything has bugs, including conferences. If you see something that you think should be fixed, please don't hesitate to file an [issue](https://github.com/cascadiajs/2015.cascadiajs.com/issues) or submit a PR.

## Be willing to add to your toolbelt

A major factor that often keeps developers from participating in community events is a lack of comfort with the tools and workflows that are typically employed.  Depending on your background, these may be things that you have experience with or they may be intimidating obstacles that send you running for the hills. Try to keep an open mind and remember that it's ok to ask questions.

## Share your experiences

Many would-be organizers or contributors never even figure out how to get started because Google fails to provide much insight on how community events actually work. This document is an "ok" first step, but ultimately we are ALL responsible for documenting the things we've learned and posting them online where they can be indexed and curated into collections of useful information.

## Be a good citizen

Finally, before you dive into contributing to CascadiaJS please read our [Code of Conduct](/COC.md).

## Appendix

Below are just some of the resources that we used to build this document. If there are other resources that you think are missing, please send us a PR and we would love to add them.

* [Building a better Node community](https://medium.com/node-js-javascript/building-a-better-node-community-3f8f45b45cb5)
* [Github - contributing to open source](https://guides.github.com/activities/contributing-to-open-source/index.html)
* [Contributing to jQuery](http://contribute.jquery.org/open-source/)
* [Contributing to IO.js](https://github.com/iojs/io.js/blob/master/CONTRIBUTING.md)
* [Getting involved with Apache](http://www.apache.org/foundation/getinvolved.html)
* [New Relic - getting started with open source](http://blog.newrelic.com/2014/05/05/open-source_gettingstarted/)


text:
<html>
<body>
@section('sidebar')
This is the master sidebar.
@show

<div class="container">
    @yield('content')
</div>
</body>
</html>

redpajama_set_name: RedPajamaGithub


text:
from collections import OrderedDict
import re
from subprocess import check_output, STDOUT, CalledProcessError
import sys

TOTAL = 'ALL'
NUM_RUNS = 3
DEFAULT_THRESHOLD = 10
# explicit thresholds that deviate from the default
THRESHOLDS = {
    'network': 30,
    'vm': 30,
    'batch': 30,
    'storage': 50,
    TOTAL: 300
}

def init(root):
    parser = root.add_parser('module-load-perf', help='Verify that modules load within an acceptable timeframe.')
    parser.set_defaults(func=run_verifications)

def mean(data):
    """Return the sample arithmetic mean of data."""
    n = len(data)
    if n < 1:
        raise ValueError('len < 1')
    return sum(data)/float(n)

def sq_deviation(data):
    """Return sum of square deviations of sequence data."""
    c = mean(data)
    return sum((x-c)**2 for x in data)

def pstdev(data):
    """Calculates the population standard deviation."""
    n = len(data)
    if n < 2:
        raise ValueError('len < 2')
    ss = sq_deviation(data)
    return (ss/n) ** 0.5

def print_values(data):
    print('{:<20} {:>12} {:>12} {:>12} {:>25}'.format('Module', 'Average', 'Threshold', 'Stdev', 'Values'))
    for key, val in data.items():
        print('{:<20} {:>12.0f} {:>12.0f} {:>12.0f} {:>25}'.format(
            key, val['average'], val['threshold'], val['stdev'], str(val['values'])))

def run_verifications(args):
    regex = r"[^']*'([^']*)'[\D]*([\d\.]*)"

    results = {TOTAL: []}
    try:
        use_shell = sys.platform.lower() in ['windows', 'win32']
        # Time the module loading X times
        for i in range(0, NUM_RUNS + 1):
            lines = check_output('az -h --debug'.split(), shell=use_shell, stderr=STDOUT)
            if i == 0:
                # Ignore the first run since it can be longer due to *.pyc file compilation
                continue

            try:
                lines = lines.decode().splitlines()
            except:
                lines = lines.splitlines()
            total_time = 0
            for line in lines:
                if line.startswith('DEBUG: Loaded module'):
                    matches = re.match(regex, line)
                    mod = matches.group(1)
                    val = float(matches.group(2)) * 1000
                    total_time = total_time + val
                    if mod in results:
                        results[mod].append(val)
                    else:
                        results[mod] = [val]
            results[TOTAL].append(total_time)

        passed_mods = {}
        failed_mods = {}

        mods = sorted(results.keys())
        bubble_found = False
        for mod in mods:
            val = results[mod]
            mean_val = mean(val)
            stdev_val = pstdev(val)
            threshold = THRESHOLDS.get(mod) or DEFAULT_THRESHOLD
            statistics = {
                'average': mean_val,
                'stdev': stdev_val,
                'threshold': threshold,
                'values': val
            }
            if mean_val > threshold:
                if not bubble_found and mean_val < 30:
                    # This temporary measure allows one floating performance
                    # failure up to 30 ms. See issue #6224 and #6218.
                    bubble_found = True
                    passed_mods[mod] = statistics
                else:
                    failed_mods[mod] = statistics
            else:
                passed_mods[mod] = statistics

        if not failed_mods:
            print('== PASSED MODULES ==')
            print_values(passed_mods)
            print('\nPASSED: Average load time all modules: {} ms'.format(
                int(passed_mods[TOTAL]['average'])))
            sys.exit(0)
        else:
            print('== PASSED MODULES ==')
            print_values(passed_mods)
            print('\nFAILED MODULES')
            print_values(failed_mods)
            sys.exit(1)
    except CalledProcessError as ex:
        print(ex.output)


text:
class AddDelayedJobsStrand < ActiveRecord::Migration
  def connection
    Delayed::Backend::ActiveRecord::Job.connection
  end

  def up
    add_column :delayed_jobs, :strand, :string
    add_index :delayed_jobs, :strand
  end

  def down
    remove_column :delayed_jobs, :strand
  end
end


text:
<?php

require_once(dirname(__FILE__) . "/../autoload.inc.php");
require_once(dirname(__FILE__) . "/../RodsGenQueryNum.inc.php");

class RP_InxValPair extends RODSPacket
{
    public function __construct($isLen = 0, array $inx = array(), array $svalue = array())
    {
        $packlets = array("isLen" => $isLen, 'inx' => $inx, 'svalue' => $svalue);
        parent::__construct("InxValPair_PI", $packlets);
    }

    public function fromAssocArray($array)
    {
        if (!empty($array)) {
            $this->packlets["isLen"] = count($array);
            $this->packlets["inx"] = array_keys($array);
            $this->packlets["svalue"] = array_values($array);
        } else {
            $this->packlets["isLen"] = 0;
            $this->packlets["inx"] = array();
            $this->packlets["svalue"] = array();
        }
    }

    public function fromRODSQueryConditionArray($array)
    {
        $this->packlets["isLen"] = 0;
        $this->packlets["inx"] = array();
        $this->packlets["svalue"] = array();

        if (!isset($array)) return;

        $this->packlets["isLen"] = count($array);
        foreach ($array as $cond) {
            $this->packlets["inx"][] = $cond->name;
            $this->packlets["svalue"][] = "$cond->op '$cond->value'";
            //echo "<pre> $cond->op '$cond->value' </pre>";
        }
    }
}


text:
<?php

namespace UnitTests\PhpUnitGen\Model\PropertyTrait;

use PHPUnit\Framework\TestCase;
use PhpUnitGen\Model\ParameterModel;
use PhpUnitGen\Model\PropertyInterface\TypeInterface;

class TypeTraitTest extends TestCase
{
    /**
     * @covers \PhpUnitGen\Model\PropertyTrait\TypeTrait::setType()
     * @covers \PhpUnitGen\Model\PropertyTrait\TypeTrait::getType()
     */
    public function testMethods(): void
    {
        $parameter = new ParameterModel();
        $parameter->setType(TypeInterface::OBJECT);
        $this->assertSame(TypeInterface::OBJECT, $parameter->getType());
        $parameter->setNullable(true);
        $this->assertTrue($parameter->nullable());
        $this->assertNull($parameter->getCustomType());
        $parameter->setCustomType('MyClass');
        $this->assertSame('MyClass', $parameter->getCustomType());
    }
}