text:
from __future__ import absolute_import, print_function

import base64
import logging
import six
import traceback

from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from django.core.cache import cache
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect, HttpResponseNotAllowed
from django.utils.encoding import force_bytes
from django.views.decorators.cache import never_cache, cache_control
from django.views.decorators.csrf import csrf_exempt
from django.views.generic.base import View as BaseView
from functools import wraps
from raven.contrib.django.models import client as Raven

from sentry import quotas, tsdb
from sentry.coreapi import (
    APIError, APIForbidden, APIRateLimited, ClientApiHelper, CspApiHelper, LazyData
)
from sentry.models import Project, OrganizationOption, Organization
from sentry.signals import (event_accepted, event_dropped, event_filtered, event_received)
from sentry.quotas.base import RateLimit
from sentry.utils import json, metrics
from sentry.utils.data_scrubber import SensitiveDataFilter
from sentry.utils.http import (
    is_valid_origin,
    get_origins,
    is_same_domain,
)
from sentry.utils.safe import safe_execute
from sentry.web.helpers import render_to_response

logger = logging.getLogger('sentry')

# Transparent 1x1 gif
# See http://probablyprogramming.com/2009/03/15/the-tiniest-gif-ever
PIXEL = base64.b64decode('R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=')

PROTOCOL_VERSIONS = frozenset(('2.0', '3', '4', '5', '6', '7'))

def api(func):
    @wraps(func)
    def wrapped(request, *args, **kwargs):
        data = func(request, *args, **kwargs)
        if request.is_ajax():
            response = HttpResponse(data)
            response['Content-Type'] = 'application/json'
        else:
            ref = request.META.get('HTTP_REFERER')
            if ref is None or not is_same_domain(ref, request.build_absolute_uri()):
                ref = reverse('sentry')
            return HttpResponseRedirect(ref)
        return response

    return wrapped

class APIView(BaseView):
    helper_cls = ClientApiHelper

    def _get_project_from_id(self, project_id):
        if not project_id:
            return
        if not project_id.isdigit():
            raise APIError('Invalid project_id: %r' % project_id)
        try:
            return Project.objects.get_from_cache(id=project_id)
        except Project.DoesNotExist:
            raise APIError('Invalid project_id: %r' % project_id)

    def _parse_header(self, request, helper, project):
        auth = helper.auth_from_request(request)

        if auth.version not in PROTOCOL_VERSIONS:
            raise APIError(
                'Client using unsupported server protocol version (%r)' %
                six.text_type(auth.version or '')
            )

        if not auth.client:
            raise APIError("Client did not send 'client' identifier")

        return auth

    @csrf_exempt
    @never_cache
    def dispatch(self, request, project_id=None, *args, **kwargs):
        helper = self.helper_cls(
            agent=request.META.get('HTTP_USER_AGENT'),
            project_id=project_id,
            ip_address=request.META['REMOTE_ADDR'],
        )
        origin = None

        try:
            origin = helper.origin_from_request(request)

            response = self._dispatch(
                request, helper, project_id=project_id, origin=origin, *args, **kwargs
            )
        except APIError as e:
            context = {
                'error': force_bytes(e.msg, errors='replace'),
            }
            if e.name:
                context['error_name'] = e.name

            response = HttpResponse(
                json.dumps(context), content_type='application/json', status=e.http_status
            )
            # Set X-Sentry-Error as in many cases it is easier to inspect the headers
            response['X-Sentry-Error'] = context['error']

            if isinstance(e, APIRateLimited) and e.retry_after is not None:
                response['Retry-After'] = six.text_type(e.retry_after)

        except Exception as e:
            # TODO(dcramer): test failures are not outputting the log message
            # here
            if settings.DEBUG:
                content = traceback.format_exc()
            else:
                content = ''
            logger.exception(e)
            response = HttpResponse(content, content_type='text/plain', status=500)

        # TODO(dcramer): it'd be nice if we had an incr_multi method so
        # tsdb could optimize this
        metrics.incr('client-api.all-versions.requests')
        metrics.incr('client-api.all-versions.responses.%s' % (response.status_code, ))
        metrics.incr(
            'client-api.all-versions.responses.%sxx' % (six.text_type(response.status_code)[0], )
        )

        if helper.context.version:
            metrics.incr('client-api.v%s.requests' % (helper.context.version, ))
            metrics.incr(
                'client-api.v%s.responses.%s' % (helper.context.version, response.status_code)
            )
            metrics.incr(
                'client-api.v%s.responses.%sxx' %
                (helper.context.version, six.text_type(response.status_code)[0])
            )

        if response.status_code != 200 and origin:
            # We allow all origins on errors
            response['Access-Control-Allow-Origin'] = '*'

        if origin:
            response['Access-Control-Allow-Headers'] = \
                'X-Sentry-Auth, X-Requested-With, Origin, Accept, ' \
                'Content-Type, Authentication'
            response['Access-Control-Allow-Methods'] = \
                ', '.join(self._allowed_methods())
            response['Access-Control-Expose-Headers'] = \
                'X-Sentry-Error, Retry-After'

        return response

    def _dispatch(self, request, helper, project_id=None, origin=None, *args, **kwargs):
        request.user = AnonymousUser()

        project = self._get_project_from_id(project_id)
        if project:
            helper.context.bind_project(project)
            Raven.tags_context(helper.context.get_tags_context())

        if origin is not None:
            # This check is specific for clients who need CORS support
            if not project:
                raise APIError('Client must be upgraded for CORS support')
            if not is_valid_origin(origin, project):
                raise APIForbidden('Invalid origin: %s' % (origin, ))

        # XXX: It seems that the OPTIONS call does not always include custom headers
        if request.method == 'OPTIONS':
            response = self.options(request, project)
        else:
            auth = self._parse_header(request, helper, project)

            key = helper.project_key_from_auth(auth)

            # Legacy API was /api/store/ and the project ID was only available elsewhere
            if not project:
                project = Project.objects.get_from_cache(id=key.project_id)
                helper.context.bind_project(project)
            elif key.project_id != project.id:
                raise APIError('Two different projects were specified')

            helper.context.bind_auth(auth)
            Raven.tags_context(helper.context.get_tags_context())

            # Explicitly bind Organization so we don't implicitly query it later
            # this just allows us to comfortably assure that `project.organization` is safe.
            # This also allows us to pull the object from cache, instead of being
            # implicitly fetched from database.
            project.organization = Organization.objects.get_from_cache(id=project.organization_id)

            if auth.version != '2.0':
                if not auth.secret_key:
                    # If we're missing a secret_key, check if we are allowed
                    # to do a CORS request.

                    # If we're missing an Origin/Referrer header entirely,
                    # we only want to support this on GET requests. By allowing
                    # un-authenticated CORS checks for POST, we basially
                    # are obsoleting our need for a secret key entirely.
                    if origin is None and request.method != 'GET':
                        raise APIForbidden(
                            'Missing required attribute in authentication header: sentry_secret'
                        )

                    if not is_valid_origin(origin, project):
                        raise APIForbidden('Missing required Origin or Referer header')

            response = super(APIView, self).dispatch(
                request=request, project=project, auth=auth, helper=helper, key=key, **kwargs
            )

        if origin:
            if origin == 'null':
                # If an Origin is `null`, but we got this far, that means
                # we've gotten past our CORS check for some reason. But the
                # problem is that we can't return "null" as a valid response
                # to `Access-Control-Allow-Origin` and we don't have another
                # value to work with, so just allow '*' since they've gotten
                # this far.
                response['Access-Control-Allow-Origin'] = '*'
            else:
                response['Access-Control-Allow-Origin'] = origin

        return response

    # XXX: backported from Django 1.5
    def _allowed_methods(self):
        return [m.upper() for m in self.http_method_names if hasattr(self, m)]

    def options(self, request, *args, **kwargs):
        response = HttpResponse()
        response['Allow'] = ', '.join(self._allowed_methods())
        response['Content-Length'] = '0'
        return response

class StoreView(APIView):
    """
    The primary endpoint for storing new events.

    This will validate the client's authentication and data, and if
    successful pass on the payload to the internal database handler.

    Authentication works in three flavors:

    1. Explicit signed requests

       These are implemented using the documented signed request protocol, and
       require an authentication header which is signed using with the project
       member's secret key.

    2. CORS Secured Requests

       Generally used for communications with client-side platforms (such as
       JavaScript in the browser), they require a standard header, excluding
       the signature and timestamp requirements, and must be listed in the
       origins for the given project (or the global origins).

    3. Implicit trusted requests

       Used by the Sentry core, they are only available from same-domain requests
       and do not require any authentication information. They only require that
       the user be authenticated, and a project_id be sent in the GET variables.

    """

    def post(self, request, **kwargs):
        try:
            data = request.body
        except Exception as e:
            logger.exception(e)
            # We were unable to read the body.
            # This would happen if a request were submitted
            # as a multipart form for example, where reading
            # body yields an Exception. There's also not a more
            # sane exception to catch here. This will ultimately
            # bubble up as an APIError.
            data = None

        response_or_event_id = self.process(request, data=data, **kwargs)
        if isinstance(response_or_event_id, HttpResponse):
            return response_or_event_id
        return HttpResponse(
            json.dumps({
                'id': response_or_event_id,
            }), content_type='application/json'
        )

    def get(self, request, **kwargs):
        data = request.GET.get('sentry_data', '')
        response_or_event_id = self.process(request, data=data, **kwargs)

        # Return a simple 1x1 gif for browser so they don't throw a warning
        response = HttpResponse(PIXEL, 'image/gif')
        if not isinstance(response_or_event_id, HttpResponse):
            response['X-Sentry-ID'] = response_or_event_id
        return response

    def process(self, request, project, key, auth, helper, data, **kwargs):
        metrics.incr('events.total')

        if not data:
            raise APIError('No JSON data was found')

        remote_addr = request.META['REMOTE_ADDR']

        data = LazyData(
            data=data,
            content_encoding=request.META.get('HTTP_CONTENT_ENCODING', ''),
            helper=helper,
            project=project,
            auth=auth,
            client_ip=remote_addr,
        )

        event_received.send_robust(
            ip=remote_addr,
            project=project,
            sender=type(self),
        )

        if helper.should_filter(project, data, ip_address=remote_addr):
            tsdb.incr_multi(
                [
                    (tsdb.models.project_total_received, project.id),
                    (tsdb.models.project_total_blacklisted, project.id),
                    (tsdb.models.organization_total_received, project.organization_id),
                    (tsdb.models.organization_total_blacklisted, project.organization_id),
                    (tsdb.models.key_total_received, key.id),
                    (tsdb.models.key_total_blacklisted, key.id),
                ]
            )
            metrics.incr('events.blacklisted')
            event_filtered.send_robust(
                ip=remote_addr,
                project=project,
                sender=type(self),
            )
            raise APIForbidden('Event dropped due to filter')

        # TODO: improve this API (e.g. make RateLimit act on __ne__)
        rate_limit = safe_execute(
            quotas.is_rate_limited, project=project, key=key, _with_transaction=False
        )
        if isinstance(rate_limit, bool):
            rate_limit = RateLimit(is_limited=rate_limit, retry_after=None)

        # XXX(dcramer): when the rate limiter fails we drop events to ensure
        # it cannot cascade
        if rate_limit is None or rate_limit.is_limited:
            if rate_limit is None:
                helper.log.debug('Dropped event due to error with rate limiter')
            tsdb.incr_multi(
                [
                    (tsdb.models.project_total_received, project.id),
                    (tsdb.models.project_total_rejected, project.id),
                    (tsdb.models.organization_total_received, project.organization_id),
                    (tsdb.models.organization_total_rejected, project.organization_id),
                    (tsdb.models.key_total_received, key.id),
                    (tsdb.models.key_total_rejected, key.id),
                ]
            )
            metrics.incr(
                'events.dropped',
                tags={
                    'reason': rate_limit.reason_code if rate_limit else 'unknown',
                }
            )
            event_dropped.send_robust(
                ip=remote_addr,
                project=project,
                sender=type(self),
                reason_code=rate_limit.reason_code if rate_limit else None,
            )
            if rate_limit is not None:
                raise APIRateLimited(rate_limit.retry_after)
        else:
            tsdb.incr_multi(
                [
                    (tsdb.models.project_total_received, project.id),
                    (tsdb.models.organization_total_received, project.organization_id),
                    (tsdb.models.key_total_received, key.id),
                ]
            )

        org_options = OrganizationOption.objects.get_all_values(project.organization_id)

        if org_options.get('sentry:require_scrub_ip_address', False):
            scrub_ip_address = True
        else:
            scrub_ip_address = project.get_option('sentry:scrub_ip_address', False)

        event_id = data['event_id']

        # TODO(dcramer): ideally we'd only validate this if the event_id was
        # supplied by the user
        cache_key = 'ev:%s:%s' % (project.id, event_id, )

        if cache.get(cache_key) is not None:
            raise APIForbidden('An event with the same ID already exists (%s)' % (event_id, ))

        if org_options.get('sentry:require_scrub_data', False):
            scrub_data = True
        else:
            scrub_data = project.get_option('sentry:scrub_data', True)

        if scrub_data:
            # We filter data immediately before it ever gets into the queue
            sensitive_fields_key = 'sentry:sensitive_fields'
            sensitive_fields = (
                org_options.get(sensitive_fields_key, []) +
                project.get_option(sensitive_fields_key, [])
            )

            exclude_fields_key = 'sentry:safe_fields'
            exclude_fields = (
                org_options.get(exclude_fields_key, []) +
                project.get_option(exclude_fields_key, [])
            )

            if org_options.get('sentry:require_scrub_defaults', False):
                scrub_defaults = True
            else:
                scrub_defaults = project.get_option('sentry:scrub_defaults', True)

            inst = SensitiveDataFilter(
                fields=sensitive_fields,
                include_defaults=scrub_defaults,
                exclude_fields=exclude_fields,
            )
            inst.apply(data)

        if scrub_ip_address:
            # We filter data immediately before it ever gets into the queue
            helper.ensure_does_not_have_ip(data)

        # mutates data (strips a lot of context if not queued)
        helper.insert_data_to_database(data)

        cache.set(cache_key, '', 60 * 5)

        helper.log.debug('New event received (%s)', event_id)

        event_accepted.send_robust(
            ip=remote_addr,
            data=data,
            project=project,
            sender=type(self),
        )

        return event_id

class CspReportView(StoreView):
    helper_cls = CspApiHelper
    content_types = ('application/csp-report', 'application/json')

    def _dispatch(self, request, helper, project_id=None, origin=None, *args, **kwargs):
        # A CSP report is sent as a POST request with no Origin or Referer
        # header. What we're left with is a 'document-uri' key which is
        # inside of the JSON body of the request. This 'document-uri' value
        # should be treated as an origin check since it refers to the page
        # that triggered the report. The Content-Type is supposed to be
        # `application/csp-report`, but FireFox sends it as `application/json`.
        if request.method != 'POST':
            return HttpResponseNotAllowed(['POST'])

        if request.META.get('CONTENT_TYPE') not in self.content_types:
            raise APIError('Invalid Content-Type')

        request.user = AnonymousUser()

        project = self._get_project_from_id(project_id)
        helper.context.bind_project(project)
        Raven.tags_context(helper.context.get_tags_context())

        # This is yanking the auth from the querystring since it's not
        # in the POST body. This means we expect a `sentry_key` and
        # `sentry_version` to be set in querystring
        auth = helper.auth_from_request(request)

        key = helper.project_key_from_auth(auth)
        if key.project_id != project.id:
            raise APIError('Two different projects were specified')

        helper.context.bind_auth(auth)
        Raven.tags_context(helper.context.get_tags_context())

        return super(APIView, self).dispatch(
            request=request, project=project, auth=auth, helper=helper, key=key, **kwargs
        )

    def post(self, request, project, helper, **kwargs):
        data = helper.safely_load_json_string(request.body)

        # Do origin check based on the `document-uri` key as explained
        # in `_dispatch`.
        try:
            report = data['csp-report']
        except KeyError:
            raise APIError('Missing csp-report')

        origin = report.get('document-uri')

        # No idea, but this is garbage
        if origin == 'about:blank':
            raise APIForbidden('Invalid document-uri')

        if not is_valid_origin(origin, project):
            raise APIForbidden('Invalid document-uri')

        # Attach on collected meta data. This data obviously isn't a part
        # of the spec, but we need to append to the report sentry specific things.
        report['_meta'] = {
            'release': request.GET.get('sentry_release'),
        }

        response_or_event_id = self.process(
            request, project=project, helper=helper, data=report, **kwargs
        )
        if isinstance(response_or_event_id, HttpResponse):
            return response_or_event_id
        return HttpResponse(status=201)

@cache_control(max_age=3600, public=True)
def robots_txt(request):
    return HttpResponse("User-agent: *\nDisallow: /\n", content_type='text/plain')

@cache_control(max_age=3600, public=True)
def crossdomain_xml_index(request):
    response = render_to_response('sentry/crossdomain_index.xml')
    response['Content-Type'] = 'application/xml'
    return response

@cache_control(max_age=60)
def crossdomain_xml(request, project_id):
    if not project_id.isdigit():
        return HttpResponse(status=404)

    try:
        project = Project.objects.get_from_cache(id=project_id)
    except Project.DoesNotExist:
        return HttpResponse(status=404)

    origin_list = get_origins(project)
    response = render_to_response('sentry/crossdomain.xml', {'origin_list': origin_list})
    response['Content-Type'] = 'application/xml'

    return response


text:
package org.customers.system.domain;

import org.customers.system.domain.model.Customer;

public interface CustomerMessaging {

    void sendMessage(Customer customer, String message);
}

redpajama_set_name: RedPajamaGithub


text:
'''
A simple Hy (hylang) kernel for IPython.
'''
from __future__ import print_function

import __future__  # NOQA

import ast
import re

from IPython.kernel.zmq.ipkernel import IPythonKernel
from IPython.utils.py3compat import PY3

import astor

from hy.version import __version__ as hy_version

from hy.macros import _hy_macros, load_macros

from hy.lex import tokenize
from hy.compiler import hy_compile, _compile_table, load_stdlib
from hy.core import language

from .version import __version__

CELL_MAGIC_RAW = r'^%%%'

class HyKernel(IPythonKernel):
    '''
    This may not be the recommended way to create a kernel, but seems to bring
    the most features along for free.

    Seeking a better solution!
    '''
    implementation = 'hy'
    implementation_version = __version__
    language = 'hy'
    language_version = hy_version
    banner = 'Hy is a wonderful dialect of Lisp that's embedded in Python.'
    language_info = {
        'name': 'hy',
        'mimetype': 'text/x-hylang',
        'codemirror_mode': {
            'name': 'hy'
        },
        # TODO: port CM to pygments?
        'pygments_lexer': 'ipython3'
    }

    def __init__(self, *args, **kwargs):
        '''
        Create the hy environment
        '''
        super(HyKernel, self).__init__(*args, **kwargs)
        load_stdlib()
        [load_macros(m) for m in ['hy.core', 'hy.macros']]

        self._cell_magic_warned = False
        self._line_magic_warned = False

    def _forward_input(self, *args, **kwargs):
        """Forward raw_input and getpass to the current frontend.

        via input_request
        """
        super(HyKernel, self)._forward_input(*args, **kwargs)

        if PY3:
            language.input = self.raw_input
        else:
            language.raw_input = self.raw_input
            language.input = lambda prompt='': eval(self.raw_input(prompt))

    def do_execute(self, code, *args, **kwargs):
        '''
        Generate python code, and have IPythonKernel run it, or show why we
        couldn't have python code.
        '''

        try:
            if re.match(CELL_MAGIC_RAW, code):
                # this is a none-code magic cell
                pass
            else:
                cell = []
                chunk = []

                for line in code.split("\n"):
                    if line[:2] == "%%":
                        # cell magic
                        cell.append(line)
                    elif line[0] in "!%":
                        # line magic
                        if chunk:
                            cell.append(self.compile_chunk(chunk))
                            chunk = []
                        cell.append(line)
                    else:
                        chunk.append(line)
                if chunk:
                    cell.append(self.compile_chunk(chunk))
                    code = "\n".join(cell)
        except Exception as err:
            if (not hasattr(err, 'source')) or not err.source:
                err.source = code
            # shell will find the last exception
            self.shell.showsyntaxerror()
            # an empty code cell is basically a no-op
            code = ''
        return super(HyKernel, self).do_execute(code, *args, **kwargs)

    def compile_chunk(self, chunk):
        tokens = tokenize("\n".join(chunk))
        _ast = hy_compile(tokens, '__console__', root=ast.Interactive)
        _ast_for_print = ast.Module()
        _ast_for_print.body = _ast.body
        return astor.codegen.to_source(_ast_for_print)

    def do_complete(self, code, cursor_pos):
        # let IPython do the heavy lifting for variables, etc.
        txt, matches = self.shell.complete('', code, cursor_pos)

        # mangle underscores into dashes
        matches = [match.replace('_', '-') for match in matches]

        for p in list(_hy_macros.values()) + [_compile_table]:
            p = filter(lambda x: isinstance(x, str), p.keys())
            p = [x.replace('_', '-') for x in p]
            matches.extend([
                x for x in p
                if x.startswith(txt) and x not in matches
            ])

        return {
            'matches': matches,
            'cursor_end': cursor_pos,
            'cursor_start': cursor_pos - len(txt),
            'metadata': {},
            'status': 'ok'
        }

if __name__ == '__main__':
    from IPython.kernel.zmq.kernelapp import IPKernelApp
    IPKernelApp.launch_instance(kernel_class=HyKernel)


text:
package com.specmate.metrics.internal;

import java.util.HashMap;
import java.util.Map;

import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.http.HttpService;
import org.osgi.service.log.LogService;

import com.specmate.common.exception.SpecmateException;
import com.specmate.common.exception.SpecmateInternalException;
import com.specmate.metrics.ICounter;
import com.specmate.metrics.IGauge;
import com.specmate.metrics.IHistogram;
import com.specmate.metrics.IMetricsService;
import com.specmate.model.administration.ErrorCode;

import io.prometheus.client.CollectorRegistry;
import io.prometheus.client.Counter;
import io.prometheus.client.Gauge;
import io.prometheus.client.Histogram;
import io.prometheus.client.exporter.MetricsServlet;
import io.prometheus.client.hotspot.DefaultExports;

/**
 * Metrics service implementation that exposes metrics in prometheus format. See
 * http://prometheus.io Metrics will be published under
 * http://localhost:[port]/metrics
 *
 * @author junkerm
 *
 */
@Component(immediate = true)
public class MetricsServiceImpl implements IMetricsService {

	/** The http service */
	private HttpService httpService;

	/** The log service */
	private LogService logService;

	private static Map<String, Object> collectors = new HashMap<>();

	@Activate
	public void activate() throws SpecmateException {
		// Default JVM metrics (memory, threads, etc.)
		DefaultExports.initialize();
	}

	@Deactivate
	public void deactivate() {
		CollectorRegistry.defaultRegistry.clear();
		collectors.clear();
	}

	private void configureMetricsServlet() throws SpecmateException {
		// Register the metrics servlet
		MetricsServlet metricsServlet = new MetricsServlet();
		try {
			this.httpService.registerServlet("/metrics", metricsServlet, null, null);
		} catch (Exception e) {
			this.logService.log(LogService.LOG_ERROR, "Could not initialize metrics servlet.", e);
			throw new SpecmateInternalException(ErrorCode.METRICS, e);
		}
	}

	public <T> T checkIfCreated(Class<T> clazz, String name, String description) throws SpecmateException {
		if (collectors.containsKey(name)) {
			Object collector = collectors.get(name);
			if (clazz.isAssignableFrom(collector.getClass())) {
				return clazz.cast(collector);
			} else {
				throw new SpecmateInternalException(ErrorCode.METRICS,
						"A metric with name " + name + " is already registered, but has a different type.");
			}
		}
		CollectorRegistry bla = CollectorRegistry.defaultRegistry;
		return null;
	}

	private String getMetricName(String name) {
		String theName = "specmate_" + name.toLowerCase();
		return theName;
	}

	@Override
	public IGauge createGauge(String name, String description) throws SpecmateException {
		String theName = getMetricName(name);
		IGauge gauge = checkIfCreated(IGauge.class, theName, description);
		if (gauge == null) {
			gauge = new PrometheusGaugeImpl(Gauge.build(theName, description).register());
			collectors.put(theName, gauge);
		}
		return gauge;
	}

	@Override
	public IHistogram createHistogram(String name, String description) throws SpecmateException {
		String theName = getMetricName(name);
		IHistogram histogram = checkIfCreated(IHistogram.class, theName, description);
		if (histogram == null) {
			histogram = new PrometheusHistogramImpl(Histogram.build(theName, description).register());
			collectors.put(theName, histogram);
		}
		return histogram;
	}

	@Override
	public ICounter createCounter(String name, String description) throws SpecmateException {
		String theName = getMetricName(name);
		ICounter counter = checkIfCreated(ICounter.class, theName, description);
		if (counter == null) {
			counter = new PrometheusCounterImpl(Counter.build(theName, description).register());
			collectors.put(theName, counter);
		}
		return counter;
	}

	@Reference(cardinality = ReferenceCardinality.OPTIONAL)
	public void setHttpService(HttpService httpService) throws SpecmateException {
		this.httpService = httpService;
		configureMetricsServlet();
	}

	@Reference
	public void setLogService(LogService logService) {
		this.logService = logService;
	}
}


text:
@interface UIColor (RGBInitializer)

+ (UIColor*) colorFromRGB:(NSUInteger)rgbValue;

@end


text:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Note Page Bingo Request!</title>
		<link>http://bvs.wikidot.com/forum/t-864692/note-page-bingo-request</link>
		<description>Posts in the discussion thread "Note Page Bingo Request!" - Need to be NP bingo'd got Anonymous.</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 10 Jul 2022 04:16:10 +0000</lastBuildDate>

					<item>
				<guid>http://bvs.wikidot.com/forum/t-864692#post-2037962</guid>
				<title>Note Page Bingo Request!</title>
				<link>http://bvs.wikidot.com/forum/t-864692/note-page-bingo-request#post-2037962</link>
				<description></description>
				<pubDate>Sat, 24 May 2014 06:07:36 +0000</pubDate>
				<wikidot:authorName>blindoctor</wikidot:authorName>				<wikidot:authorUserId>1895421</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

IGN: blindoctor

Level: 51

ANBU Village

Also, once I become unbingo'd I can bingo you back if needed.

				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>


text:
**Panduan BlankOn 6**

Sistem operasi BlankOn merupakan sistem operasi multiuser atau banyak pengguna.
Linux bisa digunakan oleh banyak pengguna yang memiliki ruang dan lingkungan
masing-masing. Setiap pengguna juga memiliki nama akun pengguna (userid) dan
kata sandi. Nama pengguna dan sandi ini akan diminta pada saat pertama kali
menjalankan BlankOn.
Selain itu, di BlankOn juga dikenal istilah kelompok yaitu sekumpulan dari
pengguna yang memiliki hak dan wewenang tertentu.
Oleh karena itu, pengetahuan tentang manajemen pengguna dan kelompok sangat
dibutuhkan dalam mempelajari BlankOn. Baik bagi mereka yang sekadar pengguna
rumahan yang hanya memilik satu jenis pengguna di sistem mereka, ataupun mereka
yang bertindak sebagai sistem administrator.
Pada bab ini, dibahas mengenai cara untuk memanajemen pengguna dan kelompok
yang ada di BlankOn melalui fitur Pemakai dan Kelompoknya.
### Pengaturan pengguna
Untuk melakukan pengaturan pengguna melalui antarmuka grafis, Anda bisa klik
menu System > Pemakai dan Kelompoknya. Sebelum melakukan pengaturan pengguna.
[menata_pengguna]
Penataan pengguna dan kelompoknya
#### Menambah Pengguna
Untuk menambah pengguna baru, klik pada tombol [>Tambah/Add?<]. Anda akan
ditanyakan kata sandi, ketikkan kata sandi root lalu klik tombol Otentikasikan
[membuat_pengguna]
Membuat pengguna baru
Pada jendela yang baru muncul, ketik nama akun dari pengguna baru yang Anda
buat pada bagian [>Nama<]. Dari nama yang Anda buat akan di ambil nama pendek
yang akan digunakan pada saat melakukan login dengan akun tersebut. Setelah itu
klik tombol OK. Selanjutnya membuatkan kata sandi untuk pengguna baru ini.
[membuat_kata_sandi_pengguna]
Membuat kata sandi pengguna blankon
Pada jendela Mengubah kata sandi pengguna ini ketikkan kata sandi pada kotak
isian kata sandi baru dan Konfirmasi setelah itu klik tombol OK.
Untuk mengatur kewenangan pada pengguna baru yang Anda buat, klik pada tulisan
[>Change/Sunting?<] tipe akun pada jendela penataan pengguna. Masukkan kata
sandi root lalu klik Otentikasikan. Kemudian, beri tanda centang pada wewenang
yang diberikan kepada pengguna baru tersebut. Setelah semua pengaturan selesai,
Anda bisa klik pada tombol [>OK<].
[mengubah_tipe_pengguna][[BR]Mengubah tipe akun pengguna
Sekarang, Anda bisa melihat pengguna baru pada daftar pengguna. Untuk masuk ke
sistem menggunakan pengguna tersebut, lakukan Log Out pada desktop melalui menu
Sistem > Keluar.
#### Mengatur Pengguna yang Sudah Ada
Untuk mengatur pengguna yang sudah ada, Anda bisa klik pengguna yang ingin Anda
atur pada jendela [>Penataan Pengguna<], lalu klik pada tombol [>Advanved
Setting/Pengaturan? lanjutan<]. Masukkan kata sandi root lalu klik
Otentikasikan. Kemudian, Anda bisa melakukan pengaturan terhadap pengguna
tersebut.
[pengaturan_lanjutan]
Pengaturan Lanjutan untuk pengguna
#### Menghapus Pengguna
Untuk menghapus pengguna, cukup klik pengguna yang ingin dihapus pada daftar
yang terdapat di jendela [>Penataan Pengguna<], kemudian klik tombol [>Hapus<].
Pada jendela konfirmasi yang muncul, klik pada tombol yang sesuai, apakah
hendak membatalkan, menghapus folder pengguna tersebut atau hanya menghapus
pengguna tanpa menghapus folde pengguna.
### Pengaturan Kelompok
Kelompok (Grup) merupakan sekumpulan dari pengguna yang sama-sama memiliki
suatu wewenang, seperti wewenang pada sistem dan wewenang pada berkas sistem.
Untuk melakukan pengaturan kelompok, klik tombol [>Kelola Kelompok<] pada
jendela [>Pengaturan Pengguna<]. Maka akan muncul daftar kelompok yang ada di
sistem.
[menata_kelompok_pengguna]
Mengelola kelompok
#### Membuat Kelompok Baru
Untuk membuat kelompok baru, klik pada tombol [>Add/Tambah?<] pada jendela
pengaturan kelompok.
[menambah_kelompok]
Membuat kelompok baru
Kemudian, tentukan nama kelompok (tanpa spasi) dan beri centang pada pengguna
yang menjadi anggota dari kelompok tersebut, kemudian klik tombol [>OK<] untuk
membuat kelompok baru. Masukkan kata sandi root lalu klik Otentikasikan.
#### Mengatur Kelompok yang Sudah Ada
Untuk mengatur kelompok yang sudah ada, cukup klik pada kelompok yang ingin
diatur, lalu klik tombol [>Properti<]. Kemudian, Anda bisa mengatur siapa saja
yang menjadi anggota dari kelompok yang Anda atur.
Last modified on 06/26/2010 04:55:07 PM
#### Attachments (8)
  * user_managemen.png (25.4 KB) - added by hanafi 7 years ago. menata
      pengguna
  * user_managemen_kelola_kelompok.png (18.4 KB) - added by hanafi 7 years
      ago. menata kelompok pengguna
  * user_managemen_membuat_password.png (27.1 KB) - added by hanafi 7 years
      ago. membuat kata sandi pengguna
  * user_managemen_membuat_user.png (20.4 KB) - added by hanafi 7 years ago.
      membuat pengguna
  * user_managemen_mengubah_tipe.png (35.8 KB) - added by hanafi 7 years
      ago. mengubah tipe pengguna
  * user_managemen_pengaturan_lanjutan.png (40.0 KB) - added by hanafi 7
      years ago. pengaturan lanjutan
  * user_managemen_tambah_kelompok.png (20.1 KB) - added by hanafi 7 years
      ago. menambah kelompok
  * panduan_ombilin_bab_xiii.odt (210.9 KB) - added by hanafi 7 years ago.
      bab 9 format odt
####

---


text:
import java.util.*;

public class Test {

  public boolean contains(Object o) { return false; }

}

class SetImpl<T> extends Test implements Set<T> {

    public int size() {
        return 0;
    }

    public boolean isEmpty() {
        return false;
    }

    public Iterator<T> iterator() {
        return null;
    }

    public Object[] toArray() {
        return new Object[0];
    }

    public <T1> T1[] toArray(T1[] a) {
        return null;
    }

    public boolean add(T t) {
        return false;
    }

    public boolean remove(Object o) {
        return false;
    }

    public boolean containsAll(Collection<?> c) {
        return false;
    }

    public boolean addAll(Collection<? extends T> c) {
        return false;
    }

    public boolean retainAll(Collection<?> c) {
        return false;
    }

    public boolean removeAll(Collection<?> c) {
        return false;
    }

    public void clear() {

    }

}


text:
from django.conf.urls import patterns, url

import views

urlpatterns = patterns('',
    url(r'^$', views.home, name='home'),
    url(r'^login/(\w*)', views.login, name='login')
)


text:
<?xml version="1.0" encoding="UTF-8"?>

<recipeml version="0.5">
  <recipe>
    <head>
      <title>Bayswater Brasserie Seared Sea Scallops in Lime Broth</title>
      <categories>
        <cat>Thai</cat>
        <cat>Seafood</cat></categories>
      <yield>4</yield></head>
    <ingredients>
      <ing>
        <amt>
          <qty/>
          <unit/></amt>
        <item>Stephen Ceideburg</item></ing>
      <ing>
        <amt>
          <qty>12</qty>
          <unit>large</unit></amt>
        <item>Jerusalem Artichokes</item></ing>
      <ing>
        <amt>
          <qty/>
          <unit/></amt>
        <item>Olive oil</item></ing>
      <ing>
        <amt>
          <qty>12</qty>
          <unit/></amt>
        <item>Cloves shallots</item></ing>
      <ing>
        <amt>
          <qty>20</qty>
          <unit/></amt>
        <item>Scallops</item></ing>
      <ing>
        <amt>
          <qty>4</qty>
          <unit/></amt>
        <item>Kaffir Lime Leaves</item></ing>
      <ing>
        <amt>
          <qty>8</qty>
          <unit/></amt>
        <item>Wing Beans</item></ing>
      <ing>
        <amt>
          <qty>600</qty>
          <unit>mililiters</unit></amt>
        <item>Fish Stock</item></ing>
      <ing>
        <amt>
          <qty>3</qty>
          <unit/></amt>
        <item>Limes, Juice Only</item></ing>
      <ing>
        <amt>
          <qty>2</qty>
          <unit>tablespoons</unit></amt>
        <item>Fish Sauce</item></ing>
      <ing>
        <amt>
          <qty/>
          <unit/></amt>
        <item>Pepper to taste</item></ing></ingredients>
    <directions>
      <step>  True shallots (echalotes) are gradually becoming more widely available.
  They look rather like a large, loose head of garlic with glossy red-brown
  skin.

  Clean and peel 12 large Jerusalem artichokes. Put a little olive oil in a
  roasting pan, add the artichokes and roast in a medium oven until golden, a
  little caramelized and cooked through - about 20 minutes. Peel and slice 12
  cloves of true shallots. Brush 28 scallops lightly with oil on both sides.
  Have ready 4 kaffir lime leaves (or substitute zest from the limes). Wash 8
  wing beans (or substitute 4 very small bok choys about 10 cms tall - halve
  them lengthwise) and blanch in boiling water.

  Put the blanched vegetables in 4 large bowls (pasta bowls or similar),
  together with the whole roasted artichokes, and scatter the sliced shallots
  over the top. Meanwhile, in a saucepan com- bine 600 mL fish stock, the
  juice of 3 limes, Thai fish sauce to taste (about 2 tablespoons) and pepper
  to taste and bring to the boil.

  Heat an iron grill or heavy frying pan to a very high heat. Do not grease.
  Throw in the oiled scallops and sear them very quickly on both sides, so
  that they take colour on the outside but are barely warm inside. Divide the
  scallops between the soup bowls, top with the lime leaves and pour in the
  broth. Serve.

  From an article by Meryl Constance in The Sydney Morning Herald, 6/8/93.
  Courtesy Mark Herron.

  File ftp://ftp.idiscover.co.uk/pub/food/mealmaster/recipes/mmdjaxxx.zip

</step></directions></recipe></recipeml>


text:
import msrest.serialization

class HttpAuthentication(msrest.serialization.Model):
    """HttpAuthentication.

    You probably want to use the sub-classes and not this class directly. Known
    sub-classes are: OAuthAuthentication, BasicAuthentication, ClientCertAuthentication.

    All required parameters must be populated in order to send to Azure.

    :param type: Required. Gets or sets the HTTP authentication type.Constant filled by server.
     Possible values include: "NotSpecified", "ClientCertificate", "ActiveDirectoryOAuth", "Basic".
    :type type: str or ~azure.mgmt.scheduler.models.HttpAuthenticationType
    """

    _validation = {
        'type': {'required': True},
    }

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
    }

    _subtype_map = {
        'type': {'ActiveDirectoryOAuth': 'OAuthAuthentication', 'Basic': 'BasicAuthentication', 'ClientCertificate': 'ClientCertAuthentication'}
    }

    def __init__(
        self,
        **kwargs
    ):
        super(HttpAuthentication, self).__init__(**kwargs)
        self.type = None  # type: Optional[str]

class BasicAuthentication(HttpAuthentication):
    """BasicAuthentication.

    All required parameters must be populated in order to send to Azure.

    :param type: Required. Gets or sets the HTTP authentication type.Constant filled by server.
     Possible values include: "NotSpecified", "ClientCertificate", "ActiveDirectoryOAuth", "Basic".
    :type type: str or ~azure.mgmt.scheduler.models.HttpAuthenticationType
    :param username: Gets or sets the username.
    :type username: str
    :param password: Gets or sets the password, return value will always be empty.
    :type password: str
    """

    _validation = {
        'type': {'required': True},
    }

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
        'username': {'key': 'username', 'type': 'str'},
        'password': {'key': 'password', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(BasicAuthentication, self).__init__(**kwargs)
        self.type = 'Basic'  # type: str
        self.username = kwargs.get('username', None)
        self.password = kwargs.get('password', None)

class ClientCertAuthentication(HttpAuthentication):
    """ClientCertAuthentication.

    All required parameters must be populated in order to send to Azure.

    :param type: Required. Gets or sets the HTTP authentication type.Constant filled by server.
     Possible values include: "NotSpecified", "ClientCertificate", "ActiveDirectoryOAuth", "Basic".
    :type type: str or ~azure.mgmt.scheduler.models.HttpAuthenticationType
    :param password: Gets or sets the certificate password, return value will always be empty.
    :type password: str
    :param pfx: Gets or sets the pfx certificate. Accepts certification in base64 encoding, return
     value will always be empty.
    :type pfx: str
    :param certificate_thumbprint: Gets or sets the certificate thumbprint.
    :type certificate_thumbprint: str
    :param certificate_expiration_date: Gets or sets the certificate expiration date.
    :type certificate_expiration_date: ~datetime.datetime
    :param certificate_subject_name: Gets or sets the certificate subject name.
    :type certificate_subject_name: str
    """

    _validation = {
        'type': {'required': True},
    }

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
        'password': {'key': 'password', 'type': 'str'},
        'pfx': {'key': 'pfx', 'type': 'str'},
        'certificate_thumbprint': {'key': 'certificateThumbprint', 'type': 'str'},
        'certificate_expiration_date': {'key': 'certificateExpirationDate', 'type': 'iso-8601'},
        'certificate_subject_name': {'key': 'certificateSubjectName', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(ClientCertAuthentication, self).__init__(**kwargs)
        self.type = 'ClientCertificate'  # type: str
        self.password = kwargs.get('password', None)
        self.pfx = kwargs.get('pfx', None)
        self.certificate_thumbprint = kwargs.get('certificate_thumbprint', None)
        self.certificate_expiration_date = kwargs.get('certificate_expiration_date', None)
        self.certificate_subject_name = kwargs.get('certificate_subject_name', None)

class HttpRequest(msrest.serialization.Model):
    """HttpRequest.

    :param authentication: Gets or sets the authentication method of the request.
    :type authentication: ~azure.mgmt.scheduler.models.HttpAuthentication
    :param uri: Gets or sets the URI of the request.
    :type uri: str
    :param method: Gets or sets the method of the request.
    :type method: str
    :param body: Gets or sets the request body.
    :type body: str
    :param headers: Gets or sets the headers.
    :type headers: dict[str, str]
    """

    _attribute_map = {
        'authentication': {'key': 'authentication', 'type': 'HttpAuthentication'},
        'uri': {'key': 'uri', 'type': 'str'},
        'method': {'key': 'method', 'type': 'str'},
        'body': {'key': 'body', 'type': 'str'},
        'headers': {'key': 'headers', 'type': '{str}'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(HttpRequest, self).__init__(**kwargs)
        self.authentication = kwargs.get('authentication', None)
        self.uri = kwargs.get('uri', None)
        self.method = kwargs.get('method', None)
        self.body = kwargs.get('body', None)
        self.headers = kwargs.get('headers', None)

class JobAction(msrest.serialization.Model):
    """JobAction.

    :param type: Gets or sets the job action type. Possible values include: "Http", "Https",
     "StorageQueue", "ServiceBusQueue", "ServiceBusTopic".
    :type type: str or ~azure.mgmt.scheduler.models.JobActionType
    :param request: Gets or sets the http requests.
    :type request: ~azure.mgmt.scheduler.models.HttpRequest
    :param queue_message: Gets or sets the storage queue message.
    :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage
    :param service_bus_queue_message: Gets or sets the service bus queue message.
    :type service_bus_queue_message: ~azure.mgmt.scheduler.models.ServiceBusQueueMessage
    :param service_bus_topic_message: Gets or sets the service bus topic message.
    :type service_bus_topic_message: ~azure.mgmt.scheduler.models.ServiceBusTopicMessage
    :param retry_policy: Gets or sets the retry policy.
    :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy
    :param error_action: Gets or sets the error action.
    :type error_action: ~azure.mgmt.scheduler.models.JobErrorAction
    """

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
        'request': {'key': 'request', 'type': 'HttpRequest'},
        'queue_message': {'key': 'queueMessage', 'type': 'StorageQueueMessage'},
        'service_bus_queue_message': {'key': 'serviceBusQueueMessage', 'type': 'ServiceBusQueueMessage'},
        'service_bus_topic_message': {'key': 'serviceBusTopicMessage', 'type': 'ServiceBusTopicMessage'},
        'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'},
        'error_action': {'key': 'errorAction', 'type': 'JobErrorAction'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobAction, self).__init__(**kwargs)
        self.type = kwargs.get('type', None)
        self.request = kwargs.get('request', None)
        self.queue_message = kwargs.get('queue_message', None)
        self.service_bus_queue_message = kwargs.get('service_bus_queue_message', None)
        self.service_bus_topic_message = kwargs.get('service_bus_topic_message', None)
        self.retry_policy = kwargs.get('retry_policy', None)
        self.error_action = kwargs.get('error_action', None)

class JobCollectionDefinition(msrest.serialization.Model):
    """JobCollectionDefinition.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar id: Gets the job collection resource identifier.
    :vartype id: str
    :ivar type: Gets the job collection resource type.
    :vartype type: str
    :param name: Gets or sets the job collection resource name.
    :type name: str
    :param location: Gets or sets the storage account location.
    :type location: str
    :param tags: A set of tags. Gets or sets the tags.
    :type tags: dict[str, str]
    :param properties: Gets or sets the job collection properties.
    :type properties: ~azure.mgmt.scheduler.models.JobCollectionProperties
    """

    _validation = {
        'id': {'readonly': True},
        'type': {'readonly': True},
    }

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'location': {'key': 'location', 'type': 'str'},
        'tags': {'key': 'tags', 'type': '{str}'},
        'properties': {'key': 'properties', 'type': 'JobCollectionProperties'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobCollectionDefinition, self).__init__(**kwargs)
        self.id = None
        self.type = None
        self.name = kwargs.get('name', None)
        self.location = kwargs.get('location', None)
        self.tags = kwargs.get('tags', None)
        self.properties = kwargs.get('properties', None)

class JobCollectionListResult(msrest.serialization.Model):
    """JobCollectionListResult.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar value: Gets the job collections.
    :vartype value: list[~azure.mgmt.scheduler.models.JobCollectionDefinition]
    :param next_link: Gets or sets the URL to get the next set of job collections.
    :type next_link: str
    """

    _validation = {
        'value': {'readonly': True},
    }

    _attribute_map = {
        'value': {'key': 'value', 'type': '[JobCollectionDefinition]'},
        'next_link': {'key': 'nextLink', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobCollectionListResult, self).__init__(**kwargs)
        self.value = None
        self.next_link = kwargs.get('next_link', None)

class JobCollectionProperties(msrest.serialization.Model):
    """JobCollectionProperties.

    :param sku: Gets or sets the SKU.
    :type sku: ~azure.mgmt.scheduler.models.Sku
    :param state: Gets or sets the state. Possible values include: "Enabled", "Disabled",
     "Suspended", "Deleted".
    :type state: str or ~azure.mgmt.scheduler.models.JobCollectionState
    :param quota: Gets or sets the job collection quota.
    :type quota: ~azure.mgmt.scheduler.models.JobCollectionQuota
    """

    _attribute_map = {
        'sku': {'key': 'sku', 'type': 'Sku'},
        'state': {'key': 'state', 'type': 'str'},
        'quota': {'key': 'quota', 'type': 'JobCollectionQuota'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobCollectionProperties, self).__init__(**kwargs)
        self.sku = kwargs.get('sku', None)
        self.state = kwargs.get('state', None)
        self.quota = kwargs.get('quota', None)

class JobCollectionQuota(msrest.serialization.Model):
    """JobCollectionQuota.

    :param max_job_count: Gets or set the maximum job count.
    :type max_job_count: int
    :param max_job_occurrence: Gets or sets the maximum job occurrence.
    :type max_job_occurrence: int
    :param max_recurrence: Gets or set the maximum recurrence.
    :type max_recurrence: ~azure.mgmt.scheduler.models.JobMaxRecurrence
    """

    _attribute_map = {
        'max_job_count': {'key': 'maxJobCount', 'type': 'int'},
        'max_job_occurrence': {'key': 'maxJobOccurrence', 'type': 'int'},
        'max_recurrence': {'key': 'maxRecurrence', 'type': 'JobMaxRecurrence'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobCollectionQuota, self).__init__(**kwargs)
        self.max_job_count = kwargs.get('max_job_count', None)
        self.max_job_occurrence = kwargs.get('max_job_occurrence', None)
        self.max_recurrence = kwargs.get('max_recurrence', None)

class JobDefinition(msrest.serialization.Model):
    """JobDefinition.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar id: Gets the job resource identifier.
    :vartype id: str
    :ivar type: Gets the job resource type.
    :vartype type: str
    :ivar name: Gets the job resource name.
    :vartype name: str
    :param properties: Gets or sets the job properties.
    :type properties: ~azure.mgmt.scheduler.models.JobProperties
    """

    _validation = {
        'id': {'readonly': True},
        'type': {'readonly': True},
        'name': {'readonly': True},
    }

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'properties': {'key': 'properties', 'type': 'JobProperties'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobDefinition, self).__init__(**kwargs)
        self.id = None
        self.type = None
        self.name = None
        self.properties = kwargs.get('properties', None)

class JobErrorAction(msrest.serialization.Model):
    """JobErrorAction.

    :param type: Gets or sets the job error action type. Possible values include: "Http", "Https",
     "StorageQueue", "ServiceBusQueue", "ServiceBusTopic".
    :type type: str or ~azure.mgmt.scheduler.models.JobActionType
    :param request: Gets or sets the http requests.
    :type request: ~azure.mgmt.scheduler.models.HttpRequest
    :param queue_message: Gets or sets the storage queue message.
    :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage
    :param service_bus_queue_message: Gets or sets the service bus queue message.
    :type service_bus_queue_message: ~azure.mgmt.scheduler.models.ServiceBusQueueMessage
    :param service_bus_topic_message: Gets or sets the service bus topic message.
    :type service_bus_topic_message: ~azure.mgmt.scheduler.models.ServiceBusTopicMessage
    :param retry_policy: Gets or sets the retry policy.
    :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy
    """

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
        'request': {'key': 'request', 'type': 'HttpRequest'},
        'queue_message': {'key': 'queueMessage', 'type': 'StorageQueueMessage'},
        'service_bus_queue_message': {'key': 'serviceBusQueueMessage', 'type': 'ServiceBusQueueMessage'},
        'service_bus_topic_message': {'key': 'serviceBusTopicMessage', 'type': 'ServiceBusTopicMessage'},
        'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobErrorAction, self).__init__(**kwargs)
        self.type = kwargs.get('type', None)
        self.request = kwargs.get('request', None)
        self.queue_message = kwargs.get('queue_message', None)
        self.service_bus_queue_message = kwargs.get('service_bus_queue_message', None)
        self.service_bus_topic_message = kwargs.get('service_bus_topic_message', None)
        self.retry_policy = kwargs.get('retry_policy', None)

class JobHistoryDefinition(msrest.serialization.Model):
    """JobHistoryDefinition.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar id: Gets the job history identifier.
    :vartype id: str
    :ivar type: Gets the job history resource type.
    :vartype type: str
    :ivar name: Gets the job history name.
    :vartype name: str
    :ivar properties: Gets or sets the job history properties.
    :vartype properties: ~azure.mgmt.scheduler.models.JobHistoryDefinitionProperties
    """

    _validation = {
        'id': {'readonly': True},
        'type': {'readonly': True},
        'name': {'readonly': True},
        'properties': {'readonly': True},
    }

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'properties': {'key': 'properties', 'type': 'JobHistoryDefinitionProperties'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobHistoryDefinition, self).__init__(**kwargs)
        self.id = None
        self.type = None
        self.name = None
        self.properties = None

class JobHistoryDefinitionProperties(msrest.serialization.Model):
    """JobHistoryDefinitionProperties.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar start_time: Gets the start time for this job.
    :vartype start_time: ~datetime.datetime
    :ivar end_time: Gets the end time for this job.
    :vartype end_time: ~datetime.datetime
    :ivar expected_execution_time: Gets the expected execution time for this job.
    :vartype expected_execution_time: ~datetime.datetime
    :ivar action_name: Gets the job history action name. Possible values include: "MainAction",
     "ErrorAction".
    :vartype action_name: str or ~azure.mgmt.scheduler.models.JobHistoryActionName
    :ivar status: Gets the job history status. Possible values include: "Completed", "Failed",
     "Postponed".
    :vartype status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus
    :ivar message: Gets the message for the job history.
    :vartype message: str
    :ivar retry_count: Gets the retry count for job.
    :vartype retry_count: int
    :ivar repeat_count: Gets the repeat count for the job.
    :vartype repeat_count: int
    """

    _validation = {
        'start_time': {'readonly': True},
        'end_time': {'readonly': True},
        'expected_execution_time': {'readonly': True},
        'action_name': {'readonly': True},
        'status': {'readonly': True},
        'message': {'readonly': True},
        'retry_count': {'readonly': True},
        'repeat_count': {'readonly': True},
    }

    _attribute_map = {
        'start_time': {'key': 'startTime', 'type': 'iso-8601'},
        'end_time': {'key': 'endTime', 'type': 'iso-8601'},
        'expected_execution_time': {'key': 'expectedExecutionTime', 'type': 'iso-8601'},
        'action_name': {'key': 'actionName', 'type': 'str'},
        'status': {'key': 'status', 'type': 'str'},
        'message': {'key': 'message', 'type': 'str'},
        'retry_count': {'key': 'retryCount', 'type': 'int'},
        'repeat_count': {'key': 'repeatCount', 'type': 'int'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobHistoryDefinitionProperties, self).__init__(**kwargs)
        self.start_time = None
        self.end_time = None
        self.expected_execution_time = None
        self.action_name = None
        self.status = None
        self.message = None
        self.retry_count = None
        self.repeat_count = None

class JobHistoryFilter(msrest.serialization.Model):
    """JobHistoryFilter.

    :param status: Gets or sets the job execution status. Possible values include: "Completed",
     "Failed", "Postponed".
    :type status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus
    """

    _attribute_map = {
        'status': {'key': 'status', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobHistoryFilter, self).__init__(**kwargs)
        self.status = kwargs.get('status', None)

class JobHistoryListResult(msrest.serialization.Model):
    """JobHistoryListResult.

    :param value: Gets or sets the job histories under job.
    :type value: list[~azure.mgmt.scheduler.models.JobHistoryDefinition]
    :param next_link: Gets or sets the URL to get the next set of job histories.
    :type next_link: str
    """

    _attribute_map = {
        'value': {'key': 'value', 'type': '[JobHistoryDefinition]'},
        'next_link': {'key': 'nextLink', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobHistoryListResult, self).__init__(**kwargs)
        self.value = kwargs.get('value', None)
        self.next_link = kwargs.get('next_link', None)

class JobListResult(msrest.serialization.Model):
    """JobListResult.

    :param value: Gets or sets all jobs under job collection.
    :type value: list[~azure.mgmt.scheduler.models.JobDefinition]
    :param next_link: Gets or sets the URL to get the next set of jobs.
    :type next_link: str
    """

    _attribute_map = {
        'value': {'key': 'value', 'type': '[JobDefinition]'},
        'next_link': {'key': 'nextLink', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobListResult, self).__init__(**kwargs)
        self.value = kwargs.get('value', None)
        self.next_link = kwargs.get('next_link', None)

class JobMaxRecurrence(msrest.serialization.Model):
    """JobMaxRecurrence.

    :param frequency: Gets or sets the frequency of recurrence (second, minute, hour, day, week,
     month). Possible values include: "Minute", "Hour", "Day", "Week", "Month".
    :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency
    :param interval: Gets or sets the interval between retries.
    :type interval: int
    """

    _attribute_map = {
        'frequency': {'key': 'frequency', 'type': 'str'},
        'interval': {'key': 'interval', 'type': 'int'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobMaxRecurrence, self).__init__(**kwargs)
        self.frequency = kwargs.get('frequency', None)
        self.interval = kwargs.get('interval', None)

class JobProperties(msrest.serialization.Model):
    """JobProperties.

    Variables are only populated by the server, and will be ignored when sending a request.

    :param start_time: Gets or sets the job start time.
    :type start_time: ~datetime.datetime
    :param action: Gets or sets the job action.
    :type action: ~azure.mgmt.scheduler.models.JobAction
    :param recurrence: Gets or sets the job recurrence.
    :type recurrence: ~azure.mgmt.scheduler.models.JobRecurrence
    :param state: Gets or set the job state. Possible values include: "Enabled", "Disabled",
     "Faulted", "Completed".
    :type state: str or ~azure.mgmt.scheduler.models.JobState
    :ivar status: Gets the job status.
    :vartype status: ~azure.mgmt.scheduler.models.JobStatus
    """

    _validation = {
        'status': {'readonly': True},
    }

    _attribute_map = {
        'start_time': {'key': 'startTime', 'type': 'iso-8601'},
        'action': {'key': 'action', 'type': 'JobAction'},
        'recurrence': {'key': 'recurrence', 'type': 'JobRecurrence'},
        'state': {'key': 'state', 'type': 'str'},
        'status': {'key': 'status', 'type': 'JobStatus'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobProperties, self).__init__(**kwargs)
        self.start_time = kwargs.get('start_time', None)
        self.action = kwargs.get('action', None)
        self.recurrence = kwargs.get('recurrence', None)
        self.state = kwargs.get('state', None)
        self.status = None

class JobRecurrence(msrest.serialization.Model):
    """JobRecurrence.

    :param frequency: Gets or sets the frequency of recurrence (second, minute, hour, day, week,
     month). Possible values include: "Minute", "Hour", "Day", "Week", "Month".
    :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency
    :param interval: Gets or sets the interval between retries.
    :type interval: int
    :param count: Gets or sets the maximum number of times that the job should run.
    :type count: int
    :param end_time: Gets or sets the time at which the job will complete.
    :type end_time: ~datetime.datetime
    :param schedule:
    :type schedule: ~azure.mgmt.scheduler.models.JobRecurrenceSchedule
    """

    _attribute_map = {
        'frequency': {'key': 'frequency', 'type': 'str'},
        'interval': {'key': 'interval', 'type': 'int'},
        'count': {'key': 'count', 'type': 'int'},
        'end_time': {'key': 'endTime', 'type': 'iso-8601'},
        'schedule': {'key': 'schedule', 'type': 'JobRecurrenceSchedule'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobRecurrence, self).__init__(**kwargs)
        self.frequency = kwargs.get('frequency', None)
        self.interval = kwargs.get('interval', None)
        self.count = kwargs.get('count', None)
        self.end_time = kwargs.get('end_time', None)
        self.schedule = kwargs.get('schedule', None)

class JobRecurrenceSchedule(msrest.serialization.Model):
    """JobRecurrenceSchedule.

    :param week_days: Gets or sets the days of the week that the job should execute on.
    :type week_days: list[str or ~azure.mgmt.scheduler.models.DayOfWeek]
    :param hours: Gets or sets the hours of the day that the job should execute at.
    :type hours: list[int]
    :param minutes: Gets or sets the minutes of the hour that the job should execute at.
    :type minutes: list[int]
    :param month_days: Gets or sets the days of the month that the job should execute on. Must be
     between 1 and 31.
    :type month_days: list[int]
    :param monthly_occurrences: Gets or sets the occurrences of days within a month.
    :type monthly_occurrences:
     list[~azure.mgmt.scheduler.models.JobRecurrenceScheduleMonthlyOccurrence]
    """

    _attribute_map = {
        'week_days': {'key': 'weekDays', 'type': '[str]'},
        'hours': {'key': 'hours', 'type': '[int]'},
        'minutes': {'key': 'minutes', 'type': '[int]'},
        'month_days': {'key': 'monthDays', 'type': '[int]'},
        'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[JobRecurrenceScheduleMonthlyOccurrence]'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobRecurrenceSchedule, self).__init__(**kwargs)
        self.week_days = kwargs.get('week_days', None)
        self.hours = kwargs.get('hours', None)
        self.minutes = kwargs.get('minutes', None)
        self.month_days = kwargs.get('month_days', None)
        self.monthly_occurrences = kwargs.get('monthly_occurrences', None)

class JobRecurrenceScheduleMonthlyOccurrence(msrest.serialization.Model):
    """JobRecurrenceScheduleMonthlyOccurrence.

    :param day: Gets or sets the day. Must be one of monday, tuesday, wednesday, thursday, friday,
     saturday, sunday. Possible values include: "Monday", "Tuesday", "Wednesday", "Thursday",
     "Friday", "Saturday", "Sunday".
    :type day: str or ~azure.mgmt.scheduler.models.JobScheduleDay
    :param occurrence: Gets or sets the occurrence. Must be between -5 and 5.
    :type occurrence: int
    """

    _attribute_map = {
        'day': {'key': 'day', 'type': 'str'},
        'occurrence': {'key': 'Occurrence', 'type': 'int'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobRecurrenceScheduleMonthlyOccurrence, self).__init__(**kwargs)
        self.day = kwargs.get('day', None)
        self.occurrence = kwargs.get('occurrence', None)

class JobStateFilter(msrest.serialization.Model):
    """JobStateFilter.

    :param state: Gets or sets the job state. Possible values include: "Enabled", "Disabled",
     "Faulted", "Completed".
    :type state: str or ~azure.mgmt.scheduler.models.JobState
    """

    _attribute_map = {
        'state': {'key': 'state', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobStateFilter, self).__init__(**kwargs)
        self.state = kwargs.get('state', None)

class JobStatus(msrest.serialization.Model):
    """JobStatus.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar execution_count: Gets the number of times this job has executed.
    :vartype execution_count: int
    :ivar failure_count: Gets the number of times this job has failed.
    :vartype failure_count: int
    :ivar faulted_count: Gets the number of faulted occurrences (occurrences that were retried and
     failed as many times as the retry policy states).
    :vartype faulted_count: int
    :ivar last_execution_time: Gets the time the last occurrence executed in ISO-8601 format.
     Could be empty if job has not run yet.
    :vartype last_execution_time: ~datetime.datetime
    :ivar next_execution_time: Gets the time of the next occurrence in ISO-8601 format. Could be
     empty if the job is completed.
    :vartype next_execution_time: ~datetime.datetime
    """

    _validation = {
        'execution_count': {'readonly': True},
        'failure_count': {'readonly': True},
        'faulted_count': {'readonly': True},
        'last_execution_time': {'readonly': True},
        'next_execution_time': {'readonly': True},
    }

    _attribute_map = {
        'execution_count': {'key': 'executionCount', 'type': 'int'},
        'failure_count': {'key': 'failureCount', 'type': 'int'},
        'faulted_count': {'key': 'faultedCount', 'type': 'int'},
        'last_execution_time': {'key': 'lastExecutionTime', 'type': 'iso-8601'},
        'next_execution_time': {'key': 'nextExecutionTime', 'type': 'iso-8601'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(JobStatus, self).__init__(**kwargs)
        self.execution_count = None
        self.failure_count = None
        self.faulted_count = None
        self.last_execution_time = None
        self.next_execution_time = None

class OAuthAuthentication(HttpAuthentication):
    """OAuthAuthentication.

    All required parameters must be populated in order to send to Azure.

    :param type: Required. Gets or sets the HTTP authentication type.Constant filled by server.
     Possible values include: "NotSpecified", "ClientCertificate", "ActiveDirectoryOAuth", "Basic".
    :type type: str or ~azure.mgmt.scheduler.models.HttpAuthenticationType
    :param secret: Gets or sets the secret, return value will always be empty.
    :type secret: str
    :param tenant: Gets or sets the tenant.
    :type tenant: str
    :param audience: Gets or sets the audience.
    :type audience: str
    :param client_id: Gets or sets the client identifier.
    :type client_id: str
    """

    _validation = {
        'type': {'required': True},
    }

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
        'secret': {'key': 'secret', 'type': 'str'},
        'tenant': {'key': 'tenant', 'type': 'str'},
        'audience': {'key': 'audience', 'type': 'str'},
        'client_id': {'key': 'clientId', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(OAuthAuthentication, self).__init__(**kwargs)
        self.type = 'ActiveDirectoryOAuth'  # type: str
        self.secret = kwargs.get('secret', None)
        self.tenant = kwargs.get('tenant', None)
        self.audience = kwargs.get('audience', None)
        self.client_id = kwargs.get('client_id', None)

class RetryPolicy(msrest.serialization.Model):
    """RetryPolicy.

    :param retry_type: Gets or sets the retry strategy to be used. Possible values include: "None",
     "Fixed".
    :type retry_type: str or ~azure.mgmt.scheduler.models.RetryType
    :param retry_interval: Gets or sets the retry interval between retries, specify duration in ISO
     8601 format.
    :type retry_interval: ~datetime.timedelta
    :param retry_count: Gets or sets the number of times a retry should be attempted.
    :type retry_count: int
    """

    _attribute_map = {
        'retry_type': {'key': 'retryType', 'type': 'str'},
        'retry_interval': {'key': 'retryInterval', 'type': 'duration'},
        'retry_count': {'key': 'retryCount', 'type': 'int'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(RetryPolicy, self).__init__(**kwargs)
        self.retry_type = kwargs.get('retry_type', None)
        self.retry_interval = kwargs.get('retry_interval', None)
        self.retry_count = kwargs.get('retry_count', None)

class ServiceBusAuthentication(msrest.serialization.Model):
    """ServiceBusAuthentication.

    :param sas_key: Gets or sets the SAS key.
    :type sas_key: str
    :param sas_key_name: Gets or sets the SAS key name.
    :type sas_key_name: str
    :param type: Gets or sets the authentication type. Possible values include: "NotSpecified",
     "SharedAccessKey".
    :type type: str or ~azure.mgmt.scheduler.models.ServiceBusAuthenticationType
    """

    _attribute_map = {
        'sas_key': {'key': 'sasKey', 'type': 'str'},
        'sas_key_name': {'key': 'sasKeyName', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(ServiceBusAuthentication, self).__init__(**kwargs)
        self.sas_key = kwargs.get('sas_key', None)
        self.sas_key_name = kwargs.get('sas_key_name', None)
        self.type = kwargs.get('type', None)

class ServiceBusBrokeredMessageProperties(msrest.serialization.Model):
    """ServiceBusBrokeredMessageProperties.

    :param content_type: Gets or sets the content type.
    :type content_type: str
    :param correlation_id: Gets or sets the correlation ID.
    :type correlation_id: str
    :param force_persistence: Gets or sets the force persistence.
    :type force_persistence: bool
    :param label: Gets or sets the label.
    :type label: str
    :param message_id: Gets or sets the message ID.
    :type message_id: str
    :param partition_key: Gets or sets the partition key.
    :type partition_key: str
    :param reply_to: Gets or sets the reply to.
    :type reply_to: str
    :param reply_to_session_id: Gets or sets the reply to session ID.
    :type reply_to_session_id: str
    :param scheduled_enqueue_time_utc: Gets or sets the scheduled enqueue time UTC.
    :type scheduled_enqueue_time_utc: ~datetime.datetime
    :param session_id: Gets or sets the session ID.
    :type session_id: str
    :param time_to_live: Gets or sets the time to live.
    :type time_to_live: ~datetime.timedelta
    :param to: Gets or sets the to.
    :type to: str
    :param via_partition_key: Gets or sets the via partition key.
    :type via_partition_key: str
    """

    _attribute_map = {
        'content_type': {'key': 'contentType', 'type': 'str'},
        'correlation_id': {'key': 'correlationId', 'type': 'str'},
        'force_persistence': {'key': 'forcePersistence', 'type': 'bool'},
        'label': {'key': 'label', 'type': 'str'},
        'message_id': {'key': 'messageId', 'type': 'str'},
        'partition_key': {'key': 'partitionKey', 'type': 'str'},
        'reply_to': {'key': 'replyTo', 'type': 'str'},
        'reply_to_session_id': {'key': 'replyToSessionId', 'type': 'str'},
        'scheduled_enqueue_time_utc': {'key': 'scheduledEnqueueTimeUtc', 'type': 'iso-8601'},
        'session_id': {'key': 'sessionId', 'type': 'str'},
        'time_to_live': {'key': 'timeToLive', 'type': 'duration'},
        'to': {'key': 'to', 'type': 'str'},
        'via_partition_key': {'key': 'viaPartitionKey', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(ServiceBusBrokeredMessageProperties, self).__init__(**kwargs)
        self.content_type = kwargs.get('content_type', None)
        self.correlation_id = kwargs.get('correlation_id', None)
        self.force_persistence = kwargs.get('force_persistence', None)
        self.label = kwargs.get('label', None)
        self.message_id = kwargs.get('message_id', None)
        self.partition_key = kwargs.get('partition_key', None)
        self.reply_to = kwargs.get('reply_to', None)
        self.reply_to_session_id = kwargs.get('reply_to_session_id', None)
        self.scheduled_enqueue_time_utc = kwargs.get('scheduled_enqueue_time_utc', None)
        self.session_id = kwargs.get('session_id', None)
        self.time_to_live = kwargs.get('time_to_live', None)
        self.to = kwargs.get('to', None)
        self.via_partition_key = kwargs.get('via_partition_key', None)

class ServiceBusMessage(msrest.serialization.Model):
    """ServiceBusMessage.

    :param authentication: Gets or sets the Service Bus authentication.
    :type authentication: ~azure.mgmt.scheduler.models.ServiceBusAuthentication
    :param brokered_message_properties: Gets or sets the brokered message properties.
    :type brokered_message_properties:
     ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties
    :param custom_message_properties: Gets or sets the custom message properties.
    :type custom_message_properties: dict[str, str]
    :param message: Gets or sets the message.
    :type message: str
    :param namespace: Gets or sets the namespace.
    :type namespace: str
    :param transport_type: Gets or sets the transport type. Possible values include:
     "NotSpecified", "NetMessaging", "AMQP".
    :type transport_type: str or ~azure.mgmt.scheduler.models.ServiceBusTransportType
    """

    _attribute_map = {
        'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'},
        'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'},
        'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'},
        'message': {'key': 'message', 'type': 'str'},
        'namespace': {'key': 'namespace', 'type': 'str'},
        'transport_type': {'key': 'transportType', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(ServiceBusMessage, self).__init__(**kwargs)
        self.authentication = kwargs.get('authentication', None)
        self.brokered_message_properties = kwargs.get('brokered_message_properties', None)
        self.custom_message_properties = kwargs.get('custom_message_properties', None)
        self.message = kwargs.get('message', None)
        self.namespace = kwargs.get('namespace', None)
        self.transport_type = kwargs.get('transport_type', None)

class ServiceBusQueueMessage(ServiceBusMessage):
    """ServiceBusQueueMessage.

    :param authentication: Gets or sets the Service Bus authentication.
    :type authentication: ~azure.mgmt.scheduler.models.ServiceBusAuthentication
    :param brokered_message_properties: Gets or sets the brokered message properties.
    :type brokered_message_properties:
     ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties
    :param custom_message_properties: Gets or sets the custom message properties.
    :type custom_message_properties: dict[str, str]
    :param message: Gets or sets the message.
    :type message: str
    :param namespace: Gets or sets the namespace.
    :type namespace: str
    :param transport_type: Gets or sets the transport type. Possible values include:
     "NotSpecified", "NetMessaging", "AMQP".
    :type transport_type: str or ~azure.mgmt.scheduler.models.ServiceBusTransportType
    :param queue_name: Gets or sets the queue name.
    :type queue_name: str
    """

    _attribute_map = {
        'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'},
        'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'},
        'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'},
        'message': {'key': 'message', 'type': 'str'},
        'namespace': {'key': 'namespace', 'type': 'str'},
        'transport_type': {'key': 'transportType', 'type': 'str'},
        'queue_name': {'key': 'queueName', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(ServiceBusQueueMessage, self).__init__(**kwargs)
        self.queue_name = kwargs.get('queue_name', None)

class ServiceBusTopicMessage(ServiceBusMessage):
    """ServiceBusTopicMessage.

    :param authentication: Gets or sets the Service Bus authentication.
    :type authentication: ~azure.mgmt.scheduler.models.ServiceBusAuthentication
    :param brokered_message_properties: Gets or sets the brokered message properties.
    :type brokered_message_properties:
     ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties
    :param custom_message_properties: Gets or sets the custom message properties.
    :type custom_message_properties: dict[str, str]
    :param message: Gets or sets the message.
    :type message: str
    :param namespace: Gets or sets the namespace.
    :type namespace: str
    :param transport_type: Gets or sets the transport type. Possible values include:
     "NotSpecified", "NetMessaging", "AMQP".
    :type transport_type: str or ~azure.mgmt.scheduler.models.ServiceBusTransportType
    :param topic_path: Gets or sets the topic path.
    :type topic_path: str
    """

    _attribute_map = {
        'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'},
        'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'},
        'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'},
        'message': {'key': 'message', 'type': 'str'},
        'namespace': {'key': 'namespace', 'type': 'str'},
        'transport_type': {'key': 'transportType', 'type': 'str'},
        'topic_path': {'key': 'topicPath', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(ServiceBusTopicMessage, self).__init__(**kwargs)
        self.topic_path = kwargs.get('topic_path', None)

class Sku(msrest.serialization.Model):
    """Sku.

    :param name: Gets or set the SKU. Possible values include: "Standard", "Free", "P10Premium",
     "P20Premium".
    :type name: str or ~azure.mgmt.scheduler.models.SkuDefinition
    """

    _attribute_map = {
        'name': {'key': 'name', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(Sku, self).__init__(**kwargs)
        self.name = kwargs.get('name', None)

class StorageQueueMessage(msrest.serialization.Model):
    """StorageQueueMessage.

    :param storage_account: Gets or sets the storage account name.
    :type storage_account: str
    :param queue_name: Gets or sets the queue name.
    :type queue_name: str
    :param sas_token: Gets or sets the SAS key.
    :type sas_token: str
    :param message: Gets or sets the message.
    :type message: str
    """

    _attribute_map = {
        'storage_account': {'key': 'storageAccount', 'type': 'str'},
        'queue_name': {'key': 'queueName', 'type': 'str'},
        'sas_token': {'key': 'sasToken', 'type': 'str'},
        'message': {'key': 'message', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(StorageQueueMessage, self).__init__(**kwargs)
        self.storage_account = kwargs.get('storage_account', None)
        self.queue_name = kwargs.get('queue_name', None)
        self.sas_token = kwargs.get('sas_token', None)
        self.message = kwargs.get('message', None)


text:
@import MediaPlayer;

@implementation RNPermissionHandlerMediaLibrary

+ (NSArray<NSString *> * _Nonnull)usageDescriptionKeys {
  return @[@"NSAppleMusicUsageDescription"];
}

+ (NSString * _Nonnull)handlerUniqueId {
  return @"ios.permission.MEDIA_LIBRARY";
}

- (void)checkWithResolver:(void (^ _Nonnull)(RNPermissionStatus))resolve
                 rejecter:(void (__unused ^ _Nonnull)(NSError * _Nonnull))reject {
#if TARGET_OS_SIMULATOR
  resolve(RNPermissionStatusNotAvailable);
#else
  switch ([MPMediaLibrary authorizationStatus]) {
    case MPMediaLibraryAuthorizationStatusNotDetermined:
      return resolve(RNPermissionStatusNotDetermined);
    case MPMediaLibraryAuthorizationStatusRestricted:
      return resolve(RNPermissionStatusRestricted);
    case MPMediaLibraryAuthorizationStatusDenied:
      return resolve(RNPermissionStatusDenied);
    case MPMediaLibraryAuthorizationStatusAuthorized:
      return resolve(RNPermissionStatusAuthorized);
  }
#endif
}

- (void)requestWithResolver:(void (^ _Nonnull)(RNPermissionStatus))resolve
                   rejecter:(void (^ _Nonnull)(NSError * _Nonnull))reject {
#if TARGET_OS_SIMULATOR
  resolve(RNPermissionStatusNotAvailable);
#else
  [MPMediaLibrary requestAuthorization:^(__unused MPMediaLibraryAuthorizationStatus status) {
    [self checkWithResolver:resolve rejecter:reject];
  }];
#endif
}

@end


text:
#include "omxtypes.h"
#include "armOMX.h"
#include "omxVC.h"

#include "armCOMM.h"
#include "armVC.h"

/**
 * Function:  omxVCM4P10_SubAndTransformQDQResidual   (6.3.5.8.1)
 *
 * Description:
 * This function subtracts the prediction signal from the original signal to
 * produce the difference signal and then performs a 4x4 integer transform and
 * quantization. The quantized transformed coefficients are stored as
 * pDstQuantCoeff. This function can also output dequantized coefficients or
 * unquantized DC coefficients optionally by setting the pointers
 * pDstDeQuantCoeff, pDCCoeff.
 *
 * Input Arguments:
 *
 *   pSrcOrg - Pointer to original signal. 4-byte alignment required.
 *   pSrcPred - Pointer to prediction signal. 4-byte alignment required.
 *   iSrcOrgStep - Step of the original signal buffer; must be a multiple of
 *            4.
 *   iSrcPredStep - Step of the prediction signal buffer; must be a multiple
 *            of 4.
 *   pNumCoeff -Number of non-zero coefficients after quantization. If this
 *            parameter is not required, it is set to NULL.
 *   nThreshSAD - Zero-block early detection threshold. If this parameter is
 *            not required, it is set to 0.
 *   iQP - Quantization parameter; must be in the range [0,51].
 *   bIntra - Indicates whether this is an INTRA block, either 1-INTRA or
 *            0-INTER
 *
 * Output Arguments:
 *
 *   pDstQuantCoeff - Pointer to the quantized transformed coefficients.
 *            8-byte alignment required.
 *   pDstDeQuantCoeff - Pointer to the dequantized transformed coefficients
 *            if this parameter is not equal to NULL.  8-byte alignment
 *            required.
 *   pDCCoeff - Pointer to the unquantized DC coefficient if this parameter
 *            is not equal to NULL.
 *
 * Return Value:
 *
 *    OMX_Sts_NoErr - no error
 *    OMX_Sts_BadArgErr - bad arguments; returned if any of the following
 *              conditions are true:
 *    -    at least one of the following pointers is NULL:
 *            pSrcOrg, pSrcPred, pNumCoeff, pDstQuantCoeff,
 *            pDstDeQuantCoeff, pDCCoeff
 *    -    pSrcOrg is not aligned on a 4-byte boundary
 *    -    pSrcPred is not aligned on a 4-byte boundary
 *    -    iSrcOrgStep is not a multiple of 4
 *    -    iSrcPredStep is not a multiple of 4
 *    -    pDstQuantCoeff or pDstDeQuantCoeff is not aligned on an 8-byte boundary
 *
 */
 OMXResult omxVCM4P10_SubAndTransformQDQResidual (
	 const OMX_U8*		pSrcOrg,
	 const OMX_U8*		pSrcPred,
	 OMX_U32		iSrcOrgStep,
	 OMX_U32		iSrcPredStep,
	 OMX_S16*	    pDstQuantCoeff,
	 OMX_S16* 	    pDstDeQuantCoeff,
	 OMX_S16*	    pDCCoeff,
	 OMX_S8*		pNumCoeff,
	 OMX_U32		nThreshSAD,
	 OMX_U32		iQP,
	 OMX_U8		    bIntra
)
{
    OMX_INT     i, j;
    OMX_S8      NumCoeff = 0;
    OMX_S16     Buf[16], m[16];
    OMX_U32     QBits, QPper, QPmod, f;
    OMX_S32     Value, MF, ThreshDC;

    /* check for argument error */
    armRetArgErrIf(pSrcOrg == NULL, OMX_Sts_BadArgErr)
	armRetArgErrIf(pDstDeQuantCoeff == NULL, OMX_Sts_BadArgErr)
	armRetArgErrIf(pNumCoeff == NULL, OMX_Sts_BadArgErr)
	armRetArgErrIf(pDCCoeff == NULL, OMX_Sts_BadArgErr)
    armRetArgErrIf(armNot4ByteAligned(pSrcOrg), OMX_Sts_BadArgErr)
    armRetArgErrIf(pSrcPred == NULL, OMX_Sts_BadArgErr)
    armRetArgErrIf(armNot4ByteAligned(pSrcPred), OMX_Sts_BadArgErr)
    armRetArgErrIf(pDstQuantCoeff == NULL, OMX_Sts_BadArgErr)
    armRetArgErrIf(armNot8ByteAligned(pDstQuantCoeff), OMX_Sts_BadArgErr)
    armRetArgErrIf((pDstDeQuantCoeff != NULL) &&
			armNot8ByteAligned(pDstDeQuantCoeff), OMX_Sts_BadArgErr)
    armRetArgErrIf((bIntra != 0) && (bIntra != 1), OMX_Sts_BadArgErr)
    armRetArgErrIf(iQP > 51, OMX_Sts_BadArgErr)
    armRetArgErrIf(iSrcOrgStep == 0, OMX_Sts_BadArgErr)
    armRetArgErrIf(iSrcPredStep == 0, OMX_Sts_BadArgErr)
    armRetArgErrIf(iSrcOrgStep & 3, OMX_Sts_BadArgErr)
    armRetArgErrIf(iSrcPredStep & 3, OMX_Sts_BadArgErr)

    /*
     * Zero-Block Early detection using nThreshSAD param
     */

    QPper = iQP / 6;
    QPmod = iQP % 6;
    QBits = 15 + QPper;

    f = (1 << QBits) / (bIntra ? 3 : 6);

    /* Do Zero-Block Early detection if enabled */
    if (nThreshSAD)
    {
        ThreshDC = ((1 << QBits) - f) / armVCM4P10_MFMatrix[QPmod][0];
        if (nThreshSAD < ThreshDC)
        {
            /* Set block to zero */
            if (pDCCoeff != NULL)
            {
                *pDCCoeff = 0;
            }

            for (j = 0; j < 4; j++)
            {
                for (i = 0; i < 4; i++)
                {
                    pDstQuantCoeff [4 * j + i] = 0;
                    if (pDstDeQuantCoeff != NULL)
                    {
                        pDstDeQuantCoeff [4 * j + i] = 0;
                    }
                }
            }

            if (pNumCoeff != NULL)
            {
                *pNumCoeff = 0;
            }
            return OMX_Sts_NoErr;
        }
    }

   /* Calculate difference */
    for (j = 0; j < 4; j++)
    {
        for (i = 0; i < 4; i++)
        {
            Buf [j * 4 + i] =
                pSrcOrg [j * iSrcOrgStep + i] - pSrcPred [j * iSrcPredStep + i];
        }
    }

    /* Residual Transform */
    armVCM4P10_FwdTransformResidual4x4 (m, Buf);

    if (pDCCoeff != NULL)
    {
        /* Copy unquantized DC value into pointer */
        *pDCCoeff = m[0];
    }

    /* Quantization */
    for (j = 0; j < 4; j++)
    {
        for (i = 0; i < 4; i++)
        {
            MF = armVCM4P10_MFMatrix[QPmod][armVCM4P10_PosToVCol4x4[j * 4 + i]];
            Value = armAbs(m[j * 4 + i]) * MF + f;
            Value >>= QBits;
            Value = m[j * 4 + i] < 0 ? -Value : Value;
            Buf[4 * j + i] = pDstQuantCoeff [4 * j + i] = (OMX_S16)Value;
            if ((pNumCoeff != NULL) && Value)
            {
                NumCoeff++;
            }
        }
    }

    /* Output number of non-zero Coeffs */
    if (pNumCoeff != NULL)
    {
        *pNumCoeff = NumCoeff;
    }

    /* Residual Inv Transform */
    if (pDstDeQuantCoeff != NULL)
    {
        /* Re Scale */
        for (j = 0; j < 4; j++)
        {
            for (i = 0; i < 4; i++)
            {
                m [j * 4 + i]  = Buf [j * 4 + i] * (1 << QPper) *
                    armVCM4P10_VMatrix[QPmod][armVCM4P10_PosToVCol4x4[j * 4 + i]];
            }
        }
        armVCM4P10_TransformResidual4x4 (pDstDeQuantCoeff, m);
    }

    return OMX_Sts_NoErr;
}

/*****************************************************************************
 *                              END OF FILE
 *****************************************************************************/


text:
'use strict';

/**
 * @ngdoc function
 * @name githubPageApp.controller:AboutCtrl
 * @description
 * # AboutCtrl
 * Controller of the githubPageApp
 */
angular.module('githubPageApp')
  .controller('AboutCtrl', ['$scope', function ($scope) {
    $scope.awesomeThings = [
      'HTML5 Boilerplate',
      'AngularJS',
      'Karma'
    ];
  }]);


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Lecanora subsoluta Nyl.

### Remarks
null