content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import os import sys import posthoganalytics from django.apps import AppConfig from django.conf import settings from posthog.utils import get_git_branch, get_git_commit, get_machine_id from posthog.version import VERSION
[ 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 1281, 71, 9632, 3400, 14094, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, 1281, 31897, 13, 26791, 1330, 651, 62, ...
3.393939
66
import os import json import time from datetime import timedelta
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 28805, 12514, 628 ]
4.125
16
#!/usr/bin/env python3 flags = ['QCTF{2a5576bc51a5c3feb82c96fe80d3a520}', 'QCTF{eb2ddbf0e318812ede843e8ecec6144f}', 'QCTF{5cdf65c6069a6b815352c3f1b4d09a56}', 'QCTF{69d7b7deb23746b8bd18b22f3eb92b50}', 'QCTF{44e37938c0bc05393b5b33a70c5a70db}', 'QCTF{3b37a953391e38ce0b8e168e9eaa6ec5}', 'QCTF{ee2848cb73236007d36cb5ae75c4d2bf}', 'QCTF{8dceee7e583b81a844a58ae72bf0671f}', 'QCTF{1e3dbf7253eaa1454ba21806dd1fc14c}', 'QCTF{da8f9cc7d7f1b1481f87f6390fa25e0c}', 'QCTF{ef7e72c36017f57e3f6b940b25bcd3b8}', 'QCTF{41342b5fdd954b2ff55773096c335f52}', 'QCTF{35fa8fbb26685d098fc776e0a36f49aa}', 'QCTF{168ab402de637d3d309d32d5290e1e31}', 'QCTF{f184a2e0373a244ed3a1b84a9bdb3a23}', 'QCTF{f586fdb5119afc82250ed69fe9bdc7dd}', 'QCTF{1f13c89d8c9eb5573c15ecd50d2f9e50}', 'QCTF{11dfd6714cf59973c28b29c27b3f84df}', 'QCTF{210050152f6adf890bc663580cbca181}', 'QCTF{8200b5ef385ca392651e186a436e0609}', 'QCTF{552eb20e1897c751adf2e320f47d9179}', 'QCTF{cb6efd12b769ea8f1c38c98f1977d5ce}', 'QCTF{004072519dd358254b1de59133ba8386}', 'QCTF{9c4b21c7c3a0fcc3f391695968b7c7e9}', 'QCTF{5a940d17a3b9afa668381947469dd9f7}', 'QCTF{7a3891890abaf4921b8fb2e4a940eb2d}', 'QCTF{3527635e90dc57fe164d5f8d88dbcb38}', 'QCTF{3c5c5abd09bdcfdf09e65eba1eb80b24}', 'QCTF{6f46a5846a40d68d6a035a2ad60a2622}', 'QCTF{794223155a79df0d44a13687b1ed2003}', 'QCTF{43d4cb8f632f779975d6060b5193153f}', 'QCTF{775427be397d5bf852a046e65884d7f9}', 'QCTF{f9fd2dff056c2d47d14bdb9a417d99d5}', 'QCTF{300e2128e66389b5d3c3e057c1ade37f}', 'QCTF{25ee8ba64e6f578a14065aef15fb0028}', 'QCTF{7b0a45a53a059e55dcccf3b7e975ff2e}', 'QCTF{ebff50288af7c8a2a7bd8b1e11a8a612}', 'QCTF{b9a51b35b496056c4fbce56d3c6368e5}', 'QCTF{e1c9872464c4a27cbab39abcd86203b9}', 'QCTF{249589aeb27f9215b209dd933b6dccd8}', 'QCTF{55edfaf50d7e83ade9a98655fca33b31}', 'QCTF{597ab70595c974e07e31a3fa1277bf11}', 'QCTF{7c5023239ef7f22c41aa606ce9aaba5b}', 'QCTF{72257f0fb4a980bcbd9a6f41f52a370b}', 'QCTF{fc09caef8f7c55cd878344568f47a382}', 'QCTF{1dc7595bdbd4c4c60ceda6e21709e6f2}', 'QCTF{d19d9769e8c4262f3a66c95f63fe7f34}', 'QCTF{dec3d0c80f0df0e5af9a97d665dbdc37}', 'QCTF{02bafaf609aaa269bd8abf417208bb54}', 'QCTF{67507d62a48f4e06275f3363b7876d3c}', 'QCTF{8a5a2752374ef22803d1e600177b1bb4}', 'QCTF{a353e9e2be2070249cd297715ea6b10a}', 'QCTF{80225cecfb252b774fa338313e9430b7}', 'QCTF{fa584956ef689e8b341e1d734c734719}', 'QCTF{63015e092eb29efb121f3253cd21c379}', 'QCTF{d62443dfd293d1e412afe00676e437d5}', 'QCTF{59e40e54a8c5a04526e545bbee435249}', 'QCTF{30702aa0f1f56f7c6b8f738602e498e0}', 'QCTF{efec73d04226055571e8f18c96ee3c96}', 'QCTF{9d1dc2ea33d36391531c5555bf39e433}', 'QCTF{d367af673f3c9cf0fdb2893b00689b7c}', 'QCTF{1e24ece8acce5ad1902f412338b01e53}', 'QCTF{88293463e852a19b1c5009bbb1d6ed5f}', 'QCTF{319a0909fd0df476109c9bab65b5202a}', 'QCTF{59f28c649809dd3e4287c72f617428a4}', 'QCTF{ce7df959f53a8dea0ce1e3aa0c2eb8f8}', 'QCTF{5386d6256232979494c48252ee1dd640}', 'QCTF{5ad8efd6bb44d0604cba3800600b1d0e}', 'QCTF{087ca88149d4323d1f00be02a882a79b}', 'QCTF{ce4abbce715a72951061f7adcf15ea1b}', 'QCTF{301e2306bc2849fb53fff0595afc3ed1}', 'QCTF{206d3753e0070c66561a16abfa9c845b}', 'QCTF{05e734b3544679475050326e11441d6e}', 'QCTF{f45249ac1b299ac8a9f430a791e20ceb}', 'QCTF{3433fc22bbc389ba386c1d21f532ed3b}', 'QCTF{15edbf8aaa728eb81ba6f555997f4815}', 'QCTF{580fe8c58bf434bc5f2eef7420649673}', 'QCTF{e41bfb2090daf3773fa230eee97c2d90}', 'QCTF{654380c696844545896584334e208184}', 'QCTF{3946d70c84bf4810cf7e9a31e0b12cff}', 'QCTF{97b67f280a1b2bf58f8bd54ad8ceff66}', 'QCTF{3278f990d9dd5f5dd67c2d4b9d230753}', 'QCTF{f966c22475a0964eaa834830bfe338bd}', 'QCTF{3f913b97b23c854fcdf6fddc41743c62}', 'QCTF{e5dc135b13c2c5b5371d9c24b7715a90}', 'QCTF{70cfc6a3e2f98e98f3488d5180fd3d1c}', 'QCTF{1dfea28b554380e772736d0b3e2e060d}', 'QCTF{4cf742197c83c13a76ffd38fcd9394c7}', 'QCTF{0389931bc1415676698558259dd33911}', 'QCTF{2c6a7d2d0cb06b7050164c593b6eff88}', 'QCTF{43bd14ac279307f5370ae6ec6e50404e}', 'QCTF{9dc8266201ea1ba7072d3a717099bab1}', 'QCTF{f35148de32676d50e1d7b2482f800a2c}', 'QCTF{70c01985b0e31b6915a4e42936dedf25}', 'QCTF{231cdcc8bbf386a10e93530cb4595991}', 'QCTF{543a9e949ff8f72b7388b39d44288b55}', 'QCTF{2bb32c8b3e2468bc6f3f1140e02e1e33}', 'QCTF{b5f4dd820207d40769649252979ce450}', 'QCTF{1432aeb99dc6560626d075c9666973e2}', 'QCTF{7520b882081e987b73e728409c38bb55}', 'QCTF{8748557fa294f0c49ef93016ce1ca4ab}', 'QCTF{51e68ed7cbeae5ef716ff98a95ea783a}', 'QCTF{6a2643309f4ffd5856aeb90e6c68267e}', 'QCTF{9eb6102744e6c0e9994d7886ed125f8e}', 'QCTF{0731061397ccd2de5b324ce6c13dc611}', 'QCTF{3b106d379fa05638d90ed9a5a1dfdcbe}', 'QCTF{e539d324465979cb4c54773139ba833f}', 'QCTF{ac0e2a0b56508dfa6b253823697e842d}', 'QCTF{6b020c80f9b62510caec2ec17a07b640}', 'QCTF{00a1c7c11aedc76428ded7dd254adc31}', 'QCTF{2be348ddb0c9d391c114b5878ac1a3ae}', 'QCTF{5875aa9d30aca2e4590534016342aba7}', 'QCTF{07c01bde7f54d222d59e1f45781e8acc}', 'QCTF{1e3f24b6cd7066ac673048656d7d2fc9}', 'QCTF{0a75b22e9f94f3dfc19ab4b934b2961d}', 'QCTF{6a6564ca624d02b152987d5a595cf7bc}', 'QCTF{52463184224982ccf2f9346438f92268}', 'QCTF{ab014a22c6ea08979323fd8a467f1f4a}', 'QCTF{4a3e06c87bb6c0580195db33b39776f7}', 'QCTF{395eb9a839f59f933e135b02d9543c3b}', 'QCTF{c4fd0005bf0d339ff0f7e1860baa5f36}', 'QCTF{aa15b27e2f0485ca04ae787530c1ed18}', 'QCTF{10e844c23ec931932ea6bd4e3e728004}', 'QCTF{b8b86c195cb7dcb041e9dfb3d6b94573}', 'QCTF{932ff0cf891fe181b78a8763eb82a6c4}', 'QCTF{d6f4a756a5206321737afb1e0a183844}', 'QCTF{8c93d71184c17684c92e409e39cb7c00}', 'QCTF{dc4e8fb58fa2ed616d123a73b1a81467}', 'QCTF{8ee320c8dea80ef18d04534ff798caba}', 'QCTF{6a11a92d100293a4835f54dde05cbe34}', 'QCTF{9a79fff31abe7e4718070fa517e64fc0}', 'QCTF{ef93a88f1454894b3940fd2aa93e048d}', 'QCTF{0bed196ea7b09a5db9f31ef3c7f6848d}', 'QCTF{cee84fc49b89ffa988f52d0797baa73d}', 'QCTF{9e80c3d1bba93faa3b45eda0b912a02c}', 'QCTF{cac025aa9e5f4394744f12db0f3e5f71}', 'QCTF{5ee478bf634afe72ae0d3b9e95faf021}', 'QCTF{a5903dad242c4413fa99381d340226d1}', 'QCTF{abcd7d765c23353e38dc09a616bd9bde}', 'QCTF{c13ed258f4775efa54d5b166dd3240ed}', 'QCTF{e08e0a83b3a96cbf379380139b65cc7e}', 'QCTF{7b3803fdb94ff47cf63b7526ac388bc1}', 'QCTF{352ca5de54ffbe8515635118c787b8af}', 'QCTF{50da9ea0ae8ad773bde9a1577ceee9ff}', 'QCTF{7564194acd79f1eb36e46b33143361eb}', 'QCTF{05e594d4643b5b256084d33e51789029}', 'QCTF{36ba558d89ae53394cbd7eaf497601e3}', 'QCTF{33c50dc466f2cfaf68d173a7af16377a}', 'QCTF{903fa3b7125aa29dd2edcb1f2c5da381}', 'QCTF{4bc7246bfdd22e310bbfa25046b20d2c}', 'QCTF{baf8274e1ad81a53c9ca3a1c4762d718}', 'QCTF{9066fe52443e5978e9b82fe2b0801b03}', 'QCTF{39acd1bd34c6a258f3f7167dc21c7a85}', 'QCTF{deca3ebff2319c1e1df6fe96ffb2ff7b}', 'QCTF{0324d544b5e46489943574b02061ebed}', 'QCTF{d08bde8d29c4de77c3439eed7eeb677a}', 'QCTF{16337906f4fa89ee4dd04e6ad1fec14f}', 'QCTF{44de9c99a06af160110e707b93c3dd79}', 'QCTF{87a3543161d6d0ac1497ef1e43de70ec}', 'QCTF{41460476cb83e4544c1b0018c4b20980}', 'QCTF{c0242fbcf990f3a62e6be743a65d07f8}', 'QCTF{a865da86e6d2a17ab3b848f47f997704}', 'QCTF{51ac3d05e0fd1cdc6c9a31c47d2a3a88}', 'QCTF{943ca3ce0cc488be0589ca207806738d}', 'QCTF{f24460a3ce62c641236671b66f193054}', 'QCTF{87980f7c165f4d392c6d377ef6706027}', 'QCTF{2b3ef8a0e956b8d1b9c0373e5686147e}', 'QCTF{97fc9edc359c3ac1f368ea9d6f707ee2}', 'QCTF{f39d636b8d20fdb174bf627c94af8308}', 'QCTF{3eb03e255dacfff2f34afd34f0791f06}', 'QCTF{b819ac459aa4570528e102929befec96}', 'QCTF{7cbf5260678a762738a45a9a08a0d049}', 'QCTF{c58971009a765417bf73916323eb68e1}', 'QCTF{77444071adcf5221c83ad35ebc6c4cdb}', 'QCTF{53a01ebed36320ab8a71084c94ba585f}', 'QCTF{c89f06767a21bdd15a463a92897b0cae}', 'QCTF{6a4cf33cc6fcea2fab3e9612a57994fd}', 'QCTF{0bb8a72a683c35fa835226f7c5ebe3a9}', 'QCTF{206b39742a866fed482a03ce5b6dbd1c}', 'QCTF{4f027a70b064eac7ff2e9ca3d2e03b1d}', 'QCTF{4c39da37e2580f8deb5eba08ed7d5a57}', 'QCTF{f99cfb8878971c21b243f818e505b61e}', 'QCTF{e7daf2f64180b615c1c4ebbecadd0518}', 'QCTF{3304f198c3435e0d49a67f1672a08209}', 'QCTF{e720953183625b8a69a2f8e3e8a8d93a}', 'QCTF{350655c7d8bbaa6495d9ebfa1c0d76a7}', 'QCTF{d74759b2ad78fa941ef19257976392d4}', 'QCTF{146730e07ca858bbf709c2f5bee0a41e}', 'QCTF{db1962db2dc72006c551f14912f3a81a}', 'QCTF{0273d4d040f7de7daa2cea88b86f8f62}', 'QCTF{56ff70053c7a1dba014711c73f3f0486}', 'QCTF{90548bc64e69a21ace8d622e0c21d485}', 'QCTF{052d0c62d05b258b6e4d0fbb64d2c837}', 'QCTF{9fbf42a0d9c53b2b78dc9abef52dd368}', 'QCTF{cf50c6918c393ab19066d688fee7f3d1}', 'QCTF{c7a5a9ca5a29f3bdcd13bc38b4960506}', 'QCTF{c92b7a3db35070eda9793a250a8b8373}', 'QCTF{04d0261d7237329eeabe658967e752ca}', 'QCTF{f52a7914bb09c7cfea77ac0cc91c68b1}', 'QCTF{cc2c170948663de9d7dd25e4e6ce8834}']
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 628, 198, 33152, 796, 37250, 48, 4177, 37, 90, 17, 64, 2816, 4304, 15630, 4349, 64, 20, 66, 18, 69, 1765, 6469, 66, 4846, 5036, 1795, 67, 18, 64, 31211, 92, 3256, 705, 48, 4177, 3...
1.586421
5,317
# Create your views here. from django.core.urlresolvers import reverse from django.http.response import JsonResponse, HttpResponse from settings.settings import AUTHORIZED_KEYS_FILE, SITE_URL from bioshareX.models import Share, SSHKey, MetaData, Tag from bioshareX.forms import MetaDataForm, json_form_validate from guardian.shortcuts import get_perms, get_users_with_perms, remove_perm, assign_perm from bioshareX.utils import JSONDecorator, json_response, json_error, share_access_decorator, safe_path_decorator, validate_email, fetchall,\ test_path, du from django.contrib.auth.models import User, Group from django.db.models import Q import os from rest_framework.decorators import api_view, detail_route, throttle_classes,\ action from bioshareX.forms import ShareForm from guardian.decorators import permission_required from bioshareX.utils import ajax_login_required, email_users from rest_framework import generics, viewsets, status from bioshareX.models import ShareLog, Message from bioshareX.api.serializers import ShareLogSerializer, ShareSerializer,\ GroupSerializer, UserSerializer, MessageSerializer from rest_framework.permissions import DjangoModelPermissions, IsAuthenticated from bioshareX.permissions import ManageGroupPermission from rest_framework.response import Response from guardian.models import UserObjectPermission from django.contrib.contenttypes.models import ContentType import datetime from bioshareX.api.filters import UserShareFilter, ShareTagFilter,\ GroupShareFilter, ActiveMessageFilter from rest_framework.throttling import UserRateThrottle from django.utils import timezone import csv def get_group(request): query = request.GET.get('query') try: group = Group.objects.get(name=query) return json_response({'group':{'name':group.name}}) except Exception, e: return json_error([e.message]) """ Requires: "name", "notes", "filesystem" arguments. Optional: "link_to_path", "read_only" """ class ShareLogList(generics.ListAPIView): serializer_class = ShareLogSerializer permission_classes = (IsAuthenticated,) filter_fields = {'action':['icontains'],'user__username':['icontains'],'text':['icontains'],'paths':['icontains'],'share':['exact']} # @detail_route(['POST']) # def remove_user(self,request,*args,**kwargs): # # user = request.query_params.get('user') # # self.get_object().user_set.remove(user) # return Response({'status':'success'})
[ 2, 13610, 534, 5009, 994, 13, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 6738, 42625, 14208, 13, 4023, 13, 26209, 1330, 449, 1559, 31077, 11, 367, 29281, 31077, 198, 6738, 6460, 13, 33692, 1330, 44746...
3.1025
800
import datetime import os, sys import pprint import requests from pandas.io.json import json_normalize import pandas as pd URL = 'https://wsn.latice.eu/api/query/v2/' #URL = 'http://localhost:8000/wsn/api/query/v2/' #TOKEN = os.getenv('WSN_TOKEN') TOKEN = os.getenv('WSN_TOKEN') path = os.getcwd() if __name__ == '__main__': # We need an authentication token TOKEN = os.getenv('WSN_TOKEN') # Number of elements to return in every query limit = 100 # Example 1: Get all the fields and tags of a given mote from a given time. # This is good to explore the data, but bad on performance. response = query(limit=limit, serial=0x1F566F057C105487, time__gte=datetime.datetime(2017, 11, 15), debug=True, ) # Example 2: Get the RSSI of an Xbee module identified by its address print('==============================================') response = query(limit=limit, source_addr_long=0x0013A2004105D4B6, fields=['rssi'], debug=True, ) # Example 3: Get the battery and internal temperature from all motes, # include the serial tag to tell them apart. # Frames that don't have at least one of the fields we ask for will not be # included. print('==============================================') response = query(limit=limit, fields=['bat', 'in_temp'], tags=['serial'], debug=True, ) # Example 4: Get the time the frame was received by the Pi print('==============================================') response = query(limit=limit, serial=408520806, fields=['received'], debug=True, ) # Example 5: Get the battery once every hour response = query(limit=10, serial=0x1F566F057C105487, fields=['bat'], interval=3600, debug=True, )
[ 11748, 4818, 8079, 198, 11748, 28686, 11, 25064, 198, 11748, 279, 4798, 198, 11748, 7007, 198, 6738, 19798, 292, 13, 952, 13, 17752, 1330, 33918, 62, 11265, 1096, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 21886, 796, 705, 5450, ...
2.459564
779
from django.utils import translation from olympia import amo from olympia.amo.tests import TestCase, ESTestCase from olympia.addons.models import Addon from olympia.reviews import tasks from olympia.reviews.models import ( check_spam, GroupedRating, Review, ReviewFlag, Spam) from olympia.users.models import UserProfile
[ 6738, 42625, 14208, 13, 26791, 1330, 11059, 198, 198, 6738, 267, 6760, 544, 1330, 716, 78, 198, 6738, 267, 6760, 544, 13, 18811, 13, 41989, 1330, 6208, 20448, 11, 17160, 395, 20448, 198, 6738, 267, 6760, 544, 13, 39996, 13, 27530, 133...
3.235294
102
''' Spline2.py: wrapper for B. Thijsse et al.'s hyper-spline routines. Yet another spline interpolation routine. The problem: given a set of experimental data with noise, find the spline with the optimal number of knots. Solution : They use the usual kind of routines to determine least-squares splines from a given set of knot points. The problem REALLY boils down to: how many knots do you use? There are two extremes: put a knot point on each data point to get an interpolating spline (which sucks for experimental data with noise). The other extreme is to have the minimal set of knots to define a polynomial of order k (e.g., a cubic). This also sucks. Somewhere between the two extremes is a number of knots that optimally recovers the information in the data and smooths out the noise. spline2 starts with a large number of knots (interpolating spline) and iteratively removes knots until a figure of merit reaches some prescribed value. In this case, this figure of merit is the Durbin-Watson statistic, which measures the auto- correlation between the residuals of the spline fit. For more details, see: * Barend J. Thijsse et al., "A Practical Algorithm for Least-Squares spline Approximation of Data Containing Noise", Computers in Physics, vol 12 no. 4 July 1998 * http://structureandchange.3me.tudelft.nl/ ''' from .spline2 import *
[ 7061, 6, 13341, 500, 17, 13, 9078, 25, 29908, 329, 347, 13, 536, 2926, 82, 325, 2123, 435, 2637, 82, 8718, 12, 22018, 500, 31878, 13, 198, 198, 11486, 1194, 4328, 500, 39555, 341, 8027, 13, 220, 383, 1917, 25, 220, 1813, 257, 900,...
2.875233
537
from __future__ import annotations import elasticache_auto_discovery from pymemcache.client.hash import HashClient # elasticache settings elasticache_config_endpoint = "your-elasticache-cluster-endpoint:port" nodes = elasticache_auto_discovery.discover(elasticache_config_endpoint) nodes = map(lambda x: (x[1], int(x[2])), nodes) memcache_client = HashClient(nodes) def put(requestId, event): """ This function puts into memcache and get from it. Memcache is hosted using elasticache """ # Put the UUID to the cache. memcache_client.set(requestId, event)
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 27468, 4891, 62, 23736, 62, 67, 40821, 198, 6738, 279, 4948, 368, 23870, 13, 16366, 13, 17831, 1330, 21059, 11792, 198, 198, 2, 27468, 4891, 6460, 198, 417, 3477, 4891, 62, 11250, ...
3
195
import numpy as np from uniclass_to_nf_ea_com_source.b_code.configurations.common_constants.uniclass_bclearer_constants import PARENT_CODE_COLUMN_NAME, \ UNICLASS2015_OBJECT_TABLE_NAME
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 28000, 31172, 62, 1462, 62, 77, 69, 62, 18213, 62, 785, 62, 10459, 13, 65, 62, 8189, 13, 11250, 20074, 13, 11321, 62, 9979, 1187, 13, 46903, 31172, 62, 65, 2375, 11258, 62, 9979, 1187, ...
2.581081
74
import keras.backend as K from keras.engine import Layer, InputSpec from keras.layers import Concatenate from keras import initializers import numpy as np import tensorflow as tf import tensorflow_probability as tfp def get_mixture_density_loss_function(output_dimension, number_of_mixtures): """ Returns a loss function for the mixture density. Arguments --------- output_dimension : integer Dimensionality of the output. number_of_mixtures : integer Number of gaussians used. Returns ------- Function A function providing the mean square error accuracy """ with tf.name_scope("MixtureDensityNetwork"): return(loss_function) def get_mixture_density_sampling_function(output_dimension, number_of_mixtures): """ Returns a sampling function for the mixture density. Arguments --------- output_dimension : integer Dimensionality of the output. number_of_mixtures : integer Number of gaussians used. Returns ------- Function A function providing the mean square error accuracy """ with tf.name_scope("MixtureDensityNetwork"): return(sampling_function) def get_mixture_density_mse_function(output_dimension, number_of_mixtures): """ Returns a mse function for the mixture density. Arguments --------- output_dimension : integer Dimensionality of the output. number_of_mixtures : integer Number of gaussians used. Returns ------- Function A function providing the mean square error accuracy """ with tf.name_scope("MixtureDensityNetwork"): return(mse_accuracy_function) def split_mixture_parameters(parameters, output_dimension, number_of_mixtures): """ Splits the mixture parameters. Arguments --------- parameters : tuple Parameter to split output_dimension : integer Dimensionality of the output. number_of_mixtures : integer Number of gaussians used. Returns ------- List of arrays Separate mixture parameters """ dimension = number_of_mixtures * output_dimension mu = parameters[:dimension] sigma = parameters[dimension:(2 * dimension)] pi_logits = parameters[-number_of_mixtures:] return([mu, sigma, pi_logits]) def mixture_density_software_max(logits, temperature=1.0): """ Softmax function for mixture density with temperature adjustment. Arguments --------- logits : list or numpy array input temperature : The temperature for to adjust the distribution (default 1.0) Returns ------- Scalar Softmax loss value. """ e = np.array(logits) / temperature e -= np.max(e) e = np.exp(e) distribution = e / np.sum(e) return(distribution) def sample_from_categorical_distribution(distribution): """ Softmax function for mixture density with temperature adjustment. Arguments --------- distribution : input categorical distribution from which to sample. Returns ------- Scalar A single sample. """ r = np.random.rand(1) accumulate = 0 for i in range(len(distribution)): accumulate += distribution[i] if accumulate >= r: return(i) tf.logging.info('Error: sampling categorical model.') return(-1) def sample_from_output(parameters, output_dimension, number_of_mixtures, temperature=1.0, sigma_temperature=1.0): """ Softmax function for mixture density with temperature adjustment. Arguments --------- output_dimension : integer Dimensionality of the output. number_of_mixtures : integer Number of gaussians used. temperature : The temperature for to adjust the distribution (default 1.0) sigma_temperature : The temperature for to adjust the distribution (default 1.0) Returns ------- Scalar A single sample. """ mu, sigma, pi = split_mixture_parameters(parameters, output_dimension, number_of_mixtures) pi_softmax = mixture_density_software_max(pi, temperature=temperature) m = sample_from_categorical_distribution(pi_softmax) mu_vector = mu[m * output_dimension:(m + 1) * output_dimension] sigma_vector = sigma[m * output_dimension:(m + 1) * output_dimension] * sigma_temperature covariance_matrix = np.identity(output_dimension) * sigma_vector sample = np.random.multivariate_normal(mu_vector, covariance_matrix, 1) return(sample)
[ 198, 11748, 41927, 292, 13, 1891, 437, 355, 509, 198, 6738, 41927, 292, 13, 18392, 1330, 34398, 11, 23412, 22882, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 1482, 9246, 268, 378, 198, 6738, 41927, 292, 1330, 4238, 11341, 198, 198, 117...
2.805203
1,653
import json from unittest import mock, TestCase import check_availability json_data = \ """ { "centers": [ { "center_id": 1234, "name": "District General Hostpital", "name_l": "", "address": "45 M G Road", "address_l": "", "state_name": "Maharashtra", "state_name_l": "", "district_name": "Satara", "district_name_l": "", "block_name": "Jaoli", "block_name_l": "", "pincode": "413608", "lat": 28.7, "long": 77.1, "from": "09:00:00", "to": "18:00:00", "fee_type": "Free", "vaccine_fees": [ { "vaccine": "COVISHIELD", "fee": "250" } ], "sessions": [ { "session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "date": "31-05-2021", "available_capacity": 50, "available_capacity_dose1": 25, "available_capacity_dose2": 25, "min_age_limit": 18, "vaccine": "COVISHIELD", "slots": [ "FORENOON", "AFTERNOON" ] } ] } ] } """
[ 11748, 33918, 198, 6738, 555, 715, 395, 1330, 15290, 11, 6208, 20448, 198, 198, 11748, 2198, 62, 47274, 198, 198, 17752, 62, 7890, 796, 3467, 198, 37811, 198, 90, 198, 220, 366, 1087, 364, 1298, 685, 198, 220, 220, 220, 1391, 198, 2...
1.759812
637
from django.contrib import admin from proposals.models import Proposal, ProposalSessionType admin.site.register(ProposalSessionType) admin.site.register(Proposal, list_display = ["title", "session_type", "audience_level", "cancelled", "extreme_pycon", "invited"] )
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 11628, 13, 27530, 1330, 1041, 40007, 11, 1041, 40007, 36044, 6030, 628, 198, 28482, 13, 15654, 13, 30238, 7, 24331, 40725, 36044, 6030, 8, 198, 28482, 13, 15654, 13, 30238,...
3.22619
84
import sys from cemc.mcmc import ReactionCrdInitializer, ReactionCrdRangeConstraint import numpy as np from itertools import product import time from numpy.linalg import inv def log(self, msg): print(msg) def set(self, atoms, value): """Create an atoms object with the correct reaction coordinate. :param Atoms atom: Atoms object (not used, using the one attached to the MC object). Argument only included traj_full = TrajectoryWriter(self.traj_file, mode="a") traj_clst = TrajectoryWriter(self.traj_file_clst, mode="a")parent class has it. :param float value: Target value for the react traj_full = TrajectoryWriter(self.traj_file, mode="a") traj_clst = TrajectoryWriter(self.traj_file_clst, mode="a")dinate """ from random import choice, shuffle # Make sure that the observer is initialized correctly self.cov_obs.init_com_and_covariance() self.fixed_nucl_mc.network([]) max_attempts = 1000 * len(self.fixed_nucl_mc.atoms) attempt = 0 neighbors = self.fixed_nucl_mc.network_clust_indx atoms = self.fixed_nucl_mc.atoms calc = atoms.get_calculator() current_value = self.get(atoms) current_diff = abs(value - current_value) should_increase_value = current_diff < value shoud_decrease_value = not should_increase_value mc = self.fixed_nucl_mc output_every = 15 now = time.time() while attempt < max_attempts: if self.fixed_nucl_mc.network.num_root_nodes() > 1: raise RuntimeError("For some unknown reason there are " "more than one cluster!") attempt += 1 surf_atoms = self.surface_atoms rand_surf_atom = choice(surf_atoms) rand_surf_atom2 = choice(surf_atoms) shuffle(neighbors) found_swap_candidate = False for indx in neighbors: t_indx = mc.get_translated_indx(rand_surf_atom2, indx) symb = mc.atoms[t_indx].symbol if symb == self.matrix_element: old_symb = mc.atoms[rand_surf_atom].symbol ch1 = (rand_surf_atom, old_symb, symb) ch2 = (t_indx, symb, old_symb) system_changes = [ch1, ch2] if self.fixed_nucl_mc.network.move_creates_new_cluster(system_changes): continue assert self.fixed_nucl_mc.network.num_root_nodes() == 1 if mc._no_constraint_violations(system_changes): calc.calculate(atoms, ["energy"], system_changes) found_swap_candidate = True break if not found_swap_candidate: continue # Get bases its calculation on the atom tracker new_value = self.get(atoms, system_changes=system_changes) new_diff = abs(new_value - value) if time.time() - now > output_every: print("Current value: {} Target value: {}" "".format(new_value, value)) sys.stdout.flush() now = time.time() if new_diff < current_diff: # The candidate trial moves brings the system closer to the # target value, so we accept this move current_diff = new_diff # We need to update the covariance observer self.cov_obs(system_changes) # Update the network assert self.fixed_nucl_mc.network.num_root_nodes() == 1 self.fixed_nucl_mc.network(system_changes) assert self.fixed_nucl_mc.network.num_root_nodes() == 1 # Update the symbol tracker self.fixed_nucl_mc._update_tracker(system_changes) calc.clear_history() else: calc.undo_changes() assert self.fixed_nucl_mc.network.num_root_nodes() == 1 if should_increase_value and new_value > value: break elif shoud_decrease_value and new_value < value: break if attempt == max_attempts: raise CouldNotFindValidStateError("Did not manage to find a state " "with reaction coordinate " "{}!".format(value)) class CovarianceRangeConstraint(ReactionCrdRangeConstraint): """Constraint to ensure that the system stays without its bounds. :param FixedNucleusMC fixed_nuc_mc: Monte Carlo object :param list range: Upper and lower bound of the reaction coordinate :param CovarianceCrdInitializer cov_init: Initializer :param bool verbose: If True print messages every 10 sec if the constraint is violated """ def get_new_value(self, system_changes): """Get new value for reaction coordinate. :param list system_changes: List with the proposed changes :return: Reaction coordate after the change :rtype: float """ # Get the new value of the observer new_val = self._cov_init.get(None, system_changes=system_changes) return new_val def __call__(self, system_changes): """Check the system is in a valid state after the changes. :param list system_changes: Proposed changes :return: True/False, if True the system is still within the bounds :rtype: bool """ new_val = self.get_new_value(system_changes) ok = (new_val >= self.range[0] and new_val < self.range[1]) if not ok and self.verbose: # The evaluation of this constraint can be time consuming # so let the user know at regular intervals if time.time() - self.last_print > 10: print("Move violates constraint") self.last_print = time.time() return ok
[ 11748, 25064, 198, 6738, 269, 368, 66, 13, 76, 11215, 66, 1330, 39912, 34, 4372, 24243, 7509, 11, 39912, 34, 4372, 17257, 3103, 2536, 2913, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 11748, 640, 1...
2.130101
2,867
from google.cloud import bigquery from mysql.connector import connect import os # writeable part of the filesystem for Cloud Functions instance gc_write_dir = "/tmp" def get_file_mysql(mysql_configuration): """ Querying data using Connector/Python via *host* MySQL server. The function return the full path to the file that has been downloaded. """ # construct MySQLConnection object and query table on a server try: cnx = connect(user = mysql_configuration["user"], password = mysql_configuration["psswd"], host = mysql_configuration["host"], database = mysql_configuration["database"], port = mysql_configuration["port"] ) cursor = cnx.cursor(dictionary = True) cursor.execute(mysql_configuration["query"]) results = cursor.fetchall() file_name = "mysql.txt" with open(file_name, "w") as output_file: for row in results: output_file.write(json.dumps(row) + "\n") file_location = gc_write_dir + "/" + file_name print("Query <" + mysql_configuration["query"] + "> has completed successfully.") finally: try: cursor.close() cnx.close() except: print("Connection has not been established.") return file_location def give_file_gbq(path_to_file, bq_configuration): """ Download file from *path_to_file* to BigQuery table using *bq_configuration* settings. """ # construct Client object with the path to the table in which data will be stored client = bigquery.Client(project = bq_configuration["project_id"]) dataset_ref = client.dataset(bq_configuration["dataset_id"]) table_ref = dataset_ref.table(bq_configuration["table_id"]) # determine uploading options job_config = bigquery.LoadJobConfig() job_config.source_format = "NEWLINE_DELIMITED_JSON" job_config.write_disposition = bq_configuration["write_disposition"] job_config.autodetect = True # upload the file to BigQuery table with open(path_to_file, "rb") as source_file: job = client.load_table_from_file(source_file, table_ref, location = bq_configuration["location"], job_config = job_config) job.result() print("The Job " + job.job_id + " in status " + job.state + " for table " + bq_configuration["project_id"] + "." + bq_configuration["dataset_id"] + "." + bq_configuration["table_id"] + ".") def mysql(request): """ Function to execute. """ try: # get POST data from Flask.request object request_json = request.get_json() mysql_configuration = request_json["mysql"] bq_configuration = request_json["bq"] if not mysql_configuration.get("query"): mysql_configuration["query"] = "SELECT * FROM " + mysql_configuration["table_id"] if not mysql_configuration.get("port"): mysql_configuration["port"] = 3306 if not bq_configuration.get("location"): bq_configuration["location"] = "US" bq_configuration["write_disposition"] = "WRITE_TRUNCATE" except Exception as error: print("An error occured with POST request data.") print(str(error)) raise SystemExit # go to writable directory os.chdir(gc_write_dir) # get the file from MySQL server try: mysql_file = get_file_mysql(mysql_configuration) except Exception as error: print("An error occured trying to get file from MySQL server.") print(str(error)) raise SystemExit # upload the file to BigQuery try: give_file_gbq(mysql_file, bq_configuration) except Exception as error: print("An error occured trying to upload file to Google BigQuery.") print(str(error))
[ 6738, 23645, 13, 17721, 1330, 1263, 22766, 198, 6738, 48761, 13, 8443, 273, 1330, 2018, 198, 11748, 28686, 198, 198, 2, 3551, 540, 636, 286, 262, 29905, 329, 10130, 40480, 4554, 198, 36484, 62, 13564, 62, 15908, 796, 12813, 22065, 1, ...
2.581301
1,476
from config import * from fruit import * from snakebody import * from wall import * # score score_font = pygame.font.Font('assets/PressStart2P.ttf', 30) score = 0 # game over game_ove_font = pygame.font.Font('assets/PressStart2P.ttf', 60) game_over_text = game_ove_font.render('Game Over', True, color_black, color_73ED73) play_sound = 0 snake_direction = 0
[ 6738, 4566, 1330, 1635, 198, 6738, 8234, 1330, 1635, 198, 6738, 17522, 2618, 1330, 1635, 198, 6738, 3355, 1330, 1635, 628, 628, 198, 198, 2, 4776, 198, 26675, 62, 10331, 796, 12972, 6057, 13, 10331, 13, 23252, 10786, 19668, 14, 13800, ...
2.807692
130
import logging from preprocessing_pipeline.so.util.config import LOG_LEVEL def initialize_logger(logger_name): """ Configure a named logger (see https://stackoverflow.com/a/43794480). """ # create logger for module module_logger = logging.getLogger(logger_name) # set lowest log level the logger will handle (but not necessarily output) module_logger.setLevel(LOG_LEVEL) # disable propagation to root logger module_logger.propagate = False log_formatter = logging.Formatter(fmt='%(asctime)s [%(levelname)s] [%(name)s]: %(message)s') # write log messages to console console_handler = logging.StreamHandler() console_handler.setFormatter(log_formatter) console_handler.setLevel(LOG_LEVEL) module_logger.addHandler(console_handler) return module_logger
[ 11748, 18931, 198, 198, 6738, 662, 36948, 62, 79, 541, 4470, 13, 568, 13, 22602, 13, 11250, 1330, 41605, 62, 2538, 18697, 628, 198, 4299, 41216, 62, 6404, 1362, 7, 6404, 1362, 62, 3672, 2599, 198, 220, 220, 220, 37227, 198, 220, 220...
2.870629
286
import random # Ex. takes in 2d20 and outputs the string Rolling 2 d20 # Ex. takes in 2d20 and outputs resultString = 11, 19 results = 30 numDice = 2
[ 11748, 4738, 628, 198, 2, 1475, 13, 2753, 287, 362, 67, 1238, 290, 23862, 262, 4731, 21567, 362, 288, 1238, 628, 198, 2, 1475, 13, 2753, 287, 362, 67, 1238, 290, 23862, 1255, 10100, 796, 1367, 11, 678, 2482, 796, 1542, 997, 35, 50...
3.276596
47
# -*- coding: utf-8 -*- import datetime from django.test import TestCase from django.contrib.contenttypes.models import ContentType from accounts.factories import UserFactory from categories.factories import CategoryFactory from documents.factories import DocumentFactory from default_documents.models import ContractorDeliverable from default_documents.forms import ContractorDeliverableRevisionForm from default_documents.factories import (ContractorDeliverableFactory, ContractorDeliverableRevisionFactory) from reviews.models import Review
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 11748, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, ...
3.307263
179
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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. """ Simple HTML5 top-level boilerplate generator. """ from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from __future__ import division # Currenty using this subset of HTML5 features shared by both FF 3.6.x and Chrome 10 BROWSER_FEATURES = ['applicationcache', 'backgroundsize', 'borderimage', 'borderradius', 'boxshadow', 'canvas', 'canvastext', 'csscolumns', 'cssgradients', 'csstransforms', 'draganddrop', 'flexbox', 'fontface', 'geolocation', 'hashchange', 'hsla', 'js', 'localstorage', 'multiplebgs', 'opacity', 'postmessage', 'rgba', 'sessionstorage', 'svg', 'svgclippaths', 'textshadow', 'webworkers'] NO_BROWSER_FEATURES = ['no-audio', 'no-cssanimations', 'no-cssreflections', 'no-csstransforms3d', 'no-csstransitions', 'no-history', 'no-indexeddb', 'no-inlinesvg', 'no-smil', 'no-touch', 'no-video', 'no-webgl', 'no-websockets', 'no-websqldatabase'] FEATURE_CLASS = " ".join(BROWSER_FEATURES) + " " + " ".join(NO_BROWSER_FEATURES) #### simple templates for use by mostly client-side apps. SIMPLE_TEMPLATE = """<?xml version="1.0" encoding="{charset}"?> <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" class="{features}"> <head> <meta charset="{charset}" /> <meta name="robots" content="noindex" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>{title}</title> <link href="/media/css/{appname}.css" type="text/css" rel="stylesheet" /> <!-- <script src="/media/js/modernizr-1.7.min.js" type="text/javascript"></script> --> <script src="/media/js/packed.js" type="text/javascript"></script> <script src="/media/js/{appname}.js" type="text/javascript"></script> </head> <body> {body} </body> </html> """ if __name__ == "__main__": docs = new_simple_document("myapp", "MyApp", "utf-8") print (docs)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 13, 22, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 912, 28, 19, 25, 2032, 28, 19, 25, 4215, 8658, 11338, 28, 19, 25, 27004, 8658, 25, 11201, 392,...
2.737792
942
from .plots import ( ActivesInactivesPlot, ConfusionPlot, RocCurvePlot, ProjectionPlot, RegressionPlotRaw, HistogramPlotRaw, RegressionPlotTransf, HistogramPlotTransf, Transformation, IndividualEstimatorsAurocPlot, InidvidualEstimatorsR2Plot, ) from .. import ZairaBase from ..vars import REPORT_SUBFOLDER
[ 6738, 764, 489, 1747, 1330, 357, 198, 220, 220, 220, 2191, 1083, 818, 529, 1083, 43328, 11, 198, 220, 220, 220, 7326, 4241, 43328, 11, 198, 220, 220, 220, 13545, 26628, 303, 43328, 11, 198, 220, 220, 220, 4935, 295, 43328, 11, 198, ...
2.532374
139
# # Copyright (C) 2013 - 2017 Satoru SATOH <ssato @ redhat.com> # License: MIT # # pylint: disable=missing-docstring,invalid-name,too-few-public-methods # pylint: disable=ungrouped-imports from __future__ import absolute_import import anyconfig.backend.configobj as TT import tests.backend.common as TBC from anyconfig.compat import OrderedDict as ODict CNF_0_S = """\ # This is the 'initial_comment' # Which may be several lines keyword1 = value1 'keyword 2' = 'value 2' [ "section 1" ] # This comment goes with keyword 3 keyword 3 = value 3 'keyword 4' = value4, value 5, 'value 6' [[ sub-section ]] # an inline comment # sub-section is inside "section 1" 'keyword 5' = 'value 7' 'keyword 6' = '''A multiline value, that spans more than one line :-) The line breaks are included in the value.''' [[[ sub-sub-section ]]] # sub-sub-section is *in* 'sub-section' # which is in 'section 1' 'keyword 7' = 'value 8' [section 2] # an inline comment keyword8 = "value 9" keyword9 = value10 # an inline comment # The 'final_comment' # Which also may be several lines """ _ML_0 = """A multiline value, that spans more than one line :-) The line breaks are included in the value.""" CNF_0 = ODict((('keyword1', 'value1'), ('keyword 2', 'value 2'), ('section 1', ODict((('keyword 3', 'value 3'), ('keyword 4', ['value4', 'value 5', 'value 6']), ('sub-section', ODict((('keyword 5', 'value 7'), ('keyword 6', _ML_0), ('sub-sub-section', ODict((('keyword 7', 'value 8'), ))))))))), ('section 2', ODict((('keyword8', 'value 9'), ('keyword9', 'value10')))))) # vim:sw=4:ts=4:et:
[ 2, 198, 2, 15069, 357, 34, 8, 2211, 532, 2177, 311, 1352, 84, 29020, 12096, 1279, 824, 5549, 2488, 2266, 5183, 13, 785, 29, 198, 2, 13789, 25, 17168, 198, 2, 198, 2, 279, 2645, 600, 25, 15560, 28, 45688, 12, 15390, 8841, 11, 259...
2.217237
847
__author__ = 'nhurman'
[ 834, 9800, 834, 796, 705, 77, 48349, 805, 6, 198 ]
2.3
10
import requests from scrapy.http import HtmlResponse from sw_downloader.sw_downloader.spiders.smashing_magazine \ import SmashingMagazineSpider
[ 11748, 7007, 198, 198, 6738, 15881, 88, 13, 4023, 1330, 367, 20369, 31077, 198, 6738, 1509, 62, 15002, 263, 13, 2032, 62, 15002, 263, 13, 2777, 4157, 13, 5796, 2140, 62, 19726, 4994, 3467, 198, 220, 220, 220, 1330, 2439, 2140, 36028, ...
3.409091
44
#var #num, media, i: inteiro media=0 for i in range(1,11,1): num=int(input("Digite um nmero: ")) media = media+num media=media/i print (media)
[ 2, 7785, 198, 220, 220, 220, 1303, 22510, 11, 2056, 11, 1312, 25, 493, 68, 7058, 198, 220, 220, 220, 220, 198, 11431, 28, 15, 198, 1640, 1312, 287, 2837, 7, 16, 11, 1157, 11, 16, 2599, 198, 220, 220, 220, 997, 28, 600, 7, 1541...
2.092105
76
# -*- coding: utf-8 -*- """ rio.tasks ~~~~~~~~~~ Implement of rio tasks based on celery. """ from time import time from celery import chord from requests import ConnectionError from celery.utils.log import get_task_logger from rio.core import celery from rio.core import sentry from rio.utils.http import dispatch_webhook_request from rio.utils.http import raven_context from rio.utils.http import FailureWebhookError from rio.utils.template import format_template from rio.signals import webhook_ran logger = get_task_logger(__name__) def exec_event(event, webhooks, payload): """Execute event. Merge webhooks run set to do some stats after all of the webhooks been responded successfully. +---------+ |webhook-1+--------------------+ +---------+ | | +---------+ | |webhook-2+-------------+ | +---------+ +------+-----+ |merge runset+------> +---------+ +------+-----+ |webhook-3+-------------+ | +---------+ | | +---------+ | |... +--------------------+ +---------+ Error webhook will be propagated. Note that other webhook calls will still execute. """ calls = ( call_webhook.s(event, webhook, payload) for webhook in webhooks ) callback = merge_webhooks_runset.s() call_promise = chord(calls) promise = call_promise(callback) return promise
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 27250, 13, 83, 6791, 198, 15116, 4907, 198, 198, 3546, 26908, 286, 374, 952, 8861, 1912, 319, 18725, 1924, 13, 198, 37811, 198, 198, 6738, 640, 1330, 640, ...
2.270386
699
import os import uuid import json import argparse import boto3 USERPOOL = { 'env_var_poolid': 'APPUSERPOOLID', 'env_var_cognito_url': 'COGNITOJWKSURL', 'env_var_pool_client': 'APPCLIENTID', } if __name__ == '__main__': main()
[ 11748, 28686, 198, 11748, 334, 27112, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 198, 11748, 275, 2069, 18, 198, 198, 29904, 16402, 3535, 796, 1391, 198, 220, 220, 220, 705, 24330, 62, 7785, 62, 7742, 312, 10354, 705, 24805, 29904...
2.210526
114
import hmac hmac_md5 = hmac.new('secret-key') f = open('sample-file.txt', 'rb') try: while True: block = f.read(1024) if not block: break hmac_md5.update(block) finally: f.close() digest = hmac_md5.hexdigest() print digest
[ 11748, 289, 20285, 198, 198, 71, 20285, 62, 9132, 20, 796, 289, 20285, 13, 3605, 10786, 21078, 12, 2539, 11537, 198, 198, 69, 796, 1280, 10786, 39873, 12, 7753, 13, 14116, 3256, 705, 26145, 11537, 198, 28311, 25, 198, 220, 220, 220, ...
2.007463
134
# -*- coding: utf-8 -*- # This file is auto-generated, don't edit it. Thanks. from Tea.model import TeaModel from typing import Dict, List
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 770, 2393, 318, 8295, 12, 27568, 11, 836, 470, 4370, 340, 13, 6930, 13, 198, 6738, 15777, 13, 19849, 1330, 15777, 17633, 198, 6738, 19720, 1330, 360, 713, 11, 7343,...
2.888889
54
#!/usr/bin/env python ''' Este programa se repetir 3 veces o hasta que se ingrese la palabra "despedida" y desplegar slo el nmero de intentos fallidos hasta que cualquiera de los eventos ocurentradara. Al ingresar la palabra "termina" el programa se detendr.''' entrada = "" suma = 0 while suma < 3: entrada = input("Clave:") if entrada == "despedida": break elif entrada == "termina": exit() suma = suma + 1 print("Intento %d. \n " % suma) print("Tuviste %d intentos fallidos." % suma)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 7061, 6, 412, 4169, 1430, 64, 384, 46152, 343, 513, 1569, 728, 267, 19338, 64, 8358, 384, 5347, 260, 325, 201, 198, 220, 220, 220, 8591, 6340, 397, 430, 366, 8906, 9...
2.228916
249
""" Singleton database instance """ from typing import TYPE_CHECKING, Any, List, ContextManager, Tuple, Iterable if not TYPE_CHECKING: from playhouse.sqlite_ext import SqliteExtDatabase, AutoIncrementField else: # pragma: no cover database = SqliteExtDatabase(None)
[ 37811, 198, 29974, 10565, 6831, 4554, 198, 37811, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 4377, 11, 7343, 11, 30532, 13511, 11, 309, 29291, 11, 40806, 540, 198, 198, 361, 407, 41876, 62, 50084, 2751, 25, 198, 220, 220, 220...
3.261905
84
import os from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.chrome.options import Options from .driver import Driver
[ 11748, 28686, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 8906, 1202, 62, 11128, 5738, 1330, 2935, 1202, 15610, 5738, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 4...
3.796296
54
# Copyrigh 2015 Cisco Systems. # 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. import collections import mock from neutron.tests import base from networking_cisco.apps.saf.agent.vdp import lldpad from networking_cisco.apps.saf.agent.vdp import lldpad_constants as vdp_con from networking_cisco.apps.saf.common import dfa_sys_lib as utils try: OrderedDict = collections.OrderedDict except AttributeError: import ordereddict OrderedDict = ordereddict.OrderedDict
[ 2, 6955, 2417, 394, 1853, 28289, 11998, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, ...
3.235849
318
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ =================== prospect.viewer.cds =================== Class containing all bokeh's ColumnDataSource objects needed in viewer.py """ import numpy as np from pkg_resources import resource_filename import bokeh.plotting as bk from bokeh.models import ColumnDataSource _specutils_imported = True try: from specutils import Spectrum1D, SpectrumList except ImportError: _specutils_imported = False from ..coaddcam import coaddcam_prospect from ..utilities import supported_desitarget_masks, vi_file_fields def _airtovac(w): """Convert air wavelengths to vacuum wavelengths. Don't convert less than 2000 . Parameters ---------- w : :class:`float` Wavelength [] of the line in air. Returns ------- :class:`float` Wavelength [] of the line in vacuum. """ if w < 2000.0: return w; vac = w for iter in range(2): sigma2 = (1.0e4/vac)*(1.0e4/vac) fact = 1.0 + 5.792105e-2/(238.0185 - sigma2) + 1.67917e-3/(57.362 - sigma2) vac = w*fact return vac
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 4770, 18604, 198, 1676, 4443, 13, 1177, 263, 13, ...
2.580717
446
# -*- coding: latin-1 -*- import json import pytest from oidcendpoint.endpoint_context import EndpointContext from oidcendpoint.oidc.authorization import Authorization from oidcendpoint.oidc.read_registration import RegistrationRead from oidcendpoint.oidc.registration import Registration from oidcendpoint.oidc.token import AccessToken from oidcendpoint.oidc.userinfo import UserInfo from oidcmsg.oidc import RegistrationRequest KEYDEFS = [ {"type": "RSA", "key": "", "use": ["sig"]}, {"type": "EC", "crv": "P-256", "use": ["sig"]}, ] RESPONSE_TYPES_SUPPORTED = [ ["code"], ["token"], ["id_token"], ["code", "token"], ["code", "id_token"], ["id_token", "token"], ["code", "token", "id_token"], ["none"], ] CAPABILITIES = { "subject_types_supported": ["public", "pairwise"], "grant_types_supported": [ "authorization_code", "implicit", "urn:ietf:params:oauth:grant-type:jwt-bearer", "refresh_token", ], } msg = { "application_type": "web", "redirect_uris": [ "https://client.example.org/callback", "https://client.example.org/callback2", ], "client_name": "My Example", "client_name#ja-Jpan-JP": "", "subject_type": "pairwise", "token_endpoint_auth_method": "client_secret_basic", "jwks_uri": "https://client.example.org/my_public_keys.jwks", "userinfo_encrypted_response_alg": "RSA1_5", "userinfo_encrypted_response_enc": "A128CBC-HS256", "contacts": ["ve7jtb@example.org", "mary@example.org"], "request_uris": [ "https://client.example.org/rf.txt#qpXaRLh_n93TT", "https://client.example.org/rf.txt", ], "post_logout_redirect_uris": [ "https://rp.example.com/pl?foo=bar", "https://rp.example.com/pl", ], } CLI_REQ = RegistrationRequest(**msg)
[ 2, 532, 9, 12, 19617, 25, 3042, 259, 12, 16, 532, 9, 12, 198, 11748, 33918, 198, 198, 11748, 12972, 9288, 198, 6738, 267, 312, 15695, 4122, 13, 437, 4122, 62, 22866, 1330, 5268, 4122, 21947, 198, 6738, 267, 312, 15695, 4122, 13, 1...
2.353768
783
from django.contrib import admin from modelapp.models import Project # Register your models here. admin.site.register(Project,Projectadmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 2746, 1324, 13, 27530, 1330, 4935, 198, 2, 17296, 534, 4981, 994, 13, 198, 198, 28482, 13, 15654, 13, 30238, 7, 16775, 11, 16775, 28482, 8 ]
3.888889
36
main() #15 min
[ 198, 198, 12417, 3419, 198, 2, 1314, 949 ]
2
8
import hashlib, json # def hash(to_hash): # h = hashlib.md5() # h.update(bytes(str(to_hash), 'utf-8')) # return h.hexdigest()
[ 11748, 12234, 8019, 11, 33918, 198, 198, 2, 825, 12234, 7, 1462, 62, 17831, 2599, 198, 2, 220, 220, 220, 220, 289, 796, 12234, 8019, 13, 9132, 20, 3419, 198, 2, 220, 220, 220, 220, 289, 13, 19119, 7, 33661, 7, 2536, 7, 1462, 62,...
2.088235
68
import logging import time import numpy as np from eda import ma_data, tx_data from sir_fitting_us import seir_experiment, make_csv_from_tx_traj logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) logger.info("Fitting model.") # initial values taken from previous fit, used to seed MH sampler efficiently. x0 = np.array([ 0.393, -2.586, -3.241, -5.874, -24.999]) # ma_traj = seir_experiment(ma_data, x0, iterations=10000) tx_traj = seir_experiment(tx_data, x0, iterations=10000) # mean_ll = np.mean([ll for (x, ll) in ma_traj]) mean_ll = np.mean([ll for (x, ll) in tx_traj]) logger.info("Model fitting finished with mean log-likelihood: {}".format(mean_ll)) if mean_ll < -2000: raise AssertionError( """Mean log-likelihood {} less than threshold of -20. This is probably an error.""".format(mean_ll) ) underscored_time = time.ctime().replace(" ", "_") fname = "ma_seir_output_{}.csv".format(underscored_time) make_csv_from_tx_traj(tx_traj, tx_data, fname)
[ 11748, 18931, 198, 11748, 640, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1225, 64, 1330, 17266, 62, 7890, 11, 27765, 62, 7890, 198, 6738, 15967, 62, 32232, 62, 385, 1330, 384, 343, 62, 23100, 3681, 11, 787, 62, 40664, ...
2.551899
395
#coding:utf-8 #gaussian plot (position category) #Akira Taniguchi 2016/06/16 import itertools import numpy as np from scipy import linalg import matplotlib.pyplot as plt import matplotlib as mpl from sklearn import mixture from __init__ import * from numpy.random import multinomial,uniform,dirichlet from scipy.stats import multivariate_normal,invwishart,rv_discrete trialname = "testss"#raw_input("trialname?(folder) >") start = "1"#raw_input("start number?>") end = "40"#raw_input("end number?>") filename = raw_input("learning trial name?>")#"001"# sn = int(start) en = int(end) Data = int(en) - int(sn) +1 foldername = datafolder + trialname+"("+str(sn).zfill(3)+"-"+str(en).zfill(3)+")" Mu_p = [ np.array([0 for i in xrange(dim_p)]) for k in xrange(Kp) ] Sig_p = [ np.eye(dim_p)*sig_p_init for k in xrange(Kp) ] #p_dm = [[[-0.3945, 0.0165]], [[-0.3555, -0.006], [-0.336, 0.18]], [[-0.438, -0.0315], [-0.315, 0.0225], [-0.2355, 0.18]], [[-0.453, -0.018], [-0.3, -0.1005], [-0.258, -0.0255]], [[-0.438, 0.036], [-0.318, 0.1875], [-0.3, 0.0795]], [[-0.5535, 0.0675], [-0.336, -0.0465]], [[-0.3885, 0.0555], [-0.3465, -0.126]], [[-0.3555, -0.1425], [-0.324, -0.039], [-0.273, 0.0825]], [[-0.3885, 0.135]], [[-0.285, -0.0135]], [[-0.5265, 0.045], [-0.33, 0.18], [-0.2685, 0.0165]], [[-0.453, 0.015], [-0.3795, 0.231]], [[-0.3825, -0.231]], [[-0.327, -0.18], [-0.309, -0.0075]], [[-0.3735, -0.1455]], [[-0.2685, -0.0135]], [[-0.438, 0.033], [-0.36, 0.204], [-0.2955, 0.0855]], [[-0.45, 0.048]], [[-0.447, -0.006], [-0.3735, 0.1785]], [[-0.4005, 0.1755], [-0.2655, -0.0705]]] p_temp = [] #for d in xrange(D): # p_temp = p_temp + p_dm[d] #[[-0.319936213, 0.117489433],[-0.345566772, -0.00810185],[-0.362990185, -0.042447971],[-0.277759177, 0.083363745]] #Sig_p = [[] , [], [] ,[]] #Sig_p[0] = [[0.010389635, 0.001709343],[0.001709343, 0.018386732]] #[[0.005423979, 0.000652657],[0.000652657, 0.001134736]] #Sig_p[1] = [[0.001920786, -0.001210214],[-0.001210214, 0.002644612]] #Sig_p[2] = [[0.003648299, -0.000312398],[-0.000312398, 0.001518234]] #Sig_p[3] = [[0.001851727, -0.000656013],[-0.000656013, 0.004825636]] k=0 for line in open(foldername +'/' + filename + '/' + trialname + '_'+ filename +'_Mu_p.csv', 'r'): itemList = line[:-1].split(',') #for i in xrange(len(itemList)): Mu_p[k] = [float(itemList[0]),float(itemList[1])] k = k + 1 k=0 i=0 for line in open(foldername +'/' + filename + '/' + trialname + '_'+ filename +'_Sig_p.csv', 'r'): itemList = line[:-1].split(',') if k < Kp: if (i == 0): #for i in xrange(len(itemList)): print itemList Sig_p[k][0][0] = float(itemList[0]) Sig_p[k][0][1] = float(itemList[1]) i = i + 1 elif (i == 1): #for i in xrange(len(itemList)): print itemList Sig_p[k][1][0] = float(itemList[0]) Sig_p[k][1][1] = float(itemList[1]) i = i + 1 elif (i == 2): i = 0 k = k + 1 zp = [] pi_p = [0.0 for k in range(Kp)] #[0.017826621173443864,0.28554229470170217,0.041570976925928926,0.1265347852145472,0.52852532198437785] dm = 0 for line in open(foldername +'/' + filename + '/' + trialname + '_'+ filename +'_zp.csv', 'r'): itemList = line[:-1].split(',') for i in range(len(itemList)): if itemList[i] != '': #print dm,itemList[i] zp = zp + [int(itemList[i])] dm = dm + 1 for line in open(foldername +'/' + filename + '/' + trialname + '_'+ filename +'_pi_p.csv', 'r'): itemList = line[:-1].split(',') for i in range(len(pi_p)): pi_p[i] = float(itemList[i]) colors = ['b', 'g', 'm', 'r', 'c', 'y', 'k', 'orange', 'purple', 'brown'] color_iter = itertools.cycle(colors) splot = plt.subplot(1, 1,1) for k,(mean,covar,color) in enumerate(zip(Mu_p,Sig_p,color_iter)): v, w = linalg.eigh(covar) u = w[0] / linalg.norm(w[0]) angle = np.arctan(u[1] / u[0]) angle = 180 * angle / np.pi # convert to degrees ell = mpl.patches.Ellipse([mean[1],mean[0]], v[0], v[1], 180 + angle, color=color) ell.set_clip_box(splot.bbox) ell.set_alpha(0.5) #splot.add_artist(ell) # for i in range(int(5000*2*pi_p[k])):#)):# X = multivariate_normal.rvs(mean=mean, cov=covar) plt.scatter(X[1],X[0], s=5, marker='.', color=color, alpha=0.2) # #for i in range(len(p_temp)): # plt.scatter(p_temp[i][1],p_temp[i][0], marker='x', c=colors[zp[i]]) """ # Number of samples per component n_samples = 500 # Generate random sample, two components np.random.seed(0) C = np.array([[0., -0.1], [1.7, .4]]) X = np.r_[np.dot(np.random.randn(n_samples, 2), C), .7 * np.random.randn(n_samples, 2) + np.array([-6, 3])] # Fit a mixture of Gaussians with EM using five components #gmm = mixture.GMM(n_components=5, covariance_type='full') #gmm.fit(X) # Fit a Dirichlet process mixture of Gaussians using five components dpgmm = mixture.DPGMM(n_components=5, covariance_type='full') dpgmm.fit(X) #for i, (clf, title) in enumerate([#(gmm, 'GMM'), # (dpgmm, 'Dirichlet Process GMM')]): """ #clf=dpgmm title = 'Position category'#data' #Y_ = clf.predict(X) #print Y_ """ for i, (mean, covar, color) in enumerate(zip( clf.means_, clf._get_covars(), color_iter)): v, w = linalg.eigh(covar) print covar u = w[0] / linalg.norm(w[0]) # as the DP will not use every component it has access to # unless it needs it, we shouldn't plot the redundant # components. #if not np.any(Y_ == i): # continue #plt.scatter(X[Y_ == i, 0], X[Y_ == i, 1], .8, color=color) # Plot an ellipse to show the Gaussian component angle = np.arctan(u[1] / u[0]) angle = 180 * angle / np.pi # convert to degrees ell = mpl.patches.Ellipse(mean, v[0], v[1], 180 + angle, color=color) ell.set_clip_box(splot.bbox) ell.set_alpha(0.5) splot.add_artist(ell) """ plt.ylim(-0.2, -0.8) plt.xlim(-0.3, 0.3) #plt.xticks([-0.8+0.1*i for i in range(7)]) #plt.yticks([-0.3+0.1*i for i in range(7)]) plt.title(title) #w, h = plt.get_figwidth(), plt.get_figheight() #ax = plt.add_axes((0.5 - 0.5 * 0.8 * h / w, 0.1, 0.8 * h / w, 0.8)) #aspect = (ax.get_xlim()[1] - ax.get_xlim()[0]) / (ax.get_ylim()[1] - ax.get_ylim()[0]) #ax.set_aspect(aspect) plt.gca().set_aspect('equal', adjustable='box') plt.savefig(foldername +'/' + filename + '/' + trialname + '_'+ filename +'_position_data_plot_p1nd.eps', dpi=150) plt.savefig(foldername +'/' + filename + '/' + trialname + '_'+ filename +'_position_data_plot_p1nd.png', dpi=150) plt.show()
[ 2, 66, 7656, 25, 40477, 12, 23, 201, 198, 2, 4908, 31562, 7110, 357, 9150, 6536, 8, 201, 198, 2, 33901, 8704, 11818, 328, 22200, 1584, 14, 3312, 14, 1433, 201, 198, 11748, 340, 861, 10141, 201, 198, 11748, 299, 32152, 355, 45941, ...
1.922839
3,551
#exclude import condiment; condiment.install() #endexclude if WITH_TIMEBOMB: timebomb = int(WITH_TIMEBOMB) print 'timebomb feature is activated, and set to', timebomb if WITH_INAPP_PURCHASE: print 'inapp purchase feature is activated' if WITH_TIMEBOMB and WITH_INAPP_PURCHASE: print 'both features have been activated'
[ 2, 1069, 9152, 198, 11748, 1779, 3681, 26, 1779, 3681, 13, 17350, 3419, 198, 2, 437, 1069, 9152, 198, 198, 361, 13315, 62, 34694, 33, 2662, 33, 25, 198, 220, 220, 220, 640, 27657, 796, 493, 7, 54, 10554, 62, 34694, 33, 2662, 33, ...
2.770492
122
import pathlib import os import sys from multiprocessing import resource_tracker modify_resource_tracker() add_Emergent_paths()
[ 11748, 3108, 8019, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 18540, 305, 919, 278, 1330, 8271, 62, 2213, 10735, 628, 198, 4666, 1958, 62, 31092, 62, 2213, 10735, 3419, 198, 2860, 62, 32779, 6783, 62, 6978, 82, 3419, 628 ]
3.275
40
import csv import re import unicodedata import bs4 import wikia from modules import utils from modules.config import Config
[ 11748, 269, 21370, 198, 11748, 302, 198, 11748, 28000, 9043, 1045, 198, 198, 11748, 275, 82, 19, 198, 11748, 47145, 544, 198, 198, 6738, 13103, 1330, 3384, 4487, 198, 6738, 13103, 13, 11250, 1330, 17056, 628, 220, 220, 220, 220, 220, ...
2.82
50
"""This module contains the general information for CimcvmediaExtMgmtRuleEntry ManagedObject.""" import sys, os from ...ucsmo import ManagedObject from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta
[ 37811, 1212, 8265, 4909, 262, 2276, 1321, 329, 327, 320, 33967, 11431, 11627, 44, 70, 16762, 31929, 30150, 1869, 1886, 10267, 526, 15931, 198, 11748, 25064, 11, 28686, 198, 198, 6738, 2644, 1229, 5796, 78, 1330, 1869, 1886, 10267, 198, ...
3.701493
67
# Copyright (c) 2021 PaddlePaddle 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. from .pde_base import PDE
[ 2, 15069, 357, 66, 8, 33448, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845...
3.752941
170
import mod try: mod.foo = foo except RuntimeError: print("RuntimeError1") print(mod.foo()) try: mod.foo = 1 except RuntimeError: print("RuntimeError2") print(mod.foo) try: mod.foo = 2 except RuntimeError: print("RuntimeError3") print(mod.foo)
[ 11748, 953, 628, 198, 198, 28311, 25, 198, 220, 220, 220, 953, 13, 21943, 796, 22944, 198, 16341, 43160, 12331, 25, 198, 220, 220, 220, 3601, 7203, 41006, 12331, 16, 4943, 198, 198, 4798, 7, 4666, 13, 21943, 28955, 198, 198, 28311, ...
2.464286
112
# Spiro Ganas # 9/27/17 # # Python 3 script to ######### NOTES ######################################## # 1. Each "slice" is a 512x512 image, stored in a single .dcm file. # 2. A 3-dimensional CT Scan consists of between 94 and 541 slices (according to the Stage 1 data). # 3. We need to rescale all the CT scans so they have the same number of slices. ######################################################### ####### CONSTANTS ########################## # This folder contains one subfolder per patient data_dir = 'D:\\Lung Cancer Dataset\\stage1' # This CSV lists all patients and shows which ones have canver truth_file = 'D:\\Lung Cancer Dataset\\stage1_labels.csv' # These values are used to downscale the images to a uniform size IMAGE_DIMESNION = 512 # Downscale the images so the size of a slice is IMAGE_DIMENSIONxIMAGE_DIMENSION NUMBER_OF_SLICES =20 # A patient can have between X and Y slices. This downscales all patients to the same number of slices. ############################################# import dicom #http://pydicom.readthedocs.io/en/stable/getting_started.html #print("pydicom version: ", dicom.__version__) import os import math import numpy as np import pandas as pd import tensorflow as tf # Change this to wherever you are storing your data: # IF YOU ARE FOLLOWING ON KAGGLE, YOU CAN ONLY PLAY WITH THE SAMPLE DATA, WHICH IS MUCH SMALLER labels_df = pd.read_csv(truth_file, index_col=0) #patients = list(labels_df.index.values) patients = os.listdir(data_dir) print(labels_df.head()) print(patients) print(len(patients)) temp_min = 9999 temp_max = 0 for patient in patients: try: label = labels_df.get_value(patient, 'cancer') path = data_dir +'/'+ patient # a couple great 1-liners from: https://www.kaggle.com/gzuidhof/data-science-bowl-2017/full-preprocessing-tutorial slices = [dicom.read_file(path + '/' + s) for s in os.listdir(path)] slices.sort(key=lambda x: int(x.ImagePositionPatient[2])) print(slices[0].pixel_array.shape, len(slices)) if len(slices)>temp_max: temp_max=len(slices) if len(slices) < temp_min: temp_min = len(slices) except: pass print("Minimum number of slices:", temp_min) print("Maximum number of slices:", temp_max)
[ 2, 1338, 7058, 402, 15991, 198, 2, 860, 14, 1983, 14, 1558, 198, 2, 198, 2, 11361, 513, 4226, 284, 628, 198, 7804, 2, 5626, 1546, 1303, 29113, 4242, 21017, 198, 2, 352, 13, 220, 5501, 366, 48369, 1, 318, 257, 22243, 87, 25836, 2...
2.861596
802
import json import os from setuptools import find_packages, setup PACKAGE_NAMESPACE_NAME = 'aistorms' METADATA_FILE_NAME = 'metadata.json' REQUIREMENTS_FILE_NAME = 'requirements.txt' _metadata = \ json.load( open(os.path.join( os.path.dirname(__file__), PACKAGE_NAMESPACE_NAME, METADATA_FILE_NAME))) setup( name=_metadata['PACKAGE'], author=_metadata['AUTHOR'], author_email=_metadata['AUTHOR_EMAIL'], url=_metadata['URL'], version=_metadata['VERSION'], description=_metadata['DESCRIPTION'], long_description=_metadata['DESCRIPTION'], keywords=_metadata['DESCRIPTION'], packages=find_packages(), include_package_data=True, install_requires= [s for s in open(REQUIREMENTS_FILE_NAME).readlines() if not s.startswith('#')])
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 628, 198, 47, 8120, 11879, 62, 45, 29559, 47, 11598, 62, 20608, 796, 705, 64, 396, 579, 82, 6, 198, 198, 47123, 2885, 13563, 62, 25664, ...
2.315217
368
#!/usr/bin/python # Copied from https://raw.githubusercontent.com/srv/srv_tools/kinetic/bag_tools/scripts/merge.py since this script is # not released for indigo. """ Copyright (c) 2015, Enrique Fernandez Perdomo Clearpath Robotics, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Systems, Robotics and Vision Group, University of the Balearican Islands nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ from __future__ import print_function import rosbag import argparse import os import sys if __name__ == "__main__": parser = argparse.ArgumentParser( description='Merge multiple bag files into a single one.') parser.add_argument('inbag', help='input bagfile(s)', nargs='+') parser.add_argument('--output', help='output bag file', default='output.bag') parser.add_argument('--topics', help='topics to merge from the input bag files', nargs='+', default=None) parser.add_argument('--exclude_topics', help='topics not to merge from the input bag files', nargs='+', default=[]) args = parser.parse_args() try: sys.exit(merge(args.inbag, args.output, args.topics, args.exclude_topics)) except Exception, e: import traceback traceback.print_exc()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 6955, 798, 422, 3740, 1378, 1831, 13, 12567, 43667, 13, 785, 14, 27891, 85, 14, 27891, 85, 62, 31391, 14, 5116, 5139, 14, 21454, 62, 31391, 14, 46521, 14, 647, 469, 13, 9078, 1201, 428...
3.33945
763
from pathlib import Path IPYTHON_STARTUP_FOLDER = Path.home() / ".ipython" / "profile_default" / "startup" STARTUP_FILE = IPYTHON_STARTUP_FOLDER / "pyforest_autoimport.py"
[ 6738, 3108, 8019, 1330, 10644, 628, 198, 4061, 56, 4221, 1340, 62, 2257, 7227, 8577, 62, 37, 3535, 14418, 796, 10644, 13, 11195, 3419, 1220, 27071, 541, 7535, 1, 1220, 366, 13317, 62, 12286, 1, 1220, 366, 9688, 929, 1, 198, 2257, 72...
2.492958
71
""" Copyright (c) 2020 Intel Corporation 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 typing import Callable from typing import Dict from typing import List from typing import Tuple from typing import Type import pytest import torch from torch import nn from nncf.common.graph import NNCFNodeName from nncf.common.pruning.clusterization import Cluster from nncf.common.pruning.clusterization import Clusterization from nncf.common.pruning.model_analysis import ModelAnalyzer from nncf.common.pruning.model_analysis import cluster_special_ops from nncf.torch.dynamic_graph.graph_tracer import ModelInputInfo from nncf.torch.layers import NNCF_PRUNING_MODULES_DICT from nncf.torch.nncf_network import NNCFNetwork from nncf.torch.pruning.export_helpers import PTElementwise from nncf.torch.pruning.export_helpers import PTIdentityMaskForwardOps from nncf.torch.pruning.export_helpers import PT_PRUNING_OPERATOR_METATYPES from nncf.common.pruning.utils import is_depthwise_conv from nncf.torch.pruning.filter_pruning.algo import FilterPruningBuilder from tests.torch.helpers import create_compressed_model_and_algo_for_test from tests.torch.helpers import create_nncf_model_and_single_algo_builder from tests.torch.pruning.helpers import PruningTestModelEltwise from tests.torch.pruning.helpers import PruningTestModelSharedConvs from tests.torch.pruning.helpers import TestModelBranching from tests.torch.pruning.helpers import TestModelDiffConvs from tests.torch.pruning.helpers import TestModelEltwiseCombination from tests.torch.pruning.helpers import TestModelResidualConnection from tests.torch.pruning.helpers import TestModelShuffleNetUnit from tests.torch.pruning.helpers import TestModelShuffleNetUnitDW from tests.torch.pruning.helpers import get_basic_pruning_config # pylint: disable=protected-access GROUP_PRUNING_MODULES_TEST_CASES = [ GroupPruningModulesTestStruct(model=PruningTestModelEltwise, non_pruned_module_nodes=['PruningTestModelEltwise/NNCFConv2d[conv1]/conv2d_0', 'PruningTestModelEltwise/NNCFConv2d[conv4]/conv2d_0'], pruned_groups=[['PruningTestModelEltwise/NNCFConv2d[conv2]/conv2d_0', 'PruningTestModelEltwise/NNCFConv2d[conv3]/conv2d_0']], pruned_groups_by_node_id=[[3, 4]], prune_params=(False, False, False)), GroupPruningModulesTestStruct(model=PruningTestModelEltwise, non_pruned_module_nodes=[], pruned_groups=[['PruningTestModelEltwise/NNCFConv2d[conv1]/conv2d_0'], ['PruningTestModelEltwise/NNCFConv2d[conv4]/conv2d_0'], ['PruningTestModelEltwise/NNCFConv2d[conv2]/conv2d_0', 'PruningTestModelEltwise/NNCFConv2d[conv3]/conv2d_0']], pruned_groups_by_node_id=[[1], [7], [3, 4]], prune_params=(True, True, False)), GroupPruningModulesTestStruct(model=TestModelBranching, non_pruned_module_nodes=[], pruned_groups=[['TestModelBranching/NNCFConv2d[conv1]/conv2d_0', 'TestModelBranching/NNCFConv2d[conv2]/conv2d_0', 'TestModelBranching/NNCFConv2d[conv3]/conv2d_0']], pruned_groups_by_node_id=[[1, 2, 4]], prune_params=(True, True, False)), GroupPruningModulesTestStruct(model=TestModelBranching, non_pruned_module_nodes=['TestModelBranching/NNCFConv2d[conv1]/conv2d_0', 'TestModelBranching/NNCFConv2d[conv2]/conv2d_0', 'TestModelBranching/NNCFConv2d[conv3]/conv2d_0'], pruned_groups=[['TestModelBranching/NNCFConv2d[conv4]/conv2d_0', 'TestModelBranching/NNCFConv2d[conv5]/conv2d_0']], pruned_groups_by_node_id=[[7, 8]], prune_params=(False, True, False)), GroupPruningModulesTestStruct(model=TestModelBranching, non_pruned_module_nodes=['TestModelBranching/NNCFConv2d[conv4]/conv2d_0', 'TestModelBranching/NNCFConv2d[conv5]/conv2d_0'], pruned_groups=[['TestModelBranching/NNCFConv2d[conv1]/conv2d_0', 'TestModelBranching/NNCFConv2d[conv2]/conv2d_0', 'TestModelBranching/NNCFConv2d[conv3]/conv2d_0']], pruned_groups_by_node_id=[[1, 2, 4]], prune_params=(True, False, False)), GroupPruningModulesTestStruct(model=TestModelResidualConnection, non_pruned_module_nodes=['TestModelResidualConnection/NNCFConv2d[conv4]/conv2d_0', 'TestModelResidualConnection/NNCFConv2d[conv5]/conv2d_0'], pruned_groups=[['TestModelResidualConnection/NNCFConv2d[conv1]/conv2d_0', 'TestModelResidualConnection/NNCFConv2d[conv2]/conv2d_0', 'TestModelResidualConnection/NNCFConv2d[conv3]/conv2d_0']], pruned_groups_by_node_id=[[1, 2, 4]], prune_params=(True, True, False)), GroupPruningModulesTestStruct(model=TestModelEltwiseCombination, non_pruned_module_nodes=[], pruned_groups=[['TestModelEltwiseCombination/NNCFConv2d[conv1]/conv2d_0', 'TestModelEltwiseCombination/NNCFConv2d[conv2]/conv2d_0', 'TestModelEltwiseCombination/NNCFConv2d[conv4]/conv2d_0', 'TestModelEltwiseCombination/NNCFConv2d[conv3]/conv2d_0',], ['TestModelEltwiseCombination/NNCFConv2d[conv5]/conv2d_0', 'TestModelEltwiseCombination/NNCFConv2d[conv6]/conv2d_0']], pruned_groups_by_node_id=[[1, 2, 4, 6], [8, 9]], prune_params=(True, True, False)), GroupPruningModulesTestStruct(model=PruningTestModelSharedConvs, non_pruned_module_nodes=['PruningTestModelSharedConvs/NNCFConv2d[conv1]/conv2d_0', 'PruningTestModelSharedConvs/NNCFConv2d[conv3]/conv2d_0', 'PruningTestModelSharedConvs/NNCFConv2d[conv3]/conv2d_1'], pruned_groups=[['PruningTestModelSharedConvs/NNCFConv2d[conv2]/conv2d_0', 'PruningTestModelSharedConvs/NNCFConv2d[conv2]/conv2d_1']], pruned_groups_by_node_id=[[3, 4]], prune_params=(False, False, False)) ] GROUP_SPECIAL_MODULES_TEST_CASES = [ GroupSpecialModulesTestStruct( model=TestModelBranching, eltwise_clusters=[[3, 5], [9]], ), GroupSpecialModulesTestStruct( model=TestModelResidualConnection, eltwise_clusters=[[3, 5], [9]], ), GroupSpecialModulesTestStruct( model=TestModelEltwiseCombination, eltwise_clusters=[[3, 5, 7], [10]] ) ] MODEL_ANALYSER_TEST_CASES = [ ModelAnalyserTestStruct( model=TestModelResidualConnection, ref_can_prune={0: True, 1: True, 2: True, 3: True, 4: True, 5: True, 6: True, 7: False, 8: False, 9: False, 10: False, 11: False, 12: False} ) ] IS_MODULE_PRUNABLE_TEST_CASES = [ ModulePrunableTestStruct( model=TestModelDiffConvs, config_params={}, is_module_prunable={'TestModelDiffConvs/NNCFConv2d[conv1]/conv2d_0': False, 'TestModelDiffConvs/NNCFConv2d[conv2]/conv2d_0': True, 'TestModelDiffConvs/NNCFConv2d[conv3]/conv2d_0': False, 'TestModelDiffConvs/NNCFConv2d[conv4]/conv2d_0': False}, ), ModulePrunableTestStruct( model=TestModelDiffConvs, config_params={'prune_first_conv': True, 'prune_last_conv': True}, is_module_prunable={'TestModelDiffConvs/NNCFConv2d[conv1]/conv2d_0': True, 'TestModelDiffConvs/NNCFConv2d[conv2]/conv2d_0': True, 'TestModelDiffConvs/NNCFConv2d[conv3]/conv2d_0': False, 'TestModelDiffConvs/NNCFConv2d[conv4]/conv2d_0': False}, ), ModulePrunableTestStruct( model=TestModelDiffConvs, config_params={'prune_first_conv': True, 'prune_last_conv': True, 'prune_downsample_convs': True}, is_module_prunable={'TestModelDiffConvs/NNCFConv2d[conv1]/conv2d_0': True, 'TestModelDiffConvs/NNCFConv2d[conv2]/conv2d_0': True, 'TestModelDiffConvs/NNCFConv2d[conv3]/conv2d_0': True, 'TestModelDiffConvs/NNCFConv2d[conv4]/conv2d_0': False}, ), ModulePrunableTestStruct( model=TestModelBranching, config_params={}, is_module_prunable={'TestModelBranching/NNCFConv2d[conv1]/conv2d_0': False, 'TestModelBranching/NNCFConv2d[conv2]/conv2d_0': False, 'TestModelBranching/NNCFConv2d[conv3]/conv2d_0': False, 'TestModelBranching/NNCFConv2d[conv4]/conv2d_0': False, 'TestModelBranching/NNCFConv2d[conv5]/conv2d_0': False}, ), ModulePrunableTestStruct( model=TestModelBranching, config_params={'prune_first_conv': True, 'prune_last_conv': True, }, is_module_prunable={'TestModelBranching/NNCFConv2d[conv1]/conv2d_0': True, 'TestModelBranching/NNCFConv2d[conv2]/conv2d_0': True, 'TestModelBranching/NNCFConv2d[conv3]/conv2d_0': True, 'TestModelBranching/NNCFConv2d[conv4]/conv2d_0': True, 'TestModelBranching/NNCFConv2d[conv5]/conv2d_0': True}, ), ModulePrunableTestStruct( model=TestModelShuffleNetUnitDW, config_params={'prune_first_conv': True, 'prune_last_conv': True, }, is_module_prunable={ 'TestModelShuffleNetUnitDW/NNCFConv2d[conv]/conv2d_0': True, 'TestModelShuffleNetUnitDW/TestShuffleUnit[unit1]/NNCFConv2d[dw_conv4]/conv2d_0': False, 'TestModelShuffleNetUnitDW/TestShuffleUnit[unit1]/NNCFConv2d[expand_conv5]/conv2d_0': True, 'TestModelShuffleNetUnitDW/TestShuffleUnit[unit1]/NNCFConv2d[compress_conv1]/conv2d_0': True, 'TestModelShuffleNetUnitDW/TestShuffleUnit[unit1]/NNCFConv2d[dw_conv2]/conv2d_0': False, 'TestModelShuffleNetUnitDW/TestShuffleUnit[unit1]/NNCFConv2d[expand_conv3]/conv2d_0': True}, ), ModulePrunableTestStruct( model=TestModelShuffleNetUnit, config_params={'prune_first_conv': True, 'prune_last_conv': True, }, is_module_prunable={'TestModelShuffleNetUnit/NNCFConv2d[conv]/conv2d_0': True, 'TestModelShuffleNetUnit/TestShuffleUnit[unit1]/NNCFConv2d[compress_conv1]/conv2d_0': True, 'TestModelShuffleNetUnit/TestShuffleUnit[unit1]/NNCFConv2d[dw_conv2]/conv2d_0': True, 'TestModelShuffleNetUnit/TestShuffleUnit[unit1]/NNCFConv2d[expand_conv3]/conv2d_0': True}, ) ]
[ 37811, 198, 15069, 357, 66, 8, 12131, 8180, 10501, 198, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 921, 743, 7...
1.817056
7,024
from __future__ import division print eval('1/2') exec('print 1/2') eval(compile('print 1/2', 'wat.py', 'exec')) print eval(compile('1/2', 'wat.py', 'eval')) print eval(compile('1/2', 'wat.py', 'eval', 0, 0)) print eval(compile('1/2', 'wat.py', 'eval', 0, ~0))
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 4798, 5418, 10786, 16, 14, 17, 11537, 198, 18558, 10786, 4798, 352, 14, 17, 11537, 198, 18206, 7, 5589, 576, 10786, 4798, 352, 14, 17, 3256, 705, 47261, 13, 9078, 3256, 705, 18558, 6, 4008, ...
2.372727
110
from .Document import Document from .SpectrumDocument import SpectrumDocument from .Spec2Vec import Spec2Vec __all__ = [ "Document", "SpectrumDocument", "Spec2Vec" ]
[ 6738, 764, 24941, 1330, 16854, 198, 6738, 764, 49738, 6582, 24941, 1330, 27217, 24941, 198, 6738, 764, 22882, 17, 53, 721, 1330, 18291, 17, 53, 721, 628, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 24941, 1600, 198, 220, ...
2.903226
62
""" Cisco_IOS_XR_wanphy_ui_oper This module contains a collection of YANG definitions for Cisco IOS\-XR wanphy\-ui package operational data. This module contains definitions for the following management objects\: wanphy\: WANPHY operational data Copyright (c) 2013\-2016 by Cisco Systems, Inc. All rights reserved. """ import re import collections from enum import Enum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk.errors import YPYError, YPYModelError
[ 37811, 28289, 62, 40, 2640, 62, 55, 49, 62, 8149, 6883, 62, 9019, 62, 3575, 220, 198, 198, 1212, 8265, 4909, 257, 4947, 286, 575, 15567, 17336, 198, 1640, 28289, 314, 2640, 41441, 55, 49, 266, 272, 6883, 41441, 9019, 5301, 13919, 13...
3.204969
161
#!/usr/bin/env python3 # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. import megengine as mge import numpy as np import pytest from megengine.autodiff import GradManager from basecls.solver.optimizer import LAMB
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 1946, 12, 1238, 2481, 8336, 85, 4178, 3457, 13, 1439, 2489, 10395, 13, 198, 11748, 17243, 18392, 355, 285, 469, 198, 11748, 299, 32152, 355, 45941, 198, 117...
3.09589
73
import argparse import logging import os import pathlib import time import log import onenote_auth import onenote import pipeline logger = logging.getLogger() main()
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 640, 198, 198, 11748, 2604, 198, 11748, 319, 268, 1258, 62, 18439, 198, 11748, 319, 268, 1258, 198, 11748, 11523, 198, 198, 6404, 1362, 796, 1...
3.307692
52
# (c) 2017 Red Hat Inc. # # This file is part of Ansible # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type import collections import os import json import pytest from ansible.module_utils._text import to_text # Magic... Incorrectly identified by pylint as unused from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import maybe_sleep # pylint: disable=unused-import from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify # pylint: disable=unused-import from ansible_collections.community.aws.plugins.modules import data_pipeline # test_api_gateway.py requires the `boto3` and `botocore` modules boto3 = pytest.importorskip('boto3') def test_create_pipeline_already_exists(placeboify, maybe_sleep, dp_setup): connection = placeboify.client('datapipeline') changed, result = data_pipeline.create_pipeline(connection, dp_setup.module) assert changed is False assert "Data Pipeline ansible-test-create-pipeline is present" in result['msg'] def test_pipeline_field(placeboify, maybe_sleep, dp_setup): connection = placeboify.client('datapipeline') pipeline_field_info = data_pipeline.pipeline_field(connection, dp_setup.data_pipeline_id, "@pipelineState") assert pipeline_field_info == "PENDING" def test_define_pipeline(placeboify, maybe_sleep, dp_setup): connection = placeboify.client('datapipeline') changed, result = data_pipeline.define_pipeline(connection, dp_setup.module, dp_setup.objects, dp_setup.data_pipeline_id) assert 'has been updated' in result def test_deactivate_pipeline(placeboify, maybe_sleep, dp_setup): connection = placeboify.client('datapipeline') changed, result = data_pipeline.deactivate_pipeline(connection, dp_setup.module) assert "Data Pipeline ansible-test-create-pipeline deactivated" in result['msg'] def test_activate_without_population(placeboify, maybe_sleep, dp_setup): connection = placeboify.client('datapipeline') with pytest.raises(Exception) as error_message: changed, result = data_pipeline.activate_pipeline(connection, dp_setup.module) assert error_message == "You need to populate your pipeline before activation." def test_create_pipeline(placeboify, maybe_sleep): connection = placeboify.client('datapipeline') params = {'name': 'ansible-unittest-create-pipeline', 'description': 'ansible-datapipeline-unit-test', 'state': 'present', 'timeout': 300, 'tags': {}} m = FakeModule(**params) changed, result = data_pipeline.create_pipeline(connection, m) assert changed is True assert result['msg'] == "Data Pipeline ansible-unittest-create-pipeline created." data_pipeline.delete_pipeline(connection, m) def test_create_pipeline_with_tags(placeboify, maybe_sleep): connection = placeboify.client('datapipeline') params = {'name': 'ansible-unittest-create-pipeline_tags', 'description': 'ansible-datapipeline-unit-test', 'state': 'present', 'tags': {'ansible': 'test'}, 'timeout': 300} m = FakeModule(**params) changed, result = data_pipeline.create_pipeline(connection, m) assert changed is True assert result['msg'] == "Data Pipeline ansible-unittest-create-pipeline_tags created." data_pipeline.delete_pipeline(connection, m) def test_delete_nonexistent_pipeline(placeboify, maybe_sleep): connection = placeboify.client('datapipeline') params = {'name': 'ansible-test-nonexistent', 'description': 'ansible-test-nonexistent', 'state': 'absent', 'objects': [], 'tags': {'ansible': 'test'}, 'timeout': 300} m = FakeModule(**params) changed, result = data_pipeline.delete_pipeline(connection, m) assert changed is False def test_delete_pipeline(placeboify, maybe_sleep): connection = placeboify.client('datapipeline') params = {'name': 'ansible-test-nonexistent', 'description': 'ansible-test-nonexistent', 'state': 'absent', 'objects': [], 'tags': {'ansible': 'test'}, 'timeout': 300} m = FakeModule(**params) data_pipeline.create_pipeline(connection, m) changed, result = data_pipeline.delete_pipeline(connection, m) assert changed is True def test_build_unique_id_different(): m = FakeModule(**{'name': 'ansible-unittest-1', 'description': 'test-unique-id'}) m2 = FakeModule(**{'name': 'ansible-unittest-1', 'description': 'test-unique-id-different'}) assert data_pipeline.build_unique_id(m) != data_pipeline.build_unique_id(m2) def test_build_unique_id_same(): m = FakeModule(**{'name': 'ansible-unittest-1', 'description': 'test-unique-id', 'tags': {'ansible': 'test'}}) m2 = FakeModule(**{'name': 'ansible-unittest-1', 'description': 'test-unique-id', 'tags': {'ansible': 'test'}}) assert data_pipeline.build_unique_id(m) == data_pipeline.build_unique_id(m2) def test_build_unique_id_obj(): # check that the object can be different and the unique id should be the same; should be able to modify objects m = FakeModule(**{'name': 'ansible-unittest-1', 'objects': [{'first': 'object'}]}) m2 = FakeModule(**{'name': 'ansible-unittest-1', 'objects': [{'second': 'object'}]}) assert data_pipeline.build_unique_id(m) == data_pipeline.build_unique_id(m2) def test_format_tags(): unformatted_tags = {'key1': 'val1', 'key2': 'val2', 'key3': 'val3'} formatted_tags = data_pipeline.format_tags(unformatted_tags) for tag_set in formatted_tags: assert unformatted_tags[tag_set['key']] == tag_set['value']
[ 2, 357, 66, 8, 2177, 2297, 10983, 3457, 13, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 28038, 856, 198, 2, 22961, 3611, 5094, 13789, 410, 18, 13, 15, 10, 357, 3826, 27975, 45761, 393, 3740, 1378, 2503, 13, 41791, 13, 2398, 14, 67...
2.598238
2,270
import sqlite3 import tkinter as tk import pandas as pd #---------------------------------------------- #Para criao do banco de dados retira o comentrio (#) da linha 9 23 somente a primeira vez que rodar o cd, #depois, basta comentar novamente. #Criando o Banco de Dados # conexao = sqlite3.connect('Clientes.db') # # c = conexao.cursor() # # c.execute(''' CREATE TABLE clientes ( # Nome text, # Sobrenome text, # Email text, # Telefone text # ) # ''') # # conexao.commit() # conexao.close() #----------------------------------------------- #Criando as funes #Criando a funo para exportar as informaes do banco em formato xlxs #----------------------------------------------- janela = tk.Tk() #estartando a janela janela.title("Cadastro de Clientes") #Inserindo um ttulo na janela #Criando as Labels: label_nome = tk.Label(janela, text="Nome") label_nome.grid(row=0, column=0, padx=10, pady=10) label_sobrenome = tk.Label(janela, text="Sobrenome") label_sobrenome.grid(row=1, column=0, padx=10, pady=10) label_email = tk.Label(janela, text="Email") label_email.grid(row=2, column=0, padx=10, pady=10) label_telefone = tk.Label(janela, text="Telefone") label_telefone.grid(row=3, column=0, padx=10, pady=10) #------------------------------------------------------- #Entrys entry_nome = tk.Entry(janela, text="Nome", width=30) entry_nome.grid(row=0, column=2, padx=10, pady=10) entry_sobrenome = tk.Entry(janela, text="Sobrenome", width=30) entry_sobrenome.grid(row=1, column=2, padx=10, pady=10) entry_email = tk.Entry(janela, text="Email", width=30) entry_email.grid(row=2, column=2, padx=10, pady=10) entry_telefone = tk.Entry(janela, text="Telefone", width=30) entry_telefone.grid(row=3, column=2, padx=10, pady=10) #Botes botao_Cadastrar = tk.Button(janela, text="Cadastrar Cliente", command = cadastrar_cliente) botao_Cadastrar.grid(row=4, column=0, padx=10, pady=10, columnspan=2, ipadx=80) botao_exportar = tk.Button(janela, text="Exportar Cliente", command = exportar_cliente) botao_exportar.grid(row=4, column=2, padx=10, pady=10, columnspan=2, ipadx=80) #Obs: ipadx=80 - Basicamente serve para alargar uma estrutura especifca janela.mainloop()
[ 11748, 44161, 578, 18, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 3880, 26171, 198, 2, 47, 3301, 269, 380, 5488, 466, 3958, 1073, 390, 9955, 418, 1005, 8704, 267, 401, 298, 27250, 1...
2.44581
895
import math import requests from pygitbucket.exceptions import ( UnknownError, InvalidIDError, NotFoundIDError, NotAuthenticatedError, PermissionError, )
[ 11748, 10688, 198, 11748, 7007, 198, 198, 6738, 12972, 18300, 27041, 316, 13, 1069, 11755, 1330, 357, 198, 220, 220, 220, 16185, 12331, 11, 198, 220, 220, 220, 17665, 2389, 12331, 11, 198, 220, 220, 220, 1892, 21077, 2389, 12331, 11, ...
2.885246
61
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch from torch.utils.data import Dataset import numpy as np # These input-data-processing classes take input data from a text file and convert them to the format # appropriate for the recognition and discrimination games, so that they can be read by # the standard pytorch DataLoader. The latter requires the data reading classes to support # a __len__(self) method, returning the size of the dataset, and a __getitem__(self, idx) # method, returning the idx-th item in the dataset. We also provide a get_n_features(self) method, # returning the dimensionality of the Sender input vector after it is transformed to one-hot format. # The AttValRecoDataset class is used in the reconstruction game. It takes an input file with a # space-delimited attribute-value vector per line and creates a data-frame with the two mandatory # fields expected in EGG games, namely sender_input and labels. # In this case, the two fields contain the same information, namely the input attribute-value vectors, # represented as one-hot in sender_input, and in the original integer-based format in # labels. # The AttValDiscriDataset class, used in the discrimination game takes an input file with a variable # number of period-delimited fields, where all fields but the last represent attribute-value vectors # (with space-delimited attributes). The last field contains the index (counting from 0) of the target # vector. # Here, we create a data-frame containing 3 fields: sender_input, labels and receiver_input (these are # expected by EGG, the first two mandatorily so). # The sender_input corresponds to the target vector (in one-hot format), labels are the indices of the # target vector location and receiver_input is a matrix with a row for each input vector (in input order).
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 198, 198, ...
4.018443
488
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Reads datasets, reads and writes contour coordinates. """ import numpy as np import csv def read_ecbenchmark_dataset(path='datasets/1year_dataset_A.txt'): """ Reads a 2D dataset that uses a an ASCI format with ';' as a seperator. This format has been used in the EC benchmark, see https://github.com/ec-benchmark-organizers/ec-benchmark . Parameters ---------- path : string Path to dataset including the file name, defaults to '../datasets/1year_dataset_A.txt' Returns ------- x : ndarray of doubles Observations of the environmental variable 1. y : ndarray of doubles Observations of the environmental variable 2. x_label : str Label of the environmantal variable 1. y_label : str Label of the environmental variable 2. """ x = list() y = list() x_label = None y_label = None with open(path, newline='') as csv_file: reader = csv.reader(csv_file, delimiter=';') idx = 0 for row in reader: if idx == 0: x_label = row[1][1:] # Ignore first char (is a white space). y_label = row[2][1:] # Ignore first char (is a white space). if idx > 0: # Ignore the header x.append(float(row[1])) y.append(float(row[2])) idx = idx + 1 x = np.asarray(x) y = np.asarray(y) return (x, y, x_label, y_label) def write_contour(x, y, path, label_x='Variable x (unit)', label_y='Variable y (unit)'): """ Writes 2D contour coordinates in an ASCI format with ';' as a seperator. Parameters ---------- x : ndarray of doubles Values in the first dimensions of the contour's coordinates. y : ndarray of doubles Values in the second dimensions of the contour's coordinates. path : string Path including folder and file name where the contour should be saved. label_x : str Name and unit of the first environmental variable, defaults to 'Variable x (unit), could be, for exmaple, 'Significant wave height (m)'. label_y : str Name and unit of the second environmental variable, defaults to 'Variable y (unit)', could be, for example, 'Zero-up-crossing period (s)'. """ with open(path, mode='w', newline='') as contour_file: contour_writer = csv.writer(contour_file, delimiter=';', quotechar='"', quoting=csv.QUOTE_MINIMAL) contour_writer.writerow([label_x, label_y]) for xi,yi in zip(x,y): contour_writer.writerow([str(xi), str(yi)]) def read_contour(path): """ Reads 2D contour coordinates in an ASCI format with ';' as a seperator. Parameters ---------- path : string Path to contour including the file name. Returns ------- x : ndarray of doubles Observations of the environmental variable 1. y : ndarray of doubles Observations of the environmental variable 2. """ x = list() y = list() with open(path, newline='') as csv_file: reader = csv.reader(csv_file, delimiter=';') idx = 0 for row in reader: if idx > 0: # Ignore the header x.append(float(row[0])) y.append(float(row[1])) idx = idx + 1 x = np.asarray(x) y = np.asarray(y) return (x, y)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 5569, 82, 40522, 11, 9743, 290, 6797, 542, 454, 22715, 13, 201, 198, 37811, 201, 198, ...
2.221261
1,618
""" @file @brief Test for :epkg:`cartopy`. """ import numpy import numba def check_numba(): """ Runs a sample with :epkg:`numba`. """ Y = numpy.random.rand(10).astype(numpy.double) X = numpy.random.rand(10, 2).astype(numpy.double) w = numpy.random.rand(2).astype(numpy.double) return logistic_regression(Y, X, w, 2)
[ 37811, 198, 31, 7753, 198, 31, 65, 3796, 6208, 329, 1058, 538, 10025, 25, 63, 26674, 11081, 44646, 198, 37811, 198, 11748, 299, 32152, 198, 11748, 997, 7012, 628, 198, 198, 4299, 2198, 62, 77, 2178, 64, 33529, 198, 220, 220, 220, 37...
2.224359
156
# Copyright (c) 2021 kamyu. All rights reserved. # # Google Code Jam 2021 Round 3 - Problem C. Fence Design # https://codingcompetitions.withgoogle.com/codejam/round/0000000000436142/0000000000813bc7 # # Time: O(NlogN) on average, pass in PyPy2 but Python2 # Space: O(N) # from random import seed, randint # Compute the cross product of vectors AB and AC CW, COLLINEAR, CCW = range(-1, 2) seed(0) for case in xrange(input()): print 'Case #%d: %s' % (case+1, fence_design())
[ 2, 15069, 357, 66, 8, 33448, 479, 14814, 84, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 3012, 6127, 9986, 33448, 10485, 513, 532, 20647, 327, 13, 376, 594, 8495, 198, 2, 3740, 1378, 66, 7656, 5589, 316, 1756, 13, 4480, 13297, 13, ...
2.754286
175
# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.11 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): __block = swig_import_helper() del swig_import_helper else: import __block del version_info try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. try: _object = object _newclass = 1 except AttributeError: _newclass = 0 gsl_vector_set_zero = __block.gsl_vector_set_zero gsl_vector_set_all = __block.gsl_vector_set_all gsl_vector_set_basis = __block.gsl_vector_set_basis gsl_vector_fread = __block.gsl_vector_fread gsl_vector_fwrite = __block.gsl_vector_fwrite gsl_vector_fscanf = __block.gsl_vector_fscanf gsl_vector_fprintf = __block.gsl_vector_fprintf gsl_vector_reverse = __block.gsl_vector_reverse gsl_vector_swap = __block.gsl_vector_swap gsl_vector_swap_elements = __block.gsl_vector_swap_elements gsl_vector_max = __block.gsl_vector_max gsl_vector_min = __block.gsl_vector_min gsl_vector_minmax = __block.gsl_vector_minmax gsl_vector_max_index = __block.gsl_vector_max_index gsl_vector_min_index = __block.gsl_vector_min_index gsl_vector_minmax_index = __block.gsl_vector_minmax_index gsl_vector_isnull = __block.gsl_vector_isnull gsl_matrix_set_zero = __block.gsl_matrix_set_zero gsl_matrix_set_all = __block.gsl_matrix_set_all gsl_matrix_set_identity = __block.gsl_matrix_set_identity gsl_matrix_fread = __block.gsl_matrix_fread gsl_matrix_fwrite = __block.gsl_matrix_fwrite gsl_matrix_fscanf = __block.gsl_matrix_fscanf gsl_matrix_fprintf = __block.gsl_matrix_fprintf gsl_matrix_swap = __block.gsl_matrix_swap gsl_matrix_swap_rows = __block.gsl_matrix_swap_rows gsl_matrix_swap_columns = __block.gsl_matrix_swap_columns gsl_matrix_swap_rowcol = __block.gsl_matrix_swap_rowcol gsl_matrix_transpose = __block.gsl_matrix_transpose gsl_matrix_max = __block.gsl_matrix_max gsl_matrix_min = __block.gsl_matrix_min gsl_matrix_minmax = __block.gsl_matrix_minmax gsl_matrix_max_index = __block.gsl_matrix_max_index gsl_matrix_min_index = __block.gsl_matrix_min_index gsl_matrix_minmax_index = __block.gsl_matrix_minmax_index gsl_matrix_isnull = __block.gsl_matrix_isnull gsl_matrix_diagonal = __block.gsl_matrix_diagonal gsl_matrix_subdiagonal = __block.gsl_matrix_subdiagonal gsl_matrix_superdiagonal = __block.gsl_matrix_superdiagonal gsl_vector_float_set_zero = __block.gsl_vector_float_set_zero gsl_vector_float_set_all = __block.gsl_vector_float_set_all gsl_vector_float_set_basis = __block.gsl_vector_float_set_basis gsl_vector_float_fread = __block.gsl_vector_float_fread gsl_vector_float_fwrite = __block.gsl_vector_float_fwrite gsl_vector_float_fscanf = __block.gsl_vector_float_fscanf gsl_vector_float_fprintf = __block.gsl_vector_float_fprintf gsl_vector_float_reverse = __block.gsl_vector_float_reverse gsl_vector_float_swap = __block.gsl_vector_float_swap gsl_vector_float_swap_elements = __block.gsl_vector_float_swap_elements gsl_vector_float_max = __block.gsl_vector_float_max gsl_vector_float_min = __block.gsl_vector_float_min gsl_vector_float_minmax = __block.gsl_vector_float_minmax gsl_vector_float_max_index = __block.gsl_vector_float_max_index gsl_vector_float_min_index = __block.gsl_vector_float_min_index gsl_vector_float_minmax_index = __block.gsl_vector_float_minmax_index gsl_vector_float_isnull = __block.gsl_vector_float_isnull gsl_matrix_float_set_zero = __block.gsl_matrix_float_set_zero gsl_matrix_float_set_all = __block.gsl_matrix_float_set_all gsl_matrix_float_set_identity = __block.gsl_matrix_float_set_identity gsl_matrix_float_fread = __block.gsl_matrix_float_fread gsl_matrix_float_fwrite = __block.gsl_matrix_float_fwrite gsl_matrix_float_fscanf = __block.gsl_matrix_float_fscanf gsl_matrix_float_fprintf = __block.gsl_matrix_float_fprintf gsl_matrix_float_swap = __block.gsl_matrix_float_swap gsl_matrix_float_swap_rows = __block.gsl_matrix_float_swap_rows gsl_matrix_float_swap_columns = __block.gsl_matrix_float_swap_columns gsl_matrix_float_swap_rowcol = __block.gsl_matrix_float_swap_rowcol gsl_matrix_float_transpose = __block.gsl_matrix_float_transpose gsl_matrix_float_max = __block.gsl_matrix_float_max gsl_matrix_float_min = __block.gsl_matrix_float_min gsl_matrix_float_minmax = __block.gsl_matrix_float_minmax gsl_matrix_float_max_index = __block.gsl_matrix_float_max_index gsl_matrix_float_min_index = __block.gsl_matrix_float_min_index gsl_matrix_float_minmax_index = __block.gsl_matrix_float_minmax_index gsl_matrix_float_isnull = __block.gsl_matrix_float_isnull gsl_matrix_float_diagonal = __block.gsl_matrix_float_diagonal gsl_matrix_float_subdiagonal = __block.gsl_matrix_float_subdiagonal gsl_matrix_float_superdiagonal = __block.gsl_matrix_float_superdiagonal gsl_vector_long_set_zero = __block.gsl_vector_long_set_zero gsl_vector_long_set_all = __block.gsl_vector_long_set_all gsl_vector_long_set_basis = __block.gsl_vector_long_set_basis gsl_vector_long_fread = __block.gsl_vector_long_fread gsl_vector_long_fwrite = __block.gsl_vector_long_fwrite gsl_vector_long_fscanf = __block.gsl_vector_long_fscanf gsl_vector_long_fprintf = __block.gsl_vector_long_fprintf gsl_vector_long_reverse = __block.gsl_vector_long_reverse gsl_vector_long_swap = __block.gsl_vector_long_swap gsl_vector_long_swap_elements = __block.gsl_vector_long_swap_elements gsl_vector_long_max = __block.gsl_vector_long_max gsl_vector_long_min = __block.gsl_vector_long_min gsl_vector_long_minmax = __block.gsl_vector_long_minmax gsl_vector_long_max_index = __block.gsl_vector_long_max_index gsl_vector_long_min_index = __block.gsl_vector_long_min_index gsl_vector_long_minmax_index = __block.gsl_vector_long_minmax_index gsl_vector_long_isnull = __block.gsl_vector_long_isnull gsl_matrix_long_set_zero = __block.gsl_matrix_long_set_zero gsl_matrix_long_set_all = __block.gsl_matrix_long_set_all gsl_matrix_long_set_identity = __block.gsl_matrix_long_set_identity gsl_matrix_long_fread = __block.gsl_matrix_long_fread gsl_matrix_long_fwrite = __block.gsl_matrix_long_fwrite gsl_matrix_long_fscanf = __block.gsl_matrix_long_fscanf gsl_matrix_long_fprintf = __block.gsl_matrix_long_fprintf gsl_matrix_long_swap = __block.gsl_matrix_long_swap gsl_matrix_long_swap_rows = __block.gsl_matrix_long_swap_rows gsl_matrix_long_swap_columns = __block.gsl_matrix_long_swap_columns gsl_matrix_long_swap_rowcol = __block.gsl_matrix_long_swap_rowcol gsl_matrix_long_transpose = __block.gsl_matrix_long_transpose gsl_matrix_long_max = __block.gsl_matrix_long_max gsl_matrix_long_min = __block.gsl_matrix_long_min gsl_matrix_long_minmax = __block.gsl_matrix_long_minmax gsl_matrix_long_max_index = __block.gsl_matrix_long_max_index gsl_matrix_long_min_index = __block.gsl_matrix_long_min_index gsl_matrix_long_minmax_index = __block.gsl_matrix_long_minmax_index gsl_matrix_long_isnull = __block.gsl_matrix_long_isnull gsl_matrix_long_diagonal = __block.gsl_matrix_long_diagonal gsl_matrix_long_subdiagonal = __block.gsl_matrix_long_subdiagonal gsl_matrix_long_superdiagonal = __block.gsl_matrix_long_superdiagonal gsl_vector_int_set_zero = __block.gsl_vector_int_set_zero gsl_vector_int_set_all = __block.gsl_vector_int_set_all gsl_vector_int_set_basis = __block.gsl_vector_int_set_basis gsl_vector_int_fread = __block.gsl_vector_int_fread gsl_vector_int_fwrite = __block.gsl_vector_int_fwrite gsl_vector_int_fscanf = __block.gsl_vector_int_fscanf gsl_vector_int_fprintf = __block.gsl_vector_int_fprintf gsl_vector_int_reverse = __block.gsl_vector_int_reverse gsl_vector_int_swap = __block.gsl_vector_int_swap gsl_vector_int_swap_elements = __block.gsl_vector_int_swap_elements gsl_vector_int_max = __block.gsl_vector_int_max gsl_vector_int_min = __block.gsl_vector_int_min gsl_vector_int_minmax = __block.gsl_vector_int_minmax gsl_vector_int_max_index = __block.gsl_vector_int_max_index gsl_vector_int_min_index = __block.gsl_vector_int_min_index gsl_vector_int_minmax_index = __block.gsl_vector_int_minmax_index gsl_vector_int_isnull = __block.gsl_vector_int_isnull gsl_matrix_int_set_zero = __block.gsl_matrix_int_set_zero gsl_matrix_int_set_all = __block.gsl_matrix_int_set_all gsl_matrix_int_set_identity = __block.gsl_matrix_int_set_identity gsl_matrix_int_fread = __block.gsl_matrix_int_fread gsl_matrix_int_fwrite = __block.gsl_matrix_int_fwrite gsl_matrix_int_fscanf = __block.gsl_matrix_int_fscanf gsl_matrix_int_fprintf = __block.gsl_matrix_int_fprintf gsl_matrix_int_swap = __block.gsl_matrix_int_swap gsl_matrix_int_swap_rows = __block.gsl_matrix_int_swap_rows gsl_matrix_int_swap_columns = __block.gsl_matrix_int_swap_columns gsl_matrix_int_swap_rowcol = __block.gsl_matrix_int_swap_rowcol gsl_matrix_int_transpose = __block.gsl_matrix_int_transpose gsl_matrix_int_max = __block.gsl_matrix_int_max gsl_matrix_int_min = __block.gsl_matrix_int_min gsl_matrix_int_minmax = __block.gsl_matrix_int_minmax gsl_matrix_int_max_index = __block.gsl_matrix_int_max_index gsl_matrix_int_min_index = __block.gsl_matrix_int_min_index gsl_matrix_int_minmax_index = __block.gsl_matrix_int_minmax_index gsl_matrix_int_isnull = __block.gsl_matrix_int_isnull gsl_matrix_int_diagonal = __block.gsl_matrix_int_diagonal gsl_matrix_int_subdiagonal = __block.gsl_matrix_int_subdiagonal gsl_matrix_int_superdiagonal = __block.gsl_matrix_int_superdiagonal gsl_vector_short_set_zero = __block.gsl_vector_short_set_zero gsl_vector_short_set_all = __block.gsl_vector_short_set_all gsl_vector_short_set_basis = __block.gsl_vector_short_set_basis gsl_vector_short_fread = __block.gsl_vector_short_fread gsl_vector_short_fwrite = __block.gsl_vector_short_fwrite gsl_vector_short_fscanf = __block.gsl_vector_short_fscanf gsl_vector_short_fprintf = __block.gsl_vector_short_fprintf gsl_vector_short_reverse = __block.gsl_vector_short_reverse gsl_vector_short_swap = __block.gsl_vector_short_swap gsl_vector_short_swap_elements = __block.gsl_vector_short_swap_elements gsl_vector_short_max = __block.gsl_vector_short_max gsl_vector_short_min = __block.gsl_vector_short_min gsl_vector_short_minmax = __block.gsl_vector_short_minmax gsl_vector_short_max_index = __block.gsl_vector_short_max_index gsl_vector_short_min_index = __block.gsl_vector_short_min_index gsl_vector_short_minmax_index = __block.gsl_vector_short_minmax_index gsl_vector_short_isnull = __block.gsl_vector_short_isnull gsl_matrix_short_set_zero = __block.gsl_matrix_short_set_zero gsl_matrix_short_set_all = __block.gsl_matrix_short_set_all gsl_matrix_short_set_identity = __block.gsl_matrix_short_set_identity gsl_matrix_short_fread = __block.gsl_matrix_short_fread gsl_matrix_short_fwrite = __block.gsl_matrix_short_fwrite gsl_matrix_short_fscanf = __block.gsl_matrix_short_fscanf gsl_matrix_short_fprintf = __block.gsl_matrix_short_fprintf gsl_matrix_short_swap = __block.gsl_matrix_short_swap gsl_matrix_short_swap_rows = __block.gsl_matrix_short_swap_rows gsl_matrix_short_swap_columns = __block.gsl_matrix_short_swap_columns gsl_matrix_short_swap_rowcol = __block.gsl_matrix_short_swap_rowcol gsl_matrix_short_transpose = __block.gsl_matrix_short_transpose gsl_matrix_short_max = __block.gsl_matrix_short_max gsl_matrix_short_min = __block.gsl_matrix_short_min gsl_matrix_short_minmax = __block.gsl_matrix_short_minmax gsl_matrix_short_max_index = __block.gsl_matrix_short_max_index gsl_matrix_short_min_index = __block.gsl_matrix_short_min_index gsl_matrix_short_minmax_index = __block.gsl_matrix_short_minmax_index gsl_matrix_short_isnull = __block.gsl_matrix_short_isnull gsl_matrix_short_diagonal = __block.gsl_matrix_short_diagonal gsl_matrix_short_subdiagonal = __block.gsl_matrix_short_subdiagonal gsl_matrix_short_superdiagonal = __block.gsl_matrix_short_superdiagonal gsl_vector_char_set_zero = __block.gsl_vector_char_set_zero gsl_vector_char_set_all = __block.gsl_vector_char_set_all gsl_vector_char_set_basis = __block.gsl_vector_char_set_basis gsl_vector_char_fread = __block.gsl_vector_char_fread gsl_vector_char_fwrite = __block.gsl_vector_char_fwrite gsl_vector_char_fscanf = __block.gsl_vector_char_fscanf gsl_vector_char_fprintf = __block.gsl_vector_char_fprintf gsl_vector_char_reverse = __block.gsl_vector_char_reverse gsl_vector_char_swap = __block.gsl_vector_char_swap gsl_vector_char_swap_elements = __block.gsl_vector_char_swap_elements gsl_vector_char_max = __block.gsl_vector_char_max gsl_vector_char_min = __block.gsl_vector_char_min gsl_vector_char_minmax = __block.gsl_vector_char_minmax gsl_vector_char_max_index = __block.gsl_vector_char_max_index gsl_vector_char_min_index = __block.gsl_vector_char_min_index gsl_vector_char_minmax_index = __block.gsl_vector_char_minmax_index gsl_vector_char_isnull = __block.gsl_vector_char_isnull gsl_matrix_char_set_zero = __block.gsl_matrix_char_set_zero gsl_matrix_char_set_all = __block.gsl_matrix_char_set_all gsl_matrix_char_set_identity = __block.gsl_matrix_char_set_identity gsl_matrix_char_fread = __block.gsl_matrix_char_fread gsl_matrix_char_fwrite = __block.gsl_matrix_char_fwrite gsl_matrix_char_fscanf = __block.gsl_matrix_char_fscanf gsl_matrix_char_fprintf = __block.gsl_matrix_char_fprintf gsl_matrix_char_swap = __block.gsl_matrix_char_swap gsl_matrix_char_swap_rows = __block.gsl_matrix_char_swap_rows gsl_matrix_char_swap_columns = __block.gsl_matrix_char_swap_columns gsl_matrix_char_swap_rowcol = __block.gsl_matrix_char_swap_rowcol gsl_matrix_char_transpose = __block.gsl_matrix_char_transpose gsl_matrix_char_max = __block.gsl_matrix_char_max gsl_matrix_char_min = __block.gsl_matrix_char_min gsl_matrix_char_minmax = __block.gsl_matrix_char_minmax gsl_matrix_char_max_index = __block.gsl_matrix_char_max_index gsl_matrix_char_min_index = __block.gsl_matrix_char_min_index gsl_matrix_char_minmax_index = __block.gsl_matrix_char_minmax_index gsl_matrix_char_isnull = __block.gsl_matrix_char_isnull gsl_matrix_char_diagonal = __block.gsl_matrix_char_diagonal gsl_matrix_char_subdiagonal = __block.gsl_matrix_char_subdiagonal gsl_matrix_char_superdiagonal = __block.gsl_matrix_char_superdiagonal gsl_vector_complex_set_zero = __block.gsl_vector_complex_set_zero gsl_vector_complex_set_all = __block.gsl_vector_complex_set_all gsl_vector_complex_set_basis = __block.gsl_vector_complex_set_basis gsl_vector_complex_fread = __block.gsl_vector_complex_fread gsl_vector_complex_fwrite = __block.gsl_vector_complex_fwrite gsl_vector_complex_fscanf = __block.gsl_vector_complex_fscanf gsl_vector_complex_fprintf = __block.gsl_vector_complex_fprintf gsl_vector_complex_reverse = __block.gsl_vector_complex_reverse gsl_vector_complex_swap = __block.gsl_vector_complex_swap gsl_vector_complex_swap_elements = __block.gsl_vector_complex_swap_elements gsl_vector_complex_isnull = __block.gsl_vector_complex_isnull gsl_matrix_complex_set_zero = __block.gsl_matrix_complex_set_zero gsl_matrix_complex_set_all = __block.gsl_matrix_complex_set_all gsl_matrix_complex_set_identity = __block.gsl_matrix_complex_set_identity gsl_matrix_complex_fread = __block.gsl_matrix_complex_fread gsl_matrix_complex_fwrite = __block.gsl_matrix_complex_fwrite gsl_matrix_complex_fscanf = __block.gsl_matrix_complex_fscanf gsl_matrix_complex_fprintf = __block.gsl_matrix_complex_fprintf gsl_matrix_complex_swap = __block.gsl_matrix_complex_swap gsl_matrix_complex_swap_rows = __block.gsl_matrix_complex_swap_rows gsl_matrix_complex_swap_columns = __block.gsl_matrix_complex_swap_columns gsl_matrix_complex_swap_rowcol = __block.gsl_matrix_complex_swap_rowcol gsl_matrix_complex_transpose = __block.gsl_matrix_complex_transpose gsl_matrix_complex_isnull = __block.gsl_matrix_complex_isnull gsl_matrix_complex_diagonal = __block.gsl_matrix_complex_diagonal gsl_matrix_complex_subdiagonal = __block.gsl_matrix_complex_subdiagonal gsl_matrix_complex_superdiagonal = __block.gsl_matrix_complex_superdiagonal gsl_vector_complex_float_set_zero = __block.gsl_vector_complex_float_set_zero gsl_vector_complex_float_set_all = __block.gsl_vector_complex_float_set_all gsl_vector_complex_float_set_basis = __block.gsl_vector_complex_float_set_basis gsl_vector_complex_float_fread = __block.gsl_vector_complex_float_fread gsl_vector_complex_float_fwrite = __block.gsl_vector_complex_float_fwrite gsl_vector_complex_float_fscanf = __block.gsl_vector_complex_float_fscanf gsl_vector_complex_float_fprintf = __block.gsl_vector_complex_float_fprintf gsl_vector_complex_float_reverse = __block.gsl_vector_complex_float_reverse gsl_vector_complex_float_swap = __block.gsl_vector_complex_float_swap gsl_vector_complex_float_swap_elements = __block.gsl_vector_complex_float_swap_elements gsl_vector_complex_float_isnull = __block.gsl_vector_complex_float_isnull gsl_matrix_complex_float_set_zero = __block.gsl_matrix_complex_float_set_zero gsl_matrix_complex_float_set_all = __block.gsl_matrix_complex_float_set_all gsl_matrix_complex_float_set_identity = __block.gsl_matrix_complex_float_set_identity gsl_matrix_complex_float_fread = __block.gsl_matrix_complex_float_fread gsl_matrix_complex_float_fwrite = __block.gsl_matrix_complex_float_fwrite gsl_matrix_complex_float_fscanf = __block.gsl_matrix_complex_float_fscanf gsl_matrix_complex_float_fprintf = __block.gsl_matrix_complex_float_fprintf gsl_matrix_complex_float_swap = __block.gsl_matrix_complex_float_swap gsl_matrix_complex_float_swap_rows = __block.gsl_matrix_complex_float_swap_rows gsl_matrix_complex_float_swap_columns = __block.gsl_matrix_complex_float_swap_columns gsl_matrix_complex_float_swap_rowcol = __block.gsl_matrix_complex_float_swap_rowcol gsl_matrix_complex_float_transpose = __block.gsl_matrix_complex_float_transpose gsl_matrix_complex_float_isnull = __block.gsl_matrix_complex_float_isnull gsl_matrix_complex_float_diagonal = __block.gsl_matrix_complex_float_diagonal gsl_matrix_complex_float_subdiagonal = __block.gsl_matrix_complex_float_subdiagonal gsl_matrix_complex_float_superdiagonal = __block.gsl_matrix_complex_float_superdiagonal # This file is compatible with both classic and new-style classes.
[ 2, 770, 2393, 373, 6338, 7560, 416, 12672, 3528, 357, 4023, 1378, 2503, 13, 2032, 328, 13, 2398, 737, 198, 2, 10628, 362, 13, 15, 13, 1157, 198, 2, 198, 2, 2141, 407, 787, 2458, 284, 428, 2393, 4556, 345, 760, 644, 345, 389, 180...
2.399681
7,516
"""Tests for the AMP Renderer project."""
[ 37811, 51, 3558, 329, 262, 3001, 47, 28703, 11882, 1628, 526, 15931, 198 ]
3.230769
13
from pprint import pprint '''The module has class Grid for solving sudoku. Grid should be given as a list of integers or a path to a file. ''' # grid = [ [3, 0, 6, 5, 0, 8, 4, 0, 0], # [5, 2, 0, 0, 0, 0, 0, 0, 0], # [0, 8, 7, 0, 0, 0, 0, 3, 1], # [0, 0, 3, 0, 1, 0, 0, 8, 0], # [9, 0, 0, 8, 6, 3, 0, 0, 5], # [0, 5, 0, 0, 9, 0, 6, 0, 0], # [1, 3, 0, 0, 0, 0, 2, 5, 0], # [0, 0, 0, 0, 0, 0, 0, 7, 4], # [0, 0, 5, 2, 0, 6, 3, 0, 0] ] sudoku = Grid('grid_2.txt') sudoku.solve_sudoku(0, 0) sudoku.write_to_file()
[ 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 7061, 6, 464, 8265, 468, 1398, 24846, 329, 18120, 424, 67, 11601, 13, 198, 41339, 815, 307, 1813, 355, 257, 1351, 286, 37014, 393, 257, 3108, 284, 257, 2393, 13, 198, 7061, 6, 628, ...
1.659218
358
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. import pytest import logging import json import threading from utils import get_random_dict logger = logging.getLogger(__name__) logger.setLevel(level=logging.INFO) # TODO: add tests for various application properties # TODO: is there a way to call send_c2d so it arrives as an object rather than a JSON string?
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 11748, 12972, 9288, 198, 11748, 18931, 198, 117...
3.6875
128
# GPLv3 License # # Copyright (C) 2020 Ubisoft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. import unittest from bpy import data as D # noqa from bpy import types as T # noqa from mixer.blender_data.bpy_data_proxy import BpyDataProxy from mixer.blender_data.diff import BpyBlendDiff from mixer.blender_data.filter import test_properties
[ 2, 38644, 85, 18, 13789, 198, 2, 198, 2, 15069, 357, 34, 8, 12131, 34559, 198, 2, 198, 2, 770, 1430, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 2, 340, 739, 262, 2846, 286, 262, 22961, 3611, 5094,...
3.572519
262
#!/usr/bin/python # -*- coding: utf-8 -*- import math, sys import svgwrite # # http://www.w3.org/TR/SVG11/struct.html#UseElement # # For more information on tesselation / tiling see http://en.wikipedia.org/wiki/Wallpaper_group # The organization of these tilings are from the interesting book # Designing Testellations: The Secrets of Interlocking Patterns by Jinny Beyer. PROGNAME = sys.argv[0].rstrip('.py') if __name__ == '__main__': create_svg(PROGNAME + '.svg') # vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 textwidth=99
[ 2, 48443, 14629, 14, 8800, 14, 29412, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 11748, 10688, 11, 25064, 201, 198, 11748, 38487, 70, 13564, 201, 198, 201, 198, 2, 201, 198, 2, 2638, 1378, 2503, ...
2.62037
216
# Dependencies from bs4 import BeautifulSoup import requests import re import pandas as pd
[ 2, 37947, 3976, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 198, 11748, 302, 198, 11748, 19798, 292, 355, 279, 67, 628, 198 ]
3.444444
27
#!/usr/bin/env python import os import re import csv # with open(outxml, "r") as out: # t = out.read() # with open(outxml, "w") as out: # u = t.encode('latin1','xmlcharrefreplace').decode('utf8','xmlcharrefreplace') # u = u.decode("utf-8").replace(u"\u2022", "*").u.encode("utf-8") # out.write(u) fil()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 11748, 28686, 201, 198, 11748, 302, 201, 198, 11748, 269, 21370, 201, 198, 220, 220, 1303, 351, 1280, 7, 448, 19875, 11, 366, 81, 4943, 355, 503, 25, 201, 198, 220, 220, 220, ...
2.005587
179
import numpy as np from plots import plots_for_predictions as pp from utilss import distinct_colours as dc import matplotlib.pyplot as plt c = dc.get_distinct(4) path = '/Users/luisals/Documents/deep_halos_files/mass_range_13.4/random_20sims_200k/lr5e-5/' p1 = np.load(path + "seed_20/predicted_sim_6_epoch_09.npy") t1 = np.load(path + "seed_20/true_sim_6_epoch_09.npy") p_big = np.load("/Users/luisals/Projects/DLhalos/bigbox/raw/predicted_sim_L200_N1024_genetIC3_epoch_10.npy") t_big = np.load("/Users/luisals/Projects/DLhalos/bigbox/raw/true_sim_L200_N1024_genetIC3_epoch_10.npy") path_av = "/Users/luisals/Documents/deep_halos_files/mass_range_13.4/random_20sims_200k/averaged_boxes/log_alpha_-4.3/" p_av = np.load(path_av + "predicted_sim_6_epoch_32.npy") t_av = np.load(path_av + "true_sim_6_epoch_32.npy") p_av_big = np.load("/Users/luisals/Projects/DLhalos/bigbox/avg/predicted_sim_L200_N1024_genetIC3_epoch_18.npy") t_av_big = np.load("/Users/luisals/Projects/DLhalos/bigbox/avg/true_sim_L200_N1024_genetIC3_epoch_18.npy") # Raw-density case f1, a, m = pp.plot_histogram_predictions(p1, t1, radius_bins=False, particle_ids=None, errorbars=False, label=r"$L_\mathrm{box}=50 \, \mathrm{Mpc} \,/ \,h$", color="C0") f11, a1, m1 = pp.plot_histogram_predictions(p_big, t_big, radius_bins=False, particle_ids=None, errorbars=False, fig=f1, axes=a, color="C1", label=r"$L_\mathrm{box}=200 \, \mathrm{Mpc} \,/ \,h$") a1[0].set_ylabel(r"$n_{\mathrm{particles}}$", fontsize=16) [a.set_xlabel(r"$\log(M_{\mathrm{predicted}}/M_{\mathrm{true}})$", fontsize=16) for a in a1] plt.savefig("/Users/lls/Documents/Papers/dlhalos_paper/small_vs_large_box.pdf") # Averaged-density case f1, a, m = pp.plot_histogram_predictions(p_av, t_av, radius_bins=False, particle_ids=None, errorbars=False, label=r"$L_\mathrm{box}=50 \, \mathrm{Mpc} \,/ \,h$", color="C0") f11, a1, m1 = pp.plot_histogram_predictions(p_av_big, t_av_big, radius_bins=False, particle_ids=None, errorbars=False, fig=f1, axes=a, color="C1", label=r"$L_\mathrm{box}=200 \, \mathrm{Mpc} \,/ \,h$") a1[0].set_ylabel(r"$n_{\mathrm{particles}}$", fontsize=16) [a.set_xlabel(r"$\log(M_{\mathrm{predicted}}/M_{\mathrm{true}})$", fontsize=16) for a in a1] plt.savefig("/Users/luisals/Documents/Papers/dlhalos_paper/averaged_small_vs_large_box.pdf") # Averaged-density case f1, a, m = pp.plot_histogram_predictions(p_big, t_big, radius_bins=False, particle_ids=None, errorbars=False, label="Raw density", color="C0") f11, a1, m1 = pp.plot_histogram_predictions(p_av_big, t_av_big, radius_bins=False, particle_ids=None, errorbars=False, fig=f1, axes=a, color="C1", label="Averaged density") a1[0].set_ylabel(r"$n_{\mathrm{particles}}$", fontsize=16) [a.set_xlabel(r"$\log(M_{\mathrm{predicted}}/M_{\mathrm{true}})$", fontsize=16) for a in a1] plt.savefig("/Users/luisals/Documents/Papers/dlhalos_paper/raw_vs_averaged_large_box.pdf")
[ 11748, 299, 32152, 355, 45941, 198, 6738, 21528, 1330, 21528, 62, 1640, 62, 28764, 9278, 355, 9788, 198, 6738, 7736, 824, 1330, 7310, 62, 4033, 4662, 355, 30736, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, ...
1.99619
1,575
# -*- coding: utf-8 -*- REGIONS = {'USRI': 'Rhode Island', 'UY02': 'Canelones', 'KR21': 'Ulsan-gwangyoksi', 'KR20': 'Kyongsang-namdo', 'KM02': 'Grande Comore', 'KM03': 'Moheli', 'CO22': 'Putumayo', 'BN18': 'Zou', 'BN17': 'Plateau', 'BN16': 'Oueme', 'BN15': 'Tutong', 'BN14': 'Littoral', 'BN13': 'Donga', 'BN12': 'Kouffo', 'BN11': 'Collines', 'BN10': 'Temburong', 'KP09': 'Kangwon-do', 'KP08': 'Kaesong-si', 'KP07': 'Hwanghae-bukto', 'KP06': 'Hwanghae-namdo', 'KP01': 'Chagang-do', 'KP03': 'Hamgyong-namdo', 'IS40': 'Norourland Eystra', 'CO28': 'Tolima', 'TH77': 'Amnat Charoen', 'CO29': 'Valle del Cauca', 'TH76': 'Udon Thani', 'IS44': 'Vestfiroir', 'IS45': 'Vesturland', 'MK80': 'Plasnica', 'MK81': 'Podares', 'MK82': 'Prilep', 'MK83': 'Probistip', 'MK84': 'Radovis', 'MK85': 'Rankovce', 'MK86': 'Resen', 'MK87': 'Rosoman', 'MK88': 'Rostusa', 'MK89': 'Samokov', 'NG23': 'Kaduna', 'NG22': 'Cross River', 'SZ05': 'Praslin', 'SZ04': 'Shiselweni', 'SZ03': 'Manzini', 'SZ02': 'Lubombo', 'SZ01': 'Hhohho', 'NG26': 'Benue', 'BG41': 'Gabrovo', 'BG40': 'Dobrich', 'BG43': 'Khaskovo', 'BG42': 'Grad Sofiya', 'BG45': 'Kyustendil', 'BG44': 'Kurdzhali', 'BG47': 'Montana', 'BG46': 'Lovech', 'BG49': 'Pernik', 'BG48': 'Pazardzhik', 'NG24': 'Katsina', 'DO19': 'Salcedo', 'KH18': 'Svay Rieng', 'KH19': 'Takeo', 'KH12': 'Pursat', 'KH13': 'Preah Vihear', 'KH10': 'Mondulkiri', 'KH11': 'Phnum Penh', 'KH16': 'Siem Reap', 'KH17': 'Stung Treng', 'KH14': 'Prey Veng', 'KH15': 'Ratanakiri Kiri', 'GN15': 'Kerouane', 'GN16': 'Kindia', 'GN17': 'Kissidougou', 'GN10': 'Forecariah', 'GN11': 'Fria', 'GN12': 'Gaoual', 'GN13': 'Gueckedou', 'GN18': 'Koundara', 'GN19': 'Kouroussa', 'GBR1': 'Ballymoney', 'GBR3': 'Belfast', 'GBR2': 'Banbridge', 'GBR5': 'Castlereagh', 'GBR4': 'Carrickfergus', 'GBR7': 'Cookstown', 'GBR6': 'Coleraine', 'GBR9': 'Down', 'GBR8': 'Craigavon', 'CZ87': 'Plzensky kraj', 'CZ86': 'Pardubicky kraj', 'CZ85': 'Moravskoslezsky kraj', 'CZ84': 'Olomoucky kraj', 'CZ83': 'Liberecky kraj', 'CZ82': 'Kralovehradecky kraj', 'CZ81': 'Karlovarsky kraj', 'CZ80': 'Vysocina', 'CZ89': 'Ustecky kraj', 'CZ88': 'Stredocesky kraj', 'MD87': 'Soroca', 'MD86': 'Soldanesti', 'MD85': 'Singerei', 'MD84': 'Riscani', 'MD83': 'Rezina', 'MD81': 'Ocnita', 'MD80': 'Nisporeni', 'VN55': 'Binh Thuan', 'MD89': 'Straseni', 'MD88': 'Stefan-Voda', 'CN09': 'Henan', 'CN08': 'Heilongjiang', 'CN03': 'Jiangxi', 'CN02': 'Zhejiang', 'CN01': 'Anhui', 'CN07': 'Fujian', 'CN06': 'Qinghai', 'CN05': 'Jilin', 'CN04': 'Jiangsu', 'DE04': 'Hamburg', 'VN50': 'Vinh Phu', 'PE09': 'Huancavelica', 'PE08': 'Cusco', 'PE01': 'Amazonas', 'PE03': 'Apurimac', 'PE02': 'Ancash', 'PE05': 'Ayacucho', 'PE04': 'Arequipa', 'PE07': 'Callao', 'PE06': 'Cajamarca', 'AE02': 'Ajman', 'DE08': 'Rheinland-Pfalz', 'AE01': 'Abu Dhabi', 'AE06': 'Sharjah', 'AE07': 'Umm Al Quwain', 'GY19': 'Upper Takutu-Upper Essequibo', 'GY18': 'Upper Demerara-Berbice', 'AE04': 'Fujairah', 'AF08': 'Ghazni', 'GY13': 'East Berbice-Corentyne', 'GY12': 'Demerara-Mahaica', 'GY11': 'Cuyuni-Mazaruni', 'GY10': 'Barima-Waini', 'GY17': 'Potaro-Siparuni', 'GY16': 'Pomeroon-Supenaam', 'GY15': 'Mahaica-Berbice', 'GY14': 'Essequibo Islands-West Demerara', 'BI10': 'Bururi', 'BI11': 'Cankuzo', 'BI12': 'Cibitoke', 'BI13': 'Gitega', 'BI14': 'Karuzi', 'BI15': 'Kayanza', 'BI16': 'Kirundo', 'BI17': 'Makamba', 'BI18': 'Muyinga', 'BI19': 'Ngozi', 'IE02': 'Cavan', 'USSC': 'South Carolina', 'AF02': 'Badghis', 'USSD': 'South Dakota', 'IE06': 'Donegal', 'IE04': 'Cork', 'MK93': 'Sopotnica', 'MK92': 'Sopiste', 'MK91': 'Sipkovica', 'MK90': 'Saraj', 'MK97': 'Staro Nagoricane', 'MK96': 'Star Dojran', 'MK95': 'Staravina', 'MK94': 'Srbinovo', 'MK99': 'Struga', 'MK98': 'Stip', 'CD01': 'Bandundu', 'KG01': 'Bishkek', 'CD05': 'Katanga', 'CD04': 'Kasai-Oriental', 'CD06': 'Kinshasa', 'SD32': 'Bahr al Ghazal', 'LB02': 'Al Janub', 'LB03': 'Liban-Nord', 'LB01': 'Beqaa', 'LB06': 'Liban-Sud', 'LB07': 'Nabatiye', 'LB04': 'Beyrouth', 'LB05': 'Mont-Liban', 'LB08': 'Beqaa', 'LB09': 'Liban-Nord', 'KH05': 'Kampong Thum', 'KH04': 'Kampong Speu', 'KH07': 'Kandal', 'KH06': 'Kampot', 'KH01': 'Batdambang', 'KH03': 'Kampong Chhnang', 'KH02': 'Kampong Cham', 'KH09': 'Kracheh', 'KH08': 'Koh Kong', 'PT02': 'Aveiro', 'PT03': 'Beja', 'PT04': 'Braga', 'PT05': 'Braganca', 'PT06': 'Castelo Branco', 'PT07': 'Coimbra', 'PT08': 'Evora', 'PT09': 'Faro', 'GN07': 'Dinguiraye', 'GN06': 'Dalaba', 'GN05': 'Dabola', 'GN04': 'Conakry', 'GN03': 'Boke', 'GN02': 'Boffa', 'GN01': 'Beyla', 'GN09': 'Faranah', 'SI17': 'Crnomelj', 'SI16': 'Crna na Koroskem', 'SK06': 'Trencin', 'SK07': 'Trnava', 'SK04': 'Nitra', 'SK05': 'Presov', 'SK02': 'Bratislava', 'SK03': 'Kosice', 'SK01': 'Banska Bystrica', 'SK08': 'Zilina', 'GBW5': 'South Lanarkshire', 'MX27': 'Tabasco', 'CN32': 'Sichuan', 'CN33': 'Chongqing', 'CN30': 'Guangdong', 'CN31': 'Hainan', 'BH17': 'Al Janubiyah', 'VE18': 'Portuguesa', 'VE19': 'Sucre', 'VE11': 'Falcon', 'VE12': 'Guarico', 'VE13': 'Lara', 'VE14': 'Merida', 'VE15': 'Miranda', 'VE16': 'Monagas', 'VE17': 'Nueva Esparta', 'BH16': 'Al Asimah', 'NE07': 'Zinder', 'MX10': 'Durango', 'MX11': 'Guanajuato', 'MX12': 'Guerrero', 'MX13': 'Hidalgo', 'MX14': 'Jalisco', 'MX15': 'Mexico', 'MX16': 'Michoacan de Ocampo', 'MX17': 'Morelos', 'MX18': 'Nayarit', 'MX19': 'Nuevo Leon', 'DZ55': 'Tipaza', 'BI02': 'Bujumbura', 'BI09': 'Bubanza', 'CV10': 'Sao Nicolau', 'CV11': 'Sao Vicente', 'CV13': 'Mosteiros', 'CV14': 'Praia', 'CV15': 'Santa Catarina', 'CV16': 'Santa Cruz', 'CV17': 'Sao Domingos', 'CV18': 'Sao Filipe', 'CV19': 'Sao Miguel', 'PHB8': 'Cotabato', 'PHB9': 'Dagupan', 'PHB3': 'Calbayog', 'ER01': 'Anseba', 'ER03': "Debubawi K'eyih Bahri", 'ER02': 'Debub', 'ER05': "Ma'akel", 'ER04': 'Gash Barka', 'ER06': "Semenawi K'eyih Bahri", 'NE08': 'Niamey', 'TH80': 'Sa Kaeo', 'PHB5': 'Canlaon', 'TD08': 'Logone Occidental', 'TD09': 'Logone Oriental', 'TD04': 'Chari-Baguirmi', 'TD05': 'Guera', 'TD06': 'Kanem', 'TD07': 'Lac', 'TD01': 'Batha', 'TD02': 'Biltine', 'TD03': 'Borkou-Ennedi-Tibesti', 'LB11': 'Baalbek-Hermel', 'LB10': 'Aakk', 'PT13': 'Leiria', 'PT11': 'Guarda', 'PT10': 'Madeira', 'PT17': 'Porto', 'PT16': 'Portalegre', 'PT14': 'Lisboa', 'PT19': 'Setubal', 'PT18': 'Santarem', 'GN32': 'Kankan', 'GN33': 'Koubia', 'GN30': 'Coyah', 'GN31': 'Dubreka', 'GN36': 'Lola', 'GN37': 'Mandiana', 'GN34': 'Labe', 'GN35': 'Lelouma', 'GN38': 'Nzerekore', 'GN39': 'Siguiri', 'MW22': 'Salima', 'ES56': 'Catalonia', 'ES55': 'Castilla y Leon', 'JM14': 'Saint Thomas', 'ES54': 'Castilla-La Mancha', 'JP47': 'Okinawa', 'MW26': 'Balaka', 'JM16': 'Westmoreland', 'ES52': 'Aragon', 'CN21': 'Ningxia', 'CN20': 'Nei Mongol', 'CN23': 'Shanghai', 'CN22': 'Beijing', 'CN25': 'Shandong', 'CN24': 'Shanxi', 'CN26': 'Shaanxi', 'CN29': 'Yunnan', 'CN28': 'Tianjin', 'JM11': 'Saint Elizabeth', 'LT59': 'Marijampoles Apskritis', 'LT58': 'Klaipedos Apskritis', 'JM12': 'Saint James', 'VE03': 'Apure', 'VE02': 'Anzoategui', 'VE01': 'Amazonas', 'JP41': 'Tottori', 'LT57': 'Kauno Apskritis', 'LT56': 'Alytaus Apskritis', 'VE05': 'Barinas', 'VE04': 'Aragua', 'FRB2': 'Lorraine', 'FRB1': 'Limousin', 'VN54': 'Binh Dinh', 'FRB6': 'Picardie', 'FRB7': 'Poitou-Charentes', 'EC08': 'El Oro', 'EC09': 'Esmeraldas', 'FRB4': 'Nord-Pas-de-Calais', 'EC01': 'Galapagos', 'EC02': 'Azuay', 'EC03': 'Bolivar', 'EC04': 'Canar', 'EC05': 'Carchi', 'EC06': 'Chimborazo', 'EC07': 'Cotopaxi', 'MX03': 'Baja California Sur', 'MX02': 'Baja California', 'MX01': 'Aguascalientes', 'MX07': 'Coahuila de Zaragoza', 'MX06': 'Chihuahua', 'MX05': 'Chiapas', 'MX04': 'Campeche', 'CAPE': 'Prince Edward Island', 'MX09': 'Distrito Federal', 'MX08': 'Colima', 'SI66': 'Loski Potok', 'SI64': 'Logatec', 'ZM07': 'Southern', 'ZM06': 'North-Western', 'SI62': 'Ljubno', 'ZM05': 'Northern', 'PA06': 'Herrera', 'PA01': 'Bocas del Toro', 'UG90': 'Mukono', 'CV02': 'Brava', 'CV01': 'Boa Vista', 'KY08': 'Western', 'ZM01': 'Western', 'CV05': 'Paul', 'CV04': 'Maio', 'KY04': 'South Town', 'KY05': 'Spot Bay', 'KY06': 'Stake Bay', 'CV08': 'Sal', 'KY01': 'Creek', 'KY02': 'Eastern', 'KY03': 'Midland', 'US44': 'Rhode Island', 'MZ03': 'Inhambane', 'US47': 'Tennessee', 'US40': 'Oklahoma', 'US41': 'Oregon', 'US42': 'Pennsylvania', 'IQ08': 'Dahuk', 'IQ09': 'Dhi Qar', 'IQ06': 'Babil', 'IQ07': 'Baghdad', 'IQ04': 'Al Qadisiyah', 'IQ05': 'As Sulaymaniyah', 'IQ02': 'Al Basrah', 'LA14': 'Xiangkhoang', 'IQ01': 'Al Anbar', 'TD14': 'Tandjile', 'TD13': 'Salamat', 'TD12': 'Ouaddai', 'TD11': 'Moyen-Chari', 'TD10': 'Mayo-Kebbi', 'GT22': 'Zacapa', 'GT21': 'Totonicapan', 'GT20': 'Suchitepequez', 'GBA8': 'Blackburn with Darwen', 'GBA9': 'Blackpool', 'PT22': 'Viseu', 'PT23': 'Azores', 'PT20': 'Viana do Castelo', 'PT21': 'Vila Real', 'GN29': 'Yomou', 'GN28': 'Tougue', 'EE10': 'Parnu', 'GN25': 'Pita', 'GN27': 'Telimele', 'GN21': 'Macenta', 'GBA2': 'Barnet', 'GN23': 'Mamou', 'GN22': 'Mali', 'GR47': 'Dhodhekanisos', 'GBA3': 'Barnsley', 'GR46': 'Lasithi', 'GBA4': 'Bath and North East Somerset', 'GBA5': 'Bedfordshire', 'GR44': 'Rethimni', 'GBA6': 'Bexley', 'GBA7': 'Birmingham', 'AD08': 'Escaldes-Engordany', 'AD03': 'Encamp', 'AD02': 'Canillo', 'AD07': 'Andorra la Vella', 'AD06': 'Sant Julia de Loria', 'AD05': 'Ordino', 'AD04': 'La Massana', 'CG08': 'Plateaux', 'LY57': 'Gharyan', 'CG01': 'Bouenza', 'CG06': 'Likouala', 'CG07': 'Niari', 'CG04': 'Kouilou', 'CG05': 'Lekoumou', 'VN44': 'Dac Lac', 'VN45': 'Dong Nai', 'LT64': 'Utenos Apskritis', 'LT65': 'Vilniaus Apskritis', 'LT62': 'Taurages Apskritis', 'LT63': 'Telsiu Apskritis', 'LT60': 'Panevezio Apskritis', 'LT61': 'Siauliu Apskritis', 'VN49': 'Song Be', 'JP28': 'Nara', 'JP29': 'Niigata', 'JP24': 'Miyagi', 'JP25': 'Miyazaki', 'JP26': 'Nagano', 'JP27': 'Nagasaki', 'JP20': 'Kochi', 'JP21': 'Kumamoto', 'JP22': 'Kyoto', 'JP23': 'Mie', 'EC19': 'Tungurahua', 'EC18': 'Pichincha', 'EC13': 'Los Rios', 'EC12': 'Loja', 'EC11': 'Imbabura', 'EC10': 'Guayas', 'EC17': 'Pastaza', 'EC15': 'Morona-Santiago', 'EC14': 'Manabi', 'SI04': 'Bohinj', 'SI05': 'Borovnica', 'SI06': 'Bovec', 'SI07': 'Brda', 'SI01': 'Ajdovscina', 'SI02': 'Beltinci', 'SI03': 'Bled', 'MX32': 'Zacatecas', 'SI09': 'Brezovica', 'MX30': 'Veracruz-Llave', 'MX31': 'Yucatan', 'DO18': 'Puerto Plata', 'PHA9': 'Cabanatuan', 'PHA8': 'Butuan', 'PHA7': 'Batangas City', 'PHA6': 'Basilan City', 'PHA5': 'Bais', 'PHA4': 'Baguio', 'PHA3': 'Bago', 'PHA2': 'Bacolod', 'PHA1': 'Angeles', 'JP42': 'Toyama', 'BI21': 'Ruyigi', 'BI20': 'Rutana', 'BI23': 'Mwaro', 'BI22': 'Muramvya', 'PA10': 'Veraguas', 'MZ10': 'Manica', 'MZ11': 'Maputo', 'IQ18': 'Salah ad Din', 'PH29': 'Ilocos Sur', 'IQ11': 'Arbil', 'IQ10': 'Diyala', 'IQ13': "At Ta'mim", 'IQ12': "Karbala'", 'IQ15': 'Ninawa', 'IQ14': 'Maysan', 'IQ17': 'An Najaf', 'IQ16': 'Wasit', 'TJ02': 'Khatlon', 'TJ03': 'Sughd', 'TJ01': 'Kuhistoni Badakhshon', 'GT12': 'Peten', 'GT13': 'Quetzaltenango', 'GT10': 'Jalapa', 'GT11': 'Jutiapa', 'GT16': 'Sacatepequez', 'GT17': 'San Marcos', 'GT14': 'Quiche', 'GT15': 'Retalhuleu', 'GT18': 'Santa Rosa', 'GT19': 'Solola', 'PSWE': 'West Bank', 'PY23': 'Alto Paraguay', 'PY21': 'Nueva Asuncion', 'PY20': 'Chaco', 'QA06': 'Ar Rayyan', 'QA04': 'Al Khawr', 'QA05': 'Al Wakrah Municipality', 'QA02': 'Al Ghuwariyah', 'QA03': 'Al Jumaliyah', 'QA01': 'Ad Dawhah', 'QA08': 'Madinat ach Shamal', 'QA09': 'Umm Salal', 'GBU5': 'East Dunbartonshire', 'UY03': 'Cerro Largo', 'UY01': 'Artigas', 'UY06': 'Flores', 'UY07': 'Florida', 'UY04': 'Colonia', 'UY05': 'Durazno', 'UY08': 'Lavalleja', 'UY09': 'Maldonado', 'CH10': 'Inner-Rhoden', 'GBU6': 'East Lothian', 'CH11': 'Luzern', 'CG14': 'Cuvette-Ouest', 'CG11': 'Pool', 'CG10': 'Sangha', 'CG13': 'Cuvette', 'CG12': 'Brazzaville', 'UA24': "Volyns'ka Oblast'", 'UA25': "Zakarpats'ka Oblast'", 'UA26': "Zaporiz'ka Oblast'", 'UA27': "Zhytomyrs'ka Oblast'", 'UA20': "Sevastopol'", 'UA21': "Sums'ka Oblast'", 'UA22': "Ternopil's'ka Oblast'", 'UA23': "Vinnyts'ka Oblast'", 'IT20': 'Veneto', 'US11': 'District of Columbia', 'VE21': 'Trujillo', 'VE20': 'Tachira', 'VE23': 'Zulia', 'VE22': 'Yaracuy', 'VE25': 'Distrito Federal', 'VN52': 'Ho Chi Minh', 'VN51': 'Ha Noi', 'VE26': 'Vargas', 'VN59': 'Ha Tay', 'VN58': 'Ha Giang', 'LY62': 'Yafran', 'JP39': 'Tokushima', 'JP38': 'Tochigi', 'JP37': 'Shizuoka', 'JP36': 'Shimane', 'JP35': 'Shiga', 'JP34': 'Saitama', 'JP33': 'Saga', 'JP32': 'Osaka', 'JP31': 'Okayama', 'JP30': 'Oita', 'MX29': 'Tlaxcala', 'MX28': 'Tamaulipas', 'SI15': 'Crensovci', 'SI14': 'Cerkno', 'SI13': 'Cerknica', 'SI12': 'Cerklje na Gorenjskem', 'SI11': 'Celje', 'MX21': 'Puebla', 'MX20': 'Oaxaca', 'MX23': 'Quintana Roo', 'MX22': 'Queretaro de Arteaga', 'MX25': 'Sinaloa', 'MX24': 'San Luis Potosi', 'SI19': 'Divaca', 'MX26': 'Sonora', 'LY60': 'Surt', 'MD61': 'Basarabeasca', 'MD60': 'Balti', 'MD63': 'Briceni', 'KN10': 'Saint Paul Charlestown', 'KN11': 'Saint Peter Basseterre', 'KN12': 'Saint Thomas Lowland', 'MD62': 'Bender', 'KN15': 'Trinity Palmetto Point', 'PHB2': 'Cagayan de Oro', 'MD65': 'Cantemir', 'PHB1': 'Cadiz', 'PHB6': 'Cavite City', 'PHB7': 'Cebu City', 'PHB4': 'Caloocan', 'MD64': 'Cahul', 'CI75': 'Bafing', 'CI74': 'Agneby', 'CI77': 'Denguele', 'CI76': 'Bas-Sassandra', 'CI79': 'Fromager', 'CI78': 'Dix-Huit Montagnes', 'FRB5': 'Pays de la Loire', 'EC24': 'Orellana', 'EC22': 'Sucumbios', 'EC23': 'Napo', 'EC20': 'Zamora-Chinchipe', 'CV20': 'Tarrafal', 'KW02': 'Al Kuwayt', 'KW01': 'Al Ahmadi', 'KW07': 'Al Farwaniyah', 'KW05': 'Al Jahra', 'CH19': 'Thurgau', 'KW08': 'Hawalli', 'KW09': 'Mubarak al Kabir', 'PA09': 'San Blas', 'PA08': 'Panama', 'ZM09': 'Lusaka', 'ZM08': 'Copperbelt', 'PA05': 'Darien', 'PA04': 'Colon', 'PA07': 'Los Santos', 'ZM04': 'Luapula', 'ZM03': 'Eastern', 'ZM02': 'Central', 'PA03': 'Cocle', 'PA02': 'Chiriqui', 'MZ01': 'Cabo Delgado', 'US45': 'South Carolina', 'US46': 'South Dakota', 'MZ02': 'Gaza', 'MZ05': 'Sofala', 'MZ04': 'Maputo', 'MZ07': 'Niassa', 'MZ06': 'Nampula', 'MZ09': 'Zambezia', 'MZ08': 'Tete', 'US48': 'Texas', 'US49': 'Utah', 'GD05': 'Saint Mark', 'GD04': 'Saint John', 'GD06': 'Saint Patrick', 'GD01': 'Saint Andrew', 'GD03': 'Saint George', 'GD02': 'Saint David', 'IS09': 'Eyjafjardarsysla', 'IS05': 'Austur-Hunavatnssysla', 'IS06': 'Austur-Skaftafellssysla', 'IS07': 'Borgarfjardarsysla', 'IS03': 'Arnessysla', 'AU02': 'New South Wales', 'AU03': 'Northern Territory', 'AU01': 'Australian Capital Territory', 'AU06': 'Tasmania', 'AU07': 'Victoria', 'AU04': 'Queensland', 'AU05': 'South Australia', 'AU08': 'Western Australia', 'BO09': 'Tarija', 'BM10': 'Southampton', 'BM11': 'Warwick', 'GT09': 'Izabal', 'GT08': 'Huehuetenango', 'GT05': 'El Progreso', 'GT04': 'Chiquimula', 'GT07': 'Guatemala', 'GT06': 'Escuintla', 'GT01': 'Alta Verapaz', 'GT03': 'Chimaltenango', 'GT02': 'Baja Verapaz', 'PY19': 'Canindeyu', 'PY12': 'Misiones', 'PY13': 'Neembucu', 'PY10': 'Guaira', 'PY11': 'Itapua', 'PY16': 'Presidente Hayes', 'PY17': 'San Pedro', 'PY15': 'Paraguari', 'QA11': 'Jariyan al Batnah', 'QA10': 'Al Wakrah', 'QA12': "Umm Sa'id", 'AF41': 'Daykondi', 'AF40': 'Parvan', 'AF42': 'Panjshir', 'GBY1': 'Flintshire', 'GBY2': 'Gwynedd', 'GBY3': 'Merthyr Tydfil', 'GBY4': 'Monmouthshire', 'GBY5': 'Neath Port Talbot', 'GBY6': 'Newport', 'GBY7': 'Pembrokeshire', 'GBY8': 'Powys', 'GBY9': 'Rhondda Cynon Taff', 'UY19': 'Treinta y Tres', 'UY18': 'Tacuarembo', 'UY15': 'Salto', 'UY14': 'Rocha', 'UY17': 'Soriano', 'UY16': 'San Jose', 'UY11': 'Paysandu', 'UY10': 'Montevideo', 'UY13': 'Rivera', 'UY12': 'Rio Negro', 'CL16': 'Arica y Parinacota', 'CL17': 'Los Rios', 'CL14': 'Los Lagos', 'CL15': 'Tarapaca', 'SN14': 'Saint-Louis', 'SN15': 'Matam', 'CL10': 'Magallanes y de la Antartica Chilena', 'CL11': 'Maule', 'BZ01': 'Belize', 'BZ02': 'Cayo', 'BZ03': 'Corozal', 'BZ04': 'Orange Walk', 'BZ05': 'Stann Creek', 'BZ06': 'Toledo', 'CASK': 'Saskatchewan', 'RU87': 'Yamal-Nenets', 'RU86': 'Voronezh', 'RU85': 'Vologda', 'RU84': 'Volgograd', 'RU83': 'Vladimir', 'VN67': 'Ninh Binh', 'VN64': 'Quang Tri', 'VN65': 'Nam Ha', 'VN68': 'Ninh Thuan', 'VN69': 'Phu Yen', 'RU89': 'Yevrey', 'RU88': "Yaroslavl'", 'JP08': 'Fukushima', 'JP09': 'Gifu', 'JP02': 'Akita', 'JP03': 'Aomori', 'JP01': 'Aichi', 'JP06': 'Fukui', 'JP07': 'Fukuoka', 'JP04': 'Chiba', 'JP05': 'Ehime', 'SI22': 'Dol pri Ljubljani', 'SI20': 'Dobrepolje', 'SI26': 'Duplek', 'SI27': 'Gorenja Vas-Poljane', 'SI24': 'Dornava', 'SI25': 'Dravograd', 'SI28': 'Gorisnica', 'SI29': 'Gornja Radgona', 'GBE4': 'Essex', 'GBE5': 'Gateshead', 'GBE6': 'Gloucestershire', 'GBE7': 'Greenwich', 'GBE1': 'East Riding of Yorkshire', 'GBE2': 'East Sussex', 'GBE3': 'Enfield', 'GBE8': 'Hackney', 'GBE9': 'Halton', 'KN03': 'Saint George Basseterre', 'KN02': 'Saint Anne Sandy Point', 'KN01': 'Christ Church Nichola Town', 'KN07': 'Saint John Figtree', 'KN06': 'Saint John Capisterre', 'KN05': 'Saint James Windward', 'KN04': 'Saint George Gingerland', 'KN09': 'Saint Paul Capisterre', 'KN08': 'Saint Mary Cayon', 'CI88': 'Sud-Bandama', 'CI89': 'Sud-Comoe', 'CI84': 'Moyen-Cavally', 'CI85': 'Moyen-Comoe', 'CI86': "N'zi-Comoe", 'CI87': 'Savanes', 'CI80': 'Haut-Sassandra', 'CI81': 'Lacs', 'CI82': 'Lagunes', 'CI83': 'Marahoue', 'NG16': 'Ogun', 'AZ18': 'Fuzuli', 'AZ19': 'Gadabay', 'NG11': 'Federal Capital Territory', 'US56': 'Wyoming', 'US55': 'Wisconsin', 'US54': 'West Virginia', 'US53': 'Washington', 'US51': 'Virginia', 'US50': 'Vermont', 'PHC5': 'Dumaguete', 'PHC4': 'Dipolog', 'PHC7': 'Gingoog', 'PHC6': 'General Santos', 'PHC1': 'Danao', 'PHC3': 'Davao City', 'PHC2': 'Dapitan', 'CO38': 'Magdalena', 'PHC9': 'Iloilo City', 'SN12': 'Ziguinchor', 'SN13': 'Louga', 'TH48': 'Chanthaburi', 'TH49': 'Trat', 'TH44': 'Chachoengsao', 'TH45': 'Prachin Buri', 'IS15': 'Kjosarsysla', 'TH47': 'Rayong', 'TH40': 'Krung Thep', 'TH41': 'Phayao', 'TH42': 'Samut Prakan', 'IS10': 'Gullbringusysla', 'BM07': "Saint George's", 'BM06': 'Saint George', 'BM05': 'Pembroke', 'BM04': 'Paget', 'BM03': 'Hamilton', 'BM02': 'Hamilton', 'BM01': 'Devonshire', 'BM09': 'Smiths', 'BM08': 'Sandys', 'SIK5': 'Preddvor', 'USDC': 'District of Columbia', 'PY05': 'Caazapa', 'PY04': 'Caaguazu', 'PY07': 'Concepcion', 'PY06': 'Central', 'PY01': 'Alto Parana', 'PY03': 'Boqueron', 'PY02': 'Amambay', 'PY08': 'Cordillera', 'AF30': 'Balkh', 'AF31': 'Jowzjan', 'AF32': 'Samangan', 'AF33': 'Sar-e Pol', 'AF34': 'Konar', 'AF35': 'Laghman', 'AF36': 'Paktia', 'AF37': 'Khowst', 'AF38': 'Nurestan', 'AF39': 'Oruzgan', 'GBX3': 'Bridgend', 'GBX2': 'Blaenau Gwent', 'GBX1': 'Isle of Anglesey', 'ML10': 'Kidal', 'GBX6': 'Ceredigion', 'GBX5': 'Cardiff', 'GBX4': 'Caerphilly', 'GBX9': 'Denbighshire', 'GBX8': 'Conwy', 'AM08': "Syunik'", 'AM09': 'Tavush', 'AM02': 'Ararat', 'AM03': 'Armavir', 'AM01': 'Aragatsotn', 'AM06': 'Lorri', 'AM07': 'Shirak', 'AM04': "Geghark'unik'", 'AM05': "Kotayk'", 'CL09': 'Los Lagos', 'CL08': "Libertador General Bernardo O'Higgins", 'SN09': 'Fatick', 'SN03': 'Diourbel', 'SN01': 'Dakar', 'CL02': 'Aisen del General Carlos Ibanez del Campo', 'SN07': 'Thies', 'CL04': 'Araucania', 'SN05': 'Tambacounda', 'CL06': 'Bio-Bio', 'SN10': 'Kaolack', 'UA08': "Khersons'ka Oblast'", 'UA09': "Khmel'nyts'ka Oblast'", 'USMN': 'Minnesota', 'UA02': "Chernihivs'ka Oblast'", 'UA03': "Chernivets'ka Oblast'", 'UA01': "Cherkas'ka Oblast'", 'UA06': "Ivano-Frankivs'ka Oblast'", 'UA07': "Kharkivs'ka Oblast'", 'UA04': "Dnipropetrovs'ka Oblast'", 'UA05': "Donets'ka Oblast'", 'SN11': 'Kolda', 'VN62': 'Khanh Hoa', 'VN79': 'Hai Duong', 'VN78': 'Da Nang', 'VN63': 'Kon Tum', 'VN75': 'Tra Vinh', 'VN74': 'Thua Thien', 'VN77': 'Vinh Long', 'VN76': 'Tuyen Quang', 'VN71': 'Quang Ngai', 'VN60': 'Ha Tinh', 'VN73': 'Soc Trang', 'VN72': 'Quang Tri', 'VN61': 'Hoa Binh', 'VN66': 'Nghe An', 'RU82': 'Ust-Orda Buryat', 'JP15': 'Ishikawa', 'JP14': 'Ibaraki', 'JP17': 'Kagawa', 'JP16': 'Iwate', 'JP11': 'Hiroshima', 'RU81': "Ul'yanovsk", 'JP13': 'Hyogo', 'JP12': 'Hokkaido', 'IL03': 'HaZafon', 'IL02': 'HaMerkaz', 'IL01': 'HaDarom', 'RU80': 'Udmurt', 'JP19': 'Kanagawa', 'JP18': 'Kagoshima', 'IL05': 'Tel Aviv', 'IL04': 'Hefa', 'SI39': 'Ivancna Gorica', 'SI38': 'Ilirska Bistrica', 'SI35': 'Hrpelje-Kozina', 'SI34': 'Hrastnik', 'SI37': 'Ig', 'SI36': 'Idrija', 'SI31': 'Gornji Petrovci', 'SI30': 'Gornji Grad', 'SI32': 'Grosuplje', 'EE20': 'Viljandimaa', 'GBD6': 'Dorset', 'GBD5': 'Doncaster', 'GBD4': 'Devon', 'GBD3': 'Derbyshire', 'GBD2': 'Derby', 'GBD1': 'Darlington', 'GBD9': 'Ealing', 'GBD8': 'Durham', 'BR01': 'Acre', 'BR02': 'Alagoas', 'BR03': 'Amapa', 'BR04': 'Amazonas', 'BR05': 'Bahia', 'BR06': 'Ceara', 'BR07': 'Distrito Federal', 'BR08': 'Espirito Santo', 'CI92': 'Zanzan', 'CI91': 'Worodougou', 'CI90': 'Vallee du Bandama', 'PK03': 'North-West Frontier', 'PK02': 'Balochistan', 'IT10': 'Marche', 'IT11': 'Molise', 'IT12': 'Piemonte', 'IT13': 'Puglia', 'IT14': 'Sardegna', 'IT15': 'Sicilia', 'IT16': 'Toscana', 'IT17': 'Trentino-Alto Adige', 'IT18': 'Umbria', 'IT19': "Valle d'Aosta", 'PHD1': 'Iriga', 'PHD2': 'La Carlota', 'PHD3': 'Laoag', 'PHD4': 'Lapu-Lapu', 'PHD5': 'Legaspi', 'PHD6': 'Lipa', 'PHD7': 'Lucena', 'PHD8': 'Mandaue', 'PHD9': 'Manila', 'PK08': 'Islamabad', 'BB01': 'Christ Church', 'IS28': 'Skagafjardarsysla', 'IS29': 'Snafellsnes- og Hnappadalssysla', 'BB04': 'Saint James', 'BB05': 'Saint John', 'TH59': 'Ranong', 'TH58': 'Chumphon', 'TH57': 'Prachuap Khiri Khan', 'IS23': 'Rangarvallasysla', 'TH55': 'Samut Sakhon', 'TH54': 'Samut Songkhram', 'TH53': 'Nakhon Pathom', 'TH52': 'Ratchaburi', 'TH51': 'Suphan Buri', 'TH50': 'Kanchanaburi', 'BT20': 'Thimphu', 'BT21': 'Tongsa', 'BT22': 'Wangdi Phodrang', 'CR07': 'Puntarenas', 'CR06': 'Limon', 'CR04': 'Heredia', 'CR03': 'Guanacaste', 'CR02': 'Cartago', 'CR01': 'Alajuela', 'CR08': 'San Jose', 'HN02': 'Choluteca', 'HN03': 'Colon', 'HN01': 'Atlantida', 'HN06': 'Cortes', 'HN07': 'El Paraiso', 'HN04': 'Comayagua', 'HN05': 'Copan', 'HN08': 'Francisco Morazan', 'HN09': 'Gracias a Dios', 'GL01': 'Nordgronland', 'GL03': 'Vestgronland', 'GL02': 'Ostgronland', 'ET50': 'Hareri Hizb', 'ET51': 'Oromiya', 'ET52': 'Sumale', 'ET53': 'Tigray', 'ET54': 'YeDebub Biheroch Bihereseboch na Hizboch', 'AF23': 'Kandahar', 'AF27': 'Vardak', 'IE29': 'Westmeath', 'AF24': 'Kondoz', 'IE24': 'Roscommon', 'IE25': 'Sligo', 'IE26': 'Tipperary', 'IE27': 'Waterford', 'IE20': 'Mayo', 'IE21': 'Meath', 'IE22': 'Monaghan', 'IE23': 'Offaly', 'ML07': 'Koulikoro', 'ML06': 'Sikasso', 'ML05': 'Segou', 'ML04': 'Mopti', 'ML03': 'Kayes', 'AM10': "Vayots' Dzor", 'ML01': 'Bamako', 'ML09': 'Gao', 'ML08': 'Tombouctou', 'UA15': "L'vivs'ka Oblast'", 'UA14': "Luhans'ka Oblast'", 'UA17': "Odes'ka Oblast'", 'UA16': "Mykolayivs'ka Oblast'", 'UA11': 'Krym', 'UA10': "Kirovohrads'ka Oblast'", 'UA13': "Kyyivs'ka Oblast'", 'UA12': 'Kyyiv', 'GBV9': 'Orkney', 'UA19': "Rivnens'ka Oblast'", 'UA18': "Poltavs'ka Oblast'", 'GBV8': 'North Lanarkshire', 'GBV5': 'Midlothian', 'GBV4': 'Inverclyde', 'VN09': 'Dong Thap', 'VN01': 'An Giang', 'VN03': 'Ben Tre', 'VN05': 'Cao Bang', 'NG56': 'Nassarawa', 'MV41': 'Meemu', 'MV40': 'Maale', 'MV43': 'Noonu', 'PL80': 'Podkarpackie', 'SI49': 'Komen', 'PL82': 'Pomorskie', 'MV42': 'Gnaviyani', 'PL84': 'Swietokrzyskie', 'PL85': 'Warminsko-Mazurskie', 'PL86': 'Wielkopolskie', 'PL87': 'Zachodniopomorskie', 'SI40': 'Izola-Isola', 'MV45': 'Shaviyani', 'SI42': 'Jursinci', 'SI44': 'Kanal', 'SI45': 'Kidricevo', 'SI46': 'Kobarid', 'MV44': 'Raa', 'MV47': 'Vaavu', 'MV46': 'Thaa', 'GBG2': 'Isle of Wight', 'GBG3': 'Islington', 'GBG1': 'Hounslow', 'GBG6': 'Kingston upon Hull', 'GBG7': 'Kingston upon Thames', 'GBG4': 'Kensington and Chelsea', 'GBG5': 'Kent', 'GBG8': 'Kirklees', 'GBG9': 'Knowsley', 'MKC3': 'Zelino', 'BR13': 'Maranhao', 'BR11': 'Mato Grosso do Sul', 'MKC2': 'Zelenikovo', 'BR17': 'Paraiba', 'BR16': 'Para', 'BR15': 'Minas Gerais', 'BR14': 'Mato Grosso', 'FJ04': 'Rotuma', 'FJ05': 'Western', 'BR18': 'Parana', 'FJ01': 'Central', 'FJ02': 'Eastern', 'FJ03': 'Northern', 'MKC6': 'Zrnovci', 'PH08': 'Batanes', 'PH09': 'Batangas', 'PH04': 'Aklan', 'PH05': 'Albay', 'PH06': 'Antique', 'PH07': 'Bataan', 'PH01': 'Abra', 'PH02': 'Agusan del Norte', 'PH03': 'Agusan del Sur', 'IT03': 'Calabria', 'IT02': 'Basilicata', 'IT01': 'Abruzzi', 'IT07': 'Lazio', 'IT06': 'Friuli-Venezia Giulia', 'IT05': 'Emilia-Romagna', 'IT04': 'Campania', 'IT09': 'Lombardia', 'IT08': 'Liguria', 'PHE3': 'Olongapo', 'PHE2': 'Naga', 'PHE1': 'Marawi', 'PHE7': 'Pagadian', 'PHE6': 'Ozamis', 'PHE5': 'Oroquieta', 'PHE4': 'Ormoc', 'PHE9': 'Pasay', 'PHE8': 'Palayan', 'TH68': 'Songkhla', 'TH69': 'Pattani', 'TH62': 'Phuket', 'TH63': 'Krabi', 'TH60': 'Surat Thani', 'TH61': 'Phangnga', 'TH66': 'Phatthalung', 'TH67': 'Satun', 'TH64': 'Nakhon Si Thammarat', 'TH65': 'Trang', 'MS01': 'Saint Anthony', 'MS02': 'Saint Georges', 'MS03': 'Saint Peter', 'VE24': 'Dependencias Federales', 'SIB3': 'Sentilj', 'DE12': 'Mecklenburg-Vorpommern', 'DE13': 'Sachsen', 'DE10': 'Schleswig-Holstein', 'DE11': 'Brandenburg', 'DE16': 'Berlin', 'DE14': 'Sachsen-Anhalt', 'DE15': 'Thuringen', 'MU20': 'Savanne', 'MU21': 'Agalega Islands', 'MU22': 'Cargados Carajos', 'MU23': 'Rodrigues', 'HN18': 'Yoro', 'HN15': 'Olancho', 'HN14': 'Ocotepeque', 'HN17': 'Valle', 'HN16': 'Santa Barbara', 'HN11': 'Islas de la Bahia', 'HN10': 'Intibuca', 'HN13': 'Lempira', 'HN12': 'La Paz', 'IS35': 'Vestur-Hunavatnssysla', 'IS34': 'Vestur-Bardastrandarsysla', 'IS37': 'Vestur-Skaftafellssysla', 'IS36': 'Vestur-Isafjardarsysla', 'IS31': 'Sudur-Mulasysla', 'IS30': 'Strandasysla', 'IS32': 'Sudur-Tingeyjarsysla', 'HT03': 'Nord-Ouest', 'USFL': 'Florida', 'USFM': 'Federated States of Micronesia', 'ET49': 'Gambela Hizboch', 'ET48': 'Dire Dawa', 'ZW10': 'Harare', 'ET47': 'Binshangul Gumuz', 'ET46': 'Amara', 'ET45': 'Afar', 'ET44': 'Adis Abeba', 'AF18': 'Nangarhar', 'AF19': 'Nimruz', 'AF17': 'Lowgar', 'AF14': 'Kapisa', 'AF13': 'Kabol', 'AF10': 'Helmand', 'AF11': 'Herat', 'GBZ1': 'Swansea', 'GBZ3': 'Vale of Glamorgan', 'GBZ2': 'Torfaen', 'GBZ4': 'Wrexham', 'AO08': 'Huambo', 'AO09': 'Huila', 'AO01': 'Benguela', 'AO02': 'Bie', 'AO03': 'Cabinda', 'AO04': 'Cuando Cubango', 'AO05': 'Cuanza Norte', 'AO06': 'Cuanza Sul', 'AO07': 'Cunene', 'TO03': 'Vava', 'NP08': 'Lumbini', 'NP09': 'Mahakali', 'NP06': 'Karnali', 'NP07': 'Kosi', 'NP04': 'Gandaki', 'NP05': 'Janakpur', 'NP02': 'Bheri', 'NP03': 'Dhawalagiri', 'NP01': 'Bagmati', 'VN13': 'Hai Phong', 'UG84': 'Kitgum', 'UG85': 'Kyenjojo', 'UG86': 'Mayuge', 'UG87': 'Mbale', 'UG80': 'Kaberamaido', 'UG81': 'Kamwenge', 'UG82': 'Kanungu', 'UG83': 'Kayunga', 'UG88': 'Moroto', 'UG89': 'Mpigi', 'SI53': 'Kranjska Gora', 'SI52': 'Kranj', 'SI51': 'Kozje', 'SI50': 'Koper-Capodistria', 'SI57': 'Lasko', 'SI55': 'Kungota', 'SI54': 'Krsko', 'GBF9': 'Hillingdon', 'GBF8': 'Hertford', 'EE08': 'Laane-Virumaa', 'EE09': 'Narva', 'GBF5': 'Hartlepool', 'GBF4': 'Harrow', 'GBF7': 'Herefordshire', 'GBF6': 'Havering', 'GBF1': 'Hammersmith and Fulham', 'EE03': 'Ida-Virumaa', 'GBF3': 'Haringey', 'GBF2': 'Hampshire', 'BR28': 'Sergipe', 'BR29': 'Goias', 'BR26': 'Santa Catarina', 'BR27': 'Sao Paulo', 'BR24': 'Rondonia', 'BR25': 'Roraima', 'BR22': 'Rio Grande do Norte', 'BR23': 'Rio Grande do Sul', 'BR20': 'Piaui', 'BR21': 'Rio de Janeiro', 'SI76': 'Mislinja', 'PH19': 'Catanduanes', 'PH18': 'Capiz', 'PH17': 'Camiguin', 'PH16': 'Camarines Sur', 'PH15': 'Camarines Norte', 'PH14': 'Cagayan', 'PH13': 'Bulacan', 'PH12': 'Bukidnon', 'PH11': 'Bohol', 'PH10': 'Benguet', 'US08': 'Colorado', 'US09': 'Connecticut', 'CH25': 'Zurich', 'CH24': 'Zug', 'CH23': 'Vaud', 'CH22': 'Valais', 'CH21': 'Uri', 'CH20': 'Ticino', 'US01': 'Alabama', 'US02': 'Alaska', 'US04': 'Arizona', 'US05': 'Arkansas', 'US06': 'California', 'NA25': 'Kavango', 'PHF8': 'Silay', 'PHF9': 'Surigao', 'PHF6': 'San Jose', 'PHF7': 'San Pablo', 'PHF4': 'San Carlos', 'PHF5': 'San Carlos', 'PHF2': 'Quezon City', 'PHF3': 'Roxas', 'PHF1': 'Puerto Princesa', 'LA02': 'Champasak', 'NA21': 'Windhoek', 'USGA': 'Georgia', 'NA20': 'Karasburg', 'NA23': 'Hereroland Oos', 'USGU': 'Guam', 'BT06': 'Chhukha', 'BT07': 'Chirang', 'BT05': 'Bumthang', 'BT08': 'Daga', 'BT09': 'Geylegphug', 'KZ14': 'Qyzylorda', 'KZ15': 'East Kazakhstan', 'KZ16': 'North Kazakhstan', 'KZ17': 'Zhambyl', 'KZ10': 'South Kazakhstan', 'KZ11': 'Pavlodar', 'KZ12': 'Qaraghandy', 'KZ13': 'Qostanay', 'LU02': 'Grevenmacher', 'PHC8': 'Iligan', 'TH75': 'Ubon Ratchathani', 'IS41': 'Norourland Vestra', 'IS42': 'Suourland', 'IS43': 'Suournes', 'TH71': 'Ubon Ratchathani', 'TH70': 'Yala', 'TH73': 'Nakhon Phanom', 'TH72': 'Yasothon', 'TH79': 'Nong Bua Lamphu', 'TH78': 'Mukdahan', 'ZW05': 'Mashonaland West', 'ZW04': 'Mashonaland East', 'ZW07': 'Matabeleland South', 'ZW06': 'Matabeleland North', 'ZW01': 'Manicaland', 'ZW03': 'Mashonaland Central', 'ZW02': 'Midlands', 'ZW09': 'Bulawayo', 'ZW08': 'Masvingo', 'FM02': 'Pohnpei', 'FM01': 'Kosrae', 'DE05': 'Hessen', 'IS17': 'Myrasysla', 'DE07': 'Nordrhein-Westfalen', 'DE06': 'Niedersachsen', 'DE01': 'Baden-Wurttemberg', 'DE03': 'Bremen', 'DE02': 'Bayern', 'NR08': 'Denigomodu', 'DE09': 'Saarland', 'TH46': 'Chon Buri', 'NR09': 'Ewa', 'AF09': 'Ghowr', 'SC20': 'Pointe La Rue', 'SC21': 'Port Glaud', 'AF01': 'Badakhshan', 'IE03': 'Clare', 'AF03': 'Baghlan', 'IE01': 'Carlow', 'AF05': 'Bamian', 'IE07': 'Dublin', 'AF07': 'Faryab', 'AF06': 'Farah', 'VN39': 'Lang Son', 'TH43': 'Nakhon Nayok', 'AO19': 'Bengo', 'AO18': 'Lunda Sul', 'AO13': 'Namibe', 'AO12': 'Malanje', 'AO17': 'Lunda Norte', 'AO16': 'Zaire', 'AO15': 'Uige', 'AO14': 'Moxico', 'TW04': "T'ai-wan", 'TW03': "T'ai-pei", 'TW02': 'Kao-hsiung', 'TW01': 'Fu-chien', 'NP11': 'Narayani', 'NP10': 'Mechi', 'NP13': 'Sagarmatha', 'NP12': 'Rapti', 'NP14': 'Seti', 'EG05': 'Al Gharbiyah', 'SIA7': 'Rogaska Slatina', 'SIA6': 'Rogasovci', 'SIA3': 'Radovljica', 'SIA2': 'Radlje ob Dravi', 'SIA1': 'Radenci', 'SIA8': 'Rogatec', 'CAMB': 'Manitoba', 'EG03': 'Al Buhayrah', 'JP46': 'Yamanashi', 'JM15': 'Trelawny', 'JP44': 'Yamagata', 'JP45': 'Yamaguchi', 'JM10': 'Saint Catherine', 'JP43': 'Wakayama', 'JP40': 'Tokyo', 'JM13': 'Saint Mary', 'UG97': 'Yumbe', 'UG96': 'Wakiso', 'UG95': 'Soroti', 'UG94': 'Sironko', 'UG93': 'Rukungiri', 'UG92': 'Pader', 'UG91': 'Nakapiripirit', 'SI61': 'Ljubljana', 'SI68': 'Lukovica', 'EE19': 'Valgamaa', 'EE18': 'Tartumaa', 'VN24': 'Long An', 'VN23': 'Lam Dong', 'VN20': 'Ho Chi Minh', 'VN21': 'Kien Giang', 'EE11': 'Parnumaa', 'GBA1': 'Barking and Dagenham', 'EE13': 'Raplamaa', 'EE12': 'Polvamaa', 'EE15': 'Sillamae', 'EE14': 'Saaremaa', 'EE17': 'Tartu', 'EE16': 'Tallinn', 'BR31': 'Tocantins', 'BR30': 'Pernambuco', 'IR43': 'Khorasan-e Shemali', 'PH28': 'Ilocos Norte', 'RUCI': 'Chechnya Republic', 'PH22': 'Basilan', 'PH23': 'Eastern Samar', 'PH20': 'Cavite', 'PH21': 'Cebu', 'PH26': 'Davao Oriental', 'PH27': 'Ifugao', 'PH24': 'Davao', 'PH25': 'Davao del Sur', 'CH12': 'Neuchatel', 'CH13': 'Nidwalden', 'US19': 'Iowa', 'US18': 'Indiana', 'CH16': 'Schaffhausen', 'CH17': 'Schwyz', 'CH14': 'Obwalden', 'CH15': 'Sankt Gallen', 'US13': 'Georgia', 'US12': 'Florida', 'CH18': 'Solothurn', 'US10': 'Delaware', 'US17': 'Illinois', 'US16': 'Idaho', 'US15': 'Hawaii', 'PHG8': 'Aurora', 'PHG1': 'Tacloban', 'PHG3': 'Tagbilaran', 'PHG2': 'Tagaytay', 'PHG5': 'Toledo', 'PHG4': 'Tangub', 'PHG7': 'Zamboanga', 'PHG6': 'Trece Martires', 'BT11': 'Lhuntshi', 'BT10': 'Ha', 'BT13': 'Paro', 'BT12': 'Mongar', 'BT15': 'Punakha', 'BT14': 'Pemagatsel', 'BT17': 'Samdrup', 'BT16': 'Samchi', 'BT19': 'Tashigang', 'BT18': 'Shemgang', 'KZ07': 'West Kazakhstan', 'KZ06': 'Atyrau', 'KZ05': 'Astana', 'KZ04': 'Aqtobe', 'KZ03': 'Aqmola', 'KZ02': 'Almaty City', 'KZ01': 'Almaty', 'KZ09': 'Mangghystau', 'KZ08': 'Bayqonyr', 'KR19': 'Taejon-jikhalsi', 'TH01': 'Mae Hong Son', 'TH02': 'Chiang Mai', 'TH03': 'Chiang Rai', 'TH04': 'Nan', 'TH05': 'Lamphun', 'TH06': 'Lampang', 'TH07': 'Phrae', 'TH08': 'Tak', 'TH09': 'Sukhothai', 'FM04': 'Yap', 'TN28': 'Madanin', 'TN29': 'Gabes', 'TN22': 'Siliana', 'TN23': 'Sousse', 'TN27': 'Ben Arous', 'UG52': 'Mbarara', 'DK18': 'Midtjylland', 'DK19': 'Nordjylland', 'DK17': 'Hovedstaden', 'UG50': 'Masindi', 'DZ24': 'Jijel', 'DZ25': 'Laghouat', 'NG50': 'Rivers', 'NG51': 'Sokoto', 'DZ20': 'Blida', 'CH08': 'Glarus', 'NG54': 'Ekiti', 'NG55': 'Gombe', 'IE15': 'Laois', 'IE14': 'Leitrim', 'IE16': 'Limerick', 'IE11': 'Kerry', 'IE10': 'Galway', 'IE13': 'Kilkenny', 'IE12': 'Kildare', 'IE19': 'Louth', 'IE18': 'Longford', 'SIB2': 'Sencur', 'HT09': 'Nord', 'SIB1': 'Semic', 'SIB6': 'Sevnica', 'SIB7': 'Sezana', 'SIB4': 'Sentjernej', 'USDE': 'Delaware', 'SIB8': 'Skocjan', 'SIB9': 'Skofja Loka', 'HT06': 'Artibonite', 'HT07': 'Centre', 'LR21': 'Gbarpolu', 'JM09': 'Saint Ann', 'JM08': 'Saint Andrew', 'JM07': 'Portland', 'JM04': 'Manchester', 'JM02': 'Hanover', 'JM01': 'Clarendon', 'AO20': 'Luanda', 'SI71': 'Medvode', 'VN80': 'Ha Nam', 'SI73': 'Metlika', 'SI72': 'Menges', 'SI74': 'Mezica', 'SI77': 'Moravce', 'VN81': 'Hung Yen', 'SI79': 'Mozirje', 'SI78': 'Moravske Toplice', 'VN82': 'Nam Dinh', 'GBO9': 'Waltham Forest', 'VN84': 'Quang Nam', 'LU01': 'Diekirch', 'LU03': 'Luxembourg', 'VN85': 'Thai Nguyen', 'VN86': 'Vinh Puc Province', 'VN87': 'Can Tho', 'FM03': 'Chuuk', 'VN30': 'Quang Ninh', 'VN33': 'Tay Ninh', 'VN32': 'Son La', 'VN35': 'Thai Binh', 'VN34': 'Thanh Hoa', 'VN37': 'Tien Giang', 'VN89': 'Lai Chau', 'NR04': 'Anibare', 'NR05': 'Baiti', 'NR06': 'Boe', 'NR07': 'Buada', 'NR01': 'Aiwo', 'NR02': 'Anabar', 'NR03': 'Anetan', 'EG08': 'Al Jizah', 'EG09': 'Al Minufiyah', 'EG04': 'Al Fayyum', 'GBO6': 'Trafford', 'EG06': 'Al Iskandariyah', 'EG07': "Al Isma'iliyah", 'EG01': 'Ad Daqahliyah', 'EG02': 'Al Bahr al Ahmar', 'GBO7': 'Wakefield', 'PH35': 'Lanao del Sur', 'PH34': 'Lanao del Norte', 'PH37': 'Leyte', 'PH36': 'La Union', 'PH31': 'Isabela', 'PH30': 'Iloilo', 'PH33': 'Laguna', 'PH32': 'Kalinga-Apayao', 'PH39': 'Masbate', 'PH38': 'Marinduque', 'US26': 'Michigan', 'US27': 'Minnesota', 'US24': 'Maryland', 'US25': 'Massachusetts', 'US22': 'Louisiana', 'US23': 'Maine', 'US20': 'Kansas', 'US21': 'Kentucky', 'US28': 'Mississippi', 'US29': 'Missouri', 'NG52': 'Bayelsa', 'NG53': 'Ebonyi', 'DZ26': 'Mascara', 'DZ27': "M'sila", 'CH09': 'Graubunden', 'DZ21': 'Bouira', 'DZ22': 'Djelfa', 'DZ23': 'Guelma', 'CH05': 'Bern', 'CH04': 'Basel-Stadt', 'CH07': 'Geneve', 'CH06': 'Fribourg', 'CH01': 'Aargau', 'DZ29': 'Oum el Bouaghi', 'CH03': 'Basel-Landschaft', 'CH02': 'Ausser-Rhoden', 'VE08': 'Cojedes', 'USAK': 'Alaska', 'USAL': 'Alabama', 'USAA': 'Armed Forces Americas', 'USAE': 'Armed Forces Europe', 'USAZ': 'Arizona', 'USAS': 'American Samoa', 'USAR': 'Arkansas', 'USAP': 'Armed Forces Pacific', 'ES51': 'Andalucia', 'MU13': 'Flacq', 'MU12': 'Black River', 'MU15': 'Moka', 'MU14': 'Grand Port', 'MU17': 'Plaines Wilhems', 'MU16': 'Pamplemousses', 'MU19': 'Riviere du Rempart', 'MU18': 'Port Louis', 'TH13': 'Phichit', 'TH12': 'Phitsanulok', 'TH11': 'Kamphaeng Phet', 'TH10': 'Uttaradit', 'TH17': 'Nong Khai', 'TH16': 'Nakhon Sawan', 'TH15': 'Uthai Thani', 'TH14': 'Phetchabun', 'TH18': 'Loei', 'TN39': 'Manouba', 'TN38': 'Aiana', 'TN33': 'Sidi Bou Zid', 'TN32': 'Sfax', 'TN31': 'Kebili', 'TN37': 'Zaghouan', 'TN36': 'Tunis', 'TN35': 'Tozeur', 'TN34': 'Tataouine', 'TG25': 'Plateaux', 'TG24': 'Maritime', 'TG26': 'Savanes', 'TG23': 'Kara', 'TG22': 'Centrale', 'NG25': 'Anambra', 'YE24': 'Lahij', 'YE25': 'Ta', 'YE20': "Al Bayda'", 'YE21': 'Al Jawf', 'YE22': 'Hajjah', 'YE23': 'Ibb', 'TR58': 'Sivas', 'CZ52': 'Hlavni mesto Praha', 'MM08': 'Mandalay', 'MM09': 'Pegu', 'MM06': 'Kayah State', 'MM07': 'Magwe', 'MM04': 'Kachin State', 'MM05': 'Karan State', 'MM02': 'Chin State', 'MM03': 'Irrawaddy', 'MM01': 'Rakhine State', 'VE06': 'Bolivar', 'RS01': 'Kosovo', 'RS02': 'Vojvodina', 'SIC9': 'Store', 'SIC8': 'Starse', 'SIC5': 'Smarje pri Jelsah', 'SIC4': 'Slovenske Konjice', 'SIC7': 'Sostanj', 'SIC6': 'Smartno ob Paki', 'SIC1': 'Skofljica', 'HT15': 'Nippes', 'TR54': 'Sakarya', 'TO01': 'Ha', 'GBX7': 'Carmarthenshire', 'SE08': 'Jonkopings Lan', 'SE09': 'Kalmar Lan', 'AR24': 'Tucuman', 'AR23': 'Tierra del Fuego', 'AR22': 'Santiago del Estero', 'AR21': 'Santa Fe', 'AR20': 'Santa Cruz', 'SE02': 'Blekinge Lan', 'SE03': 'Gavleborgs Lan', 'SE05': 'Gotlands Lan', 'SE06': 'Hallands Lan', 'SE07': 'Jamtlands Lan', 'SI88': 'Osilnica', 'SI89': 'Pesnica', 'SI84': 'Nova Gorica', 'SI86': 'Odranci', 'SI87': 'Ormoz', 'SI80': 'Murska Sobota', 'SI81': 'Muta', 'SI82': 'Naklo', 'SI83': 'Nazarje', 'GBC6': 'Cornwall', 'GBC7': 'Coventry', 'GBC4': 'Camden', 'GBC5': 'Cheshire', 'GBC2': 'Calderdale', 'GBC3': 'Cambridgeshire', 'GBC1': 'Bury', 'MD58': 'Stinga Nistrului', 'MD59': 'Anenii Noi', 'GBC8': 'Croydon', 'GBC9': 'Cumbria', 'NR14': 'Yaren', 'NR13': 'Uaboe', 'NR12': 'Nibok', 'NR11': 'Meneng', 'NR10': 'Ijuw', 'EG19': "Bur Sa'id", 'EG18': 'Bani Suwayf', 'EG17': 'Asyut', 'EG16': 'Aswan', 'EG15': 'As Suways', 'EG14': 'Ash Sharqiyah', 'EG13': 'Al Wadi al Jadid', 'EG12': 'Al Qalyubiyah', 'EG11': 'Al Qahirah', 'EG10': 'Al Minya', 'ZA10': 'North-West', 'PH41': 'Mindoro Oriental', 'PH42': 'Misamis Occidental', 'PH43': 'Misamis Oriental', 'PH44': 'Mountain', 'PH45': 'Negros Occidental', 'PH46': 'Negros Oriental', 'PH47': 'Nueva Ecija', 'PH48': 'Nueva Vizcaya', 'PH49': 'Palawan', 'JO12': 'At Tafilah', 'JO13': 'Az Zarqa', 'JO10': 'Al Mafraq', 'JO11': 'Amman Governorate', 'JO16': 'Amman', 'JO14': 'Irbid', 'NG05': 'Lagos', 'US31': 'Nebraska', 'US30': 'Montana', 'US33': 'New Hampshire', 'US32': 'Nevada', 'US35': 'New Mexico', 'US34': 'New Jersey', 'US37': 'North Carolina', 'US36': 'New York', 'US39': 'Ohio', 'US38': 'North Dakota', 'DZ37': 'Annaba', 'DZ36': 'Ain Temouchent', 'DZ35': 'Ain Defla', 'DZ34': 'Adrar', 'DZ33': 'Tebessa', 'NG48': 'Ondo', 'DZ31': 'Skikda', 'DZ30': 'Sidi Bel Abbes', 'NG45': 'Abia', 'NG44': 'Yobe', 'NG47': 'Enugu', 'NG46': 'Bauchi', 'NG41': 'Kogi', 'NG40': 'Kebbi', 'DZ39': 'Bordj Bou Arreridj', 'DZ38': 'Bechar', 'CL01': 'Valparaiso', 'CL03': 'Antofagasta', 'CL05': 'Atacama', 'CL07': 'Coquimbo', 'AE05': 'Ras Al Khaimah', 'BO05': 'Oruro', 'BO04': 'La Paz', 'BO07': 'Potosi', 'BO06': 'Pando', 'BO01': 'Chuquisaca', 'TH28': 'Buriram', 'TH29': 'Surin', 'TH26': 'Chaiyaphum', 'TH27': 'Nakhon Ratchasima', 'TH24': 'Maha Sarakham', 'TH25': 'Roi Et', 'TH22': 'Khon Kaen', 'TH23': 'Kalasin', 'TH20': 'Sakon Nakhon', 'TH21': 'Nakhon Phanom', 'TN06': 'Jendouba', 'TN02': 'Kasserine', 'TN03': 'Kairouan', 'SIL3': 'Ruse', 'NA27': 'Namaland', 'MV37': 'Haa Dhaalu', 'MW04': 'Chitipa', 'MW05': 'Thyolo', 'MW06': 'Dedza', 'MW07': 'Dowa', 'MW02': 'Chikwawa', 'MW03': 'Chiradzulu', 'MW08': 'Karonga', 'MW09': 'Kasungu', 'TR82': 'Cankiri', 'TR83': 'Gaziantep', 'TR80': 'Sirnak', 'TR81': 'Adana', 'TR86': 'Ardahan', 'TR87': 'Bartin', 'TR84': 'Kars', 'TR85': 'Zonguldak', 'TR88': 'Igdir', 'TR89': 'Karabuk', 'SD44': 'Central Equatoria State', 'MM11': 'Shan State', 'MM10': 'Sagaing', 'MM13': 'Mon State', 'MM12': 'Tenasserim', 'MM14': 'Rangoon', 'MM17': 'Yangon', 'BF15': 'Bam', 'BF19': 'Boulkiemde', 'NG37': 'Edo', 'SL01': 'Eastern', 'SL03': 'Southern', 'SL02': 'Northern', 'SL04': 'Western Area', 'SID8': 'Velike Lasce', 'SID1': 'Sveti Jurij', 'SID2': 'Tolmin', 'SID3': 'Trbovlje', 'SID4': 'Trebnje', 'SID5': 'Trzic', 'SID6': 'Turnisce', 'SID7': 'Velenje', 'DZ51': 'Relizane', 'AR12': 'La Rioja', 'AR13': 'Mendoza', 'AR10': 'Jujuy', 'AR11': 'La Pampa', 'AR16': 'Rio Negro', 'AR17': 'Salta', 'LY61': 'Tarabulus', 'AR15': 'Neuquen', 'SE12': 'Kronobergs Lan', 'AR18': 'San Juan', 'AR19': 'San Luis', 'SE16': 'Ostergotlands Lan', 'SE15': 'Orebro Lan', 'SE14': 'Norrbottens Lan', 'SI99': 'Radece', 'SI98': 'Racam', 'SI97': 'Puconci', 'SI94': 'Postojna', 'SI92': 'Podcetrtek', 'SI91': 'Pivka', 'VN70': 'Quang Binh', 'GBB1': 'Bolton', 'GBB3': 'Bracknell Forest', 'GBB2': 'Bournemouth', 'GBB5': 'Brent', 'GBB4': 'Bradford', 'GBB7': 'Bristol', 'GBB6': 'Brighton and Hove', 'GBB9': 'Buckinghamshire', 'GBB8': 'Bromley', 'RU18': 'Evenk', 'RU19': 'Ingush', 'RU14': 'Chita', 'RU15': 'Chukot', 'RU16': 'Chuvashia', 'RU17': 'Dagestan', 'RU10': 'Bryansk', 'RU11': 'Buryat', 'RU12': 'Chechnya', 'RU13': 'Chelyabinsk', 'EG22': 'Matruh', 'EG23': 'Qina', 'EG20': 'Dumyat', 'EG21': 'Kafr ash Shaykh', 'EG26': "Janub Sina'", 'EG27': "Shamal Sina'", 'EG24': 'Suhaj', 'ZA03': 'Free State', 'ZA02': 'KwaZulu-Natal', 'ZA01': 'North-Western Province', 'PH50': 'Pampanga', 'PH57': 'North Cotabato', 'PH56': 'Maguindanao', 'PH55': 'Samar', 'PH54': 'Romblon', 'ZA09': 'Limpopo', 'ZA08': 'Northern Cape', 'JO09': 'Al Karak', 'JO07': 'Ma', 'JO02': "Al Balqa'", 'TZ22': 'Zanzibar North', 'RO28': 'Neamt', 'AZ38': 'Qabala', 'AZ39': 'Qax', 'AZ34': 'Naftalan', 'AZ35': 'Naxcivan', 'AZ36': 'Neftcala', 'AZ37': 'Oguz', 'AZ30': 'Lankaran', 'AZ31': 'Lerik', 'AZ32': 'Masalli', 'JP10': 'Gumma', 'DZ03': 'Batna', 'DZ01': 'Alger', 'DZ06': 'Medea', 'DZ07': 'Mostaganem', 'DZ04': 'Constantine', 'VC05': 'Saint Patrick', 'VC04': 'Saint George', 'NG32': 'Oyo', 'VC06': 'Grenadines', 'VC01': 'Charlotte', 'NG35': 'Adamawa', 'VC03': 'Saint David', 'VC02': 'Saint Andrew', 'USCT': 'Connecticut', 'IL06': 'Yerushalayim', 'USCA': 'California', 'USCO': 'Colorado', 'ZA07': 'Mpumalanga', 'ZA06': 'Gauteng', 'ZA05': 'Eastern Cape', 'TH39': 'Pathum Thani', 'TH38': 'Nonthaburi', 'TH31': 'Narathiwat', 'TH30': 'Sisaket', 'TH33': 'Sing Buri', 'TH32': 'Chai Nat', 'TH35': 'Ang Thong', 'TH34': 'Lop Buri', 'TH37': 'Saraburi', 'TH36': 'Phra Nakhon Si Ayutthaya', 'TN10': 'Qafsah', 'TN15': 'Al Mahdia', 'VN53': 'Ba Ria-Vung Tau', 'TN17': 'Bajah', 'TN16': 'Al Munastir', 'TN19': 'Nabeul', 'TN18': 'Bizerte', 'LC10': 'Vieux-Fort', 'LC11': 'Praslin', 'DK21': 'Syddanmark', 'DK20': 'Sjelland', 'MW17': 'Nkhata Bay', 'MW16': 'Ntcheu', 'MW15': 'Mzimba', 'MW13': 'Mchinji', 'MW12': 'Mangochi', 'MW11': 'Lilongwe', 'MW19': 'Nsanje', 'MW18': 'Nkhotakota', 'TR91': 'Osmaniye', 'TR90': 'Kilis', 'TR93': 'Duzce', 'TR92': 'Yalova', 'YE08': 'Al Hudaydah', 'YE02': 'Adan', 'YE03': 'Al Mahrah', 'YE01': 'Abyan', 'YE06': 'Al Ghaydah', 'YE04': 'Hadramawt', 'YE05': 'Shabwah', 'CZ78': 'Jihomoravsky kraj', 'CZ79': 'Jihocesky kraj', 'BF20': 'Ganzourgou', 'BF21': 'Gnagna', 'BF28': 'Kouritenga', 'GBQ1': 'Wirral', 'SIE9': 'Zavrc', 'SIE3': 'Vodice', 'SIE2': 'Vitanje', 'SIE1': 'Vipava', 'SIE7': 'Zagorje ob Savi', 'SIE6': 'Vuzenica', 'SIE5': 'Vrhnika', 'SE26': 'Stockholms Lan', 'SE27': 'Skane Lan', 'SE24': 'Vasternorrlands Lan', 'SE25': 'Vastmanlands Lan', 'SE22': 'Varmlands Lan', 'SE23': 'Vasterbottens Lan', 'SE21': 'Uppsala Lan', 'SE28': 'Vastra Gotaland', 'LY52': 'Awbari', 'LY53': 'Az Zawiyah', 'LY50': 'Al Khums', 'LY51': 'An Nuqat al Khams', 'AR09': 'Formosa', 'AR08': 'Entre Rios', 'LY54': 'Banghazi', 'LY55': 'Darnah', 'AR05': 'Cordoba', 'AR04': 'Chubut', 'AR07': 'Distrito Federal', 'AR06': 'Corrientes', 'AR01': 'Buenos Aires', 'AR03': 'Chaco', 'AR02': 'Catamarca', 'NE03': 'Dosso', 'NE02': 'Diffa', 'NE01': 'Agadez', 'CA08': 'Ontario', 'CA09': 'Prince Edward Island', 'LR22': 'River Gee', 'NE04': 'Maradi', 'CA04': 'New Brunswick', 'CA05': 'Newfoundland and Labrador', 'CA07': 'Nova Scotia', 'CA01': 'Alberta', 'CA02': 'British Columbia', 'CA03': 'Manitoba', 'GBD7': 'Dudley', 'GBM8': 'Southwark', 'GBM9': 'Staffordshire', 'MD78': 'Ialoveni', 'EE21': 'Vorumaa', 'GBM4': 'Southampton', 'GBM5': 'Southend-on-Sea', 'GBM6': 'South Gloucestershire', 'GBM7': 'South Tyneside', 'MD72': 'Dubasari', 'GBM1': 'Slough', 'GBM2': 'Solihull', 'GBM3': 'Somerset', 'RU09': 'Belgorod', 'RU08': 'Bashkortostan', 'RU07': "Astrakhan'", 'RU06': "Arkhangel'sk", 'RU05': 'Amur', 'RU04': 'Altaisky krai', 'RU03': 'Gorno-Altay', 'RU02': 'Aginsky Buryatsky AO', 'RU01': 'Adygeya', 'PH68': 'Quirino', 'PH69': 'Siquijor', 'PH66': 'Zamboanga del Sur', 'PH67': 'Northern Samar', 'PH64': 'Zambales', 'PH65': 'Zamboanga del Norte', 'PH62': 'Surigao del Sur', 'PH63': 'Tarlac', 'PH60': 'Sulu', 'PH61': 'Surigao del Norte', 'CO24': 'Risaralda', 'CO25': 'San Andres y Providencia', 'CO26': 'Santander', 'CO27': 'Sucre', 'CO20': 'Narino', 'CO21': 'Norte de Santander', 'AZ29': 'Lankaran', 'AZ28': 'Lacin', 'AZ27': 'Kurdamir', 'AZ26': 'Kalbacar', 'AZ25': 'Ismayilli', 'AZ24': 'Imisli', 'AZ23': 'Haciqabul', 'AZ22': 'Goycay', 'AZ21': 'Goranboy', 'AZ20': 'Ganca', 'NG29': 'Kano', 'NG28': 'Imo', 'DZ19': 'Biskra', 'DZ18': 'Bejaia', 'DZ15': 'Tlemcen', 'DZ14': 'Tizi Ouzou', 'NG21': 'Akwa Ibom', 'NG27': 'Borno', 'DZ10': 'Saida', 'DZ13': 'Tiaret', 'DZ12': 'Setif', 'NA05': 'Grootfontein', 'FI14': 'Eastern Finland', 'FI15': 'Western Finland', 'FI13': 'Southern Finland', 'VU10': 'Malakula', 'VU11': 'Paama', 'VU12': 'Pentecote', 'VU13': 'Sanma', 'VU14': 'Shepherd', 'VU15': 'Tafea', 'VU16': 'Malampa', 'VU17': 'Penama', 'NG57': 'Zamfara', 'HT13': 'Sud-Est', 'HT12': 'Sud', 'HT11': 'Ouest', 'HT10': 'Nord-Est', 'BA02': 'Republika Srpska', 'BA01': 'Federation of Bosnia and Herzegovina', 'SIC2': 'Slovenj Gradec', 'USLA': 'Louisiana', 'LC09': 'Soufriere', 'LC08': 'Micoud', 'LC03': 'Castries', 'LC02': 'Dauphin', 'LC01': 'Anse-la-Raye', 'LC07': 'Laborie', 'LC06': 'Gros-Islet', 'LC05': 'Dennery', 'LC04': 'Choiseul', 'ES57': 'Extremadura', 'MW23': 'Zomba', 'MW20': 'Ntchisi', 'MW21': 'Rumphi', 'ES53': 'Canarias', 'MW27': 'Likoma', 'MW24': 'Blantyre', 'MW25': 'Mwanza', 'MW28': 'Machinga', 'MW29': 'Mulanje', 'ES59': 'Pais Vasco', 'ES58': 'Galicia', 'YE15': 'Sa', 'YE14': "Ma'rib", 'YE16': 'San', 'YE11': 'Dhamar', 'YE10': 'Al Mahwit', 'MN19': 'Uvs', 'UG29': 'Bushenyi', 'BF34': 'Passore', 'BF36': 'Sanguie', 'BF33': 'Oudalan', 'MN13': 'Hovsgol', 'AL50': 'Tirane', 'AL51': 'Vlore', 'HR20': 'Zagrebacka', 'HR21': 'Grad Zagreb', 'LY49': 'Al Jabal al Akhdar', 'LY48': 'Al Fatih', 'LY45': 'Zlitan', 'LY47': 'Ajdabiya', 'LY41': 'Tarhunah', 'LY42': 'Tubruq', 'CA14': 'Nunavut', 'CA13': 'Northwest Territories', 'CA12': 'Yukon Territory', 'CA11': 'Saskatchewan', 'CA10': 'Quebec', 'FR99': 'Basse-Normandie', 'FR98': 'Auvergne', 'FR97': 'Aquitaine', 'MD69': 'Criuleni', 'MD68': 'Cimislia', 'GBL9': 'Sheffield', 'GBL8': 'Sefton', 'GBL7': 'Sandwell', 'GBL6': 'Shropshire', 'GBL5': 'Salford', 'GBL4': 'Rutland', 'GBL3': 'Rotherham', 'GBL2': 'Rochdale', 'GBL1': 'Richmond upon Thames', 'MD66': 'Calarasi', 'RU38': 'Krasnodar', 'RU39': 'Krasnoyarsk', 'SIF2': 'Ziri', 'SIF3': 'Zrece', 'SIF1': 'Zelezniki', 'RU32': 'Khanty-Mansiy', 'RU33': 'Kirov', 'RU30': 'Khabarovsk', 'RU31': 'Khakass', 'RU36': 'Koryak', 'RU37': 'Kostroma', 'RU34': 'Komi', 'RU35': 'Komi-Permyak', 'RW12': 'Kigali', 'RW13': 'Nord', 'RW11': 'Est', 'RW14': 'Ouest', 'RW15': 'Sud', 'BO08': 'Santa Cruz', 'MO01': 'Ilhas', 'PH71': 'Sultan Kudarat', 'PH70': 'South Cotabato', 'PH72': 'Tawitawi', 'CO37': 'Caldas', 'CO36': 'Boyaca', 'CO35': 'Bolivar', 'CO34': 'Distrito Especial', 'CO33': 'Cundinamarca', 'CO32': 'Casanare', 'CO31': 'Vichada', 'CO30': 'Vaupes', 'AZ12': 'Beylaqan', 'AZ13': 'Bilasuvar', 'AZ10': 'Balakan', 'AZ11': 'Barda', 'AZ16': 'Daskasan', 'AZ17': 'Davaci', 'AZ14': 'Cabrayil', 'AZ15': 'Calilabad', 'WS02': 'Aiga-i-le-Tai', 'WS03': 'Atua', 'WS06': 'Va', 'WS07': 'Gagaifomauga', 'WS04': 'Fa', 'WS05': 'Gaga', 'WS08': 'Palauli', 'WS09': 'Satupa', 'USMT': 'Montana', 'USMS': 'Mississippi', 'USMP': 'Northern Mariana Islands', 'USMO': 'Missouri', 'FI06': 'Lapland', 'FI01': 'Aland', 'USMH': 'Marshall Islands', 'USME': 'Maine', 'USMD': 'Maryland', 'USMA': 'Massachusetts', 'FI08': 'Oulu', 'PK07': 'Northern Areas', 'PK06': 'Azad Kashmir', 'PK05': 'Sindh', 'PK04': 'Punjab', 'RO38': 'Vaslui', 'RO39': 'Valcea', 'PK01': 'Federally Administered Tribal Areas', 'RO34': 'Suceava', 'RO35': 'Teleorman', 'RO36': 'Timis', 'RO37': 'Tulcea', 'RO30': 'Prahova', 'RO31': 'Salaj', 'RO32': 'Satu Mare', 'RO33': 'Sibiu', 'IR38': 'Qazvin', 'IR39': 'Qom', 'MD51': 'Gagauzia', 'IR34': 'Markazi', 'IR35': 'Mazandaran', 'IR36': 'Zanjan', 'IR37': 'Golestan', 'IR30': 'Khorasan', 'IR31': 'Yazd', 'IR32': 'Ardabil', 'IR33': 'East Azarbaijan', 'MD57': 'Chisinau', 'BB02': 'Saint Andrew', 'BB03': 'Saint George', 'NO20': 'Vestfold', 'BB06': 'Saint Joseph', 'BB07': 'Saint Lucy', 'BB08': 'Saint Michael', 'BB09': 'Saint Peter', 'IS20': 'Nordur-Mulasysla', 'IS21': 'Nordur-Tingeyjarsysla', 'BF59': 'Koulpelogo', 'ES60': 'Comunidad Valenciana', 'MK47': 'Konce', 'MW30': 'Phalombe', 'MK48': 'Kondovo', 'MK49': 'Konopiste', 'BF48': 'Bougouriba', 'BF49': 'Boulgou', 'SC22': 'Saint Louis', 'SC23': 'Takamaka', 'BF40': 'Soum', 'BF42': 'Tapoa', 'BF44': 'Zoundweogo', 'BF45': 'Bale', 'BF46': 'Banwa', 'BF47': 'Bazega', 'AL49': 'Shkoder', 'AL48': 'Lezhe', 'AL47': 'Kukes', 'AL46': 'Korce', 'AL45': 'Gjirokaster', 'AL44': 'Fier', 'AL43': 'Elbasan', 'AL42': 'Durres', 'AL41': 'Diber', 'AL40': 'Berat', 'LK10': 'Kandy', 'LK11': 'Kegalla', 'LK12': 'Kurunegala', 'LK14': 'Matale', 'LK15': 'Matara', 'LK16': 'Moneragala', 'LK17': 'Nuwara Eliya', 'LK18': 'Polonnaruwa', 'LK19': 'Puttalam', 'LV18': 'Limbazu', 'CF11': 'Ouaka', 'CF12': 'Ouham', 'CF13': 'Ouham-Pende', 'CF14': 'Cuvette-Ouest', 'CF15': 'Nana-Grebizi', 'CF16': 'Sangha-Mbaere', 'CF17': 'Ombella-Mpoko', 'CF18': 'Bangui', 'LY30': 'Murzuq', 'LY34': 'Sabha', 'LR01': 'Bong', 'LR06': 'Maryland', 'LR07': 'Monrovia', 'LR04': 'Grand Cape Mount', 'LR05': 'Lofa', 'LR09': 'Nimba', 'CANB': 'New Brunswick', 'RU25': 'Kaluga', 'RU24': 'Kalmyk', 'GBO8': 'Walsall', 'VN83': 'Phu Tho', 'RU21': 'Ivanovo', 'RU20': 'Irkutsk', 'RU23': 'Kaliningrad', 'RU22': 'Kabardin-Balkar', 'GBO2': 'Telford and Wrekin', 'GBO3': 'Thurrock', 'GBO1': 'Tameside', 'RU29': 'Kemerovo', 'RU28': 'Karelia', 'GBO4': 'Torbay', 'GBO5': 'Tower Hamlets', 'SIG4': 'Dobrova-Horjul-Polhov Gradec', 'SIG7': 'Domzale', 'CANL': 'Newfoundland', 'PH40': 'Mindoro Occidental', 'RW09': 'Kigali', 'ZA11': 'Western Cape', 'RW07': 'Kibungo', 'RW06': 'Gitarama', 'RW01': 'Butare', 'GA01': 'Estuaire', 'GA02': 'Haut-Ogooue', 'GA03': 'Moyen-Ogooue', 'GA04': 'Ngounie', 'GA05': 'Nyanga', 'GA06': 'Ogooue-Ivindo', 'GA07': 'Ogooue-Lolo', 'GA08': 'Ogooue-Maritime', 'GA09': 'Woleu-Ntem', 'TT08': 'Saint George', 'TT09': 'Saint Patrick', 'TT04': 'Nariva', 'TT05': 'Port-of-Spain', 'TT06': 'Saint Andrew', 'TT07': 'Saint David', 'TT01': 'Arima', 'TT02': 'Caroni', 'TT03': 'Mayaro', 'CANS': 'Nova Scotia', 'AZ05': 'Agstafa', 'AZ04': 'Agdas', 'AZ07': 'Ali Bayramli', 'AZ06': 'Agsu', 'AZ01': 'Abseron', 'AZ03': 'Agdam', 'AZ02': 'Agcabadi', 'AZ09': 'Baki', 'AZ08': 'Astara', 'CO02': 'Antioquia', 'CO03': 'Arauca', 'CO01': 'Amazonas', 'CO06': 'Boyaca Department', 'CO07': 'Caldas Department', 'CO04': 'Atlantico', 'CO05': 'Bolivar Department', 'CO08': 'Caqueta', 'CO09': 'Cauca', 'WS11': 'Vaisigano', 'WS10': 'Tuamasaga', 'GQ03': 'Annobon', 'GQ04': 'Bioko Norte', 'GQ05': 'Bioko Sur', 'GQ06': 'Centro Sur', 'GQ07': 'Kie-Ntem', 'GQ08': 'Litoral', 'GQ09': 'Wele-Nzas', 'TZ24': 'Rukwa', 'TZ25': 'Zanzibar Urban', 'TZ26': 'Arusha', 'TZ27': 'Manyara', 'TZ20': 'Pemba South', 'TZ21': 'Zanzibar Central', 'RO29': 'Olt', 'TZ23': 'Dar es Salaam', 'RO27': 'Mures', 'RO26': 'Mehedinti', 'RO25': 'Maramures', 'RO23': 'Iasi', 'RO22': 'Ialomita', 'RO21': 'Hunedoara', 'RO20': 'Harghita', 'IR29': 'Kerman', 'IR28': 'Esfahan', 'IR27': 'Zanjan', 'IR26': 'Tehran', 'IR25': 'Semnan', 'IR24': 'Markazi', 'IR23': 'Lorestan', 'IR22': 'Bushehr', 'IR21': 'Zanjan', 'LY56': 'Ghadamis', 'USNY': 'New York', 'USNV': 'Nevada', 'USNJ': 'New Jersey', 'USNH': 'New Hampshire', 'USNM': 'New Mexico', 'USNC': 'North Carolina', 'USND': 'North Dakota', 'USNE': 'Nebraska', 'VU18': 'Shefa', 'NO18': 'Troms', 'NO19': 'Vest-Agder', 'NO16': 'Sor-Trondelag', 'NO17': 'Telemark', 'NO14': 'Rogaland', 'NO15': 'Sogn og Fjordane', 'NO12': 'Oslo', 'NO13': 'Ostfold', 'NO10': 'Nord-Trondelag', 'NO11': 'Oppland', 'NG49': 'Plateau', 'MK44': 'Kisela Voda', 'MK45': 'Klecevce', 'MK46': 'Kocani', 'BF58': 'Kossi', 'MK40': 'Karbinci', 'MK41': 'Karpos', 'MK42': 'Kavadarci', 'MK43': 'Kicevo', 'BF53': 'Kadiogo', 'BF52': 'Ioba', 'BF51': 'Houet', 'BF50': 'Gourma', 'BF57': 'Kompienga', 'BF56': 'Komondjari', 'BF55': 'Komoe', 'BF54': 'Kenedougou', 'BY03': "Hrodzyenskaya Voblasts'", 'BY02': "Homyel'skaya Voblasts'", 'BY01': "Brestskaya Voblasts'", 'BY07': "Vitsyebskaya Voblasts'", 'BY06': "Mahilyowskaya Voblasts'", 'BY05': "Minskaya Voblasts'", 'BY04': 'Minsk', 'LK03': 'Badulla', 'LK02': 'Anuradhapura', 'LK01': 'Amparai', 'LK07': 'Hambantota', 'LK06': 'Galle', 'LK04': 'Batticaloa', 'LK09': 'Kalutara', 'CANT': 'Northwest Territories', 'CANU': 'Nunavut', 'PSGZ': 'Gaza', 'NG43': 'Taraba', 'NG42': 'Osun', 'CF03': 'Haute-Kotto', 'CF02': 'Basse-Kotto', 'CF01': 'Bamingui-Bangoran', 'CF07': 'Lobaye', 'CF06': 'Kemo', 'CF05': 'Haut-Mbomou', 'CF04': 'Mambere-Kadei', 'CF09': 'Nana-Mambere', 'CF08': 'Mbomou', 'KI01': 'Gilbert Islands', 'KI02': 'Line Islands', 'KI03': 'Phoenix Islands', 'HR08': 'Licko-Senjska', 'HR09': 'Medimurska', 'HR06': 'Koprivnicko-Krizevacka', 'HR07': 'Krapinsko-Zagorska', 'HR04': 'Istarska', 'HR05': 'Karlovacka', 'HR02': 'Brodsko-Posavska', 'HR03': 'Dubrovacko-Neretvanska', 'HR01': 'Bjelovarsko-Bilogorska', 'RU50': 'Nenets', 'LR19': 'Grand Gedeh', 'LR18': 'River Cess', 'VN92': 'Dien Bien', 'LR14': 'Montserrado', 'LR17': 'Margibi', 'LR11': 'Grand Bassa', 'LR10': 'Sino', 'LR13': 'Maryland', 'LR12': 'Grand Cape Mount', 'GBN5': 'Suffolk', 'GBN4': 'Stoke-on-Trent', 'GBN7': 'Surrey', 'GBN6': 'Sunderland', 'GBN1': 'St. Helens', 'GBN3': 'Stockton-on-Tees', 'GBN2': 'Stockport', 'GBN9': 'Swindon', 'GBN8': 'Sutton', 'VN93': 'Hau Giang', 'RU51': 'Nizhegorod', 'VN91': 'Dak Nong', 'VN90': 'Lao Cai', 'RU54': 'Omsk', 'RU55': 'Orenburg', 'RU56': 'Orel', 'RU57': 'Penza', 'RU58': "Perm'", 'RU59': "Primor'ye", 'SIH4': 'Jesenice', 'SIH6': 'Kamnik', 'SIH7': 'Kocevje', 'SH01': 'Ascension', 'SH03': 'Tristan da Cunha', 'SH02': 'Saint Helena', 'LI22': 'River Gee', 'LI21': 'Gbarpolu', 'TT12': 'Victoria', 'TT11': 'Tobago', 'TT10': 'San Fernando', 'AZ70': 'Zaqatala', 'AZ71': 'Zardab', 'BS30': 'Kemps Bay', 'BS31': 'Marsh Harbour', 'BS32': 'Nichollstown and Berry Islands', 'BS33': 'Rock Sound', 'CO19': 'Meta', 'DZ43': 'El Oued', 'DZ40': 'Boumerdes', 'DZ41': 'Chlef', 'CO15': 'Guainia', 'CO14': 'Guaviare', 'CO17': 'La Guajira', 'CO16': 'Huila', 'CO11': 'Choco', 'CO10': 'Cesar', 'DZ48': 'Mila', 'DZ49': 'Naama', 'USOH': 'Ohio', 'USOK': 'Oklahoma', 'RO18': 'Galati', 'RO19': 'Gorj', 'USOR': 'Oregon', 'RO12': 'Caras-Severin', 'RO13': 'Cluj', 'RO10': 'Bucuresti', 'RO11': 'Buzau', 'RO16': 'Dambovita', 'RO17': 'Dolj', 'RO14': 'Constanta', 'RO15': 'Covasna', 'IR18': 'Semnan Province', 'IR19': 'Markazi', 'IR12': 'Kerman', 'IR13': 'Bakhtaran', 'IR10': 'Ilam', 'IR11': 'Hormozgan', 'IR16': 'Kordestan', 'IR17': 'Mazandaran', 'IR15': 'Khuzestan', 'NA14': 'Outjo', 'NA15': 'Owambo', 'NA16': 'Rehoboth', 'NA17': 'Swakopmund', 'NA10': 'Maltahohe', 'NA11': 'Okahandja', 'NA12': 'Omaruru', 'NA13': 'Otjiwarongo', 'NA18': 'Tsumeb', 'VE09': 'Delta Amacuro', 'BH08': 'Al Mintaqah al Gharbiyah', 'BH09': 'Mintaqat Juzur Hawar', 'BH02': 'Al Manamah', 'BH01': 'Al Hadd', 'BH06': 'Sitrah', 'BH05': 'Jidd Hafs', 'BD86': 'Sylhet', 'BD84': 'Chittagong', 'BD85': 'Barisal', 'BD82': 'Khulna', 'BD83': 'Rajshahi', 'BD81': 'Dhaka', 'AF26': 'Takhar', 'NO09': 'Nordland', 'NO08': 'More og Romsdal', 'VU09': 'Epi', 'VU08': 'Efate', 'NO01': 'Akershus', 'VE07': 'Carabobo', 'NO02': 'Aust-Agder', 'NO05': 'Finnmark', 'NO04': 'Buskerud', 'NO07': 'Hordaland', 'NO06': 'Hedmark', 'KN13': 'Saint Thomas Middle Island', 'AF29': 'Paktika', 'AF28': 'Zabol', 'ES07': 'Islas Baleares', 'SY04': 'Ar Raqqah', 'SY05': "As Suwayda'", 'SY06': 'Dar', 'SY07': 'Dayr az Zawr', 'SY01': 'Al Hasakah', 'SY02': 'Al Ladhiqiyah', 'SY03': 'Al Qunaytirah', 'SY08': 'Rif Dimashq', 'SY09': 'Halab', 'BF66': 'Nayala', 'BF67': 'Noumbiel', 'BF64': 'Namentenga', 'BF65': 'Naouri', 'BF62': 'Loroum', 'BF63': 'Mouhoun', 'BF60': 'Kourweogo', 'BF61': 'Leraba', 'BF68': 'Oubritenga', 'BF69': 'Poni', 'MK57': 'Kumanovo', 'MK56': 'Kukurecani', 'MK55': 'Kuklis', 'MK54': 'Krusevo', 'MK53': 'Krivogastani', 'MK52': 'Kriva Palanka', 'MK51': 'Kratovo', 'SC09': 'Bel Air', 'SC06': 'Baie Lazare', 'SC07': 'Baie Sainte Anne', 'SC04': 'Anse Louis', 'SC05': 'Anse Royale', 'SC02': 'Anse Boileau', 'SC03': 'Anse Etoile', 'MK59': 'Lipkovo', 'MK58': 'Labunista', 'LK36': 'Western', 'LK34': 'Southern', 'LK35': 'Uva', 'LK32': 'North Western', 'LK33': 'Sabaragamuwa', 'LK30': 'North Central', 'LK31': 'Northern', 'AM11': 'Yerevan', 'LY13': "Ash Shati'", 'HR19': 'Zadarska', 'HR18': 'Vukovarsko-Srijemska', 'HR11': 'Pozesko-Slavonska', 'HR10': 'Osjecko-Baranjska', 'HR13': 'Sibensko-Kninska', 'HR12': 'Primorsko-Goranska', 'HR15': 'Splitsko-Dalmatinska', 'HR14': 'Sisacko-Moslavacka', 'HR17': 'Viroviticko-Podravska', 'HR16': 'Varazdinska', 'GBI1': 'Luton', 'GBI2': 'Manchester', 'GBI3': 'Medway', 'GBI4': 'Merton', 'GBI5': 'Middlesbrough', 'GBI6': 'Milton Keynes', 'GBI7': 'Newcastle upon Tyne', 'GBI8': 'Newham', 'GBI9': 'Norfolk', 'RU43': 'Lipetsk', 'ID10': 'Yogyakarta', 'RU41': 'Kursk', 'RU40': 'Kurgan', 'RU47': 'Moskva', 'RU46': 'Mordovia', 'RU45': 'Mariy-El', 'RU44': 'Magadan', 'RU49': 'Murmansk', 'RU48': 'Moscow City', 'ID12': 'Kalimantan Selatan', 'ID13': 'Kalimantan Tengah', 'SII9': 'Luce', 'SII7': 'Loska Dolina', 'SII6': 'Ljutomer', 'SII5': 'Litija', 'SII3': 'Lenart', 'SII2': 'Kuzma', 'CAON': 'Ontario', 'LI10': 'Triesenberg', 'LI11': 'Vaduz', 'DZ46': 'Illizi', 'DZ47': 'Khenchela', 'DZ44': 'El Tarf', 'DZ45': 'Ghardaia', 'CD12': 'Sud-Kivu', 'CD10': 'Maniema', 'CD11': 'Nord-Kivu', 'DZ42': 'El Bayadh', 'BS35': 'San Salvador and Rum Cay', 'AZ63': 'Xizi', 'SV10': 'San Salvador', 'AZ61': 'Xankandi', 'AZ60': 'Xacmaz', 'AZ67': 'Yevlax', 'AZ66': 'Yardimli', 'AZ65': 'Xocavand', 'AZ64': 'Xocali', 'AZ69': 'Zangilan', 'AZ68': 'Yevlax', 'SV12': 'San Vicente', 'BS23': 'New Providence', 'BS22': 'Harbour Island', 'DZ53': 'Tamanghasset', 'DZ52': 'Souk Ahras', 'BS27': "Governor's Harbour", 'BS26': 'Fresh Creek', 'BS25': 'Freeport', 'BS24': 'Acklins and Crooked Islands', 'BS29': 'High Rock', 'BS28': 'Green Turtle Cay', 'CO12': 'Cordoba', 'BO03': 'El Beni', 'GBU8': 'Edinburgh', 'BO02': 'Cochabamba', 'GBU9': 'Falkirk', 'RO05': 'Bihor', 'RO04': 'Bacau', 'RO07': 'Botosani', 'MY09': 'Pulau Pinang', 'RO01': 'Alba', 'RO03': 'Arges', 'RO02': 'Arad', 'MY02': 'Kedah', 'MY03': 'Kelantan', 'MY01': 'Johor', 'MY06': 'Pahang', 'MY07': 'Perak', 'MY04': 'Melaka', 'MY05': 'Negeri Sembilan', 'TZ02': 'Pwani', 'TZ03': 'Dodoma', 'TZ06': 'Kilimanjaro', 'TZ07': 'Lindi', 'TZ04': 'Iringa', 'TZ05': 'Kigoma', 'TZ08': 'Mara', 'TZ09': 'Mbeya', 'BH15': 'Al Muharraq', 'NA06': 'Kaokoland', 'AT09': 'Wien', 'NA04': 'Gobabis', 'BH11': 'Al Mintaqah al Wusta', 'BH10': 'Al Mintaqah ash Shamaliyah', 'NA01': 'Bethanien', 'BH12': 'Madinat', 'AT03': 'Niederosterreich', 'AT02': 'Karnten', 'AT01': 'Burgenland', 'BH19': 'Al Wusta', 'BH18': 'Ash Shamaliyah', 'AT05': 'Salzburg', 'NA08': 'Keetmanshoop', 'GW06': 'Cacheu', 'GW07': 'Tombali', 'GW04': 'Oio', 'GW05': 'Bolama', 'GR50': 'Khios', 'GR51': 'Lesvos', 'GW01': 'Bafata', 'USHI': 'Hawaii', 'IR05': 'Kohkiluyeh va Buyer Ahmadi', 'IR04': 'Sistan va Baluchestan', 'IR07': 'Fars', 'IR01': 'Azarbayjan-e Bakhtari', 'IR03': 'Chahar Mahall va Bakhtiari', 'IR09': 'Hamadan', 'IR08': 'Gilan', 'TR28': 'Giresun', 'TR24': 'Erzincan', 'TR25': 'Erzurum', 'TR26': 'Eskisehir', 'TR20': 'Denizli', 'TR21': 'Diyarbakir', 'TR22': 'Edirne', 'TR23': 'Elazig', 'SI47': 'Kobilje', 'SY14': 'Tartus', 'SY13': 'Dimashq', 'SY12': 'Idlib', 'SY11': 'Hims', 'SY10': 'Hamah', 'ID41': 'Sulawesi Barat', 'ID40': 'Kepulauan Riau', 'BF71': 'Seno', 'BF70': 'Sanmatenga', 'BF73': 'Sourou', 'BF72': 'Sissili', 'BF75': 'Yagha', 'BF74': 'Tuy', 'BF77': 'Ziro', 'BF76': 'Yatenga', 'DO14': 'Maria Trinidad Sanchez', 'DO15': 'Monte Cristi', 'DO16': 'Pedernales', 'DO17': 'Peravia', 'DO10': 'La Altagracia', 'DO11': 'Elias Pina', 'DO12': 'La Romana', 'MK62': 'Makedonska Kamenica', 'MK63': 'Makedonski Brod', 'MK60': 'Lozovo', 'MK61': 'Lukovo', 'MK66': 'Miravci', 'MK67': 'Mogila', 'MK64': 'Mavrovi Anovi', 'MK65': 'Meseista', 'SC11': 'Cascade', 'SC10': 'Bel Ombre', 'MK68': 'Murtino', 'MK69': 'Negotino', 'SC15': 'La Digue', 'SC14': "Grand' Anse", 'SC17': 'Mont Buxton', 'SC16': 'La Riviere Anglaise', 'NI18': 'Region Autonoma Atlantico Sur', 'NI14': 'Rio San Juan', 'NI15': 'Rivas', 'NI16': 'Zelaya', 'NI17': 'Autonoma Atlantico Norte', 'NI10': 'Managua', 'NI11': 'Masaya', 'NI12': 'Matagalpa', 'NI13': 'Nueva Segovia', 'LK29': 'Central', 'LK28': 'Vavuniya', 'LK21': 'Trincomalee', 'LK20': 'Ratnapura', 'LK23': 'Colombo', 'LK25': 'Jaffna', 'LK24': 'Gampaha', 'LK27': 'Mullaittivu', 'LK26': 'Mannar', 'CM04': 'Est', 'CM05': 'Littoral', 'LY03': 'Al Aziziyah', 'LY05': 'Al Jufrah', 'LY08': 'Al Kufrah', 'SO05': 'Galguduud', 'GBH3': 'Leeds', 'GBH2': 'Lancashire', 'GBH1': 'Lambeth', 'GBH7': 'Lincolnshire', 'GBH6': 'Lewisham', 'GBH5': 'Leicestershire', 'GBH4': 'Leicester', 'GBH9': 'London', 'GBH8': 'Liverpool', 'RU78': "Tyumen'", 'RU79': 'Tuva', 'RU76': 'Tula', 'RU77': "Tver'", 'RU74': 'Taymyr', 'RU75': 'Tomsk', 'RU72': 'Tambovskaya oblast', 'RU73': 'Tatarstan', 'RU70': "Stavropol'", 'RU71': 'Sverdlovsk', 'SIJ9': 'Piran', 'SIJ2': 'Maribor', 'SIJ1': 'Majsperk', 'SIJ7': 'Novo Mesto', 'SIJ5': 'Miren-Kostanjevica', 'LI01': 'Balzers', 'AE03': 'Dubai', 'LI03': 'Gamprin', 'LI02': 'Eschen', 'LI05': 'Planken', 'LI04': 'Mauren', 'LI07': 'Schaan', 'LI06': 'Ruggell', 'LI09': 'Triesen', 'LI08': 'Schellenberg', 'KG02': 'Chuy', 'KG03': 'Jalal-Abad', 'UG28': 'Bundibugyo', 'CD02': 'Equateur', 'KG06': 'Talas', 'KG07': 'Ysyk-Kol', 'KG04': 'Naryn', 'KG05': 'Osh', 'CD09': 'Orientale', 'CD08': 'Bas-Congo', 'KG08': 'Osh', 'KG09': 'Batken', 'UG26': 'Apac', 'AZ58': 'Tovuz', 'AZ59': 'Ucar', 'AZ56': 'Susa', 'AZ57': 'Tartar', 'AZ54': 'Sumqayit', 'AZ55': 'Susa', 'AZ52': 'Samux', 'AZ53': 'Siyazan', 'AZ50': 'Samaxi', 'AZ51': 'Samkir', 'MC03': 'Monte-Carlo', 'BS18': 'Ragged Island', 'BS16': 'Mayaguana', 'BS15': 'Long Island', 'BS13': 'Inagua', 'BS10': 'Exuma', 'KY07': 'West End', 'MO02': 'Macau', 'MY15': 'Labuan', 'MY14': 'Kuala Lumpur', 'MY17': 'Putrajaya', 'MY16': 'Sabah', 'MY11': 'Sarawak', 'MY13': 'Terengganu', 'MY12': 'Selangor', 'USIA': 'Iowa', 'USID': 'Idaho', 'USIN': 'Indiana', 'USIL': 'Illinois', 'PH53': 'Rizal', 'TZ19': 'Kagera', 'TZ18': 'Tanga', 'TZ15': 'Shinyanga', 'TZ14': 'Ruvuma', 'TZ17': 'Tabora', 'TZ16': 'Singida', 'TZ11': 'Mtwara', 'TZ10': 'Morogoro', 'TZ13': 'Pemba North', 'TZ12': 'Mwanza', 'NA32': 'Kunene', 'NA33': 'Ohangwena', 'NA30': 'Hardap', 'NA31': 'Karas', 'NA36': 'Omusati', 'NA37': 'Oshana', 'NA34': 'Okavango', 'NA35': 'Omaheke', 'LA17': 'Louangphrabang', 'NA38': 'Oshikoto', 'NA39': 'Otjozondjupa', 'LA13': 'Xaignabouri', 'LA10': 'Savannakhet', 'LA11': 'Vientiane', 'BJ08': 'Atakora', 'BJ09': 'Atlanyique', 'BJ07': 'Alibori', 'GW11': 'Bissau', 'GW10': 'Gabu', 'GR45': 'Iraklion', 'GW12': 'Biombo', 'GR43': 'Khania', 'GR42': 'Lakonia', 'GR41': 'Arkadhia', 'GR40': 'Messinia', 'GR49': 'Kikladhes', 'GR48': 'Samos', 'USVI': 'Virgin Islands', 'CO18': 'Magdalena Department', 'ES27': 'La Rioja', 'ES29': 'Madrid', 'TR39': 'Kirklareli', 'TR38': 'Kayseri', 'TR37': 'Kastamonu', 'TR35': 'Izmir', 'TR34': 'Istanbul', 'TR33': 'Isparta', 'TR32': 'Mersin', 'TR31': 'Hatay', 'PL81': 'Podlaskie', 'PL83': 'Slaskie', 'NZE9': 'Canterbury', 'NZE8': 'Bay of Plenty', 'NZE7': 'Auckland', 'DO09': 'Independencia', 'DO08': 'Espaillat', 'TH56': 'Phetchaburi', 'DO06': 'Duarte', 'DO05': 'Distrito Nacional', 'DO04': 'Dajabon', 'DO03': 'Barahona', 'DO02': 'Baoruco', 'DO01': 'Azua', 'MK79': 'Petrovec', 'MK78': 'Pehcevo', 'MK75': 'Orasac', 'MK74': 'Ohrid', 'MK77': 'Oslomej', 'MK76': 'Orizari', 'MK71': 'Novaci', 'MK70': 'Negotino-Polosko', 'MK73': 'Oblesevo', 'MK72': 'Novo Selo', 'RU52': 'Novgorod', 'NI09': 'Madriz', 'NI08': 'Leon', 'NI07': 'Jinotega', 'NI06': 'Granada', 'NI05': 'Esteli', 'NI04': 'Chontales', 'NI03': 'Chinandega', 'NI02': 'Carazo', 'NI01': 'Boaco', 'RU53': 'Novosibirsk', 'IQ03': 'Al Muthanna', 'HU41': 'Salgotarjan', 'HU40': 'Zalaegerszeg', 'HU43': 'Erd', 'HU42': 'Szekszard', 'GBK8': 'Redbridge', 'GBK9': 'Redcar and Cleveland', 'GBK6': 'Portsmouth', 'GBK7': 'Reading', 'GBK4': 'Plymouth', 'GBK5': 'Poole', 'GBK2': 'Oxfordshire', 'GBK3': 'Peterborough', 'GBK1': 'Oldham', 'RU69': 'Smolensk', 'RU68': 'North Ossetia', 'SIK7': 'Ptuj', 'RU61': 'Rostov', 'RU60': 'Pskov', 'RU63': 'Sakha', 'RU62': "Ryazan'", 'RU65': 'Samara', 'RU64': 'Sakhalin', 'RU67': 'Saratov', 'RU66': 'Saint Petersburg City', 'SA08': 'Al Qasim', 'SA09': 'Al Qurayyat', 'SA05': 'Al Madinah', 'SA06': 'Ash Sharqiyah', 'SA02': 'Al Bahah', 'SA03': 'Al Jawf', 'SO20': 'Woqooyi Galbeed', 'SO21': 'Awdal', 'SO22': 'Sool', 'CAAB': 'Alberta', 'UG37': 'Kampala', 'UG36': 'Kalangala', 'UG31': 'Hoima', 'UG30': 'Gulu', 'UG33': 'Jinja', 'UG39': 'Kapchorwa', 'UG38': 'Kamuli', 'AZ49': 'Salyan', 'AZ48': 'Saki', 'AZ41': 'Qobustan', 'AZ40': 'Qazax', 'AZ43': 'Qubadli', 'AZ42': 'Quba', 'AZ45': 'Saatli', 'AZ44': 'Qusar', 'AZ47': 'Saki', 'AZ46': 'Sabirabad', 'BS05': 'Bimini', 'BS06': 'Cat Island', 'MA46': 'Fes-Boulemane', 'MA47': 'Marrakech-Tensift-Al Haouz', 'MA45': 'Grand Casablanca', 'MA48': 'Meknes-Tafilalet', 'MA49': 'Rabat-Sale-Zemmour-Zaer', 'VU07': 'Torba', 'VU06': 'Aoba', 'VU05': 'Ambrym', 'LA09': 'Saravan', 'LA08': 'Phongsali', 'NA29': 'Erongo', 'NA28': 'Caprivi', 'LA01': 'Attapu', 'NA24': 'Hereroland Wes', 'LA03': 'Houaphan', 'NA26': 'Mariental', 'LA05': 'Louang Namtha', 'LA04': 'Khammouan', 'LA07': 'Oudomxai', 'NA22': 'Damaraland', 'MR12': 'Inchiri', 'MR10': 'Guidimaka', 'MR11': 'Tiris Zemmour', 'BJ18': 'Zou', 'BJ13': 'Donga', 'BJ12': 'Kouffo', 'BJ11': 'Collines', 'BJ10': 'Borgou', 'BJ17': 'Plateau', 'BJ16': 'Oueme', 'BJ15': 'Mono', 'BJ14': 'Littoral', 'CU08': 'Cienfuegos', 'CU09': 'Granma', 'CU01': 'Pinar del Rio', 'CU02': 'Ciudad de la Habana', 'CU03': 'Matanzas', 'CU04': 'Isla de la Juventud', 'CU05': 'Camaguey', 'CU07': 'Ciego de Avila', 'GE04': 'Ajaria', 'GE05': 'Akhalgoris Raioni', 'GE06': "Akhalk'alak'is Raioni", 'GE07': "Akhalts'ikhis Raioni", 'GE01': 'Abashis Raioni', 'GE02': 'Abkhazia', 'GE03': 'Adigenis Raioni', 'GE08': 'Akhmetis Raioni', 'GE09': 'Ambrolauris Raioni', 'ES31': 'Murcia', 'ES32': 'Navarra', 'ES34': 'Asturias', 'ES39': 'Cantabria', 'TR08': 'Artvin', 'TR09': 'Aydin', 'TR02': 'Adiyaman', 'TR03': 'Afyonkarahisar', 'TR07': 'Antalya', 'TR04': 'Agri', 'TR05': 'Amasya', 'USMI': 'Michigan', 'DO32': 'Monte Plata', 'DO33': 'San Cristobal', 'DO30': 'La Vega', 'DO31': 'Monsenor Nouel', 'DO36': 'San Jose de Ocoa', 'DO37': 'Santo Domingo', 'DO34': 'Distrito Nacional', 'DO35': 'Peravia', 'MK08': 'Bogdanci', 'MK09': 'Bogomila', 'MK01': 'Aracinovo', 'MK02': 'Bac', 'MK03': 'Belcista', 'MK04': 'Berovo', 'MK05': 'Bistrica', 'MK06': 'Bitola', 'MK07': 'Blatec', 'CABC': 'British Columbia', 'RU27': 'Karachay-Cherkess', 'NZF6': 'Northland', 'NZF7': 'Otago', 'NZF4': 'Marlborough', 'NZF5': 'Nelson', 'NZF2': "Hawke's Bay", 'NZF3': 'Manawatu-Wanganui', 'NZF1': 'Gisborne', 'VN46': 'Dong Thap', 'NZF8': 'Southland', 'NZF9': 'Taranaki', 'HU38': 'Tatabanya', 'HU39': 'Veszprem', 'AR14': 'Misiones', 'HU30': 'Kaposvar', 'HU31': 'Kecskemet', 'HU32': 'Nagykanizsa', 'HU33': 'Nyiregyhaza', 'HU34': 'Sopron', 'HU35': 'Szekesfehervar', 'HU36': 'Szolnok', 'HU37': 'Szombathely', 'GBJ9': 'Nottinghamshire', 'GBJ8': 'Nottingham', 'GBJ1': 'Northamptonshire', 'GBJ3': 'North Lincolnshire', 'GBJ2': 'North East Lincolnshire', 'GBJ5': 'North Tyneside', 'GBJ4': 'North Somerset', 'GBJ7': 'North Yorkshire', 'GBJ6': 'Northumberland', 'SIL1': 'Ribnica', 'DM10': 'Saint Paul', 'DM11': 'Saint Peter', 'SIL7': 'Sentjur pri Celju', 'SIL8': 'Slovenska Bistrica', 'SA19': 'Tabuk', 'SA17': 'Jizan', 'SA16': 'Najran', 'SA15': 'Al Hudud ash Shamaliyah', 'SA14': 'Makkah', 'SA13': "Ha'il", 'SD40': 'Al Wahadah State', 'SA10': 'Ar Riyad', 'UG40': 'Kasese', 'UG41': 'Kibale', 'UG42': 'Kiboga', 'UG43': 'Kisoro', 'UG45': 'Kotido', 'UG46': 'Kumi', 'UG47': 'Lira', 'CL12': 'Region Metropolitana', 'MA51': 'Doukkala-Abda', 'MA50': 'Chaouia-Ouardigha', 'MA53': 'Guelmim-Es Smara', 'MA52': 'Gharb-Chrarda-Beni Hssen', 'MA55': 'Souss-Massa-Dr', 'MA54': 'Oriental', 'MA57': 'Tanger-Tetouan', 'MA56': 'Tadla-Azilal', 'MA59': 'La', 'MA58': 'Taza-Al Hoceima-Taounate', 'CL13': 'Tarapaca', 'USKY': 'Kentucky', 'USKS': 'Kansas', 'MR09': 'Tagant', 'MR08': 'Dakhlet Nouadhibou', 'MR01': 'Hodh Ech Chargui', 'MR03': 'Assaba', 'MR02': 'Hodh El Gharbi', 'MR05': 'Brakna', 'MR04': 'Gorgol', 'MR07': 'Adrar', 'MR06': 'Trarza', 'BB11': 'Saint Thomas', 'BB10': 'Saint Philip', 'CU13': 'Las Tunas', 'CU12': 'Holguin', 'CU11': 'La Habana', 'CU10': 'Guantanamo', 'CU16': 'Villa Clara', 'CU15': 'Santiago de Cuba', 'CU14': 'Sancti Spiritus', 'GE17': "Dedop'listsqaros Raioni", 'GE16': "Ch'okhatauris Raioni", 'GE15': "Ch'khorotsqus Raioni", 'GE14': "Chiat'ura", 'GE13': 'Borjomis Raioni', 'GE12': 'Bolnisis Raioni', 'GE11': "Baghdat'is Raioni", 'GE10': 'Aspindzis Raioni', 'GE19': "Dushet'is Raioni", 'GE18': 'Dmanisis Raioni', 'TR15': 'Burdur', 'TR14': 'Bolu', 'TR17': 'Canakkale', 'TR16': 'Bursa', 'TR11': 'Bilecik', 'TR10': 'Balikesir', 'TR13': 'Bitlis', 'TR12': 'Bingol', 'TR19': 'Corum', 'BE10': 'Brabant Wallon', 'BE11': 'Brussels Hoofdstedelijk Gewest', 'BE12': 'Vlaams-Brabant', 'SC08': 'Beau Vallon', 'USTN': 'Tennessee', 'MK50': 'Kosel', 'DO25': 'Santiago', 'DO24': 'San Pedro De Macoris', 'DO27': 'Valverde', 'DO26': 'Santiago Rodriguez', 'DO21': 'Sanchez Ramirez', 'DO20': 'Samana', 'DO23': 'San Juan', 'DO29': 'Hato Mayor', 'DO28': 'El Seibo', 'SC01': 'Anse aux Pins', 'MK19': 'Cesinovo', 'MK18': 'Centar Zupa', 'MK13': 'Cair', 'MK12': 'Brvenica', 'MK11': 'Bosilovo', 'MK10': 'Bogovinje', 'MK17': 'Centar', 'MK16': 'Cegrane', 'MK15': 'Caska', 'MK14': 'Capari', 'BG33': 'Mikhaylovgrad', 'BG38': 'Blagoevgrad', 'BG39': 'Burgas', 'NZG1': 'Waikato', 'ID11': 'Kalimantan Barat', 'NZG3': 'West Coast', 'NZG2': 'Wellington', 'ID14': 'Kalimantan Timur', 'ID15': 'Lampung', 'ID16': 'Maluku', 'ID17': 'Nusa Tenggara Barat', 'ID18': 'Nusa Tenggara Timur', 'ID19': 'Riau', 'GBU4': 'East Ayrshire', 'SV11': 'Santa Ana', 'HU29': 'Hodmezovasarhely', 'SV13': 'Sonsonate', 'SV14': 'Usulutan', 'GBU1': 'Clackmannanshire', 'GBU2': 'Dumfries and Galloway', 'GBU3': 'Dundee City', 'HU23': 'Veszprem', 'HU22': 'Vas', 'HU21': 'Tolna', 'HU20': 'Jasz-Nagykun-Szolnok', 'HU27': 'Dunaujvaros', 'HU26': 'Bekescsaba', 'HU25': 'Gyor', 'HU24': 'Zala', 'MKC4': 'Zitose', 'DM09': 'Saint Patrick', 'DM08': 'Saint Mark', 'DM05': 'Saint John', 'DM04': 'Saint George', 'DM07': 'Saint Luke', 'DM06': 'Saint Joseph', 'DM03': 'Saint David', 'DM02': 'Saint Andrew', 'SD30': 'Ash Shamaliyah', 'SD31': 'Ash Sharqiyah', 'SA20': 'Al Jawf', 'SD33': 'Darfur', 'SD34': 'Kurdufan', 'SD35': 'Upper Nile', 'SO02': 'Banaadir', 'SO03': 'Bari', 'SO01': 'Bakool', 'SO06': 'Gedo', 'SO07': 'Hiiraan', 'SO04': 'Bay', 'CM07': 'Nord-Ouest', 'CM08': 'Ouest', 'CM09': 'Sud-Ouest', 'SO08': 'Jubbada Dhexe', 'SO09': 'Jubbada Hoose', 'PH51': 'Pangasinan', 'LV28': 'Talsu', 'LV29': 'Tukuma', 'LV20': 'Madonas', 'LV21': 'Ogres', 'LV22': 'Preilu', 'LV23': 'Rezekne', 'LV24': 'Rezeknes', 'LV25': 'Riga', 'LV26': 'Rigas', 'LV27': 'Saldus', 'MC01': 'La Condamine', 'MC02': 'Monaco', 'IR42': 'Khorasan-e Razavi', 'UG56': 'Mubende', 'UG59': 'Ntungamo', 'UG58': 'Nebbi', 'PH59': 'Southern Leyte', 'PH58': 'Sorsogon', 'PG18': 'Sandaun', 'PG19': 'Enga', 'PG10': 'East New Britain', 'PG11': 'East Sepik', 'PG12': 'Madang', 'PG13': 'Manus', 'PG14': 'Morobe', 'PG15': 'New Ireland', 'PG16': 'Western Highlands', 'PG17': 'West New Britain', 'RO41': 'Calarasi', 'RO40': 'Vrancea', 'RO43': 'Ilfov', 'RO42': 'Giurgiu', 'GR18': 'Thesprotia', 'GR19': 'Preveza', 'GR10': 'Grevena', 'GR11': 'Kozani', 'GR12': 'Imathia', 'GR13': 'Thessaloniki', 'GR14': 'Kavala', 'GR15': 'Khalkidhiki', 'GR16': 'Pieria', 'GR17': 'Ioannina', 'USTX': 'Texas', 'GE22': 'Goris Raioni', 'GE23': 'Gurjaanis Raioni', 'GE20': 'Gardabanis Raioni', 'GE21': 'Gori', 'GE26': 'Kaspis Raioni', 'GE27': 'Kharagaulis Raioni', 'GE24': 'Javis Raioni', 'GE25': "K'arelis Raioni", 'IR41': 'Khorasan-e Janubi', 'IR40': 'Yazd', 'GE28': 'Khashuris Raioni', 'GE29': 'Khobis Raioni', 'TR60': 'Tokat', 'TR61': 'Trabzon', 'TR62': 'Tunceli', 'TR63': 'Sanliurfa', 'TR64': 'Usak', 'TR65': 'Van', 'TR66': 'Yozgat', 'TR68': 'Ankara', 'TR69': 'Gumushane', 'BE09': 'West-Vlaanderen', 'BE08': 'Oost-Vlaanderen', 'BE07': 'Namur', 'BE06': 'Luxembourg', 'BE05': 'Limburg', 'BE04': 'Liege', 'BE03': 'Hainaut', 'BE01': 'Antwerpen', 'UZ14': 'Toshkent', 'UZ12': 'Surkhondaryo', 'UZ13': 'Toshkent', 'UZ10': 'Samarqand', 'UZ11': 'Sirdaryo', 'AZ33': 'Mingacevir', 'NG39': 'Jigawa', 'MK26': 'Dobrusevo', 'MK27': 'Dolna Banjica', 'MK24': 'Demir Hisar', 'MK25': 'Demir Kapija', 'MK22': 'Delcevo', 'MK23': 'Delogozdi', 'MK20': 'Cucer-Sandevo', 'MK21': 'Debar', 'MV38': 'Kaafu', 'MV39': 'Lhaviyani', 'MK28': 'Dolneni', 'MK29': 'Dorce Petrov', 'NG30': 'Kwara', 'NG31': 'Niger', 'DZ09': 'Oran', 'NG36': 'Delta', 'GM04': 'Upper River', 'GM05': 'Western', 'GM07': 'North Bank', 'GM01': 'Banjul', 'GM02': 'Lower River', 'GM03': 'Central River', 'CAQC': 'Quebec', 'ID03': 'Bengkulu', 'ID02': 'Bali', 'ID01': 'Aceh', 'ID07': 'Jawa Tengah', 'ID06': 'Jawa Barat', 'ID05': 'Jambi', 'ID04': 'Jakarta Raya', 'CO23': 'Quindio', 'ID09': 'Papua', 'ID08': 'Jawa Timur', 'SV03': 'Chalatenango', 'GBT6': 'Aberdeenshire', 'GBT5': 'Aberdeen City', 'GBT4': 'Strabane', 'GBT3': 'Omagh', 'GBT2': 'North Down', 'GBT1': 'Newtownabbey', 'RU42': 'Leningrad', 'SV09': 'San Miguel', 'SV08': 'Morazan', 'GBT9': 'Scottish Borders', 'GBT8': 'Argyll and Bute', 'MV34': 'Gaafu Alifu', 'MV35': 'Gaafu Dhaalu', 'SIN5': 'Zalec', 'SIN2': 'Videm', 'SIN3': 'Vojnik', 'MKA9': 'Vasilevo', 'SD28': "Al Istiwa'iyah", 'MKA3': 'Suto Orizari', 'MKA2': 'Studenicani', 'MKA1': 'Strumica', 'MKA7': 'Topolcani', 'MKA6': 'Tetovo', 'MKA5': 'Tearce', 'MKA4': 'Sveti Nikole', 'CM13': 'Nord', 'CM12': 'Extreme-Nord', 'CM11': 'Centre', 'CM10': 'Adamaoua', 'SO19': 'Togdheer', 'SO18': 'Nugaal', 'CM14': 'Sud', 'SO14': 'Shabeellaha Hoose', 'SO16': 'Woqooyi Galbeed', 'SO11': 'Nugaal', 'SO10': 'Mudug', 'SO13': 'Shabeellaha Dhexe', 'SO12': 'Sanaag', 'LV33': 'Ventspils', 'LV32': 'Ventspils', 'LV31': 'Valmieras', 'LV30': 'Valkas', 'UG69': 'Katakwi', 'UG66': 'Bugiri', 'UG67': 'Busia', 'UG65': 'Adjumani', 'UG60': 'Pallisa', 'UG61': 'Rakai', 'FRA7': 'Haute-Normandie', 'FRA6': 'Franche-Comte', 'FRA5': 'Corse', 'FRA4': 'Champagne-Ardenne', 'FRA3': 'Centre', 'FRA2': 'Bretagne', 'HU10': 'Hajdu-Bihar', 'HU11': 'Heves', 'FRA9': 'Languedoc-Roussillon', 'FRA8': 'Ile-de-France', 'PG09': 'Eastern Highlands', 'PG08': 'Chimbu', 'PG03': 'Milne Bay', 'PG02': 'Gulf', 'PG01': 'Central', 'PG07': 'North Solomons', 'PG06': 'Western', 'PG05': 'Southern Highlands', 'PG04': 'Northern', 'IN30': 'Arunachal Pradesh', 'IN31': 'Mizoram', 'IN32': 'Daman and Diu', 'VN47': 'Kien Giang', 'IN34': 'Bihar', 'IN35': 'Madhya Pradesh', 'IN36': 'Uttar Pradesh', 'IN37': 'Chhattisgarh', 'IN38': 'Jharkhand', 'IN39': 'Uttarakhand', 'USUT': 'Utah', 'VN43': 'An Giang', 'MD67': 'Causeni', 'OM04': 'Ash Sharqiyah', 'OM05': 'Az Zahirah', 'OM06': 'Masqat', 'OM07': 'Musandam', 'OM01': 'Ad Dakhiliyah', 'OM02': 'Al Batinah', 'OM03': 'Al Wusta', 'OM08': 'Zufar', 'GR09': 'Kastoria', 'GR08': 'Florina', 'PHH2': 'Quezon', 'PHH3': 'Negros Occidental', 'GR03': 'Xanthi', 'GR02': 'Rodhopi', 'GR01': 'Evros', 'GR07': 'Pella', 'GR06': 'Kilkis', 'GR05': 'Serrai', 'GR04': 'Drama', 'GE39': 'Ninotsmindis Raioni', 'GE38': "Mts'khet'is Raioni", 'GE35': 'Marneulis Raioni', 'GE34': 'Lentekhis Raioni', 'GE37': 'Mestiis Raioni', 'GE36': 'Martvilis Raioni', 'GE31': "K'ut'aisi", 'GE30': 'Khonis Raioni', 'GE33': "Lanch'khut'is Raioni", 'GE32': 'Lagodekhis Raioni', 'TR73': 'Nigde', 'TR72': 'Mardin', 'TR71': 'Konya', 'TR70': 'Hakkari', 'TR77': 'Bayburt', 'TR76': 'Batman', 'TR75': 'Aksaray', 'TR74': 'Siirt', 'TR79': 'Kirikkale', 'TR78': 'Karaman', 'IE31': 'Wicklow', 'IE30': 'Wexford', 'UZ09': 'Qoraqalpoghiston', 'UZ08': 'Qashqadaryo', 'UZ01': 'Andijon', 'KM01': 'Anjouan', 'UZ03': 'Farghona', 'UZ02': 'Bukhoro', 'UZ05': 'Khorazm', 'UZ04': 'Jizzakh', 'UZ07': 'Nawoiy', 'UZ06': 'Namangan', 'BW10': 'Southern', 'BW11': 'North-West', 'MK31': 'Dzepciste', 'MK30': 'Drugovo', 'MK33': 'Gevgelija', 'MK32': 'Gazi Baba', 'MK35': 'Gradsko', 'MK34': 'Gostivar', 'MK37': 'Izvor', 'MK36': 'Ilinden', 'MK39': 'Kamenjane', 'MK38': 'Jegunovce', 'RU26': 'Kamchatka', 'ID38': 'Sulawesi Selatan', 'ID39': 'Irian Jaya Barat', 'ID36': 'Papua', 'ID37': 'Riau', 'ID34': 'Gorontalo', 'ID35': 'Kepulauan Bangka Belitung', 'ID32': 'Sumatera Selatan', 'ID33': 'Banten', 'ID30': 'Jawa Barat', 'ID31': 'Sulawesi Utara', 'GBW2': 'Renfrewshire', 'GBW3': 'Shetland Islands', 'GBW1': 'Perth and Kinross', 'GBW6': 'Stirling', 'GBW7': 'West Dunbartonshire', 'GBW4': 'South Ayrshire', 'AZ62': 'Xanlar', 'GBW8': 'Eilean Siar', 'GBW9': 'West Lothian', 'MKB6': 'Vranestica', 'MKB7': 'Vrapciste', 'MKB4': 'Vinica', 'MKB5': 'Vitoliste', 'MKB2': 'Velesta', 'MKB3': 'Vevcani', 'MKB1': 'Veles', 'MKB8': 'Vratnica', 'MKB9': 'Vrutok', 'LV06': 'Daugavpils', 'LV07': 'Daugavpils', 'LV04': 'Bauskas', 'LV05': 'Cesu', 'LV02': 'Aluksnes', 'LV03': 'Balvu', 'LV01': 'Aizkraukles', 'LV08': 'Dobeles', 'LV09': 'Gulbenes', 'UG79': 'Kabarole', 'UG78': 'Iganga', 'DZ50': 'Ouargla', 'UG71': 'Masaka', 'UG70': 'Luwero', 'UG73': 'Nakasongola', 'UG72': 'Moyo', 'UG74': 'Sembabule', 'UG77': 'Arua', 'UG76': 'Tororo', 'HU01': 'Bacs-Kiskun', 'FRB3': 'Midi-Pyrenees', 'HU03': 'Bekes', 'HU02': 'Baranya', 'HU05': 'Budapest', 'HU04': 'Borsod-Abauj-Zemplen', 'HU07': 'Debrecen', 'HU06': 'Csongrad', 'HU09': 'Gyor-Moson-Sopron', 'HU08': 'Fejer', 'FRB8': "Provence-Alpes-Cote d'Azur", 'FRB9': 'Rhone-Alpes', 'DZ54': 'Tindouf', 'GBT7': 'Angus', 'SV02': 'Cabanas', 'DZ56': 'Tissemsilt', 'SV01': 'Ahuachapan', 'CAYT': 'Yukon Territory', 'SV07': 'La Union', 'SV06': 'La Paz', 'SV05': 'La Libertad', 'SI08': 'Brezice', 'SV04': 'Cuscatlan', 'IN23': 'Punjab', 'IN22': 'Puducherry', 'IN21': 'Orissa', 'IN20': 'Nagaland', 'IN26': 'Tripura', 'IN25': 'Tamil Nadu', 'IN24': 'Rajasthan', 'IN29': 'Sikkim', 'IN28': 'West Bengal', 'NZ10': 'Chatham Islands', 'TN14': 'El Kef', 'GR36': 'Argolis', 'GR37': 'Korinthia', 'GR34': 'Evvoia', 'GR35': 'Attiki', 'GR32': 'Fokis', 'GR33': 'Voiotia', 'GR30': 'Evritania', 'GR31': 'Aitolia kai Akarnania', 'GR38': 'Akhaia', 'GR39': 'Ilia', 'USVT': 'Vermont', 'GE48': 'Samtrediis Raioni', 'GE49': 'Senakis Raioni', 'USVA': 'Virginia', 'GE40': 'Onis Raioni', 'GE41': "Ozurget'is Raioni", 'GE42': "P'ot'i", 'GE43': 'Qazbegis Raioni', 'GE44': 'Qvarlis Raioni', 'GE45': "Rust'avi", 'GE46': "Sach'kheris Raioni", 'GE47': 'Sagarejos Raioni', 'TR48': 'Mugla', 'TR49': 'Mus', 'TR46': 'Kahramanmaras', 'TR44': 'Malatya', 'TR45': 'Manisa', 'TR43': 'Kutahya', 'TR40': 'Kirsehir', 'TR41': 'Kocaeli', 'SD29': 'Al Khartum', 'MKA8': 'Valandovo', 'BW09': 'South-East', 'BW08': 'North-East', 'BW05': 'Kgatleng', 'BW04': 'Kgalagadi', 'BW06': 'Kweneng', 'BW01': 'Central', 'BW03': 'Ghanzi', 'VN88': 'Dak Lak', 'SD27': 'Al Wusta', 'ID29': 'Maluku Utara', 'ID28': 'Maluku', 'ID21': 'Sulawesi Tengah', 'ID20': 'Sulawesi Selatan', 'ID23': 'Sulawesi Utara', 'ID22': 'Sulawesi Tenggara', 'ID25': 'Sumatera Selatan', 'ID24': 'Sumatera Barat', 'ID26': 'Sumatera Utara', 'AG01': 'Barbuda', 'AG03': 'Saint George', 'AG04': 'Saint John', 'AG05': 'Saint Mary', 'AG06': 'Saint Paul', 'AG07': 'Saint Peter', 'AG08': 'Saint Philip', 'AG09': 'Redonda', 'GBV7': 'North Ayrshire', 'GBV6': 'Moray', 'GBV1': 'Fife', 'MY08': 'Perlis', 'GBV3': 'Highland', 'GBV2': 'Glasgow City', 'RO06': 'Bistrita-Nasaud', 'CV07': 'Ribeira Grande', 'MKC1': 'Zajas', 'KE01': 'Central', 'KE02': 'Coast', 'KE03': 'Eastern', 'MKC5': 'Zletovo', 'KE05': 'Nairobi Area', 'KE06': 'North-Eastern', 'KE07': 'Nyanza', 'KE08': 'Rift Valley', 'KE09': 'Western', 'LV11': 'Jelgava', 'LV10': 'Jekabpils', 'LV13': 'Jurmala', 'LV12': 'Jelgavas', 'LV15': 'Kuldigas', 'LV14': 'Kraslavas', 'LV17': 'Liepajas', 'LV16': 'Liepaja', 'LV19': 'Ludzas', 'RO09': 'Brasov', 'RO08': 'Braila', 'MN25': 'Orhon', 'MN24': 'Govisumber', 'MN23': 'Darhan-Uul', 'MN22': 'Erdenet', 'MN21': 'Bulgan', 'MN20': 'Ulaanbaatar', 'FRC1': 'Alsace', 'ST01': 'Principe', 'ST02': 'Sao Tome', 'BG50': 'Pleven', 'IN18': 'Meghalaya', 'IN19': 'Karnataka', 'IN16': 'Maharashtra', 'IN17': 'Manipur', 'IN14': 'Lakshadweep', 'IN12': 'Jammu and Kashmir', 'IN13': 'Kerala', 'IN10': 'Haryana', 'IN11': 'Himachal Pradesh', 'HU16': 'Pest', 'USWY': 'Wyoming', 'HU17': 'Somogy', 'USWV': 'West Virginia', 'HU14': 'Nograd', 'HU15': 'Pecs', 'USWI': 'Wisconsin', 'BG58': 'Sofiya', 'HU12': 'Komarom-Esztergom', 'TM02': 'Balkan', 'USWA': 'Washington', 'HU13': 'Miskolc', 'KR18': 'Kwangju-jikhalsi', 'FRA1': 'Bourgogne', 'KR14': 'Kyongsang-bukto', 'KR15': 'Taegu-jikhalsi', 'KR16': 'Cholla-namdo', 'KR17': "Ch'ungch'ong-namdo", 'KR10': 'Pusan-jikhalsi', 'KR11': "Seoul-t'ukpyolsi", 'KR12': "Inch'on-jikhalsi", 'KR13': 'Kyonggi-do', 'PG20': 'National Capital', 'HU18': 'Szabolcs-Szatmar-Bereg', 'HU19': 'Szeged', 'GR21': 'Larisa', 'GR20': 'Arta', 'GR23': 'Kardhitsa', 'GR22': 'Trikala', 'GR25': 'Kerkira', 'GR24': 'Magnisia', 'GR27': 'Kefallinia', 'GR26': 'Levkas', 'GR29': 'Fthiotis', 'GR28': 'Zakinthos', 'GE59': 'Tsalkis Raioni', 'GE58': 'Tsalenjikhis Raioni', 'GE53': "T'erjolis Raioni", 'GE52': "T'elavis Raioni", 'GE51': "T'bilisi", 'GE50': 'Sighnaghis Raioni', 'GE57': "Ts'ageris Raioni", 'GE56': 'Tqibuli', 'GE55': "T'ianet'is Raioni", 'GE54': "T'et'ritsqaros Raioni", 'TR59': 'Tekirdag', 'NA07': 'Karibib', 'BH14': 'Madinat Hamad', 'TR50': 'Nevsehir', 'TR53': 'Rize', 'TR52': 'Ordu', 'TR55': 'Samsun', 'TO02': 'Tongatapu', 'TR57': 'Sinop', 'AT08': 'Vorarlberg', 'NA03': 'Boesmanland', 'NA02': 'Caprivi Oos', 'BH13': 'Ar Rifa', 'AT07': 'Tirol', 'AT06': 'Steiermark', 'NA09': 'Luderitz', 'MV05': 'Laamu', 'AT04': 'Oberosterreich', 'MV01': 'Seenu', 'GBQ8': 'Armagh', 'GBQ9': 'Ballymena', 'GBU7': 'East Renfrewshire', 'GBQ2': 'Wokingham', 'GBQ3': 'Wolverhampton', 'GBQ4': 'Worcestershire', 'GBQ5': 'York', 'GBQ6': 'Antrim', 'GBQ7': 'Ards', 'EE06': 'Kohtla-Jarve', 'EE07': 'Laanemaa', 'EE04': 'Jarvamaa', 'MN18': 'Tov', 'EE05': 'Jogevamaa', 'MN12': 'Hovd', 'EE02': 'Hiiumaa', 'MN10': 'Govi-Altay', 'MN11': 'Hentiy', 'MN16': 'Selenge', 'MN17': 'Suhbaatar', 'MN14': 'Omnogovi', 'MN15': 'Ovorhangay', 'GW02': 'Quinara', 'EE01': 'Harjumaa', 'SB10': 'Central', 'SB11': 'Western', 'SB12': 'Choiseul', 'SB13': 'Rennell and Bellona', 'MV36': 'Haa Alifu', 'IN09': 'Gujarat', 'IN01': 'Andaman and Nicobar Islands', 'IN03': 'Assam', 'IN02': 'Andhra Pradesh', 'IN05': 'Chandigarh', 'BS34': 'Sandy Point', 'IN07': 'Delhi', 'IN06': 'Dadra and Nagar Haveli', 'CY04': 'Nicosia', 'CY05': 'Limassol', 'CY06': 'Paphos', 'IN33': 'Goa', 'CY01': 'Famagusta', 'CY02': 'Kyrenia', 'CY03': 'Larnaca', 'MV30': 'Alifu', 'MG04': 'Toamasina', 'MG05': 'Antananarivo', 'MG06': 'Toliara', 'MG01': 'Antsiranana', 'MG02': 'Fianarantsoa', 'MG03': 'Mahajanga', 'KR06': 'Kangwon-do', 'KR05': "Ch'ungch'ong-bukto", 'KR03': 'Cholla-bukto', 'KR01': 'Cheju-do', 'MV31': 'Baa', 'SR14': 'Nickerie', 'SR15': 'Para', 'SR16': 'Paramaribo', 'SR17': 'Saramacca', 'SR10': 'Brokopondo', 'SR11': 'Commewijne', 'SR12': 'Coronie', 'SR13': 'Marowijne', 'SR18': 'Sipaliwini', 'SR19': 'Wanica', 'MV32': 'Dhaalu', 'MV33': 'Faafu ', 'GE64': 'Zugdidis Raioni', 'GE62': "Zestap'onis Raioni", 'GE63': 'Zugdidi', 'GE60': 'Tsqaltubo', 'GE61': 'Vanis Raioni', 'USPR': 'Puerto Rico', 'USPW': 'Palau', 'USPA': 'Pennsylvania', 'GH10': 'Upper East', 'GH11': 'Upper West', 'GBS7': 'Magherafelt', 'BG63': 'Vidin', 'BG62': 'Veliko Turnovo', 'BG61': 'Varna', 'BG60': 'Turgovishte', 'GBS4': 'Limavady', 'BG65': 'Yambol', 'BG64': 'Vratsa', 'GBS5': 'Lisburn', 'SM04': 'Faetano', 'SM05': 'Fiorentino', 'GBP9': 'Windsor and Maidenhead', 'GBP8': 'Wiltshire', 'GBP3': 'Warwickshire', 'GBP2': 'Warrington', 'GBP1': 'Wandsworth', 'GBS1': 'Dungannon', 'GBP7': 'Wigan', 'GBP6': 'West Sussex', 'GBP5': 'Westminster', 'GBP4': 'West Berkshire', 'DJ01': 'Ali Sabieh', 'DJ06': 'Dikhil', 'DJ07': 'Djibouti', 'DJ04': 'Obock', 'DJ05': 'Tadjoura', 'DJ08': 'Arta', 'LY58': 'Misratah', 'LY59': 'Sawfajjin', 'KH30': 'Pailin', 'NL02': 'Friesland', 'NL03': 'Gelderland', 'NL01': 'Drenthe', 'NL06': 'Noord-Brabant', 'NL07': 'Noord-Holland', 'NL04': 'Groningen', 'NL05': 'Limburg', 'NL08': 'Overijssel', 'NL09': 'Utrecht', 'MN05': 'Darhan', 'MN07': 'Dornogovi', 'MN06': 'Dornod', 'MN01': 'Arhangay', 'MN03': 'Bayan-Olgiy', 'MN02': 'Bayanhongor', 'LR20': 'Lofa', 'MN09': 'Dzavhan', 'MN08': 'Dundgovi', 'NE06': 'Tahoua', 'NE05': 'Niamey', 'JM17': 'Kingston', 'CH26': 'Jura', 'SB07': 'Isabel', 'SB06': 'Guadalcanal', 'SB03': 'Malaita', 'SB09': 'Temotu', 'SB08': 'Makira', 'PE23': 'Tacna', 'PE22': 'San Martin', 'PE21': 'Puno', 'PE20': 'Piura', 'PE25': 'Ucayali', 'PE24': 'Tumbes', 'MD79': 'Leova', 'MD76': 'Glodeni', 'PL79': 'Opolskie', 'PL78': 'Mazowieckie', 'MD77': 'Hincesti', 'PL75': 'Lubelskie', 'PL74': 'Lodzkie', 'PL77': 'Malopolskie', 'PL76': 'Lubuskie', 'MD74': 'Falesti', 'PL73': 'Kujawsko-Pomorskie', 'PL72': 'Dolnoslaskie', 'MD75': 'Floresti', 'MD73': 'Edinet', 'MD70': 'Donduseni', 'BF78': 'Zondoma', 'MD71': 'Drochia', 'SC19': 'Plaisance', 'BN08': 'Belait', 'BN09': 'Brunei and Muara', 'SC18': 'Mont Fleuri', 'BN07': 'Alibori', 'KP12': "P'yongyang-si", 'KP13': 'Yanggang-do', 'KP11': "P'yongan-bukto", 'KP17': 'Hamgyong-bukto', 'KP14': "Namp'o-si", 'KP15': "P'yongan-namdo", 'KP18': 'Najin Sonbong-si', 'SC13': "Grand' Anse", 'SC12': 'Glacis', 'GH01': 'Greater Accra', 'GH03': 'Brong-Ahafo', 'GH02': 'Ashanti', 'GH05': 'Eastern', 'GH04': 'Central', 'GH06': 'Northern', 'GH09': 'Western', 'GH08': 'Volta', 'BG56': 'Sliven', 'BG57': 'Smolyan', 'BG54': 'Shumen', 'BG55': 'Silistra', 'BG52': 'Razgrad', 'BG53': 'Ruse', 'RU90': 'Permskiy Kray', 'BG51': 'Plovdiv', 'TM05': 'Mary', 'TM04': 'Lebap', 'TM01': 'Ahal', 'TM03': 'Dashoguz', 'BG59': 'Stara Zagora', 'SE18': 'Sodermanlands Lan', 'HU28': 'Eger', 'RU91': 'Krasnoyarskiy Kray', 'CN11': 'Hunan', 'HT14': "Grand' Anse", 'KH29': 'Batdambang', 'KH25': 'Banteay Meanchey', 'NL15': 'Overijssel', 'NL16': 'Flevoland', 'NL11': 'Zuid-Holland', 'NL10': 'Zeeland', 'LS18': 'Quthing', 'LS19': 'Thaba-Tseka', 'LS10': 'Berea', 'LS11': 'Butha-Buthe', 'LS12': 'Leribe', 'LS13': 'Mafeteng', 'LS14': 'Maseru', 'LS15': 'Mohales Hoek', 'LS16': 'Mokhotlong', 'LS17': 'Qachas Nek', 'GBS6': 'Derry', 'SM01': 'Acquaviva', 'SM02': 'Chiesanuova', 'SM03': 'Domagnano', 'GBS2': 'Fermanagh', 'GBS3': 'Larne', 'SM06': 'Borgo Maggiore', 'SM07': 'San Marino', 'SM08': 'Monte Giardino', 'SM09': 'Serravalle', 'GBS8': 'Moyle', 'GBS9': 'Newry and Mourne', 'CZ90': 'Zlinsky kraj', 'MD90': 'Taraclia', 'MD91': 'Telenesti', 'MD92': 'Ungheni', 'CN18': 'Guizhou', 'CN19': 'Liaoning', 'CN10': 'Hebei', 'SE10': 'Dalarnas Lan', 'CN12': 'Hubei', 'CN13': 'Xinjiang', 'CN14': 'Xizang', 'CN15': 'Gansu', 'CN16': 'Guangxi', 'PE18': 'Moquegua', 'PE19': 'Pasco', 'PE16': 'Loreto', 'PE17': 'Madre de Dios', 'PE14': 'Lambayeque', 'PE15': 'Lima', 'PE12': 'Junin', 'PE13': 'La Libertad', 'PE10': 'Huanuco', 'PE11': 'Ica'}
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 31553, 11053, 796, 1391, 6, 2937, 7112, 10354, 705, 38576, 1098, 5451, 3256, 705, 52, 56, 2999, 10354, 705, 6090, 417, 1952, 3256, 705, 30758, 2481, 10354, 705, 52,...
2.138893
40,182
_base_config_ = ["base.py"] generator = dict( input_cse=True, use_cse=True ) discriminator=dict( pred_only_cse=False, pred_only_semantic=True ) loss = dict( gan_criterion=dict(type="segmentation", seg_weight=.1) )
[ 62, 8692, 62, 11250, 62, 796, 14631, 8692, 13, 9078, 8973, 198, 198, 8612, 1352, 796, 8633, 7, 198, 220, 220, 220, 5128, 62, 66, 325, 28, 17821, 11, 198, 220, 220, 220, 779, 62, 66, 325, 28, 17821, 198, 8, 198, 15410, 3036, 2090...
2.145455
110
# -*- coding:utf-8 -*- # @author xupingmao <578749341@qq.com> # @since 2020/10/20 00:19:47 # @modified 2020/10/20 00:42:52 import sys sys.path.append("src/python") from mp_encode import * test_compile("assign-number") test_compile("assign-multi") test_compile("if-in")
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 2488, 9800, 2124, 929, 278, 2611, 78, 1279, 3553, 5774, 2920, 33660, 31, 38227, 13, 785, 29, 198, 2, 2488, 20777, 12131, 14, 940, 14, 1238, 3571, 25, 1129, 25, 2857, ...
2.333333
117
from copy import deepcopy from inspect import getfullargspec import importlib import json import os import logging logger = logging.getLogger(__name__) from torch.optim.optimizer import Optimizer from paragen.optim.optimizer import Optimizer from paragen.utils.rate_schedulers import create_rate_scheduler from paragen.utils.runtime import Environment from paragen.utils.registry import setup_registry register_optim, create_optim, registry = setup_registry('optim', Optimizer, force_extend=False) modules_dir = os.path.dirname(__file__) for file in os.listdir(modules_dir): path = os.path.join(modules_dir, file) if ( not file.startswith('_') and not file.startswith('.') and (file.endswith('.py') or os.path.isdir(path)) ): module_name = file[:file.find('.py')] if file.endswith('.py') else file module = importlib.import_module('paragen.optim.' + module_name)
[ 6738, 4866, 1330, 2769, 30073, 198, 6738, 10104, 1330, 651, 12853, 853, 16684, 198, 11748, 1330, 8019, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 19...
2.828221
326
from __future__ import unicode_literals from django.shortcuts import render, redirect from django.http import HttpResponse, HttpResponseRedirect from .models import Events, Gallery, News, Careers, Partners from django.core.mail import send_mail,BadHeaderError from django.conf import settings from.forms import ContactForm from django.contrib import messages
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 31077, 7738, 1060, 198, 6738, 764, ...
3.821053
95
from django.contrib import admin from django_summernote.admin import SummernoteModelAdmin from .models import Event, Speaker admin.site.register(Event, EventAdmin) admin.site.register(Speaker)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 62, 16345, 647, 11295, 13, 28482, 1330, 10216, 11295, 17633, 46787, 198, 6738, 764, 27530, 1330, 8558, 11, 14931, 628, 198, 198, 28482, 13, 15654, 13, 30238, 7, 92...
3.5
56
from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize import sys python_version = sys.version_info[0] setup( name='batch_jaro_winkler', ext_modules=cythonize([Extension('batch_jaro_winkler', ['cbatch_jaro_winkler.pyx'])], language_level=python_version) )
[ 198, 198, 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 6738, 1233, 26791, 13, 2302, 3004, 1330, 27995, 198, 6738, 327, 7535, 13, 15580, 1330, 3075, 400, 261, 1096, 198, 11748, 25064, 198, 198, 29412, 62, 9641, 796, 25064, 13, 9641, 6...
2.839286
112
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/type/postal_address.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='google/type/postal_address.proto', package='google.type', syntax='proto3', serialized_options=_b('\n\017com.google.typeB\022PostalAddressProtoP\001ZFgoogle.golang.org/genproto/googleapis/type/postaladdress;postaladdress\242\002\003GTP'), serialized_pb=_b('\n google/type/postal_address.proto\x12\x0bgoogle.type\"\xfd\x01\n\rPostalAddress\x12\x10\n\x08revision\x18\x01 \x01(\x05\x12\x13\n\x0bregion_code\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\x12\x13\n\x0bpostal_code\x18\x04 \x01(\t\x12\x14\n\x0csorting_code\x18\x05 \x01(\t\x12\x1b\n\x13\x61\x64ministrative_area\x18\x06 \x01(\t\x12\x10\n\x08locality\x18\x07 \x01(\t\x12\x13\n\x0bsublocality\x18\x08 \x01(\t\x12\x15\n\raddress_lines\x18\t \x03(\t\x12\x12\n\nrecipients\x18\n \x03(\t\x12\x14\n\x0corganization\x18\x0b \x01(\tBu\n\x0f\x63om.google.typeB\x12PostalAddressProtoP\x01ZFgoogle.golang.org/genproto/googleapis/type/postaladdress;postaladdress\xa2\x02\x03GTPb\x06proto3') ) _POSTALADDRESS = _descriptor.Descriptor( name='PostalAddress', full_name='google.type.PostalAddress', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='revision', full_name='google.type.PostalAddress.revision', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='region_code', full_name='google.type.PostalAddress.region_code', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.type.PostalAddress.language_code', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='postal_code', full_name='google.type.PostalAddress.postal_code', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sorting_code', full_name='google.type.PostalAddress.sorting_code', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='administrative_area', full_name='google.type.PostalAddress.administrative_area', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='locality', full_name='google.type.PostalAddress.locality', index=6, number=7, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sublocality', full_name='google.type.PostalAddress.sublocality', index=7, number=8, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='address_lines', full_name='google.type.PostalAddress.address_lines', index=8, number=9, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='recipients', full_name='google.type.PostalAddress.recipients', index=9, number=10, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='organization', full_name='google.type.PostalAddress.organization', index=10, number=11, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=50, serialized_end=303, ) DESCRIPTOR.message_types_by_name['PostalAddress'] = _POSTALADDRESS _sym_db.RegisterFileDescriptor(DESCRIPTOR) PostalAddress = _reflection.GeneratedProtocolMessageType('PostalAddress', (_message.Message,), dict( DESCRIPTOR = _POSTALADDRESS, __module__ = 'google.type.postal_address_pb2' # @@protoc_insertion_point(class_scope:google.type.PostalAddress) )) _sym_db.RegisterMessage(PostalAddress) DESCRIPTOR._options = None # @@protoc_insertion_point(module_scope)
[ 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 23645, 14, 4906, 14, 7353, 282, 62, 21975, 13, 1676, 1462, 198, 198, 11748, 25064, 198, 62, 65, 28, 17597, 13, 9641, 62, 10951, 58, 15, ...
2.415334
2,752
from ...data_connector import Connector from os import environ
[ 6738, 2644, 7890, 62, 8443, 273, 1330, 8113, 273, 198, 6738, 28686, 1330, 551, 2268, 628 ]
4
16
import os import torch import numpy as np import math import matplotlib.pyplot as plt from matplotlib import cm from qutip import * import imageio plt.rcParams['axes.labelsize'] = 16 from matplotlib import rc rc('font', **{'family': 'serif', 'serif': ['Computer Modern']}) rc('text', usetex=True) def animate_recon(xt, xm, xe, title=''): """x is [ts,3]""" images = [] for x, label, col in zip([xt, xm, xe],['training dynamics', 'latent neural ode reconstruction','latent neural ode extrapolation' ], ['black','limegreen', 'blue']): for i, v in enumerate(x): bloch = bloch_format(Bloch()) bloch.add_vectors(v) bloch.vector_color =[col] bloch.render() s = x[:i+1] #print(v, s[-1]) bloch.axes.plot(s[:,1], -s[:,0], s[:,2], color=col) if label =='latent neural ode reconstruction': bloch.axes.plot(xt[:,1], -xt[:,0], xt[:,2], color='black') if label =='latent neural ode extrapolation': bloch.axes.plot(xt[:,1], -xt[:,0], xt[:,2], color='black') bloch.axes.plot(xm[:,1], -xm[:,0], xm[:,2], color='limegreen') plt.suptitle(label, fontdict={'color':col}) plt.savefig('exp/temp_file.png') images.append(imageio.imread('exp/temp_file.png')) imageio.mimsave('exp/'+title+'.gif', images, duration=0.05) def animate_traj(xt, title=''): """xt, xm is [ts,3] --> generate gif of both simultaneously""" images = [] for i, vt in enumerate(xt): bloch = bloch_format(Bloch()) bloch.add_vectors(vt) bloch.vector_color =['black'] bloch.render() t = xt[:i+1] bloch.axes.plot(t[:,1], -t[:,0], t[:,2], color='black', label='dynamics') #plt.legend(loc='lower center') #plt.suptitle('latent neural ode --', fontdict={'color':'limegreen'}) #plt.title('True quantum dynamics', fontdict={'color':'black'}) plt.savefig('exp/temp_file.png', bbox_inches='tight') images.append(imageio.imread('exp/temp_file.png')) imageio.mimsave('exp/'+title+'.gif', images, duration=0.05) def animate_recon_(xt, xm, title=''): """xt, xm is [ts,3] --> generate gif of both simultaneously""" images = [] for i, (vt, vm) in enumerate(zip(xt,xm)): bloch = bloch_format(Bloch()) bloch.add_vectors(vt) bloch.add_vectors(vm) bloch.vector_color =['black', 'limegreen'] bloch.render() t = xt[:i+1] m = xm[:i+1] bloch.axes.plot(t[:,1], -t[:,0], t[:,2], color='black', label='train') bloch.axes.plot(m[:,1], -m[:,0], m[:,2], color='limegreen', label='neural ode') #plt.legend(loc='lower center') plt.suptitle('latent neural ode --', fontdict={'color':'limegreen'}) plt.title('True quantum dynamics', fontdict={'color':'black'}) plt.savefig('exp/temp_file.png') images.append(imageio.imread('exp/temp_file.png')) imageio.mimsave('exp/'+title+'.gif', images, duration=0.05) def animate_single_traj(x, title=''): """x is [ts,3]""" images = [] for i, v in enumerate(x): bloch = Bloch() bloch.add_vectors(v) bloch.add_points(v) bloch.render() s = x[:i+1] print(v, s[-1]) bloch.axes.plot(s[:,1], -s[:,0], s[:,2], color='limegreen') plt.savefig('exp/temp_file.png') images.append(imageio.imread('exp/temp_file.png')) imageio.mimsave('exp/traj'+title+'.gif', images, duration=0.125) os.remove('exp/temp_file.png') def construct_gif(xs, title=''): """ constructs a gif of stationary bloch trajectories """ cmap = cm.get_cmap('Greens', len(xs)) cols = cmap(range(len(xs))) images = [] for i, x in enumerate(xs): filename='temp_file.png' plot_traj_bloch(x, filename) images.append(imageio.imread('exp/'+filename)) imageio.mimsave('exp/'+title+'.gif', images, duration=0.5) os.remove('exp/temp_file.png')
[ 11748, 28686, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 1330, 12067, 198, 6738, 10662, 315, 541, 1330, 1635, 198, ...
2.085271
1,935
# State tracking for WireGuard protocol operations. # Author: Peter Wu <peter@lekensteyn.nl> # Licensed under the MIT license <http://opensource.org/licenses/MIT>. import base64 import hashlib import inspect import socket import traceback from noise_wg import NoiseWG, crypto_scalarmult_base, aead_encrypt, aead_decrypt class StateR0(Base): class StateI1(Base): fields = ['Tsend', 'Trecv'] class StateR1(Base): # SpubI and time are not really needed by the handshake, but perhaps this # could serve as debugging aid. fields = ['SpubI', 'time', 'Tsend', 'Trecv'] class Data(Base): class Field: def __init__(self, name, size, constructor=None, fixed=None): self.name = name self.size = size self.fixed = fixed if constructor is None: self._constructor = constructor
[ 2, 1812, 9646, 329, 14712, 24502, 8435, 4560, 13, 198, 2, 6434, 25, 5613, 18027, 1279, 79, 2357, 31, 293, 3464, 4169, 2047, 13, 21283, 29, 198, 2, 49962, 739, 262, 17168, 5964, 1279, 4023, 1378, 44813, 1668, 13, 2398, 14, 677, 4541,...
2.802632
304
from common import Modules, data_strings, load_yara_rules, AndroidParseModule, ModuleMetadata from base64 import b64decode from string import printable Modules.list.append(dendroid())
[ 6738, 2219, 1330, 3401, 5028, 11, 1366, 62, 37336, 11, 3440, 62, 88, 3301, 62, 38785, 11, 5565, 10044, 325, 26796, 11, 19937, 9171, 14706, 198, 6738, 2779, 2414, 1330, 275, 2414, 12501, 1098, 198, 6738, 4731, 1330, 3601, 540, 628, 198...
3.444444
54
import datetime import uuid from django.test import TestCase from mock import patch from requests import ConnectionError from couchforms.analytics import ( app_has_been_submitted_to_in_last_30_days, domain_has_submission_in_last_30_days, get_all_xmlns_app_id_pairs_submitted_to_in_domain, get_exports_by_form, get_first_form_submission_received, get_form_analytics_metadata, get_last_form_submission_received, get_number_of_forms_in_domain, update_analytics_indexes, ) from couchforms.models import XFormInstance, XFormError from pillowtop.es_utils import initialize_index_and_mapping from testapps.test_pillowtop.utils import process_pillow_changes from corehq.apps.es.tests.utils import es_test from corehq.elastic import get_es_new, send_to_elasticsearch from corehq.form_processor.interfaces.processor import FormProcessorInterface from corehq.form_processor.tests.utils import FormProcessorTestUtils from corehq.form_processor.utils import TestFormMetadata from corehq.pillows.mappings.xform_mapping import XFORM_INDEX_INFO from corehq.util.elastic import ensure_index_deleted from corehq.util.test_utils import ( DocTestMixin, disable_quickcache, get_form_ready_to_save, trap_extra_setup, ) TEST_ES_META = { XFORM_INDEX_INFO.index: XFORM_INDEX_INFO }
[ 11748, 4818, 8079, 198, 11748, 334, 27112, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 15290, 1330, 8529, 198, 6738, 7007, 1330, 26923, 12331, 198, 198, 6738, 18507, 23914, 13, 38200, 14094, 1330, 357, 198, 220, ...
2.790698
473
from pydantic.dataclasses import dataclass from ...models import VAEConfig
[ 6738, 279, 5173, 5109, 13, 19608, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 2644, 27530, 1330, 13753, 2943, 261, 5647, 628 ]
3.347826
23
# Parts of code taken from https://www.kaggle.com/aloisiodn/python-3-download-multi-proc-prog-bar-resume by Dourado. # Improvements on the original script: # * you can choose which dataset to download; # * uses threads instead of processes; # * unpacks data into .../label/id.jpg directory structure, which can be used easily via classes in PyTorch; # * performance-relevant parameters are command line arguments. # For performance parameters, the recommended values (from my machine; probably requires tweaking for others) are 100 # connection pools, 128 threads. Not all images with working URLs will be retrieved, but about 90-95% of them will. As # a consequence, to ensure that nearly all images have been downloaded, repeat the script 3-4 times. import argparse import io import json import logging import multiprocessing.pool as pool import pathlib import random import sys import typing import urllib3 import PIL.Image as Image from tqdm import tqdm # Get command line arguments. arg_parser = argparse.ArgumentParser( description='Downloads the data files using the links given in the JSON training, validation, and test files. ' 'Assumes that the files are stored in the directory data/metadata (relative to the current working ' 'directory). Training files will be written to data/training/label_id/image_id.jpg, validation files ' 'will be written to data/validation/label_id/image_id.jpg, and test files will be written to ' 'data/testing/image_id.jpg.') arg_parser.add_argument( '--num-pools', '-p', type=int, default=10, help='Number of connection pools to cache at one time.') arg_parser.add_argument( '--num-workers', '-w', type=int, default=8, help='Number of threads to perform downloads.') arg_parser.add_argument( '--verbose', '-v', action='count', help='Print additional output messages. Can be passed multiple times. Once ' 'prints additional status information, and two or more times prints ' 'debugging information.', default=0) arg_parser.add_argument( '--limit', '-l', type=int, default=sys.maxsize, help='Maximum number of files to download before stopping.') arg_parser.add_argument( '--re-download', action='store_true', default=False, help='Whether to re-download existing files.') arg_parser.add_argument( '--dataset', '-d', type=str, choices={'training', 'validation', 'testing'}, help='Which dataset to download.') parsed_args = arg_parser.parse_args() # Set up logging. urllib3.disable_warnings() LOGGER = logging.getLogger(__name__) STDOUT_HANDLER = logging.StreamHandler(sys.stdout) if parsed_args.verbose == 1: STDOUT_HANDLER.setLevel(logging.INFO) elif parsed_args.verbose >= 2: STDOUT_HANDLER.setLevel(logging.DEBUG) LOGGER.addHandler(STDOUT_HANDLER) LOGGER.setLevel(logging.DEBUG) # Initialize globals. failed_downloads = [] http = urllib3.PoolManager(num_pools=parsed_args.num_pools) training_base_dir = pathlib.Path('data/training') validation_base_dir = pathlib.Path('data/validation') testing_base_dir = pathlib.Path('data/testing') metadata_base_dir = pathlib.Path('data/metadata') with metadata_base_dir.joinpath('train.json').open('r') as training_urls_file: training_urls_json = json.load(training_urls_file) with metadata_base_dir.joinpath('validation.json').open('r') as validation_urls_file: validation_urls_json = json.load(validation_urls_file) with metadata_base_dir.joinpath('test.json').open('r') as testing_urls_file: testing_urls_json = json.load(testing_urls_file) num_training_images = len(training_urls_json['images']) num_validation_images = len(validation_urls_json['images']) num_testing_images = len(testing_urls_json['images']) LOGGER.info('{} training images, {} validation images, and {} testing images.'.format( num_training_images, num_validation_images, num_testing_images)) thread_pool = pool.ThreadPool(processes=parsed_args.num_workers) if parsed_args.dataset == 'training': training_image_info = [] for image_info, annotation_info in zip(training_urls_json['images'], training_urls_json['annotations']): training_image_info.append((image_info['url'][0], image_info['image_id'], annotation_info['label_id'], training_base_dir)) random.shuffle(training_image_info) with tqdm(total=len(training_image_info), desc='Training images') as t: for i, _ in enumerate(thread_pool.imap_unordered(download_labeled_image, training_image_info)): t.update(1) if i >= parsed_args.limit: break elif parsed_args.dataset == 'validation': validation_image_info = [] for image_info, annotation_info in zip(validation_urls_json['images'], validation_urls_json['annotations']): validation_image_info.append((image_info['url'][0], image_info['image_id'], annotation_info['label_id'], validation_base_dir)) random.shuffle(validation_image_info) with tqdm(total=len(validation_image_info), desc='Validation images') as t: for i, _ in enumerate(thread_pool.imap_unordered(download_labeled_image, validation_image_info)): t.update(1) if i >= parsed_args.limit: break elif parsed_args.dataset == 'testing': testing_image_info = [] for image_info in testing_urls_json['images']: testing_image_info.append((image_info['url'][0], image_info['image_id'], testing_base_dir)) random.shuffle(testing_image_info) with tqdm(total=len(testing_image_info), desc='Testing images') as t: for i, _ in enumerate(thread_pool.imap_unordered(download_unlabeled_image, testing_image_info)): t.update(1) if i >= parsed_args.limit: break LOGGER.info('{} images could not be retrieved.'.format(len(failed_downloads)))
[ 2, 22349, 286, 2438, 2077, 422, 3740, 1378, 2503, 13, 74, 9460, 293, 13, 785, 14, 7335, 271, 2101, 77, 14, 29412, 12, 18, 12, 15002, 12, 41684, 12, 36942, 12, 1676, 70, 12, 5657, 12, 411, 2454, 416, 360, 454, 4533, 13, 198, 2, ...
2.721386
2,193
""" Function def function_name(arg1, arg2, ...) : <op 1> <op 2> ... Function with undefined amount of input def fn_name(*args) --> args' elements make tuple. kwargs = Keyword Parameter >>> def print_kwargs(**kwargs): ... print(kwargs) ... >>> print_kwargs(a=1) {'a':1} >>> print_kwargs(name='foo', age=3) {'age':3, 'name':'foo'} **args_name = make args_name as a dictionary clearing & assignment : element should be added in the last part of args Lambda : another method to make fn lambda arg1, arg2, .. : operation_of_fn >>> add = lambda a,b : a+b >>> result = add(3,4) >>> print(result) 7 lambda can return result with out expression 'return' Contents Source : https://wikidocs.net/24 """
[ 37811, 198, 22203, 198, 220, 220, 220, 825, 2163, 62, 3672, 7, 853, 16, 11, 1822, 17, 11, 2644, 8, 1058, 198, 220, 220, 220, 220, 220, 220, 220, 1279, 404, 352, 29, 198, 220, 220, 220, 220, 220, 220, 220, 1279, 404, 362, 29, 1...
2.492114
317
all import tweepy, config, users, re, groupy from tweepy import OAuthHandler from tweepy import API print(tweepy.__version__) auth = OAuthHandler(config.consumer_key, config.consumer_secret) auth.set_access_token(config.access_token,config.access_token_secret) api = tweepy.API(auth) from groupy.client import Client client = Client.from_token(config.groupme_token) exp = r'\$([A-Z]{3,4})' one = [] two = [] three = [] all = [] #mrzackmorris for user in users.list[:1]: userID = user tweets = api.user_timeline(screen_name=userID,count=100, include_rts = False, tweet_mode='extended') for info in tweets: if re.findall(exp,info.full_text): for ticker in re.findall(exp,info.full_text): if ticker not in one: one.append(ticker) # print(user, " mentioned ", re.findall(exp,info.full_text)) print(user, "mentioned", one) #pharmdca for user in users.list[1:2]: userID = user tweets = api.user_timeline(screen_name=userID,count=100, include_rts = False, tweet_mode='extended') for info in tweets: if re.findall(exp,info.full_text): for ticker in re.findall(exp,info.full_text): if ticker not in two: two.append(ticker) # print(user, " mentioned ", re.findall(exp,info.full_text)) print(user, "mentioned", two) #ripster47 for user in users.list[2:3]: userID = user tweets = api.user_timeline(screen_name=userID,count=100, include_rts = False, tweet_mode='extended') for info in tweets: if re.findall(exp,info.full_text): for ticker in re.findall(exp,info.full_text): if ticker not in three: three.append(ticker) # print(user, " mentioned ", re.findall(exp,info.full_text)) print(user, "mentioned", three) a_set = set(one) b_set = set(two) c_set = set(three) if (a_set & b_set & c_set): all.append(a_set & b_set & c_set) print("All 3 mentioned ", all) messenger(all) else: print("Nothing Notable")
[ 439, 198, 11748, 4184, 538, 88, 11, 4566, 11, 2985, 11, 302, 11, 1448, 88, 198, 6738, 4184, 538, 88, 1330, 440, 30515, 25060, 198, 6738, 4184, 538, 88, 1330, 7824, 198, 4798, 7, 83, 732, 538, 88, 13, 834, 9641, 834, 8, 198, 1843...
2.210913
953
""" ---OK--- """ from collections import OrderedDict import copy import numpy as np from crystalpy.examples.Values import Interval
[ 37811, 198, 6329, 11380, 6329, 198, 37811, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 4866, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 15121, 9078, 13, 1069, 12629, 13, 40161, 1330, 4225, 2100, 628 ]
3.435897
39
from .usersim_rule import * from .realUser import *
[ 6738, 764, 18417, 320, 62, 25135, 1330, 1635, 198, 6738, 764, 5305, 12982, 1330, 1635 ]
3.4
15
import os import logging import shutil import zipfile import xmltodict from lxml import etree from osgeo import ogr, osr from django.core.exceptions import ValidationError from django.db import models, transaction from django.utils.html import strip_tags from django.template import Template, Context from dominate.tags import legend, table, tbody, tr, th, div from hs_core.models import Title, CoreMetaData from hs_core.hydroshare import utils from hs_core.forms import CoverageTemporalForm from hs_core.signals import post_add_geofeature_aggregation from hs_geographic_feature_resource.models import GeographicFeatureMetaDataMixin, \ OriginalCoverage, GeometryInformation, FieldInformation from base import AbstractFileMetaData, AbstractLogicalFile, FileTypeContext UNKNOWN_STR = "unknown" def extract_metadata_and_files(resource, res_file, file_type=True): """ validates shape files and extracts metadata :param resource: an instance of BaseResource :param res_file: an instance of ResourceFile :param file_type: A flag to control if extraction being done for file type or resource type :return: a dict of extracted metadata, a list file paths of shape related files on the temp directory, a list of resource files retrieved from iRODS for this processing """ shape_files, shp_res_files = get_all_related_shp_files(resource, res_file, file_type=file_type) temp_dir = os.path.dirname(shape_files[0]) if not _check_if_shape_files(shape_files): if res_file.extension.lower() == '.shp': err_msg = "There was a problem parsing the component files associated with " \ "{folder_path} as a geographic shapefile. This may be because a component " \ "file is corrupt or missing. The .shp, .shx, and .dbf shapefile component " \ "files are required. Other shapefile component files " \ "(.cpg, .prj, .sbn, .sbx, .xml, .fbn, .fbx, .ain, .aih, .atx, .ixs, .mxs) " \ "should also be added where available." err_msg = err_msg.format(folder_path=res_file.short_path) else: err_msg = "One or more dependent shape files are missing in the selected zip file " \ "or one or more files are not of shape file type." if os.path.isdir(temp_dir): shutil.rmtree(temp_dir) raise ValidationError(err_msg) shp_file = '' for f in shape_files: if f.lower().endswith('.shp'): shp_file = f break try: meta_dict = extract_metadata(shp_file_full_path=shp_file) return meta_dict, shape_files, shp_res_files except Exception as ex: # remove temp dir if os.path.isdir(temp_dir): shutil.rmtree(temp_dir) if file_type: msg = "GeoFeature file type. Error when setting file type. Error:{}" else: msg = "Failed to parse the .shp file. Error{}" msg = msg.format(ex.message) raise ValidationError(msg) def add_metadata(resource, metadata_dict, xml_file, logical_file=None): """ creates/updates metadata at resource and file level :param resource: an instance of BaseResource :param metadata_dict: dict containing extracted metadata :param xml_file: file path (on temp directory) of the xml file that is part of the geo feature files :param logical_file: an instance of GeoFeatureLogicalFile if metadata needs to be part of the logical file :return: """ # populate resource and logical file level metadata target_obj = logical_file if logical_file is not None else resource if "coverage" in metadata_dict.keys(): coverage_dict = metadata_dict["coverage"]['Coverage'] target_obj.metadata.coverages.all().filter(type='box').delete() target_obj.metadata.create_element('coverage', type=coverage_dict['type'], value=coverage_dict['value']) originalcoverage_dict = metadata_dict["originalcoverage"]['originalcoverage'] if target_obj.metadata.originalcoverage is not None: target_obj.metadata.originalcoverage.delete() target_obj.metadata.create_element('originalcoverage', **originalcoverage_dict) field_info_array = metadata_dict["field_info_array"] target_obj.metadata.fieldinformations.all().delete() for field_info in field_info_array: field_info_dict = field_info["fieldinformation"] target_obj.metadata.create_element('fieldinformation', **field_info_dict) geometryinformation_dict = metadata_dict["geometryinformation"] if target_obj.metadata.geometryinformation is not None: target_obj.metadata.geometryinformation.delete() target_obj.metadata.create_element('geometryinformation', **geometryinformation_dict) if xml_file: shp_xml_metadata_list = parse_shp_xml(xml_file) for shp_xml_metadata in shp_xml_metadata_list: if 'description' in shp_xml_metadata: # overwrite existing description metadata - at the resource level if not resource.metadata.description: abstract = shp_xml_metadata['description']['abstract'] resource.metadata.create_element('description', abstract=abstract) elif 'title' in shp_xml_metadata: title = shp_xml_metadata['title']['value'] title_element = resource.metadata.title if title_element.value.lower() == 'untitled resource': resource.metadata.update_element('title', title_element.id, value=title) if logical_file is not None: logical_file.dataset_name = title logical_file.save() elif 'subject' in shp_xml_metadata: # append new keywords to existing keywords - at the resource level existing_keywords = [subject.value.lower() for subject in resource.metadata.subjects.all()] keyword = shp_xml_metadata['subject']['value'] if keyword.lower() not in existing_keywords: resource.metadata.create_element('subject', value=keyword) # add keywords at the logical file level if logical_file is not None: if keyword not in logical_file.metadata.keywords: logical_file.metadata.keywords += [keyword] logical_file.metadata.save() def get_all_related_shp_files(resource, selected_resource_file, file_type): """ This helper function copies all the related shape files to a temp directory and return a list of those temp file paths as well as a list of existing related resource file objects :param resource: an instance of BaseResource to which the *selecetd_resource_file* belongs :param selected_resource_file: an instance of ResourceFile selected by the user to set GeoFeaureFile type (the file must be a .shp or a .zip file) :param file_type: a flag (True/False) to control resource VS file type actions :return: a list of temp file paths for all related shape files, and a list of corresponding resource file objects """ shape_temp_files = [] shape_res_files = [] temp_dir = '' if selected_resource_file.extension.lower() == '.shp': for f in resource.files.all(): if f.file_folder == selected_resource_file.file_folder: if f.extension.lower() == '.xml' and not f.file_name.lower().endswith('.shp.xml'): continue if f.extension.lower() in GeoFeatureLogicalFile.get_allowed_storage_file_types(): collect_shape_resource_files(f) for f in shape_res_files: temp_file = utils.get_file_from_irods(f) if not temp_dir: temp_dir = os.path.dirname(temp_file) else: file_temp_dir = os.path.dirname(temp_file) dst_dir = os.path.join(temp_dir, os.path.basename(temp_file)) shutil.copy(temp_file, dst_dir) shutil.rmtree(file_temp_dir) temp_file = dst_dir shape_temp_files.append(temp_file) elif selected_resource_file.extension.lower() == '.zip': temp_file = utils.get_file_from_irods(selected_resource_file) temp_dir = os.path.dirname(temp_file) if not zipfile.is_zipfile(temp_file): if os.path.isdir(temp_dir): shutil.rmtree(temp_dir) raise ValidationError('Selected file is not a zip file') zf = zipfile.ZipFile(temp_file, 'r') zf.extractall(temp_dir) zf.close() for dirpath, _, filenames in os.walk(temp_dir): for name in filenames: if name == selected_resource_file.file_name: # skip the user selected zip file continue file_path = os.path.abspath(os.path.join(dirpath, name)) shape_temp_files.append(file_path) shape_res_files.append(selected_resource_file) return shape_temp_files, shape_res_files def _check_if_shape_files(files, temp_files=True): """ checks if the list of file temp paths in *files* are part of shape files must have all these file extensions: (shp, shx, dbf) :param files: list of files located in temp directory in django if temp_file is True, otherwise list of resource files are from django db :param temp_files: a flag to treat list of files *files* as temp files or not :return: True/False """ # Note: this is the original function (check_fn_for_shp) in geo feature resource receivers.py # used by is_shapefiles # at least needs to have 3 mandatory files: shp, shx, dbf if len(files) >= 3: # check that there are no files with same extension if temp_files: # files are on temp directory file_extensions = set([os.path.splitext(os.path.basename(f).lower())[1] for f in files]) else: # files are in db file_extensions = set([f.extension.lower() for f in files]) if len(file_extensions) != len(files): return False # check if there is the xml file xml_file = '' for f in files: if temp_files: # files are on temp directory if f.lower().endswith('.shp.xml'): xml_file = f else: # files are in db if f.file_name.lower().endswith('.shp.xml'): xml_file = f if temp_files: # files are on temp directory file_names = set([os.path.splitext(os.path.basename(f))[0] for f in files if not f.lower().endswith('.shp.xml')]) else: # files are in db file_names = set([os.path.splitext(os.path.basename(f.file_name))[0] for f in files if not f.file_name.lower().endswith('.shp.xml')]) if len(file_names) > 1: # file names are not the same return False # check if xml file name matches with other file names if xml_file: # -8 for '.shp.xml' if temp_files: # files are on temp directory xml_file_name = os.path.basename(xml_file) else: # files are in db xml_file_name = xml_file.file_name if xml_file_name[:-8] not in file_names: return False for ext in file_extensions: if ext not in GeoFeatureLogicalFile.get_allowed_storage_file_types(): return False for ext in ('.shp', '.shx', '.dbf'): if ext not in file_extensions: return False else: return False # test if we can open the shp file if temp_files: # files are on temp directory shp_file = [f for f in files if f.lower().endswith('.shp')][0] driver = ogr.GetDriverByName('ESRI Shapefile') dataset = driver.Open(shp_file) if dataset is None: return False dataset = None return True def extract_metadata(shp_file_full_path): """ Collects metadata from a .shp file specified by *shp_file_full_path* :param shp_file_full_path: :return: returns a dict of collected metadata """ try: metadata_dict = {} # wgs84 extent parsed_md_dict = parse_shp(shp_file_full_path) if parsed_md_dict["wgs84_extent_dict"]["westlimit"] != UNKNOWN_STR: wgs84_dict = parsed_md_dict["wgs84_extent_dict"] # if extent is a point, create point type coverage if wgs84_dict["westlimit"] == wgs84_dict["eastlimit"] \ and wgs84_dict["northlimit"] == wgs84_dict["southlimit"]: coverage_dict = {"Coverage": {"type": "point", "value": { "east": wgs84_dict["eastlimit"], "north": wgs84_dict["northlimit"], "units": wgs84_dict["units"], "projection": wgs84_dict["projection"] }}} else: # otherwise, create box type coverage coverage_dict = {"Coverage": {"type": "box", "value": parsed_md_dict["wgs84_extent_dict"]}} metadata_dict["coverage"] = coverage_dict # original extent original_coverage_dict = {} original_coverage_dict["originalcoverage"] = {"northlimit": parsed_md_dict ["origin_extent_dict"]["northlimit"], "southlimit": parsed_md_dict ["origin_extent_dict"]["southlimit"], "westlimit": parsed_md_dict ["origin_extent_dict"]["westlimit"], "eastlimit": parsed_md_dict ["origin_extent_dict"]["eastlimit"], "projection_string": parsed_md_dict ["origin_projection_string"], "projection_name": parsed_md_dict["origin_projection_name"], "datum": parsed_md_dict["origin_datum"], "unit": parsed_md_dict["origin_unit"] } metadata_dict["originalcoverage"] = original_coverage_dict # field field_info_array = [] field_name_list = parsed_md_dict["field_meta_dict"]['field_list'] for field_name in field_name_list: field_info_dict_item = {} field_info_dict_item['fieldinformation'] = \ parsed_md_dict["field_meta_dict"]["field_attr_dict"][field_name] field_info_array.append(field_info_dict_item) metadata_dict['field_info_array'] = field_info_array # geometry geometryinformation = {"featureCount": parsed_md_dict["feature_count"], "geometryType": parsed_md_dict["geometry_type"]} metadata_dict["geometryinformation"] = geometryinformation return metadata_dict except: raise ValidationError("Parsing of shapefiles failed!") def parse_shp(shp_file_path): """ :param shp_file_path: full file path fo the .shp file output dictionary format shp_metadata_dict["origin_projection_string"]: original projection string shp_metadata_dict["origin_projection_name"]: origin_projection_name shp_metadata_dict["origin_datum"]: origin_datum shp_metadata_dict["origin_unit"]: origin_unit shp_metadata_dict["field_meta_dict"]["field_list"]: list [fieldname1, fieldname2...] shp_metadata_dict["field_meta_dict"]["field_attr_dic"]: dict {"fieldname": dict { "fieldName":fieldName, "fieldTypeCode":fieldTypeCode, "fieldType":fieldType, "fieldWidth:fieldWidth, "fieldPrecision:fieldPrecision" } } shp_metadata_dict["feature_count"]: feature count shp_metadata_dict["geometry_type"]: geometry_type shp_metadata_dict["origin_extent_dict"]: dict{"west": east, "north":north, "east":east, "south":south} shp_metadata_dict["wgs84_extent_dict"]: dict{"west": east, "north":north, "east":east, "south":south} """ shp_metadata_dict = {} # read shapefile driver = ogr.GetDriverByName('ESRI Shapefile') dataset = driver.Open(shp_file_path) # get layer layer = dataset.GetLayer() # get spatialRef from layer spatialRef_from_layer = layer.GetSpatialRef() if spatialRef_from_layer is not None: shp_metadata_dict["origin_projection_string"] = str(spatialRef_from_layer) prj_name = spatialRef_from_layer.GetAttrValue('projcs') if prj_name is None: prj_name = spatialRef_from_layer.GetAttrValue('geogcs') shp_metadata_dict["origin_projection_name"] = prj_name shp_metadata_dict["origin_datum"] = spatialRef_from_layer.GetAttrValue('datum') shp_metadata_dict["origin_unit"] = spatialRef_from_layer.GetAttrValue('unit') else: shp_metadata_dict["origin_projection_string"] = UNKNOWN_STR shp_metadata_dict["origin_projection_name"] = UNKNOWN_STR shp_metadata_dict["origin_datum"] = UNKNOWN_STR shp_metadata_dict["origin_unit"] = UNKNOWN_STR field_list = [] filed_attr_dic = {} field_meta_dict = {"field_list": field_list, "field_attr_dict": filed_attr_dic} shp_metadata_dict["field_meta_dict"] = field_meta_dict # get Attributes layerDefinition = layer.GetLayerDefn() for i in range(layerDefinition.GetFieldCount()): fieldName = layerDefinition.GetFieldDefn(i).GetName() field_list.append(fieldName) attr_dict = {} field_meta_dict["field_attr_dict"][fieldName] = attr_dict attr_dict["fieldName"] = fieldName fieldTypeCode = layerDefinition.GetFieldDefn(i).GetType() attr_dict["fieldTypeCode"] = fieldTypeCode fieldType = layerDefinition.GetFieldDefn(i).GetFieldTypeName(fieldTypeCode) attr_dict["fieldType"] = fieldType fieldWidth = layerDefinition.GetFieldDefn(i).GetWidth() attr_dict["fieldWidth"] = fieldWidth fieldPrecision = layerDefinition.GetFieldDefn(i).GetPrecision() attr_dict["fieldPrecision"] = fieldPrecision # get layer extent layer_extent = layer.GetExtent() # get feature count featureCount = layer.GetFeatureCount() shp_metadata_dict["feature_count"] = featureCount # get a feature from layer feature = layer.GetNextFeature() # get geometry from feature geom = feature.GetGeometryRef() # get geometry name shp_metadata_dict["geometry_type"] = geom.GetGeometryName() # reproject layer extent # source SpatialReference source = spatialRef_from_layer # target SpatialReference target = osr.SpatialReference() target.ImportFromEPSG(4326) # create two key points from layer extent left_upper_point = ogr.Geometry(ogr.wkbPoint) left_upper_point.AddPoint(layer_extent[0], layer_extent[3]) # left-upper right_lower_point = ogr.Geometry(ogr.wkbPoint) right_lower_point.AddPoint(layer_extent[1], layer_extent[2]) # right-lower # source map always has extent, even projection is unknown shp_metadata_dict["origin_extent_dict"] = {} shp_metadata_dict["origin_extent_dict"]["westlimit"] = layer_extent[0] shp_metadata_dict["origin_extent_dict"]["northlimit"] = layer_extent[3] shp_metadata_dict["origin_extent_dict"]["eastlimit"] = layer_extent[1] shp_metadata_dict["origin_extent_dict"]["southlimit"] = layer_extent[2] # reproject to WGS84 shp_metadata_dict["wgs84_extent_dict"] = {} if source is not None: # define CoordinateTransformation obj transform = osr.CoordinateTransformation(source, target) # project two key points left_upper_point.Transform(transform) right_lower_point.Transform(transform) shp_metadata_dict["wgs84_extent_dict"]["westlimit"] = left_upper_point.GetX() shp_metadata_dict["wgs84_extent_dict"]["northlimit"] = left_upper_point.GetY() shp_metadata_dict["wgs84_extent_dict"]["eastlimit"] = right_lower_point.GetX() shp_metadata_dict["wgs84_extent_dict"]["southlimit"] = right_lower_point.GetY() shp_metadata_dict["wgs84_extent_dict"]["projection"] = "WGS 84 EPSG:4326" shp_metadata_dict["wgs84_extent_dict"]["units"] = "Decimal degrees" else: shp_metadata_dict["wgs84_extent_dict"]["westlimit"] = UNKNOWN_STR shp_metadata_dict["wgs84_extent_dict"]["northlimit"] = UNKNOWN_STR shp_metadata_dict["wgs84_extent_dict"]["eastlimit"] = UNKNOWN_STR shp_metadata_dict["wgs84_extent_dict"]["southlimit"] = UNKNOWN_STR shp_metadata_dict["wgs84_extent_dict"]["projection"] = UNKNOWN_STR shp_metadata_dict["wgs84_extent_dict"]["units"] = UNKNOWN_STR return shp_metadata_dict def parse_shp_xml(shp_xml_full_path): """ Parse ArcGIS 10.X ESRI Shapefile Metadata XML. file to extract metadata for the following elements: title abstract keywords :param shp_xml_full_path: Expected fullpath to the .shp.xml file :return: a list of metadata dict """ metadata = [] try: if os.path.isfile(shp_xml_full_path): with open(shp_xml_full_path) as fd: xml_dict = xmltodict.parse(fd.read()) dataIdInfo_dict = xml_dict['metadata']['dataIdInfo'] if 'idCitation' in dataIdInfo_dict: if 'resTitle' in dataIdInfo_dict['idCitation']: if '#text' in dataIdInfo_dict['idCitation']['resTitle']: title_value = dataIdInfo_dict['idCitation']['resTitle']['#text'] else: title_value = dataIdInfo_dict['idCitation']['resTitle'] title_max_length = Title._meta.get_field('value').max_length if len(title_value) > title_max_length: title_value = title_value[:title_max_length-1] title = {'title': {'value': title_value}} metadata.append(title) if 'idAbs' in dataIdInfo_dict: description_value = strip_tags(dataIdInfo_dict['idAbs']) description = {'description': {'abstract': description_value}} metadata.append(description) if 'searchKeys' in dataIdInfo_dict: searchKeys_dict = dataIdInfo_dict['searchKeys'] if 'keyword' in searchKeys_dict: keyword_list = [] if type(searchKeys_dict["keyword"]) is list: keyword_list += searchKeys_dict["keyword"] else: keyword_list.append(searchKeys_dict["keyword"]) for k in keyword_list: metadata.append({'subject': {'value': k}}) except Exception: # Catch any exception silently and return an empty list # Due to the variant format of ESRI Shapefile Metadata XML # among different ArcGIS versions, an empty list will be returned # if any exception occurs metadata = [] finally: return metadata
[ 11748, 28686, 198, 11748, 18931, 198, 11748, 4423, 346, 198, 11748, 19974, 7753, 198, 11748, 2124, 76, 2528, 375, 713, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 198, 6738, 28686, 469, 78, 1330, 267, 2164, 11, 267, 27891, 198, 198, ...
2.146637
11,566
import unittest from iptree import IPNode
[ 11748, 555, 715, 395, 198, 198, 6738, 1312, 457, 631, 1330, 6101, 19667, 628 ]
3.142857
14
# Python - 3.4.3 Test.it('Basic Tests') Test.assert_equals(invert([1, 2, 3, 4, 5]), [-1, -2, -3, -4, -5]) Test.assert_equals(invert([1, -2, 3, -4, 5]), [-1, 2, -3, 4, -5]) Test.assert_equals(invert([]), [])
[ 2, 11361, 532, 513, 13, 19, 13, 18, 198, 198, 14402, 13, 270, 10786, 26416, 30307, 11537, 198, 14402, 13, 30493, 62, 4853, 874, 7, 259, 1851, 26933, 16, 11, 362, 11, 513, 11, 604, 11, 642, 46570, 25915, 16, 11, 532, 17, 11, 532,...
1.980952
105
import csv import random import warnings import os from locust import HttpUser, task, between body = { "campaignid":"5kXk20gGDISJdM5el5IT", "walletamount":"0" } header = { "Host": "fkhapi.sastasundar.com", "Apptype": "N", "Appversion": "4.0.4", "Appversioncode": "109", "Deviceid": "81653dce-0dd2-4201-8916-4aecbdd89269", "Devicedensity": "320", "Devicedensitytype": "xhdpi", "Deviceheight": "1184", "Devicewidth": "768", "Devicename": "Unknown Google Nexus 4", "Deviceosinfo": "5.1", "Networkinfo": "Wifi", "Accesstoken": "PDWZ5pStjE", "Refdeviceid": "4dd29c0f2f8d1842", "Userid": "4937724", "Pincode": "700120", "Is_panindia": "0", "Warehouse_id": "1", "Content-Type": "application/json", "Content-Length": "56", "Accept-Encoding": "gzip, deflate", "User-Agent": "okhttp/5.0.0-alpha.2" }
[ 11748, 269, 21370, 198, 11748, 4738, 198, 11748, 14601, 198, 11748, 28686, 198, 198, 6738, 1179, 436, 1330, 367, 29281, 12982, 11, 4876, 11, 1022, 198, 198, 2618, 796, 1391, 198, 220, 220, 220, 366, 35012, 312, 2404, 20, 74, 55, 74, ...
2.116667
420
"""Contains the grid class to create multiple figures.""" from typing import Optional, Tuple from .figure import Figure import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt
[ 37811, 4264, 1299, 262, 10706, 1398, 284, 2251, 3294, 5538, 526, 15931, 198, 198, 6738, 19720, 1330, 32233, 11, 309, 29291, 198, 6738, 764, 26875, 1330, 11291, 198, 11748, 2603, 29487, 8019, 13, 2164, 2340, 43106, 355, 50000, 43106, 198, ...
3.784314
51
# Copyright 2021 The ParallelAccel 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 # # https://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. # ============================================================================== """This module provides types definitions.""" import dataclasses import enum import json import time from typing import Any, Dict, List, Optional, Union import uuid import linear_algebra import marshmallow import marshmallow_dataclass import marshmallow_enum ##################################### # Utility functions # ##################################### def decode( schema: marshmallow.Schema, data: str, **kwargs ) -> dataclasses.dataclass: """Decodes input string using provided schema. Args: schema: Schema to be used for deserialization. data: JSON-encoded data to be deserialized. **kwargs: Extra keyworded arguments to be passed to `marshmallow.Schemas.loads` method. Returns: Deserialized `dataclasses.dataclass` object. """ return schema.loads(data, **kwargs) def encode( schema: marshmallow.Schema, data: dataclasses.dataclass, **kwargs ) -> str: """Encodes input data using provided schema. Args: schema: Schema to be used for serialization. data: Dataclass object to be serialized. **kwargs: Extra keyworded arguments to be passed to `marshmallow.Schemas.dumps` method. Returns: JSON-encoded serialized data. """ return schema.dumps(data, separators=(",", ":"), **kwargs) ##################################### # Types aliases # ##################################### OperatorsType = List[linear_algebra.ops.ProbBasisAxisSum] ##################################### # marshmallow helpers # ##################################### _SerializedLinearAlgebraObject = Dict[str, Any] _SerializedProbBasisAxisSums = List[List[Dict[str, Any]]] # `linear_algebra` offers only functions to dump and load objects from the JSON encoded # string, and does not support builtin dict objects. When we call json.dumps() # over already JSON encoded string, all quotation marks and brackets are # prefixed with the backslash. Instead, we can convert JSON object to the dict # type and reduce serialized object size. def _deserialize_linear_algebra_object(data: _SerializedLinearAlgebraObject) -> Any: """Deserializes linear_algebra object from dict type. Since `linear_algebra` does not provide function to load objects from builtin dict objects, we need some workaround here: first we dump the dict object into JSON encoded string, then parse them into `linear_algebra` object. Args: data: Dict encoded linear_algebra object. Returns: Deserialized linear_algebra object. """ return linear_algebra.read_json(json_text=json.dumps(data)) def _serialize_linear_algebra_object(obj: Any) -> _SerializedLinearAlgebraObject: """Serializes linear_algebra object to dict type. Since `linear_algebra` does not provide function to dump objects into builtin dict objects, we need some workaround here: first we dump the `linear_algebra` object into JSON encoded string, then parsing them into dict object. Args: data: linear_algebra object to be encoded. Returns: Serialized linear_algebra object. """ return json.loads(linear_algebra.to_json(obj)) Graph = marshmallow_dataclass.NewType( "Graph", linear_algebra.Graph, field=_LinearAlgebraField ) Operators = marshmallow_dataclass.NewType( "Operators", OperatorsType, field=_OperatorsField ) ParamResolver = marshmallow_dataclass.NewType( "ParamResolver", linear_algebra.ParamResolver, field=_LinearAlgebraField ) Result = marshmallow_dataclass.NewType("Result", linear_algebra.Result, field=_LinearAlgebraField) Sweepable = marshmallow_dataclass.NewType( "Sweepable", linear_algebra.study.Sweepable, field=_LinearAlgebraField ) ##################################### # Server side events # ##################################### ##################################### # API relevant types # ##################################### ##################################### # Jobs relevant types # ##################################### class JobStatus(enum.IntEnum): """Current job status. Attributes: NOT_STARTED: The job was added to the queue. IN_PROGRESS: The job is being processed. COMPLETE: Simulation has been completed successfully. ERROR: Simulation has failed. """ NOT_STARTED = 0 IN_PROGRESS = 1 COMPLETE = 2 ERROR = 3 ##################################### # Expectation job relevant types # ##################################### ######################################## # Noisy expectation job relevant types # ######################################## ##################################### # Sample job relevant types # ##################################### ##################################### # Jobs queue relevant types # ##################################### class JobType(enum.IntEnum): """Simulation job type. Attributes: SAMPLE: Sampling. EXPECTATION: Expectation values. NOISY_EXPECTATION: Noisy expectation values. """ SAMPLE = 0 EXPECTATION = 1 NOISY_EXPECTATION = 2 ##################################### # Tasks relevant types # ##################################### class TaskState(enum.IntEnum): """Current task state. Attributes: PENDING: Task is scheduled for execution. RUNNING: Task is running. DONE: Task is finished. """ PENDING = 0 RUNNING = 1 DONE = 2 ##################################### # Worker relevant types # ##################################### class WorkerState(enum.IntEnum): """ASIC worker state. Attributes: BOOTING: Worker is booting. ERROR: Worker encountered an error. IDLE: Worker is idling. OFFLINE: Worker is offline. PROCESSING_JOB: Worker is processing a job. SHUTTING_DOWN: Worker is shutting down. """ OFFLINE = 0 BOOTING = 1 SHUTTING_DOWN = 2 IDLE = 3 PROCESSING_JOB = 4 ERROR = 5 ##################################### # marshmallow schemas # ##################################### class _SSERenderer: """A helper class for serializing and deserializing objects to server side events message format. The server side event message is UTF-8 text data separated by a pair of newline characters. """ ( APIErrorSchema, ExpectationBatchJobContextSchema, ExpectationBatchJobResultSchema, ExpectationJobContextSchema, ExpectationJobResultSchema, ExpectationJobStatusEventSchema, ExpectationSweepJobContextSchema, ExpectationSweepJobResultSchema, JobProgressSchema, JobResultSchema, JobStatusEventSchema, JobSubmittedSchema, JobsQueueSchema, NoisyExpectationJobContextSchema, NoisyExpectationJobResultSchema, NoisyExpectationJobStatusEventSchema, PendingJobSchema, SampleBatchJobContextSchema, SampleBatchJobResultSchema, SampleJobContextSchema, SampleJobResultSchema, SampleJobStatusEventSchema, SampleSweepJobContextSchema, SampleSweepJobResultSchema, ServerSideEventSchema, StreamTimeoutEventSchema, TaskStatusEventSchema, TaskStatusSchema, TaskSubmittedSchema, WorkerSchema, ) = tuple( marshmallow_dataclass.class_schema(x, base_schema=y)() for x, y in ( (APIError, None), (ExpectationBatchJobContext, None), (ExpectationBatchJobResult, _BaseSchema), (ExpectationJobContext, None), (ExpectationJobResult, _BaseSchema), (ExpectationJobStatusEvent, _SSEBaseSchema), (ExpectationSweepJobContext, None), (ExpectationSweepJobResult, _BaseSchema), (JobProgress, None), (JobResult, _BaseSchema), (JobStatusEvent, _SSEBaseSchema), (JobSubmitted, None), (JobsQueue, None), (NoisyExpectationJobContext, None), (NoisyExpectationJobResult, _BaseSchema), (NoisyExpectationJobStatusEvent, _SSEBaseSchema), (PendingJob, None), (SampleBatchJobContext, None), (SampleBatchJobResult, _BaseSchema), (SampleJobContext, None), (SampleJobResult, _BaseSchema), (SampleJobStatusEvent, _SSEBaseSchema), (SampleSweepJobContext, None), (SampleSweepJobResult, _BaseSchema), (ServerSideEvent, _SSEBaseSchema), (StreamTimeoutEvent, _SSEBaseSchema), (TaskStatusEvent, _SSEBaseSchema), (TaskStatus, _BaseSchema), (TaskSubmitted, None), (Worker, _BaseSchema), ) )
[ 2, 15069, 33448, 383, 42945, 12832, 5276, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846...
2.90727
3,246
try: from configparser import RawConfigParser except ImportError: from ConfigParser import RawConfigParser
[ 28311, 25, 198, 220, 220, 220, 422, 4566, 48610, 1330, 16089, 16934, 46677, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 17056, 46677, 1330, 16089, 16934, 46677, 198 ]
3.833333
30
import collections m=int(input()) n=int(input()) grid=[] for i in range(m): grid.append(list(map(int,input().split()))) factor=collections.defaultdict(list) print('yes' if dfs(0, 0) else 'no')
[ 11748, 17268, 201, 198, 201, 198, 76, 28, 600, 7, 15414, 28955, 201, 198, 77, 28, 600, 7, 15414, 28955, 201, 198, 25928, 28, 21737, 201, 198, 1640, 1312, 287, 2837, 7, 76, 2599, 201, 198, 220, 220, 220, 10706, 13, 33295, 7, 4868, ...
2.406977
86
import os import pydicom import numpy as np import dicom_numpy from utils import hidden_errors from tf_utils import * from pathlib import Path def read_dicom_folder(dicom_folder, rescale=None): ''' Reads all .dcm files in `dicom_folder` and merges them to one volume Returns: The volume and the affine transformation from pixel indices to xyz coordinates ''' dss = [pydicom.dcmread(str(dicom_folder/dcm)) for dcm in os.listdir(dicom_folder) if dcm.endswith('.dcm')] vol, mat = dicom_numpy.combine_slices(dss, rescale) return vol, dss[0] def get_largest_dir(dirs, minsize=100): ''' Returns the dir with the most files from `dirs`''' m = max(dirs, key=lambda d: len(os.listdir(d)) if os.path.isdir(d) else 0) if len(os.listdir(m)) >= minsize: return m else: return None __all__ = ['read_dicom_folder', 'get_largest_dir', 'get_volume_gen', 'get_volume_dirs']
[ 11748, 28686, 198, 11748, 279, 5173, 291, 296, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 288, 291, 296, 62, 77, 32152, 198, 198, 6738, 3384, 4487, 1330, 7104, 62, 48277, 198, 6738, 48700, 62, 26791, 1330, 1635, 198, 6738, 3108, ...
2.490411
365
import sys from PyQt5.QtCore import Qt, QSize, QPoint from PyQt5.QtWidgets import QApplication, QDialog, QWidget, QLabel, QPushButton, QVBoxLayout, QHBoxLayout from PyQt5.QtGui import QPainter, QColor, QPen, QFont from .sudoku import Sudoku def main(): app = QApplication([]) gui = SudokuDialog() sys.exit(app.exec_())
[ 11748, 25064, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 33734, 11, 1195, 10699, 11, 1195, 12727, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 11, 1195, 44204, 11, 1195, 38300, 11, 1195, 3...
2.561538
130