text:
package eu.neclab.iotplatform.ngsiemulator.iotapplication;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;

import org.apache.log4j.Logger;

import com.sun.jersey.api.core.ResourceConfig;

import eu.neclab.iotplatform.iotbroker.commons.ContentType;
import eu.neclab.iotplatform.ngsi.api.datamodel.NgsiStructure;
import eu.neclab.iotplatform.ngsi.api.datamodel.NotifyContextAvailabilityRequest;
import eu.neclab.iotplatform.ngsi.api.datamodel.NotifyContextRequest;
import eu.neclab.iotplatform.ngsi.api.datamodel.NotifyContextRequest_OrionCustomization;
import eu.neclab.iotplatform.ngsi.api.datamodel.NotifyContextResponse;
import eu.neclab.iotplatform.ngsi.api.datamodel.StatusCode;
import eu.neclab.iotplatform.ngsiemulator.utils.HeaderExtractor;

@Path("")
public class IoTApplication {

	// The logger
	private static Logger logger = Logger.getLogger(IoTApplication.class);

	private static String urlIoTAgent = "http://127.0.0.1:8004/ngsi10/notify";

	private static String path = System.getProperty("confman.testing.path",
			"xml/");
	// private static String notificationFile = "notification.xml";
	private static String queryContextResponseFile = "queryContextResponse.xml";
	private static String notifyContextRequestFile = "notifyContextRequest.xml";
	private static String subscribeContextResponseFile = "subscribeContextResponse.xml";

	private final ContentType defaultIncomingContentType = ContentType
			.fromString(
					System.getProperty("eu.neclab.iotplaform.ngsiemulator.iotprovider.defaultIncomingContentType"),
					ContentType.XML);

	private final ContentType defaultOutgoingContentType = ContentType
			.fromString(
					System.getProperty("eu.neclab.iotplaform.ngsiemulator.iotprovider.defaultOutgoingContentType"),
					ContentType.XML);

	@GET
	@Path("/ngsi10/test")
	@Produces("application/xml")
	public String test() {

		return "test";

	}

	@POST
	@Path("/ngsi10/testPost")
	@Produces("application/json")
	public String testPost(@Context HttpHeaders headers,
			@Context ResourceConfig config, String body) {
		logger.info("Received a testPost:" + body);
		return "test";

	}

	@POST
	@Path("/v1/notify")
	@Consumes("application/json")
	@Produces("application/json")
	public String notifyRespOrion(@Context HttpHeaders headers,
			@Context ResourceConfig config, String body) {

		// Get the accepted content type
		final ContentType outgoingContentType = HeaderExtractor.getAccept(
				headers, ContentType.JSON);
		final ContentType incomingContentType = HeaderExtractor.getContentType(
				headers, ContentType.JSON);

		NotifyContextResponse response = new NotifyContextResponse();
		logger.info("Received a NGSI-10 Notification");
		if (logger.isDebugEnabled()) {
			logger.debug("Received a NGSI-10 Notification:" + body);
		}

		if (logger.isDebugEnabled()) {
			NotifyContextRequest_OrionCustomization notification;
			if (incomingContentType == ContentType.JSON) {
				notification = (NotifyContextRequest_OrionCustomization) NgsiStructure
						.parseStringToJson(body,
								NotifyContextRequest_OrionCustomization.class);
				logger.debug("Parsed NGSI-10 Orion Notification:"
						+ notification.toJsonString());
			} else {
				logger.warn("Wrong content type: "
						+ incomingContentType.toString() + " body: " + body);
			}

		}

		response.setResponseCode(new StatusCode(200, "OK", null));

		if (outgoingContentType == ContentType.XML) {
			return response.toString();
		} else {
			return response.toJsonString();
		}
	}

	@POST
	@Path("/ngsi10/notify")
	@Consumes("application/json,application/xml")
	@Produces("application/json,application/xml")
	public String notifyResp(@Context HttpHeaders headers,
			@Context ResourceConfig config, String body) {

		// Get the accepted content type
		final ContentType outgoingContentType = HeaderExtractor.getAccept(
				headers, defaultOutgoingContentType);
		final ContentType incomingContentType = HeaderExtractor.getContentType(
				headers, defaultOutgoingContentType);

		NotifyContextResponse response = new NotifyContextResponse();
		logger.info("Received a NGSI-10 Notification");
		if (logger.isDebugEnabled()) {
			logger.debug("Received a NGSI-10 Notification:" + body);
		}

		if (logger.isDebugEnabled()) {
			NotifyContextRequest notification;
			if (incomingContentType == ContentType.JSON) {
				notification = (NotifyContextRequest) NgsiStructure
						.parseStringToJson(body, NotifyContextRequest.class);
			} else {
				notification = (NotifyContextRequest) NgsiStructure
						.convertStringToXml(body, NotifyContextRequest.class);
			}
			logger.debug("Parsed NGSI-10 Notification:"
					+ notification.toJsonString());

		}

		response.setResponseCode(new StatusCode(200, "OK", null));

		if (outgoingContentType == ContentType.XML) {
			return response.toString();
		} else {
			return response.toJsonString();
		}
	}

	@POST
	@Path("/ngsi9/notify")
	@Consumes("application/json,application/xml")
	@Produces("application/json,application/xml")
	public String notifyAvailablityResp(@Context HttpHeaders headers,
			@Context ResourceConfig config, String body) {

		// Get the accepted content type
		final ContentType outgoingContentType = HeaderExtractor.getAccept(
				headers, defaultOutgoingContentType);
		final ContentType incomingContentType = HeaderExtractor.getContentType(
				headers, defaultOutgoingContentType);

		NotifyContextResponse response = new NotifyContextResponse();
		logger.info("Received a NGSI-9 Notification");
		if (logger.isDebugEnabled()) {
			logger.debug("Received a NGSI-9 Notification:" + body);
		}

		if (logger.isDebugEnabled()) {
			NotifyContextAvailabilityRequest notification;

			if (incomingContentType == ContentType.JSON) {
				notification = (NotifyContextAvailabilityRequest) NgsiStructure
						.parseStringToJson(body,
								NotifyContextAvailabilityRequest.class);
			} else {
				notification = (NotifyContextAvailabilityRequest) NgsiStructure
						.convertStringToXml(body,
								NotifyContextAvailabilityRequest.class);
			}
			logger.debug("Parsed NGSI-9 Notification:"
					+ notification.toJsonString());

		}

		response.setResponseCode(new StatusCode(200, "OK", null));

		if (outgoingContentType == ContentType.XML) {
			return response.toString();
		} else {
			return response.toJsonString();
		}
	}

}


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _macros = require('./lib/utils/macros');

var _macros2 = _interopRequireDefault(_macros);

var _fs = require('fs');

var _path = require('path');

var _normalizeOptions = require('./lib/utils/normalize-options');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function macros(babel) {
  var t = babel.types;

  var macroBuilder = void 0;
  var options = void 0;

  return {
    name: "babel-feature-flags-and-debug-macros",
    visitor: {

      Program: {
        enter(path, state) {
          var _this = this;

          options = (0, _normalizeOptions.normalizeOptions)(state.opts);
          this.macroBuilder = new _macros2.default(t, options);

          var body = path.get('body');

          body.forEach(function (item) {
            if (item.isImportDeclaration()) {
              var importPath = item.node.source.value;

              var _options = options,
                  featureSources = _options.featureSources,
                  debugToolsImport = _options.debugTools.debugToolsImport,
                  _options$envFlags = _options.envFlags,
                  envFlagsImport = _options$envFlags.envFlagsImport,
                  flags = _options$envFlags.flags;

              var isFeaturesImport = featureSources.indexOf(importPath) > -1;

              if (debugToolsImport && debugToolsImport === importPath) {
                _this.macroBuilder.collectDebugToolsSpecifiers(item.get('specifiers'));
              }if (envFlagsImport && envFlagsImport === importPath) {
                _this.macroBuilder.collectEnvFlagSpecifiers(item.get('specifiers'));
              }
            }
          });
        },

        exit(path) {
          this.macroBuilder.expand(path);
        }
      },

      ExpressionStatement(path) {
        this.macroBuilder.build(path);
      }
    }
  };
}

macros.baseDir = function () {
  return (0, _path.dirname)(__dirname);
};

exports.default = macros;

redpajama_set_name: RedPajamaGithub


text:
title: "IRC"
version: 1.0
weight: 8
---

**ENTERPRISE: Built-in integrations are available for [Sensu Enterprise][1]
users only.**

# IRC Integration

- [Overview](#overview)
- [Configuration](#configuration)
  - [Example(s)](#examples)
  - [Integration Specification](#integration-specification)
    - [`irc` attributes](#irc-attributes)

## Overview

Send notifications to an Internet Relay Chat (IRC) channel for events.

## Configuration

### Example(s)

The following is an example global configuration for the `irc` enterprise event
handler (integration).

~~~ json
{
  "irc": {
    "uri": "irc://nick:pass@example.com:6697/#ops",
    "ssl": true,
    "nickserv_password": "NICKSERV_PASSWORD",
    "channel_password": "CHANNEL_PASSWORD",
    "join": false,
    "timeout": 10
  }
}
~~~

### Integration Specification

#### `irc` attributes

The following attributes are configured within the `{"irc": {} }` [configuration
scope][2].

`uri`
: description
  : The IRC URI; including the nick, password, address, port, and channel.
: required
  : true
: type
  : String
: example
  : ~~~ shell
    "uri": "irc://nick:pass@example.com:6697/#ops"
    ~~~

`ssl`
: description
  : If SSL encryption is used for the IRC connection.
: required
  : false
: type
  : Boolean
: default
  : `false`
: example
  : ~~~ shell
    "ssl": true
    ~~~

`channel_password`
: description
  : The IRC channel password (if required).
: required
  : false
: type
  : String
: example
  : ~~~ shell
    "channel_password": "secret"
    ~~~

`nickserv_password`
: description
  : Identify with NickServ (if required).
: required
  : false
: type
  : String
: example
  : ~~~ shell
    "nickserv_password": "secret"
    ~~~

`join`
: description
  : If the handler must join the IRC channel before messaging.
: required
  : false
: type
  : Boolean
: default
  : `false`
: example
  : ~~~ shell
    "join": true
    ~~~

`timeout`
: description
  : The handler execution duration timeout in seconds (hard stop).
: required
  : false
: type
  : Integer
: default
  : `10`
: example
  : ~~~ shell
    "timeout": 30
    ~~~

[?]:  #
[1]:  /enterprise
[2]:  ../../reference/configuration.html#configuration-scopes


text:
package librejsgopher

import (
	"errors"
	"io/ioutil"
	"os"
	"strings"
)

// LicensesCapitalizedStrings is array of strings where each string is a license name or sub-string that needs to be capitalized
var LicensesCapitalizedStrings []string

// LicenseMap is a map of license names to magnet URLs
var LicenseMap map[string]string

func init() {
	LicensesCapitalizedStrings = []string{"BSD", "CC", "GPL", "ISC", "MPL"}

	LicenseMap = map[string]string{
		"AGPL-3.0":      "magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt",
		"Apache-2.0":    "magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt",
		"Artistic-2.0":  "magnet:?xt=urn:btih:54fd2283f9dbdf29466d2df1a98bf8f65cafe314&dn=artistic-2.0.txt",
		"BSD-3.0":       "magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt",
		"CC0":           "magnet:?xt=urn:btih:90dc5c0be029de84e523b9b3922520e79e0e6f08&dn=cc0.txt",
		"Expat":         "magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt",
		"FreeBSD":       "magnet:?xt=urn:btih:87f119ba0b429ba17a44b4bffcab33165ebdacc0&dn=freebsd.txt",
		"GPL-2.0":       "magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt",
		"GPL-3.0":       "magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt",
		"ISC":           "magnet:?xt=urn:btih:b8999bbaf509c08d127678643c515b9ab0836bae&dn=ISC.txt",
		"LGPL-2.1":      "magnet:?xt=urn:btih:5de60da917303dbfad4f93fb1b985ced5a89eac2&dn=lgpl-2.1.txt",
		"LGPL-3.0":      "magnet:?xt=urn:btih:0ef1b8170b3b615170ff270def6427c317705f85&dn=lgpl-3.0.txt",
		"MPL-2.0":       "magnet:?xt=urn:btih:3877d6d54b3accd4bc32f8a48bf32ebc0901502a&dn=mpl-2.0.txt",
		"Public-Domain": "magnet:?xt=urn:btih:e95b018ef3580986a04669f1b5879592219e2a7a&dn=public-domain.txt",
		"X11":           "magnet:?xt=urn:btih:5305d91886084f776adcf57509a648432709a7c7&dn=x11.txt",
		"XFree86":       "magnet:?xt=urn:btih:12f2ec9e8de2a3b0002a33d518d6010cc8ab2ae9&dn=xfree86.txt",
	}
}

// AddLicense will add a valid LibreJS short-form header and footer to the file. You can set to write the file automatically (we will always return new file content or an error)
func AddLicense(license string, file string, writeContentAutomatically bool) (string, error) {
	var newFileContent string
	var addError error

	if strings.HasSuffix(file, ".js") { // If this is a JavaScript file
		fileContentBytes, fileReadError := ioutil.ReadFile(file) // Get the fileContent or if the file does not exist (or we do not have the permission) assign to fileReadError

		if fileReadError == nil { // If there was no read error
			parsedLicense := ParseLicenseName(license)             // Format license to be consistent when appending to newFileContent
			magnetURL, magnetError := GetMagnetLink(parsedLicense) // Attempt to get the magnet URL and if license does not exist return error

			if magnetError == nil { // If the license requested is valid and return a magnet URL
				fileContentString := string(fileContentBytes[:])                                                                   // Convert to string
				newFileContent = "// @license " + magnetURL + " " + parsedLicense + "\n" + fileContentString + "\n// @license-end" // Add @license INFO + content + @license-end

				if writeContentAutomatically { // If we should write the file content automatically
					fileStruct, _ := os.Open(file)   // Open the file and get an os.File struct
					fileStat, _ := fileStruct.Stat() // Get the stats about the file
					fileMode := fileStat.Mode()
					fileStruct.Close() // Close the open file struct

					ioutil.WriteFile(file, []byte(newFileContent), fileMode) // Write the file with the new content and same mode
				}
			} else { // If the magnetURL does not exist
				addError = magnetError // Assign addError as the magnetError
			}
		} else { // If there was a read error
			addError = errors.New(file + " does not exist.")
		}
	} else { // File provided is not a JavaScript file
		addError = errors.New(file + " is not a JavaScript file (detected if ending with .js).")
	}

	return newFileContent, addError
}

// AddLicenseInfo is a backwards-compatible call that actually calls AddLicenseInfo
func AddLicenseInfo(license string, file string, writeContentAutomatically bool) (string, error) {
	return AddLicense(license, file, writeContentAutomatically)
}

// GetFileLicense will get the license of the file, assuming it uses a valid LibreJS short-form header.
func GetFileLicense(file string) (LibreJSMetaInfo, error) {
	var getError error
	var metaInfo LibreJSMetaInfo

	fileContentBytes, fileReadError := ioutil.ReadFile(file) // Get the fileContent or if the file does not exist (or we do not have the permission) assign to fileReadError

	if fileReadError == nil { // If there was no read error
		fileContent := string(fileContentBytes[:])           // Convert to string
		fileContentLines := strings.Split(fileContent, "\n") // Split each new line into an []string
		fileContentLinesCount := len(fileContentLines)
		linesParsed := 0 // Define linesParsed as the number of lines parsed by FileLicenseLineParser

		if fileContentLinesCount > 1 { // If this file is not a single line or empty
			fileLineParserChannel := make(chan LibreJSMetaInfo, fileContentLinesCount) // Make a channel that takes LibreJSMetaInfo

			for _, lineContent := range fileContentLines { // For each license
				go FileLicenseLineParser(fileLineParserChannel, lineContent) // Asynchronously call FileLicenseLineParser
			}

		LineParserLoop:
			for libreJsMetaInfo := range fileLineParserChannel { // Constantly listen for channel input
				if libreJsMetaInfo.License != "" { // If the provided LibreJSMetaInfo has a valid License
					metaInfo = libreJsMetaInfo // Assign metaInfo as provided libreJsMetaInfo
				}

				linesParsed++ // Increment linesParsed

				if fileContentLinesCount == linesParsed { // If we're parsed all the liens
					close(fileLineParserChannel) // Close the channel
					break LineParserLoop         // Break LineParserLoop
				}
			}

			if metaInfo.License == "" { // If there is no License defined by the end of the file
				getError = errors.New("LibreJS short-form header does not exist in this file.")
			}
		} else { // If the length of the file is 1 line or none
			getError = errors.New("File is either empty or does not contain the necessary individual lines required by LibreJS short-form blocks.")
		}
	} else { // If the file does not exist
		getError = errors.New(file + " does not exist.")
	}

	return metaInfo, getError
}

// FileLicenseLineParser handles individual line parsing
func FileLicenseLineParser(returnContentChannel chan LibreJSMetaInfo, lineContent string) {
	metaInfo := LibreJSMetaInfo{}

	lineContent = strings.Replace(lineContent, "//", "", -1) // Replace any // with nothing
	lineContent = strings.Replace(lineContent, "*", "", -1)  // Replace any * (block quotes) with nothing
	lineContent = strings.TrimPrefix(lineContent, " ")       // Trim any prefixed whitespace

	if strings.HasPrefix(lineContent, "@license") { // If the line starts with @license
		licenseHeaderFragments := strings.SplitN(lineContent, " ", 3) // Split the license header info into three segments, separated by whitespace

		if len(licenseHeaderFragments) == 3 { // If there are three items in the slice, meaning this is a @license line and not @license-end
			metaInfo.License = ParseLicenseName(licenseHeaderFragments[2]) // Define License as the parsed license name of the last item in fragments index
			metaInfo.Magnet = licenseHeaderFragments[1]                    // Define Magnet as the second item in the fragments index
		}
	}

	returnContentChannel <- metaInfo
}

// GetMagnetLink will get a magnet link of the associated license exists
// Returns string for magnet link, error if item does not exist
func GetMagnetLink(license string) (string, error) {
	var magnetLinkFetchError error

	license = ParseLicenseName(license) // Parse the license name first
	magnetURL, licenseExists := LicenseMap[license]

	if !licenseExists { // If the license does not exist
		magnetLinkFetchError = errors.New(license + " does not exist.")
	}

	return magnetURL, magnetLinkFetchError
}

// IsLicense will return whether this is a valid license in the LicenseMap or not
func IsLicense(license string) bool {
	var isLicense bool                  // Define isLicense by default as false
	license = ParseLicenseName(license) // Parse the license

	_, isLicense = LicenseMap[license] // Assign isLicense to bool of LicenseMap[License] exist check

	return isLicense
}

// ParseLicenseName will attempt to parse the provided license into a more logic naming scheme used in LicenseMap
func ParseLicenseName(license string) string {
	license = strings.ToLower(license) // Lowercase the entire string to make selective capitalization easier

	for _, licenseCapitalizedString := range LicensesCapitalizedStrings { // For each capitalized string of a license in LicensesCapitalizedStrings
		license = strings.Replace(license, strings.ToLower(licenseCapitalizedString), licenseCapitalizedString, -1) // Replace any lowercase instance with capitalized instance
	}

	license = strings.Title(license)                 // Title the license (example: apache -> Apache)
	license = strings.TrimSpace(license)             // Trim all the spacing before and after the license
	license = strings.Replace(license, " ", "-", -1) // Replace whitespacing with hyphens

	return license
}


text:
from __future__ import print_function
import tensorflow as tf
import numpy as np

import os
import json
import collections

from bayou.models.core.model import Model
from bayou.models.core.utils import CHILD_EDGE, SIBLING_EDGE
from bayou.models.core.utils import read_config

MAX_GEN_UNTIL_STOP = 20
MAX_AST_DEPTH = 5

class BayesianPredictor(object):

    def __init__(self, save, sess):
        self.sess = sess

        # load the saved config
        with open(os.path.join(save, 'config.json')) as f:
            config = read_config(json.load(f), save_dir=save, infer=True)
        self.model = Model(config, True)

        # restore the saved model
        tf.global_variables_initializer().run()
        saver = tf.train.Saver(tf.global_variables())
        ckpt = tf.train.get_checkpoint_state(save)
        saver.restore(self.sess, ckpt.model_checkpoint_path)

    def infer(self, evidences):
        psi = self.psi_from_evidence(evidences)
        self.calls_in_last_ast = []
        return self.generate_ast(psi)

    def psi_random(self):
        return np.random.normal(size=[1, self.model.config.latent_size])

    def psi_from_evidence(self, js_evidences):
        return self.model.infer_psi(self.sess, js_evidences)

    def gen_until_STOP(self, psi, depth, in_nodes, in_edges, check_call=False):
        ast = []
        nodes, edges = in_nodes[:], in_edges[:]
        num = 0
        while True:
            assert num < MAX_GEN_UNTIL_STOP # exception caught in main
            dist = self.model.infer_ast(self.sess, psi, nodes, edges)
            idx = np.random.choice(range(len(dist)), p=dist)
            prediction = self.model.config.decoder.chars[idx]
            nodes += [prediction]
            if check_call:  # exception caught in main
                assert prediction not in ['DBranch', 'DExcept', 'DLoop', 'DSubTree']
            if prediction == 'STOP':
                edges += [SIBLING_EDGE]
                break
            js = self.generate_ast(psi, depth + 1, nodes, edges + [CHILD_EDGE])
            ast.append(js)
            edges += [SIBLING_EDGE]
            num += 1
        return ast, nodes, edges

    def generate_ast(self, psi, depth=0, in_nodes=['DSubTree'], in_edges=[CHILD_EDGE]):
        assert depth < MAX_AST_DEPTH
        ast = collections.OrderedDict()
        node = in_nodes[-1]

        # Return the "AST" if the node is an API call
        if node not in ['DBranch', 'DExcept', 'DLoop', 'DSubTree']:
            ast['node'] = 'DAPICall'
            ast['_call'] = node
            self.calls_in_last_ast.append(node)
            return ast

        ast['node'] = node
        nodes, edges = in_nodes[:], in_edges[:]

        if node == 'DBranch':
            ast_cond, nodes, edges = self.gen_until_STOP(psi, depth, nodes, edges, check_call=True)
            ast_then, nodes, edges = self.gen_until_STOP(psi, depth, nodes, edges)
            ast_else, nodes, edges = self.gen_until_STOP(psi, depth, nodes, edges)
            ast['_cond'] = ast_cond
            ast['_then'] = ast_then
            ast['_else'] = ast_else
            return ast

        if node == 'DExcept':
            ast_try, nodes, edges = self.gen_until_STOP(psi, depth, nodes, edges)
            ast_catch, nodes, edges = self.gen_until_STOP(psi, depth, nodes, edges)
            ast['_try'] = ast_try
            ast['_catch'] = ast_catch
            return ast

        if node == 'DLoop':
            ast_cond, nodes, edges = self.gen_until_STOP(psi, depth, nodes, edges, check_call=True)
            ast_body, nodes, edges = self.gen_until_STOP(psi, depth, nodes, edges)
            ast['_cond'] = ast_cond
            ast['_body'] = ast_body
            return ast

        if node == 'DSubTree':
            ast_nodes, _, _ = self.gen_until_STOP(psi, depth, nodes, edges)
            ast['_nodes'] = ast_nodes
            return ast


text:
var _ = require('underscore');
var Backbone = require('backbone');
var d3 = require('d3-array');
var DataviewModelBase = require('./dataview-model-base');
var HistogramDataModel = require('./histogram-dataview/histogram-data-model');
var helper = require('./helpers/histogram-helper');
var dateUtils = require('../util/date-utils');

module.exports = DataviewModelBase.extend({

  defaults: _.extend(
    {
      type: 'histogram',
      totalAmount: 0,
      filteredAmount: 0,
      hasNulls: false,
      localTimezone: false
    },
    DataviewModelBase.prototype.defaults
  ),

  _getDataviewSpecificURLParams: function () {
    var params = [];

    if (_.isNumber(this.get('own_filter'))) {
      params.push('own_filter=' + this.get('own_filter'));
      if (this.get('column_type') === 'number' && this.get('bins')) {
        params.push('bins=' + this.get('bins'));
      }
    } else {
      var offset = this.getCurrentOffset();

      if (this.get('column_type') === 'number' && this.get('bins')) {
        params.push('bins=' + this.get('bins'));
      } else if (this.get('column_type') === 'date') {
        params.push('aggregation=' + (this.get('aggregation') || 'auto'));
        if (_.isFinite(offset)) {
          params.push('offset=' + offset);
        }
      }

      // Start - End
      var start = this.get('start');
      var end = this.get('end');
      if (_.isFinite(start) && _.isFinite(end)) {
        params.push('start=' + start);
        params.push('end=' + end);
      }
    }
    return params;
  },

  initialize: function (attrs, opts) {
    this._localOffset = dateUtils.getLocalOffset();

    // Internal model for calculating all the data in the histogram (without filters)
    this._totals = new HistogramDataModel({
      bins: this.get('bins'),
      aggregation: this.get('aggregation'),
      offset: this.get('offset'),
      column_type: this.get('column_type'),
      apiKey: this.get('apiKey'),
      authToken: this.get('authToken'),
      localTimezone: this.get('localTimezone'),
      localOffset: this._localOffset
    });

    DataviewModelBase.prototype.initialize.apply(this, arguments);
    this._data = new Backbone.Collection(this.get('data'));

    if (attrs && (attrs.min || attrs.max)) {
      this.filter && this.filter.setRange(this.get('min'), this.get('max'));
    }
  },

  _initBinds: function () {
    DataviewModelBase.prototype._initBinds.apply(this);

    this._updateURLBinding();

    // When original data gets fetched
    this._totals.bind('loadModelCompleted', this._onTotalsDataFetched, this);
    this._totals.once('loadModelCompleted', this._updateBindings, this);
    this._totals.bind('error', this.setUnavailable, this);
    this._totals.bind('error', this._onTotalsError, this);

    this.on('change:column', this._onColumnChanged, this);
    this.on('change:localTimezone', this._onLocalTimezoneChanged, this);
    this.on('change', this._onFieldsChanged, this);
    this.on('change:column_type', this._onColumnTypeChanged, this);
  },

  _onLocalTimezoneChanged: function () {
    this._totals.set('localTimezone', this.get('localTimezone'));
  },

  _updateURLBinding: function () {
    this.off('change:url');
    this.on('change:url', this._onUrlChanged, this);
  },

  _updateBindings: function () {
    this._onChangeBinds();
    this._updateURLBinding();
  },

  enableFilter: function () {
    this.set('own_filter', 1);
  },

  disableFilter: function () {
    this.unset('own_filter');
  },

  getData: function () {
    return this._data.toJSON();
  },

  getUnfilteredData: function () {
    return this._totals.get('data');
  },

  getUnfilteredDataModel: function () {
    return this._totals;
  },

  getSize: function () {
    return this._data.size();
  },

  getColumnType: function () {
    return this.get('column_type');
  },

  hasNulls: function () {
    return this.get('hasNulls');
  },

  parse: function (data) {
    var aggregation = data.aggregation || (this._totals && this._totals.get('aggregation'));
    var numberOfBins = _.isFinite(data.bins_count)
      ? data.bins_count
      : this.get('bins');
    var width = data.bin_width;
    var start = this.get('column_type') === 'date' ? data.timestamp_start : data.bins_start;

    var parsedData = {
      data: [],
      filteredAmount: 0,
      nulls: 0,
      totalAmount: 0
    };

    if (this.has('error')) {
      return parsedData;
    }

    parsedData.data = new Array(numberOfBins);

    _.each(data.bins, function (bin) {
      parsedData.data[bin.bin] = bin;
    });

    this.set({
      aggregation: aggregation
    }, { silent: true });

    if (this.get('column_type') === 'date') {
      parsedData.data = helper.fillTimestampBuckets(parsedData.data, start, aggregation, numberOfBins, 'filtered', this._totals.get('data').length);
      numberOfBins = parsedData.data.length;
    } else {
      helper.fillNumericBuckets(parsedData.data, start, width, numberOfBins);
    }

    // FIXME - Update the end of last bin due https://github.com/CartoDB/cartodb.js/issues/926
    var lastBucket = parsedData.data[numberOfBins - 1];
    if (lastBucket && lastBucket.end < lastBucket.max) {
      lastBucket.end = lastBucket.max;
    }

    // if parse option is passed in the constructor, this._data is not created yet at this point
    this._data && this._data.reset(parsedData.data);

    // Calculate totals
    parsedData.totalAmount = this._calculateTotalAmount(parsedData.data);
    parsedData.filteredAmount = this._calculateFilteredAmount(this.filter, this._data);
    parsedData.nulls = data.nulls;
    parsedData.bins = numberOfBins;

    if (data.nulls != null) {
      parsedData = _.extend({}, parsedData, {
        nulls: data.nulls,
        hasNulls: true
      });
    }

    return parsedData;
  },

  _onFilterChanged: function (filter) {
    this.set('filteredAmount', this._calculateFilteredAmount(filter, this._data));

    DataviewModelBase.prototype._onFilterChanged.apply(this, arguments);
  },

  _onColumnChanged: function () {
    this._totals.set({
      column_type: this.get('column_type'),
      column: this.get('column')
    });
    this.set('aggregation', undefined, { silent: true });

    this._reloadAndForceFetch();
  },

  _calculateTotalAmount: function (buckets) {
    return _.reduce(buckets, function (memo, bucket) {
      var add = bucket && bucket.freq
        ? bucket.freq
        : 0;
      return memo + add;
    }, 0);
  },

  _calculateFilteredAmount: function (filter, data) {
    var filteredAmount = 0;
    if (filter && filter.get('min') !== void 0 && filter.get('max') !== void 0) {
      var indexes = this._findBinsIndexes(data, filter.get('min'), filter.get('max'));
      filteredAmount = this._sumBinsFreq(data, indexes.start, indexes.end);
    }

    return filteredAmount;
  },

  _findBinsIndexes: function (data, start, end) {
    var startBin = data.findWhere({ start: Math.min(start, end) });
    var endBin = data.findWhere({ end: Math.max(start, end) });

    return {
      start: startBin && startBin.get('bin'),
      end: endBin && endBin.get('bin')
    };
  },

  _sumBinsFreq: function (data, start, end) {
    return _.reduce(data.slice(start, end + 1), function (acum, d) {
      return (d.get('freq') || 0) + acum;
    }, 0);
  },

  /*
  Ported from cartodb-postgresql
  https://github.com/CartoDB/cartodb-postgresql/blob/master/scripts-available/CDB_DistType.sql
  */
  getDistributionType: function (data) {
    var histogram = data || this.get('data');
    var freqAccessor = function (a) { return a.freq; };
    var osc = d3.max(histogram, freqAccessor) - d3.min(histogram, freqAccessor);
    var mean = d3.mean(histogram, freqAccessor);
    // When the difference between the max and the min values is less than
    // 10 percent of the mean, it's a flat histogram (F)
    if (osc < mean * 0.1) return 'F';
    var sumFreqs = d3.sum(histogram, freqAccessor);
    var freqs = histogram.map(function (bin) {
      return 100 * bin.freq / sumFreqs;
    });

    // The ajus array represents relative growths
    var ajus = freqs.map(function (freq, index) {
      var next = freqs[index + 1];
      if (freq > next) return -1;
      if (Math.abs(freq - next) <= 0.05) return 0;
      return 1;
    });
    ajus.pop();
    var maxAjus = d3.max(ajus);
    var minAjus = d3.min(ajus);
    // If it never grows or shrinks, it returns flat
    if (minAjus === 0 && maxAjus === 0) return 'F';
    else if (maxAjus < 1) return 'L';
    else if (minAjus > -1) return 'J';
    else {
      var uniques = _.uniq(ajus);
      var A_TYPES = [[1, -1], [1, 0, -1], [1, -1, 0], [0, 1, -1]];
      var U_TYPES = [[-1, 1], [-1, 0, 1], [-1, 1, 0], [0, -1, 1]];
      if (A_TYPES.some(function (e) {
        return _.isEqual(e, uniques);
      })) return 'A';
      else if (U_TYPES.some(function (e) {
        return _.isEqual(e, uniques);
      })) return 'U';
      else return 'S';
    }
  },

  toJSON: function (d) {
    var columnType = this.get('column_type');
    var offset = this.get('offset');

    var options = {
      column: this.get('column')
    };

    if (columnType === 'number' && this.get('bins')) {
      options.bins = this.get('bins');
    } else if (columnType === 'date') {
      options.aggregation = this.get('aggregation') || 'auto';

      if (_.isFinite(offset)) {
        options.offset = offset;
      }
    }

    return {
      type: 'histogram',
      source: { id: this.getSourceId() },
      options: options
    };
  },

  _onColumnTypeChanged: function () {
    this.filter && this.filter.set('column_type', this.get('column_type'));
  },

  _onChangeBinds: function () {
    DataviewModelBase.prototype._onChangeBinds.call(this);
  },

  _onUrlChanged: function () {
    this._totals.set({
      offset: this.get('offset'),
      bins: this.get('bins')
    }, { silent: true });

    this._totals.setUrl(this.get('url'));
  },

  _onTotalsDataFetched: function (data, model) {
    var start = model.get('start');
    var end = model.get('end');
    if (_.isFinite(start) && _.isFinite(end)) {
      this.set({
        start: start,
        end: end
      });
    }

    this.set({
      aggregation: model.get('aggregation') || 'auto',
      offset: model.get('offset') || 0,
      bins: model.get('bins'),
      error: model.get('error')
    }, { silent: true });

    var resetFilter = false;

    if (this.get('column_type') === 'date' && (_.has(this.changed, 'aggregation') || _.has(this.changed, 'offset'))) {
      resetFilter = true;
    } else if (this.get('column_type') === 'number' && _.has(this.changed, 'bins')) {
      resetFilter = true;
    }

    resetFilter
      ? this._resetFilterAndFetch()
      : this.fetch();
  },

  _onFieldsChanged: function () {
    if (!helper.hasChangedSomeOf(['offset', 'bins', 'aggregation'], this.changed)) {
      return;
    }

    var aggregationChangedToUndefined = _.has(this.changed, 'aggregation') && _.isUndefined(this.changed.aggregation);

    // We should avoid fetching totals when bins has changed and aggregation has
    // changed to undefined. That means a change in column. If we set the bins
    // we trigger a fetch while a map instantiation is ongoing. The API returns bad data in that case.
    if (this.get('column_type') === 'number' && !aggregationChangedToUndefined) {
      this._totals.set('bins', this.get('bins'));
    }
    if (this.get('column_type') === 'date') {
      if (this.hasChanged('aggregation')) {
        this._resetFilter();
      }
      this._totals.set({
        offset: this.get('offset'),
        aggregation: this.get('aggregation')
      });
    }
  },

  _resetFilterAndFetch: function () {
    this._resetFilter();
    this.fetch();
  },

  _resetFilter: function () {
    this.disableFilter();
    this.filter && this.filter.unsetRange();
  },

  _onTotalsError: function (model, error) {
    var parsedError = error && this._parseError(error);
    this._triggerStatusError(parsedError);
  },

  getCurrentOffset: function () {
    return this.get('localTimezone')
      ? this._localOffset
      : this.get('offset');
  }
},

  // Class props
{
  ATTRS_NAMES: DataviewModelBase.ATTRS_NAMES.concat([
    'column',
    'column_type',
    'bins',
    'min',
    'max',
    'aggregation',
    'offset'
  ])
}
);


text:
package com.fasterxml.jackson.databind;

import java.io.IOException;
import java.util.Collection;

import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.databind.deser.BeanDeserializerFactory;
import com.fasterxml.jackson.databind.deser.SettableBeanProperty;
import com.fasterxml.jackson.databind.deser.impl.ObjectIdReader;
import com.fasterxml.jackson.databind.jsontype.TypeDeserializer;
import com.fasterxml.jackson.databind.util.NameTransformer;

/**
 * Abstract class that defines API used by {@link ObjectMapper} (and
 * other chained {@link JsonDeserializer}s too) to deserialize Objects of
 * arbitrary types from JSON, using provided {@link JsonParser}.
 *

 * Custom deserializers should usually not directly extend this class,
 * but instead extend {@link com.fasterxml.jackson.databind.deser.std.StdDeserializer}
 * (or its subtypes like {@link com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer}).
 *

 * If deserializer is an aggregate one -- meaning it delegates handling of some
 * of its contents by using other deserializer(s) -- it typically also needs
 * to implement {@link com.fasterxml.jackson.databind.deser.ResolvableDeserializer},
 * which can locate dependant deserializers. This is important to allow dynamic
 * overrides of deserializers; separate call interface is needed to separate
 * resolution of dependant deserializers (which may have cyclic link back
 * to deserializer itself, directly or indirectly).
 *

 * In addition, to support per-property annotations (to configure aspects
 * of deserialization on per-property basis), deserializers may want
 * to implement
 * {@link com.fasterxml.jackson.databind.deser.ContextualDeserializer},
 * which allows specialization of deserializers: call to
 * {@link com.fasterxml.jackson.databind.deser.ContextualDeserializer#createContextual}
 * is passed information on property, and can create a newly configured
 * deserializer for handling that particular property.
 *

 * If both
 * {@link com.fasterxml.jackson.databind.deser.ResolvableDeserializer} and
 * {@link com.fasterxml.jackson.databind.deser.ContextualDeserializer}
 * are implemented, resolution of deserializers occurs before
 * contextualization.
 */
public abstract class JsonDeserializer<T>
{
    /*
    /**********************************************************
    /* Main deserialization methods
    /**********************************************************
     */

    /**
     * Method that can be called to ask implementation to deserialize
     * JSON content into the value type this serializer handles.
     * Returned instance is to be constructed by method itself.
     *

     * Pre-condition for this method is that the parser points to the
     * first event that is part of value to deserializer (and which
     * is never JSON 'null' literal, more on this below): for simple
     * types it may be the only value; and for structured types the
     * Object start marker or a FIELD_NAME.
     *

     *

     * The two possible input conditions for structured types result
     * from polymorphism via fields. In the ordinary case, Jackson
     * calls this method when it has encountered an OBJECT_START,
     * and the method implementation must advance to the next token to
     * see the first field name. If the application configures
     * polymorphism via a field, then the object looks like the following.
     *

     *      {
     *          "@class": "class name",
     *          ...
     *      }
     *

     *  Jackson consumes the two tokens (the <tt>@class</tt> field name
     *  and its value) in order to learn the class and select the deserializer.
     *  Thus, the stream is pointing to the FIELD_NAME for the first field
     *  after the @class. Thus, if you want your method to work correctly
     *  both with and without polymorphism, you must begin your method with:
     *

     *       if (jp.getCurrentToken() == JsonToken.START_OBJECT) {
     *         jp.nextToken();
     *       }
     *

     * This results in the stream pointing to the field name, so that
     * the two conditions align.
     *

     *

     * Post-condition is that the parser will point to the last
     * event that is part of deserialized value (or in case deserialization
     * fails, event that was not recognized or usable, which may be
     * the same event as the one it pointed to upon call).
     *

     * Note that this method is never called for JSON null literal,
     * and thus deserializers need (and should) not check for it.
     *
     * @param p Parsed used for reading JSON content
     * @param ctxt Context that can be used to access information about
     *   this deserialization activity.
     *
     * @return Deserialized value
     */
    public abstract T deserialize(JsonParser p, DeserializationContext ctxt)
        throws IOException, JsonProcessingException;

    /**
     * Alternate deserialization method (compared to the most commonly
     * used, {@link #deserialize(JsonParser, DeserializationContext)}),
     * which takes in initialized value instance, to be
     * configured and/or populated by deserializer.
     * Method is not necessarily used (or supported) by all types
     * (it will not work for immutable types, for obvious reasons):
     * most commonly it is used for Collections and Maps.
     * It may be used both with "updating readers" (for POJOs) and
     * when Collections and Maps use "getter as setter".
     *

     * Default implementation just throws
     * {@link UnsupportedOperationException}, to indicate that types
     * that do not explicitly add support do not necessarily support
     * update-existing-value operation (esp. immutable types)
     */
    public T deserialize(JsonParser p, DeserializationContext ctxt,
            T intoValue)
        throws IOException, JsonProcessingException
    {
        throw new UnsupportedOperationException("Can not update object of type "
                +intoValue.getClass().getName()+" (by deserializer of type "+getClass().getName()+")");
    }

    /**
     * Deserialization called when type being deserialized is defined to
     * contain additional type identifier, to allow for correctly
     * instantiating correct subtype. This can be due to annotation on
     * type (or its supertype), or due to global settings without
     * annotations.
     *

     * Default implementation may work for some types, but ideally subclasses
     * should not rely on current default implementation.
     * Implementation is mostly provided to avoid compilation errors with older
     * code.
     *
     * @param typeDeserializer Deserializer to use for handling type information
     */
    public Object deserializeWithType(JsonParser p, DeserializationContext ctxt,
            TypeDeserializer typeDeserializer)
        throws IOException
    {
        // We could try calling
        return typeDeserializer.deserializeTypedFromAny(p, ctxt);
    }

    /*
    /**********************************************************
    /* Fluent factory methods for constructing decorated versions
    /**********************************************************
     */

    /**
     * Method that will return deserializer instance that is able
     * to handle "unwrapped" value instances
     * If no unwrapped instance can be constructed, will simply
     * return this object as-is.
     *

     * Default implementation just returns 'this'
     * indicating that no unwrapped variant exists
     */
    public JsonDeserializer<T> unwrappingDeserializer(NameTransformer unwrapper) {
        return this;
    }

    /**
     * Method that can be called to try to replace deserializer this deserializer
     * delegates calls to. If not supported (either this deserializer does not
     * delegate anything; or it does not want any changes), should either
     * throw {@link UnsupportedOperationException} (if operation does not
     * make sense or is not allowed); or return this deserializer as is.
     *
     * @since 2.1
     */
    public JsonDeserializer<?> replaceDelegatee(JsonDeserializer<?> delegatee) {
        throw new UnsupportedOperationException();
    }

    /*
    /**********************************************************
    /* Other accessors
    /**********************************************************
     */

    /**
     * Method for accessing type of values this deserializer produces.
     * Note that this information is not guaranteed to be exact -- it
     * may be a more generic (super-type) -- but it should not be
     * incorrect (return a non-related type).
     *

     * Default implementation will return null, which means almost same
     * same as returning Object.class would; that is, that
     * nothing is known about handled type.
     *

     * @since 2.3
     */
    public Class<?> handledType() { return null; }

    /**
     * Method that can be called to determine value to be used for
     * representing null values (values deserialized when JSON token
     * is {@link JsonToken#VALUE_NULL}). Usually this is simply
     * Java null, but for some types (especially primitives) it may be
     * necessary to use non-null values.
     *

     * Note that deserializers are allowed to call this just once and
     * then reuse returned value; that is, method is not guaranteed to
     * be called once for each conversion.
     *

     * Default implementation simply returns null.
     */
    public T getNullValue() { return null; }

    /**
     * Method called to determine value to be used for "empty" values
     * (most commonly when deserializing from empty JSON Strings).
     * Usually this is same as {@link #getNullValue} (which in turn
     * is usually simply Java null), but it can be overridden
     * for types. Or, if type should never be converted from empty
     * String, method can also throw an exception.
     *

     * Default implementation simple calls {@link #getNullValue} and
     * returns value.
     */
    public T getEmptyValue() { return getNullValue(); }

    /**
     * Method that will
     * either return null to indicate that type being deserializers
     * has no concept of properties; or a collection of identifiers
     * for which toString will give external property
     * name.
     * This is only to be used for error reporting and diagnostics
     * purposes (most commonly, to accompany "unknown property"
     * exception).
     *
     * @since 2.0
     */
    public Collection<Object> getKnownPropertyNames() {
        return null;
    }

    /**
     * Method called to see if deserializer instance is cachable and
     * usable for other properties of same type (type for which instance
     * was created).
     *

     * Note that cached instances are still resolved on per-property basis,
     * if instance implements {@link com.fasterxml.jackson.databind.deser.ResolvableDeserializer}:
     * cached instance is just as the base. This means that in most cases it is safe to
     * cache instances; however, it only makes sense to cache instances
     * if instantiation is expensive, or if instances are heavy-weight.
     *

     * Default implementation returns false, to indicate that no caching
     * is done.
     */
    public boolean isCachable() { return false; }

    /**
     * Accessor that can be used to check whether this deserializer
     * is expecting to possibly get an Object Identifier value instead of full value
     * serialization, and if so, should be able to resolve it to actual
     * Object instance to return as deserialized value.
     *

     * Default implementation returns null, as support can not be implemented
     * generically. Some standard deserializers (most notably
     * {@link com.fasterxml.jackson.databind.deser.BeanDeserializer})
     * do implement this feature, and may return reader instance, depending on exact
     * configuration of instance (which is based on type, and referring property).
     *
     * @return ObjectIdReader used for resolving possible Object Identifier
     *    value, instead of full value serialization, if deserializer can do that;
     *    null if no Object Id is expected.
     *
     * @since 2.0
     */
    public ObjectIdReader getObjectIdReader() { return null; }

    /**
     * Accessor that can be used to determine if this deserializer uses
     * another deserializer for actual deserialization, by delegating
     * calls. If so, will return immediate delegate (which itself may
     * delegate to further deserializers); otherwise will return null.
     *
     * @return Deserializer this deserializer delegates calls to, if null;
     *   null otherwise.
     *
     * @since 2.1
     */
    public JsonDeserializer<?> getDelegatee() {
        return null;
    }

    /**
     * Method needed by {@link BeanDeserializerFactory} to properly link
     * managed- and back-reference pairs.
     *
     * @since 2.2 (was moved out of BeanDeserializerBase)
     */
    public SettableBeanProperty findBackReference(String refName)
    {
        throw new IllegalArgumentException("Can not handle managed/back reference '"+refName
                +"': type: value deserializer of type "+getClass().getName()+" does not support them");
    }

    /*
    /**********************************************************
    /* Helper classes
    /**********************************************************
     */

    /**
     * This marker class is only to be used with annotations, to
     * indicate that no deserializer is configured.
     *

     * Specifically, this class is to be used as the marker for
     * annotation {@link com.fasterxml.jackson.databind.annotation.JsonDeserialize}
     */
    public abstract static class None extends JsonDeserializer<Object> {
        private None() { } // not to be instantiated
    }
}


text:
module MechaJulia
import Requests
import JSON

const auth_token = readall("../src/token")
const METADATA   = "IainNZ/METADATA.jl"

const MECHAJULIA_HEAD = """
*This is an automatic message from [MechaJulia](https://github.com/MechaJulia/MechaJulia),
a Julia bot that aims to help maintain Julia and its package ecosystem. If you think there
is something wrong with this message, or have ideas for a new feature, please
[file an issue](https://github.com/MechaJulia/MechaJulia/issues/new)*

---
"""

const MSG_VER000 = """
* It looks like you are adding a version 0.0.0, but this is discouraged.
  Consider tagging a "real" first version like 0.0.1 or, if you feel the
  package is not ready, encourage testers to obtain it with `Pkg.clone`"""

function is_there_ver000(file_list)
    """
    Given a list of files parsed from the JSON response from
      GET /repos/:owner/:repo/pulls/:number/files
      https://developer.github.com/v3/pulls/#list-pull-requests-files
    look for a new 0.0.0 version being added (which is discouraged).
    """
    for file in file_list
        # Only look at added files, anything else probably is either
        # tidy up or a fix to a wrong SHA
        file["status"] != "added" && continue

        if contains(file["filename"], "versions/0.0.0")
            return true
        end
    end
    return false
end

function does_require_match(file_list)
    """
    Given a list of files parsed from the JSON response from
      GET /repos/:owner/:repo/pulls/:number/files
      https://developer.github.com/v3/pulls/#list-pull-requests-files
    look for `requires` files, and cross-reference them with the REQUIRE
    file in the package itself
    """
    for file in file_list
        file["status"] == "deleted" && continue
        !contains(file["filename"])

function check_pr_ok()
    # Pull all pull requests
    # GET /repos/:owner/:repo/pulls
    # https://developer.github.com/v3/pulls/#list-pull-requests
    url = "https://api.github.com/repos/$METADATA/pulls?access_token=$(auth_token)"
    raw = Requests.get(url; json = {"sort" => "updated"})
    prs = raw.data |> JSON.parse

    # Walk through them all looking for things to comment on that we haven't already
    for pr in prs
        println(pr["title"])
        println(pr["number"])
        println(pr["_links"]["issue"]["href"])

        message = MECHAJULIA_HEAD

        # Look at files being committed
        number = int(pr["number"])
        url    = "https://api.github.com/repos/$METADATA/pulls/$number/files?access_token=$(auth_token)"
        raw    = Requests.get(url)
        files  = raw.data |> JSON.parse
        if is_there_ver000(files)
            message *= MSG_VER000
        end

        println(message)
    end
end

end


text:
import datetime, json

from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.serializers.json import DjangoJSONEncoder
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.views.generic.base import TemplateResponseMixin, View
from django.views.generic.list import BaseListView
from django.views.generic.edit import BaseDeleteView, FormMixin

from braces.views import JSONResponseMixin

class DownloadMixin(object):
    """
    Simple Mixin to send a downloadable content

    Inherits must have :

    * Filled the ``self.content_type`` attribute with the content content_type to send;
    * Implementation of ``get_filename()`` that return the filename to use in response
      headers;
    * Implementation of ``get_content()`` that return the content to send as downloadable.

    If the content is a not a string, it is assumed to be a fileobject to send as
    the content with its ``read()`` method.

    Optionnaly implement a ``close_content()`` to close specifics objects linked to
    content fileobject, if it does not exists a try will be made on a close() method
    on the content fileobject;

    A "get_filename_timestamp" method is implemented to return a timestamp to use in your
    filename if needed, his date format is defined in "timestamp_format" attribute (in a
    suitable way to use with strftime on a datetime object).
    """
    content_type = None
    timestamp_format = "%Y-%m-%d"

    def get_filename_timestamp(self):
        return datetime.datetime.now().strftime(self.timestamp_format)

    def get_filename(self, context):
        raise ImproperlyConfigured("DownloadMixin requires an implementation of 'get_filename()' to return the filename to use in headers")

    def get_content(self, context):
        raise ImproperlyConfigured("DownloadMixin requires an implementation of 'get_content()' to return the downloadable content")

    def render_to_response(self, context, **response_kwargs):
        if getattr(self, 'content_type', None) is None:
            raise ImproperlyConfigured("DownloadMixin requires a definition of 'content_type' attribute")
        # Needed headers
        response = HttpResponse(content_type=self.content_type, **response_kwargs)
        response['Content-Disposition'] = 'attachment; filename={0}'.format(self.get_filename(context))
        # Read the content file object or string, append it to response and close it
        content = self.get_content(context)
        if isinstance(content, basestring):
            response.write(content)
        else:
            response.write(content.read())
        # Conditionnal closing content object
        if hasattr(self, 'close_content'):
            self.close_content(context, content)
        elif hasattr(content, 'close'):
            content.close()

        return response

    def get_context_data(self, **kwargs):
        return {
            'params': kwargs
        }

    def get(self, request, *args, **kwargs):
        context = self.get_context_data(**kwargs)
        return self.render_to_response(context)

class ExtendTemplateVariableMixin(object):
    """
    Get the extend variable to use in the template

    Default behaviour is to switch on two templates depending on the request is an ajax
    request or not, if ajax "base_modal.html" is used else the default extend will
    simply be "base.html".

    This only put the "template_extend" variable in the template context, your template
    have to use it, this does not modify itself the response nor the template.
    """
    default_extend_template = "base.html"
    modal_extend_template = "base_modal.html"

    def get_template_extend(self):
        if self.request.is_ajax():
            return self.modal_extend_template
        return self.default_extend_template

    def get_context_data(self, **kwargs):
        context = super(ExtendTemplateVariableMixin, self).get_context_data(**kwargs)
        context.update({
            'template_extend': self.get_template_extend(),
        })
        return context

class SimpleListView(TemplateResponseMixin, BaseListView):
    """
    Like generic.ListView but use only ``get_template`` to find template and not an
    automatic process on ``get_template_names``
    """
    pass

class DirectDeleteView(BaseDeleteView):
    """
    To directly delete an object without template rendering on GET or POST methods

    "get_success_url" or "success_url" should be correctly filled
    """
    memoize_old_object = False
    _memoized_attr = ['id', 'slug', 'title'] # memoized attributes if exists
    old_object = {} # where the attributes will be putted

    def get(self, *args, **kwargs):
        if self.memoize_old_object:
            self.memoize_object()
        return self.delete(*args, **kwargs)

    def memoize_object(self, *args, **kwargs):
        old = self.get_object()
        for item in self._memoized_attr:
            self.old_object[item] = getattr(old, item, None)

class ListAppendView(SimpleListView, FormMixin):
    """
    A view to display an object list with a form to append a new object

    This view re-use some code from FormMixin and SimpleListView, sadly it seem not
    possible to simply mix them.

    Need "model" and "form_class" attributes for the form parts and the required one
    by BaseListView. "get_success_url" method should be filled too.

    "locked_form" is used to disable form (like if your list object is closed to new
    object)
    """
    model = None
    form_class = None
    template_name = None
    paginate_by = None
    locked_form = False

    def form_valid(self, form):
        self.object = form.save()
        return super(ListAppendView, self).form_valid(form)

    def form_invalid(self, form):
        return self.render_to_response(self.get_context_data(object_list=self.object_list, form=form))

    def is_locked_form(self):
        return self.locked_form

    def get_form(self, form_class):
        """
        Returns an instance of the form to be used in this view.
        """
        if self.is_locked_form():
            return None
        return form_class(**self.get_form_kwargs())

    def get(self, request, *args, **kwargs):
        self.object_list = self.get_queryset()

        form_class = self.get_form_class()
        form = self.get_form(form_class)

        allow_empty = self.get_allow_empty()
        if not allow_empty and len(self.object_list) == 0:
            raise Http404(_(u"Empty list and '%(class_name)s.allow_empty' is False.")
                          % {'class_name': self.__class__.__name__})

        context = self.get_context_data(object_list=self.object_list, form=form)
        return self.render_to_response(context)

    def post(self, request, *args, **kwargs):
        self.object_list = self.get_queryset()

        form_class = self.get_form_class()
        form = self.get_form(form_class)

        allow_empty = self.get_allow_empty()
        if not allow_empty and len(self.object_list) == 0:
            raise Http404(_(u"Empty list and '%(class_name)s.allow_empty' is False.")
                          % {'class_name': self.__class__.__name__})

        if form and form.is_valid():
            return self.form_valid(form)
        elif form:
            return self.form_invalid(form)
        else:
            context = self.get_context_data(object_list=self.object_list, form=form)
            return self.render_to_response(context)

    def put(self, *args, **kwargs):
        return self.post(*args, **kwargs)

class DetailListAppendView(ListAppendView):
    """
    A view to display a parent object details, list his "children" and display a form
    to append a new child

    Have the same behaviours than "ListAppendView" but get the parent object before
    doing anything.

    "model" and "form_class" attribute are for the children, "context_parent_object_name"
    is used to name the parent variable in the template context.

    "get_parent_object" must be defined to return the parent instance and also "get_queryset"
    to filter queryset only for the children of the parent.

    The parent object is also given to the append form, under the name defined with the
    "context_parent_object_name" attribute. Your Form should be aware of this.
    """
    context_parent_object_name = 'parent_object'

    def get_parent_object(self):
        raise ImproperlyConfigured(u"%(cls)s's 'get_parent_object' method must be defined " % {"cls": self.__class__.__name__})

    def get_context_data(self, **kwargs):
        kwargs.update({
            self.context_parent_object_name: self.parent_object,
        })
        return super(DetailListAppendView, self).get_context_data(**kwargs)

    def get_form_kwargs(self):
        """
        Returns an instance of the form to be used in this view.
        """
        kwargs = super(DetailListAppendView, self).get_form_kwargs()
        kwargs.update({
            self.context_parent_object_name: self.parent_object,
        })
        return kwargs

    def get(self, request, *args, **kwargs):
        self.parent_object = self.get_parent_object()
        return super(DetailListAppendView, self).get(request, *args, **kwargs)

    def post(self, request, *args, **kwargs):
        self.parent_object = self.get_parent_object()
        return super(DetailListAppendView, self).post(request, *args, **kwargs)

class JSONResponseExtendedMixin(JSONResponseMixin):
    """
    Simple Mixin to compile the context view as JSON

    This does not implement a direct response, you have to return it with the
    ``json_to_response`` method in your view.
    """
    json_indent = None
    json_encoder = DjangoJSONEncoder
    json_ensure_ascii = False

    def encode_context(self, context):
        json_kwargs = {}
        if self.json_indent is not None:
            json_kwargs['indent'] = self.json_indent
        if self.json_encoder is not None:
            json_kwargs['encoder'] = self.json_encoder
        if self.json_ensure_ascii is not None:
            json_kwargs['ensure_ascii'] = self.json_ensure_ascii
        return json.dumps(context, **json_kwargs)

    def render_json_response(self, context_dict, **response_kwargs):
        """
        Limited serialization for shipping plain data. Do not use for models
        or other complex or custom objects.
        """
        if 'content_type' not in response_kwargs:
            response_kwargs['content_type'] = self.get_content_type()
        return HttpResponse(self.encode_context(context), **response_kwargs)

class JSONResponseViewMixin(JSONResponseExtendedMixin):
    """Mixin to directly return a JSON response"""
    def render_to_response(self, context, **response_kwargs):
        """
        Returns a response with a template rendered with the given context.
        """
        return self.json_to_response(context)


text:
import { runTemplateTests, runInstanceTests } from '../../test.utils';
import { UnitTypes } from 'cd-metadata/units';
import * as cd from 'cd-interfaces';

const internalTemplate = `
  <ng-container
    ><div
      *ngIf="!props?.inputs?.matRipple"
      [class.cd-render-rect-marker]="!instanceId"
      class="cd-rendered-element cd-fit-content cd-generic-div"
      [attr.data-id]="elementId"
      [attr.data-full-id-path]="elementId | fullIdPathPipe : ancestors"
      [cdStyle]="styleMap[elementId]"
      [classPrefix]="elementClassPrefix"
      [class.cd-preview-styles]="props?.showPreviewStyles"
      [cdHidden]="props?.inputs?.hidden | dataBindingLookupPipe:dataBindingRefreshTrigger | coerceBooleanPipe"
      [cdCoTooltip]="props?.inputs?.tooltipLabel"
      [cdCoTooltipPosition]="props?.inputs?.tooltipPosition"
      [cdAttrs]="props?.attrs"
      [cdA11yAttrs]="props?.a11yInputs"
    >
      <ng-container
        *ngIf="props?.childIds; let childIds"
        [ngTemplateOutlet]="children"
        [ngTemplateOutletContext]="{ $implicit:childIds }"
      ></ng-container>
    </div>
    <div
      matRipple
      *ngIf="props?.inputs?.matRipple"
      [class.cd-render-rect-marker]="!instanceId"
      class="cd-rendered-element cd-fit-content cd-generic-div"
      [attr.data-id]="elementId"
      [attr.data-full-id-path]="elementId | fullIdPathPipe : ancestors"
      [cdStyle]="styleMap[elementId]"
      [classPrefix]="elementClassPrefix"
      [class.cd-preview-styles]="props?.showPreviewStyles"
      [cdHidden]="props?.inputs?.hidden | dataBindingLookupPipe:dataBindingRefreshTrigger | coerceBooleanPipe"
      [cdCoTooltip]="props?.inputs?.tooltipLabel"
      [cdCoTooltipPosition]="props?.inputs?.tooltipPosition"
      [cdAttrs]="props?.attrs"
      [cdA11yAttrs]="props?.a11yInputs"
      [matRippleCentered]="props?.inputs?.matRippleCentered"
    >
      <ng-container
        *ngIf="props?.childIds; let childIds"
        [ngTemplateOutlet]="children"
        [ngTemplateOutletContext]="{ $implicit:childIds }"
      ></ng-container></div
  ></ng-container>
`;

const simpleTemplate = `<div class="element__test-id"></div>`;

runTemplateTests(cd.ElementEntitySubType.Generic, internalTemplate, simpleTemplate);

runInstanceTests(cd.ElementEntitySubType.Generic, {
  name: 'Element',
  elementType: cd.ElementEntitySubType.Generic,
  styles: {
    base: {
      style: {
        width: { value: 100, units: UnitTypes.Pixels },
        height: { value: 100, units: UnitTypes.Pixels },
        background: [{ value: '#EEEEEE' }],
        display: cd.Display.Block,
        overflow: { x: cd.Overflow.Hidden, y: cd.Overflow.Hidden },
      },
    },
  },
  inputs: { matRipple: false } as cd.IGenericInputs,
});


text:
var open = $('#menuOpen');
var close = $('#menuClose');

close.hide();

open.on('click | touchend', function(){
    $('.nav-ul').addClass('nav-open');
    open.hide();
    close.show();
});

close.on('click | touchend', function(){
    $('.nav-ul').removeClass('nav-open');
    close.hide();
    open.show();
})


text:
package com.asakusafw.shafu.internal.ui.preferences;

import java.io.File;
import java.net.URI;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;

/**
 * Preferences constants for Shafu UI.
 * @since 0.1.0
 * @version 0.7.0
 */
public final class ShafuPreferenceConstants {

    private ShafuPreferenceConstants() {
        return;
    }

    /**
     * The log level property key.
     */
    public static final String KEY_LOG_LEVEL = "logLevel"; //$NON-NLS-1$

    /**
     * The stack trace property key.
     */
    public static final String KEY_STACK_TRACE = "stackTrace"; //$NON-NLS-1$

    /**
     * The network mode property key.
     */
    public static final String KEY_NETWORK_MODE = "networkMode"; //$NON-NLS-1$

    /**
     * The project properties property key.
     */
    public static final String KEY_PROJECT_PROPERTIES = "projectProperties"; //$NON-NLS-1$

    /**
     * The system properties property key.
     */
    public static final String KEY_SYSTEM_PROPERTIES = "systemProperties"; //$NON-NLS-1$

    /**
     * The environment variables key.
     * @since 0.5.2
     */
    public static final String KEY_ENVIRONMENT_VARIABLES = "environmentVariables"; //$NON-NLS-1$

    /**
     * The Gradle user home property key.
     */
    public static final String KEY_GRADLE_USER_HOME = "gradleUserHome"; //$NON-NLS-1$

    /**
     * The Java home property key.
     */
    public static final String KEY_JAVA_HOME = "javaHome"; //$NON-NLS-1$

    /**
     * The property key whether or not detect Java home from project runtime environment.
     * @since 0.7.0
     */
    public static final String KEY_USE_PROJECT_JAVA_HOME = "useProjectJavaHome"; //$NON-NLS-1$

    /**
     * The Gradle distribution property key.
     */
    public static final String KEY_GRADLE_VERSION = "gradleVersion"; //$NON-NLS-1$

    /**
     * The property key whether use HTTPS on downloading Gradle distributions.
     * @since 0.3.1
     */
    public static final String KEY_USE_HTTPS = "useHttps"; //$NON-NLS-1$

    /**
     * The property key whether or not use Gradle wrapper configuration for detecting distribution URL.
     * @since 0.7.0
     */
    public static final String KEY_USE_WRAPPER_CONFIGURATION = "useWrapperConf"; //$NON-NLS-1$

    /**
     * The Gradle wrapper configuration paths (separated by comma) property key.
     * This property will be activated only if {@link #KEY_USE_WRAPPER_CONFIGURATION} is enabled.
     * @since 0.7.0
     * @see #KEY_USE_WRAPPER_CONFIGURATION
     */
    public static final String KEY_WRAPPER_CONFIGURATION_PATHS = "wrapperConfPaths"; //$NON-NLS-1$

    /**
     * The Gradle distribution property key.
     */
    public static final String KEY_GRADLE_DISTRIBUTION = "gradleDistribution"; //$NON-NLS-1$

    /**
     * The log level default value.
     */
    public static final GradleLogLevel DEFAULT_LOG_LEVEL = GradleLogLevel.LIFECYCLE;

    /**
     * The stack trace default value.
     */
    public static final GradleStackTrace DEFAULT_STACK_TRACE = GradleStackTrace.NEVER;

    /**
     * The network mode default value.
     */
    public static final GradleNetworkMode DEFAULT_NETWORK_MODE = GradleNetworkMode.ONLINE;

    /**
     * The project properties default value.
     */
    public static final Map<String, String> DEFAULT_PROJECT_PROPERTIES = Collections.emptyMap();

    /**
     * The system properties default value.
     */
    public static final Map<String, String> DEFAULT_SYSTEM_PROPERTIES =
            Collections.singletonMap("file.encoding", "UTF-8"); //$NON-NLS-1$ //$NON-NLS-2$

    /**
     * The Gradle user home default value.
     */
    public static final File DEFAULT_GRADLE_USER_HOME = null;

    /**
     * The Java home default value.
     */
    public static final File DEFAULT_JAVA_HOME = null;

    /**
     * The default value of {@link #KEY_USE_PROJECT_JAVA_HOME}.
     * @since 0.7.0
     */
    public static final boolean DEFAULT_USE_PROJECT_JAVA_HOME = true;

    /**
     * The Gradle version default value ({@value}).
     * @since 0.2.7
     */
    public static final String DEFAULT_GRADLE_VERSION = "4.3.1"; //$NON-NLS-1$

    /**
     * The default value of {@link #KEY_USE_HTTPS}.
     *
     * NOTE: Shafu changed the default value since 0.5.1 -
     * Insecure location returns 301, but Gradle tooling API does not follow to the moved location.
     *
     * @since 0.3.1
     */
    public static final boolean DEFAULT_USE_HTTPS = true;

    /**
     * The default value of {@link #KEY_USE_WRAPPER_CONFIGURATION}.
     * @since 0.7.0
     */
    public static final boolean DEFAULT_USE_WRAPPER_CONFIGURATION = true;

    /**
     * The default value of {@link #KEY_WRAPPER_CONFIGURATION_PATHS}.
     * The Gradle wrapper configuration paths (separated by comma) property key.
     * This property will be activated only if {@link #KEY_USE_WRAPPER_CONFIGURATION} is enabled.
     * @since 0.7.0
     * @see #KEY_USE_WRAPPER_CONFIGURATION
     */
    public static final List<String> DEFAULT_WRAPPER_CONFIGURATION_PATHS = Collections.unmodifiableList(Arrays.asList(
            ".buildtools/gradlew.properties", //$NON-NLS-1$
            "gradle/wrapper/gradle-wrapper.properties")); //$NON-NLS-1$

    /**
     * The Gradle distribution default value.
     * @since 0.2.7
     */
    public static final URI DEFAULT_GRADLE_DISTRIBUTION = null;
}


text:
/*!
 * Author : Matteo Bruni
 * MIT license: https://opensource.org/licenses/MIT
 * Demo / Generator : https://particles.js.org/
 * GitHub : https://www.github.com/matteobruni/tsparticles
 * How to use? : Check the GitHub README
 * v1.42.2
 */
(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("tsparticles"));
	else if(typeof define === 'function' && define.amd)
		define(["tsparticles"], factory);
	else {
		var a = typeof exports === 'object' ? factory(require("tsparticles")) : factory(root["window"]);
		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
	}
})(this, function(__WEBPACK_EXTERNAL_MODULE__764__) {
return /******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ 764:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__764__;

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/************************************************************************/
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	!function() {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = function(exports) {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	}();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
!function() {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXTERNAL MODULE: external {"commonjs":"tsparticles","commonjs2":"tsparticles","amd":"tsparticles","root":"window"}
var external_commonjs_tsparticles_commonjs2_tsparticles_amd_tsparticles_root_window_ = __webpack_require__(764);
;// CONCATENATED MODULE: ./dist/MultilineTextDrawer.js
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function (resolve) {
      resolve(value);
    });
  }

  return new (P || (P = Promise))(function (resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }

    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }

    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }

    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
};

class MultilineTextDrawer {
  init(container) {
    return __awaiter(this, void 0, void 0, function* () {
      const options = container.options;
      const shapeType = "multiline-text";

      if ((0,external_commonjs_tsparticles_commonjs2_tsparticles_amd_tsparticles_root_window_.isInArray)(shapeType, options.particles.shape.type)) {
        const shapeOptions = options.particles.shape.options[shapeType];

        if (shapeOptions instanceof Array) {
          for (const character of shapeOptions) {
            yield (0,external_commonjs_tsparticles_commonjs2_tsparticles_amd_tsparticles_root_window_.loadFont)(character);
          }
        } else {
          if (shapeOptions !== undefined) {
            yield (0,external_commonjs_tsparticles_commonjs2_tsparticles_amd_tsparticles_root_window_.loadFont)(shapeOptions);
          }
        }
      }
    });
  }

  draw(context, particle, radius) {
    const character = particle.shapeData;

    if (character === undefined) {
      return;
    }

    const textData = character.value;

    if (textData === undefined) {
      return;
    }

    const textParticle = particle;

    if (textParticle.text === undefined) {
      textParticle.text = textData instanceof Array ? (0,external_commonjs_tsparticles_commonjs2_tsparticles_amd_tsparticles_root_window_.itemFromArray)(textData, particle.randomIndexData) : textData;
    }

    const text = textParticle.text;
    const style = character.style;
    const weight = character.weight;
    const size = Math.round(radius) * 2;
    const font = character.font;
    const fill = particle.fill;
    context.font = `${style} ${weight} ${size}px "${font}"`;

    if (fill) {
      text === null || text === void 0 ? void 0 : text.split("\n").forEach((line, index) => {
        const offsetX = line.length * radius / 2;
        const pos = {
          x: -offsetX,
          y: radius / 2
        };
        context.fillText(line, pos.x, pos.y + radius * 2 * index);
      });
    } else {
      text === null || text === void 0 ? void 0 : text.split("\n").forEach((line, index) => {
        const offsetX = line.length * radius / 2;
        const pos = {
          x: -offsetX,
          y: radius / 2
        };
        context.strokeText(line, pos.x, pos.y + radius * 2 * index);
      });
    }
  }

}
;// CONCATENATED MODULE: ./dist/shape.js

function loadMultilineTextShape(engine) {
  engine.addShape("multiline-text", new MultilineTextDrawer());
}
;// CONCATENATED MODULE: ./dist/index.js

loadMultilineTextShape(external_commonjs_tsparticles_commonjs2_tsparticles_amd_tsparticles_root_window_.tsParticles);
}();
/******/ 	return __webpack_exports__;
/******/ })()
;
});


text:
cask "app-cleaner" do
  version "7.2,806"
  sha256 :no_check

  url "https://nektony.com/download/app-cleaner-uninstaller/app-cleaner-uninstaller.dmg"
  appcast "https://nektony.com/pro-support/app-cleaner/update/update.xml"
  name "Nektony App Cleaner & Uninstaller"
  homepage "https://nektony.com/mac-app-cleaner"

  app "App Cleaner #{version.major}.app"

  zap trash: [
    "~/Library/Application Scripts/com.nektony.App-Cleaner-Pro",
    "~/Library/Application Support/com.nektony.App-Cleaner-Pro",
    "~/Library/Caches/com.nektony.App-Cleaner-Pro",
    "~/Library/Containers/com.nektony.StartupDiskFull",
    "~/Library/Preferences/com.nektony.App-Cleaner-Pro.plist",
    "~/Library/Saved Application State/com.nektony.App-Cleaner-Pro.savedState",
  ]
end


text:
#ifndef QCONF_SCRIPT_H
#define QCONF_SCRIPT_H

#include <string>

/**
 * Init qconf directory of script
 */
void qconf_init_script_dir(const std::string &agent_dir);

/**
 * Create custome qconf init json file path
 * by BaymaxBai
 */
void qconf_create_init_json_path(const std::string &agent_dir);

/**
 * Remove expired init json
 * by BaymaxBai
 */
int qconf_remove_init_json();

/**
 * Get script content by given node path
 */
int find_script(const std::string &path, std::string &script);

/**
* Execute qconf init script within given zookeeper register ip
* by BaymaxBai
*/
int execute_init_script(const std::string &script,const std::string &zkip);

/**
 * Execute script content within given timeout
 */
int execute_script(const std::string &script, const long mtimeout);

#endif


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

  <title>Arduino Reference - EthernetServer </title>
  <link rel="shortcut icon" type="image/x-icon" href="http://arduino.cc/en/favicon.png">
  <link rel='stylesheet' href='arduinoWideRender.css'
type='text/css' />
      <meta name='robots' content='index,follow' />

  <meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />

Arduino

Buy
Download
Getting Started
Learning
Reference
Hardware
FAQ

Reference    Language | Libraries | Comparison | Changes

Ethernet : EthernetServer

EthernetServer()

Description

Create a server that listens for incoming connections on the specified port.

Syntax

Server(port);

Parameters

port: the port to listen on (int)

Returns

None

Example

#include <SPI.h>

#include <Ethernet.h>

// network configuration.  gateway and subnet are optional.

 // the media access control (ethernet hardware) address for the shield:

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

//the IP address for the shield:

byte ip[] = { 10, 0, 0, 177 };

// the router's gateway address:

byte gateway[] = { 10, 0, 0, 1 };

// the subnet:

byte subnet[] = { 255, 255, 0, 0 };

// telnet defaults to port 23

EthernetServer server = EthernetServer(23);

void setup()

{

  // initialize the ethernet device

  Ethernet.begin(mac, ip, gateway, subnet);

  // start listening for clients

  server.begin();

}

void loop()

{

  // if an incoming client connects, there will be bytes available to read:

  EthernetClient client = server.available();

  if (client == true) {

    // read bytes from the incoming client and write them back

    // to any clients connected to the server:

    server.write(client.read());

  }

}

[Get Code]

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a
Creative Commons Attribution-ShareAlike 3.0 License.  Code samples in the reference are released into the public domain.

©Arduino |
  Edit Page | Page History | Printable View | All Recent Site Changes


text:
using System;
using NUnit.Framework;
using Rothko.UI.Model;

namespace Rothko.Tests.UI.Model
{
	[TestFixture]
	public class UIMapTests
	{
		UIMap _UIMap;

		[SetUp]
		public void SetUp()
		{
			_UIMap = new UIMap();
		}

		[Test]
		public void ChangingUIScrollXShouldFireEvent()
		{
			_UIMap.UIScrollChanged += (sender, e) => Assert.Pass();

			_UIMap.UIScrollX = 2;

			Assert.Fail();
		}

		[Test]
		public void ChangingUIScrollYShouldFireEvent()
		{
			_UIMap.UIScrollChanged += (sender, e) => Assert.Pass();

			_UIMap.UIScrollY = 2;

			Assert.Fail();
		}

		[Test]
		public void ChangingUIScrollXWhenValueRemainsSameShouldNotFireEvent()
		{
			_UIMap.UIScrollChanged += (sender, e) => Assert.Fail();

			_UIMap.UIScrollX = _UIMap.UIScrollX;

			Assert.Pass ();
		}

		[Test]
		public void ChangingUIScrollYWhenValueRemainsSameShouldNotFireEvent()
		{
			_UIMap.UIScrollChanged += (sender, e) => Assert.Fail();

			_UIMap.UIScrollY = _UIMap.UIScrollY;

			Assert.Pass ();
		}
	}
}


text:
"""
Example DAG using GoogleCloudStorageToGoogleDriveOperator.
"""
import os

from airflow import models
from airflow.providers.google.suite.transfers.gcs_to_gdrive import GCSToGoogleDriveOperator
from airflow.utils.dates import days_ago

GCS_TO_GDRIVE_BUCKET = os.environ.get("GCS_TO_DRIVE_BUCKET", "example-object")

with models.DAG(
    "example_gcs_to_gdrive",
    schedule_interval=None,  # Override to match your needs,
    start_date=days_ago(1),
    tags=['example'],
) as dag:
    # [START howto_operator_gcs_to_gdrive_copy_single_file]
    copy_single_file = GCSToGoogleDriveOperator(
        task_id="copy_single_file",
        source_bucket=GCS_TO_GDRIVE_BUCKET,
        source_object="sales/january.avro",
        destination_object="copied_sales/january-backup.avro",
    )
    # [END howto_operator_gcs_to_gdrive_copy_single_file]
    # [START howto_operator_gcs_to_gdrive_copy_files]
    copy_files = GCSToGoogleDriveOperator(
        task_id="copy_files",
        source_bucket=GCS_TO_GDRIVE_BUCKET,
        source_object="sales/*",
        destination_object="copied_sales/",
    )
    # [END howto_operator_gcs_to_gdrive_copy_files]
    # [START howto_operator_gcs_to_gdrive_move_files]
    move_files = GCSToGoogleDriveOperator(
        task_id="move_files",
        source_bucket=GCS_TO_GDRIVE_BUCKET,
        source_object="sales/*.avro",
        move_object=True,
    )
    # [END howto_operator_gcs_to_gdrive_move_files]


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- invalid - bad ttp:frameRateMultiplier value - extra integer -->
<tt xml:lang="" xmlns="http://www.w3.org/ns/ttml"
    xmlns:ttp="http://www.w3.org/ns/ttml#parameter" ttp:profile="dfxp-transformation" ttp:frameRateMultiplier="1 2 3"
    xmlns:ttva="http://skynav.com/ns/ttv/annotations" ttva:warnOn="all" ttva:expectedErrors="2" ttva:expectedWarnings="0" ttva:model="ttml1">
  <head/>
  <body/>
</tt>


text:
require "ob_serv/version"
module ObServ
  module DSL
    def subscribe(event, options = {})
      options[:on] = event unless options.include?(:on)
      return ObServ.register self, event, options, &Proc.new if block_given?
      ObServ.register self, event, options
    end

    def publish(event, *args)
      # ObServ.publish event, *args
      ObServ.config[:publish].call(event, *args)
    end
  end

  module_function
  attr_accessor :notifies

  def config
    @config ||= {
      publish: ObServ.method(:publish)
    }
  end

  def register(obj, event, options = {})
    @notifies ||= {}
    block = block_given? ? Proc.new : nil
    @notifies[event] ||= {}
    @notifies[event][obj.__id__] = [obj, options, block]
  end

  def publish(event, *args)
    @notifies[event]&.each do |_, (obj, opts, blk)|
      next blk.call(*args) if blk
      m = opts[:on]
      if obj.respond_to?(m) && obj.respond_to?(:name) && obj.to_s == obj.name
        next obj.send m, *args if obj.respond_to? m
      end
      obj.send m, *args if obj.respond_to? m
    end
  end
end


text:
module Azure::Logic::Mgmt::V2016_06_01
  module Models
    #
    # The assembly definition.
    #
    class AssemblyDefinition < Resource

      include MsRestAzure

      # @return [AssemblyProperties] The assembly properties.
      attr_accessor :properties

      #
      # Mapper for AssemblyDefinition class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'AssemblyDefinition',
          type: {
            name: 'Composite',
            class_name: 'AssemblyDefinition',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              location: {
                client_side_validation: true,
                required: false,
                serialized_name: 'location',
                type: {
                  name: 'String'
                }
              },
              tags: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tags',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              properties: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties',
                type: {
                  name: 'Composite',
                  class_name: 'AssemblyProperties'
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
package com.roche.sequencing.bioinformatics.common.stringsequence;

public interface ILetter {
	int getScore();

	boolean matches(ILetter rhs);
}


text:
<?php
namespace Bee\Context;

use Exception;

/**
 * Enter description here...
 *
 * @author Michael Plomer <michael.plomer@iter8.de>
 * @author Benjamin Hartmann
 */
class BeanCurrentlyInCreationException extends BeansException {

	const EXCEPTION_MESSAGE = 'Bean with name %s is currently being created.';

	private $name;

	/**
	 * Enter description here...
	 *
	 * @param String $name
	 * @param Exception $cause
	 * @return BeanCurrentlyInCreationException
	 */
	public function __construct($name, Exception $cause = null) {
        parent::__construct(sprintf(self::EXCEPTION_MESSAGE, $name), $cause);
		$this->name = $name;
	}

	/**
	 * Enter description here...
	 *
	 * @return String
	 */
	public function getBeanName() {
		return $this->name;
	}
}