text:
(*

category:      Test
synopsis:      Basic two reactions with three species in one compartment
               and two events that assign value to a species.
componentTags: Compartment, Species, Reaction, Parameter, EventNoDelay
testTags:      Concentration, NonUnityCompartment
testType:      TimeCourse
levels:        2.1, 2.2, 2.3, 2.4, 3.1
generatedBy:   Numeric

The model contains one compartment called C.  There are three species
called S1, S2 and S3 and two parameters called k1 and k2.  The model
contains two reactions defined as:

[{width:30em,margin: 1em auto}|  *Reaction*  |  *Rate*  |
| S1 + S2 -> S3 | $k1 * S1 * S2 * C$  |
| S3 -> S1 + S2 | $k2 * S3 * C$     |]

The model contains two events that assign values to species S2 and S1:

[{width:30em,margin: 1em auto}| | *Trigger*   | *Delay* | *Assignments* |
 | Event1                      | $S1 < 0.75$ | $-$     | $S2 = 1$      |
 | Event2                      | $S3 > 1.4$  | $-$     | $S1 = 1$      |]

The initial conditions are as follows:

[{width:30em,margin: 1em auto}| |*Value* |*Units*                   |
|Initial concentration of S1          |$1.0$   |mole litre^-1^                      |
|Initial concentration of S2          |$2.0$   |mole litre^-1^                      |
|Initial concentration of S3          |$1.0$   |mole litre^-1^                      |
|Value of parameter k1         |$0.75$  |litre mole^-1^ second^-1^ |
|Value of parameter k2         |$0.25$  |second^-1^                |
|Volume of compartment C       |$1.43$  |litre                     |]

*)

newcase[ "00744" ];

addCompartment[ C, size -> 1.43 ];
addSpecies[ S1, initialConcentration -> 1.0];
addSpecies[ S2, initialConcentration -> 2.0];
addSpecies[ S3, initialConcentration -> 1.0];
addParameter[ k1, value -> 0.75 ];
addParameter[ k2, value -> 0.25 ];
addReaction[ S1 + S2 -> S3, reversible -> False,
	     kineticLaw -> k1 * S1 * S2 * C ];
addReaction[ S3 -> S1 + S2, reversible -> False,
	     kineticLaw -> k2 * S3 * C ];
addEvent[ trigger -> S1 < 0.75, eventAssignment -> S2->1 ];
addEvent[ trigger -> S3 > 1.4, eventAssignment -> S1->1 ];

makemodel[]


text:
#  Documentation

## Install

```php

// Manual require
require "application/pdo_database.php";

// Vendor require
require  "vendor/autoload.php";

$db = new pdo_mysql([
	// Server Ip Default: localhost
	'ip'       => 'localhost',
	// Database Name
	'database' => 'is_test',
	// Database Engine Name oracle,mysql ...
	'dbengine' => 'mysql',
	// Database Username
	'username' => 'root',
	// Database Password
	'password' => '',
	// Database Charset Default: utf8
	'charset'  => 'utf8',
	// Database table prefix Default: null
	'prefix'   => 'is_',
    	// Database Debug Type
    	'debugType' => true,
	// Database query log Default: on
	'querylog' => 1,
]);

```

## Query Log
```php

// query log on
'querylog' => 1

// print query log
// $db->debug returning all sql query ( speed , query , values )
echo "<pre>";
print_r($db->debug);
echo "</pre>";

Output:

Array
(
    [0] => Array
        (
            [sql] => INSERT INTO is_users (username,email) VALUES (?,?),(?,?),(?,?)
            [value] => Array
                (
                    [0] => ismail_satilmis
                    [1] => ismaiil_0234@hotmail.com
                    [2] => ismail_satilmis
                    [3] => ismaiil_0234@hotmail.com
                    [4] => ismail_satilmis
                    [5] => ismaiil_0234@hotmail.com
                )

            [speed] => 0.0016200542449951
        )
)

```

## Speed dial
 * [debugOutput Function](#debugoutput-function)
 * [setDebug Function](#setdebug-function)
 * [Special Function](#special-function)
 * [Transaction Function](#transaction-function)
 * [Truncate Table](#truncate-table)
 * [Drop Table](#drop-table)
 * [Empty Table](#empty-table)
 * [Analyze Table](#analyze-table)
 * [Checksum Table](#checksum-table)
 * [Check Table](#check-table)
 * [Repair Table](#repair-table)
 * [Insert Data](#insert-data)
 * [Multi Insert Data](#multi-insert-data)
 * [Update - set](#set)
 * [Update - update](#update)
 * [Delete](#delete)
 * [Select - select](#select)
 * [Select - from](#from)
 * [Select - where](#where)
 * [Select - or_where](#or_where)
 * [Select - where_in](#where_in)
 * [Select - or_where_in](#or_where_in)
 * [Select - where_not_in](#where_not_in)
 * [Select - or_where_not_in](#or_where_not_in)
 * [Select - between](#between)
 * [Select - or_between](#or_between)
 * [Select - between_not](#between_not)
 * [Select - or_between_not](#or_between_not)
 * [Select - like](#like)
 * [Select - or_like](#or_like)
 * [Select - like_not](#like_not)
 * [Select - or_like_not](#or_like_not)
 * [Select - orderby](#orderby)
 * [Select - get_sql_select](#get_sql_select)
 * [Select - min](#min)
 * [Select - max](#max)
 * [Select - count](#count)
 * [Select - avg](#avg)
 * [Select - sum](#sum)
 * [Select - group_start](#group_start---or_group_start---group_end)
 * [Select - or_group_start](#group_start---or_group_start---group_end)
 * [Select - group_end](#group_start---or_group_start---group_end)
 * [Select - having](#having)
 * [Select - join](#join)
 * [Limit](#limit)
 * [Output](#output)

### debugOutput Function

```php
/*
 * return all sql query html table details speed , query , ms speed
 *
 */
$db->debugOutput();

```

### setDebug Function

```php
/*
 * sql query error print type
 * @params false/true
 *         true  => sql query error print exit
 *     false => sql query error throw exception
 */
$db->setDebug( false );

```

### Special Function
```php
/*
 * @param sql query
 * @param sql query values
 * @param return type
 * 0 => DEFAULT true/false
 * 1 => fetchAll ( Object )
 * 2 => fetchAll ( Array )
 * 3 => fetch ( Object )
 * 4 => fetch ( Array )
 * 5 => rowcount ( int )
 * 6 => lastInsertId ( int )
 */
$db->query("SELECT * FROM is_users WHERE id = ?",[22],1);

```

### Transaction Function
```php
/*
 * @void started transaction
 */
$db->transactionStart();
/*
 * sql query error throw exception type
 */
$db->setDebug( false );

try {

    echo $db->multi_insert('table',["name","surname"],[
        [
            'ismail_satilmis',
            'ismaiil_0234@hotmail.com',
        ],
        [
            'ismail_satilmis',
            'ismaiil_0234@hotmail.com',
        ],
        [
            'ismail_satilmis',
            'ismaiil_0234@hotmail.com',
        ],
     ]);

    /*
     *  @void sql querys send commit
     */
    $db->commit();

} catch (Exception $e) {

    /*
     *  @void sql querys roll back
     */
    $db->rollBack();

}

```

### Truncate Table
```php

// TRUNCATE TABLE tablename
$db->truncate('TableName');

```

### Drop Table
```php

// DROP TABLE tablename
$db->drop('TableName');

```

### Empty Table
```php

// DELETE FROM tablename
$db->empty_table('TableName');

```

### Analyze Table
```php

// ANALYZE TABLE tablename
$db->analyze('TableName');

```

### Checksum Table
```php

// CHECKSUM TABLE tablename
$db->checksum('TableName');

```

### Check Table
```php

// CHECK TABLE tablename
$db->check('TableName');

```

### Optimize Table
```php

// OPTIMIZE TABLE tablename
$db->optimize('TableName');

```

### Repair Table
```php

// REPAIR TABLE tablename
$db->repair('TableName');

```

## Insert

### Insert Data
```php

$arr = [
  'field1' => 'one',
  'field2' => 'two'
];

// INSERT INTO tablename (field1,field2) VALUES(one,two)
$db->insert('TableName',$arr);

```

### Multi Insert Data
```php

$field = [
  'field1',
  'field2'
];

$val = [
  [
    'one',
    'two'
  ],
  [
    'one',
    'two'
  ],
  [
    'one',
    'two'
  ]
];

// INSERT INTO tablename (field1,field2) VALUES (one,two),(one,two),(one,two)
$db->multi_insert('TableName',$arr,$val);

```

## Update

### set

```php

// SET username = ismail
$db->set('username','ismail');

// SET point = point + 5
$db->set('point', 'point + ?',5);

// SET username = ismail , point = point + 5
$db->set([
    [ "username" , "ismail" ],
    [ "point" , "point + ? " , 5 ],
]);

```

### update

```php

// UPDATE users SET username = ismail
$db->set('username','ismail')->update('users);

// UPDATE users SET point = point - 20 WHERE id = 9
$db->set('point','point - ?',20)->where('id',9)->update('users');
```

## Delete

```php

// DELETE FROM users WHERE id = 9
$db->where('id',9)->delete('users');

// DELETE FROM users WHERE id IN(1,2,3,4) AND point = 20
$db->where_in('id',[1,2,3,4,5])->where('point',20)->delete('users');
```

## Select

### select

```php

// SELECT id , username , email
$db->select('id,username,email');

// SELECT *
$db->select('*');

```

### from

```php

// SELECT id , username , email FROM users
$db->select('id,username,email')->from('users');

// SELECT * FROM users
$db->select('*')->from('users');

```

### where

```php

// SELECT id , username , email FROM users WHERE id = 99
$db->select('id,username,email')->from('users')->where('id','99');

// SELECT * FROM users WHERE id != 99
$db->select('*')->from('users')->where('id','!=',99);

```

### or_where

```php

// SELECT id , username , email FROM users WHERE id = 99 OR id = 88
$db->select('id,username,email')->from('users')->where('id','99')->or_where('id',88);

// SELECT * FROM users WHERE id != 99 OR id = 99
$db->select('*')->from('users')->where('id','!=',99)->or_where('id',99);

```

### where_in

```php

// SELECT id , username , email FROM users WHERE id IN(1,2,3,4,5)
$db->select('id,username,email')->from('users')->where_in('id',[1,2,3,4,5]);

// SELECT * FROM users WHERE id IN(99)
$db->select('*')->from('users')->where_in('id',[99]);

```

### or_where_in

```php

// SELECT id , username , email FROM users WHERE id IN(1,2,3,4,5) OR point IN(20,40,60)
$db->select('id,username,email')->from('users')->where_in('id',[1,2,3,4,5])->or_where_in('point',[20,40,60]);

// SELECT * FROM users WHERE id IN(99) OR point IN(20,40,60)
$db->select('*')->from('users')->where_in('id',[99])->or_where_in('point',[20,40,60]);

```

### where_not_in

```php

// SELECT id , username , email FROM users WHERE id NOT IN(1,2,3,4,5)
$db->select('id,username,email')->from('users')->where_not_in('id',[1,2,3,4,5]);

// SELECT * FROM users WHERE id NOT IN(99)
$db->select('*')->from('users')->where_not_in('id',[99]);

```

### or_where_not_in

```php

// SELECT id , username , email FROM users WHERE id IN(1,2,3,4,5) OR point NOT IN(20,40,60)
$db->select('id,username,email')->from('users')->where_in('id',[1,2,3,4,5])->or_where_not_in('point',[20,40,60]);

// SELECT * FROM users WHERE id IN(99) OR point NOT IN(20,40,60)
$db->select('*')->from('users')->where_in('id',[99])->or_where_not_in('point',[20,40,60]);

```

### between

```php

// SELECT id , username , email FROM users WHERE id BETWEEN 20 AND 40
$db->select('id,username,email')->from('users')->between('id',20,40);

// SELECT * FROM users WHERE point BETWEEN 20 AND 100
$db->select('*')->from('users')->between('point',20,100);

```

### or_between

```php

// SELECT id , username , email FROM users WHERE id = 30 OR id BETWEEN 20 AND 40
$db->select('id,username,email')->from('users')->where('id',30)->or_between('id',20,40);

// SELECT * FROM users WHERE id = 30 OR point BETWEEN 20 AND 100
$db->select('*')->from('users')->where('id',30)->or_between('point',20,100);

```

### between_not

```php

// SELECT id , username , email FROM users WHERE id NOT BETWEEN 20 AND 40
$db->select('id,username,email')->from('users')->between_not('id',20,40);

// SELECT * FROM users WHERE point NOT BETWEEN 20 AND 100
$db->select('*')->from('users')->between_not('point',20,100);

```

### or_between_not

```php

// SELECT id , username , email FROM users WHERE id = 30 OR id NOT BETWEEN 20 AND 40
$db->select('id,username,email')->from('users')->where('id',30)->or_between_not('id',20,40);

// SELECT * FROM users WHERE id = 30 OR point NOT BETWEEN 20 AND 100
$db->select('*')->from('users')->where('id',30)->or_between_not('point',20,100);

```

### like

```php

// SELECT id , username , email FROM users WHERE username LIKE '%ismail%'
$db->select('id,username,email')->from('users')->like('username','ismail','center');

// SELECT * FROM users WHERE username LIKE 'ismail%'
$db->select('*')->from('users')->like('username','ismail','right');

// SELECT * FROM users WHERE username LIKE '%ismail'
$db->select('*')->from('users')->like('username','ismail','left');

```

### or_like

```php

// SELECT * FROM users WHERE username LIKE '%ismail%' OR email LIKE '%ismail%'
$db->select('*')->from('users')->like('username','ismail')->or_like('email','ismail');

```

### like_not

```php

// SELECT * FROM users WHERE username NOT LIKE '%ismail%'
$db->select('*')->from('users')->like_not('username','ismail');

```

### or_like_not

```php

// SELECT * FROM users WHERE username LIKE '%ismail%' OR email NOT LIKE '%ismail%'
$db->select('*')->from('users')->like('username','ismail')->or_like_not('email','ismail');

```

### limit

```php

// SELECT * FROM users WHERE username LIKE '%ismail%' LIMIT 20,40
$db->select('*')->from('users')->like('username','ismail')->limit(20,40);

// SELECT * FROM users WHERE username LIKE '%ismail%' LIMIT 20
$db->select('*')->from('users')->like('username','ismail')->limit(20);

```

### orderby

```php

// SELECT * FROM users WHERE username LIKE '%ismail%' ORDER BY id ASC LIMIT 20,40
$db->select('*')->from('users')->like('username','ismail')->limit(20,40)->orderby('id','ASC');

// SELECT * FROM users WHERE username LIKE '%ismail%' ORDER BY id LIMIT 20,40
$db->select('*')->from('users')->like('username','ismail')->limit(20,40)->orderby('id');

// SELECT * FROM users WHERE username LIKE '%ismail%' ORDER BY id ASC,email DESC LIMIT 20,40
$db->select('*')->from('users')->like('username','ismail')->limit(20,40)->orderby(["id" => "DESC","email" => "ASC"]);

// SELECT * FROM users WHERE username LIKE '%ismail%' ORDER BY id ASC,email DESC,point LIMIT 20,40
$db->select('*')->from('users')->like('username','ismail')->limit(20,40)->orderby(["id" => "DESC","email" => "ASC","point"]);

```

### get_sql_select

```php

$db->select('*')->from('users')->where('id',99)->or_like('id',1)->limit(6)->orderby('id')->get_sql_select();

/*
 * PRINT
 * SELECT * FROM is_users WHERE id = ?  OR id  LIKE ? ORDER BY id  LIMIT ?
 */

```

### min

```php

// SELECT MIN(id) AS variable FROM users WHERE id LIKE '%1%'
$db->min('id','variable')->from('users')->like('id',1)->get_array()

// SELECT MIN(id) AS id FROM users WHERE id LIKE '%1%'
$db->min('id')->from('users')->like('id',1)->get_array()

```

### max

```php

// SELECT MAX(id) AS variable FROM users WHERE id LIKE '%1%'
$db->max('id','variable')->from('users')->like('id',1)->get_array()

// SELECT MAX(id) AS id FROM users WHERE id LIKE '%1%'
$db->max('id')->from('users')->like('id',1)->get_array()

```

### count

```php

// SELECT COUNT(id) AS variable FROM users WHERE id LIKE '%1%'
$db->count('id','variable')->from('users')->like('id',1)->get_array()

// SELECT COUNT(id) AS id FROM users WHERE id LIKE '%1%'
$db->count('id')->from('users')->like('id',1)->get_array()

```

### avg

```php

// SELECT AVG(id) AS variable FROM users WHERE id LIKE '%1%'
$db->avg('id','variable')->from('users')->like('id',1)->get_array()

// SELECT AVG(id) AS id FROM users WHERE id LIKE '%1%'
$db->avg('id')->from('users')->like('id',1)->get_array()

```

### sum

```php

// SELECT SUM(id) AS variable FROM users WHERE id LIKE '%1%'
$db->sum('id','variable')->from('users')->like('id',1)->get_array()

// SELECT SUM(id) AS id FROM users WHERE id LIKE '%1%'
$db->sum('id')->from('users')->like('id',1)->get_array()

```

### group_start - or_group_start - group_end

```php

//SELECT COUNT(id) AS toplam FROM is_users WHERE id = ?  AND ( id = ?  OR ( email = ?  AND ( username = ?  ) ) ) AND point = ?
$db->count('id','toplam')->from('users')
                ->where('id', 1)
            ->group_start()
                    ->where('id', 1)
                        ->or_group_start()
                                ->where('email', 'ismaiil_0234@hotmail.com')
                            ->group_start()
                                ->where('username', 'ismail_satilmis')
                             ->group_end()
                            ->group_end()
                     ->group_end()
                ->where('point', 0)->get_array()

```

### groupby

```php

// SELECT COUNT(id) AS toplam FROM is_users GROUP BY id,test
$db->select('*')->from('users')->groupby('id')->get_result()

```

### having

```php

// SELECT * FROM is_users  GROUP BY id HAVING id = ?
$db->select('*')->from('users')->groupby('id')->having('id',1)->get_result()

```

### join

```php

// SELECT is_users.id FROM is_users INNER JOIN is_orders ON is_orders.uid = is_users.id WHERE is_users.id = ?
$db->select('users.id')->from('users')->join('orders','orders.uid = users.id','INNER')->where('users.id',1)->get_array()

// SELECT is_users.id FROM is_users LEFT JOIN is_orders ON is_orders.uid = is_users.id WHERE is_users.id = ?
$db->select('users.id')->from('users')->join('orders','orders.uid = users.id','LEFT')->where('users.id',1)->get_array()

// SELECT is_users.id FROM is_users RIGHT JOIN is_orders ON is_orders.uid = is_users.id WHERE is_users.id = ?
$db->select('users.id')->from('users')->join('orders','orders.uid = users.id','RIGHT')->where('users.id',1)->get_array()

```

### Output

```php

result_object(); // object all
result_array(); // array all
get_object(); // object one
get_array(); // array one

// SELECT username,id FROM users WHERE id = 2  ORDER BY id ASC LIMIT 1
$db->select('username,id')->from('users')->where('id',2)->orderby('id','ASC')->limit(1)->result_object();

Array
(
    [0] => stdClass Object
        (
            [username] => ismail
            [id] => 2
        )

)

// SELECT username,id FROM users WHERE id = 2  ORDER BY id ASC LIMIT 1
$db->select('username,id')->from('users')->where('id',2)->orderby('id','ASC')->limit(1)->result_array();

Array
(
    [0] => Array
        (
            [username] => ismail
            [0] => ismail
            [id] => 2
            [1] => 2
        )

)

// SELECT username,id FROM users WHERE id = 2  ORDER BY id ASC LIMIT 1
$db->select('username,id')->from('users')->where('id',2)->orderby('id','ASC')->limit(1)->get_object();

stdClass Object
(
    [username] => ismail
    [id] => 2
)

// SELECT username,id FROM users WHERE id = 2  ORDER BY id ASC LIMIT 1
$db->select('username,id')->from('users')->where('id',2)->orderby('id','ASC')->limit(1)->get_array();

Array
(
    [username] => ismail
    [0] => ismail
    [id] => 2
    [1] => 2
)
```

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

		<meta charset="utf-8">
		<meta http-equiv="x-ua-compatible" content="ie=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui" />

				<form id="cf-form">

					<textarea name="story" cf-questions="Tell me a story about yourself" rows="4"></textarea>
					<input type="file" name="face">
					<input type="text" name="lastname" cf-questions="And lastname?">

					<fieldset>
						Simpel question. Just give me a straight answer
						<select cf-questions="Simpel question. Just give me a straight answer" name="yon" id="yon" class="form-control">
							<option>Yes</option>
							<option>No</option>
						</select>
					</fieldset>

					<fieldset>
						You'll see the submit btn.
						<select multiple cf-questions="Do you think conversational forms will replace web forms in the future?" name="opinion" id="opinion" class="form-control">
							<option></option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
							<option>Definitely</option>
							<option>Maybe</option>
							<option>No</option>
						</select>
					</fieldset>

					<input type="text" name="turtles" cf-questions="Do you like turtles?">

					<fieldset>

							<input cf-questions="Checkboxes, not required." type="checkbox" name="checkboxes" id="checkboxes-1" value="developer">
							Developer

							<input type="checkbox" name="checkboxes" id="checkboxes-2" value="designer">
							Designer

							<input type="checkbox" name="checkboxes" id="checkboxes-3" value="curious-mind">
							Curious mind

					</fieldset>

					<fieldset>

							<input required cf-questions="Required checkboxes" type="checkbox" name="checkboxesReq" id="checkboxesReq-1" value="developer">
							Developer

							<input type="checkbox" name="checkboxesReq" id="checkboxesReq-2" value="designer">
							Designer

							<input type="checkbox" name="checkboxesReq" id="checkboxesReq-3" value="curious-mind">
							Curious mind

					</fieldset>

					<fieldset>
						Occupation

							<input cf-questions="Some radios" type="radio" name="occupation" id="occupation-1" value="developer">
							Developer

							<input type="radio" name="occupation" id="occupation-2" value="designer">
							Designer

							<input type="radio" name="occupation" id="occupation-3" value="curious-mind">
							Curious mind

								<input type="radio" name="occupation" id="occupation-2" value="lost">
								Lost cause

					</fieldset>

				</form>


text:
using System;

namespace DvachBrowser3.SystemInformation
{
    /// <summary>
    /// Информация о системе.
    /// </summary>
    public sealed class SystemInfo : ServiceBase, ISystemInfo
    {
        /// <summary>
        /// Конструктор.
        /// </summary>
        /// <param name="services">Сервисы.</param>
        /// <param name="param">Параметры системы.</param>
        public SystemInfo(IServiceProvider services, SystemInfoParam param) : base(services)
        {
            Platform = param.Platform;
            AppIcon = param.AppIcon;
            SmallAppIcon = param.SmallAppIcon;
        }

        /// <summary>
        /// Платформа.
        /// </summary>
        public AppPlatform Platform { get; private set; }

        /// <summary>
        /// Иконка приложения.
        /// </summary>
        public string AppIcon { get; private set; }

        /// <summary>
        /// Маленькая иконка приложения.
        /// </summary>
        public string SmallAppIcon { get; private set; }
    }
}


text:
from allauth.account.models import EmailAddress
from allauth.socialaccount import providers
from allauth.socialaccount.providers.base import (ProviderAccount,
                                                  AuthAction)
from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider
from allauth.socialaccount.app_settings import QUERY_EMAIL

class Scope(object):
    EMAIL = 'email'
    PROFILE = 'profile'

class GoogleAccount(ProviderAccount):
    def get_profile_url(self):
        return self.account.extra_data.get('link')

    def get_avatar_url(self):
        return self.account.extra_data.get('picture')

    def to_str(self):
        dflt = super(GoogleAccount, self).to_str()
        return self.account.extra_data.get('name', dflt)

class GoogleProvider(OAuth2Provider):
    id = 'google'
    name = 'Google'
    account_class = GoogleAccount

    def get_default_scope(self):
        scope = [Scope.PROFILE]
        if QUERY_EMAIL:
            scope.append(Scope.EMAIL)
        return scope

    def get_auth_params(self, request, action):
        ret = super(GoogleProvider, self).get_auth_params(request,
                                                          action)
        if action == AuthAction.REAUTHENTICATE:
            ret['prompt'] = 'select_account'
        return ret

    def extract_uid(self, data):
        return str(data['id'])

    def extract_common_fields(self, data):
        return dict(email=data.get('email'),
                    last_name=data.get('family_name'),
                    first_name=data.get('given_name'))

    def extract_email_addresses(self, data):
        ret = []
        email = data.get('email')
        if email and data.get('verified_email'):
            ret.append(EmailAddress(email=email,
                       verified=True,
                       primary=True))
        return ret

providers.registry.register(GoogleProvider)


text:
All notable changes to this project will be documented to this file.
Change Log history will be recorded in descending order

## 2.0.3
- Removed unnecessary db dumps and left the current one
- Updated the default database name to "comp4711"

## 2.0.2
** Changed Files**
- MY_Controller make sure that the BSX status is updated in the constructor and not just when render() is called

## 2.0.1
** Changed Files **
- Fix small game status bug that would always say "setup"

## 2.0
- Update website to register whenever the game state is 2 or 3

## 1.0.1
** Changed Files **
- Updated footer to stay at the bottom of the page instead of floating at the bottom of the screen

## 1.0
- Fully function way of viewing stocks and player portfolio data from a database

** Changed Files **
- Update all controllers to show an updated html title based on the page info

## 0.9.0
** Changed Files **
- Updated the look of the error page for stocks and portfolios
- Changed the default 404 page for any other invalid pages

## 0.2.9
** Changed Files **
- Modified the Portfolio and Stock views to bold the title

## 0.2.8
** Added Files **
- Added an Error view
** Changed Files **
- When looking for a player or stock it will provide an error page saying it is not found

## 0.2.7
** Changed Files **
- Changed both Stocks_Single and Portfolio_Single views to display the selection form better
- Modified main stylesheet to reflect changes made to the views

## 0.2.6
** Changed Files **
- Changed the model to get all the recent movements of the stocks
- Changed the stock controllers index function get all the movements and gets information about the stock

## 0.2.6
** Changed Files **
- Modified the look of Single stock view to match the style of the rest of the site

## 0.2.5
** Changed Files **
- Modified the look of both Single and All portfolio views to match the style of the rest of the site

## 0.2.4
** Changed Files **
- Modified how the footer was pinned to the bottom of the page.
- Added some space at the bottom of the page so that the content isn't stuck behind the footer when the user scrolls to the bottom

## 0.2.3
** Changed Files **
- Footer is now pinned to bottom of page.

## 0.2.2
** Changed Files **
- If a user is authenticated, the portfolio link the header takes them to their page
** Added Files **
- Included a helper class that allows the currently page's link to be highlighted in the header bar

## 0.2.1
** Changed Files **
- Fixed the routing I redirected it to /portfolio/(whatever the stock or name is)
- added functions in the controller to handle it

## 0.2.0
- Update the header to change depending on whether a user is logged in or not

## 0.1.10
** Changed Files **
- Added table striped-style to Stock and Portfolio views

## 0.1.9
** Changed Files **
- Update the header styling in main.css
- Change the layout of the header in the _header.php template
- Modified the Stock(s) route to make it plural

## 0.1.8
** Changed Files **
- Added logout controller
- modified header to add logout button

## 0.1.7
** Changed Files **
- Added the beginning of major styling to the main.css stylesheet
- Moved some elements around in the template file

## 0.1.6
** Changed Files **
- Login controller redirects to a different url that works with better routing
- Portfolio controller getSpecificPortfolio takes in the name of a person as the parameter

## 0.1.5
** Added Files **
- ADDED SQL FILE MUST USE FOR WEBSITE TO WORK

## 0.1.4
** Changed Files **
- Created a link between Home page to the portfolio page of the person
- Changed the portfolio_all to link to the portfolio page of the person

## 0.1.4
** Changed Files **
- MY_Controller to pass playerlist to data to all pages.
- when clicking submit on the header it redirects to the portfolio page

## 0.1.3
** Changed Files **
- autoload, config, login to accept redirect

## 0.1.2
** Added Session variable **
-Created LoginModel, Login Controller

## 0.1.1
** Changed Files **
-Added login content to the header template view

## 0.1.0
** Changed Files **
- Added three menu buttons to header template view

## 0.0.9
** Added Files **
- Stocks Controller & Stocks View
- Get data from database to the Stocks View.
- Populated the stocks select list

## 0.0.8
** Changed Files **
- Updated _template file to include header and footer views.
- Replace remote bootstrap and jquery loading with local files
- Update MY_Controller to load in header and footer into _template file

## 0.0.7
** Changed Files **
- Updated the Portfolio_Single, Portfolio Controller to show the current holdings of the specific user.
- Changed function name in Portfolio Controller to be more specific. From getPortfolio($person) to getSpecificPortfolio($person)
- Added functionality to the index method of Portfolio Controller to pass the list of players

## 0.0.6
** Changed Files **
- Updated the Portfolio controller so that it passes data correctly to the view
- Removed page specific code from the _template to increase modularity

## 0.0.5
** Changed Files **
- Changed the Home, Portfolio, _template so you can pass variables from controller to the view

## 0.0.4
** Added Files **
- Created a base controller for parsing the template file
** Changed Files **
- Made the Home controller the new default route
- Removed unused code
- Changed name of Portfolio and Stock view to remove the word 'temp' from infront
- Updated autoload config file to load the database and parser module

## 0.0.3
** Changed Files **
- Added Home Controller
- Added Stock Model
- Loaded Stocks Database for the Homepage

## 0.0.2
** Changed Files **
- Added Controller, View for Portfolio and Stock
- Added Portfolio Model
- Added Routes for Portfolio

## 0.0.1
** Added Files **
- Added CodeIgniter Library, initial project established
- project is now ready to be started


text:
var http = require('http')
var bl = require('bl');

var args = process.argv;
if (args.length == 3) {
  var url = args[2];
  http.get(url, function (response) {
    response.setEncoding("utf8");
    response.pipe(bl(function (err, data) {

      if (err) {
        return console.log("error occured : " + err)
      }

      var str = data.toString()
      console.log(str.length);
      console.log(str);

    }))
  })
}


text:
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TRL.Common.Data;

namespace TRL.Common.Test.Data
{
    [TestClass]
    public class SerialIntegerFactoryTests
    {
        [TestMethod]
        public void SerialIntegerFactory_Makes_Value_Greater_Than_Zero()
        {
            int cookie = SerialIntegerFactory.Make();

            Assert.IsTrue(cookie > 0);
        }

        [TestMethod]
        public void SerialInteger_Values_Are_Not_Equals()
        {
            int first = SerialIntegerFactory.Make();
            int second = SerialIntegerFactory.Make();

            Assert.AreNotEqual(first, second);
            Assert.IsTrue(first + 1 == second);
        }

    }
}


text:
"""
try to do ref-directed assembly for paired reads in a region of a .bam file
"""

import pysam,argparse,subprocess,sys,shutil,os,re
import parseamos
import datetime

from uuid import uuid4

def now():
    return str(datetime.datetime.now())

def velvetContigs(dir):
    assert os.path.exists(dir)
    fh = open(dir + "/contigs.fa", 'r')
    contigs = []
    name = None
    seq  = None
    for line in fh:
        if re.search("^>", line):
            if name and seq:
                contigs.append(Contig(name,seq,dir))
            name = line.lstrip('>').strip()
            seq = ''
        else:
            if name:
                seq += line.strip()
            else:
                raise ValueError("invalid fasta format: " + fastaFile)
    if name and seq:
        contigs.append(Contig(name,seq,dir))
    return contigs

class Contig:
    def __init__(self,name,seq,dir):
        self.name = name
        self.seq = seq
        self.len = len(seq)

        amosfile = dir + "/velvet_asm.afg"
        seqfile = dir + "/Sequences"
        inseq = parseamos.InputSeqs(seqfile)  # contains ALL input seqs...
        contigreadmap = parseamos.contigreadmap(amosfile,inseq)

        namefields = name.split('_')
        self.eid = namefields[1]

        self.reads = contigreadmap[self.eid]
        self.rquals = [] # meaningless, used for filler later rather than have uniform quality
        self.mquals = [] # meaningless, used for filler later rather than have uniform quality

        assert self.name
        assert self.seq
        assert self.len

    def subseq(self, start, end):
        start = int(start)
        end   = int(end)
        assert start < end
        return self.seq[start:end]

    def trimseq(self, start, end):
        self.seq = self.subseq(start, end)
        self.len = len(self.seq)

        # modify read list
        new_reads = parseamos.ContigReads(self.eid)
        for src, read in self.reads.reads.iteritems():
            if int(read.off) > int(start) and int(read.off) < int(end):
                new_reads.reads[read.src] = read
        assert new_reads is not None
        self.reads = new_reads

    def __len__(self): return self.len

    def __gt__(self, other):
        return self.len > other.len

    def __str__(self):
        return ">" + self.name + "\n" + self.seq

def median(list):
    list.sort()
    i = len(list)/2
    if len(list) % 2 == 0:
        return (list[i] + list[i+1])/2
    else:
        return list[i]

def n50(contigs):
    ln = map(lambda x: x.len, contigs)
    nlist = []
    for n in ln:
        for i in range(n):
            nlist.append(n)
    return median(nlist)

def runVelvet(reads,refseqname,refseq,kmer,addsv_tmpdir,isPaired=True,long=False,cov_cutoff=False,mutid='null',debug=False):
    """
    reads is either a dictionary of ReadPair objects, kmer is an odd int
    """
    reads_fasta_tmpfn = addsv_tmpdir + '/' + '.'.join((mutid, 'tmpreads', 'fasta'))

    reads_fasta = open(reads_fasta_tmpfn, 'w')

    for readpair in reads.values():
        reads_fasta.write(readpair.fasta())

    reads_fasta.close()

    tmpdir = addsv_tmpdir + '/' + mutid + '.' + str(uuid4()).split('-')[0]

    print tmpdir

    if long:
        argsvelveth = ['velveth', tmpdir, str(kmer), '-long', reads_fasta_tmpfn]
    else:
        argsvelveth = ['velveth', tmpdir, str(kmer), '-shortPaired', reads_fasta_tmpfn]

    if cov_cutoff:
        argsvelvetg = ['velvetg', tmpdir, '-exp_cov', 'auto', '-cov_cutoff', 'auto', '-unused_reads', 'yes', '-read_trkg', 'yes', '-amos_file', 'yes']
    else:
        argsvelvetg = ['velvetg', tmpdir, '-unused_reads', 'yes', '-read_trkg', 'yes', '-amos_file', 'yes']

    subprocess.call(argsvelveth)
    subprocess.call(argsvelvetg)

    vcontigs = velvetContigs(tmpdir)

    # cleanup
    if not debug:
        shutil.rmtree(tmpdir)
        os.unlink(reads_fasta_tmpfn)

    return vcontigs

class ReadPair:
    def __init__(self,read,mate):
        assert read.is_read1 != mate.is_read1

        self.read1 = None
        self.read2 = None

        if read.is_read1:
            self.read1 = read
            self.read2 = mate
        else:
            self.read1 = mate
            self.read2 = read

    def fasta(self):
        return ">" + self.read1.qname + "\n" + self.read1.seq + "\n>" + self.read2.qname + "\n" + self.read2.seq + "\n"

    def __str__(self):
        r1map = "mapped"
        r2map = "mapped"

        if self.read1.is_unmapped:
            r1map = "unmapped"
        if self.read2.is_unmapped:
            r2map = "unmapped"

        output = " ".join(("read1:", self.read1.qname, self.read1.seq, r1map, "read2:", self.read2.qname, self.read2.seq, r2map))
        return output

def asm(chrom, start, end, bamfilename, reffile, kmersize, tmpdir, mutid='null', debug=False):
    bamfile  = pysam.Samfile(bamfilename,'rb')
    matefile = pysam.Samfile(bamfilename,'rb')

    readpairs = {}
    nreads = 0
    ndisc  = 0 # track discordant reads
    rquals = []
    mquals = []

    for read in bamfile.fetch(chrom,start,end):
        if not read.mate_is_unmapped and read.is_paired:
            try:
                mate = matefile.mate(read)
                readpairs[read.qname] = ReadPair(read,mate)
                nreads += 1
                if not read.is_proper_pair:
                    ndisc  += 1
                if nreads % 1000 == 0:
                    print "INFO\t" + now() + "\t" + mutid + "\tfound mates for", nreads, "reads,", float(ndisc)/float(nreads), "discordant."
                if read.is_read1:
                    if read.is_reverse:
                        rquals.append(read.qual[::-1])
                        mquals.append(mate.qual)
                    else:
                        rquals.append(read.qual)
                        mquals.append(mate.qual[::-1])
                else:
                    if read.is_reverse:
                        rquals.append(mate.qual)
                        mquals.append(read.qual[::-1])
                    else:
                        rquals.append(mate.qual[::-1])
                        mquals.append(read.qual)
            except ValueError:
                sys.stderr.write("WARN\t" + now() + "\t" + mutid + "\tcannot find mate for read marked paired: " + read.qname + "\n")

    sys.stdout.write("INFO\t" + now() + "\t" + mutid + "\tfound " + str(nreads) + " reads in region.\n")

    if nreads == 0:
        return []

    refseq = None
    if reffile:
        refseq = reffile.fetch(chrom,start,end)

    region = "%s:%d-%d" % (chrom, start, end)

    contigs = runVelvet(readpairs, region, refseq, kmersize, tmpdir, cov_cutoff=True, mutid=mutid, debug=debug)
    newcontigs = None

    for contig in contigs:
        contig.rquals = rquals
        contig.mquals = mquals
    return contigs

def main(args):
    '''
    this is here for testing/debugging
    '''
    reffile  = None

    if not args.noref:
        if not args.refFasta:
            raise ValueError("no reference given and --noref not set")
        reffile  = pysam.Fastafile(args.refFasta)

    (chr,coords) = args.regionString.split(':')
    (start,end) = coords.split('-')
    start = re.sub(',','',start)
    end   = re.sub(',','',end)
    start = int(start)
    end   = int(end)

    if not os.path.exists(args.tmpdir):
        os.mkdir(args.tmpdir)
        print "INFO\t" + now() + "\tcreated tmp directory: " + args.tmpdir

    contigs = asm(chr, start, end, args.bamFileName, reffile, int(args.kmersize), args.tmpdir, args.noref, args.recycle)

    maxlen = 0
    maxeid = None
    for contig in contigs:
        print contig
        if contig.len > maxlen:
            maxlen = contig.len
            maxeid = contig.eid

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='parse the output of pickreads.py')
    parser.add_argument('-f', '--fastaref', dest='refFasta', required=False,
                        help='indexed reference fo ref-directed assembly')
    parser.add_argument('-r', '--region', dest='regionString', required=True,
                        help='format: chrN:startbasenum-endbasenum')
    parser.add_argument('-b', '--bamfile', dest='bamFileName', required=True,
                        help='target .bam file, region specified in -r must exist')
    parser.add_argument('-k', '--kmersize', dest='kmersize', default=31,
                        help='kmer size for velvet, default=31')
    parser.add_argument('-t', '--tmpdir', dest='tmpdir', default='addsv.tmp')
    parser.add_argument('--noref', action="store_true")
    parser.add_argument('--recycle', action="store_true")
    args = parser.parse_args()
    main(args)


text:
namespace fir
{
	struct IRBuilder
	{
		IRBuilder(FTContext* c);

		Value* CreateNeg(Value* a, std::string vname = "");
		Value* CreateAdd(Value* a, Value* b, std::string vname = "");
		Value* CreateSub(Value* a, Value* b, std::string vname = "");
		Value* CreateMul(Value* a, Value* b, std::string vname = "");
		Value* CreateDiv(Value* a, Value* b, std::string vname = "");
		Value* CreateMod(Value* a, Value* b, std::string vname = "");
		Value* CreateICmpEQ(Value* a, Value* b, std::string vname = "");
		Value* CreateICmpNEQ(Value* a, Value* b, std::string vname = "");
		Value* CreateICmpGT(Value* a, Value* b, std::string vname = "");
		Value* CreateICmpLT(Value* a, Value* b, std::string vname = "");
		Value* CreateICmpGEQ(Value* a, Value* b, std::string vname = "");
		Value* CreateICmpLEQ(Value* a, Value* b, std::string vname = "");
		Value* CreateFCmpEQ_ORD(Value* a, Value* b, std::string vname = "");
		Value* CreateFCmpEQ_UNORD(Value* a, Value* b, std::string vname = "");
		Value* CreateFCmpNEQ_ORD(Value* a, Value* b, std::string vname = "");
		Value* CreateFCmpNEQ_UNORD(Value* a, Value* b, std::string vname = "");
		Value* CreateFCmpGT_ORD(Value* a, Value* b, std::string vname = "");
		Value* CreateFCmpGT_UNORD(Value* a, Value* b, std::string vname = "");
		Value* CreateFCmpLT_ORD(Value* a, Value* b, std::string vname = "");
		Value* CreateFCmpLT_UNORD(Value* a, Value* b, std::string vname = "");
		Value* CreateFCmpGEQ_ORD(Value* a, Value* b, std::string vname = "");
		Value* CreateFCmpGEQ_UNORD(Value* a, Value* b, std::string vname = "");
		Value* CreateFCmpLEQ_ORD(Value* a, Value* b, std::string vname = "");
		Value* CreateFCmpLEQ_UNORD(Value* a, Value* b, std::string vname = "");

		Value* CreateICmpMulti(Value* a, Value* b, std::string vname = "");
		Value* CreateFCmpMulti(Value* a, Value* b, std::string vname = "");

		Value* CreateBitwiseXOR(Value* a, Value* b, std::string vname = "");
		Value* CreateBitwiseLogicalSHR(Value* a, Value* b, std::string vname = "");
		Value* CreateBitwiseArithmeticSHR(Value* a, Value* b, std::string vname = "");
		Value* CreateBitwiseSHL(Value* a, Value* b, std::string vname = "");
		Value* CreateBitwiseAND(Value* a, Value* b, std::string vname = "");
		Value* CreateBitwiseOR(Value* a, Value* b, std::string vname = "");
		Value* CreateBitwiseNOT(Value* a, std::string vname = "");

		Value* CreateBitcast(Value* v, Type* targetType, std::string vname = "");
		Value* CreateIntSizeCast(Value* v, Type* targetType, std::string vname = "");
		Value* CreateFloatToIntCast(Value* v, Type* targetType, std::string vname = "");
		Value* CreateIntToFloatCast(Value* v, Type* targetType, std::string vname = "");
		Value* CreatePointerTypeCast(Value* v, Type* targetType, std::string vname = "");
		Value* CreatePointerToIntCast(Value* v, Type* targetType, std::string vname = "");
		Value* CreateIntToPointerCast(Value* v, Type* targetType, std::string vname = "");
		Value* CreateIntSignednessCast(Value* v, Type* targetType, std::string vname = "");

		Value* CreateIntTruncate(Value* v, Type* targetType, std::string vname = "");
		Value* CreateIntZeroExt(Value* v, Type* targetType, std::string vname = "");

		Value* CreateFTruncate(Value* v, Type* targetType, std::string vname = "");
		Value* CreateFExtend(Value* v, Type* targetType, std::string vname = "");

		Value* CreateLoad(Value* ptr, std::string vname = "");
		Value* CreateStore(Value* v, Value* ptr);
		Value* CreateCall0(Function* fn, std::string vname = "");
		Value* CreateCall1(Function* fn, Value* p1, std::string vname = "");
		Value* CreateCall2(Function* fn, Value* p1, Value* p2, std::string vname = "");
		Value* CreateCall3(Function* fn, Value* p1, Value* p2, Value* p3, std::string vname = "");
		Value* CreateCall(Function* fn, std::vector<Value*> args, std::string vname = "");
		Value* CreateCall(Function* fn, std::initializer_list<Value*> args, std::string vname = "");

		Value* CreateCallToFunctionPointer(Value* fn, FunctionType* ft, std::vector<Value*> args, std::string vname = "");

		Value* CreateReturn(Value* v);
		Value* CreateReturnVoid();

		Value* CreateLogicalNot(Value* v, std::string vname = "");

		Value* CreateStackAlloc(Type* type, std::string vname = "");
		Value* CreateImmutStackAlloc(Type* type, Value* initialValue, std::string vname = "");

		// equivalent to llvm's GEP(ptr*, ptrIndex, memberIndex)
		Value* CreateGetPointerToConstStructMember(Value* ptr, Value* ptrIndex, size_t memberIndex, std::string vname = "");

		// equivalent to GEP(ptr*, 0, memberIndex)
		Value* CreateGetStructMember(Value* ptr, std::string memberName);
		Value* CreateStructGEP(Value* structPtr, size_t memberIndex, std::string vname = "");

		// equivalent to GEP(ptr*, index)
		Value* CreateGetPointer(Value* ptr, Value* ptrIndex, std::string vname = "");

		// equivalent to GEP(ptr*, ptrIndex, elmIndex)
		Value* CreateGEP2(Value* ptr, Value* ptrIndex, Value* elmIndex, std::string vname = "");
		Value* CreateConstGEP2(Value* ptr, size_t ptrIndex, size_t elmIndex, std::string vname = "");

		void CreateCondBranch(Value* condition, IRBlock* trueBlock, IRBlock* falseBlock);
		void CreateUnCondBranch(IRBlock* target);

		Value* CreateSizeof(Type* t, std::string vname = "");

		Value* CreateBinaryOp(Ast::ArithmeticOp ao, Value* a, Value* b, std::string vname = "");

		Value* CreatePointerAdd(Value* ptr, Value* num, std::string vname = "");
		Value* CreatePointerSub(Value* ptr, Value* num, std::string vname = "");

		Value* CreateAggregateValue(Type* t, std::vector<Value*> values, std::string vname = "");
		Value* CreateValue(Type* t, std::string vname = "");

		Value* CreateInsertValue(Value* val, std::vector<size_t> inds, Value* elm, std::string vname = "");
		Value* CreateExtractValue(Value* val, std::vector<size_t> inds, std::string vname = "");

		Value* CreateInsertValueByName(Value* val, std::string mem, Value* elm, std::string vname = "");
		Value* CreateExtractValueByName(Value* val, std::string mem, std::string vname = "");

		Value* CreateGetStringData(Value* str, std::string vname = "");
		Value* CreateSetStringData(Value* str, Value* val, std::string vname = "");
		Value* CreateGetStringLength(Value* str, std::string vname = "");
		Value* CreateSetStringLength(Value* str, Value* val, std::string vname = "");
		Value* CreateGetStringRefCount(Value* str, std::string vname = "");
		Value* CreateSetStringRefCount(Value* str, Value* val, std::string vname = "");

		Value* CreateGetDynamicArrayData(Value* ptr, std::string vname = "");
		Value* CreateSetDynamicArrayData(Value* ptr, Value* val, std::string vname = "");
		Value* CreateGetDynamicArrayLength(Value* ptr, std::string vname = "");
		Value* CreateSetDynamicArrayLength(Value* ptr, Value* val, std::string vname = "");
		Value* CreateGetDynamicArrayCapacity(Value* ptr, std::string vname = "");
		Value* CreateSetDynamicArrayCapacity(Value* ptr, Value* val, std::string vname = "");

		Value* CreateGetArraySliceData(Value* ptr, std::string vname = "");
		Value* CreateSetArraySliceData(Value* ptr, Value* val, std::string vname = "");
		Value* CreateGetArraySliceLength(Value* ptr, std::string vname = "");
		Value* CreateSetArraySliceLength(Value* ptr, Value* val, std::string vname = "");

		Value* CreateGetAnyTypeID(Value* any, std::string vname = "");
		Value* CreateSetAnyTypeID(Value* any, Value* val, std::string vname = "");
		Value* CreateGetAnyFlag(Value* any, std::string vname = "");
		Value* CreateSetAnyFlag(Value* any, Value* val, std::string vname = "");
		Value* CreateGetAnyData(Value* any, std::string vname = "");
		Value* CreateSetAnyData(Value* any, Value* val, std::string vname = "");

		Value* CreateGetRangeLower(Value* range, std::string vname = "");
		Value* CreateSetRangeLower(Value* range, Value* val, std::string vname = "");
		Value* CreateGetRangeUpper(Value* range, std::string vname = "");
		Value* CreateSetRangeUpper(Value* range, Value* val, std::string vname = "");

		void CreateUnreachable();

		IRBlock* addNewBlockInFunction(std::string name, Function* func);
		IRBlock* addNewBlockAfter(std::string name, IRBlock* block);

		void setCurrentBlock(IRBlock* block);
		void restorePreviousBlock();

		Function* getCurrentFunction();
		IRBlock* getCurrentBlock();

		private:
		Value* addInstruction(Instruction* instr, std::string vname);

		FTContext* context;

		Function* currentFunction = 0;
		IRBlock* currentBlock = 0;
		IRBlock* previousBlock = 0;
	};
}


text:
#region Licence

#endregion

using System;

namespace Paramore.Brighter.ServiceActivator
{
    /// <summary>
    /// Class HostName.
    /// </summary>
    public class HostName : IEquatable<HostName>
    {
        /// <summary>
        /// The _host name
        /// </summary>
        private readonly string _hostName;

        /// <summary>
        /// Initializes a new instance of the <see cref="HostName"/> class.
        /// </summary>
        /// <param name="hostName">Name of the host.</param>
        public HostName(string hostName)
        {
            _hostName = hostName;
        }

        /// <summary>
        /// Gets the value.
        /// </summary>
        /// <value>The value.</value>
        public string Value
        {
            get { return _hostName; }
        }

        /// <summary>
        /// Returns a <see cref="System.String" /> that represents this instance.
        /// </summary>
        /// <returns>A <see cref="System.String" /> that represents this instance.</returns>
        public override string ToString()
        {
            return _hostName;
        }

        /// <summary>
        /// Performs an implicit conversion from <see cref="SubscriptionName" /> to <see cref="System.String" />.
        /// </summary>
        /// <param name="rhs">The RHS.</param>
        /// <returns>The result of the conversion.</returns>
        public static implicit operator string(HostName rhs)
        {
            return rhs.ToString();
        }

        /// <summary>
        /// Indicates whether the current object is equal to another object of the same type.
        /// </summary>
        /// <param name="other">An object to compare with this object.</param>
        /// <returns>true if the current object is equal to the <paramref name="other" /> parameter; otherwise, false.</returns>
        public bool Equals(HostName other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return string.Equals(_hostName, other._hostName);
        }

        /// <summary>
        /// Determines whether the specified <see cref="System.Object" /> is equal to this instance.
        /// </summary>
        /// <param name="obj">The object to compare with the current object.</param>
        /// <returns><c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>.</returns>
        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != this.GetType()) return false;
            return Equals((HostName) obj);
        }

        /// <summary>
        /// Returns a hash code for this instance.
        /// </summary>
        /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
        public override int GetHashCode()
        {
            return (_hostName != null ? _hostName.GetHashCode() : 0);
        }

        /// <summary>
        /// Implements the ==.
        /// </summary>
        /// <param name="left">The left.</param>
        /// <param name="right">The right.</param>
        /// <returns>The result of the operator.</returns>
        public static bool operator ==(HostName left, HostName right)
        {
            return Equals(left, right);
        }

        /// <summary>
        /// Implements the !=.
        /// </summary>
        /// <param name="left">The left.</param>
        /// <param name="right">The right.</param>
        /// <returns>The result of the operator.</returns>
        public static bool operator !=(HostName left, HostName right)
        {
            return !Equals(left, right);
        }

    }
}


text:
"""mmstats reader implementation"""
from collections import namedtuple
import mmap
import struct

VERSION_1 = '\x01'
UNBUFFERED_FIELD = 255

def reader(fmt):
    struct_fmt = struct.Struct(fmt)
    size = struct.calcsize(fmt)
    unpacker = struct_fmt.unpack

    def wrapper(v):
        return unpacker(v.read(size))[0]
    wrapper.__name__ = 'unpack_' + fmt

    return wrapper

read_ushort = reader('H')
read_ubyte = reader('B')

Stat = namedtuple('Stat', ('label', 'value'))

class InvalidMmStatsVersion(Exception):
    """Unsupported mmstats version"""

class MmStatsReader(object):
    def __init__(self, data):
        """`data` should be a file-like object (mmap or file)"""
        self.data = data
        rawver = self.data.read(1)
        if rawver == VERSION_1:
            self.version = 1
        else:
            raise InvalidMmStatsVersion(repr(rawver))

    @classmethod
    def from_file(cls, fn):
        return cls(open(fn, 'rb'))

    @classmethod
    def from_mmap(cls, fn):
        f = open(fn, 'rb')
        try:
            mmapf = mmap.mmap(f.fileno(), 0, prot=mmap.ACCESS_READ)
        except:
            f.close()
            raise
        return cls(mmapf)

    def __iter__(self):
        d = self.data
        while 1:
            raw_label_sz = d.read(2)
            if (not raw_label_sz or raw_label_sz == '\x00' or
                    raw_label_sz == '\x00\x00'):
                # EOF
                break
            label_sz = struct.unpack('H', raw_label_sz)[0]
            label = d.read(label_sz).decode('utf8', 'ignore')
            type_sz = read_ushort(d)
            type_ = d.read(type_sz)
            sz = struct.calcsize(type_)
            buf_idx = read_ubyte(d)
            if buf_idx == UNBUFFERED_FIELD:
                value = struct.unpack(type_, d.read(sz))[0]
            else:
                # Flip bit as the stored buffer is the *write* buffer
                buf_idx ^= 1
                buffers = d.read(sz * 2)
                offset = sz * buf_idx
                read_buffer = buffers[offset:(offset + sz)]
                value = struct.unpack(type_, read_buffer)[0]
            if isinstance(value, str):
                # Special case strings as they're \x00 padded
                value = value.split('\x00', 1)[0].decode('utf8', 'ignore')
            yield Stat(label, value)

        try:
            d.close()
        except Exception:
            # Don't worry about exceptions closing the file
            pass


text:
using System.Reflection;

[assembly: AssemblyTitle("Abnaki Windows Commonality")]
[assembly: AssemblyDescription("")]


text:
package org.apache.camel.component.azure.common;

import com.microsoft.azure.storage.OperationContext;

public abstract class AbstractServiceRequestOptions {
    private OperationContext opContext;

    public OperationContext getOpContext() {
        return opContext;
    }

    public void setOpContext(OperationContext opContext) {
        this.opContext = opContext;
    }
}


text: Save


text:
#ifndef SANITIZE_CLOUD_H_
#define SANITIZE_CLOUD_H_

#include <pcl/apps/cloud_composer/tool_interface/abstract_tool.h>
#include <pcl/apps/cloud_composer/tool_interface/tool_factory.h>

namespace pcl
{
  namespace cloud_composer
  {
    class SanitizeCloudTool : public ModifyItemTool
    {
      Q_OBJECT
    public:
      SanitizeCloudTool (PropertiesModel* parameter_model, QObject* parent);
      virtual ~SanitizeCloudTool ();

      virtual QList <CloudComposerItem*>
      performAction (QList <const CloudComposerItem*> input_data, PointTypeFlags::PointType type = PointTypeFlags::NONE);

      inline virtual QString
      getToolName () const { return "Sanitize Cloud Tool";}
      };

      class SanitizeCloudToolFactory : public QObject, public ToolFactory
      {
        Q_OBJECT
        Q_INTERFACES (pcl::cloud_composer::ToolFactory)
      public:
        ModifyItemTool*
        createTool (PropertiesModel* parameter_model, QObject* parent = 0)
        {
          return new SanitizeCloudTool(parameter_model, parent);
        }

        PropertiesModel*
        createToolParameterModel (QObject* parent);

        inline virtual QString
        getPluginName () const { return "Sanitize Cloud";}

        virtual QString
        getToolGroupName () const { return "Filters";}

        virtual QString
        getIconName () const { return ":/sanitize_cloud.png"; }

        inline virtual CloudComposerItem::ItemType
        getInputItemType () const
        {
          return CloudComposerItem::CLOUD_ITEM;
        }

        inline virtual QList <CloudComposerItem::ItemType>
        getRequiredInputChildrenTypes () const
        {
          return QList <CloudComposerItem::ItemType> ();
        }
      };

    }
  }

  #endif //SANITIZE_CLOUD_H_


text:
Traveling Salesman solution using a Genetic Algorithm

By: Peter Mauldin

Many thanks to http://www.theprojectspot.com/tutorial-post/applying-a-genetic-algorithm-to-the-travelling-salesman-problem/5

USAGE:
`npm install node`
`node main.js [path to input file]`

OR
[Edit make file and set input path]
`make run`


text:
/* Franchise Header */

.FranchiseHeader {
	width: 100%;
	height: auto;
	position: relative;
}

.FranchiseMain--internal .FranchiseHeader {
	max-height: 160px;
}

.FranchiseHeader-background {
	background-color: #301c09;
	height: 100%;
	position: absolute;
	right: 0;
	top: 0;
	width: 100%;
}

.FranchiseMain--internal .FranchiseHeader-background {
	background-color: #301c09;
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center center;
	background-image: url("/dist/img/svg/background-madeira-escovada.svg");
	/* fundo-madeira-escovada-opt */
}

.FranchiseHeader-inner {
	-webkit-align-items: center;
	align-items: center;
	display: -webkit-box;
	display: -moz-box;
	display: -ms-flexbox;
	display: -webkit-flex;
	display: flex;
	-webkit-justify-content: center;
	justify-content: center;
	-webkit-flex-direction: column;
	flex-direction: column;
	min-height: 150px;
	margin: 0 auto;
	padding-top: 2em;
	position: relative;
}

.FranchiseMain--internal .FranchiseHeader-inner {
	/*padding: 1.5em 0;*/
	padding: 0;
	min-height: 140px;
	/*max-height: 140px;*/
}

@media (min-width: 48em) {

	.FranchiseHeader-inner {
		-webkit-justify-content: space-between;
		justify-content: space-between;
	}

	.FranchiseMain--internal .FranchiseHeader-inner {
		padding: 1em 0 0;
	}

}


text:
const crypto = require('crypto');

// This is in its own file in order to make it easy to stub in tests.
module.exports = {
  createHash: (filepath) =>
    crypto
      .createHash('sha256')
      .update(toPosix(filepath))
      .digest('hex')
      .slice(0, 7),
};

/**
 * To support Windows, use posix separators for all filepath hashes.
 * @param {string} filepath
 * @return {string}
 */
function toPosix(filepath) {
  return filepath.replace(/\\\\?/g, '/');
}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.hybridcontainerservice.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The server AAD application secret. */
@Fluent
public class AadProfileSecret {
    /*
     * The server AAD application secret.
     */
    @JsonProperty(value = "serverAppSecret")
    private String serverAppSecret;

    /** Creates an instance of AadProfileSecret class. */
    public AadProfileSecret() {
    }

    /**
     * Get the serverAppSecret property: The server AAD application secret.
     *
     * @return the serverAppSecret value.
     */
    public String serverAppSecret() {
        return this.serverAppSecret;
    }

    /**
     * Set the serverAppSecret property: The server AAD application secret.
     *
     * @param serverAppSecret the serverAppSecret value to set.
     * @return the AadProfileSecret object itself.
     */
    public AadProfileSecret withServerAppSecret(String serverAppSecret) {
        this.serverAppSecret = serverAppSecret;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}


text:
package org.jboss.pnc.common.json.moduleconfig;

import static org.junit.Assert.*;

import org.jboss.pnc.common.Configuration;
import org.jboss.pnc.common.json.ConfigurationParseException;
import org.jboss.pnc.common.json.GlobalModuleGroup;
import org.junit.Test;

/**
 * @author Honza Brazdil <jbrazdil@redhat.com>
 *
 */
public class GlobalConfigTest extends AbstractModuleConfigTest {

    @Test
    public void loadGlobalConfigTest() throws ConfigurationParseException {
        Configuration configuration = new Configuration();
        GlobalModuleGroup globalConfig = configuration.getGlobalConfig();

        assertNotNull(globalConfig);
        assertEquals("127.0.0.1", globalConfig.getAproxUrl());
        assertEquals("1.2.3.4", globalConfig.getBpmUrl());
    }

}


text:
|Build Status| |Coverage Status|

Lightweight library for AWS SWF.

    Garcon deals with easy going clients and kitchens. It takes orders
    from clients (deciders), and send them to the kitchen (activities).
    Difficult clients and kitchens can be handled directly by the
    restaurant manager.

Requirements
~~~~~~~~~~~~

-  Python 2.7, 3.4 (tested)
-  Boto 2.34.0 (tested)

Goal
~~~~

The goal of this library is to allow the creation of Amazon Simple
Workflow without the need to worry about the orchestration of the
different activities and building out the different workers. This
framework aims to help simple workflows. If you have a more complex
case, you might want to use directly boto.

Code sample
~~~~~~~~~~~

The code sample shows a workflow that has 4 activities. It starts with
activity\_1, which after being completed schedule activity\_2 and
activity\_3 to be ran in parallel. The workflow ends after the
completion of activity\_4 which requires activity\_2 and activity\_3 to
be completed.

.. code:: python

    from __future__ import print_function

    from garcon import activity
    from garcon import runner

    domain = 'dev'
    name = 'workflow_sample'
    create = activity.create(domain, name)

    test_activity_1 = create(
        name='activity_1',
        run=runner.Sync(
            lambda activity, context: print('activity_1')))

    test_activity_2 = create(
        name='activity_2',
        requires=[test_activity_1],
        run=runner.Async(
            lambda activity, context: print('activity_2_task_1'),
            lambda activity, context: print('activity_2_task_2')))

    test_activity_3 = create(
        name='activity_3',
        requires=[test_activity_1],
        run=runner.Sync(
            lambda activity, context: print('activity_3')))

    test_activity_4 = create(
        name='activity_4',
        requires=[test_activity_3, test_activity_2],
        run=runner.Sync(
            lambda activity, context: print('activity_4')))

Application architecture
~~~~~~~~~~~~~~~~~~~~~~~~

::

    .
    ├── cli.py # Instantiate the workers
    ├── flows # All your application flows.
    │   ├── __init__.py
    │   └── example.py # Should contain a structure similar to the code sample.
    ├── tasks # All your tasks
    │   ├── __init__.py
    │   └── s3.py # Task that focuses on s3 files.
    └── task_example.py # Your different tasks.

Running tests
~~~~~~~~~~~~~

Use tox to run tests on python versions 2.7, 3.4, 3.5, and 3.6 simultaneously:

.. code:: bash

    tox

Contributors
~~~~~~~~~~~~

-  Michael Ortali
-  Adam Griffiths
-  Raphael Antonmattei
-  John Penner

.. _xethorn: github.com/xethorn
.. _rantonmattei: github.com/rantonmattei
.. _someboredkiddo: github.com/someboredkiddo

.. |Build Status| image:: https://travis-ci.org/xethorn/garcon.svg
   :target: https://travis-ci.org/xethorn/garcon
.. |Coverage Status| image:: https://coveralls.io/repos/xethorn/garcon/badge.svg?branch=master
   :target: https://coveralls.io/r/xethorn/garcon?branch=master


text:
@extends('layouts.default')

@section('title')
{{ $user->first_name }} on GrindsHub
@stop

@section('extra-head')
<meta property="og:type" content="profile" />
<meta property="og:title" content="{{ $user->first_name . ' ' . $user->last_name }} - {{ $user->main_role }}" />
<meta property="og:url" content="{{ URL::route( 'user/profile', $user->username ) }}" />
<meta property="og:description" content="{{ $user->bio }}" />
<meta property="og:site_name" content="GrindsHub.com" />
<meta property="og:image" content="{{ URL::to('/') }}{{ $user->cover_picture }}" />
<meta property="og:locale" content="en_GB" />

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@thejokersthief">
<meta name="twitter:creator" content="@thejokersthief">
<meta name="twitter:title" content="{{ $user->first_name . ' ' . $user->last_name }} - {{ $user->main_role }}">
<meta name="twitter:description" content="{{ $user->bio }}">
<meta name="twitter:image" content="{{ URL::to('/') }}{{ $user->cover_picture }}">

@stop

@section('content')

						picture or '/images/default/picture' }}" alt="">

							{{ $user->first_name .' '. $user->last_name }}

					<secion class="s12 m8 col">

{{ $user->first_name .' '. $user->last_name }}

{{ $user->bio }}

					</secion>

					@foreach( $user->subjects as $subject )
						 {{ ucwords( trim( $subject ) ) }}
					@endforeach

{{ ucfirst( $user->main_role ) }}

{{ ucfirst( $user->county ) }}

€{{ $user->rate }}/ hr

							Send Message

{{ $user->count }}

{{ $user->average }}

 Share:

		          	first_name .' '. $user->last_name . ' on GrindsHub.com' ) }}&url={{ Request::url( ) }}&hashtags=Grinds,GrindsHub">

		          	first_name .' '. $user->last_name .' on GrindsHub.com' ) }}&link={{ Request::url() }}&redirect_uri={{ Request::url() }}">

		          	first_name .' '. $user->last_name . ' on GrindsHub.com' ) }}">

		          	cover_picture }}">

			@foreach( $user->reviews as $review )

						user->picture }}" alt="">

							{{ $review->user->first_name .' '. $review->user->last_name }}

{{ $review->user->first_name .' '. $review->user->last_name  }}

{{ $review->user->county }} - {{ $review->subject }}

{{ $review->text }}

						@for ($i = 0; $i < $review->wholeStars; $i++)

						@endfor

						@for ($i = 0; $i < $review->halfStars; $i++)

						@endfor

						@for ($i = 0; $i < $review->remainingStars; $i++)

						@endfor

			@endforeach

				@if(Auth::check( ))
					{!! Form::open( array( 'route' => array( 'add/review' ), 'method' => 'post', 'class' => 's12 m8 col offset-m2' ) ) !!}

 Submit A Review

					          <input id="subject" type="text" class="validate" name="subject">
					          Taught me... (Subject)

							      	<input type="range" min="0" max="5" step="0.5" value="3.5" onchange="showStars( )" name="rating"/>

					      <textarea id="textarea1" class="materialize-textarea" name="text"></textarea>
					      My review:

						<button class="btn waves-effect light-blue darken-2 waves-light" type="submit" name="action">Submit

						</button>

						{!! Form::hidden( 'id', $user->id ) !!}
					{!! Form::close( ) !!}
				@else
					<form class="s12 m8 col offset-m2">

 Submit A Review (must be logged in)

					          <input id="subject" type="text" class="validate" name="subject">
					          Taught me... (Subject)

							      	<input type="range" min="0" max="5" step="0.5" value="3.5" onchange="showStars( )" name="rating"/>

					      <textarea id="textarea1" class="materialize-textarea" name="text"></textarea>
					      My review:

						<button class="btn waves-effect light-blue darken-2 waves-light" type="submit" name="action">Submit

						</button>
					</form>
				@endif

			{!! Form::open( array( 'route' => array( 'add/message', $user->username ), 'method' => 'post' ) ) !!}

						{!! Form::textarea( 'message', null, [ 'class' => 'materialize-textarea', 'cols'=>'', 'rows'=>'', 'length' => 1000] ) !!}
						{!! Form::label( 'message', 'Message' ) !!}

				<button class="btn waves-effect waves-light" type="submit" name="action">
					Send

				</button>

				{{-- Use an encrypted user ID --}}
				{!! Form::hidden( 'receiver', $user->id ) !!}

				{!! Form::close( ) !!}

@stop


text:
define([
	'require',
	'intern!object',
	'intern/chai!assert',
	'../support/ready'
], function (require, registerSuite, assert, ready) {
	/* globals tracker */

	function loadPage(driver) {
		return driver.get('remote')
			.setExecuteAsyncTimeout(5000)
			.get(require.toUrl('./support/touch.html'));
	}

	function clickElement(element) {
		return element.click();
	}

	function tapElement(element) {
		return element.tap();
	}

	function moveMouseToElement(session, id) {
		return function () {
			return session.findById(id).then(function (element) {
				return session.moveMouseTo(element);
			}).end();
		};
	}

	registerSuite(function () {
		var tapOrClick;

		return {
			name: 'dojo/touch',

			'before': function () {
				// Not all browsers or drivers support touch events
				tapOrClick = this.get('remote').environmentType.touchEnabled ?
					tapElement :
					clickElement;
			},

			'beforeEach': function () {
				return loadPage(this);
			},

			'click/tap': function () {
				var remote = this.get('remote');
				var elementPromise = remote
					.executeAsync(function (done) {
						require(['dojo/on', 'dojo/touch'], function (on, touch) {
							window.log = [];
							var node = document.getElementById('upper-right');
							on(node, touch.press, function () {
								log.push('touch.press');
							});
							on(node, touch.release, function () {
								log.push('touch.release');
							});
							on(node, 'mousedown', function () {
								log.push('mousedown');
							});
							on(node, 'mouseup', function () {
								log.push('mouseup');
							});
							on(node, 'click', function () {
								log.push('click');
							});
							done();
						});
					})
					.findById('upper-right');

				return tapOrClick(elementPromise)
					.execute(function () {
						return window.log.join(', ');
					})
					.then(function (result) {
						// Test that proper touch.* events fired, and also that mousedown and mouseup weren't suppressed.
						// Tricky though because the order mousedown/mouseup events occurs varies by browser.
						// See https://github.com/dojo/dojo/pull/138.
						assert(/touch\.press.*touch\.release.*click/.test(result),
							"touch.press --> touch.release --> click");
						assert(/mousedown.*mouseup.*click/.test(result),
							"mousedown --> mouseup --> click");
					});
			},

			'move': function () {
				var session = this.get('remote');

				return session
					.then(moveMouseToElement(session, 'upper-left'))
					.executeAsync(function (done) {
						require(['sinon', 'dojo/on', 'dojo/touch'], function (sinon, on, touch) {
							window.tracker = sinon.stub();
							var node = document.getElementById('upper-right');
							on(node, touch.move, tracker);
							done();
						});
					})
					.execute(function () {
						return tracker.callCount;
					})
					.then(function (result) {
						assert.equal(result, 0);
					})
					.then(moveMouseToElement(session, 'upper-right'))
					.execute(function () {
						return tracker.called;
					})
					.then(function (result) {
						assert.ok(result);
					});
			},

			'cancel': function () {
				var session = this.get('remote');

				return this.get('remote')
					.then(moveMouseToElement(session, 'upper-left'))
					.executeAsync(function (done) {
						require(['sinon', 'dojo/on', 'dojo/touch'], function (sinon, on, touch) {
							var node = document.getElementById('upper-left');
							window.tracker = sinon.stub();
							on(node, touch.cancel, tracker);
							done();
						});
					})
					.then(moveMouseToElement(session, 'upper-right'))
					.then(moveMouseToElement(session, 'upper-left'))
					.execute(function () {
						return tracker.called;
					})
					.then(function (result) {
						assert.isTrue(result);
					});
			},

			'over': function () {
				var session = this.get('remote');

				return session
					.then(moveMouseToElement(session, 'upper-left'))
					.executeAsync(function (done) {
						require(['sinon', 'dojo/on', 'dojo/touch'], function (sinon, on, touch) {
							var node = document.getElementById('upper-right');
							window.tracker = sinon.stub();
							on(node, touch.over, tracker);
							done();
						});
					})
					.then(moveMouseToElement(session, 'upper-right'))
					.execute(function () {
						return tracker.called;
					})
					.then(function (result) {
						assert.isTrue(result);
					});
			},

			'out': function () {
				var session = this.get('remote');

				return session
					.then(moveMouseToElement(session, 'upper-left'))
					.executeAsync(function (done) {
						require(['sinon', 'dojo/on', 'dojo/touch'], function (sinon, on, touch) {
							var node = document.getElementById('upper-left');
							window.tracker = sinon.stub();
							on(node, touch.out, tracker);
							done();
						});
					})
					.then(moveMouseToElement(session, 'upper-right'))
					.execute(function () {
						return tracker.called;
					})
					.then(function (result) {
						assert.isTrue(result);
					});
			},

			'enter': function () {
				var session = this.get('remote');

				return session
					.then(moveMouseToElement(session, 'upper-left'))
					.executeAsync(function (done) {
						require(['sinon', 'dojo/on', 'dojo/touch'], function (sinon, on, touch) {
							var node = document.getElementById('upper-right');
							window.tracker = sinon.stub();
							on(node, touch.enter, tracker);
							done();
						});
					})
					.then(moveMouseToElement(session, 'upper-right'))
					.execute(function () {
						return tracker.calledOnce;
					})
					.then(function (result) {
						assert.isTrue(result);
					});
			},

			'leave': function () {
				var session = this.get('remote');

				return session
					.then(moveMouseToElement(session, 'upper-left'))
					.executeAsync(function (done) {
						require(['sinon', 'dojo/on', 'dojo/touch'], function (sinon, on, touch) {
							var node = document.getElementById('upper-left');
							window.tracker = sinon.stub();
							on(node, touch.leave, tracker);
							done();
						});
					})
					.then(moveMouseToElement(session, 'upper-right'))
					.execute(function () {
						return tracker.calledOnce;
					})
					.then(function (result) {
						assert.isTrue(result);
					});
			}
		};
	});

	registerSuite(function () {
		var tapOrClick;

		return {
			name: 'dojo/touch dojoClick tests',

			'before': function () {
				// Not all browsers or drivers support touch events
				tapOrClick = this.get('remote').environmentType.touchEnabled ?
					tapElement :
					clickElement;
			},

			'beforeEach': function () {
				return ready(this.get('remote'), require.toUrl('./support/touch_dojoclick.html'));
			},

			'press': function () {
				return tapOrClick(this.get('remote').findById('dojoClickBtn'))
						.execute(function () {
							return dojoClicks.value;
						})
						.then(function (result) {
							assert.equal(result, 1, 'dojoClicks');
						})
						.end()
					.findById('nativeClickBtn')
						.click()
						.execute(function () {
							return nativeClicks.value;
						})
						.then(function (result) {
							assert.equal(result, 1, 'nativeClicks');
						})
			}
		};
	});

	// Tests for #18352
	// Checks that dojo/touch with dojoClick=true does not break interaction with "native" HTML input
	// of type checkbox and radio (used to be broken on iOS and Android).
	registerSuite(function () {
		var tapOrClick;

		return {
			name: 'dojo/touch dojoClick2 tests',

			'before': function () {
				// Not all browsers or drivers support touch events
				tapOrClick = this.get('remote').environmentType.touchEnabled ?
					tapElement :
					clickElement;
			},

			'beforeEach': function () {
				return ready(this.get('remote'), require.toUrl('./support/touch_dojoclick2.html'));
			},

			'press': function () {
				return tapOrClick(this.get('remote').findById('dojoClickCheckbox'))
					.execute(function () {
						return dojoClickCheckbox.checked;
					})
					.then(function (result) {
						assert.isTrue(result, 'dojoClicks2 - checkbox');
					})
					.end()
					.findById('dojoClickRadio2')
					.click()
					.execute(function () {
						return dojoClickRadio2.checked;
					})
					.then(function (result) {
						assert.isTrue(result, 'dojoClicks2 - radio');
					});
			}
		};
	});

});


text:
package org.bdgenomics.adam.util

private[util] object TextAlignment extends Enumeration {
  type TextAlignment = Value
  val Left, Right, Center = Value
}


text:
""" Emergence of discipline

This module is an implementation of theoretical work by Ziman.
It checks a stage of development and contains multiple functions
designed for looking for evidence of stage of emergence.

Vars:
    author
    concepts
    data
    claim
    theory
    approach
"""

author = ['Ziman']
authors = author
concepts = ['nodal point',
    'organize little research conferences',
    'hierarchy of authority',
    'association develops into a learned society',
    'newsletter becomes reputable primary journal', 'primary journal']
data = ['citation network', 'journal', 'newsletter', 'conference participants']
claim = 'No claims found yet'
theory = '''
    1. Emerging specialty is only observable as a nodal point in the network of
    citations.
    2. Scientists whose research is associated with this co-citation cluster
    organize little research conferences to discuss their common interests, or are
    commissioned to write articles for a special issues of a primary journal
    drawing attention to progress in this particular problem area.
    3. An 'invisible college' begins to condense out, in the form, say, of a semi-
    official association held together by further conferences, the regular
    exchange of pre-prints and re-prints and the publication of an informal
    'newsletter'.
    4. The association develops into a regular learned society, whose newsletter
    has become a reputable primary journal.
    5. A hierarch of authority is soon set up to preside over conferences, edit
    journals, allocate resources, and confer recognition on the members of the new
    discipline.
    '''

approach =  '''
    The object of analysis is easy to specify when it comes to first point. It is
    some citations. In second point we have to identify a) scientists associated
    with citation cluster, b) conferences. Or and to look for special issues of
    primary journals. It is hard to identify third point as we would need to
    find "invisible college", exchange of pre-prints nadd reprits. But, it is
    possible to find some newsletters. The fourth step is straightforward, it is
    rather easy to identify learned society when it already exists, the same about
    the journal. The fifth. Who presides over conferences, who edit journal and
    who allocate resources and confer recognition is easy to get. Most of this
    information can be get online.
    Several strategies are available to do such things. It depends what we want to
    do. The later stage of development the easier is to get data. However, even
    when it comes to finding NPNOC it can be accomplished.
    Other thing to consider is the starting point of research. Whether to start
    from specific disciplines or just run over all. The first type is easier to
    do, but then we would come to a problem of integrating the data. The second
    approach is harder to do but is better one. For know, I think the best way to
    go is to have small case studies, built on earlier research, and follow by
    constructing the overarching algorithms.
    Functionality: identification of turning points of development of a discipline
    by identifying NPNOC, people, conferences and etc date is the prime focus.
    '''

def what_emergence_state(dsc):
    """ Checks for state of emergence of a discipline

    Runs other functions that looks for different aspects

    Args:
        dsc : discipline

    Returns:

    Notes:
    """
    if nodal_point(citation_network):
        return 1

    elif (special_issue in primary_journal) and (who_organize_little_conferences == cocitation_cluster):
        return  2

    if further_conferences or regular_exchange_of_pre_prints:
        return 3

    if learned_society(researcher_list) and primary_journal(researcher_list):
        return 4

    if hierarchy_of_authority > 0.8:
        return 5

def is_emergence_state(dsc, stage):
    """ Checks for state of emergence of a discipline

    Args:
        dsc : discipline

    Returns:
        True or False

    Notes:
    """
    if condition:
        return True
    elif condition1:
        return False

def observe_nodal_points(network_of_citation, stage):
    """ Oserve_nodal_points

    Args:
        network_of_citations : networkx object /might be any graph type next time
        stage : what part of stage to look.

    Returns: tuple of cliques each representing a (forming discipline)

    Theory:
        '1. Emerging specialty is only observable as a nodal point in the network of
        citations.' also can be named co-citation cluster

        """
    clique = ''
    cliques = ''
    network_of_citation
    stage
    return cliques

def get_conferences_organized_by_cluster(researcher_list, testing=False):
    """ Conferences organized by cluster of researchers

    Researchers are looking in some ways.
    Args:

    Example:
        Scientific Committee of 4S anual meeting at http://www.4sonline.org/meeting

    """
    researcher_list
    if testing == True:
        researcher_list = ['Hebe Vessuri', ['Instituto Venezolano de Investigaciones Científicas', 'Universidad Nacional Autónoma de México'],
            'Hernán Thomas', ['Universidad Nacional de Quilmes'],
            'Olga Restrepo', ['Universidad Nacional de Colombia'],
            'Antonio Arellano', ['Universidad Autónoma del Estado de México'],
            'Noela Invernizzi', ['Universidade Federal do Paraná'],
            'Rosalba Casas', ['Universidad Nacional Autónoma de México'],
            'Fernando Domínguez-Rubio', ['University of California San Diego'],
            'Javier Lezaún', ['University of Oxford'],
            'Vincenzo Pavone', ['Consejo Superior de Investigaciones Científicas'],
            'Anita Say Chan', ['University of Illinois at Urbana-Champaign'],
            'María Puig de la Bellacasa', ['Leicester']]

    conference_list = ['Interdisciplinarity: How to make it work', 'Academic demarcations']

    return conference_list

def get_special_issues_of_a_primary_journal(network_of_citation):
    """ Gets special issues of a journal

    Args:
        network_of_citation

    Vars:
        journal :
        journals :
        primary_journal : value of primarisness of a journal.
        primary_journal : value of primarisness of a journal.

    Theory:
        2. Scientists whose research is associated with this co-citation cluster
        organize little research conferences to discuss their common interests, or are
        commissioned to write articles for a special issues of a primary journal
        drawing attention to progress in this particular problem area.
    """
    answer = None
    journal = ''
    journals = []
    primary_journal = ''
    return answer

def get_invisible_college(network_of_citation):
    """
    Args:
        network_of_citation

    Vars:
        condensation_of_invisible_college :
        semi_official_association (str) :
        semi_official_associations (list) :
        conferences (list) :
        exchange_of_prints :
        informal_newsletter :

    Theory:
        An 'invisible college' begins to condense out, in the form, say, of a semi-
        official association held together by further conferences, the regular
        exchange of pre-prints and re-prints and the publication of an informal
        'newsletter'.

    """

def get_regular_exchange_of_pre_prints(network_of_citation):
    network_of_citation
    return

def detect_regular_learned_society(url):
    """Detects regular learned societies in web or based on data.

    regular learned societies of disciplines ar looked for.
    We depend on many online resources that list disciplines

    '...4. The association develops into a regular learned society, whose newsletter
has become a reputable primary journal. ...'

    Args:
    url =
    """
    url
    return

def reputable_primary_journals():
    """ Finds reputable primary journals.

    Depends on online resources

    Args:

    Returns:
    """
    return

"""5. A hierarch of authority is soon set up to preside over conferences, edit
journals, allocate resources, and confer recognition on the members of the new
 discipline."""

def detect_hierarchy_of_authority():
    return

def who_presides_over_conferences():
    """ Detects hierrarchy of authority be examining decisions made
    """
    return

def who_edits_journals():
    """ Find edditors of journals

    """
    return

def who_confers_recognition(data ,members=None):
    """
    Args:
    members - possible, group of people who are influenced by authority.
    """
    return

def is_stage(number_of_stage, data=False):
    """ Checks whether discipline is in stage

    Args:
    supporting - 0-1 of evidence for supporting
    against - 0-1 of weight of against evidences

    Returns:
    the_stage_is dictionary with two values. x, represents number o
    """

    supporting = None
    denying = None
    answer = None

    if data == True:
        return full_answer

    if data == False:
        return answer

def detect_emergences():
    """This is to detect emergence. It takes networkx object and other data

    Returns:
    emergence - description of key points, places and names related to emergence.
    emergence stage = (1, 5, 3, 0)  #That means that there are 0 evicence points
    for stage 1, 1 for second stage, and three for third.

    Note:
    Further forks could look for emergence all the time live, by looking at the web
    """

def recreate_emerge(discipline):
    """Recreates emergence of a discipline.

    Extracts main events and puts them into event graph. The graph is directed, it
    it moves from most past events, through people, names and concepts.

    Args/Variables, might be both.
    concepts = {'ontologija': 'apibudinimas', 'sinergija': 'apibudinimas'}
    people = {'JT Klein': 'papildoma informacija'}
    literature = {'doi':,
                  'pavadinimas:
                  'autorius'}

    edgetypes:
        author - person to publication (when)
        organised - person to event (when)
        released - journal to book (when)
        conferino - person to person (where, when)
        claimed - person to quote, or website
        chaired - conferences
        edited - perosn to journal
        attended - person to event

        Each of these can be defined by separation functions.

    Returns: a rather complicated thing. Yes, networkx_graph.
    """

    '''
    g.add_node(author, author_data)
    g.dd_node(publication, publication_data)
    g.add_node(event, event_data)
    g.add_node(concept, concept_data)

    g.add_edge(author, publication, {when="timestamp"})
    g.add_edge(person, vent, {when="timestamp"})
    g.add_edge(journal, book, {when="timestamp"})
    g.add_edge(person, person, {when="timestamp"})
    g.add_edge(concept, publication, {when="timestamp"})
    '''

# Or same with claimege
    def add_authorship(data, graph ,author, publication):
        """adds stuff to a graph,
        add_edge(author, publication, attrs)

        Args:
        data - where data comes from.
        graph - graph to which edge will be added
        author -
        publication -
        data - """
        data
        graph
        author
        publication
        return

    def add_organizer(data, graph, event, organizer):
        """adds stuff to a graph,
        add_edge(event, organizer, attrs)

        Args:
        data - where data comes from.
        graph - graph to which edge will be added
        author -
        publication -
        data - """
        return

    def add_authors(data, filters):
        """ Adds all authors that pass the filters"""
        g.add_nodes(nbunch, attrs)
        return

    def add_events(data, filters):
        """ Adds all events that pass the filters"""
        g.add_nodes(nbunch, attrs)
        return

    def add_concepts(data, filters):
        """ Adds all concepts that pass the filters"""
        g.add_nodes(nbunch, attrs)
        return

    def add_people(data, filters):
        """ Adds all author that pass the filters"""
        g.add_nodes(nbunch, attrs)
        return


text:
.tip-yellowsimple {
	z-index:1000;
	text-align:left;
	border:1px solid #c7bf93;
	border-radius:4px;
	-moz-border-radius:4px;
	-webkit-border-radius:4px;
	padding:6px 8px;
	min-width:50px;
	max-width:300px;
	color:#000;
	background-color:#ffffc4;
	box-shadow: 1px 1px 0 0 #c7bf93;
}
.tip-yellowsimple .tip-inner {
	font-size: 10pt;
	font-family:  'Open Sans', Helvetica, sans-serif;
}

/* Configure an arrow image - the script will automatically position it on the correct side of the tip */
.tip-yellowsimple .tip-arrow-top {
	margin-top:-6px;
	margin-left:-5px; /* approx. half the width to center it */
	top:0;
	left:50%;
	width:9px;
	height:6px;
	background:url(tip-yellowsimple_arrows.gif) no-repeat;
}
.tip-yellowsimple .tip-arrow-right {
	margin-top:-4px; /* approx. half the height to center it */
	margin-left:0;
	top:50%;
	left:100%;
	width:6px;
	height:9px;
	background:url(tip-yellowsimple_arrows.gif) no-repeat -9px 0;
}
.tip-yellowsimple .tip-arrow-bottom {
	margin-top:0;
	margin-left:-5px; /* approx. half the width to center it */
	top:100%;
	left:50%;
	width:9px;
	height:6px;
	background:url(tip-yellowsimple_arrows.gif) no-repeat -18px 0;
}
.tip-yellowsimple .tip-arrow-left {
	margin-top:-4px; /* approx. half the height to center it */
	margin-left:-6px;
	top:50%;
	left:0;
	width:6px;
	height:9px;
	background:url(tip-yellowsimple_arrows.gif) no-repeat -27px 0;
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>org.apache.jena.sparql.pfunction.library (Apache Jena ARQ)</title>
<meta name="date" content="2015-12-08">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

org.apache.jena.sparql.pfunction.library

Classes

alt

assign

bag

blankNode

bnode

concat

container

ListBase

ListBase1

ListBaseList

listIndex

listLength

listMember

seq

splitIRI

splitURI

str

strSplit

version

versionARQ


text:
package org.apache.fineract.data.models.loan;

import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * @author Rajan Maurya
 *         On 09/07/17.
 */

public class LoanAccountPage {

    @SerializedName("elements")
    private List<LoanAccount> loanAccounts;
    private Integer totalPages;
    private Long totalElements;

    public List<LoanAccount> getLoanAccounts() {
        return loanAccounts;
    }

    public void setLoanAccounts(
            List<LoanAccount> loanAccounts) {
        this.loanAccounts = loanAccounts;
    }

    public Integer getTotalPages() {
        return totalPages;
    }

    public void setTotalPages(Integer totalPages) {
        this.totalPages = totalPages;
    }

    public Long getTotalElements() {
        return totalElements;
    }

    public void setTotalElements(Long totalElements) {
        this.totalElements = totalElements;
    }

    @Override
    public String toString() {
        return "LoanAccountPage{" +
                "loanAccounts=" + loanAccounts +
                ", totalPages=" + totalPages +
                ", totalElements=" + totalElements +
                '}';
    }
}


text:
package madgik.exareme.worker.art.registry;

import madgik.exareme.common.art.entity.EntityName;
import madgik.exareme.worker.arm.compute.ArmComputeProxy;
import madgik.exareme.worker.art.container.ContainerProxy;
import madgik.exareme.worker.art.executionEngine.ExecutionEngineProxy;
import madgik.exareme.worker.art.remote.ObjectProxy;

import java.rmi.RemoteException;

/**
 * This is the ArtRegistryProxy interface.
 *
 * @author Herald Kllapi

 * @author Dimitris Paparas

 * @author Eva Sitaridi

 *         {herald,paparas,evas}@di.uoa.gr

 *         University of Athens /
 *         Department of Informatics and Telecommunications.
 * @since 1.0
 */
public interface ArtRegistryProxy extends ObjectProxy<ArtRegistry> {

    void registerContainer(ContainerProxy containerProxy) throws RemoteException;

    ContainerProxy lookupContainer(EntityName epr) throws RemoteException;

    ContainerProxy[] getContainers() throws RemoteException;

    void removeContainer(EntityName epr) throws RemoteException;

    void removeLogger(EntityName epr) throws RemoteException;

    void registerExecutionEngine(ExecutionEngineProxy executionEngineProxy) throws RemoteException;

    ExecutionEngineProxy lookupExecutionEngine(EntityName epr) throws RemoteException;

    ExecutionEngineProxy[] getExecutionEngines() throws RemoteException;

    void removeExecutionEngine(EntityName epr) throws RemoteException;

    void registerComputeMediator(ArmComputeProxy armComputeProxy) throws RemoteException;

    ArmComputeProxy lookupComputeMediator(EntityName name) throws RemoteException;

    ArmComputeProxy[] getComputeMediators() throws RemoteException;

    void removeComputeMediator(EntityName name) throws RemoteException;
}


text:
using MathNet.Numerics.LinearAlgebra;
using MathNet.Numerics.LinearAlgebra.Double;

namespace TUM.CMS.VplControl.BimPlus.Geometry
{
    public class Point
    {
        public Point(double x, double y, double z)
        {
            Vector = new DenseVector(new[] {x, y, z});
        }
        public Vector<double> Vector { get; }
        public double X => Vector[0];
        public double Y => Vector[1];
        public double Z => Vector[2];
    }
}


text:
package com.yammer.metrics.spring;

import com.yammer.metrics.annotation.Timed;
import com.yammer.metrics.core.*;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.core.Ordered;
import org.springframework.util.ReflectionUtils;
import org.springframework.util.ReflectionUtils.MethodCallback;
import org.springframework.util.ReflectionUtils.MethodFilter;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

public class TimedMethodInterceptor implements MethodInterceptor, MethodCallback, Ordered {

    private static final Log log = LogFactory.getLog(TimedMethodInterceptor.class);

    private static final MethodFilter filter = new AnnotationFilter(Timed.class);

    private final MetricsRegistry metrics;
    private final Class<?> targetClass;
    private final Map<String, Timer> timers;
    private final String scope;

    public TimedMethodInterceptor(final MetricsRegistry metrics, final Class<?> targetClass, final String scope) {
        this.metrics = metrics;
        this.targetClass = targetClass;
        this.timers = new HashMap<String, Timer>();
        this.scope = scope;

        if (log.isDebugEnabled()) {
            log.debug("Creating method interceptor for class " + targetClass.getCanonicalName());
            log.debug("Scanning for @Timed annotated methods");
        }

        ReflectionUtils.doWithMethods(targetClass, this, filter);
    }

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        final Timer timer = timers.get(invocation.getMethod().getName());
        final TimerContext timerCtx = timer != null ? timer.time() : null;
        try {
            return invocation.proceed();
        } finally {
            if (timerCtx != null) {
                timerCtx.stop();
            }
        }
    }

    @Override
    public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException {
        final Timed timed = method.getAnnotation(Timed.class);

        final String group = MetricName.chooseGroup(timed.group(), targetClass);
        final String type = MetricName.chooseType(timed.type(), targetClass);
        final String name = MetricName.chooseName(timed.name(), method);
        final MetricName metricName = new MetricName(group, type, name, scope);

        final Timer timer = metrics.newTimer(metricName, timed.durationUnit(), timed.rateUnit());
        timers.put(method.getName(), timer);

        if (log.isDebugEnabled()) {
            log.debug("Created metric " + metricName + " for method " + method.getName());
        }
    }

    @Override
    public int getOrder() {
        return HIGHEST_PRECEDENCE;
    }

}


text:
'use strict';

// MODULES //

var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
var dapx = require( './dapx.js' );
var ndarray = require( './ndarray.js' );

// MAIN //

setReadOnly( dapx, 'ndarray', ndarray );

// EXPORTS //

module.exports = dapx;