text:
const {app, BrowserWindow} = require('electron');
const path = require('path');
const url = require('url');
const Config =  require('electron-config');
require('electron-reload')(__dirname);

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let win;

const AppConfig = new Config({
  defaults: {
    // 1280x720 is the default size of our window
    windowBounds: { width: 1280, height: 720 }
  }
});

console.log(AppConfig.path);

function createWindow ()
{
  let { width, height } = AppConfig.get("windowBounds");

  // Create the browser window.
  win = new BrowserWindow({
    width: width,
    height: height,
    frame : false,
    title : "Decibel",
    titleBarStyle: 'hidden',
    backgroundColor: '#232323',
    show: false,
    webPreferences: {
      experimentalFeatures: true
    }
  });

  // and load the index.html of the app.
  win.loadURL(url.format({
    pathname: path.join(__dirname, 'bin/app.html'),
    protocol: 'file:',
    slashes: true
  }));

 win.once('ready-to-show', () => {
     win.show();
 });

  // This is used to save the window resize state
  // so when the user opens the app again, the
  // window will be on last resize.
  win.on('resize', () => {
    let { width, height } = win.getBounds();
    AppConfig.set("windowBounds", { width, height});
  });

  // Emitted when the window is closed.
  win.on('closed', () => {
    // Dereference the window object, usually you would store windows
    // in an array if your app supports multi windows, this is the time
    // when you should delete the corresponding element.
    win = null;
  });
}

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow);

// Quit when all windows are closed.
app.on('window-all-closed', () => {
  // On macOS it is common for applications and their menu bar
  // to stay active until the user quits explicitly with Cmd + Q
  if (process.platform !== 'darwin') {
    app.quit();
  }
});

app.on('activate', () => {
  // On macOS it's common to re-create a window in the app when the
  // dock icon is clicked and there are no other windows open.
  if (win === null) {
    createWindow();
  }
});

// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.

redpajama_set_name: RedPajamaGithub


text:
/*
 * @(#)S13.java        1.0 09/12/14
 *
 * This file has been auto-generated by JNC, the
 * Java output format plug-in of pyang.
 * Origin: module "hcta-epc", revision: "2014-09-18".
 */

package hctaEpc.mmeSgsn.statistics;

import Element;

import ElementChildrenIterator;

import Epc;

import JNCException;

import Sc;

import com.tailf.jnc.YangElement;

/**
 * This class represents an element from
 * the namespace http://hitachi-cta.com/ns/epc
 * generated to "src/hctaEpc/mmeSgsn/statistics/s13"
 * <p>
 * See line 1544 in
 * oamPmServerCli.yang
 *
 * @version 1.0 2014-12-09
 * @author Auto Generated
 */
public class S13 extends YangElement {

    private static final long serialVersionUID = 1L;

    /**
     * Constructor for an empty S13 object.
     */
    public S13() {
        super(Epc.NAMESPACE, "s13");
    }

    /**
     * Clones this object, returning an exact copy.
     * @return A clone of the object.
     */
    public S13 clone() {
        return (S13)cloneContent(new S13());
    }

    /**
     * Clones this object, returning a shallow copy.
     * @return A clone of the object. Children are not included.
     */
    public S13 cloneShallow() {
        return (S13)cloneShallowContent(new S13());
    }

    /**
     * @return An array with the identifiers of any key children
     */
    public String[] keyNames() {
        return null;
    }

    /**
     * @return An array with the identifiers of any children, in order.
     */
    public String[] childrenNames() {
        return new String[] {
            "sc",
        };
    }

    /* Access methods for list child: "sc". */

    /**
     * Gets list entry "sc", with specified keys.
     */
    public Sc getSc() throws JNCException {
        String path = "sc";
        return (Sc)searchOne(path);
    }

    /**
     * Iterator method for the list "sc".
     * @return An iterator for the list.
     */
    public ElementChildrenIterator scIterator() {
        return new ElementChildrenIterator(children, "sc");
    }

    /**
     * Adds list entry "sc", using an existing object.
     * @param sc The object to add.
     * @return The added child.
     */
    public Sc addSc(Sc sc) throws JNCException {
        insertChild(sc, childrenNames());
        return sc;
    }

    /**
     * Adds list entry "sc".
     * This method is used for creating subtree filters.
     * @return The added child.
     */
    public Sc addSc() throws JNCException {
        Sc sc = new Sc();
        insertChild(sc, childrenNames());
        return sc;
    }

    /**
     * Deletes list entry "sc", with specified keys.
     */
    public void deleteSc() throws JNCException {
        String path = "sc";
        delete(path);
    }

    /**
     * Support method for addChild.
     * Adds a child to this object.
     *
     * @param child The child to add
     */
    public void addChild(Element child) {
        super.addChild(child);
    }

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StageBitz.Data.DataTypes
{
  public class PackageConfirmationEmailContent
    {
        public string ToEmail { get; set; }
        public string UserName { get; set; }
        public string Position { get; set; }
        public string CompanyName { get; set; }
        public string CompanyURL { get; set; }
        public string ProjectPackage { get; set; }
        public string ProjectPeriodPrice { get; set; }
        public string InventoryPackage { get; set; }
        public string InventoryPeriodPrice { get; set; }
        public string TotalPriceString { get; set; }
        public string PromotionalCodeExpireDate { get; set; }
        public bool IsEducational { get; set; }
        public string Discount { get; set; }
        public string EducationalPosition { get; set; }
        public string FormattedAuthText { get; set; }
        public bool IsInventryProjectOrDurationChanged { get; set; }
    }
}


text:
base-project
============

Base Project for develop some idea

Setting up
----------

The requirement you need to have installed on your machine is [NodeJS] (http://nodejs.org/), after that, proceed to your terminal screen and follow the shell commands:

```shell
npm install # Install all requirements like grunt, express, etc ...
```

Now, run the server
```shell
node server.js
```

Architecture
------------

- *app/*:		The source files
- *lib/*:		Third-party scripts and libraries
- *public/*:	The static files to be served

### Third-party scripts

- [jQuery](http://jquery.com/)
- [AngularJS](http://angularjs.org/)
- [Bootstrap](http://getbootstrap.com/)


text:
.class public final Landroid/support/v7/media/MediaItemStatus;
.super Ljava/lang/Object;
.source "MediaItemStatus.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/support/v7/media/MediaItemStatus$Builder;
    }
.end annotation

# instance fields
.field final mBundle:Landroid/os/Bundle;

# direct methods
.method constructor <init>(Landroid/os/Bundle;)V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Landroid/support/v7/media/MediaItemStatus;->mBundle:Landroid/os/Bundle;

    return-void
.end method

.method public static fromBundle(Landroid/os/Bundle;)Landroid/support/v7/media/MediaItemStatus;
    .locals 1

    const/4 v0, 0x0

    if-eqz p0, :cond_0

    new-instance v0, Landroid/support/v7/media/MediaItemStatus;

    invoke-direct {v0, p0}, Landroid/support/v7/media/MediaItemStatus;-><init>(Landroid/os/Bundle;)V

    :cond_0
    return-object v0
.end method

.method private static playbackStateToString(I)Ljava/lang/String;
    .locals 1

    packed-switch p0, :pswitch_data_0

    invoke-static {p0}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v0

    return-object v0

    :pswitch_0
    const-string/jumbo v0, "pending"

    return-object v0

    :pswitch_1
    const-string/jumbo v0, "buffering"

    return-object v0

    :pswitch_2
    const-string/jumbo v0, "playing"

    return-object v0

    :pswitch_3
    const-string/jumbo v0, "paused"

    return-object v0

    :pswitch_4
    const-string/jumbo v0, "finished"

    return-object v0

    :pswitch_5
    const-string/jumbo v0, "canceled"

    return-object v0

    :pswitch_6
    const-string/jumbo v0, "invalidated"

    return-object v0

    :pswitch_7
    const-string/jumbo v0, "error"

    return-object v0

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_3
        :pswitch_1
        :pswitch_4
        :pswitch_5
        :pswitch_6
        :pswitch_7
    .end packed-switch
.end method

# virtual methods
.method public getContentDuration()J
    .locals 4

    iget-object v0, p0, Landroid/support/v7/media/MediaItemStatus;->mBundle:Landroid/os/Bundle;

    const-string/jumbo v1, "contentDuration"

    const-wide/16 v2, -0x1

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Bundle;->getLong(Ljava/lang/String;J)J

    move-result-wide v0

    return-wide v0
.end method

.method public getContentPosition()J
    .locals 4

    iget-object v0, p0, Landroid/support/v7/media/MediaItemStatus;->mBundle:Landroid/os/Bundle;

    const-string/jumbo v1, "contentPosition"

    const-wide/16 v2, -0x1

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Bundle;->getLong(Ljava/lang/String;J)J

    move-result-wide v0

    return-wide v0
.end method

.method public getExtras()Landroid/os/Bundle;
    .locals 2

    iget-object v0, p0, Landroid/support/v7/media/MediaItemStatus;->mBundle:Landroid/os/Bundle;

    const-string/jumbo v1, "extras"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getBundle(Ljava/lang/String;)Landroid/os/Bundle;

    move-result-object v0

    return-object v0
.end method

.method public getPlaybackState()I
    .locals 3

    iget-object v0, p0, Landroid/support/v7/media/MediaItemStatus;->mBundle:Landroid/os/Bundle;

    const-string/jumbo v1, "playbackState"

    const/4 v2, 0x7

    invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->getInt(Ljava/lang/String;I)I

    move-result v0

    return v0
.end method

.method public getTimestamp()J
    .locals 2

    iget-object v0, p0, Landroid/support/v7/media/MediaItemStatus;->mBundle:Landroid/os/Bundle;

    const-string/jumbo v1, "timestamp"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getLong(Ljava/lang/String;)J

    move-result-wide v0

    return-wide v0
.end method

.method public toString()Ljava/lang/String;
    .locals 6

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v1, "MediaItemStatus{ "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string/jumbo v1, "timestamp="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v2

    invoke-virtual {p0}, Landroid/support/v7/media/MediaItemStatus;->getTimestamp()J

    move-result-wide v4

    sub-long/2addr v2, v4

    invoke-static {v2, v3, v0}, Landroid/support/v4/util/TimeUtils;->formatDuration(JLjava/lang/StringBuilder;)V

    const-string/jumbo v1, " ms ago"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string/jumbo v1, ", playbackState="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p0}, Landroid/support/v7/media/MediaItemStatus;->getPlaybackState()I

    move-result v2

    invoke-static {v2}, Landroid/support/v7/media/MediaItemStatus;->playbackStateToString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string/jumbo v1, ", contentPosition="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p0}, Landroid/support/v7/media/MediaItemStatus;->getContentPosition()J

    move-result-wide v2

    invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string/jumbo v1, ", contentDuration="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p0}, Landroid/support/v7/media/MediaItemStatus;->getContentDuration()J

    move-result-wide v2

    invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string/jumbo v1, ", extras="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p0}, Landroid/support/v7/media/MediaItemStatus;->getExtras()Landroid/os/Bundle;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string/jumbo v1, " }"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method


text:
using UnityEngine;
using System.Collections;
using Leap;

namespace Leap.Unity {
  /**
   * Detects when specified fingers are pointing in the specified manner.
   *
   * Directions can be specified relative to the global frame of reference, relative to
   * the camera frame of reference, or using a combination of the two -- relative to the
   * camera direction in the x-z plane, but not changing relative to the horizon.
   *
   * You can alternatively specify a target game object.
   *
   * If added to a IHandModel instance or one of its children, this detector checks the
   * finger direction at the interval specified by the Period variable. You can also specify
   * which hand model to observe explicitly by setting handModel in the Unity editor or
   * in code.
   *
   * @since 4.1.2
   */
  public class FingerDirectionDetector : Detector {
    /**
     * The interval at which to check finger state.
     * @since 4.1.2
     */
    [Tooltip("The interval in seconds at which to check this detector's conditions.")]
    public float Period = .1f; //seconds

    /**
     * The IHandModel instance to observe.
     * Set automatically if not explicitly set in the editor.
     * @since 4.1.2
     */
    [Tooltip("The hand model to watch. Set automatically if detector is on a hand.")]
    public IHandModel HandModel = null;

    /**
     * The finger to compare to the specified direction.
     * @since 4.1.2
     */
    [Tooltip("The finger to observe.")]
    public Finger.FingerType FingerName = Finger.FingerType.TYPE_INDEX;

    /**
     * The target direction as interpreted by the PointingType setting.
     * Ignored when Pointingtype is "AtTarget."
     * @since 4.1.2
     */
    [Tooltip("The target direction.")]
    public Vector3 PointingDirection = Vector3.forward;

    /**
     * Specifies how to interprete the direction specified by PointingDirection.
     *
     * - RelativeToCamera -- the target direction is defined relative to the camera's forward vector, i.e. (0, 0, 1) is the cmaera's
     *                       local forward direction.
     * - RelativeToHorizon -- the target direction is defined relative to the camera's forward vector,
     *                        except that it does not change with pitch.
     * - RelativeToWorld -- the target direction is defined as a global direction that does not change with camera movement. For example,
     *                      (0, 1, 0) is always world up, no matter which way the camera is pointing.
     * - AtTarget -- a target object is used as the pointing direction (The specified PointingDirection is ignored).
     *
     * In VR scenes, RelativeToHorizon with a direction of (0, 0, 1) for camera forward and RelativeToWorld with a direction
     * of (0, 1, 0) for absolute up, are often the most useful settings.
     * @since 4.1.2
     */
    [Tooltip("How to treat the target direction.")]
    public PointingType PointingType = PointingType.RelativeToHorizon;
    /**
     * The object to point at when the PointingType is "AtTarget." Ignored otherwise.
     */
    [Tooltip("A target object(optional). Use PointingType.AtTarget")]
    public Transform TargetObject = null;
    /**
     * The turn-on angle. The detector activates when the specified finger points within this
     * many degrees of the target direction.
     * @since 4.1.2
     */
    [Tooltip("The angle in degrees from the target direction at which to turn on.")]
    [Range(0, 360)]
    public float OnAngle = 15f; //degrees

    /**
    * The turn-off angle. The detector deactivates when the specified finger points more than this
    * many degrees away from the target direction. The off angle must be larger than the on angle.
    * @since 4.1.2
    */
    [Tooltip("The angle in degrees from the target direction at which to turn off.")]
    [Range(0, 360)]
    public float OffAngle = 25f; //degrees

    private IEnumerator watcherCoroutine;

    private void OnValidate(){
      if( OffAngle < OnAngle){
        OffAngle = OnAngle;
      }
    }

    private void Awake () {
      watcherCoroutine = fingerPointingWatcher();
      if(HandModel == null){
        HandModel = gameObject.GetComponentInParent<IHandModel>();
      }
    }

    private void OnEnable () {
      StartCoroutine(watcherCoroutine);
    }

    private void OnDisable () {
      StopCoroutine(watcherCoroutine);
      Deactivate();
    }

    private IEnumerator fingerPointingWatcher() {
      Hand hand;
      Vector3 fingerDirection;
      Vector3 targetDirection;
      int selectedFinger = selectedFingerOrdinal();
      while(true){
        if(HandModel != null){
          hand = HandModel.GetLeapHand();
          if(hand != null){
            targetDirection = selectedDirection(hand.Fingers[selectedFinger].TipPosition.ToVector3());
            fingerDirection = hand.Fingers[selectedFinger].Direction.ToVector3();
            float angleTo = Vector3.Angle(fingerDirection, targetDirection);
            if(HandModel.IsTracked && angleTo <= OnAngle){
              Activate();
            } else if (!HandModel.IsTracked || angleTo >= OffAngle) {
              Deactivate();
            }
          }
        }
        yield return new WaitForSeconds(Period);
      }
    }

    private Vector3 selectedDirection(Vector3 tipPosition){
      switch(PointingType){
        case PointingType.RelativeToHorizon:
          Quaternion cameraRot = Camera.main.transform.rotation;
          float cameraYaw = cameraRot.eulerAngles.y;
          Quaternion rotator = Quaternion.AngleAxis(cameraYaw, Vector3.up);
          return rotator * PointingDirection;
        case PointingType.RelativeToCamera:
          return Camera.main.transform.TransformDirection(PointingDirection);
        case PointingType.RelativeToWorld:
          return PointingDirection;
        case PointingType.AtTarget:
          return TargetObject.position - tipPosition;
        default:
          return PointingDirection;
      }
    }

    private int selectedFingerOrdinal(){
      switch(FingerName){
        case Finger.FingerType.TYPE_INDEX:
          return 1;
        case Finger.FingerType.TYPE_MIDDLE:
          return 2;
        case Finger.FingerType.TYPE_PINKY:
          return 4;
        case Finger.FingerType.TYPE_RING:
          return 3;
        case Finger.FingerType.TYPE_THUMB:
          return 0;
        default:
          return 1;
      }
    }

  #if UNITY_EDITOR
    private void OnDrawGizmos () {
      if (ShowGizmos && HandModel != null) {
        Color innerColor;
        if (IsActive) {
          innerColor = Color.green;
        } else {
          innerColor = Color.blue;
        }
        Finger finger = HandModel.GetLeapHand().Fingers[selectedFingerOrdinal()];
        Utils.DrawCone(finger.TipPosition.ToVector3(), finger.Direction.ToVector3(), OnAngle, finger.Length, innerColor);
        Utils.DrawCone(finger.TipPosition.ToVector3(), finger.Direction.ToVector3(), OffAngle, finger.Length, Color.red);
        Debug.DrawRay(finger.TipPosition.ToVector3(), selectedDirection(finger.TipPosition.ToVector3()), Color.grey);
      }
    }
  #endif
  }
}


text:
import math
import subprocess
import sys
import os
from fabric.api import env,run,hide,settings

#====================
def exec_remote_cmd(cmd):
    from fabric.operations import run, put
    from fabric.api import hide,settings
    with hide('output','running','warnings') and settings(warn_only=True):
        return run(cmd)

#=====================
def transferDirToS3(directoryToTransfer,bucketname,awspath,numfiles,keyid,secretid,region):
	'''Use rclone to move data onto S3'''

	#Get OSX vs linux versions
	if subprocess.Popen('uname',shell=True, stdout=subprocess.PIPE).stdout.read().strip() == 'Linux':
                rclonepath='%s/rclone' %(awspath)
        if subprocess.Popen('uname',shell=True, stdout=subprocess.PIPE).stdout.read().strip() == 'Darwin':
                rclonepath='%s/rclone_mac'%(awspath)

        #Write .rclone.conf
        homedir=subprocess.Popen('echo $HOME', shell=True, stdout=subprocess.PIPE).stdout.read().split()[0]
        if os.path.exists('%s/.rclone.conf' %(homedir)):
                os.remove('%s/.rclone.conf' %(homedir))

	r1=open('%s/.rclone.conf' %(homedir),'w')
        r1.write('[rclonename]\n')
        r1.write('type = s3\n')
        r1.write('env_auth = false\n')
        r1.write('access_key_id = %s\n' %(keyid))
        r1.write('secret_access_key = %s\n' %(secretid))
        r1.write('region = %s\n' %(region))
        r1.write('endpoint = \n')
        r1.write('location_constraint = %s\n' %(region))
        r1.write('acl = authenticated-read\n')
        r1.write('server_side_encryption = \n')
        r1.write('storage_class = STANDARD\n')
        r1.close()

	#Copy using rsync
	cmd='%s sync %s rclonename:%s --quiet --transfers %i > rclone.log' %(rclonepath,directoryToTransfer,bucketname,math.ceil(numfiles))
	subprocess.Popen(cmd,shell=True).wait()

	if os.path.exists('%s/rclone.conf' %(directoryToTransfer)):
		os.remove('%s/rclone.conf' %(directoryToTransfer))
	if os.path.exists('rclone.log'):
                os.remove('rclone.log')

#===================
def transferS3toVM(IP,keypair,bucketname,dironebs,rclonepath,keyid,secretid,region,numfilesAtATime,maxFileSize):

	#Copy rclone onto instance
        cmd='scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i %s %s ubuntu@%s:~/'%(keypair,rclonepath,IP)
        subprocess.Popen(cmd,shell=True).wait()

        #Write rclone config file
        homedir='/home/ubuntu/'
        rclonename='ebss3'
        if os.path.exists('.rclone.conf'):
                os.remove('.rclone.conf')
        r1=open('rclone.conf','w')
        r1.write('[rclonename]\n')
        r1.write('type = s3\n')
        r1.write('env_auth = false\n')
        r1.write('access_key_id = %s\n' %(keyid))
        r1.write('secret_access_key = %s\n' %(secretid))
        r1.write('region = %s\n' %(region))
        r1.write('endpoint = \n')
        r1.write('location_constraint = %s\n' %(region))
        r1.write('acl = authenticated-read\n')
        r1.write('server_side_encryption = \n')
        r1.write('storage_class = STANDARD\n')
        r1.close()

        cmd='scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i %s rclone.conf ubuntu@%s:~/.rclone.conf' %(keypair,IP)
        subprocess.Popen(cmd,shell=True).wait()

	#Copy data down
        env.host_string='ubuntu@%s' %(IP)
        env.key_filename = '%s' %(keypair)
        rcloneexe='rclone'
        exec_remote_cmd('%s/%s copy rclonename:%s %s --max-size %iG --quiet --transfers %i' %(homedir,rcloneexe,bucketname.split('s3://')[-1],dironebs,maxFileSize,numfilesAtATime))

	if os.path.exists('rclone.conf'):
                os.remove('rclone.conf')

	if os.path.exists('rclone.log'):
                os.remove('rclone.log')


text:
package com.deleidos.dp.histogram;

import java.math.BigInteger;

public class ByteBucket extends AbstractBucket {
	byte byteLabel;

	public ByteBucket() {

	}

	public ByteBucket(byte label, BigInteger count) {
		super(count);
		byteLabel = label;
	}

	public ByteBucket(byte byteLabel) {
		super();
		this.byteLabel = byteLabel;
	}

	@Override
	public int belongs(Object object) {
		byte c = (byte) object;
		if(c > byteLabel) {
			return 1;
		} else if(c < byteLabel) {
			return -1;
		} else {
			return 0;
		}
	}

	@Override
	public String getLabel() {
		return String.valueOf(byteLabel);
	}

	@Override
	public int compareTo(AbstractBucket o) {
		ByteBucket otherBucket = (ByteBucket)o;
		int thisLabel = Byte.valueOf(this.getLabel());
		int otherLabel = Byte.valueOf(otherBucket.getLabel());
		if(thisLabel > otherLabel) {
			return 1;
		} else if(otherLabel > thisLabel) {
			return -1;
		} else {
			return 0;
		}
	}

}


text:
package net.sf.mmm.game.engine.figure;

import java.util.List;

/**
 * This is the interface for an object that may have {@link #getFigures() figures}.
 */
public interface GameAttributeFigures {

  /**
   * @return an {@link java.util.Collections#unmodifiableList(List) unmodifiable list} of {@link GameFigure}s contained
   *         in this object.
   */
  List<GameFigure> getFigures();

  /**
   * @param figure the {@link GameFigure} to {@link List#add(Object) add} to the {@link #getFigures() figures}.
   * @return {@code true} if the operation was successful, {@code false} otherwise (e.g. this object can not take the
   *         given {@link GameFigure}).
   */
  boolean addFigure(GameFigure figure);

  /**
   * @param figure the {@link GameFigure} to {@link List#remove(Object) remove} from the {@link #getFigures() figures}.
   * @return {@code true} if the operation was successful, {@code false} otherwise (e.g. this object can not take the
   *         given {@link GameFigure}).
   */
  boolean removeFigure(GameFigure figure);

}


text:
from .chromatic import ChromaticScale
from .major import MajorScale
from .minor import NaturalMinorScale, HarmonicMinorScale


text:
package ix;

import java.util.Iterator;

final class IxCompose<T, R> extends IxSource<T, R> {

    final IxFunction<? super Ix<T>, ? extends Iterable<? extends R>> transformer;

    IxCompose(Iterable<T> source, IxFunction<? super Ix<T>, ? extends Iterable<? extends R>> transformer) {
        super(source);
        this.transformer = transformer;
    }

    @SuppressWarnings("unchecked")
    @Override
    public Iterator<R> iterator() {
        return (Iterator<R>)transformer.apply(from(source)).iterator();
    }

}


text:
/*
 * YAMC - Yet Another MQTT Client library
 *
 * yamc_parser.c - Assembles incoming MQTT data into complete packet and calls yamc_pkt_decoder.
 *
 * Author: Michal Lower <https://github.com/keton>
 *
 * Licensed under MIT License (see LICENSE file in main repo directory)
 *
 */

#include <stdbool.h>
#include <string.h>
#include "yamc.h"
#include "yamc_log.h"

/**
 * including what amounts to a .c file may be a bad taste
 * but allows to reduce stack pressure by statically inlininig yamc_decode_pkt()
 * and dependencies while keeping 2 separate files
 *
 * yamc_internal_pkt_decoder.h is wrapped inside of #ifdef __YAMC_INTERNALS__ to prevent accidental inclusion
 *
 */
#define __YAMC_INTERNALS__
#include <yamc_internal_pkt_decoder.h>
#undef __YAMC_INTERNALS__

// start or restart timeout timer
static inline void timeout_pat(const yamc_instance_t* const p_instance)
{
	YAMC_ASSERT(p_instance != NULL);

	if (p_instance->handlers.timeout_pat != NULL) p_instance->handlers.timeout_pat(p_instance->handlers.p_handler_ctx);
}

// stop timeout timer
static inline void timeout_stop(const yamc_instance_t* const p_instance)
{
	YAMC_ASSERT(p_instance != NULL);

	if (p_instance->handlers.timeout_stop != NULL) p_instance->handlers.timeout_stop(p_instance->handlers.p_handler_ctx);
}

/**
 * Store next 'remaining length' field byte and check if value can be decoded.
 * Packet length field can be 1-4 bytes long. This function returns false until result is properly decoded
 */
static inline uint8_t yamc_mqtt_decode_remaining_len(yamc_instance_t* const p_instance, const uint8_t data)
{
	YAMC_ASSERT(p_instance != NULL);

	yamc_mqtt_hdr_fixed_t* p_mqtt_hdr_fixed = &p_instance->rx_pkt.fixed_hdr;

	// store data and increment field length
	p_mqtt_hdr_fixed->remaining_len.raw[p_mqtt_hdr_fixed->remaining_len.raw_len++] = data;

	// return if field value is not complete
	if ((data & 0x80) != 0) return false;

	// decode field value - algorithm taken from MQTT specification

	uint32_t multiplier  = 1;
	uint32_t value		 = 0;
	uint8_t  field_idx   = 0;
	uint8_t  encodedByte = 0;
	do
	{
		encodedByte = p_mqtt_hdr_fixed->remaining_len.raw[field_idx++];
		value += (encodedByte & 127) * multiplier;
		if (multiplier > 128 * 128 * 128)
		{
			YAMC_LOG_ERROR("Malformed Remaining Length\n");
			p_instance->handlers.disconnect(p_instance->handlers.p_handler_ctx);
			return false;
		}
		multiplier *= 128;

	} while ((encodedByte & 128) != 0);

	p_mqtt_hdr_fixed->remaining_len.decoded_val = value;
	return true;
}

/// Initialize yamc instance
void yamc_init(yamc_instance_t* const p_instance, const yamc_handler_cfg_t* const p_handler_cfg)
{
	YAMC_ASSERT(p_instance != NULL);
	YAMC_ASSERT(p_handler_cfg != NULL);

	// null check of handlers
	YAMC_ASSERT(p_handler_cfg->pkt_handler != NULL);
	YAMC_ASSERT(p_handler_cfg->disconnect != NULL);
	YAMC_ASSERT(p_handler_cfg->write != NULL);

	// timeout handlers are optional and null checked at execution

	memset(p_instance, 0, sizeof(yamc_instance_t));
	memcpy(&p_instance->handlers, p_handler_cfg, sizeof(yamc_handler_cfg_t));
}

// parse incoming data buffer
void yamc_parse_buff(yamc_instance_t* const p_instance, const uint8_t* const p_buff, uint32_t len)
{
	YAMC_ASSERT(p_instance != NULL);
	YAMC_ASSERT(p_buff != NULL);

	YAMC_LOG_DEBUG("Raw data:");
	yamc_log_hex(p_buff, len);

	// there's data for more than one parser state, repeat
	uint8_t reparse = false;

	// there's data for more than one packet, restart after YAMC_PARSER_DONE
	uint8_t next_packet_present = false;

	// current position in p_buff data
	uint32_t buff_pos = 0;

	// values used by YAMC_PARSER_VAR_DATA memcpy() calls
	uint32_t	   bytes_to_copy = 0;
	const uint8_t* p_var_data_start;

	// start or reset timeout measurement
	timeout_pat(p_instance);

	// packet assembly state machine
	do  // while (reparse)
	{
		reparse							  = false;
		uint8_t decode_remaining_len_done = false;

		switch (p_instance->parser_state)
		{
			// Capture packet type and go to YAMC_PARSER_FIX_HDR state
			case YAMC_PARSER_IDLE:
				YAMC_LOG_DEBUG("State: YAMC_PARSER_IDLE\n");

				memset(&p_instance->rx_pkt, 0, sizeof(yamc_mqtt_pkt_t));

				// store packet type
				p_instance->rx_pkt.fixed_hdr.pkt_type.raw = p_buff[buff_pos];

				// error-check packet type
				if (p_instance->rx_pkt.fixed_hdr.pkt_type.flags.type > YAMC_PKT_DISCONNECT ||
					p_instance->rx_pkt.fixed_hdr.pkt_type.flags.type < YAMC_PKT_CONNECT)
				{
					YAMC_LOG_ERROR("Invalid packet type: %02X\n", p_instance->rx_pkt.fixed_hdr.pkt_type.flags.type);
					p_instance->handlers.disconnect(p_instance->handlers.p_handler_ctx);
					return;
				}

				// go to YAMC_PARSER_FIX_HDR state
				p_instance->parser_state = YAMC_PARSER_FIX_HDR;
				buff_pos++;

				// if there's more data in p_buff continue parsing
				if (buff_pos < len) reparse = true;

				break;

			// Parser is collecting fixed header data
			case YAMC_PARSER_FIX_HDR:
				YAMC_LOG_DEBUG("State: YAMC_PARSER_FIX_HDR\n");

				decode_remaining_len_done = false;

				// decode 'remaining length' field in fixed header
				while ((decode_remaining_len_done = yamc_mqtt_decode_remaining_len(p_instance, p_buff[buff_pos++])) == false &&
					   buff_pos < len)
					;

				//'remaining length' field is not yet fully decoded, wait for more data
				if (decode_remaining_len_done == false) return;

				// error check decoded length
				if (p_instance->rx_pkt.fixed_hdr.remaining_len.decoded_val > YAMC_MQTT_MAX_LEN)
				{
					YAMC_LOG_ERROR("Decoded var_data length exceeds MQTT spec.\n");
					p_instance->handlers.disconnect(p_instance->handlers.p_handler_ctx);
					return;
				}

				// go to YAMC_PARSER_VAR_DATA or YAMC_PARSER_SKIP_PKT based on if we can fit rest of the packet into
				// rx_buffer
				if (p_instance->rx_pkt.fixed_hdr.remaining_len.decoded_val < YAMC_RX_PKT_MAX_LEN)
					p_instance->parser_state = YAMC_PARSER_VAR_DATA;
				else
					p_instance->parser_state = YAMC_PARSER_SKIP_PKT;

				// if there's more data or packet doesn't contain var_data field immediately go to next state via reparse
				// flag
				if (buff_pos < len || p_instance->rx_pkt.fixed_hdr.remaining_len.decoded_val == 0) reparse = true;
				break;

			case YAMC_PARSER_SKIP_PKT:  ///< Packet is too long to process, drop data until next one arrives
				YAMC_LOG_DEBUG("State: YAMC_PARSER_SKIP_PKT\n");

			// intentional fall through!

			case YAMC_PARSER_VAR_DATA:  ///< Parser is collecting variable header and payload data

				YAMC_LOG_DEBUG("State: YAMC_PARSER_VAR_DATA\n");

				bytes_to_copy	= len - buff_pos;
				p_var_data_start = &p_buff[buff_pos];

				// LOG_DEBUG("buff_pos: %d, bytes_to_copy:%d\n",buff_pos,bytes_to_copy);

				// check if this packet is without var_data
				if (p_instance->rx_pkt.fixed_hdr.remaining_len.decoded_val == 0)
				{
					// there's more than one packet in buffer
					if (bytes_to_copy > 0)
					{
						YAMC_LOG_DEBUG("no var_data: More than one packet\n");

						// since there's more data in p_buff more than one packet is present
						next_packet_present = true;
					}
				}
				// check if all incoming data fits completely into var_data of this packet
				else if (p_instance->rx_pkt.var_data.pos + bytes_to_copy <= p_instance->rx_pkt.fixed_hdr.remaining_len.decoded_val)
				{
					// don't copy data in skip packet state
					if (p_instance->parser_state != YAMC_PARSER_SKIP_PKT)
						memcpy(&p_instance->rx_pkt.var_data.data[p_instance->rx_pkt.var_data.pos], p_var_data_start, bytes_to_copy);

					// but always save receive progress
					p_instance->rx_pkt.var_data.pos += bytes_to_copy;

					// no need to update buff_pos since we've consumed whole p_buff
				}
				// if not copy only var_data bytes
				else
				{
					YAMC_LOG_DEBUG("More than one packet present\n");

					uint32_t buffer_remaining_len =
						p_instance->rx_pkt.fixed_hdr.remaining_len.decoded_val - p_instance->rx_pkt.var_data.pos;

					if (buffer_remaining_len > bytes_to_copy)
					{
						YAMC_LOG_ERROR("Too much to copy!\n");
						buffer_remaining_len = bytes_to_copy;
					}

					// don't copy data in skip packet state
					if (p_instance->parser_state != YAMC_PARSER_SKIP_PKT)
						memcpy(&p_instance->rx_pkt.var_data.data[p_instance->rx_pkt.var_data.pos], p_var_data_start, buffer_remaining_len);

					// but always save receive progress

					// update buff_pos since there's more data to process in p_buff
					buff_pos += buffer_remaining_len;
					p_instance->rx_pkt.var_data.pos += buffer_remaining_len;

					// since there's more data in p_buff more than one packet is present
					next_packet_present = true;
				}

				// all current packet's var_data have been processed
				if (p_instance->rx_pkt.var_data.pos == p_instance->rx_pkt.fixed_hdr.remaining_len.decoded_val)
				{
					// var_data were stored, go to YAMC_PARSER_DONE
					if (p_instance->parser_state != YAMC_PARSER_SKIP_PKT)
					{
						// LOG_DEBUG("packet rx complete\n");
						p_instance->parser_state = YAMC_PARSER_DONE;
						reparse					 = true;
					}
					else  // var_data were skipped, go to YAMC_PARSER_IDLE
					{
						p_instance->parser_state = YAMC_PARSER_IDLE;
						// reparse only if there's next packet present
						if (next_packet_present)
						{
							next_packet_present = false;
							reparse				= true;

							// rearm timeout timer
							timeout_pat(p_instance);
						}
					}
				}
				break;

			case YAMC_PARSER_DONE:  ///< Complete packet has been received
				YAMC_LOG_DEBUG("State: YAMC_PARSER_DONE\n");

				// stop timeout measurement
				timeout_stop(p_instance);

				// pass execution to packet data decoders, this will launch 'new packet arrived' handler
				yamc_decode_pkt(p_instance);

				// go to idle state and wait for next packet
				p_instance->parser_state = YAMC_PARSER_IDLE;

				// if there's more data in p_buff reparse immediately
				if (next_packet_present)
				{
					next_packet_present = false;
					reparse				= true;

					// rearm timeout timer
					timeout_pat(p_instance);
				}

				break;

		}  // end of switch (p_instance->parser_state)

	} while (reparse);
}


text:
using std::string;
using std::ifstream;
using std::stringstream;
using std::vector;
using std::set;
using std::min;

namespace ash { namespace parse {

string Outcome::Str() const {
  stringstream ss;
  ss << "(" << name << " (";
  for (auto it = payoffs.begin(); it != payoffs.end(); ++it) {
    if (it != payoffs.begin()) {
      ss << " ";
    }
    ss << *it;
  }
  ss << "))";
  return ss.str();
}

string StrategicGame::Str() const {
  stringstream ss;
  ss << "(" << name;
  ss << "\n  (players ";
  for (auto it = players.begin(); it != players.end(); ++it) {
    if (it != players.begin()) {
      ss << " ";
    }
    ss << *it;
  }
  ss << ")\n  (strategies ";
  for (auto it = strategies.begin(); it != strategies.end(); ++it) {
    ss << "\n    (";
    for (auto it2 = it->begin(); it2 != it->end(); ++it2) {
      if (it2 != it->begin()) {
        ss << " ";
      }
      ss << *it2;
    }
    ss << ")";
  }
  ss << ")\n";
  if (comment.size()) {
    ss << "  (comment " << comment << ")\n";
  }
  ss << "  (outcomes ";
  for (auto it = outcomes.begin(); it != outcomes.end(); ++it) {
    const Outcome& o = *it;
    ss << "\n    " << o.Str();
  }
  ss << ")\n  (payoff indices (";
  for (auto it = payoff_indices.begin(); it != payoff_indices.end(); ++it) {
    if (it != payoff_indices.begin()) {
      ss << " ";
    }
    ss << *it;
  }
  ss << ")))\n";
  return ss.str();
}

const char* Parser::kNumbers = "-0123456789";
const char* Parser::kWhitespace = "\n\r\t ";
const char Parser::kQuot = '\"';
const char Parser::kCurlBeg = '{';
const char Parser::kCurlEnd = '}';

size_t Parser::FileSize(const string& path) {
  ifstream stream(path.c_str());
  size_t size = 0;
  if (stream.good()) {
    stream.seekg(0, std::ios::end);
    size = stream.tellg();
    stream.seekg(0, std::ios::beg);
  }
  stream.close();
  return size;
}

void Parser::CollectNumerals(const string& content, vector<int>* numerals) {
  assert(numerals);
  size_t pos = content.find_first_of(kNumbers);
  while (pos != string::npos) {
    size_t end = content.find_first_not_of(kNumbers, pos);
    if (end == string::npos) {
      numerals->push_back(Convert<int>(content.substr(pos)));
    } else {
      numerals->push_back(Convert<int>(content.substr(pos, end - pos)));
    }
    pos = content.find_first_of(kNumbers, end);
  }
}

void Parser::CollectStrings(const string& content, vector<string>* strings) {
  assert(strings);
  string between;
  size_t pos = Between(0, kQuot, kQuot, content, &between);
  while (pos != string::npos) {
    strings->push_back(between);
    between.clear();
    if (pos < content.size()) {
      pos = Between(pos, kQuot, kQuot, content, &between);
    } else {
      pos = string::npos;
    }
  }
  // size_t pos = content.find(kQuot);
  // while (pos != string::npos) {
  //   assert(pos != string::npos);
  //   size_t end = content.find(kQuot, pos + 1);
  //   assert(end != string::npos);
  //   while (content[end - 1] == '\\') {
  //     // Escaped quotation mark, still inside the string.
  //     end = content.find(kQuot, end + 1);
  //     assert(end != string::npos);
  //   }
  //   // End of string found.
  //   strings->push_back(content.substr(pos + 1, end - pos - 1));
  //   pos = content.find(kQuot, end + 1);
  // }
}

vector<string> Parser::Split(const string& content) {
  vector<string> items;
  size_t pos = content.find_first_not_of(kWhitespace);
  while (pos != string::npos) {
    size_t end = content.find_first_of(kWhitespace, pos);
    if (end == string::npos) {
      // Last item found.
      items.push_back(content.substr(pos));
    } else {
      // Item found.
      items.push_back(content.substr(pos, end - pos));
    }
    pos = content.find_first_not_of(kWhitespace, end);
  }
  return items;
}

string Parser::StripWhitespace(const string& content) {
  size_t beg = content.find_first_not_of(kWhitespace);
  size_t end = content.find_last_not_of(kWhitespace);
  if (beg == end) {
    return "";
  }
  return content.substr(beg, end - beg + 1);
}

Parser::Parser(const string& path)
    : path_(path) {}

StrategicGame Parser::ParseStrategicGame() {
  if (content_.size() == 0) {
    ReadAll();
  }
  assert(content_.size());
  StrategicGame game;
  size_t pos = 0;
  pos = LoadHeader(pos, &game);
  pos = LoadPlayers(pos, &game);
  pos = LoadStrategies(pos, &game);
  size_t comment_end = Between(pos, kQuot, kQuot, &game.comment);
  if (comment_end != string::npos) {
    pos = comment_end;
  }
  pos = LoadOutcomes(pos, &game);
  pos = LoadPayoffIndices(pos, &game);
  return game;
}

size_t Parser::LoadHeader(const size_t pos, StrategicGame* game) const {
  assert(game);
  assert(pos < content_.size());
  size_t end = content_.find(kQuot, pos);
  assert(end != string::npos);
  stringstream ss;
  ss << content_.substr(pos, end - pos);
  string nfg;
  ss >> nfg;
  assert(nfg == "NFG");
  string version;
  ss >> version;
  assert(version == "1");
  string r;
  ss >> r;
  assert(r == "R");
  end = Between(end, kQuot, kQuot, &game->name);
  return end;
}

size_t Parser::LoadPlayers(const size_t pos, StrategicGame* game) const {
  assert(game);
  assert(pos < content_.size());
  string section;
  size_t end = Between(pos, kCurlBeg, kCurlEnd, &section);
  assert(end != string::npos);
  CollectStrings(section, &game->players);
  return end;
}

size_t Parser::LoadStrategies(const size_t pos, StrategicGame* game) const {
  assert(game);
  assert(pos < content_.size());
  string section;
  const size_t end = Between(pos, kCurlBeg, kCurlEnd, &section);
  assert(end != string::npos);
  const int num_players = game->players.size();
  game->strategies.resize(num_players);
  size_t sub_pos = 0;
  for (int i = 0; i < num_players; ++i) {
    string sub_section;
    sub_pos = Between(sub_pos, kCurlBeg, kCurlEnd, section, &sub_section);
    assert(sub_pos != string::npos);
    CollectStrings(sub_section, &game->strategies[i]);
    assert(game->strategies[i].size());
  }
  return end;
}

size_t Parser::LoadOutcomes(const size_t pos, StrategicGame* game) const {
  assert(game);
  assert(pos < content_.size());
  string section;
  const size_t end = Between(pos, kCurlBeg, kCurlEnd, &section);
  assert(end != string::npos);
  const size_t num_players = game->players.size();
  string sub_section;
  size_t sub_pos = Between(0, kCurlBeg, kCurlEnd, section, &sub_section);
  while (sub_pos != string::npos) {
    string name;
    size_t sub_sub_pos = Between(0, kQuot, kQuot, sub_section, &name);
    assert(sub_sub_pos != string::npos);
    vector<int> payoffs;
    CollectNumerals(sub_section.substr(sub_sub_pos), &payoffs);
    assert(payoffs.size() == num_players);
    game->outcomes.push_back(Outcome(name, payoffs));
    sub_section.clear();
    sub_pos = Between(sub_pos, kCurlBeg, kCurlEnd, section, &sub_section);
  }
  return end;
}

size_t Parser::LoadPayoffIndices(const size_t pos, StrategicGame* game) const {
  assert(game);
  assert(pos < content_.size());
  CollectNumerals(content_.substr(pos), &game->payoff_indices);
  return content_.size();
}

size_t Parser::Between(const size_t pos, const char open, const char close,
                       string* between) const {
  return Between(pos, open, close, content_, between);
}

size_t Parser::Between(const size_t pos, const char open, const char close,
                       const string& content, string* between) {
  assert(between);
  assert(pos != string::npos);
  if (pos >= content.size()) {
    return string::npos;
  }
  string both;
  both.push_back(open);
  both.push_back(close);
  size_t beg = content.find(open, pos);
  if (beg != string::npos) {
    int opened = 1;
    size_t end = content.find_first_of(both, beg + 1);
    while (end != string::npos) {
      while (end != string::npos && content[end - 1] == '\\') {
        // Escaped symbol, ignore it.
        end = content.find_first_of(both, end + 1);
      }
      if (end != string::npos) {
        opened -= content[end] == close;
        if (opened == 0) {
          // Structure is closed.
          *between = content.substr(beg + 1, end - beg - 1);
          return end + 1;
        }
        opened += content[end] == open;
        end = content.find_first_of(both, end + 1);
      }
    }
  }
  return string::npos;
}

void Parser::ReadAll() {
  size_t file_size = FileSize(path_);
  char* buffer = new char[file_size + 1];
  buffer[file_size] = '\0';
  ifstream stream(path_);
  assert(stream.good());
  stream.read(buffer, file_size);
  assert(static_cast<size_t>(stream.gcount()) == file_size);
  content_ = string(buffer);
}

} }  // namespace ash::parse


text:
package smoketest.session;

import java.time.Duration;
import java.util.Base64;

import org.junit.jupiter.api.Test;
import reactor.util.function.Tuples;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.http.HttpStatus;
import org.springframework.web.reactive.function.client.WebClient;

import static org.assertj.core.api.Assertions.assertThat;

/**
 * Integration tests for {@link SampleSessionWebFluxApplication}.
 *
 * @author Vedran Pavic
 */
@SpringBootTest(properties = "spring.session.timeout:2", webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class SampleSessionWebFluxApplicationTests {

	@LocalServerPort
	private int port;

	@Autowired
	private WebClient.Builder webClientBuilder;

	@Test
	void userDefinedMappingsSecureByDefault() {
		WebClient client = this.webClientBuilder.baseUrl("http://localhost:" + this.port + "/").build();
		client.get().header("Authorization", getBasicAuth()).exchangeToMono((response) -> {
			assertThat(response.statusCode()).isEqualTo(HttpStatus.OK);
			return response.bodyToMono(String.class)
					.map((sessionId) -> Tuples.of(response.cookies().getFirst("SESSION").getValue(), sessionId));
		}).flatMap((tuple) -> {
			String sesssionCookie = tuple.getT1();
			return client.get().cookie("SESSION", sesssionCookie).exchangeToMono((response) -> {
				assertThat(response.statusCode()).isEqualTo(HttpStatus.OK);
				return response.bodyToMono(String.class)
						.doOnNext((sessionId) -> assertThat(sessionId).isEqualTo(tuple.getT2()))
						.thenReturn(sesssionCookie);
			});
		}).delayElement(Duration.ofSeconds(2))
				.flatMap((sessionCookie) -> client.get().cookie("SESSION", sessionCookie).exchangeToMono((response) -> {
					assertThat(response.statusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
					return response.releaseBody();
				})).block(Duration.ofSeconds(30));
	}

	private String getBasicAuth() {
		return "Basic " + Base64.getEncoder().encodeToString("user:password".getBytes());
	}

}


text:
import React from 'react';
import countComponents from '@ncigdc/modern_components/Counts';
import TwoSetOverlay from './TwoSetOverlay';
import ThreeSetOverlay from './ThreeSetOverlay';
import VennSvg from './VennSvg';
import buildOps from './buildOps';

export { VennSvg, buildOps };

export default ({ style, ops, type, ...props }) => {
  const numCircles = ops.length === 3 ? 2 : 3;
  const OverlayComponent = numCircles === 2 ? TwoSetOverlay : ThreeSetOverlay;
  return (
    <div style={{ padding: '0 20px', ...style }}>
      <div
        style={{ display: 'inline-block', position: 'relative', width: '100%' }}
      >
        <VennSvg {...props} ops={ops} numCircles={numCircles} />
        <OverlayComponent ops={ops} CountComponent={countComponents[type]} />
      </div>
    </div>
  );
};


text:
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Kudu.Contracts.Settings;
using Kudu.Contracts.Tracing;
using Kudu.Core.Infrastructure;

namespace Kudu.Core.Tracing
{
    public class Analytics : IAnalytics
    {
        private static readonly ConcurrentDictionary<string, string> DeprecatedApiPaths = new ConcurrentDictionary<string, string>();

        private readonly IDeploymentSettingsManager _settings;
        private readonly IServerConfiguration _serverConfiguration;
        private readonly ITraceFactory _traceFactory;

        public Analytics(IDeploymentSettingsManager settings, IServerConfiguration serverConfiguration, ITraceFactory traceFactory)
        {
            _settings = settings;
            _serverConfiguration = serverConfiguration;
            _traceFactory = traceFactory;
        }

        public void ProjectDeployed(string projectType, string result, string error, long deploymentDurationInMilliseconds, string siteMode)
        {
            KuduEventSource.Log.ProjectDeployed(
                _serverConfiguration.ApplicationName,
                NullToEmptyString(projectType),
                NullToEmptyString(result),
                NullToEmptyString(error),
                deploymentDurationInMilliseconds,
                NullToEmptyString(siteMode),
                NullToEmptyString(_settings.GetValue(SettingsKeys.ScmType)));
        }

        public void JobStarted(string jobName, string scriptExtension, string jobType, string siteMode, string error)
        {
            KuduEventSource.Log.WebJobStarted(
                _serverConfiguration.ApplicationName,
                NullToEmptyString(jobName),
                NullToEmptyString(scriptExtension),
                NullToEmptyString(jobType),
                NullToEmptyString(siteMode),
                NullToEmptyString(error));
        }

        public void UnexpectedException(Exception exception, bool trace = true)
        {
            KuduEventSource.Log.KuduUnexpectedException(
                _serverConfiguration.ApplicationName,
                GetExceptionContent(exception, trace));
        }

        public void UnexpectedException(Exception ex, string method, string path, string result, string message, bool trace = true)
        {
            // ETW event for KuduException is not existed yet in current Antares deployment
            // "duplicate" log with KuduUnexpectedException so that we will have some data for trouble shooting for now
            // TODO: once next antares release is out, KuduUnexpectedException will be merge into KuduException
            KuduEventSource.Log.KuduUnexpectedException(
                 _serverConfiguration.ApplicationName,
                 string.Format(CultureInfo.InvariantCulture, "Method: {0}, Path: {1}, Result: {2}, Message: {3}, Exception: {4}",
                     NullToEmptyString(method),
                     NullToEmptyString(path),
                     NullToEmptyString(result),
                     NullToEmptyString(message),
                     GetExceptionContent(ex, trace)));

            KuduEventSource.Log.KuduException(
                _serverConfiguration.ApplicationName,
                NullToEmptyString(method),
                NullToEmptyString(path),
                NullToEmptyString(result),
                NullToEmptyString(message),
                GetExceptionContent(ex, trace));
        }

        public void DeprecatedApiUsed(string route, string userAgent, string method, string path)
        {
            path = NullToEmptyString(path);

            // Try not to send the same event (on the same path) more than once.
            if (DeprecatedApiPaths.ContainsKey(path))
            {
                return;
            }

            KuduEventSource.Log.DeprecatedApiUsed(
                _serverConfiguration.ApplicationName,
                NullToEmptyString(route),
                NullToEmptyString(userAgent),
                NullToEmptyString(method),
                path);

            DeprecatedApiPaths[path] = path;
        }

        public void SiteExtensionEvent(string method, string path, string result, string deploymentDurationInMilliseconds, string message)
        {
            KuduEventSource.Log.KuduSiteExtensionEvent(
                _serverConfiguration.ApplicationName,
                NullToEmptyString(method),
                NullToEmptyString(path),
                NullToEmptyString(result),
                NullToEmptyString(deploymentDurationInMilliseconds),
                NullToEmptyString(message));
        }

        private static string NullToEmptyString(string s)
        {
            return s ?? String.Empty;
        }

        private string GetExceptionContent(Exception exception, bool trace)
        {
            if (trace)
            {
                _traceFactory.GetTracer().TraceError(exception);
            }

            var strb = new StringBuilder();
            strb.AppendLine(exception.ToString());

            var aggregate = exception as AggregateException;
            if (aggregate != null)
            {
                foreach (var inner in aggregate.Flatten().InnerExceptions)
                {
                    strb.AppendLine(inner.ToString());
                }
            }

            return strb.ToString();
        }
    }
}