text
stringlengths 3
1.05M
|
|---|
'use strict';
angular.module('ncApp', [
'ngAnimate',
'ngRoute',
'core',
'phoneList',
'phoneDetail'
]);
|
"""
With these settings, tests run faster.
"""
from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = False
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env("DJANGO_SECRET_KEY", default="53lx7toEgLD7Te8udFANsBvTmlXWMBPROwWryZc23TItJcWLJ0ispqF3ixA3usvX")
# https://docs.djangoproject.com/en/dev/ref/settings/#test-runner
TEST_RUNNER = "django.test.runner.DiscoverRunner"
# CACHES
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#caches
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache", "LOCATION": ""
}
}
# PASSWORDS
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#password-hashers
PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"]
# TEMPLATES
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#templates
TEMPLATES[0]["OPTIONS"]["debug"] = DEBUG # noqa F405
TEMPLATES[0]["OPTIONS"]["loaders"] = [ # noqa F405
(
"django.template.loaders.cached.Loader",
[
"django.template.loaders.filesystem.Loader",
"django.template.loaders.app_directories.Loader",
],
)
]
# EMAIL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend"
# https://docs.djangoproject.com/en/dev/ref/settings/#email-host
EMAIL_HOST = "localhost"
# https://docs.djangoproject.com/en/dev/ref/settings/#email-port
EMAIL_PORT = 1025
# Your stuff...
# ------------------------------------------------------------------------------
|
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
'use strict';
/**
* Notification statistics
*
*/
class ListOKResponseValuesItemModel {
/**
* Create a ListOKResponseValuesItemModel.
* @property {string} notificationId Notification id.
* @property {string} [name] Notification name
* @property {object} [notificationTarget] Type of Notification target
* (audiences, devices, user ids, account ids or broadcast). The object must
* include the correct properties for the specified target type except for
* broadcast.
* @property {string} [notificationTarget.type] Polymorphic Discriminator
* @property {date} [sendTime] Notification send time
* @property {number} [pnsSendFailure] Number of the notifications failed to
* send to the push provider.
* @property {number} [pnsSendSuccess] Number of the notifications
* successfully sent to push the provider.
* @property {string} state State of the notification. Possible values
* include: 'Queued', 'Sending', 'Completed', 'Failed', 'NoTargetFound'
*/
constructor() {
}
/**
* Defines the metadata of ListOKResponseValuesItemModel
*
* @returns {object} metadata of ListOKResponseValuesItemModel
*
*/
mapper() {
return {
required: false,
serializedName: 'ListOKResponse_valuesItem',
type: {
name: 'Composite',
className: 'ListOKResponseValuesItemModel',
modelProperties: {
notificationId: {
required: true,
serializedName: 'notification_id',
type: {
name: 'String'
}
},
name: {
required: false,
serializedName: 'name',
constraints: {
MaxLength: 64
},
type: {
name: 'String'
}
},
notificationTarget: {
required: false,
serializedName: 'notification_target',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'type',
clientName: 'type'
},
uberParent: 'ListOKResponseValuesItemNotificationTarget',
className: 'ListOKResponseValuesItemNotificationTarget'
}
},
sendTime: {
required: false,
serializedName: 'send_time',
type: {
name: 'DateTime'
}
},
pnsSendFailure: {
required: false,
serializedName: 'pns_send_failure',
type: {
name: 'Number'
}
},
pnsSendSuccess: {
required: false,
serializedName: 'pns_send_success',
type: {
name: 'Number'
}
},
state: {
required: true,
serializedName: 'state',
type: {
name: 'String'
}
}
}
}
};
}
}
module.exports = ListOKResponseValuesItemModel;
|
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from logging import getLogger
from os import environ
from django.conf import settings
from opentelemetry.instrumentation.django.environment_variables import (
OTEL_PYTHON_DJANGO_INSTRUMENT,
)
from opentelemetry.instrumentation.django.middleware import _DjangoMiddleware
from opentelemetry.instrumentation.django.version import __version__
from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
from opentelemetry.instrumentation.metric import (
HTTPMetricRecorder,
HTTPMetricType,
MetricMixin,
)
_logger = getLogger(__name__)
class DjangoInstrumentor(BaseInstrumentor, MetricMixin):
"""An instrumentor for Django
See `BaseInstrumentor`
"""
_opentelemetry_middleware = ".".join(
[_DjangoMiddleware.__module__, _DjangoMiddleware.__qualname__]
)
def _instrument(self, **kwargs):
# FIXME this is probably a pattern that will show up in the rest of the
# ext. Find a better way of implementing this.
if environ.get(OTEL_PYTHON_DJANGO_INSTRUMENT) == "False":
return
# This can not be solved, but is an inherent problem of this approach:
# the order of middleware entries matters, and here you have no control
# on that:
# https://docs.djangoproject.com/en/3.0/topics/http/middleware/#activating-middleware
# https://docs.djangoproject.com/en/3.0/ref/middleware/#middleware-ordering
settings_middleware = getattr(settings, "MIDDLEWARE", [])
# Django allows to specify middlewares as a tuple, so we convert this tuple to a
# list, otherwise we wouldn't be able to call append/remove
if isinstance(settings_middleware, tuple):
settings_middleware = list(settings_middleware)
settings_middleware.insert(0, self._opentelemetry_middleware)
self.init_metrics(
__name__, __version__,
)
metric_recorder = HTTPMetricRecorder(self.meter, HTTPMetricType.SERVER)
setattr(settings, "OTEL_METRIC_RECORDER", metric_recorder)
setattr(settings, "MIDDLEWARE", settings_middleware)
def _uninstrument(self, **kwargs):
settings_middleware = getattr(settings, "MIDDLEWARE", None)
# FIXME This is starting to smell like trouble. We have 2 mechanisms
# that may make this condition be True, one implemented in
# BaseInstrumentor and another one implemented in _instrument. Both
# stop _instrument from running and thus, settings_middleware not being
# set.
if settings_middleware is None or (
self._opentelemetry_middleware not in settings_middleware
):
return
settings_middleware.remove(self._opentelemetry_middleware)
setattr(settings, "MIDDLEWARE", settings_middleware)
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = [
'GatewayGatewayNetworkInterface',
'GatewaySmbActiveDirectorySettings',
'NfsFileShareCacheAttributes',
'NfsFileShareNfsFileShareDefaults',
'SmbFileShareCacheAttributes',
]
@pulumi.output_type
class GatewayGatewayNetworkInterface(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "ipv4Address":
suggest = "ipv4_address"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in GatewayGatewayNetworkInterface. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
GatewayGatewayNetworkInterface.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
GatewayGatewayNetworkInterface.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
ipv4_address: Optional[str] = None):
"""
:param str ipv4_address: The Internet Protocol version 4 (IPv4) address of the interface.
"""
if ipv4_address is not None:
pulumi.set(__self__, "ipv4_address", ipv4_address)
@property
@pulumi.getter(name="ipv4Address")
def ipv4_address(self) -> Optional[str]:
"""
The Internet Protocol version 4 (IPv4) address of the interface.
"""
return pulumi.get(self, "ipv4_address")
@pulumi.output_type
class GatewaySmbActiveDirectorySettings(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "domainName":
suggest = "domain_name"
elif key == "activeDirectoryStatus":
suggest = "active_directory_status"
elif key == "domainControllers":
suggest = "domain_controllers"
elif key == "organizationalUnit":
suggest = "organizational_unit"
elif key == "timeoutInSeconds":
suggest = "timeout_in_seconds"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in GatewaySmbActiveDirectorySettings. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
GatewaySmbActiveDirectorySettings.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
GatewaySmbActiveDirectorySettings.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
domain_name: str,
password: str,
username: str,
active_directory_status: Optional[str] = None,
domain_controllers: Optional[Sequence[str]] = None,
organizational_unit: Optional[str] = None,
timeout_in_seconds: Optional[int] = None):
"""
:param str domain_name: The name of the domain that you want the gateway to join.
:param str password: The password of the user who has permission to add the gateway to the Active Directory domain.
:param str username: The user name of user who has permission to add the gateway to the Active Directory domain.
:param Sequence[str] domain_controllers: List of IPv4 addresses, NetBIOS names, or host names of your domain server.
If you need to specify the port number include it after the colon (“:”). For example, `mydc.mydomain.com:389`.
:param str organizational_unit: The organizational unit (OU) is a container in an Active Directory that can hold users, groups,
computers, and other OUs and this parameter specifies the OU that the gateway will join within the AD domain.
:param int timeout_in_seconds: Specifies the time in seconds, in which the JoinDomain operation must complete. The default is `20` seconds.
"""
pulumi.set(__self__, "domain_name", domain_name)
pulumi.set(__self__, "password", password)
pulumi.set(__self__, "username", username)
if active_directory_status is not None:
pulumi.set(__self__, "active_directory_status", active_directory_status)
if domain_controllers is not None:
pulumi.set(__self__, "domain_controllers", domain_controllers)
if organizational_unit is not None:
pulumi.set(__self__, "organizational_unit", organizational_unit)
if timeout_in_seconds is not None:
pulumi.set(__self__, "timeout_in_seconds", timeout_in_seconds)
@property
@pulumi.getter(name="domainName")
def domain_name(self) -> str:
"""
The name of the domain that you want the gateway to join.
"""
return pulumi.get(self, "domain_name")
@property
@pulumi.getter
def password(self) -> str:
"""
The password of the user who has permission to add the gateway to the Active Directory domain.
"""
return pulumi.get(self, "password")
@property
@pulumi.getter
def username(self) -> str:
"""
The user name of user who has permission to add the gateway to the Active Directory domain.
"""
return pulumi.get(self, "username")
@property
@pulumi.getter(name="activeDirectoryStatus")
def active_directory_status(self) -> Optional[str]:
return pulumi.get(self, "active_directory_status")
@property
@pulumi.getter(name="domainControllers")
def domain_controllers(self) -> Optional[Sequence[str]]:
"""
List of IPv4 addresses, NetBIOS names, or host names of your domain server.
If you need to specify the port number include it after the colon (“:”). For example, `mydc.mydomain.com:389`.
"""
return pulumi.get(self, "domain_controllers")
@property
@pulumi.getter(name="organizationalUnit")
def organizational_unit(self) -> Optional[str]:
"""
The organizational unit (OU) is a container in an Active Directory that can hold users, groups,
computers, and other OUs and this parameter specifies the OU that the gateway will join within the AD domain.
"""
return pulumi.get(self, "organizational_unit")
@property
@pulumi.getter(name="timeoutInSeconds")
def timeout_in_seconds(self) -> Optional[int]:
"""
Specifies the time in seconds, in which the JoinDomain operation must complete. The default is `20` seconds.
"""
return pulumi.get(self, "timeout_in_seconds")
@pulumi.output_type
class NfsFileShareCacheAttributes(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "cacheStaleTimeoutInSeconds":
suggest = "cache_stale_timeout_in_seconds"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in NfsFileShareCacheAttributes. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
NfsFileShareCacheAttributes.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
NfsFileShareCacheAttributes.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
cache_stale_timeout_in_seconds: Optional[int] = None):
"""
:param int cache_stale_timeout_in_seconds: Refreshes a file share's cache by using Time To Live (TTL).
TTL is the length of time since the last refresh after which access to the directory would cause the file gateway
to first refresh that directory's contents from the Amazon S3 bucket. Valid Values: 300 to 2,592,000 seconds (5 minutes to 30 days)
"""
if cache_stale_timeout_in_seconds is not None:
pulumi.set(__self__, "cache_stale_timeout_in_seconds", cache_stale_timeout_in_seconds)
@property
@pulumi.getter(name="cacheStaleTimeoutInSeconds")
def cache_stale_timeout_in_seconds(self) -> Optional[int]:
"""
Refreshes a file share's cache by using Time To Live (TTL).
TTL is the length of time since the last refresh after which access to the directory would cause the file gateway
to first refresh that directory's contents from the Amazon S3 bucket. Valid Values: 300 to 2,592,000 seconds (5 minutes to 30 days)
"""
return pulumi.get(self, "cache_stale_timeout_in_seconds")
@pulumi.output_type
class NfsFileShareNfsFileShareDefaults(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "directoryMode":
suggest = "directory_mode"
elif key == "fileMode":
suggest = "file_mode"
elif key == "groupId":
suggest = "group_id"
elif key == "ownerId":
suggest = "owner_id"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in NfsFileShareNfsFileShareDefaults. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
NfsFileShareNfsFileShareDefaults.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
NfsFileShareNfsFileShareDefaults.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
directory_mode: Optional[str] = None,
file_mode: Optional[str] = None,
group_id: Optional[str] = None,
owner_id: Optional[str] = None):
"""
:param str directory_mode: The Unix directory mode in the string form "nnnn". Defaults to `"0777"`.
:param str file_mode: The Unix file mode in the string form "nnnn". Defaults to `"0666"`.
:param str group_id: The default group ID for the file share (unless the files have another group ID specified). Defaults to `65534` (`nfsnobody`). Valid values: `0` through `4294967294`.
:param str owner_id: The default owner ID for the file share (unless the files have another owner ID specified). Defaults to `65534` (`nfsnobody`). Valid values: `0` through `4294967294`.
"""
if directory_mode is not None:
pulumi.set(__self__, "directory_mode", directory_mode)
if file_mode is not None:
pulumi.set(__self__, "file_mode", file_mode)
if group_id is not None:
pulumi.set(__self__, "group_id", group_id)
if owner_id is not None:
pulumi.set(__self__, "owner_id", owner_id)
@property
@pulumi.getter(name="directoryMode")
def directory_mode(self) -> Optional[str]:
"""
The Unix directory mode in the string form "nnnn". Defaults to `"0777"`.
"""
return pulumi.get(self, "directory_mode")
@property
@pulumi.getter(name="fileMode")
def file_mode(self) -> Optional[str]:
"""
The Unix file mode in the string form "nnnn". Defaults to `"0666"`.
"""
return pulumi.get(self, "file_mode")
@property
@pulumi.getter(name="groupId")
def group_id(self) -> Optional[str]:
"""
The default group ID for the file share (unless the files have another group ID specified). Defaults to `65534` (`nfsnobody`). Valid values: `0` through `4294967294`.
"""
return pulumi.get(self, "group_id")
@property
@pulumi.getter(name="ownerId")
def owner_id(self) -> Optional[str]:
"""
The default owner ID for the file share (unless the files have another owner ID specified). Defaults to `65534` (`nfsnobody`). Valid values: `0` through `4294967294`.
"""
return pulumi.get(self, "owner_id")
@pulumi.output_type
class SmbFileShareCacheAttributes(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "cacheStaleTimeoutInSeconds":
suggest = "cache_stale_timeout_in_seconds"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in SmbFileShareCacheAttributes. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
SmbFileShareCacheAttributes.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
SmbFileShareCacheAttributes.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
cache_stale_timeout_in_seconds: Optional[int] = None):
"""
:param int cache_stale_timeout_in_seconds: Refreshes a file share's cache by using Time To Live (TTL).
TTL is the length of time since the last refresh after which access to the directory would cause the file gateway
to first refresh that directory's contents from the Amazon S3 bucket. Valid Values: 300 to 2,592,000 seconds (5 minutes to 30 days)
"""
if cache_stale_timeout_in_seconds is not None:
pulumi.set(__self__, "cache_stale_timeout_in_seconds", cache_stale_timeout_in_seconds)
@property
@pulumi.getter(name="cacheStaleTimeoutInSeconds")
def cache_stale_timeout_in_seconds(self) -> Optional[int]:
"""
Refreshes a file share's cache by using Time To Live (TTL).
TTL is the length of time since the last refresh after which access to the directory would cause the file gateway
to first refresh that directory's contents from the Amazon S3 bucket. Valid Values: 300 to 2,592,000 seconds (5 minutes to 30 days)
"""
return pulumi.get(self, "cache_stale_timeout_in_seconds")
|
const Sequelize = require('sequelize');
require('dotenv').config();
let sequelize;
if (process.env.JAWSDB_URL) {
sequelize = new Sequelize(process.env.JAWSDB_URL);
} else {
sequelize = new Sequelize(
process.env.DB_NAME,
process.env.DB_USER,
process.env.DB_PASSWORD,
{
host: 'localhost',
dialect: 'mysql',
port: 3306
}
);
}
module.exports = sequelize;
|
const merge = require('webpack-merge');
const common = require('./webpack.common.js');
module.exports = merge(common, {
mode: 'development',
devtool: 'source-map',
});
|
#import <SenTestingKit/SenTestingKit.h>
@interface UnitTests : SenTestCase
{
// QCOpenGLContext *context;
}
@end
|
/* eslint-disable */
import React from 'react';
import { connect } from 'dva';
import { Button } from 'antd';
import styles from './Launcher.css';
class PnoteLancher extends React.Component {
constructor(props){
super(props);
//only once
// this.state = {
// title:'',
// content: props,
// }
// components unmount
// this.setState({
// content: props,
// });
console.log("begin constructor...")
}
componentDidMount() {
console.log("begin componentDidMount...")
}
componentWillUpdate() {
console.log("begin componentWillUpdate...")
//chao guo ci shu si xun huan
// this.setState({
// content:this.props,
// })
}
componentDidUpdate() {
console.log("begin componentDidUpdate...")
//chao guo ci shu
// this.setState({
// content:this.props,
// })
//chao guo ci shu si xun huan
console.log(this.props)
// var {content = "" }= this.props
// console.log("debut666:"+content)
// if (content === "") {
// console.log("will not update state")
// }else{
// this.setState({
// content:content,
// })
// }
}
componentWillReceiveProps(nextProps) {
console.log("begin componentWillReceiveProps...")
var {content = "" }= nextProps
console.log("debut666:"+content)
if (content === "") {
console.log("will not update state")
}else{
this.setState({
content:content,
})
}
}
state = {
title: '',
content: '',
};
handleSubmit = () => {
const { title, content } = this.state;
const { dispatch, location } = this.props;
let err = null;
if (!title && !err) {
console.info("jinru1")
err = {
content: '请输入标题',
};
}
if (!content && !err) {
console.info("jinru2")
err = {
content: '请输入正文',
};
}
console.info("jinru3")
console.info(dispatch)
dispatch({
type: 'mlauncher/launcherc',
query: {
flag: 1,
title: title,
content: content,
dispatch,
},
_pathname: location.pathname,
// callback() {
// Toast.hide();
// dispatch(routerRedux.push('/pnote_home'));
// },
});
}
handleSubmitGet = () => {
const { title, content } = this.state;
const { dispatch, location } = this.props;
let err = null;
if (!title && !err) {
console.info("jinru1")
err = {
content: '请输入标题',
};
}
var rn = dispatch({
type: 'mlauncher/launcherget',
query: {
flag: 1,
title: title,
content: content,
dispatch,
},
_pathname: location.pathname,
// callback(data,ab) {
// console.log("call back...")
// console.log("22222:"+ JSON.stringify(data))
// ab.setState({
// content: data.data,
// })
// },
});
console.log("11111111111111")
console.log("ddd"+JSON.stringify(rn))
}
handleSubmitGetPNote = () => {
const { title, content } = this.state;
const { dispatch, location } = this.props;
let err = null;
if (!title && !err) {
console.info("jinru1")
err = {
content: '请输入标题',
};
}
var rn = dispatch({
type: 'mlauncher/launcherget',
query: {
flag: 2,
title: title,
content: content,
dispatch,
},
_pathname: location.pathname,
// callback(data,ab) {
// console.log("call back...")
// console.log("22222:"+ JSON.stringify(data))
// ab.setState({
// content: data.data,
// })
// },
});
console.log("11111111111111")
console.log("ddd"+JSON.stringify(rn))
}
handleSubmitPNote = () => {
const { title, content } = this.state;
const { dispatch, location } = this.props;
let err = null;
if (!title && !err) {
console.info("jinru1")
err = {
content: '请输入标题',
};
}
if (!content && !err) {
console.info("jinru2")
err = {
content: '请输入正文',
};
}
console.info("jinru3")
console.info(dispatch)
dispatch({
type: 'mlauncher/launcherc',
query: {
flag: 2,
title: title,
content: content,
dispatch,
},
_pathname: location.pathname,
// callback() {
// Toast.hide();
// dispatch(routerRedux.push('/pnote_home'));
// },
});
}
titleChagne = (e) => {
const v = e.target.value;
this.setState({
title: v,
});
}
contentChagne = (e) => {
const v = e.target.value;
this.setState({
content: v,
});
}
getV = (e) => {
this.setState({
content: e,
});
}
render() {
var { title,content } = this.state;
// can not update the value and io input
// var {content = "" }= this.props
return (
<div >
<div className={styles.title}><input id="title" className={styles.center} value={title} onChange={this.titleChagne} placeholder="标题" /> <Button onClick={this.handleSubmitGet} >获取blog</Button> <Button onClick={this.handleSubmitGetPNote} >获取pnote</Button></div>
<div className={styles.content}><textarea id="content" value={content} onChange={this.contentChagne} rows="41" cols="140" placeholder="正文"></textarea></div>
<div className={styles.commit}><Button onClick={this.handleSubmit.bind(1)} >作为博客上传</Button> <Button onClick={this.handleSubmitPNote} >作为pnote上传</Button></div>
<div id="footer">
<div id="footer-inner">
<p id={styles.copyright}>Copyright (c) 2016 - 2017 owner of copyright
Powered by <a href="https://github.com/Anteoy/liongo">liongo lionreact</a>
</p>
</div>
</div>
</div>
);
}
}
function mapStateToProps(state) {
const {content} = state.mlauncher
return {
content
};
}
export default connect(mapStateToProps)(PnoteLancher);
|
# -*- coding: utf-8 -*-
def test_simple():
"""Simple test example"""
t1 = 1
t2 = 1
assert t1 == t2
|
# coding: utf-8
"""
UltraCart Rest API V2
UltraCart REST API Version 2
OpenAPI spec version: 2.0.0
Contact: support@ultracart.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class AutoOrdersResponse(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'auto_orders': 'list[AutoOrder]',
'error': 'Error',
'metadata': 'ResponseMetadata',
'success': 'bool'
}
attribute_map = {
'auto_orders': 'auto_orders',
'error': 'error',
'metadata': 'metadata',
'success': 'success'
}
def __init__(self, auto_orders=None, error=None, metadata=None, success=None):
"""
AutoOrdersResponse - a model defined in Swagger
"""
self._auto_orders = None
self._error = None
self._metadata = None
self._success = None
self.discriminator = None
if auto_orders is not None:
self.auto_orders = auto_orders
if error is not None:
self.error = error
if metadata is not None:
self.metadata = metadata
if success is not None:
self.success = success
@property
def auto_orders(self):
"""
Gets the auto_orders of this AutoOrdersResponse.
:return: The auto_orders of this AutoOrdersResponse.
:rtype: list[AutoOrder]
"""
return self._auto_orders
@auto_orders.setter
def auto_orders(self, auto_orders):
"""
Sets the auto_orders of this AutoOrdersResponse.
:param auto_orders: The auto_orders of this AutoOrdersResponse.
:type: list[AutoOrder]
"""
self._auto_orders = auto_orders
@property
def error(self):
"""
Gets the error of this AutoOrdersResponse.
:return: The error of this AutoOrdersResponse.
:rtype: Error
"""
return self._error
@error.setter
def error(self, error):
"""
Sets the error of this AutoOrdersResponse.
:param error: The error of this AutoOrdersResponse.
:type: Error
"""
self._error = error
@property
def metadata(self):
"""
Gets the metadata of this AutoOrdersResponse.
:return: The metadata of this AutoOrdersResponse.
:rtype: ResponseMetadata
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
"""
Sets the metadata of this AutoOrdersResponse.
:param metadata: The metadata of this AutoOrdersResponse.
:type: ResponseMetadata
"""
self._metadata = metadata
@property
def success(self):
"""
Gets the success of this AutoOrdersResponse.
Indicates if API call was successful
:return: The success of this AutoOrdersResponse.
:rtype: bool
"""
return self._success
@success.setter
def success(self, success):
"""
Sets the success of this AutoOrdersResponse.
Indicates if API call was successful
:param success: The success of this AutoOrdersResponse.
:type: bool
"""
self._success = success
def to_dict(self):
"""
Returns the model properties as a dict
"""
result = {}
for attr, _ in iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""
Returns the string representation of the model
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()
def __eq__(self, other):
"""
Returns true if both objects are equal
"""
if not isinstance(other, AutoOrdersResponse):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""
Returns true if both objects are not equal
"""
return not self == other
|
import { module } from 'qunit';
import {
setupRenderingTest
} from 'ember-qunit';
import { render, click, settled } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import {
accordionClassFor,
accordionItemHeadClass,
test,
testBS3,
testBS4,
visibilityClass
} from '../../helpers/bootstrap-test';
import setupNoDeprecations from '../../helpers/setup-no-deprecations';
import a11yAudit from 'ember-a11y-testing/test-support/audit'
module('Integration | Component | bs-accordion', function(hooks) {
setupRenderingTest(hooks);
setupNoDeprecations(hooks);
hooks.beforeEach(function() {
this.actions = {};
this.send = (actionName, ...args) => this.actions[actionName].apply(this, args);
});
testBS3('accordion has correct default markup', async function(assert) {
await render(hbs`{{#bs-accordion as |acc|}}
{{#acc.item value=1 title="TITLE1"}}CONTENT1{{/acc.item}}
{{#acc.item value=2 title="TITLE2"}}CONTENT2{{/acc.item}}
{{/bs-accordion}}`);
assert.dom('.panel-group').exists('accordion has panel-group class');
});
testBS4('accordion has correct default markup', async function(assert) {
await render(hbs`{{#bs-accordion as |acc|}}
{{#acc.item value=1 title="TITLE1"}}CONTENT1{{/acc.item}}
{{#acc.item value=2 title="TITLE2"}}CONTENT2{{/acc.item}}
{{/bs-accordion}}`);
assert.dom('.accordion .card').exists('accordion has card within accordion');
});
test('accordion yields items', async function(assert) {
await render(hbs`{{#bs-accordion as |acc|}}
{{#acc.item value=1 title="TITLE1"}}CONTENT1{{/acc.item}}
{{#acc.item value=2 title="TITLE2"}}CONTENT2{{/acc.item}}
{{/bs-accordion}}`);
assert.dom(`.${accordionClassFor()}`).exists({ count: 2 }, 'accordion yields item');
});
test('accordion with preselected item has this item expanded', async function(assert) {
this.set('selected', 1);
await render(hbs`{{#bs-accordion selected=selected as |acc|}}
{{#acc.item value=1 title="TITLE1"}}CONTENT1{{/acc.item}}
{{#acc.item value=2 title="TITLE2"}}CONTENT2{{/acc.item}}
{{/bs-accordion}}`);
assert.dom(`.${accordionClassFor()}:first-child .${accordionItemHeadClass()}`).hasNoClass('collapsed', `${accordionItemHeadClass()} has not collapsed class`);
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasClass('collapse', 'tabpanel has collapse class');
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasClass(visibilityClass(), `tabpanel has ${visibilityClass()} class`);
});
test('changing selected item expands this item', async function(assert) {
this.set('selected', 1);
await render(hbs`{{#bs-accordion selected=selected as |acc|}}
{{#acc.item value=1 title="TITLE1"}}CONTENT1{{/acc.item}}
{{#acc.item value=2 title="TITLE2"}}CONTENT2{{/acc.item}}
{{/bs-accordion}}`);
this.set('selected', 2);
// wait for transitions to complete
await settled();
assert.dom(`.${accordionClassFor()}:last-child .${accordionItemHeadClass()}`).hasNoClass('collapsed', `${accordionItemHeadClass()} has not collapsed class`);
assert.dom(`.${accordionClassFor()}:last-child [role="tabpanel"]`).hasClass('collapse', 'tabpanel has collapse class');
assert.dom(`.${accordionClassFor()}:last-child [role="tabpanel"]`).hasClass(visibilityClass(), 'tabpanel is visible');
});
test('clicking collapsed item expands it', async function(assert) {
await render(hbs`{{#bs-accordion as |acc|}}
{{#acc.item value=1 title="TITLE1"}}CONTENT1{{/acc.item}}
{{#acc.item value=2 title="TITLE2"}}CONTENT2{{/acc.item}}
{{/bs-accordion}}`);
await click(`.${accordionClassFor()}:first-child .${accordionItemHeadClass()}`);
assert.dom(`.${accordionClassFor()}:first-child .${accordionItemHeadClass()}`).hasNoClass('collapsed', `${accordionItemHeadClass()} has not collapsed class`);
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasClass('collapse', 'tabpanel has collapse class');
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasClass(visibilityClass(), 'tabpanel is visible');
});
test('clicking expanded item collapses it', async function(assert) {
await render(hbs`{{#bs-accordion selected=1 as |acc|}}
{{#acc.item value=1 title="TITLE1"}}CONTENT1{{/acc.item}}
{{#acc.item value=2 title="TITLE2"}}CONTENT2{{/acc.item}}
{{/bs-accordion}}`);
assert.dom(`.${accordionClassFor()}:first-child .${accordionItemHeadClass()}`).hasNoClass('collapsed', `${accordionItemHeadClass()} has not collapsed class`);
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasClass('collapse', 'tabpanel has collapse class');
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasClass(visibilityClass(), 'tabpanel is visible');
await click(`.${accordionItemHeadClass()}`);
assert.dom(`.${accordionClassFor()}:first-child .${accordionItemHeadClass()}`).hasClass('collapsed', `${accordionItemHeadClass()} has collapsed class`);
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasClass('collapse', 'tabpanel has collapse class');
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasNoClass(visibilityClass(), 'tabpanel is hidden');
});
test('calls onChange action when changing selection', async function(assert) {
let action = this.spy();
this.actions.change = action;
await render(hbs`{{#bs-accordion onChange=(action "change") as |acc|}}
{{#acc.item value=1 title="TITLE1"}}CONTENT1{{/acc.item}}
{{#acc.item value=2 title="TITLE2"}}CONTENT2{{/acc.item}}
{{/bs-accordion}}`);
await click(`.${accordionClassFor()}:first-child .${accordionItemHeadClass()}`);
assert.ok(action.calledWith(1), 'onClick action has been called.');
});
test('prevents changing selection when onChange returns false', async function(assert) {
let action = this.stub();
action.returns(false);
this.actions.change = action;
await render(hbs`{{#bs-accordion onChange=(action "change") as |acc|}}
{{#acc.item value=1 title="TITLE1"}}CONTENT1{{/acc.item}}
{{#acc.item value=2 title="TITLE2"}}CONTENT2{{/acc.item}}
{{/bs-accordion}}`);
await click(`.${accordionClassFor()}:first-child .${accordionItemHeadClass()}`);
assert.ok(action.calledWith(1), 'onClick action has been called.');
assert.dom(`.${accordionClassFor()}:first-child .${accordionItemHeadClass()}`).hasClass('collapsed', `${accordionItemHeadClass()} has collapsed class`);
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasClass('collapse', 'tabpanel has collapse class');
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasNoClass(visibilityClass(), 'tabpanel is hidden');
});
test('changing selection does not leak to public selected property (DDAU)', async function(assert) {
this.set('selected', 1);
await render(hbs`{{#bs-accordion selected=selected as |acc|}}
{{#acc.item value=1 title="TITLE1"}}CONTENT1{{/acc.item}}
{{#acc.item value=2 title="TITLE2"}}CONTENT2{{/acc.item}}
{{/bs-accordion}}`);
await click(`.${accordionClassFor()}:last-child .${accordionItemHeadClass()}`);
assert.equal(this.get('selected'), 1, 'Does not modify public selected property');
});
test('yields change action to add custom behaviour', async function(assert) {
this.set('selected', 1);
await render(hbs`{{#bs-accordion selected=1 as |acc|}}
{{#acc.item value=1 title="TITLE1"}}CONTENT1 <button id="btn" {{action acc.change 2}}>Next</button>{{/acc.item}}
{{#acc.item value=2 title="TITLE2"}}CONTENT2{{/acc.item}}
{{/bs-accordion}}`);
await click('#btn');
assert.dom(`.${accordionClassFor()}:last-child .${accordionItemHeadClass()}`).hasNoClass('collapsed', `${accordionItemHeadClass()} has not collapsed class`);
assert.dom(`.${accordionClassFor()}:last-child [role="tabpanel"]`).hasClass('collapse', 'tabpanel has collapse class');
assert.dom(`.${accordionClassFor()}:last-child [role="tabpanel"]`).hasClass(visibilityClass(), 'tabpanel is visible');
});
test('clicking collapsed item with contextual title expands it', async function(assert) {
await render(hbs`{{#bs-accordion as |acc|}}
{{#acc.item value=1 as |aitem|}}
{{#aitem.title}}TITLE1{{/aitem.title}}
{{#aitem.body}}CONTENT1{{/aitem.body}}
{{/acc.item}}
{{#acc.item value=2}}CONTENT2{{/acc.item}}
{{/bs-accordion}}`);
await click(`.${accordionClassFor()}:first-child .${accordionItemHeadClass()}`);
assert.dom(`.${accordionClassFor()}:first-child .${accordionItemHeadClass()}`).hasNoClass('collapsed', `${accordionItemHeadClass()} has not collapsed class`);
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasClass('collapse', 'tabpanel has collapse class');
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasClass(visibilityClass(), 'tabpanel is visible');
});
test('clicking expanded item with contextual title collapses it', async function(assert) {
await render(hbs`{{#bs-accordion selected=1 as |acc|}}
{{#acc.item value=1 as |aitem|}}
{{#aitem.title}}TITLE1{{/aitem.title}}
{{#aitem.body}}CONTENT1{{/aitem.body}}
{{/acc.item}}
{{#acc.item value=2 title="TITLE2"}}CONTENT2{{/acc.item}}
{{/bs-accordion}}`);
assert.dom(`.${accordionClassFor()}:first-child .${accordionItemHeadClass()}`).hasNoClass('collapsed', `${accordionItemHeadClass()} has not collapsed class`);
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasClass('collapse', 'tabpanel has collapse class');
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasClass(visibilityClass(), 'tabpanel is visible');
await click(`.${accordionItemHeadClass()}`);
assert.dom(`.${accordionClassFor()}:first-child .${accordionItemHeadClass()}`).hasClass('collapsed', `${accordionItemHeadClass()} has collapsed class`);
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasClass('collapse', 'tabpanel has collapse class');
assert.dom(`.${accordionClassFor()}:first-child [role="tabpanel"]`).hasNoClass(visibilityClass(), 'tabpanel is hidden');
});
test('it passes accessibility checks', async function (assert) {
await render(hbs`{{#bs-accordion as |acc|}}
{{#acc.item value=1 title="TITLE1"}}CONTENT1{{/acc.item}}
{{#acc.item value=2 title="TITLE2"}}CONTENT2{{/acc.item}}
{{/bs-accordion}}`);
await a11yAudit();
assert.ok(true, 'A11y audit passed');
});
});
|
#ifndef DZ04_NOSTATE_H
#define DZ04_NOSTATE_H
#include "../State.h"
#include "../../geometry/Vector2D.h"
class StandSneak : public State {
private:
Vector2D<double> m_dest;
public:
StandSneak(Vector2D<double> dest) : m_dest(dest) {};
void enter(Character* stateMachine) override;
void exit(Character* stateMachine) override;
void execute(Character* stateMachine) override;
};
#endif //DZ04_NOSTATE_H
|
/* */
"format cjs";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Injectable } from 'angular2/core';
import { ListWrapper } from 'angular2/src/facade/collection';
import { DOM } from 'angular2/src/platform/dom/dom_adapter';
import { isPresent, isString, RegExpWrapper, StringWrapper } from 'angular2/src/facade/lang';
export let Log = class {
constructor() {
this._result = [];
}
add(value) { this._result.push(value); }
fn(value) {
return (a1 = null, a2 = null, a3 = null, a4 = null, a5 = null) => { this._result.push(value); };
}
clear() { this._result = []; }
result() { return this._result.join("; "); }
};
Log = __decorate([
Injectable(),
__metadata('design:paramtypes', [])
], Log);
export var browserDetection = null;
export class BrowserDetection {
constructor(ua) {
if (isPresent(ua)) {
this._ua = ua;
}
else {
this._ua = isPresent(DOM) ? DOM.getUserAgent() : '';
}
}
static setup() { browserDetection = new BrowserDetection(null); }
get isFirefox() { return this._ua.indexOf('Firefox') > -1; }
get isAndroid() {
return this._ua.indexOf('Mozilla/5.0') > -1 && this._ua.indexOf('Android') > -1 &&
this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Chrome') == -1;
}
get isEdge() { return this._ua.indexOf('Edge') > -1; }
get isIE() { return this._ua.indexOf('Trident') > -1; }
get isWebkit() {
return this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Edge') == -1;
}
get isIOS7() {
return this._ua.indexOf('iPhone OS 7') > -1 || this._ua.indexOf('iPad OS 7') > -1;
}
get isSlow() { return this.isAndroid || this.isIE || this.isIOS7; }
// The Intl API is only properly supported in recent Chrome and Opera.
// Note: Edge is disguised as Chrome 42, so checking the "Edge" part is needed,
// see https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
get supportsIntlApi() {
return this._ua.indexOf('Chrome/4') > -1 && this._ua.indexOf('Edge') == -1;
}
}
export function dispatchEvent(element, eventType) {
DOM.dispatchEvent(element, DOM.createEvent(eventType));
}
export function el(html) {
return DOM.firstChild(DOM.content(DOM.createTemplate(html)));
}
var _RE_SPECIAL_CHARS = ['-', '[', ']', '/', '{', '}', '\\', '(', ')', '*', '+', '?', '.', '^', '$', '|'];
var _ESCAPE_RE = RegExpWrapper.create(`[\\${_RE_SPECIAL_CHARS.join('\\')}]`);
export function containsRegexp(input) {
return RegExpWrapper.create(StringWrapper.replaceAllMapped(input, _ESCAPE_RE, (match) => `\\${match[0]}`));
}
export function normalizeCSS(css) {
css = StringWrapper.replaceAll(css, /\s+/g, ' ');
css = StringWrapper.replaceAll(css, /:\s/g, ':');
css = StringWrapper.replaceAll(css, /'/g, '"');
css = StringWrapper.replaceAll(css, / }/g, '}');
css = StringWrapper.replaceAllMapped(css, /url\((\"|\s)(.+)(\"|\s)\)(\s*)/g, (match) => `url("${match[2]}")`);
css = StringWrapper.replaceAllMapped(css, /\[(.+)=([^"\]]+)\]/g, (match) => `[${match[1]}="${match[2]}"]`);
return css;
}
var _singleTagWhitelist = ['br', 'hr', 'input'];
export function stringifyElement(el) {
var result = '';
if (DOM.isElementNode(el)) {
var tagName = DOM.tagName(el).toLowerCase();
// Opening tag
result += `<${tagName}`;
// Attributes in an ordered way
var attributeMap = DOM.attributeMap(el);
var keys = [];
attributeMap.forEach((v, k) => keys.push(k));
ListWrapper.sort(keys);
for (let i = 0; i < keys.length; i++) {
var key = keys[i];
var attValue = attributeMap.get(key);
if (!isString(attValue)) {
result += ` ${key}`;
}
else {
result += ` ${key}="${attValue}"`;
}
}
result += '>';
// Children
var childrenRoot = DOM.templateAwareRoot(el);
var children = isPresent(childrenRoot) ? DOM.childNodes(childrenRoot) : [];
for (let j = 0; j < children.length; j++) {
result += stringifyElement(children[j]);
}
// Closing tag
if (!ListWrapper.contains(_singleTagWhitelist, tagName)) {
result += `</${tagName}>`;
}
}
else if (DOM.isCommentNode(el)) {
result += `<!--${DOM.nodeValue(el)}-->`;
}
else {
result += DOM.getText(el);
}
return result;
}
|
# u-msgpack-python v2.5.1 - v at sergeev.io
# https://github.com/vsergeev/u-msgpack-python
#
# u-msgpack-python is a lightweight MessagePack serializer and deserializer
# module, compatible with both Python 2 and 3, as well CPython and PyPy
# implementations of Python. u-msgpack-python is fully compliant with the
# latest MessagePack specification.com/msgpack/msgpack/blob/master/spec.md). In
# particular, it supports the new binary, UTF-8 string, and application ext
# types.
#
# MIT License
#
# Copyright (c) 2013-2016 vsergeev / Ivan (Vanya) A. Sergeev
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
"""
u-msgpack-python v2.5.1 - v at sergeev.io
https://github.com/vsergeev/u-msgpack-python
u-msgpack-python is a lightweight MessagePack serializer and deserializer
module, compatible with both Python 2 and 3, as well CPython and PyPy
implementations of Python. u-msgpack-python is fully compliant with the
latest MessagePack specification.com/msgpack/msgpack/blob/master/spec.md). In
particular, it supports the new binary, UTF-8 string, and application ext
types.
License: MIT
"""
import struct
import collections
import datetime
import sys
import io
__version__ = "2.5.1"
"Module version string"
version = (2, 5, 1)
"Module version tuple"
##############################################################################
# Ext Class
##############################################################################
# Extension type for application-defined types and data
class Ext(object):
"""
The Ext class facilitates creating a serializable extension object to store
an application-defined type and data byte array.
"""
def __init__(self, type, data):
"""
Construct a new Ext object.
Args:
type: application-defined type integer
data: application-defined data byte array
Example:
>>> foo = umsgpack.Ext(0x05, b"\x01\x02\x03")
>>> umsgpack.packb({u"special stuff": foo, u"awesome": True})
'\x82\xa7awesome\xc3\xadspecial stuff\xc7\x03\x05\x01\x02\x03'
>>> bar = umsgpack.unpackb(_)
>>> print(bar["special stuff"])
Ext Object (Type: 0x05, Data: 01 02 03)
>>>
"""
# Check type is type int
if not isinstance(type, int):
raise TypeError("ext type is not type integer")
# Check data is type bytes
elif sys.version_info[0] == 3 and not isinstance(data, bytes):
raise TypeError("ext data is not type \'bytes\'")
elif sys.version_info[0] == 2 and not isinstance(data, str):
raise TypeError("ext data is not type \'str\'")
self.type = type
self.data = data
def __eq__(self, other):
"""
Compare this Ext object with another for equality.
"""
return (isinstance(other, self.__class__) and
self.type == other.type and
self.data == other.data)
def __ne__(self, other):
"""
Compare this Ext object with another for inequality.
"""
return not self.__eq__(other)
def __str__(self):
"""
String representation of this Ext object.
"""
s = "Ext Object (Type: 0x%02x, Data: " % self.type
s += " ".join(["0x%02x" % ord(self.data[i:i + 1])
for i in xrange(min(len(self.data), 8))])
if len(self.data) > 8:
s += " ..."
s += ")"
return s
def __hash__(self):
"""
Provide a hash of this Ext object.
"""
return hash((self.type, self.data))
class InvalidString(bytes):
"""Subclass of bytes to hold invalid UTF-8 strings."""
pass
##############################################################################
# Exceptions
##############################################################################
# Base Exception classes
class PackException(Exception):
"Base class for exceptions encountered during packing."
pass
class UnpackException(Exception):
"Base class for exceptions encountered during unpacking."
pass
# Packing error
class UnsupportedTypeException(PackException):
"Object type not supported for packing."
pass
# Unpacking error
class InsufficientDataException(UnpackException):
"Insufficient data to unpack the serialized object."
pass
class InvalidStringException(UnpackException):
"Invalid UTF-8 string encountered during unpacking."
pass
class UnsupportedTimestampException(UnpackException):
"Unsupported timestamp format encountered during unpacking."
pass
class ReservedCodeException(UnpackException):
"Reserved code encountered during unpacking."
pass
class UnhashableKeyException(UnpackException):
"""
Unhashable key encountered during map unpacking.
The serialized map cannot be deserialized into a Python dictionary.
"""
pass
class DuplicateKeyException(UnpackException):
"Duplicate key encountered during map unpacking."
pass
# Backwards compatibility
KeyNotPrimitiveException = UnhashableKeyException
KeyDuplicateException = DuplicateKeyException
#############################################################################
# Exported Functions and Glob
#############################################################################
# Exported functions and variables, set up in __init()
pack = None
packb = None
unpack = None
unpackb = None
dump = None
dumps = None
load = None
loads = None
compatibility = False
"""
Compatibility mode boolean.
When compatibility mode is enabled, u-msgpack-python will serialize both
unicode strings and bytes into the old "raw" msgpack type, and deserialize the
"raw" msgpack type into bytes. This provides backwards compatibility with the
old MessagePack specification.
Example:
>>> umsgpack.compatibility = True
>>>
>>> umsgpack.packb([u"some string", b"some bytes"])
b'\x92\xabsome string\xaasome bytes'
>>> umsgpack.unpackb(_)
[b'some string', b'some bytes']
>>>
"""
##############################################################################
# Packing
##############################################################################
# You may notice struct.pack("B", obj) instead of the simpler chr(obj) in the
# code below. This is to allow for seamless Python 2 and 3 compatibility, as
# chr(obj) has a str return type instead of bytes in Python 3, and
# struct.pack(...) has the right return type in both versions.
def _pack_integer(obj, fp, options):
if obj < 0:
if obj >= -32:
fp.write(struct.pack("b", obj))
elif obj >= -2**(8 - 1):
fp.write(b"\xd0" + struct.pack("b", obj))
elif obj >= -2**(16 - 1):
fp.write(b"\xd1" + struct.pack(">h", obj))
elif obj >= -2**(32 - 1):
fp.write(b"\xd2" + struct.pack(">i", obj))
elif obj >= -2**(64 - 1):
fp.write(b"\xd3" + struct.pack(">q", obj))
else:
raise UnsupportedTypeException("huge signed int")
else:
if obj < 128:
fp.write(struct.pack("B", obj))
elif obj < 2**8:
fp.write(b"\xcc" + struct.pack("B", obj))
elif obj < 2**16:
fp.write(b"\xcd" + struct.pack(">H", obj))
elif obj < 2**32:
fp.write(b"\xce" + struct.pack(">I", obj))
elif obj < 2**64:
fp.write(b"\xcf" + struct.pack(">Q", obj))
else:
raise UnsupportedTypeException("huge unsigned int")
def _pack_nil(obj, fp, options):
fp.write(b"\xc0")
def _pack_boolean(obj, fp, options):
fp.write(b"\xc3" if obj else b"\xc2")
def _pack_float(obj, fp, options):
float_precision = options.get('force_float_precision', _float_precision)
if float_precision == "double":
fp.write(b"\xcb" + struct.pack(">d", obj))
elif float_precision == "single":
fp.write(b"\xca" + struct.pack(">f", obj))
else:
raise ValueError("invalid float precision")
def _pack_string(obj, fp, options):
obj = obj.encode('utf-8')
obj_len = len(obj)
if obj_len < 32:
fp.write(struct.pack("B", 0xa0 | obj_len) + obj)
elif obj_len < 2**8:
fp.write(b"\xd9" + struct.pack("B", obj_len) + obj)
elif obj_len < 2**16:
fp.write(b"\xda" + struct.pack(">H", obj_len) + obj)
elif obj_len < 2**32:
fp.write(b"\xdb" + struct.pack(">I", obj_len) + obj)
else:
raise UnsupportedTypeException("huge string")
def _pack_binary(obj, fp, options):
obj_len = len(obj)
if obj_len < 2**8:
fp.write(b"\xc4" + struct.pack("B", obj_len) + obj)
elif obj_len < 2**16:
fp.write(b"\xc5" + struct.pack(">H", obj_len) + obj)
elif obj_len < 2**32:
fp.write(b"\xc6" + struct.pack(">I", obj_len) + obj)
else:
raise UnsupportedTypeException("huge binary string")
def _pack_oldspec_raw(obj, fp, options):
obj_len = len(obj)
if obj_len < 32:
fp.write(struct.pack("B", 0xa0 | obj_len) + obj)
elif obj_len < 2**16:
fp.write(b"\xda" + struct.pack(">H", obj_len) + obj)
elif obj_len < 2**32:
fp.write(b"\xdb" + struct.pack(">I", obj_len) + obj)
else:
raise UnsupportedTypeException("huge raw string")
def _pack_ext(obj, fp, options):
obj_len = len(obj.data)
if obj_len == 1:
fp.write(b"\xd4" + struct.pack("B", obj.type & 0xff) + obj.data)
elif obj_len == 2:
fp.write(b"\xd5" + struct.pack("B", obj.type & 0xff) + obj.data)
elif obj_len == 4:
fp.write(b"\xd6" + struct.pack("B", obj.type & 0xff) + obj.data)
elif obj_len == 8:
fp.write(b"\xd7" + struct.pack("B", obj.type & 0xff) + obj.data)
elif obj_len == 16:
fp.write(b"\xd8" + struct.pack("B", obj.type & 0xff) + obj.data)
elif obj_len < 2**8:
fp.write(b"\xc7" +
struct.pack("BB", obj_len, obj.type & 0xff) + obj.data)
elif obj_len < 2**16:
fp.write(b"\xc8" +
struct.pack(">HB", obj_len, obj.type & 0xff) + obj.data)
elif obj_len < 2**32:
fp.write(b"\xc9" +
struct.pack(">IB", obj_len, obj.type & 0xff) + obj.data)
else:
raise UnsupportedTypeException("huge ext data")
def _pack_ext_timestamp(obj, fp, options):
if not obj.tzinfo:
# Object is naive datetime, convert to aware date time,
# assuming UTC timezone
delta = obj.replace(tzinfo=_utc_tzinfo) - _epoch
else:
# Object is aware datetime
delta = obj - _epoch
seconds = delta.seconds + delta.days * 86400
microseconds = delta.microseconds
if microseconds == 0 and 0 <= seconds <= 2**32 - 1:
# 32-bit timestamp
fp.write(b"\xd6\xff" +
struct.pack(">I", seconds))
elif 0 <= seconds <= 2**34 - 1:
# 64-bit timestamp
value = ((microseconds * 1000) << 34) | seconds
fp.write(b"\xd7\xff" +
struct.pack(">Q", value))
elif -2**63 <= abs(seconds) <= 2**63 - 1:
# 96-bit timestamp
fp.write(b"\xc7\x0c\xff" +
struct.pack(">I", microseconds * 1000) +
struct.pack(">q", seconds))
else:
raise UnsupportedTypeException("huge timestamp")
def _pack_array(obj, fp, options):
obj_len = len(obj)
if obj_len < 16:
fp.write(struct.pack("B", 0x90 | obj_len))
elif obj_len < 2**16:
fp.write(b"\xdc" + struct.pack(">H", obj_len))
elif obj_len < 2**32:
fp.write(b"\xdd" + struct.pack(">I", obj_len))
else:
raise UnsupportedTypeException("huge array")
for e in obj:
pack(e, fp, **options)
def _pack_map(obj, fp, options):
obj_len = len(obj)
if obj_len < 16:
fp.write(struct.pack("B", 0x80 | obj_len))
elif obj_len < 2**16:
fp.write(b"\xde" + struct.pack(">H", obj_len))
elif obj_len < 2**32:
fp.write(b"\xdf" + struct.pack(">I", obj_len))
else:
raise UnsupportedTypeException("huge array")
for k, v in obj.items():
pack(k, fp, **options)
pack(v, fp, **options)
########################################
# Pack for Python 2, with 'unicode' type, 'str' type, and 'long' type
def _pack2(obj, fp, **options):
"""
Serialize a Python object into MessagePack bytes.
Args:
obj: a Python object
fp: a .write()-supporting file-like object
Kwargs:
ext_handlers (dict): dictionary of Ext handlers, mapping a custom type
to a callable that packs an instance of the type
into an Ext object
force_float_precision (str): "single" to force packing floats as
IEEE-754 single-precision floats,
"double" to force packing floats as
IEEE-754 double-precision floats.
Returns:
None.
Raises:
UnsupportedType(PackException):
Object type not supported for packing.
Example:
>>> f = open('test.bin', 'wb')
>>> umsgpack.pack({u"compact": True, u"schema": 0}, f)
>>>
"""
global compatibility
ext_handlers = options.get("ext_handlers")
if obj is None:
_pack_nil(obj, fp, options)
elif ext_handlers and obj.__class__ in ext_handlers:
_pack_ext(ext_handlers[obj.__class__](obj), fp, options)
elif isinstance(obj, bool):
_pack_boolean(obj, fp, options)
elif isinstance(obj, (int, long)):
_pack_integer(obj, fp, options)
elif isinstance(obj, float):
_pack_float(obj, fp, options)
elif compatibility and isinstance(obj, unicode):
_pack_oldspec_raw(bytes(obj), fp, options)
elif compatibility and isinstance(obj, bytes):
_pack_oldspec_raw(obj, fp, options)
elif isinstance(obj, unicode):
_pack_string(obj, fp, options)
elif isinstance(obj, str):
_pack_binary(obj, fp, options)
elif isinstance(obj, (list, tuple)):
_pack_array(obj, fp, options)
elif isinstance(obj, dict):
_pack_map(obj, fp, options)
elif isinstance(obj, datetime.datetime):
_pack_ext_timestamp(obj, fp, options)
elif isinstance(obj, Ext):
_pack_ext(obj, fp, options)
elif ext_handlers:
# Linear search for superclass
t = next((t for t in ext_handlers.keys() if isinstance(obj, t)), None)
if t:
_pack_ext(ext_handlers[t](obj), fp, options)
else:
raise UnsupportedTypeException(
"unsupported type: %s" % str(type(obj)))
else:
raise UnsupportedTypeException("unsupported type: %s" % str(type(obj)))
# Pack for Python 3, with unicode 'str' type, 'bytes' type, and no 'long' type
def _pack3(obj, fp, **options):
"""
Serialize a Python object into MessagePack bytes.
Args:
obj: a Python object
fp: a .write()-supporting file-like object
Kwargs:
ext_handlers (dict): dictionary of Ext handlers, mapping a custom type
to a callable that packs an instance of the type
into an Ext object
force_float_precision (str): "single" to force packing floats as
IEEE-754 single-precision floats,
"double" to force packing floats as
IEEE-754 double-precision floats.
Returns:
None.
Raises:
UnsupportedType(PackException):
Object type not supported for packing.
Example:
>>> f = open('test.bin', 'wb')
>>> umsgpack.pack({u"compact": True, u"schema": 0}, f)
>>>
"""
global compatibility
ext_handlers = options.get("ext_handlers")
if obj is None:
_pack_nil(obj, fp, options)
elif ext_handlers and obj.__class__ in ext_handlers:
_pack_ext(ext_handlers[obj.__class__](obj), fp, options)
elif isinstance(obj, bool):
_pack_boolean(obj, fp, options)
elif isinstance(obj, int):
_pack_integer(obj, fp, options)
elif isinstance(obj, float):
_pack_float(obj, fp, options)
elif compatibility and isinstance(obj, str):
_pack_oldspec_raw(obj.encode('utf-8'), fp, options)
elif compatibility and isinstance(obj, bytes):
_pack_oldspec_raw(obj, fp, options)
elif isinstance(obj, str):
_pack_string(obj, fp, options)
elif isinstance(obj, bytes):
_pack_binary(obj, fp, options)
elif isinstance(obj, (list, tuple)):
_pack_array(obj, fp, options)
elif isinstance(obj, dict):
_pack_map(obj, fp, options)
elif isinstance(obj, datetime.datetime):
_pack_ext_timestamp(obj, fp, options)
elif isinstance(obj, Ext):
_pack_ext(obj, fp, options)
elif ext_handlers:
# Linear search for superclass
t = next((t for t in ext_handlers.keys() if isinstance(obj, t)), None)
if t:
_pack_ext(ext_handlers[t](obj), fp, options)
else:
raise UnsupportedTypeException(
"unsupported type: %s" % str(type(obj)))
else:
raise UnsupportedTypeException(
"unsupported type: %s" % str(type(obj)))
def _packb2(obj, **options):
"""
Serialize a Python object into MessagePack bytes.
Args:
obj: a Python object
Kwargs:
ext_handlers (dict): dictionary of Ext handlers, mapping a custom type
to a callable that packs an instance of the type
into an Ext object
force_float_precision (str): "single" to force packing floats as
IEEE-754 single-precision floats,
"double" to force packing floats as
IEEE-754 double-precision floats.
Returns:
A 'str' containing serialized MessagePack bytes.
Raises:
UnsupportedType(PackException):
Object type not supported for packing.
Example:
>>> umsgpack.packb({u"compact": True, u"schema": 0})
'\x82\xa7compact\xc3\xa6schema\x00'
>>>
"""
fp = io.BytesIO()
_pack2(obj, fp, **options)
return fp.getvalue()
def _packb3(obj, **options):
"""
Serialize a Python object into MessagePack bytes.
Args:
obj: a Python object
Kwargs:
ext_handlers (dict): dictionary of Ext handlers, mapping a custom type
to a callable that packs an instance of the type
into an Ext object
force_float_precision (str): "single" to force packing floats as
IEEE-754 single-precision floats,
"double" to force packing floats as
IEEE-754 double-precision floats.
Returns:
A 'bytes' containing serialized MessagePack bytes.
Raises:
UnsupportedType(PackException):
Object type not supported for packing.
Example:
>>> umsgpack.packb({u"compact": True, u"schema": 0})
b'\x82\xa7compact\xc3\xa6schema\x00'
>>>
"""
fp = io.BytesIO()
_pack3(obj, fp, **options)
return fp.getvalue()
#############################################################################
# Unpacking
#############################################################################
def _read_except(fp, n):
if n == 0:
return b""
data = fp.read(n)
if len(data) == 0:
raise InsufficientDataException()
while len(data) < n:
chunk = fp.read(n - len(data))
if len(chunk) == 0:
raise InsufficientDataException()
data += chunk
return data
def _unpack_integer(code, fp, options):
if (ord(code) & 0xe0) == 0xe0:
return struct.unpack("b", code)[0]
elif code == b'\xd0':
return struct.unpack("b", _read_except(fp, 1))[0]
elif code == b'\xd1':
return struct.unpack(">h", _read_except(fp, 2))[0]
elif code == b'\xd2':
return struct.unpack(">i", _read_except(fp, 4))[0]
elif code == b'\xd3':
return struct.unpack(">q", _read_except(fp, 8))[0]
elif (ord(code) & 0x80) == 0x00:
return struct.unpack("B", code)[0]
elif code == b'\xcc':
return struct.unpack("B", _read_except(fp, 1))[0]
elif code == b'\xcd':
return struct.unpack(">H", _read_except(fp, 2))[0]
elif code == b'\xce':
return struct.unpack(">I", _read_except(fp, 4))[0]
elif code == b'\xcf':
return struct.unpack(">Q", _read_except(fp, 8))[0]
raise Exception("logic error, not int: 0x%02x" % ord(code))
def _unpack_reserved(code, fp, options):
if code == b'\xc1':
raise ReservedCodeException(
"encountered reserved code: 0x%02x" % ord(code))
raise Exception(
"logic error, not reserved code: 0x%02x" % ord(code))
def _unpack_nil(code, fp, options):
if code == b'\xc0':
return None
raise Exception("logic error, not nil: 0x%02x" % ord(code))
def _unpack_boolean(code, fp, options):
if code == b'\xc2':
return False
elif code == b'\xc3':
return True
raise Exception("logic error, not boolean: 0x%02x" % ord(code))
def _unpack_float(code, fp, options):
if code == b'\xca':
return struct.unpack(">f", _read_except(fp, 4))[0]
elif code == b'\xcb':
return struct.unpack(">d", _read_except(fp, 8))[0]
raise Exception("logic error, not float: 0x%02x" % ord(code))
def _unpack_string(code, fp, options):
if (ord(code) & 0xe0) == 0xa0:
length = ord(code) & ~0xe0
elif code == b'\xd9':
length = struct.unpack("B", _read_except(fp, 1))[0]
elif code == b'\xda':
length = struct.unpack(">H", _read_except(fp, 2))[0]
elif code == b'\xdb':
length = struct.unpack(">I", _read_except(fp, 4))[0]
else:
raise Exception("logic error, not string: 0x%02x" % ord(code))
# Always return raw bytes in compatibility mode
global compatibility
if compatibility:
return _read_except(fp, length)
data = _read_except(fp, length)
try:
return bytes.decode(data, 'utf-8')
except UnicodeDecodeError:
if options.get("allow_invalid_utf8"):
return InvalidString(data)
raise InvalidStringException("unpacked string is invalid utf-8")
def _unpack_binary(code, fp, options):
if code == b'\xc4':
length = struct.unpack("B", _read_except(fp, 1))[0]
elif code == b'\xc5':
length = struct.unpack(">H", _read_except(fp, 2))[0]
elif code == b'\xc6':
length = struct.unpack(">I", _read_except(fp, 4))[0]
else:
raise Exception("logic error, not binary: 0x%02x" % ord(code))
return _read_except(fp, length)
def _unpack_ext(code, fp, options):
if code == b'\xd4':
length = 1
elif code == b'\xd5':
length = 2
elif code == b'\xd6':
length = 4
elif code == b'\xd7':
length = 8
elif code == b'\xd8':
length = 16
elif code == b'\xc7':
length = struct.unpack("B", _read_except(fp, 1))[0]
elif code == b'\xc8':
length = struct.unpack(">H", _read_except(fp, 2))[0]
elif code == b'\xc9':
length = struct.unpack(">I", _read_except(fp, 4))[0]
else:
raise Exception("logic error, not ext: 0x%02x" % ord(code))
ext_type = struct.unpack("b", _read_except(fp, 1))[0]
ext_data = _read_except(fp, length)
# Create extension object
ext = Ext(ext_type, ext_data)
# Unpack with ext handler, if we have one
ext_handlers = options.get("ext_handlers")
if ext_handlers and ext.type in ext_handlers:
return ext_handlers[ext.type](ext)
# Timestamp extension
if ext.type == -1:
return _unpack_ext_timestamp(ext, options)
return ext
def _unpack_ext_timestamp(ext, options):
obj_len = len(ext.data)
if obj_len == 4:
# 32-bit timestamp
seconds = struct.unpack(">I", ext.data)[0]
microseconds = 0
elif obj_len == 8:
# 64-bit timestamp
value = struct.unpack(">Q", ext.data)[0]
seconds = value & 0x3ffffffff
microseconds = (value >> 34) // 1000
elif obj_len == 12:
# 96-bit timestamp
seconds = struct.unpack(">q", ext.data[4:12])[0]
microseconds = struct.unpack(">I", ext.data[0:4])[0] // 1000
else:
raise UnsupportedTimestampException(
"unsupported timestamp with data length %d" % len(ext.data))
return _epoch + datetime.timedelta(seconds=seconds,
microseconds=microseconds)
def _unpack_array(code, fp, options):
if (ord(code) & 0xf0) == 0x90:
length = (ord(code) & ~0xf0)
elif code == b'\xdc':
length = struct.unpack(">H", _read_except(fp, 2))[0]
elif code == b'\xdd':
length = struct.unpack(">I", _read_except(fp, 4))[0]
else:
raise Exception("logic error, not array: 0x%02x" % ord(code))
return [_unpack(fp, options) for i in xrange(length)]
def _deep_list_to_tuple(obj):
if isinstance(obj, list):
return tuple([_deep_list_to_tuple(e) for e in obj])
return obj
def _unpack_map(code, fp, options):
if (ord(code) & 0xf0) == 0x80:
length = (ord(code) & ~0xf0)
elif code == b'\xde':
length = struct.unpack(">H", _read_except(fp, 2))[0]
elif code == b'\xdf':
length = struct.unpack(">I", _read_except(fp, 4))[0]
else:
raise Exception("logic error, not map: 0x%02x" % ord(code))
d = {} if not options.get('use_ordered_dict') \
else collections.OrderedDict()
for _ in xrange(length):
# Unpack key
k = _unpack(fp, options)
if isinstance(k, list):
# Attempt to convert list into a hashable tuple
k = _deep_list_to_tuple(k)
elif not isinstance(k, collections.Hashable):
raise UnhashableKeyException(
"encountered unhashable key: %s, %s" % (str(k), str(type(k))))
elif k in d:
raise DuplicateKeyException(
"encountered duplicate key: %s, %s" % (str(k), str(type(k))))
# Unpack value
v = _unpack(fp, options)
try:
d[k] = v
except TypeError:
raise UnhashableKeyException(
"encountered unhashable key: %s" % str(k))
return d
def _unpack(fp, options):
code = _read_except(fp, 1)
return _unpack_dispatch_table[code](code, fp, options)
########################################
def _unpack2(fp, **options):
"""
Deserialize MessagePack bytes into a Python object.
Args:
fp: a .read()-supporting file-like object
Kwargs:
ext_handlers (dict): dictionary of Ext handlers, mapping integer Ext
type to a callable that unpacks an instance of
Ext into an object
use_ordered_dict (bool): unpack maps into OrderedDict, instead of
unordered dict (default False)
allow_invalid_utf8 (bool): unpack invalid strings into instances of
InvalidString, for access to the bytes
(default False)
Returns:
A Python object.
Raises:
InsufficientDataException(UnpackException):
Insufficient data to unpack the serialized object.
InvalidStringException(UnpackException):
Invalid UTF-8 string encountered during unpacking.
UnsupportedTimestampException(UnpackException):
Unsupported timestamp format encountered during unpacking.
ReservedCodeException(UnpackException):
Reserved code encountered during unpacking.
UnhashableKeyException(UnpackException):
Unhashable key encountered during map unpacking.
The serialized map cannot be deserialized into a Python dictionary.
DuplicateKeyException(UnpackException):
Duplicate key encountered during map unpacking.
Example:
>>> f = open('test.bin', 'rb')
>>> umsgpack.unpackb(f)
{u'compact': True, u'schema': 0}
>>>
"""
return _unpack(fp, options)
def _unpack3(fp, **options):
"""
Deserialize MessagePack bytes into a Python object.
Args:
fp: a .read()-supporting file-like object
Kwargs:
ext_handlers (dict): dictionary of Ext handlers, mapping integer Ext
type to a callable that unpacks an instance of
Ext into an object
use_ordered_dict (bool): unpack maps into OrderedDict, instead of
unordered dict (default False)
allow_invalid_utf8 (bool): unpack invalid strings into instances of
InvalidString, for access to the bytes
(default False)
Returns:
A Python object.
Raises:
InsufficientDataException(UnpackException):
Insufficient data to unpack the serialized object.
InvalidStringException(UnpackException):
Invalid UTF-8 string encountered during unpacking.
UnsupportedTimestampException(UnpackException):
Unsupported timestamp format encountered during unpacking.
ReservedCodeException(UnpackException):
Reserved code encountered during unpacking.
UnhashableKeyException(UnpackException):
Unhashable key encountered during map unpacking.
The serialized map cannot be deserialized into a Python dictionary.
DuplicateKeyException(UnpackException):
Duplicate key encountered during map unpacking.
Example:
>>> f = open('test.bin', 'rb')
>>> umsgpack.unpackb(f)
{'compact': True, 'schema': 0}
>>>
"""
return _unpack(fp, options)
# For Python 2, expects a str object
def _unpackb2(s, **options):
"""
Deserialize MessagePack bytes into a Python object.
Args:
s: a 'str' or 'bytearray' containing serialized MessagePack bytes
Kwargs:
ext_handlers (dict): dictionary of Ext handlers, mapping integer Ext
type to a callable that unpacks an instance of
Ext into an object
use_ordered_dict (bool): unpack maps into OrderedDict, instead of
unordered dict (default False)
allow_invalid_utf8 (bool): unpack invalid strings into instances of
InvalidString, for access to the bytes
(default False)
Returns:
A Python object.
Raises:
TypeError:
Packed data type is neither 'str' nor 'bytearray'.
InsufficientDataException(UnpackException):
Insufficient data to unpack the serialized object.
InvalidStringException(UnpackException):
Invalid UTF-8 string encountered during unpacking.
UnsupportedTimestampException(UnpackException):
Unsupported timestamp format encountered during unpacking.
ReservedCodeException(UnpackException):
Reserved code encountered during unpacking.
UnhashableKeyException(UnpackException):
Unhashable key encountered during map unpacking.
The serialized map cannot be deserialized into a Python dictionary.
DuplicateKeyException(UnpackException):
Duplicate key encountered during map unpacking.
Example:
>>> umsgpack.unpackb(b'\x82\xa7compact\xc3\xa6schema\x00')
{u'compact': True, u'schema': 0}
>>>
"""
if not isinstance(s, (str, bytearray)):
raise TypeError("packed data must be type 'str' or 'bytearray'")
return _unpack(io.BytesIO(s), options)
# For Python 3, expects a bytes object
def _unpackb3(s, **options):
"""
Deserialize MessagePack bytes into a Python object.
Args:
s: a 'bytes' or 'bytearray' containing serialized MessagePack bytes
Kwargs:
ext_handlers (dict): dictionary of Ext handlers, mapping integer Ext
type to a callable that unpacks an instance of
Ext into an object
use_ordered_dict (bool): unpack maps into OrderedDict, instead of
unordered dict (default False)
allow_invalid_utf8 (bool): unpack invalid strings into instances of
InvalidString, for access to the bytes
(default False)
Returns:
A Python object.
Raises:
TypeError:
Packed data type is neither 'bytes' nor 'bytearray'.
InsufficientDataException(UnpackException):
Insufficient data to unpack the serialized object.
InvalidStringException(UnpackException):
Invalid UTF-8 string encountered during unpacking.
UnsupportedTimestampException(UnpackException):
Unsupported timestamp format encountered during unpacking.
ReservedCodeException(UnpackException):
Reserved code encountered during unpacking.
UnhashableKeyException(UnpackException):
Unhashable key encountered during map unpacking.
The serialized map cannot be deserialized into a Python dictionary.
DuplicateKeyException(UnpackException):
Duplicate key encountered during map unpacking.
Example:
>>> umsgpack.unpackb(b'\x82\xa7compact\xc3\xa6schema\x00')
{'compact': True, 'schema': 0}
>>>
"""
if not isinstance(s, (bytes, bytearray)):
raise TypeError("packed data must be type 'bytes' or 'bytearray'")
return _unpack(io.BytesIO(s), options)
#############################################################################
# Module Initialization
#############################################################################
def __init():
global pack
global packb
global unpack
global unpackb
global dump
global dumps
global load
global loads
global compatibility
global _epoch
global _utc_tzinfo
global _float_precision
global _unpack_dispatch_table
global xrange
# Compatibility mode for handling strings/bytes with the old specification
compatibility = False
if sys.version_info[0] == 3:
_utc_tzinfo = datetime.timezone.utc
else:
class UTC(datetime.tzinfo):
ZERO = datetime.timedelta(0)
def utcoffset(self, dt):
return UTC.ZERO
def tzname(self, dt):
return "UTC"
def dst(self, dt):
return UTC.ZERO
_utc_tzinfo = UTC()
# Calculate an aware epoch datetime
_epoch = datetime.datetime(1970, 1, 1, tzinfo=_utc_tzinfo)
# Auto-detect system float precision
if sys.float_info.mant_dig == 53:
_float_precision = "double"
else:
_float_precision = "single"
# Map packb and unpackb to the appropriate version
if sys.version_info[0] == 3:
pack = _pack3
packb = _packb3
dump = _pack3
dumps = _packb3
unpack = _unpack3
unpackb = _unpackb3
load = _unpack3
loads = _unpackb3
xrange = range
else:
pack = _pack2
packb = _packb2
dump = _pack2
dumps = _packb2
unpack = _unpack2
unpackb = _unpackb2
load = _unpack2
loads = _unpackb2
# Build a dispatch table for fast lookup of unpacking function
_unpack_dispatch_table = {}
# Fix uint
for code in range(0, 0x7f + 1):
_unpack_dispatch_table[struct.pack("B", code)] = _unpack_integer
# Fix map
for code in range(0x80, 0x8f + 1):
_unpack_dispatch_table[struct.pack("B", code)] = _unpack_map
# Fix array
for code in range(0x90, 0x9f + 1):
_unpack_dispatch_table[struct.pack("B", code)] = _unpack_array
# Fix str
for code in range(0xa0, 0xbf + 1):
_unpack_dispatch_table[struct.pack("B", code)] = _unpack_string
# Nil
_unpack_dispatch_table[b'\xc0'] = _unpack_nil
# Reserved
_unpack_dispatch_table[b'\xc1'] = _unpack_reserved
# Boolean
_unpack_dispatch_table[b'\xc2'] = _unpack_boolean
_unpack_dispatch_table[b'\xc3'] = _unpack_boolean
# Bin
for code in range(0xc4, 0xc6 + 1):
_unpack_dispatch_table[struct.pack("B", code)] = _unpack_binary
# Ext
for code in range(0xc7, 0xc9 + 1):
_unpack_dispatch_table[struct.pack("B", code)] = _unpack_ext
# Float
_unpack_dispatch_table[b'\xca'] = _unpack_float
_unpack_dispatch_table[b'\xcb'] = _unpack_float
# Uint
for code in range(0xcc, 0xcf + 1):
_unpack_dispatch_table[struct.pack("B", code)] = _unpack_integer
# Int
for code in range(0xd0, 0xd3 + 1):
_unpack_dispatch_table[struct.pack("B", code)] = _unpack_integer
# Fixext
for code in range(0xd4, 0xd8 + 1):
_unpack_dispatch_table[struct.pack("B", code)] = _unpack_ext
# String
for code in range(0xd9, 0xdb + 1):
_unpack_dispatch_table[struct.pack("B", code)] = _unpack_string
# Array
_unpack_dispatch_table[b'\xdc'] = _unpack_array
_unpack_dispatch_table[b'\xdd'] = _unpack_array
# Map
_unpack_dispatch_table[b'\xde'] = _unpack_map
_unpack_dispatch_table[b'\xdf'] = _unpack_map
# Negative fixint
for code in range(0xe0, 0xff + 1):
_unpack_dispatch_table[struct.pack("B", code)] = _unpack_integer
__init()
|
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "NGAP-PDU-Contents"
* found in "./support/ngap-r15.2.0/PDU-Definitions.asn1"
* `asn1c -D ./common -gen-PER -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-example`
*/
#include "NGAP_DownlinkUEAssociatedNRPPaTransport.h"
asn_TYPE_member_t asn_MBR_NGAP_DownlinkUEAssociatedNRPPaTransport_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct NGAP_DownlinkUEAssociatedNRPPaTransport, protocolIEs),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NGAP_ProtocolIE_Container_124P64,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"protocolIEs"
},
};
static const ber_tlv_tag_t asn_DEF_NGAP_DownlinkUEAssociatedNRPPaTransport_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_NGAP_DownlinkUEAssociatedNRPPaTransport_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */
};
asn_SEQUENCE_specifics_t asn_SPC_NGAP_DownlinkUEAssociatedNRPPaTransport_specs_1 = {
sizeof(struct NGAP_DownlinkUEAssociatedNRPPaTransport),
offsetof(struct NGAP_DownlinkUEAssociatedNRPPaTransport, _asn_ctx),
asn_MAP_NGAP_DownlinkUEAssociatedNRPPaTransport_tag2el_1,
1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
1, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_NGAP_DownlinkUEAssociatedNRPPaTransport = {
"DownlinkUEAssociatedNRPPaTransport",
"DownlinkUEAssociatedNRPPaTransport",
&asn_OP_SEQUENCE,
asn_DEF_NGAP_DownlinkUEAssociatedNRPPaTransport_tags_1,
sizeof(asn_DEF_NGAP_DownlinkUEAssociatedNRPPaTransport_tags_1)
/sizeof(asn_DEF_NGAP_DownlinkUEAssociatedNRPPaTransport_tags_1[0]), /* 1 */
asn_DEF_NGAP_DownlinkUEAssociatedNRPPaTransport_tags_1, /* Same as above */
sizeof(asn_DEF_NGAP_DownlinkUEAssociatedNRPPaTransport_tags_1)
/sizeof(asn_DEF_NGAP_DownlinkUEAssociatedNRPPaTransport_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_NGAP_DownlinkUEAssociatedNRPPaTransport_1,
1, /* Elements count */
&asn_SPC_NGAP_DownlinkUEAssociatedNRPPaTransport_specs_1 /* Additional specs */
};
|
from django.db import models
from django.contrib.auth.models import User
from PIL import Image
class Post(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
title = models.CharField(max_length=150)
created = models.DateTimeField(auto_now_add=True, auto_now=False)
updated = models.DateTimeField(auto_now_add=False, auto_now=True)
img = models.ImageField(upload_to="post_imgs", blank=True, null=True)
description = models.TextField(blank=True, null=True)
slug = models.SlugField(unique=True)
def __str__(self):
return f"{self.user} : {self.title}"
def save(self):
super().save()
if self.img:
img = Image.open(self.img.path)
if img.height > 300 or img.width > 300:
output_size = (400, 400)
img.thumbnail(output_size)
img.save(self.img.path)
|
from django.contrib.auth import get_user_model
from django.test import Client, TestCase
from django.urls import reverse
from posts.forms import Post, PostForm
from posts.models import Group, Post
User = get_user_model()
class PostFormTest(TestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.user = User.objects.create_user(username='Vlad')
cls.guest_client = Client()
cls.authorized_client = Client()
cls.authorized_client.force_login(cls.user)
cls.group = Group.objects.create(
title='Заголовок',
slug='test_slug',
description='текстовоеполедлянаборатекста'
)
cls.group_new = Group.objects.create(
title='Заголовок_новый',
slug='test_slug_new',
description='текстовоеполедлянаборатекста'
)
cls.post = Post.objects.create(
text='Тестовый текст',
group=cls.group,
author=cls.user
)
cls.form = PostForm()
def test_create_post(self):
"""Проверка формы создания поста"""
post_count = Post.objects.count()
form_data = {
'text': 'Тестовый текст',
'group': PostFormTest.group.id,
}
response = self.authorized_client.post(
reverse('posts:post_create'),
data=form_data,
follow=True
)
self.assertRedirects(
response, reverse(
'posts:profile',
kwargs={'username': f'{self.user}'}
))
self.assertEqual(
Post.objects.count(),
post_count + 1)
self.assertTrue(
Post.objects.filter(
text='Тестовый текст',
group=PostFormTest.group.id
).exists())
def test_edit_post(self):
"""Проверка формы редактирования поста"""
form_data = {
'text': 'Тестовый тест 2',
'group': PostFormTest.group_new.id
}
response = self.authorized_client.post(
reverse(
'posts:update_post',
kwargs={'post_id': f'{self.post.id}'}),
data=form_data,
follow=True
)
self.assertRedirects(
response,
reverse(
'posts:post_detail',
kwargs={'post_id': f'{self.post.id}'}
))
self.assertTrue(
Post.objects.filter(
text='Тестовый тест 2',
group=PostFormTest.group_new.id
).exists())
self.assertFalse(
Post.objects.filter(
text='Тестовый текст',
group=PostFormTest.group.id
).exists())
|
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzCore/EBus/EBus.h>
#include <AzCore/std/string/string.h>
#include <AWSCoreBus.h>
#include <QMenu>
namespace AzFramework
{
class ProcessWatcher;
}
namespace AWSCore
{
class AWSCoreEditorMenu
: public QMenu
, AWSCoreEditorRequestBus::Handler
{
public:
static constexpr const char AWSResourceMappingToolReadMeWarningText[] =
"Failed to launch Resource Mapping Tool, please follow <a href=\"file:///%s\">README</a> to setup tool before using it.";
static constexpr const char AWSResourceMappingToolIsRunningText[] = "Resource Mapping Tool is running...";
static constexpr const char AWSResourceMappingToolLogWarningText[] =
"Failed to launch Resource Mapping Tool, please check <a href=\"file:///%s\">logs</a> for details.";
AWSCoreEditorMenu(const QString& text);
~AWSCoreEditorMenu();
private:
QAction* AddExternalLinkAction(const AZStd::string& name, const AZStd::string& url, const AZStd::string& icon = "");
void InitializeResourceMappingToolAction();
void InitializeAWSDocActions();
void InitializeAWSGlobalDocsSubMenu();
void InitializeAWSFeatureGemActions();
void AddSpaceForIcon(QMenu* menu);
// AWSCoreEditorRequestBus interface implementation
void SetAWSClientAuthEnabled() override;
void SetAWSMetricsEnabled() override;
QMenu* SetAWSFeatureSubMenu(const AZStd::string& menuText);
// To improve experience, use process watcher to keep track of ongoing tool process
AZStd::unique_ptr<AzFramework::ProcessWatcher> m_resourceMappingToolWatcher;
};
} // namespace AWSCore
|
print("x")
print("y")
|
import React from 'react'
export default function Header(props) {
return (
<header>
<h1>Be The Hero</h1>
</header>
)
}
|
import signal, sys
# For Python 2.X.X
if (sys.version_info[0] == 2):
import openmoc
import _openmoc_cuda
from openmoc_cuda_single import *
# For Python 3.X.X
else:
import openmoc.openmoc as openmoc
import _openmoc_cuda
from openmoc.cuda.openmoc_cuda_single import *
# Tell Python to recognize CTRL+C and stop the C++ extension module
# when this is passed in from the keyboard
signal.signal(signal.SIGINT, signal.SIG_DFL)
Timer = openmoc.Timer
|
"""
Migration script to add the history_dataset_association_history table.
"""
import datetime
import logging
from sqlalchemy import (
Column,
DateTime,
ForeignKey,
Integer,
MetaData,
Table,
)
from galaxy.model.custom_types import (
MetadataType,
TrimmedString,
)
from galaxy.model.migrate.versions.util import (
create_table,
drop_table,
)
log = logging.getLogger(__name__)
now = datetime.datetime.utcnow
metadata = MetaData()
HistoryDatasetAssociationHistory_table = Table(
"history_dataset_association_history",
metadata,
Column("id", Integer, primary_key=True),
Column("history_dataset_association_id", Integer, ForeignKey("history_dataset_association.id"), index=True),
Column("update_time", DateTime, default=now),
Column("version", Integer, index=True),
Column("name", TrimmedString(255)),
Column("extension", TrimmedString(64)),
Column("metadata", MetadataType, key="_metadata"),
Column("extended_metadata_id", Integer, ForeignKey("extended_metadata.id"), index=True),
)
def upgrade(migrate_engine):
print(__doc__)
metadata.bind = migrate_engine
metadata.reflect()
create_table(HistoryDatasetAssociationHistory_table)
def downgrade(migrate_engine):
metadata.bind = migrate_engine
metadata.reflect()
drop_table(HistoryDatasetAssociationHistory_table)
|
const CommonHelper = {
TrimStrings(str) {
return str.trim();
},
findDuplicates(substringArr) {
return substringArr.filter((item,index) => substringArr.imdexOf(item) !== index)
},
getAlert(){
alert('asdasdasd');
},
groupBy(objectArray, property) {
return objectArray.reduce(function (acc, obj) {
var key = obj[property];
if (!acc[key]) {
acc[key] = [];
}
acc[key].push(obj.featureKey);
return acc;
}, {});
},
jsUcfirst(string)
{
return string.charAt(0).toUpperCase() + string.slice(1);
},
phonenumber(inputtxt)
{
if(inputtxt.length == 10 && /^\d+$/.test(inputtxt))
{
return true;
}
else
{
return false;
}
},
isDigits(inputtxt,mode)
{
if(inputtxt.length == (mode=='p'?inputtxt.length:5) && /^\d+$/.test(inputtxt) && inputtxt.length < 15)
{
return true;
}
else
{
return false;
}
},
hasSpecialCharachters(inputtxt)
{
var format = /[ !@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/;
if(inputtxt.length > 0) {
if(format.test(inputtxt))
{
return false;
}
else
{
return true;
}
}
else
return false;
},
getMainColor() {
return "#9e1d22";
// grey - #a1a1a1
//blue - #0173a2
},
}
export default CommonHelper;
|
app.controller('countryCtrl', ['$scope', '$state', '$stateParams', 'Data', 'toaster', function($scope, $state, $stateParams, Data, toaster) {
//for OrderFunction
$scope.OrderRec = 'name';
$scope.itemsPerPage = 30;
$scope.pageNumber = 1;
$scope.noOfRows = 1;
$scope.pageChanged = function(pageNo, functionName, id) {
$scope[functionName](id, pageNo, $scope.itemsPerPage);
$scope.pageNumber = pageNo;
};
$scope.manageCountry = function(empId, pageNumber, itemPerPage) {
$scope.showloader();
Data.post('manage-country/manageCountry', {
id: empId,
pageNumber: pageNumber,
itemPerPage: itemPerPage,
}).then(function(response) {
$scope.countryRow = response.records;
$scope.countryRowLength = response.totalCount;
console.log("countryRowLength" + $scope.countryRowLength);
$scope.hideloader();
});
};
$scope.searchData = {};
$scope.searchDetails = {};
$scope.filterDetails = function(search) {
//$scope.searchDetails = {};
$scope.searchData = search;
$('#showFilterModal').modal('hide');
}
$scope.removeFilterData = function(keyvalue) {
delete $scope.searchData[keyvalue];
$scope.filterDetails($scope.searchData);
}
$scope.closeModal = function() {
$scope.searchData = {};
}
// $scope.getProcName = $scope.type = '';
// $scope.procName = function (procedureName, isTeam) {
// $scope.getProcName = angular.copy(procedureName);
// $scope.type = angular.copy(isTeam);
// }
//
//
// $scope.filterData = {};
// $scope.data = {};
//
// $scope.filteredData = function (data, page, noOfRecords) {
// $scope.showloader();
// page = noOfRecords * (page - 1);
// Data.post('manage-country/filteredData', {filterData: data, getProcName: $scope.getProcName, pageNumber: page, itemPerPage: noOfRecords}).then(function (response) {
// if (response.success)
// {
// $scope.countryRow = response.records;
// $scope.countryRowLength = response.totalCount;
// } else
// {
// $scope.countryRow = response.records;
// $scope.countryRowLength = 0;
// }
// $('#showFilterModal').modal('hide');
// $scope.showFilterData = $scope.filterData;
// $scope.hideloader();
// return false;
//
// });
// }
//
// $scope.removeDataFromFilter = function (keyvalue)
// {
// delete $scope.filterData[keyvalue];
// $scope.filteredData($scope.filterData, 1, 30);
// }
$scope.initialModal = function(id, name, index, index1, phonecode, sortname, del) {
console.log('id=' + id + 'name=' + name + 'index=' + index + 'index1=' + index1 + 'phonecode' + phonecode + 'sortname' + sortname + 'del' + del);
$scope.sbtBtn = false;
if (id == 0) {
$scope.heading = 'Add Country';
$scope.action = "Submit";
$scope.cancl = false;
$scope.domethod = 'post';
} else if (del == "del") {
$scope.heading = 'Delete Country';
$scope.action = "Confirm";
$scope.cancl = true;
$scope.domethod = 'delete';
} else {
$scope.heading = 'Edit Country';
$scope.action = "Update";
$scope.cancl = true;
$scope.domethod = 'put';
}
$scope.id = id;
$scope.name = name;
$scope.index = index * ($scope.noOfRows - 1) + (index1 + 1);
$scope.phonecode = phonecode;
$scope.sortname = sortname;
}
//dynamic orderby function
$scope.OrderFunction = function() {
if ($scope.OrderRec == 'name') {
$scope.OrderRec = '-name';
} else if ($scope.OrderRec == '-name') {
$scope.OrderRec = 'name';
}
}
$scope.doCountryAction = function() {
$scope.errorMsg = '';
if ($scope.id == 0) //for create
{
if ($scope.domethod == 'post') {
Data.post('manage-country/', {
name: $scope.name,
phonecode: $scope.phonecode,
sortname: $scope.sortname
}).then(function(response) {
if (!response.success) {
$scope.errorMsg = response.errormsg;
} else {
// $scope.countryRow.push({ 'name': $scope.name, 'id': response.lastinsertid, 'sortname': $scope.sortname, 'phonecode': $scope.phonecode });
$scope.countryRow = response.records;
$scope.countryRowLength = response.totalCount;
$('#countryModal').modal('toggle');
//$scope.success("Country details created successfully");
toaster.pop('success', 'Manage Country', 'Record Created Successfully');
}
});
} else { console.log("domethod"); }
} else { //for update
if ($scope.domethod == 'put') {
Data.put('manage-country/' + $scope.id, {
name: $scope.name,
id: $scope.id,
'sortname': $scope.sortname,
'phonecode': $scope.phonecode
}).then(function(response) {
if (!response.success) {
$scope.errorMsg = response.errormsg;
} else {
// $scope.countryRow.splice($scope.index - 1, 1);
// $scope.countryRow.splice($scope.index - 1, 0, {
// name: $scope.name,
// id: $scope.id,
// name: $scope.name,
// 'sortname': $scope.sortname,
// 'phonecode': $scope.phonecode
// });
$scope.countryRow = response.records;
$scope.countryRowLength = response.totalCount;
$('#countryModal').modal('toggle');
toaster.pop('success', 'Manage Country', 'Record Updated Successfully');
}
});
} else if ($scope.domethod == 'delete') { //for delete
Data.delete('manage-country/' + $scope.id).then(function(response) {
if (!response.success) {
$scope.errorMsg = response.errormsg;
} else {
// $scope.countryRow.splice($scope.index - 1, 1);
// $scope.countryRow.splice($scope.index - 1, 0, { name: $scope.name, id: $scope.id, name: $scope.name, 'sortname': $scope.sortname, 'phonecode': $scope.phonecode});
$scope.countryRow = response.records;
$scope.countryRowLength = response.totalCount;
console.log("countryRowLength" + $scope.countryRowLength);
$('#countryModal').modal('toggle');
toaster.pop('success', 'Manage Country', 'Record Deleted Successfully');
}
});
}
}
}
//for delete
$scope.Cancel = function() {
$('#countryModal').modal('toggle');
};
$scope.pageChangeHandler = function(num) {
$scope.noOfRows = parseInt(num);
$scope.itemsPerPage = parseInt($scope.itemsPerPage);
$scope.currentPage = num * $scope.itemsPerPage;
};
//viveknk call to Manage blood group
$scope.goManageBloodgrp = function() {
$state.go('bloodGroupsIndex');
};
}]);
|
from flask import Blueprint
from flask import make_response
from src.app.api.localVariables import contentType
from src.app.domain.collections.positions import positionsDatabaseAccess
positions = Blueprint('positions', __name__, url_prefix = '/users')
@positions.route('/<userId>/positions/', methods = ['GET'])
def getAllPositionsForUser(userId):
# verifyAuthToken(request.headers.get('AuthToken'))
body = positionsDatabaseAccess.getAllPositionsForUser(userId)
response = make_response(body, 200)
response.headers['Content-Type'] = contentType
return response
@positions.route('/<userId>/positions/<portfolioId>/', methods = ['GET'])
def getPositionsInPortfolioForUser(userId, portfolioId):
# verifyAuthToken(request.headers.get('AuthToken'))
body = positionsDatabaseAccess.getPositionsInGivenUserPortfolio(userId, portfolioId)
response = make_response(body, 200)
response.headers['Content-Type'] = contentType
return response
|
"""Per-prefix data, mapping each prefix to a dict of locale:name.
Auto-generated file, do not edit by hand.
"""
from ..util import u
# Copyright (C) 2011-2018 The Libphonenumber Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
data = {
'554198474':{'en': 'Brasil Telecom GSM'},
'554198475':{'en': 'Brasil Telecom GSM'},
'551698157':{'en': 'TIM'},
'554198477':{'en': 'Brasil Telecom GSM'},
'554198471':{'en': 'Brasil Telecom GSM'},
'554198472':{'en': 'Brasil Telecom GSM'},
'554198473':{'en': 'Brasil Telecom GSM'},
'554198478':{'en': 'Brasil Telecom GSM'},
'554198476':{'en': 'Brasil Telecom GSM'},
'126871':{'en': 'Digicel'},
'126873':{'en': 'Digicel'},
'551698156':{'en': 'TIM'},
'551698155':{'en': 'TIM'},
'551698154':{'en': 'TIM'},
'551599186':{'en': 'Claro BR'},
'551599187':{'en': 'Claro BR'},
'551599184':{'en': 'Claro BR'},
'551599185':{'en': 'Claro BR'},
'551599182':{'en': 'Claro BR'},
'551599183':{'en': 'Claro BR'},
'25288':{'en': 'Somali Networks'},
'551599181':{'en': 'Claro BR'},
'25280':{'en': 'Somali Networks'},
'551498810':{'en': 'Oi'},
'1787589':{'en': 'CENTENNIAL'},
'1787588':{'en': 'CENTENNIAL'},
'551498811':{'en': 'Oi'},
'459314':{'en': 'SimService'},
'459315':{'en': 'SimService'},
'1787580':{'en': 'CENTENNIAL'},
'459310':{'en': 'Justfone'},
'459311':{'en': 'MobiWeb Limited'},
'1787585':{'en': 'CENTENNIAL'},
'459313':{'en': 'SimService'},
'44798':{'en': 'EE'},
'553199359':{'en': 'TIM'},
'44792':{'en': 'O2'},
'44795':{'en': 'EE'},
'44794':{'en': 'EE'},
'44796':{'en': 'Orange'},
'336051':{'en': 'SFR'},
'336050':{'en': 'SFR'},
'336053':{'en': 'SFR'},
'336052':{'en': 'SFR'},
'22870':{'en': 'TOGOCEL'},
'336054':{'en': 'SFR'},
'553499183':{'en': 'TIM'},
'553499182':{'en': 'TIM'},
'553499181':{'en': 'TIM'},
'553499187':{'en': 'TIM'},
'22879':{'en': 'Moov'},
'553499185':{'en': 'TIM'},
'553499184':{'en': 'TIM'},
'551398136':{'en': 'TIM'},
'551398137':{'en': 'TIM'},
'551398134':{'en': 'TIM'},
'551398135':{'en': 'TIM'},
'551398132':{'en': 'TIM'},
'551398133':{'en': 'TIM'},
'551398131':{'en': 'TIM'},
'551398138':{'en': 'TIM'},
'551398139':{'en': 'TIM'},
'2348479':{'en': 'Starcomms'},
'2348478':{'en': 'Starcomms'},
'516596531':{'en': 'Claro'},
'516596530':{'en': 'Claro'},
'516596533':{'en': 'Claro'},
'516596532':{'en': 'Claro'},
'2348475':{'en': 'Starcomms'},
'2348474':{'en': 'Starcomms'},
'2348477':{'en': 'Starcomms'},
'2348476':{'en': 'Starcomms'},
'479257':{'en': 'NetCom'},
'554498412':{'en': 'Brasil Telecom GSM'},
'553199308':{'en': 'TIM'},
'38640':{'en': 'A1'},
'38641':{'en': 'Telekom Slovenije'},
'38643':{'en': 'Telekom Slovenije'},
'554898415':{'en': 'Brasil Telecom GSM'},
'554898414':{'en': 'Brasil Telecom GSM'},
'554898417':{'en': 'Brasil Telecom GSM'},
'2347027':{'en': 'Multilinks'},
'554898411':{'en': 'Brasil Telecom GSM'},
'38649':{'en': 'Telekom Slovenije'},
'554898413':{'en': 'Brasil Telecom GSM'},
'554898412':{'en': 'Brasil Telecom GSM'},
'2348783':{'en': 'Starcomms'},
'2348782':{'en': 'Starcomms'},
'2348787':{'en': 'Starcomms'},
'2348786':{'en': 'Starcomms'},
'2348785':{'en': 'Starcomms'},
'2348784':{'en': 'Starcomms'},
'2348789':{'en': 'Starcomms'},
'2348788':{'en': 'Starcomms'},
'551798138':{'en': 'TIM'},
'551798139':{'en': 'TIM'},
'551798132':{'en': 'TIM'},
'551798133':{'en': 'TIM'},
'551798131':{'en': 'TIM'},
'551798136':{'en': 'TIM'},
'551798137':{'en': 'TIM'},
'551798134':{'en': 'TIM'},
'551798135':{'en': 'TIM'},
'5511988':{'en': 'Claro BR'},
'5511989':{'en': 'Claro BR'},
'5511982':{'en': 'TIM'},
'5511983':{'en': 'TIM'},
'5511981':{'en': 'TIM'},
'5511986':{'en': 'TIM'},
'5511987':{'en': 'TIM'},
'5511984':{'en': 'TIM'},
'5511985':{'en': 'TIM'},
'29769':{'en': 'SETAR'},
'29764':{'en': 'Digicel'},
'29766':{'en': 'SETAR'},
'29763':{'en': 'Digicel'},
'554799909':{'en': 'TIM'},
'554799905':{'en': 'TIM'},
'554799904':{'en': 'TIM'},
'23057':{'en': 'Cellplus'},
'554799906':{'en': 'TIM'},
'554799901':{'en': 'TIM'},
'554799903':{'en': 'TIM'},
'554799902':{'en': 'TIM'},
'27614':{'en': 'Telkom Mobile'},
'551598808':{'en': 'Oi'},
'551598809':{'en': 'Oi'},
'551498164':{'en': 'TIM'},
'551498165':{'en': 'TIM'},
'551498166':{'en': 'TIM'},
'551598804':{'en': 'Oi'},
'551498161':{'en': 'TIM'},
'551498162':{'en': 'TIM'},
'551498163':{'en': 'TIM'},
'178453':{'en': 'Digicel'},
'178452':{'en': 'Digicel'},
'554498418':{'en': 'Brasil Telecom GSM'},
'552799233':{'en': 'Claro BR'},
'554899919':{'en': 'TIM'},
'554799638':{'en': 'TIM'},
'554799637':{'en': 'TIM'},
'554799636':{'en': 'TIM'},
'554799635':{'en': 'TIM'},
'554799634':{'en': 'TIM'},
'554799633':{'en': 'TIM'},
'554799632':{'en': 'TIM'},
'554799631':{'en': 'TIM'},
'554899917':{'en': 'TIM'},
'554899916':{'en': 'TIM'},
'554899915':{'en': 'TIM'},
'553199691':{'en': 'Telemig Celular'},
'553199692':{'en': 'Telemig Celular'},
'553199693':{'en': 'Telemig Celular'},
'553199694':{'en': 'Telemig Celular'},
'553199695':{'en': 'Telemig Celular'},
'553199696':{'en': 'Telemig Celular'},
'553199697':{'en': 'Telemig Celular'},
'553199698':{'en': 'Telemig Celular'},
'553199699':{'en': 'Telemig Celular'},
'554899912':{'en': 'TIM'},
'2347782':{'en': 'Starcomms'},
'2347783':{'en': 'Starcomms'},
'22678':{'en': 'Telecel Faso'},
'22679':{'en': 'Telecel Faso'},
'22676':{'en': 'Airtel'},
'22677':{'en': 'Airtel'},
'22674':{'en': 'Airtel'},
'22675':{'en': 'Airtel'},
'22672':{'en': 'Telmob'},
'22673':{'en': 'Telmob'},
'22670':{'en': 'Telmob'},
'22671':{'en': 'Telmob'},
'553199346':{'en': 'TIM'},
'553199347':{'en': 'TIM'},
'1787619':{'en': 'SunCom Wireless Puerto Rico'},
'553199345':{'en': 'TIM'},
'553199342':{'en': 'TIM'},
'50672':{'en': 'Claro'},
'50671':{'en': 'Claro'},
'553199341':{'en': 'TIM'},
'1787613':{'en': 'Claro'},
'1787612':{'en': 'Claro'},
'1787617':{'en': 'Claro'},
'1787616':{'en': 'Claro'},
'1787615':{'en': 'Claro'},
'1787614':{'en': 'Claro'},
'551298823':{'en': 'Oi'},
'551298822':{'en': 'Oi'},
'551298821':{'en': 'Oi'},
'551298820':{'en': 'Oi'},
'551899714':{'en': 'Vivo'},
'551899715':{'en': 'Vivo'},
'551899716':{'en': 'Vivo'},
'551899717':{'en': 'Vivo'},
'551899718':{'en': 'Vivo'},
'551899719':{'en': 'Vivo'},
'553199203':{'en': 'TIM'},
'553199202':{'en': 'TIM'},
'551598118':{'en': 'TIM'},
'551598119':{'en': 'TIM'},
'553199207':{'en': 'TIM'},
'553199206':{'en': 'TIM'},
'553199205':{'en': 'TIM'},
'553199204':{'en': 'TIM'},
'551598112':{'en': 'TIM'},
'551499831':{'en': 'Vivo'},
'553199209':{'en': 'TIM'},
'551598111':{'en': 'TIM'},
'551598116':{'en': 'TIM'},
'551598117':{'en': 'TIM'},
'551598114':{'en': 'TIM'},
'551598115':{'en': 'TIM'},
'354644':{'en': 'Nova'},
'354646':{'en': 'IMC'},
'354647':{'en': 'IMC'},
'354640':{'en': u('\u00d6ryggisfjarskipti')},
'354641':{'en': u('\u00d6ryggisfjarskipti')},
'354649':{'en': 'Vodafone'},
'2626920':{'en': 'Orange'},
'2626922':{'en': 'Orange'},
'2626923':{'en': 'Orange'},
'5025581':{'en': 'Tigo'},
'3747':{'en': 'VivaCell-MTS', 'ru': u('\u0412\u0438\u0432\u0430\u0421\u0435\u043b\u043b-\u041c\u0422\u0421')},
'3745':{'en': 'Ucom', 'ru': u('\u042e\u043a\u043e\u043c')},
'1787260':{'en': 'Claro'},
'554898866':{'en': 'Claro BR'},
'554698826':{'en': 'Claro BR'},
'43688':{'en': 'Orange AT'},
'55469910':{'en': 'Vivo'},
'551899199':{'en': 'Claro BR'},
'49172':{'en': 'Vodafone'},
'49173':{'en': 'Vodafone'},
'49170':{'en': 'T-Mobile'},
'49171':{'en': 'T-Mobile'},
'49176':{'en': 'O2'},
'49177':{'en': 'Eplus'},
'49174':{'en': 'Vodafone'},
'49175':{'en': 'T-Mobile'},
'49178':{'en': 'Eplus'},
'49179':{'en': 'O2'},
'4476006':{'en': '24 Seven'},
'4476007':{'en': 'Relax'},
'4476002':{'en': 'PageOne'},
'4476000':{'en': 'Mediatel'},
'50370737':{'en': 'Claro'},
'50370736':{'en': 'Claro'},
'50370735':{'en': 'Claro'},
'50370734':{'en': 'Digicel'},
'50370733':{'en': 'Digicel'},
'50370732':{'en': 'Digicel'},
'50370731':{'en': 'Digicel'},
'50370730':{'en': 'Digicel'},
'50370739':{'en': 'Claro'},
'50370738':{'en': 'Claro'},
'554898863':{'en': 'Claro BR'},
'551799728':{'en': 'Vivo'},
'551799729':{'en': 'Vivo'},
'551799721':{'en': 'Vivo'},
'551799722':{'en': 'Vivo'},
'551799723':{'en': 'Vivo'},
'551799724':{'en': 'Vivo'},
'551799725':{'en': 'Vivo'},
'551799726':{'en': 'Vivo'},
'551799727':{'en': 'Vivo'},
'552899915':{'en': 'Vivo'},
'32460':{'en': 'Proximus'},
'552899917':{'en': 'Vivo'},
'552899916':{'en': 'Vivo'},
'552899919':{'en': 'Vivo'},
'552899918':{'en': 'Vivo'},
'1345649':{'en': 'Digicel'},
'551499171':{'en': 'Claro BR'},
'551499172':{'en': 'Claro BR'},
'551499173':{'en': 'Claro BR'},
'487209':{'en': 'CenterNet'},
'551499175':{'en': 'Claro BR'},
'551499176':{'en': 'Claro BR'},
'551499177':{'en': 'Claro BR'},
'487205':{'en': 'CenterNet'},
'487204':{'en': 'CenterNet'},
'487207':{'en': 'CenterNet'},
'487206':{'en': 'CenterNet'},
'487201':{'en': 'CenterNet'},
'487200':{'en': 'CenterNet'},
'487203':{'en': 'CenterNet'},
'487202':{'en': 'CenterNet'},
'554599972':{'en': 'TIM'},
'553899907':{'en': 'Telemig Celular'},
'554199221':{'en': 'Vivo'},
'4531312':{'en': 'MI Carrier Services'},
'447380':{'en': 'Three'},
'447381':{'en': 'O2'},
'447382':{'en': 'O2'},
'447383':{'en': 'Three'},
'447384':{'en': 'Vodafone'},
'447385':{'en': 'Vodafone'},
'447386':{'en': 'Vodafone'},
'447387':{'en': 'Vodafone'},
'447388':{'en': 'Vodafone'},
'447437':{'en': 'Vodafone'},
'447434':{'en': 'EE'},
'447435':{'en': 'Vodafone'},
'447432':{'en': 'EE'},
'3460224':{'en': 'Oceans'},
'447430':{'en': 'O2'},
'447431':{'en': 'O2'},
'3460225':{'en': 'VozTelecom'},
'554699978':{'en': 'TIM'},
'518298232':{'en': 'Claro'},
'518298231':{'en': 'Claro'},
'518298230':{'en': 'Claro'},
'554699973':{'en': 'TIM'},
'554699972':{'en': 'TIM'},
'554699971':{'en': 'TIM'},
'26269331':{'en': 'Only'},
'26269330':{'en': 'Only'},
'554199229':{'en': 'Vivo'},
'26269333':{'en': 'Orange'},
'26269332':{'en': 'Only'},
'553499803':{'en': 'Telemig Celular'},
'553499801':{'en': 'Telemig Celular'},
'551898125':{'en': 'TIM'},
'4477008':{'en': 'Sure'},
'553499804':{'en': 'Telemig Celular'},
'553499805':{'en': 'Telemig Celular'},
'551898126':{'en': 'TIM'},
'51749788':{'en': 'Movistar'},
'551898127':{'en': 'TIM'},
'551898128':{'en': 'TIM'},
'1939628':{'en': 'CENTENNIAL'},
'552299272':{'en': 'Claro BR'},
'552299273':{'en': 'Claro BR'},
'552299271':{'en': 'Claro BR'},
'552299276':{'en': 'Claro BR'},
'552299277':{'en': 'Claro BR'},
'552299274':{'en': 'Claro BR'},
'552299275':{'en': 'Claro BR'},
'552299278':{'en': 'Claro BR'},
'552299279':{'en': 'Claro BR'},
'55119692':{'en': 'Claro BR'},
'55119690':{'en': 'Vivo'},
'22999':{'en': 'Moov'},
'552799316':{'en': 'Claro BR'},
'551898122':{'en': 'TIM'},
'552799279':{'en': 'Claro BR'},
'552799278':{'en': 'Claro BR'},
'552799275':{'en': 'Claro BR'},
'552799274':{'en': 'Claro BR'},
'552799277':{'en': 'Claro BR'},
'552799276':{'en': 'Claro BR'},
'552799271':{'en': 'Claro BR'},
'552799273':{'en': 'Claro BR'},
'552799272':{'en': 'Claro BR'},
'55439910':{'en': 'Vivo'},
'554398850':{'en': 'Claro BR'},
'554299939':{'en': 'TIM'},
'554398852':{'en': 'Claro BR'},
'554299938':{'en': 'TIM'},
'346816':{'en': 'MasMovil'},
'346814':{'en': 'Movistar'},
'346815':{'en': 'Movistar'},
'346812':{'en': 'Movistar'},
'346813':{'en': 'Movistar'},
'346810':{'en': 'Movistar'},
'346811':{'en': 'Movistar'},
'4477001':{'en': 'Nationwide Telephone'},
'4477000':{'en': 'Cloud9'},
'423661':{'en': 'Dimoco'},
'423660':{'en': 'Telecom Liechtenstein'},
'423663':{'en': 'Emnify'},
'55329998':{'en': 'Telemig Celular'},
'554399116':{'en': 'Vivo'},
'2519':{'en': 'Ethio Telecom'},
'554399117':{'en': 'Vivo'},
'551398118':{'en': 'TIM'},
'551398119':{'en': 'TIM'},
'551398114':{'en': 'TIM'},
'5055':{'en': 'Claro'},
'551398116':{'en': 'TIM'},
'551398117':{'en': 'TIM'},
'551398111':{'en': 'TIM'},
'551398112':{'en': 'TIM'},
'551398113':{'en': 'TIM'},
'459190':{'en': 'Interactive digital media GmbH'},
'459191':{'en': 'Maxtel.dk'},
'5036313':{'en': 'Claro'},
'5036312':{'en': 'Claro'},
'5036311':{'en': 'Claro'},
'5036310':{'en': 'Claro'},
'5036316':{'en': 'Claro'},
'5036315':{'en': 'Claro'},
'5036314':{'en': 'Claro'},
'2344880':{'en': 'Starcomms'},
'2344881':{'en': 'Starcomms'},
'2344882':{'en': 'Starcomms'},
'3584579':{'en': 'DNA'},
'3584578':{'en': 'DNA'},
'3584577':{'en': 'DNA'},
'3584576':{'en': 'DNA'},
'3584575':{'en': 'AMT'},
'3584574':{'en': 'DNA'},
'3584573':{'en': 'AMT'},
'3584571':{'en': 'Tismi'},
'3584570':{'en': 'AMT'},
'554898433':{'en': 'Brasil Telecom GSM'},
'554898432':{'en': 'Brasil Telecom GSM'},
'554898431':{'en': 'Brasil Telecom GSM'},
'554898437':{'en': 'Brasil Telecom GSM'},
'554898436':{'en': 'Brasil Telecom GSM'},
'554898435':{'en': 'Brasil Telecom GSM'},
'554898434':{'en': 'Brasil Telecom GSM'},
'554898439':{'en': 'Brasil Telecom GSM'},
'554898438':{'en': 'Brasil Telecom GSM'},
'447784':{'en': 'O2'},
'551798111':{'en': 'TIM'},
'551798112':{'en': 'TIM'},
'551798113':{'en': 'TIM'},
'551798114':{'en': 'TIM'},
'459312':{'en': 'SimService'},
'551798116':{'en': 'TIM'},
'551798117':{'en': 'TIM'},
'551798118':{'en': 'TIM'},
'551798119':{'en': 'TIM'},
'5538989':{'en': 'Oi'},
'18098':{'en': 'Orange'},
'50374':{'en': 'Digicel'},
'554398111':{'en': 'TIM'},
'553199901':{'en': 'Telemig Celular'},
'18093':{'en': 'Claro'},
'50375':{'en': 'Tigo'},
'5538987':{'en': 'Oi'},
'5538986':{'en': 'Oi'},
'5538985':{'en': 'Oi'},
'2345685':{'en': 'Starcomms'},
'2345684':{'en': 'Starcomms'},
'2345687':{'en': 'Starcomms'},
'2345686':{'en': 'Starcomms'},
'553199905':{'en': 'Telemig Celular'},
'30690299':{'en': 'BWS'},
'553199907':{'en': 'Telemig Celular'},
'554799923':{'en': 'TIM'},
'212641':{'en': 'Maroc Telecom'},
'554799921':{'en': 'TIM'},
'554799927':{'en': 'TIM'},
'554799926':{'en': 'TIM'},
'554799925':{'en': 'TIM'},
'212640':{'en': 'Inwi'},
'554799929':{'en': 'TIM'},
'554799928':{'en': 'TIM'},
'212643':{'en': 'Maroc Telecom'},
'4474413':{'en': 'Stour Marine'},
'4474411':{'en': 'Andrews & Arnold'},
'4474410':{'en': 'Mediatel'},
'4474417':{'en': 'Synectiv'},
'4474416':{'en': 'Vodafone'},
'4474415':{'en': 'Synectiv'},
'4474414':{'en': 'Tismi'},
'212645':{'en': u('M\u00e9ditel')},
'4474419':{'en': 'Voxbone'},
'4474418':{'en': 'Core Telecom'},
'51849747':{'en': 'Claro'},
'51849742':{'en': 'Claro'},
'212647':{'en': 'Inwi'},
'455319':{'en': 'Telia'},
'5522985':{'en': 'Oi'},
'5522986':{'en': 'Oi'},
'5522987':{'en': 'Oi'},
'553499189':{'en': 'TIM'},
'554499173':{'en': 'Vivo'},
'553499188':{'en': 'TIM'},
'212648':{'en': 'Maroc Telecom'},
'554799655':{'en': 'TIM'},
'554799654':{'en': 'TIM'},
'554799657':{'en': 'TIM'},
'554799656':{'en': 'TIM'},
'554799651':{'en': 'TIM'},
'554598418':{'en': 'Brasil Telecom GSM'},
'554799652':{'en': 'TIM'},
'554598416':{'en': 'Brasil Telecom GSM'},
'554598417':{'en': 'Brasil Telecom GSM'},
'554598414':{'en': 'Brasil Telecom GSM'},
'554598415':{'en': 'Brasil Telecom GSM'},
'554598412':{'en': 'Brasil Telecom GSM'},
'554598413':{'en': 'Brasil Telecom GSM'},
'554598411':{'en': 'Brasil Telecom GSM'},
'554499172':{'en': 'Vivo'},
'553499186':{'en': 'TIM'},
'551899198':{'en': 'Claro BR'},
'22654':{'en': 'Orange'},
'22655':{'en': 'Airtel'},
'22656':{'en': 'Airtel'},
'22657':{'en': 'Orange'},
'22651':{'en': 'Telmob'},
'22652':{'en': 'Telmob'},
'552198371':{'en': 'TIM'},
'552198373':{'en': 'TIM'},
'551699975':{'en': 'Vivo'},
'22658':{'en': 'Telecel Faso'},
'552198374':{'en': 'TIM'},
'552198377':{'en': 'TIM'},
'552198376':{'en': 'TIM'},
'22389':{'en': 'Sotelma'},
'553199368':{'en': 'TIM'},
'553199369':{'en': 'TIM'},
'22382':{'en': 'Orange'},
'22383':{'en': 'Orange'},
'553199366':{'en': 'TIM'},
'553199367':{'en': 'TIM'},
'553199361':{'en': 'TIM'},
'553199362':{'en': 'TIM'},
'553199363':{'en': 'TIM'},
'551699609':{'en': 'Vivo'},
'503703':{'en': 'Claro'},
'187659':{'en': 'Digicel'},
'503701':{'en': 'Claro'},
'503700':{'en': 'Claro'},
'503706':{'en': 'Claro'},
'503705':{'en': 'Claro'},
'503704':{'en': 'Claro'},
'503709':{'en': 'Claro'},
'503708':{'en': 'Claro'},
'551899776':{'en': 'Vivo'},
'551899777':{'en': 'Vivo'},
'551899774':{'en': 'Vivo'},
'551899775':{'en': 'Vivo'},
'551899772':{'en': 'Vivo'},
'551899773':{'en': 'Vivo'},
'551899771':{'en': 'Vivo'},
'551899778':{'en': 'Vivo'},
'551899779':{'en': 'Vivo'},
'551598131':{'en': 'TIM'},
'551598132':{'en': 'TIM'},
'551598133':{'en': 'TIM'},
'551598134':{'en': 'TIM'},
'551598135':{'en': 'TIM'},
'551598136':{'en': 'TIM'},
'551598138':{'en': 'TIM'},
'551598139':{'en': 'TIM'},
'370686':{'en': 'Omnitel'},
'370687':{'en': 'Omnitel'},
'370684':{'en': 'Tele 2'},
'370685':{'en': u('BIT\u0116')},
'370682':{'en': 'Omnitel'},
'370683':{'en': 'Tele 2'},
'370680':{'en': 'Omnitel'},
'370681':{'en': u('BIT\u0116')},
'507656':{'en': u('Telef\u00f3nica M\u00f3viles')},
'370688':{'en': 'Omnitel'},
'370689':{'en': u('BIT\u0116')},
'553499951':{'en': 'Telemig Celular'},
'553499952':{'en': 'Telemig Celular'},
'553499953':{'en': 'Telemig Celular'},
'553499954':{'en': 'Telemig Celular'},
'553499955':{'en': 'Telemig Celular'},
'553499956':{'en': 'Telemig Celular'},
'1787689':{'en': 'CENTENNIAL'},
'553499958':{'en': 'Telemig Celular'},
'553499959':{'en': 'Telemig Celular'},
'553199212':{'en': 'TIM'},
'30688500':{'en': 'BWS'},
'554598822':{'en': 'Claro BR'},
'554198751':{'en': 'Claro BR'},
'554198750':{'en': 'Claro BR'},
'554198752':{'en': 'Claro BR'},
'55119577':{'en': 'Vivo'},
'553199213':{'en': 'TIM'},
'128444':{'en': 'CCT'},
'554598821':{'en': 'Claro BR'},
'55199986':{'en': 'Vivo'},
'55199987':{'en': 'Vivo'},
'55199984':{'en': 'Vivo'},
'55199985':{'en': 'Vivo'},
'55199982':{'en': 'Vivo'},
'55199983':{'en': 'Vivo'},
'55199980':{'en': 'Vivo'},
'55199981':{'en': 'Vivo'},
'55199988':{'en': 'Vivo'},
'124256':{'en': 'BaTelCo'},
'124257':{'en': 'BaTelCo'},
'124254':{'en': 'BaTelCo'},
'124255':{'en': 'BaTelCo'},
'124252':{'en': 'BaTelCo'},
'124253':{'en': 'BaTelCo'},
'2235':{'en': 'Atel'},
'51829827':{'en': 'Claro'},
'25563':{'en': 'MTC'},
'25562':{'en': 'Viettel'},
'25567':{'en': 'tiGO'},
'25566':{'en': 'SMILE'},
'25565':{'en': 'tiGO'},
'25564':{'en': 'Cootel'},
'25569':{'en': 'Airtel'},
'25568':{'en': 'Airtel'},
'1939339':{'en': 'SunCom Wireless Puerto Rico'},
'1939334':{'en': 'Claro'},
'3465329':{'en': 'DIA'},
'55129881':{'en': 'Oi'},
'49151':{'en': 'T-Mobile'},
'4473683':{'en': 'Sky'},
'4473682':{'en': 'Sky'},
'4473680':{'en': 'Teleena'},
'50370719':{'en': 'Tigo'},
'4473686':{'en': 'Sky'},
'4473685':{'en': 'Sky'},
'4473684':{'en': 'Sky'},
'50370715':{'en': 'Tigo'},
'50370714':{'en': 'Tigo'},
'50370717':{'en': 'Claro'},
'50370716':{'en': 'Movistar'},
'50370711':{'en': 'Movistar'},
'50370710':{'en': 'Claro'},
'50370713':{'en': 'Tigo'},
'50370712':{'en': 'Claro'},
'554898419':{'en': 'Brasil Telecom GSM'},
'554898418':{'en': 'Brasil Telecom GSM'},
'553299146':{'en': 'TIM'},
'37360':{'en': 'Orange'},
'554898416':{'en': 'Brasil Telecom GSM'},
'551799748':{'en': 'Vivo'},
'551799749':{'en': 'Vivo'},
'551799746':{'en': 'Vivo'},
'551799747':{'en': 'Vivo'},
'37368':{'en': 'Orange'},
'37369':{'en': 'Orange'},
'551799742':{'en': 'Vivo'},
'551799743':{'en': 'Vivo'},
'551799741':{'en': 'Vivo'},
'30695410':{'en': 'MI Carrier Services'},
'346016':{'en': 'Lcrcom'},
'346017':{'en': 'Vodafone'},
'346014':{'en': 'Vodafone'},
'346015':{'en': 'HITS'},
'346012':{'en': 'Vodafone'},
'346013':{'en': 'Vodafone'},
'346010':{'en': 'Vodafone'},
'346011':{'en': 'Vodafone'},
'554499162':{'en': 'Vivo'},
'554499163':{'en': 'Vivo'},
'554499161':{'en': 'Vivo'},
'554499166':{'en': 'Vivo'},
'554499167':{'en': 'Vivo'},
'554499164':{'en': 'Vivo'},
'554499165':{'en': 'Vivo'},
'554499168':{'en': 'Vivo'},
'554499169':{'en': 'Vivo'},
'552899935':{'en': 'Vivo'},
'552899939':{'en': 'Vivo'},
'552899938':{'en': 'Vivo'},
'551499116':{'en': 'Claro BR'},
'551499117':{'en': 'Claro BR'},
'551499114':{'en': 'Claro BR'},
'551499115':{'en': 'Claro BR'},
'551499112':{'en': 'Claro BR'},
'551499113':{'en': 'Claro BR'},
'551499111':{'en': 'Claro BR'},
'551999627':{'en': 'Vivo'},
'551499118':{'en': 'Claro BR'},
'551499119':{'en': 'Claro BR'},
'553898412':{'en': 'Claro BR'},
'553898413':{'en': 'Claro BR'},
'553898411':{'en': 'Claro BR'},
'553898416':{'en': 'Claro BR'},
'553898417':{'en': 'Claro BR'},
'553898414':{'en': 'Claro BR'},
'553898415':{'en': 'Claro BR'},
'553898418':{'en': 'Claro BR'},
'551999624':{'en': 'Vivo'},
'447419':{'en': 'Orange'},
'447410':{'en': 'Orange'},
'447411':{'en': 'Three'},
'447412':{'en': 'Three'},
'447413':{'en': 'Three'},
'447414':{'en': 'Three'},
'447415':{'en': 'EE'},
'447416':{'en': 'Orange'},
'554699915':{'en': 'TIM'},
'554699914':{'en': 'TIM'},
'554699917':{'en': 'TIM'},
'554699916':{'en': 'TIM'},
'554699911':{'en': 'TIM'},
'554699913':{'en': 'TIM'},
'554699912':{'en': 'TIM'},
'554699919':{'en': 'TIM'},
'554699918':{'en': 'TIM'},
'479650':{'en': 'Telenor'},
'456050':{'en': 'Telenor'},
'474625':{'en': 'Telenor'},
'474624':{'en': 'Telenor'},
'474627':{'en': 'Telenor'},
'474626':{'en': 'Telenor'},
'474621':{'en': 'Telenor'},
'474623':{'en': 'NetCom'},
'551499830':{'en': 'Vivo'},
'552198414':{'en': 'Oi'},
'552198415':{'en': 'Oi'},
'552198416':{'en': 'Oi'},
'552198417':{'en': 'Oi'},
'551799739':{'en': 'Vivo'},
'552198412':{'en': 'Oi'},
'552198413':{'en': 'Oi'},
'551499832':{'en': 'Vivo'},
'552198418':{'en': 'Oi'},
'552198419':{'en': 'Oi'},
'554699126':{'en': 'Vivo'},
'549349':{'en': 'Personal'},
'549348':{'en': 'Personal'},
'23244':{'en': 'Intergroup'},
'549340':{'en': 'Personal'},
'549343':{'en': 'Personal'},
'549342':{'en': 'Personal'},
'23240':{'en': 'Datatel/Cellcom'},
'549344':{'en': 'Personal'},
'549347':{'en': 'Personal'},
'549346':{'en': 'Personal'},
'5541999':{'en': 'TIM'},
'5541996':{'en': 'TIM'},
'551298181':{'en': 'TIM'},
'551298182':{'en': 'TIM'},
'55449910':{'en': 'Vivo'},
'552799253':{'en': 'Claro BR'},
'552799252':{'en': 'Claro BR'},
'552799251':{'en': 'Claro BR'},
'552799257':{'en': 'Claro BR'},
'552799256':{'en': 'Claro BR'},
'552799255':{'en': 'Claro BR'},
'552799254':{'en': 'Claro BR'},
'552799259':{'en': 'Claro BR'},
'552799258':{'en': 'Claro BR'},
'552198308':{'en': 'TIM'},
'552198309':{'en': 'TIM'},
'553199166':{'en': 'TIM'},
'553599132':{'en': 'TIM'},
'552198306':{'en': 'TIM'},
'45402':{'en': 'TDC'},
'45403':{'en': 'TDC'},
'45401':{'en': 'TDC'},
'45406':{'en': 'Telenor'},
'45407':{'en': 'Telenor'},
'45404':{'en': 'TDC'},
'45405':{'en': 'Telenor'},
'1787546':{'en': 'SunCom Wireless Puerto Rico'},
'1787545':{'en': 'CENTENNIAL'},
'1787544':{'en': 'CENTENNIAL'},
'551599142':{'en': 'Claro BR'},
'551599143':{'en': 'Claro BR'},
'554399125':{'en': 'Vivo'},
'551599141':{'en': 'Claro BR'},
'551599146':{'en': 'Claro BR'},
'551599147':{'en': 'Claro BR'},
'551599144':{'en': 'Claro BR'},
'551599145':{'en': 'Claro BR'},
'551599148':{'en': 'Claro BR'},
'551599149':{'en': 'Claro BR'},
'2537':{'en': 'Evatis'},
'554399129':{'en': 'Vivo'},
'554399128':{'en': 'Vivo'},
'552798122':{'en': 'TIM'},
'552798123':{'en': 'TIM'},
'552798121':{'en': 'TIM'},
'552798126':{'en': 'TIM'},
'552798127':{'en': 'TIM'},
'552798124':{'en': 'TIM'},
'552798125':{'en': 'TIM'},
'552798128':{'en': 'TIM'},
'552798129':{'en': 'TIM'},
'554799933':{'en': 'TIM'},
'554898862':{'en': 'Claro BR'},
'2348439':{'en': 'Starcomms'},
'2348438':{'en': 'Starcomms'},
'2348434':{'en': 'Starcomms'},
'2348437':{'en': 'Starcomms'},
'2348431':{'en': 'Starcomms'},
'479815':{'en': 'NetCom'},
'3584559':{'en': 'MI'},
'3584558':{'en': 'Suomen Virveverkko'},
'479749':{'en': 'Telenor'},
'479748':{'en': 'Telenor'},
'3584550':{'en': 'Suomen Virveverkko'},
'479747':{'en': 'Telenor'},
'479746':{'en': 'Telenor'},
'3584555':{'en': 'Nokia Solutions and Networks'},
'479740':{'en': 'Telenor'},
'3584557':{'en': 'Compatel'},
'479742':{'en': 'Telenor'},
'48691':{'en': 'Plus'},
'48692':{'en': 'T-Mobile'},
'48693':{'en': 'Plus'},
'48694':{'en': 'T-Mobile'},
'48695':{'en': 'Plus'},
'48696':{'en': 'T-Mobile'},
'48697':{'en': 'Plus'},
'48698':{'en': 'T-Mobile'},
'551898137':{'en': 'TIM'},
'551898136':{'en': 'TIM'},
'551499164':{'en': 'Claro BR'},
'30690100':{'en': 'MI Carrier Services'},
'44759':{'en': 'O2'},
'44754':{'en': 'O2'},
'44756':{'en': 'O2'},
'44751':{'en': 'O2'},
'24399':{'en': 'Zain'},
'29729':{'en': 'Digicel'},
'24398':{'en': 'Zain'},
'2413':{'en': 'Libertis'},
'554799907':{'en': 'TIM'},
'4476600':{'en': 'Plus'},
'4476601':{'en': 'PageOne'},
'4476604':{'en': 'PageOne'},
'4476606':{'en': '24 Seven'},
'4476607':{'en': 'Premium O'},
'554199132':{'en': 'Vivo'},
'554199133':{'en': 'Vivo'},
'554199131':{'en': 'Vivo'},
'554199136':{'en': 'Vivo'},
'552298138':{'en': 'TIM'},
'554199134':{'en': 'Vivo'},
'554199135':{'en': 'Vivo'},
'554199138':{'en': 'Vivo'},
'552298139':{'en': 'TIM'},
'552298136':{'en': 'TIM'},
'552298137':{'en': 'TIM'},
'552298134':{'en': 'TIM'},
'552298135':{'en': 'TIM'},
'554599961':{'en': 'TIM'},
'552298132':{'en': 'TIM'},
'212619':{'en': u('M\u00e9ditel')},
'212617':{'en': u('M\u00e9ditel')},
'212614':{'en': u('M\u00e9ditel')},
'212612':{'en': u('M\u00e9ditel')},
'552198359':{'en': 'TIM'},
'552198358':{'en': 'TIM'},
'552198357':{'en': 'TIM'},
'552198356':{'en': 'TIM'},
'552198355':{'en': 'TIM'},
'552198354':{'en': 'TIM'},
'552198353':{'en': 'TIM'},
'552198352':{'en': 'TIM'},
'552198351':{'en': 'TIM'},
'553199848':{'en': 'Telemig Celular'},
'553199382':{'en': 'TIM'},
'553199383':{'en': 'TIM'},
'553199381':{'en': 'TIM'},
'553199386':{'en': 'TIM'},
'553199387':{'en': 'TIM'},
'553199384':{'en': 'TIM'},
'553199385':{'en': 'TIM'},
'553199388':{'en': 'TIM'},
'553199389':{'en': 'TIM'},
'551998215':{'en': 'TIM'},
'551998214':{'en': 'TIM'},
'551998217':{'en': 'TIM'},
'551998216':{'en': 'TIM'},
'551998211':{'en': 'TIM'},
'551998213':{'en': 'TIM'},
'551998212':{'en': 'TIM'},
'4479245':{'en': 'Cloud9'},
'551998219':{'en': 'TIM'},
'551998218':{'en': 'TIM'},
'554899948':{'en': 'TIM'},
'554899949':{'en': 'TIM'},
'554899944':{'en': 'TIM'},
'554899945':{'en': 'TIM'},
'554899946':{'en': 'TIM'},
'554899947':{'en': 'TIM'},
'554899941':{'en': 'TIM'},
'554899942':{'en': 'TIM'},
'551598805':{'en': 'Oi'},
'551598806':{'en': 'Oi'},
'551598807':{'en': 'Oi'},
'553499814':{'en': 'Telemig Celular'},
'553499936':{'en': 'Telemig Celular'},
'553499937':{'en': 'Telemig Celular'},
'553499934':{'en': 'Telemig Celular'},
'553499935':{'en': 'Telemig Celular'},
'553499932':{'en': 'Telemig Celular'},
'553499933':{'en': 'Telemig Celular'},
'553499931':{'en': 'Telemig Celular'},
'553499938':{'en': 'Telemig Celular'},
'553499939':{'en': 'Telemig Celular'},
'514494907':{'en': 'Claro'},
'516596534':{'en': 'Claro'},
'514494909':{'en': 'Claro'},
'514494908':{'en': 'Claro'},
'554299982':{'en': 'TIM'},
'2346437':{'en': 'Starcomms'},
'230529':{'en': 'MTML'},
'230525':{'en': 'Cellplus'},
'2346439':{'en': 'Starcomms'},
'2346438':{'en': 'Starcomms'},
'51669669':{'en': 'Movistar'},
'51669668':{'en': 'Movistar'},
'551899754':{'en': 'Vivo'},
'551899755':{'en': 'Vivo'},
'51669667':{'en': 'Claro'},
'51669666':{'en': 'Movistar'},
'554699123':{'en': 'Vivo'},
'551899751':{'en': 'Vivo'},
'551899752':{'en': 'Vivo'},
'551899753':{'en': 'Vivo'},
'4476598':{'en': 'Vodafone'},
'4476599':{'en': 'PageOne'},
'124272':{'en': 'BaTelCo'},
'124273':{'en': 'aliv'},
'553599162':{'en': 'TIM'},
'4476591':{'en': 'Vodafone'},
'4476592':{'en': 'PageOne'},
'4476593':{'en': 'Vodafone'},
'4476594':{'en': 'Vodafone'},
'4476595':{'en': 'Vodafone'},
'4476596':{'en': 'Vodafone'},
'553599165':{'en': 'TIM'},
'454298':{'en': 'Telia'},
'454299':{'en': 'Telia'},
'454292':{'en': '3'},
'454293':{'en': 'CBB Mobil'},
'454290':{'en': 'Mundio Mobile'},
'2341804':{'en': 'Starcomms'},
'454296':{'en': 'Telia'},
'454297':{'en': 'Telia'},
'454294':{'en': '3'},
'454295':{'en': '3'},
'42373':{'en': 'Telecom Liechtenstein'},
'42374':{'en': 'First Mobile'},
'42377':{'en': 'Swisscom'},
'42379':{'en': 'Telecom Liechtenstein'},
'42378':{'en': 'Salt'},
'554599968':{'en': 'TIM'},
'554699119':{'en': 'Vivo'},
'554699118':{'en': 'Vivo'},
'554699114':{'en': 'Vivo'},
'554699117':{'en': 'Vivo'},
'552499924':{'en': 'Vivo'},
'552499925':{'en': 'Vivo'},
'552499920':{'en': 'Vivo'},
'552499921':{'en': 'Vivo'},
'552499922':{'en': 'Vivo'},
'552499923':{'en': 'Vivo'},
'554699112':{'en': 'Vivo'},
'19392416':{'en': 'Claro'},
'19392415':{'en': 'Claro'},
'19392414':{'en': 'Claro'},
'19392413':{'en': 'Claro'},
'19392412':{'en': 'Claro'},
'19392411':{'en': 'Claro'},
'19392410':{'en': 'Claro'},
'22997':{'en': 'MTN'},
'551799765':{'en': 'Vivo'},
'22995':{'en': 'Moov'},
'22994':{'en': 'Moov'},
'22993':{'en': 'BLK'},
'551799761':{'en': 'Vivo'},
'551799762':{'en': 'Vivo'},
'22990':{'en': 'Libercom'},
'24106':{'en': 'Libertis'},
'24107':{'en': 'Airtel'},
'24104':{'en': 'Airtel'},
'22998':{'en': 'Moov'},
'45617':{'en': 'TDC'},
'346039':{'en': 'Lebara'},
'1787376':{'en': 'Claro'},
'45614':{'en': 'TDC'},
'45613':{'en': 'TDC'},
'45612':{'en': 'TDC'},
'45611':{'en': 'TDC'},
'346031':{'en': 'Lebara'},
'346032':{'en': 'Lebara'},
'346033':{'en': 'Lebara'},
'346034':{'en': 'Vodafone'},
'346035':{'en': 'Vodafone'},
'45619':{'en': 'Telenor'},
'346037':{'en': 'Vodafone'},
'551197018':{'en': 'TIM'},
'551197019':{'en': 'TIM'},
'552899959':{'en': 'Vivo'},
'552899958':{'en': 'Vivo'},
'551197012':{'en': 'TIM'},
'551197013':{'en': 'TIM'},
'552899957':{'en': 'Vivo'},
'551197011':{'en': 'TIM'},
'551197016':{'en': 'TIM'},
'551197017':{'en': 'TIM'},
'551197014':{'en': 'TIM'},
'551197015':{'en': 'TIM'},
'55319999':{'en': 'Telemig Celular'},
'55319998':{'en': 'Telemig Celular'},
'55319997':{'en': 'Telemig Celular'},
'55319996':{'en': 'Telemig Celular'},
'55319995':{'en': 'Telemig Celular'},
'551499138':{'en': 'Claro BR'},
'551499134':{'en': 'Claro BR'},
'551499135':{'en': 'Claro BR'},
'551499136':{'en': 'Claro BR'},
'551499137':{'en': 'Claro BR'},
'551499131':{'en': 'Claro BR'},
'551499132':{'en': 'Claro BR'},
'551499133':{'en': 'Claro BR'},
'2345277':{'en': 'Starcomms'},
'2345278':{'en': 'Starcomms'},
'2345279':{'en': 'Starcomms'},
'552798144':{'en': 'TIM'},
'447470':{'en': 'Vodafone'},
'447471':{'en': 'Vodafone'},
'552798145':{'en': 'TIM'},
'479552':{'en': 'Telenor'},
'479555':{'en': 'Telenor'},
'234528':{'en': 'Starcomms'},
'552798143':{'en': 'TIM'},
'554499148':{'en': 'Vivo'},
'554499149':{'en': 'Vivo'},
'554499141':{'en': 'Vivo'},
'554499142':{'en': 'Vivo'},
'554499143':{'en': 'Vivo'},
'554499144':{'en': 'Vivo'},
'554499145':{'en': 'Vivo'},
'554499146':{'en': 'Vivo'},
'554499147':{'en': 'Vivo'},
'447699':{'en': 'Vodafone'},
'447693':{'en': 'O2'},
'553599841':{'en': 'Telemig Celular'},
'516596592':{'en': 'Movistar'},
'553599843':{'en': 'Telemig Celular'},
'516596590':{'en': 'Movistar'},
'507161':{'en': 'Cable & Wireless'},
'553599845':{'en': 'Telemig Celular'},
'553898432':{'en': 'Claro BR'},
'553898433':{'en': 'Claro BR'},
'553898434':{'en': 'Claro BR'},
'553898435':{'en': 'Claro BR'},
'553898436':{'en': 'Claro BR'},
'553599844':{'en': 'Telemig Celular'},
'549362':{'en': 'Personal'},
'549364':{'en': 'Personal'},
'553599846':{'en': 'Telemig Celular'},
'553199175':{'en': 'TIM'},
'552299238':{'en': 'Claro BR'},
'552299239':{'en': 'Claro BR'},
'552299236':{'en': 'Claro BR'},
'552299237':{'en': 'Claro BR'},
'552299234':{'en': 'Claro BR'},
'23221':{'en': 'Sierratel'},
'552299232':{'en': 'Claro BR'},
'516596599':{'en': 'Movistar'},
'23225':{'en': 'Sierratel'},
'12468':{'en': 'Digicel'},
'553799143':{'en': 'TIM'},
'553799141':{'en': 'TIM'},
'553799146':{'en': 'TIM'},
'553799147':{'en': 'TIM'},
'553199174':{'en': 'TIM'},
'553799145':{'en': 'TIM'},
'50844':{'en': 'Globaltel'},
'50840':{'en': 'Globaltel'},
'50842':{'en': 'Equant'},
'50843':{'en': 'Equant'},
'1284300':{'en': 'Digicel'},
'553199787':{'en': 'Telemig Celular'},
'549332':{'en': 'Personal'},
'2347784':{'en': 'Starcomms'},
'347277':{'en': 'Vodafone'},
'4478927':{'en': 'O2'},
'4478926':{'en': 'O2'},
'22177':{'en': 'Orange'},
'4478924':{'en': 'O2'},
'4478923':{'en': 'O2'},
'22170':{'en': 'Expresso'},
'4478921':{'en': 'Vectone Mobile'},
'4478920':{'en': 'HSL'},
'22179':{'en': 'ADIE'},
'22178':{'en': 'Orange'},
'4478929':{'en': 'O2'},
'4478928':{'en': 'O2'},
'25772':{'en': 'Leo'},
'25771':{'en': 'Leo'},
'25776':{'en': 'Leo'},
'25777':{'en': 'Onatel'},
'25775':{'en': 'Smart Mobile'},
'25778':{'en': 'Smart Mobile'},
'25779':{'en': 'Leo'},
'553199717':{'en': 'Telemig Celular'},
'554299919':{'en': 'TIM'},
'553199173':{'en': 'TIM'},
'24828':{'en': 'Airtel'},
'24825':{'en': 'CWS'},
'553199711':{'en': 'Telemig Celular'},
'24827':{'en': 'Airtel'},
'24826':{'en': 'CWS'},
'553199344':{'en': 'TIM'},
'346931':{'en': 'Orange'},
'346933':{'en': 'Carrefour'},
'346932':{'en': 'MasMovil'},
'346935':{'en': 'MasMovil'},
'553199713':{'en': 'Telemig Celular'},
'346937':{'en': 'MasMovil'},
'553199712':{'en': 'Telemig Celular'},
'553199343':{'en': 'TIM'},
'1787569':{'en': 'CENTENNIAL'},
'1787568':{'en': 'SunCom Wireless Puerto Rico'},
'553199172':{'en': 'TIM'},
'554399149':{'en': 'Vivo'},
'554399148':{'en': 'Vivo'},
'1787561':{'en': 'CENTENNIAL'},
'45421':{'en': 'Telia'},
'1787563':{'en': 'CENTENNIAL'},
'45423':{'en': 'Telia'},
'45424':{'en': 'BiBoB'},
'45425':{'en': 'BiBoB'},
'45426':{'en': '3'},
'551599167':{'en': 'Claro BR'},
'447999':{'en': 'O2'},
'447990':{'en': 'Vodafone'},
'386656':{'en': 'Telekom Slovenije'},
'386657':{'en': 'Novatel'},
'386651':{'en': u('S\u017d - Infrastruktura')},
'554299119':{'en': 'Vivo'},
'554299118':{'en': 'Vivo'},
'474049':{'en': 'NetCom'},
'474048':{'en': 'NetCom'},
'474045':{'en': 'NetCom'},
'474047':{'en': 'NetCom'},
'474046':{'en': 'NetCom'},
'554299115':{'en': 'Vivo'},
'553199821':{'en': 'Telemig Celular'},
'554299117':{'en': 'Vivo'},
'554299116':{'en': 'Vivo'},
'479837':{'en': 'NetCom'},
'551798154':{'en': 'TIM'},
'551798155':{'en': 'TIM'},
'551798156':{'en': 'TIM'},
'551798151':{'en': 'TIM'},
'551798152':{'en': 'TIM'},
'551798153':{'en': 'TIM'},
'44778':{'en': 'Vodafone'},
'44773':{'en': 'O2'},
'44771':{'en': 'O2'},
'44770':{'en': 'O2'},
'44777':{'en': 'Vodafone'},
'44776':{'en': 'Vodafone'},
'554498402':{'en': 'Brasil Telecom GSM'},
'554498403':{'en': 'Brasil Telecom GSM'},
'554498401':{'en': 'Brasil Telecom GSM'},
'554498406':{'en': 'Brasil Telecom GSM'},
'554498407':{'en': 'Brasil Telecom GSM'},
'421908':{'en': 'Orange'},
'421909':{'en': 'Juro'},
'421906':{'en': 'Orange'},
'421907':{'en': 'Orange'},
'421904':{'en': 'Telekom'},
'421905':{'en': 'Orange'},
'421902':{'en': 'Telekom'},
'421903':{'en': 'Telekom'},
'421901':{'en': 'Telekom'},
'551899713':{'en': 'Vivo'},
'5521975':{'en': 'Claro BR'},
'407018':{'en': 'Lycamobile'},
'407019':{'en': 'Lycamobile'},
'554899901':{'en': 'TIM'},
'407013':{'en': 'Lycamobile'},
'407014':{'en': 'Lycamobile'},
'407015':{'en': 'Lycamobile'},
'407016':{'en': 'Lycamobile'},
'407017':{'en': 'Lycamobile'},
'554899903':{'en': 'TIM'},
'479497':{'en': 'Telenor'},
'479498':{'en': 'Telenor'},
'554899905':{'en': 'TIM'},
'554899906':{'en': 'TIM'},
'554899907':{'en': 'TIM'},
'553199632':{'en': 'Telemig Celular'},
'553199633':{'en': 'Telemig Celular'},
'553199631':{'en': 'Telemig Celular'},
'553199636':{'en': 'Telemig Celular'},
'553199637':{'en': 'Telemig Celular'},
'553199634':{'en': 'Telemig Celular'},
'551598113':{'en': 'TIM'},
'553199638':{'en': 'Telemig Celular'},
'553199639':{'en': 'Telemig Celular'},
'554599924':{'en': 'TIM'},
'551999696':{'en': 'Vivo'},
'553199208':{'en': 'TIM'},
'551999697':{'en': 'Vivo'},
'551999694':{'en': 'Vivo'},
'212638':{'en': 'Inwi'},
'212639':{'en': 'Maroc Telecom'},
'551999695':{'en': 'Vivo'},
'212630':{'en': 'Inwi'},
'212631':{'en': u('M\u00e9ditel')},
'212632':{'en': u('M\u00e9ditel')},
'212633':{'en': 'Inwi'},
'212634':{'en': 'Inwi'},
'212635':{'en': 'Inwi'},
'212636':{'en': 'Maroc Telecom'},
'212637':{'en': 'Maroc Telecom'},
'552198335':{'en': 'TIM'},
'552198334':{'en': 'TIM'},
'552198337':{'en': 'TIM'},
'552198336':{'en': 'TIM'},
'552198331':{'en': 'TIM'},
'552198333':{'en': 'TIM'},
'552198332':{'en': 'TIM'},
'552198339':{'en': 'TIM'},
'552198338':{'en': 'TIM'},
'5532987':{'en': 'Oi'},
'5532986':{'en': 'Oi'},
'554199118':{'en': 'Vivo'},
'554199119':{'en': 'Vivo'},
'554199111':{'en': 'Vivo'},
'554199112':{'en': 'Vivo'},
'554199113':{'en': 'Vivo'},
'554199114':{'en': 'Vivo'},
'554199115':{'en': 'Vivo'},
'554199116':{'en': 'Vivo'},
'554199117':{'en': 'Vivo'},
'553499918':{'en': 'Telemig Celular'},
'553499919':{'en': 'Telemig Celular'},
'553499914':{'en': 'Telemig Celular'},
'553499915':{'en': 'Telemig Celular'},
'553499916':{'en': 'Telemig Celular'},
'553499917':{'en': 'Telemig Celular'},
'553499911':{'en': 'Telemig Celular'},
'553499912':{'en': 'Telemig Celular'},
'553499913':{'en': 'Telemig Celular'},
'5535988':{'en': 'Oi'},
'5535989':{'en': 'Oi'},
'554899152':{'en': 'Vivo'},
'517297271':{'en': 'Claro'},
'517297270':{'en': 'Claro'},
'517297273':{'en': 'Claro'},
'517297272':{'en': 'Claro'},
'5535985':{'en': 'Oi'},
'5535986':{'en': 'Oi'},
'5535987':{'en': 'Oi'},
'230542':{'en': 'Emtel'},
'554899622':{'en': 'TIM'},
'230547':{'en': 'Emtel'},
'230544':{'en': 'Emtel'},
'554899157':{'en': 'Vivo'},
'230548':{'en': 'Emtel'},
'230549':{'en': 'Emtel'},
'554899156':{'en': 'Vivo'},
'554899155':{'en': 'Vivo'},
'554899154':{'en': 'Vivo'},
'553399199':{'en': 'TIM'},
'553399198':{'en': 'TIM'},
'553399191':{'en': 'TIM'},
'553399193':{'en': 'TIM'},
'554899159':{'en': 'Vivo'},
'553399197':{'en': 'TIM'},
'553599141':{'en': 'TIM'},
'553599142':{'en': 'TIM'},
'553599143':{'en': 'TIM'},
'553599144':{'en': 'TIM'},
'553599145':{'en': 'TIM'},
'553599146':{'en': 'TIM'},
'553599147':{'en': 'TIM'},
'553599148':{'en': 'TIM'},
'553599149':{'en': 'TIM'},
'551197968':{'en': 'Claro BR'},
'551197969':{'en': 'Claro BR'},
'458141':{'en': 'Simpl Telecom'},
'458146':{'en': 'Mundio Mobile'},
'458147':{'en': 'Mundio Mobile'},
'458145':{'en': 'Telavox'},
'458148':{'en': 'Mundio Mobile'},
'458149':{'en': 'Mundio Mobile'},
'5544999':{'en': 'TIM'},
'2763':{'en': 'MTN'},
'2762':{'en': 'Cell C'},
'2761':{'en': 'Cell C'},
'21192':{'en': 'MTN'},
'21191':{'en': 'Zain'},
'21197':{'en': 'Gemtel'},
'21195':{'en': 'Vivacell'},
'553199199':{'en': 'TIM'},
'553199198':{'en': 'TIM'},
'553199197':{'en': 'TIM'},
'553199196':{'en': 'TIM'},
'553199195':{'en': 'TIM'},
'553199194':{'en': 'TIM'},
'553199193':{'en': 'TIM'},
'553199192':{'en': 'TIM'},
'553199191':{'en': 'TIM'},
'24120':{'en': 'Libertis'},
'24121':{'en': 'Libertis'},
'24122':{'en': 'Libertis'},
'24123':{'en': 'Libertis'},
'24124':{'en': 'Libertis'},
'24125':{'en': 'Libertis'},
'24126':{'en': 'Libertis'},
'24127':{'en': 'Libertis'},
'30695328':{'en': 'Premium Net International'},
'1787359':{'en': 'SunCom Wireless Puerto Rico'},
'1787357':{'en': 'CENTENNIAL'},
'1787355':{'en': 'CENTENNIAL'},
'26878':{'en': 'Swazi MTN'},
'26879':{'en': 'Swazi MTN'},
'551197032':{'en': 'TIM'},
'551197033':{'en': 'TIM'},
'551197034':{'en': 'TIM'},
'551197035':{'en': 'TIM'},
'551197036':{'en': 'TIM'},
'551197037':{'en': 'TIM'},
'551197038':{'en': 'TIM'},
'552899979':{'en': 'Vivo'},
'552899978':{'en': 'Vivo'},
'26876':{'en': 'Swazi MTN'},
'26877':{'en': 'SPTC'},
'554199215':{'en': 'Vivo'},
'51449485':{'en': 'Movistar'},
'51449484':{'en': 'Movistar'},
'51449486':{'en': 'Movistar'},
'51449483':{'en': 'Claro'},
'51449482':{'en': 'Claro'},
'51449489':{'en': 'Movistar'},
'51449488':{'en': 'Movistar'},
'554299144':{'en': 'Vivo'},
'19392439':{'en': 'Claro'},
'19392438':{'en': 'Claro'},
'19392435':{'en': 'Claro'},
'19392434':{'en': 'Claro'},
'19392437':{'en': 'Claro'},
'19392436':{'en': 'Claro'},
'19392433':{'en': 'Claro'},
'447459':{'en': 'Lycamobile'},
'447454':{'en': 'Three'},
'447455':{'en': 'Three'},
'447456':{'en': 'Three'},
'517497956':{'en': 'Movistar'},
'447451':{'en': 'Vectone Mobile'},
'447452':{'en': 'Manx Telecom'},
'447453':{'en': 'Three'},
'26269313':{'en': 'SFR'},
'26269311':{'en': 'Orange'},
'26269310':{'en': 'SFR'},
'518298298':{'en': 'Movistar'},
'479536':{'en': 'Telenor'},
'234818':{'en': '9mobile'},
'234819':{'en': 'Starcomms'},
'38039':{'en': 'Golden Telecom', 'uk': u('\u0413\u043e\u043b\u0434\u0435\u043d \u0422\u0435\u043b\u0435\u043a\u043e\u043c')},
'554299912':{'en': 'TIM'},
'554299915':{'en': 'TIM'},
'554299914':{'en': 'TIM'},
'554299917':{'en': 'TIM'},
'554299916':{'en': 'TIM'},
'234810':{'en': 'MTN'},
'234811':{'en': 'Glo'},
'234812':{'en': 'Airtel'},
'234813':{'en': 'MTN'},
'234814':{'en': 'MTN'},
'234815':{'en': 'Glo'},
'234816':{'en': 'MTN'},
'234817':{'en': '9mobile'},
'554499128':{'en': 'Vivo'},
'554499129':{'en': 'Vivo'},
'554499126':{'en': 'Vivo'},
'554499127':{'en': 'Vivo'},
'554499124':{'en': 'Vivo'},
'34676':{'en': 'Movistar'},
'554499122':{'en': 'Vivo'},
'554499123':{'en': 'Vivo'},
'554499121':{'en': 'Vivo'},
'474661':{'en': 'NetCom'},
'474660':{'en': 'NetCom'},
'474663':{'en': 'NetCom'},
'474662':{'en': 'NetCom'},
'554599949':{'en': 'TIM'},
'5527989':{'en': 'Oi'},
'474666':{'en': 'Telenor'},
'5527987':{'en': 'Oi'},
'5527986':{'en': 'Oi'},
'5527985':{'en': 'Oi'},
'47591':{'en': 'Telenor'},
'50363171':{'en': 'Claro'},
'50363170':{'en': 'Claro'},
'50363173':{'en': 'Claro'},
'50363172':{'en': 'Claro'},
'50363174':{'en': 'Claro'},
'515495826':{'en': 'Claro'},
'549389':{'en': 'Personal'},
'549388':{'en': 'Personal'},
'549385':{'en': 'Personal'},
'549384':{'en': 'Personal'},
'549387':{'en': 'Personal'},
'549386':{'en': 'Personal'},
'549381':{'en': 'Personal'},
'549380':{'en': 'Personal'},
'549383':{'en': 'Personal'},
'549382':{'en': 'Personal'},
'552299214':{'en': 'Claro BR'},
'552299215':{'en': 'Claro BR'},
'552299216':{'en': 'Claro BR'},
'552299217':{'en': 'Claro BR'},
'552299211':{'en': 'Claro BR'},
'552299212':{'en': 'Claro BR'},
'552299213':{'en': 'Claro BR'},
'552299218':{'en': 'Claro BR'},
'552299219':{'en': 'Claro BR'},
'4473898':{'en': 'Vodafone'},
'4473892':{'en': 'TalkTalk'},
'4473893':{'en': 'TalkTalk'},
'4473890':{'en': 'Three'},
'4473891':{'en': 'Three'},
'4473896':{'en': 'Hanhaa'},
'4473897':{'en': 'Vodafone'},
'4473894':{'en': 'TalkTalk'},
'4473895':{'en': 'TalkTalk'},
'3468529':{'en': 'Carrefour'},
'554298408':{'en': 'Brasil Telecom GSM'},
'554298409':{'en': 'Brasil Telecom GSM'},
'3939':{'en': '3 Italia'},
'3938':{'en': 'Wind'},
'3934':{'en': 'Vodafone'},
'554298402':{'en': 'Brasil Telecom GSM'},
'3936':{'en': 'TIM'},
'554298404':{'en': 'Brasil Telecom GSM'},
'554298405':{'en': 'Brasil Telecom GSM'},
'3933':{'en': 'TIM'},
'3932':{'en': 'Wind'},
'5524988':{'en': 'Oi'},
'5524989':{'en': 'Oi'},
'5524986':{'en': 'Oi'},
'5524987':{'en': 'Oi'},
'5524985':{'en': 'Oi'},
'1787992':{'en': 'CENTENNIAL'},
'1787993':{'en': 'CENTENNIAL'},
'1787998':{'en': 'CENTENNIAL'},
'1787999':{'en': 'CENTENNIAL'},
'551899659':{'en': 'Vivo'},
'551899658':{'en': 'Vivo'},
'551899651':{'en': 'Vivo'},
'551899653':{'en': 'Vivo'},
'551899652':{'en': 'Vivo'},
'551899655':{'en': 'Vivo'},
'551899654':{'en': 'Vivo'},
'551899657':{'en': 'Vivo'},
'551899656':{'en': 'Vivo'},
'552197370':{'en': 'Claro BR'},
'552197371':{'en': 'Claro BR'},
'552197372':{'en': 'Claro BR'},
'552197373':{'en': 'Claro BR'},
'4368183':{'en': 'Orange AT'},
'553598408':{'en': 'Claro BR'},
'553598409':{'en': 'Claro BR'},
'553598402':{'en': 'Claro BR'},
'553598403':{'en': 'Claro BR'},
'553598401':{'en': 'Claro BR'},
'553598406':{'en': 'Claro BR'},
'553598407':{'en': 'Claro BR'},
'553598404':{'en': 'Claro BR'},
'516196152':{'en': 'Movistar'},
'346919':{'en': 'MasMovil'},
'553299918':{'en': 'Telemig Celular'},
'554399163':{'en': 'Vivo'},
'554399162':{'en': 'Vivo'},
'554399161':{'en': 'Vivo'},
'554399167':{'en': 'Vivo'},
'554399166':{'en': 'Vivo'},
'551599108':{'en': 'Claro BR'},
'551599109':{'en': 'Claro BR'},
'2576':{'en': 'Viettel'},
'551599107':{'en': 'Claro BR'},
'551599104':{'en': 'Claro BR'},
'551599105':{'en': 'Claro BR'},
'551599102':{'en': 'Claro BR'},
'2573':{'en': 'Viettel'},
'551599101':{'en': 'Claro BR'},
'553499103':{'en': 'TIM'},
'553499102':{'en': 'TIM'},
'553499101':{'en': 'TIM'},
'474064':{'en': 'NetCom'},
'474063':{'en': 'NetCom'},
'474062':{'en': 'NetCom'},
'474061':{'en': 'NetCom'},
'474060':{'en': 'NetCom'},
'552798166':{'en': 'TIM'},
'552798167':{'en': 'TIM'},
'552798164':{'en': 'TIM'},
'552798165':{'en': 'TIM'},
'552798162':{'en': 'TIM'},
'552798163':{'en': 'TIM'},
'552798161':{'en': 'TIM'},
'554299139':{'en': 'Vivo'},
'554299138':{'en': 'Vivo'},
'554299137':{'en': 'Vivo'},
'554299136':{'en': 'Vivo'},
'554299135':{'en': 'Vivo'},
'554299134':{'en': 'Vivo'},
'554299133':{'en': 'Vivo'},
'554299132':{'en': 'Vivo'},
'554299131':{'en': 'Vivo'},
'553199679':{'en': 'Telemig Celular'},
'479854':{'en': 'NetCom'},
'459282':{'en': 'Flexfone'},
'459280':{'en': 'Voxbone'},
'306956':{'en': 'Vodafone'},
'553899191':{'en': 'TIM'},
'553899192':{'en': 'TIM'},
'553899193':{'en': 'TIM'},
'553899194':{'en': 'TIM'},
'553899195':{'en': 'TIM'},
'553899196':{'en': 'TIM'},
'5037786':{'en': 'Tigo'},
'5037785':{'en': 'Tigo'},
'554699113':{'en': 'Vivo'},
'37065':{'en': u('BIT\u0116')},
'37064':{'en': u('BIT\u0116')},
'37067':{'en': 'Tele 2'},
'30685501':{'en': 'BWS'},
'37060':{'en': 'Tele 2'},
'37062':{'en': 'Omnitel'},
'51749798':{'en': 'Movistar'},
'51749796':{'en': 'Movistar'},
'51749797':{'en': 'Claro'},
'51749790':{'en': 'Movistar'},
'51749791':{'en': 'Movistar'},
'51749792':{'en': 'Movistar'},
'51749793':{'en': 'Claro'},
'5037783':{'en': 'Movistar'},
'455282':{'en': 'Lebara Limited'},
'455280':{'en': 'Lebara Limited'},
'455281':{'en': 'Lebara Limited'},
'554498428':{'en': 'Brasil Telecom GSM'},
'554498429':{'en': 'Brasil Telecom GSM'},
'212675':{'en': u('M\u00e9ditel')},
'554498421':{'en': 'Brasil Telecom GSM'},
'554498422':{'en': 'Brasil Telecom GSM'},
'554498423':{'en': 'Brasil Telecom GSM'},
'554498424':{'en': 'Brasil Telecom GSM'},
'554498425':{'en': 'Brasil Telecom GSM'},
'554498426':{'en': 'Brasil Telecom GSM'},
'5037782':{'en': 'Movistar'},
'55249968':{'en': 'Vivo'},
'55249969':{'en': 'Vivo'},
'553199611':{'en': 'Telemig Celular'},
'55249962':{'en': 'Vivo'},
'30690500':{'en': 'MI Carrier Services'},
'55249964':{'en': 'Vivo'},
'55249965':{'en': 'Vivo'},
'55249966':{'en': 'Vivo'},
'55249967':{'en': 'Vivo'},
'212656':{'en': u('M\u00e9ditel')},
'212657':{'en': u('M\u00e9ditel')},
'551699961':{'en': 'Vivo'},
'553899999':{'en': 'Telemig Celular'},
'551699963':{'en': 'Vivo'},
'47928':{'en': 'NetCom'},
'551699964':{'en': 'Vivo'},
'553899990':{'en': 'Telemig Celular'},
'47922':{'en': 'NetCom'},
'553899992':{'en': 'Telemig Celular'},
'47920':{'en': 'NetCom'},
'47926':{'en': 'NetCom'},
'553899996':{'en': 'Telemig Celular'},
'47924':{'en': 'NetCom'},
'1787693':{'en': 'CENTENNIAL'},
'1787692':{'en': 'CENTENNIAL'},
'554899182':{'en': 'Vivo'},
'1787690':{'en': 'CENTENNIAL'},
'554899184':{'en': 'Vivo'},
'554899185':{'en': 'Vivo'},
'1787695':{'en': 'CENTENNIAL'},
'4478220':{'en': 'FleXtel'},
'4478221':{'en': 'Swiftnet'},
'4478222':{'en': 'TalkTalk'},
'4478224':{'en': 'aql'},
'4478225':{'en': 'Icron Network'},
'4478226':{'en': 'aql'},
'4478227':{'en': 'Cheers'},
'1242462':{'en': 'BaTelCo'},
'1242463':{'en': 'BaTelCo'},
'1242464':{'en': 'BaTelCo'},
'324682':{'en': 'Telenet'},
'1242466':{'en': 'BaTelCo'},
'554199178':{'en': 'Vivo'},
'554199179':{'en': 'Vivo'},
'554199176':{'en': 'Vivo'},
'554199177':{'en': 'Vivo'},
'554199174':{'en': 'Vivo'},
'554199175':{'en': 'Vivo'},
'554199172':{'en': 'Vivo'},
'554199173':{'en': 'Vivo'},
'554199171':{'en': 'Vivo'},
'517396994':{'en': 'Movistar'},
'50584':{'en': 'Claro'},
'517396996':{'en': 'Movistar'},
'517396997':{'en': 'Movistar'},
'517396990':{'en': 'Movistar'},
'517396991':{'en': 'Movistar'},
'554698824':{'en': 'Claro BR'},
'50582':{'en': 'Movistar'},
'517396998':{'en': 'Movistar'},
'50588':{'en': 'Movistar'},
'35193':{'en': 'NOS'},
'474830':{'en': 'Telenor'},
'474831':{'en': 'Telenor'},
'474832':{'en': 'Telenor'},
'551698178':{'en': 'TIM'},
'552198319':{'en': 'TIM'},
'552198318':{'en': 'TIM'},
'4478730':{'en': 'Telesign'},
'552198313':{'en': 'TIM'},
'552198312':{'en': 'TIM'},
'552198311':{'en': 'TIM'},
'552198317':{'en': 'TIM'},
'552198316':{'en': 'TIM'},
'552198315':{'en': 'TIM'},
'552198314':{'en': 'TIM'},
'5023534':{'en': 'Movistar'},
'551899798':{'en': 'Vivo'},
'551899799':{'en': 'Vivo'},
'2346479':{'en': 'Starcomms'},
'2694':{'en': 'TELCO'},
'2693':{'en': 'Comores Telecom'},
'551899792':{'en': 'Vivo'},
'2346470':{'en': 'Starcomms'},
'551899794':{'en': 'Vivo'},
'2346476':{'en': 'Starcomms'},
'2346475':{'en': 'Starcomms'},
'2346474':{'en': 'Starcomms'},
'5023533':{'en': 'Movistar'},
'5023532':{'en': 'Movistar'},
'447867':{'en': 'Vodafone'},
'553599126':{'en': 'TIM'},
'553599127':{'en': 'TIM'},
'553599124':{'en': 'TIM'},
'486999':{'en': 'Plus'},
'553599122':{'en': 'TIM'},
'553599123':{'en': 'TIM'},
'553599121':{'en': 'TIM'},
'3069530':{'en': 'Cyta'},
'553599128':{'en': 'TIM'},
'553599129':{'en': 'TIM'},
'2982':{'en': 'Faroese Telecom'},
'553799118':{'en': 'TIM'},
'458161':{'en': 'YouSee'},
'554899902':{'en': 'TIM'},
'3469199':{'en': 'Carrefour'},
'3469198':{'en': 'Carrefour'},
'297996':{'en': 'SETAR'},
'297997':{'en': 'SETAR'},
'297995':{'en': 'SETAR'},
'297998':{'en': 'SETAR'},
'5547991':{'en': 'Vivo'},
'474586':{'en': 'NetCom'},
'2346987':{'en': 'Starcomms'},
'551898144':{'en': 'TIM'},
'55169930':{'en': 'Claro BR'},
'554899904':{'en': 'TIM'},
'2987':{'en': 'Vodafone'},
'55169931':{'en': 'Claro BR'},
'2346989':{'en': 'Starcomms'},
'55169933':{'en': 'Claro BR'},
'55169934':{'en': 'Claro BR'},
'55169935':{'en': 'Claro BR'},
'2986':{'en': 'Vodafone'},
'554898407':{'en': 'Brasil Telecom GSM'},
'554199156':{'en': 'Vivo'},
'4476778':{'en': 'Core Telecom'},
'554199157':{'en': 'Vivo'},
'4476770':{'en': '24 Seven'},
'4476772':{'en': 'Relax'},
'4476776':{'en': 'Telsis'},
'551197056':{'en': 'Claro BR'},
'551197057':{'en': 'Claro BR'},
'551197054':{'en': 'Claro BR'},
'551197055':{'en': 'Claro BR'},
'551197052':{'en': 'Claro BR'},
'551197053':{'en': 'Claro BR'},
'551197050':{'en': 'TIM'},
'551197051':{'en': 'TIM'},
'552299229':{'en': 'Claro BR'},
'551197058':{'en': 'Claro BR'},
'551197059':{'en': 'Claro BR'},
'515495929':{'en': 'Movistar'},
'515495928':{'en': 'Movistar'},
'554199158':{'en': 'Vivo'},
'554899908':{'en': 'TIM'},
'554199159':{'en': 'Vivo'},
'553599904':{'en': 'Telemig Celular'},
'3469229':{'en': 'Carrefour'},
'26269339':{'en': 'Orange'},
'554599973':{'en': 'TIM'},
'554599971':{'en': 'TIM'},
'554598817':{'en': 'Claro BR'},
'554599977':{'en': 'TIM'},
'554599974':{'en': 'TIM'},
'554599975':{'en': 'TIM'},
'447300':{'en': 'EE'},
'447301':{'en': 'EE'},
'447302':{'en': 'EE'},
'447303':{'en': 'EE'},
'447304':{'en': 'EE'},
'447305':{'en': 'Virgin Mobile'},
'447306':{'en': 'Virgin Mobile'},
'38050':{'en': 'Vodafone', 'uk': u('Vodafone \u0423\u043a\u0440\u0430\u0457\u043d\u0430')},
'553599905':{'en': 'Telemig Celular'},
'554299937':{'en': 'TIM'},
'554299936':{'en': 'TIM'},
'554299935':{'en': 'TIM'},
'554299934':{'en': 'TIM'},
'554299933':{'en': 'TIM'},
'554299932':{'en': 'TIM'},
'554299931':{'en': 'TIM'},
'45523':{'en': 'Telia'},
'45921':{'en': 'Companymobile'},
'45925':{'en': 'Telenor Connexion AB'},
'45927':{'en': 'Telenor Connexion AB'},
'45926':{'en': 'Telenor Connexion AB'},
'553299901':{'en': 'Telemig Celular'},
'553299903':{'en': 'Telemig Celular'},
'553299902':{'en': 'Telemig Celular'},
'553299905':{'en': 'Telemig Celular'},
'553299904':{'en': 'Telemig Celular'},
'553299907':{'en': 'Telemig Celular'},
'553299906':{'en': 'Telemig Celular'},
'553299909':{'en': 'Telemig Celular'},
'553299908':{'en': 'Telemig Celular'},
'553599907':{'en': 'Telemig Celular'},
'502449':{'en': 'Tigo'},
'502448':{'en': 'Tigo'},
'502335':{'en': 'Tigo'},
'502334':{'en': 'Tigo'},
'502331':{'en': 'Tigo'},
'502330':{'en': 'Tigo'},
'502333':{'en': 'Tigo'},
'502332':{'en': 'Tigo'},
'553599901':{'en': 'Telemig Celular'},
'12428':{'en': 'aliv'},
'553799106':{'en': 'TIM'},
'553799107':{'en': 'TIM'},
'553799104':{'en': 'TIM'},
'553799105':{'en': 'TIM'},
'553799102':{'en': 'TIM'},
'553799103':{'en': 'TIM'},
'553799101':{'en': 'TIM'},
'5023531':{'en': 'Movistar'},
'553798416':{'en': 'Claro BR'},
'553799108':{'en': 'TIM'},
'553799109':{'en': 'TIM'},
'5037848':{'en': 'Movistar'},
'5037849':{'en': 'Movistar'},
'5023530':{'en': 'Movistar'},
'5037844':{'en': 'Claro'},
'5037845':{'en': 'Movistar'},
'5037846':{'en': 'Movistar'},
'5037847':{'en': 'Movistar'},
'5037840':{'en': 'Claro'},
'5037841':{'en': 'Claro'},
'5037842':{'en': 'Claro'},
'5037843':{'en': 'Claro'},
'4869961':{'en': 'Cyfrowy Polsat'},
'4869963':{'en': 'Cyfrowy Polsat'},
'4869962':{'en': 'Cyfrowy Polsat'},
'4869965':{'en': 'Cyfrowy Polsat'},
'4869964':{'en': 'Cyfrowy Polsat'},
'4869967':{'en': 'Plus'},
'4869966':{'en': 'Cyfrowy Polsat'},
'4869969':{'en': 'Plus'},
'4869968':{'en': 'Cyfrowy Polsat'},
'553199405':{'en': 'TIM'},
'553199404':{'en': 'TIM'},
'553199407':{'en': 'TIM'},
'553199406':{'en': 'TIM'},
'553199401':{'en': 'TIM'},
'553199403':{'en': 'TIM'},
'553199402':{'en': 'TIM'},
'553199411':{'en': 'TIM'},
'553199409':{'en': 'TIM'},
'553199408':{'en': 'TIM'},
'554398427':{'en': 'Brasil Telecom GSM'},
'2232079':{'en': 'Sotelma'},
'551899679':{'en': 'Vivo'},
'551899678':{'en': 'Vivo'},
'551899677':{'en': 'Vivo'},
'551899676':{'en': 'Vivo'},
'551899675':{'en': 'Vivo'},
'551899674':{'en': 'Vivo'},
'551899673':{'en': 'Vivo'},
'551899672':{'en': 'Vivo'},
'551899671':{'en': 'Vivo'},
'507873':{'en': 'Cable & Wireless'},
'507872':{'en': 'Cable & Wireless'},
'553398439':{'en': 'Claro BR'},
'553398438':{'en': 'Claro BR'},
'553398431':{'en': 'Claro BR'},
'553398433':{'en': 'Claro BR'},
'553398432':{'en': 'Claro BR'},
'553398435':{'en': 'Claro BR'},
'553398434':{'en': 'Claro BR'},
'553398437':{'en': 'Claro BR'},
'553398436':{'en': 'Claro BR'},
'553598421':{'en': 'Claro BR'},
'553598422':{'en': 'Claro BR'},
'553598423':{'en': 'Claro BR'},
'553598424':{'en': 'Claro BR'},
'553598425':{'en': 'Claro BR'},
'553598426':{'en': 'Claro BR'},
'553598427':{'en': 'Claro BR'},
'553598428':{'en': 'Claro BR'},
'553598429':{'en': 'Claro BR'},
'1787528':{'en': 'SunCom Wireless Puerto Rico'},
'553199271':{'en': 'TIM'},
'1787521':{'en': 'CENTENNIAL'},
'1787520':{'en': 'CENTENNIAL'},
'1787523':{'en': 'CENTENNIAL'},
'1787522':{'en': 'CENTENNIAL'},
'551599124':{'en': 'Claro BR'},
'551599125':{'en': 'Claro BR'},
'551599126':{'en': 'Claro BR'},
'551599127':{'en': 'Claro BR'},
'551599121':{'en': 'Claro BR'},
'551599122':{'en': 'Claro BR'},
'551599123':{'en': 'Claro BR'},
'447955':{'en': 'O2'},
'551599128':{'en': 'Claro BR'},
'551599129':{'en': 'Claro BR'},
'474001':{'en': 'NetCom'},
'474000':{'en': 'NetCom'},
'552798146':{'en': 'TIM'},
'552798147':{'en': 'TIM'},
'552798141':{'en': 'TIM'},
'552798142':{'en': 'TIM'},
'551899661':{'en': 'Vivo'},
'552798148':{'en': 'TIM'},
'552798149':{'en': 'TIM'},
'186955':{'en': 'CariGlobe St. Kitts'},
'55119709':{'en': 'Vivo'},
'516596591':{'en': 'Movistar'},
'186956':{'en': 'The Cable St. Kitts'},
'516596597':{'en': 'Movistar'},
'516596596':{'en': 'Movistar'},
'554299153':{'en': 'Vivo'},
'553199277':{'en': 'TIM'},
'55119702':{'en': 'TIM'},
'516596598':{'en': 'Movistar'},
'554299159':{'en': 'Vivo'},
'554299158':{'en': 'Vivo'},
'55119706':{'en': 'Claro BR'},
'55119707':{'en': 'Claro BR'},
'479876':{'en': 'NetCom'},
'42093':{'en': 'T-Mobile'},
'551499174':{'en': 'Claro BR'},
'551898124':{'en': 'TIM'},
'45515':{'en': 'TDC'},
'45516':{'en': 'TDC'},
'551499178':{'en': 'Claro BR'},
'45517':{'en': 'TDC'},
'40776':{'en': 'Digi Mobil'},
'5521971':{'en': 'Vivo'},
'5521972':{'en': 'Vivo'},
'5521974':{'en': 'Claro BR'},
'40775':{'en': 'Digi Mobil'},
'5521976':{'en': 'Claro BR'},
'551898121':{'en': 'TIM'},
'50378027':{'en': 'Claro'},
'50378026':{'en': 'Claro'},
'50378025':{'en': 'Claro'},
'50378024':{'en': 'Digicel'},
'50378023':{'en': 'Digicel'},
'50378022':{'en': 'Digicel'},
'50378021':{'en': 'Digicel'},
'50378020':{'en': 'Digicel'},
'551898123':{'en': 'TIM'},
'50378029':{'en': 'Claro'},
'50378028':{'en': 'Claro'},
'5119955':{'en': 'Movistar'},
'5119954':{'en': 'Movistar'},
'5119957':{'en': 'Movistar'},
'5119956':{'en': 'Movistar'},
'551999692':{'en': 'Vivo'},
'551999693':{'en': 'Vivo'},
'5119953':{'en': 'Movistar'},
'551999691':{'en': 'Vivo'},
'5119959':{'en': 'Movistar'},
'5119958':{'en': 'Movistar'},
'551999698':{'en': 'Vivo'},
'551999699':{'en': 'Vivo'},
'2348581':{'en': 'Starcomms'},
'2348583':{'en': 'Starcomms'},
'2348582':{'en': 'Starcomms'},
'2348585':{'en': 'Starcomms'},
'2348584':{'en': 'Starcomms'},
'2348587':{'en': 'Starcomms'},
'2348586':{'en': 'Starcomms'},
'2348588':{'en': 'Starcomms'},
'551898129':{'en': 'TIM'},
'552799291':{'en': 'Claro BR'},
'554799913':{'en': 'TIM'},
'407050':{'en': 'Iristel'},
'421940':{'en': 'O2'},
'421944':{'en': 'O2'},
'421945':{'en': 'Orange'},
'421948':{'en': 'O2'},
'421949':{'en': 'O2'},
'45315':{'en': '3'},
'347110':{'en': 'Zinnia'},
'347111':{'en': 'Vodafone'},
'447438':{'en': 'Lycamobile'},
'553199678':{'en': 'Telemig Celular'},
'347117':{'en': 'Vodafone'},
'553199676':{'en': 'Telemig Celular'},
'553199677':{'en': 'Telemig Celular'},
'553199674':{'en': 'Telemig Celular'},
'553199675':{'en': 'Telemig Celular'},
'553199672':{'en': 'Telemig Celular'},
'553199673':{'en': 'Telemig Celular'},
'553199671':{'en': 'Telemig Celular'},
'447793':{'en': 'O2'},
'447792':{'en': 'Orange'},
'447791':{'en': 'Orange'},
'447790':{'en': 'Orange'},
'447797':{'en': 'JT'},
'447796':{'en': 'Vodafone'},
'447795':{'en': 'Vodafone'},
'447794':{'en': 'Orange'},
'447799':{'en': 'Vodafone'},
'447798':{'en': 'Vodafone'},
'212679':{'en': u('M\u00e9ditel')},
'554698809':{'en': 'Claro BR'},
'212674':{'en': u('M\u00e9ditel')},
'47948':{'en': 'Telenor'},
'26269294':{'en': 'Only'},
'26269292':{'en': 'Only'},
'26269293':{'en': 'Only'},
'447433':{'en': 'EE'},
'1242468':{'en': 'BaTelCo'},
'553499957':{'en': 'Telemig Celular'},
'324688':{'en': 'Premium Routing GmbH'},
'324687':{'en': 'Premium Routing GmbH'},
'324685':{'en': 'Telenet'},
'324684':{'en': 'Telenet'},
'324683':{'en': 'Telenet'},
'1242465':{'en': 'BaTelCo'},
'324681':{'en': 'Telenet'},
'1242467':{'en': 'BaTelCo'},
'35196':{'en': 'MEO'},
'507668':{'en': 'Cable & Wireless'},
'507669':{'en': 'Cable & Wireless'},
'35191':{'en': 'Vodafone'},
'507664':{'en': u('Telef\u00f3nica M\u00f3viles')},
'507665':{'en': 'Cable & Wireless'},
'507666':{'en': 'Cable & Wireless'},
'507667':{'en': 'Cable & Wireless'},
'507660':{'en': u('Telef\u00f3nica M\u00f3viles')},
'507661':{'en': u('Telef\u00f3nica M\u00f3viles')},
'507662':{'en': u('Telef\u00f3nica M\u00f3viles')},
'507663':{'en': u('Telef\u00f3nica M\u00f3viles')},
'549280':{'en': 'Personal'},
'554799616':{'en': 'TIM'},
'503789':{'en': 'Tigo'},
'503788':{'en': 'Tigo'},
'474580':{'en': 'Telenor'},
'503783':{'en': 'Movistar'},
'503782':{'en': 'Movistar'},
'503781':{'en': 'Movistar'},
'2346988':{'en': 'Starcomms'},
'503787':{'en': 'Tigo'},
'503786':{'en': 'Claro'},
'503785':{'en': 'Claro'},
'554199154':{'en': 'Vivo'},
'554199155':{'en': 'Vivo'},
'38268':{'en': 'm:tel'},
'38269':{'en': 'Telenor'},
'554199151':{'en': 'Vivo'},
'554199152':{'en': 'Vivo'},
'554199153':{'en': 'Vivo'},
'38263':{'en': 'Telenor'},
'38260':{'en': 'm:tel'},
'38266':{'en': 'Telekom'},
'38267':{'en': 'Telekom'},
'554699974':{'en': 'TIM'},
'554198442':{'en': 'Brasil Telecom GSM'},
'423650':{'en': 'Soracom'},
'4474581':{'en': 'Gamma Telecom'},
'4474580':{'en': 'Gamma Telecom'},
'4474583':{'en': 'Virgin Mobile'},
'4474582':{'en': 'Premium Routing'},
'4474585':{'en': 'Marathon Telecom'},
'4474584':{'en': 'Airwave'},
'4474587':{'en': 'Limitless'},
'4474586':{'en': 'Three'},
'4474589':{'en': 'Three'},
'4474588':{'en': 'Limitless'},
'553899154':{'en': 'TIM'},
'553899155':{'en': 'TIM'},
'553899156':{'en': 'TIM'},
'553899157':{'en': 'TIM'},
'553899151':{'en': 'TIM'},
'551999506':{'en': 'Claro BR'},
'551999507':{'en': 'Claro BR'},
'551999504':{'en': 'Claro BR'},
'551999505':{'en': 'Claro BR'},
'551999502':{'en': 'Claro BR'},
'551999503':{'en': 'Claro BR'},
'551999500':{'en': 'Claro BR'},
'551999501':{'en': 'Claro BR'},
'516296251':{'en': 'Movistar'},
'516296250':{'en': 'Movistar'},
'516296253':{'en': 'Movistar'},
'516296252':{'en': 'Movistar'},
'516296254':{'en': 'Movistar'},
'551999508':{'en': 'Claro BR'},
'554698808':{'en': 'Claro BR'},
'515495808':{'en': 'Claro'},
'515495809':{'en': 'Claro'},
'5531984':{'en': 'Claro BR'},
'554698801':{'en': 'Claro BR'},
'554698802':{'en': 'Claro BR'},
'554698803':{'en': 'Claro BR'},
'554698804':{'en': 'Claro BR'},
'554698805':{'en': 'Claro BR'},
'554698806':{'en': 'Claro BR'},
'554698807':{'en': 'Claro BR'},
'454278':{'en': 'Telia'},
'454279':{'en': 'Telia'},
'454270':{'en': 'BiBoB'},
'454271':{'en': '3'},
'454272':{'en': '3'},
'454273':{'en': '3'},
'454274':{'en': '3'},
'454275':{'en': 'YouSee'},
'454276':{'en': 'Telia'},
'454277':{'en': 'Telia'},
'554799624':{'en': 'TIM'},
'554799625':{'en': 'TIM'},
'553899162':{'en': 'TIM'},
'554799628':{'en': 'TIM'},
'554799629':{'en': 'TIM'},
'553599108':{'en': 'TIM'},
'553599109':{'en': 'TIM'},
'553599104':{'en': 'TIM'},
'553599105':{'en': 'TIM'},
'553599106':{'en': 'TIM'},
'553599107':{'en': 'TIM'},
'553599101':{'en': 'TIM'},
'553599102':{'en': 'TIM'},
'553599103':{'en': 'TIM'},
'21379':{'en': 'Djezzy'},
'554799951':{'en': 'TIM'},
'553399968':{'en': 'Telemig Celular'},
'21377':{'en': 'Djezzy'},
'553799954':{'en': 'Telemig Celular'},
'1787312':{'en': 'Claro'},
'1787313':{'en': 'Claro'},
'1787310':{'en': 'SunCom Wireless Puerto Rico'},
'1787316':{'en': 'Claro'},
'1787317':{'en': 'Claro'},
'1787314':{'en': 'Claro'},
'1787315':{'en': 'Claro'},
'1787318':{'en': 'Claro'},
'554899929':{'en': 'TIM'},
'553799959':{'en': 'Telemig Celular'},
'553799958':{'en': 'Telemig Celular'},
'2015':{'en': 'TE'},
'2011':{'en': 'Etisalat'},
'2010':{'en': 'Vodafone'},
'2012':{'en': 'Orange'},
'553399961':{'en': 'Telemig Celular'},
'554799957':{'en': 'TIM'},
'45257':{'en': 'Telenor'},
'551499196':{'en': 'Claro BR'},
'551499197':{'en': 'Claro BR'},
'551499194':{'en': 'Claro BR'},
'551499195':{'en': 'Claro BR'},
'551499192':{'en': 'Claro BR'},
'551499193':{'en': 'Claro BR'},
'551499191':{'en': 'Claro BR'},
'553798426':{'en': 'Claro BR'},
'552499282':{'en': 'Claro BR'},
'553798424':{'en': 'Claro BR'},
'45256':{'en': 'Telenor'},
'553798422':{'en': 'Claro BR'},
'553798423':{'en': 'Claro BR'},
'26269355':{'en': 'Orange'},
'553798421':{'en': 'Claro BR'},
'26269350':{'en': 'Only'},
'38073':{'en': 'lifecell', 'uk': 'lifecell'},
'45254':{'en': 'Telenor'},
'51439437':{'en': 'Claro'},
'51439436':{'en': 'Movistar'},
'51439435':{'en': 'Claro'},
'51439434':{'en': 'Movistar'},
'553299923':{'en': 'Telemig Celular'},
'553299922':{'en': 'Telemig Celular'},
'51439431':{'en': 'Movistar'},
'51439430':{'en': 'Movistar'},
'51439438':{'en': 'Movistar'},
'553899810':{'en': 'Telemig Celular'},
'554299146':{'en': 'Vivo'},
'554299147':{'en': 'Vivo'},
'55349840':{'en': 'Claro BR'},
'55349841':{'en': 'Claro BR'},
'554299145':{'en': 'Vivo'},
'447366':{'en': 'Three'},
'447367':{'en': 'Three'},
'447365':{'en': 'Three'},
'554299142':{'en': 'Vivo'},
'554599952':{'en': 'TIM'},
'554599953':{'en': 'TIM'},
'554599954':{'en': 'TIM'},
'38163':{'en': 'Telenor'},
'554299143':{'en': 'Vivo'},
'45251':{'en': 'Telenor'},
'554299141':{'en': 'Vivo'},
'553799128':{'en': 'TIM'},
'553799129':{'en': 'TIM'},
'553799124':{'en': 'TIM'},
'553799125':{'en': 'TIM'},
'553799126':{'en': 'TIM'},
'553799127':{'en': 'TIM'},
'553799121':{'en': 'TIM'},
'553799122':{'en': 'TIM'},
'553799123':{'en': 'TIM'},
'553199795':{'en': 'Telemig Celular'},
'553199794':{'en': 'Telemig Celular'},
'553199797':{'en': 'Telemig Celular'},
'3468870':{'en': 'OpenMovil'},
'553199791':{'en': 'Telemig Celular'},
'553199793':{'en': 'Telemig Celular'},
'553199792':{'en': 'Telemig Celular'},
'553199799':{'en': 'Telemig Celular'},
'553199798':{'en': 'Telemig Celular'},
'187688':{'en': 'Digicel'},
'187689':{'en': 'Digicel'},
'554299149':{'en': 'Vivo'},
'187686':{'en': 'Digicel'},
'187687':{'en': 'Digicel'},
'187684':{'en': 'Digicel'},
'187685':{'en': 'Digicel'},
'4869909':{'en': 'Cyfrowy Polsat'},
'4869908':{'en': 'Cyfrowy Polsat'},
'4869903':{'en': 'Cyfrowy Polsat'},
'4869902':{'en': 'Cyfrowy Polsat'},
'4869907':{'en': 'Cyfrowy Polsat'},
'4869906':{'en': 'Cyfrowy Polsat'},
'4869905':{'en': 'Cyfrowy Polsat'},
'4869904':{'en': 'Cyfrowy Polsat'},
'447586':{'en': 'Vodafone'},
'447587':{'en': 'Vodafone'},
'447584':{'en': 'Vodafone'},
'447585':{'en': 'Vodafone'},
'447582':{'en': 'Orange'},
'447583':{'en': 'Orange'},
'447580':{'en': 'Orange'},
'447581':{'en': 'Orange'},
'447588':{'en': 'Three'},
'551899615':{'en': 'Vivo'},
'551899614':{'en': 'Vivo'},
'551899617':{'en': 'Vivo'},
'551899616':{'en': 'Vivo'},
'551899611':{'en': 'Vivo'},
'551899613':{'en': 'Vivo'},
'551899612':{'en': 'Vivo'},
'551899618':{'en': 'Vivo'},
'553199373':{'en': 'TIM'},
'553199372':{'en': 'TIM'},
'553199371':{'en': 'TIM'},
'551196930':{'en': 'Claro BR'},
'551196931':{'en': 'Claro BR'},
'553199377':{'en': 'TIM'},
'553199376':{'en': 'TIM'},
'553199375':{'en': 'TIM'},
'553398419':{'en': 'Claro BR'},
'553398418':{'en': 'Claro BR'},
'553398417':{'en': 'Claro BR'},
'553398416':{'en': 'Claro BR'},
'553398415':{'en': 'Claro BR'},
'553199374':{'en': 'TIM'},
'553398413':{'en': 'Claro BR'},
'553398412':{'en': 'Claro BR'},
'553398411':{'en': 'Claro BR'},
'553598446':{'en': 'Claro BR'},
'552899258':{'en': 'Claro BR'},
'553598444':{'en': 'Claro BR'},
'553598445':{'en': 'Claro BR'},
'553598442':{'en': 'Claro BR'},
'553598443':{'en': 'Claro BR'},
'553598441':{'en': 'Claro BR'},
'3620':{'en': 'Telenor'},
'553598448':{'en': 'Claro BR'},
'553598449':{'en': 'Claro BR'},
'447977':{'en': 'Orange'},
'447976':{'en': 'Orange'},
'447975':{'en': 'Orange'},
'447974':{'en': 'Orange'},
'447973':{'en': 'Orange'},
'375294':{'be': u('\u0411\u0435\u043b\u0421\u0435\u043b'), 'en': 'Belcel', 'ru': u('\u0411\u0435\u043b\u0421\u0435\u043b')},
'447971':{'en': 'Orange'},
'447970':{'en': 'Orange'},
'447979':{'en': 'Vodafone'},
'51739696':{'en': 'Movistar'},
'474029':{'en': 'NetCom'},
'474028':{'en': 'Telenor'},
'474022':{'en': 'Telenor'},
'5515997':{'en': 'Vivo'},
'479899':{'en': 'NetCom'},
'48607':{'en': 'Plus'},
'45234':{'en': 'TDC'},
'4915020':{'en': 'Interactive digital media'},
'42077':{'en': 'Vodafone'},
'42072':{'en': 'O2'},
'45237':{'en': 'TDC'},
'45236':{'en': 'TDC'},
'459248':{'en': 'Telenor Connexion AB'},
'459249':{'en': 'Telenor Connexion AB'},
'459246':{'en': 'Telenor Connexion AB'},
'45231':{'en': 'TDC'},
'459244':{'en': 'Ipnordic'},
'459245':{'en': 'Compatel Limited'},
'459243':{'en': 'Companymobile'},
'48601':{'en': 'Plus'},
'45232':{'en': 'TDC'},
'1939891':{'en': 'SunCom Wireless Puerto Rico'},
'551899767':{'en': 'Vivo'},
'553799805':{'en': 'Telemig Celular'},
'553799804':{'en': 'Telemig Celular'},
'553799803':{'en': 'Telemig Celular'},
'553799802':{'en': 'Telemig Celular'},
'553799801':{'en': 'Telemig Celular'},
'551899768':{'en': 'Vivo'},
'51449497':{'en': 'Claro'},
'554899975':{'en': 'TIM'},
'554899974':{'en': 'TIM'},
'2344687':{'en': 'Starcomms'},
'2344684':{'en': 'Starcomms'},
'2344682':{'en': 'Starcomms'},
'2344683':{'en': 'Starcomms'},
'2344680':{'en': 'Starcomms'},
'554899976':{'en': 'TIM'},
'55249924':{'en': 'Claro BR'},
'55249925':{'en': 'Claro BR'},
'55249926':{'en': 'Claro BR'},
'55249927':{'en': 'Claro BR'},
'55249920':{'en': 'Claro BR'},
'55249921':{'en': 'Claro BR'},
'55249922':{'en': 'Claro BR'},
'55249923':{'en': 'Claro BR'},
'347170':{'en': 'Movistar'},
'347171':{'en': 'Vodafone'},
'553199658':{'en': 'Telemig Celular'},
'347177':{'en': 'Movistar'},
'447779':{'en': 'Orange'},
'447777':{'en': 'EE'},
'447773':{'en': 'Orange'},
'447772':{'en': 'Orange'},
'3368':{'en': 'Orange France'},
'553199218':{'en': 'TIM'},
'3366':{'en': 'Bouygues'},
'3367':{'en': 'Orange France'},
'3361':{'en': 'SFR'},
'3362':{'en': 'SFR'},
'553199219':{'en': 'TIM'},
'502502':{'en': 'Movistar'},
'549266':{'en': 'Personal'},
'549264':{'en': 'Personal'},
'549265':{'en': 'Personal'},
'549262':{'en': 'Personal'},
'549263':{'en': 'Personal'},
'549260':{'en': 'Personal'},
'549261':{'en': 'Personal'},
'474566':{'en': 'Telenor'},
'234628':{'en': 'Starcomms'},
'474563':{'en': 'NetCom'},
'474560':{'en': 'Telenor'},
'474561':{'en': 'Telenor'},
'27741':{'en': 'Virgin Mobile'},
'553599803':{'en': 'Telemig Celular'},
'554899144':{'en': 'Vivo'},
'25679':{'en': 'Africell'},
'25678':{'en': 'MTN'},
'554899145':{'en': 'Vivo'},
'25673':{'en': 'K2'},
'25671':{'en': 'UTL'},
'25670':{'en': 'Airtel'},
'25677':{'en': 'MTN'},
'554798456':{'en': 'Brasil Telecom GSM'},
'25675':{'en': 'Airtel'},
'25674':{'en': 'Sure Telecom'},
'554899147':{'en': 'Vivo'},
'554899141':{'en': 'Vivo'},
'554899142':{'en': 'Vivo'},
'554899143':{'en': 'Vivo'},
'553199245':{'en': 'TIM'},
'554199216':{'en': 'Vivo'},
'486901':{'en': 'Orange'},
'486903':{'en': 'Orange'},
'486902':{'en': 'Orange'},
'486905':{'en': 'Orange'},
'486904':{'en': 'Orange'},
'486907':{'en': 'CenterNet'},
'486906':{'en': 'Orange'},
'22588':{'en': 'Orange'},
'22589':{'en': 'Orange'},
'51839837':{'en': 'Claro'},
'51839836':{'en': 'Movistar'},
'22586':{'en': 'MTN'},
'22587':{'en': 'Orange'},
'554899632':{'en': 'TIM'},
'554799614':{'en': 'TIM'},
'554899633':{'en': 'TIM'},
'1787481':{'en': 'Claro'},
'551196059':{'en': 'Vivo'},
'551196058':{'en': 'Vivo'},
'1787484':{'en': 'Claro'},
'1787485':{'en': 'Claro'},
'551196057':{'en': 'Vivo'},
'554398851':{'en': 'Claro BR'},
'5067300':{'en': 'Claro'},
'5067301':{'en': 'Claro'},
'30695340':{'en': 'AMD Telecom'},
'554899631':{'en': 'TIM'},
'2784':{'en': 'Cell C'},
'2783':{'en': 'MTN'},
'2782':{'en': 'Vodacom'},
'51549588':{'en': 'Movistar'},
'51549583':{'en': 'Claro'},
'51549587':{'en': 'Claro'},
'51549586':{'en': 'Movistar'},
'51549585':{'en': 'Movistar'},
'55319913':{'en': 'TIM'},
'55319912':{'en': 'TIM'},
'55319911':{'en': 'TIM'},
'50946':{'en': 'Digicel'},
'55319915':{'en': 'TIM'},
'55319914':{'en': 'TIM'},
'554899637':{'en': 'TIM'},
'551599168':{'en': 'Claro BR'},
'3471777':{'en': 'PepePhone'},
'2126921':{'en': 'Al Hourria Telecom'},
'2126922':{'en': 'Al Hourria Telecom'},
'554899634':{'en': 'TIM'},
'551799636':{'en': 'Vivo'},
'551799637':{'en': 'Vivo'},
'26269377':{'en': 'Orange'},
'551799635':{'en': 'Vivo'},
'26269371':{'en': 'Only'},
'26269370':{'en': 'Only'},
'26269372':{'en': 'Only'},
'3471771':{'en': 'PepePhone'},
'551799638':{'en': 'Vivo'},
'551799639':{'en': 'Vivo'},
'554299973':{'en': 'TIM'},
'554299972':{'en': 'TIM'},
'554299971':{'en': 'TIM'},
'554299977':{'en': 'TIM'},
'554299976':{'en': 'TIM'},
'554299975':{'en': 'TIM'},
'554299974':{'en': 'TIM'},
'554299979':{'en': 'TIM'},
'554299978':{'en': 'TIM'},
'553299949':{'en': 'Telemig Celular'},
'553299948':{'en': 'Telemig Celular'},
'553299945':{'en': 'Telemig Celular'},
'553299944':{'en': 'Telemig Celular'},
'553299947':{'en': 'Telemig Celular'},
'30690399':{'en': 'BWS'},
'553299941':{'en': 'Telemig Celular'},
'553299943':{'en': 'Telemig Celular'},
'553299942':{'en': 'Telemig Celular'},
'51739689':{'en': 'Movistar'},
'51739688':{'en': 'Movistar'},
'553399919':{'en': 'Telemig Celular'},
'553399918':{'en': 'Telemig Celular'},
'553399911':{'en': 'Telemig Celular'},
'553399913':{'en': 'Telemig Celular'},
'553399912':{'en': 'Telemig Celular'},
'553399915':{'en': 'Telemig Celular'},
'553399914':{'en': 'Telemig Celular'},
'553399917':{'en': 'Telemig Celular'},
'553399916':{'en': 'Telemig Celular'},
'3584320':{'en': 'Cuuma'},
'3584321':{'en': 'Cuuma'},
'554599936':{'en': 'TIM'},
'554599937':{'en': 'TIM'},
'554599934':{'en': 'TIM'},
'554599935':{'en': 'TIM'},
'447340':{'en': 'Vodafone'},
'447341':{'en': 'Vodafone'},
'447342':{'en': 'Vodafone'},
'554599931':{'en': 'TIM'},
'553199651':{'en': 'Telemig Celular'},
'180987':{'en': 'Tricom'},
'180981':{'en': 'Viva'},
'180982':{'en': 'Claro'},
'180983':{'en': 'Claro'},
'4869925':{'en': 'Cyfrowy Polsat'},
'4869924':{'en': 'Cyfrowy Polsat'},
'4869927':{'en': 'Cyfrowy Polsat'},
'4869926':{'en': 'Cyfrowy Polsat'},
'4869921':{'en': 'Cyfrowy Polsat'},
'4869920':{'en': 'Cyfrowy Polsat'},
'4869923':{'en': 'Cyfrowy Polsat'},
'4869929':{'en': 'Cyfrowy Polsat'},
'4869928':{'en': 'Cyfrowy Polsat'},
'502595':{'en': 'Telgua'},
'502594':{'en': 'Telgua'},
'502597':{'en': 'Telgua'},
'502596':{'en': 'Telgua'},
'502593':{'en': 'Telgua'},
'502592':{'en': 'Telgua'},
'502599':{'en': 'Tigo'},
'502598':{'en': 'Telgua'},
'5511976':{'en': 'Claro BR'},
'5511975':{'en': 'Vivo'},
'5511974':{'en': 'Vivo'},
'5511973':{'en': 'Vivo'},
'5511972':{'en': 'Vivo'},
'5511971':{'en': 'Vivo'},
'554799658':{'en': 'TIM'},
'55329996':{'en': 'Telemig Celular'},
'22466':{'en': 'Areeba'},
'22465':{'en': 'Cellcom'},
'22463':{'en': 'Intercel'},
'22462':{'en': 'Orange'},
'22460':{'en': 'Sotelgui'},
'551196914':{'en': 'Claro BR'},
'551196915':{'en': 'Claro BR'},
'551196916':{'en': 'Claro BR'},
'551196917':{'en': 'Claro BR'},
'551196910':{'en': 'Vivo'},
'551196911':{'en': 'Vivo'},
'551196912':{'en': 'Vivo'},
'26378':{'en': 'Econet'},
'26377':{'en': 'Econet'},
'26373':{'en': 'Telecel'},
'551196919':{'en': 'Claro BR'},
'26371':{'en': 'Net*One'},
'553299925':{'en': 'Telemig Celular'},
'5037800':{'en': 'Movistar'},
'5037801':{'en': 'Digicel'},
'5037803':{'en': 'Claro'},
'474791':{'en': 'Network Norway'},
'474790':{'en': 'Telenor'},
'474793':{'en': 'Network Norway'},
'474792':{'en': 'Network Norway'},
'5037808':{'en': 'Claro'},
'5037809':{'en': 'Claro'},
'553299921':{'en': 'Telemig Celular'},
'447910':{'en': 'EE'},
'447913':{'en': 'EE'},
'447912':{'en': 'O2'},
'447915':{'en': 'Three'},
'447914':{'en': 'EE'},
'447917':{'en': 'Vodafone'},
'447916':{'en': 'Three'},
'447919':{'en': 'Vodafone'},
'447918':{'en': 'Vodafone'},
'23846':{'en': 'CVMOVEL'},
'23843':{'en': 'T+'},
'554798900':{'en': 'Claro BR'},
'551899639':{'en': 'Vivo'},
'551899638':{'en': 'Vivo'},
'551899633':{'en': 'Vivo'},
'383459':{'en': 'vala'},
'551899631':{'en': 'Vivo'},
'551899637':{'en': 'Vivo'},
'551899636':{'en': 'Vivo'},
'551899635':{'en': 'Vivo'},
'267763':{'en': 'Orange'},
'553599809':{'en': 'Telemig Celular'},
'553599808':{'en': 'Telemig Celular'},
'553199642':{'en': 'Telemig Celular'},
'553599805':{'en': 'Telemig Celular'},
'553599804':{'en': 'Telemig Celular'},
'553599807':{'en': 'Telemig Celular'},
'553599806':{'en': 'Telemig Celular'},
'553599801':{'en': 'Telemig Celular'},
'30691700':{'en': 'Inter Telecom'},
'553599802':{'en': 'Telemig Celular'},
'553199646':{'en': 'Telemig Celular'},
'4915555':{'en': 'Tismi BV'},
'553598468':{'en': 'Claro BR'},
'383453':{'en': 'vala'},
'553598464':{'en': 'Claro BR'},
'553598465':{'en': 'Claro BR'},
'553598466':{'en': 'Claro BR'},
'267769':{'en': 'BTC Mobile/Orange'},
'553598461':{'en': 'Claro BR'},
'553598462':{'en': 'Claro BR'},
'553598463':{'en': 'Claro BR'},
'553199648':{'en': 'Telemig Celular'},
'5025313':{'en': 'Movistar'},
'5025312':{'en': 'Movistar'},
'551999652':{'en': 'Vivo'},
'35988':{'en': 'Mtel'},
'551999651':{'en': 'Vivo'},
'551999656':{'en': 'Vivo'},
'551999657':{'en': 'Vivo'},
'551999654':{'en': 'Vivo'},
'1784433':{'en': 'Digicel'},
'551999658':{'en': 'Vivo'},
'551999659':{'en': 'Vivo'},
'554398426':{'en': 'Brasil Telecom GSM'},
'553599943':{'en': 'Telemig Celular'},
'3469364':{'en': 'DIA'},
'3469365':{'en': 'Carrefour'},
'3469366':{'en': 'Carrefour'},
'3469367':{'en': 'MasMovil'},
'3469360':{'en': 'DIA'},
'3469361':{'en': 'DIA'},
'3469362':{'en': 'DIA'},
'3469363':{'en': 'DIA'},
'24206':{'en': 'MTN'},
'3469368':{'en': 'MasMovil'},
'3469369':{'en': 'MasMovil'},
'553599944':{'en': 'Telemig Celular'},
'551899681':{'en': 'Vivo'},
'45204':{'en': 'TDC'},
'45205':{'en': 'TDC'},
'45206':{'en': 'Telenor'},
'45207':{'en': 'Telenor'},
'551898146':{'en': 'TIM'},
'45201':{'en': 'TDC'},
'1787291':{'en': 'CENTENNIAL'},
'45203':{'en': 'TDC'},
'551898148':{'en': 'TIM'},
'35987':{'en': 'Vivacom'},
'45208':{'en': 'Telenor'},
'45209':{'en': 'Telenor'},
'1787299':{'en': 'SunCom Wireless Puerto Rico'},
'1869667':{'en': 'Cable & Wireless'},
'1869665':{'en': 'Cable & Wireless'},
'1869664':{'en': 'Cable & Wireless'},
'1869663':{'en': 'Cable & Wireless'},
'1869662':{'en': 'Cable & Wireless'},
'1869661':{'en': 'Cable & Wireless'},
'1869660':{'en': 'Cable & Wireless'},
'50370706':{'en': 'Tigo'},
'212669':{'en': u('M\u00e9ditel')},
'1869669':{'en': 'Cable & Wireless'},
'1869668':{'en': 'Cable & Wireless'},
'212668':{'en': 'Maroc Telecom'},
'50370705':{'en': 'Claro'},
'551499169':{'en': 'Claro BR'},
'553899132':{'en': 'TIM'},
'553899133':{'en': 'TIM'},
'553899131':{'en': 'TIM'},
'553899136':{'en': 'TIM'},
'553899137':{'en': 'TIM'},
'553899134':{'en': 'TIM'},
'553899135':{'en': 'TIM'},
'553899138':{'en': 'TIM'},
'553899139':{'en': 'TIM'},
'212661':{'en': 'Maroc Telecom'},
'447757':{'en': 'EE'},
'447756':{'en': 'O2'},
'212660':{'en': u('M\u00e9ditel')},
'447753':{'en': 'O2'},
'447752':{'en': 'O2'},
'447751':{'en': 'O2'},
'447750':{'en': 'O2'},
'2347384':{'en': 'Starcomms'},
'447759':{'en': 'O2'},
'447758':{'en': 'EE'},
'33696':{'en': 'Bouygues'},
'2347385':{'en': 'Starcomms'},
'33692':{'en': 'Bouygues'},
'33693':{'en': 'Bouygues'},
'551398115':{'en': 'TIM'},
'2347382':{'en': 'Starcomms'},
'212664':{'en': u('M\u00e9ditel')},
'5056':{'en': 'CooTel'},
'33698':{'en': 'Bouygues'},
'33699':{'en': 'Bouygues'},
'5057':{'en': 'Movistar'},
'3068519':{'en': 'Cyta'},
'552899256':{'en': 'Claro BR'},
'551298132':{'en': 'TIM'},
'175851':{'en': 'Digicel'},
'5512991':{'en': 'Claro BR'},
'5512997':{'en': 'Vivo'},
'549249':{'en': 'Personal'},
'554599951':{'en': 'TIM'},
'549247':{'en': 'Personal'},
'55489881':{'en': 'Claro BR'},
'554198401':{'en': 'Brasil Telecom GSM'},
'55489883':{'en': 'Claro BR'},
'55489882':{'en': 'Claro BR'},
'55489885':{'en': 'Claro BR'},
'55489884':{'en': 'Claro BR'},
'554198403':{'en': 'Brasil Telecom GSM'},
'554198402':{'en': 'Brasil Telecom GSM'},
'554198405':{'en': 'Brasil Telecom GSM'},
'554198404':{'en': 'Brasil Telecom GSM'},
'370646':{'en': 'Tele 2'},
'370647':{'en': 'Tele 2'},
'370645':{'en': 'Tele 2'},
'370648':{'en': 'Tele 2'},
'554198406':{'en': 'Brasil Telecom GSM'},
'511997':{'en': 'Claro'},
'511996':{'en': 'Movistar'},
'511991':{'en': 'Claro'},
'474087':{'en': 'Telenor'},
'511993':{'en': 'Claro'},
'511992':{'en': 'Claro'},
'551999890':{'en': 'Vivo'},
'554398424':{'en': 'Brasil Telecom GSM'},
'554798432':{'en': 'Brasil Telecom GSM'},
'3468447':{'en': 'Quattre'},
'3468444':{'en': 'BT'},
'3468445':{'en': 'Ion mobile'},
'3468442':{'en': 'BluePhone'},
'3468443':{'en': 'BT'},
'3468440':{'en': 'Eurona'},
'3468441':{'en': 'Lemonvil'},
'554798438':{'en': 'Brasil Telecom GSM'},
'554798439':{'en': 'Brasil Telecom GSM'},
'3468448':{'en': 'Nethits'},
'551299240':{'en': 'Claro BR'},
'551299241':{'en': 'Claro BR'},
'551299242':{'en': 'Claro BR'},
'551299243':{'en': 'Claro BR'},
'551299244':{'en': 'Claro BR'},
'551299245':{'en': 'Claro BR'},
'553198244':{'en': 'Claro BR'},
'2346498':{'en': 'Starcomms'},
'553198240':{'en': 'Claro BR'},
'553198241':{'en': 'Claro BR'},
'553198242':{'en': 'Claro BR'},
'553198243':{'en': 'Claro BR'},
'2346491':{'en': 'Starcomms'},
'554199263':{'en': 'Vivo'},
'2346493':{'en': 'Starcomms'},
'2346492':{'en': 'Starcomms'},
'2346495':{'en': 'Starcomms'},
'2346494':{'en': 'Starcomms'},
'2346497':{'en': 'Starcomms'},
'2346496':{'en': 'Starcomms'},
'553399111':{'en': 'TIM'},
'515195158':{'en': 'Movistar'},
'553399113':{'en': 'TIM'},
'553399112':{'en': 'TIM'},
'553399115':{'en': 'TIM'},
'553399114':{'en': 'TIM'},
'553399117':{'en': 'TIM'},
'479317':{'en': 'NetCom'},
'515195151':{'en': 'Movistar'},
'515195150':{'en': 'Movistar'},
'515195153':{'en': 'Movistar'},
'515195152':{'en': 'Movistar'},
'515195155':{'en': 'Movistar'},
'515195154':{'en': 'Movistar'},
'515195157':{'en': 'Movistar'},
'515195156':{'en': 'Movistar'},
'35844':{'en': 'DNA'},
'35846':{'en': 'Elisa'},
'35841':{'en': 'DNA'},
'35840':{'en': 'Telia'},
'35842':{'en': 'Telia'},
'479237':{'en': 'NetCom'},
'4479117':{'en': 'JT'},
'354882':{'en': u('S\u00edminn')},
'4479110':{'en': 'Marathon Telecom'},
'4479112':{'en': '24 Seven'},
'4479118':{'en': '24 Seven'},
'354888':{'en': u('S\u00edminn')},
'551195472':{'en': 'Vivo'},
'551195473':{'en': 'Vivo'},
'551195474':{'en': 'Vivo'},
'553199796':{'en': 'Telemig Celular'},
'1787465':{'en': 'CENTENNIAL'},
'1787466':{'en': 'SunCom Wireless Puerto Rico'},
'1787460':{'en': 'SunCom Wireless Puerto Rico'},
'1787462':{'en': 'SunCom Wireless Puerto Rico'},
'1787463':{'en': 'SunCom Wireless Puerto Rico'},
'552198325':{'en': 'TIM'},
'4475328':{'en': 'Three'},
'4475329':{'en': 'Mobiweb'},
'4475326':{'en': 'Three'},
'4475327':{'en': 'Three'},
'4475324':{'en': 'Orange'},
'4475325':{'en': 'SMSRelay AG'},
'4475322':{'en': 'Orange'},
'4475323':{'en': 'Orange'},
'4475320':{'en': 'Orange'},
'4475321':{'en': 'Orange'},
'455019':{'en': 'Lebara Limited'},
'455018':{'en': 'Lebara Limited'},
'553199737':{'en': 'Telemig Celular'},
'455017':{'en': 'Lebara Limited'},
'455016':{'en': 'Lebara Limited'},
'455015':{'en': 'Lebara Limited'},
'4530':{'en': 'TDC'},
'479915':{'en': 'Telenor'},
'479916':{'en': 'Telenor'},
'515495981':{'en': 'Movistar'},
'515495980':{'en': 'Movistar'},
'515495982':{'en': 'Movistar'},
'515495985':{'en': 'Movistar'},
'515495984':{'en': 'Movistar'},
'515495987':{'en': 'Movistar'},
'515495986':{'en': 'Movistar'},
'515495989':{'en': 'Movistar'},
'515495988':{'en': 'Movistar'},
'551799758':{'en': 'Vivo'},
'551799755':{'en': 'Vivo'},
'1939910':{'en': 'CENTENNIAL'},
'553199809':{'en': 'Telemig Celular'},
'553199808':{'en': 'Telemig Celular'},
'553199801':{'en': 'Telemig Celular'},
'553199803':{'en': 'Telemig Celular'},
'553199802':{'en': 'Telemig Celular'},
'553199805':{'en': 'Telemig Celular'},
'553199804':{'en': 'Telemig Celular'},
'553199807':{'en': 'Telemig Celular'},
'553199806':{'en': 'Telemig Celular'},
'55419874':{'en': 'Claro BR'},
'552498182':{'en': 'TIM'},
'551798115':{'en': 'TIM'},
'456092':{'en': 'Telenor'},
'456093':{'en': 'Telenor'},
'456090':{'en': 'Lebara Limited'},
'456091':{'en': 'Telenor'},
'456096':{'en': 'Tripple Track Europe'},
'456097':{'en': 'Tripple Track Europe'},
'456094':{'en': 'Telenor'},
'456095':{'en': 'Telenor'},
'456098':{'en': 'Telavox'},
'26263994':{'en': 'Only'},
'553399933':{'en': 'Telemig Celular'},
'502352':{'en': 'Movistar'},
'502351':{'en': 'Movistar'},
'502350':{'en': 'Movistar'},
'554599914':{'en': 'TIM'},
'554599915':{'en': 'TIM'},
'554599916':{'en': 'TIM'},
'554599917':{'en': 'TIM'},
'551799618':{'en': 'Vivo'},
'551799619':{'en': 'Vivo'},
'554599912':{'en': 'TIM'},
'553199282':{'en': 'TIM'},
'551799614':{'en': 'Vivo'},
'551799615':{'en': 'Vivo'},
'551799616':{'en': 'Vivo'},
'551799617':{'en': 'Vivo'},
'554599918':{'en': 'TIM'},
'551799611':{'en': 'Vivo'},
'551799612':{'en': 'Vivo'},
'551799613':{'en': 'Vivo'},
'553199287':{'en': 'TIM'},
'553299998':{'en': 'Telemig Celular'},
'553199286':{'en': 'TIM'},
'553199751':{'en': 'Telemig Celular'},
'553199753':{'en': 'Telemig Celular'},
'553199752':{'en': 'Telemig Celular'},
'553199755':{'en': 'Telemig Celular'},
'553199285':{'en': 'TIM'},
'553199757':{'en': 'Telemig Celular'},
'553199756':{'en': 'Telemig Celular'},
'553199759':{'en': 'Telemig Celular'},
'553199758':{'en': 'Telemig Celular'},
'553199284':{'en': 'TIM'},
'24397':{'en': 'Zain'},
'24391':{'en': 'Africell'},
'187649':{'en': 'Digicel'},
'187646':{'en': 'Digicel'},
'187647':{'en': 'Digicel'},
'180964':{'en': 'Tricom'},
'187645':{'en': 'Digicel'},
'187642':{'en': 'Digicel'},
'180963':{'en': 'Tricom'},
'187640':{'en': 'Digicel'},
'187641':{'en': 'Digicel'},
'552198328':{'en': 'TIM'},
'553299996':{'en': 'Telemig Celular'},
'553299997':{'en': 'Telemig Celular'},
'552198329':{'en': 'TIM'},
'1787915':{'en': 'CENTENNIAL'},
'1787916':{'en': 'CENTENNIAL'},
'1787917':{'en': 'CENTENNIAL'},
'1787912':{'en': 'CENTENNIAL'},
'5025544':{'en': 'Telgua'},
'5025543':{'en': 'Telgua'},
'38165':{'en': 'mts'},
'234987':{'en': 'Starcomms'},
'38166':{'en': 'mts'},
'38161':{'en': 'VIP'},
'38160':{'en': 'VIP'},
'234980':{'en': 'Starcomms'},
'38162':{'en': 'Telenor'},
'505837':{'en': 'Movistar'},
'505836':{'en': 'Claro'},
'505835':{'en': 'Claro'},
'38169':{'en': 'Telenor'},
'38168':{'en': 'VIP'},
'551198026':{'en': 'Oi'},
'551198027':{'en': 'Oi'},
'551198024':{'en': 'Oi'},
'551198025':{'en': 'Oi'},
'551198023':{'en': 'Oi'},
'551198028':{'en': 'Oi'},
'551198029':{'en': 'Oi'},
'554199239':{'en': 'Vivo'},
'553398453':{'en': 'Claro BR'},
'553398452':{'en': 'Claro BR'},
'553398451':{'en': 'Claro BR'},
'553398456':{'en': 'Claro BR'},
'553398455':{'en': 'Claro BR'},
'553398454':{'en': 'Claro BR'},
'554199238':{'en': 'Vivo'},
'234189':{'en': 'Starcomms'},
'234187':{'en': 'Starcomms'},
'234184':{'en': 'Starcomms'},
'234185':{'en': 'Starcomms'},
'234182':{'en': 'Starcomms'},
'234181':{'en': 'Starcomms'},
'447939':{'en': 'EE'},
'447938':{'en': 'O2'},
'447933':{'en': 'O2'},
'447932':{'en': 'EE'},
'447931':{'en': 'EE'},
'447930':{'en': 'EE'},
'447937':{'en': 'JT'},
'447936':{'en': 'O2'},
'447935':{'en': 'O2'},
'447934':{'en': 'O2'},
'373782':{'en': 'Moldcell'},
'373783':{'en': 'Moldcell'},
'373780':{'en': 'Moldcell'},
'373781':{'en': 'Moldcell'},
'373786':{'en': 'Moldcell'},
'373787':{'en': 'Moldcell'},
'373784':{'en': 'Moldcell'},
'373785':{'en': 'Moldcell'},
'373788':{'en': 'Moldcell'},
'553599823':{'en': 'Telemig Celular'},
'553599822':{'en': 'Telemig Celular'},
'553599821':{'en': 'Telemig Celular'},
'553599827':{'en': 'Telemig Celular'},
'553599826':{'en': 'Telemig Celular'},
'553599825':{'en': 'Telemig Celular'},
'553599824':{'en': 'Telemig Celular'},
'553599829':{'en': 'Telemig Celular'},
'553599828':{'en': 'Telemig Celular'},
'553899158':{'en': 'TIM'},
'553899159':{'en': 'TIM'},
'551499103':{'en': 'Claro BR'},
'4473780':{'en': 'Limitless'},
'551999678':{'en': 'Vivo'},
'551999679':{'en': 'Vivo'},
'552799309':{'en': 'Claro BR'},
'551999671':{'en': 'Vivo'},
'551999672':{'en': 'Vivo'},
'551999673':{'en': 'Vivo'},
'551999674':{'en': 'Vivo'},
'551999675':{'en': 'Vivo'},
'551999676':{'en': 'Vivo'},
'551999677':{'en': 'Vivo'},
'3469348':{'en': 'MasMovil'},
'3469349':{'en': 'MasMovil'},
'3469346':{'en': 'MasMovil'},
'3469347':{'en': 'MasMovil'},
'3469344':{'en': 'DIA'},
'3469345':{'en': 'MasMovil'},
'3469342':{'en': 'DIA'},
'3469343':{'en': 'DIA'},
'3469340':{'en': 'DIA'},
'3469341':{'en': 'DIA'},
'553898404':{'en': 'Claro BR'},
'30685585':{'en': 'Cyta'},
'553898407':{'en': 'Claro BR'},
'553898406':{'en': 'Claro BR'},
'5521996':{'en': 'Vivo'},
'5521997':{'en': 'Vivo'},
'5521994':{'en': 'Claro BR'},
'5521995':{'en': 'Vivo'},
'5521992':{'en': 'Claro BR'},
'5521993':{'en': 'Claro BR'},
'5521991':{'en': 'Claro BR'},
'5521998':{'en': 'Vivo'},
'5521999':{'en': 'Vivo'},
'55429886':{'en': 'Claro BR'},
'55429885':{'en': 'Claro BR'},
'55429884':{'en': 'Claro BR'},
'55429883':{'en': 'Claro BR'},
'55429882':{'en': 'Claro BR'},
'55429881':{'en': 'Claro BR'},
'55429880':{'en': 'Claro BR'},
'554398434':{'en': 'Brasil Telecom GSM'},
'554398435':{'en': 'Brasil Telecom GSM'},
'516796766':{'en': 'Movistar'},
'554398433':{'en': 'Brasil Telecom GSM'},
'516796765':{'en': 'Movistar'},
'516796768':{'en': 'Movistar'},
'516796769':{'en': 'Movistar'},
'553899118':{'en': 'TIM'},
'553899119':{'en': 'TIM'},
'553899111':{'en': 'TIM'},
'553899112':{'en': 'TIM'},
'553899113':{'en': 'TIM'},
'553899114':{'en': 'TIM'},
'553899115':{'en': 'TIM'},
'553899116':{'en': 'TIM'},
'553899117':{'en': 'TIM'},
'552298111':{'en': 'TIM'},
'455251':{'en': 'Jay.net'},
'447733':{'en': 'Vodafone'},
'447735':{'en': 'Three'},
'552298112':{'en': 'TIM'},
'447737':{'en': 'Three'},
'455250':{'en': 'YouSee'},
'517497871':{'en': 'Claro'},
'517497870':{'en': 'Claro'},
'517497873':{'en': 'Claro'},
'517497872':{'en': 'Claro'},
'517497875':{'en': 'Claro'},
'517497874':{'en': 'Claro'},
'517497877':{'en': 'Claro'},
'517497876':{'en': 'Claro'},
'447396':{'en': 'EE'},
'2344677':{'en': 'Starcomms'},
'447395':{'en': 'O2'},
'2344676':{'en': 'Starcomms'},
'447394':{'en': 'O2'},
'2344675':{'en': 'Starcomms'},
'447393':{'en': 'Vodafone'},
'2344674':{'en': 'Starcomms'},
'447392':{'en': 'Vodafone'},
'447391':{'en': 'Vodafone'},
'549222':{'en': 'Personal'},
'549223':{'en': 'Personal'},
'549220':{'en': 'Personal'},
'549221':{'en': 'Personal'},
'549226':{'en': 'Personal'},
'549227':{'en': 'Personal'},
'549224':{'en': 'Personal'},
'549225':{'en': 'Personal'},
'551798806':{'en': 'Oi'},
'551798807':{'en': 'Oi'},
'549228':{'en': 'Personal'},
'549229':{'en': 'Personal'},
'551798803':{'en': 'Oi'},
'5522988':{'en': 'Oi'},
'5522989':{'en': 'Oi'},
'553398414':{'en': 'Claro BR'},
'535':{'en': 'CUBACEL'},
'551499141':{'en': 'Claro BR'},
'23670':{'en': 'TC'},
'23672':{'en': 'Orange'},
'23675':{'en': 'CTP'},
'23677':{'en': 'Nationlink'},
'553598447':{'en': 'Claro BR'},
'370660':{'en': u('BIT\u0116')},
'370662':{'en': 'Omnitel'},
'551699785':{'en': 'Vivo'},
'551699784':{'en': 'Vivo'},
'551699787':{'en': 'Vivo'},
'551699786':{'en': 'Vivo'},
'551699781':{'en': 'Vivo'},
'551699780':{'en': 'Vivo'},
'551699783':{'en': 'Vivo'},
'551699782':{'en': 'Vivo'},
'551699788':{'en': 'Vivo'},
'554798418':{'en': 'Brasil Telecom GSM'},
'554798419':{'en': 'Brasil Telecom GSM'},
'4473979':{'en': 'Three'},
'4473978':{'en': 'Three'},
'4474529':{'en': 'Three'},
'4474528':{'en': 'Three'},
'4473975':{'en': 'Three'},
'554798411':{'en': 'Brasil Telecom GSM'},
'4473977':{'en': 'Three'},
'4473976':{'en': 'Three'},
'4473971':{'en': 'Three'},
'4473970':{'en': 'Three'},
'4473973':{'en': 'Three'},
'4473972':{'en': 'Three'},
'551499143':{'en': 'Claro BR'},
'551195784':{'en': 'Vivo'},
'34626':{'en': 'Movistar'},
'34627':{'en': 'Vodafone'},
'554199242':{'en': 'Vivo'},
'34625':{'en': 'Orange'},
'34622':{'en': 'Yoigo'},
'554199245':{'en': 'Vivo'},
'34620':{'en': 'Movistar'},
'554199247':{'en': 'Vivo'},
'554199248':{'en': 'Vivo'},
'554199249':{'en': 'Vivo'},
'34628':{'en': 'Movistar'},
'34629':{'en': 'Movistar'},
'553399137':{'en': 'TIM'},
'553399136':{'en': 'TIM'},
'553399139':{'en': 'TIM'},
'553399138':{'en': 'TIM'},
'554799998':{'en': 'TIM'},
'447972':{'en': 'Orange'},
'3474443':{'en': 'InfoVOIP'},
'3474442':{'en': 'Deion'},
'3474449':{'en': 'Alai'},
'3474448':{'en': 'Ion mobile'},
'2347698':{'en': 'Starcomms'},
'554799653':{'en': 'TIM'},
'2347691':{'en': 'Starcomms'},
'2347692':{'en': 'Starcomms'},
'2347693':{'en': 'Starcomms'},
'2347694':{'en': 'Starcomms'},
'2347695':{'en': 'Starcomms'},
'2347696':{'en': 'Starcomms'},
'2347697':{'en': 'Starcomms'},
'551298179':{'en': 'TIM'},
'551298178':{'en': 'TIM'},
'551298171':{'en': 'TIM'},
'551298173':{'en': 'TIM'},
'551298172':{'en': 'TIM'},
'551298175':{'en': 'TIM'},
'551298174':{'en': 'TIM'},
'551298177':{'en': 'TIM'},
'551298176':{'en': 'TIM'},
'1787447':{'en': 'CENTENNIAL'},
'551698128':{'en': 'TIM'},
'551698129':{'en': 'TIM'},
'553199179':{'en': 'TIM'},
'553199178':{'en': 'TIM'},
'551698122':{'en': 'TIM'},
'551698123':{'en': 'TIM'},
'553199177':{'en': 'TIM'},
'551698121':{'en': 'TIM'},
'551698126':{'en': 'TIM'},
'551698127':{'en': 'TIM'},
'1787448':{'en': 'CENTENNIAL'},
'1787449':{'en': 'CENTENNIAL'},
'447894':{'en': 'O2'},
'447895':{'en': 'O2'},
'447896':{'en': 'Orange'},
'447897':{'en': 'Three'},
'447890':{'en': 'Orange'},
'447891':{'en': 'Orange'},
'3464529':{'en': 'MasMovil'},
'447898':{'en': 'Three'},
'447899':{'en': 'Vodafone'},
'553799943':{'en': 'Telemig Celular'},
'554198469':{'en': 'Brasil Telecom GSM'},
'553798413':{'en': 'Claro BR'},
'553798412':{'en': 'Claro BR'},
'26263902':{'en': 'Orange'},
'33601':{'en': 'SFR'},
'26263905':{'en': 'Only'},
'26263906':{'en': 'Only'},
'306999':{'en': 'Wind'},
'306998':{'en': 'Wind'},
'306997':{'en': 'Wind'},
'306996':{'en': 'Wind'},
'306995':{'en': 'Wind'},
'306994':{'en': 'Wind'},
'306993':{'en': 'Wind'},
'306992':{'en': 'Wind'},
'306991':{'en': 'Wind'},
'4915630':{'en': 'Multiconnect'},
'553599842':{'en': 'Telemig Celular'},
'553199829':{'en': 'Telemig Celular'},
'553199828':{'en': 'Telemig Celular'},
'346122':{'en': 'Lycamobile'},
'51659656':{'en': 'Movistar'},
'346120':{'en': 'Syma'},
'346121':{'en': 'Syma'},
'553199823':{'en': 'Telemig Celular'},
'553199822':{'en': 'Telemig Celular'},
'346124':{'en': 'Lycamobile'},
'346125':{'en': 'Lycamobile'},
'554399930':{'en': 'TIM'},
'554399931':{'en': 'TIM'},
'554399932':{'en': 'TIM'},
'554399933':{'en': 'TIM'},
'554399934':{'en': 'TIM'},
'554399935':{'en': 'TIM'},
'554399936':{'en': 'TIM'},
'554399937':{'en': 'TIM'},
'554399938':{'en': 'TIM'},
'554399939':{'en': 'TIM'},
'55469881':{'en': 'Claro BR'},
'553399955':{'en': 'Telemig Celular'},
'553399954':{'en': 'Telemig Celular'},
'553399957':{'en': 'Telemig Celular'},
'553399956':{'en': 'Telemig Celular'},
'553399951':{'en': 'Telemig Celular'},
'553399953':{'en': 'Telemig Celular'},
'553399952':{'en': 'Telemig Celular'},
'18686':{'en': 'bmobile'},
'553399959':{'en': 'Telemig Celular'},
'553399958':{'en': 'Telemig Celular'},
'553199714':{'en': 'Telemig Celular'},
'552198379':{'en': 'TIM'},
'552198378':{'en': 'TIM'},
'553799186':{'en': 'TIM'},
'553199777':{'en': 'Telemig Celular'},
'553199776':{'en': 'Telemig Celular'},
'553199775':{'en': 'Telemig Celular'},
'553199774':{'en': 'Telemig Celular'},
'553199773':{'en': 'Telemig Celular'},
'553199772':{'en': 'Telemig Celular'},
'553199771':{'en': 'Telemig Celular'},
'553199779':{'en': 'Telemig Celular'},
'553199778':{'en': 'Telemig Celular'},
'180948':{'en': 'Claro'},
'180949':{'en': 'Claro'},
'5037798':{'en': 'Tigo'},
'5037799':{'en': 'Tigo'},
'5037794':{'en': 'Movistar'},
'180941':{'en': 'Viva'},
'180942':{'en': 'Claro'},
'180943':{'en': 'Viva'},
'180944':{'en': 'Viva'},
'180945':{'en': 'Claro'},
'2985':{'en': 'Vodafone'},
'180947':{'en': 'Tricom'},
'4477449':{'en': 'Core Communication'},
'4477448':{'en': 'Core Communication'},
'4477443':{'en': 'Core Communication'},
'4477442':{'en': 'Core Communication'},
'4477445':{'en': 'Core Communication'},
'4477444':{'en': 'Core Communication'},
'4477447':{'en': 'Core Communication'},
'4477446':{'en': 'Core Communication'},
'1787937':{'en': 'CENTENNIAL'},
'1787935':{'en': 'CENTENNIAL'},
'1787933':{'en': 'CENTENNIAL'},
'552198375':{'en': 'TIM'},
'549358':{'en': 'Personal'},
'505859':{'en': 'Movistar'},
'505858':{'en': 'Movistar'},
'505851':{'en': 'Claro'},
'505850':{'en': 'Claro'},
'505853':{'en': 'Claro'},
'505852':{'en': 'Claro'},
'505855':{'en': 'Movistar'},
'505854':{'en': 'Claro'},
'505857':{'en': 'Movistar'},
'505856':{'en': 'Movistar'},
'517396873':{'en': 'Claro'},
'517396872':{'en': 'Claro'},
'517396871':{'en': 'Claro'},
'517396870':{'en': 'Claro'},
'517396877':{'en': 'Claro'},
'517396876':{'en': 'Claro'},
'517396875':{'en': 'Claro'},
'517396879':{'en': 'Claro'},
'517396878':{'en': 'Claro'},
'553199364':{'en': 'TIM'},
'4475599':{'en': 'Resilient'},
'4475598':{'en': 'Nodemax'},
'553199365':{'en': 'TIM'},
'4475595':{'en': 'Confabulate'},
'4475594':{'en': 'Truphone'},
'4475597':{'en': 'Core Telecom'},
'4475596':{'en': 'Lleida.net'},
'4475591':{'en': 'LegendTel'},
'4475590':{'en': 'Mars'},
'4475593':{'en': 'Globecom'},
'4475592':{'en': 'IPV6'},
'553499811':{'en': 'Telemig Celular'},
'553499813':{'en': 'Telemig Celular'},
'549351':{'en': 'Personal'},
'553499815':{'en': 'Telemig Celular'},
'47468':{'en': 'Telenor'},
'553499817':{'en': 'Telemig Celular'},
'553499816':{'en': 'Telemig Celular'},
'35476':{'en': 'Nova'},
'35477':{'en': 'Nova'},
'35478':{'en': 'Nova'},
'35479':{'en': 'Nova'},
'516196173':{'en': 'Claro'},
'516196172':{'en': 'Claro'},
'516196175':{'en': 'Claro'},
'516196174':{'en': 'Claro'},
'42073':{'en': 'T-Mobile'},
'55479922':{'en': 'Vivo'},
'55129962':{'en': 'Vivo'},
'55129961':{'en': 'Vivo'},
'55129960':{'en': 'Vivo'},
'503702':{'en': 'Claro'},
'514494808':{'en': 'Claro'},
'514494809':{'en': 'Claro'},
'514494806':{'en': 'Claro'},
'514494807':{'en': 'Claro'},
'389734':{'en': 'Vip'},
'514494805':{'en': 'Claro'},
'389732':{'en': 'Vip'},
'389733':{'en': 'Telekom'},
'514494801':{'en': 'Movistar'},
'553199612':{'en': 'Telemig Celular'},
'231330':{'en': 'West Africa Telecom'},
'553199613':{'en': 'Telemig Celular'},
'124626':{'en': 'Digicel'},
'124625':{'en': 'LIME'},
'124624':{'en': 'LIME'},
'124623':{'en': 'LIME'},
'124628':{'en': 'LIME'},
'3469329':{'en': 'Orange'},
'3469320':{'en': 'Carrefour'},
'3469321':{'en': 'Carrefour'},
'21270':{'en': 'Inwi'},
'21277':{'en': u('M\u00e9ditel')},
'21276':{'en': 'Maroc Telecom'},
'553499199':{'en': 'TIM'},
'358438':{'en': 'DNA'},
'358436':{'en': 'DNA'},
'459228':{'en': 'Mundio Mobile'},
'459229':{'en': 'Beepsend AB'},
'45538':{'en': '3'},
'45539':{'en': 'CBB Mobil'},
'45536':{'en': '3'},
'45537':{'en': '3'},
'45534':{'en': 'Telia'},
'459227':{'en': 'Mundio Mobile'},
'459220':{'en': 'Telenor Connexion AB'},
'45533':{'en': 'Telia'},
'459222':{'en': 'Bolignet-Aarhus F.M.B.A.'},
'45531':{'en': 'CBB Mobil'},
'254749':{'en': 'WiAfrica'},
'554398418':{'en': 'Brasil Telecom GSM'},
'554398419':{'en': 'Brasil Telecom GSM'},
'554398414':{'en': 'Brasil Telecom GSM'},
'554398415':{'en': 'Brasil Telecom GSM'},
'554398416':{'en': 'Brasil Telecom GSM'},
'554398417':{'en': 'Brasil Telecom GSM'},
'254747':{'en': 'JTL'},
'254744':{'en': 'Homeland Media'},
'554398413':{'en': 'Brasil Telecom GSM'},
'552299228':{'en': 'Claro BR'},
'455220':{'en': 'CoolTEL'},
'455222':{'en': 'Lebara Limited'},
'553899171':{'en': 'TIM'},
'455225':{'en': 'CBB Mobil'},
'3249':{'en': 'Orange'},
'3248':{'en': 'Telenet'},
'553899178':{'en': 'TIM'},
'553899179':{'en': 'TIM'},
'553899176':{'en': 'TIM'},
'515495823':{'en': 'Claro'},
'515495820':{'en': 'Claro'},
'515495821':{'en': 'Claro'},
'3247':{'en': 'Proximus'},
'515495827':{'en': 'Claro'},
'515495824':{'en': 'Claro'},
'515495825':{'en': 'Claro'},
'459218':{'en': 'Telenor Connexion AB'},
'517697622':{'en': 'Claro'},
'517697621':{'en': 'Claro'},
'554899146':{'en': 'Vivo'},
'551799791':{'en': 'Vivo'},
'447717':{'en': 'Vodafone'},
'515295270':{'en': 'Claro'},
'552299225':{'en': 'Claro BR'},
'347446':{'en': 'PTV'},
'1787971':{'en': 'CENTENNIAL'},
'551898810':{'en': 'Oi'},
'551898811':{'en': 'Oi'},
'553799144':{'en': 'TIM'},
'1787975':{'en': 'CENTENNIAL'},
'554199801':{'en': 'TIM'},
'552299227':{'en': 'Claro BR'},
'1876559':{'en': 'Digicel'},
'1876558':{'en': 'Digicel'},
'1876554':{'en': 'Digicel'},
'1876557':{'en': 'Digicel'},
'1876556':{'en': 'Digicel'},
'1876551':{'en': 'Digicel'},
'1876550':{'en': 'Digicel'},
'1876553':{'en': 'Digicel'},
'1876552':{'en': 'Digicel'},
'23120':{'en': 'LIBTELCO'},
'180978':{'en': 'Claro'},
'51619616':{'en': 'Movistar'},
'554899168':{'en': 'Vivo'},
'554899169':{'en': 'Vivo'},
'554899166':{'en': 'Vivo'},
'554899167':{'en': 'Vivo'},
'554899164':{'en': 'Vivo'},
'554899165':{'en': 'Vivo'},
'554899162':{'en': 'Vivo'},
'554899163':{'en': 'Vivo'},
'554899161':{'en': 'Vivo'},
'233554':{'en': 'MTN'},
'233555':{'en': 'MTN'},
'233556':{'en': 'MTN'},
'233557':{'en': 'MTN'},
'233553':{'en': 'MTN'},
'233558':{'en': 'MTN'},
'503618':{'en': 'Movistar'},
'554899606':{'en': 'TIM'},
'503611':{'en': 'Movistar'},
'503610':{'en': 'Movistar'},
'503613':{'en': 'Movistar'},
'503612':{'en': 'Movistar'},
'503615':{'en': 'Movistar'},
'503614':{'en': 'Movistar'},
'503617':{'en': 'Movistar'},
'503616':{'en': 'Movistar'},
'554199226':{'en': 'Vivo'},
'554199227':{'en': 'Vivo'},
'554199224':{'en': 'Vivo'},
'554199225':{'en': 'Vivo'},
'34608':{'en': 'Movistar'},
'34609':{'en': 'Movistar'},
'3460229':{'en': 'Boutique'},
'34605':{'en': 'Orange'},
'34606':{'en': 'Movistar'},
'34607':{'en': 'Vodafone'},
'34600':{'en': 'Vodafone'},
'554199228':{'en': 'Vivo'},
'3460221':{'en': 'Ion mobile'},
'180975':{'en': 'Claro'},
'2305471':{'en': 'Cellplus'},
'554899609':{'en': 'TIM'},
'373621':{'en': 'Orange'},
'373620':{'en': 'Orange'},
'554899608':{'en': 'TIM'},
'552799265':{'en': 'Claro BR'},
'551899197':{'en': 'Claro BR'},
'551298159':{'en': 'TIM'},
'551298158':{'en': 'TIM'},
'551298157':{'en': 'TIM'},
'551298156':{'en': 'TIM'},
'551298155':{'en': 'TIM'},
'551298154':{'en': 'TIM'},
'551298153':{'en': 'TIM'},
'551298152':{'en': 'TIM'},
'551298151':{'en': 'TIM'},
'38979':{'en': 'Lycamobile'},
'38974':{'en': 'Mobik'},
'553599187':{'en': 'TIM'},
'553599181':{'en': 'TIM'},
'447878':{'en': 'Three'},
'447879':{'en': 'Vodafone'},
'447876':{'en': 'Vodafone'},
'447877':{'en': 'Three'},
'447875':{'en': 'Orange'},
'447872':{'en': 'O2'},
'447873':{'en': 'O2'},
'447870':{'en': 'Orange'},
'2236':{'en': 'Sotelma'},
'372577':{'en': 'Elisa'},
'553599193':{'en': 'TIM'},
'1787392':{'en': 'Claro'},
'1787390':{'en': 'Claro'},
'1787391':{'en': 'Claro'},
'552198307':{'en': 'TIM'},
'554598806':{'en': 'Claro BR'},
'552899952':{'en': 'Vivo'},
'553599192':{'en': 'TIM'},
'554899115':{'en': 'Vivo'},
'551196169':{'en': 'Claro BR'},
'551196168':{'en': 'Claro BR'},
'553599191':{'en': 'TIM'},
'553299109':{'en': 'TIM'},
'553299108':{'en': 'TIM'},
'55379998':{'en': 'Telemig Celular'},
'554198447':{'en': 'Brasil Telecom GSM'},
'553199845':{'en': 'Telemig Celular'},
'553199844':{'en': 'Telemig Celular'},
'553199847':{'en': 'Telemig Celular'},
'553199846':{'en': 'Telemig Celular'},
'553199841':{'en': 'Telemig Celular'},
'553199843':{'en': 'Telemig Celular'},
'553199842':{'en': 'Telemig Celular'},
'553599197':{'en': 'TIM'},
'553199849':{'en': 'Telemig Celular'},
'551799627':{'en': 'Vivo'},
'5538988':{'en': 'Oi'},
'553299101':{'en': 'TIM'},
'551799621':{'en': 'Vivo'},
'553299102':{'en': 'TIM'},
'553399168':{'en': 'TIM'},
'176729':{'en': 'Cable & Wireless'},
'176728':{'en': 'Cable & Wireless'},
'554699115':{'en': 'Vivo'},
'176724':{'en': 'Cable & Wireless'},
'176727':{'en': 'Cable & Wireless'},
'554699116':{'en': 'Vivo'},
'554699111':{'en': 'Vivo'},
'176723':{'en': 'Cable & Wireless'},
'176722':{'en': 'Cable & Wireless'},
'553399979':{'en': 'Telemig Celular'},
'553399978':{'en': 'Telemig Celular'},
'553399973':{'en': 'Telemig Celular'},
'553399972':{'en': 'Telemig Celular'},
'553399971':{'en': 'Telemig Celular'},
'553399977':{'en': 'Telemig Celular'},
'553399976':{'en': 'Telemig Celular'},
'553399975':{'en': 'Telemig Celular'},
'553399974':{'en': 'Telemig Celular'},
'517497998':{'en': 'Movistar'},
'517497999':{'en': 'Movistar'},
'517497996':{'en': 'Movistar'},
'517497997':{'en': 'Movistar'},
'517497992':{'en': 'Movistar'},
'517497993':{'en': 'Movistar'},
'517497990':{'en': 'Movistar'},
'517497991':{'en': 'Movistar'},
'1268729':{'en': 'APUA'},
'553199719':{'en': 'Telemig Celular'},
'553199718':{'en': 'Telemig Celular'},
'553199715':{'en': 'Telemig Celular'},
'1268722':{'en': 'Digicel'},
'1268721':{'en': 'Digicel'},
'1268720':{'en': 'Digicel'},
'1268727':{'en': 'APUA'},
'1268726':{'en': 'Digicel'},
'1268725':{'en': 'Digicel'},
'1268724':{'en': 'Digicel'},
'180922':{'en': 'Claro'},
'180923':{'en': 'Claro'},
'180920':{'en': 'Tricom'},
'180926':{'en': 'Claro'},
'180927':{'en': 'Claro'},
'180924':{'en': 'Claro'},
'180925':{'en': 'Claro'},
'180928':{'en': 'Claro'},
'180929':{'en': 'Tricom'},
'554299945':{'en': 'TIM'},
'554799242':{'en': 'Vivo'},
'554799243':{'en': 'Vivo'},
'554799240':{'en': 'Vivo'},
'554799241':{'en': 'Vivo'},
'554799246':{'en': 'Vivo'},
'554799244':{'en': 'Vivo'},
'554799245':{'en': 'Vivo'},
'554299941':{'en': 'TIM'},
'553599199':{'en': 'TIM'},
'1787952':{'en': 'CENTENNIAL'},
'1787953':{'en': 'CENTENNIAL'},
'1787954':{'en': 'CENTENNIAL'},
'1787957':{'en': 'CENTENNIAL'},
'551498111':{'en': 'TIM'},
'447508':{'en': 'EE'},
'447506':{'en': 'EE'},
'447507':{'en': 'EE'},
'447504':{'en': 'EE'},
'447505':{'en': 'EE'},
'447502':{'en': 'Vodafone'},
'447503':{'en': 'Vodafone'},
'447500':{'en': 'Vodafone'},
'447501':{'en': 'Vodafone'},
'505873':{'en': 'Claro'},
'505872':{'en': 'Claro'},
'505871':{'en': 'Claro'},
'505870':{'en': 'Claro'},
'505877':{'en': 'Movistar'},
'505876':{'en': 'Movistar'},
'505875':{'en': 'Movistar'},
'505874':{'en': 'Claro'},
'505879':{'en': 'Movistar'},
'505878':{'en': 'Movistar'},
'551498114':{'en': 'TIM'},
'551498117':{'en': 'TIM'},
'55429910':{'en': 'Vivo'},
'551498116':{'en': 'TIM'},
'22571':{'en': 'Moov'},
'22575':{'en': 'MTN'},
'22574':{'en': 'MTN'},
'22577':{'en': 'Orange'},
'22576':{'en': 'MTN'},
'51739698':{'en': 'Movistar'},
'516196155':{'en': 'Movistar'},
'516196154':{'en': 'Movistar'},
'516196153':{'en': 'Movistar'},
'45413':{'en': 'Telenor'},
'516196151':{'en': 'Movistar'},
'516196150':{'en': 'Movistar'},
'23356':{'en': 'Airtel'},
'23357':{'en': 'tiGO'},
'23354':{'en': 'MTN'},
'553299924':{'en': 'Telemig Celular'},
'23350':{'en': 'Vodafone'},
'552899257':{'en': 'Claro BR'},
'552899254':{'en': 'Claro BR'},
'552899252':{'en': 'Claro BR'},
'552899251':{'en': 'Claro BR'},
'553199654':{'en': 'Telemig Celular'},
'553199655':{'en': 'Telemig Celular'},
'553598475':{'en': 'Claro BR'},
'553199656':{'en': 'Telemig Celular'},
'553199657':{'en': 'Telemig Celular'},
'262692':{'en': 'SFR'},
'554399112':{'en': 'Vivo'},
'553199652':{'en': 'Telemig Celular'},
'553199653':{'en': 'Telemig Celular'},
'553199391':{'en': 'TIM'},
'389718':{'en': 'T-Mobile'},
'389719':{'en': 'T-Mobile'},
'554399111':{'en': 'Vivo'},
'389711':{'en': 'T-Mobile'},
'389712':{'en': 'T-Mobile'},
'389713':{'en': 'T-Mobile'},
'389714':{'en': 'T-Mobile'},
'389715':{'en': 'T-Mobile'},
'389716':{'en': 'T-Mobile'},
'389717':{'en': 'T-Mobile'},
'554399114':{'en': 'Vivo'},
'554399115':{'en': 'Vivo'},
'553199659':{'en': 'Telemig Celular'},
'551999634':{'en': 'Vivo'},
'551999635':{'en': 'Vivo'},
'551999636':{'en': 'Vivo'},
'551999637':{'en': 'Vivo'},
'551999631':{'en': 'Vivo'},
'551999632':{'en': 'Vivo'},
'551999633':{'en': 'Vivo'},
'551999638':{'en': 'Vivo'},
'551999639':{'en': 'Vivo'},
'515695622':{'en': 'Claro'},
'515695623':{'en': 'Claro'},
'515695620':{'en': 'Claro'},
'515695621':{'en': 'Claro'},
'515695626':{'en': 'Claro'},
'515695624':{'en': 'Claro'},
'515695625':{'en': 'Claro'},
'124645':{'en': 'Sunbeach Communications'},
'2428001':{'en': 'Hightech Pro'},
'554899111':{'en': 'Vivo'},
'37533':{'be': u('\u041c\u0422\u0421'), 'en': 'MTS', 'ru': u('\u041c\u0422\u0421')},
'45514':{'en': 'TDC'},
'358458':{'en': 'Elisa'},
'4476637':{'en': 'Vodafone'},
'4476636':{'en': 'Relax'},
'45511':{'en': 'TDC'},
'45512':{'en': 'TDC'},
'45513':{'en': 'TDC'},
'358451':{'en': 'Elisa'},
'358450':{'en': 'Telia'},
'358453':{'en': 'Elisa'},
'358452':{'en': 'Elisa'},
'45518':{'en': 'TDC'},
'45519':{'en': 'TDC'},
'358456':{'en': 'Elisa'},
'553899809':{'en': 'Telemig Celular'},
'455242':{'en': 'CBB Mobil'},
'455240':{'en': 'YouSee'},
'554599138':{'en': 'Vivo'},
'455244':{'en': 'CBB Mobil'},
'515495800':{'en': 'Movistar'},
'515495801':{'en': 'Movistar'},
'515495802':{'en': 'Movistar'},
'515495803':{'en': 'Movistar'},
'515495804':{'en': 'Movistar'},
'515495805':{'en': 'Claro'},
'515495806':{'en': 'Claro'},
'515495807':{'en': 'Claro'},
'517697604':{'en': 'Movistar'},
'517697605':{'en': 'Movistar'},
'517697606':{'en': 'Movistar'},
'517697600':{'en': 'Movistar'},
'517697601':{'en': 'Movistar'},
'517697602':{'en': 'Movistar'},
'517697603':{'en': 'Movistar'},
'3469302':{'en': 'MasMovil'},
'3469303':{'en': 'MasMovil'},
'3469300':{'en': 'MasMovil'},
'3469301':{'en': 'MasMovil'},
'3469306':{'en': 'MasMovil'},
'3469304':{'en': 'MasMovil'},
'3469305':{'en': 'MasMovil'},
'551698159':{'en': 'TIM'},
'324661':{'en': 'Lycamobile'},
'324660':{'en': 'Lycamobile'},
'324663':{'en': 'Lycamobile'},
'324662':{'en': 'Lycamobile'},
'324665':{'en': 'Vectone'},
'324664':{'en': 'Lycamobile'},
'324667':{'en': 'Vectone'},
'324666':{'en': 'Vectone'},
'324669':{'en': 'Voxbone SA'},
'22799':{'en': 'Airtel'},
'22798':{'en': 'Airtel'},
'254764':{'en': 'Finserve'},
'254765':{'en': 'Finserve'},
'254766':{'en': 'Finserve'},
'254767':{'en': 'Sema Mobile'},
'254760':{'en': 'Mobile Pay'},
'254761':{'en': 'Airtel'},
'254762':{'en': 'Airtel'},
'254763':{'en': 'Finserve'},
'554599929':{'en': 'TIM'},
'254768':{'en': 'Safaricom'},
'254769':{'en': 'Airtel'},
'375298':{'be': u('\u041c\u0422\u0421'), 'en': 'MTS', 'ru': u('\u041c\u0422\u0421')},
'375299':{'be': 'Velcom', 'en': 'Velcom', 'ru': 'Velcom'},
'47478':{'en': 'Telenor'},
'375292':{'be': u('\u041c\u0422\u0421'), 'en': 'MTS', 'ru': u('\u041c\u0422\u0421')},
'375293':{'be': 'Velcom', 'en': 'Velcom', 'ru': 'Velcom'},
'375291':{'be': 'Velcom', 'en': 'Velcom', 'ru': 'Velcom'},
'375296':{'be': 'Velcom', 'en': 'Velcom', 'ru': 'Velcom'},
'375297':{'be': u('\u041c\u0422\u0421'), 'en': 'MTS', 'ru': u('\u041c\u0422\u0421')},
'47473':{'en': 'Tele2'},
'375295':{'be': u('\u041c\u0422\u0421'), 'en': 'MTS', 'ru': u('\u041c\u0422\u0421')},
'554599925':{'en': 'TIM'},
'2348382':{'en': 'Starcomms'},
'2348381':{'en': 'Starcomms'},
'2348380':{'en': 'Starcomms'},
'551298129':{'en': 'TIM'},
'554198412':{'en': 'Brasil Telecom GSM'},
'55149982':{'en': 'Vivo'},
'55149981':{'en': 'Vivo'},
'447871':{'en': 'O2'},
'551699741':{'en': 'Vivo'},
'551699743':{'en': 'Vivo'},
'551699742':{'en': 'Vivo'},
'551699745':{'en': 'Vivo'},
'551699744':{'en': 'Vivo'},
'551699747':{'en': 'Vivo'},
'551699746':{'en': 'Vivo'},
'551699749':{'en': 'Vivo'},
'551699748':{'en': 'Vivo'},
'231555':{'en': 'Novafone'},
'554798454':{'en': 'Brasil Telecom GSM'},
'554798455':{'en': 'Brasil Telecom GSM'},
'55419910':{'en': 'Vivo'},
'554798457':{'en': 'Brasil Telecom GSM'},
'554899636':{'en': 'TIM'},
'554798451':{'en': 'Brasil Telecom GSM'},
'554798452':{'en': 'Brasil Telecom GSM'},
'554798453':{'en': 'Brasil Telecom GSM'},
'554899638':{'en': 'TIM'},
'554899639':{'en': 'TIM'},
'554899148':{'en': 'Vivo'},
'554899149':{'en': 'Vivo'},
'31636':{'en': 'Tele2'},
'31637':{'en': 'Teleena (MVNE)'},
'31634':{'en': 'T-Mobile'},
'31633':{'en': 'Telfort'},
'31630':{'en': 'KPN'},
'31631':{'en': 'Vodafone Libertel B.V.'},
'554199208':{'en': 'Vivo'},
'554199209':{'en': 'Vivo'},
'554199204':{'en': 'Vivo'},
'554199205':{'en': 'Vivo'},
'554199206':{'en': 'Vivo'},
'554199207':{'en': 'Vivo'},
'554199201':{'en': 'Vivo'},
'554199202':{'en': 'Vivo'},
'554199203':{'en': 'Vivo'},
'34669':{'en': 'Movistar'},
'514194188':{'en': 'Movistar'},
'514194189':{'en': 'Movistar'},
'34662':{'en': 'Vodafone'},
'34663':{'en': 'Vodafone'},
'34660':{'en': 'Movistar'},
'34661':{'en': 'Vodafone'},
'34666':{'en': 'Vodafone'},
'34667':{'en': 'Vodafone'},
'34664':{'en': 'Vodafone'},
'34665':{'en': 'Orange'},
'551899791':{'en': 'Vivo'},
'22504':{'en': 'MTN'},
'22505':{'en': 'MTN'},
'22506':{'en': 'MTN'},
'22507':{'en': 'Orange'},
'22501':{'en': 'Moov'},
'22502':{'en': 'Moov'},
'22503':{'en': 'Moov'},
'22508':{'en': 'Orange'},
'22509':{'en': 'Orange'},
'267766':{'en': 'Mascom'},
'267767':{'en': 'Mascom'},
'267764':{'en': 'Orange'},
'267765':{'en': 'Orange'},
'267762':{'en': 'Mascom'},
'383458':{'en': 'vala'},
'267760':{'en': 'Mascom'},
'267761':{'en': 'Mascom'},
'383455':{'en': 'Z Mobile'},
'383454':{'en': 'vala'},
'383457':{'en': 'vala'},
'383456':{'en': 'Z Mobile'},
'383451':{'en': 'vala'},
'267768':{'en': 'BTC Mobile'},
'383452':{'en': 'vala'},
'517297292':{'en': 'Movistar'},
'517297291':{'en': 'Movistar'},
'517297290':{'en': 'Movistar'},
'517297297':{'en': 'Movistar'},
'517297296':{'en': 'Movistar'},
'5025311':{'en': 'Telgua'},
'5025310':{'en': 'Telgua'},
'517297298':{'en': 'Movistar'},
'503630':{'en': 'Claro'},
'2347386':{'en': 'Starcomms'},
'2347387':{'en': 'Starcomms'},
'551298137':{'en': 'TIM'},
'551298136':{'en': 'TIM'},
'551298131':{'en': 'TIM'},
'2347383':{'en': 'Starcomms'},
'2347380':{'en': 'Starcomms'},
'2347381':{'en': 'Starcomms'},
'551298139':{'en': 'TIM'},
'551298138':{'en': 'TIM'},
'26772':{'en': 'Orange'},
'551698166':{'en': 'TIM'},
'551698167':{'en': 'TIM'},
'551698164':{'en': 'TIM'},
'551698165':{'en': 'TIM'},
'551698162':{'en': 'TIM'},
'551698163':{'en': 'TIM'},
'554198407':{'en': 'Brasil Telecom GSM'},
'551698161':{'en': 'TIM'},
'554198409':{'en': 'Brasil Telecom GSM'},
'553199782':{'en': 'Telemig Celular'},
'1787400':{'en': 'CENTENNIAL'},
'551698168':{'en': 'TIM'},
'551698169':{'en': 'TIM'},
'447858':{'en': 'O2'},
'447859':{'en': 'Three'},
'447850':{'en': 'O2'},
'447851':{'en': 'O2'},
'447852':{'en': 'EE'},
'447853':{'en': 'Three'},
'447854':{'en': 'Orange'},
'447855':{'en': 'Orange'},
'447856':{'en': 'O2'},
'447857':{'en': 'O2'},
'554898427':{'en': 'Brasil Telecom GSM'},
'553399123':{'en': 'TIM'},
'515295299':{'en': 'Movistar'},
'515295298':{'en': 'Movistar'},
'515295297':{'en': 'Movistar'},
'515295296':{'en': 'Movistar'},
'515295295':{'en': 'Movistar'},
'515295294':{'en': 'Movistar'},
'515295293':{'en': 'Movistar'},
'515295292':{'en': 'Movistar'},
'25235':{'en': 'AirSom'},
'25239':{'en': 'AirSom'},
'552799281':{'en': 'Claro BR'},
'552799282':{'en': 'Claro BR'},
'552799283':{'en': 'Claro BR'},
'552799284':{'en': 'Claro BR'},
'552799285':{'en': 'Claro BR'},
'552799286':{'en': 'Claro BR'},
'552799287':{'en': 'Claro BR'},
'552799288':{'en': 'Claro BR'},
'552799289':{'en': 'Claro BR'},
'4915678':{'en': 'Argon Networks'},
'1939201':{'en': 'CENTENNIAL'},
'551799744':{'en': 'Vivo'},
'552498122':{'en': 'TIM'},
'551799745':{'en': 'Vivo'},
'554699132':{'en': 'Vivo'},
'554699131':{'en': 'Vivo'},
'553799942':{'en': 'Telemig Celular'},
'356989':{'en': 'Vodafone'},
'553799941':{'en': 'Telemig Celular'},
'553799946':{'en': 'Telemig Celular'},
'553799947':{'en': 'Telemig Celular'},
'553799944':{'en': 'Telemig Celular'},
'553799945':{'en': 'Telemig Celular'},
'553799948':{'en': 'Telemig Celular'},
'553799949':{'en': 'Telemig Celular'},
'37252':{'en': 'EMT'},
'18683':{'en': 'Digicel'},
'37250':{'en': 'EMT'},
'37256':{'en': 'Elisa'},
'18687':{'en': 'bmobile'},
'18684':{'en': 'bmobile'},
'37255':{'en': 'Tele 2'},
'37258':{'en': 'Tele 2'},
'553199294':{'en': 'TIM'},
'553199869':{'en': 'Telemig Celular'},
'553199868':{'en': 'Telemig Celular'},
'553199863':{'en': 'Telemig Celular'},
'553199862':{'en': 'Telemig Celular'},
'553199861':{'en': 'Telemig Celular'},
'553199867':{'en': 'Telemig Celular'},
'553199866':{'en': 'Telemig Celular'},
'553199865':{'en': 'Telemig Celular'},
'553199864':{'en': 'Telemig Celular'},
'553199733':{'en': 'Telemig Celular'},
'553199732':{'en': 'Telemig Celular'},
'553199731':{'en': 'Telemig Celular'},
'30690200':{'en': 'MI Carrier Services'},
'553199736':{'en': 'Telemig Celular'},
'553199735':{'en': 'Telemig Celular'},
'553199734':{'en': 'Telemig Celular'},
'553199739':{'en': 'Telemig Celular'},
'553199738':{'en': 'Telemig Celular'},
'187628':{'en': 'Digicel'},
'187629':{'en': 'Digicel'},
'187624':{'en': 'Digicel'},
'187625':{'en': 'Digicel'},
'187626':{'en': 'Digicel'},
'17873198':{'en': 'Claro'},
'17873199':{'en': 'Claro'},
'17873194':{'en': 'Claro'},
'17873195':{'en': 'Claro'},
'17873196':{'en': 'Claro'},
'17873197':{'en': 'Claro'},
'17873191':{'en': 'Claro'},
'17873192':{'en': 'Claro'},
'17873193':{'en': 'Claro'},
'1787978':{'en': 'CENTENNIAL'},
'502519':{'en': 'Tigo'},
'502518':{'en': 'Tigo'},
'502515':{'en': 'Tigo'},
'502514':{'en': 'Movistar'},
'502517':{'en': 'Tigo'},
'502516':{'en': 'Tigo'},
'502511':{'en': 'Telgua'},
'502510':{'en': 'Movistar'},
'502513':{'en': 'Telgua'},
'502512':{'en': 'Telgua'},
'447528':{'en': 'Orange'},
'447529':{'en': 'Orange'},
'51619619':{'en': 'Movistar'},
'447521':{'en': 'O2'},
'447522':{'en': 'O2'},
'447523':{'en': 'O2'},
'447525':{'en': 'O2'},
'447526':{'en': 'O2'},
'447527':{'en': 'Orange'},
'505899':{'en': 'Movistar'},
'505898':{'en': 'Movistar'},
'505895':{'en': 'Movistar'},
'505894':{'en': 'Claro'},
'505897':{'en': 'Movistar'},
'505896':{'en': 'Movistar'},
'505891':{'en': 'Claro'},
'505890':{'en': 'Claro'},
'505893':{'en': 'Claro'},
'505892':{'en': 'Claro'},
'554799996':{'en': 'TIM'},
'554799997':{'en': 'TIM'},
'554799994':{'en': 'TIM'},
'554799995':{'en': 'TIM'},
'554799992':{'en': 'TIM'},
'554799993':{'en': 'TIM'},
'554799991':{'en': 'TIM'},
'3519234':{'en': 'Vectone'},
'3519232':{'en': 'Vectone'},
'3519233':{'en': 'Vectone'},
'3519230':{'en': 'Vectone'},
'3519231':{'en': 'Vectone'},
'551498119':{'en': 'TIM'},
'551498118':{'en': 'TIM'},
'4474178':{'en': 'Truphone'},
'4474179':{'en': 'Core Telecom'},
'553199827':{'en': 'Telemig Celular'},
'4474174':{'en': 'Lycamobile'},
'4474175':{'en': 'Lycamobile'},
'551498113':{'en': 'TIM'},
'551498112':{'en': 'TIM'},
'551498115':{'en': 'TIM'},
'4474171':{'en': 'CardBoardFish'},
'4474172':{'en': 'Core Telecom'},
'4474173':{'en': 'Lycamobile'},
'552299101':{'en': 'Claro BR'},
'552299102':{'en': 'Claro BR'},
'552299103':{'en': 'Claro BR'},
'552299104':{'en': 'Claro BR'},
'552299105':{'en': 'Claro BR'},
'554198424':{'en': 'Brasil Telecom GSM'},
'551698803':{'en': 'Oi'},
'551698805':{'en': 'Oi'},
'551698804':{'en': 'Oi'},
'551698807':{'en': 'Oi'},
'551698806':{'en': 'Oi'},
'551698809':{'en': 'Oi'},
'551698808':{'en': 'Oi'},
'554198423':{'en': 'Brasil Telecom GSM'},
'4915080':{'en': 'Easy World'},
'55129923':{'en': 'Claro BR'},
'55129922':{'en': 'Claro BR'},
'55129921':{'en': 'Claro BR'},
'55129920':{'en': 'Claro BR'},
'389772':{'en': 'Vip'},
'389773':{'en': 'Vip'},
'389771':{'en': 'Vip'},
'389776':{'en': 'Vip'},
'389777':{'en': 'Vip'},
'389774':{'en': 'Vip'},
'389775':{'en': 'Vip'},
'389778':{'en': 'Vip'},
'389779':{'en': 'Vip'},
'4915888':{'en': 'TelcoVillage'},
'447573':{'en': 'EE'},
'4476433':{'en': 'Yim Siam'},
'356988':{'en': 'GO Mobile'},
'553199298':{'en': 'TIM'},
'553199299':{'en': 'TIM'},
'356981':{'en': 'Redtouch Fone'},
'553199295':{'en': 'TIM'},
'553199296':{'en': 'TIM'},
'553199297':{'en': 'TIM'},
'553199291':{'en': 'TIM'},
'553199292':{'en': 'TIM'},
'553199293':{'en': 'TIM'},
'1939214':{'en': 'CENTENNIAL'},
'124669':{'en': 'Ozone'},
'5531985':{'en': 'Oi'},
'5531986':{'en': 'Oi'},
'5531987':{'en': 'Oi'},
'554799935':{'en': 'TIM'},
'55439996':{'en': 'TIM'},
'5531983':{'en': 'Claro BR'},
'30695200':{'en': 'Compatel'},
'5531988':{'en': 'Oi'},
'5531989':{'en': 'Oi'},
'1787219':{'en': 'Claro'},
'1787218':{'en': 'Claro'},
'1787217':{'en': 'Claro'},
'1787216':{'en': 'Claro'},
'1787215':{'en': 'Claro'},
'1787214':{'en': 'Claro'},
'1787213':{'en': 'Claro'},
'1787212':{'en': 'Claro'},
'1787210':{'en': 'SunCom Wireless Puerto Rico'},
'5119807':{'en': 'Claro'},
'5119806':{'en': 'Claro'},
'5119805':{'en': 'Claro'},
'553898419':{'en': 'Claro BR'},
'5119803':{'en': 'Movistar'},
'5119802':{'en': 'Movistar'},
'5119801':{'en': 'Movistar'},
'455266':{'en': 'CBB Mobil'},
'455262':{'en': 'CBB Mobil'},
'5119808':{'en': 'Claro'},
'553499217':{'en': 'TIM'},
'553499216':{'en': 'TIM'},
'553499215':{'en': 'TIM'},
'553499214':{'en': 'TIM'},
'553499213':{'en': 'TIM'},
'553499212':{'en': 'TIM'},
'553499211':{'en': 'TIM'},
'553499218':{'en': 'TIM'},
'26263919':{'en': 'Only'},
'553798408':{'en': 'Claro BR'},
'553798409':{'en': 'Claro BR'},
'553798404':{'en': 'Claro BR'},
'553798405':{'en': 'Claro BR'},
'26263911':{'en': 'SFR'},
'26263910':{'en': 'SFR'},
'459118':{'en': 'Companymobile'},
'553798402':{'en': 'Claro BR'},
'553798403':{'en': 'Claro BR'},
'459112':{'en': 'SimService'},
'554899635':{'en': 'TIM'},
'459113':{'en': 'SimService'},
'45711':{'en': 'CBB Mobil'},
'554698823':{'en': 'Claro BR'},
'459116':{'en': 'Companymobile'},
'47454':{'en': 'NetCom'},
'459114':{'en': 'SimService'},
'48724':{'en': 'Plus'},
'48725':{'en': 'Plus'},
'48726':{'en': 'Plus'},
'459115':{'en': 'Companymobile'},
'48721':{'en': 'Plus'},
'48722':{'en': 'Plus'},
'48723':{'en': 'Plus'},
'551799701':{'en': 'Vivo'},
'551699767':{'en': 'Vivo'},
'551699766':{'en': 'Vivo'},
'551699765':{'en': 'Vivo'},
'551699764':{'en': 'Vivo'},
'551699763':{'en': 'Vivo'},
'551699762':{'en': 'Vivo'},
'551699761':{'en': 'Vivo'},
'551699769':{'en': 'Vivo'},
'551699768':{'en': 'Vivo'},
'554899618':{'en': 'TIM'},
'554899619':{'en': 'TIM'},
'553199322':{'en': 'TIM'},
'551799706':{'en': 'Vivo'},
'554899611':{'en': 'TIM'},
'554899612':{'en': 'TIM'},
'554899613':{'en': 'TIM'},
'554899614':{'en': 'TIM'},
'554899615':{'en': 'TIM'},
'554899616':{'en': 'TIM'},
'554899617':{'en': 'TIM'},
'31614':{'en': 'T-Mobile'},
'31615':{'en': 'Vodafone Libertel B.V.'},
'31616':{'en': 'Telfort'},
'31617':{'en': 'Telfort'},
'31610':{'en': 'KPN'},
'31611':{'en': 'Vodafone Libertel B.V.'},
'31612':{'en': 'KPN'},
'31613':{'en': 'KPN'},
'552899982':{'en': 'Vivo'},
'552899983':{'en': 'Vivo'},
'552899981':{'en': 'Vivo'},
'552899986':{'en': 'Vivo'},
'552899987':{'en': 'Vivo'},
'552899984':{'en': 'Vivo'},
'552899985':{'en': 'Vivo'},
'389787':{'en': 'Vip'},
'551799707':{'en': 'Vivo'},
'516496490':{'en': 'Movistar'},
'34640':{'en': 'Orange'},
'554598813':{'en': 'Claro BR'},
'34642':{'en': 'DigiMobil'},
'389784':{'en': 'Vip'},
'34644':{'en': 'Simyo'},
'34645':{'en': 'Orange'},
'34646':{'en': 'Movistar'},
'34647':{'en': 'Vodafone'},
'34648':{'en': 'Movistar'},
'34649':{'en': 'Movistar'},
'554598818':{'en': 'Claro BR'},
'554598819':{'en': 'Claro BR'},
'553299118':{'en': 'TIM'},
'553299119':{'en': 'TIM'},
'389781':{'en': 'Vip'},
'553299112':{'en': 'TIM'},
'553299113':{'en': 'TIM'},
'553299111':{'en': 'TIM'},
'553299116':{'en': 'TIM'},
'553299117':{'en': 'TIM'},
'553299114':{'en': 'TIM'},
'553299115':{'en': 'TIM'},
'51629629':{'en': 'Movistar'},
'51629626':{'en': 'Movistar'},
'22560':{'en': 'GreenN'},
'22561':{'en': 'GreenN'},
'22566':{'en': 'MTN'},
'22567':{'en': 'Orange'},
'22564':{'en': 'MTN'},
'22565':{'en': 'MTN'},
'22568':{'en': 'Orange'},
'22569':{'en': 'Aircom'},
'267743':{'en': 'Orange'},
'267744':{'en': 'Orange'},
'267748':{'en': 'Orange'},
'267749':{'en': 'BTC Mobile'},
'554599149':{'en': 'Vivo'},
'554599148':{'en': 'Vivo'},
'554599147':{'en': 'Vivo'},
'554599146':{'en': 'Vivo'},
'554599145':{'en': 'Vivo'},
'554599144':{'en': 'Vivo'},
'554599143':{'en': 'Vivo'},
'554599142':{'en': 'Vivo'},
'554599141':{'en': 'Vivo'},
'554699121':{'en': 'Vivo'},
'551698148':{'en': 'TIM'},
'551698149':{'en': 'TIM'},
'22788':{'en': 'Airtel'},
'22789':{'en': 'Airtel'},
'551698144':{'en': 'TIM'},
'551698145':{'en': 'TIM'},
'551698146':{'en': 'TIM'},
'551698147':{'en': 'TIM'},
'551698141':{'en': 'TIM'},
'22780':{'en': 'Orange'},
'551698143':{'en': 'TIM'},
'447832':{'en': 'Three'},
'447833':{'en': 'Vodafone'},
'447830':{'en': 'Three'},
'447831':{'en': 'Vodafone'},
'447836':{'en': 'Vodafone'},
'447837':{'en': 'Orange'},
'447834':{'en': 'O2'},
'447835':{'en': 'O2'},
'447838':{'en': 'Three'},
'554198429':{'en': 'Brasil Telecom GSM'},
'554198428':{'en': 'Brasil Telecom GSM'},
'4476633':{'en': 'Syntec'},
'34675':{'en': 'Orange'},
'22584':{'en': 'MTN'},
'22585':{'en': 'MTN'},
'553599948':{'en': 'Telemig Celular'},
'553599949':{'en': 'Telemig Celular'},
'51769768':{'en': 'Movistar'},
'51769767':{'en': 'Movistar'},
'51769766':{'en': 'Movistar'},
'553599942':{'en': 'Telemig Celular'},
'346038':{'en': 'Vodafone'},
'51769763':{'en': 'Claro'},
'553599945':{'en': 'Telemig Celular'},
'553599946':{'en': 'Telemig Celular'},
'553599947':{'en': 'Telemig Celular'},
'372538':{'en': 'EMT'},
'372539':{'en': 'EMT'},
'372533':{'en': 'EMT'},
'372530':{'en': 'EMT'},
'372536':{'en': 'EMT'},
'372537':{'en': 'EMT'},
'372534':{'en': 'EMT'},
'551298119':{'en': 'TIM'},
'551298118':{'en': 'TIM'},
'551298113':{'en': 'TIM'},
'551298112':{'en': 'TIM'},
'551298111':{'en': 'TIM'},
'551298117':{'en': 'TIM'},
'551298116':{'en': 'TIM'},
'551298115':{'en': 'TIM'},
'551298114':{'en': 'TIM'},
'553798407':{'en': 'Claro BR'},
'554399192':{'en': 'Vivo'},
'554399193':{'en': 'Vivo'},
'554399191':{'en': 'Vivo'},
'554399194':{'en': 'Vivo'},
'553798401':{'en': 'Claro BR'},
'551999771':{'en': 'Vivo'},
'551999773':{'en': 'Vivo'},
'5037072':{'en': 'Digicel'},
'551999775':{'en': 'Vivo'},
'551999774':{'en': 'Vivo'},
'551999777':{'en': 'Vivo'},
'551999776':{'en': 'Vivo'},
'551999779':{'en': 'Vivo'},
'551999778':{'en': 'Vivo'},
'55359997':{'en': 'Telemig Celular'},
'55359996':{'en': 'Telemig Celular'},
'55359998':{'en': 'Telemig Celular'},
'2348488':{'en': 'Starcomms'},
'2348489':{'en': 'Starcomms'},
'552898114':{'en': 'TIM'},
'552898115':{'en': 'TIM'},
'552898112':{'en': 'TIM'},
'552898113':{'en': 'TIM'},
'552898111':{'en': 'TIM'},
'2348480':{'en': 'Starcomms'},
'2348481':{'en': 'Starcomms'},
'2348484':{'en': 'Starcomms'},
'2348485':{'en': 'Starcomms'},
'2348486':{'en': 'Starcomms'},
'552898119':{'en': 'TIM'},
'552198411':{'en': 'Oi'},
'30690199':{'en': 'BWS'},
'55329846':{'en': 'Claro BR'},
'55329847':{'en': 'Claro BR'},
'55329844':{'en': 'Claro BR'},
'55329845':{'en': 'Claro BR'},
'55329842':{'en': 'Claro BR'},
'55329843':{'en': 'Claro BR'},
'336008':{'en': 'Orange France'},
'336009':{'en': 'Bouygues'},
'551398161':{'en': 'TIM'},
'336007':{'en': 'SFR'},
'336002':{'en': 'SFR'},
'336003':{'en': 'Bouygues'},
'336001':{'en': 'Orange France'},
'553199881':{'en': 'Telemig Celular'},
'553199883':{'en': 'Telemig Celular'},
'553199882':{'en': 'Telemig Celular'},
'553199885':{'en': 'Telemig Celular'},
'553199884':{'en': 'Telemig Celular'},
'553199887':{'en': 'Telemig Celular'},
'553199886':{'en': 'Telemig Celular'},
'553199889':{'en': 'Telemig Celular'},
'553199888':{'en': 'Telemig Celular'},
'40711':{'en': 'Telekom'},
'40712':{'en': '2K Telecom'},
'553799968':{'en': 'Telemig Celular'},
'553799969':{'en': 'Telemig Celular'},
'553799961':{'en': 'Telemig Celular'},
'553799962':{'en': 'Telemig Celular'},
'553799963':{'en': 'Telemig Celular'},
'553799964':{'en': 'Telemig Celular'},
'553799965':{'en': 'Telemig Celular'},
'553799966':{'en': 'Telemig Celular'},
'553799967':{'en': 'Telemig Celular'},
'553199874':{'en': 'Telemig Celular'},
'553199875':{'en': 'Telemig Celular'},
'1787486':{'en': 'Claro'},
'553199876':{'en': 'Telemig Celular'},
'1787487':{'en': 'Claro'},
'552299258':{'en': 'Claro BR'},
'553199877':{'en': 'Telemig Celular'},
'234908':{'en': '9mobile'},
'234909':{'en': '9mobile'},
'234906':{'en': 'MTN'},
'234907':{'en': 'Airtel'},
'234905':{'en': 'Glo'},
'234902':{'en': 'Airtel'},
'234903':{'en': 'MTN'},
'553199871':{'en': 'Telemig Celular'},
'553199392':{'en': 'TIM'},
'553199395':{'en': 'TIM'},
'553199397':{'en': 'TIM'},
'553199396':{'en': 'TIM'},
'553199726':{'en': 'Telemig Celular'},
'549341':{'en': 'Personal'},
'552299251':{'en': 'Claro BR'},
'552299252':{'en': 'Claro BR'},
'552299253':{'en': 'Claro BR'},
'549345':{'en': 'Personal'},
'27664':{'en': 'Vodacom'},
'27665':{'en': 'Vodacom'},
'27662':{'en': 'Vodacom'},
'27663':{'en': 'Vodacom'},
'27660':{'en': 'Vodacom'},
'27661':{'en': 'Vodacom'},
'552299256':{'en': 'Claro BR'},
'551498139':{'en': 'TIM'},
'47452':{'en': 'NetCom'},
'551498137':{'en': 'TIM'},
'551498136':{'en': 'TIM'},
'551498135':{'en': 'TIM'},
'551498134':{'en': 'TIM'},
'551498133':{'en': 'TIM'},
'551498132':{'en': 'TIM'},
'502539':{'en': 'Movistar'},
'551299631':{'en': 'Vivo'},
'551299630':{'en': 'Vivo'},
'503774':{'en': 'Claro'},
'503775':{'en': 'Claro'},
'503772':{'en': 'Tigo'},
'503773':{'en': 'Tigo'},
'503770':{'en': 'Movistar'},
'503771':{'en': 'Movistar'},
'553199728':{'en': 'Telemig Celular'},
'553199729':{'en': 'Telemig Celular'},
'551698823':{'en': 'Oi'},
'551698822':{'en': 'Oi'},
'551698821':{'en': 'Oi'},
'551698820':{'en': 'Oi'},
'50683':{'en': 'Kolbi ICE'},
'553199319':{'en': 'TIM'},
'553199318':{'en': 'TIM'},
'389758':{'en': 'Vip'},
'389759':{'en': 'Vip'},
'389754':{'en': 'Vip'},
'389755':{'en': 'Vip'},
'389756':{'en': 'Vip'},
'389757':{'en': 'Vip'},
'553199315':{'en': 'TIM'},
'553199314':{'en': 'TIM'},
'389752':{'en': 'Vip'},
'389753':{'en': 'Vip'},
'51679674':{'en': 'Claro'},
'5119751':{'en': 'Movistar'},
'551899711':{'en': 'Vivo'},
'5119750':{'en': 'Movistar'},
'24201':{'en': 'Equateur Telecom'},
'552798168':{'en': 'TIM'},
'551899712':{'en': 'Vivo'},
'457194':{'en': 'Telenor'},
'457195':{'en': 'Telenor'},
'457196':{'en': 'Mundio Mobile'},
'457197':{'en': 'Mundio Mobile'},
'457190':{'en': 'Phone-IT'},
'457191':{'en': 'Telecom X'},
'457192':{'en': 'Justfone'},
'457193':{'en': 'CBB Mobil'},
'2347023':{'en': 'Zoom'},
'2347022':{'en': 'Ntel'},
'2347021':{'en': 'Ntel'},
'2347020':{'en': 'Smile'},
'4476411':{'en': 'Orange'},
'457199':{'en': 'Firmafon'},
'2347025':{'en': 'Visafone'},
'2347024':{'en': 'Prestel'},
'552798169':{'en': 'TIM'},
'354637':{'en': u('\u00d6ryggisfjarskipti')},
'2359':{'en': 'Millicom'},
'354630':{'en': 'IMC'},
'354632':{'en': 'Tismi'},
'354639':{'en': u('\u00d6ryggisfjarskipti')},
'354638':{'en': u('\u00d6ryggisfjarskipti')},
'458195':{'en': 'CBB Mobil'},
'458194':{'en': 'Lebara Limited'},
'458197':{'en': 'CBB Mobil'},
'458196':{'en': 'CBB Mobil'},
'458191':{'en': 'Lebara Limited'},
'458190':{'en': 'Lebara Limited'},
'458193':{'en': 'Lebara Limited'},
'458192':{'en': 'Lebara Limited'},
'458199':{'en': 'Banedanmark'},
'458198':{'en': 'CBB Mobil'},
'2136':{'en': 'Mobilis'},
'2135':{'en': 'Ooredoo'},
'167174':{'en': 'PTI PACIFICA'},
'230595':{'en': 'MTML'},
'230594':{'en': 'Cellplus'},
'230597':{'en': 'Emtel'},
'230596':{'en': 'MTML'},
'230591':{'en': 'Cellplus'},
'230590':{'en': 'Cellplus'},
'230593':{'en': 'Emtel'},
'230592':{'en': 'Cellplus'},
'43650':{'en': 'tele.ring'},
'230598':{'en': 'Emtel'},
'551599169':{'en': 'Claro BR'},
'515495840':{'en': 'Movistar'},
'515495841':{'en': 'Movistar'},
'515495842':{'en': 'Movistar'},
'515495843':{'en': 'Movistar'},
'554198408':{'en': 'Brasil Telecom GSM'},
'551598141':{'en': 'TIM'},
'551197995':{'en': 'Oi'},
'551197994':{'en': 'Oi'},
'551197993':{'en': 'Oi'},
'551197992':{'en': 'Oi'},
'551197991':{'en': 'Oi'},
'551197990':{'en': 'Oi'},
'26263930':{'en': 'BJT'},
'26263939':{'en': 'Only'},
'552299761':{'en': 'Vivo'},
'552299762':{'en': 'Vivo'},
'552299763':{'en': 'Vivo'},
'552299764':{'en': 'Vivo'},
'552299765':{'en': 'Vivo'},
'552299766':{'en': 'Vivo'},
'552299767':{'en': 'Vivo'},
'447534':{'en': 'EE'},
'554399168':{'en': 'Vivo'},
'554399612':{'en': 'TIM'},
'447538':{'en': 'EE'},
'33634':{'en': 'SFR'},
'33635':{'en': 'SFR'},
'147342':{'en': 'Digicel Grenada'},
'147341':{'en': 'Digicel Grenada'},
'51619627':{'en': 'Claro'},
'552799249':{'en': 'Claro BR'},
'24493':{'en': 'UNITEL'},
'554399133':{'en': 'Vivo'},
'552899988':{'en': 'Vivo'},
'553299131':{'en': 'TIM'},
'553299132':{'en': 'TIM'},
'552899989':{'en': 'Vivo'},
'553299134':{'en': 'TIM'},
'553299135':{'en': 'TIM'},
'553299136':{'en': 'TIM'},
'553299137':{'en': 'TIM'},
'553299138':{'en': 'TIM'},
'553299139':{'en': 'TIM'},
'551599162':{'en': 'Claro BR'},
'447489':{'en': 'O2'},
'447487':{'en': 'EE'},
'515395350':{'en': 'Claro'},
'447485':{'en': 'EE'},
'447484':{'en': 'EE'},
'447483':{'en': 'EE'},
'447482':{'en': 'Three'},
'447481':{'en': 'Three'},
'447480':{'en': 'Three'},
'551699709':{'en': 'Vivo'},
'551699708':{'en': 'Vivo'},
'551699705':{'en': 'Vivo'},
'551699704':{'en': 'Vivo'},
'551699707':{'en': 'Vivo'},
'551699706':{'en': 'Vivo'},
'551699701':{'en': 'Vivo'},
'551699703':{'en': 'Vivo'},
'551699702':{'en': 'Vivo'},
'22548':{'en': 'Orange'},
'22549':{'en': 'Orange'},
'22540':{'en': 'Moov'},
'22541':{'en': 'Moov'},
'22542':{'en': 'Moov'},
'22543':{'en': 'Moov'},
'22544':{'en': 'MTN'},
'22545':{'en': 'MTN'},
'22546':{'en': 'MTN'},
'22547':{'en': 'Orange'},
'381677':{'en': 'GLOBALTEL'},
'381678':{'en': 'Vectone Mobile'},
'554599125':{'en': 'Vivo'},
'551599164':{'en': 'Claro BR'},
'554599127':{'en': 'Vivo'},
'554599126':{'en': 'Vivo'},
'554599121':{'en': 'Vivo'},
'554599123':{'en': 'Vivo'},
'554599122':{'en': 'Vivo'},
'554599129':{'en': 'Vivo'},
'554599128':{'en': 'Vivo'},
'551699722':{'en': 'Vivo'},
'474690':{'en': 'Telenor'},
'474691':{'en': 'Telenor'},
'474692':{'en': 'Telenor'},
'474693':{'en': 'Telenor'},
'474694':{'en': 'Telenor'},
'474695':{'en': 'Telenor'},
'474696':{'en': 'Telenor'},
'554598831':{'en': 'Claro BR'},
'554598832':{'en': 'Claro BR'},
'554598833':{'en': 'Claro BR'},
'554598834':{'en': 'Claro BR'},
'554598835':{'en': 'Claro BR'},
'554598836':{'en': 'Claro BR'},
'554598837':{'en': 'Claro BR'},
'554198449':{'en': 'Brasil Telecom GSM'},
'554198448':{'en': 'Brasil Telecom GSM'},
'554198445':{'en': 'Brasil Telecom GSM'},
'554198444':{'en': 'Brasil Telecom GSM'},
'514394324':{'en': 'Movistar'},
'554198446':{'en': 'Brasil Telecom GSM'},
'514394322':{'en': 'Movistar'},
'514394323':{'en': 'Movistar'},
'514394320':{'en': 'Movistar'},
'514394321':{'en': 'Movistar'},
'515495893':{'en': 'Movistar'},
'447818':{'en': 'Vodafone'},
'447819':{'en': 'O2'},
'447810':{'en': 'Vodafone'},
'553499983':{'en': 'Telemig Celular'},
'515495892':{'en': 'Movistar'},
'55489880':{'en': 'Claro BR'},
'554598812':{'en': 'Claro BR'},
'553499982':{'en': 'Telemig Celular'},
'553599928':{'en': 'Telemig Celular'},
'553599929':{'en': 'Telemig Celular'},
'553599926':{'en': 'Telemig Celular'},
'553599927':{'en': 'Telemig Celular'},
'553599924':{'en': 'Telemig Celular'},
'553599925':{'en': 'Telemig Celular'},
'553599922':{'en': 'Telemig Celular'},
'372519':{'en': 'EMT'},
'553599921':{'en': 'Telemig Celular'},
'55119664':{'en': 'Claro BR'},
'55119663':{'en': 'Claro BR'},
'55119662':{'en': 'Claro BR'},
'55119661':{'en': 'Claro BR'},
'55119660':{'en': 'Claro BR'},
'554598816':{'en': 'Claro BR'},
'553799924':{'en': 'Telemig Celular'},
'554598814':{'en': 'Claro BR'},
'554598815':{'en': 'Claro BR'},
'30695290':{'en': 'MI Carrier Services'},
'25279':{'en': 'Somtel'},
'1939242':{'en': 'Claro'},
'1939240':{'en': 'SunCom Wireless Puerto Rico'},
'1939247':{'en': 'Claro'},
'1939246':{'en': 'Claro'},
'1939245':{'en': 'Claro'},
'1939244':{'en': 'Claro'},
'1939249':{'en': 'Claro'},
'1939248':{'en': 'Claro'},
'551999757':{'en': 'Vivo'},
'551999756':{'en': 'Vivo'},
'551999755':{'en': 'Vivo'},
'551999754':{'en': 'Vivo'},
'551999753':{'en': 'Vivo'},
'551999752':{'en': 'Vivo'},
'551999751':{'en': 'Vivo'},
'551999759':{'en': 'Vivo'},
'551999758':{'en': 'Vivo'},
'553799927':{'en': 'Telemig Celular'},
'2659':{'en': 'Airtel'},
'2658':{'en': 'TNM'},
'551599201':{'en': 'Claro BR'},
'551799634':{'en': 'Vivo'},
'4525984':{'en': 'CoolTEL'},
'4525985':{'en': '42 Telecom AB'},
'4525986':{'en': '42 Telecom AB'},
'4525987':{'en': 'Netfors Unified Messaging'},
'4525980':{'en': 'Uni-tel'},
'4525981':{'en': 'MobiWeb Limited'},
'4525982':{'en': 'Jay.net'},
'4525983':{'en': '42 Telecom AB'},
'551799632':{'en': 'Vivo'},
'4525988':{'en': 'CoolTEL'},
'4525989':{'en': 'Ipnordic'},
'552498129':{'en': 'TIM'},
'551799633':{'en': 'Vivo'},
'551799631':{'en': 'Vivo'},
'459340':{'en': 'Justfone'},
'1939865':{'en': 'SunCom Wireless Puerto Rico'},
'554998419':{'en': 'Brasil Telecom GSM'},
'554998412':{'en': 'Brasil Telecom GSM'},
'554998413':{'en': 'Brasil Telecom GSM'},
'554998411':{'en': 'Brasil Telecom GSM'},
'554998416':{'en': 'Brasil Telecom GSM'},
'554998417':{'en': 'Brasil Telecom GSM'},
'554998414':{'en': 'Brasil Telecom GSM'},
'554998415':{'en': 'Brasil Telecom GSM'},
'551899742':{'en': 'Vivo'},
'346434':{'en': 'DigiMobil'},
'346435':{'en': 'DigiMobil'},
'346436':{'en': 'DigiMobil'},
'346430':{'en': 'DigiMobil'},
'346431':{'en': 'DigiMobil'},
'551398149':{'en': 'TIM'},
'346433':{'en': 'DigiMobil'},
'551398147':{'en': 'TIM'},
'551398146':{'en': 'TIM'},
'551398145':{'en': 'TIM'},
'551398144':{'en': 'TIM'},
'551398143':{'en': 'TIM'},
'551398142':{'en': 'TIM'},
'551398141':{'en': 'TIM'},
'459123':{'en': 'Companymobile'},
'459122':{'en': 'Companymobile'},
'459121':{'en': 'SimService'},
'459120':{'en': 'Tismi BV'},
'459127':{'en': 'Mundio Mobile'},
'459126':{'en': 'Mundio Mobile'},
'459125':{'en': 'Companymobile'},
'459124':{'en': 'Companymobile'},
'459129':{'en': 'Mundio Mobile'},
'459128':{'en': 'Mundio Mobile'},
'552899883':{'en': 'Vivo'},
'552899882':{'en': 'Vivo'},
'552899881':{'en': 'Vivo'},
'474723':{'en': 'Tele2'},
'552899886':{'en': 'Vivo'},
'552899885':{'en': 'Vivo'},
'552899884':{'en': 'Vivo'},
'474727':{'en': 'Tele2'},
'554898442':{'en': 'Brasil Telecom GSM'},
'554898443':{'en': 'Brasil Telecom GSM'},
'554898441':{'en': 'Brasil Telecom GSM'},
'554898446':{'en': 'Brasil Telecom GSM'},
'554898447':{'en': 'Brasil Telecom GSM'},
'554898444':{'en': 'Brasil Telecom GSM'},
'554898445':{'en': 'Brasil Telecom GSM'},
'554898448':{'en': 'Brasil Telecom GSM'},
'554898449':{'en': 'Brasil Telecom GSM'},
'38671':{'en': 'Telekom Slovenije'},
'38670':{'en': 'Telemach'},
'553799908':{'en': 'Telemig Celular'},
'553799909':{'en': 'Telemig Celular'},
'553799906':{'en': 'Telemig Celular'},
'553799907':{'en': 'Telemig Celular'},
'553799904':{'en': 'Telemig Celular'},
'553799905':{'en': 'Telemig Celular'},
'553799902':{'en': 'Telemig Celular'},
'553799903':{'en': 'Telemig Celular'},
'553799901':{'en': 'Telemig Celular'},
'553599174':{'en': 'TIM'},
'554899123':{'en': 'Vivo'},
'479403':{'en': 'Telenor'},
'479405':{'en': 'Telenor'},
'551899758':{'en': 'Vivo'},
'25579':{'en': 'Benson Informatics'},
'212684':{'en': u('M\u00e9ditel')},
'212687':{'en': 'Inwi'},
'553299946':{'en': 'Telemig Celular'},
'212681':{'en': 'Inwi'},
'212680':{'en': 'Inwi'},
'212682':{'en': 'Maroc Telecom'},
'212689':{'en': 'Maroc Telecom'},
'212688':{'en': u('M\u00e9ditel')},
'27644':{'en': 'Cell C'},
'27645':{'en': 'Cell C'},
'27646':{'en': 'Vodacom'},
'27647':{'en': 'Vodacom'},
'27640':{'en': 'MTN'},
'27641':{'en': 'Cell C'},
'27642':{'en': 'Cell C'},
'27643':{'en': 'Cell C'},
'554799958':{'en': 'TIM'},
'554799959':{'en': 'TIM'},
'27648':{'en': 'Vodacom'},
'27649':{'en': 'Vodacom'},
'51849849':{'en': 'Movistar'},
'51849848':{'en': 'Movistar'},
'554299962':{'en': 'TIM'},
'553799929':{'en': 'Telemig Celular'},
'51849841':{'en': 'Claro'},
'51849843':{'en': 'Claro'},
'51849842':{'en': 'Claro'},
'51849845':{'en': 'Movistar'},
'51849844':{'en': 'Claro'},
'51849847':{'en': 'Claro'},
'51849846':{'en': 'Movistar'},
'502551':{'en': 'Telgua'},
'502550':{'en': 'Movistar'},
'551498157':{'en': 'TIM'},
'502552':{'en': 'Tigo'},
'502555':{'en': 'Telgua'},
'502554':{'en': 'Movistar'},
'502557':{'en': 'Telgua'},
'502556':{'en': 'Telgua'},
'502559':{'en': 'Telgua'},
'502558':{'en': 'Telgua'},
'551498159':{'en': 'TIM'},
'551498158':{'en': 'TIM'},
'126458':{'en': 'Digicel'},
'126453':{'en': 'Weblinks Limited'},
'554899127':{'en': 'Vivo'},
'554199189':{'en': 'Vivo'},
'554199188':{'en': 'Vivo'},
'554199187':{'en': 'Vivo'},
'554199186':{'en': 'Vivo'},
'554199185':{'en': 'Vivo'},
'554199184':{'en': 'Vivo'},
'554199183':{'en': 'Vivo'},
'554199182':{'en': 'Vivo'},
'554199181':{'en': 'Vivo'},
'553899152':{'en': 'TIM'},
'554899124':{'en': 'Vivo'},
'45408':{'en': 'Telenor'},
'45409':{'en': 'Telenor'},
'554899125':{'en': 'Vivo'},
'55149980':{'en': 'Vivo'},
'554399127':{'en': 'Vivo'},
'507697':{'en': u('Telef\u00f3nica M\u00f3viles')},
'507693':{'en': u('Telef\u00f3nica M\u00f3viles')},
'507692':{'en': u('Telef\u00f3nica M\u00f3viles')},
'553199337':{'en': 'TIM'},
'553199336':{'en': 'TIM'},
'553199335':{'en': 'TIM'},
'553199334':{'en': 'TIM'},
'553199333':{'en': 'TIM'},
'553199332':{'en': 'TIM'},
'553199331':{'en': 'TIM'},
'554399124':{'en': 'Vivo'},
'554399123':{'en': 'Vivo'},
'554399122':{'en': 'Vivo'},
'551899729':{'en': 'Vivo'},
'551899728':{'en': 'Vivo'},
'55439880':{'en': 'Claro BR'},
'55199974':{'en': 'Vivo'},
'55199973':{'en': 'Vivo'},
'55199972':{'en': 'Vivo'},
'55199971':{'en': 'Vivo'},
'55199970':{'en': 'Vivo'},
'551899721':{'en': 'Vivo'},
'551899723':{'en': 'Vivo'},
'551899722':{'en': 'Vivo'},
'551899725':{'en': 'Vivo'},
'551899724':{'en': 'Vivo'},
'551899727':{'en': 'Vivo'},
'551899726':{'en': 'Vivo'},
'553199258':{'en': 'TIM'},
'553199259':{'en': 'TIM'},
'5519981':{'en': 'TIM'},
'554899931':{'en': 'TIM'},
'553199251':{'en': 'TIM'},
'553199252':{'en': 'TIM'},
'553199253':{'en': 'TIM'},
'553199254':{'en': 'TIM'},
'553199255':{'en': 'TIM'},
'553199256':{'en': 'TIM'},
'553199257':{'en': 'TIM'},
'457178':{'en': 'Telenor'},
'457179':{'en': 'Telenor'},
'457176':{'en': 'Telenor'},
'457177':{'en': 'TDC'},
'457175':{'en': 'Telenor'},
'457172':{'en': 'YouSee'},
'457173':{'en': 'CBB Mobil'},
'457170':{'en': 'YouSee'},
'457171':{'en': 'Maxtel.dk'},
'4479788':{'en': 'Truphone'},
'4479789':{'en': 'IV Response'},
'354618':{'en': 'Vodafone'},
'4479784':{'en': 'Cheers'},
'4479785':{'en': 'Icron Network'},
'4479786':{'en': 'Oxygen8'},
'4479787':{'en': 'TeleWare'},
'354613':{'en': 'Tal'},
'4479781':{'en': 'QX Telecom'},
'4479782':{'en': 'Cloud9'},
'4479783':{'en': 'Cloud9'},
'4476693':{'en': 'Confabulate'},
'514494991':{'en': 'Movistar'},
'4476691':{'en': 'O2'},
'4476690':{'en': 'O2'},
'1787257':{'en': 'Claro'},
'4476696':{'en': 'Cheers'},
'514494996':{'en': 'Movistar'},
'514494997':{'en': 'Movistar'},
'514494998':{'en': 'Movistar'},
'514494999':{'en': 'Movistar'},
'4476699':{'en': 'O2'},
'4476698':{'en': 'O2'},
'17673':{'en': 'Digicel'},
'43676':{'en': 'T-Mobile AT'},
'50370702':{'en': 'Movistar'},
'50370703':{'en': 'Claro'},
'551398808':{'en': 'Oi'},
'474114':{'en': 'NetCom'},
'554899181':{'en': 'Vivo'},
'474110':{'en': 'NetCom'},
'551398803':{'en': 'Oi'},
'551398806':{'en': 'Oi'},
'551398807':{'en': 'Oi'},
'551398804':{'en': 'Oi'},
'551398805':{'en': 'Oi'},
'50370700':{'en': 'Claro'},
'554899909':{'en': 'TIM'},
'5067005':{'en': 'Claro'},
'5067004':{'en': 'Claro'},
'5067007':{'en': 'Claro'},
'5067006':{'en': 'Claro'},
'5067003':{'en': 'Claro'},
'5067002':{'en': 'Claro'},
'5067009':{'en': 'Claro'},
'5067008':{'en': 'Claro'},
'553199928':{'en': 'Telemig Celular'},
'553199929':{'en': 'Telemig Celular'},
'553199922':{'en': 'Telemig Celular'},
'553199923':{'en': 'Telemig Celular'},
'553199921':{'en': 'Telemig Celular'},
'553199926':{'en': 'Telemig Celular'},
'553199927':{'en': 'Telemig Celular'},
'553199924':{'en': 'Telemig Celular'},
'47975':{'en': 'Telenor'},
'4477007':{'en': 'Sure'},
'50370746':{'en': 'Claro'},
'551599693':{'en': 'Vivo'},
'50370744':{'en': 'Claro'},
'50370745':{'en': 'Claro'},
'50370742':{'en': 'Claro'},
'50370743':{'en': 'Claro'},
'50370740':{'en': 'Claro'},
'50370741':{'en': 'Claro'},
'551599188':{'en': 'Claro BR'},
'50370707':{'en': 'Claro'},
'553399122':{'en': 'TIM'},
'5119809':{'en': 'Claro'},
'554599938':{'en': 'TIM'},
'554399144':{'en': 'Vivo'},
'554599939':{'en': 'TIM'},
'551698142':{'en': 'TIM'},
'554899186':{'en': 'Vivo'},
'554198427':{'en': 'Brasil Telecom GSM'},
'554399147':{'en': 'Vivo'},
'554198426':{'en': 'Brasil Telecom GSM'},
'554599932':{'en': 'TIM'},
'554198425':{'en': 'Brasil Telecom GSM'},
'554599933':{'en': 'TIM'},
'551799711':{'en': 'Vivo'},
'33653':{'en': 'Bouygues'},
'33650':{'en': 'Bouygues'},
'551799712':{'en': 'Vivo'},
'551799715':{'en': 'Vivo'},
'551799714':{'en': 'Vivo'},
'33654':{'en': 'Orange France'},
'33655':{'en': 'SFR'},
'551799719':{'en': 'Vivo'},
'551799718':{'en': 'Vivo'},
'33658':{'en': 'Bouygues'},
'37488':{'en': 'VivaCell-MTS', 'ru': u('\u0412\u0438\u0432\u0430\u0421\u0435\u043b\u043b-\u041c\u0422\u0421')},
'554198422':{'en': 'Brasil Telecom GSM'},
'554399146':{'en': 'Vivo'},
'554198421':{'en': 'Brasil Telecom GSM'},
'31658':{'en': 'Telfort'},
'31659':{'en': 'Vectone Mobile/Delight Mobile'},
'31650':{'en': 'Vodafone Libertel B.V.'},
'31651':{'en': 'KPN'},
'31652':{'en': 'Vodafone Libertel B.V.'},
'31653':{'en': 'KPN'},
'31654':{'en': 'Vodafone Libertel B.V.'},
'31655':{'en': 'Vodafone Libertel B.V.'},
'31656':{'en': 'T-Mobile'},
'31657':{'en': 'KPN'},
'551499149':{'en': 'Claro BR'},
'551499148':{'en': 'Claro BR'},
'47417':{'en': 'Telenor'},
'47416':{'en': 'Telenor'},
'47415':{'en': 'Telenor'},
'47414':{'en': 'Telenor'},
'47413':{'en': 'Tele2'},
'47412':{'en': 'Tele2'},
'551499147':{'en': 'Claro BR'},
'551499146':{'en': 'Claro BR'},
'515195199':{'en': 'Movistar'},
'515195198':{'en': 'Movistar'},
'515195195':{'en': 'Movistar'},
'515195194':{'en': 'Movistar'},
'515195197':{'en': 'Movistar'},
'515195196':{'en': 'Movistar'},
'515195191':{'en': 'Movistar'},
'515195190':{'en': 'Movistar'},
'515195193':{'en': 'Movistar'},
'551498813':{'en': 'Oi'},
'552298151':{'en': 'TIM'},
'554399143':{'en': 'Vivo'},
'26269388':{'en': 'Orange'},
'26269380':{'en': 'Only'},
'515395376':{'en': 'Claro'},
'515395375':{'en': 'Claro'},
'515395374':{'en': 'Claro'},
'515395373':{'en': 'Claro'},
'515395372':{'en': 'Claro'},
'515395371':{'en': 'Claro'},
'515395370':{'en': 'Claro'},
'518298260':{'en': 'Movistar'},
'518298261':{'en': 'Movistar'},
'551699721':{'en': 'Vivo'},
'554899132':{'en': 'Vivo'},
'551699727':{'en': 'Vivo'},
'551699726':{'en': 'Vivo'},
'551699725':{'en': 'Vivo'},
'551699724':{'en': 'Vivo'},
'518298268':{'en': 'Movistar'},
'551699729':{'en': 'Vivo'},
'551699728':{'en': 'Vivo'},
'383433':{'en': 'D3 Mobile'},
'383432':{'en': 'D3 Mobile'},
'383434':{'en': 'D3 Mobile'},
'34685':{'en': 'Orange'},
'3834715':{'en': 'mts d.o.o.'},
'3834714':{'en': 'mts d.o.o.'},
'3834713':{'en': 'mts d.o.o.'},
'3834712':{'en': 'mts d.o.o.'},
'3834711':{'en': 'mts d.o.o.'},
'3834710':{'en': 'mts d.o.o.'},
'34689':{'en': 'Movistar'},
'554198463':{'en': 'Brasil Telecom GSM'},
'554198462':{'en': 'Brasil Telecom GSM'},
'554198461':{'en': 'Brasil Telecom GSM'},
'3584552':{'en': 'Suomen Virveverkko'},
'554198467':{'en': 'Brasil Telecom GSM'},
'554198466':{'en': 'Brasil Telecom GSM'},
'554198465':{'en': 'Brasil Telecom GSM'},
'554198464':{'en': 'Brasil Telecom GSM'},
'479217':{'en': 'NetCom'},
'455253':{'en': 'CBB Mobil'},
'554198468':{'en': 'Brasil Telecom GSM'},
'3584554':{'en': 'Suomen Virveverkko'},
'479743':{'en': 'Telenor'},
'3584556':{'en': 'Liikennevirasto'},
'552299289':{'en': 'Claro BR'},
'552299288':{'en': 'Claro BR'},
'552299283':{'en': 'Claro BR'},
'552299282':{'en': 'Claro BR'},
'552299281':{'en': 'Claro BR'},
'552299287':{'en': 'Claro BR'},
'552299286':{'en': 'Claro BR'},
'552299285':{'en': 'Claro BR'},
'552299284':{'en': 'Claro BR'},
'4473800':{'en': 'AMSUK'},
'4475094':{'en': 'JT'},
'4475095':{'en': 'JT'},
'4475096':{'en': 'JT'},
'4475097':{'en': 'JT'},
'55119649':{'en': 'Vivo'},
'55119648':{'en': 'Vivo'},
'4475092':{'en': 'JT'},
'4475093':{'en': 'JT'},
'25078':{'en': 'MTN'},
'55119647':{'en': 'Vivo'},
'55119641':{'en': 'Vivo'},
'55119640':{'en': 'Vivo'},
'51649641':{'en': 'Claro'},
'51649640':{'en': 'Movistar'},
'51649643':{'en': 'Claro'},
'51649642':{'en': 'Claro'},
'51649645':{'en': 'Movistar'},
'51649644':{'en': 'Movistar'},
'51649647':{'en': 'Movistar'},
'51649646':{'en': 'Movistar'},
'51649648':{'en': 'Movistar'},
'553599941':{'en': 'Telemig Celular'},
'551698181':{'en': 'TIM'},
'551698182':{'en': 'TIM'},
'551698183':{'en': 'TIM'},
'551698184':{'en': 'TIM'},
'51769764':{'en': 'Movistar'},
'4475898':{'en': 'Test2date'},
'4475894':{'en': 'Vectone Mobile'},
'4475895':{'en': 'Vectone Mobile'},
'4475896':{'en': 'Vectone Mobile'},
'4475897':{'en': 'Vectone Mobile'},
'4475890':{'en': 'Yim Siam'},
'4475891':{'en': 'Oxygen8'},
'4475892':{'en': 'Oxygen8'},
'4475893':{'en': 'Oxygen8'},
'552799222':{'en': 'Claro BR'},
'552799223':{'en': 'Claro BR'},
'552799226':{'en': 'Claro BR'},
'552799227':{'en': 'Claro BR'},
'552799224':{'en': 'Claro BR'},
'552799225':{'en': 'Claro BR'},
'552799228':{'en': 'Claro BR'},
'552799229':{'en': 'Claro BR'},
'447754':{'en': 'O2'},
'37356':{'en': 'IDC'},
'552498145':{'en': 'TIM'},
'552498144':{'en': 'TIM'},
'552498141':{'en': 'TIM'},
'552498143':{'en': 'TIM'},
'552498142':{'en': 'TIM'},
'5534989':{'en': 'Oi'},
'5534988':{'en': 'Oi'},
'5534987':{'en': 'Oi'},
'5534986':{'en': 'Oi'},
'5534985':{'en': 'Oi'},
'346981':{'en': 'R'},
'346989':{'en': 'Eroski movil'},
'459320':{'en': 'Justfone'},
'554299152':{'en': 'Vivo'},
'336040':{'en': 'SFR'},
'336041':{'en': 'SFR'},
'336046':{'en': 'SFR'},
'336047':{'en': 'SFR'},
'336044':{'en': 'SFR'},
'51729728':{'en': 'Movistar'},
'336048':{'en': 'SFR'},
'336049':{'en': 'SFR'},
'551398125':{'en': 'TIM'},
'551398124':{'en': 'TIM'},
'551398127':{'en': 'TIM'},
'551398126':{'en': 'TIM'},
'551398121':{'en': 'TIM'},
'551398123':{'en': 'TIM'},
'551398122':{'en': 'TIM'},
'551398129':{'en': 'TIM'},
'551398128':{'en': 'TIM'},
'3506':{'en': 'Limba'},
'553199942':{'en': 'Telemig Celular'},
'553199268':{'en': 'TIM'},
'553199943':{'en': 'Telemig Celular'},
'479798':{'en': 'Telenor'},
'479799':{'en': 'Telenor'},
'5537988':{'en': 'Oi'},
'5537989':{'en': 'Oi'},
'5537986':{'en': 'Oi'},
'5537987':{'en': 'Oi'},
'5537985':{'en': 'Oi'},
'479796':{'en': 'Telenor'},
'479797':{'en': 'Telenor'},
'479795':{'en': 'Telenor'},
'33700003':{'en': 'Bouygues'},
'38651':{'en': 'Telekom Slovenije'},
'551798129':{'en': 'TIM'},
'551798128':{'en': 'TIM'},
'30690400':{'en': 'MI Carrier Services'},
'51519509':{'en': 'Movistar'},
'553799921':{'en': 'Telemig Celular'},
'553799922':{'en': 'Telemig Celular'},
'553799923':{'en': 'Telemig Celular'},
'551798121':{'en': 'TIM'},
'551798123':{'en': 'TIM'},
'551798122':{'en': 'TIM'},
'551798125':{'en': 'TIM'},
'551798124':{'en': 'TIM'},
'551798127':{'en': 'TIM'},
'33700002':{'en': 'Mobiquithings'},
'479425':{'en': 'Telenor'},
'552899923':{'en': 'Vivo'},
'5511999':{'en': 'Vivo'},
'5511998':{'en': 'Vivo'},
'479423':{'en': 'NetCom'},
'5511995':{'en': 'Vivo'},
'5511994':{'en': 'Claro BR'},
'5511997':{'en': 'Vivo'},
'5511996':{'en': 'Vivo'},
'5511991':{'en': 'Claro BR'},
'5511993':{'en': 'Claro BR'},
'5511992':{'en': 'Claro BR'},
'554499159':{'en': 'Vivo'},
'551999653':{'en': 'Vivo'},
'4475090':{'en': 'JT'},
'47996':{'en': 'Telenor'},
'47997':{'en': 'Telenor'},
'47994':{'en': 'Telenor'},
'47995':{'en': 'Telenor'},
'47992':{'en': 'Telenor'},
'47993':{'en': 'Telenor'},
'47990':{'en': 'Telenor'},
'554799971':{'en': 'TIM'},
'554799972':{'en': 'TIM'},
'554799973':{'en': 'TIM'},
'554799974':{'en': 'TIM'},
'554799975':{'en': 'TIM'},
'554799976':{'en': 'TIM'},
'554799977':{'en': 'TIM'},
'456146':{'en': 'Telia'},
'553899909':{'en': 'Telemig Celular'},
'553899908':{'en': 'Telemig Celular'},
'474773':{'en': 'Telenor'},
'474772':{'en': 'Telenor'},
'474771':{'en': 'Telenor'},
'474770':{'en': 'Telenor'},
'3519290':{'en': 'NOS'},
'474776':{'en': 'Telenor'},
'474775':{'en': 'Telenor'},
'474774':{'en': 'Telenor'},
'554899131':{'en': 'Vivo'},
'554899133':{'en': 'Vivo'},
'502579':{'en': 'Movistar'},
'551598814':{'en': 'Oi'},
'551598813':{'en': 'Oi'},
'551598810':{'en': 'Oi'},
'554899135':{'en': 'Vivo'},
'502571':{'en': 'Telgua'},
'554899134':{'en': 'Vivo'},
'554799608':{'en': 'TIM'},
'554799609':{'en': 'TIM'},
'554899137':{'en': 'Vivo'},
'554799602':{'en': 'TIM'},
'554799603':{'en': 'TIM'},
'554799601':{'en': 'TIM'},
'554799606':{'en': 'TIM'},
'554799607':{'en': 'TIM'},
'554799604':{'en': 'TIM'},
'554799605':{'en': 'TIM'},
'554899139':{'en': 'Vivo'},
'554899138':{'en': 'Vivo'},
'554399195':{'en': 'Vivo'},
'553199689':{'en': 'Telemig Celular'},
'553199688':{'en': 'Telemig Celular'},
'553199687':{'en': 'Telemig Celular'},
'553199686':{'en': 'Telemig Celular'},
'553199685':{'en': 'Telemig Celular'},
'553199684':{'en': 'Telemig Celular'},
'553199683':{'en': 'Telemig Celular'},
'553199682':{'en': 'Telemig Celular'},
'553199681':{'en': 'Telemig Celular'},
'50938':{'en': 'Digicel'},
'50939':{'en': 'Digicel'},
'50930':{'en': 'Digicel'},
'50931':{'en': 'Digicel'},
'50934':{'en': 'Digicel'},
'50936':{'en': 'Digicel'},
'50937':{'en': 'Digicel'},
'554299948':{'en': 'TIM'},
'223217':{'en': 'Sotelma'},
'1284499':{'en': 'CCT'},
'22669':{'en': 'Telecel Faso'},
'22668':{'en': 'Telecel Faso'},
'22665':{'en': 'Airtel'},
'22664':{'en': 'Airtel'},
'22667':{'en': 'Airtel'},
'22666':{'en': 'Airtel'},
'22661':{'en': 'Telmob'},
'22660':{'en': 'Telmob'},
'22663':{'en': 'Telmob'},
'22662':{'en': 'Telmob'},
'553199355':{'en': 'TIM'},
'553199354':{'en': 'TIM'},
'553199357':{'en': 'TIM'},
'553199356':{'en': 'TIM'},
'553199351':{'en': 'TIM'},
'553199353':{'en': 'TIM'},
'553199352':{'en': 'TIM'},
'1787666':{'en': 'SunCom Wireless Puerto Rico'},
'1787662':{'en': 'SunCom Wireless Puerto Rico'},
'553199358':{'en': 'TIM'},
'55169932':{'en': 'Claro BR'},
'554299946':{'en': 'TIM'},
'551899709':{'en': 'Vivo'},
'551899708':{'en': 'Vivo'},
'551899707':{'en': 'Vivo'},
'551899706':{'en': 'Vivo'},
'551899705':{'en': 'Vivo'},
'551899704':{'en': 'Vivo'},
'551899703':{'en': 'Vivo'},
'551899702':{'en': 'Vivo'},
'551899701':{'en': 'Vivo'},
'551999772':{'en': 'Vivo'},
'553199238':{'en': 'TIM'},
'553199239':{'en': 'TIM'},
'553199236':{'en': 'TIM'},
'553199237':{'en': 'TIM'},
'553199234':{'en': 'TIM'},
'553199235':{'en': 'TIM'},
'553199232':{'en': 'TIM'},
'553199233':{'en': 'TIM'},
'554899911':{'en': 'TIM'},
'553199231':{'en': 'TIM'},
'2318':{'en': 'Lonestar Cell'},
'2317':{'en': 'Cellcom'},
'2626934':{'en': 'Only'},
'553898427':{'en': 'Claro BR'},
'551196913':{'en': 'Vivo'},
'553898425':{'en': 'Claro BR'},
'553898424':{'en': 'Claro BR'},
'553898423':{'en': 'Claro BR'},
'553898422':{'en': 'Claro BR'},
'43699':{'en': 'Orange AT'},
'553898421':{'en': 'Claro BR'},
'551196918':{'en': 'Claro BR'},
'551398820':{'en': 'Oi'},
'30687500':{'en': 'BWS'},
'553898429':{'en': 'Claro BR'},
'3469388':{'en': 'Carrefour'},
'3469389':{'en': 'Orange'},
'3469382':{'en': 'MasMovil'},
'3469383':{'en': 'Carrefour'},
'3469380':{'en': 'MasMovil'},
'3469381':{'en': 'MasMovil'},
'3469386':{'en': 'MasMovil'},
'3469387':{'en': 'Carrefour'},
'3469384':{'en': 'Carrefour'},
'3469385':{'en': 'MasMovil'},
'49160':{'en': 'T-Mobile'},
'49163':{'en': 'Eplus'},
'49162':{'en': 'Vodafone'},
'552898116':{'en': 'TIM'},
'553199902':{'en': 'Telemig Celular'},
'553199903':{'en': 'Telemig Celular'},
'553199904':{'en': 'Telemig Celular'},
'553199393':{'en': 'TIM'},
'553199906':{'en': 'Telemig Celular'},
'552898117':{'en': 'TIM'},
'553199908':{'en': 'Telemig Celular'},
'553199909':{'en': 'Telemig Celular'},
'552499281':{'en': 'Claro BR'},
'5037805':{'en': 'Claro'},
'479741':{'en': 'Telenor'},
'5037806':{'en': 'Claro'},
'553499204':{'en': 'TIM'},
'5037807':{'en': 'Claro'},
'552898118':{'en': 'TIM'},
'551799737':{'en': 'Vivo'},
'551799736':{'en': 'Vivo'},
'551799735':{'en': 'Vivo'},
'551799734':{'en': 'Vivo'},
'551799733':{'en': 'Vivo'},
'551799732':{'en': 'Vivo'},
'551799731':{'en': 'Vivo'},
'26263975':{'en': 'Only'},
'26263974':{'en': 'Only'},
'479651':{'en': 'Telenor'},
'26263976':{'en': 'Orange'},
'26263971':{'en': 'Only'},
'26263970':{'en': 'BJT'},
'26263973':{'en': 'Only'},
'26263972':{'en': 'Only'},
'552899298':{'en': 'Claro BR'},
'552899291':{'en': 'Claro BR'},
'5037699':{'en': 'Movistar'},
'5037698':{'en': 'Digicel'},
'5037691':{'en': 'Movistar'},
'5037693':{'en': 'Movistar'},
'5037692':{'en': 'Movistar'},
'5037695':{'en': 'Digicel'},
'5037694':{'en': 'Movistar'},
'5037697':{'en': 'Digicel'},
'5037696':{'en': 'Digicel'},
'516396362':{'en': 'Movistar'},
'516396363':{'en': 'Movistar'},
'516396360':{'en': 'Movistar'},
'516396361':{'en': 'Movistar'},
'516396364':{'en': 'Movistar'},
'516396365':{'en': 'Movistar'},
'551499167':{'en': 'Claro BR'},
'551499166':{'en': 'Claro BR'},
'551499165':{'en': 'Claro BR'},
'516396369':{'en': 'Movistar'},
'551499163':{'en': 'Claro BR'},
'551499162':{'en': 'Claro BR'},
'551499161':{'en': 'Claro BR'},
'55119809':{'en': 'Oi'},
'55119808':{'en': 'Oi'},
'55119807':{'en': 'Oi'},
'55119806':{'en': 'Oi'},
'55119805':{'en': 'Oi'},
'55119804':{'en': 'Oi'},
'55119803':{'en': 'Oi'},
'552298133':{'en': 'TIM'},
'552298131':{'en': 'TIM'},
'511973':{'en': 'Claro'},
'554299981':{'en': 'TIM'},
'447626':{'en': 'O2'},
'447625':{'en': 'O2'},
'447624':{'en': 'Manx Telecom'},
'447623':{'en': 'PageOne'},
'554199137':{'en': 'Vivo'},
'553199837':{'en': 'Telemig Celular'},
'518398399':{'en': 'Movistar'},
'518398398':{'en': 'Movistar'},
'554199139':{'en': 'Vivo'},
'3364168':{'en': 'SFR'},
'3364169':{'en': 'SFR'},
'3364166':{'en': 'SFR'},
'3364167':{'en': 'SFR'},
'23275':{'en': 'Orange'},
'23277':{'en': 'Africell'},
'23276':{'en': 'Airtel'},
'549336':{'en': 'Personal'},
'549338':{'en': 'Personal'},
'23279':{'en': 'Airtel'},
'23278':{'en': 'Airtel'},
'552299261':{'en': 'Claro BR'},
'552299263':{'en': 'Claro BR'},
'552299262':{'en': 'Claro BR'},
'552299265':{'en': 'Claro BR'},
'552299264':{'en': 'Claro BR'},
'552299267':{'en': 'Claro BR'},
'552299266':{'en': 'Claro BR'},
'552299269':{'en': 'Claro BR'},
'552299268':{'en': 'Claro BR'},
'4474651':{'en': 'Vectone Mobile'},
'4474650':{'en': 'Vectone Mobile'},
'4474653':{'en': 'Compatel'},
'4474655':{'en': 'GlobalReach'},
'554399121':{'en': 'Vivo'},
'25729':{'en': 'Leo'},
'26269244':{'en': 'Orange'},
'554399126':{'en': 'Vivo'},
'26269242':{'en': 'Orange'},
'479620':{'en': 'Telenor'},
'552799201':{'en': 'Claro BR'},
'552799202':{'en': 'Claro BR'},
'552799203':{'en': 'Claro BR'},
'552799204':{'en': 'Claro BR'},
'552799205':{'en': 'Claro BR'},
'553599179':{'en': 'TIM'},
'551899632':{'en': 'Vivo'},
'2345481':{'en': 'Starcomms'},
'553599178':{'en': 'TIM'},
'551899634':{'en': 'Vivo'},
'45815':{'en': 'CBB Mobil'},
'48531':{'en': 'Play'},
'1787598':{'en': 'SunCom Wireless Puerto Rico'},
'306959':{'en': 'Vodafone'},
'306958':{'en': 'Vodafone'},
'306951':{'en': 'Vodafone'},
'306950':{'en': 'Vodafone'},
'306957':{'en': 'Vodafone'},
'1787595':{'en': 'SunCom Wireless Puerto Rico'},
'306955':{'en': 'Vodafone'},
'1787597':{'en': 'SunCom Wireless Puerto Rico'},
'44781':{'en': 'Orange'},
'44784':{'en': 'O2'},
'553499198':{'en': 'TIM'},
'336069':{'en': 'SFR'},
'553499194':{'en': 'TIM'},
'553499195':{'en': 'TIM'},
'553499196':{'en': 'TIM'},
'553499197':{'en': 'TIM'},
'553499191':{'en': 'TIM'},
'553499192':{'en': 'TIM'},
'553499193':{'en': 'TIM'},
'55329840':{'en': 'Claro BR'},
'553499825':{'en': 'Telemig Celular'},
'55329841':{'en': 'Claro BR'},
'2342873':{'en': 'Starcomms'},
'2342872':{'en': 'Starcomms'},
'2342871':{'en': 'Starcomms'},
'2342870':{'en': 'Starcomms'},
'2342877':{'en': 'Starcomms'},
'2342876':{'en': 'Starcomms'},
'2342875':{'en': 'Starcomms'},
'2342874':{'en': 'Starcomms'},
'38631':{'en': 'Telekom Slovenije'},
'38630':{'en': 'A1'},
'554898408':{'en': 'Brasil Telecom GSM'},
'554898409':{'en': 'Brasil Telecom GSM'},
'554898406':{'en': 'Brasil Telecom GSM'},
'3463529':{'en': 'MasMovil'},
'554898404':{'en': 'Brasil Telecom GSM'},
'554898405':{'en': 'Brasil Telecom GSM'},
'554898402':{'en': 'Brasil Telecom GSM'},
'554898403':{'en': 'Brasil Telecom GSM'},
'554898401':{'en': 'Brasil Telecom GSM'},
'27815':{'en': 'Telkom Mobile'},
'27814':{'en': 'Telkom Mobile'},
'27817':{'en': 'Telkom Mobile'},
'27816':{'en': 'WBS Mobile'},
'27811':{'en': 'Telkom Mobile'},
'27810':{'en': 'MTN'},
'27813':{'en': 'Telkom Mobile'},
'27812':{'en': 'Telkom Mobile'},
'27818':{'en': 'Vodacom'},
'1268788':{'en': 'Digicel'},
'1268785':{'en': 'Digicel'},
'1268781':{'en': 'APUA'},
'1268780':{'en': 'APUA'},
'1268783':{'en': 'Digicel'},
'29777':{'en': 'SETAR'},
'29774':{'en': 'Digicel'},
'40774':{'en': 'Digi Mobil'},
'40773':{'en': 'Digi Mobil'},
'29773':{'en': 'Digicel'},
'40771':{'en': 'Digi Mobil'},
'40770':{'en': 'Digi Mobil'},
'554799918':{'en': 'TIM'},
'554799919':{'en': 'TIM'},
'554799916':{'en': 'TIM'},
'554799917':{'en': 'TIM'},
'554799914':{'en': 'TIM'},
'554799915':{'en': 'TIM'},
'554799912':{'en': 'TIM'},
'1939440':{'en': 'CENTENNIAL'},
'554799911':{'en': 'TIM'},
'27608':{'en': 'Vodacom'},
'27609':{'en': 'Vodacom'},
'552299224':{'en': 'Claro BR'},
'27603':{'en': 'MTN'},
'27604':{'en': 'MTN'},
'27605':{'en': 'MTN'},
'27606':{'en': 'Vodacom'},
'27607':{'en': 'Vodacom'},
'5522999':{'en': 'Vivo'},
'5522998':{'en': 'Vivo'},
'552299221':{'en': 'Claro BR'},
'553598469':{'en': 'Claro BR'},
'554799621':{'en': 'TIM'},
'554799622':{'en': 'TIM'},
'554799623':{'en': 'TIM'},
'554598409':{'en': 'Brasil Telecom GSM'},
'554598408':{'en': 'Brasil Telecom GSM'},
'554799626':{'en': 'TIM'},
'554799627':{'en': 'TIM'},
'554598405':{'en': 'Brasil Telecom GSM'},
'554598404':{'en': 'Brasil Telecom GSM'},
'554598407':{'en': 'Brasil Telecom GSM'},
'554598406':{'en': 'Brasil Telecom GSM'},
'554598401':{'en': 'Brasil Telecom GSM'},
'554598403':{'en': 'Brasil Telecom GSM'},
'554598402':{'en': 'Brasil Telecom GSM'},
'553598467':{'en': 'Claro BR'},
'22399':{'en': 'Sotelma'},
'22398':{'en': 'Sotelma'},
'553199379':{'en': 'TIM'},
'553199378':{'en': 'TIM'},
'22391':{'en': 'Orange'},
'22390':{'en': 'Orange'},
'22393':{'en': 'Orange'},
'22392':{'en': 'Orange'},
'22395':{'en': 'Sotelma'},
'22394':{'en': 'Orange'},
'22397':{'en': 'Sotelma'},
'22396':{'en': 'Sotelma'},
'1787608':{'en': 'CENTENNIAL'},
'1787609':{'en': 'CENTENNIAL'},
'1787601':{'en': 'SunCom Wireless Puerto Rico'},
'1787602':{'en': 'CENTENNIAL'},
'1787604':{'en': 'SunCom Wireless Puerto Rico'},
'1787605':{'en': 'SunCom Wireless Puerto Rico'},
'1787607':{'en': 'CENTENNIAL'},
'551899765':{'en': 'Vivo'},
'551899764':{'en': 'Vivo'},
'491529':{'en': 'Vodafone/Truphone'},
'551899766':{'en': 'Vivo'},
'551899761':{'en': 'Vivo'},
'551899763':{'en': 'Vivo'},
'551899762':{'en': 'Vivo'},
'491523':{'en': 'Vodafone'},
'491522':{'en': 'Vodafone'},
'491521':{'en': 'Vodafone/Lycamobile'},
'491520':{'en': 'Vodafone'},
'491526':{'en': 'Vodafone'},
'491525':{'en': 'Vodafone'},
'553199214':{'en': 'TIM'},
'553199215':{'en': 'TIM'},
'553199216':{'en': 'TIM'},
'553199217':{'en': 'TIM'},
'554899971':{'en': 'TIM'},
'553199211':{'en': 'TIM'},
'551598129':{'en': 'TIM'},
'551598128':{'en': 'TIM'},
'551598127':{'en': 'TIM'},
'551598126':{'en': 'TIM'},
'551598125':{'en': 'TIM'},
'551598124':{'en': 'TIM'},
'551598123':{'en': 'TIM'},
'551598122':{'en': 'TIM'},
'551598121':{'en': 'TIM'},
'55249990':{'en': 'Vivo'},
'354651':{'en': 'IMC'},
'354650':{'en': 'IMC'},
'354655':{'en': 'Vodafone'},
'354659':{'en': 'Vodafone'},
'553499949':{'en': 'Telemig Celular'},
'553499948':{'en': 'Telemig Celular'},
'553499947':{'en': 'Telemig Celular'},
'553499946':{'en': 'Telemig Celular'},
'553499945':{'en': 'Telemig Celular'},
'553499944':{'en': 'Telemig Celular'},
'553499943':{'en': 'Telemig Celular'},
'553499942':{'en': 'Telemig Celular'},
'553499941':{'en': 'Telemig Celular'},
'516495443':{'en': 'Movistar'},
'516495442':{'en': 'Movistar'},
'516495441':{'en': 'Movistar'},
'516495440':{'en': 'Movistar'},
'516495447':{'en': 'Movistar'},
'516495446':{'en': 'Movistar'},
'516495445':{'en': 'Movistar'},
'516495444':{'en': 'Movistar'},
'516495448':{'en': 'Movistar'},
'553199316':{'en': 'TIM'},
'554899943':{'en': 'TIM'},
'551999655':{'en': 'Vivo'},
'50370708':{'en': 'Movistar'},
'50370709':{'en': 'Tigo'},
'45318':{'en': 'Lycamobile Denmark Ltd'},
'45319':{'en': 'Telenor'},
'45316':{'en': '3'},
'45317':{'en': '3'},
'45314':{'en': '3'},
'50370701':{'en': 'Tigo'},
'45312':{'en': '3'},
'45313':{'en': '3'},
'50370704':{'en': 'Claro'},
'45311':{'en': '3'},
'554299924':{'en': 'TIM'},
'479124':{'en': 'Telenor'},
'1758460':{'en': 'Cable & Wireless'},
'1758461':{'en': 'Cable & Wireless'},
'37377':{'en': 'IDC'},
'37376':{'en': 'Moldcell'},
'37379':{'en': 'Moldcell'},
'551799754':{'en': 'Vivo'},
'551799757':{'en': 'Vivo'},
'551799756':{'en': 'Vivo'},
'551799751':{'en': 'Vivo'},
'551799753':{'en': 'Vivo'},
'551799752':{'en': 'Vivo'},
'26263990':{'en': 'BJT'},
'26263997':{'en': 'Only'},
'26263996':{'en': 'Only'},
'26263995':{'en': 'Only'},
'13453':{'en': 'Digicel'},
'26263999':{'en': 'Orange'},
'554499171':{'en': 'Vivo'},
'4236626':{'en': 'Datamobile'},
'4236627':{'en': 'Datamobile'},
'4236620':{'en': 'First Mobile'},
'554499174':{'en': 'Vivo'},
'553299992':{'en': 'Telemig Celular'},
'553299993':{'en': 'Telemig Celular'},
'553299991':{'en': 'Telemig Celular'},
'4236628':{'en': 'Datamobile'},
'4236629':{'en': 'Datamobile'},
'553299994':{'en': 'Telemig Celular'},
'553299995':{'en': 'Telemig Celular'},
'552899902':{'en': 'Vivo'},
'552899903':{'en': 'Vivo'},
'552899901':{'en': 'Vivo'},
'552899904':{'en': 'Vivo'},
'552899905':{'en': 'Vivo'},
'551499105':{'en': 'Claro BR'},
'551499104':{'en': 'Claro BR'},
'551499107':{'en': 'Claro BR'},
'551499106':{'en': 'Claro BR'},
'551499101':{'en': 'Claro BR'},
'51197520':{'en': 'Movistar'},
'551499102':{'en': 'Claro BR'},
'551499109':{'en': 'Claro BR'},
'551499108':{'en': 'Claro BR'},
'553898401':{'en': 'Claro BR'},
'553299193':{'en': 'TIM'},
'553898403':{'en': 'Claro BR'},
'553898402':{'en': 'Claro BR'},
'553898405':{'en': 'Claro BR'},
'553299197':{'en': 'TIM'},
'553299194':{'en': 'TIM'},
'553299195':{'en': 'TIM'},
'553898409':{'en': 'Claro BR'},
'553898408':{'en': 'Claro BR'},
'553299198':{'en': 'TIM'},
'553299199':{'en': 'TIM'},
'552298114':{'en': 'TIM'},
'552298115':{'en': 'TIM'},
'552298116':{'en': 'TIM'},
'552298117':{'en': 'TIM'},
'447429':{'en': 'Three'},
'447428':{'en': 'Three'},
'447399':{'en': 'EE'},
'447398':{'en': 'EE'},
'447425':{'en': 'Vodafone'},
'447424':{'en': 'Lycamobile'},
'447427':{'en': 'Three'},
'447426':{'en': 'Three'},
'447421':{'en': 'Orange'},
'447420':{'en': 'Orange'},
'447423':{'en': 'Vodafone'},
'447422':{'en': 'Orange'},
'55389993':{'en': 'Telemig Celular'},
'552799245':{'en': 'Claro BR'},
'3468883':{'en': 'Sarenet'},
'12844689':{'en': 'CCT'},
'55389995':{'en': 'Telemig Celular'},
'55489998':{'en': 'TIM'},
'474638':{'en': 'Telenor'},
'474639':{'en': 'Telenor'},
'474636':{'en': 'Telenor'},
'474637':{'en': 'Telenor'},
'474634':{'en': 'Telenor'},
'474635':{'en': 'Telenor'},
'55489996':{'en': 'TIM'},
'552198403':{'en': 'Oi'},
'552198402':{'en': 'Oi'},
'552198401':{'en': 'Oi'},
'552198407':{'en': 'Oi'},
'552198406':{'en': 'Oi'},
'552198405':{'en': 'Oi'},
'552198404':{'en': 'Oi'},
'552198409':{'en': 'Oi'},
'552198408':{'en': 'Oi'},
'51419419':{'en': 'Movistar'},
'35269':{'en': 'Tango'},
'35262':{'en': 'POST'},
'35266':{'en': 'Orange'},
'1939630':{'en': 'CENTENNIAL'},
'23250':{'en': 'Datatel/Cellcom'},
'23255':{'en': 'AFCOM'},
'549352':{'en': 'Personal'},
'549353':{'en': 'Personal'},
'1939639':{'en': 'CENTENNIAL'},
'549356':{'en': 'Personal'},
'549357':{'en': 'Personal'},
'549354':{'en': 'Personal'},
'552299247':{'en': 'Claro BR'},
'552299246':{'en': 'Claro BR'},
'552299245':{'en': 'Claro BR'},
'552299244':{'en': 'Claro BR'},
'552299243':{'en': 'Claro BR'},
'552299242':{'en': 'Claro BR'},
'552299241':{'en': 'Claro BR'},
'552299249':{'en': 'Claro BR'},
'552299248':{'en': 'Claro BR'},
'447436':{'en': 'Vodafone'},
'554598827':{'en': 'Claro BR'},
'554598826':{'en': 'Claro BR'},
'5541988':{'en': 'Claro BR'},
'554598823':{'en': 'Claro BR'},
'515295271':{'en': 'Claro'},
'2346582':{'en': 'Starcomms'},
'2346581':{'en': 'Starcomms'},
'2346580':{'en': 'Starcomms'},
'551898142':{'en': 'TIM'},
'554199804':{'en': 'TIM'},
'554199802':{'en': 'TIM'},
'554199803':{'en': 'TIM'},
'554199800':{'en': 'TIM'},
'551898143':{'en': 'TIM'},
'551898141':{'en': 'TIM'},
'55139920':{'en': 'Claro BR'},
'551898147':{'en': 'TIM'},
'230528':{'en': 'MTML'},
'45202':{'en': 'TDC'},
'552799268':{'en': 'Claro BR'},
'552799269':{'en': 'Claro BR'},
'552799266':{'en': 'Claro BR'},
'552799267':{'en': 'Claro BR'},
'552799264':{'en': 'Claro BR'},
'551898145':{'en': 'TIM'},
'552799262':{'en': 'Claro BR'},
'552799263':{'en': 'Claro BR'},
'552799261':{'en': 'Claro BR'},
'55449880':{'en': 'Claro BR'},
'551898149':{'en': 'TIM'},
'551196650':{'en': 'Claro BR'},
'55119685':{'en': 'Vivo'},
'55119684':{'en': 'Vivo'},
'436779':{'en': 'T-Mobile AT'},
'423651':{'en': 'Cubic'},
'423652':{'en': 'Cubic'},
'436771':{'en': 'T-Mobile AT'},
'436770':{'en': 'T-Mobile AT'},
'436772':{'en': 'T-Mobile AT'},
'45411':{'en': 'Telenor'},
'4476242':{'en': 'Sure'},
'45412':{'en': 'Telenor'},
'45415':{'en': 'Telenor'},
'45414':{'en': 'Telenor'},
'45417':{'en': 'Telenor'},
'45416':{'en': 'Telenor'},
'45419':{'en': 'Telenor'},
'45418':{'en': 'Telenor'},
'346944':{'en': 'MasMovil'},
'1242375':{'en': 'BaTelCo'},
'1242376':{'en': 'BaTelCo'},
'551599151':{'en': 'Claro BR'},
'554399113':{'en': 'Vivo'},
'551599153':{'en': 'Claro BR'},
'551599152':{'en': 'Claro BR'},
'551599155':{'en': 'Claro BR'},
'551599154':{'en': 'Claro BR'},
'551599157':{'en': 'Claro BR'},
'551599156':{'en': 'Claro BR'},
'551599159':{'en': 'Claro BR'},
'551599158':{'en': 'Claro BR'},
'554399118':{'en': 'Vivo'},
'554399119':{'en': 'Vivo'},
'551899759':{'en': 'Vivo'},
'552798131':{'en': 'TIM'},
'552798133':{'en': 'TIM'},
'552798132':{'en': 'TIM'},
'552798135':{'en': 'TIM'},
'552798134':{'en': 'TIM'},
'552798137':{'en': 'TIM'},
'552798136':{'en': 'TIM'},
'552798139':{'en': 'TIM'},
'552798138':{'en': 'TIM'},
'554599911':{'en': 'TIM'},
'551899756':{'en': 'Vivo'},
'551899757':{'en': 'Vivo'},
'459189':{'en': 'Uni-tel'},
'55219734':{'en': 'Claro BR'},
'55219735':{'en': 'Claro BR'},
'455189':{'en': 'Telia'},
'455188':{'en': 'Telia'},
'30685555':{'en': 'Cyta'},
'553599168':{'en': 'TIM'},
'30685550':{'en': 'Cyta'},
'554898424':{'en': 'Brasil Telecom GSM'},
'554898425':{'en': 'Brasil Telecom GSM'},
'554898426':{'en': 'Brasil Telecom GSM'},
'553599169':{'en': 'TIM'},
'554898421':{'en': 'Brasil Telecom GSM'},
'554898422':{'en': 'Brasil Telecom GSM'},
'554898423':{'en': 'Brasil Telecom GSM'},
'554898428':{'en': 'Brasil Telecom GSM'},
'554898429':{'en': 'Brasil Telecom GSM'},
'553599163':{'en': 'TIM'},
'553599161':{'en': 'TIM'},
'346230':{'en': 'Yoigo'},
'346231':{'en': 'Yoigo'},
'553599166':{'en': 'TIM'},
'551498138':{'en': 'TIM'},
'553599167':{'en': 'TIM'},
'553599164':{'en': 'TIM'},
'29756':{'en': 'SETAR'},
'29759':{'en': 'SETAR'},
'551498131':{'en': 'TIM'},
'346927':{'en': 'Carrefour'},
'554799934':{'en': 'TIM'},
'503776':{'en': 'Digicel'},
'554799936':{'en': 'TIM'},
'554799937':{'en': 'TIM'},
'554799931':{'en': 'TIM'},
'554799932':{'en': 'TIM'},
'503777':{'en': 'Digicel'},
'554799938':{'en': 'TIM'},
'554799939':{'en': 'TIM'},
'25884':{'en': 'Vodacom'},
'25885':{'en': 'Vodacom'},
'25886':{'en': 'Movitel'},
'25887':{'en': 'Movitel'},
'25882':{'en': 'mcel'},
'25883':{'en': 'mcel'},
'4474408':{'en': 'Telecoms Cloud'},
'4474409':{'en': 'Cloud9'},
'1242359':{'en': 'BaTelCo'},
'518497438':{'en': 'Claro'},
'518497439':{'en': 'Claro'},
'518497436':{'en': 'Claro'},
'518497437':{'en': 'Claro'},
'518497435':{'en': 'Claro'},
'518497430':{'en': 'Claro'},
'518497431':{'en': 'Claro'},
'554199121':{'en': 'Vivo'},
'554399138':{'en': 'Vivo'},
'554199123':{'en': 'Vivo'},
'554199122':{'en': 'Vivo'},
'554199125':{'en': 'Vivo'},
'554199124':{'en': 'Vivo'},
'554199127':{'en': 'Vivo'},
'554199126':{'en': 'Vivo'},
'554199129':{'en': 'Vivo'},
'554199128':{'en': 'Vivo'},
'554599919':{'en': 'TIM'},
'3460529':{'en': 'MasMovil'},
'554399132':{'en': 'Vivo'},
'552198368':{'en': 'TIM'},
'552198369':{'en': 'TIM'},
'552198362':{'en': 'TIM'},
'552198363':{'en': 'TIM'},
'552198361':{'en': 'TIM'},
'552198366':{'en': 'TIM'},
'552198367':{'en': 'TIM'},
'552198364':{'en': 'TIM'},
'552198365':{'en': 'TIM'},
'1787622':{'en': 'CENTENNIAL'},
'1787623':{'en': 'CENTENNIAL'},
'1787620':{'en': 'CENTENNIAL'},
'1787621':{'en': 'CENTENNIAL'},
'1787626':{'en': 'CENTENNIAL'},
'553199394':{'en': 'TIM'},
'1787624':{'en': 'CENTENNIAL'},
'1787625':{'en': 'CENTENNIAL'},
'553199399':{'en': 'TIM'},
'553199398':{'en': 'TIM'},
'1787628':{'en': 'CENTENNIAL'},
'1787629':{'en': 'SunCom Wireless Puerto Rico'},
'50688':{'en': 'Kolbi ICE'},
'50689':{'en': 'Kolbi ICE'},
'4475205':{'en': 'Esendex'},
'4475204':{'en': 'Core Communication'},
'4475207':{'en': 'aql'},
'4475206':{'en': 'Tismi'},
'4475201':{'en': 'BT OnePhone'},
'4475200':{'en': 'Simwood'},
'554599976':{'en': 'TIM'},
'4475202':{'en': 'Vectone Mobile'},
'4477530':{'en': 'Airwave'},
'551599174':{'en': 'Claro BR'},
'553199201':{'en': 'TIM'},
'553499807':{'en': 'Telemig Celular'},
'3465829':{'en': 'DIA'},
'554899959':{'en': 'TIM'},
'554899958':{'en': 'TIM'},
'554899953':{'en': 'TIM'},
'554899952':{'en': 'TIM'},
'554899951':{'en': 'TIM'},
'554899957':{'en': 'TIM'},
'554899956':{'en': 'TIM'},
'554899955':{'en': 'TIM'},
'554899954':{'en': 'TIM'},
'35677':{'en': 'Melita Mobile'},
'35672':{'en': 'GO Mobile'},
'554399611':{'en': 'TIM'},
'554399610':{'en': 'TIM'},
'35679':{'en': 'GO Mobile'},
'370695':{'en': 'Omnitel'},
'370694':{'en': 'Omnitel'},
'370697':{'en': 'Omnitel'},
'370696':{'en': 'Omnitel'},
'370690':{'en': u('BIT\u0116')},
'370693':{'en': 'Omnitel'},
'370692':{'en': 'Omnitel'},
'486666':{'en': 'Play'},
'370699':{'en': u('BIT\u0116')},
'370698':{'en': 'Omnitel'},
'553499925':{'en': 'Telemig Celular'},
'553499924':{'en': 'Telemig Celular'},
'553499927':{'en': 'Telemig Celular'},
'553499926':{'en': 'Telemig Celular'},
'553499921':{'en': 'Telemig Celular'},
'553499923':{'en': 'Telemig Celular'},
'553499922':{'en': 'Telemig Celular'},
'551599178':{'en': 'Claro BR'},
'553499929':{'en': 'Telemig Celular'},
'553499928':{'en': 'Telemig Celular'},
'554598811':{'en': 'Claro BR'},
'187648':{'en': 'Digicel'},
'128436':{'en': 'Digicel'},
'128434':{'en': 'Digicel'},
'128439':{'en': 'Digicel'},
'551899749':{'en': 'Vivo'},
'551899748':{'en': 'Vivo'},
'551899743':{'en': 'Vivo'},
'50249':{'en': 'Tigo'},
'551899741':{'en': 'Vivo'},
'551899747':{'en': 'Vivo'},
'551899746':{'en': 'Vivo'},
'551899745':{'en': 'Vivo'},
'551899744':{'en': 'Vivo'},
'124245':{'en': 'BaTelCo'},
'124244':{'en': 'BaTelCo'},
'124247':{'en': 'BaTelCo'},
'124243':{'en': 'BaTelCo'},
'124242':{'en': 'BaTelCo'},
'553599171':{'en': 'TIM'},
'553599173':{'en': 'TIM'},
'553599172':{'en': 'TIM'},
'553599175':{'en': 'TIM'},
'124248':{'en': 'BaTelCo'},
'553599177':{'en': 'TIM'},
'553599176':{'en': 'TIM'},
'2626395':{'en': 'BJT'},
'2626394':{'en': 'SFR'},
'25578':{'en': 'Airtel'},
'2626392':{'en': 'SFR'},
'25574':{'en': 'Vodacom'},
'25575':{'en': 'Vodacom'},
'25576':{'en': 'Vodacom'},
'25577':{'en': 'Zantel'},
'25571':{'en': 'tiGO'},
'25573':{'en': 'Tanzania Telecom'},
'554599978':{'en': 'TIM'},
'1939329':{'en': 'CENTENNIAL'},
'1939325':{'en': 'SunCom Wireless Puerto Rico'},
'552798114':{'en': 'TIM'},
'458111':{'en': 'Evercall'},
'458110':{'en': 'ipvision'},
'554599979':{'en': 'TIM'},
'4473699':{'en': 'Anywhere Sim'},
'554198431':{'en': 'Brasil Telecom GSM'},
'554198434':{'en': 'Brasil Telecom GSM'},
'554198435':{'en': 'Brasil Telecom GSM'},
'554198436':{'en': 'Brasil Telecom GSM'},
'554198437':{'en': 'Brasil Telecom GSM'},
'551799773':{'en': 'Vivo'},
'551799772':{'en': 'Vivo'},
'551799771':{'en': 'Vivo'},
'551799777':{'en': 'Vivo'},
'551799776':{'en': 'Vivo'},
'551799775':{'en': 'Vivo'},
'551799774':{'en': 'Vivo'},
'30695400':{'en': 'AMD Telecom'},
'551799779':{'en': 'Vivo'},
'551799778':{'en': 'Vivo'},
'50243':{'en': 'Movistar'},
'1787367':{'en': 'SunCom Wireless Puerto Rico'},
'553199948':{'en': 'Telemig Celular'},
'553199949':{'en': 'Telemig Celular'},
'553199944':{'en': 'Telemig Celular'},
'553199945':{'en': 'Telemig Celular'},
'553199946':{'en': 'Telemig Celular'},
'553199947':{'en': 'Telemig Celular'},
'553199941':{'en': 'Telemig Celular'},
'1787369':{'en': 'CENTENNIAL'},
'1787368':{'en': 'SunCom Wireless Puerto Rico'},
'554499157':{'en': 'Vivo'},
'554499156':{'en': 'Vivo'},
'554499155':{'en': 'Vivo'},
'554499154':{'en': 'Vivo'},
'554499153':{'en': 'Vivo'},
'554499152':{'en': 'Vivo'},
'554499151':{'en': 'Vivo'},
'552899921':{'en': 'Vivo'},
'552899922':{'en': 'Vivo'},
'50240':{'en': 'Tigo'},
'552899924':{'en': 'Vivo'},
'552899925':{'en': 'Vivo'},
'552899926':{'en': 'Vivo'},
'554499158':{'en': 'Vivo'},
'551499129':{'en': 'Claro BR'},
'551499128':{'en': 'Claro BR'},
'551499123':{'en': 'Claro BR'},
'551499122':{'en': 'Claro BR'},
'551499121':{'en': 'Claro BR'},
'551499127':{'en': 'Claro BR'},
'551499126':{'en': 'Claro BR'},
'551499125':{'en': 'Claro BR'},
'551499124':{'en': 'Claro BR'},
'51569569':{'en': 'Movistar'},
'51569568':{'en': 'Movistar'},
'51569563':{'en': 'Claro'},
'51569560':{'en': 'Movistar'},
'51569567':{'en': 'Claro'},
'51569566':{'en': 'Movistar'},
'51569565':{'en': 'Movistar'},
'51569564':{'en': 'Movistar'},
'447407':{'en': 'Vodafone'},
'553898426':{'en': 'Claro BR'},
'447405':{'en': 'Lycamobile'},
'447404':{'en': 'Lycamobile'},
'447403':{'en': 'Three'},
'447402':{'en': 'Three'},
'447401':{'en': 'Three'},
'447400':{'en': 'Three'},
'447409':{'en': 'Orange'},
'553898428':{'en': 'Claro BR'},
'1671868':{'en': 'Choice Phone'},
'1671864':{'en': 'GTA'},
'553199168':{'en': 'TIM'},
'553199311':{'en': 'TIM'},
'553199313':{'en': 'TIM'},
'447661':{'en': 'PageOne'},
'553199312':{'en': 'TIM'},
'553199169':{'en': 'TIM'},
'447666':{'en': 'Vodafone'},
'551499168':{'en': 'Claro BR'},
'50850':{'en': 'Keyyo'},
'50855':{'en': 'SPM Telecom'},
'553199317':{'en': 'TIM'},
'549113':{'en': 'Personal'},
'549114':{'en': 'Personal'},
'549115':{'en': 'Personal'},
'549116':{'en': 'Personal'},
'2345487':{'en': 'Starcomms'},
'2345486':{'en': 'Starcomms'},
'2345485':{'en': 'Starcomms'},
'2345484':{'en': 'Starcomms'},
'2345483':{'en': 'Starcomms'},
'2345482':{'en': 'Starcomms'},
'516696600':{'en': 'Movistar'},
'2345480':{'en': 'Starcomms'},
'549374':{'en': 'Personal'},
'549375':{'en': 'Personal'},
'549376':{'en': 'Personal'},
'549377':{'en': 'Personal'},
'549370':{'en': 'Personal'},
'549371':{'en': 'Personal'},
'549372':{'en': 'Personal'},
'549373':{'en': 'Personal'},
'549378':{'en': 'Personal'},
'549379':{'en': 'Personal'},
'2343881':{'en': 'Starcomms'},
'2343880':{'en': 'Starcomms'},
'2343883':{'en': 'Starcomms'},
'2343882':{'en': 'Starcomms'},
'2343885':{'en': 'Starcomms'},
'2343884':{'en': 'Starcomms'},
'2343887':{'en': 'Starcomms'},
'2343886':{'en': 'Starcomms'},
'23231':{'en': 'QCELL'},
'23230':{'en': 'Africell'},
'23233':{'en': 'Comium'},
'552299226':{'en': 'Claro BR'},
'23235':{'en': 'IPTEL'},
'23234':{'en': 'QCELL'},
'552299223':{'en': 'Claro BR'},
'552299222':{'en': 'Claro BR'},
'553799154':{'en': 'TIM'},
'554699122':{'en': 'Vivo'},
'50254':{'en': 'Telgua'},
'553199165':{'en': 'TIM'},
'50257':{'en': 'Tigo'},
'5513997':{'en': 'Vivo'},
'50256':{'en': 'Movistar'},
'5513991':{'en': 'Claro BR'},
'515295253':{'en': 'Movistar'},
'515295252':{'en': 'Movistar'},
'515295251':{'en': 'Movistar'},
'515295250':{'en': 'Movistar'},
'515295254':{'en': 'Movistar'},
'553199162':{'en': 'TIM'},
'30691400':{'en': 'AMD Telecom'},
'552799244':{'en': 'Claro BR'},
'551799764':{'en': 'Vivo'},
'552799246':{'en': 'Claro BR'},
'552799247':{'en': 'Claro BR'},
'552799241':{'en': 'Claro BR'},
'552799242':{'en': 'Claro BR'},
'552799243':{'en': 'Claro BR'},
'552799248':{'en': 'Claro BR'},
'551799766':{'en': 'Vivo'},
'551799767':{'en': 'Vivo'},
'554799922':{'en': 'TIM'},
'551799763':{'en': 'Vivo'},
'354757':{'en': 'Vodafone'},
'354755':{'en': u('S\u00edminn')},
'354750':{'en': u('S\u00edminn')},
'551798142':{'en': 'TIM'},
'372590':{'en': 'EMT'},
'21642':{'en': 'Tunisie Telecom'},
'21643':{'en': 'Lyca Mobile'},
'21640':{'en': 'Tunisie Telecom'},
'21641':{'en': 'Tunisie Telecom'},
'21646':{'en': 'Ooredoo'},
'21644':{'en': 'Tunisie Telecom'},
'21645':{'en': 'Watany Ettisalat'},
'551799768':{'en': 'Vivo'},
'551799769':{'en': 'Vivo'},
'1242357':{'en': 'BaTelCo'},
'24105':{'en': 'Moov'},
'551196183':{'en': 'Vivo'},
'551196182':{'en': 'Vivo'},
'551196181':{'en': 'Claro BR'},
'551196180':{'en': 'Claro BR'},
'551196187':{'en': 'Vivo'},
'551196186':{'en': 'Vivo'},
'551196185':{'en': 'Vivo'},
'551196184':{'en': 'Vivo'},
'554399131':{'en': 'Vivo'},
'551196189':{'en': 'Vivo'},
'551196188':{'en': 'Vivo'},
'2529':{'en': 'STG'},
'1787551':{'en': 'CENTENNIAL'},
'554399136':{'en': 'Vivo'},
'1787553':{'en': 'Claro'},
'551599177':{'en': 'Claro BR'},
'551599176':{'en': 'Claro BR'},
'447988':{'en': 'Three'},
'447989':{'en': 'Orange'},
'551599173':{'en': 'Claro BR'},
'551599172':{'en': 'Claro BR'},
'551599171':{'en': 'Claro BR'},
'447980':{'en': 'Orange'},
'551599179':{'en': 'Claro BR'},
'1787371':{'en': 'Claro'},
'553199272':{'en': 'TIM'},
'5066':{'en': 'Movistar'},
'1787372':{'en': 'Claro'},
'553199273':{'en': 'TIM'},
'2347029':{'en': 'Starcomms'},
'552798117':{'en': 'TIM'},
'552798116':{'en': 'TIM'},
'552798115':{'en': 'TIM'},
'2347028':{'en': 'Starcomms'},
'552798113':{'en': 'TIM'},
'552798112':{'en': 'TIM'},
'552798111':{'en': 'TIM'},
'553199276':{'en': 'TIM'},
'474055':{'en': 'NetCom'},
'552798119':{'en': 'TIM'},
'552798118':{'en': 'TIM'},
'553199274':{'en': 'TIM'},
'2348422':{'en': 'Starcomms'},
'2348421':{'en': 'Starcomms'},
'346036':{'en': 'Vodafone'},
'45618':{'en': 'Telenor'},
'553199278':{'en': 'TIM'},
'511990':{'en': 'Movistar'},
'553199279':{'en': 'TIM'},
'457198':{'en': 'Mundio Mobile'},
'554799924':{'en': 'TIM'},
'1787908':{'en': 'CENTENNIAL'},
'554498413':{'en': 'Brasil Telecom GSM'},
'2347026':{'en': 'Visafone'},
'553798406':{'en': 'Claro BR'},
'48669':{'en': 'Plus'},
'48668':{'en': 'T-Mobile'},
'551299632':{'en': 'Vivo'},
'48665':{'en': 'Plus'},
'48664':{'en': 'T-Mobile'},
'48667':{'en': 'Plus'},
'48661':{'en': 'Plus'},
'48660':{'en': 'T-Mobile'},
'48663':{'en': 'Plus'},
'48662':{'en': 'T-Mobile'},
'551798149':{'en': 'TIM'},
'551798148':{'en': 'TIM'},
'551798143':{'en': 'TIM'},
'551196860':{'en': 'Vivo'},
'551798141':{'en': 'TIM'},
'551798147':{'en': 'TIM'},
'551798146':{'en': 'TIM'},
'551798145':{'en': 'TIM'},
'551798144':{'en': 'TIM'},
'552899955':{'en': 'Vivo'},
'551196862':{'en': 'Vivo'},
'552899954':{'en': 'Vivo'},
'44747':{'en': 'Three'},
'554498411':{'en': 'Brasil Telecom GSM'},
'346212':{'en': 'Ion mobile'},
'552899956':{'en': 'Vivo'},
'554498415':{'en': 'Brasil Telecom GSM'},
'554498414':{'en': 'Brasil Telecom GSM'},
'554498417':{'en': 'Brasil Telecom GSM'},
'554498416':{'en': 'Brasil Telecom GSM'},
'554498419':{'en': 'Brasil Telecom GSM'},
'552899951':{'en': 'Vivo'},
'553499209':{'en': 'TIM'},
'552899953':{'en': 'Vivo'},
'2348288':{'en': 'Starcomms'},
'2348286':{'en': 'Starcomms'},
'2348287':{'en': 'Starcomms'},
'2348284':{'en': 'Starcomms'},
'2348285':{'en': 'Starcomms'},
'2348283':{'en': 'Starcomms'},
'2356':{'en': 'Airtel'},
'2357':{'en': 'Sotel'},
'3584546':{'en': 'NextGen Mobile / CardBoardFish'},
'3584547':{'en': 'SMS Provider Corp'},
'3584544':{'en': 'Nokia'},
'3584545':{'en': 'Interactive Digital Media'},
'3584542':{'en': 'Nokia'},
'3584543':{'en': 'Nokia'},
'3584540':{'en': 'MobiWeb'},
'3584541':{'en': 'AinaCom'},
'3584548':{'en': 'Voxbone'},
'3584549':{'en': 'Beepsend'},
'554899122':{'en': 'Vivo'},
'479210':{'en': 'NetCom'},
'554798433':{'en': 'Brasil Telecom GSM'},
'407020':{'en': 'Lycamobile'},
'554798431':{'en': 'Brasil Telecom GSM'},
'551799232':{'en': 'Claro BR'},
'551799233':{'en': 'Claro BR'},
'551799230':{'en': 'Claro BR'},
'551799231':{'en': 'Claro BR'},
'551799236':{'en': 'Claro BR'},
'551799234':{'en': 'Claro BR'},
'551799235':{'en': 'Claro BR'},
'554798434':{'en': 'Brasil Telecom GSM'},
'554798435':{'en': 'Brasil Telecom GSM'},
'553199621':{'en': 'Telemig Celular'},
'553199622':{'en': 'Telemig Celular'},
'553199625':{'en': 'Telemig Celular'},
'553199624':{'en': 'Telemig Celular'},
'553199627':{'en': 'Telemig Celular'},
'553199626':{'en': 'Telemig Celular'},
'553199629':{'en': 'Telemig Celular'},
'553199628':{'en': 'Telemig Celular'},
'554899128':{'en': 'Vivo'},
'1784454':{'en': 'Cable & Wireless'},
'1784455':{'en': 'Cable & Wireless'},
'554899129':{'en': 'Vivo'},
'552198341':{'en': 'TIM'},
'552198342':{'en': 'TIM'},
'552198343':{'en': 'TIM'},
'552198344':{'en': 'TIM'},
'552198345':{'en': 'TIM'},
'552198346':{'en': 'TIM'},
'552198347':{'en': 'TIM'},
'552198348':{'en': 'TIM'},
'552198349':{'en': 'TIM'},
'551998206':{'en': 'TIM'},
'551998207':{'en': 'TIM'},
'551998204':{'en': 'TIM'},
'551998205':{'en': 'TIM'},
'551998202':{'en': 'TIM'},
'551998203':{'en': 'TIM'},
'551998201':{'en': 'TIM'},
'551998208':{'en': 'TIM'},
'551998209':{'en': 'TIM'},
'4477553':{'en': 'Core Communication'},
'4477552':{'en': 'Core Communication'},
'4477555':{'en': 'Core Communication'},
'4477554':{'en': 'Core Communication'},
'551999761':{'en': 'Vivo'},
'4790':{'en': 'Telenor'},
'1939777':{'en': 'Claro'},
'553499909':{'en': 'Telemig Celular'},
'553499908':{'en': 'Telemig Celular'},
'553198245':{'en': 'Claro BR'},
'553499903':{'en': 'Telemig Celular'},
'553499902':{'en': 'Telemig Celular'},
'553499901':{'en': 'Telemig Celular'},
'553499907':{'en': 'Telemig Celular'},
'553499906':{'en': 'Telemig Celular'},
'553499905':{'en': 'Telemig Celular'},
'553499904':{'en': 'Telemig Celular'},
'30692428':{'en': 'Premium Net International'},
'554199262':{'en': 'Vivo'},
'554199261':{'en': 'Vivo'},
'554199266':{'en': 'Vivo'},
'554199264':{'en': 'Vivo'},
'554199265':{'en': 'Vivo'},
'553599159':{'en': 'TIM'},
'553599158':{'en': 'TIM'},
'553599157':{'en': 'TIM'},
'553599156':{'en': 'TIM'},
'553599155':{'en': 'TIM'},
'553599154':{'en': 'TIM'},
'124263':{'en': 'BaTelCo'},
'553599152':{'en': 'TIM'},
'553599151':{'en': 'TIM'},
'1939307':{'en': 'CENTENNIAL'},
'551197979':{'en': 'Oi'},
'551197978':{'en': 'Oi'},
'551197975':{'en': 'Oi'},
'454280':{'en': 'BiBoB'},
'454283':{'en': '3'},
'454282':{'en': 'Telia'},
'551197971':{'en': 'Oi'},
'551197970':{'en': 'Claro BR'},
'551197973':{'en': 'Oi'},
'454286':{'en': 'Telia'},
'458136':{'en': 'CBB Mobil'},
'458135':{'en': 'CBB Mobil'},
'458134':{'en': 'CBB Mobil'},
'458133':{'en': 'CBB Mobil'},
'458132':{'en': 'CBB Mobil'},
'458131':{'en': 'CBB Mobil'},
'458130':{'en': 'CBB Mobil'},
'553399116':{'en': 'TIM'},
'554699939':{'en': 'TIM'},
'458139':{'en': 'Mundio Mobile'},
'458138':{'en': 'Mundio Mobile'},
'553399119':{'en': 'TIM'},
'553399118':{'en': 'TIM'},
'2778':{'en': 'MTN'},
'2779':{'en': 'Vodacom'},
'2771':{'en': 'Vodacom'},
'2772':{'en': 'Vodacom'},
'2773':{'en': 'MTN'},
'2774':{'en': 'Cell C'},
'2776':{'en': 'Vodacom'},
'552499296':{'en': 'Claro BR'},
'552499291':{'en': 'Claro BR'},
'346027':{'en': 'Lebara'},
'346026':{'en': 'Lebara'},
'346025':{'en': 'Lebara'},
'346024':{'en': 'Lebara'},
'346023':{'en': 'Lycamobile'},
'346021':{'en': 'Lycamobile'},
'346020':{'en': 'Lycamobile'},
'346029':{'en': 'DIA'},
'346028':{'en': 'Lycamobile'},
'1787341':{'en': 'SunCom Wireless Puerto Rico'},
'45601':{'en': 'Telia'},
'45602':{'en': 'Telia'},
'45603':{'en': 'Telia'},
'45604':{'en': 'Telia'},
'1787344':{'en': 'SunCom Wireless Puerto Rico'},
'45606':{'en': 'CBB Mobil'},
'45607':{'en': 'CBB Mobil'},
'45608':{'en': 'CBB Mobil'},
'552498114':{'en': 'TIM'},
'552899946':{'en': 'Vivo'},
'552899945':{'en': 'Vivo'},
'51449492':{'en': 'Claro'},
'51449493':{'en': 'Claro'},
'51449490':{'en': 'Movistar'},
'51449491':{'en': 'Claro'},
'487278':{'en': 'Plus'},
'487279':{'en': 'Plus'},
'51449494':{'en': 'Movistar'},
'487274':{'en': 'Plus'},
'487275':{'en': 'Plus'},
'487276':{'en': 'Plus'},
'487277':{'en': 'Plus'},
'487270':{'en': 'Plus'},
'487272':{'en': 'T-Mobile'},
'487273':{'en': 'T-Mobile'},
'447461':{'en': 'O2'},
'447460':{'en': 'Three'},
'447463':{'en': 'Three'},
'447462':{'en': 'Three'},
'447465':{'en': 'Three'},
'447464':{'en': 'Vodafone'},
'447467':{'en': 'Vodafone'},
'447466':{'en': 'Lycamobile'},
'447469':{'en': 'Vodafone'},
'447468':{'en': 'Vodafone'},
'554599981':{'en': 'TIM'},
'554599984':{'en': 'TIM'},
'26269300':{'en': 'Orange'},
'26269301':{'en': 'SFR'},
'26269302':{'en': 'SFR'},
'26269303':{'en': 'SFR'},
'26269304':{'en': 'SFR'},
'26269306':{'en': 'Orange'},
'554699921':{'en': 'TIM'},
'554699922':{'en': 'TIM'},
'554699923':{'en': 'TIM'},
'554499139':{'en': 'Vivo'},
'554499138':{'en': 'Vivo'},
'554499135':{'en': 'Vivo'},
'554499134':{'en': 'Vivo'},
'554499137':{'en': 'Vivo'},
'554499136':{'en': 'Vivo'},
'554499131':{'en': 'Vivo'},
'30690300':{'en': 'MI Carrier Services'},
'554499133':{'en': 'Vivo'},
'554499132':{'en': 'Vivo'},
'553899172':{'en': 'TIM'},
'474673':{'en': 'NetCom'},
'474670':{'en': 'NetCom'},
'552499301':{'en': 'Claro BR'},
'474674':{'en': 'NetCom'},
'474675':{'en': 'NetCom'},
'553199167':{'en': 'TIM'},
'1876443':{'en': 'Digicel'},
'1876442':{'en': 'Digicel'},
'1876441':{'en': 'Digicel'},
'1876440':{'en': 'Digicel'},
'1876447':{'en': 'Digicel'},
'1876446':{'en': 'Digicel'},
'1876445':{'en': 'Digicel'},
'502478':{'en': 'Tigo'},
'1876448':{'en': 'Digicel'},
'552299203':{'en': 'Claro BR'},
'552299202':{'en': 'Claro BR'},
'552299201':{'en': 'Claro BR'},
'552299207':{'en': 'Claro BR'},
'552299206':{'en': 'Claro BR'},
'552299205':{'en': 'Claro BR'},
'552299204':{'en': 'Claro BR'},
'552299209':{'en': 'Claro BR'},
'552299208':{'en': 'Claro BR'},
'4478391':{'en': 'Airtel'},
'4478392':{'en': 'Airtel'},
'4478397':{'en': 'Airtel'},
'4478398':{'en': 'Sure'},
'50781':{'en': 'Mobilphone'},
'554998408':{'en': 'Brasil Telecom GSM'},
'551699363':{'en': 'Claro BR'},
'551699362':{'en': 'Claro BR'},
'551699361':{'en': 'Claro BR'},
'551699360':{'en': 'Claro BR'},
'551699364':{'en': 'Claro BR'},
'554298417':{'en': 'Brasil Telecom GSM'},
'30699022':{'en': 'Yuboto'},
'554298415':{'en': 'Brasil Telecom GSM'},
'554298414':{'en': 'Brasil Telecom GSM'},
'554298413':{'en': 'Brasil Telecom GSM'},
'554298412':{'en': 'Brasil Telecom GSM'},
'5524997':{'en': 'Vivo'},
'5524998':{'en': 'Vivo'},
'55139962':{'en': 'Vivo'},
'55139960':{'en': 'Vivo'},
'55139961':{'en': 'Vivo'},
'552299760':{'en': 'Vivo'},
'4479111':{'en': 'JT'},
'553599992':{'en': 'Telemig Celular'},
'4478934':{'en': 'O2'},
'4478935':{'en': 'O2'},
'4478936':{'en': 'O2'},
'4478937':{'en': 'O2'},
'4478930':{'en': 'Magrathea'},
'4478931':{'en': '24 Seven'},
'4478932':{'en': 'O2'},
'4478933':{'en': 'Yim Siam'},
'553199103':{'en': 'TIM'},
'4478938':{'en': 'aql'},
'4478939':{'en': 'Citrus'},
'346841':{'en': 'Tuenti'},
'346840':{'en': 'Tuenti'},
'346843':{'en': 'Tuenti'},
'346842':{'en': 'Tuenti'},
'346845':{'en': 'Tuenti'},
'346846':{'en': 'Telecable'},
'452395':{'en': 'Telia'},
'553199104':{'en': 'TIM'},
'553598419':{'en': 'Claro BR'},
'553598418':{'en': 'Claro BR'},
'4581371':{'en': 'CLX Networks AB'},
'4581370':{'en': 'Flexonet'},
'4581373':{'en': 'M Mobility'},
'4581372':{'en': 'Interfone International'},
'553598411':{'en': 'Claro BR'},
'553598413':{'en': 'Claro BR'},
'553598412':{'en': 'Claro BR'},
'553598415':{'en': 'Claro BR'},
'553598414':{'en': 'Claro BR'},
'553598417':{'en': 'Claro BR'},
'553598416':{'en': 'Claro BR'},
'3670':{'en': 'Vodafone'},
'1787579':{'en': 'Claro'},
'551599119':{'en': 'Claro BR'},
'551599118':{'en': 'Claro BR'},
'554399158':{'en': 'Vivo'},
'554399159':{'en': 'Vivo'},
'26096':{'en': 'MTN'},
'26097':{'en': 'Airtel'},
'551599117':{'en': 'Claro BR'},
'26095':{'en': 'ZAMTEL'},
'551599111':{'en': 'Claro BR'},
'554399153':{'en': 'Vivo'},
'551599113':{'en': 'Claro BR'},
'551599112':{'en': 'Claro BR'},
'552798178':{'en': 'TIM'},
'552798175':{'en': 'TIM'},
'552798174':{'en': 'TIM'},
'552798177':{'en': 'TIM'},
'552798176':{'en': 'TIM'},
'552798171':{'en': 'TIM'},
'552798173':{'en': 'TIM'},
'552798172':{'en': 'TIM'},
'553898431':{'en': 'Claro BR'},
'474077':{'en': 'NetCom'},
'553898437':{'en': 'Claro BR'},
'45616':{'en': 'TDC'},
'553199896':{'en': 'Telemig Celular'},
'421919':{'en': 'Orange'},
'421918':{'en': 'Orange'},
'45615':{'en': 'TDC'},
'421915':{'en': 'Orange'},
'421914':{'en': 'Telekom'},
'421917':{'en': 'Orange'},
'421916':{'en': 'Orange'},
'421911':{'en': 'Telekom'},
'421910':{'en': 'Telekom'},
'553899181':{'en': 'TIM'},
'421912':{'en': 'Telekom'},
'2345389':{'en': 'Starcomms'},
'2345381':{'en': 'Starcomms'},
'2345382':{'en': 'Starcomms'},
'2345383':{'en': 'Starcomms'},
'2345384':{'en': 'Starcomms'},
'2345385':{'en': 'Starcomms'},
'2345386':{'en': 'Starcomms'},
'2345387':{'en': 'Starcomms'},
'554598838':{'en': 'Claro BR'},
'3460309':{'en': 'Lebara'},
'3460308':{'en': 'Lebara'},
'3460305':{'en': 'Lebara'},
'3460304':{'en': 'Vodafone'},
'3460307':{'en': 'Lebara'},
'3460306':{'en': 'Lebara'},
'3460301':{'en': 'Vodafone'},
'3460300':{'en': 'Vodafone'},
'3460303':{'en': 'Vodafone'},
'551195785':{'en': 'Vivo'},
'407000':{'en': 'Enigma-System'},
'552299235':{'en': 'Claro BR'},
'552299233':{'en': 'Claro BR'},
'552299231':{'en': 'Claro BR'},
'553199607':{'en': 'Telemig Celular'},
'553199606':{'en': 'Telemig Celular'},
'553199605':{'en': 'Telemig Celular'},
'553199604':{'en': 'Telemig Celular'},
'553199603':{'en': 'Telemig Celular'},
'553199602':{'en': 'Telemig Celular'},
'553199601':{'en': 'Telemig Celular'},
'553199609':{'en': 'Telemig Celular'},
'553199608':{'en': 'Telemig Celular'},
'212627':{'en': 'Inwi'},
'212626':{'en': 'Inwi'},
'212625':{'en': u('M\u00e9ditel')},
'212624':{'en': 'Maroc Telecom'},
'212623':{'en': 'Maroc Telecom'},
'212622':{'en': 'Maroc Telecom'},
'212621':{'en': u('M\u00e9ditel')},
'212620':{'en': u('M\u00e9ditel')},
'212629':{'en': 'Inwi'},
'212628':{'en': 'Maroc Telecom'},
'47918':{'en': 'Telenor'},
'47916':{'en': 'Telenor'},
'47917':{'en': 'Telenor'},
'47915':{'en': 'Telenor'},
'47913':{'en': 'Telenor'},
'551699992':{'en': 'Vivo'},
'551699993':{'en': 'Vivo'},
'507637':{'en': 'Cable & Wireless'},
'507636':{'en': u('Telef\u00f3nica M\u00f3viles')},
'507635':{'en': u('Telef\u00f3nica M\u00f3viles')},
'507634':{'en': 'Cable & Wireless'},
'507633':{'en': 'Cable & Wireless'},
'507632':{'en': 'Claro'},
'507631':{'en': 'Claro'},
'507630':{'en': 'Claro'},
'4478722':{'en': 'Cloud9'},
'4478727':{'en': 'Telecom 10'},
'507638':{'en': u('Telef\u00f3nica M\u00f3viles')},
'554399141':{'en': 'Vivo'},
'4475710':{'en': '09 Mobile'},
'551998229':{'en': 'TIM'},
'551998224':{'en': 'TIM'},
'551998225':{'en': 'TIM'},
'551998226':{'en': 'TIM'},
'4475718':{'en': 'Alliance'},
'551998221':{'en': 'TIM'},
'551998222':{'en': 'TIM'},
'551998223':{'en': 'TIM'},
'5521981':{'en': 'TIM'},
'554199169':{'en': 'Vivo'},
'554199168':{'en': 'Vivo'},
'554199165':{'en': 'Vivo'},
'554199164':{'en': 'Vivo'},
'554199167':{'en': 'Vivo'},
'554199166':{'en': 'Vivo'},
'554199161':{'en': 'Vivo'},
'554199163':{'en': 'Vivo'},
'554199162':{'en': 'Vivo'},
'554899997':{'en': 'TIM'},
'554899996':{'en': 'TIM'},
'554899995':{'en': 'TIM'},
'5521982':{'en': 'TIM'},
'554899993':{'en': 'TIM'},
'554899992':{'en': 'TIM'},
'554899991':{'en': 'TIM'},
'5521985':{'en': 'Oi'},
'554899998':{'en': 'TIM'},
'554199246':{'en': 'Vivo'},
'553899902':{'en': 'Telemig Celular'},
'30691234':{'en': 'M-STAT'},
'517297269':{'en': 'Movistar'},
'553899901':{'en': 'Telemig Celular'},
'517297262':{'en': 'Movistar'},
'517297263':{'en': 'Movistar'},
'517297260':{'en': 'Movistar'},
'517297261':{'en': 'Movistar'},
'553599135':{'en': 'TIM'},
'551999667':{'en': 'Vivo'},
'553599137':{'en': 'TIM'},
'553599136':{'en': 'TIM'},
'553599131':{'en': 'TIM'},
'553599133':{'en': 'TIM'},
'551999666':{'en': 'Vivo'},
'554899977':{'en': 'TIM'},
'553599139':{'en': 'TIM'},
'551999665':{'en': 'Vivo'},
'3465429':{'en': 'DIA'},
'551698152':{'en': 'TIM'},
'514494978':{'en': 'Movistar'},
'514494979':{'en': 'Movistar'},
'5547988':{'en': 'Claro BR'},
'551999669':{'en': 'Vivo'},
'551999668':{'en': 'Vivo'},
'193924199':{'en': 'Claro'},
'26134':{'en': 'Telma'},
'553199182':{'en': 'TIM'},
'553199183':{'en': 'TIM'},
'553199184':{'en': 'TIM'},
'553199185':{'en': 'TIM'},
'26133':{'en': 'Airtel'},
'26132':{'en': 'Orange'},
'553199188':{'en': 'TIM'},
'4476546':{'en': 'PageOne'},
'4476545':{'en': 'PageOne'},
'4476543':{'en': 'PageOne'},
'4476542':{'en': 'PageOne'},
'554899973':{'en': 'TIM'},
'455068':{'en': 'CBB Mobil'},
'455066':{'en': 'CBB Mobil'},
'455067':{'en': 'CBB Mobil'},
'455064':{'en': 'Lycamobile Denmark Ltd'},
'455065':{'en': 'Lebara Limited'},
'455062':{'en': 'CBB Mobil'},
'455063':{'en': 'Mundio Mobile'},
'455060':{'en': 'ipvision'},
'455061':{'en': 'Mach Connectivity'},
'346041':{'en': 'Lebara'},
'346040':{'en': 'R'},
'346043':{'en': 'Lebara'},
'30695330':{'en': 'Apifon'},
'22968':{'en': 'Moov'},
'22969':{'en': 'MTN'},
'22966':{'en': 'MTN'},
'22967':{'en': 'MTN'},
'22964':{'en': 'Moov'},
'22965':{'en': 'Moov'},
'22962':{'en': 'MTN'},
'22963':{'en': 'Moov'},
'22960':{'en': 'Moov'},
'22961':{'en': 'MTN'},
'552899964':{'en': 'Vivo'},
'552899965':{'en': 'Vivo'},
'552899210':{'en': 'Claro BR'},
'552899967':{'en': 'Vivo'},
'552899961':{'en': 'Vivo'},
'552899962':{'en': 'Vivo'},
'552899963':{'en': 'Vivo'},
'551197049':{'en': 'TIM'},
'552899969':{'en': 'Vivo'},
'30685185':{'en': 'Cyta'},
'554299155':{'en': 'Vivo'},
'554299154':{'en': 'Vivo'},
'447449':{'en': 'Three'},
'447448':{'en': 'Lycamobile'},
'554599965':{'en': 'TIM'},
'554599964':{'en': 'TIM'},
'554599967':{'en': 'TIM'},
'554599966':{'en': 'TIM'},
'447443':{'en': 'Vodafone'},
'447442':{'en': 'Vodafone'},
'447440':{'en': 'Lycamobile'},
'447447':{'en': 'Three'},
'447446':{'en': 'Three'},
'447445':{'en': 'Three'},
'447444':{'en': 'Vodafone'},
'234807':{'en': 'Glo'},
'234806':{'en': 'MTN'},
'234805':{'en': 'Glo'},
'234804':{'en': 'Ntel'},
'234803':{'en': 'MTN'},
'234802':{'en': 'Airtel'},
'234801':{'en': 'Megatech'},
'26269321':{'en': 'Orange'},
'234809':{'en': '9mobile'},
'234808':{'en': 'Airtel'},
'554299902':{'en': 'TIM'},
'554299903':{'en': 'TIM'},
'554299901':{'en': 'TIM'},
'554299906':{'en': 'TIM'},
'554299907':{'en': 'TIM'},
'554299904':{'en': 'TIM'},
'554299905':{'en': 'TIM'},
'554299908':{'en': 'TIM'},
'554499113':{'en': 'Vivo'},
'554499112':{'en': 'Vivo'},
'554499111':{'en': 'Vivo'},
'554499117':{'en': 'Vivo'},
'554499116':{'en': 'Vivo'},
'554499115':{'en': 'Vivo'},
'554499114':{'en': 'Vivo'},
'554499119':{'en': 'Vivo'},
'554499118':{'en': 'Vivo'},
'554299156':{'en': 'Vivo'},
'55169881':{'en': 'Oi'},
'554899978':{'en': 'TIM'},
'5527998':{'en': 'Vivo'},
'5527999':{'en': 'Vivo'},
'474654':{'en': 'NetCom'},
'554299151':{'en': 'Vivo'},
'5527997':{'en': 'Vivo'},
'474650':{'en': 'NetCom'},
'23769':{'en': 'Orange'},
'23768':{'en': 'MTN Cameroon'},
'23767':{'en': 'MTN Cameroon'},
'23766':{'en': 'NEXTTEL'},
'553799115':{'en': 'TIM'},
'553799114':{'en': 'TIM'},
'553799117':{'en': 'TIM'},
'553799116':{'en': 'TIM'},
'553799111':{'en': 'TIM'},
'553799113':{'en': 'TIM'},
'553799112':{'en': 'TIM'},
'553799119':{'en': 'TIM'},
'4478925':{'en': 'FleXtel'},
'22176':{'en': 'Tigo'},
'50769':{'en': 'Cable & Wireless'},
'50768':{'en': u('Telef\u00f3nica M\u00f3viles')},
'178765':{'en': 'CENTENNIAL'},
'178764':{'en': 'CENTENNIAL'},
'50765':{'en': 'Cable & Wireless'},
'50764':{'en': u('Telef\u00f3nica M\u00f3viles')},
'50767':{'en': 'Cable & Wireless'},
'50761':{'en': 'Digicel'},
'50760':{'en': 'Digicel'},
'50762':{'en': 'Claro'},
'22172':{'en': 'HAYO'},
'26771':{'en': 'Mascom'},
'554699976':{'en': 'TIM'},
'551899648':{'en': 'Vivo'},
'551899649':{'en': 'Vivo'},
'55439960':{'en': 'TIM'},
'551899642':{'en': 'Vivo'},
'551899643':{'en': 'Vivo'},
'551899641':{'en': 'Vivo'},
'551899646':{'en': 'Vivo'},
'551899647':{'en': 'Vivo'},
'551899644':{'en': 'Vivo'},
'551899645':{'en': 'Vivo'},
'554799943':{'en': 'TIM'},
'553299133':{'en': 'TIM'},
'554799945':{'en': 'TIM'},
'1242395':{'en': 'BaTelCo'},
'554799947':{'en': 'TIM'},
'553598439':{'en': 'Claro BR'},
'553598438':{'en': 'Claro BR'},
'553598437':{'en': 'Claro BR'},
'553598436':{'en': 'Claro BR'},
'553598435':{'en': 'Claro BR'},
'553598434':{'en': 'Claro BR'},
'553598433':{'en': 'Claro BR'},
'553598432':{'en': 'Claro BR'},
'553598431':{'en': 'Claro BR'},
'551195769':{'en': 'Vivo'},
'1787513':{'en': 'SunCom Wireless Puerto Rico'},
'1787514':{'en': 'Claro'},
'1787515':{'en': 'Claro'},
'1787516':{'en': 'Claro'},
'1787517':{'en': 'Claro'},
'1787518':{'en': 'Claro'},
'1787519':{'en': 'Claro'},
'551599133':{'en': 'Claro BR'},
'551599132':{'en': 'Claro BR'},
'551599131':{'en': 'Claro BR'},
'554399177':{'en': 'Vivo'},
'551599137':{'en': 'Claro BR'},
'551599136':{'en': 'Claro BR'},
'551599135':{'en': 'Claro BR'},
'551599134':{'en': 'Claro BR'},
'551599139':{'en': 'Claro BR'},
'551599138':{'en': 'Claro BR'},
'554399178':{'en': 'Vivo'},
'554399179':{'en': 'Vivo'},
'552798153':{'en': 'TIM'},
'38595':{'en': 'Tele2'},
'474010':{'en': 'NetCom'},
'474011':{'en': 'NetCom'},
'38590':{'en': 'Tele2'},
'38591':{'en': 'Vip'},
'38592':{'en': 'Vip'},
'552798154':{'en': 'TIM'},
'552798159':{'en': 'TIM'},
'552798158':{'en': 'TIM'},
'38598':{'en': 'Hrvatski Telekom'},
'38599':{'en': 'Hrvatski Telekom'},
'30691000':{'en': 'BWS'},
'554299122':{'en': 'Vivo'},
'554299123':{'en': 'Vivo'},
'554299124':{'en': 'Vivo'},
'554299125':{'en': 'Vivo'},
'554299126':{'en': 'Vivo'},
'554299127':{'en': 'Vivo'},
'554299128':{'en': 'Vivo'},
'554299129':{'en': 'Vivo'},
'554398425':{'en': 'Brasil Telecom GSM'},
'506701':{'en': 'Claro'},
'516796773':{'en': 'Claro'},
'4915050':{'en': 'NAKA AG'},
'516796772':{'en': 'Claro'},
'447486':{'en': 'EE'},
'554398421':{'en': 'Brasil Telecom GSM'},
'515395352':{'en': 'Movistar'},
'554398423':{'en': 'Brasil Telecom GSM'},
'553599906':{'en': 'Telemig Celular'},
'554398422':{'en': 'Brasil Telecom GSM'},
'459299':{'en': 'ipvision'},
'459298':{'en': 'SimService'},
'459290':{'en': 'Justfone'},
'459293':{'en': 'SimService'},
'459292':{'en': 'Mobil Data'},
'459295':{'en': 'SimService'},
'459294':{'en': 'SimService'},
'459297':{'en': 'SimService'},
'459296':{'en': 'SimService'},
'551498122':{'en': 'TIM'},
'551999685':{'en': 'Vivo'},
'551999684':{'en': 'Vivo'},
'551999687':{'en': 'Vivo'},
'551999686':{'en': 'Vivo'},
'551999681':{'en': 'Vivo'},
'551999683':{'en': 'Vivo'},
'551999682':{'en': 'Vivo'},
'551999689':{'en': 'Vivo'},
'551999688':{'en': 'Vivo'},
'553599153':{'en': 'TIM'},
'552899222':{'en': 'Claro BR'},
'5024479':{'en': 'Tigo'},
'5024478':{'en': 'Tigo'},
'5024477':{'en': 'Tigo'},
'5024476':{'en': 'Tigo'},
'23327':{'en': 'tiGO'},
'553498422':{'en': 'Claro BR'},
'553498421':{'en': 'Claro BR'},
'553498420':{'en': 'Claro BR'},
'23893':{'en': 'T+'},
'23324':{'en': 'MTN'},
'51749789':{'en': 'Movistar'},
'551197974':{'en': 'Oi'},
'23323':{'en': 'Globacom (Zain)'},
'551197977':{'en': 'Oi'},
'551197976':{'en': 'Oi'},
'455290':{'en': 'Lebara Limited'},
'551197972':{'en': 'Oi'},
'347125':{'en': 'Yoigo'},
'347124':{'en': 'Yoigo'},
'347127':{'en': 'Yoigo'},
'347126':{'en': 'Yoigo'},
'347121':{'en': 'Yoigo'},
'553199668':{'en': 'Telemig Celular'},
'347123':{'en': 'Yoigo'},
'347122':{'en': 'Yoigo'},
'553199665':{'en': 'Telemig Celular'},
'553199664':{'en': 'Telemig Celular'},
'553199667':{'en': 'Telemig Celular'},
'553199666':{'en': 'Telemig Celular'},
'553199661':{'en': 'Telemig Celular'},
'347128':{'en': 'Yoigo'},
'553199663':{'en': 'Telemig Celular'},
'553199662':{'en': 'Telemig Celular'},
'50372':{'en': 'Tigo'},
'50373':{'en': 'Digicel'},
'50371':{'en': 'Movistar'},
'50376':{'en': 'Claro'},
'447781':{'en': 'Sure'},
'447782':{'en': 'Three'},
'447783':{'en': 'O2'},
'47934':{'en': 'NetCom'},
'479191':{'en': 'Telenor'},
'47936':{'en': 'NetCom'},
'212642':{'en': 'Maroc Telecom'},
'47930':{'en': 'NetCom'},
'212644':{'en': u('M\u00e9ditel')},
'47932':{'en': 'NetCom'},
'212646':{'en': 'Inwi'},
'212649':{'en': u('M\u00e9ditel')},
'479199':{'en': 'Telenor'},
'459111':{'en': 'Lebara Limited'},
'47938':{'en': 'NetCom'},
'554399145':{'en': 'Vivo'},
'551699606':{'en': 'Vivo'},
'551699607':{'en': 'Vivo'},
'551699601':{'en': 'Vivo'},
'551599161':{'en': 'Claro BR'},
'553899108':{'en': 'TIM'},
'551699608':{'en': 'Vivo'},
'45422':{'en': 'Telia'},
'551599163':{'en': 'Claro BR'},
'1787686':{'en': 'CENTENNIAL'},
'1787687':{'en': 'CENTENNIAL'},
'507659':{'en': u('Telef\u00f3nica M\u00f3viles')},
'507658':{'en': u('Telef\u00f3nica M\u00f3viles')},
'551599165':{'en': 'Claro BR'},
'551599166':{'en': 'Claro BR'},
'554399142':{'en': 'Vivo'},
'503799':{'en': 'Movistar'},
'503794':{'en': 'Tigo'},
'503795':{'en': 'Claro'},
'503796':{'en': 'Claro'},
'503797':{'en': 'Digicel'},
'503790':{'en': 'Tigo'},
'503791':{'en': 'Tigo'},
'503792':{'en': 'Tigo'},
'503793':{'en': 'Tigo'},
'554199143':{'en': 'Vivo'},
'554199142':{'en': 'Vivo'},
'554199141':{'en': 'Vivo'},
'554199147':{'en': 'Vivo'},
'554199146':{'en': 'Vivo'},
'554199145':{'en': 'Vivo'},
'554199144':{'en': 'Vivo'},
'554199149':{'en': 'Vivo'},
'554199148':{'en': 'Vivo'},
'456099':{'en': 'Mach Connectivity'},
'554599124':{'en': 'Vivo'},
'386655':{'en': 'Telekom Slovenije'},
'1939731':{'en': 'CENTENNIAL'},
'4478743':{'en': 'O2'},
'4478742':{'en': 'O2'},
'4478741':{'en': 'O2'},
'4478740':{'en': 'O2'},
'4478747':{'en': 'O2'},
'4478746':{'en': 'O2'},
'4478744':{'en': 'Citrus'},
'552198304':{'en': 'TIM'},
'552198305':{'en': 'TIM'},
'4478749':{'en': 'O2'},
'4478748':{'en': 'O2'},
'552198301':{'en': 'TIM'},
'552198302':{'en': 'TIM'},
'552198303':{'en': 'TIM'},
'354385':{'en': u('S\u00edminn')},
'354389':{'en': 'IMC'},
'354388':{'en': 'IMC'},
'230573':{'en': 'Emtel'},
'230572':{'en': 'Emtel'},
'230571':{'en': 'Emtel'},
'230574':{'en': 'Emtel'},
'2346469':{'en': 'Starcomms'},
'554598839':{'en': 'Claro BR'},
'2346461':{'en': 'Starcomms'},
'2346462':{'en': 'Starcomms'},
'553499106':{'en': 'TIM'},
'3069522':{'en': 'Vodafone'},
'3069523':{'en': 'Vodafone'},
'553499105':{'en': 'TIM'},
'458179':{'en': 'CBB Mobil'},
'458178':{'en': 'CBB Mobil'},
'458173':{'en': 'YouSee'},
'458172':{'en': 'Fullrate'},
'458171':{'en': 'YouSee'},
'458170':{'en': 'CBB Mobil'},
'458177':{'en': 'ipvision'},
'458176':{'en': 'CBB Mobil'},
'458175':{'en': 'YouSee'},
'458174':{'en': 'YouSee'},
'514494954':{'en': 'Movistar'},
'514494955':{'en': 'Movistar'},
'514494950':{'en': 'Movistar'},
'514494951':{'en': 'Movistar'},
'514494952':{'en': 'Movistar'},
'514494953':{'en': 'Movistar'},
'554299111':{'en': 'Vivo'},
'554299113':{'en': 'Vivo'},
'554299112':{'en': 'Vivo'},
'2992':{'en': 'TELE Greenland A/S'},
'554299114':{'en': 'Vivo'},
'553599119':{'en': 'TIM'},
'553599118':{'en': 'TIM'},
'553599113':{'en': 'TIM'},
'553599112':{'en': 'TIM'},
'553599111':{'en': 'TIM'},
'553599117':{'en': 'TIM'},
'553599116':{'en': 'TIM'},
'553599115':{'en': 'TIM'},
'553599114':{'en': 'TIM'},
'554198441':{'en': 'Brasil Telecom GSM'},
'554599913':{'en': 'TIM'},
'554198443':{'en': 'Brasil Telecom GSM'},
'37449':{'en': 'VivaCell-MTS', 'ru': u('\u0412\u0438\u0432\u0430\u0421\u0435\u043b\u043b-\u041c\u0422\u0421')},
'30695310':{'en': 'MI Carrier Services'},
'37444':{'en': 'Ucom', 'ru': u('\u042e\u043a\u043e\u043c')},
'37443':{'en': 'Beeline', 'ru': u('\u0411\u0438\u043b\u0430\u0439\u043d')},
'37441':{'en': 'Ucom', 'ru': u('\u042e\u043a\u043e\u043c')},
'1787300':{'en': 'CENTENNIAL'},
'553499108':{'en': 'TIM'},
'17587':{'en': 'Digicel'},
'17582':{'en': 'Cable & Wireless'},
'17583':{'en': 'Cable & Wireless'},
'4857':{'en': 'Play'},
'4851':{'en': 'Orange'},
'4850':{'en': 'Orange'},
'551499189':{'en': 'Claro BR'},
'551499188':{'en': 'Claro BR'},
'1242646':{'en': 'BaTelCo'},
'551499185':{'en': 'Claro BR'},
'551499184':{'en': 'Claro BR'},
'551499187':{'en': 'Claro BR'},
'551499186':{'en': 'Claro BR'},
'551499181':{'en': 'Claro BR'},
'551499183':{'en': 'Claro BR'},
'551499182':{'en': 'Claro BR'},
'554899918':{'en': 'TIM'},
'554599947':{'en': 'TIM'},
'554599946':{'en': 'TIM'},
'554599945':{'en': 'TIM'},
'554599944':{'en': 'TIM'},
'554599943':{'en': 'TIM'},
'554599942':{'en': 'TIM'},
'554599941':{'en': 'TIM'},
'551799646':{'en': 'Vivo'},
'551799645':{'en': 'Vivo'},
'551799644':{'en': 'Vivo'},
'551799643':{'en': 'Vivo'},
'551799642':{'en': 'Vivo'},
'551799641':{'en': 'Vivo'},
'554599948':{'en': 'TIM'},
'554299928':{'en': 'TIM'},
'554299929':{'en': 'TIM'},
'554299921':{'en': 'TIM'},
'554299922':{'en': 'TIM'},
'554299923':{'en': 'TIM'},
'1787256':{'en': 'Claro'},
'554299925':{'en': 'TIM'},
'554299926':{'en': 'TIM'},
'554299927':{'en': 'TIM'},
'45939':{'en': '3'},
'30698':{'en': 'Cosmote'},
'30697':{'en': 'Cosmote'},
'30694':{'en': 'Vodafone'},
'30693':{'en': 'Wind'},
'45935':{'en': 'Telenor'},
'553299912':{'en': 'Telemig Celular'},
'553299913':{'en': 'Telemig Celular'},
'553299911':{'en': 'Telemig Celular'},
'553299917':{'en': 'Telemig Celular'},
'553299914':{'en': 'Telemig Celular'},
'553599903':{'en': 'Telemig Celular'},
'1787255':{'en': 'Claro'},
'553299919':{'en': 'Telemig Celular'},
'55489910':{'en': 'Vivo'},
'553199304':{'en': 'TIM'},
'352658':{'en': 'POST'},
'352651':{'en': 'POST'},
'554899914':{'en': 'TIM'},
'554899913':{'en': 'TIM'},
'553799139':{'en': 'TIM'},
'553799138':{'en': 'TIM'},
'553799133':{'en': 'TIM'},
'553799132':{'en': 'TIM'},
'553799131':{'en': 'TIM'},
'553799137':{'en': 'TIM'},
'553799136':{'en': 'TIM'},
'553799135':{'en': 'TIM'},
'553799134':{'en': 'TIM'},
'50248':{'en': 'Tigo'},
'24390':{'en': 'Africell'},
'50246':{'en': 'Tigo'},
'554799969':{'en': 'TIM'},
'50247':{'en': 'Telgua'},
'50244':{'en': 'Movistar'},
'50245':{'en': 'Tigo'},
'50242':{'en': 'Telgua'},
'187643':{'en': 'Digicel'},
'554799968':{'en': 'TIM'},
'180960':{'en': 'Claro'},
'50241':{'en': 'Telgua'},
'553199416':{'en': 'TIM'},
'553199414':{'en': 'TIM'},
'553199415':{'en': 'TIM'},
'553199412':{'en': 'TIM'},
'553199413':{'en': 'TIM'},
'50121':{'en': 'DigiCell'},
'50120':{'en': 'DigiCell'},
'3467':{'en': 'Vodafone'},
'551899662':{'en': 'Vivo'},
'551899663':{'en': 'Vivo'},
'551899664':{'en': 'Vivo'},
'551899665':{'en': 'Vivo'},
'551899666':{'en': 'Vivo'},
'551899667':{'en': 'Vivo'},
'551899668':{'en': 'Vivo'},
'551899669':{'en': 'Vivo'},
'3465':{'en': 'Orange'},
'553599923':{'en': 'Telemig Celular'},
'346889':{'en': 'PepePhone'},
'346888':{'en': 'Euskaltel'},
'346885':{'en': 'YouMobile'},
'346884':{'en': 'MasMovil'},
'346887':{'en': 'Euskaltel'},
'346886':{'en': 'Euskaltel'},
'346881':{'en': 'YouMobile'},
'346880':{'en': 'YouMobile'},
'346883':{'en': 'MasMovil'},
'346882':{'en': 'MasMovil'},
'4079':{'en': 'Vodafone'},
'4078':{'en': 'Telekom'},
'5519994':{'en': 'Claro BR'},
'4075':{'en': 'Orange'},
'4074':{'en': 'Orange'},
'4076':{'en': 'Telekom'},
'4073':{'en': 'Vodafone'},
'4072':{'en': 'Vodafone'},
'553398428':{'en': 'Claro BR'},
'553398429':{'en': 'Claro BR'},
'553398422':{'en': 'Claro BR'},
'553398423':{'en': 'Claro BR'},
'553398421':{'en': 'Claro BR'},
'553398426':{'en': 'Claro BR'},
'553398427':{'en': 'Claro BR'},
'553398424':{'en': 'Claro BR'},
'553398425':{'en': 'Claro BR'},
'553598455':{'en': 'Claro BR'},
'553598454':{'en': 'Claro BR'},
'553598457':{'en': 'Claro BR'},
'553598456':{'en': 'Claro BR'},
'553598451':{'en': 'Claro BR'},
'553598453':{'en': 'Claro BR'},
'553598452':{'en': 'Claro BR'},
'553598459':{'en': 'Claro BR'},
'553598458':{'en': 'Claro BR'},
'3630':{'en': 'T-Mobile'},
'1787537':{'en': 'CENTENNIAL'},
'1787534':{'en': 'CENTENNIAL'},
'1787535':{'en': 'CENTENNIAL'},
'447960':{'en': 'EE'},
'447961':{'en': 'EE'},
'447962':{'en': 'EE'},
'447963':{'en': 'EE'},
'45605':{'en': '3'},
'553199247':{'en': 'TIM'},
'553199246':{'en': 'TIM'},
'1787346':{'en': 'SunCom Wireless Puerto Rico'},
'474031':{'en': 'NetCom'},
'474032':{'en': 'NetCom'},
'25475':{'en': 'Airtel'},
'25474':{'en': 'Safaricom'},
'25477':{'en': 'Telkom'},
'553199244':{'en': 'TIM'},
'25471':{'en': 'Safaricom'},
'25470':{'en': 'Safaricom'},
'25473':{'en': 'Airtel'},
'25472':{'en': 'Safaricom'},
'553199243':{'en': 'TIM'},
'25479':{'en': 'Safaricom'},
'25478':{'en': 'Airtel'},
'554299148':{'en': 'Vivo'},
'553199242':{'en': 'TIM'},
'553199241':{'en': 'TIM'},
'420967':{'en': 'Vodafone'},
'420966':{'en': 'O2'},
'420965':{'en': 'T-Mobile'},
'420964':{'en': 'T-Mobile'},
'420963':{'en': 'T-Mobile'},
'420962':{'en': 'O2'},
'4476401':{'en': 'Telecom2'},
'45239':{'en': 'TDC'},
'45238':{'en': 'TDC'},
'48609':{'en': 'Plus'},
'48608':{'en': 'T-Mobile'},
'45235':{'en': 'TDC'},
'48606':{'en': 'T-Mobile'},
'48605':{'en': 'Plus'},
'48604':{'en': 'T-Mobile'},
'48603':{'en': 'Plus'},
'48602':{'en': 'T-Mobile'},
'45233':{'en': 'TDC'},
'48600':{'en': 'T-Mobile'},
'553199249':{'en': 'TIM'},
'553199248':{'en': 'TIM'},
'16847':{'en': 'ASTCA'},
'16842':{'en': 'Blue Sky'},
'554498404':{'en': 'Brasil Telecom GSM'},
'1869762':{'en': 'Digicel'},
'1869763':{'en': 'Digicel'},
'1869760':{'en': 'Digicel'},
'554498405':{'en': 'Brasil Telecom GSM'},
'1869766':{'en': 'Digicel'},
'1869764':{'en': 'Digicel'},
'1869765':{'en': 'Digicel'},
'5119943':{'en': 'Claro'},
'5119946':{'en': 'Claro'},
'5119947':{'en': 'Claro'},
'5119944':{'en': 'Movistar'},
'5119945':{'en': 'Movistar'},
'5119948':{'en': 'Claro'},
'5119949':{'en': 'Claro'},
'554498408':{'en': 'Brasil Telecom GSM'},
'554498409':{'en': 'Brasil Telecom GSM'},
'193925':{'en': 'Claro'},
'553599818':{'en': 'Telemig Celular'},
'553599819':{'en': 'Telemig Celular'},
'554899117':{'en': 'Vivo'},
'452599':{'en': 'Danovation'},
'38164':{'en': 'mts'},
'452597':{'en': '3'},
'452596':{'en': 'Viptel'},
'452595':{'en': 'CoolTEL'},
'452594':{'en': 'Firmafon'},
'452593':{'en': 'Compatel Limited'},
'452592':{'en': 'CoolTEL'},
'452591':{'en': 'CoolTEL'},
'452590':{'en': 'MI Carrier Services'},
'421950':{'en': '4ka of SWAN'},
'554899114':{'en': 'Vivo'},
'554899113':{'en': 'Vivo'},
'554899112':{'en': 'Vivo'},
'553199643':{'en': 'Telemig Celular'},
'30690555':{'en': 'AMD Telecom'},
'553199641':{'en': 'Telemig Celular'},
'553199647':{'en': 'Telemig Celular'},
'505839':{'en': 'Movistar'},
'553199645':{'en': 'Telemig Celular'},
'553199644':{'en': 'Telemig Celular'},
'553199649':{'en': 'Telemig Celular'},
'505838':{'en': 'Movistar'},
'1784432':{'en': 'AT&T'},
'35989':{'en': 'Telenor'},
'1784430':{'en': 'AT&T'},
'1784431':{'en': 'AT&T'},
'24205':{'en': 'Celtel'},
'24204':{'en': 'Warid'},
'1784434':{'en': 'Digicel'},
'1784435':{'en': 'Digicel'},
'51449496':{'en': 'Movistar'},
'447764':{'en': 'O2'},
'447762':{'en': 'O2'},
'447763':{'en': 'O2'},
'447761':{'en': 'O2'},
'47952':{'en': 'Telenor'},
'47950':{'en': 'Telenor'},
'47951':{'en': 'Telenor'},
'47957':{'en': 'Telenor'},
'47954':{'en': 'Telenor'},
'212663':{'en': u('M\u00e9ditel')},
'212662':{'en': 'Maroc Telecom'},
'47958':{'en': 'Telenor'},
'47959':{'en': 'Telenor'},
'212667':{'en': 'Maroc Telecom'},
'212666':{'en': 'Maroc Telecom'},
'212665':{'en': u('M\u00e9ditel')},
'505832':{'en': 'Movistar'},
'175852':{'en': 'Digicel'},
'1787225':{'en': 'SunCom Wireless Puerto Rico'},
'554899119':{'en': 'Vivo'},
'175858':{'en': 'Cable & Wireless'},
'554899118':{'en': 'Vivo'},
'51449498':{'en': 'Movistar'},
'549293':{'en': 'Personal'},
'549292':{'en': 'Personal'},
'549291':{'en': 'Personal'},
'549290':{'en': 'Personal'},
'549297':{'en': 'Personal'},
'549296':{'en': 'Personal'},
'549295':{'en': 'Personal'},
'549294':{'en': 'Personal'},
'549299':{'en': 'Personal'},
'549298':{'en': 'Personal'},
'447106':{'en': 'O2'},
'447107':{'en': 'O2'},
'1787229':{'en': 'CENTENNIAL'},
'1939717':{'en': 'CENTENNIAL'},
'554798436':{'en': 'Brasil Telecom GSM'},
'4473900':{'en': 'Home Office'},
'554199259':{'en': 'Vivo'},
'554199258':{'en': 'Vivo'},
'554199253':{'en': 'Vivo'},
'554199252':{'en': 'Vivo'},
'554599983':{'en': 'TIM'},
'554599982':{'en': 'TIM'},
'554798901':{'en': 'Claro BR'},
'553399106':{'en': 'TIM'},
'553399107':{'en': 'TIM'},
'553199781':{'en': 'Telemig Celular'},
'554798437':{'en': 'Brasil Telecom GSM'},
'24999':{'en': 'MTN'},
'554299157':{'en': 'Vivo'},
'24991':{'en': 'Zain'},
'24990':{'en': 'Zain'},
'24993':{'en': 'MTN'},
'24992':{'en': 'MTN'},
'24995':{'en': 'Network of The World Ltd'},
'24996':{'en': 'Zain'},
'454260':{'en': 'BiBoB'},
'554498860':{'en': 'Claro BR'},
'552498127':{'en': 'TIM'},
'552498126':{'en': 'TIM'},
'552498125':{'en': 'TIM'},
'552498124':{'en': 'TIM'},
'51549590':{'en': 'Movistar'},
'51549591':{'en': 'Claro'},
'51549592':{'en': 'Claro'},
'51549593':{'en': 'Claro'},
'51549594':{'en': 'Movistar'},
'51549596':{'en': 'Movistar'},
'51549597':{'en': 'Claro'},
'552498121':{'en': 'TIM'},
'164943':{'en': 'Islandcom'},
'515495956':{'en': 'Movistar'},
'515495957':{'en': 'Movistar'},
'515495954':{'en': 'Movistar'},
'515495955':{'en': 'Movistar'},
'515495952':{'en': 'Movistar'},
'515495953':{'en': 'Movistar'},
'515495950':{'en': 'Movistar'},
'515495951':{'en': 'Movistar'},
'515495958':{'en': 'Movistar'},
'553499208':{'en': 'TIM'},
'552498128':{'en': 'TIM'},
'551799625':{'en': 'Vivo'},
'551799624':{'en': 'Vivo'},
'26269360':{'en': 'Only'},
'551799626':{'en': 'Vivo'},
'26269366':{'en': 'Orange'},
'551799623':{'en': 'Vivo'},
'551799622':{'en': 'Vivo'},
'551799629':{'en': 'Vivo'},
'551799628':{'en': 'Vivo'},
'38068':{'en': 'Kyivstar', 'uk': u('\u041a\u0438\u0457\u0432\u0441\u0442\u0430\u0440')},
'45913':{'en': 'Telenor'},
'45914':{'en': 'Lycamobile Denmark Ltd'},
'45916':{'en': 'Lycamobile Denmark Ltd'},
'45917':{'en': 'Lycamobile Denmark Ltd'},
'45918':{'en': 'Lebara Limited'},
'45919':{'en': 'Lebara Limited'},
'554299944':{'en': 'TIM'},
'38063':{'en': 'lifecell', 'uk': 'lifecell'},
'554299942':{'en': 'TIM'},
'554299943':{'en': 'TIM'},
'38066':{'en': 'Vodafone', 'uk': u('Vodafone \u0423\u043a\u0440\u0430\u0457\u043d\u0430')},
'38067':{'en': 'Kyivstar', 'uk': u('\u041a\u0438\u0457\u0432\u0441\u0442\u0430\u0440')},
'553299938':{'en': 'Telemig Celular'},
'553299939':{'en': 'Telemig Celular'},
'553299931':{'en': 'Telemig Celular'},
'553299932':{'en': 'Telemig Celular'},
'553299933':{'en': 'Telemig Celular'},
'553299934':{'en': 'Telemig Celular'},
'553299935':{'en': 'Telemig Celular'},
'553299936':{'en': 'Telemig Celular'},
'553299937':{'en': 'Telemig Celular'},
'551197081':{'en': 'Claro BR'},
'551197080':{'en': 'Claro BR'},
'551197083':{'en': 'Claro BR'},
'551197082':{'en': 'Claro BR'},
'551197085':{'en': 'Claro BR'},
'551197084':{'en': 'Claro BR'},
'551197087':{'en': 'Vivo'},
'551197086':{'en': 'Claro BR'},
'551197089':{'en': 'Vivo'},
'551197088':{'en': 'Vivo'},
'51739694':{'en': 'Movistar'},
'552899255':{'en': 'Claro BR'},
'51739692':{'en': 'Movistar'},
'552899253':{'en': 'Claro BR'},
'51739690':{'en': 'Movistar'},
'51739691':{'en': 'Movistar'},
'553899806':{'en': 'Telemig Celular'},
'553899807':{'en': 'Telemig Celular'},
'553899804':{'en': 'Telemig Celular'},
'553899805':{'en': 'Telemig Celular'},
'553899802':{'en': 'Telemig Celular'},
'553899803':{'en': 'Telemig Celular'},
'352671':{'en': 'JOIN'},
'553899801':{'en': 'Telemig Celular'},
'553899808':{'en': 'Telemig Celular'},
'352678':{'en': 'JOIN'},
'55339998':{'en': 'Telemig Celular'},
'447375':{'en': 'EE'},
'554599928':{'en': 'TIM'},
'447377':{'en': 'EE'},
'447376':{'en': 'EE'},
'447379':{'en': 'Vodafone'},
'447378':{'en': 'Three'},
'554599927':{'en': 'TIM'},
'554599926':{'en': 'TIM'},
'554599921':{'en': 'TIM'},
'554599923':{'en': 'TIM'},
'554599922':{'en': 'TIM'},
'26773':{'en': 'BTC Mobile'},
'385975':{'en': 'Telefocus'},
'385976':{'en': 'Hrvatski Telekom'},
'385977':{'en': 'Hrvatski Telekom'},
'385970':{'en': 'Hrvatski Telekom'},
'553199783':{'en': 'Telemig Celular'},
'26774':{'en': 'Mascom'},
'385979':{'en': 'Hrvatski Telekom'},
'553199788':{'en': 'Telemig Celular'},
'553199789':{'en': 'Telemig Celular'},
'551498155':{'en': 'TIM'},
'30699046':{'en': 'Premium Net International'},
'553199635':{'en': 'Telemig Celular'},
'30699048':{'en': 'AMD Telecom'},
'502580':{'en': 'Tigo'},
'502588':{'en': 'Tigo'},
'502589':{'en': 'Tigo'},
'551899606':{'en': 'Vivo'},
'551899607':{'en': 'Vivo'},
'551899604':{'en': 'Vivo'},
'551899605':{'en': 'Vivo'},
'551899602':{'en': 'Vivo'},
'551899603':{'en': 'Vivo'},
'551899601':{'en': 'Vivo'},
'551899608':{'en': 'Vivo'},
'551899609':{'en': 'Vivo'},
'35795':{'en': 'PrimeTel'},
'35794':{'en': 'Lemontel'},
'35797':{'en': 'Cytamobile-Vodafone'},
'35796':{'en': 'MTN'},
'35799':{'en': 'Cytamobile-Vodafone'},
'553398401':{'en': 'Claro BR'},
'553398402':{'en': 'Claro BR'},
'553398403':{'en': 'Claro BR'},
'553398404':{'en': 'Claro BR'},
'553398405':{'en': 'Claro BR'},
'553398406':{'en': 'Claro BR'},
'553398407':{'en': 'Claro BR'},
'553398408':{'en': 'Claro BR'},
'553398409':{'en': 'Claro BR'},
'516496499':{'en': 'Movistar'},
'516496498':{'en': 'Movistar'},
'389789':{'en': 'Vip'},
'389788':{'en': 'Vip'},
'516496491':{'en': 'Movistar'},
'389786':{'en': 'Vip'},
'389785':{'en': 'Vip'},
'516496492':{'en': 'Movistar'},
'389783':{'en': 'Vip'},
'389782':{'en': 'Vip'},
'516496497':{'en': 'Movistar'},
'516496496':{'en': 'Movistar'},
'447902':{'en': 'O2'},
'447903':{'en': 'EE'},
'447900':{'en': 'Vodafone'},
'447901':{'en': 'Vodafone'},
'447906':{'en': 'EE'},
'447907':{'en': 'O2'},
'447904':{'en': 'EE'},
'447905':{'en': 'EE'},
'447908':{'en': 'EE'},
'447909':{'en': 'Vodafone'},
'23851':{'en': 'T+'},
'23853':{'en': 'T+'},
'23852':{'en': 'T+'},
'23859':{'en': 'CVMOVEL'},
'23858':{'en': 'CVMOVEL'},
'507111':{'en': 'Digicel'},
'502477':{'en': 'Tigo'},
'554299164':{'en': 'Vivo'},
'554299165':{'en': 'Vivo'},
'554299166':{'en': 'Vivo'},
'554299161':{'en': 'Vivo'},
'554299162':{'en': 'Vivo'},
'554299163':{'en': 'Vivo'},
'1876449':{'en': 'Digicel'},
'553199108':{'en': 'TIM'},
'502479':{'en': 'Tigo'},
'346432':{'en': 'DigiMobil'},
'553199109':{'en': 'TIM'},
'553598479':{'en': 'Claro BR'},
'553598478':{'en': 'Claro BR'},
'553598473':{'en': 'Claro BR'},
'553598472':{'en': 'Claro BR'},
'553598471':{'en': 'Claro BR'},
'553598477':{'en': 'Claro BR'},
'553598476':{'en': 'Claro BR'},
'553199164':{'en': 'TIM'},
'553598474':{'en': 'Claro BR'},
'5532989':{'en': 'Oi'},
'5532988':{'en': 'Oi'},
'553199102':{'en': 'TIM'},
'551999641':{'en': 'Vivo'},
'551999643':{'en': 'Vivo'},
'551999642':{'en': 'Vivo'},
'551999645':{'en': 'Vivo'},
'551999644':{'en': 'Vivo'},
'551999647':{'en': 'Vivo'},
'551999646':{'en': 'Vivo'},
'551999649':{'en': 'Vivo'},
'551999648':{'en': 'Vivo'},
'553199105':{'en': 'TIM'},
'553199106':{'en': 'TIM'},
'553199107':{'en': 'TIM'},
'4476818':{'en': 'PageOne'},
'5532985':{'en': 'Oi'},
'5025819':{'en': 'Tigo'},
'554998418':{'en': 'Brasil Telecom GSM'},
'551898151':{'en': 'TIM'},
'51539539':{'en': 'Movistar'},
'4476810':{'en': 'PageOne'},
'30695299':{'en': 'BWS'},
'4476814':{'en': 'PageOne'},
'516796798':{'en': 'Movistar'},
'553899121':{'en': 'TIM'},
'553899123':{'en': 'TIM'},
'553899122':{'en': 'TIM'},
'553899125':{'en': 'TIM'},
'553899124':{'en': 'TIM'},
'553899127':{'en': 'TIM'},
'553899126':{'en': 'TIM'},
'553899129':{'en': 'TIM'},
'553899128':{'en': 'TIM'},
'346347':{'en': 'Vodafone'},
'447748':{'en': 'Vodafone'},
'447749':{'en': 'O2'},
'551499179':{'en': 'Claro BR'},
'447740':{'en': 'O2'},
'447741':{'en': 'Vodafone'},
'447742':{'en': 'O2'},
'447743':{'en': 'O2'},
'447745':{'en': 'O2'},
'447746':{'en': 'O2'},
'447747':{'en': 'Vodafone'},
'5036195':{'en': 'Movistar'},
'5036194':{'en': 'Movistar'},
'5036197':{'en': 'Movistar'},
'5036196':{'en': 'Movistar'},
'5036191':{'en': 'Movistar'},
'5036190':{'en': 'Movistar'},
'5036193':{'en': 'Movistar'},
'5036192':{'en': 'Movistar'},
'47970':{'en': 'Telenor'},
'47971':{'en': 'Telenor'},
'4477003':{'en': 'Sure'},
'5036198':{'en': 'Movistar'},
'47976':{'en': 'Telenor'},
'47977':{'en': 'Telenor'},
'553199281':{'en': 'TIM'},
'31683':{'en': 'KPN'},
'31681':{'en': 'T-Mobile'},
'31680':{'en': 'Vodafone Libertel B.V.'},
'31687':{'en': 'Lycamobile'},
'31686':{'en': 'Lycamobile'},
'31685':{'en': 'Lycamobile'},
'31684':{'en': 'Lycamobile'},
'12844966':{'en': 'CCT'},
'12844967':{'en': 'CCT'},
'479337':{'en': 'NetCom'},
'12844968':{'en': 'CCT'},
'12844969':{'en': 'CCT'},
'551599692':{'en': 'Vivo'},
'30690574':{'en': 'BWS'},
'511986':{'en': 'Claro'},
'511987':{'en': 'Claro'},
'553499981':{'en': 'Telemig Celular'},
'511985':{'en': 'Movistar'},
'553499987':{'en': 'Telemig Celular'},
'553499986':{'en': 'Telemig Celular'},
'553499985':{'en': 'Telemig Celular'},
'553499984':{'en': 'Telemig Celular'},
'553499989':{'en': 'Telemig Celular'},
'553499988':{'en': 'Telemig Celular'},
'511988':{'en': 'Movistar'},
'511989':{'en': 'Claro'},
'55189910':{'en': 'Claro BR'},
'55189911':{'en': 'Claro BR'},
'55189912':{'en': 'Claro BR'},
'55189913':{'en': 'Claro BR'},
'55189914':{'en': 'Claro BR'},
'55189915':{'en': 'Claro BR'},
'55189916':{'en': 'Claro BR'},
'55189917':{'en': 'Claro BR'},
'554798421':{'en': 'Brasil Telecom GSM'},
'554798423':{'en': 'Brasil Telecom GSM'},
'554798422':{'en': 'Brasil Telecom GSM'},
'554798425':{'en': 'Brasil Telecom GSM'},
'554798424':{'en': 'Brasil Telecom GSM'},
'554798427':{'en': 'Brasil Telecom GSM'},
'554798426':{'en': 'Brasil Telecom GSM'},
'554798429':{'en': 'Brasil Telecom GSM'},
'554798428':{'en': 'Brasil Telecom GSM'},
'3069900':{'en': 'Wind'},
'23990':{'en': 'Unitel'},
'23998':{'en': 'CSTmovel'},
'23999':{'en': 'CSTmovel'},
'4474062':{'en': 'Cheers'},
'4474060':{'en': 'Cheers'},
'4474061':{'en': 'Cheers'},
'4474066':{'en': '24 Seven'},
'4474067':{'en': 'TGL'},
'4474065':{'en': 'Telecom2'},
'552799653':{'en': 'Vivo'},
'4474068':{'en': '08Direct'},
'4474069':{'en': 'CardBoardFish'},
'552799652':{'en': 'Vivo'},
'552799651':{'en': 'Vivo'},
'552799650':{'en': 'Vivo'},
'373676':{'en': 'Moldtelecom'},
'373677':{'en': 'Moldtelecom'},
'373674':{'en': 'Moldtelecom'},
'373675':{'en': 'Moldtelecom'},
'373672':{'en': 'Moldtelecom'},
'373673':{'en': 'Moldtelecom'},
'373671':{'en': 'Moldtelecom'},
'554398431':{'en': 'Brasil Telecom GSM'},
'554298416':{'en': 'Brasil Telecom GSM'},
'552298113':{'en': 'TIM'},
'26481':{'en': 'MTC'},
'26482':{'en': 'Telecom Namibia'},
'26485':{'en': 'TN Mobile'},
'26484':{'en': 'MTN'},
'554298411':{'en': 'Brasil Telecom GSM'},
'16493':{'en': 'Digicel'},
'16492':{'en': 'C&W'},
'1787479':{'en': 'CENTENNIAL'},
'1787478':{'en': 'SunCom Wireless Puerto Rico'},
'1787474':{'en': 'CENTENNIAL'},
'1787473':{'en': 'CENTENNIAL'},
'1787471':{'en': 'CENTENNIAL'},
'554899621':{'en': 'TIM'},
'30695355':{'en': 'Cyta'},
'554899623':{'en': 'TIM'},
'552298118':{'en': 'TIM'},
'552298119':{'en': 'TIM'},
'554899625':{'en': 'TIM'},
'554199222':{'en': 'Vivo'},
'554899624':{'en': 'TIM'},
'554299964':{'en': 'TIM'},
'554299965':{'en': 'TIM'},
'554299966':{'en': 'TIM'},
'554299967':{'en': 'TIM'},
'554299961':{'en': 'TIM'},
'554199223':{'en': 'Vivo'},
'554299963':{'en': 'TIM'},
'554299969':{'en': 'TIM'},
'554899627':{'en': 'TIM'},
'553299958':{'en': 'Telemig Celular'},
'553299959':{'en': 'Telemig Celular'},
'553299956':{'en': 'Telemig Celular'},
'553299957':{'en': 'Telemig Celular'},
'553299954':{'en': 'Telemig Celular'},
'553299955':{'en': 'Telemig Celular'},
'553299952':{'en': 'Telemig Celular'},
'553299953':{'en': 'Telemig Celular'},
'553299951':{'en': 'Telemig Celular'},
'552899274':{'en': 'Claro BR'},
'552899275':{'en': 'Claro BR'},
'552899276':{'en': 'Claro BR'},
'552899277':{'en': 'Claro BR'},
'552899271':{'en': 'Claro BR'},
'552899272':{'en': 'Claro BR'},
'552899273':{'en': 'Claro BR'},
'552899278':{'en': 'Claro BR'},
'552899279':{'en': 'Claro BR'},
'554899626':{'en': 'TIM'},
'553399908':{'en': 'Telemig Celular'},
'553399909':{'en': 'Telemig Celular'},
'553399902':{'en': 'Telemig Celular'},
'553399903':{'en': 'Telemig Celular'},
'553399901':{'en': 'Telemig Celular'},
'553399906':{'en': 'Telemig Celular'},
'553399907':{'en': 'Telemig Celular'},
'553399904':{'en': 'Telemig Celular'},
'553399905':{'en': 'Telemig Celular'},
'551799609':{'en': 'Vivo'},
'551799608':{'en': 'Vivo'},
'551799603':{'en': 'Vivo'},
'551799602':{'en': 'Vivo'},
'551799601':{'en': 'Vivo'},
'551799607':{'en': 'Vivo'},
'551799606':{'en': 'Vivo'},
'551799605':{'en': 'Vivo'},
'551799604':{'en': 'Vivo'},
'180993':{'en': 'Tricom'},
'180992':{'en': 'Tricom'},
'180991':{'en': 'Orange'},
'180997':{'en': 'Orange'},
'50258':{'en': 'Telgua'},
'180995':{'en': 'Claro'},
'180994':{'en': 'Tricom'},
'3472260':{'en': 'MasMovil'},
'180999':{'en': 'Tricom'},
'180998':{'en': 'Orange'},
'50253':{'en': 'Tigo'},
'50252':{'en': 'Movistar'},
'1787450':{'en': 'Claro'},
'551498809':{'en': 'Oi'},
'551498808':{'en': 'Oi'},
'515195083':{'en': 'Movistar'},
'515195082':{'en': 'Movistar'},
'515195081':{'en': 'Movistar'},
'515195080':{'en': 'Movistar'},
'551196864':{'en': 'Vivo'},
'551196865':{'en': 'Vivo'},
'551196866':{'en': 'Vivo'},
'1787904':{'en': 'SunCom Wireless Puerto Rico'},
'1787903':{'en': 'CENTENNIAL'},
'551196861':{'en': 'Vivo'},
'1787901':{'en': 'SunCom Wireless Puerto Rico'},
'551196863':{'en': 'Vivo'},
'5025551':{'en': 'Tigo'},
'5025550':{'en': 'Tigo'},
'5025553':{'en': 'Tigo'},
'5025552':{'en': 'Tigo'},
'505820':{'en': 'Claro'},
'505821':{'en': 'Claro'},
'505822':{'en': 'Claro'},
'505823':{'en': 'Claro'},
'551498807':{'en': 'Oi'},
'551498806':{'en': 'Oi'},
'5533986':{'en': 'Oi'},
'5533987':{'en': 'Oi'},
'5533985':{'en': 'Oi'},
'5533988':{'en': 'Oi'},
'5533989':{'en': 'Oi'},
'554799952':{'en': 'TIM'},
'554799953':{'en': 'TIM'},
'234173':{'en': 'Starcomms'},
'552499297':{'en': 'Claro BR'},
'552499294':{'en': 'Claro BR'},
'552499295':{'en': 'Claro BR'},
'552499292':{'en': 'Claro BR'},
'552499293':{'en': 'Claro BR'},
'234174':{'en': 'Starcomms'},
'554799956':{'en': 'TIM'},
'552499298':{'en': 'Claro BR'},
'552499299':{'en': 'Claro BR'},
'553798425':{'en': 'Claro BR'},
'554799954':{'en': 'TIM'},
'554799955':{'en': 'TIM'},
'553199819':{'en': 'Telemig Celular'},
'447929':{'en': 'Orange'},
'447924':{'en': 'Manx Telecom'},
'447920':{'en': 'Vodafone'},
'551899628':{'en': 'Vivo'},
'551899629':{'en': 'Vivo'},
'551899624':{'en': 'Vivo'},
'551899625':{'en': 'Vivo'},
'551899626':{'en': 'Vivo'},
'551899627':{'en': 'Vivo'},
'551899621':{'en': 'Vivo'},
'551899622':{'en': 'Vivo'},
'551899623':{'en': 'Vivo'},
'240550':{'en': 'Muni'},
'240551':{'en': 'HiTS'},
'553599816':{'en': 'Telemig Celular'},
'553599817':{'en': 'Telemig Celular'},
'553599814':{'en': 'Telemig Celular'},
'553599815':{'en': 'Telemig Celular'},
'553599812':{'en': 'Telemig Celular'},
'553599813':{'en': 'Telemig Celular'},
'553599811':{'en': 'Telemig Celular'},
'552299254':{'en': 'Claro BR'},
'1246259':{'en': 'Digicel'},
'1246258':{'en': 'Digicel'},
'551195780':{'en': 'Vivo'},
'551195781':{'en': 'Vivo'},
'551195782':{'en': 'Vivo'},
'551195783':{'en': 'Vivo'},
'1246257':{'en': 'Digicel'},
'1246256':{'en': 'Digicel'},
'551195786':{'en': 'Vivo'},
'554398432':{'en': 'Brasil Telecom GSM'},
'5521989':{'en': 'Oi'},
'5521988':{'en': 'Oi'},
'167189':{'en': 'Choice Phone'},
'167188':{'en': 'Choice Phone'},
'167187':{'en': 'Choice Phone'},
'167185':{'en': 'i CAN_GSM'},
'167184':{'en': 'i CAN_GSM'},
'167183':{'en': 'i CAN_GSM'},
'5521987':{'en': 'Oi'},
'5521986':{'en': 'Oi'},
'5119986':{'en': 'Movistar'},
'5119987':{'en': 'Movistar'},
'5119984':{'en': 'Movistar'},
'551999664':{'en': 'Vivo'},
'551999663':{'en': 'Vivo'},
'551999662':{'en': 'Vivo'},
'5119980':{'en': 'Movistar'},
'551498154':{'en': 'TIM'},
'5119988':{'en': 'Movistar'},
'5119989':{'en': 'Movistar'},
'551498156':{'en': 'TIM'},
'551498151':{'en': 'TIM'},
'551498153':{'en': 'TIM'},
'551498152':{'en': 'TIM'},
'553299971':{'en': 'Telemig Celular'},
'551699712':{'en': 'Vivo'},
'37544':{'be': 'Velcom', 'en': 'Velcom', 'ru': 'Velcom'},
'551699713':{'en': 'Vivo'},
'459272':{'en': 'Thyfon'},
'459271':{'en': 'Naka AG'},
'459270':{'en': 'Ice Danmark'},
'516796771':{'en': 'Claro'},
'516796770':{'en': 'Claro'},
'506702':{'en': 'Claro'},
'506703':{'en': 'Claro'},
'506704':{'en': 'Claro'},
'506705':{'en': 'Claro'},
'506706':{'en': 'Claro'},
'506707':{'en': 'Claro'},
'506708':{'en': 'Claro'},
'506709':{'en': 'Claro'},
'554398429':{'en': 'Brasil Telecom GSM'},
'554398428':{'en': 'Brasil Telecom GSM'},
'553899107':{'en': 'TIM'},
'553899106':{'en': 'TIM'},
'553899105':{'en': 'TIM'},
'553899104':{'en': 'TIM'},
'553899103':{'en': 'TIM'},
'553899102':{'en': 'TIM'},
'553899101':{'en': 'TIM'},
'517697658':{'en': 'Movistar'},
'517697657':{'en': 'Movistar'},
'517697656':{'en': 'Movistar'},
'517697655':{'en': 'Movistar'},
'517697654':{'en': 'Movistar'},
'517697653':{'en': 'Movistar'},
'517697652':{'en': 'Movistar'},
'517697651':{'en': 'Movistar'},
'517697650':{'en': 'Movistar'},
'447722':{'en': 'EE'},
'447723':{'en': 'Three'},
'447720':{'en': 'O2'},
'447721':{'en': 'Vodafone'},
'447726':{'en': 'EE'},
'447727':{'en': 'Three'},
'447724':{'en': 'O2'},
'447725':{'en': 'O2'},
'447728':{'en': 'Three'},
'447729':{'en': 'O2'},
'479683':{'en': 'NetCom'},
'5528985':{'en': 'Oi'},
'324630':{'en': 'TISMI BV'},
'551599115':{'en': 'Claro BR'},
'551599114':{'en': 'Claro BR'},
'554399154':{'en': 'Vivo'},
'51529523':{'en': 'Claro'},
'551599116':{'en': 'Claro BR'},
'51529526':{'en': 'Movistar'},
'554399152':{'en': 'Vivo'},
'51529528':{'en': 'Movistar'},
'551798811':{'en': 'Oi'},
'551798810':{'en': 'Oi'},
'551798813':{'en': 'Oi'},
'551798812':{'en': 'Oi'},
'474551':{'en': 'NetCom'},
'474550':{'en': 'NetCom'},
'554399151':{'en': 'Vivo'},
'479357':{'en': 'NetCom'},
'474559':{'en': 'NetCom'},
'2348885':{'en': 'Starcomms'},
'2348886':{'en': 'Starcomms'},
'2348887':{'en': 'Starcomms'},
'1876506':{'en': 'Digicel'},
'1876507':{'en': 'Digicel'},
'1876504':{'en': 'Digicel'},
'1876505':{'en': 'Digicel'},
'1876503':{'en': 'Digicel'},
'30690599':{'en': 'BWS'},
'1784489':{'en': 'Cable & Wireless'},
'1876508':{'en': 'Digicel'},
'1876509':{'en': 'Digicel'},
'256723':{'en': 'Afrimax'},
'256720':{'en': 'Smile'},
'554599135':{'en': 'Vivo'},
'256726':{'en': 'Tangerine'},
'553799995':{'en': 'Telemig Celular'},
'553799994':{'en': 'Telemig Celular'},
'553799997':{'en': 'Telemig Celular'},
'554798407':{'en': 'Brasil Telecom GSM'},
'554798406':{'en': 'Brasil Telecom GSM'},
'554798405':{'en': 'Brasil Telecom GSM'},
'554798404':{'en': 'Brasil Telecom GSM'},
'554798403':{'en': 'Brasil Telecom GSM'},
'554798402':{'en': 'Brasil Telecom GSM'},
'554798401':{'en': 'Brasil Telecom GSM'},
'554798409':{'en': 'Brasil Telecom GSM'},
'554798408':{'en': 'Brasil Telecom GSM'},
'2346482':{'en': 'Starcomms'},
'2346481':{'en': 'Starcomms'},
'2346489':{'en': 'Starcomms'},
'34635':{'en': 'Orange'},
'34637':{'en': 'Vodafone'},
'34636':{'en': 'Movistar'},
'34631':{'en': 'Lycamobile'},
'34630':{'en': 'Movistar'},
'34633':{'en': 'Yoigo'},
'34632':{'en': 'Lycamobile'},
'554199257':{'en': 'Vivo'},
'554199256':{'en': 'Vivo'},
'554199255':{'en': 'Vivo'},
'554199254':{'en': 'Vivo'},
'34639':{'en': 'Movistar'},
'34638':{'en': 'Movistar'},
'554199251':{'en': 'Vivo'},
'553399102':{'en': 'TIM'},
'553399103':{'en': 'TIM'},
'553399101':{'en': 'TIM'},
'4474088':{'en': 'Truphone'},
'4474089':{'en': 'Truphone'},
'553399104':{'en': 'TIM'},
'553399105':{'en': 'TIM'},
'553399108':{'en': 'TIM'},
'553399109':{'en': 'TIM'},
'4474080':{'en': 'Truphone'},
'4474081':{'en': 'Truphone'},
'4474082':{'en': 'Truphone'},
'35850':{'en': 'Elisa'},
'4474884':{'en': 'Three'},
'4474885':{'en': 'Three'},
'4474886':{'en': 'Lanonyx'},
'4474887':{'en': 'Three'},
'4474880':{'en': 'Fogg'},
'4474881':{'en': 'CESG'},
'4474882':{'en': 'Sky'},
'4474883':{'en': 'Sky'},
'4474888':{'en': 'Ziron'},
'4474889':{'en': 'Three'},
'55159968':{'en': 'Vivo'},
'551698139':{'en': 'TIM'},
'551698138':{'en': 'TIM'},
'551698131':{'en': 'TIM'},
'553199101':{'en': 'TIM'},
'551698133':{'en': 'TIM'},
'551698132':{'en': 'TIM'},
'551698135':{'en': 'TIM'},
'551698134':{'en': 'TIM'},
'551698137':{'en': 'TIM'},
'551698136':{'en': 'TIM'},
'1787459':{'en': 'SunCom Wireless Puerto Rico'},
'1787458':{'en': 'SunCom Wireless Puerto Rico'},
'2202':{'en': 'Africell'},
'2203':{'en': 'QCell'},
'551196060':{'en': 'Vivo'},
'2206':{'en': 'Comium'},
'2207':{'en': 'Africell'},
'2209':{'en': 'Gamcel'},
'1787453':{'en': 'Claro'},
'1787454':{'en': 'SunCom Wireless Puerto Rico'},
'1758488':{'en': 'Cable & Wireless'},
'1758489':{'en': 'Cable & Wireless'},
'1758486':{'en': 'Cable & Wireless'},
'1758487':{'en': 'Cable & Wireless'},
'1758484':{'en': 'Cable & Wireless'},
'1758485':{'en': 'Cable & Wireless'},
'4529':{'en': 'TDC'},
'4528':{'en': 'Telia'},
'4527':{'en': 'Telia'},
'4526':{'en': 'Telia'},
'4524':{'en': 'TDC'},
'4522':{'en': 'Telenor'},
'4521':{'en': 'TDC'},
'35569':{'en': 'Vodafone'},
'515495992':{'en': 'Movistar'},
'447803':{'en': 'O2'},
'515495991':{'en': 'Movistar'},
'515495996':{'en': 'Movistar'},
'515495997':{'en': 'Movistar'},
'447802':{'en': 'O2'},
'515495998':{'en': 'Movistar'},
'515495999':{'en': 'Movistar'},
'447801':{'en': 'O2'},
'447800':{'en': 'Orange'},
'551798808':{'en': 'Oi'},
'518498406':{'en': 'Movistar'},
'551798809':{'en': 'Oi'},
'35567':{'en': 'ALBtelecom'},
'447805':{'en': 'Orange'},
'554199241':{'en': 'Vivo'},
'518498405':{'en': 'Movistar'},
'551798804':{'en': 'Oi'},
'553199818':{'en': 'Telemig Celular'},
'551798805':{'en': 'Oi'},
'553199812':{'en': 'Telemig Celular'},
'553199813':{'en': 'Telemig Celular'},
'553199811':{'en': 'Telemig Celular'},
'553199816':{'en': 'Telemig Celular'},
'553199817':{'en': 'Telemig Celular'},
'553199814':{'en': 'Telemig Celular'},
'553199815':{'en': 'Telemig Celular'},
'553299974':{'en': 'Telemig Celular'},
'553299975':{'en': 'Telemig Celular'},
'553299976':{'en': 'Telemig Celular'},
'553299977':{'en': 'Telemig Celular'},
'553199339':{'en': 'TIM'},
'553299972':{'en': 'Telemig Celular'},
'553299973':{'en': 'Telemig Celular'},
'553199338':{'en': 'TIM'},
'553299979':{'en': 'Telemig Celular'},
'553199747':{'en': 'Telemig Celular'},
'553199745':{'en': 'Telemig Celular'},
'552899973':{'en': 'Vivo'},
'553399921':{'en': 'Telemig Celular'},
'553399922':{'en': 'Telemig Celular'},
'553799996':{'en': 'Telemig Celular'},
'553799991':{'en': 'Telemig Celular'},
'553799993':{'en': 'Telemig Celular'},
'553799992':{'en': 'Telemig Celular'},
'553799999':{'en': 'Telemig Celular'},
'553799998':{'en': 'Telemig Celular'},
'55159960':{'en': 'Vivo'},
'55159961':{'en': 'Vivo'},
'55159962':{'en': 'Vivo'},
'55159963':{'en': 'Vivo'},
'55159964':{'en': 'Vivo'},
'55159965':{'en': 'Vivo'},
'55159966':{'en': 'Vivo'},
'55159967':{'en': 'Vivo'},
'3460222':{'en': 'Vozelia'},
'552899972':{'en': 'Vivo'},
'1268774':{'en': 'APUA'},
'1268775':{'en': 'APUA'},
'553799199':{'en': 'TIM'},
'553799198':{'en': 'TIM'},
'1268773':{'en': 'APUA'},
'553799194':{'en': 'TIM'},
'553799197':{'en': 'TIM'},
'553799191':{'en': 'TIM'},
'553799193':{'en': 'TIM'},
'553799192':{'en': 'TIM'},
'553199742':{'en': 'Telemig Celular'},
'553199743':{'en': 'Telemig Celular'},
'553199741':{'en': 'Telemig Celular'},
'553199746':{'en': 'Telemig Celular'},
'30689900':{'en': 'OTEGlobe'},
'553199744':{'en': 'Telemig Celular'},
'551799708':{'en': 'Vivo'},
'39377':{'en': 'Vodafone'},
'24384':{'en': 'CCT'},
'553199748':{'en': 'Telemig Celular'},
'553199749':{'en': 'Telemig Celular'},
'39373':{'en': '3 Italia'},
'39370':{'en': 'TIM'},
'24380':{'en': 'Supercell'},
'24381':{'en': 'Vodacom'},
'24382':{'en': 'Vodacom'},
'180979':{'en': 'Claro'},
'187658':{'en': 'Digicel'},
'5037789':{'en': 'Tigo'},
'5037788':{'en': 'Tigo'},
'5037787':{'en': 'Tigo'},
'180974':{'en': 'Claro'},
'187657':{'en': 'Digicel'},
'180976':{'en': 'Claro'},
'180971':{'en': 'Claro'},
'180970':{'en': 'Claro'},
'5037781':{'en': 'Movistar'},
'187652':{'en': 'Digicel'},
'24388':{'en': 'Yozma Timeturns sprl -YTT'},
'24389':{'en': 'Tigo'},
'180977':{'en': 'Viva'},
'55439882':{'en': 'Claro BR'},
'5037784':{'en': 'Movistar'},
'55439883':{'en': 'Claro BR'},
'552899977':{'en': 'Vivo'},
'2994':{'en': 'TELE Greenland A/S'},
'553599911':{'en': 'Telemig Celular'},
'2995':{'en': 'TELE Greenland A/S'},
'1787928':{'en': 'CENTENNIAL'},
'55439881':{'en': 'Claro BR'},
'1787923':{'en': 'SunCom Wireless Puerto Rico'},
'180972':{'en': 'Claro'},
'1787924':{'en': 'CENTENNIAL'},
'1787927':{'en': 'CENTENNIAL'},
'1787926':{'en': 'CENTENNIAL'},
'5025539':{'en': 'Telgua'},
'5025538':{'en': 'Telgua'},
'55439884':{'en': 'Claro BR'},
'552899976':{'en': 'Vivo'},
'5025533':{'en': 'Telgua'},
'5025532':{'en': 'Telgua'},
'5025531':{'en': 'Telgua'},
'5025537':{'en': 'Telgua'},
'5025536':{'en': 'Telgua'},
'5025535':{'en': 'Telgua'},
'5025534':{'en': 'Telgua'},
'553199669':{'en': 'Telemig Celular'},
'505848':{'en': 'Movistar'},
'505846':{'en': 'Movistar'},
'505847':{'en': 'Movistar'},
'505845':{'en': 'Movistar'},
'517396844':{'en': 'Movistar'},
'517396842':{'en': 'Movistar'},
'517396843':{'en': 'Movistar'},
'517396840':{'en': 'Movistar'},
'517396841':{'en': 'Movistar'},
'55199979':{'en': 'Vivo'},
'55199978':{'en': 'Vivo'},
'554899939':{'en': 'TIM'},
'553398448':{'en': 'Claro BR'},
'553398449':{'en': 'Claro BR'},
'554899938':{'en': 'TIM'},
'553398444':{'en': 'Claro BR'},
'553398445':{'en': 'Claro BR'},
'553398446':{'en': 'Claro BR'},
'553398447':{'en': 'Claro BR'},
'553398441':{'en': 'Claro BR'},
'553398442':{'en': 'Claro BR'},
'553398443':{'en': 'Claro BR'},
'234195':{'en': 'Starcomms'},
'5036430':{'en': 'Movistar'},
'5036431':{'en': 'Movistar'},
'35467':{'en': 'Vodafone'},
'35466':{'en': 'Vodafone'},
'35462':{'en': 'Vodafone'},
'553298483':{'en': 'Claro BR'},
'30691888':{'en': 'OSE'},
'553298481':{'en': 'Claro BR'},
'553298480':{'en': 'Claro BR'},
'35469':{'en': 'Vodafone'},
'35468':{'en': 'Vodafone'},
'553199187':{'en': 'TIM'},
'554899933':{'en': 'TIM'},
'554899932':{'en': 'TIM'},
'554899935':{'en': 'TIM'},
'554899934':{'en': 'TIM'},
'554899937':{'en': 'TIM'},
'554899936':{'en': 'TIM'},
'552499280':{'en': 'Claro BR'},
'553599834':{'en': 'Telemig Celular'},
'553599835':{'en': 'Telemig Celular'},
'553599836':{'en': 'Telemig Celular'},
'553599837':{'en': 'Telemig Celular'},
'553599831':{'en': 'Telemig Celular'},
'553599832':{'en': 'Telemig Celular'},
'553599833':{'en': 'Telemig Celular'},
'553599838':{'en': 'Telemig Celular'},
'553599839':{'en': 'Telemig Celular'},
'514494815':{'en': 'Movistar'},
'514494814':{'en': 'Movistar'},
'514494816':{'en': 'Movistar'},
'514494811':{'en': 'Movistar'},
'514494810':{'en': 'Movistar'},
'514494813':{'en': 'Movistar'},
'514494812':{'en': 'Movistar'},
'551197030':{'en': 'TIM'},
'551197031':{'en': 'TIM'},
'552899971':{'en': 'Vivo'},
'554299949':{'en': 'TIM'},
'552799312':{'en': 'Claro BR'},
'552799311':{'en': 'Claro BR'},
'551999609':{'en': 'Vivo'},
'551999608':{'en': 'Vivo'},
'551999605':{'en': 'Vivo'},
'551999604':{'en': 'Vivo'},
'551999607':{'en': 'Vivo'},
'551999606':{'en': 'Vivo'},
'551999601':{'en': 'Vivo'},
'551999603':{'en': 'Vivo'},
'551999602':{'en': 'Vivo'},
'1787922':{'en': 'SunCom Wireless Puerto Rico'},
'552899975':{'en': 'Vivo'},
'1473402':{'en': 'Affordable Island Communications'},
'552899974':{'en': 'Vivo'},
'553899184':{'en': 'TIM'},
'553899183':{'en': 'TIM'},
'3469337':{'en': 'MasMovil'},
'3469336':{'en': 'MasMovil'},
'553899182':{'en': 'TIM'},
'354617':{'en': 'Vodafone'},
'354616':{'en': 'Vodafone'},
'354615':{'en': 'Vodafone'},
'354614':{'en': 'Tal'},
'551898119':{'en': 'TIM'},
'551898118':{'en': 'TIM'},
'551898115':{'en': 'TIM'},
'551898114':{'en': 'TIM'},
'551898117':{'en': 'TIM'},
'551898116':{'en': 'TIM'},
'551898111':{'en': 'TIM'},
'551898113':{'en': 'TIM'},
'354612':{'en': 'Tal'},
'4474527':{'en': 'Three'},
'45529':{'en': 'CBB Mobil'},
'45528':{'en': 'CBB Mobil'},
'459217':{'en': 'Interactive digital media GmbH'},
'4476669':{'en': 'FIO Telecom'},
'134554':{'en': 'Digicel'},
'134555':{'en': 'Digicel'},
'45255':{'en': 'Telenor'},
'45526':{'en': 'Lebara Limited'},
'45253':{'en': 'Telenor'},
'134551':{'en': 'Digicel'},
'134552':{'en': 'Digicel'},
'45522':{'en': 'Telia'},
'554398409':{'en': 'Brasil Telecom GSM'},
'554398408':{'en': 'Brasil Telecom GSM'},
'554398403':{'en': 'Brasil Telecom GSM'},
'554398402':{'en': 'Brasil Telecom GSM'},
'554398401':{'en': 'Brasil Telecom GSM'},
'554398407':{'en': 'Brasil Telecom GSM'},
'554398406':{'en': 'Brasil Telecom GSM'},
'554398405':{'en': 'Brasil Telecom GSM'},
'554398404':{'en': 'Brasil Telecom GSM'},
'554798416':{'en': 'Brasil Telecom GSM'},
'554798417':{'en': 'Brasil Telecom GSM'},
'455211':{'en': '3'},
'455210':{'en': 'Firstcom'},
'455212':{'en': '3'},
'474184':{'en': 'Telenor'},
'474185':{'en': 'Telenor'},
'553899165':{'en': 'TIM'},
'551399210':{'en': 'Claro BR'},
'553899167':{'en': 'TIM'},
'553899166':{'en': 'TIM'},
'553899161':{'en': 'TIM'},
'553899163':{'en': 'TIM'},
'551399211':{'en': 'Claro BR'},
'1784490':{'en': 'Cable & Wireless'},
'1784491':{'en': 'Cable & Wireless'},
'1784492':{'en': 'Cable & Wireless'},
'1784493':{'en': 'Cable & Wireless'},
'1784494':{'en': 'Cable & Wireless'},
'1784495':{'en': 'Cable & Wireless'},
'324618':{'en': 'N.M.B.S.'},
'1787253':{'en': 'Claro'},
'4476692':{'en': 'O2'},
'38763':{'en': 'HT ERONET'},
'38762':{'en': 'BH Telecom'},
'38761':{'en': 'BH Telecom'},
'38760':{'en': 'BH Telecom'},
'38767':{'en': 'm:tel'},
'38766':{'en': 'm:tel'},
'38765':{'en': 'm:tel'},
'38764':{'en': 'HT ERONET'},
'514494995':{'en': 'Movistar'},
'549231':{'en': 'Personal'},
'549230':{'en': 'Personal'},
'549233':{'en': 'Personal'},
'479377':{'en': 'NetCom'},
'549235':{'en': 'Personal'},
'549234':{'en': 'Personal'},
'549236':{'en': 'Personal'},
'549239':{'en': 'Personal'},
'1787254':{'en': 'Claro'},
'17676':{'en': 'Digicel'},
'474539':{'en': 'NetCom'},
'1787259':{'en': 'Claro'},
'1787258':{'en': 'Claro'},
'1876560':{'en': 'Digicel'},
'1876561':{'en': 'Digicel'},
'1876562':{'en': 'Digicel'},
'1876564':{'en': 'Digicel'},
'1876565':{'en': 'Digicel'},
'1876566':{'en': 'Digicel'},
'1876567':{'en': 'Digicel'},
'1876568':{'en': 'Digicel'},
'1876569':{'en': 'Digicel'},
'554299947':{'en': 'TIM'},
'2343988':{'en': 'Starcomms'},
'2343989':{'en': 'Starcomms'},
'27710':{'en': 'MTN'},
'551699792':{'en': 'Vivo'},
'27717':{'en': 'MTN'},
'551699791':{'en': 'Vivo'},
'27718':{'en': 'MTN'},
'27719':{'en': 'MTN'},
'2343985':{'en': 'Starcomms'},
'2343986':{'en': 'Starcomms'},
'2343987':{'en': 'Starcomms'},
'552198384':{'en': 'TIM'},
'552198385':{'en': 'TIM'},
'552198386':{'en': 'TIM'},
'4478299':{'en': 'Airtel'},
'4478298':{'en': 'Airtel'},
'552198382':{'en': 'TIM'},
'552198383':{'en': 'TIM'},
'554899175':{'en': 'Vivo'},
'554899174':{'en': 'Vivo'},
'4478297':{'en': 'Airtel'},
'554899176':{'en': 'Vivo'},
'554899171':{'en': 'Vivo'},
'554899173':{'en': 'Vivo'},
'554899172':{'en': 'Vivo'},
'554199243':{'en': 'Vivo'},
'554199244':{'en': 'Vivo'},
'2343181':{'en': 'Starcomms'},
'2343182':{'en': 'Starcomms'},
'2343183':{'en': 'Starcomms'},
'2343184':{'en': 'Starcomms'},
'2343185':{'en': 'Starcomms'},
'2343186':{'en': 'Starcomms'},
'2343187':{'en': 'Starcomms'},
'2343188':{'en': 'Starcomms'},
'503600':{'en': 'Tigo'},
'503601':{'en': 'Tigo'},
'553399128':{'en': 'TIM'},
'553399129':{'en': 'TIM'},
'554199237':{'en': 'Vivo'},
'34610':{'en': 'Vodafone'},
'34617':{'en': 'Vodafone'},
'34616':{'en': 'Movistar'},
'34615':{'en': 'Orange'},
'554199232':{'en': 'Vivo'},
'553399121':{'en': 'TIM'},
'34619':{'en': 'Movistar'},
'34618':{'en': 'Movistar'},
'553399124':{'en': 'TIM'},
'553399125':{'en': 'TIM'},
'553399126':{'en': 'TIM'},
'553399127':{'en': 'TIM'},
'24595':{'en': 'Orange'},
'35699':{'en': 'Vodafone'},
'24597':{'en': 'Guinetel'},
'24596':{'en': 'Spacetel'},
'35692':{'en': 'Vodafone'},
'35696':{'en': 'YOM'},
'447450':{'en': 'Three'},
'517497957':{'en': 'Movistar'},
'3460302':{'en': 'Vodafone'},
'4175':{'en': 'Swisscom'},
'4176':{'en': 'Sunrise'},
'4177':{'en': 'Tele4u'},
'1787719':{'en': 'CENTENNIAL'},
'1787717':{'en': 'CENTENNIAL'},
'4178':{'en': 'Salt'},
'4179':{'en': 'Swisscom'},
'459247':{'en': 'Telenor Connexion AB'},
'551899180':{'en': 'Claro BR'},
'551298168':{'en': 'TIM'},
'551298169':{'en': 'TIM'},
'551298162':{'en': 'TIM'},
'551298163':{'en': 'TIM'},
'551298161':{'en': 'TIM'},
'551298166':{'en': 'TIM'},
'551298167':{'en': 'TIM'},
'551298164':{'en': 'TIM'},
'551298165':{'en': 'TIM'},
'551398809':{'en': 'Oi'},
'551698119':{'en': 'TIM'},
'1787434':{'en': 'CENTENNIAL'},
'551698117':{'en': 'TIM'},
'551698116':{'en': 'TIM'},
'551698115':{'en': 'TIM'},
'551698114':{'en': 'TIM'},
'551698113':{'en': 'TIM'},
'551698112':{'en': 'TIM'},
'551698111':{'en': 'TIM'},
'553199161':{'en': 'TIM'},
'447883':{'en': 'Three'},
'4475374':{'en': 'Vodafone'},
'4475377':{'en': 'CFL'},
'4475376':{'en': 'Mediatel'},
'447887':{'en': 'Vodafone'},
'4475370':{'en': 'Wavecrest'},
'447885':{'en': 'O2'},
'447884':{'en': 'Vodafone'},
'354611':{'en': 'Tal'},
'2224':{'en': 'Mauritel'},
'447888':{'en': 'Three'},
'2222':{'en': 'Chinguitel'},
'2223':{'en': 'Mattel'},
'554299911':{'en': 'TIM'},
'554299913':{'en': 'TIM'},
'1787389':{'en': 'Claro'},
'1787385':{'en': 'Claro'},
'1787384':{'en': 'Claro'},
'30691345':{'en': 'Nova'},
'1787381':{'en': 'Claro'},
'1787380':{'en': 'Claro'},
'1787383':{'en': 'Claro'},
'1787382':{'en': 'Claro'},
'51198008':{'en': 'Movistar'},
'51198009':{'en': 'Movistar'},
'554299918':{'en': 'TIM'},
'51198003':{'en': 'Movistar'},
'51198004':{'en': 'Movistar'},
'51198005':{'en': 'Movistar'},
'51198006':{'en': 'Movistar'},
'51198007':{'en': 'Movistar'},
'553298482':{'en': 'Claro BR'},
'459156':{'en': 'TDC'},
'459157':{'en': 'Mundio Mobile'},
'459154':{'en': 'TDC'},
'459155':{'en': 'TDC'},
'459152':{'en': 'TDC'},
'459153':{'en': 'TDC'},
'459150':{'en': 'Telenor Connexion AB'},
'459151':{'en': 'Telenor Connexion AB'},
'553199838':{'en': 'Telemig Celular'},
'553199839':{'en': 'Telemig Celular'},
'459158':{'en': 'NextGen Mobile Ldt T/A CardBoardFish'},
'459159':{'en': 'SimService'},
'553298485':{'en': 'Claro BR'},
'553199855':{'en': 'Telemig Celular'},
'553298484':{'en': 'Claro BR'},
'554499125':{'en': 'Vivo'},
'553199768':{'en': 'Telemig Celular'},
'553199769':{'en': 'Telemig Celular'},
'553199761':{'en': 'Telemig Celular'},
'553199762':{'en': 'Telemig Celular'},
'553199763':{'en': 'Telemig Celular'},
'553199764':{'en': 'Telemig Celular'},
'553199765':{'en': 'Telemig Celular'},
'553199766':{'en': 'Telemig Celular'},
'553199767':{'en': 'Telemig Celular'},
'180954':{'en': 'Claro'},
'180951':{'en': 'Claro'},
'551799759':{'en': 'Vivo'},
'1787940':{'en': 'CENTENNIAL'},
'1787947':{'en': 'CENTENNIAL'},
'1787949':{'en': 'SunCom Wireless Puerto Rico'},
'5527988':{'en': 'Oi'},
'553599188':{'en': 'TIM'},
'5025519':{'en': 'Movistar'},
'5025518':{'en': 'Movistar'},
'505867':{'en': 'Movistar'},
'505868':{'en': 'Movistar'},
'554698404':{'en': 'Brasil Telecom GSM'},
'554698405':{'en': 'Brasil Telecom GSM'},
'554698406':{'en': 'Brasil Telecom GSM'},
'554698407':{'en': 'Brasil Telecom GSM'},
'554698401':{'en': 'Brasil Telecom GSM'},
'554698402':{'en': 'Brasil Telecom GSM'},
'554698403':{'en': 'Brasil Telecom GSM'},
'4475588':{'en': 'Cloud9'},
'4475580':{'en': 'Mobile FX Services Ltd'},
'553199925':{'en': 'Telemig Celular'},
'553499802':{'en': 'Telemig Celular'},
'551798126':{'en': 'TIM'},
'3519205':{'en': 'Lycamobile'},
'3519204':{'en': 'Lycamobile'},
'3519203':{'en': 'Lycamobile'},
'3519202':{'en': 'Lycamobile'},
'3519201':{'en': 'Lycamobile'},
'3519200':{'en': 'Lycamobile'},
'553499808':{'en': 'Telemig Celular'},
'553499809':{'en': 'Telemig Celular'},
'4474185':{'en': 'Telna'},
'4474184':{'en': 'Manx Telecom'},
'4474187':{'en': 'Teleena'},
'4474186':{'en': 'Ace Call'},
'4474181':{'en': 'Bellingham'},
'4474180':{'en': 'Three'},
'4474183':{'en': 'Tismi'},
'4474182':{'en': 'TGL'},
'4474189':{'en': 'Teleena'},
'35489':{'en': u('S\u00edminn')},
'35485':{'en': u('S\u00edminn')},
'35484':{'en': u('S\u00edminn')},
'35486':{'en': u('S\u00edminn')},
'35483':{'en': u('S\u00edminn')},
'35482':{'en': 'Vodafone'},
'23836':{'en': 'CVMOVEL'},
'23833':{'en': 'T+'},
'551599690':{'en': 'Vivo'},
'551599691':{'en': 'Vivo'},
'551599696':{'en': 'Vivo'},
'551599697':{'en': 'Vivo'},
'551599694':{'en': 'Vivo'},
'551599695':{'en': 'Vivo'},
'55119798':{'en': 'Oi'},
'552798182':{'en': 'TIM'},
'551699994':{'en': 'Vivo'},
'551699991':{'en': 'Vivo'},
'389729':{'en': 'T-Mobile'},
'389725':{'en': 'T-Mobile'},
'389724':{'en': 'T-Mobile'},
'389727':{'en': 'T-Mobile'},
'389726':{'en': 'T-Mobile'},
'389721':{'en': 'T-Mobile'},
'553899153':{'en': 'TIM'},
'389723':{'en': 'T-Mobile'},
'389722':{'en': 'T-Mobile'},
'552198326':{'en': 'TIM'},
'552198327':{'en': 'TIM'},
'552198324':{'en': 'TIM'},
'551999623':{'en': 'Vivo'},
'551999622':{'en': 'Vivo'},
'551999621':{'en': 'Vivo'},
'2305871':{'en': 'MTML'},
'2305876':{'en': 'Cellplus'},
'2305877':{'en': 'Cellplus'},
'551999625':{'en': 'Vivo'},
'2305875':{'en': 'Cellplus'},
'552198322':{'en': 'TIM'},
'2305878':{'en': 'Cellplus'},
'551999628':{'en': 'Vivo'},
'552198323':{'en': 'TIM'},
'553199176':{'en': 'TIM'},
'553199171':{'en': 'TIM'},
'491590':{'en': 'O2'},
'552198321':{'en': 'TIM'},
'552498123':{'en': 'TIM'},
'359988':{'en': 'Bob'},
'551698124':{'en': 'TIM'},
'359989':{'en': 'Mtel'},
'551698125':{'en': 'TIM'},
'552299259':{'en': 'Claro BR'},
'507639':{'en': u('Telef\u00f3nica M\u00f3viles')},
'21265':{'en': 'Maroc Telecom'},
'21267':{'en': 'Maroc Telecom'},
'21260':{'en': 'Inwi'},
'21261':{'en': 'Maroc Telecom'},
'551898133':{'en': 'TIM'},
'551898132':{'en': 'TIM'},
'551898131':{'en': 'TIM'},
'346728':{'en': 'Lebara'},
'346729':{'en': 'Lebara'},
'551898135':{'en': 'TIM'},
'551898134':{'en': 'TIM'},
'346725':{'en': 'Lebara'},
'551898139':{'en': 'TIM'},
'551898138':{'en': 'TIM'},
'4476608':{'en': 'Premium O'},
'4476609':{'en': 'Premium O'},
'45509':{'en': 'Telenor'},
'45508':{'en': 'Telenor'},
'2415':{'en': 'Moov'},
'2414':{'en': 'Airtel'},
'2417':{'en': 'Airtel'},
'2416':{'en': 'Libertis'},
'45503':{'en': 'Lebara Limited'},
'45502':{'en': 'Lebara Limited'},
'4476602':{'en': 'PageOne'},
'4476603':{'en': 'PageOne'},
'45507':{'en': 'Telenor'},
'4476605':{'en': 'PageOne'},
'45505':{'en': 'CBB Mobil'},
'45504':{'en': 'CBB Mobil'},
'254759':{'en': 'Safaricom'},
'254758':{'en': 'Safaricom'},
'455233':{'en': 'CBB Mobil'},
'455230':{'en': 'YouSee'},
'254757':{'en': 'Safaricom'},
'553899143':{'en': 'TIM'},
'553899142':{'en': 'TIM'},
'553899141':{'en': 'TIM'},
'551998227':{'en': 'TIM'},
'553899147':{'en': 'TIM'},
'553899146':{'en': 'TIM'},
'553899145':{'en': 'TIM'},
'553899144':{'en': 'TIM'},
'553899149':{'en': 'TIM'},
'553899148':{'en': 'TIM'},
'515495811':{'en': 'Claro'},
'515495810':{'en': 'Claro'},
'554899153':{'en': 'Vivo'},
'3469310':{'en': 'MasMovil'},
'517497840':{'en': 'Movistar'},
'517497841':{'en': 'Movistar'},
'517497842':{'en': 'Movistar'},
'517497843':{'en': 'Movistar'},
'147390':{'en': 'Affordable Island Communications'},
'551799783':{'en': 'Vivo'},
'551799780':{'en': 'Vivo'},
'551799784':{'en': 'Vivo'},
'551799785':{'en': 'Vivo'},
'324672':{'en': 'Join Experience Belgium'},
'324671':{'en': 'Join Experience Belgium'},
'324676':{'en': 'Lycamobile'},
'554899151':{'en': 'Vivo'},
'55419871':{'en': 'Claro BR'},
'55419870':{'en': 'Claro BR'},
'55419873':{'en': 'Claro BR'},
'47480':{'en': 'Telenor'},
'47481':{'en': 'Telenor'},
'47482':{'en': 'Telenor'},
'55419872':{'en': 'Claro BR'},
'479391':{'en': 'NetCom'},
'51429429':{'en': 'Movistar'},
'51429424':{'en': 'Movistar'},
'51429427':{'en': 'Claro'},
'51429426':{'en': 'Movistar'},
'554798412':{'en': 'Brasil Telecom GSM'},
'55349916':{'en': 'TIM'},
'55349917':{'en': 'TIM'},
'55349914':{'en': 'TIM'},
'55349915':{'en': 'TIM'},
'55349912':{'en': 'TIM'},
'55349913':{'en': 'TIM'},
'55349911':{'en': 'TIM'},
'554798413':{'en': 'Brasil Telecom GSM'},
'4474516':{'en': 'UK Broadband'},
'4474517':{'en': 'UK Broadband'},
'55189978':{'en': 'Vivo'},
'4474515':{'en': 'Premium O'},
'4474512':{'en': 'Tismi'},
'554798443':{'en': 'Brasil Telecom GSM'},
'554798442':{'en': 'Brasil Telecom GSM'},
'554798441':{'en': 'Brasil Telecom GSM'},
'554798414':{'en': 'Brasil Telecom GSM'},
'554798447':{'en': 'Brasil Telecom GSM'},
'554798446':{'en': 'Brasil Telecom GSM'},
'554798445':{'en': 'Brasil Telecom GSM'},
'554798444':{'en': 'Brasil Telecom GSM'},
'554899629':{'en': 'TIM'},
'554899628':{'en': 'TIM'},
'554798449':{'en': 'Brasil Telecom GSM'},
'554798448':{'en': 'Brasil Telecom GSM'},
'31629':{'en': 'Vodafone Libertel B.V.'},
'31625':{'en': 'Vodafone Libertel B.V.'},
'31624':{'en': 'T-Mobile'},
'31627':{'en': 'Vodafone Libertel B.V.'},
'31626':{'en': 'Telfort'},
'31621':{'en': 'Vodafone Libertel B.V.'},
'31620':{'en': 'KPN'},
'31623':{'en': 'KPN'},
'31622':{'en': 'KPN'},
'554798415':{'en': 'Brasil Telecom GSM'},
'554199219':{'en': 'Vivo'},
'554199218':{'en': 'Vivo'},
'554199213':{'en': 'Vivo'},
'554199212':{'en': 'Vivo'},
'554199211':{'en': 'Vivo'},
'554199217':{'en': 'Vivo'},
'32456':{'en': 'Mobile Vikings/JIM Mobile'},
'32455':{'en': 'VOO'},
'554199214':{'en': 'Vivo'},
'34679':{'en': 'Movistar'},
'554899994':{'en': 'TIM'},
'144159':{'en': 'Digicel Bermuda'},
'144153':{'en': 'Digicel Bermuda'},
'144152':{'en': 'Digicel Bermuda'},
'144151':{'en': 'Digicel Bermuda'},
'144150':{'en': 'Digicel Bermuda'},
'5517991':{'en': 'Claro BR'},
'551799713':{'en': 'Vivo'},
'552299255':{'en': 'Claro BR'},
'554298401':{'en': 'Brasil Telecom GSM'},
'180969':{'en': 'Claro'},
'554298403':{'en': 'Brasil Telecom GSM'},
'373610':{'en': 'Orange'},
'373611':{'en': 'Orange'},
'551799716':{'en': 'Vivo'},
'554298406':{'en': 'Brasil Telecom GSM'},
'554298407':{'en': 'Brasil Telecom GSM'},
'33659':{'en': 'Bouygues'},
'26460':{'en': 'Telecom Namibia'},
'552299257':{'en': 'Claro BR'},
'503620':{'en': 'Digicel'},
'180967':{'en': 'Claro'},
'554899158':{'en': 'Vivo'},
'551298141':{'en': 'TIM'},
'551298142':{'en': 'TIM'},
'551298143':{'en': 'TIM'},
'551298144':{'en': 'TIM'},
'551298145':{'en': 'TIM'},
'551298146':{'en': 'TIM'},
'551298147':{'en': 'TIM'},
'551298148':{'en': 'TIM'},
'551298149':{'en': 'TIM'},
'551698175':{'en': 'TIM'},
'551698174':{'en': 'TIM'},
'551698177':{'en': 'TIM'},
'551698176':{'en': 'TIM'},
'551698171':{'en': 'TIM'},
'551698173':{'en': 'TIM'},
'551698172':{'en': 'TIM'},
'514394379':{'en': 'Movistar'},
'514394378':{'en': 'Movistar'},
'551698179':{'en': 'TIM'},
'1787410':{'en': 'SunCom Wireless Puerto Rico'},
'447869':{'en': 'Three'},
'447868':{'en': 'Three'},
'447865':{'en': 'Three'},
'486998':{'en': 'Plus'},
'447866':{'en': 'Orange'},
'447861':{'en': 'Three'},
'447860':{'en': 'O2'},
'447863':{'en': 'Three'},
'447862':{'en': 'Three'},
'180965':{'en': 'Tricom'},
'180962':{'en': 'Tricom'},
'55119638':{'en': 'Vivo'},
'55119639':{'en': 'Vivo'},
'55119630':{'en': 'Claro BR'},
'55119631':{'en': 'Claro BR'},
'55119632':{'en': 'Claro BR'},
'55119633':{'en': 'Claro BR'},
'55119637':{'en': 'Vivo'},
'507657':{'en': u('Telef\u00f3nica M\u00f3viles')},
'24911':{'en': 'Sudatel'},
'24910':{'en': 'Sudatel'},
'24912':{'en': 'Sudatel'},
'237659':{'en': 'Orange'},
'237658':{'en': 'Orange'},
'237653':{'en': 'MTN Cameroon'},
'237652':{'en': 'MTN Cameroon'},
'237651':{'en': 'MTN Cameroon'},
'237650':{'en': 'MTN Cameroon'},
'237657':{'en': 'Orange'},
'237656':{'en': 'Orange'},
'237655':{'en': 'Orange'},
'237654':{'en': 'MTN Cameroon'},
'1939940':{'en': 'CENTENNIAL'},
'553599993':{'en': 'Telemig Celular'},
'552799299':{'en': 'Claro BR'},
'552799298':{'en': 'Claro BR'},
'552799297':{'en': 'Claro BR'},
'552799296':{'en': 'Claro BR'},
'552799295':{'en': 'Claro BR'},
'552799294':{'en': 'Claro BR'},
'552799293':{'en': 'Claro BR'},
'552799292':{'en': 'Claro BR'},
'3462529':{'en': 'MasMovil'},
'553199856':{'en': 'Telemig Celular'},
'553199857':{'en': 'Telemig Celular'},
'553199854':{'en': 'Telemig Celular'},
'2607':{'en': 'MTN'},
'553199852':{'en': 'Telemig Celular'},
'553199853':{'en': 'Telemig Celular'},
'553199851':{'en': 'Telemig Celular'},
'553199858':{'en': 'Telemig Celular'},
'553199859':{'en': 'Telemig Celular'},
'553199831':{'en': 'Telemig Celular'},
'2344282':{'en': 'Starcomms'},
'2344280':{'en': 'Starcomms'},
'2344281':{'en': 'Starcomms'},
'553799951':{'en': 'Telemig Celular'},
'553799953':{'en': 'Telemig Celular'},
'553799952':{'en': 'Telemig Celular'},
'30690499':{'en': 'BWS'},
'553399969':{'en': 'Telemig Celular'},
'553799957':{'en': 'Telemig Celular'},
'553799956':{'en': 'Telemig Celular'},
'553399964':{'en': 'Telemig Celular'},
'553399965':{'en': 'Telemig Celular'},
'553399966':{'en': 'Telemig Celular'},
'553399967':{'en': 'Telemig Celular'},
'517297268':{'en': 'Movistar'},
'553399962':{'en': 'Telemig Celular'},
'553399963':{'en': 'Telemig Celular'},
'553199832':{'en': 'Telemig Celular'},
'455398':{'en': 'NextGen Mobile Ldt T/A CardBoardFish'},
'346113':{'en': 'Lebara'},
'346112':{'en': 'Lebara'},
'553199833':{'en': 'Telemig Celular'},
'346110':{'en': 'Republica Movil'},
'553599996':{'en': 'Telemig Celular'},
'1767265':{'en': 'Cable & Wireless'},
'553199708':{'en': 'Telemig Celular'},
'553199709':{'en': 'Telemig Celular'},
'553199706':{'en': 'Telemig Celular'},
'553199707':{'en': 'Telemig Celular'},
'553199704':{'en': 'Telemig Celular'},
'553199705':{'en': 'Telemig Celular'},
'553199702':{'en': 'Telemig Celular'},
'553199703':{'en': 'Telemig Celular'},
'553199701':{'en': 'Telemig Celular'},
'180931':{'en': 'Tricom'},
'180930':{'en': 'Viva'},
'180932':{'en': 'Tricom'},
'180934':{'en': 'Tricom'},
'50234':{'en': 'Movistar'},
'50232':{'en': 'Tigo'},
'50231':{'en': 'Tigo'},
'50230':{'en': 'Tigo'},
'551499142':{'en': 'Claro BR'},
'50376869':{'en': 'Movistar'},
'50376868':{'en': 'Movistar'},
'553599994':{'en': 'Telemig Celular'},
'50376865':{'en': 'Movistar'},
'50376867':{'en': 'Movistar'},
'50376866':{'en': 'Movistar'},
'1787969':{'en': 'CENTENNIAL'},
'1787968':{'en': 'CENTENNIAL'},
'502508':{'en': 'Movistar'},
'502509':{'en': 'Movistar'},
'502506':{'en': 'Tigo'},
'502507':{'en': 'Movistar'},
'502504':{'en': 'Tigo'},
'502505':{'en': 'Tigo'},
'1787961':{'en': 'CENTENNIAL'},
'502503':{'en': 'Tigo'},
'502500':{'en': 'Tigo'},
'502501':{'en': 'Telgua'},
'551898112':{'en': 'TIM'},
'505884':{'en': 'Claro'},
'505885':{'en': 'Claro'},
'505882':{'en': 'Claro'},
'505883':{'en': 'Claro'},
'551498814':{'en': 'Oi'},
'50949':{'en': 'Digicel'},
'50948':{'en': 'Digicel'},
'50944':{'en': 'Digicel'},
'50947':{'en': 'Digicel'},
'45258':{'en': 'Telenor'},
'50941':{'en': 'Natcom'},
'50940':{'en': 'Natcom'},
'50943':{'en': 'Natcom'},
'50942':{'en': 'Natcom'},
'459219':{'en': 'Telenor Connexion AB'},
'551498812':{'en': 'Oi'},
'3471770':{'en': 'PepePhone'},
'45524':{'en': 'Telia'},
'553499821':{'en': 'Telemig Celular'},
'553499822':{'en': 'Telemig Celular'},
'553499823':{'en': 'Telemig Celular'},
'553499824':{'en': 'Telemig Celular'},
'45527':{'en': 'Lebara Limited'},
'3519221':{'en': 'CTT'},
'3519220':{'en': 'CTT'},
'3519222':{'en': 'CTT'},
'554799966':{'en': 'TIM'},
'45521':{'en': 'Telia'},
'474705':{'en': 'NetCom'},
'45252':{'en': 'Telenor'},
'4476660':{'en': '24 Seven'},
'554799963':{'en': 'TIM'},
'554799961':{'en': 'TIM'},
'552198372':{'en': 'TIM'},
'27636':{'en': 'Vodacom'},
'3519285':{'en': 'ONITELECOM'},
'551899686':{'en': 'Vivo'},
'551899687':{'en': 'Vivo'},
'551899684':{'en': 'Vivo'},
'551899685':{'en': 'Vivo'},
'551899682':{'en': 'Vivo'},
'551899683':{'en': 'Vivo'},
'474761':{'en': 'Telenor'},
'51659657':{'en': 'Claro'},
'3519281':{'en': 'NOWO'},
'553199826':{'en': 'Telemig Celular'},
'3519280':{'en': 'NOWO'},
'553199825':{'en': 'Telemig Celular'},
'553199824':{'en': 'Telemig Celular'},
'5037981':{'en': 'Intelfon'},
'5037980':{'en': 'Intelfon'},
'5037983':{'en': 'Intelfon'},
'5037982':{'en': 'Intelfon'},
'5037985':{'en': 'Claro'},
'5037984':{'en': 'Intelfon'},
'5037987':{'en': 'Claro'},
'5037986':{'en': 'Claro'},
'5037989':{'en': 'Claro'},
'5037988':{'en': 'Claro'},
'389707':{'en': 'T-Mobile'},
'389706':{'en': 'T-Mobile'},
'389705':{'en': 'T-Mobile'},
'389704':{'en': 'T-Mobile'},
'389703':{'en': 'T-Mobile'},
'389702':{'en': 'T-Mobile'},
'389701':{'en': 'T-Mobile'},
'389709':{'en': 'T-Mobile'},
'389708':{'en': 'T-Mobile'},
'26269381':{'en': 'Only'},
'26269382':{'en': 'Only'},
'26269383':{'en': 'Only'},
'553599134':{'en': 'TIM'},
'4476446':{'en': 'Media'},
'551699723':{'en': 'Vivo'},
'553199289':{'en': 'TIM'},
'553199288':{'en': 'TIM'},
'4476440':{'en': 'O2'},
'4476441':{'en': 'O2'},
'553199283':{'en': 'TIM'},
'515695616':{'en': 'Movistar'},
'515695615':{'en': 'Movistar'},
'515695614':{'en': 'Movistar'},
'515695613':{'en': 'Movistar'},
'515695612':{'en': 'Movistar'},
'515695611':{'en': 'Movistar'},
'515695610':{'en': 'Movistar'},
'551498143':{'en': 'TIM'},
'553599138':{'en': 'TIM'},
'553899169':{'en': 'TIM'},
'553598405':{'en': 'Claro BR'},
'30695210':{'en': 'MI Carrier Services'},
'37525':{'be': u('\u0411\u0435\u0421\u0422'), 'en': 'life:)', 'ru': 'life:)'},
'553899168':{'en': 'TIM'},
'4476620':{'en': 'Premium O'},
'2169':{'en': 'Tunisie Telecom'},
'551498148':{'en': 'TIM'},
'553899164':{'en': 'TIM'},
'2165':{'en': 'Orange'},
'551498149':{'en': 'TIM'},
'2162':{'en': 'Ooredoo'},
'2344673':{'en': 'Starcomms'},
'2344672':{'en': 'Starcomms'},
'2344671':{'en': 'Starcomms'},
'455252':{'en': 'Lebara Limited'},
'455255':{'en': 'CBB Mobil'},
'455254':{'en': 'SimService'},
'455257':{'en': 'SimService'},
'455256':{'en': 'SimService'},
'455259':{'en': '42 Telecom AB'},
'455258':{'en': 'YouSee'},
'2344679':{'en': 'Starcomms'},
'2344678':{'en': 'Starcomms'},
'553499229':{'en': 'TIM'},
'554799611':{'en': 'TIM'},
'554799613':{'en': 'TIM'},
'26263909':{'en': 'SFR'},
'553798419':{'en': 'Claro BR'},
'553798418':{'en': 'Claro BR'},
'33609':{'en': 'SFR'},
'33608':{'en': 'Orange France'},
'26263900':{'en': 'Orange'},
'26263901':{'en': 'Orange'},
'33607':{'en': 'Orange France'},
'26263903':{'en': 'Only'},
'479622':{'en': 'Telenor'},
'479623':{'en': 'Telenor'},
'33603':{'en': 'SFR'},
'26263907':{'en': 'Only'},
'324659':{'en': 'Lycamobile'},
'324654':{'en': 'Lycamobile'},
'324655':{'en': 'Lycamobile'},
'324656':{'en': 'Lycamobile'},
'324657':{'en': 'Lycamobile'},
'324651':{'en': 'Lycamobile'},
'324652':{'en': 'Lycamobile'},
'324653':{'en': 'Lycamobile'},
'347477':{'en': 'Orange'},
'554399165':{'en': 'Vivo'},
'554199191':{'en': 'Vivo'},
'554399164':{'en': 'Vivo'},
'347478':{'en': 'Orange'},
'551599106':{'en': 'Claro BR'},
'554199193':{'en': 'Vivo'},
'554399169':{'en': 'Vivo'},
'554199195':{'en': 'Vivo'},
'487285':{'en': 'T-Mobile'},
'487284':{'en': 'T-Mobile'},
'487287':{'en': 'T-Mobile'},
'487286':{'en': 'T-Mobile'},
'487281':{'en': 'T-Mobile'},
'487280':{'en': 'Mobyland'},
'487283':{'en': 'T-Mobile'},
'487282':{'en': 'T-Mobile'},
'47464':{'en': 'NetCom'},
'554199197':{'en': 'Vivo'},
'487288':{'en': 'T-Mobile'},
'551599103':{'en': 'Claro BR'},
'55479921':{'en': 'Vivo'},
'55479920':{'en': 'Vivo'},
'55479923':{'en': 'Vivo'},
'554199199':{'en': 'Vivo'},
'551699752':{'en': 'Vivo'},
'551699753':{'en': 'Vivo'},
'551699751':{'en': 'Vivo'},
'551699756':{'en': 'Vivo'},
'551699757':{'en': 'Vivo'},
'551699754':{'en': 'Vivo'},
'551699755':{'en': 'Vivo'},
'551699758':{'en': 'Vivo'},
'551699759':{'en': 'Vivo'},
'4474570':{'en': 'Vectone Mobile'},
'4474571':{'en': 'Vectone Mobile'},
'4474572':{'en': 'Marathon Telecom'},
'4474573':{'en': 'Vectone Mobile'},
'4474574':{'en': 'Voicetec'},
'4474575':{'en': 'Vectone Mobile'},
'4474576':{'en': 'Sure'},
'4474577':{'en': 'Spacetel'},
'4474578':{'en': 'CardBoardFish'},
'4474579':{'en': 'CardBoardFish'},
'551999626':{'en': 'Vivo'},
'554899607':{'en': 'TIM'},
'552899998':{'en': 'Vivo'},
'554899604':{'en': 'TIM'},
'554899603':{'en': 'TIM'},
'554899602':{'en': 'TIM'},
'554899601':{'en': 'TIM'},
'552899991':{'en': 'Vivo'},
'552899993':{'en': 'Vivo'},
'552899992':{'en': 'Vivo'},
'552899995':{'en': 'Vivo'},
'552899994':{'en': 'Vivo'},
'552899997':{'en': 'Vivo'},
'552899996':{'en': 'Vivo'},
'554598801':{'en': 'Claro BR'},
'554598803':{'en': 'Claro BR'},
'554598802':{'en': 'Claro BR'},
'554598805':{'en': 'Claro BR'},
'554598804':{'en': 'Claro BR'},
'554598807':{'en': 'Claro BR'},
'34650':{'en': 'Movistar'},
'554598809':{'en': 'Claro BR'},
'554598808':{'en': 'Claro BR'},
'34659':{'en': 'Movistar'},
'514194171':{'en': 'Claro'},
'514194170':{'en': 'Claro'},
'514194173':{'en': 'Claro'},
'514194172':{'en': 'Claro'},
'553499104':{'en': 'TIM'},
'55139881':{'en': 'Oi'},
'553499107':{'en': 'TIM'},
'553299103':{'en': 'TIM'},
'55279960':{'en': 'Vivo'},
'553299105':{'en': 'TIM'},
'553299104':{'en': 'TIM'},
'553299107':{'en': 'TIM'},
'553299106':{'en': 'TIM'},
'35383':{'en': '3'},
'554899178':{'en': 'Vivo'},
'35386':{'en': 'O2'},
'35387':{'en': 'Vodafone'},
'35385':{'en': 'Meteor'},
'35388':{'en': 'eMobile'},
'35389':{'en': 'Tesco Mobile'},
'34686':{'en': 'Movistar'},
'34687':{'en': 'Vodafone'},
'34680':{'en': 'Movistar'},
'553499109':{'en': 'TIM'},
'30692354':{'en': 'Premium Net International'},
'22573':{'en': 'Moov'},
'22572':{'en': 'Moov'},
'4474390':{'en': 'TalkTalk'},
'4474391':{'en': 'TalkTalk'},
'4474392':{'en': 'TalkTalk'},
'4474393':{'en': 'TalkTalk'},
'22579':{'en': 'Orange'},
'22578':{'en': 'Orange'},
'34683':{'en': 'Movistar'},
'267775':{'en': 'Orange'},
'267774':{'en': 'Orange'},
'267777':{'en': 'Mascom'},
'267776':{'en': 'Mascom'},
'267771':{'en': 'Mascom'},
'267770':{'en': 'Mascom'},
'267772':{'en': 'BTC Mobile'},
'383461':{'en': 'Z Mobile'},
'267778':{'en': 'Mascom'},
'551999629':{'en': 'Vivo'},
'551298126':{'en': 'TIM'},
'551298127':{'en': 'TIM'},
'551298124':{'en': 'TIM'},
'551298125':{'en': 'TIM'},
'551298122':{'en': 'TIM'},
'551298123':{'en': 'TIM'},
'551298121':{'en': 'TIM'},
'22795':{'en': 'Moov'},
'22794':{'en': 'Moov'},
'22797':{'en': 'Airtel'},
'22796':{'en': 'Airtel'},
'22791':{'en': 'Orange'},
'22790':{'en': 'Orange'},
'551298128':{'en': 'TIM'},
'22792':{'en': 'Orange'},
'447847':{'en': 'EE'},
'447846':{'en': 'Three'},
'554198411':{'en': 'Brasil Telecom GSM'},
'554198416':{'en': 'Brasil Telecom GSM'},
'554198417':{'en': 'Brasil Telecom GSM'},
'554198414':{'en': 'Brasil Telecom GSM'},
'554198415':{'en': 'Brasil Telecom GSM'},
'554198418':{'en': 'Brasil Telecom GSM'},
'554198419':{'en': 'Brasil Telecom GSM'},
'447848':{'en': 'Three'},
'5514996':{'en': 'Vivo'},
'5514997':{'en': 'Vivo'},
'553599957':{'en': 'Telemig Celular'},
'553599956':{'en': 'Telemig Celular'},
'553599955':{'en': 'Telemig Celular'},
'553599954':{'en': 'Telemig Celular'},
'553599953':{'en': 'Telemig Celular'},
'553599952':{'en': 'Telemig Celular'},
'553599951':{'en': 'Telemig Celular'},
'55119619':{'en': 'Vivo'},
'55119617':{'en': 'Claro BR'},
'372545':{'en': 'Elisa'},
'553599959':{'en': 'Telemig Celular'},
'553599958':{'en': 'Telemig Celular'},
'554899972':{'en': 'TIM'},
'551799738':{'en': 'Vivo'},
'51198040':{'en': 'Claro'},
'554399189':{'en': 'Vivo'},
'554399188':{'en': 'Vivo'},
'554399181':{'en': 'Vivo'},
'554399183':{'en': 'Vivo'},
'554399182':{'en': 'Vivo'},
'554399185':{'en': 'Vivo'},
'554399184':{'en': 'Vivo'},
'554399187':{'en': 'Vivo'},
'554399186':{'en': 'Vivo'},
'386691':{'en': 'Compatel'},
'549232':{'en': 'Personal'},
'25228':{'en': 'Nationlink'},
'386696':{'en': 'HoT'},
'25224':{'en': 'Telesom'},
'386699':{'en': 'HoT'},
'55439998':{'en': 'TIM'},
'1939969':{'en': 'CENTENNIAL'},
'553199181':{'en': 'TIM'},
'3465229':{'en': 'MasMovil'},
'55439991':{'en': 'TIM'},
'55439992':{'en': 'TIM'},
'55439995':{'en': 'TIM'},
'1939212':{'en': 'CENTENNIAL'},
'55439997':{'en': 'TIM'},
'554198413':{'en': 'Brasil Telecom GSM'},
'45718':{'en': 'Lycamobile Denmark Ltd'},
'459119':{'en': 'Lebara Limited'},
'553199186':{'en': 'TIM'},
'45712':{'en': 'CBB Mobil'},
'45713':{'en': 'Lycamobile Denmark Ltd'},
'459110':{'en': 'Lebara Limited'},
'2348490':{'en': 'Starcomms'},
'45716':{'en': 'Lycamobile Denmark Ltd'},
'459117':{'en': 'Companymobile'},
'45714':{'en': 'Lycamobile Denmark Ltd'},
'45715':{'en': 'Lycamobile Denmark Ltd'},
'553199189':{'en': 'TIM'},
'553199324':{'en': 'TIM'},
'554298871':{'en': 'Claro BR'},
'554298870':{'en': 'Claro BR'},
'554298873':{'en': 'Claro BR'},
'554298872':{'en': 'Claro BR'},
'554298874':{'en': 'Claro BR'},
'553899109':{'en': 'TIM'},
'26139':{'en': 'Blueline'},
'554699124':{'en': 'Vivo'},
'554699125':{'en': 'Vivo'},
'346681':{'en': 'Truphone'},
'554699127':{'en': 'Vivo'},
'346686':{'en': 'Parlem'},
'346685':{'en': 'Carrefour'},
'553199329':{'en': 'TIM'},
'346688':{'en': 'Parlem'},
'554699128':{'en': 'Vivo'},
'554699129':{'en': 'Vivo'},
'505833':{'en': 'Claro'},
'22898':{'en': 'Moov'},
'22899':{'en': 'Moov'},
'553199878':{'en': 'Telemig Celular'},
'553199879':{'en': 'Telemig Celular'},
'22892':{'en': 'TOGOCEL'},
'22893':{'en': 'TOGOCEL'},
'22890':{'en': 'TOGOCEL'},
'22891':{'en': 'TOGOCEL'},
'22896':{'en': 'Moov'},
'22897':{'en': 'TOGOCEL'},
'553199872':{'en': 'Telemig Celular'},
'553199873':{'en': 'Telemig Celular'},
'553199724':{'en': 'Telemig Celular'},
'553199725':{'en': 'Telemig Celular'},
'347228':{'en': 'Yoigo'},
'553199721':{'en': 'Telemig Celular'},
'553199722':{'en': 'Telemig Celular'},
'553199723':{'en': 'Telemig Celular'},
'347222':{'en': 'Yoigo'},
'347223':{'en': 'Yoigo'},
'347221':{'en': 'Yoigo'},
'347226':{'en': 'Yoigo'},
'347227':{'en': 'Yoigo'},
'347224':{'en': 'Yoigo'},
'347225':{'en': 'Yoigo'},
'187639':{'en': 'Digicel'},
'187638':{'en': 'Digicel'},
'187630':{'en': 'Digicel'},
'187637':{'en': 'Digicel'},
'187636':{'en': 'Digicel'},
'187635':{'en': 'Digicel'},
'553199275':{'en': 'TIM'},
'553899993':{'en': 'Telemig Celular'},
'5037795':{'en': 'Tigo'},
'5037796':{'en': 'Tigo'},
'55459910':{'en': 'Vivo'},
'447536':{'en': 'Orange'},
'447535':{'en': 'EE'},
'5037797':{'en': 'Tigo'},
'447533':{'en': 'Three'},
'447531':{'en': 'Orange'},
'447530':{'en': 'Orange'},
'502520':{'en': 'Tigo'},
'5037790':{'en': 'Movistar'},
'25073':{'en': 'Airtel'},
'447539':{'en': 'EE'},
'5037791':{'en': 'Movistar'},
'24499':{'en': 'Movicel'},
'25072':{'en': 'TIGO'},
'5037792':{'en': 'Movistar'},
'24491':{'en': 'Movicel'},
'24492':{'en': 'UNITEL'},
'5037793':{'en': 'Movistar'},
'24494':{'en': 'UNITEL'},
'4475091':{'en': 'JT'},
'553599902':{'en': 'Telemig Celular'},
'30691600':{'en': 'Compatel'},
'554599139':{'en': 'Vivo'},
'553599908':{'en': 'Telemig Celular'},
'346042':{'en': 'Lebara'},
'474728':{'en': 'Tele2'},
'474729':{'en': 'Tele2'},
'3519243':{'en': 'MEO'},
'3519242':{'en': 'MEO'},
'3519241':{'en': 'MEO'},
'3519240':{'en': 'MEO'},
'474724':{'en': 'Tele2'},
'474725':{'en': 'Tele2'},
'474726':{'en': 'Tele2'},
'3519244':{'en': 'MEO'},
'4478648':{'en': 'O2'},
'4478649':{'en': 'O2'},
'4478642':{'en': 'O2'},
'4478643':{'en': 'O2'},
'4478640':{'en': 'O2'},
'4478641':{'en': 'O2'},
'4478646':{'en': 'O2'},
'4478647':{'en': 'O2'},
'4478645':{'en': 'O2'},
'554399175':{'en': 'Vivo'},
'26263962':{'en': 'Orange'},
'554899922':{'en': 'TIM'},
'2346277':{'en': 'Starcomms'},
'554899923':{'en': 'TIM'},
'2346279':{'en': 'Starcomms'},
'2346278':{'en': 'Starcomms'},
'554899921':{'en': 'TIM'},
'552798157':{'en': 'TIM'},
'554899926':{'en': 'TIM'},
'554399176':{'en': 'Vivo'},
'554899924':{'en': 'TIM'},
'554899925':{'en': 'TIM'},
'552798156':{'en': 'TIM'},
'12647':{'en': 'Cable & Wireless'},
'551699796':{'en': 'Vivo'},
'389763':{'en': 'Vip'},
'389762':{'en': 'Vip'},
'389765':{'en': 'Vip'},
'389764':{'en': 'Vip'},
'389767':{'en': 'Vip'},
'389766':{'en': 'Vip'},
'389769':{'en': 'Vip'},
'389768':{'en': 'Vip'},
'551699794':{'en': 'Vivo'},
'551699793':{'en': 'Vivo'},
'1787374':{'en': 'Claro'},
'552899966':{'en': 'Vivo'},
'336363':{'en': 'SFR'},
'336362':{'en': 'SFR'},
'336361':{'en': 'SFR'},
'336360':{'en': 'SFR'},
'336364':{'en': 'SFR'},
'554899121':{'en': 'Vivo'},
'553199261':{'en': 'TIM'},
'553199263':{'en': 'TIM'},
'553199262':{'en': 'TIM'},
'553199265':{'en': 'TIM'},
'553199264':{'en': 'TIM'},
'553199267':{'en': 'TIM'},
'553199266':{'en': 'TIM'},
'553199269':{'en': 'TIM'},
'1787375':{'en': 'Claro'},
'553899197':{'en': 'TIM'},
'458182':{'en': 'Polperro'},
'458180':{'en': 'ipvision'},
'458181':{'en': 'Maxtel.dk'},
'552899968':{'en': 'Vivo'},
'458188':{'en': 'ipvision'},
'554899179':{'en': 'Vivo'},
'552198381':{'en': 'TIM'},
'1787203':{'en': 'Claro'},
'230586':{'en': 'MTML'},
'230584':{'en': 'Emtel'},
'230585':{'en': 'Emtel'},
'230582':{'en': 'Cellplus'},
'230583':{'en': 'Cellplus'},
'230580':{'en': 'Cellplus'},
'230581':{'en': 'Cellplus'},
'554899177':{'en': 'Vivo'},
'230589':{'en': 'MTML'},
'55319823':{'en': 'Claro BR'},
'55319822':{'en': 'Claro BR'},
'55319821':{'en': 'Claro BR'},
'55319820':{'en': 'Claro BR'},
'553499202':{'en': 'TIM'},
'553499203':{'en': 'TIM'},
'455277':{'en': 'CBB Mobil'},
'553499205':{'en': 'TIM'},
'553499206':{'en': 'TIM'},
'553499207':{'en': 'TIM'},
'554899126':{'en': 'Vivo'},
'479609':{'en': 'Telenor'},
'26269241':{'en': 'Orange'},
'26269240':{'en': 'Orange'},
'26269243':{'en': 'Orange'},
'30695499':{'en': 'M-STAT'},
'26263926':{'en': 'Only'},
'479601':{'en': 'Telenor'},
'147352':{'en': 'Affordable Island Communications'},
'147353':{'en': 'AWS Grenada'},
'479604':{'en': 'Telenor'},
'30695490':{'en': 'MI Carrier Services'},
'25290':{'en': 'Golis Telecom'},
'45818':{'en': 'CBB Mobil'},
'554899979':{'en': 'TIM'},
'48535':{'en': 'Play'},
'45816':{'en': 'CBB Mobil'},
'45811':{'en': 'CBB Mobil'},
'48530':{'en': 'Play'},
'48533':{'en': 'Play'},
'48532':{'en': 'T-Mobile'},
'55249995':{'en': 'Vivo'},
'55249994':{'en': 'Vivo'},
'55249997':{'en': 'Vivo'},
'55249996':{'en': 'Vivo'},
'55249991':{'en': 'Vivo'},
'1876275':{'en': 'Digicel'},
'1876276':{'en': 'Digicel'},
'1876277':{'en': 'Digicel'},
'1876278':{'en': 'Digicel'},
'1876279':{'en': 'Digicel'},
'55249999':{'en': 'Vivo'},
'55249998':{'en': 'Vivo'},
'503602':{'en': 'Tigo'},
'514294202':{'en': 'Movistar'},
'514294200':{'en': 'Movistar'},
'514294201':{'en': 'Movistar'},
'55439990':{'en': 'TIM'},
'30685505':{'en': 'Cyta'},
'554199235':{'en': 'Vivo'},
'55389998':{'en': 'Telemig Celular'},
'554199234':{'en': 'Vivo'},
'55389992':{'en': 'Telemig Celular'},
'37061':{'en': 'Omnitel'},
'55389991':{'en': 'Telemig Celular'},
'55389996':{'en': 'Telemig Celular'},
'55389997':{'en': 'Telemig Celular'},
'55389994':{'en': 'Telemig Celular'},
'30685500':{'en': 'Cyta'},
'55229975':{'en': 'Vivo'},
'55229974':{'en': 'Vivo'},
'554199236':{'en': 'Vivo'},
'55229971':{'en': 'Vivo'},
'55229970':{'en': 'Vivo'},
'55229973':{'en': 'Vivo'},
'55229972':{'en': 'Vivo'},
'26263904':{'en': 'Only'},
'554199231':{'en': 'Vivo'},
'554698821':{'en': 'Claro BR'},
'55449885':{'en': 'Claro BR'},
'55449884':{'en': 'Claro BR'},
'554598825':{'en': 'Claro BR'},
'554598824':{'en': 'Claro BR'},
'55449881':{'en': 'Claro BR'},
'554199233':{'en': 'Vivo'},
'55449883':{'en': 'Claro BR'},
'55449882':{'en': 'Claro BR'},
'554599963':{'en': 'TIM'},
'554598829':{'en': 'Claro BR'},
'554598828':{'en': 'Claro BR'},
'554599962':{'en': 'TIM'},
'553299129':{'en': 'TIM'},
'553299128':{'en': 'TIM'},
'553299127':{'en': 'TIM'},
'553299126':{'en': 'TIM'},
'553299125':{'en': 'TIM'},
'553299124':{'en': 'TIM'},
'553299123':{'en': 'TIM'},
'553299122':{'en': 'TIM'},
'553299121':{'en': 'TIM'},
'447490':{'en': 'Three'},
'447491':{'en': 'Three'},
'447492':{'en': 'Three'},
'447493':{'en': 'Vodafone'},
'447494':{'en': 'EE'},
'447495':{'en': 'EE'},
'447496':{'en': 'EE'},
'447497':{'en': 'EE'},
'447498':{'en': 'EE'},
'447499':{'en': 'O2'},
'55219736':{'en': 'Claro BR'},
'55219730':{'en': 'Claro BR'},
'55219731':{'en': 'Claro BR'},
'55219732':{'en': 'Claro BR'},
'55219733':{'en': 'Claro BR'},
'551699778':{'en': 'Vivo'},
'554599969':{'en': 'TIM'},
'2343964':{'en': 'Starcomms'},
'2343965':{'en': 'Starcomms'},
'2343962':{'en': 'Starcomms'},
'2343963':{'en': 'Starcomms'},
'2343961':{'en': 'Starcomms'},
'551699770':{'en': 'Vivo'},
'551699771':{'en': 'Vivo'},
'551699772':{'en': 'Vivo'},
'551699773':{'en': 'Vivo'},
'551699774':{'en': 'Vivo'},
'551699775':{'en': 'Vivo'},
'551699776':{'en': 'Vivo'},
'551699777':{'en': 'Vivo'},
'551799717':{'en': 'Vivo'},
'22559':{'en': 'Orange'},
'22558':{'en': 'Orange'},
'22557':{'en': 'Orange'},
'22556':{'en': 'MTN'},
'22555':{'en': 'MTN'},
'22554':{'en': 'MTN'},
'22553':{'en': 'Moov'},
'22552':{'en': 'Moov'},
'22551':{'en': 'Moov'},
'22550':{'en': 'Moov'},
'553499812':{'en': 'Telemig Celular'},
'267759':{'en': 'Mascom'},
'267758':{'en': 'BTC Mobile'},
'267757':{'en': 'Orange'},
'267756':{'en': 'Mascom'},
'267755':{'en': 'Mascom'},
'267754':{'en': 'Mascom'},
'267753':{'en': 'Orange'},
'267752':{'en': 'Orange'},
'267751':{'en': 'Orange'},
'267750':{'en': 'Orange'},
'554599151':{'en': 'Vivo'},
'554599152':{'en': 'Vivo'},
'554599153':{'en': 'Vivo'},
'554599154':{'en': 'Vivo'},
'554599155':{'en': 'Vivo'},
'554599156':{'en': 'Vivo'},
'554599157':{'en': 'Vivo'},
'554599158':{'en': 'Vivo'},
'26269322':{'en': 'Orange'},
'554198438':{'en': 'Brasil Telecom GSM'},
'554198439':{'en': 'Brasil Telecom GSM'},
'26269320':{'en': 'SFR'},
'514394335':{'en': 'Claro'},
'514394334':{'en': 'Claro'},
'554198432':{'en': 'Brasil Telecom GSM'},
'554198433':{'en': 'Brasil Telecom GSM'},
'514394331':{'en': 'Claro'},
'514394330':{'en': 'Claro'},
'514394333':{'en': 'Claro'},
'514394332':{'en': 'Claro'},
'447821':{'en': 'O2'},
'447820':{'en': 'O2'},
'447823':{'en': 'Vodafone'},
'447825':{'en': 'Vodafone'},
'447824':{'en': 'Vodafone'},
'447827':{'en': 'Vodafone'},
'447826':{'en': 'Vodafone'},
'447828':{'en': 'Three'},
'1939645':{'en': 'CENTENNIAL'},
'1939644':{'en': 'CENTENNIAL'},
'1939642':{'en': 'CENTENNIAL'},
'1939640':{'en': 'CENTENNIAL'},
'553599939':{'en': 'Telemig Celular'},
'553599938':{'en': 'Telemig Celular'},
'553599935':{'en': 'Telemig Celular'},
'553599934':{'en': 'Telemig Celular'},
'553599937':{'en': 'Telemig Celular'},
'553599936':{'en': 'Telemig Celular'},
'553599931':{'en': 'Telemig Celular'},
'553599933':{'en': 'Telemig Celular'},
'553599932':{'en': 'Telemig Celular'},
'186829':{'en': 'bmobile'},
'186828':{'en': 'bmobile'},
'186827':{'en': 'bmobile'},
'186826':{'en': 'bmobile'},
'515495896':{'en': 'Claro'},
'51519518':{'en': 'Movistar'},
'51519514':{'en': 'Movistar'},
'51519517':{'en': 'Claro'},
'51519516':{'en': 'Movistar'},
'51519511':{'en': 'Claro'},
'51519510':{'en': 'Movistar'},
'51519513':{'en': 'Claro'},
'51519512':{'en': 'Claro'},
'306908':{'en': 'Wind'},
'306909':{'en': 'Wind'},
'517697695':{'en': 'Movistar'},
'306900':{'en': 'BWS'},
'515495890':{'en': 'Movistar'},
'306906':{'en': 'Wind'},
'306907':{'en': 'Wind'},
'25248':{'en': 'AirSom'},
'25249':{'en': 'AirSom'},
'551999762':{'en': 'Vivo'},
'551999763':{'en': 'Vivo'},
'517697698':{'en': 'Movistar'},
'551999766':{'en': 'Vivo'},
'551999767':{'en': 'Vivo'},
'551999764':{'en': 'Vivo'},
'551999765':{'en': 'Vivo'},
'551999768':{'en': 'Vivo'},
'551999769':{'en': 'Vivo'},
'516196171':{'en': 'Claro'},
'516196170':{'en': 'Claro'},
'5025911':{'en': 'Telgua'},
'5025910':{'en': 'Telgua'},
'5025913':{'en': 'Telgua'},
'5025912':{'en': 'Telgua'},
'5025915':{'en': 'Movistar'},
'5025914':{'en': 'Telgua'},
'5025917':{'en': 'Movistar'},
'5025916':{'en': 'Movistar'},
'5025919':{'en': 'Tigo'},
'5025918':{'en': 'Tigo'},
'552498112':{'en': 'TIM'},
'552498113':{'en': 'TIM'},
'552498111':{'en': 'TIM'},
'552498116':{'en': 'TIM'},
'552498117':{'en': 'TIM'},
'45812':{'en': 'CBB Mobil'},
'552498115':{'en': 'TIM'},
'552498118':{'en': 'TIM'},
'552498119':{'en': 'TIM'},
'554498427':{'en': 'Brasil Telecom GSM'},
'554998409':{'en': 'Brasil Telecom GSM'},
'553199618':{'en': 'Telemig Celular'},
'553199619':{'en': 'Telemig Celular'},
'554998401':{'en': 'Brasil Telecom GSM'},
'554998403':{'en': 'Brasil Telecom GSM'},
'554998402':{'en': 'Brasil Telecom GSM'},
'554998405':{'en': 'Brasil Telecom GSM'},
'554998404':{'en': 'Brasil Telecom GSM'},
'554998407':{'en': 'Brasil Telecom GSM'},
'554998406':{'en': 'Brasil Telecom GSM'},
'50670011':{'en': 'Claro'},
'50670010':{'en': 'Claro'},
'50670013':{'en': 'Claro'},
'50670012':{'en': 'Claro'},
'50670014':{'en': 'Claro'},
'553199892':{'en': 'Telemig Celular'},
'553199893':{'en': 'Telemig Celular'},
'553199891':{'en': 'Telemig Celular'},
'459130':{'en': 'MobiWeb Limited'},
'553199897':{'en': 'Telemig Celular'},
'553199894':{'en': 'Telemig Celular'},
'553199895':{'en': 'Telemig Celular'},
'553199898':{'en': 'Telemig Celular'},
'553199899':{'en': 'Telemig Celular'},
'346404':{'en': 'MasMovil'},
'55249963':{'en': 'Vivo'},
'553199614':{'en': 'Telemig Celular'},
'553199615':{'en': 'Telemig Celular'},
'479297':{'en': 'NetCom'},
'553199616':{'en': 'Telemig Celular'},
'553199617':{'en': 'Telemig Celular'},
'554898451':{'en': 'Brasil Telecom GSM'},
'554898452':{'en': 'Brasil Telecom GSM'},
'554899116':{'en': 'Vivo'},
'553799919':{'en': 'Telemig Celular'},
'553799918':{'en': 'Telemig Celular'},
'553799915':{'en': 'Telemig Celular'},
'553799914':{'en': 'Telemig Celular'},
'553799917':{'en': 'Telemig Celular'},
'553799916':{'en': 'Telemig Celular'},
'553799911':{'en': 'Telemig Celular'},
'553799913':{'en': 'Telemig Celular'},
'553799912':{'en': 'Telemig Celular'},
'447551':{'en': 'Vodafone'},
'447550':{'en': 'EE'},
'447553':{'en': 'Vodafone'},
'447552':{'en': 'Vodafone'},
'447555':{'en': 'Vodafone'},
'447554':{'en': 'Vodafone'},
'447557':{'en': 'Vodafone'},
'447556':{'en': 'Orange'},
'479479':{'en': 'Telenor'},
'479478':{'en': 'Telenor'},
'479477':{'en': 'Telenor'},
'479476':{'en': 'Telenor'},
'479475':{'en': 'Telenor'},
'479474':{'en': 'Telenor'},
'553199919':{'en': 'Telemig Celular'},
'212696':{'en': 'Maroc Telecom'},
'212697':{'en': 'Maroc Telecom'},
'212694':{'en': u('M\u00e9ditel')},
'212695':{'en': 'Inwi'},
'212693':{'en': u('M\u00e9ditel')},
'212690':{'en': 'Inwi'},
'212691':{'en': u('M\u00e9ditel')},
'212698':{'en': 'Inwi'},
'212699':{'en': 'Inwi'},
'554799941':{'en': 'TIM'},
'474740':{'en': 'Telenor'},
'554799942':{'en': 'TIM'},
'474746':{'en': 'Telenor'},
'554799944':{'en': 'TIM'},
'474744':{'en': 'NetCom'},
'554799946':{'en': 'TIM'},
'554799949':{'en': 'TIM'},
'554799948':{'en': 'TIM'},
'551498121':{'en': 'TIM'},
'502540':{'en': 'Movistar'},
'551498123':{'en': 'TIM'},
'551498124':{'en': 'TIM'},
'551498125':{'en': 'TIM'},
'551498126':{'en': 'TIM'},
'551498127':{'en': 'TIM'},
'551498128':{'en': 'TIM'},
'551498129':{'en': 'TIM'},
'553199348':{'en': 'TIM'},
'23891':{'en': 'T+'},
'23326':{'en': 'Airtel'},
'503767':{'en': 'Tigo'},
'23892':{'en': 'T+'},
'23895':{'en': 'CVMOVEL'},
'23897':{'en': 'CVMOVEL'},
'23320':{'en': 'Vodafone'},
'23899':{'en': 'CVMOVEL'},
'23898':{'en': 'CVMOVEL'},
'336045':{'en': 'SFR'},
'503768':{'en': 'Tigo'},
'23328':{'en': 'Expresso'},
'50366116':{'en': 'Movistar'},
'554699975':{'en': 'TIM'},
'553199349':{'en': 'TIM'},
'553899998':{'en': 'Telemig Celular'},
'551699962':{'en': 'Vivo'},
'436778':{'en': 'T-Mobile AT'},
'34682':{'en': 'Movistar'},
'3465529':{'en': 'DIA'},
'553899991':{'en': 'Telemig Celular'},
'507687':{'en': 'Cable & Wireless'},
'507684':{'en': 'Cable & Wireless'},
'553199309':{'en': 'TIM'},
'507680':{'en': 'Cable & Wireless'},
'553199302':{'en': 'TIM'},
'553199303':{'en': 'TIM'},
'553199301':{'en': 'TIM'},
'553199306':{'en': 'TIM'},
'553199307':{'en': 'TIM'},
'507688':{'en': 'Cable & Wireless'},
'553199305':{'en': 'TIM'},
'553899997':{'en': 'Telemig Celular'},
'4478228':{'en': 'Vodafone'},
'55199961':{'en': 'Vivo'},
'4478229':{'en': 'Oxygen8'},
'551698118':{'en': 'TIM'},
'3505':{'en': 'GibTel'},
'491578':{'en': 'Eplus'},
'491579':{'en': 'Eplus/Sipgate'},
'554899183':{'en': 'Vivo'},
'5519991':{'en': 'Claro BR'},
'5519993':{'en': 'Claro BR'},
'5519992':{'en': 'Claro BR'},
'491570':{'en': 'Eplus/Telogic'},
'491573':{'en': 'Eplus'},
'491575':{'en': 'Eplus'},
'491577':{'en': 'Eplus'},
'517396950':{'en': 'Movistar'},
'517396951':{'en': 'Movistar'},
'517396952':{'en': 'Movistar'},
'517396953':{'en': 'Movistar'},
'517396954':{'en': 'Movistar'},
'517396955':{'en': 'Movistar'},
'517396956':{'en': 'Movistar'},
'517396957':{'en': 'Movistar'},
'4476402':{'en': 'FIO Telecom'},
'4476403':{'en': 'PageOne'},
'4476400':{'en': 'Core Telecom'},
'1939697':{'en': 'CENTENNIAL'},
'4476406':{'en': 'PageOne'},
'4476407':{'en': 'PageOne'},
'4476404':{'en': 'PageOne'},
'553199163':{'en': 'TIM'},
'55479998':{'en': 'TIM'},
'359996':{'en': 'Bulsatcom'},
'5037780':{'en': 'Movistar'},
'447882':{'en': 'Three'},
'40772':{'en': 'Digi Mobil'},
'447881':{'en': 'Vodafone'},
'553899995':{'en': 'Telemig Celular'},
'1787226':{'en': 'SunCom Wireless Puerto Rico'},
'1787227':{'en': 'CENTENNIAL'},
'1787224':{'en': 'CENTENNIAL'},
'447880':{'en': 'Vodafone'},
'1787222':{'en': 'CENTENNIAL'},
'1787223':{'en': 'CENTENNIAL'},
'1787220':{'en': 'CENTENNIAL'},
'1787221':{'en': 'CENTENNIAL'},
'4475371':{'en': 'Stour Marine'},
'447886':{'en': 'Three'},
'4475373':{'en': 'Swiftnet'},
'447889':{'en': 'O2'},
'553599198':{'en': 'TIM'},
'4475379':{'en': 'Three'},
'4475378':{'en': 'Three'},
'474104':{'en': 'NetCom'},
'474106':{'en': 'NetCom'},
'2341883':{'en': 'Starcomms'},
'2341882':{'en': 'Starcomms'},
'2341881':{'en': 'Starcomms'},
'2341880':{'en': 'Starcomms'},
'1939394':{'en': 'CENTENNIAL'},
'554399156':{'en': 'Vivo'},
'553199939':{'en': 'Telemig Celular'},
'553199938':{'en': 'Telemig Celular'},
'553199931':{'en': 'Telemig Celular'},
'553199933':{'en': 'Telemig Celular'},
'553199932':{'en': 'Telemig Celular'},
'553199935':{'en': 'Telemig Celular'},
'553199934':{'en': 'Telemig Celular'},
'553199937':{'en': 'Telemig Celular'},
'553199936':{'en': 'Telemig Celular'},
'554399157':{'en': 'Vivo'},
'514494804':{'en': 'Movistar'},
'514494802':{'en': 'Movistar'},
'3069601':{'en': 'OTE'},
'514494803':{'en': 'Movistar'},
'351926':{'en': 'MEO'},
'351927':{'en': 'MEO'},
'351925':{'en': 'MEO'},
'351921':{'en': 'Vodafone'},
'346348':{'en': 'Vodafone'},
'346349':{'en': 'Vodafone'},
'316359':{'en': 'ASPIDER Solutions Nederland B.V.'},
'346342':{'en': 'Vodafone'},
'346343':{'en': 'HITS'},
'346340':{'en': 'Lebara'},
'346341':{'en': 'Lebara'},
'346346':{'en': 'Vodafone'},
'316351':{'en': 'Intercity Zakelijk'},
'346344':{'en': 'Eroski movil'},
'346345':{'en': 'PepePhone'},
'554399155':{'en': 'Vivo'},
'551399632':{'en': 'Vivo'},
'551399633':{'en': 'Vivo'},
'551399630':{'en': 'Vivo'},
'551399631':{'en': 'Vivo'},
'551399636':{'en': 'Vivo'},
'551399637':{'en': 'Vivo'},
'551399634':{'en': 'Vivo'},
'551399635':{'en': 'Vivo'},
'33643':{'en': 'Orange France'},
'33642':{'en': 'Orange France'},
'33645':{'en': 'Orange France'},
'33647':{'en': 'Orange France'},
'33646':{'en': 'SFR'},
'33648':{'en': 'Orange France'},
'554899643':{'en': 'TIM'},
'554899642':{'en': 'TIM'},
'554899641':{'en': 'TIM'},
'31649':{'en': 'Telfort'},
'31647':{'en': 'Telfort'},
'31646':{'en': 'Vodafone Libertel B.V.'},
'31645':{'en': 'Telfort'},
'31644':{'en': 'Telfort'},
'31643':{'en': 'T-Mobile'},
'31642':{'en': 'T-Mobile'},
'31641':{'en': 'T-Mobile'},
'31640':{'en': 'Tele2'},
'516396399':{'en': 'Movistar'},
'516396398':{'en': 'Movistar'},
'516396393':{'en': 'Movistar'},
'516396392':{'en': 'Movistar'},
'516396391':{'en': 'Movistar'},
'516396390':{'en': 'Movistar'},
'516396395':{'en': 'Movistar'},
'516396394':{'en': 'Movistar'},
'554698822':{'en': 'Claro BR'},
'34699':{'en': 'Movistar'},
'34698':{'en': 'MasMovil'},
'517396995':{'en': 'Movistar'},
'34692':{'en': 'Orange'},
'34691':{'en': 'Orange'},
'34690':{'en': 'Movistar'},
'34697':{'en': 'Vodafone'},
'34696':{'en': 'Movistar'},
'34695':{'en': 'Orange'},
'34694':{'en': 'Movistar'},
'553299145':{'en': 'TIM'},
'553299144':{'en': 'TIM'},
'50586':{'en': 'Claro'},
'553299141':{'en': 'TIM'},
'553299143':{'en': 'TIM'},
'553299142':{'en': 'TIM'},
'553499806':{'en': 'Telemig Celular'},
'50581':{'en': 'Movistar'},
'554698827':{'en': 'Claro BR'},
'552298147':{'en': 'TIM'},
'552298146':{'en': 'TIM'},
'552298145':{'en': 'TIM'},
'552298144':{'en': 'TIM'},
'552298143':{'en': 'TIM'},
'552298142':{'en': 'TIM'},
'552298141':{'en': 'TIM'},
'553799925':{'en': 'Telemig Celular'},
'553599997':{'en': 'Telemig Celular'},
'554698825':{'en': 'Claro BR'},
'553799926':{'en': 'Telemig Celular'},
'552298149':{'en': 'TIM'},
'552298148':{'en': 'TIM'},
'38095':{'en': 'Vodafone', 'uk': u('Vodafone \u0423\u043a\u0440\u0430\u0457\u043d\u0430')},
'38094':{'en': 'Intertelecom', 'uk': u('\u0406\u043d\u0442\u0435\u0440\u0442\u0435\u043b\u0435\u043a\u043e\u043c')},
'38097':{'en': 'Kyivstar', 'uk': u('\u041a\u0438\u0457\u0432\u0441\u0442\u0430\u0440')},
'38096':{'en': 'Kyivstar', 'uk': u('\u041a\u0438\u0457\u0432\u0441\u0442\u0430\u0440')},
'38091':{'en': 'TriMob', 'uk': u('\u0422\u0440\u0438\u041c\u043e\u0431')},
'553599995':{'en': 'Telemig Celular'},
'38093':{'en': 'lifecell', 'uk': 'lifecell'},
'38092':{'en': 'PEOPLEnet', 'uk': 'PEOPLEnet'},
'551699716':{'en': 'Vivo'},
'551699717':{'en': 'Vivo'},
'551699714':{'en': 'Vivo'},
'551699715':{'en': 'Vivo'},
'38099':{'en': 'Vodafone', 'uk': u('Vodafone \u0423\u043a\u0440\u0430\u0457\u043d\u0430')},
'38098':{'en': 'Kyivstar', 'uk': u('\u041a\u0438\u0457\u0432\u0441\u0442\u0430\u0440')},
'551699711':{'en': 'Vivo'},
'5528988':{'en': 'Oi'},
'5528989':{'en': 'Oi'},
'2237':{'en': 'Orange'},
'5528986':{'en': 'Oi'},
'5528987':{'en': 'Oi'},
'517396999':{'en': 'Movistar'},
'507219':{'en': u('Telef\u00f3nica M\u00f3viles')},
'507218':{'en': u('Telef\u00f3nica M\u00f3viles')},
'26263963':{'en': 'Orange'},
'26263960':{'en': 'Orange'},
'554599136':{'en': 'Vivo'},
'554599137':{'en': 'Vivo'},
'554599134':{'en': 'Vivo'},
'551799709':{'en': 'Vivo'},
'554599132':{'en': 'Vivo'},
'554599133':{'en': 'Vivo'},
'554599131':{'en': 'Vivo'},
'553799928':{'en': 'Telemig Celular'},
'552499395':{'en': 'Claro BR'},
'26263967':{'en': 'SFR'},
'234701':{'en': 'Airtel'},
'234703':{'en': 'MTN'},
'234704':{'en': 'Visafone'},
'234705':{'en': 'Glo'},
'234706':{'en': 'MTN'},
'234707':{'en': 'Zoom'},
'234708':{'en': 'Airtel'},
'234709':{'en': 'Multilinks'},
'26263965':{'en': 'SFR'},
'554598841':{'en': 'Claro BR'},
'554598842':{'en': 'Claro BR'},
'554198458':{'en': 'Brasil Telecom GSM'},
'554198459':{'en': 'Brasil Telecom GSM'},
'554198456':{'en': 'Brasil Telecom GSM'},
'554198457':{'en': 'Brasil Telecom GSM'},
'554198454':{'en': 'Brasil Telecom GSM'},
'554198455':{'en': 'Brasil Telecom GSM'},
'554198452':{'en': 'Brasil Telecom GSM'},
'554198453':{'en': 'Brasil Telecom GSM'},
'554198451':{'en': 'Brasil Telecom GSM'},
'454291':{'en': '3'},
'447809':{'en': 'O2'},
'447808':{'en': 'O2'},
'518498402':{'en': 'Movistar'},
'518498403':{'en': 'Movistar'},
'518498400':{'en': 'Movistar'},
'518498401':{'en': 'Movistar'},
'447807':{'en': 'Orange'},
'447806':{'en': 'EE'},
'518498404':{'en': 'Movistar'},
'447804':{'en': 'EE'},
'45428':{'en': 'CBB Mobil'},
'5025580':{'en': 'Tigo'},
'553599913':{'en': 'Telemig Celular'},
'553599912':{'en': 'Telemig Celular'},
'55119658':{'en': 'Claro BR'},
'55119659':{'en': 'Claro BR'},
'553599917':{'en': 'Telemig Celular'},
'553599916':{'en': 'Telemig Celular'},
'553599915':{'en': 'Telemig Celular'},
'553599914':{'en': 'Telemig Celular'},
'553599919':{'en': 'Telemig Celular'},
'553599918':{'en': 'Telemig Celular'},
'55119657':{'en': 'Claro BR'},
'420608':{'en': 'Vodafone'},
'420606':{'en': 'O2'},
'420607':{'en': 'O2'},
'420604':{'en': 'T-Mobile'},
'420605':{'en': 'T-Mobile'},
'420602':{'en': 'O2'},
'420603':{'en': 'T-Mobile'},
'420601':{'en': 'O2'},
'25262':{'en': 'Somtel'},
'25263':{'en': 'Telesom'},
'25264':{'en': 'Somali Networks'},
'25265':{'en': 'Somtel'},
'25266':{'en': 'Somtel'},
'25267':{'en': 'Nationlink'},
'25268':{'en': 'Nationlink'},
'25269':{'en': 'Nationlink'},
'552799231':{'en': 'Claro BR'},
'1939252':{'en': 'CENTENNIAL'},
'552799232':{'en': 'Claro BR'},
'552799235':{'en': 'Claro BR'},
'552799234':{'en': 'Claro BR'},
'552799237':{'en': 'Claro BR'},
'552799236':{'en': 'Claro BR'},
'552799239':{'en': 'Claro BR'},
'552799238':{'en': 'Claro BR'},
'553199786':{'en': 'Telemig Celular'},
'551699718':{'en': 'Vivo'},
'552498138':{'en': 'TIM'},
'552498139':{'en': 'TIM'},
'551599175':{'en': 'Claro BR'},
'552498131':{'en': 'TIM'},
'552498132':{'en': 'TIM'},
'552498133':{'en': 'TIM'},
'552498134':{'en': 'TIM'},
'552498135':{'en': 'TIM'},
'552498136':{'en': 'TIM'},
'552498137':{'en': 'TIM'},
'551699719':{'en': 'Vivo'},
'553199784':{'en': 'Telemig Celular'},
'459333':{'en': 'Onoffapp'},
'459330':{'en': 'Justfone'},
'459339':{'en': 'Uni-tel'},
'553199785':{'en': 'Telemig Celular'},
'455333':{'en': 'Lebara Limited'},
'551398151':{'en': 'TIM'},
'551398152':{'en': 'TIM'},
'551398153':{'en': 'TIM'},
'551398154':{'en': 'TIM'},
'551398155':{'en': 'TIM'},
'551398156':{'en': 'TIM'},
'551398157':{'en': 'TIM'},
'551398158':{'en': 'TIM'},
'551398159':{'en': 'TIM'},
'33700001':{'en': 'SFR'},
'33700000':{'en': 'Orange France'},
'2348456':{'en': 'Starcomms'},
'2348454':{'en': 'Starcomms'},
'2348453':{'en': 'Starcomms'},
'479277':{'en': 'NetCom'},
'38668':{'en': 'A1'},
'38664':{'en': 'T-2'},
'553799933':{'en': 'Telemig Celular'},
'553799932':{'en': 'Telemig Celular'},
'553799931':{'en': 'Telemig Celular'},
'553799937':{'en': 'Telemig Celular'},
'553799936':{'en': 'Telemig Celular'},
'553799935':{'en': 'Telemig Celular'},
'553799934':{'en': 'Telemig Celular'},
'553799939':{'en': 'Telemig Celular'},
'553799938':{'en': 'Telemig Celular'},
'554799978':{'en': 'TIM'},
'447579':{'en': 'Orange'},
'447578':{'en': 'Three'},
'554799979':{'en': 'TIM'},
'551298135':{'en': 'TIM'},
'447572':{'en': 'EE'},
'447570':{'en': 'Vodafone'},
'447577':{'en': 'Three'},
'447576':{'en': 'Three'},
'447575':{'en': 'Three'},
'447574':{'en': 'EE'},
'479419':{'en': 'Telenor'},
'479418':{'en': 'Telenor'},
'479413':{'en': 'Telenor'},
'479415':{'en': 'Telenor'},
'479414':{'en': 'Telenor'},
'479417':{'en': 'Telenor'},
'479416':{'en': 'Telenor'},
'551298134':{'en': 'TIM'},
'2402':{'en': 'GETESA'},
'47984':{'en': 'NetCom'},
'47986':{'en': 'NetCom'},
'47980':{'en': 'NetCom'},
'47982':{'en': 'NetCom'},
'47988':{'en': 'NetCom'},
'554799967':{'en': 'TIM'},
'459224':{'en': 'SimService'},
'554799965':{'en': 'TIM'},
'554799964':{'en': 'TIM'},
'474768':{'en': 'Telenor'},
'554799962':{'en': 'TIM'},
'27637':{'en': 'Vodacom'},
'459225':{'en': 'Mundio Mobile'},
'474764':{'en': 'Telenor'},
'474765':{'en': 'Telenor'},
'474766':{'en': 'Telenor'},
'474767':{'en': 'Telenor'},
'474760':{'en': 'Telenor'},
'459226':{'en': 'Mundio Mobile'},
'474762':{'en': 'Telenor'},
'474763':{'en': 'Telenor'},
'45535':{'en': '3'},
'45532':{'en': 'Telia'},
'459221':{'en': 'SimService'},
'551498146':{'en': 'TIM'},
'551498147':{'en': 'TIM'},
'551498144':{'en': 'TIM'},
'551498145':{'en': 'TIM'},
'551498142':{'en': 'TIM'},
'502569':{'en': 'Telgua'},
'551498141':{'en': 'TIM'},
'459223':{'en': '42 Telecom AB'},
'502561':{'en': 'Telgua'},
'502562':{'en': 'Telgua'},
'502563':{'en': 'Telgua'},
'554799619':{'en': 'TIM'},
'554799618':{'en': 'TIM'},
'551899793':{'en': 'Vivo'},
'503749':{'en': 'Tigo'},
'503748':{'en': 'Tigo'},
'503747':{'en': 'Tigo'},
'3465729':{'en': 'DIA'},
'503745':{'en': 'Movistar'},
'554799612':{'en': 'TIM'},
'554799615':{'en': 'TIM'},
'48450':{'en': 'Play'},
'554799617':{'en': 'TIM'},
'551899795':{'en': 'Vivo'},
'3519294':{'en': 'NOS'},
'554199192':{'en': 'Vivo'},
'551999661':{'en': 'Vivo'},
'554199194':{'en': 'Vivo'},
'551899796':{'en': 'Vivo'},
'554199196':{'en': 'Vivo'},
'553899906':{'en': 'Telemig Celular'},
'554199198':{'en': 'Vivo'},
'553199834':{'en': 'Telemig Celular'},
'551899797':{'en': 'Vivo'},
'553899905':{'en': 'Telemig Celular'},
'553199835':{'en': 'Telemig Celular'},
'553899904':{'en': 'Telemig Celular'},
'553199836':{'en': 'Telemig Celular'},
'553899903':{'en': 'Telemig Celular'},
'55279964':{'en': 'Vivo'},
'55279963':{'en': 'Vivo'},
'55279962':{'en': 'Vivo'},
'55279961':{'en': 'Vivo'},
'3519291':{'en': 'NOS'},
'3519292':{'en': 'NOS'},
'3519293':{'en': 'NOS'},
'551298133':{'en': 'TIM'},
'554398411':{'en': 'Brasil Telecom GSM'},
'554398412':{'en': 'Brasil Telecom GSM'},
'14417':{'en': 'Cellular One'},
'553199321':{'en': 'TIM'},
'1787673':{'en': 'SunCom Wireless Puerto Rico'},
'553199323':{'en': 'TIM'},
'1787675':{'en': 'CENTENNIAL'},
'553199325':{'en': 'TIM'},
'553199326':{'en': 'TIM'},
'553199327':{'en': 'TIM'},
'553199328':{'en': 'TIM'},
'1787678':{'en': 'SunCom Wireless Puerto Rico'},
'26269393':{'en': 'Orange'},
'553799955':{'en': 'Telemig Celular'},
'554899136':{'en': 'Vivo'},
'50650':{'en': 'OMV'},
'50657':{'en': 'OMV'},
'551899738':{'en': 'Vivo'},
'551899739':{'en': 'Vivo'},
'551298809':{'en': 'Oi'},
'551298808':{'en': 'Oi'},
'551899732':{'en': 'Vivo'},
'551899733':{'en': 'Vivo'},
'551899731':{'en': 'Vivo'},
'551899736':{'en': 'Vivo'},
'551899737':{'en': 'Vivo'},
'551899734':{'en': 'Vivo'},
'551899735':{'en': 'Vivo'},
'554899928':{'en': 'TIM'},
'553599125':{'en': 'TIM'},
'553199229':{'en': 'TIM'},
'553199228':{'en': 'TIM'},
'553199225':{'en': 'TIM'},
'553199224':{'en': 'TIM'},
'553199227':{'en': 'TIM'},
'553199226':{'en': 'TIM'},
'553199221':{'en': 'TIM'},
'554899927':{'en': 'TIM'},
'553199223':{'en': 'TIM'},
'553199222':{'en': 'TIM'},
'554898864':{'en': 'Claro BR'},
'2326':{'en': 'Onlime'},
'554898865':{'en': 'Claro BR'},
'2329':{'en': 'Africell'},
'2328':{'en': 'Africell'},
'551598815':{'en': 'Oi'},
'553798411':{'en': 'Claro BR'},
'554898861':{'en': 'Claro BR'},
'3763':{'en': 'Mobiland'},
'554399139':{'en': 'Vivo'},
'55179922':{'en': 'Claro BR'},
'55179920':{'en': 'Claro BR'},
'55179921':{'en': 'Claro BR'},
'515495828':{'en': 'Claro'},
'515495829':{'en': 'Claro'},
'43660':{'en': 'Hutchison Drei Austria'},
'167148':{'en': 'GTA'},
'43664':{'en': 'A1 TA'},
'553899177':{'en': 'TIM'},
'553798417':{'en': 'Claro BR'},
'553899174':{'en': 'TIM'},
'553899175':{'en': 'TIM'},
'516495410':{'en': 'Claro'},
'516495411':{'en': 'Claro'},
'516495412':{'en': 'Claro'},
'553899173':{'en': 'TIM'},
'517697693':{'en': 'Movistar'},
'517697692':{'en': 'Movistar'},
'515495895':{'en': 'Claro'},
'515495894':{'en': 'Movistar'},
'517697697':{'en': 'Movistar'},
'517697696':{'en': 'Movistar'},
'515495891':{'en': 'Movistar'},
'517697694':{'en': 'Movistar'},
'517697699':{'en': 'Movistar'},
'474190':{'en': 'NetCom'},
'515495898':{'en': 'Claro'},
'3469399':{'en': 'MasMovil'},
'3469398':{'en': 'MasMovil'},
'3469395':{'en': 'MasMovil'},
'3469394':{'en': 'MasMovil'},
'3469397':{'en': 'MasMovil'},
'3469396':{'en': 'MasMovil'},
'3469391':{'en': 'MasMovil'},
'3469393':{'en': 'MasMovil'},
'3469392':{'en': 'MasMovil'},
'553798415':{'en': 'Claro BR'},
'554399174':{'en': 'Vivo'},
'4476020':{'en': 'O2'},
'4476022':{'en': 'Relax'},
'553199918':{'en': 'Telemig Celular'},
'553199917':{'en': 'Telemig Celular'},
'553199916':{'en': 'Telemig Celular'},
'553199915':{'en': 'Telemig Celular'},
'553199914':{'en': 'Telemig Celular'},
'553199913':{'en': 'Telemig Celular'},
'553199912':{'en': 'Telemig Celular'},
'553199911':{'en': 'Telemig Celular'},
'553798414':{'en': 'Claro BR'},
'359999':{'en': 'MAX'},
'554399171':{'en': 'Vivo'},
'554399172':{'en': 'Vivo'},
'554399173':{'en': 'Vivo'},
'551698158':{'en': 'TIM'},
'5516991':{'en': 'Claro BR'},
'5516992':{'en': 'Claro BR'},
'503642':{'en': 'Movistar'},
'35568':{'en': 'Telekom'},
'551799702':{'en': 'Vivo'},
'551799703':{'en': 'Vivo'},
'26263968':{'en': 'SFR'},
'26263969':{'en': 'SFR'},
'37498':{'en': 'VivaCell-MTS', 'ru': u('\u0412\u0438\u0432\u0430\u0421\u0435\u043b\u043b-\u041c\u0422\u0421')},
'37499':{'en': 'Beeline', 'ru': u('\u0411\u0438\u043b\u0430\u0439\u043d')},
'551799704':{'en': 'Vivo'},
'551799705':{'en': 'Vivo'},
'37494':{'en': 'VivaCell-MTS', 'ru': u('\u0412\u0438\u0432\u0430\u0421\u0435\u043b\u043b-\u041c\u0422\u0421')},
'37495':{'en': 'Ucom', 'ru': u('\u042e\u043a\u043e\u043c')},
'37496':{'en': 'Beeline', 'ru': u('\u0411\u0438\u043b\u0430\u0439\u043d')},
'26263961':{'en': 'Orange'},
'26263966':{'en': 'SFR'},
'37491':{'en': 'Beeline', 'ru': u('\u0411\u0438\u043b\u0430\u0439\u043d')},
'26263964':{'en': 'Orange'},
'37493':{'en': 'VivaCell-MTS', 'ru': u('\u0412\u0438\u0432\u0430\u0421\u0435\u043b\u043b-\u041c\u0422\u0421')},
'516396371':{'en': 'Claro'},
'516396370':{'en': 'Claro'},
'516396373':{'en': 'Claro'},
'516396372':{'en': 'Claro'},
'33700004':{'en': 'Afone'},
'551499152':{'en': 'Claro BR'},
'551499153':{'en': 'Claro BR'},
'551499151':{'en': 'Claro BR'},
'551499156':{'en': 'Claro BR'},
'551499157':{'en': 'Claro BR'},
'551499154':{'en': 'Claro BR'},
'551499155':{'en': 'Claro BR'},
'552798152':{'en': 'TIM'},
'551698153':{'en': 'TIM'},
'552798151':{'en': 'TIM'},
'554399134':{'en': 'Vivo'},
'552298129':{'en': 'TIM'},
'552298128':{'en': 'TIM'},
'552298125':{'en': 'TIM'},
'552298124':{'en': 'TIM'},
'552298127':{'en': 'TIM'},
'552298126':{'en': 'TIM'},
'552298121':{'en': 'TIM'},
'552298123':{'en': 'TIM'},
'552298122':{'en': 'TIM'},
'14413':{'en': 'Mobility'},
'515395361':{'en': 'Movistar'},
'26269399':{'en': 'Orange'},
'515395363':{'en': 'Movistar'},
'515395364':{'en': 'Movistar'},
'552798155':{'en': 'TIM'},
'515395366':{'en': 'Movistar'},
'515395367':{'en': 'Movistar'},
'515395368':{'en': 'Movistar'},
'26269392':{'en': 'Orange'},
'26269391':{'en': 'Orange'},
'26269390':{'en': 'Orange'},
'26269397':{'en': 'SFR'},
'554399135':{'en': 'Vivo'},
'26269394':{'en': 'SFR'},
'551699734':{'en': 'Vivo'},
'551699735':{'en': 'Vivo'},
'551699736':{'en': 'Vivo'},
'551699737':{'en': 'Vivo'},
'554898860':{'en': 'Claro BR'},
'551699731':{'en': 'Vivo'},
'551699732':{'en': 'Vivo'},
'551699733':{'en': 'Vivo'},
'551699738':{'en': 'Vivo'},
'551699739':{'en': 'Vivo'},
'551698151':{'en': 'TIM'},
'554599118':{'en': 'Vivo'},
'554599119':{'en': 'Vivo'},
'554599114':{'en': 'Vivo'},
'554599115':{'en': 'Vivo'},
'554599116':{'en': 'Vivo'},
'554599117':{'en': 'Vivo'},
'554599111':{'en': 'Vivo'},
'554599112':{'en': 'Vivo'},
'554599113':{'en': 'Vivo'},
'554299121':{'en': 'Vivo'},
'554399137':{'en': 'Vivo'},
'38349':{'en': 'IPKO'},
'38343':{'en': 'IPKO'},
'38344':{'en': 'vala'},
}
|
# Copyright (c) 2009 The Foundry Visionmongers Ltd. All Rights Reserved.
import nuke
# List of libraries which may be in the plugins directory that are dependencies,
# not plugins themselves
PLUGINS_FILTER = [
"Alembic_In",
"DNxHR",
"FnNukeCodecs"
]
def _filterPlugin(plugin):
for filter in PLUGINS_FILTER:
if filter in plugin:
return True
return False
def load_all_plugins():
""" Scan all of Nuke's plugin load paths and attempt to load any .dylib, .so, or .dll
files as a plugin, skipping any files listed in PLUGINS_FILTER.
"""
tried = 0
failed = 0
p = nuke.plugins(nuke.ALL, "*."+nuke.PLUGIN_EXT)
for i in p:
if _filterPlugin(i):
continue
tried += 1
print(i)
try:
try_load = nuke.load(i)
except:
print(i, "failed to load.")
failed += 1
if failed > 0:
print(failed, "of", tried, "plugin(s) total did not load")
else:
print("All available binary plugins (",tried,") successfully loaded")
|
#include "sofa.h"
void iauC2tpe(double tta, double ttb, double uta, double utb,
double dpsi, double deps, double xp, double yp,
double rc2t[3][3])
/*
** - - - - - - - - -
** i a u C 2 t p e
** - - - - - - - - -
**
** Form the celestial to terrestrial matrix given the date, the UT1,
** the nutation and the polar motion. IAU 2000.
**
** This function is part of the International Astronomical Union's
** SOFA (Standards Of Fundamental Astronomy) software collection.
**
** Status: support function.
**
** Given:
** tta,ttb double TT as a 2-part Julian Date (Note 1)
** uta,utb double UT1 as a 2-part Julian Date (Note 1)
** dpsi,deps double nutation (Note 2)
** xp,yp double coordinates of the pole (radians, Note 3)
**
** Returned:
** rc2t double[3][3] celestial-to-terrestrial matrix (Note 4)
**
** Notes:
**
** 1) The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
** apportioned in any convenient way between the arguments uta and
** utb. For example, JD(UT1)=2450123.7 could be expressed in any of
** these ways, among others:
**
** uta utb
**
** 2450123.7 0.0 (JD method)
** 2451545.0 -1421.3 (J2000 method)
** 2400000.5 50123.2 (MJD method)
** 2450123.5 0.2 (date & time method)
**
** The JD method is the most natural and convenient to use in
** cases where the loss of several decimal digits of resolution is
** acceptable. The J2000 and MJD methods are good compromises
** between resolution and convenience. In the case of uta,utb, the
** date & time method is best matched to the Earth rotation angle
** algorithm used: maximum precision is delivered when the uta
** argument is for 0hrs UT1 on the day in question and the utb
** argument lies in the range 0 to 1, or vice versa.
**
** 2) The caller is responsible for providing the nutation components;
** they are in longitude and obliquity, in radians and are with
** respect to the equinox and ecliptic of date. For high-accuracy
** applications, free core nutation should be included as well as
** any other relevant corrections to the position of the CIP.
**
** 3) The arguments xp and yp are the coordinates (in radians) of the
** Celestial Intermediate Pole with respect to the International
** Terrestrial Reference System (see IERS Conventions 2003),
** measured along the meridians to 0 and 90 deg west respectively.
**
** 4) The matrix rc2t transforms from celestial to terrestrial
** coordinates:
**
** [TRS] = RPOM * R_3(GST) * RBPN * [CRS]
**
** = rc2t * [CRS]
**
** where [CRS] is a vector in the Geocentric Celestial Reference
** System and [TRS] is a vector in the International Terrestrial
** Reference System (see IERS Conventions 2003), RBPN is the
** bias-precession-nutation matrix, GST is the Greenwich (apparent)
** Sidereal Time and RPOM is the polar motion matrix.
**
** 5) Although its name does not include "00", This function is in fact
** specific to the IAU 2000 models.
**
** Called:
** iauPn00 bias/precession/nutation results, IAU 2000
** iauGmst00 Greenwich mean sidereal time, IAU 2000
** iauSp00 the TIO locator s', IERS 2000
** iauEe00 equation of the equinoxes, IAU 2000
** iauPom00 polar motion matrix
** iauC2teqx form equinox-based celestial-to-terrestrial matrix
**
** Reference:
**
** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
** IERS Technical Note No. 32, BKG (2004)
**
** This revision: 2013 June 18
**
** SOFA release 2013-12-02
**
** Copyright (C) 2013 IAU SOFA Board. See notes at end.
*/
{
double epsa, rb[3][3], rp[3][3], rbp[3][3], rn[3][3],
rbpn[3][3], gmst, ee, sp, rpom[3][3];
/* Form the celestial-to-true matrix for this TT. */
iauPn00(tta, ttb, dpsi, deps, &epsa, rb, rp, rbp, rn, rbpn);
/* Predict the Greenwich Mean Sidereal Time for this UT1 and TT. */
gmst = iauGmst00(uta, utb, tta, ttb);
/* Predict the equation of the equinoxes given TT and nutation. */
ee = iauEe00(tta, ttb, epsa, dpsi);
/* Estimate s'. */
sp = iauSp00(tta, ttb);
/* Form the polar motion matrix. */
iauPom00(xp, yp, sp, rpom);
/* Combine to form the celestial-to-terrestrial matrix. */
iauC2teqx(rbpn, gmst + ee, rpom, rc2t);
return;
/*----------------------------------------------------------------------
**
** Copyright (C) 2013
** Standards Of Fundamental Astronomy Board
** of the International Astronomical Union.
**
** =====================
** SOFA Software License
** =====================
**
** NOTICE TO USER:
**
** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
** CONDITIONS WHICH APPLY TO ITS USE.
**
** 1. The Software is owned by the IAU SOFA Board ("SOFA").
**
** 2. Permission is granted to anyone to use the SOFA software for any
** purpose, including commercial applications, free of charge and
** without payment of royalties, subject to the conditions and
** restrictions listed below.
**
** 3. You (the user) may copy and distribute SOFA source code to others,
** and use and adapt its code and algorithms in your own software,
** on a world-wide, royalty-free basis. That portion of your
** distribution that does not consist of intact and unchanged copies
** of SOFA source code files is a "derived work" that must comply
** with the following requirements:
**
** a) Your work shall be marked or carry a statement that it
** (i) uses routines and computations derived by you from
** software provided by SOFA under license to you; and
** (ii) does not itself constitute software provided by and/or
** endorsed by SOFA.
**
** b) The source code of your derived work must contain descriptions
** of how the derived work is based upon, contains and/or differs
** from the original SOFA software.
**
** c) The names of all routines in your derived work shall not
** include the prefix "iau" or "sofa" or trivial modifications
** thereof such as changes of case.
**
** d) The origin of the SOFA components of your derived work must
** not be misrepresented; you must not claim that you wrote the
** original software, nor file a patent application for SOFA
** software or algorithms embedded in the SOFA software.
**
** e) These requirements must be reproduced intact in any source
** distribution and shall apply to anyone to whom you have
** granted a further right to modify the source code of your
** derived work.
**
** Note that, as originally distributed, the SOFA software is
** intended to be a definitive implementation of the IAU standards,
** and consequently third-party modifications are discouraged. All
** variations, no matter how minor, must be explicitly marked as
** such, as explained above.
**
** 4. You shall not cause the SOFA software to be brought into
** disrepute, either by misuse, or use for inappropriate tasks, or
** by inappropriate modification.
**
** 5. The SOFA software is provided "as is" and SOFA makes no warranty
** as to its use or performance. SOFA does not and cannot warrant
** the performance or results which the user may obtain by using the
** SOFA software. SOFA makes no warranties, express or implied, as
** to non-infringement of third party rights, merchantability, or
** fitness for any particular purpose. In no event will SOFA be
** liable to the user for any consequential, incidental, or special
** damages, including any lost profits or lost savings, even if a
** SOFA representative has been advised of such damages, or for any
** claim by any third party.
**
** 6. The provision of any version of the SOFA software under the terms
** and conditions specified herein does not imply that future
** versions will also be made available under the same terms and
** conditions.
*
** In any published work or commercial product which uses the SOFA
** software directly, acknowledgement (see www.iausofa.org) is
** appreciated.
**
** Correspondence concerning SOFA software should be addressed as
** follows:
**
** By email: sofa@ukho.gov.uk
** By post: IAU SOFA Center
** HM Nautical Almanac Office
** UK Hydrographic Office
** Admiralty Way, Taunton
** Somerset, TA1 2DN
** United Kingdom
**
**--------------------------------------------------------------------*/
}
|
define(['knockout', 'text!./user-bar.html', 'appConfig'], function (ko, view, appConfig) {
function userBar(params) {
var self = this;
self.appConfig = appConfig;
}
var component = {
viewModel: userBar,
template: view
};
ko.components.register('user-bar', component);
return component;
});
|
// var triangle = [];
function results() {
var flength = parseFloat(document.getElementById('firstside').value);
var slength = parseFloat(document.getElementById('secondside').value);
var tlength = parseFloat(document.getElementById('thirdside').value);
var resul = document.querySelector("#para");
if ((flength + slength <= tlength) || (slength + tlength <= flength) || (tlength + flength <= slength)) {
resul.innerHTML = "Thats not Triangle. Cheers!";
} else if (flength === slength && slength === tlength) {
resul.innerHTML = "Thats an Equilateral Triangle. Cheers!";
} else if (flength === slength || slength === tlength || tlength === flength) {
resul.innerHTML = "Thats an Isosceles Triangle. Cheers!";
} else if (flength != slength && slength != tlength && tlength != flength) {
resul.innerHTML = "Thats a Scalene Triangle Cheers";
}
}
function reset() {
location.reload();
}
// function test(){
// var flength = document.getElementById('firstside');
// alert(flength);
//
// }
|
const path = require('path');
const express = require('express');
var exec = require('child_process').exec;
var nodeSsdp = require('node-ssdp');
var ip = require('ip').address();
const ssdpServerPort = 1900;
const restServerPort = 33333;
const descriptionFilePath = '/static/desc.xml';
const udn = 'uuid:362d9414-31a0-48b6-b684-2b4bdd8391d0';
const usn = 'urn:schemas-upnp-org:service:raspberry-pi:1';
/* Set up SSDP Server */
var SsdpServer = nodeSsdp.Server
, ssdpServer = new SsdpServer({
location: 'http://' + ip + ':' + restServerPort + descriptionFilePath,
sourcePort: ssdpServerPort,
udn: udn
})
;
ssdpServer.addUSN(usn);
ssdpServer.on('advertise-alive', function (headers) {
//todo: implement a device cache
});
ssdpServer.on('advertise-bye', function (headers) {
//todo: implement a device cache
});
/* Set up REST server */
const restServer = express();
// Serve the description file for SSDP
restServer.use('/static', express.static(path.join(__dirname, 'public')));
restServer.get('/health', function (req, res) {
console.log('health!');
res.send('health:ok');
});
restServer.get('/speak', function (req, res) {
console.log('speak!');
var msg = req.query.msg;
exec('espeak "' + msg + '"', function () {});
res.send('speak:ok');
});
restServer.get('/playSound', function (req, res) {
console.log('playSound');
var track = req.query.track;
switch (track) {
case 'SingleChime':
exec('aplay singleChime.wav', function () {});
break;
case 'DoubleChime':
exec('aplay doubleChime.wav', function () {});
break;
case 'Doorbell':
exec('aplay doorbell.wav', function () {});
break;
case 'Alarm':
exec('aplay alarm.wav', function () {});
break;
case 'Notification':
exec('omxplayer --vol -1600 winnot.mp3');
break;
case 'WelcomeScott':
exec('omxplayer --vol -1600 welcomeScott.mp3');
break;
case 'WelcomeTabby':
exec('omxplayer --vol -1600 welcomeTabby.mp3');
break;
default:
console.log('Attempting ' + track + '.wav');
exec('aplay ' + track + '.wav');
break;
}
res.send('sound:ok');
});
//todo: change to a POST
restServer.get('/alarm/on', function (req, res) {
console.log('alarm on');
exec('nohup ./play_alarm_loop.sh &');
res.send('alarm:on');
});
//todo: change to a POST
restServer.get('/alarm/off', function (req, res) {
console.log('alarm off');
exec('pgrep -f play_alarm_loop.sh | xargs kill');
res.send('alarm:off');
});
/* Start the servers */
ssdpServer.start();
console.log('SSDP server listening on port ' + ssdpServerPort);
restServer.listen(restServerPort, function () {
console.log('REST server listening on port ' + restServerPort);
});
process.on('exit', function(){
ssdpServer.stop()
});
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
class KoubeiMallScanpurchaseUserpreorderQueryModel(object):
def __init__(self):
self._advance_order_id = None
self._user_id = None
@property
def advance_order_id(self):
return self._advance_order_id
@advance_order_id.setter
def advance_order_id(self, value):
self._advance_order_id = value
@property
def user_id(self):
return self._user_id
@user_id.setter
def user_id(self, value):
self._user_id = value
def to_alipay_dict(self):
params = dict()
if self.advance_order_id:
if hasattr(self.advance_order_id, 'to_alipay_dict'):
params['advance_order_id'] = self.advance_order_id.to_alipay_dict()
else:
params['advance_order_id'] = self.advance_order_id
if self.user_id:
if hasattr(self.user_id, 'to_alipay_dict'):
params['user_id'] = self.user_id.to_alipay_dict()
else:
params['user_id'] = self.user_id
return params
@staticmethod
def from_alipay_dict(d):
if not d:
return None
o = KoubeiMallScanpurchaseUserpreorderQueryModel()
if 'advance_order_id' in d:
o.advance_order_id = d['advance_order_id']
if 'user_id' in d:
o.user_id = d['user_id']
return o
|
'use strict'
const eos = require('end-of-stream')
module.exports = streamToBuffer
streamToBuffer.onStream = onStream
function streamToBuffer (stream, cb) {
const buffers = []
stream.on('data', buffers.push.bind(buffers))
eos(stream, function (err) {
switch (buffers.length) {
case 0:
cb(err, Buffer.allocUnsafe(0), stream)
break
case 1:
cb(err, buffers[0], stream)
break
default:
cb(err, Buffer.concat(buffers), stream)
}
})
}
function onStream (cb) {
return function (stream) {
streamToBuffer(stream, cb)
}
}
|
global.scrollDebounce = {
fire: [],
pause: 100,
didScroll: false,
addEvent: function(func, params) {
this.fire.push([func, params]);
},
runFunctions: function() {
for (var i = 0; i < scrollDebounce.fire.length; i++) {
scrollDebounce.fire[i][0].apply(this, scrollDebounce.fire[i][1]);
}
},
didWindowScroll: function() {
scrollDebounce.didScroll = true;
},
init: function() {
window.onscroll = scrollDebounce.didWindowScroll;
setInterval(function() {
if (scrollDebounce.didScroll) {
scrollDebounce.didScroll = false;
scrollDebounce.runFunctions();
}
}, scrollDebounce.pause);
}
};
module.exports = scrollDebounce;
|
#!/usr/bin/env python3
# encoding: utf-8
# pylint: skip-file
import unittest
from position import Position
class _MPBase:
def runTest(self):
obj = Position(*self.obj)
for pivot, delta, wanted in self.steps:
obj.move(Position(*pivot), Position(*delta))
self.assertEqual(Position(*wanted), obj)
class MovePosition_DelSameLine(_MPBase, unittest.TestCase):
# hello wor*ld -> h*ld -> hl*ld
obj = (0, 9)
steps = (((0, 1), (0, -8), (0, 1)), ((0, 1), (0, 1), (0, 2)))
class MovePosition_DelSameLine1(_MPBase, unittest.TestCase):
# hel*lo world -> hel*world -> hel*worl
obj = (0, 3)
steps = (((0, 4), (0, -3), (0, 3)), ((0, 8), (0, -1), (0, 3)))
class MovePosition_InsSameLine1(_MPBase, unittest.TestCase):
# hel*lo world -> hel*woresld
obj = (0, 3)
steps = (
((0, 4), (0, -3), (0, 3)),
((0, 6), (0, 2), (0, 3)),
((0, 8), (0, -1), (0, 3)),
)
class MovePosition_InsSameLine2(_MPBase, unittest.TestCase):
# hello wor*ld -> helesdlo wor*ld
obj = (0, 9)
steps = (((0, 3), (0, 3), (0, 12)),)
class MovePosition_DelSecondLine(_MPBase, unittest.TestCase):
# hello world. sup hello world.*a, was
# *a, was ach nix
# ach nix
obj = (1, 0)
steps = (((0, 12), (0, -4), (1, 0)), ((0, 12), (-1, 0), (0, 12)))
class MovePosition_DelSecondLine1(_MPBase, unittest.TestCase):
# hello world. sup
# a, *was
# ach nix
# hello world.a*was
# ach nix
obj = (1, 3)
steps = (
((0, 12), (0, -4), (1, 3)),
((0, 12), (-1, 0), (0, 15)),
((0, 12), (0, -3), (0, 12)),
((0, 12), (0, 1), (0, 13)),
)
if __name__ == "__main__":
unittest.main()
|
#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that setting SDKROOT works.
"""
from __future__ import print_function
import TestGyp
import os
import subprocess
import sys
if sys.platform == 'darwin':
print("This test is currently disabled: https://crbug.com/483696.")
sys.exit(0)
test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
def GetSDKPath(sdk):
"""Return SDKROOT if the SDK version |sdk| is installed or empty string."""
DEVNULL = open(os.devnull, 'wb')
try:
proc = subprocess.Popen(
['xcodebuild', '-version', '-sdk', 'macosx' + sdk, 'Path'],
stdout=subprocess.PIPE, stderr=DEVNULL)
return proc.communicate()[0].rstrip('\n')
finally:
DEVNULL.close()
def SelectSDK():
"""Select the oldest SDK installed (greater than 10.6)."""
for sdk in ['10.6', '10.7', '10.8', '10.9']:
path = GetSDKPath(sdk)
if path:
return True, sdk, path
return False, '', ''
# Make sure this works on the bots, which only have the 10.6 sdk, and on
# dev machines which usually don't have the 10.6 sdk.
sdk_found, sdk, sdk_path = SelectSDK()
if not sdk_found:
test.fail_test()
test.write('sdkroot/test.gyp', test.read('sdkroot/test.gyp') % sdk)
test.run_gyp('test.gyp', '-D', 'sdk_path=%s' % sdk_path,
chdir='sdkroot')
test.build('test.gyp', test.ALL, chdir='sdkroot')
test.pass_test()
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _timer = require('./timer');
Object.defineProperty(exports, 'Timer', {
enumerable: true,
get: function get() {
return _timer.Timer;
}
});
|
class Verbosity:
"""Verbosity level for the sake of logging."""
QUIET = 0
NORMAL = 1
VERBOSE = 2
VERY_VERBOSE = 3
DEBUG = 4
@staticmethod
def get() -> 'Verbosity':
"""Get the verbosity from RVConfig."""
from rastervision2.pipeline import rv_config
return rv_config.get_verbosity()
|
BUF_SIZE = 1024
ENABLE_DEBUG = True
IP_ADDR = '127.0.0.1'
REQ_NET_NAME = '/api/netname/'
REQ_IXP_NETS = '/api/ixnets/'
REQ_IXPS = '/api/ix/'
def printDebug(dbgMsg):
'''
Funcao auxiliar para depuracao.
'''
if ENABLE_DEBUG:
print('[dbg]', dbgMsg)
|
# -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
import cohesity_management_sdk.models.guid_pair
class CompareAdObjectsRequest(object):
"""Implementation of the 'CompareAdObjectsRequest' model.
Specifies the request to compare AD objects from Snapshot and Production
AD.
Attributes:
restore_task_id (long|int): Specifies the Restore Task Id
corresponding to which we need to compare the AD objects.
allow_empty_dest_guids (bool): Specifies the option to get object
attributes from Snapshot AD when destination guid is missing in
GuidPair. This helps to show attributes of AD object from Snapshot
AD when the object is missing in Production AD.
case_sensitive (bool): Specifies the option to make comparison of
attribute values case sensitive. Default is case insensitive.
exclude_sys_attributes (bool): Specifies the option to exclude AD
system attributes when comparing two AD object attributes. If the
objects have same guid, most of the system attributes would
match.If the AD object was recovered through a restore, then many
system attributes will be different. Default compares all
attributes.
filter_null_value_attributes (bool): Specifies the option to not
return attributes where source and destination values are null
values. This reduces noise of the properties in the objects
returned.
filter_same_value_attributes (bool): Specifies the option to not
return attributes where source and destination values are same.
Use this flag to return only values that are different.
guid_pairs (list of GuidPair): Specifies the GuidPair of the AD
Objects which we want to compare from both Snapshot and Production
AD.
quick_compare (bool): Specifies the option to do quick compare of
specified guid between Snapshot AD and Production AD. If at least
one attribute mismatch is found, comparison stops and returns with
AdObjectFlag kNotEqual.
"""
# Create a mapping from Model property names to API property names
_names = {
"restore_task_id":'RestoreTaskId',
"allow_empty_dest_guids":'allowEmptyDestGuids',
"case_sensitive":'caseSensitive',
"exclude_sys_attributes":'excludeSysAttributes',
"filter_null_value_attributes":'filterNullValueAttributes',
"filter_same_value_attributes":'filterSameValueAttributes',
"guid_pairs":'guidPairs',
"quick_compare":'quickCompare'
}
def __init__(self,
restore_task_id=None,
allow_empty_dest_guids=None,
case_sensitive=None,
exclude_sys_attributes=None,
filter_null_value_attributes=None,
filter_same_value_attributes=None,
guid_pairs=None,
quick_compare=None):
"""Constructor for the CompareAdObjectsRequest class"""
# Initialize members of the class
self.restore_task_id = restore_task_id
self.allow_empty_dest_guids = allow_empty_dest_guids
self.case_sensitive = case_sensitive
self.exclude_sys_attributes = exclude_sys_attributes
self.filter_null_value_attributes = filter_null_value_attributes
self.filter_same_value_attributes = filter_same_value_attributes
self.guid_pairs = guid_pairs
self.quick_compare = quick_compare
@classmethod
def from_dictionary(cls,
dictionary):
"""Creates an instance of this model from a dictionary
Args:
dictionary (dictionary): A dictionary representation of the object as
obtained from the deserialization of the server's response. The keys
MUST match property names in the API description.
Returns:
object: An instance of this structure class.
"""
if dictionary is None:
return None
# Extract variables from the dictionary
restore_task_id = dictionary.get('RestoreTaskId')
allow_empty_dest_guids = dictionary.get('allowEmptyDestGuids')
case_sensitive = dictionary.get('caseSensitive')
exclude_sys_attributes = dictionary.get('excludeSysAttributes')
filter_null_value_attributes = dictionary.get('filterNullValueAttributes')
filter_same_value_attributes = dictionary.get('filterSameValueAttributes')
guid_pairs = None
if dictionary.get('guidPairs') != None:
guid_pairs = list()
for structure in dictionary.get('guidPairs'):
guid_pairs.append(cohesity_management_sdk.models.guid_pair.GuidPair.from_dictionary(structure))
quick_compare = dictionary.get('quickCompare')
# Return an object of this model
return cls(restore_task_id,
allow_empty_dest_guids,
case_sensitive,
exclude_sys_attributes,
filter_null_value_attributes,
filter_same_value_attributes,
guid_pairs,
quick_compare)
|
import pandas as pd
import numpy as np
import yfinance as yf
from sklearn.linear_model import LinearRegression
import statsmodels
import statsmodels.api as sm
import statsmodels.tsa.stattools as ts
import datetime
import scipy.stats
import math
import openpyxl as pyxl
from scipy import signal
from scipy import stats as ss
import statistics
from finta import TA
from filterpy.kalman import KalmanFilter
from filterpy.common import Q_discrete_white_noise
import pandas_ta as ta
from pingouin import gzscore
def SpeedMeanReversion(series):
"""
This function calculate the speed mean reversion.
Arguments:
----------
- series: Pandas Series
The series needed to calculate the speed mean reversion
Return:
----------
- SpeedMR: float
The speed mean reversion of the series.
"""
Data_lag = series.shift(1).reset_index(drop=True)
Data_lag = Data_lag.dropna()
Data_returns = series.reset_index(drop=True) - Data_lag
Data_returns = Data_returns.dropna()
Data_lag2 = sm.add_constant(Data_lag)
model = sm.OLS(Data_returns, Data_lag2)
results = model.fit()
SpeedMR = results.params[1]
return SpeedMR
|
from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Heatmapgl(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "heatmapgl"
_valid_props = {
"autocolorscale",
"coloraxis",
"colorbar",
"colorscale",
"customdata",
"customdatasrc",
"dx",
"dy",
"hoverinfo",
"hoverinfosrc",
"hoverlabel",
"ids",
"idssrc",
"meta",
"metasrc",
"name",
"opacity",
"reversescale",
"showscale",
"stream",
"text",
"textsrc",
"transpose",
"type",
"uid",
"uirevision",
"visible",
"x",
"x0",
"xaxis",
"xsrc",
"xtype",
"y",
"y0",
"yaxis",
"ysrc",
"ytype",
"z",
"zauto",
"zmax",
"zmid",
"zmin",
"zsmooth",
"zsrc",
}
# autocolorscale
# --------------
@property
def autocolorscale(self):
"""
Determines whether the colorscale is a default palette
(`autocolorscale: true`) or the palette determined by
`colorscale`. In case `colorscale` is unspecified or
`autocolorscale` is true, the default palette will be chosen
according to whether numbers in the `color` array are all
positive, all negative or mixed.
The 'autocolorscale' property must be specified as a bool
(either True, or False)
Returns
-------
bool
"""
return self["autocolorscale"]
@autocolorscale.setter
def autocolorscale(self, val):
self["autocolorscale"] = val
# coloraxis
# ---------
@property
def coloraxis(self):
"""
Sets a reference to a shared color axis. References to these
shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
etc. Settings for these shared color axes are set in the
layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
Note that multiple color scales can be linked to the same color
axis.
The 'coloraxis' property is an identifier of a particular
subplot, of type 'coloraxis', that may be specified as the string 'coloraxis'
optionally followed by an integer >= 1
(e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.)
Returns
-------
str
"""
return self["coloraxis"]
@coloraxis.setter
def coloraxis(self, val):
self["coloraxis"] = val
# colorbar
# --------
@property
def colorbar(self):
"""
The 'colorbar' property is an instance of ColorBar
that may be specified as:
- An instance of :class:`new_plotly.graph_objs.heatmapgl.ColorBar`
- A dict of string/value properties that will be passed
to the ColorBar constructor
Supported dict properties:
bgcolor
Sets the color of padded area.
bordercolor
Sets the axis line color.
borderwidth
Sets the width (in px) or the border enclosing
this color bar.
dtick
Sets the step in-between ticks on this axis.
Use with `tick0`. Must be a positive number, or
special strings available to "log" and "date"
axes. If the axis `type` is "log", then ticks
are set every 10^(n*dtick) where n is the tick
number. For example, to set a tick mark at 1,
10, 100, 1000, ... set dtick to 1. To set tick
marks at 1, 100, 10000, ... set dtick to 2. To
set tick marks at 1, 5, 25, 125, 625, 3125, ...
set dtick to log_10(5), or 0.69897000433. "log"
has several special values; "L<f>", where `f`
is a positive number, gives ticks linearly
spaced in value (but not position). For example
`tick0` = 0.1, `dtick` = "L0.5" will put ticks
at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10
plus small digits between, use "D1" (all
digits) or "D2" (only 2 and 5). `tick0` is
ignored for "D1" and "D2". If the axis `type`
is "date", then you must convert the time to
milliseconds. For example, to set the interval
between ticks to one day, set `dtick` to
86400000.0. "date" also has special values
"M<n>" gives ticks spaced by a number of
months. `n` must be a positive integer. To set
ticks on the 15th of every third month, set
`tick0` to "2000-01-15" and `dtick` to "M3". To
set ticks every 4 years, set `dtick` to "M48"
exponentformat
Determines a formatting rule for the tick
exponents. For example, consider the number
1,000,000,000. If "none", it appears as
1,000,000,000. If "e", 1e+9. If "E", 1E+9. If
"power", 1x10^9 (with 9 in a super script). If
"SI", 1G. If "B", 1B.
len
Sets the length of the color bar This measure
excludes the padding of both ends. That is, the
color bar length is this length minus the
padding on both ends.
lenmode
Determines whether this color bar's length
(i.e. the measure in the color variation
direction) is set in units of plot "fraction"
or in *pixels. Use `len` to set the value.
minexponent
Hide SI prefix for 10^n if |n| is below this
number. This only has an effect when
`tickformat` is "SI" or "B".
nticks
Specifies the maximum number of ticks for the
particular axis. The actual number of ticks
will be chosen automatically to be less than or
equal to `nticks`. Has an effect only if
`tickmode` is set to "auto".
outlinecolor
Sets the axis line color.
outlinewidth
Sets the width (in px) of the axis line.
separatethousands
If "true", even 4-digit integers are separated
showexponent
If "all", all exponents are shown besides their
significands. If "first", only the exponent of
the first tick is shown. If "last", only the
exponent of the last tick is shown. If "none",
no exponents appear.
showticklabels
Determines whether or not the tick labels are
drawn.
showtickprefix
If "all", all tick labels are displayed with a
prefix. If "first", only the first tick is
displayed with a prefix. If "last", only the
last tick is displayed with a suffix. If
"none", tick prefixes are hidden.
showticksuffix
Same as `showtickprefix` but for tick suffixes.
thickness
Sets the thickness of the color bar This
measure excludes the size of the padding, ticks
and labels.
thicknessmode
Determines whether this color bar's thickness
(i.e. the measure in the constant color
direction) is set in units of plot "fraction"
or in "pixels". Use `thickness` to set the
value.
tick0
Sets the placement of the first tick on this
axis. Use with `dtick`. If the axis `type` is
"log", then you must take the log of your
starting tick (e.g. to set the starting tick to
100, set the `tick0` to 2) except when
`dtick`=*L<f>* (see `dtick` for more info). If
the axis `type` is "date", it should be a date
string, like date data. If the axis `type` is
"category", it should be a number, using the
scale where each category is assigned a serial
number from zero in the order it appears.
tickangle
Sets the angle of the tick labels with respect
to the horizontal. For example, a `tickangle`
of -90 draws the tick labels vertically.
tickcolor
Sets the tick color.
tickfont
Sets the color bar's tick label font
tickformat
Sets the tick label formatting rule using d3
formatting mini-languages which are very
similar to those in Python. For numbers, see:
https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format
And for dates see:
https://github.com/d3/d3-time-
format#locale_format We add one item to d3's
date formatter: "%{n}f" for fractional seconds
with n digits. For example, *2016-10-13
09:15:23.456* with tickformat "%H~%M~%S.%2f"
would display "09~15~23.46"
tickformatstops
A tuple of :class:`new_plotly.graph_objects.heatmap
gl.colorbar.Tickformatstop` instances or dicts
with compatible properties
tickformatstopdefaults
When used in a template (as layout.template.dat
a.heatmapgl.colorbar.tickformatstopdefaults),
sets the default property values to use for
elements of heatmapgl.colorbar.tickformatstops
ticklabeloverflow
Determines how we handle tick labels that would
overflow either the graph div or the domain of
the axis. The default value for inside tick
labels is *hide past domain*. In other cases
the default is *hide past div*.
ticklabelposition
Determines where tick labels are drawn.
ticklen
Sets the tick length (in px).
tickmode
Sets the tick mode for this axis. If "auto",
the number of ticks is set via `nticks`. If
"linear", the placement of the ticks is
determined by a starting position `tick0` and a
tick step `dtick` ("linear" is the default
value if `tick0` and `dtick` are provided). If
"array", the placement of the ticks is set via
`tickvals` and the tick text is `ticktext`.
("array" is the default value if `tickvals` is
provided).
tickprefix
Sets a tick label prefix.
ticks
Determines whether ticks are drawn or not. If
"", this axis' ticks are not drawn. If
"outside" ("inside"), this axis' are drawn
outside (inside) the axis lines.
ticksuffix
Sets a tick label suffix.
ticktext
Sets the text displayed at the ticks position
via `tickvals`. Only has an effect if
`tickmode` is set to "array". Used with
`tickvals`.
ticktextsrc
Sets the source reference on Chart Studio Cloud
for ticktext .
tickvals
Sets the values at which ticks on this axis
appear. Only has an effect if `tickmode` is set
to "array". Used with `ticktext`.
tickvalssrc
Sets the source reference on Chart Studio Cloud
for tickvals .
tickwidth
Sets the tick width (in px).
title
:class:`new_plotly.graph_objects.heatmapgl.colorbar
.Title` instance or dict with compatible
properties
titlefont
Deprecated: Please use
heatmapgl.colorbar.title.font instead. Sets
this color bar's title font. Note that the
title's font used to be set by the now
deprecated `titlefont` attribute.
titleside
Deprecated: Please use
heatmapgl.colorbar.title.side instead.
Determines the location of color bar's title
with respect to the color bar. Note that the
title's location used to be set by the now
deprecated `titleside` attribute.
x
Sets the x position of the color bar (in plot
fraction).
xanchor
Sets this color bar's horizontal position
anchor. This anchor binds the `x` position to
the "left", "center" or "right" of the color
bar.
xpad
Sets the amount of padding (in px) along the x
direction.
y
Sets the y position of the color bar (in plot
fraction).
yanchor
Sets this color bar's vertical position anchor
This anchor binds the `y` position to the
"top", "middle" or "bottom" of the color bar.
ypad
Sets the amount of padding (in px) along the y
direction.
Returns
-------
new_plotly.graph_objs.heatmapgl.ColorBar
"""
return self["colorbar"]
@colorbar.setter
def colorbar(self, val):
self["colorbar"] = val
# colorscale
# ----------
@property
def colorscale(self):
"""
Sets the colorscale. The colorscale must be an array containing
arrays mapping a normalized value to an rgb, rgba, hex, hsl,
hsv, or named color string. At minimum, a mapping for the
lowest (0) and highest (1) values are required. For example,
`[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the
bounds of the colorscale in color space, use`zmin` and `zmax`.
Alternatively, `colorscale` may be a palette name string of the
following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Bl
ues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Vi
ridis,Cividis.
The 'colorscale' property is a colorscale and may be
specified as:
- A list of colors that will be spaced evenly to create the colorscale.
Many predefined colorscale lists are included in the sequential, diverging,
and cyclical modules in the new_plotly.colors package.
- A list of 2-element lists where the first element is the
normalized color level value (starting at 0 and ending at 1),
and the second item is a valid color string.
(e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']])
- One of the following named colorscales:
['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance',
'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg',
'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl',
'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric',
'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys',
'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet',
'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges',
'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl',
'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn',
'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu',
'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar',
'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn',
'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid',
'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr',
'ylorrd'].
Appending '_r' to a named colorscale reverses it.
Returns
-------
str
"""
return self["colorscale"]
@colorscale.setter
def colorscale(self, val):
self["colorscale"] = val
# customdata
# ----------
@property
def customdata(self):
"""
Assigns extra data each datum. This may be useful when
listening to hover, click and selection events. Note that,
"scatter" traces also appends customdata items in the markers
DOM elements
The 'customdata' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
"""
return self["customdata"]
@customdata.setter
def customdata(self, val):
self["customdata"] = val
# customdatasrc
# -------------
@property
def customdatasrc(self):
"""
Sets the source reference on Chart Studio Cloud for customdata
.
The 'customdatasrc' property must be specified as a string or
as a new_plotly.grid_objs.Column object
Returns
-------
str
"""
return self["customdatasrc"]
@customdatasrc.setter
def customdatasrc(self, val):
self["customdatasrc"] = val
# dx
# --
@property
def dx(self):
"""
Sets the x coordinate step. See `x0` for more info.
The 'dx' property is a number and may be specified as:
- An int or float
Returns
-------
int|float
"""
return self["dx"]
@dx.setter
def dx(self, val):
self["dx"] = val
# dy
# --
@property
def dy(self):
"""
Sets the y coordinate step. See `y0` for more info.
The 'dy' property is a number and may be specified as:
- An int or float
Returns
-------
int|float
"""
return self["dy"]
@dy.setter
def dy(self, val):
self["dy"] = val
# hoverinfo
# ---------
@property
def hoverinfo(self):
"""
Determines which trace information appear on hover. If `none`
or `skip` are set, no information is displayed upon hovering.
But, if `none` is set, click and hover events are still fired.
The 'hoverinfo' property is a flaglist and may be specified
as a string containing:
- Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
(e.g. 'x+y')
OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
- A list or array of the above
Returns
-------
Any|numpy.ndarray
"""
return self["hoverinfo"]
@hoverinfo.setter
def hoverinfo(self, val):
self["hoverinfo"] = val
# hoverinfosrc
# ------------
@property
def hoverinfosrc(self):
"""
Sets the source reference on Chart Studio Cloud for hoverinfo
.
The 'hoverinfosrc' property must be specified as a string or
as a new_plotly.grid_objs.Column object
Returns
-------
str
"""
return self["hoverinfosrc"]
@hoverinfosrc.setter
def hoverinfosrc(self, val):
self["hoverinfosrc"] = val
# hoverlabel
# ----------
@property
def hoverlabel(self):
"""
The 'hoverlabel' property is an instance of Hoverlabel
that may be specified as:
- An instance of :class:`new_plotly.graph_objs.heatmapgl.Hoverlabel`
- A dict of string/value properties that will be passed
to the Hoverlabel constructor
Supported dict properties:
align
Sets the horizontal alignment of the text
content within hover label box. Has an effect
only if the hover label text spans more two or
more lines
alignsrc
Sets the source reference on Chart Studio Cloud
for align .
bgcolor
Sets the background color of the hover labels
for this trace
bgcolorsrc
Sets the source reference on Chart Studio Cloud
for bgcolor .
bordercolor
Sets the border color of the hover labels for
this trace.
bordercolorsrc
Sets the source reference on Chart Studio Cloud
for bordercolor .
font
Sets the font used in hover labels.
namelength
Sets the default length (in number of
characters) of the trace name in the hover
labels for all traces. -1 shows the whole name
regardless of length. 0-3 shows the first 0-3
characters, and an integer >3 will show the
whole name if it is less than that many
characters, but if it is longer, will truncate
to `namelength - 3` characters and add an
ellipsis.
namelengthsrc
Sets the source reference on Chart Studio Cloud
for namelength .
Returns
-------
new_plotly.graph_objs.heatmapgl.Hoverlabel
"""
return self["hoverlabel"]
@hoverlabel.setter
def hoverlabel(self, val):
self["hoverlabel"] = val
# ids
# ---
@property
def ids(self):
"""
Assigns id labels to each datum. These ids for object constancy
of data points during animation. Should be an array of strings,
not numbers or any other type.
The 'ids' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
"""
return self["ids"]
@ids.setter
def ids(self, val):
self["ids"] = val
# idssrc
# ------
@property
def idssrc(self):
"""
Sets the source reference on Chart Studio Cloud for ids .
The 'idssrc' property must be specified as a string or
as a new_plotly.grid_objs.Column object
Returns
-------
str
"""
return self["idssrc"]
@idssrc.setter
def idssrc(self, val):
self["idssrc"] = val
# meta
# ----
@property
def meta(self):
"""
Assigns extra meta information associated with this trace that
can be used in various text attributes. Attributes such as
trace `name`, graph, axis and colorbar `title.text`, annotation
`text` `rangeselector`, `updatemenues` and `sliders` `label`
text all support `meta`. To access the trace `meta` values in
an attribute in the same trace, simply use `%{meta[i]}` where
`i` is the index or key of the `meta` item in question. To
access trace `meta` in layout attributes, use
`%{data[n[.meta[i]}` where `i` is the index or key of the
`meta` and `n` is the trace index.
The 'meta' property accepts values of any type
Returns
-------
Any|numpy.ndarray
"""
return self["meta"]
@meta.setter
def meta(self, val):
self["meta"] = val
# metasrc
# -------
@property
def metasrc(self):
"""
Sets the source reference on Chart Studio Cloud for meta .
The 'metasrc' property must be specified as a string or
as a new_plotly.grid_objs.Column object
Returns
-------
str
"""
return self["metasrc"]
@metasrc.setter
def metasrc(self, val):
self["metasrc"] = val
# name
# ----
@property
def name(self):
"""
Sets the trace name. The trace name appear as the legend item
and on hover.
The 'name' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
"""
return self["name"]
@name.setter
def name(self, val):
self["name"] = val
# opacity
# -------
@property
def opacity(self):
"""
Sets the opacity of the trace.
The 'opacity' property is a number and may be specified as:
- An int or float in the interval [0, 1]
Returns
-------
int|float
"""
return self["opacity"]
@opacity.setter
def opacity(self, val):
self["opacity"] = val
# reversescale
# ------------
@property
def reversescale(self):
"""
Reverses the color mapping if true. If true, `zmin` will
correspond to the last color in the array and `zmax` will
correspond to the first color.
The 'reversescale' property must be specified as a bool
(either True, or False)
Returns
-------
bool
"""
return self["reversescale"]
@reversescale.setter
def reversescale(self, val):
self["reversescale"] = val
# showscale
# ---------
@property
def showscale(self):
"""
Determines whether or not a colorbar is displayed for this
trace.
The 'showscale' property must be specified as a bool
(either True, or False)
Returns
-------
bool
"""
return self["showscale"]
@showscale.setter
def showscale(self, val):
self["showscale"] = val
# stream
# ------
@property
def stream(self):
"""
The 'stream' property is an instance of Stream
that may be specified as:
- An instance of :class:`new_plotly.graph_objs.heatmapgl.Stream`
- A dict of string/value properties that will be passed
to the Stream constructor
Supported dict properties:
maxpoints
Sets the maximum number of points to keep on
the plots from an incoming stream. If
`maxpoints` is set to 50, only the newest 50
points will be displayed on the plot.
token
The stream id number links a data trace on a
plot with a stream. See https://chart-
studio.new_plotly.com/settings for more details.
Returns
-------
new_plotly.graph_objs.heatmapgl.Stream
"""
return self["stream"]
@stream.setter
def stream(self, val):
self["stream"] = val
# text
# ----
@property
def text(self):
"""
Sets the text elements associated with each z value.
The 'text' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
"""
return self["text"]
@text.setter
def text(self, val):
self["text"] = val
# textsrc
# -------
@property
def textsrc(self):
"""
Sets the source reference on Chart Studio Cloud for text .
The 'textsrc' property must be specified as a string or
as a new_plotly.grid_objs.Column object
Returns
-------
str
"""
return self["textsrc"]
@textsrc.setter
def textsrc(self, val):
self["textsrc"] = val
# transpose
# ---------
@property
def transpose(self):
"""
Transposes the z data.
The 'transpose' property must be specified as a bool
(either True, or False)
Returns
-------
bool
"""
return self["transpose"]
@transpose.setter
def transpose(self, val):
self["transpose"] = val
# uid
# ---
@property
def uid(self):
"""
Assign an id to this trace, Use this to provide object
constancy between traces during animations and transitions.
The 'uid' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
"""
return self["uid"]
@uid.setter
def uid(self, val):
self["uid"] = val
# uirevision
# ----------
@property
def uirevision(self):
"""
Controls persistence of some user-driven changes to the trace:
`constraintrange` in `parcoords` traces, as well as some
`editable: true` modifications such as `name` and
`colorbar.title`. Defaults to `layout.uirevision`. Note that
other user-driven trace attribute changes are controlled by
`layout` attributes: `trace.visible` is controlled by
`layout.legend.uirevision`, `selectedpoints` is controlled by
`layout.selectionrevision`, and `colorbar.(x|y)` (accessible
with `config: {editable: true}`) is controlled by
`layout.editrevision`. Trace changes are tracked by `uid`,
which only falls back on trace index if no `uid` is provided.
So if your app can add/remove traces before the end of the
`data` array, such that the same trace has a different index,
you can still preserve user-driven changes if you give each
trace a `uid` that stays with it as it moves.
The 'uirevision' property accepts values of any type
Returns
-------
Any
"""
return self["uirevision"]
@uirevision.setter
def uirevision(self, val):
self["uirevision"] = val
# visible
# -------
@property
def visible(self):
"""
Determines whether or not this trace is visible. If
"legendonly", the trace is not drawn, but can appear as a
legend item (provided that the legend itself is visible).
The 'visible' property is an enumeration that may be specified as:
- One of the following enumeration values:
[True, False, 'legendonly']
Returns
-------
Any
"""
return self["visible"]
@visible.setter
def visible(self, val):
self["visible"] = val
# x
# -
@property
def x(self):
"""
Sets the x coordinates.
The 'x' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
"""
return self["x"]
@x.setter
def x(self, val):
self["x"] = val
# x0
# --
@property
def x0(self):
"""
Alternate to `x`. Builds a linear space of x coordinates. Use
with `dx` where `x0` is the starting coordinate and `dx` the
step.
The 'x0' property accepts values of any type
Returns
-------
Any
"""
return self["x0"]
@x0.setter
def x0(self, val):
self["x0"] = val
# xaxis
# -----
@property
def xaxis(self):
"""
Sets a reference between this trace's x coordinates and a 2D
cartesian x axis. If "x" (the default value), the x coordinates
refer to `layout.xaxis`. If "x2", the x coordinates refer to
`layout.xaxis2`, and so on.
The 'xaxis' property is an identifier of a particular
subplot, of type 'x', that may be specified as the string 'x'
optionally followed by an integer >= 1
(e.g. 'x', 'x1', 'x2', 'x3', etc.)
Returns
-------
str
"""
return self["xaxis"]
@xaxis.setter
def xaxis(self, val):
self["xaxis"] = val
# xsrc
# ----
@property
def xsrc(self):
"""
Sets the source reference on Chart Studio Cloud for x .
The 'xsrc' property must be specified as a string or
as a new_plotly.grid_objs.Column object
Returns
-------
str
"""
return self["xsrc"]
@xsrc.setter
def xsrc(self, val):
self["xsrc"] = val
# xtype
# -----
@property
def xtype(self):
"""
If "array", the heatmap's x coordinates are given by "x" (the
default behavior when `x` is provided). If "scaled", the
heatmap's x coordinates are given by "x0" and "dx" (the default
behavior when `x` is not provided).
The 'xtype' property is an enumeration that may be specified as:
- One of the following enumeration values:
['array', 'scaled']
Returns
-------
Any
"""
return self["xtype"]
@xtype.setter
def xtype(self, val):
self["xtype"] = val
# y
# -
@property
def y(self):
"""
Sets the y coordinates.
The 'y' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
"""
return self["y"]
@y.setter
def y(self, val):
self["y"] = val
# y0
# --
@property
def y0(self):
"""
Alternate to `y`. Builds a linear space of y coordinates. Use
with `dy` where `y0` is the starting coordinate and `dy` the
step.
The 'y0' property accepts values of any type
Returns
-------
Any
"""
return self["y0"]
@y0.setter
def y0(self, val):
self["y0"] = val
# yaxis
# -----
@property
def yaxis(self):
"""
Sets a reference between this trace's y coordinates and a 2D
cartesian y axis. If "y" (the default value), the y coordinates
refer to `layout.yaxis`. If "y2", the y coordinates refer to
`layout.yaxis2`, and so on.
The 'yaxis' property is an identifier of a particular
subplot, of type 'y', that may be specified as the string 'y'
optionally followed by an integer >= 1
(e.g. 'y', 'y1', 'y2', 'y3', etc.)
Returns
-------
str
"""
return self["yaxis"]
@yaxis.setter
def yaxis(self, val):
self["yaxis"] = val
# ysrc
# ----
@property
def ysrc(self):
"""
Sets the source reference on Chart Studio Cloud for y .
The 'ysrc' property must be specified as a string or
as a new_plotly.grid_objs.Column object
Returns
-------
str
"""
return self["ysrc"]
@ysrc.setter
def ysrc(self, val):
self["ysrc"] = val
# ytype
# -----
@property
def ytype(self):
"""
If "array", the heatmap's y coordinates are given by "y" (the
default behavior when `y` is provided) If "scaled", the
heatmap's y coordinates are given by "y0" and "dy" (the default
behavior when `y` is not provided)
The 'ytype' property is an enumeration that may be specified as:
- One of the following enumeration values:
['array', 'scaled']
Returns
-------
Any
"""
return self["ytype"]
@ytype.setter
def ytype(self, val):
self["ytype"] = val
# z
# -
@property
def z(self):
"""
Sets the z data.
The 'z' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
"""
return self["z"]
@z.setter
def z(self, val):
self["z"] = val
# zauto
# -----
@property
def zauto(self):
"""
Determines whether or not the color domain is computed with
respect to the input data (here in `z`) or the bounds set in
`zmin` and `zmax` Defaults to `false` when `zmin` and `zmax`
are set by the user.
The 'zauto' property must be specified as a bool
(either True, or False)
Returns
-------
bool
"""
return self["zauto"]
@zauto.setter
def zauto(self, val):
self["zauto"] = val
# zmax
# ----
@property
def zmax(self):
"""
Sets the upper bound of the color domain. Value should have the
same units as in `z` and if set, `zmin` must be set as well.
The 'zmax' property is a number and may be specified as:
- An int or float
Returns
-------
int|float
"""
return self["zmax"]
@zmax.setter
def zmax(self, val):
self["zmax"] = val
# zmid
# ----
@property
def zmid(self):
"""
Sets the mid-point of the color domain by scaling `zmin` and/or
`zmax` to be equidistant to this point. Value should have the
same units as in `z`. Has no effect when `zauto` is `false`.
The 'zmid' property is a number and may be specified as:
- An int or float
Returns
-------
int|float
"""
return self["zmid"]
@zmid.setter
def zmid(self, val):
self["zmid"] = val
# zmin
# ----
@property
def zmin(self):
"""
Sets the lower bound of the color domain. Value should have the
same units as in `z` and if set, `zmax` must be set as well.
The 'zmin' property is a number and may be specified as:
- An int or float
Returns
-------
int|float
"""
return self["zmin"]
@zmin.setter
def zmin(self, val):
self["zmin"] = val
# zsmooth
# -------
@property
def zsmooth(self):
"""
Picks a smoothing algorithm use to smooth `z` data.
The 'zsmooth' property is an enumeration that may be specified as:
- One of the following enumeration values:
['fast', False]
Returns
-------
Any
"""
return self["zsmooth"]
@zsmooth.setter
def zsmooth(self, val):
self["zsmooth"] = val
# zsrc
# ----
@property
def zsrc(self):
"""
Sets the source reference on Chart Studio Cloud for z .
The 'zsrc' property must be specified as a string or
as a new_plotly.grid_objs.Column object
Returns
-------
str
"""
return self["zsrc"]
@zsrc.setter
def zsrc(self, val):
self["zsrc"] = val
# type
# ----
@property
def type(self):
return self._props["type"]
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
autocolorscale
Determines whether the colorscale is a default palette
(`autocolorscale: true`) or the palette determined by
`colorscale`. In case `colorscale` is unspecified or
`autocolorscale` is true, the default palette will be
chosen according to whether numbers in the `color`
array are all positive, all negative or mixed.
coloraxis
Sets a reference to a shared color axis. References to
these shared color axes are "coloraxis", "coloraxis2",
"coloraxis3", etc. Settings for these shared color axes
are set in the layout, under `layout.coloraxis`,
`layout.coloraxis2`, etc. Note that multiple color
scales can be linked to the same color axis.
colorbar
:class:`new_plotly.graph_objects.heatmapgl.ColorBar`
instance or dict with compatible properties
colorscale
Sets the colorscale. The colorscale must be an array
containing arrays mapping a normalized value to an rgb,
rgba, hex, hsl, hsv, or named color string. At minimum,
a mapping for the lowest (0) and highest (1) values are
required. For example, `[[0, 'rgb(0,0,255)'], [1,
'rgb(255,0,0)']]`. To control the bounds of the
colorscale in color space, use`zmin` and `zmax`.
Alternatively, `colorscale` may be a palette name
string of the following list: Greys,YlGnBu,Greens,YlOrR
d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
ot,Blackbody,Earth,Electric,Viridis,Cividis.
customdata
Assigns extra data each datum. This may be useful when
listening to hover, click and selection events. Note
that, "scatter" traces also appends customdata items in
the markers DOM elements
customdatasrc
Sets the source reference on Chart Studio Cloud for
customdata .
dx
Sets the x coordinate step. See `x0` for more info.
dy
Sets the y coordinate step. See `y0` for more info.
hoverinfo
Determines which trace information appear on hover. If
`none` or `skip` are set, no information is displayed
upon hovering. But, if `none` is set, click and hover
events are still fired.
hoverinfosrc
Sets the source reference on Chart Studio Cloud for
hoverinfo .
hoverlabel
:class:`new_plotly.graph_objects.heatmapgl.Hoverlabel`
instance or dict with compatible properties
ids
Assigns id labels to each datum. These ids for object
constancy of data points during animation. Should be an
array of strings, not numbers or any other type.
idssrc
Sets the source reference on Chart Studio Cloud for
ids .
meta
Assigns extra meta information associated with this
trace that can be used in various text attributes.
Attributes such as trace `name`, graph, axis and
colorbar `title.text`, annotation `text`
`rangeselector`, `updatemenues` and `sliders` `label`
text all support `meta`. To access the trace `meta`
values in an attribute in the same trace, simply use
`%{meta[i]}` where `i` is the index or key of the
`meta` item in question. To access trace `meta` in
layout attributes, use `%{data[n[.meta[i]}` where `i`
is the index or key of the `meta` and `n` is the trace
index.
metasrc
Sets the source reference on Chart Studio Cloud for
meta .
name
Sets the trace name. The trace name appear as the
legend item and on hover.
opacity
Sets the opacity of the trace.
reversescale
Reverses the color mapping if true. If true, `zmin`
will correspond to the last color in the array and
`zmax` will correspond to the first color.
showscale
Determines whether or not a colorbar is displayed for
this trace.
stream
:class:`new_plotly.graph_objects.heatmapgl.Stream` instance
or dict with compatible properties
text
Sets the text elements associated with each z value.
textsrc
Sets the source reference on Chart Studio Cloud for
text .
transpose
Transposes the z data.
uid
Assign an id to this trace, Use this to provide object
constancy between traces during animations and
transitions.
uirevision
Controls persistence of some user-driven changes to the
trace: `constraintrange` in `parcoords` traces, as well
as some `editable: true` modifications such as `name`
and `colorbar.title`. Defaults to `layout.uirevision`.
Note that other user-driven trace attribute changes are
controlled by `layout` attributes: `trace.visible` is
controlled by `layout.legend.uirevision`,
`selectedpoints` is controlled by
`layout.selectionrevision`, and `colorbar.(x|y)`
(accessible with `config: {editable: true}`) is
controlled by `layout.editrevision`. Trace changes are
tracked by `uid`, which only falls back on trace index
if no `uid` is provided. So if your app can add/remove
traces before the end of the `data` array, such that
the same trace has a different index, you can still
preserve user-driven changes if you give each trace a
`uid` that stays with it as it moves.
visible
Determines whether or not this trace is visible. If
"legendonly", the trace is not drawn, but can appear as
a legend item (provided that the legend itself is
visible).
x
Sets the x coordinates.
x0
Alternate to `x`. Builds a linear space of x
coordinates. Use with `dx` where `x0` is the starting
coordinate and `dx` the step.
xaxis
Sets a reference between this trace's x coordinates and
a 2D cartesian x axis. If "x" (the default value), the
x coordinates refer to `layout.xaxis`. If "x2", the x
coordinates refer to `layout.xaxis2`, and so on.
xsrc
Sets the source reference on Chart Studio Cloud for x
.
xtype
If "array", the heatmap's x coordinates are given by
"x" (the default behavior when `x` is provided). If
"scaled", the heatmap's x coordinates are given by "x0"
and "dx" (the default behavior when `x` is not
provided).
y
Sets the y coordinates.
y0
Alternate to `y`. Builds a linear space of y
coordinates. Use with `dy` where `y0` is the starting
coordinate and `dy` the step.
yaxis
Sets a reference between this trace's y coordinates and
a 2D cartesian y axis. If "y" (the default value), the
y coordinates refer to `layout.yaxis`. If "y2", the y
coordinates refer to `layout.yaxis2`, and so on.
ysrc
Sets the source reference on Chart Studio Cloud for y
.
ytype
If "array", the heatmap's y coordinates are given by
"y" (the default behavior when `y` is provided) If
"scaled", the heatmap's y coordinates are given by "y0"
and "dy" (the default behavior when `y` is not
provided)
z
Sets the z data.
zauto
Determines whether or not the color domain is computed
with respect to the input data (here in `z`) or the
bounds set in `zmin` and `zmax` Defaults to `false`
when `zmin` and `zmax` are set by the user.
zmax
Sets the upper bound of the color domain. Value should
have the same units as in `z` and if set, `zmin` must
be set as well.
zmid
Sets the mid-point of the color domain by scaling
`zmin` and/or `zmax` to be equidistant to this point.
Value should have the same units as in `z`. Has no
effect when `zauto` is `false`.
zmin
Sets the lower bound of the color domain. Value should
have the same units as in `z` and if set, `zmax` must
be set as well.
zsmooth
Picks a smoothing algorithm use to smooth `z` data.
zsrc
Sets the source reference on Chart Studio Cloud for z
.
"""
def __init__(
self,
arg=None,
autocolorscale=None,
coloraxis=None,
colorbar=None,
colorscale=None,
customdata=None,
customdatasrc=None,
dx=None,
dy=None,
hoverinfo=None,
hoverinfosrc=None,
hoverlabel=None,
ids=None,
idssrc=None,
meta=None,
metasrc=None,
name=None,
opacity=None,
reversescale=None,
showscale=None,
stream=None,
text=None,
textsrc=None,
transpose=None,
uid=None,
uirevision=None,
visible=None,
x=None,
x0=None,
xaxis=None,
xsrc=None,
xtype=None,
y=None,
y0=None,
yaxis=None,
ysrc=None,
ytype=None,
z=None,
zauto=None,
zmax=None,
zmid=None,
zmin=None,
zsmooth=None,
zsrc=None,
**kwargs
):
"""
Construct a new Heatmapgl object
"heatmapgl" trace is deprecated! Please consider switching to
the "heatmap" or "image" trace types. Alternatively you could
contribute/sponsor rewriting this trace type based on cartesian
features and using regl framework. WebGL version of the heatmap
trace type.
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`new_plotly.graph_objs.Heatmapgl`
autocolorscale
Determines whether the colorscale is a default palette
(`autocolorscale: true`) or the palette determined by
`colorscale`. In case `colorscale` is unspecified or
`autocolorscale` is true, the default palette will be
chosen according to whether numbers in the `color`
array are all positive, all negative or mixed.
coloraxis
Sets a reference to a shared color axis. References to
these shared color axes are "coloraxis", "coloraxis2",
"coloraxis3", etc. Settings for these shared color axes
are set in the layout, under `layout.coloraxis`,
`layout.coloraxis2`, etc. Note that multiple color
scales can be linked to the same color axis.
colorbar
:class:`new_plotly.graph_objects.heatmapgl.ColorBar`
instance or dict with compatible properties
colorscale
Sets the colorscale. The colorscale must be an array
containing arrays mapping a normalized value to an rgb,
rgba, hex, hsl, hsv, or named color string. At minimum,
a mapping for the lowest (0) and highest (1) values are
required. For example, `[[0, 'rgb(0,0,255)'], [1,
'rgb(255,0,0)']]`. To control the bounds of the
colorscale in color space, use`zmin` and `zmax`.
Alternatively, `colorscale` may be a palette name
string of the following list: Greys,YlGnBu,Greens,YlOrR
d,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,H
ot,Blackbody,Earth,Electric,Viridis,Cividis.
customdata
Assigns extra data each datum. This may be useful when
listening to hover, click and selection events. Note
that, "scatter" traces also appends customdata items in
the markers DOM elements
customdatasrc
Sets the source reference on Chart Studio Cloud for
customdata .
dx
Sets the x coordinate step. See `x0` for more info.
dy
Sets the y coordinate step. See `y0` for more info.
hoverinfo
Determines which trace information appear on hover. If
`none` or `skip` are set, no information is displayed
upon hovering. But, if `none` is set, click and hover
events are still fired.
hoverinfosrc
Sets the source reference on Chart Studio Cloud for
hoverinfo .
hoverlabel
:class:`new_plotly.graph_objects.heatmapgl.Hoverlabel`
instance or dict with compatible properties
ids
Assigns id labels to each datum. These ids for object
constancy of data points during animation. Should be an
array of strings, not numbers or any other type.
idssrc
Sets the source reference on Chart Studio Cloud for
ids .
meta
Assigns extra meta information associated with this
trace that can be used in various text attributes.
Attributes such as trace `name`, graph, axis and
colorbar `title.text`, annotation `text`
`rangeselector`, `updatemenues` and `sliders` `label`
text all support `meta`. To access the trace `meta`
values in an attribute in the same trace, simply use
`%{meta[i]}` where `i` is the index or key of the
`meta` item in question. To access trace `meta` in
layout attributes, use `%{data[n[.meta[i]}` where `i`
is the index or key of the `meta` and `n` is the trace
index.
metasrc
Sets the source reference on Chart Studio Cloud for
meta .
name
Sets the trace name. The trace name appear as the
legend item and on hover.
opacity
Sets the opacity of the trace.
reversescale
Reverses the color mapping if true. If true, `zmin`
will correspond to the last color in the array and
`zmax` will correspond to the first color.
showscale
Determines whether or not a colorbar is displayed for
this trace.
stream
:class:`new_plotly.graph_objects.heatmapgl.Stream` instance
or dict with compatible properties
text
Sets the text elements associated with each z value.
textsrc
Sets the source reference on Chart Studio Cloud for
text .
transpose
Transposes the z data.
uid
Assign an id to this trace, Use this to provide object
constancy between traces during animations and
transitions.
uirevision
Controls persistence of some user-driven changes to the
trace: `constraintrange` in `parcoords` traces, as well
as some `editable: true` modifications such as `name`
and `colorbar.title`. Defaults to `layout.uirevision`.
Note that other user-driven trace attribute changes are
controlled by `layout` attributes: `trace.visible` is
controlled by `layout.legend.uirevision`,
`selectedpoints` is controlled by
`layout.selectionrevision`, and `colorbar.(x|y)`
(accessible with `config: {editable: true}`) is
controlled by `layout.editrevision`. Trace changes are
tracked by `uid`, which only falls back on trace index
if no `uid` is provided. So if your app can add/remove
traces before the end of the `data` array, such that
the same trace has a different index, you can still
preserve user-driven changes if you give each trace a
`uid` that stays with it as it moves.
visible
Determines whether or not this trace is visible. If
"legendonly", the trace is not drawn, but can appear as
a legend item (provided that the legend itself is
visible).
x
Sets the x coordinates.
x0
Alternate to `x`. Builds a linear space of x
coordinates. Use with `dx` where `x0` is the starting
coordinate and `dx` the step.
xaxis
Sets a reference between this trace's x coordinates and
a 2D cartesian x axis. If "x" (the default value), the
x coordinates refer to `layout.xaxis`. If "x2", the x
coordinates refer to `layout.xaxis2`, and so on.
xsrc
Sets the source reference on Chart Studio Cloud for x
.
xtype
If "array", the heatmap's x coordinates are given by
"x" (the default behavior when `x` is provided). If
"scaled", the heatmap's x coordinates are given by "x0"
and "dx" (the default behavior when `x` is not
provided).
y
Sets the y coordinates.
y0
Alternate to `y`. Builds a linear space of y
coordinates. Use with `dy` where `y0` is the starting
coordinate and `dy` the step.
yaxis
Sets a reference between this trace's y coordinates and
a 2D cartesian y axis. If "y" (the default value), the
y coordinates refer to `layout.yaxis`. If "y2", the y
coordinates refer to `layout.yaxis2`, and so on.
ysrc
Sets the source reference on Chart Studio Cloud for y
.
ytype
If "array", the heatmap's y coordinates are given by
"y" (the default behavior when `y` is provided) If
"scaled", the heatmap's y coordinates are given by "y0"
and "dy" (the default behavior when `y` is not
provided)
z
Sets the z data.
zauto
Determines whether or not the color domain is computed
with respect to the input data (here in `z`) or the
bounds set in `zmin` and `zmax` Defaults to `false`
when `zmin` and `zmax` are set by the user.
zmax
Sets the upper bound of the color domain. Value should
have the same units as in `z` and if set, `zmin` must
be set as well.
zmid
Sets the mid-point of the color domain by scaling
`zmin` and/or `zmax` to be equidistant to this point.
Value should have the same units as in `z`. Has no
effect when `zauto` is `false`.
zmin
Sets the lower bound of the color domain. Value should
have the same units as in `z` and if set, `zmax` must
be set as well.
zsmooth
Picks a smoothing algorithm use to smooth `z` data.
zsrc
Sets the source reference on Chart Studio Cloud for z
.
Returns
-------
Heatmapgl
"""
super(Heatmapgl, self).__init__("heatmapgl")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the new_plotly.graph_objs.Heatmapgl
constructor must be a dict or
an instance of :class:`new_plotly.graph_objs.Heatmapgl`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("autocolorscale", None)
_v = autocolorscale if autocolorscale is not None else _v
if _v is not None:
self["autocolorscale"] = _v
_v = arg.pop("coloraxis", None)
_v = coloraxis if coloraxis is not None else _v
if _v is not None:
self["coloraxis"] = _v
_v = arg.pop("colorbar", None)
_v = colorbar if colorbar is not None else _v
if _v is not None:
self["colorbar"] = _v
_v = arg.pop("colorscale", None)
_v = colorscale if colorscale is not None else _v
if _v is not None:
self["colorscale"] = _v
_v = arg.pop("customdata", None)
_v = customdata if customdata is not None else _v
if _v is not None:
self["customdata"] = _v
_v = arg.pop("customdatasrc", None)
_v = customdatasrc if customdatasrc is not None else _v
if _v is not None:
self["customdatasrc"] = _v
_v = arg.pop("dx", None)
_v = dx if dx is not None else _v
if _v is not None:
self["dx"] = _v
_v = arg.pop("dy", None)
_v = dy if dy is not None else _v
if _v is not None:
self["dy"] = _v
_v = arg.pop("hoverinfo", None)
_v = hoverinfo if hoverinfo is not None else _v
if _v is not None:
self["hoverinfo"] = _v
_v = arg.pop("hoverinfosrc", None)
_v = hoverinfosrc if hoverinfosrc is not None else _v
if _v is not None:
self["hoverinfosrc"] = _v
_v = arg.pop("hoverlabel", None)
_v = hoverlabel if hoverlabel is not None else _v
if _v is not None:
self["hoverlabel"] = _v
_v = arg.pop("ids", None)
_v = ids if ids is not None else _v
if _v is not None:
self["ids"] = _v
_v = arg.pop("idssrc", None)
_v = idssrc if idssrc is not None else _v
if _v is not None:
self["idssrc"] = _v
_v = arg.pop("meta", None)
_v = meta if meta is not None else _v
if _v is not None:
self["meta"] = _v
_v = arg.pop("metasrc", None)
_v = metasrc if metasrc is not None else _v
if _v is not None:
self["metasrc"] = _v
_v = arg.pop("name", None)
_v = name if name is not None else _v
if _v is not None:
self["name"] = _v
_v = arg.pop("opacity", None)
_v = opacity if opacity is not None else _v
if _v is not None:
self["opacity"] = _v
_v = arg.pop("reversescale", None)
_v = reversescale if reversescale is not None else _v
if _v is not None:
self["reversescale"] = _v
_v = arg.pop("showscale", None)
_v = showscale if showscale is not None else _v
if _v is not None:
self["showscale"] = _v
_v = arg.pop("stream", None)
_v = stream if stream is not None else _v
if _v is not None:
self["stream"] = _v
_v = arg.pop("text", None)
_v = text if text is not None else _v
if _v is not None:
self["text"] = _v
_v = arg.pop("textsrc", None)
_v = textsrc if textsrc is not None else _v
if _v is not None:
self["textsrc"] = _v
_v = arg.pop("transpose", None)
_v = transpose if transpose is not None else _v
if _v is not None:
self["transpose"] = _v
_v = arg.pop("uid", None)
_v = uid if uid is not None else _v
if _v is not None:
self["uid"] = _v
_v = arg.pop("uirevision", None)
_v = uirevision if uirevision is not None else _v
if _v is not None:
self["uirevision"] = _v
_v = arg.pop("visible", None)
_v = visible if visible is not None else _v
if _v is not None:
self["visible"] = _v
_v = arg.pop("x", None)
_v = x if x is not None else _v
if _v is not None:
self["x"] = _v
_v = arg.pop("x0", None)
_v = x0 if x0 is not None else _v
if _v is not None:
self["x0"] = _v
_v = arg.pop("xaxis", None)
_v = xaxis if xaxis is not None else _v
if _v is not None:
self["xaxis"] = _v
_v = arg.pop("xsrc", None)
_v = xsrc if xsrc is not None else _v
if _v is not None:
self["xsrc"] = _v
_v = arg.pop("xtype", None)
_v = xtype if xtype is not None else _v
if _v is not None:
self["xtype"] = _v
_v = arg.pop("y", None)
_v = y if y is not None else _v
if _v is not None:
self["y"] = _v
_v = arg.pop("y0", None)
_v = y0 if y0 is not None else _v
if _v is not None:
self["y0"] = _v
_v = arg.pop("yaxis", None)
_v = yaxis if yaxis is not None else _v
if _v is not None:
self["yaxis"] = _v
_v = arg.pop("ysrc", None)
_v = ysrc if ysrc is not None else _v
if _v is not None:
self["ysrc"] = _v
_v = arg.pop("ytype", None)
_v = ytype if ytype is not None else _v
if _v is not None:
self["ytype"] = _v
_v = arg.pop("z", None)
_v = z if z is not None else _v
if _v is not None:
self["z"] = _v
_v = arg.pop("zauto", None)
_v = zauto if zauto is not None else _v
if _v is not None:
self["zauto"] = _v
_v = arg.pop("zmax", None)
_v = zmax if zmax is not None else _v
if _v is not None:
self["zmax"] = _v
_v = arg.pop("zmid", None)
_v = zmid if zmid is not None else _v
if _v is not None:
self["zmid"] = _v
_v = arg.pop("zmin", None)
_v = zmin if zmin is not None else _v
if _v is not None:
self["zmin"] = _v
_v = arg.pop("zsmooth", None)
_v = zsmooth if zsmooth is not None else _v
if _v is not None:
self["zsmooth"] = _v
_v = arg.pop("zsrc", None)
_v = zsrc if zsrc is not None else _v
if _v is not None:
self["zsrc"] = _v
# Read-only literals
# ------------------
self._props["type"] = "heatmapgl"
arg.pop("type", None)
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False
|
import numpy as np
import ast
n,m = 3,3
s = raw_input("Enter space sep. matrix elements: ")
items = map(ast.literal_eval, s.split(' '))
assert(len(items) == n*m)
A = np.array(items).reshape((n,m))
print "User given Matrix: "
#print A
s=(n,m)
#L=np.zeros(s)
U=np.zeros(s)
#print L
#print U
L=np.identity(3)
for j in xrange(n):
for i in xrange(j+1):
sum1 = sum(U[k][j] * L[i][k] for k in xrange(i))
U[i][j] = A[i][j]- sum1
for j in xrange(n):
for i in xrange(j, n):
sum2 = sum(U[k][j] * L[i][k] for k in xrange(j))
L[i][j] = (A[i][j] - sum2) / U[j][j]
print "user matrix"
print A
print "L matrix"
print L
print "U matrix"
print U
c=np.dot(L,U)
print "verfied by DOT product of LU"
print c
|
var root = require('../root/root-routes');
var getTagsName = 'getTags';
var createTagsName = 'createTags';
var getTagName = 'getTag';
var deleteTagName = 'deleteTag';
var tagsPath = root.rootPath + 'tags';
var tagPath = tagsPath + '/:tagid';
function addRoutes (server) {
var tagController = require('./tag-controller')(server);
server.get({name : getTagsName, path : tagsPath}, tagController.getTags);
server.post({name : createTagsName, path : tagsPath}, tagController.createTag);
server.get({name : getTagName, path : tagPath}, tagController.getTag);
server.del({name : deleteTagName, path : tagPath}, tagController.deleteTag);
}
module.exports = {
tagPath: tagPath,
addRoutes: addRoutes
};
|
import numpy as np
from numpy import pi,sinh,cosh
from scipy import integrate
try:
import mkl
np.use_fastnumpy = True
except ImportError:
pass
def diff_central(x, y):
x0 = x[:-2]
x1 = x[1:-1]
x2 = x[2:]
y0 = y[:-2]
y1 = y[1:-1]
y2 = y[2:]
f = (x2 - x1)/(x2 - x0)
return (1-f)*(y2 - y1)/(x2 - x1) + f*(y1 - y0)/(x1 - x0)
def spec_helm_decomp(k,Cu,Cv,GM=False):
""" it computes the Buhler et al JFM 2014
Helmholtz decomposition. That is,
it splits the across-track/along-track
KE spectra into rotational and divergent
components.
Inputs
==========
- k: wavenumber
- Cu: spectrum of across-track velocity
- Cv: spectrum of along-track velocity
Outputs
==========
- Cpsi: rotational component of the KE spectrum
- Cphi: divergent component of the KE spectrum
"""
dk = k[1]-k[0]
s = np.log(k)
Fphi = np.zeros_like(Cu)
Fpsi = np.zeros_like(Cu)
Cphi = np.zeros_like(Cu)
Cpsi = np.zeros_like(Cu)
# assume GM for decomposing into wave and vortex
if GM:
gm = np.load("/Users/crocha/Projects/dp_spectra/GM/gm_omega_star.npz")
f2omg2 = gm['rgm']
ks = gm['k']*1.e3
for i in range(s.size-1):
ds = np.diff(s[i:])
sh = sinh(s[i]-s[i:])
ch = cosh(s[i]-s[i:])
# the function to integrate
Fp = Cu[i:]*sh + Cv[i:]*ch
Fs = Cv[i:]*sh + Cu[i:]*ch
# integrate using Simpson's rule
Fpsi[i] = integrate.simps(Fs,s[i:])
Fphi[i] = integrate.simps(Fp,s[i:])
# zero out unphysical values
Fpsi[Fpsi < 0.] = 0.
Fphi[Fphi < 0.] = 0.
# compute rotational and divergent components
Cpsi = Fpsi - Fphi + Cu
Cphi = Fphi - Fpsi + Cv
if GM:
f2omg2i = np.interp(k,ks,f2omg2)
Cv_w = f2omg2i*Fphi - Fpsi + Cv
Cv_v = Cv - Cv_w
kdkromg = diff_central(ks, f2omg2)
kdkromg = np.interp(k,ks[1:-1],kdkromg)
dFphi = diff_central(k, Fphi)
#dFphi = np.gradient(Fphi,k)
dFphi = np.interp(k,k[1:-1],dFphi.real)
E_w = Fphi - k*dFphi
Cu_w = -k*kdkromg*Fphi + f2omg2i*(-Fpsi+Cv) + Fphi
Cu_v = Cu - Cu_w
Cb_w = E_w - (Cu_w + Cv_w)/2.
return Cpsi,Cphi, Cu_w,Cv_w, Cu_v,Cv_v, E_w, Cb_w
else:
return Cpsi,Cphi
|
"""
URLconf for registration and activation, using django-registration's
default backend.
If the default behavior of these views is acceptable to you, simply
use a line like this in your root URLconf to set up the default URLs
for registration::
(r'^accounts/accounts/', include('registration.backends.default.urls')),
This will also automatically set up the views in
``django.contrib.auth`` at sensible default locations.
If you'd like to customize the behavior (e.g., by passing extra
arguments to the various views) or split up the URLs, feel free to set
up your own URL patterns for these views instead.
"""
from django.conf.urls import include, url
from django.urls import path
from django.views.generic import TemplateView
from django.contrib.auth.decorators import login_required
from accounts.views import ActivationView, RegistrationView, RegistrationCompleteView, UserUpdateView, ChangePasswordView, UserProfileView, AllExamsView, AllQuestionsView, UserSearchView
import accounts.views
from numbas import settings
urlpatterns = [
url(r'search/$', UserSearchView.as_view(), name='user_search'),
url(r'deactivate/$', accounts.views.DeactivateUserView.as_view(), name='user_deactivate'),
url(r'reassign-content/$', accounts.views.ReassignContentView.as_view(), name='user_reassign_content'),
url(r'profile/(?P<pk>\d+)/$',
UserProfileView.as_view(),
name='view_profile'),
url(r'profile/(?P<pk>\d+)/items$',
accounts.views.UserEditorItemSearchView.as_view(),
name='profile_editoritem_search'),
url(r'profile/(?P<pk>\d+)/projects$',
accounts.views.UserProjectsView.as_view(),
name='profile_projects'),
url(r'profile/(?P<pk>\d+)/themes$',
accounts.views.UserThemesView.as_view(),
name='profile_themes'),
url(r'profile/(?P<pk>\d+)/extensions$',
accounts.views.UserExtensionsView.as_view(),
name='profile_extensions'),
url(r'profile/(?P<pk>\d+)/custom_part_types$',
accounts.views.UserCustomPartTypesView.as_view(),
name='profile_custom_part_types'),
url(r'profile/edit$',
login_required(UserUpdateView.as_view()),
name='edit_profile'),
url(r'profile/backup/all-exams$',
login_required(AllExamsView.as_view()),
name='all_exams_download'),
url(r'profile/backup/all-questions$',
login_required(AllQuestionsView.as_view()),
name='all_questions_download'),
]
if settings.CAN_CHANGE_PASSWORD:
urlpatterns += [
url(r'profile/change-password$',
login_required(ChangePasswordView.as_view()),
name='change_password'
),
]
if settings.ALLOW_REGISTRATION:
urlpatterns += [
url(r'activate/complete/$',
TemplateView.as_view(template_name='registration/activation_complete.html'),
name='registration_activation_complete'),
# Activation keys get matched by \w+ instead of the more specific
# [a-fA-F0-9]{40} because a bad activation key should still get to the view;
# that way it can return a sensible "invalid key" message instead of a
# confusing 404.
url(r'activate/(?P<activation_key>\w+)/$',
ActivationView.as_view(),
name='registration_activate'),
url(r'register/$',
RegistrationView.as_view(),
{'backend': 'accounts.backend.Backend'},
name='registration_register'),
url(r'register/complete/$',
RegistrationCompleteView.as_view(),
name='registration_complete'),
url(r'register/closed/$',
TemplateView.as_view(template_name='registration/registration_closed.html'),
name='registration_disallowed'),
url(r'register/after-first-login/$',
accounts.views.AfterFirstLoginView.as_view(),
name='after_first_login'),
]
urlpatterns = [path(r'accounts/', include(urlpatterns))]
|
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from ebAlert import create_logger
from ebAlert.core.config import settings
log = create_logger(__name__)
engine = create_engine('sqlite:///{!s}'.format(settings.FILE_LOCATION), echo=False)
Base = declarative_base()
Base.metadata.create_all(engine)
Session = sessionmaker(bind=engine)
|
/*
* Copyright © 2018 Valve Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
*/
#ifndef ACO_INSTRUCTION_SELECTION_H
#define ACO_INSTRUCTION_SELECTION_H
#include "aco_ir.h"
#include "vulkan/radv_shader_args.h"
#include <array>
#include <unordered_map>
#include <vector>
namespace aco {
struct shader_io_state {
uint8_t mask[VARYING_SLOT_MAX];
Temp temps[VARYING_SLOT_MAX * 4u];
shader_io_state()
{
memset(mask, 0, sizeof(mask));
std::fill_n(temps, VARYING_SLOT_MAX * 4u, Temp(0, RegClass::v1));
}
};
struct isel_context {
const struct radv_nir_compiler_options* options;
const struct radv_shader_args* args;
Program* program;
nir_shader* shader;
uint32_t constant_data_offset;
Block* block;
uint32_t first_temp_id;
std::unordered_map<unsigned, std::array<Temp, NIR_MAX_VEC_COMPONENTS>> allocated_vec;
Stage stage;
struct {
bool has_branch;
struct {
unsigned header_idx;
Block* exit;
bool has_divergent_continue = false;
bool has_divergent_branch = false;
} parent_loop;
struct {
bool is_divergent = false;
} parent_if;
bool exec_potentially_empty_discard =
false; /* set to false when loop_nest_depth==0 && parent_if.is_divergent==false */
uint16_t exec_potentially_empty_break_depth = UINT16_MAX;
/* Set to false when loop_nest_depth==exec_potentially_empty_break_depth
* and parent_if.is_divergent==false. Called _break but it's also used for
* loop continues. */
bool exec_potentially_empty_break = false;
std::unique_ptr<unsigned[]> nir_to_aco; /* NIR block index to ACO block index */
} cf_info;
/* NIR range analysis. */
struct hash_table* range_ht;
nir_unsigned_upper_bound_config ub_config;
Temp arg_temps[AC_MAX_ARGS];
/* FS inputs */
Temp persp_centroid, linear_centroid;
/* GS inputs */
Temp gs_wave_id;
/* VS output information */
bool export_clip_dists;
unsigned num_clip_distances;
unsigned num_cull_distances;
/* tessellation information */
uint64_t tcs_temp_only_inputs;
uint32_t tcs_num_patches;
bool tcs_in_out_eq = false;
/* I/O information */
shader_io_state inputs;
shader_io_state outputs;
};
inline Temp
get_arg(isel_context* ctx, struct ac_arg arg)
{
assert(arg.used);
return ctx->arg_temps[arg.arg_index];
}
void init_context(isel_context* ctx, nir_shader* shader);
void cleanup_context(isel_context* ctx);
isel_context setup_isel_context(Program* program, unsigned shader_count,
struct nir_shader* const* shaders, ac_shader_config* config,
const struct radv_nir_compiler_options* options,
const struct radv_shader_info* info,
const struct radv_shader_args* args, bool is_gs_copy_shader);
} // namespace aco
#endif /* ACO_INSTRUCTION_SELECTION_H */
|
from decimal import Decimal
from django.db.models import Q
from .models import CustomerInfo
import re
import zenhan
def ExtractNumber(org_str, data_type):
"""
引数で渡された文字列を半角に変換し、数字のみを抽出して返す。
param: org_str。例:'(0120)123-456
param: data_type。例:1=電話番号用、2=郵便番号用、3=法人番号用
return: org_strから数字のみを抽出した文字列。例:'0120123456'
"""
# 全角→半角変換
han_org_str = zenhan.z2h(org_str)
if data_type == 1: # 電話番号用
# カッコとハイフン以外を抽出
filterd_str = re.findall(r'[^\(\)\-()−]+', han_org_str)
elif data_type == 2: # 郵便番号用
# ハイフン以外を抽出
filterd_str = re.findall(r'[^\-−]+', han_org_str)
elif data_type == 3: # 法人番号用
# 法人番号は数字のみなので正規表現の抽出は行わない
filterd_str = han_org_str
# filterd_strは配列なので結合した文字列を返す
return ''.join(filterd_str)
def DecimalDefaultProc(obj):
"""
DecimalをJSONで出力可能にする
"""
if isinstance(obj, Decimal):
return float(obj)
raise TypeError
def CheckDuplicatePhoneNumber(phone_number, user):
"""
重複電話番号のチェックを行い、件数を返す。
"""
if not phone_number:
return 0
return CustomerInfo.objects.filter(
Q(tel_number1=phone_number) | Q(tel_number2=phone_number)
| Q(tel_number3=phone_number)).filter(
workspace=user.workspace, delete_flg='False').filter(
Q(public_status='1')
| Q(public_status='2')
| Q(author=user.email)
| Q(shared_edit_user=user)
| Q(shared_view_user=user)
| Q(shared_edit_group__in=user.my_group.all())
| Q(shared_view_group__in=user.my_group.all())).distinct(
).count()
|
#!/usr/bin/python
# -*- coding= utf-8 -*-
import ctypes
import win32con
from icom_ctrl_msg_id import *
user32 = ctypes.windll.user32
#FindWindow = user32.FindWindowW
#BringWindowToTop = user32.BringWindowToTop
#IsWindowVisible = user32.IsWindowVisible
#IsIconic = user32.IsIconic
#SetForegroundWindow = user32.SetForegroundWindow
#ShowWindow = user32.ShowWindow
#GetWindowText = user32.GetWindowTextW
PostMessage = user32.PostMessageW
GetForegroundWindow = user32.GetForegroundWindow
GetWindowThreadProcessId = user32.GetWindowThreadProcessId
def set_sync_msg_icom_win_title(app_title):
icom_win_app_title = 'iCOM for Windows'
icom_win_title = ctypes.create_unicode_buffer(icom_win_app_title)
#g_icom_win_handle = FindWindow(win32con.NULL,ctypes.byref(icom_win_title))
del icom_win_title
class win_msg(object):
def __init__(self,win_pid):
self.__hwnd = None
self.__win_pid = win_pid
self.__send_msg_count = 0
self.__in_focus = False
def get_win_handle(self):
if self.__hwnd:
return self.__hwnd
c_pid = ctypes.c_ulong(0)
focus_win_handle = GetForegroundWindow()
if focus_win_handle:
__pid = GetWindowThreadProcessId(focus_win_handle,ctypes.byref(c_pid))
if self.__win_pid == c_pid.value:
self.__hwnd = focus_win_handle
return self.__hwnd
def is_win_foreground(self,msg_int_type):
if self.__hwnd:
if ICOM_CTRL_MSG.ID_TIMER_TIMEOUT == msg_int_type:
self.__in_focus = True if self.__hwnd == GetForegroundWindow() else False
return self.__in_focus
return False
def send_sync_msg(self, msg_para_list):
msg_int_type = msg_para_list[0]
hwnd = self.get_win_handle()
if not hwnd:
return False
if not self.is_win_foreground(msg_int_type):
return False
if ICOM_CTRL_MSG.ID_TIMER_TIMEOUT == msg_int_type:
#PostMessage(hwnd,win32con.WM_KEYUP,win32con.VK_F6,0x00000001) #keydown
PostMessage(hwnd,win32con.WM_KEYUP,win32con.VK_F6,0x00000001|(3<<30)) #keyup
elif self.__send_msg_count == 0:
#PostMessage(hwnd,win32con.WM_KEYDOWN,win32con.VK_F5,0x00000001) #key down
PostMessage(hwnd,win32con.WM_KEYUP,win32con.VK_F5,0x00000001|(3<<30)) #keyup
#print ('keydown',self.__send_msg_count)
#self.__send_msg_count = 1
else:
PostMessage(hwnd,win32con.WM_KEYUP,win32con.VK_F5,0x00000001|(3<<30)) #keyup
#print ('keyup',self.__send_msg_count,msg_int_type)
#self.__send_msg_count = 0
return True
|
# -*- coding: utf-8 -*-
#@+leo-ver=5-thin
#@+node:ekr.20140907131341.18707: * @file ../plugins/qt_tree.py
#@@first
'''Leo's Qt tree class.'''
#@+<< imports >>
#@+node:ekr.20140907131341.18709: ** << imports >> (qt_tree.py)
import leo.core.leoGlobals as g
import leo.core.leoFrame as leoFrame
import leo.core.leoNodes as leoNodes
import leo.core.leoPlugins as leoPlugins # Uses leoPlugins.TryNext.
import leo.plugins.qt_text as qt_text
from leo.core.leoQt import QtConst, QtCore, QtGui, QtWidgets
import re
#@-<< imports >>
#@+others
#@+node:ekr.20160514120051.1: ** class LeoQtTree
class LeoQtTree(leoFrame.LeoTree):
'''Leo Qt tree class'''
callbacksInjected = False # A class var.
#@+others
#@+node:ekr.20110605121601.18404: *3* qtree.Birth
#@+node:ekr.20110605121601.18405: *4* qtree.__init__
def __init__(self, c, frame):
'''Ctor for the LeoQtTree class.'''
leoFrame.LeoTree.__init__(self, frame)
# Init the base class.
self.c = c
# Widget independent status ivars...
self.contracting = False
self.expanding = False
self.prev_v = None
self.redrawing = False
self.redrawCount = 0 # Count for debugging.
self.revertHeadline = None # Previous headline text for abortEditLabel.
self.selecting = False
# Debugging...
self.nodeDrawCount = 0
self.traceCallersFlag = False # Enable traceCallers method.
# Associating items with position and vnodes...
self.item2positionDict = {}
self.item2vnodeDict = {}
self.position2itemDict = {}
self.vnode2itemsDict = {} # values are lists of items.
self.editWidgetsDict = {} # keys are native edit widgets, values are wrappers.
self.reloadSettings()
# Components.
self.canvas = self # An official ivar used by Leo's core.
self.headlineWrapper = qt_text.QHeadlineWrapper # This is a class.
self.treeWidget = w = frame.top.leo_ui.treeWidget # An internal ivar.
# w is a LeoQTreeWidget, a subclass of QTreeWidget.
# "declutter", node appearance tweaking
self.declutter_patterns = None # list of pairs of patterns for decluttering
self.declutter_update = False # true when update on idle needed
g.registerHandler('save1', self.clear_visual_icons)
g.registerHandler('headkey2', self.update_appearance)
g.registerHandler('idle', self.update_appearance_idle)
if 0: # Drag and drop
w.setDragEnabled(True)
w.viewport().setAcceptDrops(True)
w.showDropIndicator = True
w.setAcceptDrops(True)
w.setDragDropMode(w.InternalMove)
if 1: # Does not work
def dropMimeData(self, data, action, row, col, parent):
g.trace()
# w.dropMimeData = dropMimeData
def mimeData(self, indexes):
g.trace()
# Early inits...
try:
w.headerItem().setHidden(True)
except Exception:
pass
n = c.config.getInt('icon-height')
w.setIconSize(QtCore.QSize(160, n))
#@+node:ekr.20110605121601.17866: *4* qtree.get_name
def getName(self):
'''Return the name of this widget: must start with "canvas".'''
return 'canvas(tree)'
#@+node:ekr.20110605121601.18406: *4* qtree.initAfterLoad
def initAfterLoad(self):
'''Do late-state inits.'''
# Called by Leo's core.
c = self.c
# w = c.frame.top
tw = self.treeWidget
if not LeoQtTree.callbacksInjected:
LeoQtTree.callbacksInjected = True
self.injectCallbacks() # A base class method.
tw.itemDoubleClicked.connect(self.onItemDoubleClicked)
tw.itemClicked.connect(self.onItemClicked)
tw.itemSelectionChanged.connect(self.onTreeSelect)
tw.itemCollapsed.connect(self.onItemCollapsed)
tw.itemExpanded.connect(self.onItemExpanded)
tw.customContextMenuRequested.connect(self.onContextMenu)
# tw.onItemChanged.connect(self.onItemChanged)
g.app.gui.setFilter(c, tw, self, tag='tree')
# 2010/01/24: Do not set this here.
# The read logic sets c.changed to indicate nodes have changed.
# c.setChanged(False)
#@+node:ekr.20110605121601.17871: *4* qtree.reloadSettings
def reloadSettings(self):
'''LeoQtTree.'''
c = self.c
self.auto_edit = c.config.getBool('single_click_auto_edits_headline', False)
self.enable_drag_messages = c.config.getBool("enable_drag_messages")
self.select_all_text_when_editing_headlines = c.config.getBool(
'select_all_text_when_editing_headlines')
self.stayInTree = c.config.getBool('stayInTreeAfterSelect')
self.use_chapters = c.config.getBool('use_chapters')
self.use_declutter = c.config.getBool('tree-declutter', default=False)
#@+node:ekr.20110605121601.17940: *4* qtree.wrapQLineEdit
def wrapQLineEdit(self, w):
'''A wretched kludge for MacOs k.masterMenuHandler.'''
c = self.c
if isinstance(w, QtWidgets.QLineEdit):
wrapper = self.edit_widget(c.p)
else:
wrapper = w
return wrapper
#@+node:ekr.20110605121601.17868: *3* qtree.Debugging & tracing
def error(self, s):
if not g.app.unitTesting:
g.trace('LeoQtTree Error: %s' % (s), g.callers())
def traceItem(self, item):
if item:
# A QTreeWidgetItem.
return 'item %s: %s' % (id(item), self.getItemText(item))
else:
return '<no item>'
def traceCallers(self):
if self.traceCallersFlag:
return g.callers(5, excludeCaller=True)
else:
return ''
#@+node:ekr.20110605121601.17872: *3* qtree.Drawing
#@+node:ekr.20110605121601.18408: *4* qtree.clear
def clear(self):
'''Clear all widgets in the tree.'''
w = self.treeWidget
w.clear()
#@+node:ekr.20110605121601.17873: *4* qtree.full_redraw & helpers
def full_redraw(self, p=None, scroll=True, forceDraw=False):
'''
Redraw all visible nodes of the tree.
Preserve the vertical scrolling unless scroll is True.
'''
c = self.c
if g.app.disable_redraw:
return
if self.busy():
return g.trace('*** full_redraw: busy!', g.callers())
# Cancel the delayed redraw request.
c.requestLaterRedraw = False
if not p:
p = c.currentPosition()
elif c.hoistStack and p.h.startswith('@chapter') and p.hasChildren():
# Make sure the current position is visible.
# Part of fix of bug 875323: Hoist an @chapter node leaves a non-visible node selected.
p = p.firstChild()
c.frame.tree.select(p)
c.setCurrentPosition(p)
else:
c.setCurrentPosition(p)
self.redrawCount += 1
self.initData()
self.nodeDrawCount = 0
try:
self.redrawing = True
self.drawTopTree(p)
finally:
self.redrawing = False
self.setItemForCurrentPosition(scroll=scroll)
return p # Return the position, which may have changed.
# Compatibility
redraw = full_redraw
redraw_now = full_redraw
#@+node:tbrown.20150807093655.1: *5* qtree.clear_visual_icons
def clear_visual_icons(self, tag, keywords):
"""clear_visual_icons - remove 'declutter' icons before save
this method must return None to tell Leo to continue normal processing
:param str tag: 'save1'
:param dict keywords: Leo hook keywords
"""
if not self.use_declutter:
return None
c = keywords['c']
if c != self.c:
return None
if c.config.getBool('tree-declutter', default=False):
com = c.editCommands
for nd in c.all_unique_positions():
icons = [i for i in com.getIconList(nd) if 'visualIcon' not in i]
com.setIconList(nd, icons, False)
self.declutter_update = True
return None
#@+node:tbrown.20150807090639.1: *5* qtree.declutter_node & helpers
def declutter_node(self, c, p, item):
"""declutter_node - change the appearance of a node
:param commander c: commander containing node
:param position p: position of node
:param QWidgetItem item: tree node widget item
"""
if self.declutter_patterns is None:
self.declutter_patterns = []
warned = False
lines = c.config.getData("tree-declutter-patterns")
for line in lines:
try:
cmd, arg = line.split(None, 1)
except ValueError:
# Allow empty arg, and guard against user errors.
cmd = line.strip()
arg = ''
if cmd.startswith('#'):
pass
elif cmd == 'RULE':
self.declutter_patterns.append((re.compile(arg), []))
else:
if self.declutter_patterns:
self.declutter_patterns[-1][1].append((cmd, arg))
elif not warned:
warned = True
g.log('Declutter patterns must start with RULE*',
color='error')
text = str(item.text(0)) if g.isPython3 else g.u(item.text(0))
new_icons = []
for pattern, cmds in self.declutter_patterns:
for func in (pattern.match, pattern.search):
m = func(text)
if m:
for cmd, arg in cmds:
if self.declutter_replace(arg, cmd, item, m, pattern, text):
pass
else:
self.declutter_style(arg, c, cmd, item, new_icons)
break # Don't try pattern.search if pattern.match succeeds.
com = c.editCommands
allIcons = com.getIconList(p)
icons = [i for i in allIcons if 'visualIcon' not in i]
if len(allIcons) != len(icons) or new_icons:
for icon in new_icons:
com.appendImageDictToList(
icons, icon, 2, on='vnode', visualIcon='1'
)
com.setIconList(p, icons, False)
#@+node:ekr.20171122064635.1: *6* qtree.declutter_replace
def declutter_replace(self, arg, cmd, item, m, pattern, text):
'''
Execute cmd and return True if cmd is any replace command.
'''
if cmd == 'REPLACE':
text = pattern.sub(arg, text)
item.setText(0, text)
return True
elif cmd == 'REPLACE-HEAD':
s = text[:m.start()]
item.setText(0, s.rstrip())
return True
elif cmd == 'REPLACE-TAIL':
s = text[m.end():]
item.setText(0, s.lstrip())
return True
elif cmd == 'REPLACE-REST':
s = text[:m.start] + text[m.end():]
item.setText(0, s.strip())
return True
else:
return False
#@+node:ekr.20171122055719.1: *6* qtree.declutter_style
def declutter_style(self, arg, c, cmd, item, new_icons):
'''Handle style options.'''
arg = c.styleSheetManager.expand_css_constants(arg).split()[0]
if cmd == 'ICON':
new_icons.append(arg)
elif cmd == 'BG':
item.setBackground(0, QtGui.QBrush(QtGui.QColor(arg)))
elif cmd == 'FG':
item.setForeground(0, QtGui.QBrush(QtGui.QColor(arg)))
elif cmd == 'FONT':
item.setFont(0, QtGui.QFont(arg))
elif cmd == 'ITALIC':
font = item.font(0)
font.setItalic(bool(int(arg)))
item.setFont(0, font)
elif cmd == 'WEIGHT':
arg = getattr(QtGui.QFont, arg, 75)
font = item.font(0)
font.setWeight(arg)
item.setFont(0, font)
elif cmd == 'PX':
font = item.font(0)
font.setPixelSize(int(arg))
item.setFont(0, font)
elif cmd == 'PT':
font = item.font(0)
font.setPointSize(int(arg))
item.setFont(0, font)
#@+node:ekr.20110605121601.17874: *5* qtree.drawChildren
def drawChildren(self, p, parent_item):
'''Draw the children of p if they should be expanded.'''
if not p:
return g.trace('can not happen: no p')
if p.hasChildren():
if p.isExpanded():
self.expandItem(parent_item)
child = p.firstChild()
while child:
self.drawTree(child, parent_item)
child.moveToNext()
else:
# Draw the hidden children.
child = p.firstChild()
while child:
self.drawNode(child, parent_item)
child.moveToNext()
self.contractItem(parent_item)
else:
self.contractItem(parent_item)
#@+node:ekr.20110605121601.17875: *5* qtree.drawNode
def drawNode(self, p, parent_item):
'''Draw the node p.'''
c = self.c
self.nodeDrawCount += 1
# Allocate the item.
item = self.createTreeItem(p, parent_item)
# Do this now, so self.isValidItem will be true in setItemIcon.
self.rememberItem(p, item)
# Set the headline and maybe the icon.
self.setItemText(item, p.h)
if self.use_declutter:
self.declutter_node(c, p, item)
if p:
self.drawItemIcon(p, item)
return item
#@+node:ekr.20110605121601.17876: *5* qtree.drawTopTree
def drawTopTree(self, p):
'''Draw the tree rooted at p.'''
c = self.c
hPos, vPos = self.getScroll()
self.clear()
# Draw all top-level nodes and their visible descendants.
if c.hoistStack:
bunch = c.hoistStack[-1]
p = bunch.p; h = p.h
if len(c.hoistStack) == 1 and h.startswith('@chapter') and p.hasChildren():
p = p.firstChild()
while p:
self.drawTree(p)
p.moveToNext()
else:
self.drawTree(p)
else:
p = c.rootPosition()
while p:
self.drawTree(p)
p.moveToNext()
# This method always retains previous scroll position.
self.setHScroll(hPos)
self.setVScroll(vPos)
self.repaint()
#@+node:ekr.20110605121601.17877: *5* qtree.drawTree
def drawTree(self, p, parent_item=None):
if g.app.gui.isNullGui:
return
# Draw the (visible) parent node.
item = self.drawNode(p, parent_item)
# Draw all the visible children.
self.drawChildren(p, parent_item=item)
#@+node:ekr.20110605121601.17878: *5* qtree.initData
def initData(self):
self.item2positionDict = {}
self.item2vnodeDict = {}
self.position2itemDict = {}
self.vnode2itemsDict = {}
self.editWidgetsDict = {}
#@+node:ekr.20110605121601.17879: *5* qtree.rememberItem
def rememberItem(self, p, item):
v = p.v
# Update position dicts.
itemHash = self.itemHash(item)
self.position2itemDict[p.key()] = item
self.item2positionDict[itemHash] = p.copy() # was item
# Update item2vnodeDict.
self.item2vnodeDict[itemHash] = v # was item
# Update vnode2itemsDict.
d = self.vnode2itemsDict
aList = d.get(v, [])
if item in aList:
g.trace('*** ERROR *** item already in list: %s, %s' % (item, aList))
else:
aList.append(item)
d[v] = aList
#@+node:tbrown.20150808075906.1: *5* qtree.update_appearance
def update_appearance(self, tag, keywords):
"""clear_visual_icons - update appearance, but can't call
self.full_redraw() now, so just set a flag to do it on idle.
:param str tag: 'headkey2'
:param dict keywords: Leo hook keywords
"""
if not self.use_declutter:
return None
c = keywords['c']
if c != self.c:
return None
self.declutter_update = True
return None
#@+node:tbrown.20150808082111.1: *5* qtree.update_appearance_idle
def update_appearance_idle(self, tag, keywords):
"""clear_visual_icons - update appearance now we're safely out of
the redraw loop.
:param str tag: 'idle'
:param dict keywords: Leo hook keywords
"""
if not self.use_declutter:
return None
c = keywords['c']
if c != self.c:
return None
if isinstance(QtWidgets.QApplication.focusWidget(), QtWidgets.QLineEdit):
# when search results are found in headlines headkey2 fires
# (on the second search hit in a headline), and full_redraw()
# below takes the headline out of edit mode, and Leo crashes,
# probably because the find code didn't expect to leave edit
# mode. So don't update when a QLineEdit has focus
return None
if self.declutter_update:
self.declutter_update = False
self.full_redraw(scroll=False)
return None
#@+node:ekr.20110605121601.17880: *4* qtree.redraw_after_contract
def redraw_after_contract(self, p=None):
if self.redrawing:
return
item = self.position2item(p)
if item:
self.contractItem(item)
else:
# This is not an error.
# We may have contracted a node that was not, in fact, visible.
self.full_redraw(scroll=False)
#@+node:ekr.20110605121601.17881: *4* qtree.redraw_after_expand
def redraw_after_expand(self, p=None):
# Important, setting scrolling to False makes the problem *worse*
self.full_redraw(p, scroll=True)
#@+node:ekr.20110605121601.17882: *4* qtree.redraw_after_head_changed
def redraw_after_head_changed(self):
if self.busy(): return
p = self.c.p
# ew = self.edit_widget(p)
# currentItem = self.getCurrentItem()
if p:
h = p.h # 2010/02/09: Fix bug 518823.
for item in self.vnode2items(p.v):
if self.isValidItem(item):
self.setItemText(item, h)
# Bug fix: 2009/10/06
self.redraw_after_icons_changed()
#@+node:ekr.20110605121601.17883: *4* qtree.redraw_after_icons_changed
def redraw_after_icons_changed(self):
if self.busy():
return
self.redrawCount += 1 # To keep a unit test happy.
c = self.c
# Suppress call to setHeadString in onItemChanged!
self.redrawing = True
try:
self.getCurrentItem()
for p in c.rootPosition().self_and_siblings():
# Updates icons in p and all visible descendants of p.
self.updateVisibleIcons(p)
finally:
self.redrawing = False
#@+node:ekr.20110605121601.17884: *4* qtree.redraw_after_select
# Important: this can not replace before/afterSelectHint.
def redraw_after_select(self, p=None):
'''Redraw the entire tree when an invisible node is selected.'''
# Prevent the selecting lockout from disabling the redraw.
oldSelecting = self.selecting
self.selecting = False
try:
if not self.busy():
self.full_redraw(p, scroll=False)
finally:
self.selecting = oldSelecting
# c.redraw_after_select calls tree.select indirectly.
# Do not call it again here.
#@+node:ekr.20140907201613.18986: *4* qtree.repaint
def repaint(self):
'''Repaint the widget.'''
w = self.treeWidget
w.repaint()
w.resizeColumnToContents(0) # 2009/12/22
#@+node:ekr.20110605121601.17885: *3* qtree.Event handlers
#@+node:ekr.20110605121601.17887: *4* qtree.Click Box
#@+node:ekr.20110605121601.17888: *5* qtree.onClickBoxClick
def onClickBoxClick(self, event, p=None):
if self.busy(): return
c = self.c
g.doHook("boxclick1", c=c, p=p, event=event)
g.doHook("boxclick2", c=c, p=p, event=event)
c.outerUpdate()
#@+node:ekr.20110605121601.17889: *5* qtree.onClickBoxRightClick
def onClickBoxRightClick(self, event, p=None):
if self.busy(): return
c = self.c
g.doHook("boxrclick1", c=c, p=p, event=event)
g.doHook("boxrclick2", c=c, p=p, event=event)
c.outerUpdate()
#@+node:ekr.20110605121601.17890: *5* qtree.onPlusBoxRightClick
def onPlusBoxRightClick(self, event, p=None):
if self.busy(): return
c = self.c
g.doHook('rclick-popup', c=c, p=p, event=event, context_menu='plusbox')
c.outerUpdate()
#@+node:ekr.20110605121601.17891: *4* qtree.Icon Box
# For Qt, there seems to be no way to trigger these events.
#@+node:ekr.20110605121601.17892: *5* qtree.onIconBoxClick
def onIconBoxClick(self, event, p=None):
if self.busy(): return
c = self.c
g.doHook("iconclick1", c=c, p=p, event=event)
g.doHook("iconclick2", c=c, p=p, event=event)
c.outerUpdate()
#@+node:ekr.20110605121601.17893: *5* qtree.onIconBoxRightClick
def onIconBoxRightClick(self, event, p=None):
"""Handle a right click in any outline widget."""
if self.busy(): return
c = self.c
g.doHook("iconrclick1", c=c, p=p, event=event)
g.doHook("iconrclick2", c=c, p=p, event=event)
c.outerUpdate()
#@+node:ekr.20110605121601.17894: *5* qtree.onIconBoxDoubleClick
def onIconBoxDoubleClick(self, event, p=None):
if self.busy(): return
c = self.c
if not p: p = c.p
if not g.doHook("icondclick1", c=c, p=p, event=event):
self.endEditLabel()
self.OnIconDoubleClick(p) # Call the method in the base class.
g.doHook("icondclick2", c=c, p=p, event=event)
c.outerUpdate()
#@+node:ekr.20110605121601.17886: *4* qtree.busy
def busy(self):
'''Return True (actually, a debugging string) if any lockout is set.'''
table = ('contracting','expanding','redrawing','selecting')
kinds = ','.join([z for z in table if getattr(self, z)])
return kinds # Return the string for debugging
#@+node:ekr.20110605121601.18437: *4* qtree.onContextMenu
def onContextMenu(self, point):
c = self.c
w = self.treeWidget
handlers = g.tree_popup_handlers
menu = QtWidgets.QMenu()
menuPos = w.mapToGlobal(point)
if not handlers:
menu.addAction("No popup handlers")
p = c.p.copy()
done = set()
for h in handlers:
# every handler has to add it's QActions by itself
if h in done:
# do not run the same handler twice
continue
h(c, p, menu)
menu.popup(menuPos)
self._contextmenu = menu
#@+node:ekr.20110605121601.17912: *4* qtree.onHeadChanged
# Tricky code: do not change without careful thought and testing.
def onHeadChanged(self, p, undoType='Typing', s=None, e=None):
'''Officially change a headline.'''
c = self.c; u = c.undoer
if not p:
return
item = self.getCurrentItem()
if not item:
return
if not e:
e = self.getTreeEditorForItem(item)
if not e:
return
s = g.u(e.text())
self.closeEditorHelper(e, item)
oldHead = p.h
changed = s != oldHead
if g.doHook("headkey1", c=c, p=c.p, v=c.p, s=s, changed=changed):
return
if changed:
# New in Leo 4.10.1.
#@+<< truncate s if it has multiple lines >>
#@+node:ekr.20120409185504.10028: *5* << truncate s if it has multiple lines >>
# Remove trailing newlines before warning of truncation.
while s and s[-1] == '\n':
s = s[: -1]
# Warn if there are multiple lines.
i = s.find('\n')
if i > -1:
s = s[: i]
if s != oldHead:
g.warning("truncating headline to one line")
limit = 1000
if len(s) > limit:
s = s[: limit]
if s != oldHead:
g.warning("truncating headline to", limit, "characters")
#@-<< truncate s if it has multiple lines >>
p.initHeadString(s)
item.setText(0, s) # Required to avoid full redraw.
undoData = u.beforeChangeNodeContents(p, oldHead=oldHead)
if not c.changed: c.setChanged(True)
# New in Leo 4.4.5: we must recolor the body because
# the headline may contain directives.
c.frame.body.recolor(p)
dirtyVnodeList = p.setDirty()
u.afterChangeNodeContents(p, undoType, undoData,
dirtyVnodeList=dirtyVnodeList, inHead=True) # 2013/08/26.
g.doHook("headkey2", c=c, p=c.p, v=c.p, s=s, changed=changed)
# This is a crucial shortcut.
if g.unitTesting: return
if changed:
self.redraw_after_head_changed()
if 0: # Don't do this: it interferes with clicks, and is not needed.
if self.stayInTree:
c.treeWantsFocus()
else:
c.bodyWantsFocus()
p.v.contentModified()
c.outerUpdate()
#@+node:ekr.20110605121601.17896: *4* qtree.onItemClicked
def onItemClicked(self, item, col, auto_edit=False):
'''Handle a click in a BaseNativeTree widget item.'''
# This is called after an item is selected.
if self.busy():
return
c = self.c
try:
self.selecting = True
p = self.item2position(item)
auto_edit = self.prev_v == p.v
if p:
self.prev_v = p.v
event = None
mods = g.app.gui.qtApp.keyboardModifiers()
isCtrl = bool(mods & QtConst.ControlModifier)
# We could also add support for QtConst.ShiftModifier, QtConst.AltModifier & QtConst.MetaModifier.
if isCtrl:
if g.doHook("iconctrlclick1", c=c, p=p, event=event) is None:
c.frame.tree.OnIconCtrlClick(p) # Call the base class method.
g.doHook("iconctrlclick2", c=c, p=p, event=event)
else:
# 2014/02/21: generate headclick1/2 instead of iconclick1/2
g.doHook("headclick1", c=c, p=p, event=event)
g.doHook("headclick2", c=c, p=p, event=event)
else:
auto_edit = None
g.trace('*** no p')
# 2011/05/27: click here is like ctrl-g.
c.k.keyboardQuit(setFocus=False)
c.treeWantsFocus() # 2011/05/08: Focus must stay in the tree!
c.outerUpdate()
# 2011/06/01: A second *single* click on a selected node
# enters editing state.
if auto_edit and self.auto_edit:
e, wrapper = self.createTreeEditorForItem(item)
# 2014/10/26: Reset find vars.
c.findCommands.reset_state_ivars()
finally:
self.selecting = False
#@+node:ekr.20110605121601.17895: *4* qtree.onItemCollapsed
def onItemCollapsed(self, item):
if self.busy():
return
c = self.c
p = self.item2position(item)
if p:
# Important: do not set lockouts here.
# Only methods that actually generate events should set lockouts.
p.contract()
if p.isCloned():
self.select(p) # Calls before/afterSelectHint.
# 2010/02/04: Keep the expansion bits of all tree nodes in sync.
self.full_redraw(scroll=False)
else:
self.select(p) # Calls before/afterSelectHint.
else:
self.error('no p')
c.outerUpdate()
#@+node:ekr.20110605121601.17897: *4* qtree.onItemDoubleClicked
def onItemDoubleClicked(self, item, col):
'''Handle a double click in a BaseNativeTree widget item.'''
if self.busy():
return
c = self.c
try:
self.selecting = True
e, wrapper = self.createTreeEditorForItem(item)
if not e:
g.trace('*** no e')
p = self.item2position(item)
# 2011/07/28: End the lockout here, not at the end.
finally:
self.selecting = False
if p:
# 2014/02/21: generate headddlick1/2 instead of icondclick1/2.
event = None
if g.doHook("headdclick1", c=c, p=p, event=event) is None:
c.frame.tree.OnIconDoubleClick(p) # Call the base class method.
g.doHook("headclick2", c=c, p=p, event=event)
else:
g.trace('*** no p')
c.outerUpdate()
#@+node:ekr.20110605121601.17898: *4* qtree.onItemExpanded
def onItemExpanded(self, item):
'''Handle and tree-expansion event.'''
if self.busy():
return
c = self.c
p = self.item2position(item)
if p:
# Important: do not set lockouts here.
# Only methods that actually generate events should set lockouts.
if not p.isExpanded():
p.expand()
self.select(p) # Calls before/afterSelectHint.
# Important: setting scroll=False here has no effect
# when a keystroke causes the expansion, but is a
# *big* improvement when clicking the outline.
self.full_redraw(scroll=False)
else:
self.select(p)
else:
self.error('no p')
c.outerUpdate()
#@+node:ekr.20110605121601.17899: *4* qtree.onTreeSelect
def onTreeSelect(self):
'''Select the proper position when a tree node is selected.'''
if self.busy():
return
c = self.c
item = self.getCurrentItem()
p = self.item2position(item)
if p:
# Important: do not set lockouts here.
# Only methods that actually generate events should set lockouts.
self.select(p)
# This is a call to LeoTree.select(!!)
# Calls before/afterSelectHint.
else:
self.error('no p for item: %s' % item)
c.outerUpdate()
#@+node:ekr.20110605121601.17900: *4* qtree.OnPopup & allies
def OnPopup(self, p, event):
"""Handle right-clicks in the outline.
This is *not* an event handler: it is called from other event handlers."""
# Note: "headrclick" hooks handled by VNode callback routine.
if event:
c = self.c
c.setLog()
if not g.doHook("create-popup-menu", c=c, p=p, event=event):
self.createPopupMenu(event)
if not g.doHook("enable-popup-menu-items", c=c, p=p, event=event):
self.enablePopupMenuItems(p, event)
if not g.doHook("show-popup-menu", c=c, p=p, event=event):
self.showPopupMenu(event)
return "break"
#@+node:ekr.20110605121601.17901: *5* qtree.OnPopupFocusLost
#@+at
# On Linux we must do something special to make the popup menu "unpost" if the
# mouse is clicked elsewhere. So we have to catch the <FocusOut> event and
# explicitly unpost. In order to process the <FocusOut> event, we need to be able
# to find the reference to the popup window again, so this needs to be an
# attribute of the tree object; hence, "self.popupMenu".
#
# Aside: though Qt tries to be muli-platform, the interaction with different
# window managers does cause small differences that will need to be compensated by
# system specific application code. :-(
#@@c
# 20-SEP-2002 DTHEIN: This event handler is only needed for Linux.
def OnPopupFocusLost(self, event=None):
# self.popupMenu.unpost()
pass
#@+node:ekr.20110605121601.17902: *5* qtree.createPopupMenu
def createPopupMenu(self, event):
'''This might be a placeholder for plugins. Or not :-)'''
#@+node:ekr.20110605121601.17903: *5* qtree.enablePopupMenuItems
def enablePopupMenuItems(self, p, event):
"""Enable and disable items in the popup menu."""
#@+node:ekr.20110605121601.17904: *5* qtree.showPopupMenu
def showPopupMenu(self, event):
"""Show a popup menu."""
#@+node:ekr.20110605121601.17944: *3* qtree.Focus
def getFocus(self):
return g.app.gui.get_focus(self.c) # Bug fix: 2009/6/30
findFocus = getFocus
def setFocus(self):
g.app.gui.set_focus(self.c, self.treeWidget)
#@+node:ekr.20110605121601.18409: *3* qtree.Icons
#@+node:ekr.20110605121601.18410: *4* qtree.drawIcon
def drawIcon(self, p):
'''Redraw the icon at p.'''
w = self.treeWidget
itemOrTree = self.position2item(p) or w
item = QtWidgets.QTreeWidgetItem(itemOrTree)
icon = self.getIcon(p)
self.setItemIcon(item, icon)
#@+node:ekr.20110605121601.17946: *4* qtree.drawItemIcon
def drawItemIcon(self, p, item):
'''Set the item's icon to p's icon.'''
icon = self.getIcon(p)
if icon:
self.setItemIcon(item, icon)
#@+node:ekr.20110605121601.18411: *4* qtree.getIcon & helper
def getIcon(self, p):
'''Return the proper icon for position p.'''
p.v.iconVal = val = p.v.computeIcon()
return self.getCompositeIconImage(p, val)
#@+node:ekr.20110605121601.18412: *5* qtree.getCompositeIconImage
def getCompositeIconImage(self, p, val):
'''Get the icon at position p.'''
userIcons = self.c.editCommands.getIconList(p)
# Don't take this shortcut - not theme aware, see getImageImage()
# which is called below - TNB 20130313
# if not userIcons:
# return self.getStatusIconImage(p)
hash = [i['file'] for i in userIcons if i['where'] == 'beforeIcon']
hash.append(str(val))
hash.extend([i['file'] for i in userIcons if i['where'] == 'beforeHeadline'])
hash = ':'.join(hash)
if hash in g.app.gui.iconimages:
icon = g.app.gui.iconimages[hash]
return icon
images = [g.app.gui.getImageImage(i['file']) for i in userIcons
if i['where'] == 'beforeIcon']
images.append(g.app.gui.getImageImage("box%02d.png" % val))
images.extend([g.app.gui.getImageImage(i['file']) for i in userIcons
if i['where'] == 'beforeHeadline'])
images = [z for z in images if z] # 2013/12/23: Remove missing images.
if not images:
return None
hsep = self.c.config.getInt('tree-icon-separation') or 0
width = sum([i.width() for i in images]) + hsep * (len(images)-1)
height = max([i.height() for i in images])
pix = QtGui.QImage(width, height, QtGui.QImage.Format_ARGB32_Premultiplied)
pix.fill(QtGui.QColor(0, 0, 0, 0).rgba()) # transparent fill, rgbA
# .rgba() call required for Qt4.7, later versions work with straight color
painter = QtGui.QPainter()
if not painter.begin(pix):
print("Failed to init. painter for icon")
# don't return, the code still makes an icon for the cache
# which stops this being called again and again
x = 0
for i in images:
painter.drawPixmap(x, (height - i.height()) // 2, i)
x += i.width() + hsep
painter.end()
icon = QtGui.QIcon(QtGui.QPixmap.fromImage(pix))
g.app.gui.iconimages[hash] = icon
return icon
#@+node:ekr.20110605121601.17947: *4* qtree.getIconImage
def getIconImage(self, p):
# User icons are not supported in the base class.
if g.app.gui.isNullGui:
return None
else:
return self.getStatusIconImage(p)
#@+node:ekr.20110605121601.17948: *4* qtree.getStatusIconImage
def getStatusIconImage(self, p):
val = p.v.computeIcon()
r = g.app.gui.getIconImage(
"box%02d.png" % val)
return r
#@+node:ekr.20110605121601.17949: *4* qtree.getVnodeIcon
def getVnodeIcon(self, p):
'''Return the proper icon for position p.'''
return self.getIcon(p)
#@+node:ekr.20110605121601.17950: *4* qtree.setItemIcon
def setItemIcon(self, item, icon):
valid = item and self.isValidItem(item)
if icon and valid:
# Important: do not set lockouts here.
# This will generate changed events,
# but there is no itemChanged event handler.
self.setItemIconHelper(item, icon)
#@+node:ekr.20110605121601.18413: *4* qtree.setItemIconHelper
def setItemIconHelper(self, item, icon):
# Generates an item-changed event.
if item:
item.setIcon(0, icon)
#@+node:ekr.20110605121601.17951: *4* qtree.updateIcon
def updateIcon(self, p, force=False):
'''Update p's icon.'''
if not p: return
val = p.v.computeIcon()
# The force arg is needed:
# Leo's core may have updated p.v.iconVal.
if p.v.iconVal == val and not force:
return
icon = self.getIcon(p) # sets p.v.iconVal
# Update all cloned items.
items = self.vnode2items(p.v)
for item in items:
self.setItemIcon(item, icon)
#@+node:ekr.20110605121601.17952: *4* qtree.updateVisibleIcons
def updateVisibleIcons(self, p):
'''Update the icon for p and the icons
for all visible descendants of p.'''
self.updateIcon(p, force=True)
if p.hasChildren() and p.isExpanded():
for child in p.children():
self.updateVisibleIcons(child)
#@+node:ekr.20110605121601.18414: *3* qtree.Items
#@+node:ekr.20110605121601.17943: *4* qtree.item dict getters
def itemHash(self, item):
return '%s at %s' % (repr(item), str(id(item)))
def item2position(self, item):
itemHash = self.itemHash(item)
p = self.item2positionDict.get(itemHash) # was item
return p
def item2vnode(self, item):
itemHash = self.itemHash(item)
return self.item2vnodeDict.get(itemHash) # was item
def position2item(self, p):
item = self.position2itemDict.get(p.key())
return item
def vnode2items(self, v):
return self.vnode2itemsDict.get(v, [])
def isValidItem(self, item):
itemHash = self.itemHash(item)
return itemHash in self.item2vnodeDict # was item.
#@+node:ekr.20110605121601.18415: *4* qtree.childIndexOfItem
def childIndexOfItem(self, item):
parent = item and item.parent()
if parent:
n = parent.indexOfChild(item)
else:
w = self.treeWidget
n = w.indexOfTopLevelItem(item)
return n
#@+node:ekr.20110605121601.18416: *4* qtree.childItems
def childItems(self, parent_item):
'''Return the list of child items of the parent item,
or the top-level items if parent_item is None.'''
if parent_item:
n = parent_item.childCount()
items = [parent_item.child(z) for z in range(n)]
else:
w = self.treeWidget
n = w.topLevelItemCount()
items = [w.topLevelItem(z) for z in range(n)]
return items
#@+node:ekr.20110605121601.18417: *4* qtree.closeEditorHelper
def closeEditorHelper(self, e, item):
'End editing of the underlying QLineEdit widget for the headline.' ''
w = self.treeWidget
if e:
w.closeEditor(e, QtWidgets.QAbstractItemDelegate.NoHint)
try:
# work around https://bugs.launchpad.net/leo-editor/+bug/1041906
# underlying C/C++ object has been deleted
w.setItemWidget(item, 0, None)
# Make sure e is never referenced again.
w.setCurrentItem(item)
except RuntimeError:
if 1: # Testing.
g.es_exception()
else:
# Recover silently even if there is a problem.
pass
#@+node:ekr.20110605121601.18418: *4* qtree.connectEditorWidget & helper
def connectEditorWidget(self, e, item):
if not e:
return g.trace('can not happen: no e')
# Hook up the widget.
wrapper = self.getWrapper(e, item)
def editingFinishedCallback(e=e, item=item, self=self, wrapper=wrapper):
c = self.c
w = self.treeWidget
self.onHeadChanged(p=c.p, e=e)
w.setCurrentItem(item)
e.editingFinished.connect(editingFinishedCallback)
return wrapper # 2011/02/12
#@+node:ekr.20110605121601.18419: *4* qtree.contractItem & expandItem
def contractItem(self, item):
self.treeWidget.collapseItem(item)
def expandItem(self, item):
self.treeWidget.expandItem(item)
#@+node:ekr.20110605121601.18420: *4* qtree.createTreeEditorForItem
def createTreeEditorForItem(self, item):
w = self.treeWidget
w.setCurrentItem(item) # Must do this first.
if self.use_declutter:
item.setText(0, item._real_text)
w.editItem(item)
e = w.itemWidget(item, 0)
e.setObjectName('headline')
wrapper = self.connectEditorWidget(e, item)
self.sizeTreeEditor(self.c, e)
return e, wrapper
#@+node:ekr.20110605121601.18421: *4* qtree.createTreeItem
def createTreeItem(self, p, parent_item):
w = self.treeWidget
itemOrTree = parent_item or w
item = QtWidgets.QTreeWidgetItem(itemOrTree)
item.setFlags(item.flags() | QtCore.Qt.ItemIsEditable)
try:
g.visit_tree_item(self.c, p, item)
except leoPlugins.TryNext:
pass
#print "item",item
return item
#@+node:ekr.20110605121601.18422: *4* qtree.editLabelHelper
def editLabelHelper(self, item, selectAll=False, selection=None):
'''
Help nativeTree.editLabel do gui-specific stuff.
'''
c, vc = self.c, self.c.vimCommands
w = self.treeWidget
w.setCurrentItem(item)
# Must do this first.
# This generates a call to onTreeSelect.
w.editItem(item)
# Generates focus-in event that tree doesn't report.
e = w.itemWidget(item, 0) # A QLineEdit.
if e:
s = e.text(); len_s = len(s)
if s == 'newHeadline': selectAll = True
if selection:
# pylint: disable=unpacking-non-sequence
# Fix bug https://groups.google.com/d/msg/leo-editor/RAzVPihqmkI/-tgTQw0-LtwJ
# Note: negative lengths are allowed.
i, j, ins = selection
if ins is None:
start, n = i, abs(i - j)
# This case doesn't happen for searches.
elif ins == j:
start, n = i, j - i
else:
start = start, n = j, i - j
elif selectAll: start, n, ins = 0, len_s, len_s
else: start, n, ins = len_s, 0, len_s
e.setObjectName('headline')
e.setSelection(start, n)
# e.setCursorPosition(ins) # Does not work.
e.setFocus()
wrapper = self.connectEditorWidget(e, item) # Hook up the widget.
if vc and c.vim_mode: # and selectAll
# For now, *always* enter insert mode.
if vc.is_text_wrapper(wrapper):
vc.begin_insert_mode(w=wrapper)
else:
g.trace('not a text widget!', wrapper)
return e, wrapper
#@+node:ekr.20110605121601.18423: *4* qtree.getCurrentItem
def getCurrentItem(self):
w = self.treeWidget
return w.currentItem()
#@+node:ekr.20110605121601.18424: *4* qtree.getItemText
def getItemText(self, item):
'''Return the text of the item.'''
if item:
return g.u(item.text(0))
else:
return '<no item>'
#@+node:ekr.20110605121601.18425: *4* qtree.getParentItem
def getParentItem(self, item):
return item and item.parent()
#@+node:ekr.20110605121601.18426: *4* qtree.getSelectedItems
def getSelectedItems(self):
w = self.treeWidget
return w.selectedItems()
#@+node:ekr.20110605121601.18427: *4* qtree.getTreeEditorForItem
def getTreeEditorForItem(self, item):
'''Return the edit widget if it exists.
Do *not* create one if it does not exist.
'''
w = self.treeWidget
e = w.itemWidget(item, 0)
return e
#@+node:ekr.20110605121601.18428: *4* qtree.getWrapper
def getWrapper(self, e, item):
'''Return headlineWrapper that wraps e (a QLineEdit).'''
c = self.c
if e:
wrapper = self.editWidgetsDict.get(e)
if wrapper:
pass
else:
if item:
# 2011/02/12: item can be None.
wrapper = self.headlineWrapper(c, item, name='head', widget=e)
self.editWidgetsDict[e] = wrapper
return wrapper
else:
g.trace('no e')
return None
#@+node:ekr.20110605121601.18429: *4* qtree.nthChildItem
def nthChildItem(self, n, parent_item):
children = self.childItems(parent_item)
if n < len(children):
item = children[n]
else:
# This is **not* an error.
# It simply means that we need to redraw the tree.
item = None
return item
#@+node:ekr.20110605121601.18430: *4* qtree.scrollToItem
def scrollToItem(self, item):
w = self.treeWidget
hPos, vPos = self.getScroll()
w.scrollToItem(item, w.EnsureVisible)
# Fix #265: Erratic scrolling bug.
# w.PositionAtCenter causes unwanted scrolling.
self.setHScroll(0)
# Necessary
#@+node:ekr.20110605121601.18431: *4* qtree.setCurrentItemHelper
def setCurrentItemHelper(self, item):
w = self.treeWidget
w.setCurrentItem(item)
#@+node:ekr.20110605121601.18432: *4* qtree.setItemText
def setItemText(self, item, s):
if item:
item.setText(0, s)
if self.use_declutter:
item._real_text = s
#@+node:tbrown.20160406221505.1: *4* qtree.sizeTreeEditor
@staticmethod
def sizeTreeEditor(c, editor):
"""Size a QLineEdit in a tree headline so scrolling occurs"""
# space available in tree widget
space = c.frame.tree.treeWidget.size().width()
# left hand edge of editor within tree widget
used = editor.geometry().x() + 4 # + 4 for edit cursor
# limit width to available space
editor.resize(space - used, editor.size().height())
#@+node:ekr.20110605121601.18433: *3* qtree.Scroll bars
#@+node:ekr.20110605121601.18434: *4* qtree.getSCroll
def getScroll(self):
'''Return the hPos,vPos for the tree's scrollbars.'''
w = self.treeWidget
hScroll = w.horizontalScrollBar()
vScroll = w.verticalScrollBar()
hPos = hScroll.sliderPosition()
vPos = vScroll.sliderPosition()
return hPos, vPos
#@+node:btheado.20111110215920.7164: *4* qtree.scrollDelegate
def scrollDelegate(self, kind):
'''Scroll a QTreeWidget up or down or right or left.
kind is in ('down-line','down-page','up-line','up-page', 'right', 'left')
'''
c = self.c; w = self.treeWidget
if kind in ('left', 'right'):
hScroll = w.horizontalScrollBar()
if kind == 'right':
delta = hScroll.pageStep()
else:
delta = -hScroll.pageStep()
hScroll.setValue(hScroll.value() + delta)
else:
vScroll = w.verticalScrollBar()
h = w.size().height()
lineSpacing = w.fontMetrics().lineSpacing()
n = h / lineSpacing
if kind == 'down-half-page': delta = n / 2
elif kind == 'down-line': delta = 1
elif kind == 'down-page': delta = n
elif kind == 'up-half-page': delta = -n / 2
elif kind == 'up-line': delta = -1
elif kind == 'up-page': delta = -n
else:
delta = 0
g.trace('bad kind:', kind)
val = vScroll.value()
vScroll.setValue(val + delta)
c.treeWantsFocus()
#@+node:ekr.20110605121601.18435: *4* qtree.setH/VScroll
def setHScroll(self, hPos):
w = self.treeWidget
hScroll = w.horizontalScrollBar()
hScroll.setValue(hPos)
def setVScroll(self, vPos):
w = self.treeWidget
vScroll = w.verticalScrollBar()
vScroll.setValue(vPos)
#@+node:ekr.20110605121601.17905: *3* qtree.Selecting & editing
#@+node:ekr.20110605121601.17906: *4* qtree.afterSelectHint
def afterSelectHint(self, p, old_p):
c = self.c
if c.enableRedrawFlag:
self.selecting = False
if self.busy():
self.error('afterSelectHint busy!: %s' % self.busy())
if not p:
return self.error('no p')
if p != c.p:
p = c.p
# We don't redraw during unit testing: an important speedup.
if c.expandAllAncestors(p) and not g.unitTesting:
self.full_redraw(p)
else:
c.outerUpdate() # Bring the tree up to date.
self.setItemForCurrentPosition(scroll=False)
else:
self.selecting = False
c.requestLaterRedraw = True
#@+node:ekr.20110605121601.17907: *4* qtree.beforeSelectHint
def beforeSelectHint(self, p, old_p):
if self.busy():
return
c = self.c
# Disable onTextChanged.
self.selecting = True
self.prev_v = c.p.v
#@+node:ekr.20110605121601.17908: *4* qtree.edit_widget
def edit_widget(self, p):
"""Returns the edit widget for position p."""
item = self.position2item(p)
if item:
e = self.getTreeEditorForItem(item)
if e:
# Create a wrapper widget for Leo's core.
w = self.getWrapper(e, item)
return w
else:
# This is not an error
# But warning: calling this method twice might not work!
return None
else:
return None
#@+node:ekr.20110605121601.17909: *4* qtree.editLabel
def editLabel(self, p, selectAll=False, selection=None):
"""Start editing p's headline."""
if self.busy():
return
c = self.c
c.outerUpdate()
# Do any scheduled redraw.
# This won't do anything in the new redraw scheme.
item = self.position2item(p)
if item:
if self.use_declutter:
item.setText(0, item._real_text)
e, wrapper = self.editLabelHelper(item, selectAll, selection)
else:
e, wrapper = None, None
self.error('no item for %s' % p)
if e:
self.sizeTreeEditor(c, e)
# A nice hack: just set the focus request.
c.requestedFocusWidget = e
return e, wrapper
#@+node:ekr.20110605121601.17910: *4* qtree.editPosition (no longer used)
# def editPosition(self):
# c = self.c
# p = c.currentPosition()
# ew = self.edit_widget(p)
# return p if ew else None
#@+node:ekr.20110605121601.17911: *4* qtree.endEditLabel
def endEditLabel(self):
'''Override LeoTree.endEditLabel.
End editing of the presently-selected headline.'''
c = self.c; p = c.currentPosition()
self.onHeadChanged(p)
#@+node:ekr.20110605121601.17915: *4* qtree.getSelectedPositions
def getSelectedPositions(self):
items = self.getSelectedItems()
pl = leoNodes.PosList(self.item2position(it) for it in items)
return pl
#@+node:ekr.20110605121601.17914: *4* qtree.setHeadline
def setHeadline(self, p, s):
'''Force the actual text of the headline widget to p.h.'''
# This is used by unit tests to force the headline and p into alignment.
if not p:
return
# Don't do this here: the caller should do it.
# p.setHeadString(s)
e = self.edit_widget(p)
if e:
e.setAllText(s)
else:
item = self.position2item(p)
if item:
self.setItemText(item, s)
#@+node:ekr.20110605121601.17913: *4* qtree.setItemForCurrentPosition
def setItemForCurrentPosition(self, scroll=True):
'''Select the item for c.p'''
c = self.c; p = c.currentPosition()
if self.busy():
return None
if not p:
return None
item = self.position2item(p)
if not item:
# This is not necessarily an error.
# We often attempt to select an item before redrawing it.
return None
item2 = self.getCurrentItem()
if item == item2:
if scroll:
self.scrollToItem(item)
else:
try:
self.selecting = True
# This generates gui events, so we must use a lockout.
self.setCurrentItemHelper(item)
# Just calls self.setCurrentItem(item)
if scroll:
self.scrollToItem(item)
finally:
self.selecting = False
if not item:
g.trace('*** no item')
return item
#@-others
#@-others
#@@language python
#@@tabwidth -4
#@@pagewidth 80
#@-leo
|
export {};
//# sourceMappingURL=BaseConnectionOptions.js.map
|
#!/usr/bin/env python3
import click
import colorama
import threading
import yaml
from ects.cmds.passphrase_funcs import prompt_for_passphrase, read_passphrase_from_file
from ects.util.default_root import DEFAULT_KEYS_ROOT_PATH
from ects.util.file_keyring import FileKeyring
from ects.util.keyring_wrapper import DEFAULT_PASSPHRASE_IF_NO_MASTER_PASSPHRASE, KeyringWrapper
from cryptography.exceptions import InvalidTag
from io import TextIOWrapper
from pathlib import Path
from typing import Any, Dict, Optional
DEFAULT_KEYRING_YAML = DEFAULT_KEYS_ROOT_PATH / "keyring.yaml"
class DumpKeyring(FileKeyring): # lgtm [py/missing-call-to-init]
def __init__(self, keyring_file: Path):
self.keyring_path = keyring_file
self.payload_cache = {}
self.load_keyring_lock = threading.RLock()
# We don't call super().__init__() to avoid side-effects
def get_passphrase_prompt(keyring_file: str) -> str:
prompt = (
colorama.Fore.YELLOW
+ colorama.Style.BRIGHT
+ "(Unlock Keyring: "
+ colorama.Fore.MAGENTA
+ keyring_file
+ colorama.Style.RESET_ALL
+ colorama.Fore.YELLOW
+ colorama.Style.BRIGHT
+ ")"
+ colorama.Style.RESET_ALL
+ " Passphrase: "
) # noqa: E501
return prompt
@click.command()
@click.argument("keyring_file", nargs=1, default=DEFAULT_KEYRING_YAML)
@click.option(
"--full-payload", is_flag=True, default=False, help="Print the full keyring contents, including plaintext"
)
@click.option("--passphrase-file", type=click.File("r"), help="File or descriptor to read the passphrase from")
@click.option("--pretty-print", is_flag=True, default=False)
def dump(keyring_file, full_payload: bool, passphrase_file: Optional[TextIOWrapper], pretty_print: bool):
saved_passphrase: Optional[str] = KeyringWrapper.get_shared_instance().get_master_passphrase_from_credential_store()
passphrase: str = saved_passphrase or DEFAULT_PASSPHRASE_IF_NO_MASTER_PASSPHRASE
prompt: str = get_passphrase_prompt(str(keyring_file))
data: Dict[str, Any] = {}
print(f"Attempting to dump contents of keyring file: {keyring_file}\n")
if passphrase_file is not None:
passphrase = read_passphrase_from_file(passphrase_file)
keyring = DumpKeyring(Path(keyring_file))
if full_payload:
keyring.load_outer_payload()
data = keyring.outer_payload_cache
for i in range(5):
try:
keyring.load_keyring(passphrase)
if len(data) > 0:
data["data"] = keyring.payload_cache
else:
data = keyring.payload_cache
if pretty_print:
print(yaml.dump(data))
else:
print(data)
break
except (ValueError, InvalidTag):
passphrase = prompt_for_passphrase(prompt)
except Exception as e:
print(f"Unhandled exception: {e}")
break
def dump_to_string(
keyring_file, full_payload: bool, passphrase_file: Optional[TextIOWrapper], pretty_print: bool
) -> str:
saved_passphrase: Optional[str] = KeyringWrapper.get_shared_instance().get_master_passphrase_from_credential_store()
passphrase: str = saved_passphrase or DEFAULT_PASSPHRASE_IF_NO_MASTER_PASSPHRASE
prompt: str = get_passphrase_prompt(str(keyring_file))
data: Dict[str, Any] = {}
print(f"Attempting to dump contents of keyring file: {keyring_file}\n")
if passphrase_file is not None:
passphrase = read_passphrase_from_file(passphrase_file)
keyring = DumpKeyring(Path(keyring_file))
if full_payload:
keyring.load_outer_payload()
data = keyring.outer_payload_cache
s: str = ""
for i in range(5):
try:
keyring.load_keyring(passphrase)
if len(data) > 0:
data["data"] = keyring.payload_cache
else:
data = keyring.payload_cache
if pretty_print:
s = yaml.dump(data)
else:
s = str(data)
break
except (ValueError, InvalidTag):
passphrase = prompt_for_passphrase(prompt)
except Exception as e:
print(f"Unhandled exception: {e}")
break
return s
def main():
colorama.init()
dump() # pylint: disable=no-value-for-parameter
if __name__ == "__main__":
main()
|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// https://github.com/karma-runner/karma-chrome-launcher
process.env.CHROME_BIN = require("puppeteer").executablePath();
require("dotenv").config();
const {
jsonRecordingFilterFunction,
isPlaybackMode,
isSoftRecordMode,
isRecordMode,
} = require("@azure-tools/test-recorder");
module.exports = function (config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: "./",
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ["mocha"],
plugins: [
"karma-mocha",
"karma-mocha-reporter",
"karma-chrome-launcher",
"karma-edge-launcher",
"karma-firefox-launcher",
"karma-ie-launcher",
"karma-env-preprocessor",
"karma-coverage",
"karma-sourcemap-loader",
"karma-junit-reporter",
"karma-json-to-file-reporter",
"karma-json-preprocessor",
],
// list of files / patterns to load in the browser
files: [
"dist-test/index.browser.js",
{ pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true },
].concat(isPlaybackMode() || isSoftRecordMode() ? ["recordings/browsers/**/*.json"] : []),
// list of files / patterns to exclude
exclude: [],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
"**/*.js": ["sourcemap", "env"],
"recordings/browsers/**/*.json": ["json"],
// IMPORTANT: COMMENT following line if you want to debug in your browsers!!
// Preprocess source file to calculate code coverage, however this will make source file unreadable
//"dist-test/index.browser.js": ["coverage"]
},
envPreprocessor: [
"TEST_MODE",
"METRICS_ADVISOR_SUBSCRIPTION_KEY",
"METRICS_ADVISOR_API_KEY",
"METRICS_ADVISOR_ENDPOINT",
"METRICS_ADVISOR_AZURE_BLOB_CONNECTION_STRING",
"METRICS_ADVISOR_AZURE_BLOB_TEMPLATE",
"METRICS_ADVISOR_AZURE_APPINSIGHTS_APPLICATION_ID",
"METRICS_ADVISOR_AZURE_APPINSIGHTS_API_KEY",
"METRICS_ADVISOR_AZURE_SQL_SERVER_CONNECTION_STRING",
"METRICS_ADVISOR_AZURE_SQLSERVER_DETECTION_CONFIG_ID",
"METRICS_ADVISOR_AZURE_SQLSERVER_DETECTION_INCIDENT_ID",
"METRICS_ADVISOR_AZURE_SQLSERVER_INCIDENT_ID",
"METRICS_ADVISOR_AZURE_SQLSERVER_DATAFEED_ID",
"METRICS_ADVISOR_AZURE_SQLSERVER_METRIC_ID_1",
"METRICS_ADVISOR_ALERT_CONFIG_ID",
"METRICS_ADVISOR_ALERT_ID",
"METRICS_EVENTHUB_CONNECTION_STRING",
"METRICS_EVENTHUB_CONSUMER_GROUP",
"AZURE_CLIENT_ID",
"AZURE_CLIENT_SECRET",
"AZURE_TENANT_ID",
],
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ["mocha", "coverage", "junit", "json-to-file"],
coverageReporter: {
// specify a common output directory
dir: "coverage-browser/",
reporters: [
{ type: "json", subdir: ".", file: "coverage.json" },
{ type: "lcovonly", subdir: ".", file: "lcov.info" },
{ type: "html", subdir: "html" },
{ type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" },
],
},
junitReporter: {
outputDir: "", // results will be saved as $outputDir/$browserName.xml
outputFile: "test-results.browser.xml", // if included, results will be saved as $outputDir/$browserName/$outputFile
suite: "", // suite will become the package name attribute in xml testsuite element
useBrowserName: false, // add browser name to report and classes names
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
properties: {}, // key value pair of properties to add to the <properties> section of the report
},
jsonToFileReporter: {
filter: jsonRecordingFilterFunction,
outputPath: ".",
},
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
// --no-sandbox allows our tests to run in Linux without having to change the system.
// --disable-web-security allows us to authenticate from the browser without having to write tests using interactive auth, which would be far more complex.
browsers: ["ChromeHeadlessNoSandbox"],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: "ChromeHeadless",
flags: ["--no-sandbox", "--disable-web-security"],
},
},
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: 1,
browserNoActivityTimeout: 600000,
browserDisconnectTimeout: 10000,
browserDisconnectTolerance: 3,
browserConsoleLogOptions: {
terminal: !isRecordMode(),
},
client: {
mocha: {
// change Karma's debug.html to the mocha web reporter
reporter: "html",
timeout: "600000",
},
},
});
};
|
import time
from collections import namedtuple
Info = namedtuple('Info', ['total', 'passed', 'failed'])
def terminal_reporter_info(tr):
passed = len(tr.stats.get('passed', []))
failed = sum([len(tr.stats.get('failed', [])),
len(tr.stats.get('error', []))])
return Info(
total=passed + failed,
passed=passed,
failed=failed,
)
|
export class Repo {
id = null;
name = '';
clone_url = '';
constructor(repo){
Object.assign(this, repo)
}
render() {
const container = document.createElement('div');
container.id = `repo${this.id}: ${this.name}`;
const anchorEl = document.createElement('a');
anchorEl.href = this.clone_url;
anchorEl.textContent = this.name;
anchorEl.setAttribute('target', '_blank');
container.appendChild(anchorEl);
container.appendChild(document.createElement('br'));
return container;
}
}
|
import argparse
from google_drive_downloader import GoogleDriveDownloader as gdd
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--faces', action='store_true', help='dl dafre faces')
parser.add_argument('--full', action='store_true', help='dl dafre full')
parser.add_argument('--moe', action='store_true', help='dl moeimouto')
parser.add_argument('--icf_train', action='store_true', help='dl cf train')
parser.add_argument('--icf_test', action='store_true', help='dl cf test')
parser.add_argument('--ckpt_sketch', action='store_true',
help='sketchkeras ckpt')
parser.add_argument('--ckpt_aoda', action='store_true',
help='AODA ckpt')
args = parser.parse_args()
if args.faces:
gdd.download_file_from_google_drive(
file_id='184NpGg0wIYWj6KnOj3mN9psZ2r2JX-MZ',
dest_path='./dafre_faces.tar.gz', unzip=False)
if args.full:
gdd.download_file_from_google_drive(
file_id='11mcQoIYsjk0N1AA-QftNJ6ngVKt69xia',
dest_path='./dafre_full.tar.gz', unzip=False)
if args.moe:
gdd.download_file_from_google_drive(
file_id='1bEF1CrWLYfRJYauBY9bpiZ-LMnyEn24w',
dest_path='./moeimouto_animefacecharacterdataset.tar.gz',
unzip=False)
if args.icf_train:
gdd.download_file_from_google_drive(
file_id='1USvdrXUExzuB1O5z0nDpR74pDNzI0KxL',
dest_path='./personai_icartoonface_rectrain.zip', unzip=True)
if args.icf_test:
gdd.download_file_from_google_drive(
file_id='1lUq5-BgNgqj-gIP33XLiLyJL10gQupza',
dest_path='./personai_icartoonface_rectest.zip', unzip=True)
if args.ckpt_sketch:
gdd.download_file_from_google_drive(
file_id='1Zo88NmWoAitO7DnyBrRhKXPcHyMAZS97',
dest_path='./model.pth', unzip=False)
if args.ckpt_aoda:
gdd.download_file_from_google_drive(
file_id='1RILKwUdjjBBngB17JHwhZNBEaW4Mr-Ml',
dest_path='./model.pth', unzip=False)
if __name__ == '__main__':
main()
|
import os
import platform
from termcolor import colored
from glob import glob
import pydicom
from pydicom.dataelem import RawDataElement
from pydicom.valuerep import PersonName
import hashlib
def print_colored_text(message, color='red'):
print(colored(message, color))
def platform_slash():
if "Windows" in platform.platform():
slash = '\\'
elif "Linux" in platform.platform():
slash = r'/'
elif "Darwin" in platform.platform():
slash = r'/'
else:
message = "Unknown platform: {}".format(platform.platform())
print_colored_text(message)
raise SystemError
return slash
def get_example_dicom(file_or_folder):
if os.path.isfile(file_or_folder):
try:
return pydicom.dcmread(file_or_folder)
except:
message = '{} is not a Dicom file!'.format(file_or_folder)
print_colored_text(message,)
elif os.path.isdir(file_or_folder):
files = glob(file_or_folder + '/*')
for file in files:
try:
return pydicom.dcmread(file)
except:
continue
message = "The folder {} does not contain a DICOM file".format(file_or_folder)
print_colored_text(message)
else:
message = "{} is not a file or a folder".format(file_or_folder)
print_colored_text(message)
raise UserWarning
def save_config(config_file, config_dict):
with open(config_file, 'w') as f:
for key in config_dict.keys():
f.write('%s;%s\n' % (key, config_dict[key]))
message = "Config file: {} saved".format(config_file)
print_colored_text(message, 'green')
def load_config(config_file):
if not os.path.isfile(config_file):
message = "{} not a config file".format(config_file)
print_colored_text(message)
raise OSError
with open(config_file, 'r') as f:
config = [c[:-1].split(';') for c in f.readlines()]
message = "Config file: {} loaded".format(config_file)
print_colored_text(message, 'green')
return config
def load_dicoms(folder):
data_list = glob(folder + platform_slash() + '*')
dicoms = []
for file in data_list:
try:
dicoms.append((pydicom.dcmread(file), os.path.basename(file)))
except:
message = '{} is not a DICOM file so it was ignored'.format(file)
print_colored_text(message, 'blue')
if len(dicoms) == 0:
message = "The folder {} does not contain a DICOM file".format(folder)
print_colored_text(message)
return []
return dicoms
def anonymize_element(element):
type_ = element.value
if type_.__class__ is bytes:
value = element.value
value = (str(int(hashlib.sha1(value).hexdigest(), 16) % (10 ** element.length))).encode("utf-8")
element = RawDataElement(element.tag, element.VR, element.length, value, element.value_tell,
element.is_implicit_VR, element.is_little_endian, element.is_raw)
elif type_.__class__ is int:
pass
elif type_.__class__ is str:
if element.description() in ['Institution Name', 'Patient Birth Date']:
element.value = 'Anonymize'
elif type_.__class__ is PersonName:
element.value = 'Anonymize'
else:
pass
return element
|
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Class MirroredStrategy implementing DistributionStrategy."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import contextlib
import copy
import threading
from tensorflow.python import pywrap_tensorflow
from tensorflow.python.distribute import cross_device_ops as cross_device_ops_lib
from tensorflow.python.distribute import device_util
from tensorflow.python.distribute import distribute_lib
from tensorflow.python.distribute import input_lib
from tensorflow.python.distribute import multi_worker_util
from tensorflow.python.distribute import numpy_dataset
from tensorflow.python.distribute import reduce_util
from tensorflow.python.distribute import shared_variable_creator
from tensorflow.python.distribute import values
from tensorflow.python.distribute.cluster_resolver import TFConfigClusterResolver
from tensorflow.python.eager import context
from tensorflow.python.eager import tape
from tensorflow.python.framework import constant_op
from tensorflow.python.framework import device as tf_device
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.framework import tensor_util
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import variable_scope
from tensorflow.python.training import coordinator
from tensorflow.python.util import nest
from tensorflow.python.util.tf_export import tf_export
# TODO(josh11b): Replace asserts in this file with if ...: raise ...
@contextlib.contextmanager
def _enter_graph(g, eager, creator_stack=None):
"""Context manager for selecting a graph and maybe eager mode."""
if eager:
with g.as_default(), context.eager_mode():
if creator_stack is not None:
g._variable_creator_stack = creator_stack # pylint: disable=protected-access
yield
else:
with g.as_default():
if creator_stack is not None:
g._variable_creator_stack = creator_stack # pylint: disable=protected-access
yield
def _cpu_device(device):
cpu_device = tf_device.DeviceSpec.from_string(device)
cpu_device = cpu_device.replace(device_type="CPU", device_index=0)
return cpu_device.to_string()
class _RequestedStop(Exception): # pylint: disable=g-bad-exception-name
pass
# _call_for_each_replica is not a member of MirroredStrategy so that it is
# not allowed to use anything specific to MirroredStrategy and thus
# can be shared with other distribution strategies.
# TODO(yuefengz): maybe create a common class for those who need to call this
# _call_for_each_replica.
def _call_for_each_replica(distribution, device_map, fn, args, kwargs):
"""Run `fn` in separate threads, once per replica/worker device.
Args:
distribution: the DistributionStrategy object.
device_map: the DeviceMap with the devices to run `fn` on.
fn: function to run (will be run once per replica, each in its own thread).
args: positional arguments for `fn`
kwargs: keyword arguments for `fn`.
Returns:
Merged return value of `fn` across all replicas.
Raises:
RuntimeError: If fn() calls get_replica_context().merge_call() a different
number of times from the available devices.
"""
# TODO(josh11b): Add this option once we add synchronization to variable
# creation. Until then, this is pretty unsafe to use.
run_concurrently = False
if not context.executing_eagerly():
# Needed for per-thread device, etc. contexts in graph mode.
ops.get_default_graph().switch_to_thread_local()
coord = coordinator.Coordinator(clean_stop_exception_types=(_RequestedStop,))
shared_variable_store = {}
# TODO(isaprykin): Create these threads once instead of during every call.
threads = []
for index in range(device_map.num_replicas_in_graph):
variable_creator_fn = shared_variable_creator.make_fn(
shared_variable_store, index)
t = _MirroredReplicaThread(
distribution, coord, index, device_map, variable_creator_fn, fn,
values.select_replica(index, args),
values.select_replica(index, kwargs))
threads.append(t)
for t in threads:
t.start()
# When `fn` starts `should_run` event is set on _MirroredReplicaThread
# (`MRT`) threads. The execution waits until
# `MRT.has_paused` is set, which indicates that either `fn` is
# complete or a `get_replica_context().merge_call()` is called. If `fn` is
# complete, then `MRT.done` is set to True. Otherwise, arguments
# of `get_replica_context().merge_call` from all paused threads are grouped
# and the `merge_fn` is performed. Results of the
# `get_replica_context().merge_call` are then set to `MRT.merge_result`.
# Each such `get_replica_context().merge_call` call returns the
# `MRT.merge_result` for that thread when `MRT.should_run` event
# is reset again. Execution of `fn` resumes.
try:
with coord.stop_on_exception():
all_done = False
while not all_done and not coord.should_stop():
done = []
if run_concurrently:
for t in threads:
t.should_run.set()
for t in threads:
t.has_paused.wait()
t.has_paused.clear()
if coord.should_stop():
return None
done.append(t.done)
else:
for t in threads:
t.should_run.set()
t.has_paused.wait()
t.has_paused.clear()
if coord.should_stop():
return None
done.append(t.done)
if coord.should_stop():
return None
all_done = all(done)
if not all_done:
if any(done):
raise RuntimeError("Some replicas made a different number of "
"replica_context().merge_call() calls.")
# get_replica_context().merge_call() case
merge_args = values.regroup(
device_map, tuple(t.merge_args for t in threads))
merge_kwargs = values.regroup(
device_map, tuple(t.merge_kwargs for t in threads))
# We capture the name_scope of the MRT when we call merge_fn
# to ensure that if we have opened a name scope in the MRT,
# it will be respected when executing the merge function. We only
# capture the name_scope from the first MRT and assume it is
# the same for all other MRTs.
mtt_captured_name_scope = threads[0].captured_name_scope
mtt_captured_var_scope = threads[0].captured_var_scope
# Capture and merge the control dependencies from all the threads.
mtt_captured_control_deps = set()
for t in threads:
mtt_captured_control_deps.update(t.captured_control_deps)
with ops.name_scope(mtt_captured_name_scope),\
ops.control_dependencies(mtt_captured_control_deps), \
variable_scope.variable_scope(mtt_captured_var_scope):
merge_result = threads[0].merge_fn(distribution, *merge_args,
**merge_kwargs)
for r, t in enumerate(threads):
t.merge_result = values.select_replica(r, merge_result)
finally:
for t in threads:
t.should_run.set()
coord.join(threads)
return values.regroup(device_map, tuple(t.main_result for t in threads))
def _create_mirrored_variable(strategy, device_map, logical_device, # pylint: disable=missing-docstring
real_mirrored_creator, *args, **kwargs):
# Figure out what collections this variable should be added to.
# We'll add the MirroredVariable to those collections instead.
collections = kwargs.pop("collections", None)
if collections is None:
collections = [ops.GraphKeys.GLOBAL_VARIABLES]
kwargs["collections"] = []
# Get synchronization value
synchronization = kwargs.get("synchronization",
variable_scope.VariableSynchronization.ON_WRITE)
if synchronization == variable_scope.VariableSynchronization.NONE:
raise ValueError("`NONE` variable synchronization mode is not "
"supported with `Mirrored` distribution strategy. Please"
" change the `synchronization` for variable: " +
kwargs["name"])
elif synchronization == variable_scope.VariableSynchronization.ON_READ:
# Variables that are to be synced on read are replica local.
is_sync_on_read = True
elif (synchronization == variable_scope.VariableSynchronization.ON_WRITE or
synchronization == variable_scope.VariableSynchronization.AUTO):
# `AUTO` synchronization for `MirroredStrategy` is `ON_WRITE`.
is_sync_on_read = False
else:
raise ValueError(
"Invalid variable synchronization mode: %s for variable: %s" %
(synchronization, kwargs["name"]))
# Get aggregation value
aggregation = kwargs.pop("aggregation",
variable_scope.VariableAggregation.NONE)
if aggregation not in (
variable_scope.VariableAggregation.NONE,
variable_scope.VariableAggregation.SUM,
variable_scope.VariableAggregation.MEAN,
variable_scope.VariableAggregation.ONLY_FIRST_REPLICA
):
raise ValueError(
"Invalid variable aggregation mode: %s for variable: %s" %
(aggregation, kwargs["name"]))
# Ignore user-specified caching device, not needed for mirrored variables.
kwargs.pop("caching_device", None)
# TODO(josh11b,apassos): It would be better if variable initialization
# was never recorded on the tape instead of having to do this manually
# here.
with tape.stop_recording():
devices = device_map.logical_to_actual_devices(logical_device)
value_list = real_mirrored_creator(devices, *args, **kwargs)
if is_sync_on_read:
result = values.SyncOnReadVariable(
strategy, device_map, value_list, aggregation,
logical_device=logical_device)
else:
result = values.MirroredVariable(
strategy, device_map, value_list, aggregation,
logical_device=logical_device)
# Add the wrapped variable to the requested collections.
# The handling of eager mode and the global step matches
# ResourceVariable._init_from_args().
if not context.executing_eagerly():
g = ops.get_default_graph()
# If "trainable" is True, next_creator() will add the member variables
# to the TRAINABLE_VARIABLES collection, so we manually remove
# them and replace with the MirroredVariable. We can't set
# "trainable" to False for next_creator() since that causes functions
# like implicit_gradients to skip those variables.
if kwargs.get("trainable", True):
collections.append(ops.GraphKeys.TRAINABLE_VARIABLES)
l = g.get_collection_ref(ops.GraphKeys.TRAINABLE_VARIABLES)
for v in value_list:
if v in l:
l.remove(v)
g.add_to_collections(collections, result)
elif ops.GraphKeys.GLOBAL_STEP in collections:
ops.add_to_collections(ops.GraphKeys.GLOBAL_STEP, result)
return result
def _is_device_list_local(devices):
"""Checks whether the devices list is for local or multi-worker.
Args:
devices: a list of device strings, either local for remote devices.
Returns:
a boolean indicating whether these device strings are for local or for
remote.
Raises:
ValueError: if device strings are not consistent.
"""
all_local = None
for d in devices:
d_spec = tf_device.DeviceSpec.from_string(d)
is_local = d_spec.job in (None, "localhost")
if all_local is None: # Determine all_local from first device.
all_local = is_local
if all_local:
if not is_local:
raise ValueError("Local device string cannot have job specified other "
"than 'localhost'")
else:
if is_local:
raise ValueError("Remote device string must have job specified.")
if d_spec.task is None:
raise ValueError("Remote device string must have task specified.")
return all_local
def _cluster_spec_to_device_list(cluster_spec, num_gpus_per_worker):
"""Returns a device list given a cluster spec."""
cluster_spec = multi_worker_util.normalize_cluster_spec(cluster_spec)
devices = []
for task_type in ("chief", "worker"):
for task_id in range(len(cluster_spec.as_dict().get(task_type, []))):
if num_gpus_per_worker == 0:
devices.append("/job:%s/task:%d" % (task_type, task_id))
else:
devices.extend([
"/job:%s/task:%d/device:GPU:%i" % (task_type, task_id, gpu_id)
for gpu_id in range(num_gpus_per_worker)
])
return devices
def _group_device_list(devices):
"""Groups the devices list by task_type and task_id.
Args:
devices: a list of device strings for remote devices.
Returns:
a dict of list of device strings mapping from task_type to a list of devices
for the task_type in the asceding order of task_id.
"""
assert not _is_device_list_local(devices)
device_dict = {}
for d in devices:
d_spec = tf_device.DeviceSpec.from_string(d)
# Create an entry for the task_type.
if d_spec.job not in device_dict:
device_dict[d_spec.job] = []
# Fill the device list for task_type until it covers the task_id.
while len(device_dict[d_spec.job]) <= d_spec.task:
device_dict[d_spec.job].append([])
device_dict[d_spec.job][d_spec.task].append(d)
return device_dict
def _is_gpu_device(device):
return tf_device.DeviceSpec.from_string(device).device_type == "GPU"
def _infer_num_gpus_per_worker(devices):
"""Infers the number of GPUs on each worker.
Currently to make multi-worker cross device ops work, we need all workers to
have the same number of GPUs.
Args:
devices: a list of device strings, can be either local devices or remote
devices.
Returns:
number of GPUs per worker.
Raises:
ValueError if workers have different number of GPUs or GPU indices are not
consecutive and starting from 0.
"""
if _is_device_list_local(devices):
return sum(1 for d in devices if _is_gpu_device(d))
else:
device_dict = _group_device_list(devices)
num_gpus = None
for _, devices_in_task in device_dict.items():
for device_in_task in devices_in_task:
if num_gpus is None:
num_gpus = sum(1 for d in device_in_task if _is_gpu_device(d))
# Verify other workers have the same number of GPUs.
elif num_gpus != sum(1 for d in device_in_task if _is_gpu_device(d)):
raise ValueError("All workers should have the same number of GPUs.")
for d in device_in_task:
d_spec = tf_device.DeviceSpec.from_string(d)
if (d_spec.device_type == "GPU" and
d_spec.device_index >= num_gpus):
raise ValueError("GPU `device_index` on a worker should be "
"consecutive and start from 0.")
return num_gpus
def all_local_devices(num_gpus=None):
if num_gpus is None:
num_gpus = context.num_gpus()
return device_util.local_devices_from_num_gpus(num_gpus)
def _all_devices():
devices = []
tfconfig = TFConfigClusterResolver()
if tfconfig.cluster_spec().as_dict():
devices = _cluster_spec_to_device_list(tfconfig.cluster_spec(),
context.num_gpus())
return devices if devices else all_local_devices()
@tf_export("distribute.MirroredStrategy", v1=[])
class MirroredStrategy(distribute_lib.Strategy):
"""Mirrors vars to distribute across multiple devices and machines.
This strategy uses one replica per device and sync replication for its
multi-GPU version.
The multi-worker version will be added in the future.
Args:
devices: a list of device strings. If `None`, all available GPUs are used.
If no GPUs are found, CPU is used.
cross_device_ops: optional, a descedant of `CrossDeviceOps`. If this is not
set, nccl will be used by default.
"""
def __init__(self, devices=None, cross_device_ops=None):
extended = MirroredExtended(
self, devices=devices, cross_device_ops=cross_device_ops)
super(MirroredStrategy, self).__init__(extended)
@tf_export(v1=["distribute.MirroredStrategy"])
class MirroredStrategyV1(distribute_lib.StrategyV1):
__doc__ = MirroredStrategy.__doc__
def __init__(self, devices=None, cross_device_ops=None):
extended = MirroredExtended(
self, devices=devices, cross_device_ops=cross_device_ops)
super(MirroredStrategyV1, self).__init__(extended)
# TODO(josh11b): Switch to V2 when we no longer need to support tf.compat.v1.
class MirroredExtended(distribute_lib.StrategyExtendedV1):
"""Implementation of MirroredStrategy."""
def __init__(self, container_strategy, devices=None, cross_device_ops=None):
super(MirroredExtended, self).__init__(container_strategy)
if devices is None:
devices = _all_devices()
if not devices:
raise ValueError("Got an empty `devices` list. Please make sure the "
"`devices` you pass in is not empty.")
self._cross_device_ops = cross_device_ops
self._initialize_strategy(devices)
def _initialize_strategy(self, devices):
# The _initialize_strategy method is intended to be used by distribute
# coordinator as well.
if _is_device_list_local(devices):
self._initialize_local(devices)
else:
self._initialize_multi_worker(devices)
def _initialize_local(self, devices):
"""Initializes the object for local training."""
self._local_mode = True
assert devices, "Must specify at least one device."
devices = tuple(device_util.resolve(d) for d in devices)
assert len(set(devices)) == len(devices), (
"No duplicates allowed in `devices` argument: %s" % (devices,))
# TODO(josh11b): Require at least 2 devices?
self._device_map = values.ReplicaDeviceMap(devices)
self._input_workers = input_lib.InputWorkers(self._device_map)
self._inferred_cross_device_ops = cross_device_ops_lib.choose_the_best(
devices)
self._host_input_device = numpy_dataset.SingleDevice("/cpu:0")
def _initialize_multi_worker(self, devices):
"""Initializes the object for multi-worker training."""
self._local_mode = False
assert devices, "Must specify at least one device."
devices = tuple(device_util.resolve(d) for d in devices)
assert len(set(devices)) == len(devices), (
"No duplicates allowed in `devices` argument: %s" % devices)
# TODO(josh11b): Require at least 2 devices?
device_dict = _group_device_list(devices)
workers = []
worker_devices = []
for job in ("chief", "worker"):
for task in range(len(device_dict.get(job, []))):
worker = "/job:%s/task:%d" % (job, task)
workers.append(worker)
worker_devices.append((worker, device_dict[job][task]))
# Setting `_default_device` will add a device scope in the
# distribution.scope. We set the default device to the first worker. When
# users specify device under distribution.scope by
# with tf.device("/cpu:0"):
# ...
# their ops will end up on the cpu device of its first worker, e.g.
# "/job:worker/task:0/device:CPU:0". Note this is not used in replica mode.
self._default_device = workers[0]
self._host_input_device = numpy_dataset.SingleDevice(workers[0])
self._device_map = values.ReplicaDeviceMap(devices)
self._input_workers = input_lib.InputWorkers(
self._device_map, worker_devices)
if len(workers) > 1:
if not isinstance(self._cross_device_ops,
cross_device_ops_lib.MultiWorkerAllReduce):
raise ValueError(
"In-graph multi-worker training with `MirroredStrategy` is not "
"supported.")
self._inferred_cross_device_ops = self._cross_device_ops
else:
# TODO(yuefengz): make `choose_the_best` work with device strings
# containing job names.
self._inferred_cross_device_ops = cross_device_ops_lib.NcclAllReduce()
def _create_variable(self, next_creator, *args, **kwargs):
"""Create a mirrored variable. See `DistributionStrategy.scope`."""
colocate_with = kwargs.pop("colocate_with", None)
if colocate_with is None:
device_map = self._device_map
logical_device = 0 # TODO(josh11b): Get logical device from scope here.
elif isinstance(colocate_with, numpy_dataset.SingleDevice):
with ops.device(colocate_with.device):
return next_creator(*args, **kwargs)
else:
device_map = colocate_with.device_map
logical_device = colocate_with.logical_device
def _real_mirrored_creator(devices, *args, **kwargs): # pylint: disable=g-missing-docstring
value_list = []
for i, d in enumerate(devices):
with ops.device(d):
if i > 0:
# Give replicas meaningful distinct names:
var0name = value_list[0].name.split(":")[0]
# We append a / to variable names created on replicas with id > 0 to
# ensure that we ignore the name scope and instead use the given
# name as the absolute name of the variable.
kwargs["name"] = "%s/replica_%d/" % (var0name, i)
# Initialize replicas with the same value:
def initial_value_fn(device=d):
if context.executing_eagerly() or ops.inside_function():
init_value = value_list[0].value()
return array_ops.identity(init_value)
else:
with ops.device(device):
init_value = value_list[0].initial_value
return array_ops.identity(init_value)
kwargs["initial_value"] = initial_value_fn
with context.device_policy(context.DEVICE_PLACEMENT_SILENT):
# Don't record operations (e.g. other variable reads) during
# variable creation.
with tape.stop_recording():
v = next_creator(*args, **kwargs)
assert not isinstance(v, values.DistributedVariable)
value_list.append(v)
return value_list
return _create_mirrored_variable(
self._container_strategy(), device_map, logical_device,
_real_mirrored_creator, *args, **kwargs)
def _validate_colocate_with_variable(self, colocate_with_variable):
values.validate_colocate_distributed_variable(colocate_with_variable, self)
def _make_dataset_iterator(self, dataset):
return input_lib.DatasetIterator(
dataset,
self._input_workers,
self._container_strategy(),
split_batch_by=self._num_replicas_in_sync)
def _make_input_fn_iterator(
self,
input_fn,
replication_mode=distribute_lib.InputReplicationMode.PER_WORKER):
input_contexts = []
num_workers = self._input_workers.num_workers
for i in range(num_workers):
input_contexts.append(distribute_lib.InputContext(
num_input_pipelines=num_workers,
input_pipeline_id=i,
num_replicas_in_sync=self._num_replicas_in_sync))
return input_lib.InputFunctionIterator(input_fn, self._input_workers,
input_contexts,
self._container_strategy())
def _experimental_distribute_dataset(self, dataset):
return input_lib.get_distributed_dataset(
dataset,
self._input_workers,
self._container_strategy(),
split_batch_by=self._num_replicas_in_sync)
def _experimental_make_numpy_dataset(self, numpy_input, session):
return numpy_dataset.one_host_numpy_dataset(
numpy_input, self._host_input_device, session)
def _experimental_distribute_datasets_from_function(self, dataset_fn):
input_contexts = []
num_workers = self._input_workers.num_workers
for i in range(num_workers):
input_contexts.append(distribute_lib.InputContext(
num_input_pipelines=num_workers,
input_pipeline_id=i,
num_replicas_in_sync=self._num_replicas_in_sync))
return input_lib.DistributedDatasetsFromFunction(
dataset_fn,
self._input_workers,
input_contexts,
self._container_strategy())
# TODO(priyag): Deal with OutOfRange errors once b/111349762 is fixed.
def _experimental_run_steps_on_iterator(self, fn, iterator, iterations,
initial_loop_values=None):
if initial_loop_values is None:
initial_loop_values = {}
initial_loop_values = nest.flatten(initial_loop_values)
ctx = input_lib.MultiStepContext()
def body(i, *args):
"""A wrapper around `fn` to create the while loop body."""
del args
fn_result = fn(ctx, iterator.get_next())
for (name, output) in ctx.last_step_outputs.items():
# Convert all outputs to tensors, potentially from `DistributedValues`.
ctx.last_step_outputs[name] = self._local_results(output)
flat_last_step_outputs = nest.flatten(ctx.last_step_outputs)
with ops.control_dependencies([fn_result]):
return [i + 1] + flat_last_step_outputs
# We capture the control_flow_context at this point, before we run `fn`
# inside a while_loop. This is useful in cases where we might need to exit
# these contexts and get back to the outer context to do some things, for
# e.g. create an op which should be evaluated only once at the end of the
# loop on the host. One such usage is in creating metrics' value op.
self._outer_control_flow_context = (
ops.get_default_graph()._get_control_flow_context()) # pylint: disable=protected-access
cond = lambda i, *args: i < iterations
i = constant_op.constant(0)
loop_result = control_flow_ops.while_loop(
cond, body, [i] + initial_loop_values, name="",
parallel_iterations=1, back_prop=False, swap_memory=False,
return_same_structure=True)
del self._outer_control_flow_context
ctx.run_op = control_flow_ops.group(loop_result)
# Convert the last_step_outputs from a list to the original dict structure
# of last_step_outputs.
last_step_tensor_outputs = loop_result[1:]
last_step_tensor_outputs_dict = nest.pack_sequence_as(
ctx.last_step_outputs, last_step_tensor_outputs)
for name, reduce_op in ctx._last_step_outputs_reduce_ops.items(): # pylint: disable=protected-access
output = last_step_tensor_outputs_dict[name]
# For outputs that have already been reduced, wrap them in a Mirrored
# container, else in a PerReplica container.
if reduce_op is None:
last_step_tensor_outputs_dict[name] = values.regroup(self._device_map,
output)
else:
assert len(output) == 1
last_step_tensor_outputs_dict[name] = output[0]
ctx._set_last_step_outputs(last_step_tensor_outputs_dict) # pylint: disable=protected-access
return ctx
def _broadcast_to(self, tensor, destinations):
# This is both a fast path for Python constants, and a way to delay
# converting Python values to a tensor until we know what type it
# should be converted to. Otherwise we have trouble with:
# global_step.assign_add(1)
# since the `1` gets broadcast as an int32 but global_step is int64.
if isinstance(tensor, (float, int)):
return tensor
# TODO(josh11b): In eager mode, use one thread per device, or async mode.
if not destinations:
# TODO(josh11b): Use current logical device instead of 0 here.
destinations = values.LogicalDeviceSpec(
device_map=self._device_map, logical_device=0)
return self._get_cross_device_ops().broadcast(tensor, destinations)
def _call_for_each_replica(self, fn, args, kwargs):
return _call_for_each_replica(self._container_strategy(), self._device_map,
fn, args, kwargs)
def _configure(self,
session_config=None,
cluster_spec=None,
task_type=None,
task_id=None):
del task_type, task_id
if session_config:
session_config.CopyFrom(self._update_config_proto(session_config))
if cluster_spec:
# TODO(yuefengz): remove the following code once cluster_resolver is
# added.
num_gpus_per_worker = _infer_num_gpus_per_worker(
self._device_map.all_devices)
multi_worker_devices = _cluster_spec_to_device_list(
cluster_spec, num_gpus_per_worker)
self._initialize_multi_worker(multi_worker_devices)
def _update_config_proto(self, config_proto):
updated_config = copy.deepcopy(config_proto)
updated_config.isolate_session_state = True
return updated_config
def _get_cross_device_ops(self):
return self._cross_device_ops or self._inferred_cross_device_ops
def _reduce_to(self, reduce_op, value, destinations):
if (isinstance(value, values.Mirrored) and
reduce_op == reduce_util.ReduceOp.MEAN):
return value
assert not isinstance(value, values.Mirrored)
if not isinstance(value, values.DistributedValues):
# This function handles reducing values that are not PerReplica or
# Mirrored values. For example, the same value could be present on all
# replicas in which case `value` would be a single value or value could
# be 0.
return cross_device_ops_lib.reduce_non_distributed_value(
reduce_op, self._device_map, value, destinations)
return self._get_cross_device_ops().reduce(
reduce_op, value, destinations=destinations)
def _batch_reduce_to(self, reduce_op, value_destination_pairs):
return self._get_cross_device_ops().batch_reduce(
reduce_op, value_destination_pairs)
def _update(self, var, fn, args, kwargs, group):
# TODO(josh11b): In eager mode, use one thread per device.
assert isinstance(var, values.DistributedVariable)
updates = []
for i, (d, v) in enumerate(zip(var.devices, var.values)):
name = "update_%d" % i
with ops.device(d), distribute_lib.UpdateContext(d), ops.name_scope(name):
# If args and kwargs are not mirrored, the value is returned as is.
updates.append(fn(v,
*values.select_device_mirrored(d, args),
**values.select_device_mirrored(d, kwargs)))
return values.update_regroup(self, self._device_map, updates, group)
def _update_non_slot(self, colocate_with, fn, args, kwargs, group):
assert isinstance(colocate_with, tuple)
# TODO(josh11b): In eager mode, use one thread per device.
updates = []
for i, d in enumerate(colocate_with):
name = "update_%d" % i
with ops.device(d), distribute_lib.UpdateContext(d), ops.name_scope(name):
updates.append(fn(*values.select_device_mirrored(d, args),
**values.select_device_mirrored(d, kwargs)))
return values.update_regroup(self, self._device_map, updates, group)
def read_var(self, replica_local_var):
"""Read the aggregate value of a replica-local variable."""
if isinstance(replica_local_var, values.SyncOnReadVariable):
return replica_local_var._get_cross_replica() # pylint: disable=protected-access
assert isinstance(replica_local_var, values.Mirrored)
return array_ops.identity(replica_local_var.get())
def _local_results(self, val):
if isinstance(val, values.DistributedValues):
return val.values
return (val,)
def value_container(self, val):
return values.value_container(val)
@property
def _num_replicas_in_sync(self):
return self._device_map.num_replicas_in_graph
@property
def worker_devices(self):
return self._device_map.all_devices
@property
def worker_devices_by_replica(self):
return self._device_map.devices_by_replica
@property
def parameter_devices(self):
return self._device_map.all_devices
@property
def experimental_between_graph(self):
return False
@property
def experimental_should_init(self):
return True
@property
def should_checkpoint(self):
return True
@property
def should_save_summary(self):
return True
def non_slot_devices(self, var_list):
del var_list
# TODO(josh11b): Should this be the last logical device instead?
return self._device_map.logical_to_actual_devices(0)
# TODO(priyag): Delete this once all strategies use global batch size.
@property
def _global_batch_size(self):
"""`make_dataset_iterator` and `make_numpy_iterator` use global batch size.
`make_input_fn_iterator` assumes per-replica batching.
Returns:
Boolean.
"""
return True
class _MirroredReplicaThread(threading.Thread):
"""A thread that runs() a function on a device."""
def __init__(self, dist, coord, replica_id, device_map, variable_creator_fn,
fn, args, kwargs):
super(_MirroredReplicaThread, self).__init__()
self.coord = coord
self.distribution = dist
self.device_map = device_map
self.replica_id = replica_id
self.variable_creator_fn = variable_creator_fn
# State needed to run and return the results of `fn`.
self.main_fn = fn
self.main_args = args
self.main_kwargs = kwargs
self.main_result = None
self.done = False
# State needed to run the next merge_call() (if any) requested via
# ReplicaContext.
self.merge_fn = None
self.merge_args = None
self.merge_kwargs = None
self.merge_result = None
self.captured_name_scope = None
self.captured_var_scope = None
# We use a thread.Event for the main thread to signal when this
# thread should start running (`should_run`), and another for
# this thread to transfer control back to the main thread
# (`has_paused`, either when it gets to a
# `get_replica_context().merge_call` or when `fn` returns). In
# either case the event starts cleared, is signaled by calling
# set(). The receiving thread waits for the signal by calling
# wait() and then immediately clearing the event using clear().
self.should_run = threading.Event()
self.has_paused = threading.Event()
# These fields have to do with inheriting various contexts from the
# parent thread:
context.ensure_initialized()
ctx = context.context()
self.in_eager = ctx.executing_eagerly()
self.record_thread_local_context_fields()
self.context_device_policy = (
pywrap_tensorflow.TFE_ContextGetDevicePlacementPolicy(
ctx._context_handle))
self.graph = ops.get_default_graph()
with ops.init_scope():
self._init_in_eager = context.executing_eagerly()
self._init_graph = ops.get_default_graph()
self._variable_creator_stack = self.graph._variable_creator_stack[:]
self._var_scope = variable_scope.get_variable_scope()
# Adding a "/" at end lets us re-enter this scope later.
self._name_scope = self.graph.get_name_scope()
if self._name_scope:
self._name_scope += "/"
if self.replica_id > 0:
if not self._name_scope:
self._name_scope = ""
self._name_scope += "replica_%d/" % self.replica_id
def run(self):
self.should_run.wait()
self.should_run.clear()
try:
if self.coord.should_stop():
return
self.restore_thread_local_context_fields()
# TODO(josh11b): Use current logical device instead of 0 here.
with self.coord.stop_on_exception(), \
_enter_graph(self._init_graph, self._init_in_eager), \
_enter_graph(self.graph, self.in_eager,
self._variable_creator_stack), \
context.device_policy(self.context_device_policy), \
MirroredReplicaContext(self.distribution, constant_op.constant(
self.replica_id, dtypes.int32)), \
ops.device(self.device_map.logical_to_actual_devices(0)[
self.replica_id]), \
ops.name_scope(self._name_scope), \
variable_scope.variable_scope(
self._var_scope, reuse=self.replica_id > 0), \
variable_scope.variable_creator_scope(self.variable_creator_fn):
self.main_result = self.main_fn(*self.main_args, **self.main_kwargs)
self.done = True
finally:
self.has_paused.set()
def record_thread_local_context_fields(self):
"""Record thread local fields of context.context() in self."""
ctx = context.context()
self._summary_step = ctx.summary_step
self._summary_writer = ctx.summary_writer
self._summary_recording = ctx.summary_recording
self._summary_recording_distribution_strategy = (
ctx.summary_recording_distribution_strategy)
# TODO(b/125892694): record other fields in EagerContext.
def restore_thread_local_context_fields(self):
"""Restore thread local fields of context.context() from self."""
ctx = context.context()
ctx.summary_step = self._summary_step
ctx.summary_writer = self._summary_writer
ctx.summary_recording = self._summary_recording
ctx.summary_recording_distribution_strategy = (
self._summary_recording_distribution_strategy)
# TODO(b/125892694): restore other fields in EagerContext.
class MirroredReplicaContext(distribute_lib.ReplicaContext):
"""ReplicaContext used in MirroredStrategy.extended.call_for_each_replica().
Opened in `_MirroredReplicaThread`, to allow the user to invoke
`MirroredStrategy`'s specific implementation of `merge_call()`,
which works by delegating the function and its arguments to
the main thread (the one that invoked
`MirroredStrategy.extended.call_for_each_replica()`).
"""
def _merge_call(self, fn, args, kwargs):
"""Delegate to the main thread to actually perform merge_call()."""
t = threading.current_thread() # a _MirroredReplicaThread
t.merge_fn = fn
t.merge_args = args
t.merge_kwargs = kwargs
t.captured_name_scope = t.graph.get_name_scope()
# Adding a "/" at end lets us re-enter this scope later.
if t.captured_name_scope:
t.captured_name_scope += "/"
t.captured_var_scope = variable_scope.get_variable_scope()
t.captured_control_deps = t.graph._current_control_dependencies() # pylint: disable=protected-access
# NOTE(priyag): Throw an error if there is a merge call in the middle of a
# `fn` passed to call_for_each_replica which changes the graph being used
# while calling `fn`. This can happen when the `fn` is decorated with
# `tf.function` and there is a merge_call in `fn`. This breaks because each
# thread tries to create a distinct tf.function. Each tf.function creation
# takes a lock, and so if there is a merge call in the middle, the lock is
# never released and subsequent replica threads cannot proceed to define
# their own functions. Checking for the graph being the same is one way for
# us to check this didn't happen.
if ops.get_default_graph() != t.graph:
raise RuntimeError(
"`merge_call` called while defining a new graph or a tf.function. "
"This can often happen if the function `fn` passed to "
"`strategy.experimental_run()` is decorated with "
"`@tf.function` (or contains a nested `@tf.function`), and `fn` "
"contains a synchronization point, such as aggregating gradients. "
"This behavior is not yet supported. Instead, please wrap the entire "
"call `strategy.experimental_run(fn)` in a `@tf.function`, and avoid "
"nested `tf.function`s that may potentially cross a synchronization "
"boundary.")
t.has_paused.set()
t.should_run.wait()
t.should_run.clear()
if t.coord.should_stop():
raise _RequestedStop()
return t.merge_result
@property
def devices(self):
distribute_lib.require_replica_context(self)
replica_id = tensor_util.constant_value(self._replica_id_in_sync_group)
return [self._strategy.extended.worker_devices_by_replica[replica_id]]
|
from __future__ import unicode_literals
import logging
import sys
from django import forms
from django.contrib.admin.widgets import FilteredSelectMultiple
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.forms.widgets import Select
from djblets.db.query import get_object_or_none
from django.utils import six
from django.utils.html import format_html
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
from djblets.util.filesystem import is_exe_in_path
from reviewboard.admin.form_widgets import RelatedUserWidget
from reviewboard.admin.import_utils import has_module
from reviewboard.admin.validation import validate_bug_tracker
from reviewboard.hostingsvcs.errors import (AuthorizationError,
HostingServiceError,
SSHKeyAssociationError,
TwoFactorAuthCodeRequiredError)
from reviewboard.hostingsvcs.fake import FAKE_HOSTING_SERVICES
from reviewboard.hostingsvcs.forms import HostingServiceAuthForm
from reviewboard.hostingsvcs.models import HostingServiceAccount
from reviewboard.hostingsvcs.service import (get_hosting_services,
get_hosting_service)
from reviewboard.scmtools.errors import (AuthenticationError,
UnverifiedCertificateError)
from reviewboard.scmtools.fake import FAKE_SCMTOOLS
from reviewboard.scmtools.models import Repository, Tool
from reviewboard.site.models import LocalSite
from reviewboard.site.urlresolvers import local_site_reverse
from reviewboard.site.validation import validate_review_groups, validate_users
from reviewboard.ssh.client import SSHClient
from reviewboard.ssh.errors import (BadHostKeyError,
UnknownHostKeyError)
class HostingAccountWidget(Select):
"""A widget for selecting and modifying an assigned hosting account.
This presents a list of available hosting service accounts as a drop-down,
and provides a link for editing the credentials of the selected account.
"""
def render(self, *args, **kwargs):
"""Render the widget.
Args:
*args (tuple):
Arguments for the render.
**kwargs (dict):
Keyword arguments for the render.
Returns:
django.utils.safestring.SafeText:
The HTML for the widget.
"""
html = super(HostingAccountWidget, self).render(*args, **kwargs)
return mark_safe(html + (
'<a href="#" id="repo-edit-hosting-credentials">'
'<span class="rb-icon rb-icon-edit"></span> '
'<span id="repo-edit-hosting-credentials-label">%s</span></a>'
% _('Edit credentials')
))
class RepositoryForm(forms.ModelForm):
"""A form for creating and updating repositories.
This form provides an interface for creating and updating repositories,
handling the association with hosting services, linking accounts,
dealing with SSH keys and SSL certificates, and more.
"""
REPOSITORY_HOSTING_FIELDSET = _('Repository Hosting')
REPOSITORY_INFO_FIELDSET = _('Repository Information')
BUG_TRACKER_FIELDSET = _('Bug Tracker')
SSH_KEY_FIELDSET = _('Review Board Server SSH Key')
NO_HOSTING_SERVICE_ID = 'custom'
NO_HOSTING_SERVICE_NAME = _('(None - Custom Repository)')
NO_BUG_TRACKER_ID = 'none'
NO_BUG_TRACKER_NAME = _('(None)')
CUSTOM_BUG_TRACKER_ID = 'custom'
CUSTOM_BUG_TRACKER_NAME = _('(Custom Bug Tracker)')
IGNORED_SERVICE_IDS = ('none', 'custom')
DEFAULT_PLAN_ID = 'default'
DEFAULT_PLAN_NAME = _('Default')
# Host trust state
reedit_repository = forms.BooleanField(
label=_("Re-edit repository"),
required=False)
trust_host = forms.BooleanField(
label=_("I trust this host"),
required=False)
# Repository Hosting fields
hosting_type = forms.ChoiceField(
label=_("Hosting service"),
required=True,
initial=NO_HOSTING_SERVICE_ID)
hosting_account = forms.ModelChoiceField(
label=_('Account'),
required=True,
empty_label=_('<Link a new account>'),
help_text=_("Link this repository to an account on the hosting "
"service. This username may be used as part of the "
"repository URL, depending on the hosting service and "
"plan."),
queryset=HostingServiceAccount.objects.none(),
widget=HostingAccountWidget())
force_authorize = forms.BooleanField(
label=_('Force reauthorization'),
required=False,
widget=forms.HiddenInput())
# Repository Information fields
tool = forms.ChoiceField(
label=_("Repository type"),
required=True)
repository_plan = forms.ChoiceField(
label=_('Repository plan'),
required=True,
help_text=_('The plan for your repository on this hosting service. '
'This must match what is set for your repository.'))
password = forms.CharField(
label=_('Password'),
required=False,
widget=forms.PasswordInput(
render_value=True,
attrs={
'size': '30',
'autocomplete': 'off',
}))
# Auto SSH key association field
associate_ssh_key = forms.BooleanField(
label=_('Associate my SSH key with the hosting service'),
required=False,
help_text=_('Add the Review Board public SSH key to the list of '
'authorized SSH keys on the hosting service.'))
NO_KEY_HELP_FMT = (_('This repository type supports SSH key association, '
'but the Review Board server does not have an SSH '
'key. <a href="%s">Add an SSH key.</a>'))
# Bug Tracker fields
bug_tracker_use_hosting = forms.BooleanField(
label=_("Use hosting service's bug tracker"),
initial=False,
required=False)
bug_tracker_type = forms.ChoiceField(
label=_("Type"),
required=True,
initial=NO_BUG_TRACKER_ID)
bug_tracker_hosting_url = forms.CharField(
label=_('URL'),
required=True,
widget=forms.TextInput(attrs={'size': 30}))
bug_tracker_plan = forms.ChoiceField(
label=_('Bug tracker plan'),
required=True)
bug_tracker_hosting_account_username = forms.CharField(
label=_('Account username'),
required=True,
widget=forms.TextInput(attrs={'size': 30, 'autocomplete': 'off'}))
bug_tracker = forms.CharField(
label=_("Bug tracker URL"),
max_length=256,
required=False,
widget=forms.TextInput(attrs={'size': '60'}),
help_text=(
_("The optional path to the bug tracker for this repository. The "
"path should resemble: http://www.example.com/issues?id=%%s, "
"where %%s will be the bug number.")
% ()), # We do this wacky formatting trick because otherwise
# xgettext gets upset that it sees a format string with
# positional arguments and will abort when trying to
# extract the message catalog.
validators=[validate_bug_tracker])
# Perforce-specific fields
use_ticket_auth = forms.BooleanField(
label=_("Use ticket-based authentication"),
initial=False,
required=False)
# Access control fields
users = forms.ModelMultipleChoiceField(
queryset=User.objects.filter(is_active=True),
label=_('Users with access'),
required=False,
widget=RelatedUserWidget())
def __init__(self, *args, **kwargs):
self.local_site_name = kwargs.pop('local_site_name', None)
super(RepositoryForm, self).__init__(*args, **kwargs)
self.hostkeyerror = None
self.certerror = None
self.userkeyerror = None
self.bug_tracker_host_error = None
self.hosting_account_linked = False
self.local_site = None
self.repository_forms = {}
self.bug_tracker_forms = {}
self.hosting_auth_forms = {}
self.hosting_service_info = {}
self.tool_info = {
'none': {
'fields': ['raw_file_url', 'username', 'password',
'use_ticket_auth'],
},
}
self.validate_repository = True
self.cert = None
# Determine the local_site that will be associated with any
# repository coming from this form.
#
# We're careful to disregard any local_sites that are specified
# from the form data. The caller needs to pass in a local_site_name
# to ensure that it will be used.
if self.local_site_name:
self.local_site = LocalSite.objects.get(name=self.local_site_name)
elif self.instance and self.instance.local_site:
self.local_site = self.instance.local_site
self.local_site_name = self.local_site.name
elif self.fields['local_site'].initial:
self.local_site = self.fields['local_site'].initial
self.local_site_name = self.local_site.name
self.fields['users'].widget.local_site_name = self.local_site_name
# Grab the entire list of HostingServiceAccounts that can be
# used by this form. When the form is actually being used by the
# user, the listed accounts will consist only of the ones available
# for the selected hosting service.
hosting_accounts = HostingServiceAccount.objects.accessible(
local_site=self.local_site)
self.fields['hosting_account'].queryset = hosting_accounts
hosting_accounts = list(hosting_accounts)
# Standard forms don't support 'instance', so don't pass it through
# to any created hosting service forms.
if 'instance' in kwargs:
kwargs.pop('instance')
# Load the list of repository forms and hosting services.
hosting_service_choices = []
bug_tracker_choices = []
hosting_services = set()
for hosting_service in get_hosting_services():
class_name = '%s.%s' % (hosting_service.__module__,
hosting_service.__name__)
hosting_services.add(class_name)
auth_form_cls = hosting_service.auth_form or HostingServiceAuthForm
if hosting_service.supports_repositories:
hosting_service_choices.append(
(hosting_service.hosting_service_id, hosting_service.name)
)
if hosting_service.supports_bug_trackers:
bug_tracker_choices.append(
(hosting_service.hosting_service_id, hosting_service.name)
)
self.bug_tracker_forms[hosting_service.hosting_service_id] = {}
self.repository_forms[hosting_service.hosting_service_id] = {}
self.hosting_service_info[hosting_service.hosting_service_id] = \
self._get_hosting_service_info(hosting_service,
hosting_accounts)
try:
if hosting_service.plans:
for type_id, info in hosting_service.plans:
form = info.get('form', None)
if form:
self._load_hosting_service(
hosting_service.hosting_service_id,
hosting_service,
type_id,
info['name'],
form,
*args, **kwargs)
elif hosting_service.form:
self._load_hosting_service(
hosting_service.hosting_service_id,
hosting_service,
self.DEFAULT_PLAN_ID,
self.DEFAULT_PLAN_NAME,
hosting_service.form,
*args, **kwargs)
# Load the hosting service's custom authentication form.
#
# We start off constructing the form without any data. We
# don't want to prematurely trigger any validation for forms
# that we won't end up using (even if it matches the current
# hosting time, as we still don't know if we need to link or
# re-authorize an account). We'll replace this with a populated
# form further below.
#
# Note that we do still need the form instantiated here, for
# template rendering.
self.hosting_auth_forms[hosting_service.hosting_service_id] = \
auth_form_cls(hosting_service_cls=hosting_service,
local_site=self.local_site,
prefix=hosting_service.hosting_service_id)
except Exception as e:
logging.exception('Error loading hosting service %s: %s',
hosting_service.hosting_service_id, e)
for class_name, cls in six.iteritems(FAKE_HOSTING_SERVICES):
if class_name not in hosting_services:
service_info = self._get_hosting_service_info(cls, [])
service_info['fake'] = True
self.hosting_service_info[cls.hosting_service_id] = \
service_info
hosting_service_choices.append((cls.hosting_service_id,
cls.name))
# Build the list of hosting service choices, sorted, with
# "None" being first.
hosting_service_choices.sort(key=lambda x: x[1])
hosting_service_choices.insert(0, (self.NO_HOSTING_SERVICE_ID,
self.NO_HOSTING_SERVICE_NAME))
self.fields['hosting_type'].choices = hosting_service_choices
# Now do the same for bug trackers, but have separate None and Custom
# entries.
bug_tracker_choices.sort(key=lambda x: x[1])
bug_tracker_choices.insert(0, (self.NO_BUG_TRACKER_ID,
self.NO_BUG_TRACKER_NAME))
bug_tracker_choices.insert(1, (self.CUSTOM_BUG_TRACKER_ID,
self.CUSTOM_BUG_TRACKER_NAME))
self.fields['bug_tracker_type'].choices = bug_tracker_choices
# Load the list of SCM tools.
available_scmtools = set()
scmtool_choices = []
# Tools are referred to by their numeric ID. We keep track of the last
# used ID and will use it to generate further IDs if fake SCMTools are
# to be displayed.
last_tool_pk = 0
for tool in Tool.objects.order_by('pk'):
scmtool_choices.append((tool.pk, tool.name))
available_scmtools.add(tool.class_name)
tool_fields = ['username', 'password']
if tool.supports_raw_file_urls:
tool_fields.append('raw_file_url')
if tool.supports_ticket_auth:
tool_fields.append('use_ticket_auth')
self.tool_info[tool.id] = {
'fields': tool_fields,
'help_text': tool.field_help_text,
}
last_tool_pk = tool.pk
for pk, (class_name, name) in enumerate(six.iteritems(FAKE_SCMTOOLS),
start=last_tool_pk + 1):
if class_name not in available_scmtools:
scmtool_choices.append((pk, name))
self.tool_info[six.text_type(pk)] = {
'fields': [],
'help_text': {},
'fake': True,
}
self.fields['tool'].choices = scmtool_choices
# Get the current SSH public key that would be used for repositories,
# if one has been created.
self.ssh_client = SSHClient(namespace=self.local_site_name)
ssh_key = self.ssh_client.get_user_key()
if ssh_key:
self.public_key = self.ssh_client.get_public_key(ssh_key)
self.public_key_str = '%s %s' % (
ssh_key.get_name(),
''.join(six.text_type(self.public_key).splitlines())
)
else:
self.public_key = None
self.public_key_str = ''
# If no SSH key has been created, disable the key association field.
if not self.public_key:
self.fields['associate_ssh_key'].help_text = \
self.NO_KEY_HELP_FMT % local_site_reverse(
'settings-ssh',
local_site_name=self.local_site_name)
self.fields['associate_ssh_key'].widget.attrs['disabled'] = \
'disabled'
if self.instance:
self._populate_repository_info_fields()
self._populate_hosting_service_fields()
self._populate_bug_tracker_fields()
def _get_hosting_service_info(self, hosting_service, hosting_accounts):
"""Return the information for a hosting service.
Arguments:
hosting_service (type):
The hosting service class, which should be a subclass of
:py:class:`~reviewboard.hostingsvcs.service.HostingService`.
hosting_accounts (list):
A list of the registered
`py:class:`~reviewboard.hostingsvcs.models.HostingServiceAccount`s
Returns:
dict:
Information about the hosting service.
"""
return {
'scmtools': hosting_service.supported_scmtools,
'plans': [],
'planInfo': {},
'self_hosted': hosting_service.self_hosted,
'needs_authorization': hosting_service.needs_authorization,
'supports_bug_trackers': hosting_service.supports_bug_trackers,
'supports_ssh_key_association':
hosting_service.supports_ssh_key_association,
'supports_two_factor_auth':
hosting_service.supports_two_factor_auth,
'needs_two_factor_auth_code': False,
'accounts': [
{
'pk': account.pk,
'hosting_url': account.hosting_url,
'username': account.username,
'is_authorized': account.is_authorized,
}
for account in hosting_accounts
if account.service_name == hosting_service.hosting_service_id
],
}
def _load_hosting_service(self, hosting_service_id, hosting_service,
plan_type_id, plan_type_label, form_class,
*args, **kwargs):
"""Loads a hosting service form.
The form will be instantiated and added to the list of forms to be
rendered, cleaned, loaded, and saved.
"""
plan_info = {}
if hosting_service.supports_repositories:
form = form_class(self.data or None)
self.repository_forms[hosting_service_id][plan_type_id] = form
if self.instance:
form.load(self.instance)
if hosting_service.supports_bug_trackers:
form = form_class(self.data or None, prefix='bug_tracker')
self.bug_tracker_forms[hosting_service_id][plan_type_id] = form
plan_info['bug_tracker_requires_username'] = \
hosting_service.get_bug_tracker_requires_username(plan_type_id)
if self.instance:
form.load(self.instance)
hosting_info = self.hosting_service_info[hosting_service_id]
hosting_info['planInfo'][plan_type_id] = plan_info
hosting_info['plans'].append({
'type': plan_type_id,
'label': six.text_type(plan_type_label),
})
def _populate_repository_info_fields(self):
"""Populates auxiliary repository info fields in the form.
Most of the fields under "Repository Info" are core model fields. This
method populates things which are stored into extra_data.
"""
self.fields['use_ticket_auth'].initial = \
self.instance.extra_data.get('use_ticket_auth', False)
self.fields['password'].initial = self.instance.password
def _populate_hosting_service_fields(self):
"""Populates all the main hosting service fields in the form.
This populates the hosting service type and the repository plan
on the form. These are only set if operating on an existing
repository.
"""
hosting_account = self.instance.hosting_account
if hosting_account:
service = hosting_account.service
self.fields['hosting_type'].initial = \
hosting_account.service_name
if service.plans:
self.fields['repository_plan'].choices = [
(plan_id, info['name'])
for plan_id, info in service.plans
]
repository_plan = \
self.instance.extra_data.get('repository_plan', None)
if repository_plan:
self.fields['repository_plan'].initial = repository_plan
def _populate_bug_tracker_fields(self):
"""Populates all the main bug tracker fields in the form.
This populates the bug tracker type, plan, and other fields
related to the bug tracker on the form.
"""
data = self.instance.extra_data
bug_tracker_type = data.get('bug_tracker_type', None)
if (data.get('bug_tracker_use_hosting', False) and
self.instance.hosting_account):
# The user has chosen to use the hosting service's bug tracker. We
# only care about the checkbox. Don't bother populating the form.
self.fields['bug_tracker_use_hosting'].initial = True
elif bug_tracker_type == self.NO_BUG_TRACKER_ID:
# Do nothing.
return
elif (bug_tracker_type is not None and
bug_tracker_type != self.CUSTOM_BUG_TRACKER_ID):
# A bug tracker service or custom bug tracker was chosen.
service = get_hosting_service(bug_tracker_type)
if not service:
return
self.fields['bug_tracker_type'].initial = bug_tracker_type
self.fields['bug_tracker_hosting_url'].initial = \
data.get('bug_tracker_hosting_url', None)
self.fields['bug_tracker_hosting_account_username'].initial = \
data.get('bug_tracker-hosting_account_username', None)
if service.plans:
self.fields['bug_tracker_plan'].choices = [
(plan_id, info['name'])
for plan_id, info in service.plans
]
self.fields['bug_tracker_plan'].initial = \
data.get('bug_tracker_plan', None)
elif self.instance.bug_tracker:
# We have a custom bug tracker. There's no point in trying to
# reverse-match it, because we can potentially be wrong when a
# hosting service has multiple plans with similar bug tracker
# URLs, so just show it raw. Admins can migrate it if they want.
self.fields['bug_tracker_type'].initial = \
self.CUSTOM_BUG_TRACKER_ID
def _clean_hosting_info(self):
"""Clean the hosting service information.
If using a hosting service, this will validate that the data
provided is valid on that hosting service. Then it will create an
account and link it, if necessary, with the hosting service.
"""
hosting_type = self.cleaned_data['hosting_type']
if hosting_type == self.NO_HOSTING_SERVICE_ID:
self.data['hosting_account'] = None
self.cleaned_data['hosting_account'] = None
return
# This should have been caught during validation, so we can assume
# it's fine.
hosting_service_cls = get_hosting_service(hosting_type)
assert hosting_service_cls
# Validate that the provided tool is valid for the hosting service.
tool_name = self.cleaned_data['tool'].name
if tool_name not in hosting_service_cls.supported_scmtools:
self.errors['tool'] = self.error_class([
_('This tool is not supported on the given hosting service')
])
return
# Get some more information about the hosting ser
plan = self.cleaned_data['repository_plan'] or self.DEFAULT_PLAN_ID
# Verify that any hosting account passed in is allowed to work with
# this type of account.
hosting_account = self.cleaned_data['hosting_account']
if (hosting_account and
(hosting_account.service_name != hosting_type or
hosting_account.local_site != self.local_site)):
self.errors['hosting_account'] = self.error_class([
_('This account is not compatible with this hosting '
'service configuration.')
])
return
# If we don't yet have an account, or we have one but it needs to
# be re-authorized, then we need to go through the entire account
# updating and authorization process.
force_authorize = self.cleaned_data['force_authorize']
if (self.data and
(not hosting_account or
not hosting_account.is_authorized or force_authorize)):
# Rebuild the authentication form, but with data provided to
# this form, so that we can link or re-authorize an account.
auth_form = self.hosting_auth_forms[hosting_type]
auth_form = auth_form.__class__(
data=self.data,
prefix=auth_form.prefix,
hosting_service_cls=auth_form.hosting_service_cls,
hosting_account=hosting_account,
local_site=auth_form.local_site)
self.hosting_auth_forms[hosting_type] = auth_form
if not auth_form.is_valid():
# Copy any errors to the main form, so it'll fail validation
# and inform the user.
self.errors.update(auth_form.errors)
return
repository_extra_data = self._build_repository_extra_data(
hosting_service_cls, hosting_type, plan)
try:
hosting_account = auth_form.save(
extra_authorize_kwargs=repository_extra_data,
force_authorize=force_authorize)
except ValueError as e:
# There was an error with a value provided to the form from
# The user. Bubble this up.
self.errors['hosting_account'] = \
self.error_class([six.text_type(e)])
return
except TwoFactorAuthCodeRequiredError as e:
self.errors['hosting_account'] = \
self.error_class([six.text_type(e)])
hosting_info = self.hosting_service_info[hosting_type]
hosting_info['needs_two_factor_auth_code'] = True
return
except AuthorizationError as e:
self.errors['hosting_account'] = self.error_class([
_('Unable to link the account: %s') % e,
])
return
except Exception as e:
logging.exception('Unexpected error when linking hosting '
'service account on %s: %s',
hosting_type, e)
self.errors['hosting_account'] = self.error_class([
_('Unknown error when linking the account: %s. The '
'details of the failure are in the Review Board log '
'file.')
% e,
])
return
# Flag that we've linked the account. If there are any
# validation errors, and this flag is set, we tell the user
# that we successfully linked and they don't have to do it
# again.
self.hosting_account_linked = True
# Set this back in the form, so the rest of the form has access.
self.data['hosting_account'] = hosting_account
self.cleaned_data['hosting_account'] = hosting_account
# Set the main repository fields (Path, Mirror Path, etc.) based on
# the field definitions in the hosting service.
#
# This will take into account the hosting service's form data for
# the given repository plan, the main form data, and the hosting
# account information.
#
# It's expected that the required fields will have validated by now.
repository_form = self.repository_forms[hosting_type][plan]
field_vars = repository_form.cleaned_data.copy()
field_vars.update(self.cleaned_data)
field_vars.update(hosting_account.data)
try:
self.cleaned_data.update(hosting_service_cls.get_repository_fields(
username=hosting_account.username,
hosting_url=hosting_account.hosting_url,
plan=plan,
tool_name=tool_name,
field_vars=field_vars))
except KeyError as e:
raise ValidationError([six.text_type(e)])
def _clean_bug_tracker_info(self):
"""Clean the bug tracker information.
This will figure out the defaults for all the bug tracker fields,
based on the stored bug tracker settings.
"""
use_hosting = self.cleaned_data['bug_tracker_use_hosting']
plan = self.cleaned_data['bug_tracker_plan'] or self.DEFAULT_PLAN_ID
bug_tracker_type = self.cleaned_data['bug_tracker_type']
bug_tracker_url = ''
if use_hosting:
# We're using the main repository form fields instead of the
# custom bug tracker fields.
hosting_type = self.cleaned_data['hosting_type']
if hosting_type == self.NO_HOSTING_SERVICE_ID:
self.errors['bug_tracker_use_hosting'] = self.error_class([
_('A hosting service must be chosen in order to use this')
])
return
plan = self.cleaned_data['repository_plan'] or self.DEFAULT_PLAN_ID
hosting_service_cls = get_hosting_service(hosting_type)
# We already validated server-side that the hosting service
# exists.
assert hosting_service_cls
if (hosting_service_cls.supports_bug_trackers and
self.cleaned_data.get('hosting_account')):
# We have a valid hosting account linked up, so we can
# process this and copy over the account information.
form = self.repository_forms[hosting_type][plan]
hosting_account = self.cleaned_data['hosting_account']
new_data = self.cleaned_data.copy()
new_data.update(form.cleaned_data)
new_data.update(hosting_account.data)
new_data['hosting_account_username'] = hosting_account.username
new_data['hosting_url'] = hosting_account.hosting_url
bug_tracker_url = hosting_service_cls.get_bug_tracker_field(
plan, new_data)
elif bug_tracker_type == self.CUSTOM_BUG_TRACKER_ID:
# bug_tracker_url should already be in cleaned_data.
return
elif bug_tracker_type != self.NO_BUG_TRACKER_ID:
# We're using a bug tracker of a certain type. We need to
# get the right data, strip the prefix on the forms, and
# build the bug tracker URL from that.
hosting_service_cls = get_hosting_service(bug_tracker_type)
if not hosting_service_cls:
self.errors['bug_tracker_type'] = self.error_class([
_('This bug tracker type is not supported')
])
return
form = self.bug_tracker_forms[bug_tracker_type][plan]
new_data = {
'hosting_account_username':
self.cleaned_data['bug_tracker_hosting_account_username'],
'hosting_url':
self.cleaned_data['bug_tracker_hosting_url'],
}
if form.is_valid():
# Strip the prefix from each bit of cleaned data in the form.
for key, value in six.iteritems(form.cleaned_data):
key = key.replace(form.prefix, '')
new_data[key] = value
bug_tracker_url = hosting_service_cls.get_bug_tracker_field(
plan, new_data)
self.cleaned_data['bug_tracker'] = bug_tracker_url
self.data['bug_tracker'] = bug_tracker_url
def full_clean(self, *args, **kwargs):
extra_cleaned_data = {}
extra_errors = {}
required_values = {}
# Save the required values for all native fields, so that we can
# restore them we've changed the values and processed forms.
for field in six.itervalues(self.fields):
required_values[field] = field.required
if self.data:
hosting_type = self._get_field_data('hosting_type')
hosting_service = get_hosting_service(hosting_type)
repository_plan = (self._get_field_data('repository_plan') or
self.DEFAULT_PLAN_ID)
bug_tracker_use_hosting = \
self._get_field_data('bug_tracker_use_hosting')
# If using the hosting service's bug tracker, we want to ignore
# the bug tracker form (which will be hidden) and just use the
# hosting service's form.
if bug_tracker_use_hosting:
bug_tracker_type = hosting_type
bug_tracker_service = hosting_service
bug_tracker_plan = repository_plan
else:
bug_tracker_type = self._get_field_data('bug_tracker_type')
bug_tracker_service = get_hosting_service(bug_tracker_type)
bug_tracker_plan = (self._get_field_data('bug_tracker_plan') or
self.DEFAULT_PLAN_ID)
self.fields['bug_tracker_type'].required = \
not bug_tracker_use_hosting
self.fields['path'].required = \
(hosting_type == self.NO_HOSTING_SERVICE_ID)
# The repository plan will only be listed if the hosting service
# lists some plans. Otherwise, there's nothing to require.
for service, field in ((hosting_service, 'repository_plan'),
(bug_tracker_service, 'bug_tracker_plan')):
self.fields[field].required = service and service.plans
if service:
self.fields[field].choices = [
(id, info['name'])
for id, info in service.plans or []
]
self.fields['bug_tracker_plan'].required = (
self.fields['bug_tracker_plan'].required and
not bug_tracker_use_hosting)
# We want to show this as required (in the label), but not
# actually require, since we use a blank entry as
# "Link new account."
self.fields['hosting_account'].required = False
# Only require the bug tracker username if the bug tracker field
# requires the username.
self.fields['bug_tracker_hosting_account_username'].required = \
(not bug_tracker_use_hosting and
bug_tracker_service and
bug_tracker_service.get_bug_tracker_requires_username(
bug_tracker_plan))
# Only require a URL if the bug tracker is self-hosted and
# we're not using the hosting service's bug tracker.
self.fields['bug_tracker_hosting_url'].required = (
not bug_tracker_use_hosting and
bug_tracker_service and
bug_tracker_service.self_hosted)
# Validate the custom forms and store any data or errors for later.
custom_form_info = [
(hosting_type, repository_plan, self.repository_forms),
]
if not bug_tracker_use_hosting:
custom_form_info.append((bug_tracker_type, bug_tracker_plan,
self.bug_tracker_forms))
for service_type, plan, form_list in custom_form_info:
if service_type not in self.IGNORED_SERVICE_IDS:
form = form_list[service_type][plan]
form.is_bound = True
if form.is_valid():
extra_cleaned_data.update(form.cleaned_data)
else:
extra_errors.update(form.errors)
else:
# Validate every hosting service form and bug tracker form and
# store any data or errors for later.
for form_list in (self.repository_forms, self.bug_tracker_forms):
for plans in six.itervalues(form_list):
for form in six.itervalues(plans):
if form.is_valid():
extra_cleaned_data.update(form.cleaned_data)
else:
extra_errors.update(form.errors)
self.subforms_valid = not extra_errors
super(RepositoryForm, self).full_clean(*args, **kwargs)
if self.is_valid():
self.cleaned_data.update(extra_cleaned_data)
else:
self.errors.update(extra_errors)
# Undo the required settings above. Now that we're done with them
# for validation, we want to fix the display so that users don't
# see the required states change.
for field, required in six.iteritems(required_values):
field.required = required
def clean(self):
"""Performs validation on the form.
This will check the form fields for errors, calling out to the
various clean_* methods.
It will check the repository path to see if it represents
a valid repository and if an SSH key or HTTPS certificate needs
to be verified.
This will also build repository and bug tracker URLs based on other
fields set in the form.
"""
if not self.errors and self.subforms_valid:
try:
self.local_site = self.cleaned_data['local_site']
if self.local_site:
self.local_site_name = self.local_site.name
except LocalSite.DoesNotExist as e:
raise ValidationError([e])
self._clean_hosting_info()
self._clean_bug_tracker_info()
validate_review_groups(self)
validate_users(self)
# The clean/validation functions could create new errors, so
# skip validating the repository path if everything else isn't
# clean. Also skip in the case where the user is hiding the
# repository.
if (not self.errors and
not self.cleaned_data['reedit_repository'] and
self.cleaned_data.get('visible', True) and
self.validate_repository):
self._verify_repository_path()
self._clean_ssh_key_association()
return super(RepositoryForm, self).clean()
def _clean_ssh_key_association(self):
hosting_type = self.cleaned_data['hosting_type']
hosting_account = self.cleaned_data['hosting_account']
# Don't proceed if there are already errors, or if not using hosting
# (hosting type and account should be clean by this point)
if (self.errors or hosting_type == self.NO_HOSTING_SERVICE_ID or
not hosting_account):
return
hosting_service_cls = get_hosting_service(hosting_type)
hosting_service = hosting_service_cls(hosting_account)
# Check the requirements for SSH key association. If the requirements
# are not met, do not proceed.
if (not hosting_service_cls.supports_ssh_key_association or
not self.cleaned_data['associate_ssh_key'] or
not self.public_key):
return
if not self.instance.extra_data:
# The instance is either a new repository or a repository that
# was previously configured without a hosting service. In either
# case, ensure the repository is fully initialized.
repository = self.save(commit=False)
else:
repository = self.instance
key = self.ssh_client.get_user_key()
try:
# Try to upload the key if it hasn't already been associated.
if not hosting_service.is_ssh_key_associated(repository, key):
hosting_service.associate_ssh_key(repository, key)
except SSHKeyAssociationError as e:
logging.warning('SSHKeyAssociationError for repository "%s" (%s)'
% (repository, e.message))
raise ValidationError([
_('Unable to associate SSH key with your hosting service. '
'This is most often the result of a problem communicating '
'with the hosting service. Please try again later or '
'manually upload the SSH key to your hosting service.')
])
def clean_path(self):
return self.cleaned_data['path'].strip()
def clean_mirror_path(self):
return self.cleaned_data['mirror_path'].strip()
def clean_password(self):
return self.cleaned_data['password'].strip()
def clean_bug_tracker_base_url(self):
return self.cleaned_data['bug_tracker_base_url'].rstrip('/')
def clean_bug_tracker_hosting_url(self):
"""Validates that the bug tracker hosting url is valid.
Note that bug tracker hosting url is whatever the bug hosting form
(e.g BugzillaForm) specifies.
cleaned_data['bug_tracker_hosting_url'] refers to a specific field
in bug tracker description that only GitLab uses, and has quite a
misleading name. It will not contain the base URL of the bug tracker
in other cases.
"""
bug_tracker_use_hosting = self.cleaned_data['bug_tracker_use_hosting']
if not bug_tracker_use_hosting:
bug_tracker_type = self.cleaned_data['bug_tracker_type']
# If the validator exception was thrown, the form will
# have at least one error present in the errors object. If errors
# were detected, set an appropriate variable that is_valid()
# method will check.
if bug_tracker_type in self.bug_tracker_forms:
field = self.bug_tracker_forms[bug_tracker_type].get('default')
if field:
self.bug_tracker_host_error = (
hasattr(field, 'errors') and
len(field.errors) > 0)
return self.cleaned_data['bug_tracker_hosting_url'].strip()
def clean_hosting_type(self):
"""Validates that the hosting type represents a valid hosting service.
This won't do anything if no hosting service is used.
"""
hosting_type = self.cleaned_data['hosting_type']
if hosting_type != self.NO_HOSTING_SERVICE_ID:
hosting_service = get_hosting_service(hosting_type)
if not hosting_service:
raise ValidationError([_('Not a valid hosting service')])
return hosting_type
def clean_bug_tracker_type(self):
"""Validates that the bug tracker type represents a valid hosting
service.
This won't do anything if no hosting service is used.
"""
bug_tracker_type = (self.cleaned_data['bug_tracker_type'] or
self.NO_BUG_TRACKER_ID)
if bug_tracker_type not in self.IGNORED_SERVICE_IDS:
hosting_service = get_hosting_service(bug_tracker_type)
if (not hosting_service or
not hosting_service.supports_bug_trackers):
raise ValidationError([_('Not a valid hosting service')])
return bug_tracker_type
def clean_tool(self):
"""Checks the SCMTool used for this repository for dependencies.
If one or more dependencies aren't found, they will be presented
as validation errors.
"""
errors = []
tool = get_object_or_none(Tool, pk=self.cleaned_data['tool'])
if not tool:
raise ValidationError(['Invalid SCMTool.'])
scmtool_class = tool.get_scmtool_class()
for dep in scmtool_class.dependencies.get('modules', []):
if not has_module(dep):
errors.append(_('The Python module "%s" is not installed. '
'You may need to restart the server '
'after installing it.') % dep)
for dep in scmtool_class.dependencies.get('executables', []):
if not is_exe_in_path(dep):
if sys.platform == 'win32':
exe_name = '%s.exe' % dep
else:
exe_name = dep
errors.append(_('The executable "%s" is not in the path.')
% exe_name)
if errors:
raise ValidationError(errors)
return tool
def is_valid(self):
"""Returns whether or not the form is valid.
This will return True if the form fields are all valid, if there's
no certificate error, host key error, and if the form isn't
being re-displayed after canceling an SSH key or HTTPS certificate
verification.
This also takes into account the validity of the hosting service form
for the selected hosting service and repository plan.
"""
if not super(RepositoryForm, self).is_valid():
return False
hosting_type = self.cleaned_data['hosting_type']
plan = self.cleaned_data['repository_plan'] or self.DEFAULT_PLAN_ID
return (not self.hostkeyerror and
not self.certerror and
not self.userkeyerror and
not self.bug_tracker_host_error and
not self.cleaned_data['reedit_repository'] and
self.subforms_valid and
(hosting_type not in self.repository_forms or
self.repository_forms[hosting_type][plan].is_valid()))
def save(self, commit=True, *args, **kwargs):
"""Saves the repository.
This will thunk out to the hosting service form to save any extra
repository data used for the hosting service, and saves the
repository plan, if any.
"""
repository = super(RepositoryForm, self).save(commit=False,
*args, **kwargs)
repository.extra_data = {}
bug_tracker_use_hosting = self.cleaned_data['bug_tracker_use_hosting']
hosting_type = self.cleaned_data['hosting_type']
service = get_hosting_service(hosting_type)
if service:
repository.username = ''
repository.password = ''
repository.extra_data.update({
'repository_plan': self.cleaned_data['repository_plan'],
'bug_tracker_use_hosting': bug_tracker_use_hosting,
})
if service.self_hosted:
repository.extra_data['hosting_url'] = \
repository.hosting_account.hosting_url
else:
repository.username = self.cleaned_data['username'] or ''
repository.password = self.cleaned_data['password'] or ''
if self.cert:
repository.extra_data['cert'] = self.cert
if repository.tool.supports_ticket_auth:
try:
repository.extra_data['use_ticket_auth'] = \
self.cleaned_data['use_ticket_auth']
except KeyError:
pass
if hosting_type in self.repository_forms:
plan = (self.cleaned_data['repository_plan'] or
self.DEFAULT_PLAN_ID)
self.repository_forms[hosting_type][plan].save(repository)
if not bug_tracker_use_hosting:
bug_tracker_type = self.cleaned_data['bug_tracker_type']
if bug_tracker_type in self.bug_tracker_forms:
plan = (self.cleaned_data['bug_tracker_plan'] or
self.DEFAULT_PLAN_ID)
self.bug_tracker_forms[bug_tracker_type][plan].save(repository)
repository.extra_data.update({
'bug_tracker_type': bug_tracker_type,
'bug_tracker_plan': plan,
})
bug_tracker_service = get_hosting_service(bug_tracker_type)
assert bug_tracker_service
if bug_tracker_service.self_hosted:
repository.extra_data['bug_tracker_hosting_url'] = \
self.cleaned_data['bug_tracker_hosting_url']
if bug_tracker_service.get_bug_tracker_requires_username(plan):
repository.extra_data.update({
'bug_tracker-hosting_account_username':
self.cleaned_data[
'bug_tracker_hosting_account_username'],
})
if commit:
repository.save()
return repository
def _verify_repository_path(self):
"""
Verifies the repository path to check if it's valid.
This will check if the repository exists and if an SSH key or
HTTPS certificate needs to be verified.
"""
tool = self.cleaned_data.get('tool', None)
if not tool:
# This failed validation earlier, so bail.
return
scmtool_class = tool.get_scmtool_class()
path = self.cleaned_data.get('path', '')
username = self.cleaned_data['username']
password = self.cleaned_data['password']
if not path:
self._errors['path'] = self.error_class(
['Repository path cannot be empty'])
return
hosting_type = self.cleaned_data['hosting_type']
hosting_service_cls = get_hosting_service(hosting_type)
hosting_service = None
plan = None
if hosting_service_cls:
hosting_service = hosting_service_cls(
self.cleaned_data['hosting_account'])
if hosting_service:
plan = (self.cleaned_data['repository_plan'] or
self.DEFAULT_PLAN_ID)
repository_extra_data = self._build_repository_extra_data(
hosting_service, hosting_type, plan)
while 1:
# Keep doing this until we have an error we don't want
# to ignore, or it's successful.
try:
if hosting_service:
hosting_service.check_repository(
path=path,
username=username,
password=password,
scmtool_class=scmtool_class,
tool_name=tool.name,
local_site_name=self.local_site_name,
plan=plan,
**repository_extra_data)
else:
scmtool_class.check_repository(path, username, password,
self.local_site_name)
# Success.
break
except BadHostKeyError as e:
if self.cleaned_data['trust_host']:
try:
self.ssh_client.replace_host_key(e.hostname,
e.raw_expected_key,
e.raw_key)
except IOError as e:
raise ValidationError(e)
else:
self.hostkeyerror = e
break
except UnknownHostKeyError as e:
if self.cleaned_data['trust_host']:
try:
self.ssh_client.add_host_key(e.hostname, e.raw_key)
except IOError as e:
raise ValidationError(e)
else:
self.hostkeyerror = e
break
except UnverifiedCertificateError as e:
if self.cleaned_data['trust_host']:
try:
self.cert = scmtool_class.accept_certificate(
path,
username=username,
password=password,
local_site_name=self.local_site_name,
certificate=e.certificate)
except IOError as e:
raise ValidationError(e)
else:
self.certerror = e
break
except AuthenticationError as e:
if 'publickey' in e.allowed_types and e.user_key is None:
self.userkeyerror = e
break
raise ValidationError(e)
except Exception as e:
try:
text = six.text_type(e)
except UnicodeDecodeError:
text = six.text_type(e, 'ascii', 'replace')
if isinstance(e, HostingServiceError) and e.help_link:
text = format_html(_('{0} <a href="{1}">{2}</a>'),
text, e.help_link, e.help_link_text)
raise ValidationError(text)
def _build_repository_extra_data(self, hosting_service, hosting_type,
plan):
"""Builds extra repository data to pass to HostingService functions."""
repository_extra_data = {}
if hosting_service and hosting_type in self.repository_forms:
repository_extra_data = \
self.repository_forms[hosting_type][plan].cleaned_data
return repository_extra_data
def _get_field_data(self, field):
return self[field].data or self.fields[field].initial
class Meta:
model = Repository
widgets = {
'path': forms.TextInput(attrs={'size': '60'}),
'mirror_path': forms.TextInput(attrs={'size': '60'}),
'raw_file_url': forms.TextInput(attrs={'size': '60'}),
'bug_tracker': forms.TextInput(attrs={'size': '60'}),
'name': forms.TextInput(attrs={'size': '30',
'autocomplete': 'off'}),
'username': forms.TextInput(attrs={'size': '30',
'autocomplete': 'off'}),
'review_groups': FilteredSelectMultiple(
_('review groups with access'), False),
}
fields = '__all__'
|
'''
Created on Feb 7, 2014
@author: sesuskic
'''
__all__ = ["InputInterface"]
class InputInterface(object):
def __init__(self):
raise RuntimeError("Not allowed to crate instance of this class")
def get_categories(self):
return self.__dict__.keys()
def get_category(self, name):
return getattr(self, name)
def get_options(self, category):
return self.__dict__[category].get_options()
def get_option(self, category, option):
return self.get_options(category)[option]
|
"""
Soft Voting/Majority Rule classifier and Voting regressor.
This module contains:
- A Soft Voting/Majority Rule classifier for classification estimators.
- A Voting regressor for regression estimators.
"""
# Authors: Sebastian Raschka <se.raschka@gmail.com>,
# Gilles Louppe <g.louppe@gmail.com>,
# Ramil Nugmanov <stsouko@live.ru>
# Mohamed Ali Jamaoui <m.ali.jamaoui@gmail.com>
#
# License: BSD 3 clause
from abc import abstractmethod
import numpy as np
from joblib import Parallel
from ..base import ClassifierMixin
from ..base import RegressorMixin
from ..base import TransformerMixin
from ..base import clone
from ._base import _fit_single_estimator
from ._base import _BaseHeterogeneousEnsemble
from ..preprocessing import LabelEncoder
from ..utils import Bunch
from ..utils.metaestimators import available_if
from ..utils.validation import check_is_fitted
from ..utils.multiclass import check_classification_targets
from ..utils.validation import column_or_1d
from ..exceptions import NotFittedError
from ..utils._estimator_html_repr import _VisualBlock
from ..utils.fixes import delayed
class _BaseVoting(TransformerMixin, _BaseHeterogeneousEnsemble):
"""Base class for voting.
Warning: This class should not be used directly. Use derived classes
instead.
"""
def _log_message(self, name, idx, total):
if not self.verbose:
return None
return "(%d of %d) Processing %s" % (idx, total, name)
@property
def _weights_not_none(self):
"""Get the weights of not `None` estimators."""
if self.weights is None:
return None
return [w for est, w in zip(self.estimators, self.weights) if est[1] != "drop"]
def _predict(self, X):
"""Collect results from clf.predict calls."""
return np.asarray([est.predict(X) for est in self.estimators_]).T
@abstractmethod
def fit(self, X, y, sample_weight=None):
"""Get common fit operations."""
names, clfs = self._validate_estimators()
if self.weights is not None and len(self.weights) != len(self.estimators):
raise ValueError(
"Number of `estimators` and weights must be equal"
"; got %d weights, %d estimators"
% (len(self.weights), len(self.estimators))
)
self.estimators_ = Parallel(n_jobs=self.n_jobs)(
delayed(_fit_single_estimator)(
clone(clf),
X,
y,
sample_weight=sample_weight,
message_clsname="Voting",
message=self._log_message(names[idx], idx + 1, len(clfs)),
)
for idx, clf in enumerate(clfs)
if clf != "drop"
)
self.named_estimators_ = Bunch()
# Uses 'drop' as placeholder for dropped estimators
est_iter = iter(self.estimators_)
for name, est in self.estimators:
current_est = est if est == "drop" else next(est_iter)
self.named_estimators_[name] = current_est
if hasattr(current_est, "feature_names_in_"):
self.feature_names_in_ = current_est.feature_names_in_
return self
def fit_transform(self, X, y=None, **fit_params):
"""Return class labels or probabilities for each estimator.
Return predictions for X for each estimator.
Parameters
----------
X : {array-like, sparse matrix, dataframe} of shape \
(n_samples, n_features)
Input samples.
y : ndarray of shape (n_samples,), default=None
Target values (None for unsupervised transformations).
**fit_params : dict
Additional fit parameters.
Returns
-------
X_new : ndarray array of shape (n_samples, n_features_new)
Transformed array.
"""
return super().fit_transform(X, y, **fit_params)
@property
def n_features_in_(self):
"""Number of features seen during :term:`fit`."""
# For consistency with other estimators we raise a AttributeError so
# that hasattr() fails if the estimator isn't fitted.
try:
check_is_fitted(self)
except NotFittedError as nfe:
raise AttributeError(
"{} object has no n_features_in_ attribute.".format(
self.__class__.__name__
)
) from nfe
return self.estimators_[0].n_features_in_
def _sk_visual_block_(self):
names, estimators = zip(*self.estimators)
return _VisualBlock("parallel", estimators, names=names)
def _more_tags(self):
return {"preserves_dtype": []}
class VotingClassifier(ClassifierMixin, _BaseVoting):
"""Soft Voting/Majority Rule classifier for unfitted estimators.
Read more in the :ref:`User Guide <voting_classifier>`.
.. versionadded:: 0.17
Parameters
----------
estimators : list of (str, estimator) tuples
Invoking the ``fit`` method on the ``VotingClassifier`` will fit clones
of those original estimators that will be stored in the class attribute
``self.estimators_``. An estimator can be set to ``'drop'``
using ``set_params``.
.. versionchanged:: 0.21
``'drop'`` is accepted. Using None was deprecated in 0.22 and
support was removed in 0.24.
voting : {'hard', 'soft'}, default='hard'
If 'hard', uses predicted class labels for majority rule voting.
Else if 'soft', predicts the class label based on the argmax of
the sums of the predicted probabilities, which is recommended for
an ensemble of well-calibrated classifiers.
weights : array-like of shape (n_classifiers,), default=None
Sequence of weights (`float` or `int`) to weight the occurrences of
predicted class labels (`hard` voting) or class probabilities
before averaging (`soft` voting). Uses uniform weights if `None`.
n_jobs : int, default=None
The number of jobs to run in parallel for ``fit``.
``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
for more details.
.. versionadded:: 0.18
flatten_transform : bool, default=True
Affects shape of transform output only when voting='soft'
If voting='soft' and flatten_transform=True, transform method returns
matrix with shape (n_samples, n_classifiers * n_classes). If
flatten_transform=False, it returns
(n_classifiers, n_samples, n_classes).
verbose : bool, default=False
If True, the time elapsed while fitting will be printed as it
is completed.
.. versionadded:: 0.23
Attributes
----------
estimators_ : list of classifiers
The collection of fitted sub-estimators as defined in ``estimators``
that are not 'drop'.
named_estimators_ : :class:`~sklearn.utils.Bunch`
Attribute to access any fitted sub-estimators by name.
.. versionadded:: 0.20
le_ : :class:`~sklearn.preprocessing.LabelEncoder`
Transformer used to encode the labels during fit and decode during
prediction.
classes_ : ndarray of shape (n_classes,)
The classes labels.
n_features_in_ : int
Number of features seen during :term:`fit`. Only defined if the
underlying classifier exposes such an attribute when fit.
.. versionadded:: 0.24
feature_names_in_ : ndarray of shape (`n_features_in_`,)
Names of features seen during :term:`fit`. Only defined if the
underlying estimators expose such an attribute when fit.
.. versionadded:: 1.0
See Also
--------
VotingRegressor : Prediction voting regressor.
Examples
--------
>>> import numpy as np
>>> from sklearn.linear_model import LogisticRegression
>>> from sklearn.naive_bayes import GaussianNB
>>> from sklearn.ensemble import RandomForestClassifier, VotingClassifier
>>> clf1 = LogisticRegression(multi_class='multinomial', random_state=1)
>>> clf2 = RandomForestClassifier(n_estimators=50, random_state=1)
>>> clf3 = GaussianNB()
>>> X = np.array([[-1, -1], [-2, -1], [-3, -2], [1, 1], [2, 1], [3, 2]])
>>> y = np.array([1, 1, 1, 2, 2, 2])
>>> eclf1 = VotingClassifier(estimators=[
... ('lr', clf1), ('rf', clf2), ('gnb', clf3)], voting='hard')
>>> eclf1 = eclf1.fit(X, y)
>>> print(eclf1.predict(X))
[1 1 1 2 2 2]
>>> np.array_equal(eclf1.named_estimators_.lr.predict(X),
... eclf1.named_estimators_['lr'].predict(X))
True
>>> eclf2 = VotingClassifier(estimators=[
... ('lr', clf1), ('rf', clf2), ('gnb', clf3)],
... voting='soft')
>>> eclf2 = eclf2.fit(X, y)
>>> print(eclf2.predict(X))
[1 1 1 2 2 2]
>>> eclf3 = VotingClassifier(estimators=[
... ('lr', clf1), ('rf', clf2), ('gnb', clf3)],
... voting='soft', weights=[2,1,1],
... flatten_transform=True)
>>> eclf3 = eclf3.fit(X, y)
>>> print(eclf3.predict(X))
[1 1 1 2 2 2]
>>> print(eclf3.transform(X).shape)
(6, 6)
"""
def __init__(
self,
estimators,
*,
voting="hard",
weights=None,
n_jobs=None,
flatten_transform=True,
verbose=False,
):
super().__init__(estimators=estimators)
self.voting = voting
self.weights = weights
self.n_jobs = n_jobs
self.flatten_transform = flatten_transform
self.verbose = verbose
def fit(self, X, y, sample_weight=None):
"""Fit the estimators.
Parameters
----------
X : {array-like, sparse matrix} of shape (n_samples, n_features)
Training vectors, where `n_samples` is the number of samples and
`n_features` is the number of features.
y : array-like of shape (n_samples,)
Target values.
sample_weight : array-like of shape (n_samples,), default=None
Sample weights. If None, then samples are equally weighted.
Note that this is supported only if all underlying estimators
support sample weights.
.. versionadded:: 0.18
Returns
-------
self : object
Returns the instance itself.
"""
check_classification_targets(y)
if isinstance(y, np.ndarray) and len(y.shape) > 1 and y.shape[1] > 1:
raise NotImplementedError(
"Multilabel and multi-output classification is not supported."
)
if self.voting not in ("soft", "hard"):
raise ValueError(
"Voting must be 'soft' or 'hard'; got (voting=%r)" % self.voting
)
self.le_ = LabelEncoder().fit(y)
self.classes_ = self.le_.classes_
transformed_y = self.le_.transform(y)
return super().fit(X, transformed_y, sample_weight)
def predict(self, X):
"""Predict class labels for X.
Parameters
----------
X : {array-like, sparse matrix} of shape (n_samples, n_features)
The input samples.
Returns
-------
maj : array-like of shape (n_samples,)
Predicted class labels.
"""
check_is_fitted(self)
if self.voting == "soft":
maj = np.argmax(self.predict_proba(X), axis=1)
else: # 'hard' voting
predictions = self._predict(X)
maj = np.apply_along_axis(
lambda x: np.argmax(np.bincount(x, weights=self._weights_not_none)),
axis=1,
arr=predictions,
)
maj = self.le_.inverse_transform(maj)
return maj
def _collect_probas(self, X):
"""Collect results from clf.predict calls."""
return np.asarray([clf.predict_proba(X) for clf in self.estimators_])
def _check_voting(self):
if self.voting == "hard":
raise AttributeError(
f"predict_proba is not available when voting={repr(self.voting)}"
)
return True
@available_if(_check_voting)
def predict_proba(self, X):
"""Compute probabilities of possible outcomes for samples in X.
Parameters
----------
X : {array-like, sparse matrix} of shape (n_samples, n_features)
The input samples.
Returns
-------
avg : array-like of shape (n_samples, n_classes)
Weighted average probability for each class per sample.
"""
check_is_fitted(self)
avg = np.average(
self._collect_probas(X), axis=0, weights=self._weights_not_none
)
return avg
def transform(self, X):
"""Return class labels or probabilities for X for each estimator.
Parameters
----------
X : {array-like, sparse matrix} of shape (n_samples, n_features)
Training vectors, where `n_samples` is the number of samples and
`n_features` is the number of features.
Returns
-------
probabilities_or_labels
If `voting='soft'` and `flatten_transform=True`:
returns ndarray of shape (n_classifiers, n_samples *
n_classes), being class probabilities calculated by each
classifier.
If `voting='soft' and `flatten_transform=False`:
ndarray of shape (n_classifiers, n_samples, n_classes)
If `voting='hard'`:
ndarray of shape (n_samples, n_classifiers), being
class labels predicted by each classifier.
"""
check_is_fitted(self)
if self.voting == "soft":
probas = self._collect_probas(X)
if not self.flatten_transform:
return probas
return np.hstack(probas)
else:
return self._predict(X)
class VotingRegressor(RegressorMixin, _BaseVoting):
"""Prediction voting regressor for unfitted estimators.
A voting regressor is an ensemble meta-estimator that fits several base
regressors, each on the whole dataset. Then it averages the individual
predictions to form a final prediction.
Read more in the :ref:`User Guide <voting_regressor>`.
.. versionadded:: 0.21
Parameters
----------
estimators : list of (str, estimator) tuples
Invoking the ``fit`` method on the ``VotingRegressor`` will fit clones
of those original estimators that will be stored in the class attribute
``self.estimators_``. An estimator can be set to ``'drop'`` using
``set_params``.
.. versionchanged:: 0.21
``'drop'`` is accepted. Using None was deprecated in 0.22 and
support was removed in 0.24.
weights : array-like of shape (n_regressors,), default=None
Sequence of weights (`float` or `int`) to weight the occurrences of
predicted values before averaging. Uses uniform weights if `None`.
n_jobs : int, default=None
The number of jobs to run in parallel for ``fit``.
``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
for more details.
verbose : bool, default=False
If True, the time elapsed while fitting will be printed as it
is completed.
.. versionadded:: 0.23
Attributes
----------
estimators_ : list of regressors
The collection of fitted sub-estimators as defined in ``estimators``
that are not 'drop'.
named_estimators_ : :class:`~sklearn.utils.Bunch`
Attribute to access any fitted sub-estimators by name.
.. versionadded:: 0.20
n_features_in_ : int
Number of features seen during :term:`fit`. Only defined if the
underlying regressor exposes such an attribute when fit.
.. versionadded:: 0.24
feature_names_in_ : ndarray of shape (`n_features_in_`,)
Names of features seen during :term:`fit`. Only defined if the
underlying estimators expose such an attribute when fit.
.. versionadded:: 1.0
See Also
--------
VotingClassifier : Soft Voting/Majority Rule classifier.
Examples
--------
>>> import numpy as np
>>> from sklearn.linear_model import LinearRegression
>>> from sklearn.ensemble import RandomForestRegressor
>>> from sklearn.ensemble import VotingRegressor
>>> r1 = LinearRegression()
>>> r2 = RandomForestRegressor(n_estimators=10, random_state=1)
>>> X = np.array([[1, 1], [2, 4], [3, 9], [4, 16], [5, 25], [6, 36]])
>>> y = np.array([2, 6, 12, 20, 30, 42])
>>> er = VotingRegressor([('lr', r1), ('rf', r2)])
>>> print(er.fit(X, y).predict(X))
[ 3.3 5.7 11.8 19.7 28. 40.3]
"""
def __init__(self, estimators, *, weights=None, n_jobs=None, verbose=False):
super().__init__(estimators=estimators)
self.weights = weights
self.n_jobs = n_jobs
self.verbose = verbose
def fit(self, X, y, sample_weight=None):
"""Fit the estimators.
Parameters
----------
X : {array-like, sparse matrix} of shape (n_samples, n_features)
Training vectors, where `n_samples` is the number of samples and
`n_features` is the number of features.
y : array-like of shape (n_samples,)
Target values.
sample_weight : array-like of shape (n_samples,), default=None
Sample weights. If None, then samples are equally weighted.
Note that this is supported only if all underlying estimators
support sample weights.
Returns
-------
self : object
Fitted estimator.
"""
y = column_or_1d(y, warn=True)
return super().fit(X, y, sample_weight)
def predict(self, X):
"""Predict regression target for X.
The predicted regression target of an input sample is computed as the
mean predicted regression targets of the estimators in the ensemble.
Parameters
----------
X : {array-like, sparse matrix} of shape (n_samples, n_features)
The input samples.
Returns
-------
y : ndarray of shape (n_samples,)
The predicted values.
"""
check_is_fitted(self)
return np.average(self._predict(X), axis=1, weights=self._weights_not_none)
def transform(self, X):
"""Return predictions for X for each estimator.
Parameters
----------
X : {array-like, sparse matrix} of shape (n_samples, n_features)
The input samples.
Returns
-------
predictions : ndarray of shape (n_samples, n_classifiers)
Values predicted by each regressor.
"""
check_is_fitted(self)
return self._predict(X)
|
window.currentList = 0
async function openTask(event) {
let taskId = event.target.parentNode.getAttribute('data_id')
let response = await fetch(`/tasks/${taskId}`, {
method: "GET",
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
}
)
if (response.status === 200) {
let result = await response.json()
let task = result.data
document.querySelector('#taskFormContainer h2').innerHTML = "Редактирование"
if (task) {
document.querySelector('#taskFormContainer #task_id').value = task.id
document.querySelector('#taskFormContainer #name').value = task.name
document.querySelector('#taskFormContainer #type_name').value = task.type.name
document.querySelector('#taskFormContainer #place').value = task.place
document.querySelector('#taskFormContainer #date').value = task.date
document.querySelector('#taskFormContainer #time').value = task.time
document.querySelector('#taskFormContainer #duration').value = task.duration
document.querySelector('#taskFormContainer #comment').value = task.comment
}
}
else {
alert("task Not found")
}
}
async function onClickDone(event) {
event.stopPropagation()
let taskId = event.target.parentNode.parentNode.getAttribute("data_id")
let body = {
done: event.target.checked,
"_token": document.getElementsByName('_token')[0].value
}
event.target.disabled= true;
let response = await fetch(`/tasks/${taskId}`, {
method: "PUT",
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(body)
}
)
if (response.status === 201) {
await loadNewTaskList()
}
else {
let result = await response.json()
console.log(result)
event.target.checked = !event.target.checked
}
event.target.disabled= false
}
async function listTypeEvent(event) {
let allButtons = document.querySelectorAll('.btn-group-lg button')
allButtons.forEach((buttonElem) => {
buttonElem.disabled = true
buttonElem.classList.remove('active')
})
event.target.classList.add('active')
event.target.disabled = false
await loadNewTaskList(event.target.getAttribute('dataListType'))
allButtons.forEach((buttonElem) => {
buttonElem.disabled = false
})
}
async function loadNewTaskList(listType = window.currentList) {
let response = await fetch(`/tasks?TypeList=${listType}`, {
method: "GET",
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
}
)
if (response.status === 200) {
let result = await response.json()
window.currentList = listType
let tableBody = document.querySelector('tbody')
tableBody.innerHTML = ""
result.data.forEach((task) => {
let row = document.createElement('tr')
row.onclick = openTask
for (let i = 0; i < 7; i++)
row.append(document.createElement('td'))
fillRow(row, task)
let doneElem = document.createElement('td')
let inputDone = document.createElement('input')
inputDone.type = 'checkbox'
inputDone.onclick = onClickDone
inputDone.checked = task.done
doneElem.append(inputDone)
row.append(doneElem)
tableBody.append(row)
})
}
}
|
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import abc
from typing import Awaitable, Callable, Dict, Optional, Sequence, Union
import pkg_resources
import google.auth # type: ignore
import google.api_core
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import retry as retries
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore
from google.cloud.bigquery_storage_v1beta2.types import storage
from google.cloud.bigquery_storage_v1beta2.types import stream
try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution(
"google-cloud-bigquery-storage",
).version,
)
except pkg_resources.DistributionNotFound:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
class BigQueryReadTransport(abc.ABC):
"""Abstract transport class for BigQueryRead."""
AUTH_SCOPES = (
"https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/bigquery.readonly",
"https://www.googleapis.com/auth/cloud-platform",
)
DEFAULT_HOST: str = "bigquerystorage.googleapis.com"
def __init__(
self,
*,
host: str = DEFAULT_HOST,
credentials: ga_credentials.Credentials = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
**kwargs,
) -> None:
"""Instantiate the transport.
Args:
host (Optional[str]):
The hostname to connect to.
credentials (Optional[google.auth.credentials.Credentials]): The
authorization credentials to attach to requests. These
credentials identify the application to the service; if none
are specified, the client will attempt to ascertain the
credentials from the environment.
credentials_file (Optional[str]): A file with credentials that can
be loaded with :func:`google.auth.load_credentials_from_file`.
This argument is mutually exclusive with credentials.
scopes (Optional[Sequence[str]]): A list of scopes.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
The client info used to send a user-agent string along with
API requests. If ``None``, then default info will be used.
Generally, you only need to set this if you're developing
your own client library.
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
self._host = host
scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}
# Save the scopes.
self._scopes = scopes
# If no credentials are provided, then determine the appropriate
# defaults.
if credentials and credentials_file:
raise core_exceptions.DuplicateCredentialArgs(
"'credentials_file' and 'credentials' are mutually exclusive"
)
if credentials_file is not None:
credentials, _ = google.auth.load_credentials_from_file(
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
)
elif credentials is None:
credentials, _ = google.auth.default(
**scopes_kwargs, quota_project_id=quota_project_id
)
# If the credentials are service account credentials, then always try to use self signed JWT.
if (
always_use_jwt_access
and isinstance(credentials, service_account.Credentials)
and hasattr(service_account.Credentials, "with_always_use_jwt_access")
):
credentials = credentials.with_always_use_jwt_access(True)
# Save the credentials.
self._credentials = credentials
def _prep_wrapped_messages(self, client_info):
# Precompute the wrapped methods.
self._wrapped_methods = {
self.create_read_session: gapic_v1.method.wrap_method(
self.create_read_session,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
client_info=client_info,
),
self.read_rows: gapic_v1.method.wrap_method(
self.read_rows,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=86400.0,
),
default_timeout=86400.0,
client_info=client_info,
),
self.split_read_stream: gapic_v1.method.wrap_method(
self.split_read_stream,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
client_info=client_info,
),
}
def close(self):
"""Closes resources associated with the transport.
.. warning::
Only call this method if the transport is NOT shared
with other clients - this may cause errors in other clients!
"""
raise NotImplementedError()
@property
def create_read_session(
self,
) -> Callable[
[storage.CreateReadSessionRequest],
Union[stream.ReadSession, Awaitable[stream.ReadSession]],
]:
raise NotImplementedError()
@property
def read_rows(
self,
) -> Callable[
[storage.ReadRowsRequest],
Union[storage.ReadRowsResponse, Awaitable[storage.ReadRowsResponse]],
]:
raise NotImplementedError()
@property
def split_read_stream(
self,
) -> Callable[
[storage.SplitReadStreamRequest],
Union[
storage.SplitReadStreamResponse, Awaitable[storage.SplitReadStreamResponse]
],
]:
raise NotImplementedError()
__all__ = ("BigQueryReadTransport",)
|
import torch
class LayerNorm_(torch.nn.Module):
def __init__(self, normalized_shape, init_method, dp=4, eps=1e-5, scale=1e-3):
super(LayerNorm_, self).__init__()
# Initialize master weight
self.gamma = torch.empty(normalized_shape,
dtype=torch.float,
requires_grad=True)
init_method(self.gamma)
self.beta = torch.empty(normalized_shape,
dtype=torch.float,
requires_grad=True)
init_method(self.beta)
self.eps = eps
def construct(self, x):
mean = torch.mean(x, -1, keepdim=True)
diff = torch.sub(x, mean)
variance = torch.mean(torch.square(diff), -1,keepdim=True)
variance_eps = torch.sqrt(torch.add(variance, self.eps))
output_ = torch.div(diff, variance_eps)
output = torch.add(torch.mul(output_, self.gamma), self.beta)
return output
|
import React , {Component , Fragment , lazy , Suspense} from "react"
import "./EasyFramer.css"
export default class FileUpload extends Component {
render(){
return (
<Fragment>
<h1>Managing File Upload and File Rendering With React</h1>
</Fragment>
)
}
}
|
import contextlib
from ._blob import BlobUpath
class ResourceNotFoundError(Exception):
pass
class ResourceExistsError(Exception):
pass
class FakeBlobStore:
'''A in-memory blobstore for illustration purposes'''
def __init__(self):
self._data = {
'bucket_a': {},
'bucket_b': {},
}
def write_bytes(self, bucket: str, name: str, data: bytes, overwrite: bool = False):
if name in self._data[bucket] and not overwrite:
raise ResourceExistsError
self._data[bucket][name] = data
return len(data)
def read_bytes(self, bucket: str, name: str):
z = self._data[bucket]
try:
return z[name]
except KeyError:
raise ResourceNotFoundError(name)
def list_blobs(self, bucket: str, prefix: str):
for k in self._data[bucket].keys():
if k.startswith(prefix):
yield k
def delete_blob(self, bucket: str, name: str):
z = self._data[bucket]
try:
del z[name]
except KeyError:
raise ResourceNotFoundError(name)
def exists(self, bucket: str, name: str):
z = self._data[bucket]
return name in z
_store = FakeBlobStore()
class FakeBlobUpath(BlobUpath):
'''This Upath implementation for the FakeBlobstore
can be used for testing basic functionalities.
This also showcases the essential methods that
a concrete subclass of BlobUpath needs to implement.'''
def __init__(self, *parts: str, bucket: str):
super().__init__(*parts, bucket=bucket)
self._bucket = bucket
def file_info(self):
# place holder
return {}
def is_file(self):
return _store.exists(self._bucket, self._path)
@contextlib.contextmanager
def lock(self, *, timeout=None):
# place holder
yield self
def read_bytes(self):
try:
return _store.read_bytes(self._bucket, self._path)
except ResourceNotFoundError as e:
raise FileNotFoundError(self) from e
def riterdir(self):
p = self._path
if not p.endswith('/'):
p += '/'
for pp in _store.list_blobs(self._bucket, p):
yield self / pp[len(p):]
def remove_file(self):
try:
_store.delete_blob(self._bucket, self._path)
return 1
except ResourceNotFoundError as e:
return 0
def write_bytes(self, data, *, overwrite=False):
try:
_store.write_bytes(self._bucket, self._path,
data, overwrite=overwrite)
except ResourceExistsError as e:
raise FileExistsError(self) from e
|
import Ember from 'ember';
const { computed, Component, String: { htmlSafe } } = Ember;
export default Component.extend({
tagName: '',
barClass: computed('direction', function() {
let direction = this.get('direction');
if (direction) {
return `md-${direction}`;
}
}),
style: computed('leftPosition', 'rightPosition', function() {
let left = parseInt(this.get('leftPosition'));
let right = parseInt(this.get('rightPosition'));
return htmlSafe(`left: ${left}px; right: ${right}px;`);
})
});
|
const Response = require('../../utils/response');
const Chat = require('../chat/chat.model');
const unreadChat = require('../chat/unreadchat.model');
const Screen = require('../screens/screens.model');
const User = require('../user/user.model')
const Joi = require('joi');
const FocusGroup = require('../focusGroup/focusGroup.model');
const _ = require('lodash');
const mongoose = require('mongoose');
const ObjectId = mongoose.Types.ObjectId;
const jwt = require('jsonwebtoken')
const mailer = require('../../utils/mailService')
const Notification = require('../notification/notification.model');
const fgScreens = require('../focusGroup/fgProjectScreen.model');
const projectTeam = require('../project/projectTeamMember.model');
const pusherNotif = require('../../utils/pusher')
const userChatrack = require('../chatcountrack/chatcountrack.model')
const Anonymous = require('../anonymous/anonymous.model')
let moment = require('moment');
let gIntDataPerPage = 10;
async function unReadChatCount(fg, onlineMembers) {
let membersData = await FocusGroup.aggregate([
{ $match: { _id: ObjectId(fg) } },
{ $unwind: { path: '$joinedMembers', 'preserveNullAndEmptyArrays': true } },
{ $unwind: { path: '$invitedMembers', 'preserveNullAndEmptyArrays': true } },
{
$graphLookup: {
from: "users",
startWith: "$invitedMembers.email",
connectFromField: "invitedMembers.email",
connectToField: "email",
as: "invitedMemberDetails"
}
},
{ $unwind: { path: "$invitedMemberDetails", 'preserveNullAndEmptyArrays': true } },
{ $lookup: { from: 'users', localField: 'createdUser', foreignField: '_id', as: 'createdUser' } },
{ $unwind: '$createdUser' },
{ $lookup: { from: 'projectteammembers', localField: 'projectId', foreignField: 'projectId', as: 'projectTeamMembers' } },
{ $unwind: { path: '$projectTeamMembers', 'preserveNullAndEmptyArrays': true } },
{ $lookup: { from: 'users', localField: 'projectTeamMembers.projectTeamMember.userId', foreignField: '_id', as: 'teamMember' } },
{ $unwind: '$teamMember' },
{
$group: {
_id: "$_id",
"joinedMembers": {
"$addToSet": {
'_id': '$joinedMembers._id'
}
},
"invitedMembers": {
"$addToSet": {
$cond: {
if: { $ne: ["$invitedMembers._id", null] },
then: {
'_id': '$invitedMembers._id'
},
else: {
'_id': '$invitedMembers._id'
},
}
}
},
"projectId": { $first: "$projectId" },
"groupName": { $first: "$groupName" },
"groupstatus": { $first: "$groupstatus" },
"description": { $first: "$description" },
"createdUser": { $first: "$createdUser" },
"createdAt": { $first: "$createdAt" },
"teamMembers": {
"$addToSet": {
'_id': '$teamMember._id',
}
}
}
},
]);
membersData = membersData[0];
let tM, inM;
if (membersData.teamMembers.length > 0) {
tM = membersData.teamMembers.map(v => {
return v._id;
});
}
if (membersData.invitedMembers.length > 0) {
inM = membersData.invitedMembers.map(v => {
return v._id;
})
}
membersData = [...tM, ...inM];
membersData = membersData.filter(v => {
return v !== undefined;
})
for (let x of onlineMembers) {
for (let y of membersData) {
if (x.toString() !== y.toString()) {
let data = await unreadChat.findOne({ focusgroupId: fg, userId: y });
if (data == null) {
let obj = {
focusgroupId: fg,
userId: y,
count: 1
}
let datass = await unreadChat.create(obj);
} else {
let count = data.count + 1;
let datass = await unreadChat.findOneAndUpdate({
focusgroupId: fg,
userId: y
}, {
$set: {
count: count
}
})
}
}
}
}
}
function componentOneCtrl() {
const methods = {
/*
Chating in the Focus Group Members
Input: screenId
*/
startChat: async(req, res) => {
console.log("Start Chat")
try {
const validate = Joi.object().keys({
'screenId': Joi.string().alphanum().length(24).required(),
'parentId': Joi.string().trim().allow(''),
'focusgroupId': Joi.string().trim().allow(''),
'message': Joi.string().required(),
'anonymousId': Joi.string(),
'onlineMembers': Joi.array().allow('')
}).required().options({ abortEarly: false })
let { error, value } = Joi.validate(req.body, validate);
if (error) {
let lAryMessge = _.map(error.details, "message");
return Response.badValuesData(res, lAryMessge);
}
let onlineMembers = req.body.onlineMembers;
let focusGroupDetails = await fgScreens.findOne({ "screenId": ObjectId(req.body.screenId) });
if (focusGroupDetails == null) {
focusGroupDetails = await fgScreens.findOne({ "screenId": ObjectId(req.body.parentId) });
}
let focusGroupStatus = await FocusGroup.findOne({ _id: ObjectId(focusGroupDetails.focusGroupId) })
if (focusGroupStatus.isPublic == false) {
let accessToken = req.headers['x-access-token'];
let decord = await jwt.verify(accessToken, process.env.SUPER_SECRET);
let user = await User.findOne({ _id: ObjectId(decord._id) });
if (!user) {
return Response.forbiddenError(res, { message: 'Access Denied, If you want to share your comment please login first!!!' })
}
//Check whether the user is a member or not in focus group
let lAryCheckMemberOrNot;
let memberDetail = await fgScreens.findOne({ "screenId": ObjectId(req.body.screenId) });
if (memberDetail == null) {
lAryCheckMemberOrNot = await fgScreens.aggregate([
{ $match: { screenId: ObjectId(req.body.parentId) } },
{ $lookup: { from: 'focusgroups', localField: 'focusGroupId', foreignField: '_id', as: 'focusGroupId' } },
{ $unwind: '$focusGroupId' },
{ $lookup: { from: 'projectteammembers', localField: 'focusGroupId.projectId', foreignField: 'projectId', as: 'projectTeamMembers' } },
{ $unwind: { path: '$projectTeamMembers', 'preserveNullAndEmptyArrays': true } },
{
$match: {
$or: [{
"focusGroupId.joinedMembers": {
$in: [ObjectId(user._id)]
}
}, {
"focusGroupId.createdUser": ObjectId(user._id)
}, {
"focusGroupId.invitedMembers.email": user.email
},
{
"projectTeamMembers.projectTeamMember.email": user.email
}
]
}
}
]);
} else {
lAryCheckMemberOrNot = await fgScreens.aggregate([
{ $match: { screenId: ObjectId(req.body.screenId) } },
{ $lookup: { from: 'focusgroups', localField: 'focusGroupId', foreignField: '_id', as: 'focusGroupId' } },
{ $unwind: '$focusGroupId' },
{ $lookup: { from: 'projectteammembers', localField: 'focusGroupId.projectId', foreignField: 'projectId', as: 'projectTeamMembers' } },
{ $unwind: { path: '$projectTeamMembers', 'preserveNullAndEmptyArrays': true } },
{
$match: {
$or: [{
"focusGroupId.joinedMembers": {
$in: [ObjectId(user._id)]
}
}, {
"focusGroupId.createdUser": ObjectId(user._id)
}, {
"focusGroupId.invitedMembers.email": user.email
},
{
"projectTeamMembers.projectTeamMember.email": user.email
}
]
}
}
]);
}
if (lAryCheckMemberOrNot.length === 0) return Response.forbiddenError(res, "Access Denied, If you want to share your comment please join this group first");
let updateFocusGroup = await FocusGroup.updateOne({ _id: lAryCheckMemberOrNot[0].focusGroupId._id }, {
$set: {
$currentDate: {
updatedAt: true
}
}
})
// let focusGroupId = await fgScreens.findOne({ "screenId": ObjectId(req.body.screenId) }).select('focusGroupId').lean()
value.userId = user._id;
value.focusgroupId = req.body.focusgroupId;
let lAryRes = await Chat.create(value);
let a = {};
for (const key in lAryRes) {
if (lAryRes.hasOwnProperty(key)) {
const element = lAryRes[key];
a[key] = element;
}
}
a._doc.userId = {
'_id': user._id,
"userName": user.userName,
"firstName": user.firstName,
"lastName": user.lastName
}
a._doc.focusGroupId = focusGroupStatus._id
lAryCheckMemberOrNot = lAryCheckMemberOrNot[0];
let lAryChannels = [];
let teamMembers = await projectTeam.find({ projectId: ObjectId(focusGroupStatus.projectId) }).select('projectTeamMember');
teamMembers = teamMembers.map(v => {
return v.projectTeamMember.userId;
});
//Notification(For Socket Purpose)
let lAryTotalMembers = [...lAryCheckMemberOrNot.focusGroupId.joinedMembers, lAryCheckMemberOrNot.focusGroupId.createdUser, ...teamMembers] //Send notification to all members in a group including created user
lAryTotalMembers = lAryTotalMembers.map(x => {
if (x.toString() !== user._id.toString()) return x;
}); // Notification won't be send to the user who posted the chat
lAryTotalMembers = _.compact(lAryTotalMembers)
let inviteMembers = focusGroupStatus.invitedMembers;
for (let i of inviteMembers) {
if (user.email != i.email) {
let channel = await User.find({ email: i.email });
if (channel.length > 0) {
lAryChannels.push(channel[0].channelName);
}
}
}
console.log(lAryChannels, 'bedore')
console.log(lAryTotalMembers, 'members')
for (let i of lAryTotalMembers) {
lAryChannels.push((await User.findById(i).select('channelName')).channelName);
}
console.log(lAryChannels, 'channel')
let _id = lAryCheckMemberOrNot.focusGroupId._id;
let groupName = lAryCheckMemberOrNot.focusGroupId.groupName
let tokenData = { _id, groupName }
let expiry = '30 days'
let token = jwt.sign(tokenData, process.env.SUPER_SECRET, {
expiresIn: expiry
});
let joinedMembersMailId = await FocusGroup.find({ _id: ObjectId(_id) })
let mails = joinedMembersMailId[0].joinedMembers;
pusherNotif.chatSocket(lAryChannels, lAryRes);
// unread chat count - per user - per FG
let fgId = req.body.focusgroupId
unReadChatCount(fgId, onlineMembers);
return Response.success(res, lAryRes, "chat");
} else {
console.log('anonymous user')
if (!req.headers['x-access-token']) {
return Response.forbiddenError(res, { message: 'Access Denied, Token expired!!!' })
}
let accessToken = req.headers['x-access-token'];
let decord = await jwt.verify(accessToken, process.env.SUPER_SECRET);
let user = await decord;
let checkUser = await User.find({ _id: ObjectId(user._id) })
if (checkUser.length > 0) {
value.userId = user._id
} else {
value.anonymousId = user._id;
}
let focusGroupId = await fgScreens.findOne({ "screenId": ObjectId(req.body.screenId) }).select('focusGroupId').lean();
if (focusGroupId == null) {
focusGroupId = await fgScreens.findOne({ "screenId": ObjectId(req.body.parentId) });
}
let focusGroupStatus = await FocusGroup.findOne({ _id: ObjectId(focusGroupId.focusGroupId) })
let projectTeams = await FocusGroup.findOne({ _id: ObjectId(focusGroupId.focusGroupId) }).select('projectId');
let teamMembers = await projectTeam.find({ projectId: ObjectId(projectTeams.projectId) }).select('projectTeamMember');
let lAryRes = await Chat.create(value);
let a = {};
for (const key in lAryRes) {
if (lAryRes.hasOwnProperty(key)) {
const element = lAryRes[key];
a[key] = element;
}
}
a._doc.focusGroupId = focusGroupId.focusGroupId
if (checkUser.length > 0) {
a._doc.userId = {
'_id': user._id,
"userName": user.userName,
"firstName": checkUser[0].firstName,
"lastName": checkUser[0].lastName
}
} else {
a._doc.anonymousId = {
'_id': user._id,
"name": user.userName,
"email": user.email
}
}
let lAryChannels = [];
let inviteMembers = focusGroupStatus.invitedMembers;
let joinedMembers = focusGroupStatus.joinedMembers;
let anonymousMembers = focusGroupStatus.anonymousId;
let createduser = focusGroupStatus.createdUser;
if (user._id != createduser.email) {
let createdUserChannel = await User.find({ email: createduser.email }).select('channelName');
lAryChannels.push(createdUserChannel[0].channelName);
}
for (let i of inviteMembers) {
if (user.email != i.email) {
let channel = await User.find({ email: i.email }).select('channelName');
if (channel.length > 0) {
lAryChannels.push(channel[0].channelName);
}
}
}
for (let i of joinedMembers) {
let channel = await User.find({ _id: i }).select('channelName');
lAryChannels.push(channel[0].channelName);
}
for (let i of anonymousMembers) {
if (user.email != i.email) {
lAryChannels.push(i.channelName);
}
}
for (let x of teamMembers) {
if (createduser._id != x.projectTeamMember.id) {
let data = await User.find({ email: x.projectTeamMember.email }).select('channelName');
lAryChannels.push(data[0].channelName);
}
}
console.log(lAryChannels, 'channels')
pusherNotif.chatSocket(lAryChannels, lAryRes);
return Response.success(res, lAryRes, "chat");
}
} catch (err) {
return Response.errorInternal(err, res);
}
},
/*
List of all chats in particular screen in FocusGroup
*/
listAllChatForSpecifiedScreen: async(req, res) => {
try {
let validate = {
'screenId': Joi.string().alphanum().length(24).required(),
'focusgroupId': Joi.string().trim().allow(''),
};
let { error, value } = Joi.validate(req.params, validate);
if (error) {
let lAryMessge = _.map(error.details, "message");
return Response.badValuesData(res, lAryMessge);
}
//Pagination
let page = req.query.page || 1;
let skipRec = page - 1;
skipRec = skipRec * gIntDataPerPage;
let fgId = req.query.focusgroupId
let lAryChat = await Chat.find({ screenId: req.params.screenId, 'focusgroupId': fgId }).populate('userId', 'firstName lastName userName email').populate('anonymousId', 'userName email').lean()
let dlAryChat = await Chat.aggregate([{
$match: {
screenId: ObjectId(req.params.screenId),
'focusgroupId': ObjectId(fgId)
}
},
{ $lookup: { from: 'users', localField: 'userId', foreignField: '_id', as: 'userId' } },
{ $unwind: { path: '$userId', 'preserveNullAndEmptyArrays': true } },
]);
await lAryChat.filter((chat) => {
if (chat.userId) {
chat.userId = {
"_id": chat.userId._id,
"userName": chat.userId.userName,
"email": chat.userId.email,
"firstName": chat.userId.firstName,
"lastName": chat.userId.lastName,
"userId": chat.userId._id
}
}
if (chat.anonymousId) {
chat.anonymousId = {
_id: chat.anonymousId._id,
name: chat.anonymousId.userName,
email: chat.anonymousId.email,
userId: chat.anonymousId._id
}
}
})
return Response.success(res, lAryChat, "chat list");
} catch (err) {
return Response.errorInternal(err, res);
}
},
/**
* Consolidated mail for chats
*/
listOfChats: async(req, res) => {
try {
let chats = await Chat.aggregate([
{ $match: { mailSent: 0 } },
{ $sort: { 'createdAt': -1 } },
{
$group: {
_id: '$screenId',
message: {
$push: {
chat: '$message',
userId: '$userId',
chatId: '$_id'
}
},
mailSent: { $first: "$mailSent" }
}
},
{
$lookup: {
from: 'screens',
localField: '_id',
foreignField: '_id',
as: 'Screens'
}
},
{ $unwind: { path: '$Screens', 'preserveNullAndEmptyArrays': true } },
{ $match: { 'Screens.screenStatus': 1 } },
{
$group: {
_id: '$_id',
message: { $first: "$message" },
mailSent: { $first: "$mailSent" },
screenName: { $first: "$Screens.screenName" },
focusGroupId: { $first: "$Screens.focusGroupId" }
}
},
{
$lookup: {
from: 'focusgroups',
localField: 'focusGroupId',
foreignField: '_id',
as: 'FocusGroups'
}
},
{ $unwind: { path: '$FocusGroups', 'preserveNullAndEmptyArrays': true } },
{
$group: {
_id: '$_id',
message: { $first: "$message" },
mailSent: { $first: "$mailSent" },
// screenName: { $last: "$Screens.screenName" },
focusGroupDetail: {
$first: {
focusGroupId: "$FocusGroups._id",
projectId: "$FocusGroups.projectId",
focusGroupName: "$FocusGroups.groupName",
invitedMembers: "$FocusGroups.invitedMembers",
joinedMembers: "$FocusGroups.joinedMembers",
anonymousId: "$FocusGroups.anonymousId",
projectTeamMembers: "$FocusGroups.projectTeamMembers"
}
}
}
},
])
let userData = {};
chats.forEach(element => {
let data = element.focusGroupDetail;
let emailDatas = [].concat(data.invitedMembers, data.joinedMembers, data.projectTeamMembers);
userData.groupName = element.focusGroupDetail.focusGroupName;
userData.chatCount = element.message.length;
userData.emails = emailDatas;
if ((userData.chatCount) > 5) {
mailer.focusGroupChatEmail(userData);
element.message.map(async(v) => {
await Chat.findOneAndUpdate({ _id: v.chatId }, { mailSent: 1 })
})
}
})
// return Response.success(res, chats, "chat list");
} catch (err) {
return Response.errorInternal(err, res);
}
}
}
return Object.freeze(methods)
}
module.exports = componentOneCtrl()
|
import buildQueryParams from './query';
describe('services/query', () => {
it('should build one query param', () => {
const obj = {
param1: 'ABC'
};
expect(buildQueryParams(obj)).toEqual('?param1=ABC');
});
it('should build several query params', () => {
const obj = {
param1: 'ABC',
param2: 10,
param3: 'DEF'
};
expect(buildQueryParams(obj)).toEqual('?param1=ABC¶m2=10¶m3=DEF');
});
});
|
# Copyright 2021 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
from collections import OrderedDict
from xfl.common.logger import log
def convert_tf_example_to_dict(src_tf_example):
assert isinstance(src_tf_example, tf.train.Example)
dst_dict = OrderedDict()
tf_feature = src_tf_example.features.feature
for key, feat in tf_feature.items():
if feat.HasField('int64_list'):
csv_val = [item for item in feat.int64_list.value] # pylint: disable=unnecessary-comprehension
elif feat.HasField('bytes_list'):
csv_val = [item for item in feat.bytes_list.value] # pylint: disable=unnecessary-comprehension
elif feat.HasField('float_list'):
csv_val = [item for item in feat.float_list.value] # pylint: disable=unnecessary-comprehension
else:
assert False, "feat type must in int64, byte, float"
assert isinstance(csv_val, list)
dst_dict[key] = csv_val[0] if len(csv_val) == 1 else csv_val
return dst_dict
def check_path(filenames):
from itertools import chain
if not isinstance(filenames, list) or len(filenames) == 0 or \
not all(isinstance(_, tuple) for _ in filenames) or \
not all(isinstance(_, str) or isinstance(_, unicode) for _ in chain.from_iterable(filenames)):
raise ValueError("filenames should be a filled list of tuple of strings, got{}".format(filenames))
def gather_res(ids, existence):
assert len(ids) == len(existence), \
'ids size {}, existence size {}'.format(len(ids), len(existence))
res = []
for i in range(0, len(existence)):
if existence[i]:
res.append(ids[i])
return res
def to_bytes(v):
if isinstance(v, bytes):
return v
return str(v).encode('utf-8')
def get_sample_store_key(hash_col_value, sort_col_value: int):
return to_bytes(hash_col_value) + b'#' + to_bytes(sort_col_value)
def split_sample_store_key(sample_store_key: bytes):
t = sample_store_key.split(b'#')
return t
def get_k8s_host_name_for_bucket(job_name, bucket_id, server_domain):
return "{}-{}.{}".format(job_name, bucket_id, server_domain)
|
import json
import requests
import os.path
from os import path
# if path.exists("courses.json"):
# with open("courses.json","r+") as count:
# data=json.load(count)
# # print(data)
# else:
url="http://saral.navgurukul.org/api/courses"
w = requests.get(url).text
# print (w)
with open("cours.json","w+") as count:
count.write(w)
data = json.loads(w)
print (data)
a=0
for i in data["availableCourses"]:
a+=1
var=(a,i["name"])
print (var)
user=int(input("enter the nuber\n"))
r=(data["availableCourses"])
id1=str(r[user-1]["id"])
# print (id1)
new_url ='http://saral.navgurukul.org/api/courses/'+str(id1)+'/exercises'
# print (new_url)
page =requests.get(new_url).json()
# print(page)
num=0
for j in page['data']:
num+=1
new = (num,j["name"])
print(new)
user2 = int(input("enter your num\n"))
B = page['data']
slug = B[user2-1]['slug']
# print(slug)
url1='http://saral.navgurukul.org/api/courses/{}/exercise/getBySlug?slug={}'.format(id1,slug)
raw1=requests.get(url1)
slug_data=raw1.json()
print (slug_data['content'])
|
/* eslint quote-props: 0 */
'use strict';
const path = require('path');
const defaultMimeType = 'application/octet-stream';
const defaultExtension = 'bin';
const mimeTypes = new Map([
['application/acad', 'dwg'],
['application/applixware', 'aw'],
['application/arj', 'arj'],
['application/atom+xml', 'xml'],
['application/atomcat+xml', 'atomcat'],
['application/atomsvc+xml', 'atomsvc'],
['application/base64', ['mm', 'mme']],
['application/binhex', 'hqx'],
['application/binhex4', 'hqx'],
['application/book', ['book', 'boo']],
['application/ccxml+xml,', 'ccxml'],
['application/cdf', 'cdf'],
['application/cdmi-capability', 'cdmia'],
['application/cdmi-container', 'cdmic'],
['application/cdmi-domain', 'cdmid'],
['application/cdmi-object', 'cdmio'],
['application/cdmi-queue', 'cdmiq'],
['application/clariscad', 'ccad'],
['application/commonground', 'dp'],
['application/cu-seeme', 'cu'],
['application/davmount+xml', 'davmount'],
['application/drafting', 'drw'],
['application/dsptype', 'tsp'],
['application/dssc+der', 'dssc'],
['application/dssc+xml', 'xdssc'],
['application/dxf', 'dxf'],
['application/ecmascript', ['js', 'es']],
['application/emma+xml', 'emma'],
['application/envoy', 'evy'],
['application/epub+zip', 'epub'],
['application/excel', ['xls', 'xl', 'xla', 'xlb', 'xlc', 'xld', 'xlk', 'xll', 'xlm', 'xlt', 'xlv', 'xlw']],
['application/exi', 'exi'],
['application/font-tdpfr', 'pfr'],
['application/fractals', 'fif'],
['application/freeloader', 'frl'],
['application/futuresplash', 'spl'],
['application/gnutar', 'tgz'],
['application/groupwise', 'vew'],
['application/hlp', 'hlp'],
['application/hta', 'hta'],
['application/hyperstudio', 'stk'],
['application/i-deas', 'unv'],
['application/iges', ['iges', 'igs']],
['application/inf', 'inf'],
['application/internet-property-stream', 'acx'],
['application/ipfix', 'ipfix'],
['application/java', 'class'],
['application/java-archive', 'jar'],
['application/java-byte-code', 'class'],
['application/java-serialized-object', 'ser'],
['application/java-vm', 'class'],
['application/javascript', 'js'],
['application/json', 'json'],
['application/lha', 'lha'],
['application/lzx', 'lzx'],
['application/mac-binary', 'bin'],
['application/mac-binhex', 'hqx'],
['application/mac-binhex40', 'hqx'],
['application/mac-compactpro', 'cpt'],
['application/macbinary', 'bin'],
['application/mads+xml', 'mads'],
['application/marc', 'mrc'],
['application/marcxml+xml', 'mrcx'],
['application/mathematica', 'ma'],
['application/mathml+xml', 'mathml'],
['application/mbedlet', 'mbd'],
['application/mbox', 'mbox'],
['application/mcad', 'mcd'],
['application/mediaservercontrol+xml', 'mscml'],
['application/metalink4+xml', 'meta4'],
['application/mets+xml', 'mets'],
['application/mime', 'aps'],
['application/mods+xml', 'mods'],
['application/mp21', 'm21'],
['application/mp4', 'mp4'],
['application/mspowerpoint', ['ppt', 'pot', 'pps', 'ppz']],
['application/msword', ['doc', 'dot', 'w6w', 'wiz', 'word']],
['application/mswrite', 'wri'],
['application/mxf', 'mxf'],
['application/netmc', 'mcp'],
['application/octet-stream', ['*']],
['application/oda', 'oda'],
['application/oebps-package+xml', 'opf'],
['application/ogg', 'ogx'],
['application/olescript', 'axs'],
['application/onenote', 'onetoc'],
['application/patch-ops-error+xml', 'xer'],
['application/pdf', 'pdf'],
['application/pgp-encrypted', 'asc'],
['application/pgp-signature', 'pgp'],
['application/pics-rules', 'prf'],
['application/pkcs-12', 'p12'],
['application/pkcs-crl', 'crl'],
['application/pkcs10', 'p10'],
['application/pkcs7-mime', ['p7c', 'p7m']],
['application/pkcs7-signature', 'p7s'],
['application/pkcs8', 'p8'],
['application/pkix-attr-cert', 'ac'],
['application/pkix-cert', ['cer', 'crt']],
['application/pkix-crl', 'crl'],
['application/pkix-pkipath', 'pkipath'],
['application/pkixcmp', 'pki'],
['application/plain', 'text'],
['application/pls+xml', 'pls'],
['application/postscript', ['ps', 'ai', 'eps']],
['application/powerpoint', 'ppt'],
['application/pro_eng', ['part', 'prt']],
['application/prs.cww', 'cww'],
['application/pskc+xml', 'pskcxml'],
['application/rdf+xml', 'rdf'],
['application/reginfo+xml', 'rif'],
['application/relax-ng-compact-syntax', 'rnc'],
['application/resource-lists+xml', 'rl'],
['application/resource-lists-diff+xml', 'rld'],
['application/ringing-tones', 'rng'],
['application/rls-services+xml', 'rs'],
['application/rsd+xml', 'rsd'],
['application/rss+xml', 'xml'],
['application/rtf', ['rtf', 'rtx']],
['application/sbml+xml', 'sbml'],
['application/scvp-cv-request', 'scq'],
['application/scvp-cv-response', 'scs'],
['application/scvp-vp-request', 'spq'],
['application/scvp-vp-response', 'spp'],
['application/sdp', 'sdp'],
['application/sea', 'sea'],
['application/set', 'set'],
['application/set-payment-initiation', 'setpay'],
['application/set-registration-initiation', 'setreg'],
['application/shf+xml', 'shf'],
['application/sla', 'stl'],
['application/smil', ['smi', 'smil']],
['application/smil+xml', 'smi'],
['application/solids', 'sol'],
['application/sounder', 'sdr'],
['application/sparql-query', 'rq'],
['application/sparql-results+xml', 'srx'],
['application/srgs', 'gram'],
['application/srgs+xml', 'grxml'],
['application/sru+xml', 'sru'],
['application/ssml+xml', 'ssml'],
['application/step', ['step', 'stp']],
['application/streamingmedia', 'ssm'],
['application/tei+xml', 'tei'],
['application/thraud+xml', 'tfi'],
['application/timestamped-data', 'tsd'],
['application/toolbook', 'tbk'],
['application/vda', 'vda'],
['application/vnd.3gpp.pic-bw-large', 'plb'],
['application/vnd.3gpp.pic-bw-small', 'psb'],
['application/vnd.3gpp.pic-bw-var', 'pvb'],
['application/vnd.3gpp2.tcap', 'tcap'],
['application/vnd.3m.post-it-notes', 'pwn'],
['application/vnd.accpac.simply.aso', 'aso'],
['application/vnd.accpac.simply.imp', 'imp'],
['application/vnd.acucobol', 'acu'],
['application/vnd.acucorp', 'atc'],
['application/vnd.adobe.air-application-installer-package+zip', 'air'],
['application/vnd.adobe.fxp', 'fxp'],
['application/vnd.adobe.xdp+xml', 'xdp'],
['application/vnd.adobe.xfdf', 'xfdf'],
['application/vnd.ahead.space', 'ahead'],
['application/vnd.airzip.filesecure.azf', 'azf'],
['application/vnd.airzip.filesecure.azs', 'azs'],
['application/vnd.amazon.ebook', 'azw'],
['application/vnd.americandynamics.acc', 'acc'],
['application/vnd.amiga.ami', 'ami'],
['application/vnd.android.package-archive', 'apk'],
['application/vnd.anser-web-certificate-issue-initiation', 'cii'],
['application/vnd.anser-web-funds-transfer-initiation', 'fti'],
['application/vnd.antix.game-component', 'atx'],
['application/vnd.apple.installer+xml', 'mpkg'],
['application/vnd.apple.mpegurl', 'm3u8'],
['application/vnd.aristanetworks.swi', 'swi'],
['application/vnd.audiograph', 'aep'],
['application/vnd.blueice.multipass', 'mpm'],
['application/vnd.bmi', 'bmi'],
['application/vnd.businessobjects', 'rep'],
['application/vnd.chemdraw+xml', 'cdxml'],
['application/vnd.chipnuts.karaoke-mmd', 'mmd'],
['application/vnd.cinderella', 'cdy'],
['application/vnd.claymore', 'cla'],
['application/vnd.cloanto.rp9', 'rp9'],
['application/vnd.clonk.c4group', 'c4g'],
['application/vnd.cluetrust.cartomobile-config', 'c11amc'],
['application/vnd.cluetrust.cartomobile-config-pkg', 'c11amz'],
['application/vnd.commonspace', 'csp'],
['application/vnd.contact.cmsg', 'cdbcmsg'],
['application/vnd.cosmocaller', 'cmc'],
['application/vnd.crick.clicker', 'clkx'],
['application/vnd.crick.clicker.keyboard', 'clkk'],
['application/vnd.crick.clicker.palette', 'clkp'],
['application/vnd.crick.clicker.template', 'clkt'],
['application/vnd.crick.clicker.wordbank', 'clkw'],
['application/vnd.criticaltools.wbs+xml', 'wbs'],
['application/vnd.ctc-posml', 'pml'],
['application/vnd.cups-ppd', 'ppd'],
['application/vnd.curl.car', 'car'],
['application/vnd.curl.pcurl', 'pcurl'],
['application/vnd.data-vision.rdz', 'rdz'],
['application/vnd.denovo.fcselayout-link', 'fe_launch'],
['application/vnd.dna', 'dna'],
['application/vnd.dolby.mlp', 'mlp'],
['application/vnd.dpgraph', 'dpg'],
['application/vnd.dreamfactory', 'dfac'],
['application/vnd.dvb.ait', 'ait'],
['application/vnd.dvb.service', 'svc'],
['application/vnd.dynageo', 'geo'],
['application/vnd.ecowin.chart', 'mag'],
['application/vnd.enliven', 'nml'],
['application/vnd.epson.esf', 'esf'],
['application/vnd.epson.msf', 'msf'],
['application/vnd.epson.quickanime', 'qam'],
['application/vnd.epson.salt', 'slt'],
['application/vnd.epson.ssf', 'ssf'],
['application/vnd.eszigno3+xml', 'es3'],
['application/vnd.ezpix-album', 'ez2'],
['application/vnd.ezpix-package', 'ez3'],
['application/vnd.fdf', 'fdf'],
['application/vnd.fdsn.seed', 'seed'],
['application/vnd.flographit', 'gph'],
['application/vnd.fluxtime.clip', 'ftc'],
['application/vnd.framemaker', 'fm'],
['application/vnd.frogans.fnc', 'fnc'],
['application/vnd.frogans.ltf', 'ltf'],
['application/vnd.fsc.weblaunch', 'fsc'],
['application/vnd.fujitsu.oasys', 'oas'],
['application/vnd.fujitsu.oasys2', 'oa2'],
['application/vnd.fujitsu.oasys3', 'oa3'],
['application/vnd.fujitsu.oasysgp', 'fg5'],
['application/vnd.fujitsu.oasysprs', 'bh2'],
['application/vnd.fujixerox.ddd', 'ddd'],
['application/vnd.fujixerox.docuworks', 'xdw'],
['application/vnd.fujixerox.docuworks.binder', 'xbd'],
['application/vnd.fuzzysheet', 'fzs'],
['application/vnd.genomatix.tuxedo', 'txd'],
['application/vnd.geogebra.file', 'ggb'],
['application/vnd.geogebra.tool', 'ggt'],
['application/vnd.geometry-explorer', 'gex'],
['application/vnd.geonext', 'gxt'],
['application/vnd.geoplan', 'g2w'],
['application/vnd.geospace', 'g3w'],
['application/vnd.gmx', 'gmx'],
['application/vnd.google-earth.kml+xml', 'kml'],
['application/vnd.google-earth.kmz', 'kmz'],
['application/vnd.grafeq', 'gqf'],
['application/vnd.groove-account', 'gac'],
['application/vnd.groove-help', 'ghf'],
['application/vnd.groove-identity-message', 'gim'],
['application/vnd.groove-injector', 'grv'],
['application/vnd.groove-tool-message', 'gtm'],
['application/vnd.groove-tool-template', 'tpl'],
['application/vnd.groove-vcard', 'vcg'],
['application/vnd.hal+xml', 'hal'],
['application/vnd.handheld-entertainment+xml', 'zmm'],
['application/vnd.hbci', 'hbci'],
['application/vnd.hhe.lesson-player', 'les'],
['application/vnd.hp-hpgl', ['hgl', 'hpg', 'hpgl']],
['application/vnd.hp-hpid', 'hpid'],
['application/vnd.hp-hps', 'hps'],
['application/vnd.hp-jlyt', 'jlt'],
['application/vnd.hp-pcl', 'pcl'],
['application/vnd.hp-pclxl', 'pclxl'],
['application/vnd.hydrostatix.sof-data', 'sfd-hdstx'],
['application/vnd.hzn-3d-crossword', 'x3d'],
['application/vnd.ibm.minipay', 'mpy'],
['application/vnd.ibm.modcap', 'afp'],
['application/vnd.ibm.rights-management', 'irm'],
['application/vnd.ibm.secure-container', 'sc'],
['application/vnd.iccprofile', 'icc'],
['application/vnd.igloader', 'igl'],
['application/vnd.immervision-ivp', 'ivp'],
['application/vnd.immervision-ivu', 'ivu'],
['application/vnd.insors.igm', 'igm'],
['application/vnd.intercon.formnet', 'xpw'],
['application/vnd.intergeo', 'i2g'],
['application/vnd.intu.qbo', 'qbo'],
['application/vnd.intu.qfx', 'qfx'],
['application/vnd.ipunplugged.rcprofile', 'rcprofile'],
['application/vnd.irepository.package+xml', 'irp'],
['application/vnd.is-xpr', 'xpr'],
['application/vnd.isac.fcs', 'fcs'],
['application/vnd.jam', 'jam'],
['application/vnd.jcp.javame.midlet-rms', 'rms'],
['application/vnd.jisp', 'jisp'],
['application/vnd.joost.joda-archive', 'joda'],
['application/vnd.kahootz', 'ktz'],
['application/vnd.kde.karbon', 'karbon'],
['application/vnd.kde.kchart', 'chrt'],
['application/vnd.kde.kformula', 'kfo'],
['application/vnd.kde.kivio', 'flw'],
['application/vnd.kde.kontour', 'kon'],
['application/vnd.kde.kpresenter', 'kpr'],
['application/vnd.kde.kspread', 'ksp'],
['application/vnd.kde.kword', 'kwd'],
['application/vnd.kenameaapp', 'htke'],
['application/vnd.kidspiration', 'kia'],
['application/vnd.kinar', 'kne'],
['application/vnd.koan', 'skp'],
['application/vnd.kodak-descriptor', 'sse'],
['application/vnd.las.las+xml', 'lasxml'],
['application/vnd.llamagraphics.life-balance.desktop', 'lbd'],
['application/vnd.llamagraphics.life-balance.exchange+xml', 'lbe'],
['application/vnd.lotus-1-2-3', '123'],
['application/vnd.lotus-approach', 'apr'],
['application/vnd.lotus-freelance', 'pre'],
['application/vnd.lotus-notes', 'nsf'],
['application/vnd.lotus-organizer', 'org'],
['application/vnd.lotus-screencam', 'scm'],
['application/vnd.lotus-wordpro', 'lwp'],
['application/vnd.macports.portpkg', 'portpkg'],
['application/vnd.mcd', 'mcd'],
['application/vnd.medcalcdata', 'mc1'],
['application/vnd.mediastation.cdkey', 'cdkey'],
['application/vnd.mfer', 'mwf'],
['application/vnd.mfmp', 'mfm'],
['application/vnd.micrografx.flo', 'flo'],
['application/vnd.micrografx.igx', 'igx'],
['application/vnd.mif', 'mif'],
['application/vnd.mobius.daf', 'daf'],
['application/vnd.mobius.dis', 'dis'],
['application/vnd.mobius.mbk', 'mbk'],
['application/vnd.mobius.mqy', 'mqy'],
['application/vnd.mobius.msl', 'msl'],
['application/vnd.mobius.plc', 'plc'],
['application/vnd.mobius.txf', 'txf'],
['application/vnd.mophun.application', 'mpn'],
['application/vnd.mophun.certificate', 'mpc'],
['application/vnd.mozilla.xul+xml', 'xul'],
['application/vnd.ms-artgalry', 'cil'],
['application/vnd.ms-cab-compressed', 'cab'],
['application/vnd.ms-excel', ['xls', 'xla', 'xlc', 'xlm', 'xlt', 'xlw', 'xlb', 'xll']],
['application/vnd.ms-excel.addin.macroenabled.12', 'xlam'],
['application/vnd.ms-excel.sheet.binary.macroenabled.12', 'xlsb'],
['application/vnd.ms-excel.sheet.macroenabled.12', 'xlsm'],
['application/vnd.ms-excel.template.macroenabled.12', 'xltm'],
['application/vnd.ms-fontobject', 'eot'],
['application/vnd.ms-htmlhelp', 'chm'],
['application/vnd.ms-ims', 'ims'],
['application/vnd.ms-lrm', 'lrm'],
['application/vnd.ms-officetheme', 'thmx'],
['application/vnd.ms-outlook', 'msg'],
['application/vnd.ms-pki.certstore', 'sst'],
['application/vnd.ms-pki.pko', 'pko'],
['application/vnd.ms-pki.seccat', 'cat'],
['application/vnd.ms-pki.stl', 'stl'],
['application/vnd.ms-pkicertstore', 'sst'],
['application/vnd.ms-pkiseccat', 'cat'],
['application/vnd.ms-pkistl', 'stl'],
['application/vnd.ms-powerpoint', ['ppt', 'pot', 'pps', 'ppa', 'pwz']],
['application/vnd.ms-powerpoint.addin.macroenabled.12', 'ppam'],
['application/vnd.ms-powerpoint.presentation.macroenabled.12', 'pptm'],
['application/vnd.ms-powerpoint.slide.macroenabled.12', 'sldm'],
['application/vnd.ms-powerpoint.slideshow.macroenabled.12', 'ppsm'],
['application/vnd.ms-powerpoint.template.macroenabled.12', 'potm'],
['application/vnd.ms-project', 'mpp'],
['application/vnd.ms-word.document.macroenabled.12', 'docm'],
['application/vnd.ms-word.template.macroenabled.12', 'dotm'],
['application/vnd.ms-works', ['wks', 'wcm', 'wdb', 'wps']],
['application/vnd.ms-wpl', 'wpl'],
['application/vnd.ms-xpsdocument', 'xps'],
['application/vnd.mseq', 'mseq'],
['application/vnd.musician', 'mus'],
['application/vnd.muvee.style', 'msty'],
['application/vnd.neurolanguage.nlu', 'nlu'],
['application/vnd.noblenet-directory', 'nnd'],
['application/vnd.noblenet-sealer', 'nns'],
['application/vnd.noblenet-web', 'nnw'],
['application/vnd.nokia.configuration-message', 'ncm'],
['application/vnd.nokia.n-gage.data', 'ngdat'],
['application/vnd.nokia.n-gage.symbian.install', 'n-gage'],
['application/vnd.nokia.radio-preset', 'rpst'],
['application/vnd.nokia.radio-presets', 'rpss'],
['application/vnd.nokia.ringing-tone', 'rng'],
['application/vnd.novadigm.edm', 'edm'],
['application/vnd.novadigm.edx', 'edx'],
['application/vnd.novadigm.ext', 'ext'],
['application/vnd.oasis.opendocument.chart', 'odc'],
['application/vnd.oasis.opendocument.chart-template', 'otc'],
['application/vnd.oasis.opendocument.database', 'odb'],
['application/vnd.oasis.opendocument.formula', 'odf'],
['application/vnd.oasis.opendocument.formula-template', 'odft'],
['application/vnd.oasis.opendocument.graphics', 'odg'],
['application/vnd.oasis.opendocument.graphics-template', 'otg'],
['application/vnd.oasis.opendocument.image', 'odi'],
['application/vnd.oasis.opendocument.image-template', 'oti'],
['application/vnd.oasis.opendocument.presentation', 'odp'],
['application/vnd.oasis.opendocument.presentation-template', 'otp'],
['application/vnd.oasis.opendocument.spreadsheet', 'ods'],
['application/vnd.oasis.opendocument.spreadsheet-template', 'ots'],
['application/vnd.oasis.opendocument.text', 'odt'],
['application/vnd.oasis.opendocument.text-master', 'odm'],
['application/vnd.oasis.opendocument.text-template', 'ott'],
['application/vnd.oasis.opendocument.text-web', 'oth'],
['application/vnd.olpc-sugar', 'xo'],
['application/vnd.oma.dd2+xml', 'dd2'],
['application/vnd.openofficeorg.extension', 'oxt'],
['application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptx'],
['application/vnd.openxmlformats-officedocument.presentationml.slide', 'sldx'],
['application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'ppsx'],
['application/vnd.openxmlformats-officedocument.presentationml.template', 'potx'],
['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx'],
['application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'xltx'],
['application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'docx'],
['application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dotx'],
['application/vnd.osgeo.mapguide.package', 'mgp'],
['application/vnd.osgi.dp', 'dp'],
['application/vnd.palm', 'pdb'],
['application/vnd.pawaafile', 'paw'],
['application/vnd.pg.format', 'str'],
['application/vnd.pg.osasli', 'ei6'],
['application/vnd.picsel', 'efif'],
['application/vnd.pmi.widget', 'wg'],
['application/vnd.pocketlearn', 'plf'],
['application/vnd.powerbuilder6', 'pbd'],
['application/vnd.previewsystems.box', 'box'],
['application/vnd.proteus.magazine', 'mgz'],
['application/vnd.publishare-delta-tree', 'qps'],
['application/vnd.pvi.ptid1', 'ptid'],
['application/vnd.quark.quarkxpress', 'qxd'],
['application/vnd.realvnc.bed', 'bed'],
['application/vnd.recordare.musicxml', 'mxl'],
['application/vnd.recordare.musicxml+xml', 'musicxml'],
['application/vnd.rig.cryptonote', 'cryptonote'],
['application/vnd.rim.cod', 'cod'],
['application/vnd.rn-realmedia', 'rm'],
['application/vnd.rn-realplayer', 'rnx'],
['application/vnd.route66.link66+xml', 'link66'],
['application/vnd.sailingtracker.track', 'st'],
['application/vnd.seemail', 'see'],
['application/vnd.sema', 'sema'],
['application/vnd.semd', 'semd'],
['application/vnd.semf', 'semf'],
['application/vnd.shana.informed.formdata', 'ifm'],
['application/vnd.shana.informed.formtemplate', 'itp'],
['application/vnd.shana.informed.interchange', 'iif'],
['application/vnd.shana.informed.package', 'ipk'],
['application/vnd.simtech-mindmapper', 'twd'],
['application/vnd.smaf', 'mmf'],
['application/vnd.smart.teacher', 'teacher'],
['application/vnd.solent.sdkm+xml', 'sdkm'],
['application/vnd.spotfire.dxp', 'dxp'],
['application/vnd.spotfire.sfs', 'sfs'],
['application/vnd.stardivision.calc', 'sdc'],
['application/vnd.stardivision.draw', 'sda'],
['application/vnd.stardivision.impress', 'sdd'],
['application/vnd.stardivision.math', 'smf'],
['application/vnd.stardivision.writer', 'sdw'],
['application/vnd.stardivision.writer-global', 'sgl'],
['application/vnd.stepmania.stepchart', 'sm'],
['application/vnd.sun.xml.calc', 'sxc'],
['application/vnd.sun.xml.calc.template', 'stc'],
['application/vnd.sun.xml.draw', 'sxd'],
['application/vnd.sun.xml.draw.template', 'std'],
['application/vnd.sun.xml.impress', 'sxi'],
['application/vnd.sun.xml.impress.template', 'sti'],
['application/vnd.sun.xml.math', 'sxm'],
['application/vnd.sun.xml.writer', 'sxw'],
['application/vnd.sun.xml.writer.global', 'sxg'],
['application/vnd.sun.xml.writer.template', 'stw'],
['application/vnd.sus-calendar', 'sus'],
['application/vnd.svd', 'svd'],
['application/vnd.symbian.install', 'sis'],
['application/vnd.syncml+xml', 'xsm'],
['application/vnd.syncml.dm+wbxml', 'bdm'],
['application/vnd.syncml.dm+xml', 'xdm'],
['application/vnd.tao.intent-module-archive', 'tao'],
['application/vnd.tmobile-livetv', 'tmo'],
['application/vnd.trid.tpt', 'tpt'],
['application/vnd.triscape.mxs', 'mxs'],
['application/vnd.trueapp', 'tra'],
['application/vnd.ufdl', 'ufd'],
['application/vnd.uiq.theme', 'utz'],
['application/vnd.umajin', 'umj'],
['application/vnd.unity', 'unityweb'],
['application/vnd.uoml+xml', 'uoml'],
['application/vnd.vcx', 'vcx'],
['application/vnd.visio', 'vsd'],
['application/vnd.visionary', 'vis'],
['application/vnd.vsf', 'vsf'],
['application/vnd.wap.wbxml', 'wbxml'],
['application/vnd.wap.wmlc', 'wmlc'],
['application/vnd.wap.wmlscriptc', 'wmlsc'],
['application/vnd.webturbo', 'wtb'],
['application/vnd.wolfram.player', 'nbp'],
['application/vnd.wordperfect', 'wpd'],
['application/vnd.wqd', 'wqd'],
['application/vnd.wt.stf', 'stf'],
['application/vnd.xara', ['web', 'xar']],
['application/vnd.xfdl', 'xfdl'],
['application/vnd.yamaha.hv-dic', 'hvd'],
['application/vnd.yamaha.hv-script', 'hvs'],
['application/vnd.yamaha.hv-voice', 'hvp'],
['application/vnd.yamaha.openscoreformat', 'osf'],
['application/vnd.yamaha.openscoreformat.osfpvg+xml', 'osfpvg'],
['application/vnd.yamaha.smaf-audio', 'saf'],
['application/vnd.yamaha.smaf-phrase', 'spf'],
['application/vnd.yellowriver-custom-menu', 'cmp'],
['application/vnd.zul', 'zir'],
['application/vnd.zzazz.deck+xml', 'zaz'],
['application/vocaltec-media-desc', 'vmd'],
['application/vocaltec-media-file', 'vmf'],
['application/voicexml+xml', 'vxml'],
['application/widget', 'wgt'],
['application/winhlp', 'hlp'],
['application/wordperfect', ['wp', 'wp5', 'wp6', 'wpd']],
['application/wordperfect6.0', ['w60', 'wp5']],
['application/wordperfect6.1', 'w61'],
['application/wsdl+xml', 'wsdl'],
['application/wspolicy+xml', 'wspolicy'],
['application/x-123', 'wk1'],
['application/x-7z-compressed', '7z'],
['application/x-abiword', 'abw'],
['application/x-ace-compressed', 'ace'],
['application/x-aim', 'aim'],
['application/x-authorware-bin', 'aab'],
['application/x-authorware-map', 'aam'],
['application/x-authorware-seg', 'aas'],
['application/x-bcpio', 'bcpio'],
['application/x-binary', 'bin'],
['application/x-binhex40', 'hqx'],
['application/x-bittorrent', 'torrent'],
['application/x-bsh', ['bsh', 'sh', 'shar']],
['application/x-bytecode.elisp', 'elc'],
['applicaiton/x-bytecode.python', 'pyc'],
['application/x-bzip', 'bz'],
['application/x-bzip2', ['boz', 'bz2']],
['application/x-cdf', 'cdf'],
['application/x-cdlink', 'vcd'],
['application/x-chat', ['cha', 'chat']],
['application/x-chess-pgn', 'pgn'],
['application/x-cmu-raster', 'ras'],
['application/x-cocoa', 'cco'],
['application/x-compactpro', 'cpt'],
['application/x-compress', 'z'],
['application/x-compressed', ['tgz', 'gz', 'z', 'zip']],
['application/x-conference', 'nsc'],
['application/x-cpio', 'cpio'],
['application/x-cpt', 'cpt'],
['application/x-csh', 'csh'],
['application/x-debian-package', 'deb'],
['application/x-deepv', 'deepv'],
['application/x-director', ['dir', 'dcr', 'dxr']],
['application/x-doom', 'wad'],
['application/x-dtbncx+xml', 'ncx'],
['application/x-dtbook+xml', 'dtb'],
['application/x-dtbresource+xml', 'res'],
['application/x-dvi', 'dvi'],
['application/x-elc', 'elc'],
['application/x-envoy', ['env', 'evy']],
['application/x-esrehber', 'es'],
['application/x-excel', ['xls', 'xla', 'xlb', 'xlc', 'xld', 'xlk', 'xll', 'xlm', 'xlt', 'xlv', 'xlw']],
['application/x-font-bdf', 'bdf'],
['application/x-font-ghostscript', 'gsf'],
['application/x-font-linux-psf', 'psf'],
['application/x-font-otf', 'otf'],
['application/x-font-pcf', 'pcf'],
['application/x-font-snf', 'snf'],
['application/x-font-ttf', 'ttf'],
['application/x-font-type1', 'pfa'],
['application/x-font-woff', 'woff'],
['application/x-frame', 'mif'],
['application/x-freelance', 'pre'],
['application/x-futuresplash', 'spl'],
['application/x-gnumeric', 'gnumeric'],
['application/x-gsp', 'gsp'],
['application/x-gss', 'gss'],
['application/x-gtar', 'gtar'],
['application/x-gzip', ['gz', 'gzip']],
['application/x-hdf', 'hdf'],
['application/x-helpfile', ['help', 'hlp']],
['application/x-httpd-imap', 'imap'],
['application/x-ima', 'ima'],
['application/x-internet-signup', ['ins', 'isp']],
['application/x-internett-signup', 'ins'],
['application/x-inventor', 'iv'],
['application/x-ip2', 'ip'],
['application/x-iphone', 'iii'],
['application/x-java-class', 'class'],
['application/x-java-commerce', 'jcm'],
['application/x-java-jnlp-file', 'jnlp'],
['application/x-javascript', 'js'],
['application/x-koan', ['skd', 'skm', 'skp', 'skt']],
['application/x-ksh', 'ksh'],
['application/x-latex', ['latex', 'ltx']],
['application/x-lha', 'lha'],
['application/x-lisp', 'lsp'],
['application/x-livescreen', 'ivy'],
['application/x-lotus', 'wq1'],
['application/x-lotusscreencam', 'scm'],
['application/x-lzh', 'lzh'],
['application/x-lzx', 'lzx'],
['application/x-mac-binhex40', 'hqx'],
['application/x-macbinary', 'bin'],
['application/x-magic-cap-package-1.0', 'mc$'],
['application/x-mathcad', 'mcd'],
['application/x-meme', 'mm'],
['application/x-midi', ['mid', 'midi']],
['application/x-mif', 'mif'],
['application/x-mix-transfer', 'nix'],
['application/x-mobipocket-ebook', 'prc'],
['application/x-mplayer2', 'asx'],
['application/x-ms-application', 'application'],
['application/x-ms-wmd', 'wmd'],
['application/x-ms-wmz', 'wmz'],
['application/x-ms-xbap', 'xbap'],
['application/x-msaccess', 'mdb'],
['application/x-msbinder', 'obd'],
['application/x-mscardfile', 'crd'],
['application/x-msclip', 'clp'],
['application/x-msdownload', ['exe', 'dll']],
['application/x-msexcel', ['xls', 'xla', 'xlw']],
['application/x-msmediaview', ['mvb', 'm13', 'm14']],
['application/x-msmetafile', 'wmf'],
['application/x-msmoney', 'mny'],
['application/x-mspowerpoint', 'ppt'],
['application/x-mspublisher', 'pub'],
['application/x-msschedule', 'scd'],
['application/x-msterminal', 'trm'],
['application/x-mswrite', 'wri'],
['application/x-navi-animation', 'ani'],
['application/x-navidoc', 'nvd'],
['application/x-navimap', 'map'],
['application/x-navistyle', 'stl'],
['application/x-netcdf', ['cdf', 'nc']],
['application/x-newton-compatible-pkg', 'pkg'],
['application/x-nokia-9000-communicator-add-on-software', 'aos'],
['application/x-omc', 'omc'],
['application/x-omcdatamaker', 'omcd'],
['application/x-omcregerator', 'omcr'],
['application/x-pagemaker', ['pm4', 'pm5']],
['application/x-pcl', 'pcl'],
['application/x-perfmon', ['pma', 'pmc', 'pml', 'pmr', 'pmw']],
['application/x-pixclscript', 'plx'],
['application/x-pkcs10', 'p10'],
['application/x-pkcs12', ['p12', 'pfx']],
['application/x-pkcs7-certificates', ['p7b', 'spc']],
['application/x-pkcs7-certreqresp', 'p7r'],
['application/x-pkcs7-mime', ['p7m', 'p7c']],
['application/x-pkcs7-signature', ['p7s', 'p7a']],
['application/x-pointplus', 'css'],
['application/x-portable-anymap', 'pnm'],
['application/x-project', ['mpc', 'mpt', 'mpv', 'mpx']],
['application/x-qpro', 'wb1'],
['application/x-rar-compressed', 'rar'],
['application/x-rtf', 'rtf'],
['application/x-sdp', 'sdp'],
['application/x-sea', 'sea'],
['application/x-seelogo', 'sl'],
['application/x-sh', 'sh'],
['application/x-shar', ['shar', 'sh']],
['application/x-shockwave-flash', 'swf'],
['application/x-silverlight-routes', 'xap'],
['application/x-sit', 'sit'],
['application/x-sprite', ['spr', 'sprite']],
['application/x-stuffit', 'sit'],
['application/x-stuffitx', 'sitx'],
['application/x-sv4cpio', 'sv4cpio'],
['application/x-sv4crc', 'sv4crc'],
['application/x-tar', 'tar'],
['application/x-tbook', ['sbk', 'tbk']],
['application/x-tcl', 'tcl'],
['application/x-tex', 'tex'],
['application/x-tex-tfm', 'tfm'],
['application/x-texinfo', ['texi', 'texinfo']],
['application/x-troff', ['roff', 't', 'tr']],
['application/x-troff-man', 'man'],
['application/x-troff-me', 'me'],
['application/x-troff-ms', 'ms'],
['application/x-troff-msvideo', 'avi'],
['application/x-ustar', 'ustar'],
['application/x-visio', ['vsd', 'vst', 'vsw']],
['application/x-vnd.audioexplosion.mzz', 'mzz'],
['application/x-vnd.ls-xpix', 'xpix'],
['application/x-vrml', 'vrml'],
['application/x-wais-source', ['src', 'wsrc']],
['application/x-winhelp', 'hlp'],
['application/x-wintalk', 'wtk'],
['application/x-world', ['wrl', 'svr']],
['application/x-wpwin', 'wpd'],
['application/x-wri', 'wri'],
['application/x-x509-ca-cert', ['cer', 'crt', 'der']],
['application/x-x509-user-cert', 'crt'],
['application/x-xfig', 'fig'],
['application/x-xpinstall', 'xpi'],
['application/x-zip-compressed', 'zip'],
['application/xcap-diff+xml', 'xdf'],
['application/xenc+xml', 'xenc'],
['application/xhtml+xml', 'xhtml'],
['application/xml', 'xml'],
['application/xml-dtd', 'dtd'],
['application/xop+xml', 'xop'],
['application/xslt+xml', 'xslt'],
['application/xspf+xml', 'xspf'],
['application/xv+xml', 'mxml'],
['application/yang', 'yang'],
['application/yin+xml', 'yin'],
['application/ynd.ms-pkipko', 'pko'],
['application/zip', 'zip'],
['audio/adpcm', 'adp'],
['audio/aiff', ['aiff', 'aif', 'aifc']],
['audio/basic', ['snd', 'au']],
['audio/it', 'it'],
['audio/make', ['funk', 'my', 'pfunk']],
['audio/make.my.funk', 'pfunk'],
['audio/mid', ['mid', 'rmi']],
['audio/midi', ['midi', 'kar', 'mid']],
['audio/mod', 'mod'],
['audio/mp4', 'mp4a'],
['audio/mpeg', ['mpga', 'mp3', 'm2a', 'mp2', 'mpa', 'mpg']],
['audio/mpeg3', 'mp3'],
['audio/nspaudio', ['la', 'lma']],
['audio/ogg', 'oga'],
['audio/s3m', 's3m'],
['audio/tsp-audio', 'tsi'],
['audio/tsplayer', 'tsp'],
['audio/vnd.dece.audio', 'uva'],
['audio/vnd.digital-winds', 'eol'],
['audio/vnd.dra', 'dra'],
['audio/vnd.dts', 'dts'],
['audio/vnd.dts.hd', 'dtshd'],
['audio/vnd.lucent.voice', 'lvp'],
['audio/vnd.ms-playready.media.pya', 'pya'],
['audio/vnd.nuera.ecelp4800', 'ecelp4800'],
['audio/vnd.nuera.ecelp7470', 'ecelp7470'],
['audio/vnd.nuera.ecelp9600', 'ecelp9600'],
['audio/vnd.qcelp', 'qcp'],
['audio/vnd.rip', 'rip'],
['audio/voc', 'voc'],
['audio/voxware', 'vox'],
['audio/wav', 'wav'],
['audio/webm', 'weba'],
['audio/x-aac', 'aac'],
['audio/x-adpcm', 'snd'],
['audio/x-aiff', ['aiff', 'aif', 'aifc']],
['audio/x-au', 'au'],
['audio/x-gsm', ['gsd', 'gsm']],
['audio/x-jam', 'jam'],
['audio/x-liveaudio', 'lam'],
['audio/x-mid', ['mid', 'midi']],
['audio/x-midi', ['midi', 'mid']],
['audio/x-mod', 'mod'],
['audio/x-mpeg', 'mp2'],
['audio/x-mpeg-3', 'mp3'],
['audio/x-mpegurl', 'm3u'],
['audio/x-mpequrl', 'm3u'],
['audio/x-ms-wax', 'wax'],
['audio/x-ms-wma', 'wma'],
['audio/x-nspaudio', ['la', 'lma']],
['audio/x-pn-realaudio', ['ra', 'ram', 'rm', 'rmm', 'rmp']],
['audio/x-pn-realaudio-plugin', ['ra', 'rmp', 'rpm']],
['audio/x-psid', 'sid'],
['audio/x-realaudio', 'ra'],
['audio/x-twinvq', 'vqf'],
['audio/x-twinvq-plugin', ['vqe', 'vql']],
['audio/x-vnd.audioexplosion.mjuicemediafile', 'mjf'],
['audio/x-voc', 'voc'],
['audio/x-wav', 'wav'],
['audio/xm', 'xm'],
['chemical/x-cdx', 'cdx'],
['chemical/x-cif', 'cif'],
['chemical/x-cmdf', 'cmdf'],
['chemical/x-cml', 'cml'],
['chemical/x-csml', 'csml'],
['chemical/x-pdb', ['pdb', 'xyz']],
['chemical/x-xyz', 'xyz'],
['drawing/x-dwf', 'dwf'],
['i-world/i-vrml', 'ivr'],
['image/bmp', ['bmp', 'bm']],
['image/cgm', 'cgm'],
['image/cis-cod', 'cod'],
['image/cmu-raster', ['ras', 'rast']],
['image/fif', 'fif'],
['image/florian', ['flo', 'turbot']],
['image/g3fax', 'g3'],
['image/gif', 'gif'],
['image/ief', ['ief', 'iefs']],
['image/jpeg', ['jpeg', 'jpe', 'jpg', 'jfif', 'jfif-tbnl']],
['image/jutvision', 'jut'],
['image/ktx', 'ktx'],
['image/naplps', ['nap', 'naplps']],
['image/pict', ['pic', 'pict']],
['image/pipeg', 'jfif'],
['image/pjpeg', ['jfif', 'jpe', 'jpeg', 'jpg']],
['image/png', ['png', 'x-png']],
['image/prs.btif', 'btif'],
['image/svg+xml', 'svg'],
['image/tiff', ['tif', 'tiff']],
['image/vasa', 'mcf'],
['image/vnd.adobe.photoshop', 'psd'],
['image/vnd.dece.graphic', 'uvi'],
['image/vnd.djvu', 'djvu'],
['image/vnd.dvb.subtitle', 'sub'],
['image/vnd.dwg', ['dwg', 'dxf', 'svf']],
['image/vnd.dxf', 'dxf'],
['image/vnd.fastbidsheet', 'fbs'],
['image/vnd.fpx', 'fpx'],
['image/vnd.fst', 'fst'],
['image/vnd.fujixerox.edmics-mmr', 'mmr'],
['image/vnd.fujixerox.edmics-rlc', 'rlc'],
['image/vnd.ms-modi', 'mdi'],
['image/vnd.net-fpx', ['fpx', 'npx']],
['image/vnd.rn-realflash', 'rf'],
['image/vnd.rn-realpix', 'rp'],
['image/vnd.wap.wbmp', 'wbmp'],
['image/vnd.xiff', 'xif'],
['image/webp', 'webp'],
['image/x-cmu-raster', 'ras'],
['image/x-cmx', 'cmx'],
['image/x-dwg', ['dwg', 'dxf', 'svf']],
['image/x-freehand', 'fh'],
['image/x-icon', 'ico'],
['image/x-jg', 'art'],
['image/x-jps', 'jps'],
['image/x-niff', ['niff', 'nif']],
['image/x-pcx', 'pcx'],
['image/x-pict', ['pct', 'pic']],
['image/x-portable-anymap', 'pnm'],
['image/x-portable-bitmap', 'pbm'],
['image/x-portable-graymap', 'pgm'],
['image/x-portable-greymap', 'pgm'],
['image/x-portable-pixmap', 'ppm'],
['image/x-quicktime', ['qif', 'qti', 'qtif']],
['image/x-rgb', 'rgb'],
['image/x-tiff', ['tif', 'tiff']],
['image/x-windows-bmp', 'bmp'],
['image/x-xbitmap', 'xbm'],
['image/x-xbm', 'xbm'],
['image/x-xpixmap', ['xpm', 'pm']],
['image/x-xwd', 'xwd'],
['image/x-xwindowdump', 'xwd'],
['image/xbm', 'xbm'],
['image/xpm', 'xpm'],
['message/rfc822', ['eml', 'mht', 'mhtml', 'nws', 'mime']],
['model/iges', ['iges', 'igs']],
['model/mesh', 'msh'],
['model/vnd.collada+xml', 'dae'],
['model/vnd.dwf', 'dwf'],
['model/vnd.gdl', 'gdl'],
['model/vnd.gtw', 'gtw'],
['model/vnd.mts', 'mts'],
['model/vnd.vtu', 'vtu'],
['model/vrml', ['vrml', 'wrl', 'wrz']],
['model/x-pov', 'pov'],
['multipart/x-gzip', 'gzip'],
['multipart/x-ustar', 'ustar'],
['multipart/x-zip', 'zip'],
['music/crescendo', ['mid', 'midi']],
['music/x-karaoke', 'kar'],
['paleovu/x-pv', 'pvu'],
['text/asp', 'asp'],
['text/calendar', 'ics'],
['text/css', 'css'],
['text/csv', 'csv'],
['text/ecmascript', 'js'],
['text/h323', '323'],
['text/html', ['html', 'htm', 'stm', 'acgi', 'htmls', 'htx', 'shtml']],
['text/iuls', 'uls'],
['text/javascript', 'js'],
['text/mcf', 'mcf'],
['text/n3', 'n3'],
['text/pascal', 'pas'],
[
'text/plain',
[
'txt',
'bas',
'c',
'h',
'c++',
'cc',
'com',
'conf',
'cxx',
'def',
'f',
'f90',
'for',
'g',
'hh',
'idc',
'jav',
'java',
'list',
'log',
'lst',
'm',
'mar',
'pl',
'sdml',
'text'
]
],
['text/plain-bas', 'par'],
['text/prs.lines.tag', 'dsc'],
['text/richtext', ['rtx', 'rt', 'rtf']],
['text/scriplet', 'wsc'],
['text/scriptlet', 'sct'],
['text/sgml', ['sgm', 'sgml']],
['text/tab-separated-values', 'tsv'],
['text/troff', 't'],
['text/turtle', 'ttl'],
['text/uri-list', ['uni', 'unis', 'uri', 'uris']],
['text/vnd.abc', 'abc'],
['text/vnd.curl', 'curl'],
['text/vnd.curl.dcurl', 'dcurl'],
['text/vnd.curl.mcurl', 'mcurl'],
['text/vnd.curl.scurl', 'scurl'],
['text/vnd.fly', 'fly'],
['text/vnd.fmi.flexstor', 'flx'],
['text/vnd.graphviz', 'gv'],
['text/vnd.in3d.3dml', '3dml'],
['text/vnd.in3d.spot', 'spot'],
['text/vnd.rn-realtext', 'rt'],
['text/vnd.sun.j2me.routes-descriptor', 'jad'],
['text/vnd.wap.wml', 'wml'],
['text/vnd.wap.wmlscript', 'wmls'],
['text/webviewhtml', 'htt'],
['text/x-asm', ['asm', 's']],
['text/x-audiosoft-intra', 'aip'],
['text/x-c', ['c', 'cc', 'cpp']],
['text/x-component', 'htc'],
['text/x-fortran', ['for', 'f', 'f77', 'f90']],
['text/x-h', ['h', 'hh']],
['text/x-java-source', ['java', 'jav']],
['text/x-java-source,java', 'java'],
['text/x-la-asf', 'lsx'],
['text/x-m', 'm'],
['text/x-pascal', 'p'],
['text/x-script', 'hlb'],
['text/x-script.csh', 'csh'],
['text/x-script.elisp', 'el'],
['text/x-script.guile', 'scm'],
['text/x-script.ksh', 'ksh'],
['text/x-script.lisp', 'lsp'],
['text/x-script.perl', 'pl'],
['text/x-script.perl-module', 'pm'],
['text/x-script.phyton', 'py'],
['text/x-script.rexx', 'rexx'],
['text/x-script.scheme', 'scm'],
['text/x-script.sh', 'sh'],
['text/x-script.tcl', 'tcl'],
['text/x-script.tcsh', 'tcsh'],
['text/x-script.zsh', 'zsh'],
['text/x-server-parsed-html', ['shtml', 'ssi']],
['text/x-setext', 'etx'],
['text/x-sgml', ['sgm', 'sgml']],
['text/x-speech', ['spc', 'talk']],
['text/x-uil', 'uil'],
['text/x-uuencode', ['uu', 'uue']],
['text/x-vcalendar', 'vcs'],
['text/x-vcard', 'vcf'],
['text/xml', 'xml'],
['video/3gpp', '3gp'],
['video/3gpp2', '3g2'],
['video/animaflex', 'afl'],
['video/avi', 'avi'],
['video/avs-video', 'avs'],
['video/dl', 'dl'],
['video/fli', 'fli'],
['video/gl', 'gl'],
['video/h261', 'h261'],
['video/h263', 'h263'],
['video/h264', 'h264'],
['video/jpeg', 'jpgv'],
['video/jpm', 'jpm'],
['video/mj2', 'mj2'],
['video/mp4', 'mp4'],
['video/mpeg', ['mpeg', 'mp2', 'mpa', 'mpe', 'mpg', 'mpv2', 'm1v', 'm2v', 'mp3']],
['video/msvideo', 'avi'],
['video/ogg', 'ogv'],
['video/quicktime', ['mov', 'qt', 'moov']],
['video/vdo', 'vdo'],
['video/vivo', ['viv', 'vivo']],
['video/vnd.dece.hd', 'uvh'],
['video/vnd.dece.mobile', 'uvm'],
['video/vnd.dece.pd', 'uvp'],
['video/vnd.dece.sd', 'uvs'],
['video/vnd.dece.video', 'uvv'],
['video/vnd.fvt', 'fvt'],
['video/vnd.mpegurl', 'mxu'],
['video/vnd.ms-playready.media.pyv', 'pyv'],
['video/vnd.rn-realvideo', 'rv'],
['video/vnd.uvvu.mp4', 'uvu'],
['video/vnd.vivo', ['viv', 'vivo']],
['video/vosaic', 'vos'],
['video/webm', 'webm'],
['video/x-amt-demorun', 'xdr'],
['video/x-amt-showrun', 'xsr'],
['video/x-atomic3d-feature', 'fmf'],
['video/x-dl', 'dl'],
['video/x-dv', ['dif', 'dv']],
['video/x-f4v', 'f4v'],
['video/x-fli', 'fli'],
['video/x-flv', 'flv'],
['video/x-gl', 'gl'],
['video/x-isvideo', 'isu'],
['video/x-la-asf', ['lsf', 'lsx']],
['video/x-m4v', 'm4v'],
['video/x-motion-jpeg', 'mjpg'],
['video/x-mpeg', ['mp3', 'mp2']],
['video/x-mpeq2a', 'mp2'],
['video/x-ms-asf', ['asf', 'asr', 'asx']],
['video/x-ms-asf-plugin', 'asx'],
['video/x-ms-wm', 'wm'],
['video/x-ms-wmv', 'wmv'],
['video/x-ms-wmx', 'wmx'],
['video/x-ms-wvx', 'wvx'],
['video/x-msvideo', 'avi'],
['video/x-qtc', 'qtc'],
['video/x-scm', 'scm'],
['video/x-sgi-movie', ['movie', 'mv']],
['windows/metafile', 'wmf'],
['www/mime', 'mime'],
['x-conference/x-cooltalk', 'ice'],
['x-music/x-midi', ['mid', 'midi']],
['x-world/x-3dmf', ['3dm', '3dmf', 'qd3', 'qd3d']],
['x-world/x-svr', 'svr'],
['x-world/x-vrml', ['flr', 'vrml', 'wrl', 'wrz', 'xaf', 'xof']],
['x-world/x-vrt', 'vrt'],
['xgl/drawing', 'xgz'],
['xgl/movie', 'xmz']
]);
const extensions = new Map([
['123', 'application/vnd.lotus-1-2-3'],
['323', 'text/h323'],
['*', 'application/octet-stream'],
['3dm', 'x-world/x-3dmf'],
['3dmf', 'x-world/x-3dmf'],
['3dml', 'text/vnd.in3d.3dml'],
['3g2', 'video/3gpp2'],
['3gp', 'video/3gpp'],
['7z', 'application/x-7z-compressed'],
['a', 'application/octet-stream'],
['aab', 'application/x-authorware-bin'],
['aac', 'audio/x-aac'],
['aam', 'application/x-authorware-map'],
['aas', 'application/x-authorware-seg'],
['abc', 'text/vnd.abc'],
['abw', 'application/x-abiword'],
['ac', 'application/pkix-attr-cert'],
['acc', 'application/vnd.americandynamics.acc'],
['ace', 'application/x-ace-compressed'],
['acgi', 'text/html'],
['acu', 'application/vnd.acucobol'],
['acx', 'application/internet-property-stream'],
['adp', 'audio/adpcm'],
['aep', 'application/vnd.audiograph'],
['afl', 'video/animaflex'],
['afp', 'application/vnd.ibm.modcap'],
['ahead', 'application/vnd.ahead.space'],
['ai', 'application/postscript'],
['aif', ['audio/aiff', 'audio/x-aiff']],
['aifc', ['audio/aiff', 'audio/x-aiff']],
['aiff', ['audio/aiff', 'audio/x-aiff']],
['aim', 'application/x-aim'],
['aip', 'text/x-audiosoft-intra'],
['air', 'application/vnd.adobe.air-application-installer-package+zip'],
['ait', 'application/vnd.dvb.ait'],
['ami', 'application/vnd.amiga.ami'],
['ani', 'application/x-navi-animation'],
['aos', 'application/x-nokia-9000-communicator-add-on-software'],
['apk', 'application/vnd.android.package-archive'],
['application', 'application/x-ms-application'],
['apr', 'application/vnd.lotus-approach'],
['aps', 'application/mime'],
['arc', 'application/octet-stream'],
['arj', ['application/arj', 'application/octet-stream']],
['art', 'image/x-jg'],
['asf', 'video/x-ms-asf'],
['asm', 'text/x-asm'],
['aso', 'application/vnd.accpac.simply.aso'],
['asp', 'text/asp'],
['asr', 'video/x-ms-asf'],
['asx', ['video/x-ms-asf', 'application/x-mplayer2', 'video/x-ms-asf-plugin']],
['atc', 'application/vnd.acucorp'],
['atomcat', 'application/atomcat+xml'],
['atomsvc', 'application/atomsvc+xml'],
['atx', 'application/vnd.antix.game-component'],
['au', ['audio/basic', 'audio/x-au']],
['avi', ['video/avi', 'video/msvideo', 'application/x-troff-msvideo', 'video/x-msvideo']],
['avs', 'video/avs-video'],
['aw', 'application/applixware'],
['axs', 'application/olescript'],
['azf', 'application/vnd.airzip.filesecure.azf'],
['azs', 'application/vnd.airzip.filesecure.azs'],
['azw', 'application/vnd.amazon.ebook'],
['bas', 'text/plain'],
['bcpio', 'application/x-bcpio'],
['bdf', 'application/x-font-bdf'],
['bdm', 'application/vnd.syncml.dm+wbxml'],
['bed', 'application/vnd.realvnc.bed'],
['bh2', 'application/vnd.fujitsu.oasysprs'],
['bin', ['application/octet-stream', 'application/mac-binary', 'application/macbinary', 'application/x-macbinary', 'application/x-binary']],
['bm', 'image/bmp'],
['bmi', 'application/vnd.bmi'],
['bmp', ['image/bmp', 'image/x-windows-bmp']],
['boo', 'application/book'],
['book', 'application/book'],
['box', 'application/vnd.previewsystems.box'],
['boz', 'application/x-bzip2'],
['bsh', 'application/x-bsh'],
['btif', 'image/prs.btif'],
['bz', 'application/x-bzip'],
['bz2', 'application/x-bzip2'],
['c', ['text/plain', 'text/x-c']],
['c++', 'text/plain'],
['c11amc', 'application/vnd.cluetrust.cartomobile-config'],
['c11amz', 'application/vnd.cluetrust.cartomobile-config-pkg'],
['c4g', 'application/vnd.clonk.c4group'],
['cab', 'application/vnd.ms-cab-compressed'],
['car', 'application/vnd.curl.car'],
['cat', ['application/vnd.ms-pkiseccat', 'application/vnd.ms-pki.seccat']],
['cc', ['text/plain', 'text/x-c']],
['ccad', 'application/clariscad'],
['cco', 'application/x-cocoa'],
['ccxml', 'application/ccxml+xml,'],
['cdbcmsg', 'application/vnd.contact.cmsg'],
['cdf', ['application/cdf', 'application/x-cdf', 'application/x-netcdf']],
['cdkey', 'application/vnd.mediastation.cdkey'],
['cdmia', 'application/cdmi-capability'],
['cdmic', 'application/cdmi-container'],
['cdmid', 'application/cdmi-domain'],
['cdmio', 'application/cdmi-object'],
['cdmiq', 'application/cdmi-queue'],
['cdx', 'chemical/x-cdx'],
['cdxml', 'application/vnd.chemdraw+xml'],
['cdy', 'application/vnd.cinderella'],
['cer', ['application/pkix-cert', 'application/x-x509-ca-cert']],
['cgm', 'image/cgm'],
['cha', 'application/x-chat'],
['chat', 'application/x-chat'],
['chm', 'application/vnd.ms-htmlhelp'],
['chrt', 'application/vnd.kde.kchart'],
['cif', 'chemical/x-cif'],
['cii', 'application/vnd.anser-web-certificate-issue-initiation'],
['cil', 'application/vnd.ms-artgalry'],
['cla', 'application/vnd.claymore'],
['class', ['application/octet-stream', 'application/java', 'application/java-byte-code', 'application/java-vm', 'application/x-java-class']],
['clkk', 'application/vnd.crick.clicker.keyboard'],
['clkp', 'application/vnd.crick.clicker.palette'],
['clkt', 'application/vnd.crick.clicker.template'],
['clkw', 'application/vnd.crick.clicker.wordbank'],
['clkx', 'application/vnd.crick.clicker'],
['clp', 'application/x-msclip'],
['cmc', 'application/vnd.cosmocaller'],
['cmdf', 'chemical/x-cmdf'],
['cml', 'chemical/x-cml'],
['cmp', 'application/vnd.yellowriver-custom-menu'],
['cmx', 'image/x-cmx'],
['cod', ['image/cis-cod', 'application/vnd.rim.cod']],
['com', ['application/octet-stream', 'text/plain']],
['conf', 'text/plain'],
['cpio', 'application/x-cpio'],
['cpp', 'text/x-c'],
['cpt', ['application/mac-compactpro', 'application/x-compactpro', 'application/x-cpt']],
['crd', 'application/x-mscardfile'],
['crl', ['application/pkix-crl', 'application/pkcs-crl']],
['crt', ['application/pkix-cert', 'application/x-x509-user-cert', 'application/x-x509-ca-cert']],
['cryptonote', 'application/vnd.rig.cryptonote'],
['csh', ['text/x-script.csh', 'application/x-csh']],
['csml', 'chemical/x-csml'],
['csp', 'application/vnd.commonspace'],
['css', ['text/css', 'application/x-pointplus']],
['csv', 'text/csv'],
['cu', 'application/cu-seeme'],
['curl', 'text/vnd.curl'],
['cww', 'application/prs.cww'],
['cxx', 'text/plain'],
['dae', 'model/vnd.collada+xml'],
['daf', 'application/vnd.mobius.daf'],
['davmount', 'application/davmount+xml'],
['dcr', 'application/x-director'],
['dcurl', 'text/vnd.curl.dcurl'],
['dd2', 'application/vnd.oma.dd2+xml'],
['ddd', 'application/vnd.fujixerox.ddd'],
['deb', 'application/x-debian-package'],
['deepv', 'application/x-deepv'],
['def', 'text/plain'],
['der', 'application/x-x509-ca-cert'],
['dfac', 'application/vnd.dreamfactory'],
['dif', 'video/x-dv'],
['dir', 'application/x-director'],
['dis', 'application/vnd.mobius.dis'],
['djvu', 'image/vnd.djvu'],
['dl', ['video/dl', 'video/x-dl']],
['dll', 'application/x-msdownload'],
['dms', 'application/octet-stream'],
['dna', 'application/vnd.dna'],
['doc', 'application/msword'],
['docm', 'application/vnd.ms-word.document.macroenabled.12'],
['docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'],
['dot', 'application/msword'],
['dotm', 'application/vnd.ms-word.template.macroenabled.12'],
['dotx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.template'],
['dp', ['application/commonground', 'application/vnd.osgi.dp']],
['dpg', 'application/vnd.dpgraph'],
['dra', 'audio/vnd.dra'],
['drw', 'application/drafting'],
['dsc', 'text/prs.lines.tag'],
['dssc', 'application/dssc+der'],
['dtb', 'application/x-dtbook+xml'],
['dtd', 'application/xml-dtd'],
['dts', 'audio/vnd.dts'],
['dtshd', 'audio/vnd.dts.hd'],
['dump', 'application/octet-stream'],
['dv', 'video/x-dv'],
['dvi', 'application/x-dvi'],
['dwf', ['model/vnd.dwf', 'drawing/x-dwf']],
['dwg', ['application/acad', 'image/vnd.dwg', 'image/x-dwg']],
['dxf', ['application/dxf', 'image/vnd.dwg', 'image/vnd.dxf', 'image/x-dwg']],
['dxp', 'application/vnd.spotfire.dxp'],
['dxr', 'application/x-director'],
['ecelp4800', 'audio/vnd.nuera.ecelp4800'],
['ecelp7470', 'audio/vnd.nuera.ecelp7470'],
['ecelp9600', 'audio/vnd.nuera.ecelp9600'],
['edm', 'application/vnd.novadigm.edm'],
['edx', 'application/vnd.novadigm.edx'],
['efif', 'application/vnd.picsel'],
['ei6', 'application/vnd.pg.osasli'],
['el', 'text/x-script.elisp'],
['elc', ['application/x-elc', 'application/x-bytecode.elisp']],
['eml', 'message/rfc822'],
['emma', 'application/emma+xml'],
['env', 'application/x-envoy'],
['eol', 'audio/vnd.digital-winds'],
['eot', 'application/vnd.ms-fontobject'],
['eps', 'application/postscript'],
['epub', 'application/epub+zip'],
['es', ['application/ecmascript', 'application/x-esrehber']],
['es3', 'application/vnd.eszigno3+xml'],
['esf', 'application/vnd.epson.esf'],
['etx', 'text/x-setext'],
['evy', ['application/envoy', 'application/x-envoy']],
['exe', ['application/octet-stream', 'application/x-msdownload']],
['exi', 'application/exi'],
['ext', 'application/vnd.novadigm.ext'],
['ez2', 'application/vnd.ezpix-album'],
['ez3', 'application/vnd.ezpix-package'],
['f', ['text/plain', 'text/x-fortran']],
['f4v', 'video/x-f4v'],
['f77', 'text/x-fortran'],
['f90', ['text/plain', 'text/x-fortran']],
['fbs', 'image/vnd.fastbidsheet'],
['fcs', 'application/vnd.isac.fcs'],
['fdf', 'application/vnd.fdf'],
['fe_launch', 'application/vnd.denovo.fcselayout-link'],
['fg5', 'application/vnd.fujitsu.oasysgp'],
['fh', 'image/x-freehand'],
['fif', ['application/fractals', 'image/fif']],
['fig', 'application/x-xfig'],
['fli', ['video/fli', 'video/x-fli']],
['flo', ['image/florian', 'application/vnd.micrografx.flo']],
['flr', 'x-world/x-vrml'],
['flv', 'video/x-flv'],
['flw', 'application/vnd.kde.kivio'],
['flx', 'text/vnd.fmi.flexstor'],
['fly', 'text/vnd.fly'],
['fm', 'application/vnd.framemaker'],
['fmf', 'video/x-atomic3d-feature'],
['fnc', 'application/vnd.frogans.fnc'],
['for', ['text/plain', 'text/x-fortran']],
['fpx', ['image/vnd.fpx', 'image/vnd.net-fpx']],
['frl', 'application/freeloader'],
['fsc', 'application/vnd.fsc.weblaunch'],
['fst', 'image/vnd.fst'],
['ftc', 'application/vnd.fluxtime.clip'],
['fti', 'application/vnd.anser-web-funds-transfer-initiation'],
['funk', 'audio/make'],
['fvt', 'video/vnd.fvt'],
['fxp', 'application/vnd.adobe.fxp'],
['fzs', 'application/vnd.fuzzysheet'],
['g', 'text/plain'],
['g2w', 'application/vnd.geoplan'],
['g3', 'image/g3fax'],
['g3w', 'application/vnd.geospace'],
['gac', 'application/vnd.groove-account'],
['gdl', 'model/vnd.gdl'],
['geo', 'application/vnd.dynageo'],
['gex', 'application/vnd.geometry-explorer'],
['ggb', 'application/vnd.geogebra.file'],
['ggt', 'application/vnd.geogebra.tool'],
['ghf', 'application/vnd.groove-help'],
['gif', 'image/gif'],
['gim', 'application/vnd.groove-identity-message'],
['gl', ['video/gl', 'video/x-gl']],
['gmx', 'application/vnd.gmx'],
['gnumeric', 'application/x-gnumeric'],
['gph', 'application/vnd.flographit'],
['gqf', 'application/vnd.grafeq'],
['gram', 'application/srgs'],
['grv', 'application/vnd.groove-injector'],
['grxml', 'application/srgs+xml'],
['gsd', 'audio/x-gsm'],
['gsf', 'application/x-font-ghostscript'],
['gsm', 'audio/x-gsm'],
['gsp', 'application/x-gsp'],
['gss', 'application/x-gss'],
['gtar', 'application/x-gtar'],
['gtm', 'application/vnd.groove-tool-message'],
['gtw', 'model/vnd.gtw'],
['gv', 'text/vnd.graphviz'],
['gxt', 'application/vnd.geonext'],
['gz', ['application/x-gzip', 'application/x-compressed']],
['gzip', ['multipart/x-gzip', 'application/x-gzip']],
['h', ['text/plain', 'text/x-h']],
['h261', 'video/h261'],
['h263', 'video/h263'],
['h264', 'video/h264'],
['hal', 'application/vnd.hal+xml'],
['hbci', 'application/vnd.hbci'],
['hdf', 'application/x-hdf'],
['help', 'application/x-helpfile'],
['hgl', 'application/vnd.hp-hpgl'],
['hh', ['text/plain', 'text/x-h']],
['hlb', 'text/x-script'],
['hlp', ['application/winhlp', 'application/hlp', 'application/x-helpfile', 'application/x-winhelp']],
['hpg', 'application/vnd.hp-hpgl'],
['hpgl', 'application/vnd.hp-hpgl'],
['hpid', 'application/vnd.hp-hpid'],
['hps', 'application/vnd.hp-hps'],
[
'hqx',
[
'application/mac-binhex40',
'application/binhex',
'application/binhex4',
'application/mac-binhex',
'application/x-binhex40',
'application/x-mac-binhex40'
]
],
['hta', 'application/hta'],
['htc', 'text/x-component'],
['htke', 'application/vnd.kenameaapp'],
['htm', 'text/html'],
['html', 'text/html'],
['htmls', 'text/html'],
['htt', 'text/webviewhtml'],
['htx', 'text/html'],
['hvd', 'application/vnd.yamaha.hv-dic'],
['hvp', 'application/vnd.yamaha.hv-voice'],
['hvs', 'application/vnd.yamaha.hv-script'],
['i2g', 'application/vnd.intergeo'],
['icc', 'application/vnd.iccprofile'],
['ice', 'x-conference/x-cooltalk'],
['ico', 'image/x-icon'],
['ics', 'text/calendar'],
['idc', 'text/plain'],
['ief', 'image/ief'],
['iefs', 'image/ief'],
['ifm', 'application/vnd.shana.informed.formdata'],
['iges', ['application/iges', 'model/iges']],
['igl', 'application/vnd.igloader'],
['igm', 'application/vnd.insors.igm'],
['igs', ['application/iges', 'model/iges']],
['igx', 'application/vnd.micrografx.igx'],
['iif', 'application/vnd.shana.informed.interchange'],
['iii', 'application/x-iphone'],
['ima', 'application/x-ima'],
['imap', 'application/x-httpd-imap'],
['imp', 'application/vnd.accpac.simply.imp'],
['ims', 'application/vnd.ms-ims'],
['inf', 'application/inf'],
['ins', ['application/x-internet-signup', 'application/x-internett-signup']],
['ip', 'application/x-ip2'],
['ipfix', 'application/ipfix'],
['ipk', 'application/vnd.shana.informed.package'],
['irm', 'application/vnd.ibm.rights-management'],
['irp', 'application/vnd.irepository.package+xml'],
['isp', 'application/x-internet-signup'],
['isu', 'video/x-isvideo'],
['it', 'audio/it'],
['itp', 'application/vnd.shana.informed.formtemplate'],
['iv', 'application/x-inventor'],
['ivp', 'application/vnd.immervision-ivp'],
['ivr', 'i-world/i-vrml'],
['ivu', 'application/vnd.immervision-ivu'],
['ivy', 'application/x-livescreen'],
['jad', 'text/vnd.sun.j2me.routes-descriptor'],
['jam', ['application/vnd.jam', 'audio/x-jam']],
['jar', 'application/java-archive'],
['jav', ['text/plain', 'text/x-java-source']],
['java', ['text/plain', 'text/x-java-source,java', 'text/x-java-source']],
['jcm', 'application/x-java-commerce'],
['jfif', ['image/pipeg', 'image/jpeg', 'image/pjpeg']],
['jfif-tbnl', 'image/jpeg'],
['jisp', 'application/vnd.jisp'],
['jlt', 'application/vnd.hp-jlyt'],
['jnlp', 'application/x-java-jnlp-file'],
['joda', 'application/vnd.joost.joda-archive'],
['jpe', ['image/jpeg', 'image/pjpeg']],
['jpeg', ['image/jpeg', 'image/pjpeg']],
['jpg', ['image/jpeg', 'image/pjpeg']],
['jpgv', 'video/jpeg'],
['jpm', 'video/jpm'],
['jps', 'image/x-jps'],
['js', ['application/javascript', 'application/ecmascript', 'text/javascript', 'text/ecmascript', 'application/x-javascript']],
['json', 'application/json'],
['jut', 'image/jutvision'],
['kar', ['audio/midi', 'music/x-karaoke']],
['karbon', 'application/vnd.kde.karbon'],
['kfo', 'application/vnd.kde.kformula'],
['kia', 'application/vnd.kidspiration'],
['kml', 'application/vnd.google-earth.kml+xml'],
['kmz', 'application/vnd.google-earth.kmz'],
['kne', 'application/vnd.kinar'],
['kon', 'application/vnd.kde.kontour'],
['kpr', 'application/vnd.kde.kpresenter'],
['ksh', ['application/x-ksh', 'text/x-script.ksh']],
['ksp', 'application/vnd.kde.kspread'],
['ktx', 'image/ktx'],
['ktz', 'application/vnd.kahootz'],
['kwd', 'application/vnd.kde.kword'],
['la', ['audio/nspaudio', 'audio/x-nspaudio']],
['lam', 'audio/x-liveaudio'],
['lasxml', 'application/vnd.las.las+xml'],
['latex', 'application/x-latex'],
['lbd', 'application/vnd.llamagraphics.life-balance.desktop'],
['lbe', 'application/vnd.llamagraphics.life-balance.exchange+xml'],
['les', 'application/vnd.hhe.lesson-player'],
['lha', ['application/octet-stream', 'application/lha', 'application/x-lha']],
['lhx', 'application/octet-stream'],
['link66', 'application/vnd.route66.link66+xml'],
['list', 'text/plain'],
['lma', ['audio/nspaudio', 'audio/x-nspaudio']],
['log', 'text/plain'],
['lrm', 'application/vnd.ms-lrm'],
['lsf', 'video/x-la-asf'],
['lsp', ['application/x-lisp', 'text/x-script.lisp']],
['lst', 'text/plain'],
['lsx', ['video/x-la-asf', 'text/x-la-asf']],
['ltf', 'application/vnd.frogans.ltf'],
['ltx', 'application/x-latex'],
['lvp', 'audio/vnd.lucent.voice'],
['lwp', 'application/vnd.lotus-wordpro'],
['lzh', ['application/octet-stream', 'application/x-lzh']],
['lzx', ['application/lzx', 'application/octet-stream', 'application/x-lzx']],
['m', ['text/plain', 'text/x-m']],
['m13', 'application/x-msmediaview'],
['m14', 'application/x-msmediaview'],
['m1v', 'video/mpeg'],
['m21', 'application/mp21'],
['m2a', 'audio/mpeg'],
['m2v', 'video/mpeg'],
['m3u', ['audio/x-mpegurl', 'audio/x-mpequrl']],
['m3u8', 'application/vnd.apple.mpegurl'],
['m4v', 'video/x-m4v'],
['ma', 'application/mathematica'],
['mads', 'application/mads+xml'],
['mag', 'application/vnd.ecowin.chart'],
['man', 'application/x-troff-man'],
['map', 'application/x-navimap'],
['mar', 'text/plain'],
['mathml', 'application/mathml+xml'],
['mbd', 'application/mbedlet'],
['mbk', 'application/vnd.mobius.mbk'],
['mbox', 'application/mbox'],
['mc$', 'application/x-magic-cap-package-1.0'],
['mc1', 'application/vnd.medcalcdata'],
['mcd', ['application/mcad', 'application/vnd.mcd', 'application/x-mathcad']],
['mcf', ['image/vasa', 'text/mcf']],
['mcp', 'application/netmc'],
['mcurl', 'text/vnd.curl.mcurl'],
['mdb', 'application/x-msaccess'],
['mdi', 'image/vnd.ms-modi'],
['me', 'application/x-troff-me'],
['meta4', 'application/metalink4+xml'],
['mets', 'application/mets+xml'],
['mfm', 'application/vnd.mfmp'],
['mgp', 'application/vnd.osgeo.mapguide.package'],
['mgz', 'application/vnd.proteus.magazine'],
['mht', 'message/rfc822'],
['mhtml', 'message/rfc822'],
['mid', ['audio/mid', 'audio/midi', 'music/crescendo', 'x-music/x-midi', 'audio/x-midi', 'application/x-midi', 'audio/x-mid']],
['midi', ['audio/midi', 'music/crescendo', 'x-music/x-midi', 'audio/x-midi', 'application/x-midi', 'audio/x-mid']],
['mif', ['application/vnd.mif', 'application/x-mif', 'application/x-frame']],
['mime', ['message/rfc822', 'www/mime']],
['mj2', 'video/mj2'],
['mjf', 'audio/x-vnd.audioexplosion.mjuicemediafile'],
['mjpg', 'video/x-motion-jpeg'],
['mlp', 'application/vnd.dolby.mlp'],
['mm', ['application/base64', 'application/x-meme']],
['mmd', 'application/vnd.chipnuts.karaoke-mmd'],
['mme', 'application/base64'],
['mmf', 'application/vnd.smaf'],
['mmr', 'image/vnd.fujixerox.edmics-mmr'],
['mny', 'application/x-msmoney'],
['mod', ['audio/mod', 'audio/x-mod']],
['mods', 'application/mods+xml'],
['moov', 'video/quicktime'],
['mov', 'video/quicktime'],
['movie', 'video/x-sgi-movie'],
['mp2', ['video/mpeg', 'audio/mpeg', 'video/x-mpeg', 'audio/x-mpeg', 'video/x-mpeq2a']],
['mp3', ['audio/mpeg', 'audio/mpeg3', 'video/mpeg', 'audio/x-mpeg-3', 'video/x-mpeg']],
['mp4', ['video/mp4', 'application/mp4']],
['mp4a', 'audio/mp4'],
['mpa', ['video/mpeg', 'audio/mpeg']],
['mpc', ['application/vnd.mophun.certificate', 'application/x-project']],
['mpe', 'video/mpeg'],
['mpeg', 'video/mpeg'],
['mpg', ['video/mpeg', 'audio/mpeg']],
['mpga', 'audio/mpeg'],
['mpkg', 'application/vnd.apple.installer+xml'],
['mpm', 'application/vnd.blueice.multipass'],
['mpn', 'application/vnd.mophun.application'],
['mpp', 'application/vnd.ms-project'],
['mpt', 'application/x-project'],
['mpv', 'application/x-project'],
['mpv2', 'video/mpeg'],
['mpx', 'application/x-project'],
['mpy', 'application/vnd.ibm.minipay'],
['mqy', 'application/vnd.mobius.mqy'],
['mrc', 'application/marc'],
['mrcx', 'application/marcxml+xml'],
['ms', 'application/x-troff-ms'],
['mscml', 'application/mediaservercontrol+xml'],
['mseq', 'application/vnd.mseq'],
['msf', 'application/vnd.epson.msf'],
['msg', 'application/vnd.ms-outlook'],
['msh', 'model/mesh'],
['msl', 'application/vnd.mobius.msl'],
['msty', 'application/vnd.muvee.style'],
['mts', 'model/vnd.mts'],
['mus', 'application/vnd.musician'],
['musicxml', 'application/vnd.recordare.musicxml+xml'],
['mv', 'video/x-sgi-movie'],
['mvb', 'application/x-msmediaview'],
['mwf', 'application/vnd.mfer'],
['mxf', 'application/mxf'],
['mxl', 'application/vnd.recordare.musicxml'],
['mxml', 'application/xv+xml'],
['mxs', 'application/vnd.triscape.mxs'],
['mxu', 'video/vnd.mpegurl'],
['my', 'audio/make'],
['mzz', 'application/x-vnd.audioexplosion.mzz'],
['n-gage', 'application/vnd.nokia.n-gage.symbian.install'],
['n3', 'text/n3'],
['nap', 'image/naplps'],
['naplps', 'image/naplps'],
['nbp', 'application/vnd.wolfram.player'],
['nc', 'application/x-netcdf'],
['ncm', 'application/vnd.nokia.configuration-message'],
['ncx', 'application/x-dtbncx+xml'],
['ngdat', 'application/vnd.nokia.n-gage.data'],
['nif', 'image/x-niff'],
['niff', 'image/x-niff'],
['nix', 'application/x-mix-transfer'],
['nlu', 'application/vnd.neurolanguage.nlu'],
['nml', 'application/vnd.enliven'],
['nnd', 'application/vnd.noblenet-directory'],
['nns', 'application/vnd.noblenet-sealer'],
['nnw', 'application/vnd.noblenet-web'],
['npx', 'image/vnd.net-fpx'],
['nsc', 'application/x-conference'],
['nsf', 'application/vnd.lotus-notes'],
['nvd', 'application/x-navidoc'],
['nws', 'message/rfc822'],
['o', 'application/octet-stream'],
['oa2', 'application/vnd.fujitsu.oasys2'],
['oa3', 'application/vnd.fujitsu.oasys3'],
['oas', 'application/vnd.fujitsu.oasys'],
['obd', 'application/x-msbinder'],
['oda', 'application/oda'],
['odb', 'application/vnd.oasis.opendocument.database'],
['odc', 'application/vnd.oasis.opendocument.chart'],
['odf', 'application/vnd.oasis.opendocument.formula'],
['odft', 'application/vnd.oasis.opendocument.formula-template'],
['odg', 'application/vnd.oasis.opendocument.graphics'],
['odi', 'application/vnd.oasis.opendocument.image'],
['odm', 'application/vnd.oasis.opendocument.text-master'],
['odp', 'application/vnd.oasis.opendocument.presentation'],
['ods', 'application/vnd.oasis.opendocument.spreadsheet'],
['odt', 'application/vnd.oasis.opendocument.text'],
['oga', 'audio/ogg'],
['ogv', 'video/ogg'],
['ogx', 'application/ogg'],
['omc', 'application/x-omc'],
['omcd', 'application/x-omcdatamaker'],
['omcr', 'application/x-omcregerator'],
['onetoc', 'application/onenote'],
['opf', 'application/oebps-package+xml'],
['org', 'application/vnd.lotus-organizer'],
['osf', 'application/vnd.yamaha.openscoreformat'],
['osfpvg', 'application/vnd.yamaha.openscoreformat.osfpvg+xml'],
['otc', 'application/vnd.oasis.opendocument.chart-template'],
['otf', 'application/x-font-otf'],
['otg', 'application/vnd.oasis.opendocument.graphics-template'],
['oth', 'application/vnd.oasis.opendocument.text-web'],
['oti', 'application/vnd.oasis.opendocument.image-template'],
['otp', 'application/vnd.oasis.opendocument.presentation-template'],
['ots', 'application/vnd.oasis.opendocument.spreadsheet-template'],
['ott', 'application/vnd.oasis.opendocument.text-template'],
['oxt', 'application/vnd.openofficeorg.extension'],
['p', 'text/x-pascal'],
['p10', ['application/pkcs10', 'application/x-pkcs10']],
['p12', ['application/pkcs-12', 'application/x-pkcs12']],
['p7a', 'application/x-pkcs7-signature'],
['p7b', 'application/x-pkcs7-certificates'],
['p7c', ['application/pkcs7-mime', 'application/x-pkcs7-mime']],
['p7m', ['application/pkcs7-mime', 'application/x-pkcs7-mime']],
['p7r', 'application/x-pkcs7-certreqresp'],
['p7s', ['application/pkcs7-signature', 'application/x-pkcs7-signature']],
['p8', 'application/pkcs8'],
['par', 'text/plain-bas'],
['part', 'application/pro_eng'],
['pas', 'text/pascal'],
['paw', 'application/vnd.pawaafile'],
['pbd', 'application/vnd.powerbuilder6'],
['pbm', 'image/x-portable-bitmap'],
['pcf', 'application/x-font-pcf'],
['pcl', ['application/vnd.hp-pcl', 'application/x-pcl']],
['pclxl', 'application/vnd.hp-pclxl'],
['pct', 'image/x-pict'],
['pcurl', 'application/vnd.curl.pcurl'],
['pcx', 'image/x-pcx'],
['pdb', ['application/vnd.palm', 'chemical/x-pdb']],
['pdf', 'application/pdf'],
['pfa', 'application/x-font-type1'],
['pfr', 'application/font-tdpfr'],
['pfunk', ['audio/make', 'audio/make.my.funk']],
['pfx', 'application/x-pkcs12'],
['pgm', ['image/x-portable-graymap', 'image/x-portable-greymap']],
['pgn', 'application/x-chess-pgn'],
['pgp', 'application/pgp-signature'],
['pic', ['image/pict', 'image/x-pict']],
['pict', 'image/pict'],
['pkg', 'application/x-newton-compatible-pkg'],
['pki', 'application/pkixcmp'],
['pkipath', 'application/pkix-pkipath'],
['pko', ['application/ynd.ms-pkipko', 'application/vnd.ms-pki.pko']],
['pl', ['text/plain', 'text/x-script.perl']],
['plb', 'application/vnd.3gpp.pic-bw-large'],
['plc', 'application/vnd.mobius.plc'],
['plf', 'application/vnd.pocketlearn'],
['pls', 'application/pls+xml'],
['plx', 'application/x-pixclscript'],
['pm', ['text/x-script.perl-module', 'image/x-xpixmap']],
['pm4', 'application/x-pagemaker'],
['pm5', 'application/x-pagemaker'],
['pma', 'application/x-perfmon'],
['pmc', 'application/x-perfmon'],
['pml', ['application/vnd.ctc-posml', 'application/x-perfmon']],
['pmr', 'application/x-perfmon'],
['pmw', 'application/x-perfmon'],
['png', 'image/png'],
['pnm', ['application/x-portable-anymap', 'image/x-portable-anymap']],
['portpkg', 'application/vnd.macports.portpkg'],
['pot', ['application/vnd.ms-powerpoint', 'application/mspowerpoint']],
['potm', 'application/vnd.ms-powerpoint.template.macroenabled.12'],
['potx', 'application/vnd.openxmlformats-officedocument.presentationml.template'],
['pov', 'model/x-pov'],
['ppa', 'application/vnd.ms-powerpoint'],
['ppam', 'application/vnd.ms-powerpoint.addin.macroenabled.12'],
['ppd', 'application/vnd.cups-ppd'],
['ppm', 'image/x-portable-pixmap'],
['pps', ['application/vnd.ms-powerpoint', 'application/mspowerpoint']],
['ppsm', 'application/vnd.ms-powerpoint.slideshow.macroenabled.12'],
['ppsx', 'application/vnd.openxmlformats-officedocument.presentationml.slideshow'],
['ppt', ['application/vnd.ms-powerpoint', 'application/mspowerpoint', 'application/powerpoint', 'application/x-mspowerpoint']],
['pptm', 'application/vnd.ms-powerpoint.presentation.macroenabled.12'],
['pptx', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'],
['ppz', 'application/mspowerpoint'],
['prc', 'application/x-mobipocket-ebook'],
['pre', ['application/vnd.lotus-freelance', 'application/x-freelance']],
['prf', 'application/pics-rules'],
['prt', 'application/pro_eng'],
['ps', 'application/postscript'],
['psb', 'application/vnd.3gpp.pic-bw-small'],
['psd', ['application/octet-stream', 'image/vnd.adobe.photoshop']],
['psf', 'application/x-font-linux-psf'],
['pskcxml', 'application/pskc+xml'],
['ptid', 'application/vnd.pvi.ptid1'],
['pub', 'application/x-mspublisher'],
['pvb', 'application/vnd.3gpp.pic-bw-var'],
['pvu', 'paleovu/x-pv'],
['pwn', 'application/vnd.3m.post-it-notes'],
['pwz', 'application/vnd.ms-powerpoint'],
['py', 'text/x-script.phyton'],
['pya', 'audio/vnd.ms-playready.media.pya'],
['pyc', 'applicaiton/x-bytecode.python'],
['pyv', 'video/vnd.ms-playready.media.pyv'],
['qam', 'application/vnd.epson.quickanime'],
['qbo', 'application/vnd.intu.qbo'],
['qcp', 'audio/vnd.qcelp'],
['qd3', 'x-world/x-3dmf'],
['qd3d', 'x-world/x-3dmf'],
['qfx', 'application/vnd.intu.qfx'],
['qif', 'image/x-quicktime'],
['qps', 'application/vnd.publishare-delta-tree'],
['qt', 'video/quicktime'],
['qtc', 'video/x-qtc'],
['qti', 'image/x-quicktime'],
['qtif', 'image/x-quicktime'],
['qxd', 'application/vnd.quark.quarkxpress'],
['ra', ['audio/x-realaudio', 'audio/x-pn-realaudio', 'audio/x-pn-realaudio-plugin']],
['ram', 'audio/x-pn-realaudio'],
['rar', 'application/x-rar-compressed'],
['ras', ['image/cmu-raster', 'application/x-cmu-raster', 'image/x-cmu-raster']],
['rast', 'image/cmu-raster'],
['rcprofile', 'application/vnd.ipunplugged.rcprofile'],
['rdf', 'application/rdf+xml'],
['rdz', 'application/vnd.data-vision.rdz'],
['rep', 'application/vnd.businessobjects'],
['res', 'application/x-dtbresource+xml'],
['rexx', 'text/x-script.rexx'],
['rf', 'image/vnd.rn-realflash'],
['rgb', 'image/x-rgb'],
['rif', 'application/reginfo+xml'],
['rip', 'audio/vnd.rip'],
['rl', 'application/resource-lists+xml'],
['rlc', 'image/vnd.fujixerox.edmics-rlc'],
['rld', 'application/resource-lists-diff+xml'],
['rm', ['application/vnd.rn-realmedia', 'audio/x-pn-realaudio']],
['rmi', 'audio/mid'],
['rmm', 'audio/x-pn-realaudio'],
['rmp', ['audio/x-pn-realaudio-plugin', 'audio/x-pn-realaudio']],
['rms', 'application/vnd.jcp.javame.midlet-rms'],
['rnc', 'application/relax-ng-compact-syntax'],
['rng', ['application/ringing-tones', 'application/vnd.nokia.ringing-tone']],
['rnx', 'application/vnd.rn-realplayer'],
['roff', 'application/x-troff'],
['rp', 'image/vnd.rn-realpix'],
['rp9', 'application/vnd.cloanto.rp9'],
['rpm', 'audio/x-pn-realaudio-plugin'],
['rpss', 'application/vnd.nokia.radio-presets'],
['rpst', 'application/vnd.nokia.radio-preset'],
['rq', 'application/sparql-query'],
['rs', 'application/rls-services+xml'],
['rsd', 'application/rsd+xml'],
['rt', ['text/richtext', 'text/vnd.rn-realtext']],
['rtf', ['application/rtf', 'text/richtext', 'application/x-rtf']],
['rtx', ['text/richtext', 'application/rtf']],
['rv', 'video/vnd.rn-realvideo'],
['s', 'text/x-asm'],
['s3m', 'audio/s3m'],
['saf', 'application/vnd.yamaha.smaf-audio'],
['saveme', 'application/octet-stream'],
['sbk', 'application/x-tbook'],
['sbml', 'application/sbml+xml'],
['sc', 'application/vnd.ibm.secure-container'],
['scd', 'application/x-msschedule'],
['scm', ['application/vnd.lotus-screencam', 'video/x-scm', 'text/x-script.guile', 'application/x-lotusscreencam', 'text/x-script.scheme']],
['scq', 'application/scvp-cv-request'],
['scs', 'application/scvp-cv-response'],
['sct', 'text/scriptlet'],
['scurl', 'text/vnd.curl.scurl'],
['sda', 'application/vnd.stardivision.draw'],
['sdc', 'application/vnd.stardivision.calc'],
['sdd', 'application/vnd.stardivision.impress'],
['sdkm', 'application/vnd.solent.sdkm+xml'],
['sdml', 'text/plain'],
['sdp', ['application/sdp', 'application/x-sdp']],
['sdr', 'application/sounder'],
['sdw', 'application/vnd.stardivision.writer'],
['sea', ['application/sea', 'application/x-sea']],
['see', 'application/vnd.seemail'],
['seed', 'application/vnd.fdsn.seed'],
['sema', 'application/vnd.sema'],
['semd', 'application/vnd.semd'],
['semf', 'application/vnd.semf'],
['ser', 'application/java-serialized-object'],
['set', 'application/set'],
['setpay', 'application/set-payment-initiation'],
['setreg', 'application/set-registration-initiation'],
['sfd-hdstx', 'application/vnd.hydrostatix.sof-data'],
['sfs', 'application/vnd.spotfire.sfs'],
['sgl', 'application/vnd.stardivision.writer-global'],
['sgm', ['text/sgml', 'text/x-sgml']],
['sgml', ['text/sgml', 'text/x-sgml']],
['sh', ['application/x-shar', 'application/x-bsh', 'application/x-sh', 'text/x-script.sh']],
['shar', ['application/x-bsh', 'application/x-shar']],
['shf', 'application/shf+xml'],
['shtml', ['text/html', 'text/x-server-parsed-html']],
['sid', 'audio/x-psid'],
['sis', 'application/vnd.symbian.install'],
['sit', ['application/x-stuffit', 'application/x-sit']],
['sitx', 'application/x-stuffitx'],
['skd', 'application/x-koan'],
['skm', 'application/x-koan'],
['skp', ['application/vnd.koan', 'application/x-koan']],
['skt', 'application/x-koan'],
['sl', 'application/x-seelogo'],
['sldm', 'application/vnd.ms-powerpoint.slide.macroenabled.12'],
['sldx', 'application/vnd.openxmlformats-officedocument.presentationml.slide'],
['slt', 'application/vnd.epson.salt'],
['sm', 'application/vnd.stepmania.stepchart'],
['smf', 'application/vnd.stardivision.math'],
['smi', ['application/smil', 'application/smil+xml']],
['smil', 'application/smil'],
['snd', ['audio/basic', 'audio/x-adpcm']],
['snf', 'application/x-font-snf'],
['sol', 'application/solids'],
['spc', ['text/x-speech', 'application/x-pkcs7-certificates']],
['spf', 'application/vnd.yamaha.smaf-phrase'],
['spl', ['application/futuresplash', 'application/x-futuresplash']],
['spot', 'text/vnd.in3d.spot'],
['spp', 'application/scvp-vp-response'],
['spq', 'application/scvp-vp-request'],
['spr', 'application/x-sprite'],
['sprite', 'application/x-sprite'],
['src', 'application/x-wais-source'],
['sru', 'application/sru+xml'],
['srx', 'application/sparql-results+xml'],
['sse', 'application/vnd.kodak-descriptor'],
['ssf', 'application/vnd.epson.ssf'],
['ssi', 'text/x-server-parsed-html'],
['ssm', 'application/streamingmedia'],
['ssml', 'application/ssml+xml'],
['sst', ['application/vnd.ms-pkicertstore', 'application/vnd.ms-pki.certstore']],
['st', 'application/vnd.sailingtracker.track'],
['stc', 'application/vnd.sun.xml.calc.template'],
['std', 'application/vnd.sun.xml.draw.template'],
['step', 'application/step'],
['stf', 'application/vnd.wt.stf'],
['sti', 'application/vnd.sun.xml.impress.template'],
['stk', 'application/hyperstudio'],
['stl', ['application/vnd.ms-pkistl', 'application/sla', 'application/vnd.ms-pki.stl', 'application/x-navistyle']],
['stm', 'text/html'],
['stp', 'application/step'],
['str', 'application/vnd.pg.format'],
['stw', 'application/vnd.sun.xml.writer.template'],
['sub', 'image/vnd.dvb.subtitle'],
['sus', 'application/vnd.sus-calendar'],
['sv4cpio', 'application/x-sv4cpio'],
['sv4crc', 'application/x-sv4crc'],
['svc', 'application/vnd.dvb.service'],
['svd', 'application/vnd.svd'],
['svf', ['image/vnd.dwg', 'image/x-dwg']],
['svg', 'image/svg+xml'],
['svr', ['x-world/x-svr', 'application/x-world']],
['swf', 'application/x-shockwave-flash'],
['swi', 'application/vnd.aristanetworks.swi'],
['sxc', 'application/vnd.sun.xml.calc'],
['sxd', 'application/vnd.sun.xml.draw'],
['sxg', 'application/vnd.sun.xml.writer.global'],
['sxi', 'application/vnd.sun.xml.impress'],
['sxm', 'application/vnd.sun.xml.math'],
['sxw', 'application/vnd.sun.xml.writer'],
['t', ['text/troff', 'application/x-troff']],
['talk', 'text/x-speech'],
['tao', 'application/vnd.tao.intent-module-archive'],
['tar', 'application/x-tar'],
['tbk', ['application/toolbook', 'application/x-tbook']],
['tcap', 'application/vnd.3gpp2.tcap'],
['tcl', ['text/x-script.tcl', 'application/x-tcl']],
['tcsh', 'text/x-script.tcsh'],
['teacher', 'application/vnd.smart.teacher'],
['tei', 'application/tei+xml'],
['tex', 'application/x-tex'],
['texi', 'application/x-texinfo'],
['texinfo', 'application/x-texinfo'],
['text', ['application/plain', 'text/plain']],
['tfi', 'application/thraud+xml'],
['tfm', 'application/x-tex-tfm'],
['tgz', ['application/gnutar', 'application/x-compressed']],
['thmx', 'application/vnd.ms-officetheme'],
['tif', ['image/tiff', 'image/x-tiff']],
['tiff', ['image/tiff', 'image/x-tiff']],
['tmo', 'application/vnd.tmobile-livetv'],
['torrent', 'application/x-bittorrent'],
['tpl', 'application/vnd.groove-tool-template'],
['tpt', 'application/vnd.trid.tpt'],
['tr', 'application/x-troff'],
['tra', 'application/vnd.trueapp'],
['trm', 'application/x-msterminal'],
['tsd', 'application/timestamped-data'],
['tsi', 'audio/tsp-audio'],
['tsp', ['application/dsptype', 'audio/tsplayer']],
['tsv', 'text/tab-separated-values'],
['ttf', 'application/x-font-ttf'],
['ttl', 'text/turtle'],
['turbot', 'image/florian'],
['twd', 'application/vnd.simtech-mindmapper'],
['txd', 'application/vnd.genomatix.tuxedo'],
['txf', 'application/vnd.mobius.txf'],
['txt', 'text/plain'],
['ufd', 'application/vnd.ufdl'],
['uil', 'text/x-uil'],
['uls', 'text/iuls'],
['umj', 'application/vnd.umajin'],
['uni', 'text/uri-list'],
['unis', 'text/uri-list'],
['unityweb', 'application/vnd.unity'],
['unv', 'application/i-deas'],
['uoml', 'application/vnd.uoml+xml'],
['uri', 'text/uri-list'],
['uris', 'text/uri-list'],
['ustar', ['application/x-ustar', 'multipart/x-ustar']],
['utz', 'application/vnd.uiq.theme'],
['uu', ['application/octet-stream', 'text/x-uuencode']],
['uue', 'text/x-uuencode'],
['uva', 'audio/vnd.dece.audio'],
['uvh', 'video/vnd.dece.hd'],
['uvi', 'image/vnd.dece.graphic'],
['uvm', 'video/vnd.dece.mobile'],
['uvp', 'video/vnd.dece.pd'],
['uvs', 'video/vnd.dece.sd'],
['uvu', 'video/vnd.uvvu.mp4'],
['uvv', 'video/vnd.dece.video'],
['vcd', 'application/x-cdlink'],
['vcf', 'text/x-vcard'],
['vcg', 'application/vnd.groove-vcard'],
['vcs', 'text/x-vcalendar'],
['vcx', 'application/vnd.vcx'],
['vda', 'application/vda'],
['vdo', 'video/vdo'],
['vew', 'application/groupwise'],
['vis', 'application/vnd.visionary'],
['viv', ['video/vivo', 'video/vnd.vivo']],
['vivo', ['video/vivo', 'video/vnd.vivo']],
['vmd', 'application/vocaltec-media-desc'],
['vmf', 'application/vocaltec-media-file'],
['voc', ['audio/voc', 'audio/x-voc']],
['vos', 'video/vosaic'],
['vox', 'audio/voxware'],
['vqe', 'audio/x-twinvq-plugin'],
['vqf', 'audio/x-twinvq'],
['vql', 'audio/x-twinvq-plugin'],
['vrml', ['model/vrml', 'x-world/x-vrml', 'application/x-vrml']],
['vrt', 'x-world/x-vrt'],
['vsd', ['application/vnd.visio', 'application/x-visio']],
['vsf', 'application/vnd.vsf'],
['vst', 'application/x-visio'],
['vsw', 'application/x-visio'],
['vtu', 'model/vnd.vtu'],
['vxml', 'application/voicexml+xml'],
['w60', 'application/wordperfect6.0'],
['w61', 'application/wordperfect6.1'],
['w6w', 'application/msword'],
['wad', 'application/x-doom'],
['wav', ['audio/wav', 'audio/x-wav']],
['wax', 'audio/x-ms-wax'],
['wb1', 'application/x-qpro'],
['wbmp', 'image/vnd.wap.wbmp'],
['wbs', 'application/vnd.criticaltools.wbs+xml'],
['wbxml', 'application/vnd.wap.wbxml'],
['wcm', 'application/vnd.ms-works'],
['wdb', 'application/vnd.ms-works'],
['web', 'application/vnd.xara'],
['weba', 'audio/webm'],
['webm', 'video/webm'],
['webp', 'image/webp'],
['wg', 'application/vnd.pmi.widget'],
['wgt', 'application/widget'],
['wiz', 'application/msword'],
['wk1', 'application/x-123'],
['wks', 'application/vnd.ms-works'],
['wm', 'video/x-ms-wm'],
['wma', 'audio/x-ms-wma'],
['wmd', 'application/x-ms-wmd'],
['wmf', ['windows/metafile', 'application/x-msmetafile']],
['wml', 'text/vnd.wap.wml'],
['wmlc', 'application/vnd.wap.wmlc'],
['wmls', 'text/vnd.wap.wmlscript'],
['wmlsc', 'application/vnd.wap.wmlscriptc'],
['wmv', 'video/x-ms-wmv'],
['wmx', 'video/x-ms-wmx'],
['wmz', 'application/x-ms-wmz'],
['woff', 'application/x-font-woff'],
['word', 'application/msword'],
['wp', 'application/wordperfect'],
['wp5', ['application/wordperfect', 'application/wordperfect6.0']],
['wp6', 'application/wordperfect'],
['wpd', ['application/wordperfect', 'application/vnd.wordperfect', 'application/x-wpwin']],
['wpl', 'application/vnd.ms-wpl'],
['wps', 'application/vnd.ms-works'],
['wq1', 'application/x-lotus'],
['wqd', 'application/vnd.wqd'],
['wri', ['application/mswrite', 'application/x-wri', 'application/x-mswrite']],
['wrl', ['model/vrml', 'x-world/x-vrml', 'application/x-world']],
['wrz', ['model/vrml', 'x-world/x-vrml']],
['wsc', 'text/scriplet'],
['wsdl', 'application/wsdl+xml'],
['wspolicy', 'application/wspolicy+xml'],
['wsrc', 'application/x-wais-source'],
['wtb', 'application/vnd.webturbo'],
['wtk', 'application/x-wintalk'],
['wvx', 'video/x-ms-wvx'],
['x-png', 'image/png'],
['x3d', 'application/vnd.hzn-3d-crossword'],
['xaf', 'x-world/x-vrml'],
['xap', 'application/x-silverlight-routes'],
['xar', 'application/vnd.xara'],
['xbap', 'application/x-ms-xbap'],
['xbd', 'application/vnd.fujixerox.docuworks.binder'],
['xbm', ['image/xbm', 'image/x-xbm', 'image/x-xbitmap']],
['xdf', 'application/xcap-diff+xml'],
['xdm', 'application/vnd.syncml.dm+xml'],
['xdp', 'application/vnd.adobe.xdp+xml'],
['xdr', 'video/x-amt-demorun'],
['xdssc', 'application/dssc+xml'],
['xdw', 'application/vnd.fujixerox.docuworks'],
['xenc', 'application/xenc+xml'],
['xer', 'application/patch-ops-error+xml'],
['xfdf', 'application/vnd.adobe.xfdf'],
['xfdl', 'application/vnd.xfdl'],
['xgz', 'xgl/drawing'],
['xhtml', 'application/xhtml+xml'],
['xif', 'image/vnd.xiff'],
['xl', 'application/excel'],
['xla', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],
['xlam', 'application/vnd.ms-excel.addin.macroenabled.12'],
['xlb', ['application/excel', 'application/vnd.ms-excel', 'application/x-excel']],
['xlc', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],
['xld', ['application/excel', 'application/x-excel']],
['xlk', ['application/excel', 'application/x-excel']],
['xll', ['application/excel', 'application/vnd.ms-excel', 'application/x-excel']],
['xlm', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],
['xls', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],
['xlsb', 'application/vnd.ms-excel.sheet.binary.macroenabled.12'],
['xlsm', 'application/vnd.ms-excel.sheet.macroenabled.12'],
['xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
['xlt', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],
['xltm', 'application/vnd.ms-excel.template.macroenabled.12'],
['xltx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.template'],
['xlv', ['application/excel', 'application/x-excel']],
['xlw', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],
['xm', 'audio/xm'],
['xml', ['application/xml', 'text/xml', 'application/atom+xml', 'application/rss+xml']],
['xmz', 'xgl/movie'],
['xo', 'application/vnd.olpc-sugar'],
['xof', 'x-world/x-vrml'],
['xop', 'application/xop+xml'],
['xpi', 'application/x-xpinstall'],
['xpix', 'application/x-vnd.ls-xpix'],
['xpm', ['image/xpm', 'image/x-xpixmap']],
['xpr', 'application/vnd.is-xpr'],
['xps', 'application/vnd.ms-xpsdocument'],
['xpw', 'application/vnd.intercon.formnet'],
['xslt', 'application/xslt+xml'],
['xsm', 'application/vnd.syncml+xml'],
['xspf', 'application/xspf+xml'],
['xsr', 'video/x-amt-showrun'],
['xul', 'application/vnd.mozilla.xul+xml'],
['xwd', ['image/x-xwd', 'image/x-xwindowdump']],
['xyz', ['chemical/x-xyz', 'chemical/x-pdb']],
['yang', 'application/yang'],
['yin', 'application/yin+xml'],
['z', ['application/x-compressed', 'application/x-compress']],
['zaz', 'application/vnd.zzazz.deck+xml'],
['zip', ['application/zip', 'multipart/x-zip', 'application/x-zip-compressed', 'application/x-compressed']],
['zir', 'application/vnd.zul'],
['zmm', 'application/vnd.handheld-entertainment+xml'],
['zoo', 'application/octet-stream'],
['zsh', 'text/x-script.zsh']
]);
module.exports = {
detectMimeType(filename) {
if (!filename) {
return defaultMimeType;
}
let parsed = path.parse(filename);
let extension = (parsed.ext.substr(1) || parsed.name || '')
.split('?')
.shift()
.trim()
.toLowerCase();
let value = defaultMimeType;
if (extensions.has(extension)) {
value = extensions.get(extension);
}
if (Array.isArray(value)) {
return value[0];
}
return value;
},
detectExtension(mimeType) {
if (!mimeType) {
return defaultExtension;
}
let parts = (mimeType || '')
.toLowerCase()
.trim()
.split('/');
let rootType = parts.shift().trim();
let subType = parts.join('/').trim();
if (mimeTypes.has(rootType + '/' + subType)) {
let value = mimeTypes.get(rootType + '/' + subType);
if (Array.isArray(value)) {
return value[0];
}
return value;
}
switch (rootType) {
case 'text':
return 'txt';
default:
return 'bin';
}
}
};
|
import React from 'react';
import styled from '@emotion/styled';
import CodeBlock from './codeBlock';
import AnchorTag from './anchor';
import FeaturesContainer from "./FeaturesContainer";
import Feature from './Feature';
import FlowStep from "./FlowStep";
import FlowService from './FlowService';
import YoutubeEmbed from './YoutubeEmbed';
import {css} from "@emotion/core";
const StyledPre = styled('pre')`
padding: 16px;
background: ${props => props.theme.colors.preFormattedText};
`;
export default {
h1: props => (<h1 className="heading1" id={props.children.replace(/\s+/g, '').toLowerCase()} {...props} />),
h2: props => (<h2 className="heading2" id={props.children.replace(/\s+/g, '').toLowerCase()} {...props} />),
h3: props => (<h3 className="heading3" id={props.children.replace(/\s+/g, '').toLowerCase()} {...props} />),
h4: props => (<h4 className="heading4" id={props.children.replace(/\s+/g, '').toLowerCase()} {...props} />),
h5: props => (<h5 className="heading5" id={props.children.replace(/\s+/g, '').toLowerCase()} {...props} />),
h6: props => (<h6 className="heading6" id={props.children.replace(/\s+/g, '').toLowerCase()} {...props} />),
p: props => <p className="paragraph" {...props} />,
pre: props => (<StyledPre>
<pre {...props} />
</StyledPre>),
code: CodeBlock,
a: AnchorTag,
img: props => <img {...props} css={css`border: 1px solid #cccccc;`}/>,
// TODO add `img`
// TODO add `blockquote`
// TODO add `ul`
// TODO add `li`
// TODO add `table`,
FeaturesContainer,
Feature,
FlowService,
FlowStep,
YoutubeEmbed
};
|
// Queue.h :
//////////////////////////////////////////////////////////////////////////
// Author : Francesco Rinaldi
// Created: Many many moons ago
// Purpose: doubly Linked List / Iterator class Implementation
//////////////////////////////////////////////////////////////////////////
#ifndef _LLIST_H_
#define _LLIST_H_
// forward declaration
template <typename Type> class LLIter;
// A Linked List.
template <typename Type>
class Queue
{
// friend declaration
friend class LLIter<Type>;
private:
// Define a Node Structure privately.
// Only LList and LLIter can use this.
struct Node
{
Type element;
Node *next;
Node *prev;
};
Node *head; // always keeps track of the beginning
// of the Linked List
Node *tail; // always keeps track of the end of the
// of the linked list
// dont forget a counter
int Max;
public:
// ctr : create the list as empty initially
Queue ()
{
head = tail = NULL;
Max = 0;
}
// dtr : destroy any memory list is using
~Queue ()
{
clear ();
}
// isEmpty : is list empty? (true/false)
bool isEmpty () { return (head == NULL); }
// enqueue : enqueue to beginning of singly linked list.
void enqueue (const Type &v)
{
Node *n = new Node;
n->element = v;
n->next = head;
n->prev = NULL;
if (!head)
{
head = tail = n;
}
else
{
head->prev = n;
head = n;
}
Max++;
}
// Remove something from the beginnin' o' our list.
//
// In: t Where to store the data.
//
// Out: t The value.
//
// Return: false if we're empty.
template <typename Type>
bool dequeue(Type &t)
{
if (!head)
// We're empty.
return false;
// Give 'em their data back:
t = tail->element;
Node *temp = tail;
tail = tail->prev;
if (tail)
{
tail->next = NULL;
delete temp;
}
else
{
delete temp;
head = tail = NULL;
}
// One less!
Max--;
return true;
}
int getMax()
{
return Max;
}
// clear : destroys all of the nodes.
// also called by dtr
void clear ()
{
while (!isEmpty())
{
Node *n = head;
head = head->next;
delete n;
}
tail = NULL;
Max = 0;
}
};
// A Linked List Index. (Like Node *i, but encapsulated)
template <typename Type>
class LLIter
{
private:
// declare a pointer to a Node.
// use 'typename' since using SRO and template in
// declaration, as of VC.NET 2003
typename Queue<Type>::Node *i;
// the list to walk through
Queue<Type> *theList;
public:
// ctr : create the iterator object
LLIter (Queue<Type> &whichList)
{
theList = &whichList;
}
// begin : sets the iterator to the head of the list.
void begin ()
{
i = theList->head;
}
// end : tests to see if we hit the end of the list?
bool end ()
{
return (i == NULL);
}
// start at end
void startEnd()
{
i = theList->tail;
}
// operator++ : set i = i->next
LLIter<Type> &operator++ ()
{
i = i->next;
return *this;
}
// operator-- : set i = i->prev
LLIter<Type> &operator--()
{
i = i->prev;
return *this;
}
// current : return the current item in the list
// (i->element)
Type ¤t ()
{
return i->element;
}
};
#endif
|
/**
* Created by bln on 16-6-28.
*/
const render = require('../../instances/render');
const auth = require('../../helpers/auth');
const db = require('../../models/index');
const Business = db.models.Business;
const BusinessKind = db.models.BusinessKind;
const co = require('co');
/**
* 将表示层也分层正是三层五层架构的思想
* @param router
*/
module.exports = (router) => {
router.get('/admin/index',function *(){
var ctx = this;
// ctx.body = yield render('admin/index.html');
var user = yield auth.user(this);
if(user.type == 100){
ctx.redirect('/admin/base_protect');
}
// else if(user.type == 0){
// ctx.redirect('/user/list');
// }else{
// ctx.redirect('/admin/first_check');
// }
});
router.get("/admin/base_protect", function*(){
var ctx = this;
ctx.body = yield render("admin/base_protect.html");
});
router.get("/map_base_protect", function*(){
var ctx = this;
ctx.body = yield render("admin/map_base_protect.html");
});
router.get('/admin/first_check',function *(){
var ctx = this;
ctx.body = yield render('admin/first_check.html');
});
router.get('/admin/set_material_kind',function *(){
var ctx = this;
ctx.body = yield render('admin/set_material_kind.html');
});
router.get('/admin/set_business_kind',function *(){
var ctx = this;
ctx.body = yield render('admin/set_business_kind.html');
});
router.get('/admin/set_small_business_kind',function *(){
var ctx = this;
ctx.body = yield render('admin/set_small_business_kind.html');
});
router.get('/admin/small_business_detail',function *(){
var ctx = this;
ctx.body = yield render('admin/small_business_detail.html',{
data : JSON.stringify({})
});
});
router.get('/admin/small_business_detail/:business_id',function *(){
var ctx = this;
var business_id = ctx.params.business_id;
var business_kind = yield BusinessKind.findOne({
where : {
id : business_id,
type : 1
}
});
ctx.body = yield render('admin/small_business_detail.html',{
data : JSON.stringify(business_kind)
});
});
};
|
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PerlNetScpExpect(PerlPackage):
"""Wrapper for scp that allows passwords via Expect."""
homepage = "http://search.cpan.org/~rybskej/Net-SCP-Expect/Expect.pm"
url = "http://search.cpan.org/CPAN/authors/id/R/RY/RYBSKEJ/Net-SCP-Expect-0.16.tar.gz"
version('0.16', sha256='97586e0ee0d61c987a7efaaffbfa551b95c426b3ef3625e046dc456fe9170591')
|
# Mark Gaynor
|
# -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
from datetime import datetime, timedelta
import math
import os
import plotly.graph_objects as go
from plotly.subplots import make_subplots
import dash
import dash_table
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
from dash.dependencies import Input, Output
###################################
#### Private function
###################################
def make_country_table(countryName):
'''This is the function for building df for Province/State of a given country'''
countryTable = df_latest.loc[df_latest['Country/Region'] == countryName]
# Suppress SettingWithCopyWarning
pd.options.mode.chained_assignment = None
countryTable['Remaining'] = countryTable['Confirmed'] - countryTable['Recovered'] - countryTable['Deaths']
countryTable = countryTable[['Province/State','Remaining','Confirmed','Recovered','Deaths','lat','lon']]
countryTable = countryTable.sort_values(by=['Remaining', 'Confirmed'], ascending=False).reset_index(drop=True)
# Set row ids pass to selected_row_ids
countryTable['id'] = countryTable['Province/State']
countryTable.set_index('id', inplace=True, drop=False)
# Turn on SettingWithCopyWarning
pd.options.mode.chained_assignment = 'warn'
return countryTable
def make_dcc_country_tab(countryName, dataframe):
'''This is for generating tab component for country table'''
return dcc.Tab(label = countryName,
value = countryName,
className = 'custom-tab',
selected_className = 'custom-tab--selected',
children = [dash_table.DataTable(
# Don't show coordinates
columns = [{"name": i, "id": i} for i in dataframe.columns[0:5]],
# But still store coordinates in the table for interactivity
data = dataframe.to_dict("rows"),
#row_selectable="single",
sort_action = "native",
style_as_list_view = True,
style_cell = {'font_family':'Arial',
'font_size':'1.2rem',
'padding':'.1rem',
'backgroundColor':'#f4f4f2',},
fixed_rows = {'headers':True,'data':0},
style_table = {'minHeight': '750px',
'height': '750px',
'maxHeight': '750px'},
style_header = {'backgroundColor':'#f4f4f2',
'fontWeight':'bold'},
style_cell_conditional = [{'if': {'column_id':'Province/State'},'width':'28%'},
{'if': {'column_id':'Remaining'},'width':'18%'},
{'if': {'column_id':'Confirmed'},'width':'18%'},
{'if': {'column_id':'Recovered'},'width':'18%'},
{'if': {'column_id':'Deaths'},'width':'18%'},
{'if': {'column_id':'Confirmed'},'color':'#d7191c'},
{'if': {'column_id':'Recovered'},'color':'#1a9622'},
{'if': {'column_id':'Deaths'},'color':'#6c6c6c'},
{'textAlign': 'center'}],
)
]
)
################################################################################
#### Data processing
################################################################################
# Method #1
# Import csv file and store each csv in to a df list
# NOTE all following steps really rely on the correct order of these csv files in folder raw_data
filename = os.listdir('./raw_data/')
sheet_name = [i.replace('.csv', '') for i in filename if 'data' not in i and i.endswith('.csv')]
sheet_name.sort(reverse=True)
#dfs = {sheet_name: pd.read_csv('./raw_data/{}.csv'.format(sheet_name))
# for sheet_name in sheet_name}
# Method #2
# Import xls file and store each sheet in to a df list
#xl_file = pd.ExcelFile('./data.xls')
#dfs = {sheet_name: xl_file.parse(sheet_name)
# for sheet_name in xl_file.sheet_names}
# Data from each sheet can be accessed via key
#keyList = list(dfs.keys())
# Data cleansing
#for key, df in dfs.items():
# dfs[key].loc[:,'Confirmed'].fillna(value=0, inplace=True)
# dfs[key].loc[:,'Deaths'].fillna(value=0, inplace=True)
# dfs[key].loc[:,'Recovered'].fillna(value=0, inplace=True)
# dfs[key]=dfs[key].astype({'Confirmed':'int64', 'Deaths':'int64', 'Recovered':'int64'})
# # Change as China for coordinate search
# dfs[key]=dfs[key].replace({'Country/Region':'Mainland China'}, 'China')
# # Add a zero to the date so can be convert by datetime.strptime as 0-padded date
# dfs[key]['Last Update'] = '0' + dfs[key]['Last Update']
# # Convert time as Australian eastern daylight time
# dfs[key]['Date_last_updated_AEDT'] = [datetime.strptime(d, '%m/%d/%Y %H:%M') for d in dfs[key]['Last Update']]
# dfs[key]['Date_last_updated_AEDT'] = dfs[key]['Date_last_updated_AEDT'] + timedelta(hours=16)
# #dfs[key]['Remaining'] = dfs[key]['Confirmed'] - dfs[key]['Recovered'] - dfs[key]['Deaths']
# Add coordinates for each area in the list for the latest table sheet
# To save time, coordinates calling was done seperately
# Import the data with coordinates
df_latest = pd.read_csv('{}_data.csv'.format(sheet_name[0]))
df_latest = df_latest.astype({'Date_last_updated_AEDT':'datetime64'})
# Save numbers into variables to use in the app
confirmedCases = df_latest['Confirmed'].sum()
deathsCases = df_latest['Deaths'].sum()
recoveredCases = df_latest['Recovered'].sum()
# Construct confirmed cases dataframe for line plot and 24-hour window case difference
df_confirmed = pd.read_csv('./lineplot_data/df_confirmed.csv')
df_confirmed = df_confirmed.astype({'Date':'datetime64'})
plusConfirmedNum = df_confirmed['plusNum'][0]
plusPercentNum1 = df_confirmed['plusPercentNum'][0]
# Construct recovered cases dataframe for line plot and 24-hour window case difference
df_recovered = pd.read_csv('./lineplot_data/df_recovered.csv')
df_recovered = df_recovered.astype({'Date':'datetime64'})
plusRecoveredNum = df_recovered['plusNum'][0]
plusPercentNum2 = df_recovered['plusPercentNum'][0]
# Construct death case dataframe for line plot and 24-hour window case difference
df_deaths = pd.read_csv('./lineplot_data/df_deaths.csv')
df_deaths = df_deaths.astype({'Date':'datetime64'})
plusDeathNum = df_deaths['plusNum'][0]
plusPercentNum3 = df_deaths['plusPercentNum'][0]
# Construct remaining case dataframe for line plot and 24-hour window case difference
df_remaining = pd.read_csv('./lineplot_data/df_remaining.csv')
df_remaining = df_remaining.astype({'Date':'datetime64'})
plusRemainNum = df_remaining['plusNum'][0]
plusRemainNum3 = df_remaining['plusPercentNum'][0]
# Create data table to show in app
# Generate sum values for Country/Region level
dfCase = df_latest.groupby(by='Country/Region', sort=False).sum().reset_index()
dfCase = dfCase.sort_values(by=['Confirmed'], ascending=False).reset_index(drop=True)
# As lat and lon also underwent sum(), which is not desired, remove from this table.
dfCase = dfCase.drop(columns=['lat','lon'])
# Grep lat and lon by the first instance to represent its Country/Region
dfGPS = df_latest.groupby(by='Country/Region', sort=False).first().reset_index()
dfGPS = dfGPS[['Country/Region','lat','lon']]
# Merge two dataframes
dfSum = pd.merge(dfCase, dfGPS, how='inner', on='Country/Region')
dfSum = dfSum.replace({'Country/Region':'China'}, 'Mainland China')
dfSum['Remaining'] = dfSum['Confirmed'] - dfSum['Recovered'] - dfSum['Deaths']
# Rearrange columns to correspond to the number plate order
dfSum = dfSum[['Country/Region','Remaining','Confirmed','Recovered','Deaths','lat','lon']]
# Sort value based on Remaining cases and then Confirmed cases
dfSum = dfSum.sort_values(by=['Remaining', 'Confirmed'], ascending=False).reset_index(drop=True)
# Set row ids pass to selected_row_ids
dfSum['id'] = dfSum['Country/Region']
dfSum.set_index('id', inplace=True, drop=False)
# Create tables for tabs
CNTable = make_country_table('China')
AUSTable = make_country_table('Australia')
USTable = make_country_table('US')
CANTable = make_country_table('Canada')
# Save numbers into variables to use in the app
latestDate = datetime.strftime(df_confirmed['Date'][0], '%b %d, %Y %H:%M AEDT')
secondLastDate = datetime.strftime(df_confirmed['Date'][1], '%b %d')
daysOutbreak = (df_confirmed['Date'][0] - datetime.strptime('12/31/2019', '%m/%d/%Y')).days
#############################################################################################
#### Start to make plots
#############################################################################################
# Line plot for confirmed cases
# Set up tick scale based on confirmed case number
tickList = list(np.arange(0, df_confirmed['Other locations'].max()+1000, 15000))
# Create empty figure canvas
fig_confirmed = go.Figure()
# Add trace to the figure
fig_confirmed.add_trace(go.Scatter(x=df_confirmed['Date'], y=df_confirmed['Mainland China'],
mode='lines+markers',
line_shape='spline',
name='Mainland China',
line=dict(color='#921113', width=4),
marker=dict(size=4, color='#f4f4f2',
line=dict(width=1,color='#921113')),
text=[datetime.strftime(d, '%b %d %Y AEDT') for d in df_confirmed['Date']],
hovertext=['Mainland China confirmed<br>{:,d} cases<br>'.format(i) for i in df_confirmed['Mainland China']],
hovertemplate='<b>%{text}</b><br></br>'+
'%{hovertext}'+
'<extra></extra>'))
fig_confirmed.add_trace(go.Scatter(x=df_confirmed['Date'], y=df_confirmed['Other locations'],
mode='lines+markers',
line_shape='spline',
name='Other Region',
line=dict(color='#eb5254', width=4),
marker=dict(size=4, color='#f4f4f2',
line=dict(width=1,color='#eb5254')),
text=[datetime.strftime(d, '%b %d %Y AEDT') for d in df_confirmed['Date']],
hovertext=['Other region confirmed<br>{:,d} cases<br>'.format(i) for i in df_confirmed['Other locations']],
hovertemplate='<b>%{text}</b><br></br>'+
'%{hovertext}'+
'<extra></extra>'))
# Customise layout
fig_confirmed.update_layout(
# title=dict(
# text="<b>Confirmed Cases Timeline<b>",
# y=0.96, x=0.5, xanchor='center', yanchor='top',
# font=dict(size=20, color="#292929", family="Playfair Display")
# ),
margin=go.layout.Margin(
l=10,
r=10,
b=10,
t=5,
pad=0
),
yaxis=dict(
showline=False, linecolor='#272e3e',
zeroline=False,
#showgrid=False,
gridcolor='rgba(203, 210, 211,.3)',
gridwidth = .1,
tickmode='array',
# Set tick range based on the maximum number
tickvals=tickList,
# Set tick label accordingly
ticktext=["{:.0f}k".format(i/1000) for i in tickList]
),
# yaxis_title="Total Confirmed Case Number",
xaxis=dict(
showline=False, linecolor='#272e3e',
showgrid=False,
gridcolor='rgba(203, 210, 211,.3)',
gridwidth = .1,
zeroline=False
),
xaxis_tickformat='%b %d',
hovermode = 'x',
legend_orientation="h",
#legend=dict(x=.02, y=.95, bgcolor="rgba(0,0,0,0)",),
plot_bgcolor='#f4f4f2',
paper_bgcolor='#cbd2d3',
font=dict(color='#292929')
)
# Line plot for combine recovered cases
# Set up tick scale based on total recovered case number
tickList = list(np.arange(0, df_remaining['Total'].max()+2000, 15000))
# Create empty figure canvas
fig_combine = go.Figure()
# Add trace to the figure
fig_combine.add_trace(go.Scatter(x=df_recovered['Date'], y=df_recovered['Total'],
mode='lines+markers',
line_shape='spline',
name='Total Recovered Cases',
line=dict(color='#168038', width=4),
marker=dict(size=4, color='#f4f4f2',
line=dict(width=1,color='#168038')),
text=[datetime.strftime(d, '%b %d %Y AEDT') for d in df_recovered['Date']],
hovertext=['Total recovered<br>{:,d} cases<br>'.format(i) for i in df_recovered['Total']],
hovertemplate='<b>%{text}</b><br></br>'+
'%{hovertext}'+
'<extra></extra>'))
fig_combine.add_trace(go.Scatter(x=df_deaths['Date'], y=df_deaths['Total'],
mode='lines+markers',
line_shape='spline',
name='Total Death Cases',
line=dict(color='#626262', width=4),
marker=dict(size=4, color='#f4f4f2',
line=dict(width=1,color='#626262')),
text=[datetime.strftime(d, '%b %d %Y AEDT') for d in df_deaths['Date']],
hovertext=['Total death<br>{:,d} cases<br>'.format(i) for i in df_deaths['Total']],
hovertemplate='<b>%{text}</b><br></br>'+
'%{hovertext}'+
'<extra></extra>'))
fig_combine.add_trace(go.Scatter(x=df_remaining['Date'], y=df_remaining['Total'],
mode='lines+markers',
line_shape='spline',
name='Total Remaining Cases',
line=dict(color='#e36209', width=4),
marker=dict(size=4, color='#f4f4f2',
line=dict(width=1,color='#e36209')),
text=[datetime.strftime(d, '%b %d %Y AEDT') for d in df_deaths['Date']],
hovertext=['Total remaining<br>{:,d} cases<br>'.format(i) for i in df_remaining['Total']],
hovertemplate='<b>%{text}</b><br></br>'+
'%{hovertext}'+
'<extra></extra>'))
# Customise layout
fig_combine.update_layout(
# title=dict(
# text="<b>Confirmed Cases Timeline<b>",
# y=0.96, x=0.5, xanchor='center', yanchor='top',
# font=dict(size=20, color="#292929", family="Playfair Display")
# ),
margin=go.layout.Margin(
l=10,
r=10,
b=10,
t=5,
pad=0
),
yaxis=dict(
showline=False, linecolor='#272e3e',
zeroline=False,
#showgrid=False,
gridcolor='rgba(203, 210, 211,.3)',
gridwidth = .1,
tickmode='array',
# Set tick range based on the maximum number
tickvals=tickList,
# Set tick label accordingly
ticktext=["{:.0f}k".format(i/1000) for i in tickList]
),
# yaxis_title="Total Confirmed Case Number",
xaxis=dict(
showline=False, linecolor='#272e3e',
showgrid=False,
gridcolor='rgba(203, 210, 211,.3)',
gridwidth = .1,
zeroline=False
),
xaxis_tickformat='%b %d',
hovermode = 'x',
legend_orientation="h",
#legend=dict(x=.02, y=.95, bgcolor="rgba(0,0,0,0)",),
plot_bgcolor='#f4f4f2',
paper_bgcolor='#cbd2d3',
font=dict(color='#292929')
)
# Line plot for death rate cases
# Set up tick scale based on death case number of Mainland China
tickList = list(np.arange(0, (df_deaths['Mainland China']/df_confirmed['Mainland China']*100).max()+0.2, 0.5))
# Create empty figure canvas
fig_rate = go.Figure()
# Add trace to the figure
fig_rate.add_trace(go.Scatter(x=df_deaths['Date'], y=df_deaths['Mainland China']/df_confirmed['Mainland China']*100,
mode='lines+markers',
line_shape='spline',
name='Mainland China',
line=dict(color='#626262', width=4),
marker=dict(size=4, color='#f4f4f2',
line=dict(width=1,color='#626262')),
text=[datetime.strftime(d, '%b %d %Y AEDT') for d in df_deaths['Date']],
hovertext=['Mainland China death rate<br>{:.2f}%'.format(i) for i in df_deaths['Mainland China']/df_confirmed['Mainland China']*100],
hovertemplate='<b>%{text}</b><br></br>'+
'%{hovertext}'+
'<extra></extra>'))
fig_rate.add_trace(go.Scatter(x=df_deaths['Date'], y=df_deaths['Other locations']/df_confirmed['Other locations']*100,
mode='lines+markers',
line_shape='spline',
name='Other Region',
line=dict(color='#a7a7a7', width=4),
marker=dict(size=4, color='#f4f4f2',
line=dict(width=1,color='#a7a7a7')),
text=[datetime.strftime(d, '%b %d %Y AEDT') for d in df_deaths['Date']],
hovertext=['Other region death rate<br>{:.2f}%'.format(i) for i in df_deaths['Other locations']/df_confirmed['Other locations']*100],
hovertemplate='<b>%{text}</b><br></br>'+
'%{hovertext}'+
'<extra></extra>'))
# Customise layout
fig_rate.update_layout(
margin=go.layout.Margin(
l=10,
r=10,
b=10,
t=5,
pad=0
),
yaxis=dict(
showline=False, linecolor='#272e3e',
zeroline=False,
#showgrid=False,
gridcolor='rgba(203, 210, 211,.3)',
gridwidth = .1,
tickmode='array',
# Set tick range based on the maximum number
tickvals=tickList,
# Set tick label accordingly
ticktext=['{:.1f}'.format(i) for i in tickList]
),
# yaxis_title="Total Confirmed Case Number",
xaxis=dict(
showline=False, linecolor='#272e3e',
showgrid=False,
gridcolor='rgba(203, 210, 211,.3)',
gridwidth = .1,
zeroline=False
),
xaxis_tickformat='%b %d',
hovermode = 'x',
legend_orientation="h",
#legend=dict(x=.02, y=.95, bgcolor="rgba(0,0,0,0)",),
plot_bgcolor='#f4f4f2',
paper_bgcolor='#cbd2d3',
font=dict(color='#292929')
)
##################################################################################################
#### Start dash app
##################################################################################################
app = dash.Dash(__name__,
assets_folder='./assets/',
meta_tags=[
{"name": "author", "content": "Jun Ye"},
{"name": "description", "content": "The coronavirus COVID-19 monitor provides up-to-date data for the global spread of coronavirus."},
{"property": "og:title", "content": "Coronavirus COVID-19 Outbreak Global Cases Monitor"},
{"property": "og:type", "content": "website"},
{"property":"og:image", "content": "https://junye0798.com/post/build-a-dashboard-to-track-the-spread-of-coronavirus-using-dash/featured_hu031431b9019186307c923e911320563b_1304417_1200x0_resize_lanczos_2.png"},
{"property": "og:url", "content": "https://dash-coronavirus-2020.herokuapp.com/"},
{"property":"og:description", "content": "The coronavirus COVID-19 monitor provides up-to-date data for the global spread of coronavirus."},
{"name": "twitter:card", "content": "summary_large_image"},
{"name": "twitter:site", "content": "@perishleaf"},
{"name": "twitter:title", "content": "Coronavirus COVID-19 Outbreak Global Cases Monitor"},
{"name": "twitter:description", "content": "The coronavirus COVID-19 monitor provides up-to-date data for the global spread of coronavirus."},
{"name": "twitter:image", "content": "https://junye0798.com/post/build-a-dashboard-to-track-the-spread-of-coronavirus-using-dash/featured_hu031431b9019186307c923e911320563b_1304417_1200x0_resize_lanczos_2.png"},
{"name": "viewport", "content": "width=device-width, height=device-height, initial-scale=1.0"}
]
)
app.title = 'Coronavirus COVID-19 Global Monitor'
# Section for Google annlytic and donation #
app.index_string = """<!DOCTYPE html>
<html>
<head>
<script data-name="BMC-Widget" src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js" data-id="qPsBJAV" data-description="Support the app server for running!" data-message="Please support the app server for running!" data-color="#FF813F" data-position="right" data-x_margin="18" data-y_margin="18"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-154901818-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-154901818-2');
</script>
{%metas%}
<title>{%title%}</title>
{%favicon%}
{%css%}
<script type='text/javascript' src='https://platform-api.sharethis.com/js/sharethis.js#property=5e5e32508d3a3d0019ee3ecb&product=sticky-share-buttons&cms=website' async='async'></script>
</head>
<body>
{%app_entry%}
<footer>
{%config%}
{%scripts%}
{%renderer%}
</footer>
</body>
</html>"""
server = app.server
app.layout = html.Div(style={'backgroundColor':'#f4f4f2'},
children=[
html.Div(
id="header",
children=[
html.H4(children="Coronavirus (COVID-19) Outbreak Global Cases Monitor"),
html.P(
id="description",
children="On Dec 31, 2019, the World Health Organization (WHO) was informed of \
an outbreak of “pneumonia of unknown cause” detected in Wuhan City, Hubei Province, China – the \
seventh-largest city in China with 11 million residents. As of {}, there are over {:,d} cases \
of COVID-19 confirmed globally.\
This dash board is developed to visualise and track the recent reported \
cases on a hourly timescale.".format(latestDate, confirmedCases),
),
# html.P(
# id="note",
# children=['⚠️ Source from ',
# html.A('The National Health Commission of China', href='http://www.nhc.gov.cn/yjb/s7860/202002/553ff43ca29d4fe88f3837d49d6b6ef1.shtml'),
# ': in its February 14 official report, deducted \
# 108 previously reported deaths and 1,043 previously reported cases from the total in Hubei Province due to "repeated counting." \
# Data have been corrected for these changes.']
# ),
# html.P(
# id="note",
# children=['⚠️ Source from ',
# html.A('读卖新闻', href='https://www.yomiuri.co.jp/national/20200216-OYT1T50089/'),
# ': Diamond Princess cruise confirmed 70 new infections, bringing the total infected cases to 355.']
# ),
# html.P(
# id="note",
# children=['⚠️ Source from ',
# html.A('anews', href='http://www.anews.com.tr/world/2020/02/21/iran-says-two-more-deaths-among-13-new-coronavirus-cases'),
# ': Iran\'s health ministry Friday reported two more deaths among 13 new cases of coronavirus in the Islamic republic, bringing the total number of deaths to four and infections to 18.']
# ),
# html.P(
# id="note",
# children=['⚠️ Source from ',
# html.A('The New York Times', href='https://www.nytimes.com/2020/03/01/world/coronavirus-news.html'),
# ': New York State Reports First Case.']
# ),
html.P(
id='time-stamp',
#style={'fontWeight':'bold'},
children="🔴 Last update: {} (Sorry, the app server may experince short period of interruption while updating data)".format(latestDate))
]
),
html.Div(
id="number-plate",
style={'marginLeft':'1.5%','marginRight':'1.5%','marginBottom':'.5%'},
children=[
html.Div(
style={'width':'24.4%','backgroundColor':'#cbd2d3','display':'inline-block',
'marginRight':'.8%','verticalAlign':'top'},
children=[
html.H3(style={'textAlign':'center',
'fontWeight':'bold','color':'#2674f6'},
children=[
html.P(style={'color':'#cbd2d3','padding':'.5rem'},
children='xxxx xx xxx xxxx xxx xxxxx'),
'{}'.format(daysOutbreak),
]),
html.H5(style={'textAlign':'center','color':'#2674f6','padding':'.1rem'},
children="Days Since Outbreak")
]),
html.Div(
style={'width':'24.4%','backgroundColor':'#cbd2d3','display':'inline-block',
'marginRight':'.8%','verticalAlign':'top'},
children=[
html.H3(style={'textAlign':'center',
'fontWeight':'bold','color':'#d7191c'},
children=[
html.P(style={'padding':'.5rem'},
children='+ {:,d} in the past 24h ({:.1%})'.format(plusConfirmedNum, plusPercentNum1)),
'{:,d}'.format(confirmedCases)
]),
html.H5(style={'textAlign':'center','color':'#d7191c','padding':'.1rem'},
children="Confirmed Cases")
]),
html.Div(
style={'width':'24.4%','backgroundColor':'#cbd2d3','display':'inline-block',
'marginRight':'.8%','verticalAlign':'top'},
children=[
html.H3(style={'textAlign':'center',
'fontWeight':'bold','color':'#1a9622'},
children=[
html.P(style={'padding':'.5rem'},
children='+ {:,d} in the past 24h ({:.1%})'.format(plusRecoveredNum, plusPercentNum2)),
'{:,d}'.format(recoveredCases),
]),
html.H5(style={'textAlign':'center','color':'#1a9622','padding':'.1rem'},
children="Recovered Cases")
]),
html.Div(
style={'width':'24.4%','backgroundColor':'#cbd2d3','display':'inline-block',
'verticalAlign':'top'},
children=[
html.H3(style={'textAlign':'center',
'fontWeight':'bold','color':'#6c6c6c'},
children=[
html.P(style={'padding':'.5rem'},
children='+ {:,d} in the past 24h ({:.1%})'.format(plusDeathNum, plusPercentNum3)),
'{:,d}'.format(deathsCases)
]),
html.H5(style={'textAlign':'center','color':'#6c6c6c','padding':'.1rem'},
children="Death Cases")
])
]),
html.Div(
id='dcc-plot',
style={'marginLeft':'1.5%','marginRight':'1.5%','marginBottom':'.35%','marginTop':'.5%'},
children=[
html.Div(
style={'width':'32.79%','display':'inline-block','marginRight':'.8%','verticalAlign':'top'},
children=[
html.H5(style={'textAlign':'center','backgroundColor':'#cbd2d3',
'color':'#292929','padding':'1rem','marginBottom':'0'},
children='Confirmed Case Timeline'),
dcc.Graph(style={'height':'300px'},figure=fig_confirmed)]),
html.Div(
style={'width':'32.79%','display':'inline-block','marginRight':'.8%','verticalAlign':'top'},
children=[
html.H5(style={'textAlign':'center','backgroundColor':'#cbd2d3',
'color':'#292929','padding':'1rem','marginBottom':'0'},
children='Remaining/Recovered/Death Case Timeline'),
dcc.Graph(style={'height':'300px'},figure=fig_combine)]),
html.Div(
style={'width':'32.79%','display':'inline-block','verticalAlign':'top'},
children=[
html.H5(style={'textAlign':'center','backgroundColor':'#cbd2d3',
'color':'#292929','padding':'1rem','marginBottom':'0'},
children='Death Rate (%) Timeline'),
dcc.Graph(style={'height':'300px'},figure=fig_rate)])]),
html.Div(
id='dcc-map',
style={'marginLeft':'1.5%','marginRight':'1.5%','marginBottom':'.5%'},
children=[
html.Div(style={'width':'66.41%','marginRight':'.8%','display':'inline-block','verticalAlign':'top'},
children=[
html.H5(style={'textAlign':'center','backgroundColor':'#cbd2d3',
'color':'#292929','padding':'1rem','marginBottom':'0'},
children='Latest Coronavirus Outbreak Map'),
dcc.Graph(
id='datatable-interact-map',
style={'height':'500px'},),
dcc.Graph(
id='datatable-interact-lineplot',
style={'height':'300px'},),
]),
html.Div(style={'width':'32.79%','display':'inline-block','verticalAlign':'top'},
children=[
html.H5(style={'textAlign':'center','backgroundColor':'#cbd2d3',
'color':'#292929','padding':'1rem','marginBottom':'0'},
children='Cases by Country/Region'),
dcc.Tabs(
id="tabs-table",
value='tab-1',
parent_className='custom-tabs',
className='custom-tabs-container',
children=[
dcc.Tab(label='The World',
value='tab-1',
className='custom-tab',
selected_className='custom-tab--selected',
children=[
dash_table.DataTable(
id='datatable-interact-location',
# Don't show coordinates
columns=[{"name": i, "id": i} for i in dfSum.columns[0:5]],
# But still store coordinates in the table for interactivity
data=dfSum.to_dict("rows"),
row_selectable="single",
sort_action="native",
style_as_list_view=True,
style_cell={'font_family':'Arial',
'font_size':'1.2rem',
'padding':'.1rem',
'backgroundColor':'#f4f4f2',},
fixed_rows={'headers':True,'data':0},
style_table={'minHeight': '750px',
'height': '750px',
'maxHeight': '750px'},
style_header={'backgroundColor':'#f4f4f2',
'fontWeight':'bold'},
style_cell_conditional=[{'if': {'column_id':'Country/Regions'},'width':'28%'},
{'if': {'column_id':'Remaining'},'width':'18%'},
{'if': {'column_id':'Confirmed'},'width':'18%'},
{'if': {'column_id':'Recovered'},'width':'18%'},
{'if': {'column_id':'Deaths'},'width':'18%'},
{'if': {'column_id':'Confirmed'},'color':'#d7191c'},
{'if': {'column_id':'Recovered'},'color':'#1a9622'},
{'if': {'column_id':'Deaths'},'color':'#6c6c6c'},
{'textAlign': 'center'}],
)
]),
make_dcc_country_tab('Australia', AUSTable),
make_dcc_country_tab('Canada', CANTable),
make_dcc_country_tab('Mainland China', CNTable),
make_dcc_country_tab('United States', USTable),
]
)
])
]),
html.Div(
id='my-footer',
style={'marginLeft':'1.5%','marginRight':'1.5%'},
children=[
html.P(style={'textAlign':'center','margin':'auto'},
children=[" 🙏 God Bless the World 🙏 |",
" Developed by ",html.A('Jun', href='https://junye0798.com/')," with ❤️ in Sydney"])]),
])
@app.callback(
Output('datatable-interact-map', 'figure'),
[Input('datatable-interact-location', 'derived_virtual_selected_rows'),
Input('datatable-interact-location', 'selected_row_ids')]
)
def update_figures(derived_virtual_selected_rows, selected_row_ids):
# When the table is first rendered, `derived_virtual_data` and
# `derived_virtual_selected_rows` will be `None`. This is due to an
# idiosyncracy in Dash (unsupplied properties are always None and Dash
# calls the dependent callbacks when the component is first rendered).
# So, if `rows` is `None`, then the component was just rendered
# and its value will be the same as the component's dataframe.
# Instead of setting `None` in here, you could also set
# `derived_virtual_data=df.to_rows('dict')` when you initialize
# the component.
if derived_virtual_selected_rows is None:
derived_virtual_selected_rows = []
dff = dfSum
mapbox_access_token = "pk.eyJ1IjoicGxvdGx5bWFwYm94IiwiYSI6ImNqdnBvNDMyaTAxYzkzeW5ubWdpZ2VjbmMifQ.TXcBE-xg9BFdV2ocecc_7g"
# Generate a list for hover text display
textList=[]
for area, region in zip(df_latest['Province/State'], df_latest['Country/Region']):
if type(area) is str:
if region == "Hong Kong" or region == "Macau" or region == "Taiwan":
textList.append(area)
else:
textList.append(area+', '+region)
else:
textList.append(region)
# Generate a list for color gradient display
colorList=[]
for comfirmed, recovered, deaths in zip(df_latest['Confirmed'],df_latest['Recovered'],df_latest['Deaths']):
remaining = comfirmed - deaths -recovered
colorList.append(remaining)
fig2 = go.Figure(go.Scattermapbox(
lat=df_latest['lat'],
lon=df_latest['lon'],
mode='markers',
marker=go.scattermapbox.Marker(
color=['#d7191c' if i > 0 else '#1a9622' for i in colorList],
size=[i**(1/3) for i in df_latest['Confirmed']],
sizemin=1,
sizemode='area',
sizeref=2.*max([math.sqrt(i) for i in df_latest['Confirmed']])/(100.**2),
),
text=textList,
hovertext=['Confirmed: {:,d}<br>Recovered: {:,d}<br>Death: {:,d}'.format(i, j, k) for i, j, k in zip(df_latest['Confirmed'],
df_latest['Recovered'],
df_latest['Deaths'])],
hovertemplate = "<b>%{text}</b><br><br>" +
"%{hovertext}<br>" +
"<extra></extra>")
)
fig2.update_layout(
plot_bgcolor='#151920',
paper_bgcolor='#cbd2d3',
margin=go.layout.Margin(l=10,r=10,b=10,t=0,pad=40),
hovermode='closest',
transition = {'duration':50},
annotations=[
dict(
x=.5,
y=-.01,
align='center',
showarrow=False,
text="Points are placed based on data geolocation levels.<br>Province/State level - Australia, China, Canada, and United States; Country level- other countries.",
xref="paper",
yref="paper",
font=dict(size=10, color='#292929'),
)],
mapbox=go.layout.Mapbox(
accesstoken=mapbox_access_token,
style="light",
# The direction you're facing, measured clockwise as an angle from true north on a compass
bearing=0,
center=go.layout.mapbox.Center(
lat=14.056159 if len(derived_virtual_selected_rows)==0 else dff.loc[selected_row_ids[0]].lat,
lon=6.395626 if len(derived_virtual_selected_rows)==0 else dff.loc[selected_row_ids[0]].lon
),
pitch=0,
zoom=1.02 if len(derived_virtual_selected_rows)==0 else 4
)
)
return fig2
@app.callback(
Output('datatable-interact-lineplot', 'figure'),
[Input('datatable-interact-location', 'derived_virtual_selected_rows'),
Input('datatable-interact-location', 'selected_row_ids')]
)
def update_lineplot(derived_virtual_selected_rows, selected_row_ids):
if derived_virtual_selected_rows is None:
derived_virtual_selected_rows = []
dff = dfSum
if selected_row_ids:
if dff.loc[selected_row_ids[0]]['Country/Region'] == 'Mainland China':
Region = 'China'
else:
Region = dff.loc[selected_row_ids[0]]['Country/Region']
else:
Region = 'Australia'
# Read cumulative data of a given region from ./cumulative_data folder
df_region = pd.read_csv('./cumulative_data/{}.csv'.format(Region))
df_region = df_region.astype({'Date_last_updated_AEDT':'datetime64', 'date_day':'datetime64'})
# Line plot for confirmed cases
# Set up tick scale based on confirmed case number
#tickList = list(np.arange(0, df_confirmed['Mainland China'].max()+1000, 10000))
# Create empty figure canvas
fig3 = go.Figure()
# Add trace to the figure
fig3.add_trace(go.Scatter(x=df_region['date_day'],
y=df_region['Confirmed'],
mode='lines+markers',
#line_shape='spline',
name='Confirmed case',
line=dict(color='#d7191c', width=2),
#marker=dict(size=4, color='#f4f4f2',
# line=dict(width=1,color='#921113')),
text=[datetime.strftime(d, '%b %d %Y AEDT') for d in df_region['date_day']],
hovertext=['{} Confirmed<br>{:,d} cases<br>'.format(Region, i) for i in df_region['Confirmed']],
hovertemplate='<b>%{text}</b><br></br>'+
'%{hovertext}'+
'<extra></extra>'))
fig3.add_trace(go.Scatter(x=df_region['date_day'],
y=df_region['Recovered'],
mode='lines+markers',
#line_shape='spline',
name='Recovered case',
line=dict(color='#1a9622', width=2),
#marker=dict(size=4, color='#f4f4f2',
# line=dict(width=1,color='#168038')),
text=[datetime.strftime(d, '%b %d %Y AEDT') for d in df_region['date_day']],
hovertext=['{} Recovered<br>{:,d} cases<br>'.format(Region, i) for i in df_region['Recovered']],
hovertemplate='<b>%{text}</b><br></br>'+
'%{hovertext}'+
'<extra></extra>'))
fig3.add_trace(go.Scatter(x=df_region['date_day'],
y=df_region['Deaths'],
mode='lines+markers',
#line_shape='spline',
name='Death case',
line=dict(color='#626262', width=2),
#marker=dict(size=4, color='#f4f4f2',
# line=dict(width=1,color='#626262')),
text=[datetime.strftime(d, '%b %d %Y AEDT') for d in df_region['date_day']],
hovertext=['{} Deaths<br>{:,d} cases<br>'.format(Region, i) for i in df_region['Deaths']],
hovertemplate='<b>%{text}</b><br></br>'+
'%{hovertext}'+
'<extra></extra>'))
# Customise layout
fig3.update_layout(
#title=dict(
# text="<b>Confirmed Cases Timeline<b>",
# y=0.96, x=0.5, xanchor='center', yanchor='top',
# font=dict(size=20, color="#292929", family="Playfair Display")
#),
margin=go.layout.Margin(
l=10,
r=10,
b=10,
t=5,
pad=0
),
annotations=[
dict(
x=.5,
y=.4,
xref="paper",
yref="paper",
text=Region,
opacity=0.5,
font=dict(family='Arial, sans-serif',
size=60,
color="grey"),
)
],
yaxis=dict(
showline=False, linecolor='#272e3e',
zeroline=False,
#showgrid=False,
gridcolor='rgba(203, 210, 211,.3)',
gridwidth = .1,
tickmode='array',
# Set tick range based on the maximum number
#tickvals=tickList,
# Set tick label accordingly
#ticktext=["{:.0f}k".format(i/1000) for i in tickList]
),
xaxis_title="Cumulative Cases (Select Country/Region From Table)",
xaxis=dict(
showline=False, linecolor='#272e3e',
showgrid=False,
gridcolor='rgba(203, 210, 211,.3)',
gridwidth = .1,
zeroline=False
),
xaxis_tickformat='%b %d',
#transition = {'duration':500},
hovermode = 'x',
legend_orientation="h",
legend=dict(x=.02, y=.95, bgcolor="rgba(0,0,0,0)",),
plot_bgcolor='#f4f4f2',
paper_bgcolor='#cbd2d3',
font=dict(color='#292929')
)
return fig3
if __name__ == "__main__":
app.run_server(debug=True)
|
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for ListModelEvaluationSlices
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.
# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-aiplatform
# [START aiplatform_generated_aiplatform_v1_ModelService_ListModelEvaluationSlices_async]
from google.cloud import aiplatform_v1
async def sample_list_model_evaluation_slices():
"""Snippet for list_model_evaluation_slices"""
# Create a client
client = aiplatform_v1.ModelServiceAsyncClient()
# Initialize request argument(s)
request = aiplatform_v1.ListModelEvaluationSlicesRequest(
parent="projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}",
)
# Make the request
page_result = client.list_model_evaluation_slices(request=request)
async for response in page_result:
print(response)
# [END aiplatform_generated_aiplatform_v1_ModelService_ListModelEvaluationSlices_async]
|
//
// Copyright (c) 2017 The nanoFramework project contributors
// See LICENSE file in the project root for full license information.
//
#ifndef HALCONF_NF_H
#define HALCONF_NF_H
// enables STM32 Flash driver
#if !defined(HAL_NF_USE_STM32_FLASH)
#define HAL_NF_USE_STM32_FLASH TRUE
#endif
#if !defined(HAL_NF_USE_STM32_RNG)
#define HAL_NF_USE_STM32_RNG FALSE
#endif
#endif // HALCONF_NF_H
|
import React,{Component} from 'react';
class SearchBar extends Component{
constructor(props){
super(props);
this.state ={term: ''};
}
render() {
return (
<div className="search-bar">
<input
value = {this.state.term}
onChange={event=>this.onInputChange(event.target.value)}
/>
</div>
);
}
onInputChange(term){
this.setState({term});
this.props.onSearchTermChange(term);
}
}
export default SearchBar;
|
export default {
name: 'es-do',
weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
months: 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'),
monthsShort: 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
weekStart: 1,
relativeTime: {
future: 'en %s',
past: 'hace %s',
s: 'unos segundos',
m: 'un minuto',
mm: '%d minutos',
h: 'una hora',
hh: '%d horas',
d: 'un día',
dd: '%d días',
M: 'un mes',
MM: '%d meses',
y: 'un año',
yy: '%d años'
},
ordinal: function(n) {
return n + 'º';
},
formats: {
LT: 'h:mm A',
LTS: 'h:mm:ss A',
L: 'DD/MM/YYYY',
LL: 'D [de] MMMM [de] YYYY',
LLL: 'D [de] MMMM [de] YYYY h:mm A',
LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A'
}
};
|
from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
class LoginForm(forms.Form):
username = forms.CharField(label='Usuario')
password = forms.CharField(widget=forms.PasswordInput(), label='Contraseña')
class SignupForm(UserCreationForm):
error_css_class = 'form-error'
required_css_class = 'form-required'
first_name = forms.CharField(max_length=30, required=True, help_text='Required.')
last_name = forms.CharField(max_length=30, required=True, help_text='Required.')
email = forms.EmailField(max_length=254, help_text='Required. Inform a valid email address.')
class Meta:
model = User
fields = ('username', 'first_name', 'last_name', 'email', 'password1', 'password2',)
|
#!/usr/bin/env python3
import torch
from torch.autograd import Function
from ..utils.lanczos import lanczos_tridiag, lanczos_tridiag_to_diag
from .. import settings
class RootDecomposition(Function):
def __init__(
self,
representation_tree,
max_iter,
dtype,
device,
matrix_shape,
batch_shape,
root=True,
inverse=False,
initial_vectors=None,
):
self.representation_tree = representation_tree
self.device = device
self.dtype = dtype
self.matrix_shape = matrix_shape
self.max_iter = max_iter
self.batch_shape = batch_shape
self.root = root
self.inverse = inverse
self.initial_vectors = initial_vectors
def forward(self, *matrix_args):
"""
*matrix_args - The arguments representing the symmetric matrix A (or batch of PSD matrices A)
Returns:
- (Tensor) R, such that R R^T \approx A
- (Tensor) R_inv, such that R_inv R_inv^T \approx A^{-1} (will only be populated if self.inverse = True)
"""
from ..lazy import lazify
# Get closure for matmul
lazy_tsr = self.representation_tree(*matrix_args)
matmul_closure = lazy_tsr._matmul
# Do lanczos
q_mat, t_mat = lanczos_tridiag(
matmul_closure,
self.max_iter,
dtype=self.dtype,
device=self.device,
matrix_shape=self.matrix_shape,
batch_shape=self.batch_shape,
init_vecs=self.initial_vectors,
)
if self.batch_shape is None:
q_mat = q_mat.unsqueeze(-3)
t_mat = t_mat.unsqueeze(-3)
if t_mat.ndimension() == 3: # If we only used one probe vector
q_mat = q_mat.unsqueeze(0)
t_mat = t_mat.unsqueeze(0)
n_probes = t_mat.size(0)
mins = lazify(t_mat).diag().min(dim=-1, keepdim=True)[0].unsqueeze(-1)
jitter_mat = (settings.tridiagonal_jitter.value() * mins) * torch.eye(t_mat.size(-1)).type_as(t_mat).expand_as(
t_mat
)
eigenvalues, eigenvectors = lanczos_tridiag_to_diag(t_mat + jitter_mat)
# Get orthogonal matrix and eigenvalue roots
q_mat = q_mat.matmul(eigenvectors)
root_evals = eigenvalues.sqrt()
# Store q_mat * t_mat_chol
# Decide if we're computing the inverse, or the regular root
root = torch.empty(0, dtype=q_mat.dtype, device=q_mat.device)
inverse = torch.empty(0, dtype=q_mat.dtype, device=q_mat.device)
if self.inverse:
inverse = q_mat / root_evals.unsqueeze(-2)
if self.root:
root = q_mat * root_evals.unsqueeze(-2)
if settings.memory_efficient.off():
self._lazy_tsr = lazy_tsr
if self.batch_shape is None:
root = root.squeeze(1) if root.numel() else root
q_mat = q_mat.squeeze(1)
t_mat = t_mat.squeeze(1)
root_evals = root_evals.squeeze(1)
inverse = inverse.squeeze(1) if inverse.numel() else inverse
if n_probes == 1:
root = root.squeeze(0) if root.numel() else root
q_mat = q_mat.squeeze(0)
t_mat = t_mat.squeeze(0)
root_evals = root_evals.squeeze(0)
inverse = inverse.squeeze(0) if inverse.numel() else inverse
to_save = list(matrix_args) + [q_mat, root_evals, inverse]
self.save_for_backward(*to_save)
return root, inverse
def backward(self, root_grad_output, inverse_grad_output):
# Taken from http://homepages.inf.ed.ac.uk/imurray2/pub/16choldiff/choldiff.pdf
if any(self.needs_input_grad):
def is_empty(tensor):
return tensor.numel() == 0 or (tensor.numel() == 1 and tensor[0] == 0)
# Fix outputs and gradients
if is_empty(root_grad_output):
root_grad_output = None
if is_empty(inverse_grad_output):
inverse_grad_output = None
# Get saved tensors
matrix_args = self.saved_tensors[:-3]
q_mat = self.saved_tensors[-3]
root_evals = self.saved_tensors[-2]
inverse = self.saved_tensors[-1]
is_batch = False
if root_grad_output is not None:
if root_grad_output.ndimension() == 2 and q_mat.ndimension() > 2:
root_grad_output = root_grad_output.unsqueeze(0)
is_batch = True
if root_grad_output.ndimension() == 3 and q_mat.ndimension() > 3:
root_grad_output = root_grad_output.unsqueeze(0)
is_batch = True
if inverse_grad_output is not None:
if inverse_grad_output.ndimension() == 2 and q_mat.ndimension() > 2:
inverse_grad_output = inverse_grad_output.unsqueeze(0)
is_batch = True
if inverse_grad_output.ndimension() == 3 and q_mat.ndimension() > 3:
inverse_grad_output = inverse_grad_output.unsqueeze(0)
is_batch = True
# Get closure for matmul
if hasattr(self, "_lazy_tsr"):
lazy_tsr = self._lazy_tsr
else:
lazy_tsr = self.representation_tree(*matrix_args)
# Get root inverse
if not self.inverse:
inverse = q_mat / root_evals.unsqueeze(-2)
# Left factor:
left_factor = torch.zeros_like(inverse)
if root_grad_output is not None:
left_factor.add_(root_grad_output)
if inverse_grad_output is not None:
# -root^-T grad_output.T root^-T
left_factor.sub_(torch.matmul(inverse, inverse_grad_output.transpose(-1, -2)).matmul(inverse))
# Right factor
right_factor = inverse.div(2.0)
# Fix batches
if is_batch:
left_factor = left_factor.permute(1, 0, 2, 3).contiguous()
left_factor = left_factor.view(inverse.size(1), -1, left_factor.size(-1))
right_factor = right_factor.permute(1, 0, 2, 3).contiguous()
right_factor = right_factor.view(inverse.size(1), -1, right_factor.size(-1))
else:
left_factor = left_factor.contiguous()
right_factor = right_factor.contiguous()
res = lazy_tsr._quad_form_derivative(left_factor, right_factor)
return tuple(res)
else:
pass
|
import collections
import datetime
import gzip
import io
from urllib import parse
import boto
from django.core.management.base import BaseCommand
from django.db import IntegrityError
from openedxstats.apps.sites.models import AccessLogAggregate, FilenameLog
"""
fetch_referrer_logs.py (based off load_logo_referrers_summary.py)
Script to automate fetching logo logs, and counting the number of referrers.
This program will use download all logo logs from the S3 edx-static-cloudfront
bucket, and parse them to discover any new logs and save the referrer data.
All data is saved in the Django DB.
This script should be run on a scheduled basis.
YOU NEED VALID AWS CREDENTIALS FOR THIS SCRIPT TO WORK!!!
Suggested queries (mySQL):
select domain, min(date) from access_log_aggregate where domain not like '%.amazonaws.com' and domain not rlike '([[:digit:]]+\\.){3}[[:digit:]]+:?' and domain not rlike ':[[:digit:]]+' and domain not like '%.edx.org' group by domain order by min(date);
"""
# 0 = mimimal output, 1 = verbose output
DEBUG = 0
class Command(BaseCommand):
help = 'Fetches AWS Open edX logo referrer logs and save any new logs to a database.'
def add_arguments(self, parser):
parser.add_argument('--verbose',
dest='verbose',
action='store_true',
default=False,
help='Enable verbose output, useful for debugging.')
def handle(self, *args, **options):
if options['verbose']:
global DEBUG
DEBUG=1
run_command()
class LogLine:
def __init__(self, line):
self.parts = line.split("\t")
self.parsed = parse.urlparse(self.parts[9])
@property
def host(self):
return self.parsed.netloc
@property
def client_ip(self):
return self.parts[4]
@property
def uri(self):
return self.parts[7]
@property
def date(self):
return self.parts[0]
@property
def time(self):
return self.parts[1]
class HostInfo:
def __init__(self):
self.hits = 0
self.ips = set()
def add(self, logline):
self.hits += 1
self.ips.add(logline.client_ip)
def is_in_filename_log(log_name):
file_exists = FilenameLog.objects.filter(filename=log_name).count()
if file_exists:
return True
else:
return False
def add_to_filename_log(log_name):
file_to_add = FilenameLog(filename=log_name)
file_to_add.save() #FIXME: Change to commit=false until entire program runs through?
def process_log_file(file_content, log_name):
if DEBUG:
print("Processing %s ..." % log_name)
line_counter = collections.defaultdict(int)
aggregate_logs = []
for line in file_content.splitlines():
if line.startswith('#'):
continue
logline = LogLine(line)
line_key = (logline.host, logline.date, log_name)
line_counter[line_key] += 1
for (host, date, log_name), line_count in list(line_counter.items()):
new_aggregate_log = AccessLogAggregate(
domain=host,
access_date=date,
filename=log_name,
access_count=line_count
)
aggregate_logs.append(new_aggregate_log)
for log_to_save in aggregate_logs: #TODO: Change to commit=false until entire program runs through?
try:
log_to_save.save()
except IntegrityError as ex:
print(f"Ignoring {ex}")
def get_accessible_keys(bucket, prefix="openedx-logos-cloudfront/"):
for key in bucket.list(prefix=prefix):
if key.storage_class != "GLACIER":
yield key
def get_key_content(key):
# Create an in-memory bytes IO buffer
with io.BytesIO() as b:
key.get_file(b)
b.seek(0)
if key.name.endswith(".gz"):
b = gzip.GzipFile(None, 'rb', fileobj=b)
return b.read().decode('utf8')
def process_keys(accessible_keys):
num_files_processed = 0
for key in accessible_keys:
if DEBUG:
print("Processing %r" % (key,))
# Process in-memory file
key_name = key.name
if not is_in_filename_log(key_name):
file_content = get_key_content(key)
if DEBUG:
print("%s not found, adding!" % key_name)
process_log_file(file_content, key_name)
add_to_filename_log(key_name)
num_files_processed += 1
return num_files_processed
# TODO: Get most recent date already in table, and start next search there - will save time searching
def run_command():
conn = boto.connect_s3()
bucket = conn.get_bucket("openedx-logs", validate=False)
print("Gathering accessible keys...")
accessible_keys = get_accessible_keys(bucket)
print("Processing keys...")
num_files_processed = process_keys(accessible_keys)
print("Finished! New files processed: %s" % num_files_processed)
|
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0.00338,"33":0,"34":0.00677,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0.00338,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0.00338,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0.00338,"64":0,"65":0,"66":0,"67":0,"68":0.00338,"69":0.00338,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.01015,"79":0,"80":0.00338,"81":0.00677,"82":0,"83":0,"84":0.01692,"85":0.03046,"86":0.42977,"87":0.09814,"88":0,"89":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.00338,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0.01015,"38":0,"39":0,"40":0.00338,"41":0,"42":0,"43":0.00338,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0.02369,"50":0,"51":0,"52":0,"53":0.00677,"54":0,"55":0,"56":0.00338,"57":0,"58":0.00338,"59":0.00338,"60":0,"61":0.00338,"62":0,"63":0.00677,"64":0,"65":0.01015,"66":0,"67":0.00338,"68":0.00338,"69":0.00338,"70":0.00338,"71":0.00338,"72":0,"73":0.00338,"74":0.00338,"75":0.00338,"76":0.00338,"77":0.00677,"78":0.00677,"79":0.0203,"80":0.01692,"81":0.02707,"83":0.04061,"84":0.01015,"85":0.01692,"86":0.04738,"87":0.12521,"88":2.72074,"89":5.27904,"90":0.00338,"91":0.00338,"92":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0.01015,"51":0,"52":0,"53":0,"54":0.0203,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0.11844,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.01508,"6.0-6.1":0.00274,"7.0-7.1":0.02879,"8.1-8.4":0.00274,"9.0-9.2":0.00274,"9.3":0.1467,"10.0-10.2":0.01508,"10.3":0.13573,"11.0-11.2":0.05484,"11.3-11.4":0.09049,"12.0-12.1":0.08774,"12.2-12.4":0.40993,"13.0-13.1":0.12887,"13.2":0.02468,"13.3":0.14258,"13.4-13.7":0.70333,"14.0-14.5":10.79394},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0.00677,"13":0.0203,"14":0.42638,_:"0","3.1":0,"3.2":0,"5.1":0.07783,"6.1":0,"7.1":0,"9.1":0,"10.1":0.00338,"11.1":0.01015,"12.1":0.01015,"13.1":0.06768},B:{"12":0,"13":0,"14":0.00338,"15":0.00338,"16":0.00338,"17":0.01015,"18":0.01692,"79":0,"80":0,"81":0,"83":0,"84":0.00338,"85":0.00338,"86":0.00338,"87":0.00677,"88":0.1489,"89":0.52114},P:{"4":0.22289,"5.0-5.4":0.02026,"6.2-6.4":0.01013,"7.2-7.4":0.14184,"8.2":0.01013,"9.2":0.11145,"10.1":0.05066,"11.1-11.2":0.3242,"12.0":0.18236,"13.0":2.32008},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.00196,"4.2-4.3":0.01113,"4.4":0,"4.4.3-4.4.4":0.10736},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.03722,"5.5":0},K:{_:"0 10 11 12 11.1 11.5 12.1"},J:{"7":0,"10":0},N:{"10":0,"11":0},Q:{"10.4":0},O:{"0":0.44989},H:{"0":0.36329},L:{"0":70.13613},S:{"2.5":0},R:{_:"0"},M:{"0":0.22494}};
|
import os
from losses import SSD_LOSS
from utils import data_utils
from networks import SSD_MOBILENET
from tensorflow.keras.optimizers import SGD
from data_generators import SSD_DATA_GENERATOR
from tensorflow.keras.callbacks import ModelCheckpoint
from tensorflow.keras.applications.mobilenet import preprocess_input
def ssd_mobilenetv1(config, args):
training_config = config["training"]
with open(args.label_maps, "r") as label_map_file:
label_maps = [i.strip("\n") for i in label_map_file.readlines()]
training_samples = data_utils.get_samples_from_split(
split_file=args.training_split,
images_dir=args.images_dir,
labels_dir=args.labels_dir
)
if args.validation_split is not None:
validation_samples = data_utils.get_samples_from_split(
split_file=args.validation_split,
images_dir=args.images_dir,
labels_dir=args.labels_dir
)
training_data_generator = SSD_DATA_GENERATOR(
samples=training_samples,
config=config,
label_maps=label_maps,
shuffle=args.shuffle,
batch_size=args.batch_size,
augment=args.augment,
process_input_fn=preprocess_input
)
if args.validation_split is not None:
print("-- validation split specified")
validation_data_generator = SSD_DATA_GENERATOR(
samples=validation_samples,
config=config,
label_maps=label_maps,
shuffle=args.shuffle,
batch_size=args.batch_size,
augment=False,
process_input_fn=preprocess_input
)
loss = SSD_LOSS(
alpha=training_config["alpha"],
min_negative_boxes=training_config["min_negative_boxes"],
negative_boxes_ratio=training_config["negative_boxes_ratio"]
)
model = SSD_MOBILENET(
config=config,
label_maps=label_maps,
is_training=True
)
optimizer = SGD(
lr=args.learning_rate,
momentum=0.9,
decay=0.0005,
nesterov=False
)
model.compile(
optimizer=optimizer,
loss=loss.compute
)
if args.checkpoint is not None:
assert os.path.exists(args.checkpoint), "checkpoint does not exist"
model.load_weights(args.checkpoint, by_name=True)
model.fit(
x=training_data_generator,
validation_data=validation_data_generator if args.validation_split is not None else None,
batch_size=args.batch_size,
validation_batch_size=args.batch_size,
epochs=args.epochs,
callbacks=[
ModelCheckpoint(
filepath=os.path.join(
args.output_dir,
"cp_{epoch:02d}_loss-{loss:.2f}.h5" if args.validation_split is None else "cp_{epoch:02d}_loss-{loss:.2f}_valloss-{val_loss:.2f}.h5"
),
save_weights_only=True,
monitor='loss' if args.validation_split is None else 'val_loss',
mode='min'
)
]
)
model.save_weights(os.path.join(args.output_dir, "model.h5"))
|
import pandas as pd
from typing import List
def success_rate(counterfactuals: pd.DataFrame) -> float:
"""
Computes success rate for all counterfactuals
Parameters
----------
counterfactuals: All counterfactual examples inclusive nan values
Returns
-------
% non-null
"""
return (counterfactuals.dropna().shape[0]) / counterfactuals.shape[0]
def individual_success_rate(counterfactuals: pd.DataFrame) -> List[int]:
"""
Computes binary success eval for all given individuals
Parameters
----------
counterfactuals: All counterfactual examples inclusive nan values
Returns
-------
list of 0/1 vals based on null/non-null
"""
check_na = lambda x: any(pd.isna(x))
return counterfactuals.apply(check_na, axis=1).astype(int)
|
/******************************************************************************
* Copyright 2018 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#pragma once
#include "cyber/common/macros.h"
namespace apollo {
namespace perception {
namespace camera {
struct GlobalConfig {
public:
int track_feature_gpu_id;
private:
DECLARE_SINGLETON(GlobalConfig)
};
inline GlobalConfig::GlobalConfig() {}
} // namespace camera
} // namespace perception
} // namespace apollo
|
export const CREATE_QUESTION = 'CREATE_QUESTION';
export const UPDATE_QUESTION = 'UPDATE_QUESTION';
export const REMOVE_QUESTION = 'REMOVE_QUESTION';
|
#############################################################################
# Copyright (c) 2015 Ericsson AB and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
""" Handler for yardstick command 'task' """
from __future__ import print_function
from __future__ import absolute_import
import logging
from yardstick.benchmark.core.task import Task
from yardstick.common.utils import cliargs
from yardstick.common.utils import write_json_to_file
from yardstick.cmd.commands import change_osloobj_to_paras
output_file_default = "/tmp/yardstick.out"
LOG = logging.getLogger(__name__)
class TaskCommands(object): # pragma: no cover
"""Task commands.
Set of commands to manage benchmark tasks.
"""
@cliargs("inputfile", type=str, help="path to task or suite file", nargs=1)
@cliargs("--task-args", dest="task_args",
help="Input task args (dict in json). These args are used"
"to render input task that is jinja2 template.")
@cliargs("--task-args-file", dest="task_args_file",
help="Path to the file with input task args (dict in "
"json/yaml). These args are used to render input"
"task that is jinja2 template.")
@cliargs("--keep-deploy", help="keep context deployed in cloud",
action="store_true")
@cliargs("--parse-only", help="parse the config file and exit",
action="store_true")
@cliargs("--output-file", help="file where output is stored, default %s" %
output_file_default, default=output_file_default)
@cliargs("--suite", help="process test suite file instead of a task file",
action="store_true")
def do_start(self, args, **kwargs):
param = change_osloobj_to_paras(args)
self.output_file = param.output_file
result = {}
try:
result = Task().start(param, **kwargs)
except Exception as e:
self._write_error_data(e)
LOG.exception("")
if result.get('result', {}).get('criteria') == 'PASS':
LOG.info('Task Success')
else:
LOG.info('Task Failed')
raise RuntimeError('Task Failed')
def _write_error_data(self, error):
data = {'status': 2, 'result': str(error)}
write_json_to_file(self.output_file, data)
|
Acko.Effect.Visualizer = function () {
Acko.Effect.call(this);
this.order = -5;
this.display = null;
this.last = 0;
this.skip = 25;
this.fade = 10;
this.volume = 1;
this.rotate = 0;
this.fakelevels = [];
this.level = 0;
this.levels = [];
this.smooths = [];
this.phases = [];
this.finals = [];
this.boosts = [];
this.smoothboosts = [];
this.growlCancel = [];
this.playing = false;
this.lastTime = this.skip;
this.refRotation = _v();
this.quietFrames = 0;
this.q1 = new THREE.Quaternion();
this.slerpT = 0;
this.slerpA = 0;
this.slerpB = 0;
}
Acko.Effect.Visualizer.prototype = _.extend(new Acko.Effect(), {
build: function (exports) {
exports.visualizer = this;
},
start: function () {
if (this.playing) return;
gl.resize(true);
this.masthead.showArrow = 0;
this.volume = 1;
this.playing = true;
this.startedAt = null;
try {
if (this.audio) {
this.audio.pause();
this.audio.currentTime = 0;
this.audio.play();
}
else {
this.injectAudio();
// throw "no analyzer";
this.analyzer = new ThreeAudio.Source(2048, this.audio);
}
} catch (e) {
growl({
type: 'info',
text: '<strong>Web Audio API</strong> support is required for music response.',
});
this.analyzer = null;
}
},
stop: function () {
this.playing = false;
this.masthead.showArrow = 1;
if (this.audio) {
try {
this.audio.currentTime = 0;
this.audio.pause();
}
catch (e) {};
}
this.cameraController.lock(0);
this.volume = 0;
this.tracks.tracks.forEach(function (track, i) {
if (track._length !== undefined) {
track.length = track._length;
track.travel = track.initial = track._initial;
delete track._length;
delete track._initial;
}
});
},
update: function (exports) {
this.tracks = exports.tracks;
this.cameraController = exports.cameraController;
this.background = exports.background;
this.masthead = exports.masthead;
// Use inverse camera for visualizer to not disturb with scrolling camera
var tg = this.tracks.visibleGroup;
var tdg = this.tracks.depthGroup;
var bg = this.background.group;
if (!this.playing) {
tg.useQuaternion = tdg.useQuaternion = bg.useQuaternion = false;
tg.rotation.x = 0;
tg.rotation.y = 0;
tg.rotation.z = 0;
tdg.rotation.copy(tg.rotation);
bg.rotation.copy(tg.rotation);
return;
}
// Audio clock is not fine enough in moz, replicate its signal
if (!this.startedAt && this.audio && this.audio.currentTime > this.skip) {
this.startedAt = Time.absolute() - this.skip;
}
var time = this.startedAt ? Time.absolute() - this.startedAt : 0;
// Stuff
if (this.lastTime < 400 && time >= 400) {
achievement && achievement('hpntd');
}
var end = 422;
// Volume fade
var target = this.volume * Math.min(1, Math.max(0, Math.exp((-exports.scroll.y / exports.pageStart)*4.0 + .3)));
// Force volume up for demonstration
if (this.quietFrames < 0) {
target = Math.min(1, 1 - this.quietFrames / 30);
}
var fade = Math.max(0, Math.min(1, (time - this.skip) / this.fade))
* Math.max(0, Math.min(1, (end - time) / this.fade));
this.level = this.level + (target - this.level) * .05;
if (this.audio) {
try {
this.audio.volume = this.level * fade * Acko.globalVolume;
} catch (e) {};
}
// Get audio levels
var levels;
if (this.analyzer) {
this.analyzer.update();
if (this.analyzer.data) {
levels = this.analyzer.data.freq;
}
}
if (!levels) {
levels = this.fakelevels;
var tt = time / 131.9;
var intensity = Math.min(1,tt);
for (var i = 0; i < 1024; ++i) {
var displace = Math.sin(i + tt * .3112 + Math.cos(tt *.735)) + Math.sin(i + tt * .498 + Math.cos(tt *.261));
levels[i] = Math.min(255, Math.max(0, levels[i]||0)*.98 + displace*(1.5+intensity));
}
}
// Map tracks to frequencies
var bins = [
15, 15, 20, 20, 40, 40, 10, 10, 70, 50, 60, 100, 50, 80,
];
var volumes = [
.35, .35, .5, .5, 1, 1, .6, .6, 3.0, 1.7, 1.9, 4.5, 1.8, 2.1,
];
var offsets = [
-150, -150, 0, 0, 0, 0, 200, 200, 200, -200, -400, -500, -500, 500,
];
var lengths = [
20, 20, 20, 20, 20, 20, 90, 90, 100, 50, 50, 200, 50, 50,
];
// Begin wild phase
var trans = 129.7;
var wild = Math.max(0, Math.min(1, (time - trans) / 2));
// Begin turning
var trans2 = 104.5-2;
var turn = Math.max(0, (time - trans2) / 15);
turn = (turn < .5 ? turn*turn : turn-.25);
// Camera 'path'
tg.rotation.x = (Math.sqrt(2 + turn*turn)/2 - Math.sqrt(2)/2)*3.66 + Math.sin(turn * .133 + .25 * Math.sin(turn*.471));
tg.rotation.y = (Math.sqrt(turn+1)-1 + Math.sin(turn * .165 + .5 * Math.sin(turn*1.411)))*1.74;
tg.rotation.z = turn * .21;
// Collision fix
var mid = 134.9;
var range = 20;
var lerp = .5+.5*Math.cos(Math.max(-π, Math.min(π, (time - mid)*π/range)));
tg.rotation.y += lerp * .2;
// Direction change
var trans8 = 365;
var change = Math.min(1, Math.max(0, (time - trans8) / 60));
tg.rotation.x += (.5-.5*Math.cos(change*π)) * π * .3;
tg.rotation.z += (.5-.5*Math.cos(change*π)) * π * .2;
// Dispersion phases
var trans4 = 180.5;
wild *= Math.max(0, Math.min(1, (trans4 - time - 1) / π));
var disperse = Math.max(0, Math.min(1, (time - trans4 - 1) / π))
var trans5 = 199.65;
wild += Math.max(0, Math.min(1, (time - trans5 - 1) / π));
disperse *= Math.max(0, Math.min(1, (trans5 - time - 1) / π))
var trans6 = 243.65;
wild *= Math.max(0, Math.min(1, (trans6 - time - 1) / π));
disperse += Math.max(0, Math.min(1, (time - trans6 - 1) / π))
var trans7 = 294.85;
wild += Math.max(0, Math.min(1, (time - trans7 - 1) / π));
disperse *= Math.max(0, Math.min(1, (trans7 - time - 1) / π))
disperse = .5 - .5 * Math.cos(disperse * π);
wild = .6 - .6 * Math.cos(wild * π);
// Apply to tracks
this.tracks.tracks.forEach(function (track, i) {
if (i > 13) return;
if (this.levels[i] === undefined) {
this.phases[i] = this.finals[i] = this.smooths[i] = this.smoothboosts[i] = 0;
this.levels[i] = [0, 0, 0];
this.boosts[i] = [0, 0, 0];
}
// 3-tap average filter for levels
var level = (levels[bins[i]*8]/255 * volumes[i]) || 0;
level = Math.max(0, level*1.1 - .1);
var l = this.levels[i];
l.push(level);
if (l.length > 3) l.shift();
var avgLevel = l.reduce(function (a, b) { return a + b; }, 0) / l.length;
// Two phases of lerping
var timefactor = Math.min(4.0, exports.delta / 0.01666);
var lerpfactor = .045 * timefactor;
var smoothed = this.smooths[i] = this.smooths[i] + (avgLevel - this.smooths[i]) * lerpfactor;
var finaled = this.finals[i] = this.finals[i] + (smoothed - this.finals[i]) * lerpfactor;
// Boost from derivative
var boost = Math.max(0, -this.finals[i] + this.smooths[i]);
// 5-tap average filter for boost
var b = this.boosts[i];
b.push(boost);
if (b.length > 5) b.shift();
var avgBoost = b.reduce(function (a, b) { return a + b; }, 0) / b.length;
smoothBoost = this.smoothboosts[i] = this.smoothboosts[i] + (avgBoost - this.smoothboosts[i]) * .1;
// Calculate final length
var finalLevel = finaled * 1500 + smoothBoost * 4;
var length = (finalLevel + lengths[i]) * fade + lengths[i];
// Store original track for later
if (track._length === undefined) {
track._length = track.length;
track._initial = track.initial;
track.distance = 0;
track.speed = 0;
}
// Integrate level into phase
this.phases[i] += (Math.sqrt(Math.abs(finaled)) * .01 + .0025) * timefactor;
var ph = this.phases[i];
// Compose motions
var start = track.initial + track._length / 2 - length + offsets[i];
var wobble = (i > 7) ? 400 * pow(wild * (Math.sin(1+ph*2.31+i+Math.cos(ph*.181))+Math.sin(ph*.718)), 2) : 0;
var glide = Math.sin(ph) * (200 + length/3) * (1.0 - disperse * .75) + 900 * disperse * pow(Math.sin(time * .64), .85);
track.travel = start + glide + wobble;
track.length = length * 2;
var ease = .5 + .5 * Math.cos(Math.min(1, fade * 2) * π);
track.travel = track.travel + (track.initial - track.travel) * ease;
track.length = track.length + (track._length - track.length) * ease;
}.bind(this));
// Slerp away visualizer camera on end / scroll
var scrollLerp = Math.max(0, Math.min(1, exports.scroll.y / (exports.pageStart / 2) * 2.0 - 1.3));
this.slerpT = (time > end - 15) ? 1 : scrollLerp;
var lerpFactor = (time > end - 15) ? (.005 + .095 * scrollLerp) : .1;
this.slerpA = this.slerpA + (this.slerpT - this.slerpA) * lerpFactor;
this.slerpB = this.slerpB + (this.slerpA - this.slerpB) * lerpFactor;
this.cameraController.lock((this.playing && turn > 0.01) ? .01 : 0);
tg.quaternion.setFromEuler(tg.rotation, tg.eulerOrder);
tg.quaternion.slerp(this.q1, this.slerpB);
tdg.rotation.copy(tg.rotation);
bg.rotation.copy(tg.rotation);
tdg.quaternion.copy(tg.quaternion);
bg.quaternion.copy(tg.quaternion);
tg.useQuaternion = tdg.useQuaternion = bg.useQuaternion = this.slerpB > 0;
if (time > end + 15) {
this.stop();
}
this.lastTime = time;
},
tick: function (exports) {
if (!this.playing) return;
// Stop
if (this.level < 0.05 || this.quietFrames < 0) this.quietFrames++;
else this.quietFrames = Math.min(0, this.quietFrames);
if (this.quietFrames > 180) {
this.stop();
this.quietFrames = 0;
}
},
resize: function (exports) {
},
injectAudio: function () {
if (this.audio) return;
var audio = this.audio = new Audio();
var url;
var sources = [
['audio/ogg', 'audio/dangerous-days.ogg'],
['audio/mpeg', 'audio/dangerous-days.mp3'],
];
sources.forEach(function (source) {
if (audio.canPlayType(source[0])) {
url = source[1];
}
});
if (!url) {
growl({ type: 'info', text: 'Your browser does not support MP3 or OGG audio playback.' });
return;
}
audio.style.display = 'none';
document.body.appendChild(audio);
audio.autoplay = true;
audio.src = url;
audio.addEventListener('play', function () {
try {
audio.currentTime = this.skip;
} catch (e) {};
audio.volume = 0;
growl({
type: 'music',
text: '<strong>Seba</strong><br>Dangerous Days',
delay: 500,
link: 'http://www.secretoperations.com/',
});
}.bind(this));
},
});
Acko.Effects.push(new Acko.Effect.Visualizer());
|
/**
* @since 2016-11-17 11:36
* @author vivaxy
*/
import path from 'path';
import fse from 'fs-extra';
import fileExists from '../file/fileExists';
import { GT_HOME, CONFIG_FILE_NAME } from '../config';
const userConfigFile = path.join(GT_HOME, CONFIG_FILE_NAME);
export const read = () => {
return require(userConfigFile); // eslint-disable-line global-require, import/no-dynamic-require
};
export const write = async(json) => {
return await fse.outputJson(userConfigFile, json);
};
export const exist = async() => {
return await fileExists(userConfigFile);
};
export const readScaffoldListByStatOrder = () => {
const userConfig = read();
const scaffoldConfig = userConfig.scaffold;
const scaffoldNameList = Object.keys(scaffoldConfig);
scaffoldNameList.sort((prev, next) => {
return scaffoldConfig[next].stat - scaffoldConfig[prev].stat;
});
return scaffoldNameList;
};
|
"use strict"
window.onload=function(){
const div = document.getElementById("svgArea");
const svgEl = document.getElementById("mySVG");
svgEl.setAttribute("width","700");
svgEl.setAttribute("height","600");
svgEl.setAttribute("viewBox"," -190 -165 380 330");
const inputParamFr = document.getElementById("param1");
const inputParamSt = document.getElementById("param2");
const checkboxConst = document.getElementById('checkboxConst');
const checkboxTang = document.getElementById('checkboxTang');
const checkboxLad = document.getElementById('checkboxLad');
const checkboxOsc = document.getElementById('checkboxOsc');
const checkboxNormal = document.getElementById('checkboxNormal');
const checkboxBackgrd = document.getElementById('checkboxBackgrd');
checkboxConst.checked = true;
checkboxTang.checked = false;
checkboxLad.checked = false;
checkboxOsc.checked = false;
checkboxNormal.checked = false;
checkboxBackgrd.checked = false;
let mybackground = "black";
let myforeground = "white";
let path = document.createElementNS( "http://www.w3.org/2000/svg", "path" );
path.setAttribute( 'stroke' , '#FFFFFF' );
path.setAttribute( 'stroke-width' , 1.5 );
path.setAttribute( 'fill' , 'none' );
let txt = '';
svgEl.appendChild(path);
let pathd = document.createElementNS( "http://www.w3.org/2000/svg", "path" );
pathd.setAttribute( 'stroke' , '#FF00FF' );
pathd.setAttribute( 'stroke-width' , 2 );
pathd.setAttribute( 'fill' , 'none' );
let txtd = '';
svgEl.appendChild(pathd);
let achsen = document.createElementNS( "http://www.w3.org/2000/svg", "path" );
achsen.setAttribute( 'stroke' , '#FFFFFF' );
achsen.setAttribute( 'stroke-width' , 0.4 );
achsen.setAttribute( 'fill' , 'none' );
svgEl.appendChild(achsen);
let txta = 'M'+' '+'-200'+' '+'0'+'L'+' '+'200'+' '+'0';
txta = txta+'M'+' '+'0'+' '+'-200'+'L'+' '+'0'+' '+'200';
achsen.setAttribute('d', txta);
let achsen45 = document.createElementNS( "http://www.w3.org/2000/svg", "path" );
achsen45.setAttribute( 'stroke' , '#FF0000' );
achsen45.setAttribute( 'stroke-width' , 1.5 );
achsen45.setAttribute( 'fill' , 'none' );
svgEl.appendChild(achsen45);
let txta45 = 'M'+' '+'-200'+' '+'-200'+'L'+' '+'200'+' '+'200';
txta45 = txta45+'M'+' '+'200'+' '+'-200'+'L'+' '+'-200'+' '+'200';
achsen45.setAttribute('d', '');
let normal = document.createElementNS( "http://www.w3.org/2000/svg", "path" );
normal.setAttribute( 'stroke' , '#FF0000' );
normal.setAttribute( 'stroke-width' , 0.5 );
normal.setAttribute( 'fill' , 'none' );
let txtn = '';
normal.setAttribute("d",txtn);
svgEl.appendChild(normal);
let normalmv = document.createElementNS( "http://www.w3.org/2000/svg", "path" );
normalmv.setAttribute( 'stroke' , '#007700' );
normalmv.setAttribute( 'stroke-width' , 1.5 );
normalmv.setAttribute( 'fill' , 'none' );
let txtnmv = '';
normalmv.setAttribute("d",txtnmv);
svgEl.appendChild(normalmv);
let cirst = document.createElementNS("http://www.w3.org/2000/svg","circle");
cirst.setAttribute("style","fill:none; stroke-width:1");
cirst.setAttribute( 'stroke' , '#FFFF00' );
cirst.setAttribute("cx", 0);
cirst.setAttribute("cy", 0);
svgEl.appendChild(cirst);
let cirrl = document.createElementNS("http://www.w3.org/2000/svg","circle");
cirrl.setAttribute("style","fill:none; stroke-width:1");
cirrl.setAttribute( 'stroke' , '#FFFF00' );
cirrl.setAttribute("cx", 0);
cirrl.setAttribute("cy", 0);
cirrl.setAttribute("r", 0);
svgEl.appendChild(cirrl);
let cirrl2 = document.createElementNS("http://www.w3.org/2000/svg","circle");
cirrl2.setAttribute("style","fill:none; stroke-width:1");
cirrl2.setAttribute( 'stroke' , '#999999' );
cirrl2.setAttribute("cx", 0);
cirrl2.setAttribute("cy", 0);
cirrl2.setAttribute("r", 0);
//svgEl.appendChild(cirrl2); // not used in Astroid
// Thick dots:
let cirtm = [];
for (let i=1; i < 5; i++)
{
cirtm[i] = document.createElementNS("http://www.w3.org/2000/svg","circle");
cirtm[i].setAttribute("style","fill:#007700; stroke:#007700; stroke-width:1");
cirtm[i].setAttribute("cx", 0);
cirtm[i].setAttribute("cy", 0);
cirtm[i].setAttribute("r", 0);
svgEl.appendChild(cirtm[i]);
}
let rstick = document.createElementNS( "http://www.w3.org/2000/svg", "path" );
rstick.setAttribute("style","fill:none; stroke-width:2");
rstick.setAttribute( 'stroke' , '#FFFF00' );
let txtst = '';
svgEl.appendChild(rstick);
let tancon = document.createElementNS( "http://www.w3.org/2000/svg", "path" );
tancon.setAttribute("style","fill:none; stroke-width:1.5");
tancon.setAttribute( 'stroke' , '#007700' );
//tancon.setAttribute( 'stroke-dasharray', '1');
let txttn = '';
tancon.setAttribute("d",txttn);
svgEl.appendChild(tancon);
let cir = document.createElementNS("http://www.w3.org/2000/svg","circle");
cir.setAttribute("style","fill:none; stroke-width:1");
cir.setAttribute( 'stroke' , '#FFFF00' );
//svgEl.appendChild(cir);
let rline = document.createElementNS( "http://www.w3.org/2000/svg", "path" );
rline.setAttribute( 'stroke-width' , 1.0 );
rline.setAttribute( 'fill' , 'none' );
rline.setAttribute( 'stroke' , '#FFFF00' );
let txtl = '';
rline.setAttribute("d",txtl);
svgEl.appendChild(rline);
/* ============ used in making path ========== */
let px = 0;
let py = 0;
let mx = 0;
let my = 0;
let hx = 0;
let hy = 0;
let qx = 0;
let qy = 0;
let nx = 0;
let ny = 0;
let kx = 0;
let ky = 0;
let jjc = 0;
let jjr = 0;
let jjl = 0;
/* ============== Definition of curve: =========== */
const frequency = -3;
let n_angle = 0;
let cosangl = cos(n_angle*pi/2);
let sinangl = sin(n_angle*pi/2);
let stick = 1;
let scale;
const RR = 9;
let rad = RR/frequency;
let strt = RR - rad;
let sticklength = abs(rad)*stick;
let rho = -1;
const aa = RR+sticklength; // = norm1(theCurve(0));
function theCurve(t) {
const cvx = RR*cos(t) + sticklength*cos(frequency*t);
const cvy = RR*sin(t) + sticklength*sin(frequency*t);
return [cvx, cvy];
}
function dtheCurve(t) {
return [-RR*sin(t) - sticklength*frequency*sin(frequency*t), RR*cos(t) + sticklength*frequency*cos(frequency*t)];
//return scalTimesVec1(1/(2*epsD), vecDif1(theCurve(t+epsD), theCurve(t-epsD)) );
}
function kappa(t) {
return numCurvature(t, dtheCurve);
}
/* ============ important globals for curve ============= */
function adaptScale() {
let res;
if (checkboxConst.checked || checkboxTang.checked)
{ res = 9;
if (stick > 1.4) {res = res*4/(3+stick);}
}
else
{ res = 6;
}
rho = abs(res*rad);
return res;
}
let s0 = 0.0; //0.0001*pi;
let s1 = 2*pi;
const n = 256;
const ds = (s1 - s0)/n;
const ns = 2;
let curve = [];
function fillCurve() {
let result;
scale = adaptScale();
cosangl = cos(n_angle*pi/2);
sinangl = sin(n_angle*pi/2);
let t = 0;
for (let i=0; i<n+1; i++)
{
t = s0 +(s1-s0)*(i/n);
result = [theCurve(t), dtheCurve(t)];
curve[i] = result;
}
return curve;
}
/* ============
===================================================================== */
function removeOscCirc() {
if ( cir.parentElement)
{svgEl.removeChild(cir);}
rline.setAttribute("d", '');
}
function makeOscSvg(j) {
let newRadius = "";
let midX = "";
let midY = "";
function getOscCirc(j)
{
const pos = curve[j][0];
const tan = curve[j][1];
const rad = 1/kappa(s0+j*ds);
const unrml = [-tan[1], tan[0]];
const mdif = scalTimesVec1(rad/norm1(unrml), unrml);
px = pos[0]*scale; py = pos[1]*scale;
qx = (mdif[0]+pos[0])*scale; qy = (mdif[1]+pos[1])*scale;
txtl = 'M'+px+' '+py+ ' L'+qx+' '+qy; // for radius
return [abs(rad), mdif[0]+pos[0], mdif[1]+pos[1]]; // not scaled
}
[newRadius, midX, midY] = scalTimesVec1(scale, getOscCirc(j));
if (abs(midX) + abs(midY) + newRadius < 16000)
{
cir.setAttribute("cx", midX);
cir.setAttribute("cy", midY);
cir.setAttribute("r",newRadius);
svgEl.appendChild(cir);
rline.setAttribute("d", txtl );
}
} // make circles with radius -- append in render()
function removeRollconst() {
for (let i=1; i < 5; i++)
{ cirtm[i].setAttribute("r", 0.1); }
pathd.setAttribute( "d" , '' );
cirst.setAttribute("r","0");
cirrl.setAttribute("r","0");
rstick.setAttribute("d",'');
tancon.setAttribute("d",'');
normalmv.setAttribute("d",'');
achsen45.setAttribute('d', '');
achsen.setAttribute( 'stroke-width' , 0.4 );
}
function removeTangconst() {
for (let i=1; i < 5; i++)
{ cirtm[i].setAttribute("r", 0.1); }
//pathd.setAttribute( "d" , '' );
//cirst.setAttribute("r","-1");
//cirrl.setAttribute("r","-1");
//rstick.setAttribute("d",'');
tancon.setAttribute("d",'');
txtnmv = '';
normalmv.setAttribute("d",txtnmv);
achsen45.setAttribute('d', '');
}
function makeRollSvg(j) {
const tj = s0+j*ds;
const mx = scale*RR*cos(tj);
const my = scale*RR*sin(tj);
const Mx = mx/2;
const My = my/2;
rho = abs(scale*rad);
const qx = scale*theCurve(tj)[0];
const qy = scale*theCurve(tj)[1];
cirrl.setAttribute("r", rho);
cirrl.setAttribute("cx", mx);
cirrl.setAttribute("cy", my);
txtst = 'M'+mx+' '+my+ ' L'+qx+' '+qy;
rstick.setAttribute("d", txtst );
if (stick == 1)
{
// cirtm[0].setAttribute("cx", Mx);
// cirtm[0].setAttribute("cy", My);
for (let i=1; i < 3; i++)
{ cirtm[i].setAttribute("r", 2.5); }
}
else
{
for (let i=1; i < 3; i++)
{ cirtm[i].setAttribute("r", 0); }
}
const tan = dtheCurve(tj);
const nx = -8*tan[1];
const ny = 8*tan[0];
const bx = scale*strt*cos(tj);
const by = scale*strt*sin(tj);
let tx = 8*tan[0];
let ty = 8*tan[1];
let xt = -tx;
let yt = -ty;
if (stick == 1)
{
const tnm = sqrt(tx*tx + ty*ty);
if (tnm > 0)
{ tx = scale*aa*sgn(qx)*abs(tx)/tnm;
xt = 0;
yt = scale*aa*sgn(qy)*abs(ty)/tnm;
ty = 0;}
else { tx = qx; ty = qy; xt = 0; yt = 0;}
txttn = 'M'+bx+' '+by+'L'+qx+' '+qy+'L'+tx+' '+ty+ 'L'+xt+' '+yt;
cirtm[1].setAttribute("cx", tx);
cirtm[1].setAttribute("cy", ty);
cirtm[2].setAttribute("cx", xt);
cirtm[2].setAttribute("cy", yt);
}
else
{txttn = 'M'+bx+' '+by+'L'+qx+' '+qy + 'l'+tx+' '+ty+'M'+qx+' '+qy + 'l'+xt+' '+yt;}
tancon.setAttribute("d", txttn );
if (!(checkboxTang.checked))
{ removeTangconst(); }
}
function makeLadderSvg(j) {
if ((stick == 1)&& checkboxLad.checked)
{
const tj = s0+j*ds;
const qx = scale*theCurve(tj)[0];
const qy = scale*theCurve(tj)[1];
const tan = dtheCurve(tj);
//const bx = scale*strt*cos(tj);
//const by = scale*strt*sin(tj);
let tx = 8*tan[0];
let ty = 8*tan[1];
let xt = -tx;
let yt = -ty;
const tnm = sqrt(tx*tx + ty*ty);
if (tnm > 0)
{ tx = scale*aa*sgn(qx)*abs(tx)/tnm;
xt = 0;
yt = scale*aa*sgn(qy)*abs(ty)/tnm;
ty = 0;}
else { tx = qx; ty = qy; xt = 0; yt = 0;}
txttn = 'M'+qx+' '+qy+'L'+tx+' '+ty+ 'L'+xt+' '+yt; //+bx+' '+by+'L'
tancon.setAttribute("d", txttn );
cirtm[1].setAttribute("cx", tx);
cirtm[1].setAttribute("cy", ty);
cirtm[2].setAttribute("cx", xt);
cirtm[2].setAttribute("cy", yt);
// Large Ladder
const nx = -8*tan[1];
const ny = 8*tan[0];
//console.log("nx,ny =",nx,ny);
const sgxy = sgn(qx*qy);
let lam;
let Nx;
let Ny;
if (!(abs(nx+sgxy*ny) < epsD)) {
lam = -(qx + sgxy*qy)/(nx+sgxy*ny);
Nx = nx*lam;
Ny = ny*lam;
}
else {
Nx = qy;
Ny = -qx;
}
txtnmv = 'M'+qx+' '+qy+'l'+Nx+' '+Ny;
cirtm[3].setAttribute("cx", qx+Nx);
cirtm[3].setAttribute("cy", qy+Ny);
if (!(abs(nx-sgxy*ny) < epsD)) {
lam = -(qx - sgxy*qy)/(nx-sgxy*ny);
Nx = nx*lam;
Ny = ny*lam;
//console.log("Nx,Ny =",Nx,Ny);
}
else {
Nx = -qy;
Ny = qx;
}
txtnmv = txtnmv + 'M'+qx+' '+qy+'l'+Nx+' '+Ny;
normalmv.setAttribute("d",txtnmv);
cirtm[4].setAttribute("cx", qx+Nx);
cirtm[4].setAttribute("cy", qy+Ny);
for (let i=1; i < 5; i++)
{ cirtm[i].setAttribute("r", 2.5); }
}
}
/* ============================================================= */
function makeNormalsSVG() {
let nrml = [];
let tngl = [];
let aux = [];
let kap = 1;
let ptsx = 0;
let ptsy = 0;
let qtsx = 0;
let qtsy = 0;
let nns = 2;
txtn = '';
for (let i = 0; i < n/nns; i++) {
aux = [- curve[nns*i][1][1], curve[nns*i][1][0]];
kap = kappa(s0+nns*i*ds);
if (!(abs(kap) < epsD)) {
nrml = scalTimesVec1(cosangl*scale/kap/norm1(aux), aux);
tngl = [nrml[1], -nrml[0]];
ptsx = curve[nns*i][0][0]*scale;
ptsy = curve[nns*i][0][1]*scale;
qtsx = ptsx + nrml[0]*cosangl + nrml[1]*sinangl;
qtsy = ptsy + nrml[1]*cosangl - nrml[0]*sinangl;
//if (i < 3) {console.log("curve[3] ",curve[3]);}
txtn += 'M' +ptsx +' '+ptsy +'L' +qtsx +' '+qtsy;
}
}
//console.log("txtn =", txtn);
normal.setAttribute( "d" , txtn );
checkboxNormal.checked = true;
}
//P(t) = (1−t)^3 P0 + 3(1−t)^2t P1 +3(1−t)t^2 P2 + t^3 P3
function myBezier(t) {
return py*cube(1-t) + 3*(py+my)*sqr(1-t)*t + 3*(qy-ny)*(1-t)*sqr(t) + qy*cube(t);
}
/* =================== makes the Bezier Path ================= */
function makeTXTforpath(cCurve,stopAt_jjr) // theCurve(t)
{
let ttxt = '';
let t = 0;
/* ==================== linear segments only =================== */
// for (let i=0; i<n+1; i++)
// {
// t = s0 + (s1-s0)*(i/n);
// px = theCurve(t)[0];
// py = theCurve(t)[1];
// [px,py] = scalTimesVec1(scale, [px,py]);
// if (i == 0)
// {ttxt += 'M' +px +' '+py;}
// else {ttxt += 'L' +px +' '+py;}
// }
for (let i=0; i<n/ns; i++)
{
// left
px = cCurve[ns*i][0][0];
py = cCurve[ns*i][0][1];
mx = cCurve[ns*i][1][0]*ds*ns/3;
my = cCurve[ns*i][1][1]*ds*ns/3;
hx = px + mx;
hy = py + my;
// right
qx = cCurve[ns*(i+1)][0][0];
qy = cCurve[ns*(i+1)][0][1];
nx = cCurve[ns*(i+1)][1][0]*ds*ns/3;
ny = cCurve[ns*(i+1)][1][1]*ds*ns/3;
kx = qx - nx;
ky = qy - ny;
// handle scaling:
[px,py,mx,my,hx,hy,qx,qy,nx,ny,kx,ky] = scalTimesVec1(scale, [px,py,mx,my,hx,hy,qx,qy,nx,ny,kx,ky]);
if (!stopAt_jjr || (ns*(i+1) < jjr+1) || (ns*(i+1) < jjl+1) )
{
ttxt += 'M' +px + ' '+ py;
ttxt += 'C' +hx + ' '+ hy;
ttxt += ' ' +kx + ' '+ ky;
ttxt += ' ' +qx + ' '+ qy;
}
}
return ttxt;
}
/* ============================================================= */
// let jjc = 0; see initial declarations
// let jjr = 0;
function render() {
// console.log("txt = ",txt);
path.setAttribute( "d" , txt );
if (checkboxConst.checked) {
jjl = 0;
txtd = makeTXTforpath(curve,true);
pathd.setAttribute( "d" , txtd );
makeRollSvg(jjr);
jjr++; if (jjr == n) {jjr = 0;}
}
if (checkboxLad.checked) {
jjr = 0;
txtd = makeTXTforpath(curve,true);
pathd.setAttribute( "d" , txtd );
makeLadderSvg(jjl);
jjl++; if (jjl == n) {jjl = 0;}
}
if (checkboxOsc.checked) {
makeOscSvg(jjc);
jjc++; if (jjc == n) {jjc = 0;}
}
else { removeOscCirc(); }
if (checkboxNormal.checked) {
normal.setAttribute("d",txtn);
}
else {normal.setAttribute("d",'');
}
div.appendChild(svgEl);
}
/* =========== listener and response ===================== */
let loopID1 = 0;
let loopID2 = 0;
let loopID3 = 0;
const addConstruction = (() => {
window.clearInterval(loopID1);
window.clearInterval(loopID3);
if(checkboxLad.checked) {
checkboxTang.checked = false;
checkboxLad.checked = false;
}
if ( checkboxConst.checked || checkboxTang.checked )
{
checkboxNormal.checked = false;
checkboxOsc.checked = false;
scale = adaptScale();
cirst.setAttribute("r",scale*strt);
fillCurve();
txt = makeTXTforpath(curve,false);
window.clearInterval(loopID2);
loopID2 = window.setInterval(render, 90);
}
else { window.clearInterval(loopID2);
scale = adaptScale();
}
});
const addLadders = (() => {
checkboxOsc.checked = false;
checkboxConst.checked = false;
checkboxTang.checked = false;
if ( checkboxLad.checked ) {
removeRollconst();
stick = 1;
inputParamSt.value = stick;
getStickFactor();
achsen.setAttribute( 'stroke-width' , 1 );
achsen45.setAttribute('d', txta45);
scale = adaptScale();
fillCurve();
txt = makeTXTforpath(curve);
makeNormalsSVG();
window.clearInterval(loopID3);
loopID3 = window.setInterval(render, 150);
}
else {
window.clearInterval(loopID3);
}
});
const startStopCircles = (() => {
checkboxLad.checked = false;
window.clearInterval(loopID2);
window.clearInterval(loopID3);
if ( checkboxOsc.checked ) {
checkboxConst.checked = false;
removeRollconst();
fillCurve();
txt = makeTXTforpath(curve,false);
makeNormalsSVG();
window.clearInterval(loopID1);
loopID1 = window.setInterval(render, 90);
}
else { window.clearInterval(loopID1);}
});
const addRemoveNormals = (() => {
if ( checkboxNormal.checked ) {
checkboxConst.checked = false;
scale = adaptScale();
removeRollconst();
fillCurve();
txt = makeTXTforpath(curve);
makeNormalsSVG();
}
else { normal.setAttribute("d",'');
}
if ( checkboxLad.checked ) { addLadders(); }
render();
});
const toggleBackground = (() => {
if ( checkboxBackgrd.checked ) {
mybackground = "white"; myforeground ="black";}
else {mybackground = "black"; myforeground ="white"; };
title.style.backgroundColor = mybackground;
title.style.color = myforeground;
svgArea.style.backgroundColor = mybackground;
svgArea.style.color = myforeground;
mySVG.style.backgroundColor = mybackground;
mySVG.style.color = myforeground;
if (mybackground == "black")
{path.setAttribute( 'stroke' , '#FFFFFF' );
achsen.setAttribute( 'stroke' , '#FFFFFF' );
cirst.setAttribute( 'stroke' , '#DDDD00' );
cirrl.setAttribute( 'stroke' , '#DDDD00' );
rstick.setAttribute( 'stroke' , '#DDDD00' );
//tancon.setAttribute( 'stroke' , '#AFAFAF' );
cir.setAttribute( 'stroke' , '#FFFF00' );
rline.setAttribute( 'stroke' , '#FFFF00' );
}
else {path.setAttribute( 'stroke' , '#000000' );
achsen.setAttribute( 'stroke' , '#000000' );
cirst.setAttribute( 'stroke' , '#0000FF' );
cirrl.setAttribute( 'stroke' , '#0000FF' );
rstick.setAttribute( 'stroke' , '#0000FF' );
//tancon.setAttribute( 'stroke' , '#0000FF' );
cir.setAttribute( 'stroke' , '#0000FF' );
rline.setAttribute( 'stroke' , '#0000FF' );
}
if (!(checkboxConst.checked)) {removeRollconst();}
menu.style.backgroundColor = mybackground;
menu.style.color = myforeground;
description.style.backgroundColor = mybackground;
description.style.color = myforeground;
copyright.style.backgroundColor = mybackground;
copyright.style.color = myforeground;
if ( checkboxLad.checked ) { addLadders(); }
render();
});
inputParamFr.value = n_angle;
function getFrequency() {
checkboxConst.checked = false;
n_angle = min(1, max(0, 1.0*inputParamFr.value));
inputParamFr.value = n_angle;
cosangl = cos(n_angle*pi/2);
sinangl = sin(n_angle*pi/2);
scale = adaptScale();
removeRollconst();
fillCurve();
txt = makeTXTforpath(curve);
makeNormalsSVG();
render();
}
inputParamSt.value = stick;
function getStickFactor() {
checkboxConst.checked = false;
stick = min(5,max(0, 1.0*inputParamSt.value));
inputParamSt.value = stick;
if (!(stick == 1))
{checkboxLad.checked = false;}
sticklength = abs(rad)*stick;
scale = adaptScale();
removeRollconst();
fillCurve();
txt = makeTXTforpath(curve);
makeNormalsSVG();
render();
}
const init = (() => {
fillCurve();
//console.log("curve",curve);
txt = makeTXTforpath(curve,false);
//makeNormalsSVG();
addConstruction();
render();
});
init();
inputParamFr.addEventListener("change", getFrequency);
inputParamSt.addEventListener("change", getStickFactor);
checkboxConst.addEventListener ('change', addConstruction , false);
checkboxTang.addEventListener ('change', addConstruction , false);
checkboxLad.addEventListener ('change', addLadders , false);
checkboxOsc.addEventListener ('change', startStopCircles , false);
checkboxNormal.addEventListener ('change', addRemoveNormals , false);
checkboxBackgrd.addEventListener ('change', toggleBackground , false);
};
|
import numpy as np
import pytest
from pandas.core.dtypes.dtypes import CategoricalDtype
from pandas import Categorical, CategoricalIndex, Index, Series, Timestamp
import pandas._testing as tm
class TestCategoricalDtypes:
def test_is_dtype_equal_deprecated(self):
# GH#37545
c1 = Categorical(list("aabca"), categories=list("abc"), ordered=False)
with tm.assert_produces_warning(FutureWarning):
c1.is_dtype_equal(c1)
def test_categories_match_up_to_permutation(self):
# test dtype comparisons between cats
c1 = Categorical(list("aabca"), categories=list("abc"), ordered=False)
c2 = Categorical(list("aabca"), categories=list("cab"), ordered=False)
c3 = Categorical(list("aabca"), categories=list("cab"), ordered=True)
assert c1._categories_match_up_to_permutation(c1)
assert c2._categories_match_up_to_permutation(c2)
assert c3._categories_match_up_to_permutation(c3)
assert c1._categories_match_up_to_permutation(c2)
assert not c1._categories_match_up_to_permutation(c3)
assert not c1._categories_match_up_to_permutation(Index(list("aabca")))
assert not c1._categories_match_up_to_permutation(c1.astype(object))
assert c1._categories_match_up_to_permutation(CategoricalIndex(c1))
assert c1._categories_match_up_to_permutation(
CategoricalIndex(c1, categories=list("cab"))
)
assert not c1._categories_match_up_to_permutation(
CategoricalIndex(c1, ordered=True)
)
# GH 16659
s1 = Series(c1)
s2 = Series(c2)
s3 = Series(c3)
assert c1._categories_match_up_to_permutation(s1)
assert c2._categories_match_up_to_permutation(s2)
assert c3._categories_match_up_to_permutation(s3)
assert c1._categories_match_up_to_permutation(s2)
assert not c1._categories_match_up_to_permutation(s3)
assert not c1._categories_match_up_to_permutation(s1.astype(object))
def test_set_dtype_same(self):
c = Categorical(["a", "b", "c"])
result = c._set_dtype(CategoricalDtype(["a", "b", "c"]))
tm.assert_categorical_equal(result, c)
def test_set_dtype_new_categories(self):
c = Categorical(["a", "b", "c"])
result = c._set_dtype(CategoricalDtype(list("abcd")))
tm.assert_numpy_array_equal(result.codes, c.codes)
tm.assert_index_equal(result.dtype.categories, Index(list("abcd")))
@pytest.mark.parametrize(
"values, categories, new_categories",
[
# No NaNs, same cats, same order
(["a", "b", "a"], ["a", "b"], ["a", "b"]),
# No NaNs, same cats, different order
(["a", "b", "a"], ["a", "b"], ["b", "a"]),
# Same, unsorted
(["b", "a", "a"], ["a", "b"], ["a", "b"]),
# No NaNs, same cats, different order
(["b", "a", "a"], ["a", "b"], ["b", "a"]),
# NaNs
(["a", "b", "c"], ["a", "b"], ["a", "b"]),
(["a", "b", "c"], ["a", "b"], ["b", "a"]),
(["b", "a", "c"], ["a", "b"], ["a", "b"]),
(["b", "a", "c"], ["a", "b"], ["a", "b"]),
# Introduce NaNs
(["a", "b", "c"], ["a", "b"], ["a"]),
(["a", "b", "c"], ["a", "b"], ["b"]),
(["b", "a", "c"], ["a", "b"], ["a"]),
(["b", "a", "c"], ["a", "b"], ["a"]),
# No overlap
(["a", "b", "c"], ["a", "b"], ["d", "e"]),
],
)
@pytest.mark.parametrize("ordered", [True, False])
def test_set_dtype_many(self, values, categories, new_categories, ordered):
c = Categorical(values, categories)
expected = Categorical(values, new_categories, ordered)
result = c._set_dtype(expected.dtype)
tm.assert_categorical_equal(result, expected)
def test_set_dtype_no_overlap(self):
c = Categorical(["a", "b", "c"], ["d", "e"])
result = c._set_dtype(CategoricalDtype(["a", "b"]))
expected = Categorical([None, None, None], categories=["a", "b"])
tm.assert_categorical_equal(result, expected)
def test_codes_dtypes(self):
# GH 8453
result = Categorical(["foo", "bar", "baz"])
assert result.codes.dtype == "int8"
result = Categorical([f"foo{i:05d}" for i in range(400)])
assert result.codes.dtype == "int16"
result = Categorical([f"foo{i:05d}" for i in range(40000)])
assert result.codes.dtype == "int32"
# adding cats
result = Categorical(["foo", "bar", "baz"])
assert result.codes.dtype == "int8"
result = result.add_categories([f"foo{i:05d}" for i in range(400)])
assert result.codes.dtype == "int16"
# removing cats
result = result.remove_categories([f"foo{i:05d}" for i in range(300)])
assert result.codes.dtype == "int8"
@pytest.mark.parametrize("ordered", [True, False])
def test_astype(self, ordered):
# string
cat = Categorical(list("abbaaccc"), ordered=ordered)
result = cat.astype(object)
expected = np.array(cat)
tm.assert_numpy_array_equal(result, expected)
msg = "could not convert string to float"
with pytest.raises(ValueError, match=msg):
cat.astype(float)
# numeric
cat = Categorical([0, 1, 2, 2, 1, 0, 1, 0, 2], ordered=ordered)
result = cat.astype(object)
expected = np.array(cat, dtype=object)
tm.assert_numpy_array_equal(result, expected)
result = cat.astype(int)
expected = np.array(cat, dtype=int)
tm.assert_numpy_array_equal(result, expected)
result = cat.astype(float)
expected = np.array(cat, dtype=float)
tm.assert_numpy_array_equal(result, expected)
@pytest.mark.parametrize("dtype_ordered", [True, False])
@pytest.mark.parametrize("cat_ordered", [True, False])
def test_astype_category(self, dtype_ordered, cat_ordered):
# GH 10696/18593
data = list("abcaacbab")
cat = Categorical(data, categories=list("bac"), ordered=cat_ordered)
# standard categories
dtype = CategoricalDtype(ordered=dtype_ordered)
result = cat.astype(dtype)
expected = Categorical(data, categories=cat.categories, ordered=dtype_ordered)
tm.assert_categorical_equal(result, expected)
# non-standard categories
dtype = CategoricalDtype(list("adc"), dtype_ordered)
result = cat.astype(dtype)
expected = Categorical(data, dtype=dtype)
tm.assert_categorical_equal(result, expected)
if dtype_ordered is False:
# dtype='category' can't specify ordered, so only test once
result = cat.astype("category")
expected = cat
tm.assert_categorical_equal(result, expected)
def test_iter_python_types(self):
# GH-19909
cat = Categorical([1, 2])
assert isinstance(list(cat)[0], int)
assert isinstance(cat.tolist()[0], int)
def test_iter_python_types_datetime(self):
cat = Categorical([Timestamp("2017-01-01"), Timestamp("2017-01-02")])
assert isinstance(list(cat)[0], Timestamp)
assert isinstance(cat.tolist()[0], Timestamp)
|
// This file configures a web server for testing the production build
// on your local machine.
import browserSync from 'browser-sync';
import historyApiFallback from 'connect-history-api-fallback';
import {chalkProcessing} from './chalkConfig';
/* eslint-disable no-console */
console.log(chalkProcessing('Opening production build...'));
// Run Browsersync
browserSync({
port: 5000,
ui: {
port: 5001
},
server: {
baseDir: 'dist'
},
files: [
'src/*.html'
],
middleware: [historyApiFallback()]
});
|
import { inject as service } from '@ember/service';
import Mixin from '@ember/object/mixin';
import { computed } from '@ember/object';
import { run } from '@ember/runloop';
export default Mixin.create({
deviceLayout: service('device/layout'),
width: 0,
inserted: false,
classNameBindings: ['breakpointClass'],
breakpointClass: computed('inserted', 'width', function() {
let bps = this.get('deviceLayout.breakpoints');
if (!this.get('inserted')) {
return `container-${bps[0].prefix}`;
}
let width = this.element.clientWidth;
for (let i = 0; i < bps.length; i++) {
if (width >= bps[i].begin) {
return `container-${bps[i].prefix}`;
}
}
return 'container-breakpoint-unavailable';
}),
_elementResize: null,
elementResize(dims) {
this.set('width', dims.width);
},
didInsertElement() {
this._super();
this._elementResize = this.elementResize.bind(this);
run.schedule('afterRender', () => {
// Ember before v2.10 can arrive in afterRender with a null element.
// Details here: https://github.com/html-next/flexi/issues/101
if (this.isDestroying) {
return;
}
this.set('inserted', true);
this.get('deviceLayout')
.monitor
.addElementHandler(this.element, this._elementResize);
});
},
willDestroyElement() {
this._super();
this.set('inserted', false);
this.get('deviceLayout')
.monitor
.removeElementHandler(this.element, this._elementResize);
this._elementResize = null;
}
});
|
# -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2019-06-13 19:21
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('cmdb', '0012_fittingssd_cache'),
]
operations = [
migrations.RemoveField(
model_name='fittingdisk',
name='cache',
),
migrations.RemoveField(
model_name='fittingssd',
name='cache',
),
]
|