text:
"""Tokenization classes."""

from __future__ import absolute_import, division, print_function, unicode_literals

import collections
import logging
import os
import six
import unicodedata
from io import open

from .tokenization_bert import BertTokenizer, BasicTokenizer, WordpieceTokenizer, load_vocab
from .tokenization_utils import PreTrainedTokenizer

logger = logging.getLogger(__name__)

VOCAB_FILES_NAMES = {'vocab_file': 'vocab.txt'}

PRETRAINED_VOCAB_FILES_MAP = {
    'vocab_file':
    {
        'bert-base-japanese': "https://s3.amazonaws.com/models.huggingface.co/bert/cl-tohoku/bert-base-japanese-vocab.txt",
        'bert-base-japanese-whole-word-masking': "https://s3.amazonaws.com/models.huggingface.co/bert/cl-tohoku/bert-base-japanese-whole-word-masking-vocab.txt",
        'bert-base-japanese-char': "https://s3.amazonaws.com/models.huggingface.co/bert/cl-tohoku/bert-base-japanese-char-vocab.txt",
        'bert-base-japanese-char-whole-word-masking': "https://s3.amazonaws.com/models.huggingface.co/bert/cl-tohoku/bert-base-japanese-char-whole-word-masking-vocab.txt"
    }
}

PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES = {
    'bert-base-japanese': 512,
    'bert-base-japanese-whole-word-masking': 512,
    'bert-base-japanese-char': 512,
    'bert-base-japanese-char-whole-word-masking': 512
}

PRETRAINED_INIT_CONFIGURATION = {
    'bert-base-japanese': {
        'do_lower_case': False,
        'word_tokenizer_type': 'mecab',
        'subword_tokenizer_type': 'wordpiece'
    },
    'bert-base-japanese-whole-word-masking':{
        'do_lower_case': False,
        'word_tokenizer_type': 'mecab',
        'subword_tokenizer_type': 'wordpiece'
    },
    'bert-base-japanese-char': {
        'do_lower_case': False,
        'word_tokenizer_type': 'mecab',
        'subword_tokenizer_type': 'character'
    },
    'bert-base-japanese-char-whole-word-masking': {
        'do_lower_case': False,
        'word_tokenizer_type': 'mecab',
        'subword_tokenizer_type': 'character'
    }
}

class BertJapaneseTokenizer(BertTokenizer):
    """BERT tokenizer for Japanese text"""

    vocab_files_names = VOCAB_FILES_NAMES
    pretrained_vocab_files_map = PRETRAINED_VOCAB_FILES_MAP
    pretrained_init_configuration = PRETRAINED_INIT_CONFIGURATION
    max_model_input_sizes = PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES

    def __init__(self, vocab_file, do_lower_case=False,
                 do_word_tokenize=True, do_subword_tokenize=True,
                 word_tokenizer_type='basic', subword_tokenizer_type='wordpiece',
                 never_split=None, unk_token='[UNK]', sep_token='[SEP]',
                 pad_token='[PAD]', cls_token='[CLS]', mask_token='[MASK]', **kwargs):
        """Constructs a MecabBertTokenizer.

        Args:
            **vocab_file**: Path to a one-wordpiece-per-line vocabulary file.
            **do_lower_case**: (`optional`) boolean (default True)
                Whether to lower case the input.
                Only has an effect when do_basic_tokenize=True.
            **do_word_tokenize**: (`optional`) boolean (default True)
                Whether to do word tokenization.
            **do_subword_tokenize**: (`optional`) boolean (default True)
                Whether to do subword tokenization.
            **word_tokenizer_type**: (`optional`) string (default "basic")
                Type of word tokenizer.
            **subword_tokenizer_type**: (`optional`) string (default "wordpiece")
                Type of subword tokenizer.
        """
        super(BertTokenizer, self).__init__(unk_token=unk_token, sep_token=sep_token,
                                            pad_token=pad_token, cls_token=cls_token,
                                            mask_token=mask_token, **kwargs)
        self.max_len_single_sentence = self.max_len - 2  # take into account special tokens
        self.max_len_sentences_pair = self.max_len - 3  # take into account special tokens

        if not os.path.isfile(vocab_file):
            raise ValueError(
                "Can't find a vocabulary file at path '{}'. To load the vocabulary from a Google pretrained "
                "model use `tokenizer = BertTokenizer.from_pretrained(PRETRAINED_MODEL_NAME)`".format(vocab_file))
        self.vocab = load_vocab(vocab_file)
        self.ids_to_tokens = collections.OrderedDict(
            [(ids, tok) for tok, ids in self.vocab.items()])

        self.do_word_tokenize = do_word_tokenize
        if do_word_tokenize:
            if word_tokenizer_type == 'basic':
                self.word_tokenizer = BasicTokenizer(do_lower_case=do_lower_case,
                                                     never_split=never_split,
                                                     tokenize_chinese_chars=False)
            elif word_tokenizer_type == 'mecab':
                self.word_tokenizer = MecabTokenizer(do_lower_case=do_lower_case,
                                                     never_split=never_split)
            else:
                raise ValueError(
                    "Invalid word_tokenizer_type '{}' is specified.".format(word_tokenizer_type))

        self.do_subword_tokenize = do_subword_tokenize
        if do_subword_tokenize:
            if subword_tokenizer_type == 'wordpiece':
                self.subword_tokenizer = WordpieceTokenizer(vocab=self.vocab,
                                                            unk_token=self.unk_token)
            elif subword_tokenizer_type == 'character':
                self.subword_tokenizer = CharacterTokenizer(vocab=self.vocab,
                                                            unk_token=self.unk_token)
            else:
                raise ValueError(
                    "Invalid subword_tokenizer_type '{}' is specified.".format(subword_tokenizer_type))

    def _tokenize(self, text):
        if self.do_word_tokenize:
            tokens = self.word_tokenizer.tokenize(text,
                                                  never_split=self.all_special_tokens)
        else:
            tokens = [text]

        if self.do_subword_tokenize:
            split_tokens = [sub_token for token in tokens
                            for sub_token in self.subword_tokenizer.tokenize(token)]
        else:
            split_tokens = tokens

        return split_tokens

class MecabTokenizer(object):
    """Runs basic tokenization with MeCab morphological parser."""

    def __init__(self, do_lower_case=False, never_split=None, normalize_text=True):
        """Constructs a MecabTokenizer.

        Args:
            **do_lower_case**: (`optional`) boolean (default True)
                Whether to lower case the input.
            **never_split**: (`optional`) list of str
                Kept for backward compatibility purposes.
                Now implemented directly at the base class level (see :func:`PreTrainedTokenizer.tokenize`)
                List of token not to split.
            **normalize_text**: (`optional`) boolean (default True)
                Whether to apply unicode normalization to text before tokenization.
        """
        self.do_lower_case = do_lower_case
        self.never_split = never_split if never_split is not None else []
        self.normalize_text = normalize_text

        import MeCab
        self.mecab = MeCab.Tagger()

    def tokenize(self, text, never_split=None, **kwargs):
        """Tokenizes a piece of text."""
        if self.normalize_text:
            text = unicodedata.normalize('NFKC', text)

        never_split = self.never_split + (never_split if never_split is not None else [])
        tokens = []

        if six.PY2:
            mecab_output = self.mecab.parse(text.encode('utf-8')).decode('utf-8')
        else:
            mecab_output = self.mecab.parse(text)

        cursor = 0
        for line in mecab_output.split('\n'):
            if line == 'EOS':
                break

            token, _ = line.split('\t')
            token_start = text.index(token, cursor)
            token_end = token_start + len(token)
            if self.do_lower_case and token not in never_split:
                token = token.lower()

            tokens.append(token)
            cursor = token_end

        return tokens

class CharacterTokenizer(object):
    """Runs Character tokenziation."""

    def __init__(self, vocab, unk_token, normalize_text=True):
        """Constructs a CharacterTokenizer.

        Args:
            **vocab**:
                Vocabulary object.
            **unk_token**: str
                A special symbol for out-of-vocabulary token.
            **normalize_text**: (`optional`) boolean (default True)
                Whether to apply unicode normalization to text before tokenization.
        """
        self.vocab = vocab
        self.unk_token = unk_token
        self.normalize_text = normalize_text

    def tokenize(self, text):
        """Tokenizes a piece of text into characters.

        For example:
            input = "apple"
            output = ["a", "p", "p", "l", "e"]
        Args:
            text: A single token or whitespace separated tokens.
                This should have already been passed through `BasicTokenizer`.
        Returns:
            A list of characters.
        """
        if self.normalize_text:
            text = unicodedata.normalize('NFKC', text)

        output_tokens = []
        for i, char in enumerate(text):
            if char not in self.vocab:
                output_tokens.append(self.unk_token)
                continue

            output_tokens.append(char)

        return output_tokens


text:
/**
 */
#include <jni.h>

#ifdef __cplusplus
extern "C" {
#endif

JNIEXPORT jclass JNICALL Java_org_apache_harmony_test_func_reg_vm_btest7394_Btest7394_runTest
  (JNIEnv *jenv, jclass this_class)
{
    return (*jenv)->FindClass(jenv, "[java/lang/Object");
}

#ifdef __cplusplus
}
#endif

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>DRDSP: DRDSP::ReducedData Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

DRDSP

Dimensionality Reduction for Dynamical Systems with Parameters

Main Page

Namespaces

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Hierarchy

Class Members

 All Classes Namespaces Functions Variables Typedefs

DRDSP

ReducedData

Public Member Functions |
Public Attributes |
List of all members

DRDSP::ReducedData Struct Reference

Public Member Functions

 	ReducedData (uint32_t dim, size_t numPoints)

void 	Create (uint32_t dim, size_t numPoints)

AABB 	ComputeBoundingBox () const

double 	ComputeVectorScale ()

double 	ComputeDerivativeScale ()

const ReducedData & 	WriteData (const char *filename) const

bool 	ReadData (const char *filename)

const ReducedData & 	WritePointsCSV (const char *filename) const

const ReducedData & 	WriteVectorsCSV (const char *filename) const

const ReducedData & 	WriteDerivativesCSV (const char *filename) const

template<typename Model >

ReducedData & 	ComputeData (Model &&original, const DataSet &data, const MatrixXd &W)

template<typename Model , typename Embedded >

ReducedData & 	ComputeDataEmbedded (const ModelEmbedded< Model, Embedded > &original, const DataSet &data, const MatrixXd &W)

Public Attributes

vector< VectorXd > 	points

vector< VectorXd > 	vectors

vector< MatrixXd > 	derivatives

double 	scales [2]

size_t 	count = 0

uint32_t 	dimension = 0

The documentation for this struct was generated from the following files:

include/DRDSP/dynamics/reduced_data.h

src/dynamics/reduced_data.cpp

<address class="footer">
Generated on Sat Oct 25 2014 21:51:20 for DRDSP by

 1.8.5
</address>


text:
/**
 *
 */
package com.tek.interview.question.ordercalculation.impl;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * @author Steve Whitmire (swhit114@gmail.com)
 *
 */
public class ImportedOrderItemTest extends AbstractOrderItemTest
{

	private ImportedOrderItem importedOrderItem;

	/**
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception
	{
		super.setUp();

		importedOrderItem = new ImportedOrderItem("ValidName", 12.98765d, 123);
	}

	/**
	 * @throws java.lang.Exception
	 */
	@After
	public void tearDown() throws Exception
	{
		super.tearDown();

		this.importedOrderItem = null;
	}

	//REGION: Constructor tests with name and unitprice
	/**
	 * Test method for {@link com.tek.interview.question.ordercalculation.impl.ImportedOrderItem#ImportedOrderItem(java.lang.String, double)}.
	 */
	@Test(expected=IllegalArgumentException.class)
	public void testImportedOrderItemStringDouble_InvalidName1()
	{
		importedOrderItem = new ImportedOrderItem("", 123.33);
	}

	/**
	 * Test method for {@link com.tek.interview.question.ordercalculation.impl.ImportedOrderItem#ImportedOrderItem(java.lang.String, double)}.
	 */
	@Test(expected=IllegalArgumentException.class)
	public void testImportedOrderItemStringDouble_InvalidName2()
	{
		importedOrderItem = new ImportedOrderItem(" ", 123.33);
	}

	/**
	 * Test method for {@link com.tek.interview.question.ordercalculation.impl.ImportedOrderItem#ImportedOrderItem(java.lang.String, double)}.
	 */
	@Test(expected=IllegalArgumentException.class)
	public void testImportedOrderItemStringDouble_InvalidName3()
	{
		importedOrderItem = new ImportedOrderItem(null, 123.33);
	}

	/**
	 * Test method for {@link com.tek.interview.question.ordercalculation.impl.ImportedOrderItem#ImportedOrderItem(java.lang.String, double)}.
	 */
	@Test(expected=IllegalArgumentException.class)
	public void testImportedOrderItemStringDouble_InvalidUnitPrice()
	{
		importedOrderItem = new ImportedOrderItem("Valid nammmme", -0000000000000000000000.000000000000000001);
	}

	/**
	 * Test method for {@link com.tek.interview.question.ordercalculation.impl.ImportedOrderItem#ImportedOrderItem(java.lang.String, double)}.
	 */
	@Test
	public void testImportedOrderItemStringDouble_ValidConstructors()
	{
		importedOrderItem = new ImportedOrderItem("Valid name", 0.00000000000000000000000001);
		importedOrderItem = new ImportedOrderItem("       validN     ame.valid.name__", 123413242.222d);
		importedOrderItem = new ImportedOrderItem("_", 1.392435729);
	}

	// REGION: Constructor tests with name, unit price, and quantity

	/**
	 * Test method for {@link com.tek.interview.question.ordercalculation.impl.ImportedOrderItem#ImportedOrderItem(java.lang.String, double, int)}.
	 */
	@Test(expected=IllegalArgumentException.class)
	public void testImportedOrderItemStringDoubleInt_InvalidName1()
	{
		importedOrderItem = new ImportedOrderItem("", 1233.3, 2);
	}

	/**
	 * Test method for {@link com.tek.interview.question.ordercalculation.impl.ImportedOrderItem#ImportedOrderItem(java.lang.String, double, int)}.
	 */
	@Test(expected=IllegalArgumentException.class)
	public void testImportedOrderItemStringDoubleInt_InvalidName2()
	{
		importedOrderItem = new ImportedOrderItem(" ", 1233.3, 2);
	}

	/**
	 * Test method for {@link com.tek.interview.question.ordercalculation.impl.ImportedOrderItem#ImportedOrderItem(java.lang.String, double, int)}.
	 */
	@Test(expected=IllegalArgumentException.class)
	public void testImportedOrderItemStringDoubleInt_InvalidName3()
	{
		importedOrderItem = new ImportedOrderItem(null, 1233.3, 2);
	}

	/**
	 * Test method for {@link com.tek.interview.question.ordercalculation.impl.ImportedOrderItem#ImportedOrderItem(java.lang.String, double, int)}.
	 */
	@Test(expected=IllegalArgumentException.class)
	public void testImportedOrderItemStringDoubleInt_InvalidUnitPrice()
	{
		importedOrderItem = new ImportedOrderItem("validname", -0000000000000.0000000000000001, 2);
	}

	/**
	 * Test method for {@link com.tek.interview.question.ordercalculation.impl.ImportedOrderItem#ImportedOrderItem(java.lang.String, double, int)}.
	 */
	@Test(expected=IllegalArgumentException.class)
	public void testImportedOrderItemStringDoubleInt_InvalidQuantity()
	{
		importedOrderItem = new ImportedOrderItem("validd", 1233.3, 0);
	}

	/**
	 * Test method for {@link com.tek.interview.question.ordercalculation.impl.ImportedOrderItem#ImportedOrderItem(java.lang.String, double, int)}.
	 */
	@Test
	public void testImportedOrderItemStringDoubleInt_ValidConstructors()
	{
		importedOrderItem = new ImportedOrderItem("validd", 0, 1);
		importedOrderItem = new ImportedOrderItem("________________213412dd__validd", 0, 1);
		importedOrderItem = new ImportedOrderItem("           d", 123.12348979132413, 100213);
		importedOrderItem = new ImportedOrderItem("_ _____ -_____- - - - ___	", 0000000001, 1234);
	}

	// END CONSTRUCTORS REGION

	/**
	 * Test method for {@link com.tek.interview.question.ordercalculation.impl.ImportedOrderItem#getCalculatedTaxAmountUSD()}.
	 */
	@Test
	public void testGetCalculatedTaxAmountUSD()
	{
		assertTrue(importedOrderItem.getCalculatedTaxAmountUSD() == 239.62);
	}

	/**
	 * Test method for {@link com.tek.interview.question.ordercalculation.impl.ImportedOrderItem#toString()}.
	 */
	@Test
	public void testToString()
	{
		assertEquals(importedOrderItem.toString(), "123 ValidName: 1837.1");

		importedOrderItem = new ImportedOrderItem("ValidName", 47.50, 1);
		assertEquals(importedOrderItem.toString(), "1 ValidName: 54.62");
	}
}


text:
package net.javacrumbs.jsonunit.test.base.beans;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

@JsonTypeInfo(use= JsonTypeInfo.Id.NAME, include= JsonTypeInfo.As.WRAPPER_OBJECT)
@JsonTypeName("bean")
public class Jackson2Bean {
    private final String property;

    public Jackson2Bean(String property) {
        this.property = property;
    }

    public String getProperty() {
        return property;
    }
}


text:
package org.apache.sshd.client.session;

import java.io.IOException;
import java.net.SocketAddress;
import java.security.KeyPair;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;

import org.apache.mina.core.session.IoSession;
import org.apache.sshd.ClientChannel;
import org.apache.sshd.ClientSession;
import org.apache.sshd.client.ClientFactoryManager;
import org.apache.sshd.client.ServerKeyVerifier;
import org.apache.sshd.client.auth.UserAuthAgent;
import org.apache.sshd.client.auth.UserAuthPassword;
import org.apache.sshd.client.auth.UserAuthPublicKey;
import org.apache.sshd.common.SshdSocketAddress;
import org.apache.sshd.client.channel.ChannelDirectTcpip;
import org.apache.sshd.client.channel.ChannelExec;
import org.apache.sshd.client.channel.ChannelShell;
import org.apache.sshd.client.channel.ChannelSubsystem;
import org.apache.sshd.client.future.AuthFuture;
import org.apache.sshd.common.KeyExchange;
import org.apache.sshd.common.KeyPairProvider;
import org.apache.sshd.common.NamedFactory;
import org.apache.sshd.common.SshConstants;
import org.apache.sshd.common.SshException;
import org.apache.sshd.common.service.ConnectionService;
import org.apache.sshd.common.service.ServiceClient;
import org.apache.sshd.common.service.UserAuthServiceClient;
import org.apache.sshd.common.session.AbstractSession;
import org.apache.sshd.common.util.Buffer;

/**
 * TODO Add javadoc
 *
 * @author Apache MINA SSHD Project
 */
public class ClientSessionImpl extends AbstractSession<ServiceClient> implements ClientSession {

    /**
     * For clients to store their own metadata
     */
    private Map<Object, Object> metadataMap = new HashMap<Object, Object>();
    private final LinkedList<ServiceClient> pendingServices;

    public ClientSessionImpl(ClientFactoryManager client, IoSession session) throws Exception {
        super(client, session);
        log.info("Session created...");
        // Need to set the initial service early as calling code likes to start trying to
        // manipulate it before the connection has even been established.  For instance, to
        // set the authPassword.
        this.pendingServices = client.getServiceClientsFactory().create(this, lock);
        // install the initial service
        this.currentService = this.pendingServices.pollFirst();
        sendClientIdentification();
        sendKexInit();
    }

    public ClientFactoryManager getClientFactoryManager() {
        return (ClientFactoryManager) factoryManager;
    }

    public KeyExchange getKex() {
        return kex;
    }

    public AuthFuture authAgent(String username) throws IOException {
        synchronized (lock) {
            return findService(UserAuthServiceClient.class).auth(new UserAuthAgent(this, this.pendingServices.peekFirst(), username));
        }
    }

    public AuthFuture authPassword(String username, String password) throws IOException {
        synchronized (lock) {
            return findService(UserAuthServiceClient.class).auth(new UserAuthPassword(this, this.pendingServices.peekFirst(), username, password));
        }
    }

    public AuthFuture authPublicKey(String username, KeyPair key) throws IOException {
        synchronized (lock) {
            return findService(UserAuthServiceClient.class).auth(new UserAuthPublicKey(this, this.pendingServices.peekFirst(), username, key));
        }
    }

    public ClientChannel createChannel(String type) throws Exception {
        return createChannel(type, null);
    }

    public ClientChannel createChannel(String type, String subType) throws Exception {
        if (ClientChannel.CHANNEL_SHELL.equals(type)) {
            return createShellChannel();
        } else if (ClientChannel.CHANNEL_EXEC.equals(type)) {
            return createExecChannel(subType);
        } else if (ClientChannel.CHANNEL_SUBSYSTEM.equals(type)) {
            return createSubsystemChannel(subType);
        } else {
            throw new IllegalArgumentException("Unsupported channel type " + type);
        }
    }

    public ChannelShell createShellChannel() throws Exception {
        ChannelShell channel = new ChannelShell();
        findService(ConnectionService.class).registerChannel(channel);
        return channel;
    }

    public ChannelExec createExecChannel(String command) throws Exception {
        ChannelExec channel = new ChannelExec(command);
        findService(ConnectionService.class).registerChannel(channel);
        return channel;
    }

    public ChannelSubsystem createSubsystemChannel(String subsystem) throws Exception {
        ChannelSubsystem channel = new ChannelSubsystem(subsystem);
        findService(ConnectionService.class).registerChannel(channel);
        return channel;
    }

    public ChannelDirectTcpip createDirectTcpipChannel(SshdSocketAddress local, SshdSocketAddress remote) throws Exception {
        ChannelDirectTcpip channel = new ChannelDirectTcpip(local, remote);
        findService(ConnectionService.class).registerChannel(channel);
        return channel;
    }

    public SshdSocketAddress startLocalPortForwarding(SshdSocketAddress local, SshdSocketAddress remote) throws Exception {
        return findService(ConnectionService.class).getTcpipForwarder().startLocalPortForwarding(local, remote);
    }

    public void stopLocalPortForwarding(SshdSocketAddress local) throws Exception {
        findService(ConnectionService.class).getTcpipForwarder().stopLocalPortForwarding(local);
    }

    public SshdSocketAddress startRemotePortForwarding(SshdSocketAddress remote, SshdSocketAddress local) throws Exception {
        return findService(ConnectionService.class).getTcpipForwarder().startRemotePortForwarding(remote, local);
    }

    public void stopRemotePortForwarding(SshdSocketAddress remote) throws Exception {
        findService(ConnectionService.class).getTcpipForwarder().stopRemotePortForwarding(remote);
    }

    protected void handleMessage(Buffer buffer) throws Exception {
        synchronized (lock) {
            doHandleMessage(buffer);
        }
    }

    protected void doHandleMessage(Buffer buffer) throws Exception {
        SshConstants.Message cmd = buffer.getCommand();
        log.debug("Received packet {}", cmd);
        switch (cmd) {
            case SSH_MSG_DISCONNECT: {
                int code = buffer.getInt();
                String msg = buffer.getString();
                log.info("Received SSH_MSG_DISCONNECT (reason={}, msg={})", code, msg);
                close(false);
                break;
            }
            case SSH_MSG_UNIMPLEMENTED: {
                int code = buffer.getInt();
                log.info("Received SSH_MSG_UNIMPLEMENTED #{}", code);
                break;
            }
            case SSH_MSG_DEBUG: {
                boolean display = buffer.getBoolean();
                String msg = buffer.getString();
                log.info("Received SSH_MSG_DEBUG (display={}) '{}'", display, msg);
                break;
            }
            case SSH_MSG_IGNORE:
                log.info("Received SSH_MSG_IGNORE");
                break;
            default:
                switch (getState()) {
                    case ReceiveKexInit:
                        if (cmd != SshConstants.Message.SSH_MSG_KEXINIT) {
                            log.error("Ignoring command " + cmd + " while waiting for " + SshConstants.Message.SSH_MSG_KEXINIT);
                            break;
                        }
                        log.info("Received SSH_MSG_KEXINIT");
                        receiveKexInit(buffer);
                        negociate();
                        kex = NamedFactory.Utils.create(factoryManager.getKeyExchangeFactories(), negociated[SshConstants.PROPOSAL_KEX_ALGS]);
                        kex.init(this, serverVersion.getBytes(), clientVersion.getBytes(), I_S, I_C);
                        setState(State.Kex);
                        break;
                    case Kex:
                        buffer.rpos(buffer.rpos() - 1);
                        if (kex.next(buffer)) {
                            checkHost();
                            sendNewKeys();
                            setState(State.ReceiveNewKeys);
                        }
                        break;
                    case ReceiveNewKeys:
                        if (cmd != SshConstants.Message.SSH_MSG_NEWKEYS) {
                            disconnect(SshConstants.SSH2_DISCONNECT_PROTOCOL_ERROR, "Protocol error: expected packet SSH_MSG_NEWKEYS, got " + cmd);
                            return;
                        }
                        log.info("Received SSH_MSG_NEWKEYS");
                        receiveNewKeys(false);
                        log.info("Send SSH_MSG_SERVICE_REQUEST for {}", this.currentService.getName());
                        Buffer request = createBuffer(SshConstants.Message.SSH_MSG_SERVICE_REQUEST, 0);
                        request.putString(this.currentService.getName());
                        writePacket(request);
                        setState(State.ServiceRequestSent);
                        // Assuming that MINA-SSHD only implements "explicit server authentication" it is permissible
                        // for the client's service to start sending data before the service-accept has been received.
                        // If "implicit authentication" were to ever be supported, then this would need to be
                        // called after service-accept comes back.  See SSH-TRANSPORT.
                        this.currentService.start();
                        break;
                    case ServiceRequestSent:
                        if (cmd != SshConstants.Message.SSH_MSG_SERVICE_ACCEPT) {
                            disconnect(SshConstants.SSH2_DISCONNECT_PROTOCOL_ERROR, "Protocol error: expected packet SSH_MSG_SERVICE_ACCEPT, got " + cmd);
                            return;
                        }
                        setState(State.Running);
                        break;
                    case Running:
                        currentService.process(cmd, buffer);
                        break;
                    default:
                        throw new IllegalStateException("Unsupported state: " + getState());
                }
        }
    }

    public void setState(State newState) {
        synchronized (lock) {
            super.setState(newState);
            lock.notifyAll();
        }
    }

    public void switchToService(boolean authenticated, String username, ServiceClient service) {
        this.authed = authenticated;
        this.username = username;
        this.currentService = service;
        service.start();
    }

    protected boolean readIdentification(Buffer buffer) throws IOException {
        serverVersion = doReadIdentification(buffer);
        if (serverVersion == null) {
            return false;
        }
        log.info("Server version string: {}", serverVersion);
        if (!(serverVersion.startsWith("SSH-2.0-") || serverVersion.startsWith("SSH-1.99-"))) {
            throw new SshException(SshConstants.SSH2_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED,
                    "Unsupported protocol version: " + serverVersion);
        }
        return true;
    }

    private void sendClientIdentification() {
        clientVersion = "SSH-2.0-" + getFactoryManager().getVersion();
        sendIdentification(clientVersion);
    }

    private void sendKexInit() throws Exception {
        clientProposal = createProposal(KeyPairProvider.SSH_RSA + "," + KeyPairProvider.SSH_DSS);
        I_C = sendKexInit(clientProposal);
    }

    private void receiveKexInit(Buffer buffer) throws Exception {
        serverProposal = new String[SshConstants.PROPOSAL_MAX];
        I_S = receiveKexInit(buffer, serverProposal);
    }

    private void checkHost() throws SshException {
        ServerKeyVerifier serverKeyVerifier = getClientFactoryManager().getServerKeyVerifier();
        SocketAddress remoteAddress = ioSession.getRemoteAddress();

        if (!serverKeyVerifier.verifyServerKey(this, remoteAddress, kex.getServerKey())) {
            throw new SshException("Server key did not validate");
        }
    }

    public Map<Object, Object> getMetadataMap() {
        return metadataMap;
    }

    private <T> T findService(Class<T> target) {
        if (currentService != null && target.isInstance(currentService)) {
            return (T)currentService;
        } else {
            for (ServiceClient service : pendingServices) {
                if (target.isInstance(service)) {
                    return (T)service;
                }
            }
            log.warn("Attempted to access unknown service {}", target.getSimpleName());
            return null;
        }
    }
}


text:
package com.twu.biblioteca;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
 * Created by aarni on 1/6/15.
 */
public class MovieTest {
    Movie movie = new Movie("Name", 2000, "director", "2");

    @Test
    public void printString(){
        assertEquals("Name, 2000, director, 2", movie.toString());
    }
}


text:
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using BYTE = System.Byte;
using WORD = System.Int16;
using DWORD = System.Int32;

namespace AudioSwitcher.Presentation.Drawing
{
    [StructLayout(LayoutKind.Sequential, Size=6)]
    internal struct IconDir
    {
        public WORD Reserved;   // Reserved (must be 0)
        public WORD Type;       // Resource Type (1 for icons)
        public WORD Count;      // How many images?

        public GroupIconDir ToGroupIconDir()
        {
            GroupIconDir grpDir = new GroupIconDir();
            grpDir.Reserved = this.Reserved;
            grpDir.Type = this.Type;
            grpDir.Count = this.Count;
            return grpDir;
        }
    }
}


text:
/*
 * Convert and image into a form suitable for use with the leJOS graphics
 * classes.
 *
 * Original code by Programus, imported to leJOS by Andy
 */

package lejos.pc.tools;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.awt.image.BufferedImage;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.EOFException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JFileChooser;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
import javax.swing.filechooser.FileFilter;

public class NXJImageMainPanel extends JPanel {

	// header is LNI0 => 0x4c4e4930 (big endian)
	private static final int LNI0_HEADER = 0x4c4e4930;

	private int mode = NXJImageConverter.BIT_8;
	//implement JDK-1.6-like FileNameExtensionFilter
	private static class FileNameExtensionFilter extends FileFilter	{
		private final String message;
		private final String ext;

		public FileNameExtensionFilter(String message, String ext) {
			this.message = message;
			this.ext = "." + ext.toLowerCase();
		}

		@Override
		public boolean accept(File f) {
			return f != null && (f.isDirectory() || f.getName().toLowerCase().endsWith(this.ext));
		}

		@Override
		public String getDescription() {
			return this.message;
		}
	}

	/** SN */
	private static final long serialVersionUID = -2222575532385000674L;

	private static final String EXT = "lni";

	private NXJImagePicturePanel picPanel = new NXJImagePicturePanel();
	private NXJImageCodePanel codePanel = new NXJImageCodePanel();

	private File lastDir = null;

	private byte[] currData;
	private Dimension currSize;

	public NXJImageMainPanel() {
		JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, false);
		splitPane.setLeftComponent(this.picPanel);
		splitPane.setRightComponent(this.codePanel);

		splitPane.setResizeWeight(1);

		this.setLayout(new BorderLayout());
		this.add(splitPane, BorderLayout.CENTER);

		this.picPanel.addPropertyChangeListener(NXJImagePicturePanel.IMAGE_UPDATE_PROP, new PropertyChangeListener() {
			public void propertyChange(PropertyChangeEvent evt) {
				NXJImageMainPanel.this.updateNxtPart();
			}
		});

		this.codePanel.addPropertyChangeListener(NXJImageCodePanel.CODE_UPDATE_PROP, new PropertyChangeListener(){
			public void propertyChange(PropertyChangeEvent evt) {
				NXJImageMainPanel.this.updateImageFromCode();
			}
		});
	}

	protected void updateNxtPart() {
		String text;
		if (!this.picPanel.hasPic())
			text = "";
		else
		{
			currSize = this.picPanel.getImageSize();
			currData = this.picPanel.getNxtImageData();
			text = NXJImageConverter.getImageCreateString(currData, currSize,mode);
		}
		this.codePanel.setCode(text);
	}

	protected void updateImageFromCode() {
		String code = this.codePanel.getCode();

		String error;
		BufferedImage image;
		try
		{
			image = NXJImageConverter.getImageFromNxtImageCreateString(code,mode);
			error = null;
		}
		catch (Exception e)
		{
			image = null;
			error = e.getMessage();
		}

		//TODO properly convert error string to HTML
		if (image == null) {
			String message;
			if (mode == NXJImageConverter.BIT_8)
				message = "Code format error: "+error+"
" +
					"Please use format like below:
" +
					"(w,h) \"\\u00XX\\0\\u00XX...\"" +
					"";
			else if (mode == NXJImageConverter.BIT_16)
				message = "Code format error: "+error+"
" +
						"Please use format like below:
" +
						"(w,h) \"\\uXXXX\\0\\uXXXX...\"" +
						"";
			else if (mode == NXJImageConverter.BYTEA)
				message = "Code format error: "+error+"
" +
				"Please use format like below:
" +
				"new Image(w,h,new byte[]{(byte) 0xXX,(byte) 0xXX, ... })" +
				"";
			else
				message = "ERROR";
			JOptionPane.showMessageDialog(this, message, "Error", JOptionPane.ERROR_MESSAGE);
		} else {
			this.readImage(image);
		}
	}

	public boolean setFile(File file) throws IOException {
		BufferedImage image = ImageIO.read(file);
		if (image == null)
			return false;

		this.picPanel.setImage(image);
		return true;
	}

	public void readImage(BufferedImage image) {
		this.picPanel.setImage(image);
	}

	protected void saveImage(File file) throws IOException {
		DataOutputStream out = new DataOutputStream(new FileOutputStream(file, false));
		try {
			out.writeInt(LNI0_HEADER);
			out.writeShort(this.currSize.width);
			out.writeShort(this.currSize.height);
			out.write(this.currData);
		} catch (IOException e) {
			throw e;
		} finally {
			out.close();
		}
	}

	protected void readNxtImage(File file) throws IOException {
		byte[] data;
		int p, w, h;
		FileInputStream fin = new FileInputStream(file);
		try {
			DataInputStream in = new DataInputStream(fin);
			// byte size -> int size.
//			w = in.read();
//			if (w < 0) {
//				throw new IOException("File format error!");
//			}
//			h = in.read();
//			if (h < 0) {
//				throw new IOException("File format error!");
//			}
			try {
				p = in.readInt();
				w = in.readUnsignedShort();
				h = in.readUnsignedShort();
			} catch (EOFException e) {
				IOException e2 = new IOException("File format error!");
				e2.initCause(e);
				throw e2;
			}

			if (p != LNI0_HEADER)
				throw new IOException("File format error!");

			data = new byte[w * ((h + 7) / 8)];
			in.readFully(data);
		} finally {
			fin.close();
		}
		BufferedImage image = NXJImageConverter.nxtImageData2Image(data, w, h);
		this.readImage(image);
	}

	public JMenu modeLabel = new JMenu("Mode: 8 Bit");

	public JMenuBar getMenuBar(final JPanel panel) {
		JMenu menu;
		JMenuBar menuBar = new JMenuBar();

		// image menu
		menu = new JMenu("Image");
		menu.setMnemonic(KeyEvent.VK_I);
		menuBar.add(menu);
		menuBar.add(modeLabel);

		Action mode16Action = new AbstractAction("16 Bit Mode"){
			/**
			 *
			 */
			private static final long serialVersionUID = 1L;

			public void actionPerformed(ActionEvent arg0) {
				mode = NXJImageConverter.BIT_16;
				updateNxtPart();
				modeLabel.setText("Mode: 16 Bit");
			}
		};
		Action mode8Action = new AbstractAction("8 Bit Mode"){
			/**
			 *
			 */
			private static final long serialVersionUID = -7948282904817247677L;

			public void actionPerformed(ActionEvent arg0) {
				mode = NXJImageConverter.BIT_8;
				updateNxtPart();
				modeLabel.setText("Mode: 8 Bit");
			}
		};
		Action modeBAction = new AbstractAction("Byte[] Mode"){
			/**
			 *
			 */
			private static final long serialVersionUID = -7684693417480716472L;

			public void actionPerformed(ActionEvent arg0){
				mode = NXJImageConverter.BYTEA;
				updateNxtPart();
				modeLabel.setText("Mode: byte[]");
			}
		};
		modeLabel.add(mode8Action);
		modeLabel.add(mode16Action);
		modeLabel.add(modeBAction);

		// Import
		Action importFileAction = new AbstractAction("Import Image...") {
			/**SN*/
			private static final long serialVersionUID = -1915349463841717491L;

			public void actionPerformed(ActionEvent evt) {
				importImage(panel);
			}
		};
		// Export
		final Action exportFileAction = new AbstractAction("Export Image...") {
			/**SN*/
			private static final long serialVersionUID = -1915349463841717491L;

			public void actionPerformed(ActionEvent evt) {
				exportImage(panel);
			}
		};

		menu.add(importFileAction);
		menu.add(exportFileAction);
		menu.addSeparator();

		// Open lni (LeJOS NXT Image) file
		Action openFileAction = new AbstractAction("Open LeJOS NXT Image File...") {
			/**SN*/
			private static final long serialVersionUID = 3458676330985853465L;

			public void actionPerformed(ActionEvent evt) {
				openFile(panel);
			}
		};

		// Export
		final Action saveFileAction = new AbstractAction("Export LeJOS NXT Image File...") {
			/**SN*/
			private static final long serialVersionUID = 3458676330985853465L;

			public void actionPerformed(ActionEvent evt) {
				saveFile(panel);
			}
		};

		menu.add(openFileAction);
		menu.add(saveFileAction);

		menu.addSeparator();

		// Exit
		Action exitAction = new AbstractAction("Exit") {
			/**SN*/
			private static final long serialVersionUID = -2290105226448425978L;

			public void actionPerformed(ActionEvent e) {
				System.exit(0);
			}
		};

		menu.add(exitAction);

		menu.addMenuListener(new MenuListener() {
			public void menuCanceled(MenuEvent e) {
				//nothing
			}
			public void menuDeselected(MenuEvent e) {
				//nothing
			}
			public void menuSelected(MenuEvent e) {
				boolean b = NXJImageMainPanel.this.currData != null && NXJImageMainPanel.this.currSize != null;
				saveFileAction.setEnabled(b);
				exportFileAction.setEnabled(b);
			}
		});

		return menuBar;
	}

	private void importImage(final JPanel panel)
	{
		JFileChooser dialog = new JFileChooser(lastDir);
		if (dialog.showOpenDialog(panel) == JFileChooser.APPROVE_OPTION) {
			String errorMsg = null;
			lastDir = dialog.getCurrentDirectory();
			try {
				BufferedImage image = ImageIO.read(dialog.getSelectedFile());
				if (image == null) {
					errorMsg = "Not an image file or file format not supported. ";
				} else {
					boolean canReadImage = true;
					if (image.getWidth() * image.getHeight() > 100 * 64 * 2) {
						String message = "NXT can only display images smaller than 100x64.
" +
							"But the image you are importing is " + image.getWidth() + "x" + image.getHeight() + ".
" +
							"Are you sure you want to import this image?
" +
							"(This may also cause a performance issue!)";
						canReadImage = JOptionPane.showConfirmDialog(NXJImageMainPanel.this, message, "Confirm", JOptionPane.YES_NO_OPTION | JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION;
					}
					if (canReadImage) {
						NXJImageMainPanel.this.readImage(image);
					}
				}
			} catch (IOException e) {
				errorMsg = "Error occured when reading file: " + e.getMessage();
			}
			if (errorMsg != null) {
				JOptionPane.showMessageDialog(NXJImageMainPanel.this, errorMsg, "Error", JOptionPane.ERROR_MESSAGE);
			}
		}
	}

	private void exportImage(final JPanel panel)
	{
		JFileChooser dialog = new JFileChooser(lastDir);
		if (dialog.showSaveDialog(panel) == JFileChooser.APPROVE_OPTION) {
			lastDir = dialog.getCurrentDirectory();
			File file = dialog.getSelectedFile();
			if (file.exists()) {
				if (JOptionPane.showConfirmDialog(panel, "File exists. Overwrite?", "Confirm", JOptionPane.OK_CANCEL_OPTION) != JOptionPane.OK_OPTION) {
					return;
				}
			}
			String errorMsg = null;
			try {
				String name = file.getName();
				int i = name.lastIndexOf('.');
				if (i < 0)
					errorMsg = "no file extension";
				else
				{
					String ext = name.substring(i+1);
					//TODO not really correct: using extension as format name
					ImageIO.write(picPanel.getBlackAndWhiteImage(), ext, file);
				}
			} catch (IOException e) {
				errorMsg = "Error occured when reading file: " + e.getMessage();
			}
			if (errorMsg != null) {
				JOptionPane.showMessageDialog(NXJImageMainPanel.this, errorMsg, "Error", JOptionPane.ERROR_MESSAGE);
			}
		}
	}

	private void saveFile(final JPanel panel)
	{
		JFileChooser dialog = new JFileChooser(lastDir);
		dialog.setFileFilter(new FileNameExtensionFilter("LeJOS NXT Image File (*." + EXT + ")", EXT));
		dialog.setAcceptAllFileFilterUsed(false);
		if (dialog.showSaveDialog(panel) == JFileChooser.APPROVE_OPTION) {
			lastDir = dialog.getCurrentDirectory();
			File file = dialog.getSelectedFile();
			if (file.exists()) {
				if (JOptionPane.showConfirmDialog(panel, "File exists. Overwrite?", "Confirm", JOptionPane.OK_CANCEL_OPTION) != JOptionPane.OK_OPTION) {
					return;
				}
			}
			try {
				if (!file.exists()) {
					String fname = file.getPath();
					if (!fname.endsWith("." + EXT)) {
						if (!fname.endsWith(".")) {
							fname += ".";
						}
						file = new File(fname + EXT);
					}
					file.createNewFile();
				}
				if (!file.canWrite()) {
					JOptionPane.showMessageDialog(panel, "File cannot be written!", "Error", JOptionPane.ERROR_MESSAGE | JOptionPane.OK_OPTION);
					return;
				}
				NXJImageMainPanel.this.saveImage(file);
			} catch (IOException e) {
				JOptionPane.showMessageDialog(panel, "Error occured when write data into file.
" + e.getMessage() + "", "Error", JOptionPane.ERROR_MESSAGE);
				e.printStackTrace();
			}
		}
	}

	private void openFile(final JPanel panel)
	{
		JFileChooser dialog = new JFileChooser(lastDir);
		dialog.setFileFilter(new FileNameExtensionFilter("LeJOS NXT Image File (*." + EXT + ")", EXT));
		dialog.setAcceptAllFileFilterUsed(false);
		if (dialog.showOpenDialog(panel) == JFileChooser.APPROVE_OPTION) {
			lastDir = dialog.getCurrentDirectory();
			File file = dialog.getSelectedFile();
			try {
				NXJImageMainPanel.this.readNxtImage(file);
			} catch (IOException e) {
				JOptionPane.showMessageDialog(panel, "Error occured when reading file.
" + e.getMessage() + "", "Error", JOptionPane.ERROR_MESSAGE);
			}
		}
	}

}


text:
<!DOCTYPE html>

		<title>three.js webgl - node material</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
		<link type="text/css" rel="stylesheet" href="main.css">

			three.js - Node-Based Material

change preload

			Loading ...


text:
require("./main.css!$css");

var btn = document.querySelector(".btn");
var s = getComputedStyle(btn);

if(typeof window !== "undefined" && window.assert) {
	assert.equal(s.backgroundColor, 'rgb(0, 128, 0)');
	done();
} else {
	console.log(s.backgroundColor);
}


text:
<?php if (isset($errors)): ?>

<?php echo $errors[0] ?>

<?php endif; ?>
<fieldset class="pageForm">
    <legend>Sinup:</legend>
    <?php echo Fuel\Core\Html::anchor('auth/signup?signup_facebook=1', 'Facebook on signup', array('class' => 'facebookLogin')) ?>
    <?php echo Form::open(array()); ?>

            UserName
            <input type="text" name="username" value="<?php if (isset($username)) echo $username; ?>" placeholder="username"/>

            Email
            <input type="text" name="email" value="<?php if (isset($email)) echo $email; ?>" placeholder="email"/>

            Password
            <input type="password" name="password" value="" placeholder="password"/>

            Confirm Password
            <input type="password" name="password2" value="" placeholder="confirm password"/>

            gender
            <input type="radio"  name="gender" value="male" class="radio"/> male
            <input type="radio"  name="gender" value="female" class="radio"/> female
            <input type="radio"  name="gender" value="none" class="radio"/> none

            <input type="submit" name="" value="Signup!!" class="pageAction"/>

    <?php echo Form::close(); ?>
</fieldset>


text:
FactoryBot.define do
  factory :user do
    household
    first_name { Faker::Name.first_name }
    last_name { Faker::Name.last_name }
    email { Faker::Internet.email }
    password { 'password' }
    password_confirmation { 'password' }
  end

end


text:
<bill session="111" type="h" number="326" updated="2009-03-07T10:25:47-05:00">
	<status><vote date="1236017640" datetime="2009-03-02T14:14:00-05:00" where="h" result="pass" how="by voice vote" roll=""/></status>

	<introduced date="1231390800" datetime="2009-01-08"/>
	<titles>
		<title type="short" as="introduced">Cocopah Lands Act</title>
		<title type="short" as="passed house">Cocopah Lands Act</title>
		<title type="official" as="introduced">To direct the Secretary of the Interior to take lands in Yuma County, Arizona, into trust as part of the reservation of the Cocopah Tribe of Arizona, and for other purposes.</title>
	</titles>
	<sponsor id="400162"/>
	<cosponsors>

	</cosponsors>
	<actions>
		<action date="1231390800" datetime="2009-01-08"><text>Referred to the House Committee on Natural Resources.</text></action>
		<action date="1236017460" datetime="2009-03-02T14:11:00-05:00"><text>Mr. Holt moved to suspend the rules and pass the bill.</text></action>
		<action date="1236017460" datetime="2009-03-02T14:11:00-05:00"><text>Considered under suspension of the rules.</text><reference label="consideration" ref="CR H2878-2879"/></action>
		<action date="1236017460" datetime="2009-03-02T14:11:00-05:00"><text>DEBATE - The House proceeded with forty minutes of debate on H.R. 326.</text></action>
		<vote date="1236017640" how="by voice vote" datetime="2009-03-02T14:14:00-05:00" where="h" type="vote" result="pass" ><text>On motion to suspend the rules and pass the bill Agreed to by voice vote.</text><reference label="text" ref="CR H2878-2879"/></vote>
		<action date="1236056400" datetime="2009-03-03"><text>Received in the Senate and Read twice and referred to the Committee on Indian Affairs.</text></action>
	</actions>
	<committees>
		<committee name="House Natural Resources" subcommittee="" activity="Referral" />
		<committee name="Senate Indian Affairs" subcommittee="" activity="Referral, In Committee" />
	</committees>
	<relatedbills>

	</relatedbills>
	<subjects>
		<term name="Native Americans"/>
		<term name="Arizona"/>
		<term name="Federal-Indian relations"/>
		<term name="Gambling"/>
		<term name="Indian lands and resources rights"/>
		<term name="Land transfers"/>
	</subjects>
	<amendments>

	</amendments>
	<summary>
	1/8/2009--Introduced.<br/>Cocopah Lands Act - Provides that if the Cocopah Indian Tribe of Arizona transfers title to certain described land to the Secretary of the Interior, the Secretary shall take it into trust for the benefit of the Tribe, if there are no recognized environmental conditions or contamination related concerns and no adverse legal claims to it, including outstanding liens, mortgages, or taxes owed. Considers such land to be part of the Tribe's initial reservation. Designates Yuma county, Arizona, to be the Tribe's service area for the delivery of federal services to enrolled members of the Tribe. Prohibits its use for gaming under the Indian Gaming Regulatory Act.
	</summary>
</bill>


text:
<?php
/**
 * Created by PhpStorm.
 * User: wamobi15
 * Date: 17/01/17
 * Time: 16:07
 */

namespace AppBundle\Controller;

use AppBundle\Entity\User;
use AppBundle\Form\UserType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Response;

class SecurityController extends Controller
{
    /**
     * @Route("/acces-client", name="security.acces-client")
     */
    public function accesClientAction(Request $request)
    {
        if($this->isGranted('ROLE_ADMIN'))
        {
        return new Response('
visible par admin
');
        }
        else
        {
        return new Response('
visible par user
');
        }
    }

    /**
     * @Route("/login", name="security.login")
     */
    public function loginAction(Request $request)
    {
        $authenticationUtils = $this->get('security.authentication_utils');
        $error = $authenticationUtils->getLastAuthenticationError();
        $lastUsername = $authenticationUtils->getLastUsername();

        return $this->render('Public/security/login.html.twig', array(
            'last_username' => $lastUsername,
            'error'         => $error,
        ));
    }

    /**
     * @Route("/logout", name="security.logout")
     */
    public function logoutAction(){

    }

    /**
     * @Route("/signin", name="signin")
     */
    public function signinAction(Request $request){
        $entity = new User();
        $entityType = UserType::class;

        $doctrine = $this->getDoctrine();
        $em = $doctrine->getManager(); // tout suaf le select (getRepository pour le reste)
        $rcRole = $doctrine->getRepository('AppBundle:Role');

        $form = $this->createForm($entityType, $entity);
        $form->handleRequest($request);

        if($form->isSubmitted() && $form->isValid()){
            $data = $form->getData();

            $encoderPassword = $this->get('security.password_encoder');
            //pour encrypter password (dans security.yml va chercher le hash)

            $password = $encoderPassword->encodePassword($data, $data->getPassword());
            //Pour recup le password

            $data->setPassword($password);
            //pour reinjecter le password a l'user

            $role = $rcRole->findOneBy([
               'name' => 'ROLE_USER'
            ]);

            //////////////// TOKEN //////////////
            //recup token
            $token = $this->get('admin.service.utils.string');
            $generateToken = $token->generateUniqId();
            //$data = user
            $data->setToken($generateToken)
                 ->setIsActive(0);

            /////////////// IS ACTIVE ///////////////////

            $data->addRole($role);

            $em->persist($data);
            $em->flush();

            //////////////// MAIL ////////////////////////

            $message = \Swift_Message::newInstance()
            ->setSubject("Formulaire d'inscription")
            ->setFrom($data->getEmail())
            ->setTo('contact@monsite.com')
            ->setBody(
                        $this->renderView('emails/formulaire-signin.html.twig', [
                            'data' => $data,
                        ]),

                        'text/html'
                    )
            ->addPart(
                        $this->renderView('emails/formulaire-signin.txt.twig', [
                            'data' => $data,
                        ]),
                        'text/plain'
                    );

                $this->get('mailer')->send($message);

            $this->addFlash('success', "Merci, votre inscription a bien été pris en compte !");

            return $this->redirectToRoute('security.login'); //redirection de page
            //dump($data); exit;

        }

        return $this->render('Public/security/signin.html.twig', [
            'form' => $form->createView()
        ]);
    }

}


text:
typedef enum {
  ADC_MODE_SINGLE = 0,
  ADC_MODE_CONTINUOUS,
  NUM_ADC_MODES,
} AdcMode;

typedef enum {
  ADC_CHANNEL_0 = 0,
  ADC_CHANNEL_1,
  ADC_CHANNEL_2,
  ADC_CHANNEL_3,
  ADC_CHANNEL_4,
  ADC_CHANNEL_5,
  ADC_CHANNEL_6,
  ADC_CHANNEL_7,
  ADC_CHANNEL_8,
  ADC_CHANNEL_9,
  ADC_CHANNEL_10,
  ADC_CHANNEL_11,
  ADC_CHANNEL_12,
  ADC_CHANNEL_13,
  ADC_CHANNEL_14,
  ADC_CHANNEL_15,
  ADC_CHANNEL_TEMP,
  ADC_CHANNEL_REF,
  ADC_CHANNEL_BAT,
  NUM_ADC_CHANNELS,
} AdcChannel;

typedef void (*AdcCallback)(AdcChannel adc_channel, void *context);

// Initialize the ADC to the desired conversion mode
void adc_init(AdcMode adc_mode);

// Enable or disable a given channel.
// A race condition may occur when setting a channel during a conversion. However, it should not
// cause issues given the intended use cases
StatusCode adc_set_channel(AdcChannel adc_channel, bool new_state);

// Return a channel corresponding to the given GPIO address
StatusCode adc_get_channel(GpioAddress address, AdcChannel *adc_channel);

// Register a callback function to be called when the specified channel completes a conversion
StatusCode adc_register_callback(AdcChannel adc_channel, AdcCallback callback, void *context);

// Obtain the raw 12-bit value read by the specified channel
StatusCode adc_read_raw(AdcChannel adc_channel, uint16_t *reading);

// Obtain the converted value at the specified channel
StatusCode adc_read_converted(AdcChannel adc_channel, uint16_t *reading);


text:
package org.aludratest.service.gui.integrationtest;

import static org.junit.Assert.assertEquals;

import org.aludratest.service.gui.component.Dropdownbox;
import org.aludratest.service.locator.option.IndexLocator;
import org.aludratest.testcase.TestStatus;
import org.aludratest.util.validator.ContainsIgnoreCaseValidator;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

/**
 * Unit test for class {@link org.aludratest.service.gui.component.Checkbox}
 * @author ywang
 */
@SuppressWarnings("javadoc")
public abstract class AbstractDropdownboxTest extends GUITest {
    /**
     *  positive case to test method {@link org.aludratest.service.gui.component.Dropdownbox#selectEntry(Object)}
     *
 select an entry in dropdownbox
     * @throws Exception
     */
    @Test
    public void selectEntry_DropdownBox_enabled_byLabel() throws Throwable {
        Dropdownbox box = guiTestUIMap.dropDownBox();
        box.selectEntry("Partner Short Name");
        checkLastStepStatus(TestStatus.PASSED);
        assertEquals("Partner Short Name_value", box.getSelectedEntry());
    }

    @Test
    public void selectEntry_DropdownBox_enabled_byIndex() throws Throwable {
        Dropdownbox box = guiTestUIMap.dropDownBox();
        box.selectEntry(new IndexLocator(2));
        checkLastStepStatus(TestStatus.PASSED);
        assertEquals("City_value", box.getSelectedEntry());
    }

    /**
     *  negative case to test method {@link org.aludratest.service.gui.component.Dropdownbox#selectEntry(Object)}
     *
 select a not-existing entry in dropdownbox
     */
    @Test
    public void selectEntryNotExistingOnEnabledDropdownBox() {
        String notExistingEntry = "Partner Short Name1";
        guiTestUIMap.dropDownBox().selectEntry(notExistingEntry);
        checkLastStepStatus(TestStatus.FAILEDAUTOMATION);
        checkLastStepErrorMessage(
                "The expected labels are not contained in the actual labels. Following Label is missing: Partner Short Name1");
    }

    /**
     *  negative case to test method {@link org.aludratest.service.gui.component.Dropdownbox#selectEntry(Object)}
     *
 select a disabled entry in dropdownbox
     */
    @Ignore("Does not work with selenium1")
    @Test
    public void selectEntryDisabledOnEnabledDropdownBox() {
        guiTestUIMap.dropDownBox().selectEntry("Disabled entry");
        checkLastStepStatus(TestStatus.FAILEDAUTOMATION);
        checkLastStepErrorMessage("Following option is disabled. " + "Disabled entry");
    }

    /**
     *  negative case to test method {@link org.aludratest.service.gui.component.Dropdownbox#selectEntry(Object)}
     *
 select an entry in disabled dropdownbox
     */
    @Test
    public void selectEntryOnDisabledDropdownBox() {
        guiTestUIMap.disabledDropDownBox().selectEntry("City");
        checkLastStepStatus(TestStatus.FAILEDAUTOMATION);
        checkLastStepErrorMessage("Element not enabled");
    }

    /** Positive case to select an entry in a dropdown box using the EMPTY marker. This should select the "" entry in the
     * Dropdownbox. */
    @Test
    public void selectEmptyEntryOnDropdownBox() {
        guiTestUIMap.dropDownBox().selectEntry("<EMPTY>");
        assertEquals("empty_value", guiTestUIMap.dropDownBox().getSelectedEntry());
    }

    /**
     *  positive case to test method {@link org.aludratest.service.gui.component.Dropdownbox#getSelectedEntry()}
     *
 get selected entry in dropdownbox
     */
    @Test
    public void getSelectedEntryOnEnabledDropdownBox() {
        assertEquals("Partner_Name_value", guiTestUIMap.dropDownBox().getSelectedEntry());
        checkLastStepStatus(TestStatus.PASSED);
    }

    /**
     *  positive case to test method {@link org.aludratest.service.gui.component.Dropdownbox#assertIsSelected(String)}
     *
 check if an option has been selected
     */
    @Test
    public void hasSelectedOnDropdownBox() {
        guiTestUIMap.dropDownBox().assertIsSelected("Partner Name");
        checkLastStepStatus(TestStatus.PASSED);
    }

    /**
     *  negative case to test method {@link org.aludratest.service.gui.component.Dropdownbox#assertIsSelected(String)}
     *
 check if an option has been selected
     */
    @Test
    public void hasSelectedOnDropdownBoxNot() {
        guiTestUIMap.dropDownBox().assertIsSelected("City");
        checkLastStepStatus(TestStatus.FAILED);
        checkLastStepErrorMessage("Label 'Partner Name' does not match the validator EqualsValidator "
                + "(expecting string to be 'City')");
    }

    /**
     *  positive case to test method {@link org.aludratest.service.gui.component.Dropdownbox#assertTextNotEquals(String)}
     *
 check if an option has not been selected
     */
    @Test
    public void notEqualsOnDropdownBox() {
        guiTestUIMap.dropDownBox().assertTextNotEquals("City");
        checkLastStepStatus(TestStatus.PASSED);
    }

    /**
     *  negative case to test method {@link org.aludratest.service.gui.component.Dropdownbox#assertTextNotEquals(String)}
     *
 check if an option has not been selected
     */
    @Test
    public void notEqualsOnDropdownBoxNot() {
        guiTestUIMap.dropDownBox().assertTextNotEquals("Partner Name");
        checkLastStepStatus(TestStatus.FAILED);
        checkLastStepErrorMessage("Label 'Partner Name' does not match the validator NotEqualsValidator "
                + "(expects string to be different from 'Partner Name')");
    }

    /**
     *  positive case to test method {@link org.aludratest.service.gui.component.Dropdownbox#assertSelectedContains(String)}
     *
 check that the label is contained by the selected item in the dropdown box
     */
    @Test
    public void hasSelectedContainsOnDropdownBox() {
        guiTestUIMap.dropDownBox().assertSelectedContains("Partner");
        checkLastStepStatus(TestStatus.PASSED);
        guiTestUIMap.dropDownBox().assertSelectedContains("Name");
        checkLastStepStatus(TestStatus.PASSED);
    }

    /**
     *  negative case to test method {@link org.aludratest.service.gui.component.Dropdownbox#assertSelectedContains(String)}
     *
 check that the label is contained by the selected item in the dropdown box
     */
    @Test
    public void hasSelectedContainsOnDropdownBoxNot() {
        guiTestUIMap.dropDownBox().assertSelectedContains("Partner1");
        checkLastStepStatus(TestStatus.FAILED);
        checkLastStepErrorMessage("Label 'Partner Name' does not match the validator ContainsValidator "
                + "(expecting sub string 'Partner1')");
    }

    @Test
    public void hasValues_multiarg() {
        // positive test
        guiTestUIMap.dropDownBox().assertHasValues(true, "Partner_Name_value", "Partner Short Name_value", "City_value",
                "State_value",
                "Country_value", "Sales Rep_value", "Partner Number_value", "District_value", "Customer Facility Code_value",
                "Equipment Customer_value", "Non Globe BP_value", "Creation SOU_value", "empty_value", "Disabled entry_value");
        checkLastStepStatus(TestStatus.PASSED);

        // positive test with shuffled data and ignore order
        guiTestUIMap.dropDownBox().assertHasValues(false, "District_value", "Partner_Name_value", "Partner Short Name_value",
                "City_value", "State_value", "Country_value", "Sales Rep_value", "Partner Number_value",
                "Customer Facility Code_value", "Equipment Customer_value", "Non Globe BP_value", "Creation SOU_value",
                "empty_value", "Disabled entry_value");
        checkLastStepStatus(TestStatus.PASSED);

        // negative test with multiple values
        guiTestUIMap.dropDownBox().assertHasValues(true, "Partner_Name_value", "Partner Short Name_value");
        checkLastStepStatus(TestStatus.FAILED);
    }

    @Test
    public void hasValues_singlearg() {
        guiTestUIMap.dropDownBox().assertHasValues(true, new String[] { null });
        checkLastStepStatus(TestStatus.PASSED);
        guiTestUIMap.dropDownBox().assertHasValues(true, "Partner_Name_value");
        checkLastStepStatus(TestStatus.FAILED);
    }

    @Test
    public void hasLabels_multiarg() {
        // positive test
        guiTestUIMap.dropDownBox().assertHasLabels(true, "Partner Name", "Partner Short Name", "City", "State", "Country",
                "Sales Rep",
                "Partner Number", "District", "Customer Facility Code", "Equipment Customer", "Non Globe BP", "Creation SOU",
                "<EMPTY>", "Disabled entry");
        checkLastStepStatus(TestStatus.PASSED);

        // positive test with shuffled data and ignore order
        guiTestUIMap.dropDownBox().assertHasLabels(false, "Partner Name", "Equipment Customer", "Partner Short Name", "City",
                "State", "Disabled entry", "Country", "Sales Rep", "Partner Number", "District", "Customer Facility Code",
                "Non Globe BP", "Creation SOU", "<EMPTY>");
        checkLastStepStatus(TestStatus.PASSED);

        // negative test with multiple values
        guiTestUIMap.dropDownBox().assertHasLabels(true, "Partner Name", "Partner Short Name");
        checkLastStepStatus(TestStatus.FAILED);
    }

    @Test
    public void checkHasLabels_multiarg() {
        // positive test
        boolean checkValue = guiTestUIMap.dropDownBox().checkHasLabels(true, "Partner Name", "Partner Short Name", "City",
                "State",
                "Country", "Sales Rep", "Partner Number", "District", "Customer Facility Code", "Equipment Customer",
                "Non Globe BP", "Creation SOU", "<EMPTY>", "Disabled entry");
        Assert.assertTrue(checkValue);

        // positive test with shuffled data and ignore order
        checkValue = guiTestUIMap.dropDownBox().checkHasLabels(false, "Partner Name", "Partner Short Name", "City", "State",
                "Country", "Sales Rep", "Partner Number", "District", "Equipment Customer", "Non Globe BP", "Creation SOU",
                "<EMPTY>", "Disabled entry", "Customer Facility Code");
        Assert.assertTrue(checkValue);

        // negative test with multiple values
        checkValue = guiTestUIMap.dropDownBox().checkHasLabels(false, "Partner Name", "Partner Short Name");
        Assert.assertFalse(checkValue);
    }

    @Test
    public void hasLabels_singlearg() {
        guiTestUIMap.dropDownBox().assertHasLabels(true, "Partner Name");
        checkLastStepStatus(TestStatus.FAILED);
    }

    @Test
    public void checkHasLabels_singlearg() {
        boolean checkValue = guiTestUIMap.dropDownBox().checkHasLabels(false, "Partner Name");
        Assert.assertFalse(checkValue);
    }

    @Test
    public void containsLabels() {
        // positive test with complete label list
        guiTestUIMap.dropDownBox().assertContainsLabels("Partner Name", "Partner Short Name", "City", "State", "Country", "Sales Rep", "Partner Number", "District", "Customer Facility Code",
                "Equipment Customer", "Non Globe BP", "Creation SOU", "Disabled entry");
        checkLastStepStatus(TestStatus.PASSED);
        // positive test with partial label list
        guiTestUIMap.dropDownBox().assertContainsLabels("Partner Short Name", "Disabled entry");
        checkLastStepStatus(TestStatus.PASSED);
        // negative test with multiple values
        guiTestUIMap.dropDownBox().assertContainsLabels("Partner Name", "xxx");
        checkLastStepStatus(TestStatus.FAILED);
    }

    @Test
    public void containsValues() {
        // positive test with whole, but shuffled list
        guiTestUIMap.dropDownBox().assertContainsValues("District_value", "Partner_Name_value", "Partner Short Name_value",
                "City_value", "State_value", "Country_value", "Sales Rep_value", "Partner Number_value",
                "Customer Facility Code_value", "Equipment Customer_value", "Non Globe BP_value", "Creation SOU_value",
                "empty_value", "Disabled entry_value");
        checkLastStepStatus(TestStatus.PASSED);

        // positive test with partial list
        guiTestUIMap.dropDownBox().assertContainsValues("District_value", "Partner_Name_value");
        checkLastStepStatus(TestStatus.PASSED);

        // negative test
        guiTestUIMap.dropDownBox().assertContainsValues("Some_value");
        checkLastStepStatus(TestStatus.FAILED);
    }

    @Test
    public void containsLabelsCheck() {
        // positive test with complete label list
        boolean checkValue = guiTestUIMap.dropDownBox().checkContainsLabels("Partner Name", "Partner Short Name", "City",
                "State", "Country", "Sales Rep", "Partner Number", "District", "Customer Facility Code", "Equipment Customer",
                "Non Globe BP", "Creation SOU", "Disabled entry");
        Assert.assertTrue(checkValue);
        // positive test with partial label list
        checkValue = guiTestUIMap.dropDownBox().checkContainsLabels("Partner Short Name", "Disabled entry");
        Assert.assertTrue(checkValue);
        // negative test with multiple values
        checkValue = guiTestUIMap.dropDownBox().checkContainsLabels("Partner Name", "xxx");
        Assert.assertFalse(checkValue);
    }

    @Test
    public void hasSelectedIgnoreCaseTrimmed_existingLabels() {
        // positive test
        guiTestUIMap.dropDownBox().assertSelectedIgnoreCaseTrimmed(" PartneR NamE\r\n ");
        checkLastStepStatus(TestStatus.PASSED);
        // negative test with unselected label
        guiTestUIMap.dropDownBox().assertSelectedIgnoreCaseTrimmed(" City ");
        checkLastStepStatus(TestStatus.FAILED);
    }

    @Test
    public void hasSelectedIgnoreCaseTrimmed_nonexistingLabels() {
        // negative test with non-existing label
        guiTestUIMap.dropDownBox().assertSelectedIgnoreCaseTrimmed(" xxx ");
        checkLastStepStatus(TestStatus.FAILED);
    }

    @Test
    public void selectionMatches() {
        // positive test
        guiTestUIMap.dropDownBox().assertSelectionMatches(new ContainsIgnoreCaseValidator("PartneR Nam"));
        checkLastStepStatus(TestStatus.PASSED);
        // negative test with unselected label
        guiTestUIMap.dropDownBox().assertSelectionMatches(new ContainsIgnoreCaseValidator("City"));
        checkLastStepStatus(TestStatus.FAILED);
    }

}


text:
@interface NSBundle (JL)

- (NSString *)pathForScaledResource:(NSString *)name ofType:(NSString *)ext;

@end


text:
#import <UIKit/UIKit.h>

/**
 *  The check mark to show selected asset.
 */
@interface CTAssetCheckmark : UIView

#pragma mark Customizing Appearance

/**
 *  @name Customizing Appearance
 */

/**
*  To set margin of the label from the edges.
*
*  @param margin The margin from the edges.
*
*  @see setMargin:forVerticalEdge:horizontalEdge:
*/
- (void)setMargin:(CGFloat)margin UI_APPEARANCE_SELECTOR;

/**
 *  To set margin of the check mark from specific edges.
 *
 *  @param margin The margin from the edges.
 *  @param edgeX  The layout attribute respresents vertical edge that the check mark pins to. Either `NSLayoutAttributeLeft` or `NSLayoutAttributeRight`.
 *  @param edgeY  The layout attribute respresents horizontal edge that the check mark pins to. Either `NSLayoutAttributeTop` or `NSLayoutAttributeBottom`.
 */
- (void)setMargin:(CGFloat)margin forVerticalEdge:(NSLayoutAttribute)edgeX horizontalEdge:(NSLayoutAttribute)edgeY UI_APPEARANCE_SELECTOR;

@end


text:
from sys import maxsize

class Project:
    def __init__(self, name=None, description=None, id = None):
        self.id = id
        self.name = name
        self.description = description

    def __repr__(self):
        return "%s:%s;%s" %(self.id, self.name, self.description)

    def __eq__(self, other):
        return (self.id is None or other.id is None or self.id == other.id) and self.name == other.name and self.description == other.description

    def id_or_max(self):
        if self.id:
            return int(self.id)
        else:
            return maxsize


text:
'use strict';

const models = require('./index');

/**
 * The parameters for a docker quick build.
 *
 * @extends models['RunRequest']
 */
class DockerBuildRequest extends models['RunRequest'] {
  /**
   * Create a DockerBuildRequest.
   * @property {array} [imageNames] The fully qualified image names including
   * the repository and tag.
   * @property {boolean} [isPushEnabled] The value of this property indicates
   * whether the image built should be pushed to the registry or not. Default
   * value: true .
   * @property {boolean} [noCache] The value of this property indicates whether
   * the image cache is enabled or not. Default value: false .
   * @property {string} dockerFilePath The Docker file path relative to the
   * source location.
   * @property {string} [target] The name of the target build stage for the
   * docker build.
   * @property {array} [argumentsProperty] The collection of override arguments
   * to be used when executing the run.
   * @property {number} [timeout] Run timeout in seconds. Default value: 3600 .
   * @property {object} platform The platform properties against which the run
   * has to happen.
   * @property {string} [platform.os] The operating system type required for
   * the run. Possible values include: 'Windows', 'Linux'
   * @property {string} [platform.architecture] The OS architecture. Possible
   * values include: 'amd64', 'x86', 'arm'
   * @property {string} [platform.variant] Variant of the CPU. Possible values
   * include: 'v6', 'v7', 'v8'
   * @property {object} [agentConfiguration] The machine configuration of the
   * run agent.
   * @property {number} [agentConfiguration.cpu] The CPU configuration in terms
   * of number of cores required for the run.
   * @property {string} [sourceLocation] The URL(absolute or relative) of the
   * source context. It can be an URL to a tar or git repository.
   * If it is relative URL, the relative path should be obtained from calling
   * listBuildSourceUploadUrl API.
   * @property {object} [credentials] The properties that describes a set of
   * credentials that will be used when this run is invoked.
   * @property {object} [credentials.sourceRegistry] Describes the credential
   * parameters for accessing the source registry.
   * @property {string} [credentials.sourceRegistry.loginMode] The
   * authentication mode which determines the source registry login scope. The
   * credentials for the source registry
   * will be generated using the given scope. These credentials will be used to
   * login to
   * the source registry during the run. Possible values include: 'None',
   * 'Default'
   * @property {object} [credentials.customRegistries] Describes the credential
   * parameters for accessing other custom registries. The key
   * for the dictionary item will be the registry login server
   * (myregistry.azurecr.io) and
   * the value of the item will be the registry credentials for accessing the
   * registry.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DockerBuildRequest
   *
   * @returns {object} metadata of DockerBuildRequest
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DockerBuildRequest',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'type',
          clientName: 'type'
        },
        uberParent: 'RunRequest',
        className: 'DockerBuildRequest',
        modelProperties: {
          isArchiveEnabled: {
            required: false,
            serializedName: 'isArchiveEnabled',
            defaultValue: false,
            type: {
              name: 'Boolean'
            }
          },
          type: {
            required: true,
            serializedName: 'type',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          imageNames: {
            required: false,
            serializedName: 'imageNames',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          isPushEnabled: {
            required: false,
            serializedName: 'isPushEnabled',
            defaultValue: true,
            type: {
              name: 'Boolean'
            }
          },
          noCache: {
            required: false,
            serializedName: 'noCache',
            defaultValue: false,
            type: {
              name: 'Boolean'
            }
          },
          dockerFilePath: {
            required: true,
            serializedName: 'dockerFilePath',
            type: {
              name: 'String'
            }
          },
          target: {
            required: false,
            serializedName: 'target',
            type: {
              name: 'String'
            }
          },
          argumentsProperty: {
            required: false,
            serializedName: 'arguments',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ArgumentElementType',
                  type: {
                    name: 'Composite',
                    className: 'Argument'
                  }
              }
            }
          },
          timeout: {
            required: false,
            serializedName: 'timeout',
            defaultValue: 3600,
            constraints: {
              InclusiveMaximum: 28800,
              InclusiveMinimum: 300
            },
            type: {
              name: 'Number'
            }
          },
          platform: {
            required: true,
            serializedName: 'platform',
            type: {
              name: 'Composite',
              className: 'PlatformProperties'
            }
          },
          agentConfiguration: {
            required: false,
            serializedName: 'agentConfiguration',
            type: {
              name: 'Composite',
              className: 'AgentProperties'
            }
          },
          sourceLocation: {
            required: false,
            serializedName: 'sourceLocation',
            type: {
              name: 'String'
            }
          },
          credentials: {
            required: false,
            serializedName: 'credentials',
            type: {
              name: 'Composite',
              className: 'Credentials'
            }
          }
        }
      }
    };
  }
}

module.exports = DockerBuildRequest;


text:
import plugincon

pstate = {}

messages = [
    "Hey! This is not an easter egg! This is a dragon egg! Go away!",
    "*egg hatches* I warned!",
    "*stares as the hatchling feeds on {0}*",
    "*watches hidden as the hatchling burps*",
    "*stays hidden from the hatchling*",
    "*is found by the hatchling*",
    "*hatchling is full*",
    "*shivers and pets hatchling*",
    "*is licked by hatchling*",
    "*hugs hatchling*",
    "*stares as your corpse disappears and hears respawn sounds, and realizes; this is a multiplayer game!*",
    "*lets the hatchling go live it's adventures*",
    "*hears a random {0} stepping sounds and finds another egg*",
    "*finds you coming downstairs and staring the egg*"
]

@plugincon.easy_bot_command("__oops__")
def easter_egg(message, raw):
    if raw:
        return

    if message["nickname"] not in pstate:
        pstate[message["nickname"]] = 0

    else:
        pstate[message["nickname"]] += 1

    if pstate[message["nickname"]] >= len(messages):
        pstate[message["nickname"]] = 0

    return messages[pstate[message["nickname"]]].format(message["nickname"])


text:
from distutils.core import setup

setup(name='pymus',
      version='1.0',
      description='Full-featured Python Audio Library',
      author='Creston Bunch',
      author_email='crestonbunch@gmail.com',
      keywords='audio soud synthesizer spectrogram',
      url='https://github.com/crestonbunch/pymus',
      packages=['pymus'],
     )


text:
package fr.data.preprocess;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;

import au.com.bytecode.opencsv.CSVReader;
import au.com.bytecode.opencsv.CSVWriter;

import com.mysql.jdbc.PreparedStatement;

import fr.data.util.GetConnexion;

public class GenerateBinaryDataArff {

	private static  Map<String,String> listeMot=new LinkedHashMap<String,String>();

	public static void main(String[] args) throws IOException {

		   CSVReader reader = new CSVReader(new FileReader("data.csv"));

		   ///charger l'entetedu fichier
   		String [] nextLine;
  			 while ((nextLine = reader.readNext()) != null)
  			 	 {
                  for(String valeur:nextLine)
                  		add(valeur);
   		    }

  			 reader.close();

  			System.out.println("la taille est : "+listeMot.size());

  			//write header

  			try
  			{
  				 PrintWriter ecri ;
 				ecri = new PrintWriter(new FileWriter("data.arff"));
 				ecri.println("@relation tweets");
 				ecri.println();
 				Set<String> lesId=listeMot.keySet();

 				for(String unId:lesId){

 					ecri.println("@attribute "+listeMot.get(unId)+" {TRUE, FALSE}");

 				}

  				ecri.println();
  				ecri.println("@data");

  				ecri.flush();
  				ecri.close();
  			}//try
  			catch (NullPointerException a)
  			{
  				System.out.println("Erreur : pointeur null");
  			}
  			catch (IOException a)
  			{
  				System.out.println("Problème d'IO");
  			}
//  			catch (SQLException e) {
// 				// TODO Auto-generated catch block
// 				e.printStackTrace();
// 			}
	}

	public static String getLine(String text)
	{
            boolean h=false;
			String line="";
			Set<String> lesId=listeMot.keySet();

			for(String unId:lesId){
				String mot=listeMot.get(unId);

				if(!h){

					if(containWord(text, mot, true))
					{
						line+="y";
					}
					else
					{
						line+="n";
					}
					h=!h;
				}
				else{

					if(containWord(text, mot, true))
					{
						line+=",y";
					}
					else
					{
						line+=",n";
					}

				}

			}

			return line;

	}

	/**
	 * ecriture d'une ligne dans le fichier csv
	 * @param csvWriter
	 * @param line
	 */
	public static void writeLine(CSVWriter csvWriter,String line){

		String [] record = line.split(",");

		csvWriter.writeNext(record);

	}

	/**
	 *  fonction de comparaison
	 * @param sentence
	 * @param word
	 * @param strict
	 * @return
	 */
	public static boolean containWord(String sentence,String word,boolean strict){

		if(strict)
			return containWordStrict(sentence, word);

		return containWordLarge(sentence, word);
	}

	/**
	 * egalité strict
	 * @param sentence
	 * @param word
	 * @return
	 */
public static boolean containWordStrict(String sentence,String word){

	StringTokenizer st = new StringTokenizer(sentence);

	String current;

	while (st.hasMoreElements()) {
		current=(String) st.nextElement();
		if(current.equals(word))
		return true;
	}

		return false;
	}

/**
 * egalité large
 * @param sentence
 * @param word
 * @return
 */
public static boolean containWordLarge(String sentence,String word){

	if(sentence.contains(word))
		return true;

	return false;
}

	public static void add(String mot)
	{

		if(!exist(mot.trim())&&!mot.contains("'"))
		listeMot.put(mot.trim(),mot.trim());
	}

	public static String findById(String id){

		return listeMot.get(id);
	}

	public static  boolean exist(String id)
	{
		return listeMot.get(id)!=null;
	}

	public static void afficheTout(){

		Set<String> lesId=listeMot.keySet();

		for(String unId:lesId){
			String mot=listeMot.get(unId);

			System.out.println(mot);

		}

	}

}