content
stringlengths 5
1.05M
|
---|
import traceback as tb
from colored import fg, attr
def save_traceback():
try:
raise TracebackException("Could not register Variable.")
except TracebackException:
full_tb = tb.extract_stack()
# ignore this very function in the traceback
return full_tb[:-1]
class RegisterError(Exception):
def __str__(self):
base_exc = super().__str__().replace("\\x1b", "\x1b")
return base_exc + ("\n\n" + fg('red') + "The variable definition occured in" + attr('reset') + ":\n""" + format_traceback_list(self.traceback) if self.traceback is not None else "")
def __init__(self, *args, msg='', traceback=None, **kwargs):
# del args, kwargs # unused
# storing the traceback which provides useful information about where the exception occurred
self.traceback = traceback
super().__init__(" ".join(args) + " " + msg, **kwargs)
class StateKeyError(Exception):
def __str__(self):
base_exc = super().__str__().replace("\\x1b", "\x1b")
return base_exc + ("\n\n" + fg('red') + "The Key Error occured in" + attr('reset') + ":\n""" + format_traceback_list(self.traceback) if self.traceback is not None else "")
def __init__(self, *args, msg='', traceback=None, **kwargs):
# storing the traceback which provides useful information about where the exception occurred
self.traceback = traceback
super().__init__(" ".join(args) + " " + msg, **kwargs)
class TracebackException(Exception):
pass
def format_traceback_list(traceback_list, ignore_miniflask=True, exc=None):
if ignore_miniflask:
traceback_list = [t for t in traceback_list if not t.filename.endswith("src/miniflask/event.py") and (not t.filename.endswith("src/miniflask/miniflask.py") or t.name in ["load", "run"])]
# ignore "raise" lines
if exc is not None and "raise" in traceback_list[-1].line:
t = traceback_list[-1]
t.filename = fg('green') + t.filename + attr('reset')
t.lineno = fg('yellow') + str(t.lineno) + attr('reset')
t.name = fg('blue') + attr("bold") + t.name + attr('reset')
exception_type = fg('red') + attr('bold') + type(exc).__name__ + attr('reset')
last_msg = " File %s, line %s, in %s\n %s: %s" % (t.filename, t.lineno, t.name, exception_type, str(exc))
traceback_list = traceback_list[:-1]
if exc is not None and "raise" not in traceback_list[-1].line:
exception_type = fg('red') + attr('bold') + type(exc).__name__ + attr('reset')
last_msg = " %s: %s" % (exception_type, str(exc))
else:
last_msg = ""
for t in traceback_list:
t.filename = fg('green') + t.filename + attr('reset')
t.lineno = fg('yellow') + str(t.lineno) + attr('reset')
t.name = fg('blue') + attr("bold") + t.name + attr('reset')
return "".join(tb.format_list(traceback_list)) + last_msg
|
from typing import List, Optional
import uvicorn
from fastapi import Body, Depends, FastAPI, Query
from pydantic import SecretStr
from fastapi_keycloak import (
FastAPIKeycloak,
HTTPMethod,
KeycloakUser,
OIDCUser,
UsernamePassword,
)
app = FastAPI()
idp = FastAPIKeycloak(
server_url="http://localhost:8085/auth",
client_id="test-client",
client_secret="GzgACcJzhzQ4j8kWhmhazt7WSdxDVUyE",
admin_client_id="admin-cli",
admin_client_secret="BIcczGsZ6I8W5zf0rZg5qSexlloQLPKB",
realm="Test",
callback_uri="http://localhost:8081/callback",
)
idp.add_swagger_config(app)
# Admin
@app.post("/proxy", tags=["admin-cli"])
def proxy_admin_request(
relative_path: str,
method: HTTPMethod,
additional_headers: dict = Body(None),
payload: dict = Body(None),
):
return idp.proxy(
additional_headers=additional_headers,
relative_path=relative_path,
method=method,
payload=payload,
)
@app.get("/identity-providers", tags=["admin-cli"])
def get_identity_providers():
return idp.get_identity_providers()
@app.get("/idp-configuration", tags=["admin-cli"])
def get_idp_config():
return idp.open_id_configuration
# User Management
@app.get("/users", tags=["user-management"])
def get_users():
return idp.get_all_users()
@app.get("/user", tags=["user-management"])
def get_user_by_query(query: str = None):
return idp.get_user(query=query)
@app.post("/users", tags=["user-management"])
def create_user(
first_name: str, last_name: str, email: str, password: SecretStr, id: str = None
):
return idp.create_user(
first_name=first_name,
last_name=last_name,
username=email,
email=email,
password=password.get_secret_value(),
id=id,
)
@app.get("/user/{user_id}", tags=["user-management"])
def get_user(user_id: str = None):
return idp.get_user(user_id=user_id)
@app.put("/user", tags=["user-management"])
def update_user(user: KeycloakUser):
return idp.update_user(user=user)
@app.delete("/user/{user_id}", tags=["user-management"])
def delete_user(user_id: str):
return idp.delete_user(user_id=user_id)
@app.put("/user/{user_id}/change-password", tags=["user-management"])
def change_password(user_id: str, new_password: SecretStr):
return idp.change_password(user_id=user_id, new_password=new_password)
@app.put("/user/{user_id}/send-email-verification", tags=["user-management"])
def send_email_verification(user_id: str):
return idp.send_email_verification(user_id=user_id)
# Role Management
@app.get("/roles", tags=["role-management"])
def get_all_roles():
return idp.get_all_roles()
@app.get("/role/{role_name}", tags=["role-management"])
def get_role(role_name: str):
return idp.get_roles([role_name])
@app.post("/roles", tags=["role-management"])
def add_role(role_name: str):
return idp.create_role(role_name=role_name)
@app.delete("/roles", tags=["role-management"])
def delete_roles(role_name: str):
return idp.delete_role(role_name=role_name)
# Group Management
@app.get("/groups", tags=["group-management"])
def get_all_groups():
return idp.get_all_groups()
@app.get("/group/{group_name}", tags=["group-management"])
def get_group(group_name: str):
return idp.get_groups([group_name])
@app.get("/group-by-path/{path: path}", tags=["group-management"])
def get_group_by_path(path: str):
return idp.get_group_by_path(path)
@app.post("/groups", tags=["group-management"])
def add_group(group_name: str, parent_id: Optional[str] = None):
return idp.create_group(group_name=group_name, parent=parent_id)
@app.delete("/groups", tags=["group-management"])
def delete_groups(group_id: str):
return idp.delete_group(group_id=group_id)
# User Roles
@app.post("/users/{user_id}/roles", tags=["user-roles"])
def add_roles_to_user(user_id: str, roles: Optional[List[str]] = Query(None)):
return idp.add_user_roles(user_id=user_id, roles=roles)
@app.get("/users/{user_id}/roles", tags=["user-roles"])
def get_user_roles(user_id: str):
return idp.get_user_roles(user_id=user_id)
@app.delete("/users/{user_id}/roles", tags=["user-roles"])
def delete_roles_from_user(user_id: str, roles: Optional[List[str]] = Query(None)):
return idp.remove_user_roles(user_id=user_id, roles=roles)
# User Groups
@app.post("/users/{user_id}/groups", tags=["user-groups"])
def add_group_to_user(user_id: str, group_id: str):
return idp.add_user_group(user_id=user_id, group_id=group_id)
@app.get("/users/{user_id}/groups", tags=["user-groups"])
def get_user_groups(user_id: str):
return idp.get_user_groups(user_id=user_id)
@app.delete("/users/{user_id}/groups", tags=["user-groups"])
def delete_groups_from_user(user_id: str, group_id: str):
return idp.remove_user_group(user_id=user_id, group_id=group_id)
# Example User Requests
@app.get("/protected", tags=["example-user-request"])
def protected(user: OIDCUser = Depends(idp.get_current_user())):
return user
@app.get("/current_user/roles", tags=["example-user-request"])
def get_current_users_roles(user: OIDCUser = Depends(idp.get_current_user())):
return user.roles
@app.get("/admin", tags=["example-user-request"])
def company_admin(
user: OIDCUser = Depends(idp.get_current_user(required_roles=["admin"])),
):
return f"Hi admin {user}"
@app.get("/login", tags=["example-user-request"])
def login(user: UsernamePassword = Depends()):
return idp.user_login(
username=user.username, password=user.password.get_secret_value()
)
# Auth Flow
@app.get("/login-link", tags=["auth-flow"])
def login_redirect():
return idp.login_uri
@app.get("/callback", tags=["auth-flow"])
def callback(session_state: str, code: str):
return idp.exchange_authorization_code(session_state=session_state, code=code)
@app.get("/logout", tags=["auth-flow"])
def logout():
return idp.logout_uri
if __name__ == "__main__":
uvicorn.run("app:app", host="127.0.0.1", port=8081)
|
# -*- coding: utf-8 -*-
"""
Production Configurations
- Use Amazon's S3 for storing static files and uploaded media
- Use mailgun to send emails
- Use Redis for cache
- Use sentry for error logging
"""
from __future__ import absolute_import, unicode_literals
from django.utils import six
import logging
from .base import * # noqa
# SECRET CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
# Raises ImproperlyConfigured exception if DJANGO_SECRET_KEY not in os.environ
SECRET_KEY = env('DJANGO_SECRET_KEY')
# This ensures that Django will be able to detect a secure connection
# properly on Heroku.
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# SECURITY CONFIGURATION
# ------------------------------------------------------------------------------
# See https://docs.djangoproject.com/en/dev/ref/middleware/#module-django.middleware.security
# and https://docs.djangoproject.com/en/dev/howto/deployment/checklist/#run-manage-py-check-deploy
# set this to 60 seconds and then to 518400 when you can prove it works
SECURE_HSTS_SECONDS = 60
SECURE_HSTS_INCLUDE_SUBDOMAINS = env.bool(
'DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS', default=True)
SECURE_CONTENT_TYPE_NOSNIFF = env.bool(
'DJANGO_SECURE_CONTENT_TYPE_NOSNIFF', default=True)
SECURE_BROWSER_XSS_FILTER = True
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_HTTPONLY = True
SECURE_SSL_REDIRECT = env.bool('DJANGO_SECURE_SSL_REDIRECT', default=True)
CSRF_COOKIE_SECURE = True
CSRF_COOKIE_HTTPONLY = True
X_FRAME_OPTIONS = 'DENY'
# SITE CONFIGURATION
# ------------------------------------------------------------------------------
# Hosts/domain names that are valid for this site
# See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = env.list('DJANGO_ALLOWED_HOSTS', default=['scavenger.herokuapp.com', ])
# END SITE CONFIGURATION
INSTALLED_APPS += ['gunicorn', ]
# TEMPLATE CONFIGURATION
# ------------------------------------------------------------------------------
# See:
# https://docs.djangoproject.com/en/dev/ref/templates/api/#django.template.loaders.cached.Loader
TEMPLATES[0]['OPTIONS']['loaders'] = [
('django.template.loaders.cached.Loader', [
'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', ]),
]
# DATABASE CONFIGURATION
# ------------------------------------------------------------------------------
# Use the Heroku-style specification
# Raises ImproperlyConfigured exception if DATABASE_URL not in os.environ
DATABASES['default'] = env.db('DATABASE_URL')
# Custom Admin URL, use {% url 'admin:index' %}
ADMIN_URL = env('DJANGO_ADMIN_URL')
# Your production stuff: Below this line define 3rd party library settings
# ------------------------------------------------------------------------------
|
import unittest
from biicode.test.testing_mem_server_store import TestingMemServerStore
from biicode.server.model.user import User
from biicode.common.model.symbolic.block_version import BlockVersion
from biicode.common.model.brl.brl_block import BRLBlock
from biicode.common.model.brl.brl_user import BRLUser
from biicode.server.api.bii_service import BiiService
from biicode.common.find.finder_request import FinderRequest
from biicode.common.model.brl.block_cell_name import BlockCellName
from biicode.common.model.symbolic.reference import ReferencedDependencies
from biicode.common.model.declare.cpp_declaration import CPPDeclaration
from biicode.common.find.policy import Policy
from biicode.server.test.publisher import TestPublisher
from biicode.common.api.ui import BiiResponse
import time
class BaseFinderTest(unittest.TestCase):
def setUp(self):
""" all find tests have a user, store, and BiiService """
self.user = BRLUser('find_user')
self.store = TestingMemServerStore()
user = User(self.user)
user.password = 'password'
self.store.create_user(user)
self.service = BiiService(self.store, self.user)
def check_result(self, result, resolved=None, unresolved=None, updated=None):
unresolved = unresolved or []
unresolved = {CPPDeclaration(str(u)) for u in unresolved}
self.assertEqual(result.unresolved, unresolved)
resolved = resolved or []
refs = ReferencedDependencies()
for brl, time, block_cell_names in resolved:
for name in block_cell_names:
refs[BlockVersion(brl, time)][CPPDeclaration(name)] = {BlockCellName(name)}
self.assertEqual(result.resolved, refs)
updated = updated or []
refs = ReferencedDependencies()
for brl, time, block_cell_names in updated:
for name in block_cell_names:
refs[BlockVersion(brl, time)][CPPDeclaration(name)] = {BlockCellName(name)}
self.assertEqual(result.updated, refs)
def build_unresolved_request(self, unresolved_deps):
if isinstance(unresolved_deps, basestring):
unresolved_deps = [unresolved_deps]
request = FinderRequest()
unresolved = set()
for dep in unresolved_deps:
unresolved.add(CPPDeclaration(dep))
request.unresolved = unresolved
request.policy = Policy.default()
return request
def build_update_request(self, block_version, block_cell_name):
request = FinderRequest()
existing = ReferencedDependencies()
existing[block_version][CPPDeclaration(block_cell_name)].add(block_cell_name)
request.existing = existing
request.policy = Policy.default()
request.find = False
request.update = True
return request
class FinderTest(BaseFinderTest):
""" Find tests with 1 single file per block """
def test_simple_find(self):
'''Test including a single block with 1 file 1 version without further dependencies,
always last version
'''
brl_a = BRLBlock('%s/%s/%s/master' % (self.user, self.user, 'blocka'))
name_a = BlockCellName(self.user + "/blocka/a.h")
publisher = TestPublisher(self.user, self.store)
for i in range(4):
publisher.publish(brl_a, {'a.h': ('a', [])})
# self.publish(brl_a, name_a)
request = self.build_unresolved_request(name_a)
result = self.service.find(request, BiiResponse())
self.check_result(result, resolved=[(brl_a, i, {name_a})])
def test_simple_update(self):
'''Test finding updates in a simple block with 1 file with no more dependencies '''
brl_a = BRLBlock('%s/%s/%s/master' % (self.user, self.user, 'blocka'))
name_a = BlockCellName(self.user + "/blocka/a.h")
publisher = TestPublisher(self.user, self.store)
publisher.publish(brl_a, {'a.h': ('a', [])})
#self.publish(brl_a, name_a)
for i in range(1, 10):
time.sleep(0.05)
publisher.publish(brl_a, {'a.h': ('a', [])})
#self.publish(brl_a, name_a)
request = self.build_update_request(BlockVersion(brl_a, i - 1), name_a)
result = self.service.find(request, BiiResponse())
ref_updated = [(brl_a, i, {name_a})]
self.check_result(result, updated=ref_updated)
def test_disallow_cycles(self):
""" a find cannot return a block that is already in the src blocks of the hive """
brl_a = BRLBlock('%s/%s/%s/master' % (self.user, self.user, 'blocka'))
name_a = BlockCellName(self.user + "/blocka/a.h")
publisher = TestPublisher(self.user, self.store)
publisher.publish(brl_a, {'a.h': ('a', [])})
request = self.build_unresolved_request(name_a)
request.block_names.add(name_a.block_name)
response = BiiResponse()
result = self.service.find(request, response)
# TODO: return a message to user saying that it is because a cycle
self.assertIn('No block candidates found', str(response))
self.check_result(result, unresolved=request.unresolved)
def test_find_transitive(self):
'''Test including a block with other dependencies, without conflicts '''
brl_a = BRLBlock('%s/%s/%s/master' % (self.user, self.user, 'blocka'))
name_a = BlockCellName(self.user + "/blocka/a.h")
publisher = TestPublisher(self.user, self.store)
publisher.publish(brl_a, {'a.h': ('a', [])})
brl_b = BRLBlock('%s/%s/%s/master' % (self.user, self.user, 'blockb'))
name_b = BlockCellName(self.user + "/blockb/b.h")
#self.publish(brl_b, name_b, deps={name_b: name_a}, dep_versions=BlockVersion(brl_a, 0))
publisher.publish(brl_b, {'b.h': ('b', [name_a])},
dep_versions=BlockVersion(brl_a, 0))
request = self.build_unresolved_request(name_b)
result = self.service.find(request, BiiResponse())
self.check_result(result, resolved=[(brl_b, 0, {name_b})])
def test_diamond_single_solution(self):
brl_a = BRLBlock('%s/%s/%s/master' % (self.user, self.user, 'blocka'))
brl_b = BRLBlock('%s/%s/%s/master' % (self.user, self.user, 'blockb'))
brl_c = BRLBlock('%s/%s/%s/master' % (self.user, self.user, 'blockc'))
name_a = BlockCellName(self.user + "/blocka/a.h")
publisher = TestPublisher(self.user, self.store)
for _ in range(20):
publisher.publish(brl_a, {'a.h': ('a', [])})
name_b = BlockCellName(self.user + "/blockb/b.h")
name_c = BlockCellName(self.user + "/blockc/c.h")
for i in range(0, 20):
if i % 2 == 0:
publisher.publish(brl_b, {'b.h': ('b', [name_a])},
dep_versions=BlockVersion(brl_a, i))
if (i % 2 == 1 or i == 10):
publisher.publish(brl_c, {'c.h': ('c', [name_a])},
dep_versions=BlockVersion(brl_a, i))
request = self.build_unresolved_request([name_b, name_c])
result = self.service.find(request, BiiResponse())
self.check_result(result, resolved=[(brl_b, 5, {name_b}), (brl_c, 5, {name_c})])
def test_disallow_cycles_transitive(self):
""" A find must not find any block name that is in the current src blocks, even
transitively.
"""
brl_a = BRLBlock('%s/%s/%s/master' % (self.user, self.user, 'blocka'))
name_a = BlockCellName(self.user + "/blocka/a.h")
publisher = TestPublisher(self.user, self.store)
publisher.publish(brl_a, {'a.h': ('a', [])})
brl_b = BRLBlock('%s/%s/%s/master' % (self.user, self.user, 'blockb'))
name_b = BlockCellName(self.user + "/blockb/b.h")
publisher.publish(brl_b, {'b.h': ('b', [name_a])}, dep_versions=BlockVersion(brl_a, 0))
request = self.build_unresolved_request(name_b)
request.block_names.add(name_a.block_name)
response = BiiResponse()
result = self.service.find(request, response)
self.assertIn("Can't find a compatible solution", str(response))
self.assertIn('it has cycles', str(response))
self.check_result(result, unresolved=request.unresolved)
if __name__ == "__main__":
# import sys;sys.argv = ['', 'Test.testName']
unittest.main()
|
"""
This module contains classes intended to parse and deal with data from Roblox badge information endpoints.
"""
from __future__ import annotations
from typing import TYPE_CHECKING
from datetime import datetime
from dateutil.parser import parse
from .bases.baseasset import BaseAsset
from .bases.basebadge import BaseBadge
from .partials.partialuniverse import PartialUniverse
if TYPE_CHECKING:
from .client import Client
class BadgeStatistics:
"""
Attributes:
past_day_awarded_count: How many instances of this badge were awarded in the last day.
awarded_count: How many instances of this badge have been awarded.
win_rate_percentage: Percentage of players who have joined the parent universe have been awarded this badge.
"""
def __init__(self, data: dict):
"""
Arguments:
data: The raw input data.
"""
self.past_day_awarded_count: int = data["pastDayAwardedCount"]
self.awarded_count: int = data["awardedCount"]
self.win_rate_percentage: int = data["winRatePercentage"]
def __repr__(self):
return f"<{self.__class__.__name__} awarded_count={self.awarded_count}>"
class Badge(BaseBadge):
"""
Represents a badge from the API.
Attributes:
id: The badge Id.
name: The name of the badge.
description: The badge description.
display_name: The localized name of the badge.
display_description: The localized badge description.
enabled: Whether or not the badge is enabled.
icon: The badge icon.
display_icon: The localized badge icon.
created: When the badge was created.
updated: When the badge was updated.
statistics: Badge award statistics.
awarding_universe: The universe the badge is being awarded from.
"""
def __init__(self, client: Client, data: dict):
"""
Arguments:
client: The Client to be used when getting information on badges.
data: The data from the endpoint.
"""
self.id: int = data["id"]
super().__init__(client=client, badge_id=self.id)
self.name: str = data["name"]
self.description: str = data["description"]
self.display_name: str = data["displayName"]
self.display_description: str = data["displayDescription"]
self.enabled: bool = data["enabled"]
self.icon: BaseAsset = BaseAsset(client=client, asset_id=data["iconImageId"])
self.display_icon: BaseAsset = BaseAsset(client=client, asset_id=data["displayIconImageId"])
self.created: datetime = parse(data["created"])
self.updated: datetime = parse(data["updated"])
self.statistics: BadgeStatistics = BadgeStatistics(data=data["statistics"])
self.awarding_universe: PartialUniverse = PartialUniverse(client=client, data=data["awardingUniverse"])
def __repr__(self):
return f"<{self.__class__.__name__} id={self.id} name={self.name!r}>"
|
from django.test import TestCase
from .models import Project
class ProjectTestCase(TestCase):
def test_creation_of_projects(self):
Project.objects.create(project_name='Test Website 1', project_description='This is website made through a test',
project_url='https://www.google.com', author='TestUser', author_email='[email protected]', is_in_progress=True)
print('Successfully created test project model object')
projects = Project.objects.get(id=1)
print('\nCreated Project', projects)
def test_deletion_of_projects(self):
Project.objects.create(project_name='Test Website 2', project_description='This is website made through a test',
project_url='https://www.google.com', author='TestUser', author_email='[email protected]', is_in_progress=True)
print('Successfully created test project model object')
print(Project.objects.all())
projects = Project.objects.get(project_name='Test Website 2')
projects.delete()
print('Successfully deleted test project model object')
print(Project.objects.all())
|
#!/usr/bin/env python3
import os
from aws_cdk import core as cdk
app = cdk.App()
# Stacks are intentionally not created here -- this application isn't meant to
# be deployed.
app.synth()
|
import os, sys, json
from datetime import datetime
"""
Create BPE lookup:
1. create object (will init special tokens)
2. create BPE model with sentencepiece.train
3. lookup.load(path to model (prefix only, without .model)), this will shift special tokens up the vocab
4. lookup.save_special_tokens() to save with new positions
Load BPE lookup:
1. create lookup object
2. load()
Create/load GPT2:
1. create object
2. load()
"""
class Lookup():
def __init__(self, type, file_prefix = None):
self.type = type
self.bos_token = None
self.eos_token = None
self.unk_token = None
self.sep_token = None
self.pad_token = None
self.cls_token = None
self.mask_token = None
if type == "gpt2":
from pytorch_transformers import GPT2Tokenizer
self._tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
# add <PAD> special token
self._tokenizer.add_special_tokens({'pad_token': '<PAD>'})
for i in range(len(self._tokenizer)):
token = self._tokenizer.convert_ids_to_tokens(i)
if self._tokenizer._bos_token: # using _xxx_token instead of xxx_token to silence gpt2tokenizer not set errors
self.bos_token = self._tokenizer.bos_token
if self._tokenizer._eos_token:
self.eos_token = self._tokenizer.eos_token
if self._tokenizer._unk_token:
self.unk_token = self._tokenizer.unk_token
if self._tokenizer._sep_token:
self.sep_token = self._tokenizer.sep_token
if self._tokenizer._pad_token:
self.pad_token = self._tokenizer.pad_token
if self._tokenizer._cls_token:
self.cls_token = self._tokenizer.cls_token
if self._tokenizer._mask_token:
self.mask_token = self._tokenizer.mask_token
if type == "bpe":
self.bpe_vocab_size = 0
self.bos_token = "<BOS>"
self.eos_token = "<EOS>"
self.unk_token = "<UNK>"
self.sep_token = "<SEP>"
self.pad_token = "<PAD>"
self.cls_token = "<CLS>"
self.mask_token = "<MASK>"
self._recreate_special_tokens()
if file_prefix:
self.load(file_prefix)
def save_special_tokens(self, file_prefix):
if self.type == "gpt2":
special_tokens = {}
if self.bos_token:
special_tokens['bos_token'] = self.bos_token
if self.eos_token:
special_tokens['eos_token'] = self.eos_token
if self.unk_token:
special_tokens['unk_token'] = self.unk_token
if self.sep_token:
special_tokens['sep_token'] = self.sep_token
if self.pad_token:
special_tokens['pad_token'] = self.pad_token
if self.cls_token:
special_tokens['cls_token'] = self.cls_token
if self.mask_token:
special_tokens['mask_token'] = self.mask_token
json.dump(special_tokens, open(file_prefix+".special_tokens","w",encoding="utf8"), indent=4, sort_keys=True)
self._tokenizer.add_special_tokens(special_tokens)
if self.type == "bpe":
obj = {}
obj["special_token2id"] = self.special_token2id
obj["special_id2token"] = self.special_id2token
obj["special_token_map"] = self.special_token_map
json.dump(obj, open(file_prefix+".special_tokens","w",encoding="utf8"), indent=4, sort_keys=True)
def load(self, file_prefix):
if self.type == "gpt2":
if os.path.exists(file_prefix+".special_tokens"):
special_tokens = json.load(open(file_prefix+".special_tokens","r",encoding="utf8"))
if 'bos_token' in special_tokens:
self.bos_token = special_tokens['bos_token']
if 'eos_token' in special_tokens:
self.eos_token = special_tokens['eos_token']
if 'unk_token' in special_tokens:
self.unk_token = special_tokens['unk_token']
if 'sep_token' in special_tokens:
self.sep_token = special_tokens['sep_token']
if 'pad_token' in special_tokens:
self.pad_token = special_tokens['pad_token']
if 'cls_token' in special_tokens:
self.cls_token = special_tokens['cls_token']
if 'mask_token' in special_tokens:
self.mask_token = special_tokens['mask_token']
self._tokenizer.add_special_tokens(special_tokens)
if self.type == "bpe":
import sentencepiece as spm
# step 1, load SentencePieceProcessor
self._tokenizer = spm.SentencePieceProcessor()
self._tokenizer.Load(file_prefix+".model")
# step 2, get vocab size from .vocab
with open(file_prefix+".vocab","r",encoding="utf8") as f:
all_lines = f.readlines()
self.bpe_vocab_size = len(all_lines)
# step 3, load special_tokens, if any, and add to vocabulary
if os.path.exists(file_prefix+".special_tokens"):
obj = json.load(open(file_prefix+".special_tokens","r",encoding="utf8"))
self.special_token2id = obj["special_token2id"]
self.special_id2token = obj["special_id2token"]
self.special_token_map = obj['special_token_map']
self.bos_token = self.special_token_map.get('bos_token', None)
self.eos_token = self.special_token_map.get('eos_token', None)
self.unk_token = self.special_token_map.get('unk_token', None)
self.sep_token = self.special_token_map.get('sep_token', None)
self.pad_token = self.special_token_map.get('pad_token', None)
self.cls_token = self.special_token_map.get('cls_token', None)
self.mask_token = self.special_token_map.get('mask_token', None)
self._recreate_special_tokens()
def _recreate_special_tokens (self):
self.special_token2id = {}
self.special_id2token = {}
self.special_token_map = {}
if self.pad_token:
self.special_token2id[self.pad_token] = self.bpe_vocab_size+len(self.special_token2id)
self.special_id2token[str(self.bpe_vocab_size+len(self.special_id2token))] = self.pad_token
self.special_token_map['pad_token'] = self.pad_token
if self.unk_token:
self.special_token2id[self.unk_token] = self.bpe_vocab_size+len(self.special_token2id)
self.special_id2token[str(self.bpe_vocab_size+len(self.special_id2token))] = self.unk_token
self.special_token_map['unk_token'] = self.unk_token
if self.bos_token:
self.special_token2id[self.bos_token] = self.bpe_vocab_size+len(self.special_token2id)
self.special_id2token[str(self.bpe_vocab_size+len(self.special_id2token))] = self.bos_token
self.special_token_map['bos_token'] = self.bos_token
if self.eos_token:
self.special_token2id[self.eos_token] = self.bpe_vocab_size+len(self.special_token2id)
self.special_id2token[str(self.bpe_vocab_size+len(self.special_id2token))] = self.eos_token
self.special_token_map['eos_token'] = self.eos_token
if self.sep_token:
self.special_token2id[self.sep_token] = self.bpe_vocab_size+len(self.special_token2id)
self.special_id2token[str(self.bpe_vocab_size+len(self.special_id2token))] = self.sep_token
self.special_token_map['sep_token'] = self.sep_token
if self.cls_token:
self.special_token2id[self.cls_token] = self.bpe_vocab_size+len(self.special_token2id)
self.special_id2token[str(self.bpe_vocab_size+len(self.special_id2token))] = self.cls_token
self.special_token_map['cls_token'] = self.cls_token
if self.mask_token:
self.special_token2id[self.mask_token] = self.bpe_vocab_size+len(self.special_token2id)
self.special_id2token[str(self.bpe_vocab_size+len(self.special_id2token))] = self.mask_token
self.special_token_map['mask_token'] = self.mask_token
def tokenize (self, text):
if self.type == "gpt2":
return self._tokenizer.tokenize(text)
if self.type == "bpe":
return self._tokenizer.EncodeAsPieces(text)
def convert_tokens_to_ids (self, tokens):
if self.type == "gpt2":
return self._tokenizer.convert_tokens_to_ids(tokens)
if self.type == "bpe":
if isinstance(tokens, list):
return [self._PieceToId(token) for token in tokens]
elif isinstance(tokens, str):
return self._PieceToId(tokens)
else:
raise Exception("Lookup convert_tokens_to_ids error: token_ids is not str or list!")
def convert_ids_to_tokens (self, token_ids):
if self.type == "gpt2":
return self._tokenizer.convert_ids_to_tokens(token_ids)
if self.type == "bpe":
if isinstance(token_ids, list):
return [self._IdToPiece(id) for id in token_ids]
elif isinstance(token_ids, int):
return self._IdToPiece(token_ids)
else:
raise Exception("Lookup convert_ids_to_tokens error: token_ids is not int or list!")
def convert_tokens_to_string (self, tokens):
if self.type == "gpt2":
return self._tokenizer.convert_tokens_to_string(tokens)
if self.type == "bpe":
if isinstance(tokens, list):
return self._tokenizer.DecodePieces(tokens)
elif isinstance(tokens, str):
return self._tokenizer.DecodePieces([tokens])
else:
raise Exception("Lookup convert_tokens_to_string error: tokens is not str or list!")
def encode (self, text, add_bos_eos_tokens=False):
tokens = self.tokenize(text)
if add_bos_eos_tokens:
if not self.bos_token or not self.eos_token:
raise Exception("Lookup encode error: {} model does not have BOS or EOS tokens set!")
return [self.convert_tokens_to_ids(self.bos_token)] + self.convert_tokens_to_ids(tokens) + [self.convert_tokens_to_ids(self.eos_token)]
else:
return self.convert_tokens_to_ids(tokens)
def decode (self, token_ids, skip_bos_eos_tokens=False):
if skip_bos_eos_tokens:
if not self.bos_token or not self.eos_token:
raise Exception("Lookup decode error: {} model does not have BOS or EOS tokens set!")
if len(token_ids)>0:
if token_ids[0] == self.convert_tokens_to_ids(self.bos_token):
token_ids = token_ids[1:]
if len(token_ids)>0:
if token_ids[-1] == self.convert_tokens_to_ids(self.eos_token):
token_ids = token_ids[:-1]
if len(token_ids)>0:
tokens = self.convert_ids_to_tokens(token_ids)
return self.convert_tokens_to_string(tokens)
return ""
def _PieceToId(self, token): # just for bpe
if token in self.special_token2id:
return self.special_token2id[token]
return self._tokenizer.PieceToId(token)
def _IdToPiece(self, id): # just for bpe
if str(id) in self.special_id2token:
return self.special_id2token[str(id)]
return self._tokenizer.IdToPiece(id)
def __len__(self):
if self.type == "gpt2":
return len(self._tokenizer)
if self.type == "bpe":
return self.bpe_vocab_size+len(self.special_id2token)
def __repr__(self):
s = "Lookup(type={}, vocab_size={}):".format(self.type, len(self))
s += "\nSpecial tokens: "
if self.bos_token:
s += "\n\t bos_token={}, id {}".format(self.bos_token, self.convert_tokens_to_ids(self.bos_token))
if self.eos_token:
s += "\n\t eos_token={}, id {}".format(self.eos_token, self.convert_tokens_to_ids(self.eos_token))
if self.unk_token:
s += "\n\t unk_token={}, id {}".format(self.unk_token, self.convert_tokens_to_ids(self.unk_token))
if self.sep_token:
s += "\n\t sep_token={}, id {}".format(self.sep_token, self.convert_tokens_to_ids(self.sep_token))
if self.pad_token:
s += "\n\t pad_token={}, id {}".format(self.pad_token, self.convert_tokens_to_ids(self.pad_token))
if self.cls_token:
s += "\n\t cls_token={}, id {}".format(self.cls_token, self.convert_tokens_to_ids(self.cls_token))
if self.mask_token:
s += "\n\t mask_token={}, id {}".format(self.mask_token, self.convert_tokens_to_ids(self.mask_token))
return s
|
from pathlib import Path
import imageio
DEFAULT_DIR = str(Path.home().joinpath('debug'))
DEFAULT_PATH = 'test.gif'
class Dummy(object):
images = dict()
@classmethod
def add(cls, key, image):
if key not in cls.images:
cls.images[key] = list()
cls.images[key].append(image.copy())
@classmethod
def save(cls, key, save_dir=None, save_path=None, duration=0.1):
save_dir = Path(save_dir or DEFAULT_DIR).resolve()
save_path = save_path or DEFAULT_PATH
save_dir.mkdir(exist_ok=True, parents=True)
imageio.mimsave(
str(save_dir.joinpath(save_path)), cls.images[key],
'GIF', duration=duration)
cls.clear(key)
@classmethod
def clear(cls, key=None):
if key in cls.images:
cls.images.pop(key)
else:
cls.images.clear()
add = Dummy.add
save = Dummy.save
clear = Dummy.clear
|
# Alien Language Solution
# Google Code Jam 2009, Qualification, Question A
# tr@nsistor
from collections import defaultdict
specs = input().split()
ltrs = int(specs[0])
words = int(specs[1])
cases = int(specs[2])
wdict = []
for word in range(words):
wdict.append(input())
for case in range(cases):
pattern = input()
parse = [[] for num in range(len(pattern))]
op = False
count = 0
match = 0
for c in pattern:
if c is '(':
op = True
elif op is True:
if c is not ')':
parse[count].append(c)
else:
op = False
count += 1
else:
parse[count].append(c)
count += 1
parse = [x for x in parse if x]
for word in wdict:
for i in range(len(word)):
if word[i] not in parse[i]:
break
if i is (len(word) - 1):
match += 1
break
elif word[i] in parse[i]:
continue
print("Case #{}: {}".format(case+1, match))
|
import multiprocessing as mp
import csv
class QueueLogger(object):
"""
Records data from a multiprocessing.Queue to an output file
Attributes
----------
filename : string
Name of the output file to write to
buffersize : unsigned int
Number of results to collect from the queue before writing them to file
buffer : list
Used to cache results as read from the queue so that the output file need
not be reopened for writing after each Queue.get() call
count : unsigned int
Number of times the write method as been called. Used to set the write mode
to create a file on the initial call and append to it for subsequent calls.
"""
def __init__(self,filename,quantities,buffersize,total):
"""
Create a QueueLogger object that will read from a multiprocessing.Queue,
store results in a buffer, and write the buffer to an output file when
it is full or the queue is empty. A watcher process must be created in order
to use this object.
Parameters
----------
filename : string
Name of the output file to write to
quantities : list of strings
Names of quantities to be evaluated and recorded
buffersize : unsigned int
Number of results to collect from the queue before writing them to file
total : unsigned int
Number of items expected in the queue. Used for reporting progress.
Example
-------
>>> import multiprocessing as mp
>>> ql = QueueLogger('output.txt',50)
>>> qresults = mp.Queue()
>>> watcher = mp.Process(target=ql.read,args=(qresults,))
>>> watcher.start()
# Run some processes that write to qresults
>>> watcher.terminate()
"""
self.filename = filename
self.buffersize = buffersize
self.buffer = list()
self.count = 0
self.progress = 0
self.total = total
with open(self.filename,'w') as csvfile:
writer = csv.writer(csvfile)
writer.writerow(quantities)
def read(self,q):
"""
Read results from a queue and append them to the buffer. Write the buffer
to a file when full or the queue is empty
Parameters
----------
q : multiprocessing.Queue
"""
print("\n\nCompute Progress:")
print("0.00%")
while True:
while not q.empty():
result = q.get()
self.buffer.append(result)
if len(self.buffer) >= self.buffersize:
self.progress += len(self.buffer)
self.write_buffer()
print("{:.2%}".format(self.progress/self.total))
def write_buffer(self):
with open(self.filename,'a') as csvfile:
writer = csv.writer(csvfile)
while len(self.buffer):
b = self.buffer.pop()
if b is not None:
writer.writerow(b)
self.count += 1
|
# -*- coding: utf-8 -*-
from sklearn import svm
import numpy as np
import matplotlib.pyplot as plt
from utils.FScore import F1Score
from Identification.LoadDescriptors import loadAllDescriptors
from Identification.PreprocessingDescriptors import preprocessDescriptors
from Identification.TrainCvTest import separateDatabases
Descriptors = loadAllDescriptors(reverbs=True)
normalized_features, yClass, features_names = preprocessDescriptors(Descriptors)
del Descriptors # Ya no lo voy a utilizar
normalizedTrain, yTrain, normalizedCV, yCV, normalizedTest, yTest = separateDatabases(normalized_features, yClass)
def test_data_size(training_features, training_classes, test_features, test_classes):
index = np.arange(0, len(training_classes))
np.random.shuffle(index)
test_size = np.linspace(0.1, 1, 50) * len(index)
test_size = [int(i) for i in test_size]
f_train = []
f_cv = []
clf = svm.SVC(C=1.833, gamma=0.1366, cache_size=1000)
for iii in test_size:
clf.fit(training_features[index[0:iii]], training_classes[index[0:iii]])
f_train = np.append(f_train, np.mean(F1Score(training_features[index[0:iii]],
training_classes[index[0:iii]], clf).values()))
f_cv = np.append(f_cv, np.mean(F1Score(test_features, test_classes, clf).values()))
return f_train, f_cv, test_size
F1Train, F1CV, testSize = test_data_size(normalizedTrain, yTrain, normalizedCV, yCV)
plt.xlabel("Cantidad de muestras", fontsize=20)
plt.ylabel("Error",fontsize=20)
plt.tick_params(axis='both', which='major', labelsize=15)
plt.text(2000, 0.3, r'$C=1.833,\ \Gamma=0.1366$', fontsize=22)
plt.text(1000, 0.07, 'Medida-F en la base\nde entrenamiento', fontsize=20, color='blue')
text = unicode('Medida-F en la base\nde validación cruzada', 'utf-8')
plt.text(1000, 0.25, text, fontsize=20, color='green')
plt.plot(testSize, 1 - F1Train, c='blue', linewidth=4.0)
plt.plot(testSize, 1 - F1CV, color='green', linewidth=4.0)
plt.show()
|
#!/usr/bin/python
#
# Copyright 2017 Google Inc.
#
# 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 certifi
import json
import logging
import urllib3
from oauth2client.service_account import ServiceAccountCredentials
# Service management service
SERVICE_MGMT_ROLLOUTS_URL_TEMPLATE = (
"{}/v1/services/{}/rollouts?filter=status=SUCCESS")
_GOOGLE_API_SCOPE = (
"https://www.googleapis.com/auth/service.management.readonly")
# Metadata service path
_METADATA_PATH = "/computeMetadata/v1/instance"
_METADATA_SERVICE_NAME = "endpoints-service-name"
_METADATA_SERVICE_CONFIG_ID = "endpoints-service-config-id"
_METADATA_ROLLOUT_STRATEGY = "endpoints-rollout-strategy"
class FetchError(Exception):
"""Error class for fetching and validation errors."""
def __init__(self, code, message):
self.code = code
self.message = message
def __str__(self):
return self.message
def fetch_service_config_rollout_strategy(metadata):
"""Fetch service config rollout strategy from metadata URL."""
url = metadata + _METADATA_PATH + "/attributes/" + \
_METADATA_ROLLOUT_STRATEGY
headers = {"Metadata-Flavor": "Google"}
client = urllib3.PoolManager(ca_certs=certifi.where())
try:
response = client.request("GET", url, headers=headers)
except:
logging.info("Failed to fetch service config rollout strategy " + \
"from the metadata server: " + url);
return None
status_code = response.status
if status_code != 200:
# Fetching rollout strategy is optional. No need to leave log
return None
rollout_strategy = response.data
logging.info("Service config rollout strategy: " + rollout_strategy)
return rollout_strategy
def fetch_service_name(metadata):
"""Fetch service name from metadata URL."""
url = metadata + _METADATA_PATH + "/attributes/" + _METADATA_SERVICE_NAME
headers = {"Metadata-Flavor": "Google"}
client = urllib3.PoolManager(ca_certs=certifi.where())
try:
response = client.request("GET", url, headers=headers)
except:
raise FetchError(1,
"Failed to fetch service name from the metadata server: " + url)
status_code = response.status
if status_code != 200:
message_template = "Fetching service name failed (url {}, status code {})"
raise FetchError(1, message_template.format(url, status_code))
name = response.data
logging.info("Service name: " + name)
return name
# config_id from metadata is optional. Returns None instead of raising error
def fetch_service_config_id(metadata):
"""Fetch service config ID from metadata URL."""
url = metadata + _METADATA_PATH + "/attributes/" + _METADATA_SERVICE_CONFIG_ID
headers = {"Metadata-Flavor": "Google"}
client = urllib3.PoolManager(ca_certs=certifi.where())
try:
response = client.request("GET", url, headers=headers)
if response.status != 200:
# Fetching service config id is optional. No need to leave log
raise None
except:
url = metadata + _METADATA_PATH + "/attributes/endpoints-service-version"
try:
response = client.request("GET", url, headers=headers)
except:
logging.info("Failed to fetch service config ID from the metadata server: " + url)
return None
if response.status != 200:
message_template = "Fetching service config ID failed (url {}, status code {})"
logging.info(message_template.format(url, response.status))
return None
version = response.data
logging.info("Service config ID:" + version)
return version
def make_access_token(secret_token_json):
"""Construct an access token from service account token."""
logging.info("Constructing an access token with scope " + _GOOGLE_API_SCOPE)
credentials = ServiceAccountCredentials.from_json_keyfile_name(
secret_token_json,
scopes=[_GOOGLE_API_SCOPE])
logging.info("Service account email: " + credentials.service_account_email)
token = credentials.get_access_token().access_token
return token
def fetch_access_token(metadata):
"""Fetch access token from metadata URL."""
access_token_url = metadata + _METADATA_PATH + "/service-accounts/default/token"
headers = {"Metadata-Flavor": "Google"}
client = urllib3.PoolManager(ca_certs=certifi.where())
try:
response = client.request("GET", access_token_url, headers=headers)
except:
raise FetchError(1,
"Failed to fetch access token from the metadata server: " + access_token_url)
status_code = response.status
if status_code != 200:
message_template = "Fetching access token failed (url {}, status code {})"
raise FetchError(1, message_template.format(access_token_url, status_code))
token = json.loads(response.data)["access_token"]
return token
def fetch_latest_rollout(management_service, service_name, access_token):
"""Fetch rollouts"""
if access_token is None:
headers = {}
else:
headers = {"Authorization": "Bearer {}".format(access_token)}
client = urllib3.PoolManager(ca_certs=certifi.where())
service_mgmt_url = SERVICE_MGMT_ROLLOUTS_URL_TEMPLATE.format(management_service,
service_name)
try:
response = client.request("GET", service_mgmt_url, headers=headers)
except:
raise FetchError(1, "Failed to fetch rollouts")
status_code = response.status
if status_code != 200:
message_template = ("Fetching rollouts failed "\
"(status code {}, reason {}, url {})")
raise FetchError(1, message_template.format(status_code,
response.reason,
service_mgmt_url))
rollouts = json.loads(response.data)
# No valid rollouts
if rollouts is None or \
'rollouts' not in rollouts or \
len(rollouts["rollouts"]) == 0 or \
"rolloutId" not in rollouts["rollouts"][0] or \
"trafficPercentStrategy" not in rollouts["rollouts"][0] or \
"percentages" not in rollouts["rollouts"][0]["trafficPercentStrategy"]:
message_template = ("Invalid rollouts response (url {}, data {})")
raise FetchError(1, message_template.format(service_mgmt_url,
response.data))
return rollouts["rollouts"][0]
def fetch_service_json(service_mgmt_url, access_token):
"""Fetch service config."""
if access_token is None:
headers = {}
else:
headers = {"Authorization": "Bearer {}".format(access_token)}
client = urllib3.PoolManager(ca_certs=certifi.where())
try:
response = client.request("GET", service_mgmt_url, headers=headers)
except:
raise FetchError(1, "Failed to fetch service config")
status_code = response.status
if status_code != 200:
message_template = "Fetching service config failed (status code {}, reason {}, url {})"
raise FetchError(1, message_template.format(status_code, response.reason, service_mgmt_url))
service_config = json.loads(response.data)
return service_config
def validate_service_config(service_config, expected_service_name,
expected_service_version):
"""Validate service config."""
service_name = service_config.get("name", None)
if not service_name:
raise FetchError(2, "No service name in the service config")
if service_name != expected_service_name:
message_template = "Unexpected service name in service config: {}"
raise FetchError(2, message_template.format(service_name))
service_version = service_config.get("id", None)
if not service_version:
raise FetchError(2, "No service config ID in the service config")
if service_version != expected_service_version:
message_template = "Unexpected service config ID in service config: {}"
raise FetchError(2, message_template.format(service_version))
# WARNING: sandbox migration workaround
control = service_config.get("control", None)
if not control:
raise FetchError(2, "No control section in the service config")
environment = control.get("environment", None)
if not environment:
raise FetchError(2, "Missing control environment")
if environment == "endpoints-servicecontrol.sandbox.googleapis.com":
logging.warning("Replacing sandbox control environment in the service config")
service_config["control"]["environment"] = (
"servicecontrol.googleapis.com")
|
from usim800.Request.Request import request
|
from __future__ import absolute_import
from __future__ import unicode_literals
from webfriend.scripting.parser import to_value
class MetaModel(object):
def __init__(self, parent, **kwargs):
self.parent = parent
for k, v in kwargs.items():
if isinstance(v, list):
v = tuple(v)
setattr(self, k, v)
class Directive(MetaModel):
pass
class LinearExecutionBlock(MetaModel):
pass
class EventHandlerBlock(MetaModel):
pass
class Expression(MetaModel):
def process(self, scope, preserve_types=False):
lhs = to_value(self.lhs, scope)
op = self.operator
if op is not None:
rhs = to_value(self.rhs, scope)
if op.power:
return lhs ** rhs, None
elif op.bitwise_not:
return ~rhs, None
elif op.multiply:
return lhs * rhs, None
elif op.divide:
return lhs / rhs, None
elif op.modulus:
return lhs & rhs, None
elif op.add:
return lhs + rhs, None
elif op.subtract:
return lhs - rhs, None
elif op.bitwise_and:
return lhs & rhs, None
elif op.bitwise_xor:
return lhs ^ rhs, None
elif op.bitwise_or:
return lhs | rhs, None
return None, None
if preserve_types:
return self.lhs, None
else:
return lhs, None
|
__author__ = 'hanhanwu'
import numpy as np
from pyspark import SparkConf, SparkContext
import matplotlib.pyplot as plt
import sys
import caffe
import os
import glob
conf = SparkConf().setAppName("image classification")
sc = SparkContext(conf=conf)
assert sc.version >= '1.5.1'
caffe_root = sys.argv[1]
images_folder_path = sys.argv[2]
output_path = sys.argv[3]
def vis_square(data):
data = (data - data.min()) / (data.max() - data.min())
n = int(np.ceil(np.sqrt(data.shape[0])))
padding = (((0, n ** 2 - data.shape[0]),
(0, 1), (0, 1))
+ ((0, 0),) * (data.ndim - 3))
data = np.pad(data, padding, mode='constant', constant_values=1)
data = data.reshape((n, n) + data.shape[1:]).transpose((0, 2, 1, 3) + tuple(range(4, data.ndim + 1)))
data = data.reshape((n * data.shape[1], n * data.shape[3]) + data.shape[4:])
f = plt.figure()
plt.imshow(data); plt.axis('off')
def main():
sys.path.insert(0, caffe_root + 'python')
caffe.set_mode_cpu()
model_def = caffe_root + 'models/bvlc_reference_caffenet/deploy.prototxt'
model_weights = caffe_root + 'models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel'
net = caffe.Net(model_def,
model_weights,
caffe.TEST)
mu = np.load(caffe_root + 'python/caffe/imagenet/ilsvrc_2012_mean.npy')
mu = mu.mean(1).mean(1)
transformer = caffe.io.Transformer({'data': net.blobs['data'].data.shape})
transformer.set_transpose('data', (2,0,1))
transformer.set_mean('data', mu)
transformer.set_raw_scale('data', 255)
transformer.set_channel_swap('data', (2,1,0))
net.blobs['data'].reshape(50,
3,
227, 227)
# display image name, class number, label
image_predictions = []
for image_path in glob.glob(images_folder_path+'*.jpg'):
image = caffe.io.load_image(image_path)
transformed_image = transformer.preprocess('data', image)
net.blobs['data'].data[...] = transformed_image
output = net.forward()
output_prob = output['prob'][0]
pred = output_prob.argmax()
labels_file = caffe_root + 'data/ilsvrc12/synset_words.txt'
labels = np.loadtxt(labels_file, str, delimiter='\t')
lb = labels[pred]
image_name = image_path.split(images_folder_path)[1]
result_str = image_name +' '+lb
image_predictions.append(result_str)
pred_rdd = sc.parallelize(image_predictions)
pred_rdd.saveAsTextFile(output_path)
if __name__ == '__main__':
main()
|
import threading
import time
import utils
from config import cfg
FOLLOWER = 0
CANDIDATE = 1
LEADER = 2
class Node():
def __init__(self, fellow, my_ip):
self.addr = my_ip
self.fellow = fellow
self.lock = threading.Lock()
self.DB = {}
self.log = []
self.staged = None
self.term = 0
self.status = FOLLOWER
self.majority = ((len(self.fellow) + 1) // 2) + 1
self.voteCount = 0
self.commitIdx = 0
self.timeout_thread = None
self.init_timeout()
# increment only when we are candidate and receive positve vote
# change status to LEADER and start heartbeat as soon as we reach majority
def incrementVote(self):
self.voteCount += 1
if self.voteCount >= self.majority:
print(f"{self.addr} becomes the leader of term {self.term}")
self.status = LEADER
self.startHeartBeat()
# vote for myself, increase term, change status to candidate
# reset the timeout and start sending request to followers
def startElection(self):
self.term += 1
self.voteCount = 0
self.status = CANDIDATE
self.init_timeout()
self.incrementVote()
self.send_vote_req()
# ------------------------------
# ELECTION TIME CANDIDATE
# spawn threads to request vote for all followers until get reply
def send_vote_req(self):
# TODO: use map later for better performance
# we continue to ask to vote to the address that haven't voted yet
# till everyone has voted
# or I am the leader
for voter in self.fellow:
threading.Thread(target=self.ask_for_vote,
args=(voter, self.term)).start()
# request vote to other servers during given election term
def ask_for_vote(self, voter, term):
# need to include self.commitIdx, only up-to-date candidate could win
message = {
"term": term,
"commitIdx": self.commitIdx,
"staged": self.staged
}
route = "vote_req"
while self.status == CANDIDATE and self.term == term:
reply = utils.send(voter, route, message)
if reply:
choice = reply.json()["choice"]
# print(f"RECEIVED VOTE {choice} from {voter}")
if choice and self.status == CANDIDATE:
self.incrementVote()
elif not choice:
# they declined because either I'm out-of-date or not newest term
# update my term and terminate the vote_req
term = reply.json()["term"]
if term > self.term:
self.term = term
self.status = FOLLOWER
# fix out-of-date needed
break
# ------------------------------
# ELECTION TIME FOLLOWER
# some other server is asking
def decide_vote(self, term, commitIdx, staged):
# new election
# decline all non-up-to-date candidate's vote request as well
# but update term all the time, not reset timeout during decision
# also vote for someone that has our staged version or a more updated one
if self.term < term and self.commitIdx <= commitIdx and (
staged or (self.staged == staged)):
self.reset_timeout()
self.term = term
return True, self.term
else:
return False, self.term
# ------------------------------
# START PRESIDENT
def startHeartBeat(self):
print("Starting HEARTBEAT")
if self.staged:
# we have something staged at the beginngin of our leadership
# we consider it as a new payload just received and spread it aorund
self.handle_put(self.staged)
for each in self.fellow:
t = threading.Thread(target=self.send_heartbeat, args=(each, ))
t.start()
def update_follower_commitIdx(self, follower):
route = "heartbeat"
first_message = {"term": self.term, "addr": self.addr}
second_message = {
"term": self.term,
"addr": self.addr,
"action": "commit",
"payload": self.log[-1]
}
reply = utils.send(follower, route, first_message)
if reply and reply.json()["commitIdx"] < self.commitIdx:
# they are behind one commit, send follower the commit:
reply = utils.send(follower, route, second_message)
def send_heartbeat(self, follower):
# check if the new follower have same commit index, else we tell them to update to our log level
if self.log:
self.update_follower_commitIdx(follower)
route = "heartbeat"
message = {"term": self.term, "addr": self.addr}
while self.status == LEADER:
start = time.time()
reply = utils.send(follower, route, message)
if reply:
self.heartbeat_reply_handler(reply.json()["term"],
reply.json()["commitIdx"])
delta = time.time() - start
# keep the heartbeat constant even if the network speed is varying
time.sleep((cfg.HB_TIME - delta) / 1000)
# we may step down when get replied
def heartbeat_reply_handler(self, term, commitIdx):
# i thought i was leader, but a follower told me
# that there is a new term, so i now step down
if term > self.term:
self.term = term
self.status = FOLLOWER
self.init_timeout()
# TODO logging replies
# ------------------------------
# FOLLOWER STUFF
def reset_timeout(self):
self.election_time = time.time() + utils.random_timeout()
# /heartbeat
def heartbeat_follower(self, msg):
# weird case if 2 are PRESIDENT of same term.
# both receive an heartbeat
# we will both step down
term = msg["term"]
if self.term <= term:
self.leader = msg["addr"]
self.reset_timeout()
# in case I am not follower
# or started an election and lost it
if self.status == CANDIDATE:
self.status = FOLLOWER
elif self.status == LEADER:
self.status = FOLLOWER
self.init_timeout()
# i have missed a few messages
if self.term < term:
self.term = term
# handle client request
if "action" in msg:
print("received action", msg)
action = msg["action"]
# logging after first msg
if action == "log":
payload = msg["payload"]
self.staged = payload
# proceeding staged transaction
elif self.commitIdx <= msg["commitIdx"]:
if not self.staged:
self.staged = msg["payload"]
self.commit()
return self.term, self.commitIdx
# initiate timeout thread, or reset it
def init_timeout(self):
self.reset_timeout()
# safety guarantee, timeout thread may expire after election
if self.timeout_thread and self.timeout_thread.isAlive():
return
self.timeout_thread = threading.Thread(target=self.timeout_loop)
self.timeout_thread.start()
# the timeout function
def timeout_loop(self):
# only stop timeout thread when winning the election
while self.status != LEADER:
delta = self.election_time - time.time()
if delta < 0:
self.startElection()
else:
time.sleep(delta)
def handle_get(self, payload):
print("getting", payload)
key = payload["key"]
if key in self.DB:
payload["value"] = self.DB[key]
return payload
else:
return None
# takes a message and an array of confirmations and spreads it to the followers
# if it is a comit it releases the lock
def spread_update(self, message, confirmations=None, lock=None):
for i, each in enumerate(self.fellow):
r = utils.send(each, "heartbeat", message)
if r and confirmations:
# print(f" - - {message['action']} by {each}")
confirmations[i] = True
if lock:
lock.release()
def handle_put(self, payload):
print("putting", payload)
# lock to only handle one request at a time
self.lock.acquire()
self.staged = payload
waited = 0
log_message = {
"term": self.term,
"addr": self.addr,
"payload": payload,
"action": "log",
"commitIdx": self.commitIdx
}
# spread log to everyone
log_confirmations = [False] * len(self.fellow)
threading.Thread(target=self.spread_update,
args=(log_message, log_confirmations)).start()
while sum(log_confirmations) + 1 < self.majority:
waited += 0.0005
time.sleep(0.0005)
if waited > cfg.MAX_LOG_WAIT / 1000:
print(f"waited {cfg.MAX_LOG_WAIT} ms, update rejected:")
self.lock.release()
return False
# reach this point only if a majority has replied and tell everyone to commit
commit_message = {
"term": self.term,
"addr": self.addr,
"payload": payload,
"action": "commit",
"commitIdx": self.commitIdx
}
self.commit()
threading.Thread(target=self.spread_update,
args=(commit_message, None, self.lock)).start()
print("majority reached, replied to client, sending message to commit")
return True
# put staged key-value pair into local database
def commit(self):
self.commitIdx += 1
self.log.append(self.staged)
key = self.staged["key"]
value = self.staged["value"]
self.DB[key] = value
# empty the staged so we can vote accordingly if there is a tie
self.staged = None
|
# Project: GBS Tool
# Author: Jeremy VanderMeer, [email protected]
# Date: February 16, 2018
# License: MIT License (see LICENSE file of this package for more information)
# imports
import numpy as np
# calculate a short term future load
class predictLoad:
def __init__(self):
self.futureLoad = 0
def predictLoad(self, SO):
# simple calculation, return the mean of the last 1 hour load
#startIdx = max(SO.idx - int(3600/SO.timeStep), 0)
#stopIdx = SO.idx+1
self.futureLoad = SO.DM.realLoad1hrTrend[SO.masterIdx] #np.mean(SO.DM.realLoad[startIdx:stopIdx]) |
import numpy.testing
from refnx._lib.util import (TemporaryDirectory, preserve_cwd,
possibly_open_file, MapWrapper)
from refnx._lib._numdiff import approx_hess2
from refnx._lib._testutils import PytestTester
try:
from refnx._lib._cutil import c_unique as unique
from refnx._lib._cutil import c_flatten as flatten
except ImportError:
from refnx._lib.util import unique, flatten
test = PytestTester(__name__)
del PytestTester
__all__ = [s for s in dir() if not s.startswith('_')]
|
"""File lookup."""
# pylint: disable=arguments-differ
# pyright: reportIncompatibleMethodOverride=none
from __future__ import annotations
import base64
import collections.abc
import json
import re
from typing import Any, Callable, Dict, List, Mapping, Sequence, Union, overload
import yaml
from troposphere import Base64, GenericHelperFn
from typing_extensions import Literal
from ....lookups.handlers.base import LookupHandler
from ...utils import read_value_from_path
TYPE_NAME = "file"
_PARAMETER_PATTERN = re.compile(r"{{([::|\w]+)}}")
ParameterizedObjectTypeDef = Union[bytes, str, Mapping[str, Any], Sequence[Any], Any]
ParameterizedObjectReturnTypeDef = Union[
Dict[str, "ParameterizedObjectReturnTypeDef"],
GenericHelperFn,
List["ParameterizedObjectReturnTypeDef"],
]
class FileLookup(LookupHandler):
"""File lookup."""
@classmethod
def handle(cls, value: str, **_: Any) -> Any:
r"""Translate a filename into the file contents.
Args:
value: Parameter(s) given to this lookup.
Fields should use the following format::
<codec>:<path>
Example::
# We've written a file to /some/path:
$ echo "hello there" > /some/path
# With CFNgin we would reference the contents of this file with the
# following
conf_key: ${file plain:file://some/path}
# The above would resolve to
conf_key: hello there
# Or, if we used wanted a base64 encoded copy of the file data
conf_key: ${file base64:file://some/path}
# The above would resolve to
conf_key: aGVsbG8gdGhlcmUK
Supported codecs:
**plain**
Plain Text
**base64**
Encode the plain text file at the given path with base64 prior to
returning it.
**parameterized**
The same as plain, but additionally supports referencing template
parameters to create userdata that's supplemented with information
from the template, as is commonly needed in EC2 UserData.
For example, given a template parameter of BucketName, the file
could contain the following text::
#!/bin/sh
aws s3 sync s3://{{BucketName}}/somepath /somepath
Then you could use something like this in the YAML config
file::
UserData: ${file parameterized:/path/to/file}
Resulting in the UserData parameter being defined as::
{ "Fn::Join" : ["", [
"#!/bin/sh\\naws s3 sync s3://",
{"Ref" : "BucketName"},
"/somepath /somepath"
]] }
**parameterized-b64**
The same as parameterized, with the results additionally wrapped
in ``{ "Fn::Base64": ... }`` , which is what you actually need
for EC2 UserData.
When using parameterized-b64 for UserData, you should use a
variable defined as such:
.. code-block:: python
from troposphere import AWSHelperFn
"UserData": {
"type": AWSHelperFn,
"description": "Instance user data",
"default": Ref("AWS::NoValue")
}
Then assign UserData in a LaunchConfiguration or Instance to
``self.variables["UserData"]``. Note that we use AWSHelperFn
as the type because the parameterized-b64 codec returns either a
Base64 or a GenericHelperFn troposphere object.
**json**
Decode the file as JSON and return the resulting object
**json-parameterized**
Same as ``json``, but applying templating rules from
``parameterized`` to every object *value*. Note that
object *keys* are not modified. Example (an external
PolicyDocument)::
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"some:Action"
],
"Resource": "{{MyResource}}"
}
]
}
**yaml**
Decode the file as YAML and return the resulting object.
All strings are returned as ``unicode`` even in Python 2.
**yaml-parameterized**
Same as ``json-parameterized``, but using YAML. Example::
Version: 2012-10-17
Statement:
- Effect: Allow
Action:
- "some:Action"
Resource: "{{MyResource}}"
"""
try:
codec, path = value.split(":", 1)
except ValueError:
raise TypeError(
f'File value must be of the format "<codec>:<path>" (got {value})'
) from None
return CODECS[codec](read_value_from_path(path))
def _parameterize_string(raw: str) -> GenericHelperFn:
"""Substitute placeholders in a string using CloudFormation references.
Args:
raw: String to be processed. Byte strings are not supported; decode them
before passing them to this function.
Returns:
An expression with placeholders from the input replaced, suitable to be
passed to Troposphere to be included in CloudFormation template.
This will be the input string without modification if no substitutions
are found, and a composition of CloudFormation calls otherwise.
"""
parts: List[Any] = []
s_index = 0
for match in _PARAMETER_PATTERN.finditer(raw):
parts.append(raw[s_index : match.start()])
parts.append({"Ref": match.group(1)})
s_index = match.end()
if not parts:
return GenericHelperFn(raw)
parts.append(raw[s_index:])
return GenericHelperFn({"Fn::Join": ["", parts]})
@overload
def parameterized_codec(
raw: Union[bytes, str], b64: Literal[False] = ...
) -> GenericHelperFn:
...
@overload
def parameterized_codec(raw: Union[bytes, str], b64: Literal[True] = ...) -> Base64:
...
def parameterized_codec(raw: Union[bytes, str], b64: bool = False) -> Any:
"""Parameterize a string, possibly encoding it as Base64 afterwards.
Args:
raw: String to be processed. Byte strings will be interpreted as UTF-8.
b64: Whether to wrap the output in a Base64 CloudFormation call.
Returns:
:class:`troposphere.AWSHelperFn`: Output to be included in a
CloudFormation template.
"""
if isinstance(raw, bytes):
raw = raw.decode("utf-8")
result = _parameterize_string(raw)
# Note, since we want a raw JSON object (not a string) output in the
# template, we wrap the result in GenericHelperFn (not needed if we're
# using Base64)
return Base64(result.data) if b64 else result
@overload
def _parameterize_obj(obj: Union[bytes, str]) -> GenericHelperFn:
...
@overload
def _parameterize_obj(obj: Mapping[str, Any]) -> ParameterizedObjectReturnTypeDef:
...
@overload
def _parameterize_obj(obj: List[Any]) -> ParameterizedObjectReturnTypeDef:
...
def _parameterize_obj(
obj: ParameterizedObjectTypeDef,
) -> ParameterizedObjectReturnTypeDef:
"""Recursively parameterize all strings contained in an object.
Parametrizes all values of a Mapping, all items of a Sequence, an
unicode string, or pass other objects through unmodified.
Byte strings will be interpreted as UTF-8.
Args:
obj: Data to parameterize.
Return:
A parameterized object to be included in a CloudFormation template.
Mappings are converted to `dict`, Sequences are converted to `list`,
and strings possibly replaced by compositions of function calls.
"""
if isinstance(obj, bytes):
return _parameterize_string(obj.decode("utf8"))
if isinstance(obj, str):
return _parameterize_string(obj)
if isinstance(obj, collections.abc.Mapping):
return {key: _parameterize_obj(value) for key, value in obj.items()}
if isinstance(obj, collections.abc.Sequence):
return [_parameterize_obj(item) for item in obj]
return obj
class SafeUnicodeLoader(yaml.SafeLoader):
"""Safe unicode loader."""
def construct_yaml_str(self, node: Any) -> Any:
"""Construct yaml str."""
return self.construct_scalar(node)
def yaml_codec(raw: str, parameterized: bool = False) -> Any:
"""YAML codec."""
data = yaml.load(raw, Loader=SafeUnicodeLoader)
return _parameterize_obj(data) if parameterized else data
def json_codec(raw: str, parameterized: bool = False) -> Any:
"""JSON codec."""
data = json.loads(raw)
return _parameterize_obj(data) if parameterized else data
CODECS: Dict[str, Callable[..., Any]] = {
"plain": lambda x: x,
"base64": lambda x: base64.b64encode(x.encode("utf8")).decode("utf-8"),
"parameterized": lambda x: parameterized_codec(x, False),
"parameterized-b64": lambda x: parameterized_codec(x, True),
"yaml": lambda x: yaml_codec(x, parameterized=False),
"yaml-parameterized": lambda x: yaml_codec(x, parameterized=True),
"json": lambda x: json_codec(x, parameterized=False),
"json-parameterized": lambda x: json_codec(x, parameterized=True),
}
|
# Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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 copy
import six
import st2common.bootstrap.sensorsregistrar as sensors_registrar
from tests import FunctionalTest
http_client = six.moves.http_client
__all__ = [
'SensorTypeControllerTestCase'
]
class SensorTypeControllerTestCase(FunctionalTest):
@classmethod
def setUpClass(cls):
super(SensorTypeControllerTestCase, cls).setUpClass()
# Register local sensor and pack fixtures
sensors_registrar.register_sensors(use_pack_cache=False)
def test_get_all(self):
resp = self.app.get('/v1/sensortypes')
self.assertEqual(resp.status_int, http_client.OK)
self.assertEqual(len(resp.json), 1)
self.assertEqual(resp.json[0]['name'], 'SampleSensor')
def test_get_one_success(self):
resp = self.app.get('/v1/sensortypes/dummy_pack_1.SampleSensor')
self.assertEqual(resp.status_int, http_client.OK)
self.assertEqual(resp.json['name'], 'SampleSensor')
def test_get_one_doesnt_exist(self):
resp = self.app.get('/v1/sensortypes/1', expect_errors=True)
self.assertEqual(resp.status_int, http_client.NOT_FOUND)
def test_disable_and_enable_sensor(self):
# Verify initial state
resp = self.app.get('/v1/sensortypes/dummy_pack_1.SampleSensor')
self.assertEqual(resp.status_int, http_client.OK)
self.assertTrue(resp.json['enabled'])
sensor_data = resp.json
# Disable sensor
data = copy.deepcopy(sensor_data)
data['enabled'] = False
put_resp = self.app.put_json('/v1/sensortypes/dummy_pack_1.SampleSensor', data)
self.assertEqual(put_resp.status_int, http_client.OK)
self.assertFalse(put_resp.json['enabled'])
# Verify sensor has been disabled
resp = self.app.get('/v1/sensortypes/dummy_pack_1.SampleSensor')
self.assertEqual(resp.status_int, http_client.OK)
self.assertFalse(resp.json['enabled'])
# Enable sensor
data = copy.deepcopy(sensor_data)
data['enabled'] = True
put_resp = self.app.put_json('/v1/sensortypes/dummy_pack_1.SampleSensor', data)
self.assertEqual(put_resp.status_int, http_client.OK)
self.assertTrue(put_resp.json['enabled'])
# Verify sensor has been enabled
resp = self.app.get('/v1/sensortypes/dummy_pack_1.SampleSensor')
self.assertEqual(resp.status_int, http_client.OK)
self.assertTrue(resp.json['enabled'])
|
import cv2
import numpy as np
from picamera.array import PiRGBArray
from picamera import PiCamera
camera = PiCamera()
camera.resolution = (640, 480)
camera.framerate = 10
rawCapture = PiRGBArray(camera, size=(640, 480))
for frame in camera.capture_continuous(rawCapture, format="bgr", use_video_port=True):
image = frame.array
hsv = cv2.cvtColor(image, cv2.COLOR_BGR2HSV)
cv2.imshow("frame", image)
key = cv2.waitKey(1)
rawCapture.truncate(0)
if key == 27:
break
cv2.destroyAllWindows()
|
# -*- coding: utf-8 -*-
import sys
from pathlib import Path
import pysam
import re
from collections import defaultdict
from .report import Reporter
from .utils import getlogger, CommandWrapper
logger = getlogger(__name__)
logger.setLevel(10)
class GeneName(object):
def __init__(self, annot):
self.gtf_file = annot
self.id_name = defaultdict(str)
self.parse()
def parse(self):
gene_id_pattern = re.compile(r'gene_id "(\S+)";')
gene_name_pattern = re.compile(r'gene_name "(\S+)"')
with open(self.gtf_file) as f:
for line in f.readlines():
if line.startswith('#!'):
continue
tabs = line.split('\t')
gtf_type, attributes = tabs[2], tabs[-1]
if gtf_type == 'gene':
gene_id = gene_id_pattern.findall(attributes)[-1]
gene_name = gene_name_pattern.findall(attributes)[-1]
self.id_name[gene_id] = gene_name
def __contains__(self, item):
return item in self.id_name
def __getitem__(self, item):
if item in self.id_name:
return self.id_name[item]
else:
return item
class FeatureCountsLogger(object):
def __init__(self, log, sample):
self.log = log
self.stat_info = {
'visible': {},
'invisible': {}
}
self.parse_log()
def parse_log(self):
vals = []
attrs = ['Assigned', 'Unassigned_NoFeatures', 'Unassigned_Ambiguity']
with open(self.log, mode='r', encoding='utf-8') as f:
lines = f.read()
for p in attrs:
pattern = re.compile(f'(?<={p})\D*(\d*)')
vals.append(int(pattern.findall(lines)[0]))
for attr, val in zip(attrs, vals):
self.stat_info['visible'][attr] = f'{val} ({val / sum(vals):.2%})'
class Alignment(object):
def __init__(self, alignment: pysam.AlignedRead):
self.alignment = alignment
self.__gene_name = None
@property
def gene_id(self):
if self.alignment.has_tag('XT'):
return self.alignment.get_tag('XT')
else:
return None
@property
def gene_name(self):
return self.__gene_name
@gene_name.setter
def gene_name(self, value):
self.__gene_name = value
self.alignment.set_tag('XT', self.__gene_name)
def featurecounts(ctx, input, annot, sample, outdir, format, nthreads, type, debug):
sample_outdir = outdir / sample / '04.featureCounts'
sample_outdir.mkdir(parents=True, exist_ok=True)
# featureCounts
logger.info('featureCounts start!')
featurecounts_cmd = f'featureCounts -a {annot} -o {sample_outdir / sample} -t {type} -R {format} -T {nthreads} {input}'
featurecounts_process = CommandWrapper(command=featurecounts_cmd, logger=logger)
if featurecounts_process.returncode:
logger.warning('featureCounts error!')
sys.exit(-1)
else:
logger.info('featureCounts done!')
# samtools sort
samtools_cmd = f'samtools sort -n -@ {nthreads} -o {sample_outdir / sample}_name_sorted.bam {sample_outdir / input.name}.featureCounts.bam'
samtools_process = CommandWrapper(samtools_cmd, logger=logger)
if samtools_process.returncode:
logger.warning('samtools error!')
sys.exit(-1)
else:
logger.info('samtools done!')
# convert gene id to gene name in BAM
gene_name_dict = GeneName(annot)
with pysam.AlignmentFile(f'{sample_outdir / sample}_name_sorted.bam', mode='rb') as f, pysam.AlignmentFile(f'{sample_outdir / sample}_name_sorted.tmp.bam', mode='wb', template=f) as g:
for i in f:
alignment = Alignment(i)
if alignment.gene_id:
gene_name = gene_name_dict[alignment.gene_id]
alignment.gene_name = gene_name
g.write(alignment.alignment)
Path(f'{sample_outdir / sample}_name_sorted.tmp.bam').rename(f'{sample_outdir / sample}_name_sorted.bam')
# parse log
featurecounts_log = FeatureCountsLogger(log=f'{sample_outdir}/{sample}.summary', sample=sample)
# report
logger.info('generate report start!')
Reporter(name='featureCounts', stat_json=featurecounts_log.stat_info, outdir=sample_outdir.parent)
logger.info('generate report done!')
|
"""exercism card games (lists) module."""
def get_rounds(number):
"""
Get list of current and next rounds
:param number: int - current round number.
:return: list - current round and the two that follow.
"""
return [number, number + 1, number + 2]
def concatenate_rounds(rounds_1, rounds_2):
"""
List of poker rounds across tables
:param rounds_1: list - first rounds played.
:param rounds_2: list - second set of rounds played.
:return: list - all rounds played.
"""
return rounds_1 + rounds_2
def list_contains_round(rounds, number):
"""
Find prior rounds
:param rounds: list - rounds played.
:param number: int - round number.
:return: bool - was the round played?
"""
return rounds.count(number) > 0
def card_average(hand):
"""
Find the average value of a hand
:param hand: list - cards in hand.
:return: float - average value of the cards in the hand.
"""
return sum(hand) / len(hand)
def approx_average_is_average(hand):
"""
Find if the median or approximate average is the same as the average
:param hand: list - cards in hand.
:return: bool - is approximate average the same as true average?
"""
hand_size = len(hand)
average = card_average(hand)
median_index = hand_size // 2
median = hand[median_index]
approx = (hand[0] + hand[hand_size - 1]) / 2
return average in [median, approx]
def average_even_is_average_odd(hand):
"""
Find if the average of odd cards in a hand is the same as the average of even cards
:param hand: list - cards in hand.
:return: bool - are even and odd averages equal?
"""
return card_average(hand[0::2]) == card_average(hand[1::2])
def maybe_double_last(hand):
"""
Find if the value of a 'bonus round' hand
:param hand: list - cards in hand.
:return: list - hand with Jacks (if present) value doubled.
"""
JACK_VALUE = 11
while hand.count(JACK_VALUE) > 0:
index = hand.index(JACK_VALUE)
hand[index] = JACK_VALUE * 2
return hand
|
import pickle
import sys
import timeit
from datetime import datetime
from os import path
import numpy as np
from sklearn.preprocessing import OneHotEncoder
def read_batch(src):
'''Unpack the pickle files
'''
with open(src, 'rb') as f:
if sys.version_info.major == 2:
data = pickle.load(f)
else:
data = pickle.load(f, encoding='latin1')
return data
def shuffle_data(X, y):
s = np.arange(len(X))
np.random.shuffle(s)
X = X[s]
y = y[s]
return X, y
def yield_mb(X, y, batchsize=64, shuffle=False):
assert len(X) == len(y)
if shuffle:
X, y = shuffle_data(X, y)
# Only complete batches are submitted
for i in range(len(X) // batchsize):
yield X[i * batchsize:(i + 1) * batchsize], y[i * batchsize:(i + 1) * batchsize]
def process_cifar(datapath):
'''Load the training and testing data
'''
print ('Preparing train set...')
train_list = [read_batch(path.join(datapath, 'data_batch_{}'.format(i + 1))) for i in range(5)]
x_train = np.concatenate([t['data'] for t in train_list])
y_train = np.concatenate([t['labels'] for t in train_list])
print ('Preparing test set...')
tst = read_batch(path.join(datapath, 'test_batch'))
x_test = tst['data']
y_test = np.asarray(tst['labels'])
print ('Done.')
return x_train, x_test, y_train, y_test
def cifar_for_library(datapath, channel_first=True, one_hot=False):
# Raw data
x_train, x_test, y_train, y_test = process_cifar(datapath)
# Scale pixel intensity
x_train = x_train / 255.0
x_test = x_test / 255.0
# Reshape
x_train = x_train.reshape(-1, 3, 32, 32)
x_test = x_test.reshape(-1, 3, 32, 32)
# Channel last
if not channel_first:
x_train = np.swapaxes(x_train, 1, 3)
x_test = np.swapaxes(x_test, 1, 3)
# One-hot encode y
if one_hot:
y_train = np.expand_dims(y_train, axis=-1)
y_test = np.expand_dims(y_test, axis=-1)
enc = OneHotEncoder(categorical_features='all')
fit = enc.fit(y_train)
y_train = fit.transform(y_train).toarray()
y_test = fit.transform(y_test).toarray()
# dtypes
x_train = x_train.astype(np.float32)
x_test = x_test.astype(np.float32)
y_train = y_train.astype(np.int32)
y_test = y_test.astype(np.int32)
return x_train, x_test, y_train, y_test
def create_logger(influx_client, **tags):
def logger(measurement, **fields):
try:
influx_client.write_points([{
"measurement": measurement,
"tags": tags,
"time": datetime.now().strftime('%Y-%m-%dT%H:%M:%S%z'),
"fields": fields
}])
except:
pass
return logger
class Timer:
def __enter__(self):
self.start_time = timeit.default_timer()
return self
def __exit__(self, *args):
self.end = timeit.default_timer()
self.interval = self.end - self.start_time |
import multiprocessing as mp
from itertools import repeat
import pickle
from pathlib import Path
import typing
from tqdm import tqdm
import pygraphviz as pgv
import networkx as nx
from recurse_words.corpi import get_corpus
from recurse_words import Recurser
class Graph_Recurser(Recurser):
"""
Turns out its a aa a lll a grappp hhh maaaaeeeennnnnn
This class will eventually replace :class:`.Recurser` as there's no reason to have both I
just didn't want to screw that one up is all.
"""
def __init__(self, corpus, subtractions:bool=True, replacements:bool=True, *args, **kwargs):
"""
Args:
corpus ():
subtractions ():
replacements ():
*args ():
**kwargs ():
"""
super(Graph_Recurser, self).__init__(corpus, *args, **kwargs)
self.subtractions = subtractions
self.replacements = replacements
# let's make words less weird
self.words, self._words = _unstack_words(self.words)
self._word_edges = [] # type: typing.List[typing.Tuple[str, str, str], ...]
@property
def word_edges(self) -> typing.List[typing.Tuple[str, str, str]]:
"""
word_trees except for just a list of the edges
after they have been made unique by calling set()
Returns:
[(from_word, transformation, to_word),...]
"""
if len(self._word_edges) == 0:
_word_edges = []
for tree in self.word_trees.values():
_word_edges.extend(tree)
self._word_edges = list(set(_word_edges))
return self._word_edges
def recurse_word(self, word:str, min_test_word:int=2, min_clipped_word:int=3) -> typing.Dict[str, typing.Tuple[typing.Tuple[str,str,str]]]:
"""
Recurse a single word -- see :meth:`.recurse_all_words` for args
.. note::
this could be made about a zillion times faster by vectorizing with pandas...
"""
# idk lazy way to unpack args when passed in parallel
if isinstance(word, tuple) and len(word) == 3:
word, min_test_word, min_clipped_word = word
# test all sub-words, iterating by length of subword
# don't test words that would make a clipped word shorter than
# min_clipped_word
edges = []
for test_word in self.words:
if len(test_word)<min_test_word or len(test_word)>=len(word):
continue
if self.internal_only and \
(word.startswith(test_word) or word.endswith(test_word)):
continue
if test_word in word:
if self.subtractions:
clipped_word = word.replace(test_word,'')
if len(clipped_word) > min_clipped_word and clipped_word in self._words.keys():
edges.append((word, test_word, clipped_word))
if self.replacements:
for replacement_word in self.words:
if len(test_word)<min_test_word:
continue
replaced_word = word.replace(test_word, replacement_word)
if replaced_word in self._words.keys():
edges.append((word, '_'.join((test_word, replacement_word)), replaced_word))
return {word:tuple(edges)}
def recurse_all_words(self,
min_include_word:int=9,
min_test_word:int=2,
min_clipped_word:int=3,
max_depth:int=0,
n_procs:int=12,
batch_size:int=100):
"""
Populate :attr:`.word_trees` by searching recursively through words for recurse words
Args:
min_include_word (int): Minimum length of original words to test
min_test_word (int): Minimum size of subwords to test splicing subwords with
min_clipped_word (int): Minimum size of the resulting
spliced/clipped word to be considered for additional recursive subwords
max_depth (int): Maximum recursion depth to allow, if 0, infinite
n_procs (int): Number of processors to spawn in the multiprocessing pool
"""
test_words = [word for word in self.words if
word not in self.word_trees.keys() and len(word) > min_include_word]
iterator = zip(
test_words,
repeat(min_test_word),
repeat(min_clipped_word)
)
hit_pbar = tqdm(position=0,leave=True)
progress_pbar = tqdm(position=1, total=len(test_words), leave=True)
with mp.Pool(n_procs) as pool:
for word_tree in pool.imap_unordered(self.recurse_word, iterator, chunksize=batch_size):
if len(word_tree)>0:
# get the root word by just digging into the word tree
# until we get the first string
# then use that to index for laziness sake
self.word_trees.update(word_tree)
# count ya money
hit_pbar.update()
# count ya time
progress_pbar.update()
def make_graph(self, root_word: typing.Optional[str] = None, graph_attr: dict = {},
depth:int=0,
node_attr: dict = {},
edge_attr: dict = {},
translate=True) -> pgv.AGraph:
edges = self.word_edges
if root_word is not None:
if len(self.corpus._retranslate_tul) > 0:
root_word = self.corpus._retranslate_tul[root_word.lower()]
edges = [edge for edge in edges if edge[0] == root_word]
if depth >0:
for depth_n in range(depth):
to_edges = [edge[2] for edge in edges]
for to_edge in to_edges:
try:
edges.extend(self.word_trees[to_edge])
except KeyError:
pass
edges = list(set(edges))
if len(self.corpus._retranslate_lut) > 0:
edges = [tuple(self.corpus._retranslate_lut[word] for word in edge) for edge in edges]
print('adding edges to graph...')
g = pgv.AGraph(directed=True)
for edge in tqdm(edges):
g.add_edge(edge[0], edge[2], label=edge[1])
if len(edges)>5000:
splines = False
else:
splines = True
g.graph_attr.update({
'fontname': "Helvetica",
'rankdir': 'LR',
'nodesep': 1,
'ranksep': 1,
'overlap': 'scale',
'splines': splines
})
g.node_attr.update({
'shape': 'rectangle',
'penwidth': 2,
'fontname': 'Helvetica',
'style': 'rounded'
})
g.edge_attr.update({
'color': '#666666',
'arrowsize': 0.5,
'arrowhead': 'open',
'labelfontcolor': '#666666'
})
g.graph_attr.update(graph_attr)
g.node_attr.update(node_attr)
g.edge_attr.update(edge_attr)
return g
def _unstack_words(words: typing.Dict[int, list]) -> typing.Tuple[typing.Tuple[str], typing.Dict[str,int]]:
"""
take the words of Recurser to those of Graph_Recurser
Args:
words ():
Returns:
replacements for words and _words
"""
words_out = [] # type: typing.List[str]
_words_out = {} # type: typing.Dict[str, int]
for word_list in words.values():
words_out.extend(word_list)
_words_out.update({word:1 for word in word_list})
return tuple(sorted(set(words_out))), _words_out
|
import argparse
import os
import json
import glob
from os.path import join as pjoin
from others.vocab_wrapper import VocabWrapper
def train_emb(args):
data_dir = os.path.abspath(args.data_path)
print("Preparing to process %s ..." % data_dir)
raw_files = glob.glob(pjoin(data_dir, '*.json'))
ex_num = 0
vocab_wrapper = VocabWrapper(args.mode, args.emb_size)
vocab_wrapper.init_model()
file_ex = []
for s in raw_files:
exs = json.load(open(s))
print("Processing File " + s)
for ex in exs:
example = list(map(lambda x: x['word'], ex['session']))
file_ex.extend(example)
ex_num += 1
vocab_wrapper.train(file_ex)
vocab_wrapper.report()
print("Datasets size: %d" % ex_num)
vocab_wrapper.save_emb(args.emb_path)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-mode", default='word2vec', type=str, choices=['glove', 'word2vec'])
parser.add_argument("-data_path", default="", type=str)
parser.add_argument("-emb_size", default=100, type=int)
parser.add_argument("-emb_path", default="", type=str)
args = parser.parse_args()
train_emb(args)
|
"Tests for twisted.names"
|
def dijkstra(graph, start, end):
shortest_distance = {}
non_visited_nodes = {}
for i in graph:
non_visited_nodes[i] = graph[i]
infinit = float('inf')
for no in non_visited_nodes:
shortest_distance[no] = infinit
shortest_distance[start] = 0
while non_visited_nodes != {}:
shortest_extracted_node = None
for i in non_visited_nodes:
if shortest_extracted_node is None:
shortest_extracted_node = i
elif shortest_distance[i] < shortest_distance[shortest_extracted_node]:
shortest_extracted_node = i
for no_v, Weight in graph[shortest_extracted_node]:
if Weight + shortest_distance[shortest_extracted_node] < shortest_distance[no_v]:
shortest_distance[no_v] = Weight + shortest_distance[shortest_extracted_node]
non_visited_nodes.pop(shortest_extracted_node)
return shortest_distance
cities, origin, destiny = map(int, input().split())
graph = {i:[] for i in range(1, cities+1)}
for i in range(cities-1):
u, v, w = map(int, input().split())
graph[v].append((u, w))
graph[u].append((v, w))
|
from socket import *
import sys
conn = socket(AF_INET, SOCK_STREAM)
conn.connect(("127.0.0.1", 14900))
print("We are going to solve quadratic equation: a*x^2 + b*x + c = 0")
a = input("Enter a: ")
b = input("Enter b: ")
c = input("Enter c: ")
if not a:
conn.close()
sys.exit(1)
data = str.encode(','.join([a,b,c]))
conn.send(data)
data = conn.recv(1024)
print(data.decode())
conn.close()
|
# using hash table
# Time complexity : O(n). We do search() and insert() for nnn times and each operation takes constant time.
#Space complexity : O(n). The space used by a hash table is linear with the number of elements in it.
def solution(s):
dic = set()
lst = s.split()
for item in lst :
if item in dic :
return True
dic.add(item)
return False
n = input()
print(solution(n)) |
# Stars in Hipparcos catalogue whose magnitudes are <=6
# or are present in constellationship.fab
hip_stars = """
hip,ra,dec,Vmag
71683,219.90206584,-60.83397468,-0.01
53253,163.37356736,-58.8531708,3.78
8198,26.34846064,9.15773579,4.26
26634,84.91224946,-34.07410786,2.65
79882,244.58037087,-4.69251067,3.23
92175,281.79363678,-4.74786733,4.22
86032,263.73362733,12.56003477,2.08
110609,336.12912965,49.47639255,4.55
14354,46.29413912,38.84027386,3.32
57363,176.40174608,-66.72876272,3.63
22549,72.80151623,5.60510396,3.68
102422,311.32239594,61.83878197,3.41
24608,79.1723294,45.99799111,0.08
51233,156.97083204,36.70721174,4.2
2081,6.57104571,-42.30598151,2.4
116771,354.98767042,5.62629159,4.13
114724,348.58066516,-6.04900282,4.22
98337,299.68928113,19.49214775,3.51
57380,176.46482927,6.52937639,4.04
69673,213.9153001,19.1824103,-0.05
84012,257.59453052,-15.72491023,2.43
28716,90.97993717,20.13845182,4.64
6193,19.86664622,27.26405858,4.74
36917,113.845387,-28.36932346,4.65
20535,66.00923865,-34.01684639,3.97
57399,176.51255835,47.77940596,3.69
59449,182.91296303,-52.36846029,3.97
28734,91.03006202,23.26334108,4.16
116805,355.10211725,44.33393168,4.15
69701,214.00362402,-6.00054666,4.07
90185,276.04299301,-34.38461611,1.79
104521,317.58541733,10.13157953,4.7
112716,342.39792615,-13.59263187,4.05
41037,125.6284816,-59.50948307,1.86
110672,336.31926326,1.37740059,4.8
112724,342.42006922,66.2004077,3.5
102485,311.52388737,-25.27089759,4.13
102488,311.55284473,33.9702561,2.48
43103,131.67425219,28.75989827,4.03
36962,113.98060996,26.89574074,4.06
12387,39.87065299,0.32851065,4.08
69732,214.09591139,46.08830542,4.18
100453,305.5570912,40.25667924,2.23
43109,131.6937942,6.41880927,3.38
26727,85.18969642,-1.94257224,1.74
18532,59.4634614,40.01021467,2.9
112748,342.50080334,24.60157928,3.51
18543,59.50735988,-13.50851533,2.97
41075,125.70879003,43.18813064,4.25
71795,220.2872992,13.72830024,3.78
79992,244.93515331,46.31336639,3.91
63608,195.54415463,10.95915037,2.85
12413,39.94996945,-42.89166991,4.74
63613,195.56776386,-71.54885522,3.61
80000,244.96009378,-50.15550766,4.01
55425,170.25169486,-54.4910193,3.9
77952,238.78567608,-63.43072662,2.83
102532,311.66459285,16.12429621,4.27
55434,170.28414306,6.02932171,4.05
61585,189.29590999,-69.13556382,2.69
30867,97.20445834,-7.0330625,3.76
16537,53.23268409,-9.45826215,3.72
82080,251.49268245,82.03726206,4.21
51362,157.36959259,-2.73907802,5.19
30883,97.24077812,20.21213298,4.13
18597,59.68645594,-61.40018557,4.56
94376,288.13875006,67.66154129,3.07
80047,245.08668995,-78.69574502,4.68
84143,258.03830643,-43.23918896,3.32
71860,220.48231508,-47.38820014,2.3
45238,138.29989786,-69.71720773,1.67
18614,59.74125467,35.7910326,3.98
98495,300.14813841,-72.91050366,3.97
116928,355.51169238,1.78004078,4.49
12484,40.1650536,-54.54991148,5.21
12486,40.1668101,-39.8553755,4.11
96468,294.18032351,-1.2866009,4.36
86228,264.32971086,-42.99782386,1.86
102618,311.91896433,-9.49577573,3.78
43234,132.10821073,5.83781245,4.35
106723,324.27012962,-19.46601155,4.51
71908,220.62674745,-64.97513849,3.18
16611,53.44698381,-21.63288274,4.26
51437,157.57283183,-0.63702597,5.08
28910,91.53884928,-14.9352543,4.67
14576,47.04221485,40.9556477,2.09
18673,59.98118081,-24.01621526,4.62
80112,245.29715015,-25.59279641,2.9
110838,336.83319902,-64.96635445,4.51
86263,264.39667273,-15.39855727,3.54
78072,239.11326153,15.66161688,3.85
33018,103.19724251,33.96125399,3.6
49402,151.28112504,-13.06462598,4.6
53502,164.17937983,-37.1377655,4.6
22783,73.51254722,66.34267806,4.26
92420,282.51997782,33.36266704,3.52
24845,79.89385195,-13.1767885,4.29
22797,73.56290198,2.44067205,3.71
71957,220.76509742,-5.65820663,3.87
45336,138.59107912,2.3142803,3.89
78104,239.22115205,-29.21407322,3.87
114971,349.29140788,3.28228889,3.7
104732,318.2341091,30.22691571,3.21
57632,177.26490656,14.57206032,2.14
18724,60.17006562,12.49034659,3.41
14632,47.26674871,49.61327752,4.05
80170,245.48005997,19.15313028,3.74
112948,343.13139485,-32.87550403,4.46
114996,349.3573889,-58.23573417,3.99
90422,276.74340114,-45.96845881,3.49
22845,73.72386617,10.1508331,4.64
112961,343.15364976,-7.57959928,3.73
47431,144.96400779,-1.14281015,3.9
4427,14.17721554,60.71674038,2.15
14668,47.37404785,44.8575437,3.79
78159,239.39688262,26.8778799,4.14
4436,14.18838148,38.49934462,3.86
67927,208.67116138,18.39771704,2.68
115033,349.47589677,-9.18251333,4.41
55642,170.9810513,10.52950862,4.0
61789,189.96887275,-39.9873025,4.63
76127,233.23242724,31.35913344,4.14
41312,126.43414409,-66.13689023,3.77
82273,252.16622864,-69.02771504,1.91
59747,183.78631548,-58.74892785,2.79
12653,40.63944366,-50.80029384,5.4
37229,114.70779243,-26.8038363,3.8
4463,14.30166657,23.41764802,4.4
110960,337.20796732,-0.01997197,3.65
29038,91.89302018,14.7684717,4.42
51576,158.00609749,-61.68533255,3.3
84345,258.66191003,14.39033281,2.78
59774,183.85650051,57.0326169,3.32
33152,103.53313596,-24.18421076,3.89
90496,276.99266896,-25.42170011,2.82
55687,171.15246271,-10.85932331,4.81
33160,103.54749079,-12.0386279,4.08
6537,21.00585424,-8.18325655,3.6
86414,264.86619338,46.00633181,3.82
110991,337.29277618,58.41519853,4.07
65936,202.76106938,-39.40730717,3.9
100751,306.41190763,-56.7350901,1.94
43409,132.63301402,-27.70984441,4.02
110997,337.3173945,-43.49556461,3.97
55705,171.22051587,-17.68400965,4.06
104858,318.62006328,10.00698105,4.47
84379,258.75796073,24.83920414,3.12
84380,258.76180979,36.80916183,3.16
59803,183.95154259,-17.54192947,2.58
115102,349.70600166,-32.53202671,4.41
37279,114.82549301,5.22499306,0.4
20894,67.16558676,15.87088266,3.4
20889,67.15416474,19.18043155,3.53
68002,208.88494064,-47.28837511,2.55
12706,40.8251625,3.23581853,3.47
57757,177.67382733,1.76471793,3.59
35228,109.20760182,-67.95715182,3.97
72105,221.24674043,27.07422244,2.35
22957,74.09281008,13.51446582,4.06
111022,337.38259256,47.70688669,4.34
49583,151.83313456,16.76266443,3.48
102831,312.49200878,-33.77972227,4.89
10670,34.32861359,33.84719358,4.03
2484,7.88611087,-62.95821764,4.36
49593,151.85733981,35.24469332,4.49
78265,239.71297035,-26.11410529,2.89
82363,252.4464847,-59.04137792,3.77
27072,86.11579339,-22.44838217,3.59
92609,283.05431199,-62.18759351,4.22
35264,109.28565178,-37.09746988,2.71
8645,27.86513997,-10.33503772,3.74
90568,277.2077448,-49.07058791,4.1
70090,215.13929846,-37.88529479,4.05
80331,245.9978587,61.51421312,2.73
16852,54.21826338,0.40166163,4.29
80343,246.02576647,-20.03732689,4.48
18907,60.78908352,5.98930513,3.91
27100,86.19324494,-65.73552592,4.34
82396,252.54088739,-34.29323171,2.29
4577,14.65150376,-29.35744905,4.3
12770,41.03062458,-13.85869636,4.24
90595,277.29939072,-14.56581345,4.67
16870,54.27366762,-40.27454534,4.57
23015,74.24841152,33.16609031,2.69
106985,325.02273477,-16.6623077,3.69
12777,41.04994313,49.22844773,4.1
76267,233.67195048,26.71469302,2.22
61932,190.37932752,-48.95988844,2.2
53740,164.94360292,-18.29878342,4.08
49641,151.98450128,-0.37163673,4.48
113136,343.66255214,-15.82082024,3.27
31216,98.22594705,7.33296511,4.47
45556,139.27252781,-59.27522929,2.21
76276,233.70061304,10.53886686,3.8
96757,295.02413251,18.01389046,4.39
61941,190.41517626,-1.44937487,2.74
23040,74.3216524,53.75210119,4.43
111104,337.6219165,43.12337585,4.52
49669,152.0929611,11.96720706,1.36
39429,120.89602782,-40.0031477,2.21
76297,233.78519974,-41.166757,2.8
109074,331.4459822,-0.3198507,2.95
35350,109.52324476,16.54038314,3.58
59929,184.39282008,-67.9607357,4.06
104987,318.9559653,5.24784463,3.92
12828,41.23559307,10.1141459,4.27
72220,221.56218374,1.89288544,3.73
6686,21.45396795,60.23528317,2.66
14879,48.01886556,-28.98761809,3.8
12843,41.27577129,-18.57256259,4.47
76333,233.88157906,-14.78953681,3.91
78384,240.03053401,-38.39670656,3.42
109111,331.52868903,-39.54335326,4.47
94779,289.27570325,53.36845943,3.8
88635,271.45202872,-30.42409129,2.98
111169,337.82292092,50.28249144,3.76
102978,312.95537911,-26.91913259,4.12
33347,104.03427011,-17.05424211,4.36
78401,240.08335942,-22.62170993,2.29
21060,67.70874876,-44.95374954,5.07
96837,295.26224687,17.47604116,4.39
37447,115.31180176,-9.55113089,3.94
10826,34.83663617,-2.97764262,6.47
102989,312.99483886,-33.17797395,6.06
80463,246.35397192,14.03326957,4.57
57936,178.22716875,-33.90812431,4.29
107089,325.36935979,-77.39004641,3.73
82514,252.96763467,-38.04737967,3.0
109139,331.60929021,-13.86967906,4.29
111188,337.87637809,-32.34607343,4.29
23123,74.63709138,1.71401579,4.47
29271,92.56030656,-74.75304517,5.08
80473,246.39632325,-23.4471785,4.57
8796,28.27044954,29.57882927,3.42
113246,343.9870813,-32.53962827,4.2
60000,184.58676739,-79.31223982,4.24
92791,283.62618249,36.8986131,4.22
45688,139.71101495,36.80259678,3.82
109176,331.75277532,25.34511155,3.77
51839,158.86710909,-78.60778577,4.11
8832,28.38255961,19.29385177,3.88
88714,271.65779638,-50.09147713,3.65
86670,265.62197877,-39.02998302,2.39
58001,178.45769772,53.69476008,2.41
68245,209.56777521,-42.10075343,3.83
53910,165.46031999,56.38242679,2.34
27288,86.73891997,-14.82195004,3.55
76440,234.18009374,-66.31703754,4.11
74395,228.071229,-52.09924722,3.41
78493,240.36068726,29.85106144,4.98
677,2.09691071,29.09043199,2.07
33449,104.31919106,58.42275948,4.35
49841,152.64698939,-12.35408295,3.61
72370,221.96545315,-79.0447507,3.83
76470,234.25604093,-28.13507945,3.6
92855,283.81635716,-26.29672225,2.05
8886,28.59885632,63.67010151,3.35
80569,246.75597864,-18.45625099,4.22
68282,209.66978489,-44.80358412,3.87
27321,86.82119852,-51.06651408,3.85
78527,240.47227393,58.56525152,4.01
25281,81.11923643,-2.39714624,3.35
80582,246.79598315,-47.55478604,4.46
8903,28.66003816,20.80803505,2.64
66249,203.67330011,-0.59582018,3.38
117452,357.231442,-28.13026767,4.59
6867,22.09136277,-43.31823391,3.41
109268,332.0582728,-46.96097543,1.73
86742,265.86813797,4.56730281,2.76
113368,344.41269372,-29.62223615,1.17
88794,271.88562777,28.7624885,3.84
35550,110.03073983,21.98232055,3.5
19167,61.64601411,50.35126182,4.25
60129,184.97648721,-0.66680331,3.89
101093,307.3953547,62.99410487,4.21
27366,86.93912023,-9.66960478,2.07
109285,332.09587026,-32.98846846,4.5
41704,127.56612488,60.71816925,3.35
746,2.29452113,59.1497796,2.28
115438,350.74261152,-20.10058008,3.96
105199,319.64488119,62.58557261,2.45
64238,197.48746449,-5.53900959,4.38
64241,197.49698594,17.52943143,4.32
29426,92.98498257,14.20876508,4.45
80628,246.95078039,-8.37173117,4.62
25336,81.28276276,6.34970223,1.64
11001,35.43726143,-68.65941811,4.08
107259,325.87692018,58.78004608,4.23
765,2.35267495,-45.74742618,3.88
21248,68.37730272,-29.7664919,4.49
92946,284.0549266,4.20359514,4.62
21281,68.49907315,-55.04497465,3.3
88866,272.14505748,-63.66855312,4.33
47908,146.46280429,23.77425466,2.97
43813,133.84844309,5.94556331,3.11
45860,140.26375544,34.39256184,3.14
82729,253.64585529,-42.36131277,3.62
4906,15.73586845,7.89013546,4.27
33579,104.65645182,-28.97208374,1.5
37677,115.95195447,-28.95482577,3.94
54061,165.93195289,61.7510332,1.81
9007,28.98946829,-51.60889586,3.69
78639,240.80373746,-49.22969549,4.65
107315,326.04649214,9.87501126,2.38
76600,234.66403964,-29.77775386,3.66
103227,313.70251293,-58.45415486,3.67
58188,179.0039732,-17.15082863,5.17
39757,121.88603686,-24.30432404,2.83
25428,81.57297249,28.60745001,1.65
93015,284.23762024,-67.23349464,4.4
107354,326.16139335,25.64503558,4.14
13147,42.27258148,-32.40589767,4.45
2912,9.22020689,33.71934362,4.34
70497,216.2991518,51.85074357,4.04
109410,332.49685019,33.17822387,4.28
90982,278.3757739,-42.31250982,4.62
105319,319.96662074,-53.44942748,4.39
31592,99.17098928,-19.2558792,3.95
37740,116.11189245,24.3979926,3.57
62322,191.57002677,-68.10811913,3.04
109427,332.54993837,6.19786491,3.52
107380,326.23670806,-33.02578153,4.35
45941,140.52840967,-55.01066799,2.47
39794,121.98247078,-68.61706214,4.35
23416,75.49222568,43.82330836,3.03
80763,247.35192046,-26.43200249,1.06
72571,222.57212471,-27.96037084,4.42
111497,338.83908579,-0.11749758,4.04
64394,197.9683061,27.87818312,4.23
27530,87.45692625,-56.16666304,4.5
97165,296.24365768,45.13080969,2.86
19343,62.1653782,47.71251275,3.96
21393,68.88766065,-30.56234148,3.81
86929,266.4332804,-64.72387151,3.61
56211,172.8509187,69.33107594,3.82
13209,42.49596812,27.26050706,3.61
23453,75.61952888,41.07583744,3.69
33694,105.01682255,76.97740778,4.55
93085,284.43250651,-21.1066543,3.52
72607,222.67636006,74.15550491,2.07
99240,302.18170154,-66.18206819,3.55
68520,210.41163881,1.54453185,4.23
74666,228.87567917,33.31483347,3.46
7083,22.81293588,-49.07270222,3.93
23467,75.67916017,-71.31430012,5.3
21421,68.9801611,16.50930139,0.87
72622,222.71963807,-16.04177818,2.75
80816,247.55499986,21.48961328,2.78
50099,153.43424113,-70.03790334,3.29
109492,332.71365289,58.20126083,3.39
56243,172.94195189,-59.44206107,5.07
39863,122.14853276,-2.98378594,4.36
7097,22.87087261,15.34582301,3.62
86974,266.61469538,27.72067625,3.42
95168,290.41816155,-17.84719749,3.92
31681,99.42792124,16.39925217,1.93
37826,116.32895983,28.02619862,1.16
21444,69.07975664,-3.35245903,3.93
31685,99.44029726,-43.19593364,3.17
17358,55.73126161,47.78755139,3.01
29651,93.71388683,-6.27477613,3.99
13268,42.67420868,55.89549611,3.77
3031,9.63894077,29.31175144,4.34
29655,93.71940501,22.50679887,3.31
23522,75.8545419,60.44224552,4.03
62434,191.93026305,-59.68876362,1.25
17378,55.81209088,-9.76339465,3.52
78820,241.35929462,-19.80545336,2.56
113638,345.2200484,-52.754137,4.11
84970,260.50241,-24.99954543,3.27
27628,87.73997037,-35.76830865,3.12
91117,278.80177781,-8.24407292,3.85
70638,216.73014215,-83.66788445,4.31
80883,247.7284288,1.98392313,3.82
103413,314.29340932,41.16713558,3.94
97278,296.56491454,10.6132612,2.72
80894,247.78486581,-16.61273261,4.29
25606,82.06134664,-20.75944097,2.81
27654,87.83039904,-20.87908866,3.76
93194,284.73592771,32.68955742,3.25
50191,153.68398022,-42.12194167,3.85
39953,122.383126,-47.33658771,1.75
3092,9.83198236,30.86102393,3.27
9236,29.69247303,-61.5698591,2.86
56343,173.25048102,-31.85762516,3.54
89112,272.80734401,-45.9544176,4.52
115738,351.73314692,1.25560806,4.95
54301,166.63511623,-62.42411328,4.62
17440,56.0499063,-64.80690264,3.84
74785,229.25172845,-9.3829174,2.61
44066,134.62175702,11.85770096,4.26
87073,266.89617277,-40.12699753,2.99
107556,326.76018807,-16.12728595,2.85
17448,56.07971679,32.28824817,3.84
23595,76.10167557,-35.48297839,4.55
1067,3.30897012,15.1835959,2.83
101421,308.30321322,11.3032628,4.03
5165,16.5210284,-46.71841361,3.32
76852,235.38773012,19.67040059,4.51
23607,76.14228959,15.40410527,4.65
83000,254.41707231,9.37503268,3.19
93244,284.90565584,15.06829817,4.02
113726,345.48026764,42.32597924,3.62
35904,111.02376056,-29.3031036,2.45
46146,141.16357964,26.1823241,4.47
78914,241.62265863,-45.17318517,4.73
87108,266.97316882,2.70727617,3.75
74824,229.37853924,-58.80120806,4.07
97365,296.84692668,18.5342861,3.68
107608,326.93395765,-30.89830426,5.02
68702,210.95585201,-60.37303931,0.61
44127,134.80189116,48.04182647,3.12
66657,204.97191001,-53.46639378,2.29
3179,10.12683548,56.53733109,2.24
81008,248.15121699,11.48804151,4.84
15474,49.87917471,-21.75786384,3.7
58484,179.90655602,-78.22183894,4.88
115830,351.99206304,6.37899212,4.27
85112,260.92060269,37.1459463,4.15
91262,279.23473511,38.7836918,0.03
19587,62.96641752,-6.83758114,4.04
23685,76.3652677,-22.37103258,3.19
83081,254.65504861,-55.99014085,3.12
23693,76.37773246,-57.47270388,4.71
11407,36.74634294,-47.70384014,4.24
99473,302.82618951,-0.82146099,3.24
68756,211.09729071,64.37585051,3.67
15510,49.98187828,-43.06978344,4.26
76952,235.68568764,26.29563742,3.81
97433,297.0431338,70.26793017,3.84
50335,154.1725706,23.41731066,3.43
81065,248.3628478,-78.89714775,3.86
38070,117.02153444,-25.93716858,4.4
17593,56.53556491,-12.10158939,4.43
109754,333.4697084,39.71492708,4.5
54463,167.14745809,-58.9750369,3.93
48319,147.74732429,59.03873553,3.78
74946,229.72742565,-68.67954501,2.87
52419,160.73917189,-64.39445006,2.74
50371,154.27073249,-61.33230426,3.39
50372,154.27413109,42.91436491,3.45
36046,111.43165048,27.7980804,3.78
83153,254.89603227,-53.16043772,4.06
23767,76.62871992,41.23447447,3.18
44248,135.15987807,41.782911,3.96
113881,345.94357301,28.08278909,2.44
13531,43.56441901,52.7624789,3.93
11484,37.03976038,8.46005355,4.3
87261,267.46450837,-37.04330355,3.19
48356,147.8695573,-14.84660315,4.11
5348,17.09617396,-55.24576016,3.94
81126,248.52575889,42.437041,4.2
31978,100.24441938,9.89575411,4.66
27890,88.52522878,-63.08962721,4.65
17651,56.71203143,-23.24972265,4.22
5364,17.1474649,-10.18226422,3.46
93429,285.42011337,-5.73911489,4.02
34045,105.93955289,-15.63328598,4.11
68862,211.51152954,-41.17963292,4.36
79101,242.19240795,44.93490599,4.23
77055,236.01466385,77.79449293,4.29
89341,273.44087411,-21.05883369,3.84
25859,82.80314914,-35.47051883,3.86
83207,255.07239072,30.92640462,3.92
27913,88.59576026,20.27617455,4.39
21770,70.14046881,-41.86375251,4.44
54539,167.41586845,44.49848682,3.0
85258,261.32495294,-55.52988403,2.84
95501,291.3745854,3.1147753,3.36
17678,56.80975497,-74.23896234,3.26
9487,30.5117503,2.76375946,3.82
77070,236.06697851,6.42562699,2.63
85267,261.34857936,-56.37772676,3.31
38170,117.3235632,-24.85978574,3.34
68895,211.59290444,-26.6823611,3.25
109857,333.75912456,57.04358673,4.18
19747,63.50047645,-42.29436792,3.85
34088,106.02721594,20.57029706,4.01
113963,346.19022409,15.20526442,2.49
29997,94.71157129,69.31978723,4.76
60718,186.64956584,-63.09909166,0.77
36145,111.67854711,49.21152684,4.61
48437,148.12681031,-8.10503034,5.07
46390,141.89684698,-8.65860253,1.99
56633,174.17047243,-9.80224683,4.7
5434,17.37552272,47.24179245,4.26
93506,285.65297476,-29.88010539,2.6
23875,76.96243797,-5.08644618,2.78
19780,63.60618205,-62.47385803,3.33
68933,211.67061857,-36.36995445,2.06
60742,186.73446813,28.2684229,4.35
5447,17.43301493,35.6205577,2.07
111944,340.12857952,44.27630499,4.5
42313,129.41402575,5.70378169,4.14
48455,148.19090535,26.00695149,3.88
25930,83.00166968,-0.29909204,2.25
111954,340.16391659,-27.04361694,4.18
27989,88.7929386,7.40706274,0.45
75097,230.18214784,71.83401605,3.0
3419,10.8973794,-17.9866046,2.04
36188,111.78767771,8.28931548,2.89
44382,135.61164961,-66.39607654,4.0
19812,63.72442567,48.40933095,4.12
21861,70.51450254,-37.14429672,5.04
30060,94.90577841,59.01096456,4.44
97649,297.69582916,8.86832198,0.76
81266,248.97064054,-28.21601625,2.82
109937,333.99240257,37.74873668,4.14
25985,83.18256633,-17.82228853,2.58
105858,321.61085665,-65.36619828,4.21
13701,44.10687368,-8.89814446,3.89
75141,230.34300711,-40.64751791,3.22
101769,309.38725441,14.59508707,3.64
101772,309.39179996,-47.2915018,3.11
71053,217.95745802,30.37143717,3.57
60823,187.00992483,-50.23063496,3.91
50583,154.99314355,19.84148873,2.01
105881,321.66677526,-22.41133249,3.77
52633,161.44584694,-80.54018778,4.45
54682,167.91453864,-22.82584719,4.46
112029,340.3655033,10.83136442,3.41
42402,129.6893236,3.34143518,4.45
71075,218.0194663,38.30825261,3.04
7588,24.42852736,-57.23675749,0.45
9640,30.97480447,42.32972473,2.1
75177,230.45154169,-36.26137639,3.57
85423,261.8386404,-29.8670334,4.28
77233,236.54690158,15.42182561,3.65
110003,334.20848509,-7.78329031,4.17
46515,142.31133187,-35.95133548,4.51
19893,64.00660681,-51.486648,4.26
44471,135.90636137,47.15652471,3.57
7607,24.49815046,48.62821317,3.59
1473,4.5819037,36.78522405,4.51
64962,199.73040326,-23.17151233,2.99
28103,89.10122041,-14.16770015,3.71
9677,31.12266035,-29.2968189,4.68
19921,64.12095285,-59.30215628,4.44
17874,57.3635215,-36.20025014,4.17
5586,17.9151534,30.08963821,4.51
26069,83.40632371,-62.48982532,3.76
17884,57.38034127,65.52597247,4.39
54751,168.15005395,-60.31762504,4.59
81377,249.28974079,-10.56708997,2.54
62956,193.50728928,55.95982116,1.76
93683,286.1707572,-21.74149568,3.76
32246,100.98302496,25.13112417,3.06
15863,51.08070979,49.86117959,1.79
11767,37.95451535,89.26410951,1.97
52727,161.69240913,-49.42025537,2.69
112122,340.66687781,-46.8845769,2.07
118268,359.82787346,6.86332112,4.03
75264,230.67029542,-44.68962207,3.37
116231,353.24274717,-37.81826761,4.38
99848,303.86800672,47.71420822,3.96
97804,298.11819944,1.00566053,3.87
79374,242.99889379,-19.46070821,4.0
42515,130.02559777,-35.30835239,3.97
13847,44.56531119,-40.30467242,2.88
1562,4.8569773,-8.82392145,3.56
95771,292.17637441,24.66490477,4.44
15900,51.20330738,9.02886984,3.61
112158,340.75057261,30.2212452,2.93
87585,268.38220612,56.87264281,3.73
60965,187.4660642,-16.51543255,2.94
17959,57.5896213,71.33226569,4.59
28199,89.38420824,-35.28327968,4.36
89642,274.40681271,-36.76168598,3.1
106032,322.16498797,70.56071603,3.23
118322,359.97907782,-65.57713201,4.49
93747,286.35253418,13.86347817,2.99
110130,334.62539235,-60.25958759,2.87
108085,328.48218523,-37.36485231,3.0
73273,224.63302849,-43.13396008,2.68
46651,142.67500055,-40.46676938,3.6
75323,230.84435831,-59.32078728,4.48
13884,44.69915268,-64.07128407,4.98
1599,5.01775052,-64.87479041,4.23
58948,181.30224822,8.73298544,4.12
30277,95.52845101,-33.43640007,3.85
101958,309.90953078,15.91207193,3.77
20042,64.47359293,-33.79834786,3.55
40526,124.12883578,9.1855447,3.53
91726,280.5684449,-9.05254866,4.7
65109,200.14924004,-36.71229493,2.75
54872,168.52708898,20.52371682,2.56
32349,101.28715539,-16.71611582,-1.44
22109,71.37562968,-3.25465749,4.01
54879,168.56002157,15.42957019,3.33
26207,83.78448789,9.93415842,3.39
97886,298.36539742,24.07961388,4.57
20070,64.56090838,50.29550228,4.6
32362,101.32235265,12.89559111,3.35
3693,11.83468919,24.26717799,4.08
93805,286.56224338,-4.88255421,3.43
95853,292.42649598,51.72977887,3.76
5742,18.4372798,24.58371315,4.67
50801,155.58225241,41.49951638,3.06
63090,193.90086578,3.39747026,3.39
30324,95.67493869,-17.95591772,1.98
73334,224.79035436,-42.10419383,3.13
93825,286.60462682,-37.06343689,4.23
13954,44.92875737,8.90736485,4.71
48774,149.21559015,-54.56779042,3.52
30343,95.74011257,22.51358585,2.87
77450,237.18490342,18.14156366,4.09
34444,107.09785107,-26.39319967,1.83
46733,142.88211727,63.06186073,3.65
91792,280.75890049,-71.4281134,4.01
63125,194.00694736,38.3183798,2.89
9884,31.79336293,23.46242313,2.01
44700,136.63236217,38.45221539,4.56
46750,142.930117,22.96797056,4.32
61084,187.79149709,-57.11321169,1.59
114341,347.36165473,-21.1724096,3.68
85670,262.60817511,52.30138713,2.79
28328,89.78668859,-42.81513544,3.96
93864,286.7350369,-27.67042304,3.32
34481,107.18694146,-70.4989317,3.78
71352,218.87676586,-42.15782447,2.33
85693,262.68462483,26.11064528,4.41
85696,262.69098221,-37.29581099,2.7
75458,231.23239471,58.96606559,3.29
28358,89.88181908,54.28465615,3.72
26311,84.05338934,-1.20191983,1.69
28360,89.88217889,44.94743278,1.9
77512,237.39852576,26.06839434,4.59
3786,12.17060122,7.58507917,4.44
104139,316.48678349,-17.23286077,4.08
95947,292.68033578,27.95968112,3.05
7884,25.35789264,5.48761322,4.45
77516,237.40503496,-3.43020774,3.54
52943,162.40620179,-16.19364835,3.11
67275,206.81559553,17.45690604,4.5
102098,310.35797809,45.280338,1.25
30419,95.94202277,4.59286494,4.39
16083,51.79230269,9.73267975,3.73
28380,89.93028743,37.21258518,2.65
85727,262.77463763,-60.68384819,3.6
100064,304.51356413,-12.54485184,3.58
67301,206.88515682,49.31326506,1.85
30438,95.9879578,-52.69566046,-0.62
79593,243.58641439,-3.69432297,2.73
20205,64.94834891,15.62764232,3.65
24305,78.23292017,-16.20546821,3.29
98036,298.82830569,6.40676346,3.71
40702,124.63145814,-76.91972263,4.05
87808,269.06325226,37.25053918,3.86
46853,143.21430974,51.67730022,3.17
24327,78.30782374,-12.94129154,4.36
110351,335.25644466,46.53656951,4.55
91919,281.08477214,39.67012325,4.67
61199,188.11672818,-72.13298844,3.84
44816,136.99899358,-43.43258935,2.23
112405,341.51461617,-81.38161517,4.13
87833,269.15154113,51.48889499,2.24
81693,250.32150123,31.60272561,2.81
85792,262.96038867,-49.8761448,2.84
106278,322.88972517,-5.57117221,2.9
18216,58.42792843,-24.61222998,4.64
3881,12.45353036,41.07891087,4.53
42799,130.80614655,3.39866225,4.3
89908,275.18929342,71.33781433,4.22
94005,287.08737435,-40.49670284,4.57
42806,130.82144197,21.46850069,4.66
14135,45.56988401,4.08973396,2.54
112440,341.63282775,23.56565397,3.97
77622,237.70402545,4.47773018,3.71
110395,335.41406405,-1.38733152,3.86
59196,182.08958257,-50.72242559,2.58
85822,263.05416851,86.58646042,4.35
59199,182.10340415,-24.72887552,4.02
14146,45.59791746,-23.62447166,4.08
77634,237.73974002,-33.62716543,3.97
91971,281.1931559,37.60511483,4.34
85829,263.06677411,55.17295855,4.86
32578,101.96520524,2.4121591,4.48
18246,58.53300625,31.88363552,2.84
89931,275.24850731,-29.82810326,2.72
42828,130.89807304,-33.18638557,3.68
10064,32.38594522,34.98729693,3.0
89937,275.26409444,72.73284302,3.55
73555,225.48650975,40.39056569,3.49
26451,84.4111907,21.14254914,2.97
32607,102.04771795,-61.94139161,3.24
61281,188.37060139,69.78823768,3.85
65378,200.9814288,54.92536175,2.23
16228,52.26722286,59.94033011,4.21
116584,354.39101047,46.45815183,3.81
46952,143.55575799,36.39755774,4.54
89962,275.32750318,-2.89882514,3.23
69483,213.37086581,51.78996497,4.53
51056,156.47839283,33.79612024,4.72
24436,78.63446812,-8.20164055,0.18
87933,269.44119041,29.24787975,3.7
51069,156.52261134,-16.83629043,3.83
8068,25.91515608,50.68873247,4.01
34693,107.78487783,30.24516301,4.41
61317,188.43560252,41.35747975,4.24
67464,207.37615454,-41.68770924,3.41
102281,310.86472445,15.07458079,4.43
92041,281.41411035,-26.99077831,3.17
108431,329.47947795,-54.99257552,4.4
116631,354.53417222,43.26807316,4.29
42911,131.17124835,18.15430871,3.94
14240,45.90341436,-59.73777523,5.12
42913,131.17594322,-54.70882109,1.93
94114,287.36809043,-37.90447444,4.11
55203,169.54554950000002,31.5292889,3.79
8102,26.01701214,-15.93748006,3.49
85927,263.40216661,-37.10382115,1.62
81833,250.72402184,38.92225448,3.48
38827,119.19464272,-52.98235988,3.46
75695,231.95721171,29.10570271,3.66
61359,188.59681092,-23.39675917,2.65
22449,72.46004413,6.96127568,3.19
55219,169.61973665,33.09430567,3.49
59316,182.53116941,-22.61976647,3.02
83895,257.19664842,65.71468331,3.17
81852,250.76940133,-77.51743472,4.23
102333,311.00972399,-51.92097088,4.51
94141,287.44097099,-21.02361486,2.88
77760,238.16892286,42.45151803,4.6
12225,39.3515484,-52.5430859,5.3
65474,201.29824701,-11.16132203,0.98
57283,176.19073179,-18.35067436,4.71
28614,90.59582821,9.64727656,4.12
110538,335.89009791,52.22904653,4.42
79822,244.37619927,75.75533045,4.95
94160,287.50732036,-39.34079617,4.1
34769,107.96608433,-0.49276432,4.15
51172,156.78792133,-31.06777887,4.28
2021,6.43780017,-77.25424559,2.82
20455,65.73372189,17.5425142,3.77
53229,163.32793791,34.21487112,3.79
22509,72.65300729,8.90017585,4.35
112623,342.13874318,-51.31686379,3.49
88048,269.75663119,-9.77363197,3.32
55282,169.83519815,-14.7785414,3.56
36850,113.64942834,31.88827629,1.58
90098,275.80675509,-61.49390093,4.35
73714,226.0175648,-25.28196464,3.25
116727,354.83687081,77.63227593,3.21
14328,46.19912802,53.50644013,2.91
100345,305.25281519,-14.78136716,3.05
102395,311.23955989,-66.20321257,3.42
32768,102.48403461,-50.61455978,2.94
65536,201.53361196,72.3914759,5.82
65545,201.5475583,-1.19247104,5.97
65550,201.56917611,46.02805514,5.88
98325,299.65825586,30.98366542,5.51
98332,299.67204736,-69.16395702,5.74
32809,102.59070404,-17.08455489,5.77
32810,102.59728614,-31.70605741,5.74
32814,102.60624458,13.41317681,5.68
65581,201.67986526,-12.70766416,5.27
98353,299.73832815,-26.19576726,4.84
65593,201.73381813,-41.49756217,5.69
65595,201.7366828,78.6438692,5.74
98375,299.79390784,23.10128127,5.68
32844,102.69143512,41.78123001,4.99
98383,299.83510276,45.772541,5.92
32851,102.7076328,-0.54088194,5.78
32855,102.7181354,-34.36731852,4.99
88,0.26909344,-48.8098756,5.71
32864,102.73787312,67.57193419,5.14
65639,201.86318324,-15.97357823,4.76
107,0.33383021,-50.33737333,5.53
98412,299.93407757,-35.27630546,4.37
98416,299.94726369,-9.95823773,5.87
98421,299.96398797,-34.69779905,5.3
122,0.39876554,-77.06572447,4.78
98425,299.97998104,37.04288544,5.15
124,0.40423123,61.2228008,5.58
98438,300.01378502,17.51651107,5.33
32912,102.8624429,-70.96341123,5.41
145,0.45603512,-3.02750382,5.13
32921,102.88769134,21.76114781,5.28
154,0.490079,-6.01407212,4.37
98461,300.06638742,-37.70171949,5.95
98470,300.08437729,-33.70345186,5.65
32938,102.92675235,-36.23026974,5.94
171,0.54231321,27.08225603,5.8
98478,300.09625434,-66.94935994,5.75
183,0.58300278,-29.72041402,5.04
65721,202.10753905,13.77878731,4.97
65728,202.11286336,59.94578679,5.4
194,0.62375948,8.48546309,5.7
32968,102.99994465,23.60171799,5.68
207,0.65036241,66.09896618,5.87
98512,300.20136014,-45.11291835,5.8
98526,300.24574019,8.55773487,5.9
98543,300.27520144,27.75357306,4.66
65790,202.30416835,10.81830976,5.65
33024,103.20611647,8.3803734,5.75
98571,300.33984712,50.1046949,5.06
65810,202.35522543,-51.16513397,5.04
33048,103.27103853,59.4485433,5.34
98583,300.3689394,64.82097431,5.22
301,0.93495762,-17.33598771,4.55
98608,300.43643688,-59.3758934,4.95
98609,300.43629598,24.80042345,5.88
33077,103.32838668,-19.032763,5.65
98624,300.46858915,-66.94396609,5.32
33092,103.38711401,-20.22425377,4.82
98633,300.49416893,-13.63721711,5.69
330,1.05692695,62.2876637,5.9
98636,300.50596562,24.93804313,5.23
33104,103.4260352,68.88830947,5.11
343,1.08247517,-16.52903618,5.78
355,1.12549376,-10.5095233,4.99
377,1.17211746,-71.43689145,5.59
379,1.17492163,67.16644546,5.68
98688,300.66450229,-27.70984484,4.43
98702,300.70446942,67.8735649,4.51
33184,103.60277157,-1.12699558,5.44
418,1.27562467,61.31397012,5.8
33202,103.66098292,13.17782721,4.73
98738,300.8183324,18.50099282,5.99
443,1.33392048,-5.7076182,4.61
98754,300.87506577,16.03125458,5.73
98761,300.88941349,-37.9406987,4.77
98767,300.90585631,29.89680555,5.73
66006,202.99118799,-6.25581614,4.68
476,1.42483879,13.39626645,5.55
33248,103.76141033,-20.4048761,5.8
33277,103.82778182,25.37569753,5.74
98819,301.02593601,17.07017322,5.8
518,1.56589255,58.43673285,5.98
98823,301.03464661,7.27796579,5.51
522,1.57989765,-49.07519111,5.7
531,1.61058271,64.19616861,5.57
66065,203.14957695,-28.69276831,5.69
33302,103.90596197,-20.13649687,4.66
98842,301.08163573,-32.05629561,4.99
98844,301.09646574,-0.7093086,5.67
33316,103.94553278,-22.94143934,5.29
66091,203.21517405,-15.36301166,5.52
98863,301.15072827,32.21859764,5.62
66098,203.24197067,-10.16499993,5.21
33345,104.02769064,-14.04342969,5.0
33357,104.06662718,-48.72114406,4.94
33372,104.10763844,9.95657776,5.9
33377,104.13357225,46.27399831,5.85
33384,104.1436477,-79.42019304,5.45
98920,301.28955674,19.99107063,5.09
636,1.94541637,-22.50855978,5.93
33415,104.23354304,46.70535221,5.88
33421,104.25216441,33.6810387,5.91
655,2.0145307,-33.52932605,5.67
98962,301.3869957,61.99541982,5.4
66198,203.53044103,55.34843362,5.6
66200,203.53304559,3.65896665,4.92
671,2.07305222,-8.82411211,5.99
66234,203.61358066,49.01597263,4.68
33478,104.3912802,-24.63084103,5.45
66247,203.66854064,-13.2143237,5.92
33485,104.40461277,45.09409429,4.9
66257,203.69920134,37.18241487,4.91
99026,301.55769149,53.16568776,5.81
729,2.2601029,18.21196314,5.57
99031,301.59069831,35.97246811,5.38
761,2.33778595,-27.98792818,5.42
99080,301.72253149,23.61442518,5.08
66320,203.88040075,-5.3961912,5.7
33558,104.60455873,-34.1117085,5.07
33575,104.64957958,-25.41415695,5.59
813,2.50917617,11.14581307,5.54
814,2.50906524,-82.22404699,5.29
99120,301.84648453,-52.880793,4.93
33603,104.73760308,3.60235542,5.96
840,2.57862406,-5.24858764,5.84
841,2.58019098,46.07227168,5.01
66400,204.20187031,-26.49519801,5.73
99171,302.00759586,-0.67818539,5.97
873,2.67847777,-12.57989671,5.84
66417,204.2461792,24.61329748,5.72
66427,204.27504351,-44.14320351,5.96
66435,204.29578548,71.24225187,5.5
66438,204.30160477,-61.69185588,5.63
910,2.81607181,-15.46797744,4.89
33682,104.96056686,-67.91644271,5.18
66454,204.34780642,-46.42787917,5.91
66458,204.36511796,36.29489816,4.82
930,2.89341697,-27.79973666,5.41
33715,105.06593401,16.07899813,5.73
950,2.93336928,-35.13311958,5.24
99255,302.22227861,77.71141943,4.38
33729,105.09898513,-8.40682071,5.95
983,3.04160825,-17.93827767,5.29
99303,302.35674599,36.83962153,4.93
33779,105.21452067,-51.4025847,5.14
66563,204.67528292,-29.56086741,5.81
33804,105.27477623,-25.21563451,5.64
66575,204.70396386,-57.62271715,6.0
33827,105.33924341,70.80829581,5.69
1074,3.33175776,-84.99397839,5.78
1086,3.37850157,41.03536964,5.71
33856,105.42978223,-27.93483037,3.49
1096,3.42602016,-26.02234535,5.94
66634,204.87686652,52.92120839,5.46
66640,204.89423728,10.74626874,5.57
99404,302.6397368,26.90416876,5.51
33878,105.48493536,-5.72206536,5.22
66656,204.9522902,-40.05170854,5.61
66666,204.99919734,-49.94995564,5.74
66681,205.04461458,-64.57655314,5.79
33914,105.57288867,15.33600809,5.78
99461,302.79974205,-36.10121213,5.32
1158,3.61511753,-7.7805321,5.13
33927,105.60325208,24.21544555,5.2
33929,105.60639395,17.75552109,5.96
1168,3.65068528,20.20670177,4.79
33937,105.63869653,16.67444721,5.86
1170,3.66006652,-18.93286561,4.44
1191,3.72714477,-9.56957107,5.77
66727,205.16862222,19.95571946,5.73
99500,302.89548025,62.0785422,5.7
66738,205.18447166,54.68163385,4.63
33971,105.72823645,-4.23923131,4.99
33977,105.75613571,-23.83329091,3.02
99518,302.94989392,26.80899041,5.51
66753,205.23116443,-85.78604339,5.56
66763,205.25978175,22.49576769,5.63
99531,303.00292293,26.47880654,5.91
34000,105.81290836,-59.17810882,5.5
34002,105.82464762,9.13835473,5.96
34017,105.876911,29.33708092,5.93
66798,205.37455173,64.82241123,5.85
34033,105.90863308,10.95181665,5.14
66803,205.40323586,-8.70298428,5.03
99572,303.10779499,-12.61749756,5.84
66821,205.43654531,-54.55942517,4.99
1288,4.03694261,-31.4463941,5.66
34059,105.97336519,-49.58391974,4.92
34065,105.98882342,-43.6080386,5.56
34081,106.01163996,-42.33727967,5.2
66849,205.50453038,-58.78707818,5.38
34086,106.02186687,-5.32397878,5.63
99631,303.30784141,-1.00933927,5.44
99639,303.32522252,46.81567507,4.8
34105,106.07637777,-56.74972437,5.14
66878,205.59622868,82.75240765,5.92
99655,303.34943986,56.56772217,4.28
1354,4.23768117,61.53318556,5.74
99663,303.36506529,60.64056887,5.81
1366,4.27290947,38.68163564,4.61
66903,205.66334481,78.06443702,5.91
66907,205.68095975,34.98902127,5.98
1372,4.28768216,47.9474053,5.86
99675,303.40794272,46.74132872,3.8
66924,205.72926046,-41.4010433,5.96
66925,205.73379181,-56.76797125,6.0
66936,205.76546779,3.53790254,5.35
34182,106.32654057,22.63745849,6.0
99738,303.56053824,28.69481733,5.19
99742,303.56924693,15.19760859,4.94
99747,303.57928141,-52.44576973,5.65
34215,106.41260736,9.18580035,5.78
66984,205.91702227,-42.06752151,5.96
99770,303.63347045,36.80630231,4.93
1493,4.65940621,31.51722681,5.88
34267,106.54829765,34.47396758,5.55
99824,303.81623086,25.59195704,4.79
67057,206.12427878,-16.17907241,5.55
99825,303.82246194,-27.03297677,5.73
34301,106.6698614,-11.29401399,5.41
99841,303.84903774,33.72908383,5.7
99853,303.87599551,23.50890567,5.18
34339,106.77949044,-40.89326813,5.8
99874,303.94222813,27.81424252,4.5
34349,106.80537383,-51.96828341,5.96
99889,304.00256183,45.57952514,5.87
34358,106.84332696,34.00928769,5.94
34360,106.84411442,-23.84072193,5.75
67143,206.40371311,-26.11600947,5.81
67153,206.42185517,-33.04372133,4.23
34387,106.95620363,7.471214,5.74
1630,5.10167651,30.93561358,5.89
67172,206.48466354,-12.42652777,5.5
1645,5.1494233,8.19027134,5.38
1647,5.16265059,-69.6249131,5.5
99951,304.196191,24.67110166,5.3
1657,5.18965919,32.91118651,5.79
67194,206.55643908,41.08874609,5.88
99968,304.2303564,40.36507501,5.27
34440,107.09183051,15.93067481,5.47
67210,206.5794252,38.50362557,5.92
1686,5.28028766,37.96860317,5.16
67231,206.64856701,54.43267937,5.68
67234,206.66407543,-51.43276572,4.64
67239,206.68051281,25.70223621,5.97
34473,107.1765478,-70.49708749,5.68
1706,5.36992048,-77.42687264,5.96
1708,5.37999249,-28.98146883,5.18
67244,206.73479883,-36.25193268,5.15
67250,206.74906154,38.54269716,5.51
100017,304.38053244,66.85368726,5.91
100027,304.41195582,-12.50821221,4.3
34495,107.21278354,-39.6556567,4.83
1728,5.44280717,-20.05802357,5.61
100044,304.4466743,38.03293038,4.77
67288,206.85579936,-17.85983898,5.41
67292,206.86516082,-50.24929064,5.92
100062,304.50582282,-21.80996026,5.86
67304,206.91058648,-50.32068238,5.46
100069,304.529117,40.7320823,5.83
34561,107.38902026,-16.23450903,6.0
100097,304.60312616,55.39709469,5.76
100108,304.61939765,36.99980266,5.58
34579,107.42926751,-25.23103424,5.69
100122,304.66279134,34.98277505,5.14
67384,207.16139965,31.19020636,5.61
34622,107.55700787,-4.23710618,4.91
34624,107.58050194,-27.49152005,5.46
100195,304.84835064,-19.11853329,5.28
34670,107.69784763,-48.93209831,5.12
100221,304.90299439,62.25747223,5.71
1921,6.06523854,52.01991398,5.58
67457,207.36133803,-34.45077587,4.19
67459,207.36933786,15.7979049,4.05
67472,207.40412075,-42.47373178,3.47
67480,207.42847143,21.26410554,4.92
67485,207.43960426,61.48931304,5.97
34722,107.84611075,26.85658754,5.75
34724,107.84839855,-0.30192779,5.44
67494,207.46784793,-18.13416784,4.96
1960,6.19793946,61.83105752,5.38
100256,305.00079007,13.54809129,5.96
100261,305.02505368,68.88031746,5.59
100276,305.08919406,17.79292755,5.82
1982,6.27671131,53.04678574,5.72
34752,107.91385722,39.32054881,4.91
34758,107.9233544,-20.88306308,5.84
2006,6.35086824,1.93969241,5.77
67545,207.60282876,5.49722353,6.0
100310,305.1659006,-12.75907959,4.77
34798,108.05089523,-25.94258852,5.91
34802,108.06586108,-40.49880847,5.3
34817,108.10759589,-36.54438135,5.94
34819,108.10990763,24.12859368,5.85
100357,305.29802056,63.98012256,5.69
34834,108.14010612,-46.75930492,4.49
67605,207.78839876,34.66439928,5.89
2072,6.55084089,-43.67982953,3.93
67627,207.85808156,64.72327175,4.58
34888,108.2799741,-11.25134106,5.77
67663,207.94673726,-46.89866634,5.77
67664,207.94762556,-69.40125831,5.73
67665,207.94781273,34.4442404,4.76
34899,108.30562723,-45.18273921,4.87
67669,207.95666818,-32.99408951,4.32
100435,305.51429481,24.44609928,5.5
100437,305.52236511,45.79499386,5.58
34909,108.34281633,16.15896615,5.07
34912,108.34750436,51.42874516,5.46
34914,108.35010498,-22.67424092,5.99
34922,108.38466128,-44.63973886,4.42
2159,6.81128534,-25.54717034,5.99
100469,305.61460531,-42.04954821,5.6
67703,208.02025807,-52.81152998,5.26
100501,305.68873297,41.02601218,5.95
34975,108.54521171,-3.9017788,5.8
2210,6.9820767,-33.00716708,4.86
34981,108.56338394,-26.35250672,4.42
34982,108.56466594,-9.94753257,5.9
2219,7.01214583,17.89312479,5.01
34987,108.58359421,3.11141396,5.36
2225,7.05689073,44.39445199,5.18
35005,108.63591859,12.11582451,5.71
100541,305.79455687,5.34298725,5.3
2240,7.11050391,-39.91500236,5.42
67782,208.29284253,28.64813144,5.91
67786,208.30224583,-31.92761234,4.75
67787,208.30387768,17.93286824,5.71
35020,108.65892,-48.27192679,4.75
35025,108.67491609,24.88498433,5.84
35029,108.69173772,-46.84967201,5.72
35037,108.70272548,-26.77266737,4.01
100574,305.93487099,37.47644863,5.87
35044,108.71317279,-27.03799562,5.58
67819,208.38650432,-35.66424831,5.53
100587,305.96508591,32.19017195,4.43
35054,108.73813756,-41.42639431,5.95
100591,305.97157577,-42.4228682,5.64
67836,208.42956174,-53.37332288,5.87
67848,208.46255863,53.72867698,5.7
35083,108.83779758,-30.68644675,5.36
35084,108.83844662,-52.49922583,5.96
67861,208.48850068,-47.12816406,5.83
35120,108.91429203,7.97774244,5.78
2353,7.50982453,-3.95733189,5.72
2355,7.53068761,29.75155669,5.2
35127,108.93017183,-10.58360531,5.95
35136,108.95891058,47.23996383,5.54
2377,7.58305272,59.97755442,5.94
35146,108.97876339,59.63746693,5.2
2381,7.59439188,-23.78768034,5.17
2383,7.60882391,-48.2149104,5.67
35152,108.98819207,27.89741878,5.75
67929,208.67561164,-1.50312472,5.16
67942,208.70462976,-67.65209986,5.74
35180,109.0606397,-15.58568903,5.46
35181,109.06447257,-46.77453309,5.64
35202,109.13271258,-38.31892835,5.81
100738,306.3617841,-28.66326948,5.86
35205,109.14580496,-27.88117875,4.66
67973,208.80059001,-52.16082189,5.66
35210,109.153474,-23.31559423,4.83
100754,306.41887268,21.40964167,5.68
35226,109.20586731,-36.59263304,5.03
2472,7.85408632,-48.80351439,4.76
2475,7.85683233,33.58164217,5.88
68009,208.91197697,-82.66619021,5.95
2487,7.88945045,-62.96556114,4.53
2497,7.9214897,52.8395265,5.59
2505,7.94316214,54.52228873,4.74
35304,109.39049869,52.13107137,5.93
68079,209.08239879,-46.59294832,5.82
2548,8.09909149,6.95546321,5.69
100859,306.75944773,49.38336663,5.73
68092,209.11615413,1.05058146,5.9
68101,209.13726652,-54.70466479,6.0
68103,209.14242131,27.49208236,5.02
2568,8.14785798,20.29431643,5.38
35341,109.50922231,40.88339251,5.87
2578,8.18293786,-63.03149984,5.07
35347,109.51770458,-43.98678606,5.86
100881,306.83004095,-18.21172075,5.08
35363,109.57663613,-36.7339621,4.65
2599,8.24996522,62.93178271,4.17
100907,306.89274082,38.44033171,5.63
2611,8.29331086,54.89498495,5.93
35384,109.63324093,49.46475569,5.0
35393,109.63963486,-39.21028511,5.24
35406,109.65910553,-36.74273501,5.11
35412,109.66824576,-24.5587011,4.88
35415,109.67702795,-24.95437538,4.37
68191,209.41201502,-63.68669582,4.71
35427,109.71364186,-26.58585449,5.29
2661,8.42101003,-29.5582782,5.55
100965,307.0607765,81.4227086,5.38
35476,109.84321184,2.74069372,5.9
2711,8.61596951,-52.37309007,5.57
35487,109.86742483,-16.39524421,5.7
101027,307.21505826,-17.8136869,4.77
68269,209.62977484,-24.97224873,5.2
68276,209.66217838,21.69621876,5.76
35509,109.9485231,7.14294749,5.91
2762,8.81199674,-3.59284649,5.2
101067,307.33496018,36.454729,5.9
101076,307.34889835,30.36855505,4.01
101082,307.36485961,81.09127721,5.96
101084,307.36296162,56.06819023,5.89
2787,8.886806,-0.50560963,5.94
35564,110.08926679,-52.31152411,5.5
68333,209.82284474,-50.36964668,5.92
101101,307.41250268,-2.88553072,4.91
2802,8.92156654,-48.00090673,5.51
101123,307.47461485,-18.58317785,5.94
35589,110.1616963,-52.08592415,5.38
101138,307.51475272,48.95156896,4.94
35611,110.22881586,-26.96383792,6.0
35615,110.2428566,-14.36048932,5.59
2854,9.03462681,54.16845015,5.08
68390,210.00050476,-25.01040286,5.77
35626,110.26805285,-25.89164338,5.87
35643,110.32290992,45.22819985,5.74
2876,9.11393972,60.32621461,5.78
2900,9.19350416,44.48858693,5.14
2903,9.19713461,15.23172547,5.89
68455,210.21852583,-66.26891031,5.96
2920,9.24285251,53.89690937,3.69
35699,110.48691986,20.44365827,5.09
2941,9.33625274,-24.76726709,5.57
2942,9.33841421,35.39950145,5.45
35710,110.51090261,36.76058415,5.12
35712,110.51449432,0.1771207,5.99
101243,307.82840129,49.22029727,5.44
101260,307.87672152,74.95461939,5.18
35727,110.55637088,-19.01660007,4.94
68498,210.33512183,8.89490635,5.98
35749,110.60578995,-5.98282858,5.83
68523,210.43122999,-45.60342079,4.34
35785,110.71687911,55.28139167,5.8
35795,110.75290455,-31.92378114,5.4
101345,308.09873181,-9.85338362,5.66
68581,210.59492286,-27.42977295,5.47
35846,110.86879684,25.05053128,5.04
35848,110.87080145,-27.83429354,5.37
3083,9.79122542,49.35458862,5.45
35855,110.88289728,-32.20206752,5.41
3093,9.84085866,21.25047245,5.88
101427,308.32351584,-80.9648625,5.76
68670,210.860439,-56.2134338,5.93
3137,9.96645783,-44.79629257,6.0
3138,9.981549,21.4384951,5.36
35907,111.03528435,40.67238935,5.23
3170,10.10695771,-59.45460432,5.89
35941,111.13938953,27.63785656,5.77
101474,308.47577758,35.25085182,4.61
101475,308.47851612,46.69386601,5.78
101477,308.47946766,-44.51604811,5.12
101483,308.48767775,13.02725466,5.39
35951,111.16744816,-16.20147272,5.18
35957,111.18272304,-31.80890499,5.35
3193,10.17655087,-4.3518407,5.9
35984,111.23786563,51.88725855,5.8
35987,111.24241421,11.6695236,5.37
35998,111.28464776,-13.75197777,5.79
3231,10.2799355,39.45866407,5.3
3245,10.33146537,-46.08500681,4.59
36024,111.35528272,-25.21776666,5.79
36039,111.4087348,-79.09418819,5.54
36041,111.41207071,9.27609733,4.99
3277,10.44332165,-56.50131553,5.72
68815,211.33282525,-76.79675222,5.69
101589,308.82723064,14.67421328,4.64
36055,111.46333436,-5.77496087,5.98
3299,10.51425676,66.14759233,5.83
3300,10.51623134,50.51252576,4.8
101612,308.89521457,-60.58174925,4.75
3330,10.61822148,-65.46803008,5.38
36114,111.59104412,-51.01848117,5.09
3352,10.67479109,-60.26280759,5.99
36143,111.67694074,-34.14069246,5.9
36156,111.73471007,20.25755681,5.94
101692,309.18180149,-2.54995715,4.91
36168,111.74784546,-23.08602346,5.65
68940,211.67843084,-9.31351525,5.46
3405,10.83849351,-57.46305996,4.36
101716,309.26947172,26.46194731,5.59
3414,10.86695727,47.02454625,4.95
36186,111.78328997,-17.86486132,5.6
3455,11.04750551,-10.60955044,4.77
3456,11.05041376,-38.42168566,5.9
36236,111.92890727,-22.85919859,5.98
36238,111.93484743,21.44524741,5.2
101773,309.39713384,-61.52991842,4.86
3478,11.10913203,47.86398376,5.66
36251,111.96525556,-11.55686729,5.79
36258,111.99650256,-29.15589616,5.55
36265,112.0086446,6.94196793,5.22
101800,309.45466616,11.37767596,5.42
69038,211.98231678,43.85445247,5.13
3504,11.1813238,48.2843641,4.48
3505,11.18498226,-22.00613523,5.22
36284,112.0408102,8.92552991,4.33
3521,11.23772103,-42.67655849,5.94
69068,212.07209419,49.45816711,5.26
101843,309.57753033,-81.28906305,5.89
101847,309.58451101,-1.10512085,4.31
3544,11.32156044,55.22139572,5.41
101867,309.63057872,21.20117361,4.81
101868,309.63297767,24.11595846,5.06
101870,309.64579597,23.68049438,5.91
3572,11.4128236,74.98807307,5.64
36345,112.213132,-31.84840087,5.95
69112,212.21219538,77.54751428,4.8
36348,112.21450945,48.18392976,5.7
101882,309.68327632,13.31512472,5.69
3583,11.4399708,-47.55198527,5.8
36362,112.27047557,-31.45621622,5.78
36363,112.27373029,-38.81206499,5.41
101899,309.74798759,30.33426539,5.68
36366,112.27799603,31.78455041,4.16
101909,309.77069661,15.83819878,5.99
3607,11.54897393,-22.52209695,5.49
36377,112.30762638,-43.30143257,3.25
101916,309.78243422,10.08620317,5.07
101923,309.81799098,-14.95476011,5.24
36388,112.32778582,-1.90532891,5.6
36393,112.33517215,28.1182752,5.07
36396,112.34211123,-10.32666364,5.75
36399,112.35683292,-7.55116823,5.86
3632,11.63732574,15.47550446,5.36
101936,309.85371476,0.48644465,5.15
69174,212.39596571,-51.50467205,5.96
69191,212.47839773,-53.4389459,4.74
36425,112.44909518,12.0065642,4.55
36429,112.45318889,27.91614658,5.01
36431,112.4642186,-23.02428723,4.85
36439,112.48315051,49.67246274,5.35
3675,11.75607711,11.97384928,5.51
36444,112.49884713,-52.65115746,5.87
101983,310.01099015,-60.54889232,5.11
101984,310.01226894,-18.13865887,5.15
101986,310.01316638,43.45887839,5.97
69226,212.59972344,25.09167693,4.82
3697,11.84846603,6.74095641,5.98
102014,310.08261887,-33.43184305,5.47
3717,11.93008447,-18.06133903,5.7
3721,11.94188855,74.84757295,5.42
102026,310.13549209,-16.12417969,5.79
36496,112.62883147,-54.39936495,5.95
69269,212.71035755,-16.30203004,4.93
3741,12.00444392,-21.72249221,5.57
36514,112.67750874,-30.96228109,4.65
3750,12.03807254,72.67448173,5.86
3760,12.07254207,7.29992806,5.92
36528,112.71956587,68.46562083,5.63
3765,12.09573817,5.28061493,5.74
102066,310.26059195,32.3072872,5.53
36547,112.76859933,82.41146587,4.92
3781,12.14757205,-74.92343763,5.09
102092,310.34857637,-31.59828927,5.75
3801,12.20842239,50.96816767,4.9
3810,12.24461788,16.94064377,5.07
3821,12.27621323,57.81518734,3.46
3834,12.30811653,-24.13667172,5.9
69373,213.01670892,69.43254834,5.18
36616,112.95165393,17.08604591,5.45
3849,12.35673214,-13.56127432,5.59
102155,310.48542073,41.71687469,5.68
69389,213.06585136,2.40943269,4.99
102157,310.48781757,-66.76068188,5.14
102162,310.51244652,-76.18059183,5.99
36640,113.02401143,-8.88132568,5.9
36641,113.02478714,1.91448091,5.24
102177,310.55261583,50.34002969,5.41
69415,213.19176791,-27.26118635,5.07
3885,12.47152416,27.71028626,5.55
69427,213.22394074,-10.2737018,4.18
102208,310.64682456,82.53115853,5.75
3909,12.53162924,-10.64432569,5.17
69462,213.31836756,-53.66567449,5.53
3949,12.6716101,-50.98681565,5.24
102253,310.795919,66.65744729,5.59
3951,12.68171635,64.24754961,5.35
36721,113.29073522,-24.71073141,5.84
36723,113.2986082,3.29037884,5.59
69493,213.41995832,-0.84546252,5.89
36732,113.3315196,-19.41252479,5.64
36760,113.40200513,15.82666172,5.27
69536,213.52158226,12.95944396,5.53
36773,113.44984673,-14.52389229,4.82
36778,113.4626803,-36.33839158,5.42
36795,113.51325205,-22.29606692,4.44
36812,113.56621747,3.37172531,5.83
36817,113.57757258,-23.47366083,5.06
102358,311.09188031,56.48840467,5.91
69598,213.67775456,-41.83749497,5.61
69612,213.7118716,10.10061034,5.29
36848,113.64497847,-27.01227499,5.78
69618,213.73807573,-57.08612636,5.03
102388,311.21877223,25.27061656,4.92
4104,13.16926991,-24.00584405,5.47
69658,213.85035467,-18.2006898,5.53
36896,113.78666663,30.96092427,5.34
102431,311.33803389,57.57972545,4.52
4147,13.2520596,-1.14426019,4.78
4151,13.267486,61.12396986,4.8
102453,311.41564037,30.71971523,4.22
36942,113.91551111,-52.53383621,4.93
69713,214.04137239,51.36723132,4.75
102487,311.54161838,-21.51403245,5.91
102497,311.58359901,-39.19926251,5.48
4200,13.40780824,-62.87135169,5.73
36981,114.016224,-14.49277108,5.66
69763,214.16131468,-66.58789366,5.72
102531,311.66193342,16.1241336,5.15
118077,359.28530288,55.70570548,5.57
37023,114.13180985,46.18028782,5.66
37031,114.14460971,5.8621715,5.89
4267,13.64677843,19.18841742,5.8
37036,114.17097385,-19.70233818,5.69
102571,311.79480064,34.37412332,4.93
37043,114.182996,-48.83016759,5.69
37046,114.19598125,55.75505996,5.93
4283,13.72122324,83.70743556,5.59
102589,311.85224078,36.49071665,4.53
4288,13.74211318,23.62833516,5.46
4292,13.75065219,58.97269767,4.83
4293,13.75130243,-69.52708424,5.45
69829,214.36854952,15.26337973,5.84
102599,311.88940388,80.55226181,5.36
37088,114.31954636,-4.11097938,5.14
102624,311.93431657,-5.02770084,4.43
37096,114.34212614,-34.96853026,4.53
102633,311.95138864,6.00820942,5.57
102635,311.95536075,47.83186951,5.6
69879,214.49924842,35.50950532,4.8
4346,13.9266673,-7.34714891,5.88
69896,214.55790024,-81.0077604,4.89
4371,14.00620874,-11.26652632,5.35
37140,114.47437424,48.77384228,5.93
102693,312.12142535,-43.9885439,5.11
69929,214.65939931,-18.71596761,5.86
37173,114.57519133,-25.36480433,4.69
37174,114.57586685,-48.60143564,5.68
102724,312.23454559,46.11413444,4.81
4422,14.1662713,59.18105564,4.62
69965,214.75372951,-25.81542581,5.87
37204,114.63692708,35.04855034,5.58
4440,14.19572198,60.3628361,5.56
69974,214.77746494,-13.37109491,4.52
69989,214.81783458,13.00429893,5.41
37223,114.68291384,-36.49682989,5.78
69995,214.84949719,-37.00290667,5.93
69996,214.85092485,-46.05809312,3.55
102772,312.32339071,-25.78123995,5.86
102773,312.32571274,-68.77652131,5.41
70012,214.88533246,-2.2655182,5.14
102790,312.37067138,-46.22682618,4.9
70027,214.93847992,16.30694777,4.84
37265,114.79137882,34.58434599,4.89
70035,214.96459799,-61.2729718,5.22
4510,14.45896617,28.99221671,5.44
70054,215.04042629,-43.0588434,5.55
37297,114.86390879,-38.30802124,4.84
37300,114.86913551,17.67451877,5.04
70069,215.08142896,-56.38649746,4.3
102843,312.52054647,44.05930376,5.06
4552,14.55924644,33.95088455,5.99
37322,114.93255319,-38.13928702,5.73
37329,114.94947842,-38.26065203,5.76
70104,215.17742387,-45.18706031,4.78
4572,14.62942551,66.35179335,5.97
37345,114.99162799,-37.57942219,5.99
4587,14.68278241,-11.37997546,5.62
102891,312.67407316,-12.54490572,5.87
37364,115.05637081,-19.66086148,5.92
37369,115.06121849,38.34453869,5.77
37379,115.09671113,-15.26392023,4.98
102916,312.75315928,-37.91333176,5.52
37391,115.12704745,87.02009108,5.05
102945,312.85728466,-5.62663276,5.99
102949,312.86765821,28.25050536,5.66
102950,312.87520711,-51.60817895,5.06
102962,312.91044918,-62.42933515,5.67
37428,115.24382617,23.0185266,5.93
37441,115.30166428,48.13153315,5.58
4675,15.01483029,44.71324291,5.69
37450,115.31588603,-38.53353213,5.41
103004,313.03199232,27.09697957,4.56
103005,313.03622452,-5.50705928,5.55
70243,215.5821617,-34.78679232,5.57
37478,115.39648077,3.62477862,5.95
70248,215.59650011,-80.10894534,5.06
70264,215.65445633,-58.45911695,4.76
37504,115.45525487,-72.60609812,3.93
37508,115.46602913,13.48045319,5.79
103045,313.16347329,-8.98331781,4.73
37521,115.51341068,14.20850345,5.55
70300,215.75932876,-39.511819,4.41
4770,15.32614858,-38.91652735,5.59
70306,215.77406205,-27.75401742,4.78
103089,313.31147699,44.38726059,4.8
70327,215.84456528,8.44661713,4.86
103094,313.32735741,45.18167264,5.48
37590,115.70063644,-26.3513258,5.64
103127,313.4174407,-39.8098646,5.34
70363,215.95242304,-53.17623291,5.99
37606,115.73790293,-45.17311793,5.04
37609,115.75173389,58.71036041,4.93
103145,313.47455043,33.43789124,5.47
70384,216.00365247,8.2439695,5.94
4852,15.61013832,-31.55200512,5.5
37623,115.79992875,-36.05008956,5.6
37629,115.82802711,28.88350961,4.23
70400,216.04726938,5.82013058,5.1
37648,115.88494423,-28.41088473,4.63
4889,15.70457184,31.8042629,5.5
4890,15.70495781,-46.39731137,5.39
37664,115.92470415,-40.93374579,5.12
103200,313.64015535,28.0576214,5.03
4903,15.7260945,41.34515741,5.95
4914,15.76056716,-4.8366006,5.4
103219,313.68479032,75.92556985,5.99
103226,313.69923442,-17.92289424,5.78
37701,116.01741347,50.43379363,5.31
37704,116.02881145,25.78415901,5.3
70469,216.20260954,-24.80631048,5.34
37710,116.04035862,-36.06250465,5.8
70492,216.27636089,-68.19533309,5.56
4962,15.90419046,61.07482263,5.92
37751,116.1423747,-24.67407915,5.62
37752,116.14242856,-37.94291724,5.89
103294,313.90287497,13.72153588,5.19
103298,313.91071599,12.56855815,5.54
4998,16.00995611,52.50216085,5.99
103312,313.9575147,47.41765633,5.68
5021,16.08104573,61.58018388,5.83
70574,216.5342661,-45.22142404,4.56
70576,216.54505337,-45.37927638,4.33
37819,116.31373311,-37.96858397,3.62
103359,314.10615482,50.72859808,5.83
103360,314.10790746,49.19584717,5.92
70602,216.61401836,19.2268998,5.4
103371,314.14490781,44.92472189,5.96
5081,16.27231523,14.94613348,5.64
37853,116.39592593,-34.17236334,5.36
103389,314.19721695,-26.29637764,5.7
103401,314.22511578,-9.69754471,5.49
70657,216.77952868,-65.82164651,5.87
37891,116.48695838,-14.563805,5.03
70663,216.80071281,-46.13425412,5.83
5131,16.42064722,21.47318139,5.33
5132,16.42379923,21.46544248,5.55
37901,116.50912585,-6.77251079,5.49
37908,116.53103014,18.51004352,4.89
37915,116.54393456,-37.93367001,5.87
37921,116.56750314,10.76825185,5.25
70692,216.88142952,75.6959929,4.25
103460,314.41935307,-16.03153935,5.89
5164,16.52145155,-9.83935413,5.58
37946,116.66367286,37.51739413,5.15
37949,116.66699442,65.45567562,5.93
103511,314.56812984,22.32590762,5.3
103519,314.58110293,44.47171065,5.55
70753,217.04344444,-29.49163763,4.97
70755,217.05057524,-2.22795719,4.81
103527,314.60806038,10.83928601,5.51
37995,116.80230684,-22.51951023,5.9
103530,314.62514404,50.46179144,5.59
103545,314.67433358,-14.48312774,5.95
38010,116.85413488,-38.51114459,5.07
38016,116.87634813,33.41569706,5.14
38020,116.8812784,-46.60849005,5.22
70791,217.15755227,49.84485149,5.58
70794,217.17384357,-6.90053627,5.42
5268,16.82776521,-61.77528929,5.36
103569,314.76865248,4.29348146,5.3
103571,314.77129385,4.29461035,5.24
38048,116.98633186,-12.19270466,5.48
103598,314.8557657,59.43859409,5.54
5296,16.94253562,-9.78555038,5.71
5300,16.94938882,-41.48691608,5.21
5310,16.98818032,20.73911258,5.56
5317,17.00353724,43.94209203,5.04
38089,117.08400369,-47.0777225,4.69
103632,314.95648555,47.52095107,4.74
5336,17.06830755,54.92033969,5.17
5346,17.09249309,5.64981907,5.51
103652,315.01659249,7.51619683,5.98
70894,217.46049471,0.828929,5.96
5361,17.13944472,58.26344926,5.77
103673,315.08950699,-51.26531189,5.76
103675,315.11536399,19.32958082,5.69
5372,17.18698865,86.25709041,4.24
38146,117.25697616,-24.91220761,5.32
70915,217.5359535,-45.32135551,5.51
38152,117.27798069,-56.41036006,5.57
38159,117.30359825,-46.85771739,5.82
38160,117.30375845,-60.28368849,5.78
70931,217.5872798,-49.51901808,5.38
38164,117.30956295,-46.37320532,4.1
38167,117.31103744,-35.24328638,5.94
103732,315.29553186,46.15577322,5.38
38200,117.39751,-33.2889499,5.61
103738,315.32275094,-32.25776727,4.67
38210,117.42080568,-66.19597444,5.78
38211,117.42167188,-17.22840779,5.17
70987,217.79516728,-38.86970844,5.99
5454,17.45500808,19.6584081,5.57
71002,217.81850707,-67.71719693,5.84
38253,117.54406886,-9.18344136,5.6
5493,17.57808507,42.08147491,5.67
5494,17.58104718,25.45776341,5.81
38267,117.5992648,-50.509468,5.89
103810,315.53752825,56.66961414,5.83
5510,17.63980105,2.44566968,5.97
5518,17.66384307,68.7786208,5.32
103836,315.61319928,-38.53097047,5.93
5542,17.77567508,55.14990064,4.34
5544,17.77819712,31.42473633,5.15
5550,17.79282306,37.72412122,5.8
71094,218.0842754,26.67728448,6.0
5566,17.85654762,64.20267697,5.56
5571,17.8634175,21.03465004,4.66
71111,218.12889827,55.39800985,5.74
103882,315.74147434,-38.63144716,5.32
71115,218.13559265,22.26005887,5.91
71121,218.15440166,-50.45715741,4.44
5589,17.92250739,65.01885377,5.57
5594,17.93128664,-2.25107885,5.93
38373,117.92495269,1.76686846,5.12
38375,117.92927178,-21.17366159,5.62
38382,117.94292754,-13.8980287,5.16
5626,18.07008876,79.67396298,5.6
38414,118.05431177,-40.57578601,3.71
71182,218.37486466,-52.67952225,5.86
71184,218.38489899,-54.9986277,5.86
103956,315.94844149,53.28590052,5.93
38423,118.06526024,-34.70544242,5.01
38427,118.07866114,-14.84617507,5.69
5661,18.18930355,-37.85647867,5.95
38438,118.12392112,-54.36716485,5.7
103981,316.01968615,-5.82306612,5.53
38455,118.1610258,-38.86281229,4.49
38474,118.19941063,-5.42825693,5.76
104019,316.10125178,-19.85499065,4.82
104031,316.14438334,5.50286154,5.63
38497,118.26461031,-36.36376945,5.44
38500,118.26514489,-49.61304388,4.63
5737,18.4328572,7.57535376,5.21
104043,316.17943562,-77.02376718,5.13
71280,218.66508564,49.36835423,5.74
71284,218.67007099,29.74512993,4.47
38518,118.32566079,-48.10293392,4.22
104060,316.23276153,43.92785207,3.72
38538,118.37422613,26.76578282,4.97
5778,18.53179007,16.13347858,5.97
104085,316.30937462,-54.72704162,5.17
104101,316.36133347,5.95819919,5.94
5799,18.60016589,-7.92282573,5.14
104105,316.37193614,78.126392,5.91
71353,218.88117124,-41.51743653,5.88
38593,118.54586884,-35.87728728,5.48
5833,18.70488336,-0.97379475,5.7
104148,316.50477267,-30.12512049,5.69
5862,18.79633762,-45.53166422,4.97
104171,316.59710199,71.43179711,5.88
38639,118.67790326,47.56459585,5.47
104174,316.60282392,-32.34161766,5.2
104177,316.606334,-41.38596515,5.55
104185,316.6260184,31.1846568,5.77
71419,219.07929375,-46.24545129,5.55
38656,118.72215755,-57.30280648,5.62
104194,316.65039071,47.64840356,4.56
5896,18.94233654,-68.87592733,4.25
104214,316.72476209,38.74941468,5.2
71453,219.18388861,-40.21157998,5.74
5926,19.04957827,71.74384251,5.87
104234,316.78194974,-25.00585337,4.49
38712,118.88097322,8.86283954,5.86
5951,19.15119996,-2.50036823,5.42
38722,118.91622954,19.88396986,5.38
71500,219.33397089,-46.13343907,5.39
71536,219.47177584,-49.42582826,4.05
38783,119.07770439,-60.52643594,5.74
71568,219.55245384,43.64213015,5.74
71571,219.55828052,18.29837944,5.9
71573,219.56342725,54.02333948,5.83
6061,19.44981588,3.61446601,5.13
104364,317.13623583,-63.92826018,5.75
104365,317.14010247,-21.19366933,5.3
38835,119.21474805,-22.88011864,4.2
104371,317.16204126,30.20563746,5.6
38846,119.24083628,-43.50041105,5.36
104382,317.19519016,-88.956499,5.45
38848,119.24771568,15.79028125,5.8
71618,219.70927445,44.40450023,5.39
38872,119.32675508,-44.10985887,5.08
38901,119.41710953,-30.33456968,4.76
38908,119.44547902,-60.30307176,5.59
104440,317.34352743,-73.17296806,5.67
71681,219.89617026,-60.83715604,1.35
38917,119.46549638,-45.5776686,5.14
104459,317.39853222,-11.37169305,4.5
38957,119.56015518,-49.24491185,4.47
38962,119.58605326,2.22476675,5.3
104516,317.56489488,53.56310053,5.75
71759,220.17663604,13.53432528,5.93
6226,19.9512302,-0.50902871,5.87
38994,119.71063123,-60.8244623,5.77
71762,220.18152847,16.41832429,4.49
6242,20.02048422,58.23161078,4.95
39014,119.75750813,-45.2158438,5.98
71783,220.25579461,-36.1348583,5.67
39023,119.77381256,-23.31039596,5.09
39061,119.86819223,-39.2969439,5.22
71832,220.41146043,8.16176401,4.86
39070,119.90642544,-60.58706118,5.19
71837,220.43133548,11.66066243,5.55
39079,119.93396866,-3.67958282,4.93
6315,20.28072053,28.73820708,5.23
39095,119.96687782,-18.39922766,4.61
71865,220.48996231,-37.79349851,4.01
104642,317.95098786,59.98661053,5.64
39117,120.04891002,73.9179192,5.37
39138,120.08319486,-63.56745578,4.81
104680,318.05713338,-40.26936174,5.83
39177,120.19711413,17.30870304,5.6
6411,20.58508262,45.52877782,4.87
39184,120.2080738,-54.15127518,5.87
39191,120.23280716,25.39283596,5.87
104738,318.26278733,-39.42492195,5.25
71974,220.80646511,-24.99775316,5.7
39211,120.30556194,-1.39260825,4.69
39213,120.30787729,4.87982358,5.65
104750,318.32221811,-27.61933263,5.41
104752,318.32900845,-36.42352722,5.97
104755,318.33545629,-70.12626669,5.06
39221,120.33656741,59.04739769,5.78
71995,220.85568013,26.52785023,4.8
39236,120.37620154,16.45530865,5.99
72010,220.91433341,-35.17365526,4.06
72012,220.93514285,40.45925391,5.72
39251,120.40635909,-37.28371993,5.9
6492,20.85395412,20.4689673,5.97
6502,20.87898961,-30.94561738,5.84
6514,20.91923378,37.7149426,5.6
39311,120.56640381,2.33457069,4.39
6564,21.08542977,-6.91465609,5.92
72104,221.24667614,-35.19182562,4.92
104887,318.69788169,38.045317,3.74
6592,21.16994358,-41.49254863,5.42
39360,120.68660072,-41.30982837,5.52
72125,221.31025043,16.96427976,4.6
72131,221.32223583,-62.87564802,5.36
39380,120.76733686,-32.46354761,5.83
72154,221.37585537,0.71727078,5.68
6631,21.2721113,-64.36947786,5.92
39424,120.87950143,27.79433226,4.94
104963,318.90791711,-20.65169596,5.17
72197,221.50033306,-25.44318067,5.15
104968,318.92688017,77.01229623,5.92
6670,21.40514554,-14.5987963,4.9
104974,318.93684412,-15.17150021,5.31
72208,221.52477447,15.13178786,5.78
72210,221.5282033,-23.15301769,5.8
104978,318.94112702,-53.2630843,5.73
6692,21.48342387,68.13001258,4.72
6706,21.56359189,19.17234565,5.35
6711,21.57785833,43.45773913,5.98
72250,221.62080664,-47.44111582,5.74
39487,121.06745731,-32.67482866,5.25
6732,21.67365999,19.24042201,5.5
6748,21.7148546,-13.05651201,5.51
72290,221.75538948,-52.38351785,5.22
39527,121.17666505,-50.59039585,5.96
72296,221.77124083,-38.29063861,5.9
39538,121.1961238,79.47961204,5.39
105080,319.30936259,55.79800103,6.0
72323,221.8439788,-25.62426687,5.61
39566,121.26545448,-53.10792109,5.52
39567,121.26870295,13.11821531,5.14
105102,319.35397027,39.39468139,4.22
6813,21.91409059,45.40668716,4.83
72357,221.93668811,-26.08750032,5.23
105138,319.47948499,34.89689785,4.41
105140,319.48451988,-32.17253927,4.71
105143,319.48869215,-17.985138,5.4
72378,221.98982299,-26.64615475,5.76
105164,319.5461371,-4.51947831,5.83
105186,319.61327221,43.94594485,5.04
39659,121.57664512,22.63548968,5.96
72432,222.15853236,-36.63469697,5.89
72438,222.18562584,-66.5935632,5.91
105224,319.71677406,11.20337297,5.97
39690,121.66808126,-45.26601555,5.04
72487,222.3277886,46.11620543,5.76
72488,222.32810468,-24.25147056,5.68
72489,222.32938051,-14.14902182,5.32
105259,319.81536654,58.62350197,5.51
6960,22.40056313,-21.62933894,5.11
39734,121.82516536,-20.55434188,5.33
105269,319.84241762,38.23747347,5.89
105268,319.84258352,64.87185522,5.19
105282,319.86979387,49.51029401,5.75
72524,222.42205614,48.72080378,5.68
6999,22.52542734,47.00727374,5.27
7007,22.5463128,6.14382046,4.84
39780,121.94106543,21.58181596,5.3
7016,22.5954381,-26.20785122,5.92
72552,222.49332864,28.61583166,5.8
72567,222.56587988,23.91184418,5.86
72573,222.58509448,82.51194418,5.63
72582,222.62352767,37.27204659,5.47
72603,222.67158849,-15.9972368,5.15
7078,22.8073171,70.26460388,5.82
39847,122.11436326,51.50667052,4.78
105382,320.19017616,-40.8094656,4.8
72631,222.75446368,-2.29915046,4.93
105411,320.2683096,23.85596652,5.58
105412,320.26799285,-4.56012531,5.87
105413,320.27010339,7.35450264,5.81
7118,22.9302024,-30.2830814,5.79
72659,222.84741061,19.10046004,4.54
72664,222.86015253,59.29398542,5.48
39903,122.25279182,-61.30242935,4.74
39906,122.25682203,-19.24501421,4.4
72683,222.90959733,-43.57535897,4.32
39919,122.28960579,-48.68441261,5.66
39943,122.36889399,-16.24892183,5.66
39957,122.39013911,-56.08538457,5.66
39961,122.39963877,-44.12277302,5.2
105497,320.50174318,49.3888481,5.68
105502,320.52166486,19.80450799,4.08
39970,122.42980871,-47.93719317,5.23
105515,320.5616509,-16.83454243,4.28
7213,23.23355086,-36.86523102,5.49
39995,122.51574231,58.24824233,5.91
72773,223.14690411,-63.8098274,5.91
7251,23.35713347,58.3273339,5.69
40023,122.61325647,25.50733395,5.73
72800,223.21280686,-37.80316007,5.02
105570,320.72338629,6.81114048,5.16
40035,122.66594192,-13.79920726,5.53
105574,320.73439675,-9.31932984,5.99
105576,320.75206151,-22.66904797,5.63
7276,23.4284875,-7.02534086,5.75
7294,23.48282037,59.23204031,4.68
72833,223.30655741,-73.19007118,5.59
40077,122.79495615,-48.46199388,5.83
72848,223.34902659,19.15279846,6.0
40084,122.81794051,-12.92699871,4.72
7321,23.56919364,37.23714649,5.9
40091,122.83955625,-39.61854551,4.44
40096,122.85788573,-42.9872777,4.73
40107,122.88751854,-7.77253904,5.36
7345,23.65741154,-15.67635919,5.62
105652,320.99511423,24.27413557,5.7
7359,23.70444113,18.46051216,5.9
105665,321.03997238,-20.85186872,5.38
105668,321.04788909,-12.87810842,5.48
40155,122.99986735,-46.64435139,5.77
72929,223.58387153,-24.64220203,5.27
105696,321.10341334,-41.00669545,5.76
72934,223.59530331,-11.89834766,5.78
40167,123.05302569,17.64777069,4.67
105703,321.14168922,26.17456032,5.67
40183,123.12830002,-46.26428551,6.0
72959,223.65797775,-33.30057489,5.85
105727,321.20646634,80.52482631,5.97
7447,23.97815181,17.43384108,5.95
40215,123.20327881,68.47407195,5.34
7450,23.99570321,-15.40018295,5.41
105761,321.30427981,-9.74855197,5.71
7463,24.03545682,-29.90731698,5.69
105767,321.32065703,-3.55674744,5.48
105769,321.33145317,46.71434148,5.59
40240,123.2869481,29.65653642,5.62
40259,123.33320023,-15.78822144,4.99
73036,223.89400205,-60.11416416,5.18
40274,123.37298829,-35.89951777,4.78
105811,321.44593834,36.66738607,5.93
7513,24.19934491,41.40545884,4.1
40282,123.39269307,-50.19607174,5.52
40285,123.4006436,-46.99162807,5.14
73049,223.93628386,-33.85578497,5.32
7535,24.27465281,12.14153479,5.54
40305,123.45906607,56.45224635,5.88
105854,321.59530626,-37.82942941,5.64
73087,224.05512632,14.44626567,5.9
40321,123.49296585,-36.32228059,5.09
40326,123.51217267,-40.34789019,4.42
73095,224.07188193,-52.80954787,5.38
73100,224.09600051,49.62844897,5.63
7568,24.36667431,-84.76959317,5.66
73111,224.13355699,-47.8791978,5.62
40344,123.55523436,-35.4900189,5.77
40357,123.5994622,-45.83452239,5.86
73129,224.18327713,-62.78101625,5.08
105898,321.71508879,48.83516845,5.29
73133,224.19213254,-11.40970065,5.48
7601,24.48151406,-82.97499539,5.88
105913,321.75676123,-42.54793048,5.5
7617,24.5315291,57.97763141,5.55
105928,321.8117469,-21.19621026,5.78
73165,224.29583149,-4.34646201,4.47
73166,224.29865735,16.38812776,5.72
105942,321.83902525,37.11679843,5.3
7643,24.61451877,-36.5282507,5.94
73184,224.36666506,-21.41547505,5.72
7650,24.62882287,73.04003987,5.28
73193,224.38854677,-0.16761171,5.51
40429,123.81633142,-62.91564338,5.16
105966,321.91690615,27.60859324,5.39
73199,224.39586336,65.9324602,4.63
105972,321.94225926,66.80909577,5.42
7679,24.71578706,-21.27538422,5.58
73223,224.47076658,-76.66265545,5.37
106003,322.03438025,32.22532973,5.75
7719,24.83750969,44.38616461,5.01
106039,322.18083418,-21.80717988,4.5
7740,24.9200752,16.40585785,5.98
106044,322.18718518,-69.505386,5.47
73284,224.66356114,-27.65731391,5.65
7751,24.94809594,-56.19640017,5.76
106062,322.24907528,22.17943574,5.84
73310,224.72325257,-11.14401377,5.88
106093,322.36229106,46.54058469,5.22
73350,224.84631414,4.56776122,5.91
7818,25.14507074,40.57704912,4.96
7825,25.16520588,43.29768692,5.63
73369,224.90394679,39.26533338,5.64
106140,322.4870633,23.63883778,4.52
40646,124.46005991,59.57113296,5.63
73415,225.04709586,-77.16055017,5.92
7906,25.41348626,30.04711962,5.97
40678,124.572482,-35.45170272,5.59
40680,124.5783617,-65.61319176,5.06
7916,25.43680768,-11.32466884,5.75
7918,25.44642903,42.613369,4.96
7921,25.44986456,-60.78933951,5.7
106227,322.74704869,60.4594321,5.53
40693,124.59978029,-12.63217344,5.95
73473,225.24311921,-8.51894314,4.91
40706,124.63880117,-36.6592883,4.44
7941,25.51247427,-36.8323048,5.7
7943,25.51454276,35.24570709,5.63
7955,25.53580826,-32.32697025,5.25
73493,225.30456864,-38.05839819,5.88
73497,225.33261122,-2.75492652,5.52
7965,25.58553014,68.04302111,5.57
73507,225.3628918,60.20445323,5.91
7978,25.62214875,-53.74083406,5.52
7981,25.62400804,20.26850445,5.24
7999,25.68129205,-3.69020048,4.98
73536,225.45382982,-0.1402952,5.71
40772,124.82149084,62.50715956,5.73
73540,225.46165236,-83.22764618,5.65
8016,25.73276503,70.6225257,5.18
106327,323.02448364,-41.17931042,5.29
40793,124.8845371,75.75690762,5.55
73566,225.52681118,-28.06061106,5.83
73568,225.52711814,25.00813833,4.8
106340,323.0607125,-33.94462275,5.97
8046,25.83230667,60.55133256,5.78
40817,124.95401564,-71.51490629,5.33
40834,125.00219375,-71.50537718,5.63
40843,125.0160844,27.21770686,5.13
73620,225.72515557,2.09130274,4.39
73624,225.74698265,-32.64329383,5.45
106393,323.23580021,49.97762947,5.77
40866,125.08738735,20.74772105,5.8
73634,225.77522944,35.20579548,5.52
40875,125.10858159,57.74327849,5.89
40881,125.13390049,24.02231363,5.92
40888,125.16058517,-77.48447728,4.34
40889,125.16800213,72.40723255,6.0
106429,323.34798914,-44.84870017,5.57
73695,225.94710009,47.65406011,4.83
40932,125.3004108,-57.97322018,5.96
40943,125.33768135,-36.48417668,5.18
40944,125.33842834,-20.07905817,5.58
40945,125.34594365,-33.05436621,4.83
106481,323.49521858,45.59183746,3.98
8209,26.41148804,-25.05260995,5.29
73745,226.11142384,26.94764882,4.52
40990,125.47752462,-17.58633432,5.71
8230,26.49691854,-5.73329912,5.37
41003,125.51857667,-73.39998555,5.28
73771,226.19550613,-83.03831141,5.65
8240,26.52485968,-50.81625558,5.49
8241,26.52609562,-53.52203715,5.04
73776,226.20077677,-64.03135005,5.16
106551,323.69401881,38.53405361,4.87
106559,323.71271277,-20.08427387,5.7
41039,125.63205471,-48.49038087,4.79
73807,226.27952355,-47.05124517,3.91
106592,323.82341967,-3.98330458,5.79
73826,226.32985804,-41.06723583,5.13
73841,226.35764399,48.15097252,5.59
41074,125.70806802,-26.34821968,5.88
41080,125.72539764,-7.54312053,5.92
41081,125.72982583,-52.12372967,5.89
106642,324.01039856,45.37459133,5.96
41117,125.84099426,18.33219975,5.94
106654,324.04572526,-26.17151618,5.73
8362,26.93681135,63.85250114,5.63
73909,226.56965189,54.55631811,5.24
41152,125.95209287,53.21971228,5.52
8387,27.04556987,16.95555079,5.86
73937,226.63832178,-30.91848265,5.97
8404,27.10841032,3.68544661,5.91
106711,324.23739955,40.41352083,5.04
73945,226.65665094,-16.25681782,5.19
8423,27.16218592,37.95287011,5.94
41191,126.08258678,-80.91420166,5.67
8433,27.17317997,32.69020977,5.78
41211,126.14589441,-3.75124022,5.61
73996,226.82527458,24.86919552,4.93
74006,226.8581374,-49.0886123,5.77
41242,126.22991517,-23.15374489,5.67
41250,126.23835815,-42.76983374,5.97
106786,324.43795564,-7.85420152,4.68
106787,324.4392911,19.31860745,5.46
41260,126.26558029,-24.04621247,5.32
8497,27.39626131,-10.68641035,4.66
106801,324.48010181,62.08193977,4.76
41296,126.38052253,-51.72741517,5.18
74066,227.050519,-40.58392988,5.75
41299,126.39807408,2.10220949,5.74
41307,126.41513455,-3.90642364,3.91
8544,27.53571352,22.27533825,5.83
41321,126.46498515,-64.60061762,5.95
74087,227.09908784,26.30115255,5.67
41323,126.46629214,-42.1530716,5.45
41325,126.4781974,7.56450563,5.13
106856,324.63308249,5.77174242,5.66
41328,126.48162496,-14.92966139,5.96
74096,227.14818205,25.10863507,5.82
74100,227.16332188,-42.86792148,5.85
74117,227.2108967,-45.27985752,4.07
106886,324.74007661,57.48903743,5.74
8588,27.71655322,11.04337823,5.92
8593,27.72681248,-50.20613758,5.94
106897,324.75495361,20.2654508,5.77
8598,27.73803109,51.93341736,5.96
41375,126.61336895,-3.98747904,5.6
41377,126.61543832,27.89358314,5.58
41395,126.67479968,-12.53460232,5.52
41400,126.68308118,12.65461215,5.56
106944,324.88860753,2.2435584,5.1
74184,227.37463952,-67.08413313,5.76
41451,126.819816,-70.09348198,5.51
74224,227.53052031,-38.79251125,5.98
106999,325.04628944,43.27383952,5.09
74239,227.57762902,-26.33262119,5.75
8704,27.99716741,55.14738474,5.53
8714,28.03904598,50.79279388,5.7
41483,126.90243786,-53.08847968,5.08
41515,126.99758622,-35.11376141,5.75
74296,227.78672678,-84.78781204,5.88
74305,227.81658484,-55.3460324,5.45
8778,28.21713684,-16.92924975,5.78
107095,325.38691422,-14.04761057,5.16
41578,127.15558089,14.21082237,5.94
8814,28.32226886,40.7297896,5.42
107119,325.48039004,71.31141661,4.55
107128,325.50290314,-23.26285769,5.24
107129,325.50451659,35.51020044,5.98
8833,28.38896,3.18753653,4.61
8837,28.41142371,-46.30266861,4.39
107136,325.52360237,51.18962197,4.69
74376,227.98364862,-48.73781871,3.88
107144,325.54213274,1.28525324,5.66
74380,227.99032525,-48.74368674,5.7
41616,127.26979746,-47.92892315,5.33
74386,228.01776005,18.97603118,5.9
107151,325.56438144,5.68013739,5.3
41621,127.28152846,-44.16041332,5.82
74392,228.05537543,-19.79171054,4.54
107162,325.59566145,41.07701915,5.73
41639,127.36451331,-44.72481215,5.03
8882,28.59180481,-42.49694992,5.12
107188,325.6646132,-18.86632305,4.72
41674,127.44013656,-46.3316928,5.98
41676,127.44248134,67.2974407,5.89
74449,228.20661659,-44.50041361,4.83
107230,325.7668441,72.32008392,5.18
8928,28.73388091,-67.6473033,4.68
107232,325.76832505,-14.39970939,5.88
107235,325.77696032,41.15497004,5.51
107253,325.85688615,38.28358862,5.69
41723,127.6192126,-32.15928517,5.61
8993,28.96266553,23.57732159,5.76
107302,326.00402165,-14.74937044,5.96
9001,28.97700236,37.27778569,5.89
74539,228.47213597,-26.19356953,5.84
107310,326.0357404,28.74263231,4.49
9009,29.00010816,68.6852418,4.97
9021,29.03901622,37.25182962,5.69
74561,228.52518177,31.78784478,5.98
107348,326.12789728,17.35001739,4.34
41816,127.87716155,24.08110505,5.71
41817,127.87884757,-19.57746178,5.42
74582,228.57989727,-70.07947569,5.75
107350,326.13054104,14.77193916,5.96
41822,127.89887525,18.09442038,5.33
9061,29.16749154,-22.52678491,4.92
74596,228.62149336,29.16429476,5.28
74604,228.65549679,-31.51912119,4.91
74605,228.65974563,67.34672247,5.15
107374,326.22199841,62.46056748,5.94
107382,326.25106066,-9.08242844,5.1
41861,128.02065464,-53.21191961,5.68
9095,29.29200196,-47.38527732,4.82
9110,29.33772674,17.81753177,5.09
74649,228.79730419,4.93936176,5.32
107418,326.36218984,61.12080591,4.25
9132,29.43226733,27.80438081,5.84
41909,128.17707063,20.44116182,5.33
9153,29.48215492,23.59606098,4.79
74689,228.95448869,0.37213871,5.62
74696,228.97360792,-48.07366118,5.96
41935,128.22907637,38.01636794,5.88
107472,326.51818465,22.94887978,5.29
74707,229.01676479,-41.49115502,5.15
107487,326.56778755,-9.27593512,6.0
74732,229.09588045,-22.39941638,5.52
74750,229.15288591,-60.90399654,5.74
107517,326.63374272,-11.36595449,5.57
9222,29.63960506,49.20435221,5.7
107533,326.6983714,49.30957028,4.23
42001,128.41012949,-38.84881464,5.92
42008,128.43115972,4.75700024,5.89
74778,229.23706622,-60.95725471,5.04
74793,229.2745357,71.82390121,5.02
42028,128.5067403,-2.15155456,5.8
107575,326.80817524,2.68612404,5.63
107586,326.85539952,60.69268916,5.53
74837,229.41204414,-63.61046557,4.85
9307,29.89868,21.05856973,5.89
9312,29.90849238,64.62160195,5.29
9313,29.91172738,-42.03053188,5.57
42080,128.65050837,65.14517019,5.47
42088,128.68165569,-49.94420335,5.01
74857,229.45766251,-30.14867319,4.35
42090,128.68285073,36.41961892,5.76
9326,29.94249789,-20.82453855,5.43
107649,327.06563094,-47.30361491,5.57
9347,30.00128317,-21.07783155,3.99
9353,30.03816572,3.09701499,5.89
42129,128.81481834,-58.22473488,5.27
74896,229.60210309,20.57277776,5.68
42134,128.83211448,-58.00922835,4.84
74901,229.60885898,-0.46123414,5.88
9372,30.11176258,-8.52387312,5.43
74911,229.63342085,-47.87527178,4.27
42146,128.86749313,-7.9822916,5.72
42147,128.86958929,-26.84348737,5.95
42172,128.96239426,6.62021974,5.91
74941,229.70476285,-60.4963344,5.43
42177,128.96677978,-50.96965154,5.79
74950,229.73489436,-40.78822169,5.59
9440,30.31134638,-30.00183025,5.34
74975,229.82832387,1.76540768,5.04
9459,30.42656778,-44.71350896,5.15
107763,327.46122788,30.17421499,5.07
107773,327.5005228,-64.71253671,5.62
9480,30.48938612,70.90702007,4.49
107788,327.53624892,17.28585144,5.34
42265,129.27404262,9.65558,5.92
9505,30.57545056,54.4875412,4.99
75043,230.0214646,51.95851498,5.65
75049,230.03565952,29.61620896,5.51
42286,129.32846902,-62.85346542,5.45
107835,327.69660058,-69.62941608,5.52
9533,30.6461575,13.47671595,5.97
107843,327.72734258,-82.7189042,5.27
42312,129.41097124,-42.98908069,4.11
9564,30.71865218,64.90146584,6.0
42334,129.46730485,-26.25499981,5.24
9570,30.74148211,33.2841351,5.5
9572,30.7440378,-15.30593206,5.87
9573,30.75078031,64.39001815,5.59
75119,230.25831675,0.71533669,5.35
107887,327.89270108,19.82668178,5.78
9589,30.79854146,0.12850681,5.42
75127,230.28170919,-5.82485335,5.54
42365,129.5790876,32.80202066,5.96
9598,30.85877233,72.42129433,3.95
42372,129.59243647,53.40153957,5.66
9621,30.91393309,25.93547132,5.64
9622,30.91870122,-4.10351629,5.61
107930,328.00434221,55.79674323,5.7
9631,30.95071386,-0.34025084,5.96
75178,230.45239658,32.93369467,5.38
75181,230.45062501,-48.31762762,5.65
42425,129.77150681,-70.38674483,5.19
42430,129.78291789,-22.66187505,5.05
42438,129.79876654,65.02090663,5.63
75206,230.53446223,-47.92779187,4.99
107975,328.1246544,28.7935384,5.52
42452,129.8234291,52.71162301,5.91
42459,129.84934731,-53.43976748,5.45
42483,129.92697375,-29.56108368,4.86
108022,328.26570223,25.92513961,5.09
75256,230.65524028,62.04707594,5.99
75257,230.65571566,39.58146272,5.56
75260,230.66006358,63.34143917,5.72
9727,31.28092264,77.28134094,5.27
108036,328.32404854,-13.55176811,5.08
42504,129.9899896,-53.05472958,5.18
42509,130.00613183,-12.47537215,4.98
108060,328.40575303,19.66843722,5.69
42527,130.05341092,64.32793601,4.59
9763,31.38145064,76.11506048,5.22
42535,130.0727674,-53.0153978,5.56
42536,130.07327243,-52.9218873,3.6
75304,230.78895891,-36.8584886,4.54
42540,130.07989324,-40.26387468,5.2
75308,230.7937661,-60.65717607,5.65
75312,230.80129685,30.2878122,4.99
42564,130.14691341,-45.19110263,5.67
108102,328.54321926,-4.27617967,5.71
42568,130.15428001,-59.76100272,4.31
42570,130.15654138,-46.64874449,3.77
75352,230.96766276,-12.36950145,5.72
9836,31.64135619,22.64831693,5.03
42604,130.25446162,45.83401001,5.35
75379,231.04953961,-10.32226578,4.92
42614,130.27216748,-48.9226802,5.9
42624,130.30471255,-47.31712459,4.74
108165,328.72147577,56.61122725,5.74
42637,130.3313009,-78.96335934,5.46
75411,231.12261592,37.37716675,4.31
108195,328.79747084,-61.88660835,5.92
42662,130.43056717,-15.94338398,4.87
75439,231.18753835,-39.71026857,5.36
42679,130.48711919,-45.4107139,5.2
108226,328.8791627,65.32080861,5.84
42712,130.56747164,-48.09909047,5.48
42715,130.57913531,-53.1000564,5.49
42726,130.60577595,-53.11398421,4.83
75501,231.33424168,-38.73362055,4.6
9977,32.12191579,37.8590773,4.78
9990,32.16908238,58.42360093,5.66
108294,329.0948743,-37.25365481,5.45
75530,231.44748616,15.42803613,5.16
108317,329.16309874,63.62555723,5.11
42795,130.80137194,12.6808759,5.62
75565,231.5613438,-68.30916685,5.89
10035,32.28871892,-43.51659586,5.84
75572,231.57243338,34.33599626,5.46
108339,329.23488271,12.07649181,5.54
10053,32.35556808,25.93989223,4.98
42834,130.91780328,-49.82280194,5.15
42835,130.91822267,-7.23373036,4.63
75647,231.82553879,-36.76755989,5.46
42884,131.09977937,-42.64927601,4.05
75665,231.88784772,-64.53150379,5.71
42917,131.18765247,10.08167029,5.63
10155,32.65665389,19.50033764,5.68
42923,131.21636195,-37.14724952,5.74
75696,231.96426286,60.67021675,5.9
75730,232.0642008,-16.71648418,5.64
108505,329.72301352,62.69798588,5.96
10212,32.83783009,8.5698049,5.64
10215,32.84261021,-10.05216202,6.0
75761,232.15932129,1.8420812,5.15
108535,329.81235875,73.1798957,5.04
10234,32.89931243,-1.82542945,5.94
108543,329.82463254,-38.39509568,5.5
43012,131.47979613,-79.50437284,5.79
43023,131.50685182,-46.04152748,3.87
43026,131.51031463,-2.04865471,5.7
10280,33.09283449,30.30306664,4.94
75828,232.35112132,-46.73270421,5.26
10296,33.15641173,24.1677783,5.96
43067,131.59390833,-13.54772006,4.32
10305,33.19809079,-2.39363722,5.65
10306,33.20035634,21.21099307,5.23
108612,330.03303161,6.7174374,6.0
43082,131.62727899,-45.91250455,5.43
10320,33.22696028,-30.72382514,5.27
10324,33.24998125,8.8467173,4.36
10326,33.25411349,-21.00013755,5.86
10328,33.26377183,15.27985954,5.72
43105,131.67728835,-56.76977618,4.5
10340,33.30551686,44.23165196,4.84
43121,131.73340873,12.10995219,5.89
108661,330.20927032,-28.45373653,5.43
10366,33.40142588,51.0658183,5.31
43142,131.81244035,-1.89703269,5.28
43148,131.82852179,-46.15541509,5.71
108691,330.27089665,0.60471529,5.6
108693,330.27228975,13.11982345,5.61
108699,330.28847931,8.25716451,5.65
75944,232.66834221,-16.6094644,5.82
10418,33.56059029,-67.84144101,5.57
75973,232.73233051,40.83304674,5.04
75974,232.73235229,64.20869349,5.74
10440,33.63310636,-41.16676458,5.91
108758,330.46078218,52.88225277,5.79
108772,330.51905044,58.00036655,5.55
76008,232.85387206,77.34935188,5.0
76013,232.87842252,-73.3895909,5.4
76041,232.94575727,40.8993325,4.98
10513,33.8692694,-67.7463659,5.67
10535,33.92823871,25.04304345,5.57
43305,132.34052593,-3.44302337,5.3
10540,33.94187534,25.78293743,5.79
108845,330.73608443,44.64986302,5.57
108849,330.76587415,-76.11842744,5.94
43325,132.41316404,-40.32015784,5.47
10559,33.98451972,33.35889507,5.25
108868,330.81858052,-6.52240596,5.55
108870,330.84023615,-56.78597558,4.69
76106,233.15292216,-19.67045969,5.5
108874,330.8285172,-2.15536296,4.74
108875,330.82930031,11.38655209,5.83
43347,132.44849184,-45.30787472,4.94
43352,132.46458217,-32.78052517,5.19
76126,233.23008838,-16.85284434,5.53
76133,233.2414075,-1.18639936,5.5
10602,34.12743894,-51.51216468,3.56
43370,132.50929616,-29.46299701,5.86
108917,330.94772431,64.62797127,4.26
108924,330.97073901,63.11992053,5.26
43392,132.58756813,-42.08979111,6.0
10642,34.24601753,-6.4221162,5.51
10644,34.26345869,34.22423111,4.84
43413,132.63942286,-46.52918681,5.09
43414,132.64507433,-66.79298096,5.34
76207,233.50711487,-40.06643242,5.82
108975,331.1531961,-26.82235879,5.97
76219,233.54458663,-10.06452866,4.61
108991,331.19759232,-0.90634341,5.29
109005,331.25207425,62.78567143,5.27
76243,233.61047272,-9.18341606,5.16
109017,331.28662119,62.27981369,5.07
10718,34.499532,57.8998206,5.75
109023,331.29722504,26.67368931,5.75
10723,34.50599949,1.75780187,5.6
76259,233.6555021,-28.04698322,5.13
43496,132.89337937,-7.17722564,5.55
10729,34.51910362,57.51632134,5.99
43499,132.90214838,-57.6335775,5.59
10732,34.53140185,19.90116354,5.58
109056,331.39447779,28.96398081,5.69
43531,132.98679585,43.72660287,5.15
109068,331.41979781,5.05853048,4.86
76307,233.81216083,39.01006717,5.14
76311,233.81749673,53.92214366,5.97
109081,331.46256902,-59.63607191,5.62
43550,133.0417708,42.00273476,5.98
43553,133.04903518,45.31281911,5.96
10793,34.73747203,28.64267401,5.29
109102,331.50813416,45.01434833,5.09
43584,133.14425694,32.47415705,5.67
10819,34.81998296,47.37997309,5.31
43587,133.14921322,28.3308187,5.96
43589,133.16085529,-48.35909718,5.92
43603,133.20007609,-38.72408636,5.79
76371,233.97186738,-44.95838909,4.55
76376,233.98766354,54.63056667,5.77
76397,234.0504158,-44.39682312,5.44
10871,34.97612918,-55.94479621,5.81
43644,133.34398961,61.96226784,5.72
76424,234.12182931,16.11908473,5.93
76425,234.12324829,10.01017604,5.26
43669,133.45273784,-60.35390883,5.78
43671,133.46081503,-47.52077781,5.31
109209,331.86913669,19.47552571,5.74
109240,331.95960134,21.70292564,5.79
10944,35.2425344,50.15146565,5.57
43721,133.56137964,30.57911508,5.4
76509,234.38336373,54.50873314,5.85
76519,234.41303496,69.2833439,5.65
109289,332.10805122,-34.04384111,4.99
76532,234.4501608,-23.14169782,5.79
76534,234.45665521,40.3534329,5.25
43783,133.76178383,-60.64460928,3.84
76552,234.51335576,-42.56734797,4.34
11021,35.48594668,0.39567548,5.29
109332,332.24579476,-18.51959165,5.8
11029,35.50638199,-10.77753362,5.43
43797,133.79909085,-54.96576824,5.7
43798,133.80179199,-18.24118931,5.75
11033,35.52076129,-17.66216933,5.89
76568,234.56761052,46.79775126,5.76
76569,234.56784142,-21.01632655,5.82
11046,35.55165239,-0.88485213,5.42
109352,332.3068075,33.17233752,5.58
43825,133.88154271,-27.68187118,4.87
76594,234.64248369,50.42328353,5.84
11060,35.58931055,55.84565348,5.16
43834,133.91532883,27.92748154,5.23
11072,35.63561159,-23.81632609,5.19
43851,133.98145066,11.62602321,5.44
76618,234.70613394,-52.37269466,5.43
11090,35.70960144,41.3962973,5.81
76628,234.72733058,-19.30189199,5.36
11095,35.71793796,-73.64579219,5.99
109400,332.4517966,72.34120687,4.79
109404,332.48209025,-34.01496677,5.37
11102,35.72781208,-51.09212882,5.9
43878,134.08025856,-52.72347522,4.68
109422,332.53658393,-32.5484068,4.94
43894,134.12714884,40.20147407,5.9
43899,134.14219398,-16.70874809,5.95
43903,134.15600822,64.60383153,5.57
76669,234.84446952,36.63581181,4.64
43908,134.17077648,-85.6631523,5.43
43923,134.20813723,45.631646,5.72
43932,134.23582185,32.91042991,5.44
109466,332.64060971,-4.26685544,5.98
109471,332.65596853,11.62453953,5.78
109472,332.6561761,-11.56493952,5.43
43937,134.24340608,-59.22933781,4.93
76705,234.94157853,-34.41192603,4.66
109474,332.6616294,70.13257265,5.52
76716,234.98560042,-59.90833817,5.95
43970,134.31229159,15.32276214,5.22
76742,235.07039743,-23.81807829,4.97
76750,235.08888668,-73.44668497,5.64
109521,332.79122113,50.82339282,5.38
11220,36.10381778,50.00654619,5.19
44001,134.39666647,15.58128073,5.68
11249,36.20440136,10.61056498,5.48
109556,332.87740018,59.41448763,5.05
44024,134.4814937,-48.57291016,5.88
11258,36.22462811,-60.31194752,5.36
109572,332.95319831,56.83935728,5.24
76810,235.24625327,16.02458817,6.0
109577,332.96387934,16.04055086,5.93
109592,333.00839859,60.75909505,5.37
76829,235.29740578,-44.66120503,4.64
109602,333.03372554,24.9506412,5.97
44075,134.68305484,-16.13272704,5.8
11313,36.40592791,50.278631,4.73
109620,333.09354262,63.29103525,5.76
44093,134.7181404,-47.2346878,5.17
76866,235.44756448,12.84752763,5.34
76877,235.47784835,-76.08195925,5.95
76878,235.47797158,18.46403679,5.8
76880,235.48665872,-19.67882804,4.75
11345,36.48752198,-12.29047964,4.88
11348,36.50145519,-15.34124674,5.88
109654,333.19926981,34.60459203,5.34
44143,134.8507614,-59.08371209,5.17
11381,36.64674012,-20.04261694,5.89
44154,134.88605804,32.41855927,5.23
109693,333.29423117,86.10795472,5.27
76939,235.6596473,-37.42493556,5.23
76945,235.67091721,-34.71040721,4.75
76957,235.71149928,52.3609026,5.48
44191,135.02253575,-41.25360521,4.45
109730,333.41124738,28.60801711,5.87
11432,36.86571544,31.80128023,5.55
109737,333.43513855,-25.18090505,5.58
109745,333.45516707,45.44061303,5.53
76996,235.82053928,-84.46527293,5.57
11477,37.00709608,-33.81103904,5.13
109786,333.57513369,-21.07456625,5.33
11486,37.041585,29.66933047,5.29
109789,333.57813081,-27.76690756,5.45
44256,135.19059047,-60.96382829,5.8
77048,235.99708548,32.51580692,5.57
44283,135.28547309,-68.68391596,5.89
77052,236.0075819,2.51517329,5.86
77060,236.01833122,-15.67283378,5.41
109831,333.6848788,42.95391034,5.72
44299,135.3369198,-41.86425439,5.56
44307,135.35053935,32.25229649,5.89
11548,37.20206105,29.93176028,5.89
77086,236.09447621,-41.8190887,5.93
11569,37.26644081,67.40247393,4.46
44337,135.4356634,-52.18868536,5.23
44356,135.49161758,-0.48267346,5.64
109908,333.90383575,-41.34670059,4.79
44390,135.63621691,67.62961897,4.74
77163,236.34784913,5.4473148,5.57
44405,135.68443911,24.45291523,5.45
44406,135.68673927,7.29826681,5.85
109972,334.11068187,57.22023845,5.88
11670,37.63480803,25.23503642,5.88
109973,334.11065824,-41.62722507,5.11
11687,37.68834619,0.25574908,6.0
77227,236.52348786,-1.80419278,5.39
110000,334.20018595,-12.83143618,5.34
110009,334.21902457,-9.04006677,5.8
110023,334.2770821,-5.3871641,5.75
77257,236.61088855,7.35307319,4.42
44504,136.00167287,54.28388682,5.74
77272,236.64482815,55.4747908,5.94
11738,37.87539846,2.26718161,5.27
77277,236.6666889,62.59955706,5.19
44511,136.03866845,-47.09773702,3.75
77286,236.68423547,-34.68245371,5.61
11757,37.91893415,-79.10938186,5.27
110078,334.46081339,-77.51155332,5.49
11783,38.02178461,-15.2446768,4.74
11784,38.02571027,36.14727125,5.15
11791,38.03925366,-1.03489611,5.36
77336,236.82216304,14.1153483,5.71
110103,334.55270577,62.80438774,5.75
110109,334.56506336,-53.6270735,5.36
44599,136.28672438,-72.60270534,4.47
77370,236.90802758,55.37662695,5.85
11840,38.21924713,34.5424097,5.84
11843,38.22558556,15.03455423,6.0
44613,136.35039948,48.53031413,5.48
77390,236.97106727,-65.44229133,5.54
44626,136.40989341,-70.5384967,4.66
11867,38.27927736,-34.64996687,5.91
110179,334.75308343,-13.30499496,5.96
77412,237.05544341,13.78907797,5.98
44659,136.49319468,5.09231573,4.99
77442,237.14339541,28.15674892,5.89
11918,38.46126669,-28.2323435,4.96
77464,237.23665667,-3.81851309,5.53
110256,335.00699236,-80.43974699,5.09
110273,335.04965231,-7.82110201,5.35
110298,335.1149036,5.78949798,5.37
12002,38.67760483,-7.85944515,5.74
77541,237.48956804,-48.91240761,5.86
77562,237.52951595,-53.2097703,5.78
44798,136.93671783,10.668191,5.23
77578,237.57311229,2.19650915,5.21
44818,137.00021065,29.65423553,5.42
44824,137.01200194,-25.85853572,4.62
110371,335.33057976,28.33052953,4.78
12072,38.91142353,37.31226284,5.72
110386,335.37947921,12.20518609,4.82
12086,38.94504727,34.68755845,5.38
110391,335.39820144,-21.5982299,5.12
44857,137.09791238,66.87323482,5.15
12093,38.96863365,5.59324631,4.87
77635,237.74477002,-25.75129544,4.63
12107,39.0002013,-7.83159717,5.53
77645,237.77835295,-55.05553281,5.74
12114,39.02039079,6.88687029,5.79
44883,137.17574809,-8.58952398,5.6
77655,237.80804817,35.65738198,4.79
12122,39.0386071,-30.04497764,5.74
44892,137.19720932,26.62911175,5.95
77660,237.81497246,-3.09049656,5.09
77661,237.81628738,20.97791921,4.74
44897,137.21279364,33.88221693,5.95
44901,137.21773434,51.60464833,4.46
77678,237.88091307,-47.06080055,6.0
12148,39.14612752,7.73002606,5.81
12153,39.15798197,12.44763871,5.64
44923,137.26754064,-18.32854841,5.73
44936,137.29797771,-12.35770604,5.76
44946,137.33972349,22.04544558,5.16
12181,39.23828169,38.73358091,5.91
12186,39.24419965,-34.57797694,5.78
44961,137.39820557,-8.78764775,5.47
77738,238.06898748,55.82671307,5.81
110506,335.78327857,-45.92848794,5.62
110529,335.87853554,-24.76266115,5.53
110532,335.8839638,-7.19442118,5.92
45001,137.48504203,-30.36540124,5.59
12239,39.40028258,65.74533624,5.8
12247,39.42416781,-3.39617474,5.65
45038,137.5981063,67.13401804,4.8
12273,39.50846272,72.81825166,5.17
77811,238.33357736,-20.16704023,5.04
110578,336.02868366,-4.83701991,5.79
12288,39.57775943,-30.19406253,5.84
110602,336.11275166,-13.52936898,5.76
77840,238.4029962,-25.32714192,4.59
45075,137.72942033,63.5136327,4.67
45080,137.74202204,-58.96689577,3.43
110618,336.15368188,-72.25541209,5.28
45085,137.76832899,-44.86790173,4.99
77853,238.45640848,-16.72929352,4.13
77858,238.47464386,-24.53315725,5.38
77859,238.4827661,-23.97809446,5.41
12332,39.7041439,21.96140834,5.45
45101,137.81966709,-62.31697715,3.96
110649,336.23496035,-57.79741534,5.31
45122,137.8890954,-46.58391088,5.78
110668,336.29418278,-70.43162205,5.78
77902,238.64421562,20.31096824,5.45
77907,238.65771031,43.13856713,5.35
77909,238.66470881,-25.24374125,5.87
12390,39.89097607,-11.87215595,4.83
45158,137.99473448,-19.74762765,5.72
12394,39.897339,-68.26694624,4.12
77939,238.7515163,-19.38292565,5.95
45189,138.12717963,-43.61326199,5.56
110725,336.50340751,70.7708984,5.47
12444,40.05175765,-9.45287501,5.79
77982,238.87332974,-68.6030014,5.11
77984,238.87533288,-26.26599348,5.63
45219,138.23179649,-59.41392852,5.54
77986,238.87746678,42.5661931,5.73
77990,238.88485665,-60.17764722,5.78
110778,336.64281397,-16.74213796,5.55
78012,238.94827874,37.94695788,5.43
110785,336.65577291,4.3937662,5.76
12489,40.17114788,27.0609427,5.3
110787,336.67668342,78.78585295,5.83
45270,138.39355741,-47.33840744,5.92
78045,239.02464218,-60.48247726,5.76
110817,336.77212619,65.13226983,5.52
45290,138.45086324,43.21782455,5.3
12530,40.30832736,-0.69565302,5.72
45314,138.53420889,-44.14582202,5.85
45328,138.57496111,-55.56962953,5.26
12562,40.39220418,-14.54927595,5.98
45333,138.58558579,61.42331762,5.18
78105,239.22290935,-33.96613398,5.14
78106,239.2254978,-33.96428074,5.59
110873,336.94273,31.84004456,6.0
45344,138.6020198,-43.2274927,5.24
110882,336.96467618,4.69566364,4.78
78132,239.31071625,14.41448012,5.54
78142,239.33885603,-36.18534387,5.78
12608,40.52752839,-38.38368632,5.99
45386,138.73820379,-37.60239609,5.85
12623,40.56214992,40.19394381,4.91
110935,337.15696604,-67.48905907,5.56
78168,239.41859712,-20.98307996,5.84
110936,337.16337454,-39.13179163,5.47
12640,40.5914154,20.0114649,5.74
45410,138.80771998,14.94150673,5.36
45412,138.80936076,34.63351605,5.98
78180,239.44767142,54.74976237,4.96
45439,138.90295253,-38.56994234,4.92
78207,239.54737034,-14.27935849,4.95
45448,138.93783179,-37.41314409,4.63
110986,337.28326255,9.1290341,5.6
12686,40.7480145,53.5261052,5.85
45455,138.95742525,56.74140659,5.28
110992,337.29261484,26.7631985,5.79
12692,40.76182552,55.10601929,5.76
45461,138.96908418,72.94632615,5.93
78246,239.64527909,-24.83148822,5.43
12719,40.86296995,27.70714655,4.65
45493,139.04719847,54.02185739,4.8
45496,139.05030102,-57.54147354,4.34
45505,139.0959805,-44.26573459,5.12
111043,337.43930587,-43.74922369,4.12
78276,239.74047384,36.64377347,5.61
111045,337.44174625,-27.10728417,5.95
78279,239.74227757,-65.03758551,5.74
111056,337.47074424,78.82428466,5.45
45526,139.17236416,-8.74475948,5.49
45527,139.1739019,-6.35314449,5.24
111062,337.49140602,4.43169004,5.51
111068,337.5075588,32.57263835,5.64
12768,41.02149903,44.29704002,5.43
45544,139.23781764,-39.40153886,5.31
78323,239.87610968,-41.74443615,4.99
45559,139.28217379,-14.5740689,5.83
12803,41.13739078,15.31186153,5.78
45571,139.32177181,-68.68964167,5.38
45581,139.35489485,-74.89431283,5.28
45585,139.36487353,-74.73459076,5.86
111123,337.66173361,-10.67795002,4.82
12821,41.20707139,67.82463015,5.95
45590,139.37990677,46.81722811,5.96
12832,41.23992306,12.44576098,5.17
45631,139.52446206,-51.05085914,5.26
78400,240.0816314,-16.5333505,5.47
12871,41.3644922,-63.70455293,5.73
12876,41.38597694,-67.61661701,4.83
111196,337.90631532,-85.96725319,5.76
45661,139.60795608,35.36407958,5.94
78436,240.19846931,-8.41135327,5.53
78442,240.21305704,4.42736313,5.82
45675,139.67648516,-51.56065139,5.83
78459,240.26108988,33.3035093,5.39
111242,338.06760858,76.2264413,5.7
78481,240.3096572,17.81839727,5.1
111259,338.10990871,39.77973355,5.88
45743,139.88805816,-15.83466291,5.79
45751,139.94325884,-11.97485258,4.77
78542,240.52315992,52.91591721,5.93
111310,338.25026381,-61.98212195,4.91
78554,240.57371658,22.80445386,4.82
45811,140.12090854,-9.55569462,4.8
13055,41.94878463,81.44847547,5.8
78592,240.69957561,46.03670491,4.72
111362,338.41937473,56.62473707,5.72
13061,41.97725287,29.24711818,4.52
45856,140.23671804,-62.40463244,4.79
111394,338.51213358,-1.57426985,5.88
13108,42.13370521,18.28379052,5.83
78649,240.83068614,36.631787,5.79
78650,240.83592905,-25.86524023,4.96
13121,42.19126771,25.18806369,5.89
78655,240.85078899,-38.60254059,4.9
78661,240.88063042,76.79393894,5.73
78662,240.88371506,-57.77506392,4.63
78665,240.89316192,-32.00053847,6.0
45902,140.37329518,-25.96543878,4.71
13141,42.25619836,-62.80652153,5.25
111449,338.67348716,-20.70821576,5.21
45915,140.43037113,56.69921955,5.79
45920,140.45851013,-55.51468559,5.61
45924,140.46244702,-42.19486035,5.56
13165,42.32316638,17.46430897,5.26
78727,241.0922274,-11.3731039,4.16
45962,140.5999687,-46.04744483,5.74
13202,42.47575765,-27.94198156,5.39
78747,241.15340077,-37.86295066,5.91
111515,338.90156579,-23.99109409,5.97
13225,42.56159976,-35.84363655,5.92
111532,338.94223205,73.64318817,5.08
111546,338.96785542,39.63433069,5.73
13244,42.61858328,-75.06694714,4.76
13254,42.64608204,38.31864364,4.22
46026,140.80104443,-28.83387303,4.71
13265,42.66836129,-35.67584879,5.48
78821,241.36064081,-19.80186007,4.9
13288,42.7596731,-21.00401932,4.76
111600,339.14767144,-31.66378886,5.82
13327,42.87327848,15.08207065,5.52
13328,42.87848975,35.05974098,4.56
78868,241.4825736,-72.40089807,5.7
46101,141.02289486,-61.64890244,5.99
13339,42.92387512,46.84193945,5.86
46107,141.03843596,-80.78687606,5.34
78877,241.52657175,-23.60631525,5.9
111643,339.24522754,-40.5910344,5.85
111660,339.30402597,75.37181088,5.8
78893,241.58198561,67.81013363,5.44
13367,42.99479856,68.88849697,5.94
111674,339.34340696,51.54512282,4.64
78918,241.64810321,-36.80228846,4.22
78933,241.70177456,-20.66919247,3.93
111710,339.43908758,-4.22805572,5.04
78970,241.8175542,-36.75567607,5.72
46221,141.35014778,-5.11739372,5.6
78990,241.8513642,-20.8687642,4.31
46225,141.36347638,-61.95047605,5.77
79005,241.90173206,-12.74541033,5.75
79007,241.90641092,9.89174292,5.63
13473,43.39332117,-38.43700368,5.93
13479,43.39717892,-22.37630756,5.93
13490,43.42755662,38.33748839,5.34
111795,339.65801295,56.79563166,5.11
111797,339.66272116,63.58447203,5.19
111809,339.71444358,-33.08134754,5.66
79043,242.01885653,17.04698022,5.0
111810,339.71912555,19.5222628,5.84
79050,242.03160775,-26.32667888,5.35
46283,141.57482518,-53.37890899,5.09
79072,242.11697935,8.5343098,5.69
111841,339.81532792,39.05026916,4.89
79098,242.18216954,-23.68541585,5.86
79119,242.24291258,36.49094417,4.73
79120,242.24533115,3.45447473,5.93
46358,141.77628651,-71.6018951,5.46
79137,242.29672854,6.37869508,5.93
46371,141.82669014,-22.3437826,4.72
79153,242.32728698,-57.93431797,5.57
111925,340.0766967,53.84592759,5.94
111934,340.09294428,-30.65887086,5.88
46404,141.9449187,-6.07118721,5.38
13654,43.95207421,18.33163983,5.76
79195,242.46049234,-3.4667292,5.39
79199,242.46912194,-33.54580488,5.5
111967,340.20382572,-57.42232207,5.98
13665,43.98716905,61.52113777,5.59
111974,340.21950989,14.54916061,5.72
13679,44.05737361,8.3815634,5.97
46454,142.11416993,9.05677773,5.4
46457,142.12157061,8.18829842,5.72
46460,142.12727921,-66.70187737,5.9
13702,44.10897867,18.02311886,5.58
46471,142.16662216,45.6014831,5.4
46482,142.19626823,-62.27313432,5.91
13717,44.15593438,-3.71231988,5.16
112031,340.36937888,40.2254488,5.25
112041,340.40021569,41.54912344,5.93
46509,142.28707376,-2.76896393,4.59
46511,142.3026759,-20.74912751,5.66
79280,242.70635509,75.87756285,5.48
112051,340.43920158,29.30764069,4.8
112067,340.48939852,14.51639289,5.92
79302,242.75862402,-29.4162203,5.09
13775,44.32201066,31.93421866,5.1
13782,44.34902489,-23.86216374,5.44
79320,242.8237751,-41.11980324,5.86
46578,142.47710045,-26.58961559,5.49
79349,242.90848202,23.49480143,5.74
112117,340.65367718,-47.21081334,5.99
79357,242.94833015,42.37456882,5.89
79358,242.95022732,36.42509439,5.62
46594,142.52129237,-51.51716414,5.45
13834,44.52175646,20.66873326,5.8
13835,44.52389062,-23.60601201,5.82
79375,242.99995237,-10.06425307,4.93
46618,142.59368039,-15.57735181,5.86
46620,142.59758877,-58.36183956,5.88
79387,243.03048126,-8.54757591,5.43
79399,243.0668317,-28.41730511,5.67
79404,243.07585385,-27.92637196,4.58
13874,44.67532015,-2.78287686,5.22
13879,44.69029205,39.66272854,4.68
46652,142.68007801,33.65571065,5.87
46657,142.69207663,-31.88922182,5.75
112203,340.87490273,-41.41434678,4.84
13905,44.76531915,35.18312827,4.94
112211,340.896805,-18.83037526,4.68
13914,44.8030237,21.34042885,4.63
46701,142.80549519,-57.03437682,3.16
112241,341.02174163,39.46534838,5.93
112242,341.02282912,41.8192347,5.11
13942,44.90076145,-25.27413271,5.69
13949,44.9161641,41.03294069,5.89
13951,44.92149906,-2.46495154,5.56
79488,243.31428933,5.02108648,5.46
79497,243.34456747,-55.54094742,5.78
13965,44.95746995,47.22069307,5.47
46734,142.88399535,-31.87183135,5.91
46735,142.8850429,35.10327265,5.39
46736,142.88769189,-35.71475041,5.86
46741,142.90113654,-73.08091272,5.46
79509,243.36970393,-54.63046753,4.95
46771,142.9864117,11.29982653,4.99
79540,243.46210399,-11.83774676,5.24
46774,142.98990553,9.7157667,5.07
46776,142.99553372,-1.18466379,4.54
14036,45.1839228,10.87038841,5.93
14043,45.21755767,52.35174424,5.24
46811,143.08032576,-40.64933489,5.35
46813,143.08503617,-19.40030353,5.74
14060,45.29176726,-7.66301153,5.75
79596,243.59318878,-33.01108784,5.91
112374,341.40784202,-53.50012101,4.84
79607,243.67022334,33.85861287,5.23
112381,341.41992749,-46.5473276,5.52
14086,45.40682262,-28.09155384,5.88
46859,143.23239248,-13.51680367,5.95
14109,45.47558905,26.46235385,5.91
14110,45.48382908,-9.96140669,5.84
46880,143.30191619,-21.11572236,5.02
112417,341.54259215,44.54605449,5.84
79653,243.81381535,-47.37202131,5.13
79664,243.85946153,-63.68568176,3.86
46897,143.35854726,-22.8638835,5.92
79666,243.86931313,18.8080866,5.72
14131,45.5643682,-71.9024567,5.51
79672,243.90529277,-8.36944168,5.49
14143,45.59382454,4.35288413,5.62
112447,341.67325244,12.17288788,4.2
46914,143.43557959,-49.00507186,5.12
79689,243.95749098,-57.9123497,5.61
46928,143.47240397,-80.94125808,5.07
14168,45.67614498,-7.68547178,5.32
46950,143.53663903,-51.25526648,5.01
14187,45.7327619,-46.97503638,5.81
46974,143.61104266,-59.22975334,4.08
46977,143.62024899,69.83034278,4.54
46982,143.63603489,-5.91494806,5.56
112519,341.87109651,83.15383033,4.77
79754,244.18032631,-53.81110927,5.45
79757,244.18661396,29.15026076,5.8
112529,341.88801764,-19.61337502,5.24
47006,143.7059716,52.05147688,4.47
112542,341.92820178,-14.05642835,5.68
47013,143.7230253,72.20567923,5.77
79790,244.2538895,-50.06812186,4.97
47029,143.76595846,39.62149337,4.81
79797,244.27255228,-67.94128543,5.95
79804,244.31394402,59.75502328,5.37
112590,342.04598204,37.41668797,5.82
14293,46.06881559,-7.60085702,5.26
47080,143.91459292,35.81013347,5.4
79881,244.57457668,-28.61402047,4.8
14376,46.3612078,25.25517451,5.45
14382,46.38504744,56.70571907,4.77
47168,144.17855027,31.16173433,5.57
79938,244.75175031,-14.87282537,5.97
47175,144.20641702,-49.35502581,4.34
14417,46.53267546,79.41853526,5.49
79953,244.796723,49.03815923,5.93
47187,144.25086356,-25.29675945,5.68
47189,144.26075135,16.4379518,5.73
47193,144.27202941,81.32638208,4.28
79963,244.82352371,-42.67396507,5.44
112731,342.44298077,55.90277673,5.43
47199,144.29121374,-32.17864643,5.62
47204,144.30271898,-53.66850826,5.44
47205,144.30278012,6.835802,5.0
14439,46.59868993,13.18725028,5.64
79980,244.88641112,-30.90671595,5.53
14456,46.63955128,-6.08855469,5.23
47224,144.3683363,-36.09599409,5.96
80008,244.97976149,39.70858437,5.48
112778,342.59072879,41.9533937,5.91
112781,342.59506056,-80.12384547,5.32
47267,144.50605592,-43.19094447,5.51
14502,46.82916106,64.05759405,5.89
80054,245.10521092,-55.13970611,5.76
14521,46.88392638,-78.9892445,5.67
80057,245.11191165,-78.66749596,5.27
112832,342.7589976,-39.15683359,5.43
112833,342.76263737,85.37373901,5.89
47300,144.59073275,40.23979335,5.28
47310,144.61370114,4.64929286,4.68
80079,245.15908631,-24.16932002,4.55
112862,342.83724717,-29.53630903,5.99
112864,342.8442826,61.69674047,5.61
112917,343.00847896,43.31241729,4.95
47391,144.83749386,-61.32806002,4.51
80161,245.4529632,69.10939138,5.26
112935,343.10031448,9.83566452,5.16
47401,144.86614459,67.27223037,5.96
80179,245.51812082,1.02903908,4.82
80181,245.52426649,30.89199596,4.86
80197,245.5892723,33.79905176,5.2
80208,245.61664599,-49.57235445,5.32
80212,245.62111283,-43.91205108,5.89
14677,47.40309339,29.07708008,5.74
80214,245.62174444,33.70347845,5.4
47452,145.07651372,-14.33229221,5.07
112997,343.25944136,16.841194,5.86
47479,145.17731003,-57.98355305,5.3
113031,343.36960354,-11.61651418,5.8
47498,145.25910511,-57.25954239,5.8
47508,145.28763669,9.892308,3.52
113048,343.41731794,44.74916327,5.79
47522,145.32086423,-23.59151405,4.76
14764,47.66164025,11.87262694,5.97
80309,245.94647297,61.69646128,5.67
47544,145.39631661,31.27781719,5.9
113084,343.5291047,40.3769066,5.82
47559,145.44969741,-55.2137617,5.99
80337,246.00537432,-39.19298028,5.37
47570,145.50142855,39.75785117,5.61
113116,343.60403032,84.34617662,4.7
80351,246.04512471,6.94820724,5.83
14817,47.82242336,39.61158237,4.61
47592,145.56006988,-23.91556899,4.93
47594,145.56176479,69.23753736,5.72
14838,47.90735613,19.72667738,4.35
80375,246.10557864,55.20509584,5.75
14844,47.9278047,81.47070965,5.92
113148,343.68945382,-16.27195737,5.53
80390,246.13231258,-37.56604406,5.42
14862,47.98445775,74.39365924,4.85
80399,246.16571952,-29.70466306,5.4
113174,343.76103611,37.07682727,5.91
113184,343.79567219,-4.98789888,5.72
113186,343.80696948,8.81616592,4.91
47654,145.73828058,72.2526183,5.15
14893,48.05935964,27.25696838,5.78
14913,48.10727749,-44.41966029,5.92
14915,48.10985486,6.66088292,5.55
113222,343.93544836,36.3513899,5.73
80460,246.35069888,37.39407916,5.53
14930,48.13816688,-57.32154906,5.71
47701,145.88858324,29.97447335,5.64
80480,246.4299329,78.96385386,5.55
47717,145.92597679,-53.89128223,5.56
14954,48.1934853,-1.19610121,5.07
47723,145.93293593,14.02169206,5.36
113281,344.0984592,41.60387594,5.6
113288,344.10832803,49.73354396,4.99
47758,146.05039686,-27.76947109,4.78
113307,344.19916346,-47.96922144,5.72
15004,48.34947111,48.17695327,5.93
113327,344.26875958,48.68406797,5.34
113357,344.36658526,20.76883227,5.45
80620,246.93106828,-7.59792904,5.24
47854,146.31171365,-62.50790315,3.69
80645,246.98893484,-64.05794176,5.28
15110,48.72540048,21.04444121,4.87
80650,246.99589024,68.76813711,4.94
80672,247.06028618,-37.17988144,5.79
80675,247.06316169,-58.59979504,5.67
80686,247.11726481,-70.08440088,4.9
15154,48.83515165,30.55668942,5.61
80693,247.14158895,0.66500201,5.41
80704,247.16061566,41.88167726,4.83
47943,146.54185087,6.70855585,5.8
47956,146.58596518,-76.77611986,5.43
15192,48.94987707,57.14062036,5.79
47959,146.59719951,11.81004306,5.67
47960,146.59837945,1.7855861,5.65
15197,48.95843559,-8.81972986,4.8
47963,146.62654282,-44.7550603,5.58
47965,146.63193451,57.12807021,5.09
15201,48.99025199,-77.38845428,5.51
113503,344.79922339,11.72884358,5.76
113521,344.86439619,0.96292709,5.43
15219,49.05084766,50.93766392,5.04
113532,344.89899254,-29.462311,5.51
48002,146.77550679,-65.0720068,2.92
15241,49.1466228,32.18401757,5.98
80782,247.42636486,-46.24322863,5.35
80793,247.44551354,-14.5508791,5.66
113561,345.02125312,56.9453738,5.1
113562,345.0241198,-25.16418002,5.66
80815,247.5519821,-25.11522381,4.79
15305,49.36081681,-47.75166403,5.84
80843,247.6397853,20.47918805,5.24
113622,345.178752,3.01180506,5.85
15330,49.44234789,-62.57532203,5.53
15334,49.44064201,39.28337316,5.97
15338,49.4473059,44.02502428,5.49
80874,247.7056645,-61.63350312,5.19
48113,147.14738081,46.02100807,5.08
113657,345.28157612,-50.95002843,5.68
15357,49.51081436,-28.79707518,5.93
80898,247.80596362,22.19545777,5.76
113669,345.33077674,-28.85396037,5.55
15371,49.55341226,-62.50636301,5.24
80911,247.84555554,-34.70436598,4.24
15382,49.59209811,-22.51111801,4.86
15383,49.5934401,-0.93028832,5.62
113686,345.38212585,-4.71146131,5.94
15404,49.65725554,50.22217425,5.16
80945,247.92403593,-41.81714466,5.31
15411,49.67145547,-18.55979384,5.72
15416,49.68260357,34.2226526,4.85
80953,247.9467837,45.59828098,5.61
48191,147.36701467,-37.18676531,5.95
80975,248.03416357,-21.46638977,4.45
15444,49.78182858,50.09496612,5.05
48224,147.48808628,-45.73273575,5.09
15457,49.84040002,3.37019788,4.84
80991,248.10700062,60.82332314,5.92
81007,248.14868862,5.52122034,5.63
15479,49.89544554,-24.12290192,5.63
113788,345.65158819,42.75779461,5.09
113801,345.68438225,-20.8707117,5.97
15514,49.98248617,27.07113436,5.91
48287,147.6747364,-46.9339226,5.72
15520,49.99696958,65.65229236,4.74
48310,147.73159411,-62.7451164,5.56
15547,50.0823276,77.73474052,5.44
15549,50.08483666,29.04845844,4.47
113860,345.87423393,-34.74941192,5.12
113864,345.88701295,67.20920976,5.25
48339,147.80027537,-59.42577425,5.79
48348,147.83216782,-46.19387149,5.62
81122,248.52091948,-44.04531483,4.86
113889,345.96922513,3.82004536,4.48
113902,345.99849674,-41.478896,5.79
81141,248.58058375,-70.98809744,5.5
48374,147.91944867,-46.54762042,4.58
113919,346.04576333,50.0520906,4.64
15619,50.27834733,3.67562031,5.7
48390,147.97099175,24.39536942,5.29
15627,50.30676875,21.1470861,5.27
48402,148.02648325,54.06433236,4.55
15643,50.35004205,-23.63513525,5.5
15648,50.36066117,43.32965082,4.96
113957,346.16511402,-53.96490515,5.37
113969,346.21758641,-68.82022566,5.53
15669,50.46888702,49.0709047,5.94
113996,346.29078154,-7.69380135,5.44
15696,50.54955583,27.60755258,5.55
81252,248.93674449,-65.49539896,5.5
15737,50.68850607,20.74206893,5.1
48519,148.42885498,5.9585733,5.9
81289,249.04667654,46.6133331,5.83
81290,249.04758462,52.90004826,5.53
81292,249.05716717,52.92442209,5.07
48527,148.45874341,-51.14671326,5.95
81300,249.08937191,-2.32458363,5.77
81304,249.09363099,-35.25532602,4.18
81305,249.09401037,-42.8588614,5.46
15770,50.80497871,49.21326943,5.32
48559,148.55133009,-25.93234458,4.87
48561,148.57355933,-45.28351642,5.72
114104,346.65340667,59.41975995,4.84
114119,346.67018938,-23.74311551,4.48
114131,346.71970652,-43.52035834,4.28
114132,346.72343754,-38.89229267,5.62
114144,346.7510826,9.40949158,4.54
48613,148.7134616,-50.24395889,5.71
48615,148.71753612,-19.00935988,4.94
114155,346.77808067,25.46825863,4.76
15861,51.07697877,24.72406291,5.5
114167,346.81155017,-50.68668135,5.81
15876,51.12375599,33.53596183,5.78
114189,346.8696459,21.13425059,5.97
15890,51.16898714,64.5859965,5.13
114200,346.91361488,46.38723089,5.3
81437,249.50194035,56.01553977,5.28
114210,346.93910045,49.29577594,5.68
48682,148.92917735,49.81984279,5.27
114222,346.97438076,75.38749619,4.41
81472,249.6095496,-43.39842591,5.83
114254,347.08778156,-28.8236966,5.6
81497,249.68685544,48.92834255,4.86
48734,149.10823479,8.93315735,5.85
15968,51.40105329,-69.33643647,5.96
114273,347.170506,2.12788289,5.42
48748,149.14789188,-33.41849626,5.83
81523,249.77177737,-37.2173701,5.93
16029,51.59385319,-27.31747919,5.93
48802,149.30671096,57.41819578,5.97
114347,347.38107089,8.67716066,5.05
114365,347.43391109,59.33269206,5.68
114366,347.43596045,-28.08857186,5.88
48833,149.4210585,41.05563358,5.11
114375,347.47874826,-22.45761141,4.71
114382,347.4890132,-42.86129195,5.83
114389,347.50608572,9.82208227,5.39
114407,347.54056645,-40.59154707,5.9
81641,250.16119545,4.21978883,5.77
16112,51.88925357,-35.68132348,5.71
48883,149.55573249,12.4448003,5.26
114421,347.58974022,-45.24671132,3.88
81660,250.22966402,64.58904622,4.84
48893,149.59488065,72.87950922,5.86
114430,347.61333692,43.54423191,5.91
16142,52.00394674,-11.28659964,5.74
114449,347.67765316,17.59437171,5.68
16147,52.01279024,49.06286627,4.99
48926,149.71781467,-35.89097265,5.23
81702,250.33506197,-48.7629566,5.57
16168,52.08624888,33.80755744,5.72
81710,250.34628426,-68.29612306,5.89
81724,250.39326259,-17.74216686,4.91
81729,250.40291252,26.91688049,5.92
81733,250.41760437,-49.65155241,5.62
81734,250.42700502,1.18123129,5.74
81741,250.43939225,-33.14575921,5.84
16210,52.21803058,49.84838373,5.58
48982,149.90089279,29.64523256,5.75
114520,347.93412317,8.72011558,5.15
81754,250.4737148,-19.92437683,5.55
49005,149.96535978,56.81180742,5.5
16244,52.34187591,49.50894827,4.67
16245,52.3444899,-62.93752748,4.71
49029,150.05336089,8.04422312,4.68
16263,52.40011329,-12.67473686,5.57
114570,348.13751419,49.40620718,4.53
16281,52.47809925,58.87874967,4.55
16285,52.479782,-42.63425613,5.76
16290,52.49538877,-78.35184991,5.68
16292,52.50076524,55.45180834,5.09
49065,150.18245134,-82.21467008,5.53
49081,150.2527358,31.92367205,5.37
81854,250.77620399,77.51397279,5.99
114622,348.32073073,57.16835504,5.57
16322,52.60195391,11.33644221,5.14
16335,52.64368152,47.99521606,4.36
114641,348.36042925,11.06500132,5.85
16339,52.6539753,-47.37512542,5.98
16340,52.65396132,48.10359644,5.82
16341,52.65440695,-5.07514548,4.74
16358,52.68924968,6.188703,5.93
16368,52.71544718,-66.48971397,5.81
16369,52.71824299,12.93667809,4.14
49164,150.500401,-60.4208902,5.93
81966,251.16559744,-53.15231311,5.96
81972,251.17747189,-40.83967511,5.64
114745,348.65460566,74.23126834,5.89
49220,150.70395978,21.94925787,5.68
81992,251.25078997,-28.50965735,5.99
16470,53.03583692,48.02347611,5.47
114775,348.74425044,-41.10539698,5.77
82020,251.32424053,56.78185727,4.84
16489,53.08385477,84.91103978,5.62
82028,251.34383238,15.74528881,5.6
16499,53.10941575,46.0568617,5.3
16509,53.14501173,-50.37864644,5.67
16511,53.14978818,9.37343822,5.76
16518,53.16673706,35.46172929,5.91
114822,348.89274024,-3.49638036,5.56
114831,348.90724193,70.88807986,5.55
82073,251.45788048,8.58261625,5.15
114855,348.97289447,-9.08773691,4.24
49339,151.08725684,-24.28553452,5.7
82110,251.58843747,-58.50359469,5.74
16591,53.39598063,39.8994785,5.79
82129,251.66663028,-67.1096907,5.1
49363,151.15134501,53.89171627,5.71
16599,53.41274961,54.97485691,5.98
82135,251.69982573,-39.37696194,5.48
114921,349.16579571,-44.48916572,5.92
114924,349.17626317,53.21347563,5.58
82171,251.83190703,-58.34144117,5.55
82172,251.8322777,42.23891803,5.86
114939,349.21224791,-7.72650369,4.93
114948,349.24036261,-62.00119795,5.64
16664,53.61093721,24.46439289,5.95
82216,251.94341033,5.24674597,5.22
49485,151.54671622,-47.36999485,5.06
115022,349.43602907,49.01529974,4.82
115054,349.54118494,-40.82436098,5.54
115065,349.59718419,41.77367574,5.98
16780,53.9902757,-11.19378202,5.56
115088,349.6562199,68.11144459,4.75
82321,252.30924348,45.98332294,4.82
49569,151.78957968,-17.141733,5.59
16803,54.07255242,-17.46706452,5.24
115115,349.74031934,-9.61074996,4.99
82350,252.39440352,13.26114073,5.91
115125,349.77733688288413,-13.455251032789445,5.19
115126,349.77778501,-13.45855162,5.2
16826,54.12241189,48.19263365,4.32
82369,252.45845321,-10.78299985,4.64
115142,349.84990507,-5.12435206,5.56
115144,349.8504498,-18.07537644,5.96
16846,54.19703978,0.58775771,5.82
115152,349.87420094,48.62532218,5.44
82402,252.58075482,7.24768345,5.48
49637,151.97612834,9.99750785,4.39
82422,252.66232689,29.80653779,5.73
115191,349.96841131,42.07804427,5.81
115227,350.08576289,5.38130731,5.05
49698,152.17811802,-65.81543788,5.26
49712,152.23433292,-51.81126063,4.85
82480,252.85386934,1.21594728,5.51
115250,350.15934413,23.74033698,4.58
82493,252.89051052,-41.23053395,5.23
82504,252.93859152,24.65643288,5.03
115271,350.20648672,30.4149211,5.58
115280,350.22193691,38.1823262,5.77
16989,54.62189008,-7.39186296,5.86
49764,152.3756997,-68.68277895,5.8
82545,253.08393309,-38.01753566,3.56
115312,350.31457565,-26.98676884,5.65
17027,54.75465745,-5.62620983,5.97
49809,152.52452658,-12.81592328,5.3
49812,152.53142041,-8.40817035,5.91
82587,253.24190757,31.70167382,5.34
115355,350.47888787,31.81246462,5.35
49844,152.65715756,-41.71524685,5.98
82611,253.32315383,47.41672553,5.99
82621,253.35508699,-20.41555487,5.86
115395,350.63555299,60.13348533,5.56
49865,152.73275506,-8.41846171,5.64
17103,54.96300949,3.05686329,5.55
115404,350.66322094,-15.03933761,5.19
82650,253.42677047,-43.05096825,5.95
49893,152.80324264,37.40190044,5.86
82671,253.49886208,-42.36202495,4.7
82672,253.50149815,-57.90950697,5.91
82673,253.5019647,10.1653591,4.39
82676,253.5076533,-41.80638905,5.46
115444,350.7690354,12.31391022,5.09
49934,152.94358379,-58.06054371,5.7
17167,55.15972166,-5.21070611,5.53
82716,253.61225757,-42.47889089,5.84
82730,253.6487242,-6.1539821,5.23
17203,55.28274194,37.58019786,5.55
82764,253.72987681,20.958488,5.39
115537,351.05525267,-51.89117428,5.75
82775,253.74377151,-41.15085779,5.78
50027,153.20151956,4.61467985,5.77
82802,253.84236363,18.43321261,5.35
82806,253.85286833,-63.26965901,5.99
115590,351.20942663,62.28280657,4.96
115591,351.2118013,32.38488166,5.56
17296,55.53885419,63.21680592,5.06
50070,153.345186,-51.23297082,5.27
17304,55.56209453,-31.93836128,4.99
17309,55.57895166,19.70025375,5.68
50078,153.36664163,-51.75578798,5.78
17313,55.59436099,33.96502633,4.97
50083,153.37763588,-66.37281136,5.15
115620,351.33110675,-56.84898545,5.6
115623,351.34493397,23.40410107,4.42
82860,254.00704079,65.1347956,4.88
50103,153.44134842,-40.34605581,5.91
17342,55.67806192,59.96939134,5.74
17351,55.70856433,-37.31351844,4.59
115669,351.51160877,-20.64201427,4.38
82902,254.11986622,-52.28374646,5.94
82925,254.20015313,-23.15034582,5.57
17395,55.89097385,-10.48566061,5.59
115713,351.65240096,-52.72160286,5.53
82960,254.29656739,-33.25949226,5.48
115746,351.75364161,87.30750398,5.56
115755,351.78083509,42.91201008,5.75
17457,56.12712547,-1.16309122,5.24
17460,56.13096594,36.46010312,5.6
115769,351.81246876,-58.47611022,5.63
115770,351.81928389,70.35978246,5.6
50241,153.88152637,-43.11236912,5.59
17489,56.20089755,24.28947018,5.45
17499,56.2189055,24.11333922,3.72
115806,351.91827729,25.16728105,5.99
17506,56.23540778,-0.29672011,5.56
83057,254.57474809,-50.64118473,5.53
17527,56.29057938,24.83926001,5.66
17529,56.29846606,42.57854862,3.77
17531,56.30206043,24.46727761,4.3
115836,352.01576252,-87.48221392,5.5
17534,56.31615242,-47.35947619,5.72
50303,154.06013222,29.31050136,5.49
50319,154.13453997,23.50309519,5.95
17563,56.41851045,6.04999111,5.34
50333,154.16973949,13.72833434,5.42
50336,154.17398571,25.37070547,5.84
17573,56.45669431,24.36774851,3.87
17579,56.47698473,24.55451103,5.76
17584,56.49691551,45.6818995,5.66
17585,56.50391351,67.20160533,5.79
17587,56.50971428,63.34504728,4.78
17595,56.53901175,6.80352052,5.91
17608,56.58155765,23.94835836,4.14
115908,352.25408607,-63.11065587,5.66
83150,254.89149665,-69.26816367,5.79
115919,352.28873314,12.76055363,4.54
50384,154.31057712,23.10621974,5.81
17618,56.61428557,-29.33815682,5.91
83176,254.99044005,-25.09219835,5.88
50414,154.40750909,-8.06891444,5.25
83187,255.02616419,-54.59717911,5.64
83196,255.03962554,-24.98907,5.74
50448,154.50844418,65.10835102,5.74
83216,255.11233462,-48.64775886,5.98
115990,352.50808479,58.54892004,4.89
50456,154.53162634,-28.99200024,5.52
83235,255.15411512,-35.93413263,5.95
17702,56.87115217,24.10513715,2.85
50480,154.61768332,-41.66849002,5.97
17717,56.91521237,-23.8746767,5.24
83254,255.24223125,22.63209529,5.69
50493,154.65795075,-56.11039337,5.8
83262,255.26500814,-4.22264365,4.82
17738,56.98350273,-30.16788223,5.52
50520,154.77113106,-64.67625789,5.66
17771,57.06778675,11.14329389,5.08
116076,352.82255801,39.23619816,5.22
17776,57.08673496,23.4212498,5.44
83313,255.40150446,33.56826983,5.27
50546,154.86161775,48.39676215,6.0
50555,154.90312561,-55.02930472,4.59
50564,154.93403308,19.47091417,4.78
17797,57.14949492,-37.62015476,4.3
17798,57.14876826,-20.90297667,5.81
83336,255.46934425,-32.143519,5.03
17805,57.16231066,0.22785663,5.91
83367,255.57790086,25.50561962,5.76
50609,155.06964665,-47.69909032,5.66
17846,57.28382126,43.9630947,5.95
17847,57.29059399,24.05341547,3.62
17851,57.29673351,24.13671205,5.05
17854,57.30724168,70.87104997,5.4
17886,57.38620754,33.09138215,5.14
17891,57.40249205,63.29696669,5.82
83430,255.78279838,14.09194666,4.97
83431,255.78629357,-53.2370277,5.27
50676,155.22831683,-56.04322039,4.5
50685,155.26391804,68.7476511,5.88
17932,57.51841774,44.96785586,5.65
83478,255.91375826,13.60534631,5.91
116247,353.31926464,-20.91450406,4.7
116250,353.33161416,-77.38532738,5.82
17954,57.57890965,25.57936194,5.24
83491,255.96225538,-38.15257189,5.91
116264,353.36705724,22.49877472,5.33
83535,256.10300501,-57.71216655,5.73
116310,353.4882817,31.32527712,4.97
50786,155.54400871,41.22952996,5.73
116323,353.5375718,-1.24756716,5.91
50799,155.58160318,-41.64996021,4.82
83574,256.20563526,-34.12293025,4.83
116354,353.65640507,40.23644119,5.55
116355,353.65918103,33.49732855,5.63
116368,353.70566996,-15.24600541,5.95
83601,256.32008022,0.70255911,6.0
83608,256.33381676,54.4700426,4.91
116380,353.74600097,71.64204313,5.86
83613,256.3445437,12.74082791,4.89
50847,155.74227211,-66.90149839,4.97
18081,57.97383088,34.35911894,5.78
116389,353.76901673,-42.61507485,4.69
18089,58.00095388,6.53490743,5.66
50860,155.77636562,33.90814466,5.89
83635,256.38441404,-0.89207004,5.63
50885,155.86032717,-4.07403481,5.93
50888,155.87206731,-38.00983938,5.34
18141,58.1735664,-5.36125893,5.48
83692,256.57519598,22.08415313,5.56
83693,256.58412216,-37.22758997,5.98
50933,156.03269271,65.56642303,4.94
50935,156.03584749,33.71853073,5.52
18170,58.29186012,17.3270832,5.97
50954,156.09877632,-74.0316119,3.99
116495,354.09702465,2.10222234,5.68
18199,58.38882879,-46.89367411,5.93
18212,58.41126409,48.65049537,5.76
18213,58.41227864,-34.73229726,5.11
18217,58.43035872,57.9751413,5.8
50993,156.2475745,-58.57630274,5.93
51008,156.31331299,8.78484459,5.61
18255,58.57292521,-2.95472986,4.46
18262,58.59650653,-40.35700883,5.7
51046,156.43446333,-7.05982902,5.6
116582,354.38351483,44.428994,5.81
116591,354.41483272,-13.06024332,5.66
116602,354.46247793,-45.49235133,4.74
83838,257.00859765,35.9351736,5.41
116611,354.4866777,18.40066705,5.49
83854,257.06189647,-17.60905169,5.98
18339,58.81719951,-12.09910485,5.99
116653,354.59954467,-76.86955231,5.99
83896,257.19807338,-30.40373008,5.93
51140,156.70383779,-54.87730218,5.58
18396,58.99238825,47.87142,5.39
116709,354.78471691,50.47173289,5.35
116714,354.79240042,75.29288242,5.95
83947,257.38853251,40.7770331,5.07
51192,156.85196232,-57.63880469,4.65
116728,354.83812151,74.0026285,5.98
51194,156.85534777,-65.7046639,6.0
83962,257.449793,-10.52330139,5.43
51200,156.86683875,41.60103526,6.0
18434,59.11954126,35.08089877,5.49
18453,59.15217692,50.69538082,5.28
116758,354.94611664,-14.2221779,4.97
51232,156.96970902,-58.73940319,3.81
116768,354.97933479,9.67729366,5.99
18471,59.21698585,22.47797113,5.62
18488,59.28453577,61.10888286,4.99
84033,257.6763468,-44.55771908,5.06
18505,59.35602208,63.07226405,4.95
116820,355.15895489,-32.07312485,5.3
51313,157.21906555,-64.17227778,5.27
116853,355.28713295,-11.6806546,5.89
84105,257.9111672,-48.87339888,5.94
116889,355.3937032,-18.02707702,5.36
51364,157.37072204,-29.66383248,5.58
116901,355.44085819,-17.816533,4.82
18606,59.71830773,-5.46994675,5.85
51376,157.39741059,-30.60706508,5.57
84150,258.06752096,-39.50694931,5.66
51384,157.42275189,84.25200905,5.52
116918,355.48620772,7.2505464,5.89
84177,258.11587226,10.58516767,5.32
18647,59.87554895,-12.57442477,5.61
84183,258.13574891,62.87433736,5.54
51420,157.52686747,38.92513177,5.79
116957,355.61592955,-15.44803278,5.27
116971,355.68060053,-14.54490474,4.49
51438,157.58386587,-71.99279296,4.72
84226,258.2439929,-32.43833214,5.95
51459,157.65658239,55.98053629,4.82
84248,258.32448896,-67.19659096,5.87
117020,355.8431642,10.33153622,5.09
18723,60.16939835,-30.49069722,5.93
51491,157.74932379,-13.58846957,5.59
51495,157.75858126,-73.22149033,4.94
51502,157.76943261,82.55858756,5.25
18735,60.20318917,18.19399995,5.89
18744,60.22419697,-62.15928428,4.48
51523,157.84092521,-53.71548368,4.89
117073,355.99785769,29.36145366,4.93
18772,60.32563108,-61.07882177,4.97
117088,356.0501899,-64.40445105,5.73
117089,356.05032979,-18.27693776,5.24
18788,60.38354244,-1.54965977,5.28
51556,157.96406552,32.37955435,5.9
51561,157.98931704,-45.0667103,5.76
18805,60.44223468,9.99801668,5.67
51585,158.04905741,14.13726962,5.43
117125,356.17019587,-78.79144185,5.74
51610,158.1400424,-44.61850771,5.91
51623,158.19920504,-58.66674498,5.98
51624,158.20279933,9.30658558,3.84
18859,60.65310384,-0.26892309,5.38
84401,258.83019728,-33.54842041,5.6
51635,158.23691737,-47.00335263,5.02
84402,258.83451723,-14.58413985,5.98
84405,258.83740933,-26.60282934,4.33
84425,258.89979588,-38.59389616,5.95
51658,158.30786815,40.4255599,4.72
84431,258.9227914,23.74276074,5.99
117218,356.50384755,-18.67834004,5.28
51685,158.37879635,34.98869458,5.57
117221,356.50852746,46.42027576,4.97
117245,356.59798525,3.48681088,4.95
51718,158.50368537,-23.74516468,5.08
18957,60.93585228,5.43562441,5.32
117265,356.65306792,66.78224457,5.95
84500,259.13214952,1.21054554,5.89
18975,60.98585128,8.19726936,5.45
84514,259.15285961,-0.44529728,4.72
18993,61.0411457,2.82694713,5.36
117299,356.757996,57.45135891,5.55
117301,356.76439475,58.65198943,4.88
51775,158.70006123,6.95374893,5.07
19009,61.09030616,24.10599281,5.46
117314,356.81630223,-11.91112638,5.74
19011,61.09464958,-12.79229521,5.62
117315,356.81664902,-50.22646074,5.18
84551,259.26519011,-32.66284013,5.53
19018,61.11317347,59.15550727,5.0
51802,158.75899566,8.65042553,5.67
19038,61.17381506,22.08192566,4.36
51808,158.77283604,75.71294767,4.86
84573,259.33153304,33.10010024,4.8
51814,158.79038688,57.08263671,5.16
51821,158.80354467,-39.5625887,5.5
117371,356.97820895,67.80680804,5.05
84606,259.41772717,37.29149825,4.64
117375,356.9855958,-2.76159766,5.49
19076,61.33440892,22.00890535,5.9
51849,158.89707431,-57.5576359,4.45
84626,259.50282784,-24.28690158,5.14
19095,61.40598316,-27.65180738,5.59
84631,259.52058199,17.31788648,6.0
84656,259.59696186,38.81139458,5.97
19129,61.51325851,68.67997255,5.88
84671,259.65412656,10.86447543,5.03
117447,357.20904741,62.21451644,5.43
51912,159.08549318,-59.56439245,5.08
84690,259.69928821,-44.12974648,5.76
84691,259.70219651,28.82296764,5.68
51933,159.13492888,-12.23012111,5.71
19171,61.651719,27.59990322,5.18
84709,259.73824381,-34.98979226,5.91
84720,259.76597408,-46.63623458,5.47
117491,357.36448143,1.0761315,5.77
84731,259.80212037,-59.69461184,5.93
117500,357.41414295,28.84238892,5.95
117503,357.42066759,36.42528092,5.86
19205,61.75189443,29.00129953,5.21
51979,159.30718553,-27.4126343,4.87
51986,159.32559015,-48.22562015,3.84
84769,259.90462538,80.13639937,5.74
52004,159.36278286,-58.73333948,5.47
117541,357.56137939,-9.97413654,5.93
52009,159.38863537,-13.3845429,4.89
117567,357.63869172,-14.40149013,5.7
52043,159.51102078,-57.25630921,5.89
19284,61.99756702,17.33989656,5.89
84821,260.04097946,25.53760288,5.36
84833,260.07862989,18.05708065,5.01
84835,260.08800741,46.24077993,5.51
52085,159.64563744,-16.87657185,4.91
117628,357.83853618,9.31335071,5.77
117629,357.83890925,-18.90916324,5.17
84862,260.1648632,32.46774334,5.38
52098,159.68005294,31.97623753,4.68
52102,159.68748435,-59.18299713,4.69
19335,62.15256811,38.03973329,5.52
84880,260.20692137,-12.84687539,4.32
84887,260.22585839,24.4994352,5.13
84893,260.2515588,-21.11293262,4.39
52127,159.74841063,-58.81685384,5.96
52136,159.77356447,53.66830017,5.55
52139,159.78180228,37.91000015,5.84
19376,62.25653961,13.39828055,5.94
117683,357.9909951,2.93038438,5.59
52154,159.82663768,-55.60326857,4.29
117689,358.02703204,-82.01881847,5.1
19388,62.29152955,19.60921676,5.51
19398,62.32431519,-16.38587484,5.45
84949,260.43173826,39.97464873,5.55
84950,260.43903528,53.42042844,5.69
117718,358.12203413,19.12028685,5.06
117722,358.12496038,-14.25121716,5.85
117730,358.15460249,10.94731984,5.3
84969,260.49782321,-67.77066851,4.76
84979,260.52448335,-70.12320813,5.39
117756,358.21053649,-8.99675595,5.76
19454,62.50682624,86.62613867,5.84
52221,160.04766406,-65.100209,5.51
117761,358.23152256,-3.15548162,5.93
19461,62.51143299,80.69868138,5.1
19483,62.59384111,-6.92385241,5.44
19511,62.69902023,-8.81981407,5.7
85048,260.72812115,-37.2207864,5.91
19513,62.70775376,26.48095174,5.39
85049,260.73009141,-58.01032712,5.86
19515,62.71078866,-41.99357326,4.93
19525,62.74592063,33.58679214,5.75
85068,260.77966858,-56.52554721,5.76
85079,260.81698005,-47.46819665,5.21
85084,260.83996314,-28.14283144,5.3
19554,62.83450749,5.5230472,5.71
117863,358.59596834,57.49938213,4.51
52338,160.45107735,68.44349962,5.74
19571,62.90084954,-20.35615701,5.8
52340,160.46466057,-79.78328811,5.97
117887,358.69426402,0.10930873,5.78
52353,160.48563182,65.71627973,5.12
52370,160.55883334,-64.46642641,4.76
85139,260.99006761,8.85257053,5.77
85147,261.00448781,-62.8641534,5.69
85157,261.02744668,22.96028529,5.7
85162,261.05452928,-44.16257561,5.1
85169,261.0783197,-60.67379907,5.76
52405,160.66902684,-59.21575905,5.36
52407,160.67994746,-32.71567343,5.63
85185,261.1314049,16.30100632,5.75
52422,160.75784148,26.3255774,5.51
52425,160.76683287,69.07621399,5.01
85207,261.1751282,-21.4414791,5.82
52452,160.83716589,4.7476695,5.77
52457,160.85398267,23.18840452,5.08
52468,160.88454015,-60.56661947,4.58
52469,160.88704747,46.20387703,5.18
52478,160.93056533,57.19920295,5.79
19719,63.38793263,7.71604492,5.29
52487,160.96330237,-64.24904192,5.74
52502,161.02881032,-63.96107161,4.8
19740,63.48493908,9.26382406,4.84
85290,261.42230897,60.04839798,5.65
85312,261.50018218,-50.63350974,5.19
19777,63.59870269,-10.25628292,4.87
118092,359.33287791,-62.95658371,5.95
19799,63.65097556,10.01140644,5.22
85340,261.59256716,-24.17530951,4.16
19805,63.70227288,-62.19181137,5.45
52577,161.26678874,67.41138405,5.95
19811,63.72215672,40.48367149,4.67
118114,359.38697921,-82.16980448,5.72
118121,359.39615753,-64.2982311,5.0
85355,261.62866808,4.14035962,4.34
52595,161.31797417,-80.46959695,5.46
85365,261.65783936,-5.08659579,4.53
118131,359.4396932,25.14140097,4.63
85379,261.68434357,48.26006484,5.83
85382,261.69227372,34.69580159,5.94
19849,63.81800057,-7.65287058,4.43
85385,261.70469724,20.080977,5.52
85389,261.71657533,-45.84302992,5.28
19860,63.88357189,8.89235703,4.27
52638,161.46622544,30.68231343,5.36
85409,261.80193124,-50.63037029,5.9
118209,359.66823972,-3.55598321,4.88
85442,261.90646538,-29.7245667,5.98
52678,161.56898752,-64.51455943,5.33
52686,161.60227135,18.89152299,5.5
52689,161.60532259,14.19464484,5.49
118234,359.73241378,-52.74580691,5.13
52701,161.623284,-64.2632416,5.23
85470,261.99000367,-52.29716773,5.72
118243,359.75224729,55.75492832,4.88
19949,64.17953476,53.6117991,5.2
19968,64.22314808,61.84998933,5.69
52736,161.71341275,-64.38347434,4.87
52737,161.71689616,-17.29687379,5.44
118277,359.86623505,-29.48516767,5.59
52742,161.73946741,-56.75719221,5.14
118281,359.87205182,33.72387779,5.81
19983,64.28374481,57.86035488,5.72
85520,262.16214482,-55.16968632,5.93
19990,64.31525283,20.57859097,4.93
19996,64.3300924,-6.47217752,5.95
85537,262.2068954,0.3306253,5.41
85543,262.23369642,-36.77828005,5.98
20020,64.41780159,-63.25540535,5.88
20049,64.49697361,-80.21403275,5.67
52827,162.02252944,-59.91916266,5.98
52841,162.05879911,-31.68785012,5.87
20075,64.56698763,-20.71525965,6.0
20087,64.59667564,21.57929684,5.64
52863,162.16898296,-1.95889567,5.92
85667,262.5991571,-1.06292171,5.31
52911,162.31429178,10.54520211,5.32
52922,162.35182191,-59.32379277,5.85
20156,64.80516403,50.04869508,5.46
20161,64.81956921,-44.26791929,5.33
85699,262.698285,86.96804735,5.78
20171,64.8587391,21.14230672,5.5
52948,162.43120269,-9.85269497,5.85
85715,262.73072367,31.15813862,5.63
20186,64.90294037,21.77349114,5.34
52965,162.48757429,-34.05818289,5.61
52980,162.57523422,-8.89776272,5.8
85749,262.83889138,2.72450684,5.57
85751,262.8470137,-56.92096415,5.99
20219,64.99043425,14.03520115,5.58
85755,262.85397499,-23.96264331,4.78
85760,262.86443667,-80.85913368,5.83
20234,65.0479698,50.92093298,5.55
20241,65.06012475,41.80806972,5.95
20250,65.0883987,27.35075361,4.97
20252,65.10265987,34.56672527,4.93
85790,262.95658059,28.40749878,5.66
20261,65.15129355,15.09545334,5.26
20264,65.16255613,-20.63962187,5.38
20266,65.16802237,65.14044145,5.26
53035,162.77253537,-3.09266719,5.95
20268,65.17185742,6.130798,5.76
20271,65.17847704,-7.59249348,5.85
85805,262.9911197,68.13502439,5.07
53043,162.79587316,56.58225004,5.66
85819,263.04404057,55.1842426,4.89
53064,162.84884839,59.32011925,5.57
20297,65.24194867,-81.57992035,5.78
20341,65.36266073,-0.09816957,5.86
85888,263.28024163,41.24344864,5.72
85889,263.28078726,-41.17306631,5.84
20354,65.38819502,46.4988779,4.8
20376,65.44854484,60.73562541,5.4
85912,263.3450992,19.25667721,5.65
20380,65.46585794,56.50631755,5.91
20384,65.47219466,-63.38639132,5.24
53154,163.12852238,-57.24040555,5.26
85922,263.37435359,-5.74480351,5.61
85930,263.41411877,16.31755321,5.68
20400,65.51465927,14.0771985,5.72
20417,65.59470757,20.82141589,5.91
20430,65.64559841,25.62931425,5.38
85998,263.65289466,9.58670003,5.8
20465,65.77363984,-24.89215684,5.81
86011,263.67705559,-32.5816618,5.69
86019,263.6931291,-11.24199905,5.54
20484,65.85442658,16.77725981,5.64
53252,163.37304867,-20.13873126,5.23
53257,163.37794438,69.85388101,5.91
20493,65.88486187,20.98204451,6.0
53261,163.393548,54.58512839,5.12
86036,263.74830845,61.87455394,5.23
53272,163.42532245,-70.72033664,5.99
53273,163.43213446,-2.12920503,5.45
20507,65.92021811,-3.74547033,5.17
20522,65.9659383,9.46096761,5.1
53295,163.49475762,43.189956,4.66
20542,66.02400423,17.44413026,4.8
53316,163.57407115,-13.75803566,5.65
86092,263.91495845,-46.5056839,4.56
53334,163.62334783,-61.82662225,5.95
20579,66.12147997,34.13075775,5.73
20591,66.1560941,33.95968652,5.77
53377,163.74241439,34.03479771,5.73
20614,66.23803343,19.04201331,5.97
20619,66.27223872,-61.23819356,5.94
53394,163.82175099,-60.51700334,5.93
86170,264.13680401,-38.63530828,4.26
20635,66.34235536,22.2938737,4.21
20641,66.35423116,22.19999802,5.27
86182,264.15689127,48.58563453,5.35
20648,66.37243249,17.92791025,4.3
53417,163.90332353,24.74971832,4.3
53423,163.9266547,0.7369224,5.91
53426,163.93493512,33.50692868,5.02
86201,264.23788371,68.75796966,4.77
53449,164.0061244,6.18537083,5.91
86219,264.2870155,72.45579421,5.87
20704,66.52629107,31.43891123,5.29
20711,66.57693136,22.81358255,4.28
86248,264.36380248,-50.05970227,5.89
20713,66.58642154,15.61826526,4.48
86254,264.37956096,24.30999148,5.76
86266,264.40085392,-15.57103812,5.94
20732,66.65155089,14.71378193,4.69
86284,264.46130363,-8.11877079,4.58
53530,164.28269699,-50.76501766,5.9
86305,264.52298502,-54.50043372,5.25
20776,66.7622583,80.82415938,5.42
86313,264.53960169,-10.92626776,5.74
20789,66.82269784,22.99633661,5.53
20804,66.86986896,11.2123,5.87
20825,66.94178419,-62.52120577,5.74
20842,67.00326498,21.61990692,5.72
20860,67.05530219,83.80779018,5.51
20873,67.09751196,14.74097429,5.9
20877,67.10987536,16.35967226,4.96
20884,67.13383172,1.38082076,5.53
20885,67.14373289,15.96218073,3.84
20892,67.16265745,-19.45887385,5.95
20901,67.20901684,13.0476024,5.02
20922,67.2788561,-13.04836956,5.61
53699,164.80725302,-33.73759504,5.7
86486,265.09927428,-49.41558665,4.76
53721,164.86655706,40.43025685,5.03
53723,164.87886586,-16.35370137,5.88
53726,164.8866143,36.09309993,5.99
20982,67.50151557,83.34037923,5.47
53762,164.99740918,-43.80711051,5.81
20995,67.53582507,15.6378405,5.58
53773,165.0385998,-42.22585865,4.37
53778,165.04872344,-14.08336831,5.86
53781,165.06126766,45.52627652,5.47
86552,265.31767035,-46.92182983,5.78
86561,265.34074301,51.81818181,6.0
21029,67.64013694,16.19401446,4.78
86565,265.35363893,-12.8753069,4.24
21036,67.65568103,13.72440227,5.4
21039,67.66204071,15.69187925,5.47
53807,165.14020255,3.61749404,4.84
86575,265.38467899,6.3131564,5.97
21042,67.66804354,-35.65350415,5.95
53824,165.1866767,6.10144936,4.98
53838,165.21008032,39.21209217,5.06
86614,265.48482361,72.14884347,4.57
86620,265.49210415,72.15691089,5.81
86623,265.49430835,15.95242979,5.54
86667,265.61817479,24.56405767,5.56
21139,67.96944698,-0.04401101,4.91
53907,165.45697703,-2.48458482,4.73
21148,68.00766596,53.91083011,5.78
86698,265.7129095,-36.94556454,5.53
53954,165.58239669,20.17984193,4.42
21192,68.15647223,-3.20954083,5.76
86731,265.83985043,24.32782154,5.73
86736,265.85747282,-21.68319399,4.86
86782,265.99656754,53.80171508,5.75
21247,68.3778275,72.52860478,5.94
21253,68.39145868,-62.82367752,5.79
86796,266.03626186,-51.83405301,5.12
54029,165.81199837,-11.30346957,5.51
21273,68.46215732,14.84442444,4.65
21278,68.47803408,-6.73890765,5.71
54049,165.90246771,-0.00083295,5.95
21295,68.53444548,5.56861606,5.67
21296,68.54845226,-8.23135239,5.2
21297,68.54904299,-8.97025763,5.24
86847,266.17504125,-42.72930245,5.87
21323,68.65829859,28.96115052,5.88
86871,266.23276494,-57.54553992,5.97
54137,166.13000481,-47.67910348,5.67
21402,68.913584,10.16078965,4.25
54173,166.22580794,-35.80467818,5.43
54182,166.25428061,7.33600733,4.62
54204,166.33294757,-27.29361236,4.92
21452,69.10082308,64.2616021,5.91
21476,69.1726226,41.26480803,4.25
21479,69.18996817,-62.07715439,5.59
54255,166.48987494,-27.28785339,5.69
87044,266.7835257,17.69701358,5.61
21515,69.30697237,0.99831413,5.32
87072,266.89010281,-27.83078848,4.53
87074,266.9032469,-14.72582391,5.93
21547,69.4005496,-2.47354823,5.22
54327,166.70787073,-70.87793034,5.58
54336,166.72586366,1.95552542,5.52
21588,69.53935407,16.03329069,5.78
21589,69.53942698,12.51083801,4.27
54360,166.81954551,-42.63868131,5.15
21594,69.54510028,-14.30401978,3.86
21604,69.56595752,20.68472222,5.85
87158,267.10320059,20.56544091,5.69
21644,69.72314537,-12.12312125,4.99
87194,267.20477802,25.62286856,5.09
21670,69.77565406,7.87097645,5.38
21673,69.7884039,15.79984564,5.08
87212,267.26785817,50.78107501,5.02
21683,69.81875764,15.91797673,4.67
87220,267.29365086,-31.70320353,4.79
21685,69.8321291,-14.35919211,5.46
54461,167.14166004,-61.94717476,5.11
87234,267.36263926,76.9628807,5.02
54477,167.18333063,-28.08067053,5.43
54487,167.20454419,24.65846458,5.7
21727,69.97783327,53.07953529,5.07
21730,69.99195325,53.47302066,5.36
21735,70.0142396,12.19760933,5.45
21743,70.02833922,-24.48236829,5.56
54522,167.32950037,36.30937897,5.71
87294,267.54630323,-40.09043487,4.78
21763,70.11046417,-19.67149284,4.32
54537,167.41041963,43.20773599,5.89
87308,267.59538584,29.32214306,5.51
87314,267.61830293,-53.61240615,5.68
54561,167.472473,-32.36752862,5.79
21819,70.33233566,28.61499392,5.73
21823,70.35053554,48.30088121,5.66
21847,70.45940195,38.28018222,5.97
87390,267.88555638,-40.77246136,5.94
87393,267.8977983,-60.16405623,5.78
21881,70.56125702,22.95692604,4.27
21914,70.69343174,-50.48133388,5.3
87460,268.05692273,-34.79919658,5.88
21928,70.72636135,43.36513795,5.3
87472,268.08234203,-34.41684225,5.84
21949,70.76651415,-70.93102736,5.53
87491,268.14768396,1.30501357,5.91
21958,70.78872184,-30.76555689,5.66
21972,70.83997399,49.97378898,5.86
54746,168.13773828,-49.10099614,5.37
21986,70.89477018,-8.79431701,5.98
54767,168.18836538,-64.16976981,5.22
87558,268.30910396,6.1014241,5.77
22024,71.02216938,-8.50357058,5.78
22028,71.03325764,-18.66658598,5.53
87563,268.32511583,40.00795947,5.17
87569,268.34780142,-34.89512471,5.58
22040,71.08813792,-59.73273311,5.28
54811,168.31118918,-44.37221614,5.77
22044,71.10761816,11.14613659,5.39
54829,168.37826033,-59.61931809,5.74
54840,168.41414038,-53.23181261,5.75
87616,268.47822244,-34.75272128,6.0
54849,168.43980008,-0.06950193,5.4
22086,71.26733841,-21.28338279,5.72
54863,168.50764182,8.0606955,5.79
22157,71.50725414,11.70559099,5.35
22176,71.57011995,18.73469274,5.99
54951,168.80095415,23.09550224,4.56
87728,268.79647083,72.00512678,5.43
87747,268.85495395,26.04999056,5.47
22220,71.68532772,40.31259017,5.99
87777,268.96171036,22.46422072,5.62
55016,168.96624936,13.30757811,5.31
22263,71.90121577,-16.93445603,5.49
87812,269.07667017,0.67035483,5.82
87813,269.07931436,-15.81252155,5.93
22287,72.00113806,56.75718336,5.29
87836,269.17433372,-28.06539356,5.76
87846,269.19759598,-44.34224611,4.85
87847,269.1989374,-4.08182342,5.44
55084,169.16542031,-3.65160104,4.45
55086,169.17437341,49.47625028,5.88
22325,72.13555403,-16.32948449,5.76
22336,72.15160693,-5.67404466,5.77
87875,269.26797863,0.06666488,5.95
22361,72.20980564,75.94121963,5.96
55137,169.32250147,2.01055585,5.18
22393,72.30352712,31.43737497,5.57
87936,269.44918828,-41.71629522,4.88
22407,72.32948838,32.58819079,5.84
22453,72.47765965,37.48827484,4.89
87998,269.6256225,30.18927677,4.41
88012,269.66270708,-28.75908869,5.99
22479,72.54840181,-16.21715883,5.03
55249,169.72899669,1.65039473,5.9
55266,169.78292083,38.18555675,4.76
88038,269.73203372,-36.85837571,5.74
55280,169.8184753,-64.58249071,5.99
88060,269.77200606,-30.25302496,5.0
22531,72.73045338,-53.46150774,5.58
22545,72.78885722,48.74068466,5.64
22565,72.84359342,18.83986122,5.08
88101,269.90318038,-4.82112631,5.86
22573,72.86756778,-34.90628652,5.82
88116,269.94813871,-23.81613352,4.74
88122,269.98419337,45.50137788,5.69
88128,270.01423371,16.75091902,4.67
88136,270.03843468,80.0040954,5.74
88149,270.06582758,4.36861526,4.79
22626,73.0217473,63.50542084,5.47
88175,270.12087728,-3.69026911,4.62
88192,270.16131566,2.93156761,3.93
22667,73.13317557,14.25064185,4.71
22678,73.15825132,36.70318691,4.79
22697,73.1963209,27.89748524,5.97
22699,73.1989863,42.58662618,5.68
22701,73.22362423,-5.45269507,4.36
22730,73.34488587,2.50822505,5.33
88267,270.3766986,21.59578242,4.26
88290,270.43832718,1.30507628,4.42
88298,270.47658613,-22.78029782,5.72
55560,170.70660064,43.48270299,4.99
88331,270.59603555,20.83363158,5.25
55581,170.78388176,-56.77935463,5.82
55588,170.80284646,-36.16476935,5.0
55597,170.83916782,-64.95471433,5.09
55598,170.84118303,-18.7799734,5.08
22833,73.69540365,11.42600649,5.18
22834,73.69908791,7.77909728,5.33
22840,73.7112843,0.46716657,5.98
88380,270.71290967,-24.28246777,5.37
22854,73.76302196,55.25910865,5.52
22860,73.77843208,-16.74066998,5.71
88404,270.77049855,-8.18034926,4.77
22871,73.79667354,-74.93685192,5.47
22881,73.82770524,-16.41776658,5.71
55650,171.00969638,1.40776545,5.39
55657,171.04636355,-72.25660787,5.55
22913,73.95897214,15.04027834,5.79
88469,270.96852033,-24.36073005,5.89
22936,74.02947644,52.86976107,5.75
55716,171.24552556,11.43029179,5.8
22958,74.10077468,-5.1713563,5.5
55756,171.372722,-36.06306236,5.21
55763,171.38790532,-37.74757549,5.87
55765,171.40155647,16.4565387,5.58
55779,171.42977593,-63.97247496,5.18
88550,271.20991532,-35.90144187,5.98
55797,171.48795635,55.85045922,5.73
88567,271.25510506,-29.5800874,4.66
23043,74.34308584,17.1536769,5.51
55831,171.64757397,-61.11516697,5.22
88601,271.36368986,2.50009948,4.03
23068,74.45269677,23.94856215,5.79
55849,171.69693753,-53.15991503,5.8
23088,74.53913863,25.05040555,5.79
88636,271.45671308,32.23067361,5.72
55874,171.7896524,-12.3567492,5.93
88657,271.50791797,22.21887928,4.96
88670,271.53083141,-8.32395567,5.84
23148,74.71235207,-82.47051254,5.84
88684,271.56332124,-4.75125187,5.74
88694,271.59883028,-36.01978856,5.94
23166,74.75568295,-16.37602687,5.65
55945,171.98433339,2.85626541,4.95
23179,74.81420672,37.89024467,4.93
88726,271.707884,-43.42521622,4.92
88745,271.75641339,30.56213958,5.05
23221,74.96021841,-10.26332504,5.39
88765,271.8265005,8.73386711,4.64
23231,74.98223836,-12.53741569,4.78
56000,172.14616551,-42.67420277,5.14
88771,271.83743427,9.56384719,3.71
88788,271.86974981,43.4618915,5.0
23261,75.07641266,39.39470095,5.95
23265,75.08633624,81.19408784,5.09
56034,172.26717462,39.33697448,5.3
56035,172.26901255,61.77836788,5.83
88816,271.95141919,-17.15415938,5.52
88817,271.95625976,26.09733957,5.79
88818,271.95650511,26.10128037,5.83
88836,272.00932674,36.40126403,5.49
88839,272.02074765,-28.45709305,4.55
56078,172.41089999,-24.46401116,5.77
56080,172.42435637,15.41326947,5.74
88886,272.18954555,20.81455696,4.37
56127,172.57872236,-3.00350053,4.77
23362,75.35658602,-20.05191838,4.91
23364,75.35976995,-7.17396548,4.8
88899,272.2202649,20.04523266,5.1
56146,172.62096155,18.40980153,5.54
56148,172.62971407,43.17324213,5.94
23408,75.45980428,0.72211174,5.91
88964,272.3912223,3.99327568,5.71
23430,75.54092425,-26.27502946,5.01
23446,75.59501962,-31.77133289,5.92
89000,272.47505626,3.11982653,5.67
89008,272.49581593,36.46628393,5.57
23474,75.68743051,-22.79505224,5.74
23475,75.68914486,-4.21012059,5.86
23482,75.70285908,-49.15140722,5.37
56250,172.95333258,-59.51564769,5.12
89020,272.52422487,-30.72866608,5.53
23497,75.7739472,21.58996241,4.62
89042,272.60901275,-62.00219747,5.47
56280,173.0683495,-29.26102254,4.93
89047,272.63183454,54.28655223,5.97
56287,173.08331792,-66.96182353,5.89
56290,173.08641605,61.08252044,5.46
89065,272.66791585,3.32425557,5.5
56318,173.19806955,-7.82752333,5.94
56319,173.20034039,-40.43619379,5.64
23554,75.97196597,-24.38815073,5.61
89099,272.77317266,-41.35911328,5.86
56332,173.22554373,-31.0872257,5.13
89115,272.81584098,-75.89150994,5.86
89153,272.93055404,-23.70123522,4.96
89156,272.93800435,33.44705699,5.98
56391,173.40499826,-40.5866374,5.39
89172,272.97565405,31.40534967,4.96
23649,76.24172658,-49.5778375,5.05
23668,76.317483,-26.15239077,5.71
56445,173.59145789,3.06016548,5.76
56452,173.62286277,-32.83133965,5.96
89234,273.14188349,-73.67241705,5.86
56473,173.67704789,16.79691495,5.95
56480,173.69023525,-54.26409123,4.62
56497,173.73687806,-49.13649014,5.5
23734,76.53521982,58.97237221,5.22
56510,173.7704493,54.78541888,5.63
56518,173.80534431,-47.37257977,5.64
89290,273.30290464,-41.33611092,5.47
23766,76.62377867,61.16975617,6.0
23783,76.66929484,51.59772034,4.98
56561,173.94535319,-63.01984158,3.11
23794,76.69021954,-4.65516319,5.12
56573,173.98160491,-47.64164272,5.26
89348,273.47430483,64.39728696,4.99
56583,174.01165125,69.32295251,5.19
23831,76.85401374,-12.4912695,5.97
56601,174.07480801,27.78135085,5.8
23835,76.8625253,18.64505209,4.91
89369,273.5662531,-21.71316395,5.49
56606,174.09318893,-61.05243308,5.84
23840,76.89178129,-63.39967892,5.19
56620,174.14560379,-33.57005728,5.71
23871,76.95165826,20.4183787,5.28
23879,76.97039079,8.49842889,5.33
56647,174.2372109,-0.82374868,4.3
23883,76.98098305,21.70482079,5.84
56656,174.25218591,-61.28344222,5.14
23900,77.02759748,24.26517479,5.5
89439,273.80378041,-20.72826976,5.29
89440,273.80404553,-20.38797398,5.96
56675,174.31514768,-75.89654386,5.64
89448,273.82115232,68.75580995,5.96
23916,77.08412539,-8.6653244,5.8
56700,174.39162786,-47.74730936,5.46
23941,77.18208035,-4.45620729,5.11
89482,273.9115711,42.15934543,5.56
89487,273.91923801,-63.05536625,5.58
56727,174.45157639,-67.62037903,5.94
89507,273.97270789,-44.20646066,5.45
23972,77.28659571,-8.75408096,4.25
23983,77.33184125,9.82957855,5.43
56754,174.53039693,-61.82656332,5.15
56770,174.58570798,43.62542859,5.56
24010,77.42481287,15.59723234,4.81
56779,174.61503182,8.13429851,5.24
24019,77.43788444,28.03046113,5.93
56802,174.66673637,-13.20194292,5.48
89587,274.22125595,-3.00740078,5.99
89605,274.28138278,-56.0233515,5.36
89609,274.29845051,-17.37388635,5.81
56862,174.87330432,-65.39776594,5.01
24109,77.67883284,46.96206999,5.67
89678,274.51329535,-27.04264123,4.66
56922,175.05328812,-34.74465977,4.7
24162,77.82990325,-2.49078242,5.89
24169,77.84529701,-11.84908878,5.6
24197,77.92318143,16.04567302,5.18
56970,175.17700623,-53.96860677,5.95
24203,77.93896231,1.03702762,5.88
56975,175.19611376,21.35272958,5.26
56986,175.22347484,-62.09010138,4.93
56997,175.26256384,34.20163549,5.31
89772,274.78973574,7.25976665,5.41
89773,274.79449984,24.44605934,5.3
24244,78.07459272,-11.86921875,4.45
57013,175.3324588,-43.09566688,5.54
24254,78.09357738,73.94667428,5.44
57029,175.39274676,31.74605794,5.73
57047,175.43311897,-32.4994036,5.2
89826,274.9654565,36.06454739,4.33
24294,78.20053766,-6.05719037,5.9
89851,275.03663632,-15.83169702,5.39
89861,275.07464419,21.96129679,4.92
24331,78.32283913,2.86126547,4.46
24340,78.35715692,38.48449794,4.82
57111,175.61817278,66.74490614,5.32
24372,78.43939254,-67.18525507,4.81
89918,275.21692964,3.37716521,4.85
89925,275.23737456,29.85892536,5.61
57165,175.86328021,-37.19015528,5.98
89935,275.25425094,28.8699538,5.12
57175,175.87996844,-62.48939579,5.0
24426,78.62019205,-35.97699618,5.75
89968,275.34577818,-18.8599994,5.76
24450,78.68353428,5.15615058,5.5
89981,275.38609675,49.12159355,5.02
90023,275.53625244,23.2851765,5.41
90037,275.57738554,-38.65689372,5.09
24504,78.85163722,32.68760021,5.01
24505,78.85155213,-26.94350871,5.06
90052,275.64716049,12.02967984,5.99
90067,275.7043339,17.82661627,5.25
90074,275.72115312,-36.66955566,5.33
24555,79.01722563,11.34135364,5.52
57328,176.32099986,8.25811933,4.84
90096,275.80067769,-12.01475532,5.71
24575,79.07562348,34.31231693,5.99
90124,275.87011093,-36.23798706,5.52
90133,275.9018684,-75.04427681,5.47
90135,275.91493522,-8.93438329,4.66
57371,176.43320334,-45.69013378,5.28
90139,275.92453998,21.76975206,3.85
90156,275.97752727,58.80073609,4.98
90191,276.0574402,39.50723875,5.11
24659,79.37120834,-34.89520756,4.81
90200,276.07600721,-44.11025611,5.24
57439,176.62842737,-61.17839852,4.11
24674,79.40162477,-6.84440942,3.59
57443,176.62946664,-40.50035391,4.89
24679,79.41767376,-13.51982564,5.48
57477,176.73176038,55.62819013,5.27
90260,276.25594139,-30.75657007,5.58
24727,79.5440374,33.37161284,4.54
24732,79.55515259,73.2680713,5.81
24738,79.56540451,42.79211104,5.55
57512,176.82975502,-57.69649852,5.42
90289,276.33766953,-20.54167899,4.81
90313,276.41166181,8.03200644,5.64
24786,79.71030085,-18.13005042,5.96
57562,176.97875158,8.24589485,5.31
57565,176.99639971,20.21893139,4.5
24799,79.75012031,33.74839374,5.38
90342,276.49494677,29.82893016,5.81
90344,276.49640884,65.56348048,4.82
24813,79.78531028,40.0990515,4.69
57581,177.06056259,-66.81491035,4.75
24817,79.79674571,2.59580646,5.34
24822,79.81917563,22.09649397,4.96
24829,79.8422288,-50.6059674,5.44
24831,79.84868696,-27.36888386,5.98
57606,177.1612854,14.28420986,5.9
57613,177.18784426,-26.74977722,5.1
24873,79.99593136,-12.31558519,5.29
24879,80.00383775,33.95805371,5.05
90414,276.72505131,-48.11724265,5.44
57669,177.42110152,-63.78847827,4.3
24902,80.06112383,41.08621224,5.46
57670,177.42381241,34.93175799,5.73
90441,276.80211842,0.19610846,5.2
24914,80.09421143,62.65371097,5.64
24927,80.11216036,-21.23976341,4.7
57696,177.48589142,-70.22579056,4.98
90485,276.95618242,-29.81686531,5.9
90497,276.9948876,6.19410386,5.71
57741,177.61365513,-62.64938114,5.68
25001,80.30286394,29.56988416,5.66
90541,277.11297411,-38.99567078,5.63
57791,177.75929723,-5.33333191,5.62
25028,80.38268143,-0.4164911,5.68
57803,177.78621542,-45.17347045,4.47
25041,80.43150113,8.4285562,5.78
25044,80.44061639,-0.38246516,4.72
25045,80.44272695,-24.77298153,5.06
25048,80.45173208,41.80457259,5.22
90606,277.33308605,-80.23270815,5.95
57841,177.92337377,-30.83480862,5.85
57851,177.96343775,-65.20591037,4.89
90637,277.39879341,23.86620171,5.87
57870,178.04283106,-56.98774142,5.56
90642,277.42074924,-1.98530781,5.38
25110,80.63971624,79.23114864,5.08
90647,277.43736664,77.54706794,5.65
90662,277.48309536,-47.22054578,5.69
90664,277.48640952,-57.52314333,5.74
25142,80.70833393,3.54445246,4.99
25143,80.70964521,41.02926041,5.54
90687,277.54943281,-18.72879424,5.63
25187,80.82712628,-8.41559518,5.99
25194,80.85010321,-39.67842334,5.73
25197,80.86601143,57.54439534,5.24
25202,80.87565198,-13.92735207,5.25
25223,80.92628878,-0.15981802,5.69
90762,277.76853518,16.92855586,5.76
90763,277.7701841,-32.98911449,5.37
25247,80.98678426,-7.80806458,4.13
90797,277.84343892,-62.27830197,4.63
90804,277.85705763,-10.79583621,5.77
90806,277.85956845,-18.4026975,5.12
25278,81.10609747,17.38353401,5.0
25280,81.11870729,-16.97578068,5.64
25282,81.1204506,-0.89132828,5.07
25291,81.16049729,31.14314791,5.94
25292,81.16309118,37.38534566,5.02
90830,277.93930374,-45.9148136,4.92
25302,81.18677733,1.84644465,4.89
90842,277.98426257,-43.50738268,5.71
90844,277.98747679,-1.00297739,5.93
58082,178.67724782,-25.71388748,5.26
90853,278.00810572,-45.75738197,5.07
25329,81.25726707,-10.32888694,5.6
58103,178.75004723,-63.27918021,5.89
58110,178.76305651,8.44394309,5.58
90887,278.08887918,-39.70400085,5.16
90905,278.1438443,57.04559904,4.77
90913,278.18050965,-14.86566249,5.47
90915,278.19231394,23.61680115,5.88
90923,278.20815801,30.55420884,5.47
58158,178.91721519,-28.47710282,5.93
58159,178.91889025,15.64681778,5.53
90930,278.23060016,-73.96559585,5.88
25397,81.49927144,-19.69539929,5.78
58181,178.99339944,56.59855974,5.83
25429,81.58028197,-58.9125204,5.14
90968,278.34638679,-38.72598555,5.67
90991,278.41258553,-14.85361449,5.74
91004,278.47285769,-24.0322826,5.49
25471,81.70334644,34.39180992,5.92
25473,81.70928488,3.09567448,4.59
91013,278.48623142,52.35351687,5.38
91014,278.49069341,-33.01655982,5.28
25488,81.77216893,-40.94350961,5.86
25492,81.78447075,30.20860309,5.69
25499,81.79205662,17.96221647,5.4
25539,81.90868809,21.93696527,4.88
25541,81.91202636,34.4758921,5.08
25555,81.94003547,15.87405219,5.52
58326,179.41669934,-62.44874839,5.59
91105,278.7599696,-10.97720631,5.12
25583,82.00671105,17.23912965,5.77
91118,278.80251074,18.20341015,5.79
91139,278.87665389,23.60553047,5.62
25608,82.0638984,-37.23076663,5.56
58379,179.56343546,-56.31731019,5.44
58427,179.69858625,-64.33956043,5.59
91217,279.11596832,9.12249123,5.38
58460,179.82307348,33.16700381,5.95
25695,82.31875058,25.15021515,5.47
91235,279.15559814,33.46903643,5.41
91237,279.16281139,6.67180528,5.43
25708,82.3486886,-3.44639371,5.8
25737,82.43325693,-1.09223896,4.71
58510,179.98713487,3.65519684,5.36
25751,82.47822515,1.78926021,5.77
25768,82.53949875,-47.07765472,5.46
25769,82.54250849,63.06722047,5.43
91315,279.38958583,62.52659062,5.74
91322,279.39983893,-0.30947231,5.76
25790,82.60902153,15.36044913,5.93
58576,180.18521444,-10.44601399,5.54
91347,279.4767753,-21.39772463,5.93
25813,82.69604907,5.94813905,4.2
25816,82.70271318,41.46199446,5.99
58587,180.21316494,-19.65898222,5.28
58590,180.21829228,6.61432243,4.65
25853,82.78177839,-20.86365911,5.53
25861,82.81055254,3.29213294,5.46
91405,279.62797972,-23.50489324,5.78
25887,82.90001691,-45.92531691,5.86
58654,180.41447124,36.04208556,5.59
91438,279.72250204,-21.05187112,5.85
58684,180.52828039,43.04560048,5.22
25918,82.97089829,-76.340964,5.18
25923,82.98274987,-7.30153704,4.62
91461,279.80955817,-47.90976745,5.84
25945,83.05312933,18.59423429,4.32
25950,83.05892516,17.05812808,5.5
58720,180.65705242,-69.19228781,5.89
91494,279.89649849,-43.18587823,5.42
25980,83.17230526,-1.59183113,5.34
25984,83.18197064,32.19202168,4.71
91525,279.97006026,52.19607551,6.0
58758,180.75625427,-63.31293012,4.32
25993,83.21422692,-38.51337151,5.45
91532,280.00161599,-7.79079854,5.82
26001,83.24820465,-64.22751731,5.34
26019,83.28078228,-35.1393761,5.75
58803,180.91487728,-42.43405656,5.15
26063,83.38102748,-1.15607281,5.36
26064,83.38179108,18.54023094,5.67
58858,181.06915879,21.45915255,5.89
26093,83.47618338,14.30557814,5.6
58867,181.08006469,-63.16571096,4.72
26108,83.51686455,-1.47025335,5.92
58884,181.16202138,-68.32891229,5.34
26126,83.56988721,3.7668951,5.32
58905,181.19362424,-76.5190609,5.04
58921,181.23840012,-60.96825207,5.95
26169,83.68659394,-73.74127669,5.79
26176,83.70515458,9.48957923,4.39
58952,181.31299084,76.90573364,5.78
26197,83.75419528,-6.00926993,5.67
26199,83.76117307,-6.00202702,4.78
26215,83.80516521,10.2400929,5.6
26219,83.81447813,-33.07972433,5.76
26220,83.81592671,-5.38731504,4.98
26221,83.81860638,-5.38969592,5.13
91755,280.65813956,55.53945722,5.03
26235,83.84542001,-5.41605966,4.98
26237,83.8465174,-4.83835783,4.58
26241,83.8582603,-5.90990135,2.75
26248,83.86304209,24.03958878,5.37
26268,83.91451758,-4.85606663,5.24
59050,181.59587791,-65.70945316,5.95
59072,181.7204145,-64.6137301,4.14
91845,280.8802198,-8.27521484,4.88
91854,280.9055771,-64.55142496,5.76
91875,280.94559142,-38.32344141,5.11
26344,84.14674026,54.42865852,5.74
26345,84.14872314,-6.06475163,5.71
91883,280.964965,31.92661292,5.68
26366,84.22661625,9.29067267,4.09
26382,84.26556585,17.04032437,5.53
59151,181.95781238,-75.36701895,5.17
91918,281.08066825,-35.64198667,4.86
26386,84.26826049,11.03500456,5.97
91926,281.09491775,39.61272155,4.59
26394,84.29121542,-80.46912192,5.65
26396,84.28685582,26.9244731,5.83
59173,182.02177064,-50.66127833,4.46
59184,182.06130175,-48.6924874,5.34
91973,281.20084994,37.59461485,5.73
91974,281.20667656,-25.01091405,5.82
91975,281.20807543,2.06003827,5.02
91989,281.23815163,-39.68618821,5.4
26460,84.43590756,-28.68969042,5.28
59229,182.22416765,-44.32598898,5.75
59232,182.22745306,-41.23160462,5.51
26487,84.50466286,7.54141958,5.87
92024,281.36208778,-64.87125918,4.78
92027,281.36818747,5.50012777,5.82
92043,281.41552259,20.54630774,4.19
59285,182.42212449,1.89788932,5.95
92056,281.4448648,74.08555278,5.25
26535,84.65822074,-6.5739587,5.96
26536,84.65868856,30.49241235,5.4
59309,182.51424147,5.80700798,5.72
26545,84.68135383,-40.70730651,5.81
26549,84.68653333,-2.60006888,3.77
92088,281.51866788,26.66212983,4.83
26563,84.72117914,-7.21282887,4.77
92111,281.58586941,-22.3921761,5.37
92112,281.5926483,75.43396413,5.37
92117,281.61914325,-0.96169252,5.89
26594,84.79644308,4.12146684,4.5
92133,281.67953324,52.98796032,5.91
92136,281.68051807,-10.12504804,5.69
26606,84.82630008,29.21521266,5.98
59384,182.74993897,81.70983258,6.0
26624,84.87979574,-3.56470434,5.99
59394,182.76599762,-23.60242256,5.45
92161,281.7553074,18.18151894,4.34
26640,84.93416238,25.89709109,5.18
26649,84.95766851,-32.62921597,5.44
92202,281.87062597,-5.70514696,5.38
92226,281.9359101,-40.40616681,5.2
59468,182.96323476,25.87028036,5.66
59501,183.03870978,20.54206383,5.6
26736,85.21131127,-1.12878734,4.95
59504,183.04975767,77.61624147,5.14
59517,183.09158267,-62.95077315,5.91
92294,282.15793838,-65.07767952,5.71
26762,85.27331504,0.33775349,5.93
92308,282.21037591,-43.68004746,5.46
92312,282.2224426,19.32872041,5.89
26777,85.323828,16.53414784,4.84
92367,282.36393445,-45.81010018,5.8
59607,183.35431963,-38.9291878,5.77
59608,183.35807694,10.26234107,5.85
92382,282.39581578,-43.43410181,5.6
92390,282.41710936,-20.32465604,5.22
92391,282.42064683,-5.91286256,5.99
92398,282.44130836,32.81282037,5.93
26865,85.55815948,-22.37371529,5.88
26868,85.56331056,-34.66781208,5.29
92405,282.47048652,32.55105772,5.22
26882,85.61019972,65.69764919,5.62
26885,85.61930036,1.47462889,4.9
59654,183.51123953,-45.72391939,5.31
26926,85.72464575,-6.79616764,5.97
92488,282.74378665,-9.77409554,5.82
59728,183.74826317,-20.8442198,5.82
26966,85.84029272,-18.55747532,5.73
92512,282.80039775,59.38835076,4.63
59746,183.78538163,70.20000795,5.72
92549,282.89557639,52.97511698,5.51
59819,184.00077619,14.89907059,5.09
59831,184.03145627,40.66018059,5.69
92614,283.0684505,21.42514188,5.43
59847,184.08557527,23.94540896,4.93
59856,184.12556927,33.0615267,4.99
92630,283.11346085,-46.59511911,5.51
92646,283.16517776,-52.10737024,5.18
59920,184.37333228,53.19133076,5.8
92689,283.30643961,50.70822149,4.92
59923,184.37739686,28.93718877,5.71
92728,283.43149845,36.97172123,5.58
27196,86.47516119,49.82625534,5.46
27204,86.49956252,-32.30643495,5.18
92747,283.5003819,-21.35984509,5.68
92761,283.54240472,-22.74483405,4.86
92768,283.55519662,27.90952818,5.64
60009,184.60936896,-64.00307078,4.06
27243,86.61405275,-46.59718043,5.31
92782,283.59939447,71.29719191,4.82
27249,86.62662742,56.11557506,5.93
27253,86.64546663,1.16819333,5.95
60030,184.66798999,-0.7871841,5.9
27265,86.68956956,15.82249706,6.0
60044,184.70826319,75.16056077,5.47
92814,283.67964103,-15.60303588,5.08
27280,86.71722823,9.52234276,5.78
92818,283.68702168,22.64507607,4.57
92822,283.69635593,48.85940109,5.84
92824,283.69640025,-87.60584353,5.29
60059,184.74898597,-55.14300207,5.01
92831,283.71740476,41.60272255,5.46
92833,283.71882028,33.96857615,5.99
92845,283.77975746,-22.67132807,5.0
27316,86.80479943,14.48832171,5.72
92862,283.83375551,43.9460885,4.08
92872,283.86435786,6.61528985,5.58
27338,86.85915063,17.72914106,5.47
92882,283.87919129,-16.37663466,5.56
60122,184.95295953,48.9841485,5.28
27364,86.92877898,13.8995995,5.28
27386,87.00097591,6.45415624,5.26
60157,185.04486704,-22.17570028,5.94
92931,284.00279892,-23.1737512,5.91
92937,284.02550531,18.10540994,5.69
60170,185.08198562,26.61948257,5.52
60172,185.08742032,3.31257412,4.97
92951,284.06101471,4.20213248,4.98
92953,284.07062977,-42.71067569,5.35
60189,185.14017317,-22.21590122,5.2
92969,284.10716122,65.25808363,5.62
60202,185.17927482,17.79286817,4.72
27435,87.14558649,-4.09464788,5.97
60212,185.21201069,57.8641181,5.54
60221,185.23213642,-13.56572406,5.14
92989,284.16873801,-37.34324095,5.36
92997,284.18771059,57.81485096,5.67
27468,87.25403003,24.5675349,4.88
93017,284.25671025,32.90127358,5.2
27483,87.29349215,39.18107112,4.51
93026,284.26529065,-5.84631367,4.83
60260,185.34003859,-60.4011467,3.59
27511,87.38721058,12.65132367,4.89
93051,284.31912766,2.53534635,5.56
27517,87.40225923,-14.48366552,5.49
93057,284.33531954,-20.65634594,5.02
27533,87.47291594,-22.97187168,5.87
27534,87.47300266,-66.90118696,5.1
60308,185.4892802,-56.37438547,5.91
27549,87.51118949,9.87121816,5.79
60320,185.53057887,-67.52210533,5.15
27560,87.55443716,4.42340597,5.96
60329,185.55012704,-68.30731574,5.73
27566,87.56993792,-79.36136262,5.46
93104,284.50790813,38.26618795,5.89
27581,87.62044257,14.30560796,5.54
60351,185.62630079,25.84616027,4.78
27588,87.62510707,2.02469995,5.97
93124,284.56144737,17.36091207,5.33
60379,185.70596323,-57.67613186,5.38
93148,284.61569332,-52.93862889,4.85
27621,87.72175357,-52.10887273,5.16
93163,284.65186652,-60.20054967,5.14
27629,87.74212407,27.96786145,5.6
93174,284.68073845,-37.107357,4.83
27639,87.76015574,37.30557296,4.72
93179,284.69551707,13.90664775,5.91
60425,185.83994174,-24.84066877,5.66
27658,87.8415992,-7.51800295,5.36
93203,284.77391889,13.6222449,5.27
27673,87.87249592,39.14848031,3.97
60449,185.89758302,-35.41267743,5.32
93225,284.84917453,-12.84051696,5.51
60463,185.93643251,-38.91138084,5.79
27713,88.03220371,-9.0419,5.95
60485,186.00622766,51.56225676,4.76
93256,284.93951837,26.2304045,5.26
27737,88.08417251,-57.15619119,5.93
27743,88.09288195,14.17178682,5.6
93279,285.00344017,32.14551421,4.94
60514,186.07717582,26.09860576,5.17
27747,88.09752371,19.86784871,5.96
27750,88.11016089,1.85513381,4.76
93287,285.01485245,-66.65361762,5.98
93299,285.05698909,50.5334665,5.39
27766,88.13827153,-37.63106312,5.62
93340,285.18106248,55.65830155,5.51
27810,88.27867158,-33.80136075,4.88
60584,186.2633683,56.77782798,5.82
60595,186.29902391,-11.61059019,5.95
27830,88.33185862,27.61226208,4.56
60610,186.34056213,-35.18641672,5.71
93393,285.32231951,26.29141121,5.69
93408,285.35988044,46.93481248,5.0
60646,186.46224376,39.01861603,5.01
60697,186.60026679,27.26823745,4.92
27938,88.68179395,-11.77419216,5.62
27939,88.68348643,0.96861501,5.99
60710,186.63232972,-51.45063539,4.82
27947,88.70871631,-52.63548078,5.29
27949,88.71159201,55.70694671,4.96
27955,88.71868455,-39.95785707,5.55
93498,285.61531735,-24.84682615,5.63
27965,88.73619497,19.74961403,5.92
60735,186.71537614,-32.83012078,5.56
27971,88.74094771,59.88836722,5.2
27973,88.7457895,31.70149565,5.9
60746,186.7470688,26.82569917,4.98
93526,285.7270772,-3.69898666,5.4
93537,285.7658545,-19.24568605,5.96
93542,285.7786518,-42.09510461,4.74
28010,88.87465485,-37.12066784,4.97
28011,88.87571393,-4.61654589,5.87
60781,186.87024708,-58.99175634,5.38
93552,285.82373455,-38.253147,5.73
60795,186.89626721,55.71272447,5.68
93574,285.87353914,-68.75554374,5.89
93580,285.88438672,1.81876786,5.82
28085,89.05946171,-22.83997545,5.95
60855,187.09360135,-39.04117207,5.45
93624,285.98982982,-51.01860365,5.93
28098,89.08726573,-31.38244043,5.52
28110,89.11681575,9.50939554,5.97
93667,286.10440461,-31.04707914,5.49
60904,187.22793616,25.91285158,5.29
28139,89.20604403,11.52105788,5.89
60941,187.36267581,24.10892524,5.47
93713,286.22985643,53.39665426,5.4
93717,286.24029862,-4.03142002,5.4
93718,286.24114646,31.74407174,5.63
60957,187.43016297,20.89610891,5.68
60969,187.47583446,-56.52494028,5.78
60978,187.48885262,58.40574231,5.37
60979,187.49119643,-41.73590066,6.0
93763,286.42158277,-15.66041861,5.93
60998,187.52773994,69.20112359,5.01
28237,89.49856601,25.95391186,4.81
61015,187.57269048,-23.69641863,5.63
28271,89.60184444,1.83710839,5.89
93815,286.58314114,-52.34091012,5.17
28287,89.65644542,-44.03456251,5.81
28296,89.70654952,0.55297945,5.21
28302,89.72181858,12.80826431,5.7
61071,187.75233513,24.56716768,5.47
93843,286.65722711,28.62859481,5.53
93845,286.65999241,24.25079305,5.78
93855,286.71715464,-16.22927621,6.0
28325,89.76796934,-9.55825019,5.04
93862,286.73169353,-48.29914452,5.95
93867,286.74417987,11.07122852,5.07
28343,89.84074839,49.92453993,5.9
93903,286.82553765,36.10015714,5.25
61136,187.91804071,-59.42392246,5.49
93917,286.85658637,32.50173824,5.2
61158,187.98381286,-63.50583787,5.96
28404,89.98374741,45.93673567,4.3
61174,188.01761238,-16.19600753,4.3
28413,90.0139559,-3.07425354,4.53
61181,188.04156822,-73.00105593,5.88
61212,188.14999363,-13.85910505,5.74
93996,287.06959389,-19.29028892,5.56
94013,287.10745233,52.42573068,5.88
28484,90.20487606,-51.21631955,5.65
28499,90.24400567,47.90192321,5.71
28524,90.31790806,-33.91183545,5.54
61296,188.39274515,-12.8302028,5.58
94068,287.24963402,6.07320675,5.23
61309,188.41216417,33.24758364,5.42
94083,287.29115861,76.56050217,5.11
61318,188.44478604,-9.45207741,5.48
28562,90.42941253,48.95944511,5.98
28574,90.46009056,-10.59793045,4.92
61379,188.67664301,-44.6730178,5.76
94150,287.47028378,-68.42444775,5.31
61384,188.68338897,70.02176987,4.95
94157,287.49022434,-41.89225602,5.86
61394,188.71283963,22.62925895,4.8
61418,188.78233209,18.37705781,5.03
61420,188.78403184,21.8813839,5.86
28675,90.81501733,-26.28454444,5.03
28691,90.86402644,19.69056101,5.14
61468,188.9397151,-41.02194474,5.12
61498,189.00429823,-39.86950517,5.78
28744,91.05625597,-6.7089414,5.19
28756,91.08444067,-32.17243044,5.65
94302,287.91905142,56.85921261,5.13
94311,287.94170374,31.28345592,5.93
28790,91.16708728,-45.07893163,5.93
61558,189.19731092,-5.8318984,5.88
94336,288.02095855,49.85575554,5.85
61571,189.24305134,17.08953595,5.7
28812,91.24242852,5.41996961,5.67
28814,91.24316696,4.15867108,5.63
28816,91.24637164,-16.48443483,4.92
28823,91.26410243,42.98163501,5.9
94385,288.16962975,-7.93951793,5.35
61621,189.42616117,-27.13888769,5.41
28854,91.36263451,-10.24259585,5.88
28855,91.36324523,-35.5136474,5.8
61622,189.42568082,-48.54130384,3.85
61658,189.59335693,1.8546621,5.68
94434,288.3069513,-25.90678623,5.79
28899,91.52307925,-29.7586236,5.79
94437,288.31468051,-12.28258372,5.51
28909,91.53909025,-66.03962084,5.72
61688,189.68588064,-18.25010005,6.0
94477,288.4279287,2.29370743,5.14
28943,91.63373588,-23.11084588,5.46
94481,288.43953147,39.1459682,4.43
28946,91.64624042,38.48264424,5.35
28949,91.66140133,-4.1938361,5.37
61720,189.76441026,-30.4223871,5.86
94490,288.47977509,57.70510165,5.0
61724,189.78045524,21.06255941,5.49
61740,189.81152882,-7.99556433,4.66
28984,91.73963818,-21.81229937,5.74
28991,91.76412331,-62.15458059,5.04
28992,91.7652938,-34.31202064,5.82
94556,288.66483987,-45.19352706,5.91
29034,91.88180321,-37.25292041,5.0
29048,91.92349197,-19.16586629,5.28
29064,91.97024538,-42.15404352,5.5
94620,288.82234138,21.23211845,5.65
94624,288.83370972,15.08365149,5.58
94630,288.85358237,30.52638144,5.88
94643,288.88511604,-25.25668251,4.86
94648,288.88773438,73.35546795,4.45
29134,92.18442446,-68.84340934,5.06
61910,190.3164699,-13.01390113,5.17
61916,190.34577184,-46.14558151,5.84
29150,92.24110369,-22.42741193,5.49
29151,92.24126418,2.49969231,5.7
94703,289.05433347,21.3904279,4.76
94712,289.09059277,-45.46603326,5.38
94713,289.09206275,38.13373077,4.35
94720,289.11161726,14.54461562,5.65
94727,289.12929845,4.83479546,5.59
61960,190.47106888,10.23562538,4.88
29196,92.3851548,22.19026207,5.93
61966,190.48570106,-59.68581953,4.91
61968,190.48798996,6.80661706,5.57
29205,92.3938511,-14.58461863,5.56
29225,92.43326963,23.11346618,5.75
29234,92.44984116,-22.77434294,5.71
62012,190.64771642,-48.81310872,4.66
29246,92.49589396,58.93569426,5.35
94789,289.30097111,-66.66104808,5.52
62027,190.70944006,-63.05862443,5.27
29263,92.54334962,-40.35379216,5.54
29276,92.5746206,-54.9686447,4.72
94820,289.40866411,-18.95290801,4.88
62058,190.78824797,-56.17622414,5.99
94827,289.43181759,23.02554007,5.46
29294,92.64450198,-27.15434319,5.72
94834,289.45416076,11.59542193,5.28
62103,190.9085423,-1.57699586,5.91
94885,289.63539751,1.08512891,5.1
29353,92.81242757,-65.58941744,5.01
62131,191.00221141,-28.32395681,5.46
29379,92.88460768,24.42025265,5.83
29388,92.90246332,48.71098893,5.78
29417,92.96589212,-6.55028721,5.06
29433,93.00558404,19.79054282,5.76
29434,93.01366463,16.13040608,4.95
62207,191.24752141,39.27891628,5.95
94982,289.91395036,12.37467975,5.53
29451,93.08384984,32.69337964,5.78
94986,289.91664181,-35.42145195,5.59
62223,191.28261241,45.44025619,5.42
29490,93.21276259,65.71842205,5.36
62267,191.40440814,7.67332578,5.22
62268,191.40854807,-60.98131821,4.69
95038,290.06681226,57.64512944,5.91
95066,290.13710279,-5.41576593,4.98
95073,290.14869363,-0.89216101,5.46
95077,290.15895532,-22.40253523,5.59
95081,290.16704983,65.71453144,4.6
62325,191.59393546,9.53968362,5.65
62327,191.59464379,-56.4888152,4.62
29575,93.4759737,-3.74137366,5.83
62356,191.66150388,16.57769139,5.12
62360,191.69261956,-33.3154827,5.87
29616,93.61909677,17.90635258,5.86
29629,93.65292854,-4.56845744,5.83
62402,191.82896234,62.78115465,5.88
95176,290.43176295,-15.95501757,4.52
29650,93.71198632,19.15644813,5.2
95188,290.46206487,-18.30838831,5.84
62423,191.89309904,66.79030428,5.43
29678,93.78529977,13.8510985,5.91
29679,93.78501077,-20.27218585,5.88
95222,290.58977124,-0.2523446,5.81
29692,93.82384512,-18.47716263,5.99
29696,93.84453777,29.49807609,4.32
29704,93.85469975,16.14317514,5.34
95241,290.65955207,-44.45896465,3.96
29711,93.87363793,-4.91471938,5.99
29716,93.8927712,-0.51218939,5.62
95260,290.71201613,26.26240313,5.22
95261,290.71335928,-54.42393063,5.03
29730,93.91892108,59.99897555,5.37
62500,192.10940847,-27.5973841,5.65
29735,93.93702565,-13.71841389,5.0
29736,93.93735132,12.55106693,5.44
62512,192.16443179,60.31982229,5.83
95294,290.80473701,-44.79977847,4.27
29771,94.0320452,-16.61800646,5.97
62541,192.22588987,14.1225838,5.71
62561,192.27782925,83.41783215,5.92
29800,94.11091508,12.27216306,5.04
62572,192.30690555,83.41290084,5.38
29807,94.13806515,-35.1405187,4.37
29808,94.14828215,-39.26439442,6.0
62576,192.32271347,27.55237893,5.76
95347,290.97156872,-40.61593993,3.96
95352,290.98542386,43.3881706,5.85
95372,291.03157856,29.62133757,4.99
62608,192.43737256,-71.98625969,5.55
29842,94.25512924,-37.73744555,5.54
29850,94.27758229,9.94239049,5.39
29852,94.28986852,-37.25349784,5.88
29860,94.31724025,5.10011184,5.7
62641,192.54475209,37.51693752,5.87
29895,94.42384802,-16.81590822,5.15
95447,291.24250148,11.94441552,5.17
62683,192.67152704,-33.99930252,4.9
29919,94.4784176,61.51528645,5.01
95456,291.26684251,-29.30935898,5.91
62703,192.74115564,-52.78742442,5.7
29941,94.55720049,-19.96697434,5.51
95477,291.31871418,-24.50857507,5.02
95485,291.33997436,-13.89713,5.72
95498,291.36918107,19.79836536,5.14
62732,192.82489801,-60.32978876,5.71
95503,291.37358265,-23.96245662,5.45
62763,192.92467322,27.54071249,4.93
29996,94.71076247,-9.39001835,5.36
30011,94.74573027,-20.92561099,5.79
62786,192.98720661,-39.6804307,5.99
95556,291.53802894,36.31789626,5.17
95557,291.54600857,-15.05325139,5.71
95560,291.55519226,20.09773254,5.6
95564,291.57981827,-21.77669291,5.57
95572,291.60056239,13.02380156,5.76
95582,291.61952947,19.89149302,5.84
95585,291.6295382,0.33857007,4.64
30069,94.92065172,-34.3965909,5.76
30073,94.92832662,-7.82290853,5.27
95619,291.73534181,-29.74322524,5.66
30093,94.99833381,-2.94449271,4.91
62861,193.2673581,-54.95247272,5.91
30099,95.01760007,14.65112701,5.67
62867,193.27877606,-48.94331472,4.33
62886,193.32393435,21.2449428,4.89
95656,291.85815829,52.3204356,5.73
30122,95.07830229,-30.0633673,3.02
62894,193.34122882,-60.32848863,5.75
62896,193.35916313,-40.17887163,4.25
30143,95.15099808,-34.14414448,5.55
95690,291.95048755,-54.32527229,5.7
62931,193.45383292,-60.3762445,5.89
95732,292.08665952,2.93003016,5.84
30214,95.35298026,-11.77323796,5.48
62983,193.57774768,-11.64857,6.0
62985,193.58818053,-9.5389944,4.77
63003,193.64843683,-57.17792409,4.03
63005,193.65369363,-57.16867044,5.08
63007,193.66325877,-59.14670123,4.62
30247,95.44220782,53.45217905,5.34
95785,292.2378462,24.7687227,5.82
63024,193.73550521,47.19672191,5.75
95793,292.25411763,1.95044755,5.79
63031,193.74504475,-85.12336863,5.45
63033,193.74380562,-44.1519678,5.89
95822,292.34231135,14.59601906,5.57
95823,292.34935701,-43.44519498,5.7
63066,193.83096436,-42.91573222,5.46
63076,193.86895263,65.43847359,5.23
30318,95.65163423,12.57023753,6.0
30321,95.65947681,-69.98404327,5.56
95865,292.46744547,-26.98561504,5.46
30342,95.73260958,-56.36996941,5.6
63117,193.98805953,-56.83580619,5.34
63121,194.00188427,38.31491242,5.61
63143,194.07318496,54.09948923,5.84
63165,194.13204023,-72.18521185,5.93
95937,292.66598928,-2.78888694,5.03
95951,292.68914756,27.96527652,5.12
30436,95.98298405,-25.57762938,5.61
63210,194.26813759,-51.19875207,5.17
30444,96.00420692,-36.70776389,5.62
30457,96.04300064,-11.53008787,5.21
30463,96.05767977,-60.28132508,5.78
95999,292.79570948,-68.43391975,5.98
96014,292.83054813,50.30670588,5.55
96016,292.84009004,26.61717129,5.89
96052,292.94300748,34.45296837,4.74
30520,96.22459464,49.287893,4.92
30545,96.31894142,-0.94588261,5.88
30565,96.36928656,-69.69029879,5.37
96100,293.08996173,69.6611754,4.67
63340,194.69722361,75.47250849,6.0
63355,194.73100938,17.40944558,4.76
30591,96.43188386,-48.17689832,5.76
96141,293.22425881,-53.18561773,5.76
96178,293.3400867,-45.27174848,5.59
63414,194.91465526,-3.81192582,5.79
30651,96.60765486,56.28509613,5.53
96198,293.42336159,49.26231871,6.0
63432,194.97946112,66.59727196,5.37
30666,96.66493823,-1.5073359,5.87
30679,96.70363786,58.41740916,5.21
96229,293.52230372,7.3789415,4.45
63462,195.06862833,30.78502125,4.88
96234,293.53535663,-40.03463823,5.89
30703,96.7671931,-58.00211606,5.82
30717,96.80733912,0.29924627,5.19
30720,96.81496414,-0.27599945,5.55
96258,293.58245908,51.23661978,5.71
63494,195.14977993,-3.36848778,5.99
30728,96.83521215,2.90828786,5.55
63503,195.18208282,56.36633783,4.93
96275,293.64540118,19.77340282,5.0
96288,293.6719137,42.41250862,5.34
63533,195.2900611,17.12314667,5.97
96302,293.71220307,29.4629544,5.39
30772,96.98987304,-4.7621544,5.06
30788,97.04253297,-32.58007055,4.47
96327,293.78023887,-10.56044383,5.12
96341,293.80411512,-48.09920159,4.88
30827,97.14203732,30.49303359,5.75
30836,97.15591533,-17.46600893,5.76
30840,97.16351262,-32.37127903,5.74
96406,294.00688893,-24.71908146,5.64
96441,294.11056248,50.22110266,4.49
63688,195.77224962,-71.47572908,5.93
96459,294.1582377,44.69493598,5.17
96465,294.17680514,-24.883623,4.59
30932,97.36874595,-56.85276588,5.2
96481,294.21855197,11.27320595,5.98
96483,294.22270556,-7.02747723,4.93
30953,97.45443845,-50.2390848,5.28
63724,195.88877523,-49.52726359,4.83
96496,294.26392119,-18.2310521,5.66
63738,195.94214718,-20.58349715,5.58
30972,97.51239348,46.68555384,5.88
96516,294.32247373,16.46280251,5.67
30986,97.54698363,-10.08151141,5.92
96536,294.39339105,-14.30180083,5.46
96556,294.44715718,-4.64763991,5.45
31037,97.69286783,-27.76957483,5.92
31039,97.69628396,58.16263323,5.86
31072,97.80456464,-35.25884033,5.82
31079,97.82631681,-51.82595295,5.58
31084,97.84602021,-12.39195265,5.16
96620,294.67159857,54.97379334,5.89
31119,97.95124549,11.54441184,5.22
31121,97.95859188,-8.15823501,5.43
31125,97.96402713,-23.41842159,4.34
96665,294.79850601,5.39777322,5.18
63901,196.43514992,35.79889865,5.2
31137,97.9929621,-58.75383492,5.69
63916,196.46778037,45.26854974,5.64
96683,294.84419004,30.15332117,4.68
96693,294.86035556,42.81827784,5.41
31159,98.08002204,4.85599911,5.88
31165,98.08911314,-37.69670193,5.25
31167,98.09637147,-5.86881988,5.6
31173,98.11326881,32.45489801,5.82
63945,196.569601,-48.46328926,4.71
63948,196.58849943,21.15339688,6.0
63950,196.59417918,22.61618682,5.53
31190,98.16240194,-32.0304468,5.73
63972,196.64617462,-41.58844273,5.59
96760,295.02985753,-23.42908567,5.97
64003,196.72605922,-35.86203319,5.63
64004,196.72766365,-49.90624607,4.27
64022,196.79470733,27.62474093,4.8
64033,196.85123488,-59.8605097,5.98
96807,295.18050094,-0.62123323,5.64
96808,295.18076475,-16.29326756,5.3
31277,98.40068469,14.15516326,5.57
31278,98.40800834,-1.22015351,5.09
64053,196.90951823,-53.45976424,5.7
96825,295.20909781,45.52494199,5.06
31299,98.45616772,-36.23202924,5.42
96840,295.27303453,13.81568165,5.98
64078,196.97421837,-10.74040808,5.15
64094,197.02979779,-65.30602283,5.44
64122,197.13527764,-8.98438514,5.57
96895,295.45397281,50.52506025,5.99
31362,98.64721326,-32.71625457,5.62
64166,197.26362639,-23.11806973,4.94
31407,98.74408309,-52.975607,4.35
64179,197.30181613,10.0224683,5.79
96950,295.62972399,-16.12399635,5.06
31416,98.76411763,-22.96479303,4.54
96957,295.64170549,11.8265829,5.28
31434,98.80025638,28.02231371,5.26
96977,295.6858584,32.42674142,5.93
31446,98.81594789,0.89021638,5.78
31448,98.82331955,9.98833531,5.93
64224,197.43866437,-10.32932661,5.95
31457,98.85090914,-36.77987945,5.59
64226,197.44936467,16.84861149,5.91
64246,197.51339861,38.49898127,5.91
97063,295.88970937,-15.47010548,5.49
97077,295.92885488,25.77192859,5.5
97081,295.93790338,41.77310845,5.86
31564,99.09521,-18.65990366,5.71
64332,197.78700265,-42.23289129,5.78
31579,99.13681827,38.44550006,5.4
64348,197.84673181,-43.36855307,5.24
97118,296.06918701,37.35435508,4.89
31583,99.14721669,-5.21114314,5.52
97122,296.07673388,69.33706468,5.9
31599,99.19416295,-13.32103582,5.95
64390,197.96433787,-69.94201668,5.92
31637,99.30764436,-36.99065085,5.72
64407,198.01476264,-16.19860153,5.04
64408,198.0132685,-37.80302179,4.85
64425,198.07331699,-59.92057895,4.58
31665,99.40995432,56.85753098,5.87
31676,99.42244098,61.48123297,5.94
64445,198.13717226,11.55609605,5.76
31688,99.44841227,-32.33973479,5.25
97229,296.41644774,7.61315808,5.89
64466,198.20334548,-66.22674699,5.91
31700,99.47259046,-18.23747772,4.42
97260,296.50507059,-31.9085714,5.51
31737,99.59586146,28.98435357,5.76
64515,198.34729859,-50.69982887,5.9
97290,296.59058063,-19.76111311,4.87
97295,296.60666696,33.72759764,5.0
31765,99.65681639,-48.22018309,5.05
31771,99.66473993,39.39085404,5.7
64540,198.42892358,40.15288533,4.94
31789,99.70491759,39.90255877,5.34
64577,198.54539617,-19.93094659,5.31
64580,198.55036527,-58.68393657,5.91
64583,198.56310217,-59.10323522,4.9
64587,198.57221676,-78.44745396,5.84
31827,99.81966316,-14.14576374,4.82
31832,99.83260944,42.48887688,4.8
64607,198.63034859,11.33165633,5.64
97376,296.86574821,38.40761389,5.83
64623,198.68027747,-48.9570225,5.84
97402,296.95225356,25.38405839,6.0
31870,99.92775298,-30.47049071,5.7
31876,99.9488183,12.98276822,5.99
97421,297.00499561,-56.36261151,5.33
64661,198.81225236,-67.89458914,4.79
31897,100.01204212,-80.81359263,5.61
64692,198.88313472,40.85519935,5.77
97473,297.17523982,11.81589634,5.75
31940,100.12032172,77.99578247,5.75
31946,100.13438247,71.74878589,5.88
64725,198.9948806,-19.94310297,5.21
97496,297.24441613,19.1420424,5.01
97499,297.25918329,-10.87076339,6.0
31992,100.27266964,0.49532315,5.79
97534,297.3554428,-72.50337842,5.39
64792,199.19381485,9.42415651,5.19
64803,199.22139531,-31.50619645,5.1
64820,199.30421831,-66.78343804,4.86
64822,199.30799895,-43.97947958,5.82
64823,199.31511763,13.67575121,5.33
97598,297.55858176,-47.5573919,5.91
32064,100.48494554,-9.16753661,5.21
64844,199.38558588,40.57260759,4.72
64852,199.4011779,5.46986933,4.78
97630,297.6416496,38.72241938,5.18
97634,297.65553123,40.59975936,5.68
97635,297.65718237,52.98800132,5.03
32104,100.6013618,17.64530307,5.2
97646,297.6866796,-59.19366683,5.41
97650,297.69493251,-10.76351163,5.38
64906,199.56045992,49.68206239,5.14
97675,297.75684431,10.41572697,5.12
97679,297.76711829,22.61004629,4.9
64924,199.60131085,-18.31119618,4.74
64927,199.61553346,34.09830367,5.81
32173,100.77071436,44.52444991,5.04
97749,297.96085286,-39.87436734,5.32
97757,297.99612216,47.02733897,5.6
32226,100.91102307,3.93252783,5.88
97765,298.00664168,24.99216201,5.54
97774,298.02985867,47.93179472,5.91
97783,298.05001477,-19.04499128,5.88
32249,100.99705285,13.22801729,4.49
97816,298.15717895,-54.9710258,5.76
32292,101.11861215,-31.0705227,5.23
65072,200.07896443,40.15054794,5.6
32311,101.18941202,28.97093164,5.42
97870,298.3224057,57.52348186,5.14
97871,298.32806575,-3.11446372,5.63
65112,200.15760353,-52.74782498,5.47
65129,200.20141301,-55.80068826,6.0
32366,101.34558198,-31.79366094,5.92
65144,200.24041545,-46.88000771,5.76
32385,101.3799528,-30.94898055,5.62
97928,298.53448838,-8.574211,5.76
32402,101.47382449,-52.40969129,5.81
97938,298.5620066,8.46145271,4.71
32411,101.49747737,-14.79612726,5.3
97961,298.62948485,24.31938849,5.56
65198,200.42351235,2.08724324,5.69
97966,298.65688499,-8.22728863,5.7
32438,101.55888293,59.44167001,4.86
32439,101.55896087,79.56481097,5.44
97980,298.68665422,0.27362751,5.6
97985,298.70104514,36.99567607,5.79
32463,101.63506596,8.58715267,5.92
65241,200.54037208,5.15476433,5.89
32474,101.66256946,-10.10736009,5.66
65247,200.5678565,-52.18295639,5.81
32480,101.68474499,43.57742706,5.24
32489,101.70628931,57.16917622,5.34
32492,101.71288292,-14.4259708,5.28
32494,101.7194718,-51.26566708,5.39
98032,298.81540582,-41.86828808,4.12
65271,200.65807108,-60.988393,4.52
98055,298.90744681,52.43894787,4.91
98066,298.95982398,-26.29950635,4.7
32531,101.82795433,-55.53998822,5.6
98068,298.96567625,38.48670538,4.95
32533,101.83262738,8.03725399,4.77
65301,200.75464431,-17.7352737,5.36
32537,101.83916434,-37.92969815,5.27
98073,298.98074231,58.84596912,4.98
98085,299.00526654,16.63479915,5.71
65323,200.82872415,-4.92442737,5.88
32558,101.90508797,-8.99850257,5.08
32562,101.91490037,48.78947643,5.22
98103,299.05938319,11.42372089,5.28
98110,299.0765497,35.08342371,3.89
32609,102.051217,55.70419499,5.54
32617,102.07944127,-1.31892245,5.75
65387,201.00201188,-64.53566793,4.52
98162,299.23679661,-27.16989884,4.54
98174,299.27629174,-58.90135155,5.24
65420,201.13845338,-5.1640102,5.76
98194,299.30778315,40.36782391,5.46
32677,102.24057487,-15.14472559,5.39
32698,102.31837083,-2.27203835,5.75
65466,201.27782704,23.85441857,5.75
65468,201.27965886,-74.88781838,5.04
98234,299.43935674,16.78916315,5.54
65477,201.30640816,54.98795767,3.99
65479,201.3080283,-64.48514427,5.32
98258,299.48762968,-15.4914902,5.01
32740,102.42212909,32.60675579,5.72
32753,102.45765123,16.2028878,5.87
65522,201.4595884,-70.62724814,5.65
32759,102.46024639,-32.5084777,3.5
32761,102.46380782,-53.62244951,4.41
32765,102.47756897,-46.61456012,5.14
65535,201.5323613,-39.75510736,5.11
"""
|
#!/usr/bin/env python
#
# sub20_to_binary.py - Python code to pack SUB-20 output as binary event data
# (to make use of STEIN data collected via the SUB20 interface)
#
#
# Usage:
# log.log - data collected via SUB-20
# binary.log - binary-packed event data, created from "log.log" via the python script "sub20_to_binary.py"
# binary.txt - unpacked event data, created from ..binary.log
# via the usual C++ rawstein_extract code
#
# >>> import sub20_to_binary as sub20
# >>> bin = sub20.read_sub20_hexbytes("log.log")
# >>> sub20.write_sub20_hexbytes(data=bin, filename="binary.log")
#
# Author:
# Karl Yando
#
#########################################
# Copyright 2013 Karl Yando
#
# 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 array
import csv
import ctypes
import binascii
PyLong_AsByteArray = ctypes.pythonapi._PyLong_AsByteArray
PyLong_AsByteArray.argtypes = [ctypes.py_object,
ctypes.c_char_p,
ctypes.c_size_t,
ctypes.c_int,
ctypes.c_int]
def packl_ctypes(lnum):
a = ctypes.create_string_buffer(lnum.bit_length()//8 + 1)
PyLong_AsByteArray(lnum, a, len(a), 0, 1)
return a.raw
def packl(lnum, padmultiple=1):
"""Packs the lnum (which must be convertable to a long) into a
byte string 0 padded to a multiple of padmultiple bytes in size. 0
means no padding whatsoever, so that packing 0 result in an empty
string. The resulting byte string is the big-endian two's
complement representation of the passed in long."""
if lnum == 0:
return b'\0' * padmultiple
elif lnum < 0:
raise ValueError("Can only convert non-negative numbers.")
s = hex(lnum)[2:]
s = s.rstrip('L')
if len(s) & 1:
s = '0' + s
s = binascii.unhexlify(s)
if (padmultiple != 1) and (padmultiple != 0):
filled_so_far = len(s) % padmultiple
if filled_so_far != 0:
s = b'\0' * (padmultiple - filled_so_far) + s
return s
# procedure to read in ASCII text dumps of full-resolution (32-bit)
# STEIN data, collected via the SUB-20 interface
def read_sub20_hexbytes(filename=None, dialect="whitespace"):
# do we have a valid filename?
try:
f = open(filename, 'rU')
except IOError as errno:
print("read_sub20_hexbytes: Invalid filename or path")
print("I/O error({0}):".format(errno))
else:
# use the CSV reader to simplify the process
reader = csv.reader(f,dialect=dialect)
lines = []
# examine and parse each record
for row in reader:
# SUB20-generated logs consist of 4 hexbytes printed with
# ASCII characters, followed by an ASCII gloss
# e.g.
# 80 00 00 00 | ....
# 40 00 00 00 | @...
hexbyte_list = []
if len(row) > 0: # actual data; begin parsing
for hexbyte in row[0:4]:
# convert ASCII hexbytes to real hexbytes
hexbyte_list.append(int(hexbyte,16))
# pack the event in binary format
binary = (hexbyte_list[0] << 24) + (hexbyte_list[1] << 16) + (hexbyte_list[2] << 8) + (hexbyte_list[3] << 0)
lines.append(binary)
# else: an empty row; do nothing
finally:
f.close()
return lines
def write_sub20_hexbytes(data, filename=None):
try:
f = open(filename, 'wb')
except IOError as errno:
print("write_sub20_hexbytes: Invalid filename or path")
print("I/O error({0}):".format(errno))
else:
for i in data:
f.write(packl(i, padmultiple=4))
finally:
f.close()
csv.register_dialect("whitespace", delimiter=' ', skipinitialspace=True)
|
"""
Initializes the database of cea
"""
# HISTORY:
# J. A. Fonseca script development 03.02.20
import cea.config
import cea.inputlocator
import os
from distutils.dir_util import copy_tree
__author__ = "Jimeno A. Fonseca"
__copyright__ = "Copyright 2015, Architecture and Building Systems - ETH Zurich"
__credits__ = ["Jimeno A. Fonseca", "Daren Thomas", "Martin Mosteiro"]
__license__ = "MIT"
__version__ = "0.1"
__maintainer__ = "Daren Thomas"
__email__ = "[email protected]"
__status__ = "Production"
def data_initializer(locator,
databases_path,
initialize_archetypes_database=True,
initialize_components_database=True,
initialize_assemblies_database=True,
):
output_directory = locator.get_databases_folder()
print("Copying databases from {source}".format(source=databases_path))
print("Copying databases to {path}".format(path=output_directory))
if initialize_archetypes_database:
complete_databases_path = os.path.join(databases_path, 'archetypes')
complete_output_directory = locator.get_databases_archetypes_folder()
os.makedirs(complete_output_directory, exist_ok=True)
copy_tree(complete_databases_path, complete_output_directory)
if initialize_components_database:
complete_databases_path = os.path.join(databases_path, 'components')
complete_output_directory = locator.get_databases_systems_folder()
os.makedirs(complete_output_directory, exist_ok=True)
copy_tree(complete_databases_path, complete_output_directory)
if initialize_assemblies_database:
complete_databases_path = os.path.join(databases_path, 'assemblies')
complete_output_directory = locator.get_databases_assemblies_folder()
os.makedirs(complete_output_directory, exist_ok=True)
copy_tree(complete_databases_path, complete_output_directory)
def main(config):
"""
Run the properties script with input from the reference case and compare the results. This ensures that changes
made to this script (e.g. refactorings) do not stop the script from working and also that the results stay the same.
"""
print('Running data-intializer with scenario = %s' % config.scenario)
print('Running data-intializer with databases located in = %s' % config.data_initializer.databases_path)
locator = cea.inputlocator.InputLocator(config.scenario)
initialize_archetypes_database = 'archetypes' in config.data_initializer.databases
initialize_components_database = 'components' in config.data_initializer.databases
initialize_assemblies_database = 'assemblies' in config.data_initializer.databases
data_initializer(locator=locator,
databases_path=config.data_initializer.databases_path,
initialize_archetypes_database=initialize_archetypes_database,
initialize_components_database=initialize_components_database,
initialize_assemblies_database=initialize_assemblies_database
)
if __name__ == '__main__':
main(cea.config.Configuration())
|
import torch
import torch.distributed as dist
from multiprocessing.pool import ThreadPool
class Reducer(object):
def __init__(self):
super(Reducer, self).__init__()
self._data_cpu = {}
self._pool = None
self._handles = []
self._stream = None
def init(self, model):
cnt = 0
for i, (name, param) in enumerate(model.named_parameters()):
cnt += 1
self._data_cpu[name] = (torch.zeros_like(param.data, pin_memory=True, device='cpu'), dist.new_group())
self._pool = ThreadPool(processes=cnt)
self._stream = torch.cuda.Stream()
def reduce(self, param, name, data, n_train):
def create_stream():
self._stream.wait_stream(torch.cuda.current_stream())
with torch.cuda.stream(self._stream):
data.div_(n_train)
data_cpu, group = self._data_cpu[name]
data_cpu.copy_(data)
dist.all_reduce(data_cpu, op=dist.ReduceOp.SUM, group=group)
param.grad.copy_(data_cpu, non_blocking=True)
self._handles.append(self._pool.apply_async(create_stream))
def synchronize(self):
for handle in self._handles:
handle.wait()
self._handles.clear()
torch.cuda.current_stream().wait_stream(self._stream)
|
from spacy.matcher import Matcher
pattern_amounts = [{'LOWER': 'payment'}, {'LOWER': 'information'}, {'IS_PUNCT': True}]
pattern_singleDay = [{'LOWER': 'date'}, {'LOWER': 'of'}, {'LOWER': 'transaction'}, {'IS_PUNCT': True}]
pattern_date = [{"label": "DATE", "pattern": [{'IS_TITLE': True}]}]
def find_dates(nlp, doc, ruler, extracted_data):
interval_payment = True
matcher = Matcher(nlp.vocab)
matcher.add("amount", [pattern_amounts])
matcher.add("single_day", [pattern_singleDay])
ruler.add_patterns(pattern_date)
matches = matcher(doc)
for match_id, start, end in matches:
string_id = nlp.vocab.strings[match_id]
if string_id == 'single_day':
interval_payment = False
if not interval_payment:
extracted_data['intervalPayment'] = False
extracted_data['interval'] = 1
extracted_data['duration'] = 1
extracted_data['single_day'] = True
for match_id, start, end in matches:
string_id = nlp.vocab.strings[match_id]
token_window = doc[end + 1:end + 22]
for ent in token_window.ents:
if ent.label == 391 and string_id == 'amount':
extracted_data['transDate'] = ent.text
return extracted_data
else:
extracted_data['intervalPayment'] = True
extracted_data['interval'] = 1
extracted_data['duration'] = 12
extracted_data['single_day'] = False
return extracted_data
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
# sources: steammessages_useraccount.proto
# plugin: python-betterproto
from dataclasses import dataclass
from typing import List
import betterproto
class EInternalAccountType(betterproto.Enum):
SteamAccountType = 1
ClanType = 2
AppType = 3
BroadcastChannelType = 4
class EExternalAccountType(betterproto.Enum):
NONE = 0
SteamAccount = 1
GoogleAccount = 2
FacebookAccount = 3
TwitterAccount = 4
TwitchAccount = 5
YouTubeChannelAccount = 6
FacebookPage = 7
@dataclass
class CUserAccountGetAvailableValveDiscountPromotionsRequest(betterproto.Message):
country_code: str = betterproto.string_field(1)
@dataclass
class CUserAccountGetAvailableValveDiscountPromotionsResponse(betterproto.Message):
promotions: List[
"CUserAccountGetAvailableValveDiscountPromotionsResponseValveDiscountPromotionDetails"
] = betterproto.message_field(1)
@dataclass
class CUserAccountGetAvailableValveDiscountPromotionsResponseValveDiscountPromotionDetails(betterproto.Message):
promotionid: int = betterproto.uint32_field(1)
promotion_description: str = betterproto.string_field(2)
minimum_cart_amount: int = betterproto.int64_field(3)
minimum_cart_amount_for_display: int = betterproto.int64_field(4)
discount_amount: int = betterproto.int64_field(5)
currency_code: int = betterproto.int32_field(6)
available_use_count: int = betterproto.int32_field(7)
promotional_discount_type: int = betterproto.int32_field(8)
loyalty_reward_id: int = betterproto.int32_field(9)
localized_name_token: str = betterproto.string_field(10)
max_use_count: int = betterproto.int32_field(11)
@dataclass
class CUserAccountGetAccountLinkStatusRequest(betterproto.Message):
pass
@dataclass
class CUserAccountGetAccountLinkStatusResponse(betterproto.Message):
pwid: int = betterproto.uint32_field(1)
identity_verification: int = betterproto.uint32_field(2)
performed_age_verification: bool = betterproto.bool_field(3)
@dataclass
class CUserAccountCancelLicenseForAppRequest(betterproto.Message):
appid: int = betterproto.uint32_field(1)
@dataclass
class CUserAccountCancelLicenseForAppResponse(betterproto.Message):
pass
@dataclass
class CUserAccountCreateFriendInviteTokenRequest(betterproto.Message):
invite_limit: int = betterproto.uint32_field(1)
invite_duration: int = betterproto.uint32_field(2)
invite_note: str = betterproto.string_field(3)
@dataclass
class CUserAccountCreateFriendInviteTokenResponse(betterproto.Message):
invite_token: str = betterproto.string_field(1)
invite_limit: int = betterproto.uint64_field(2)
invite_duration: int = betterproto.uint64_field(3)
time_created: int = betterproto.fixed32_field(4)
valid: bool = betterproto.bool_field(5)
@dataclass
class CUserAccountGetFriendInviteTokensRequest(betterproto.Message):
pass
@dataclass
class CUserAccountGetFriendInviteTokensResponse(betterproto.Message):
tokens: List["CUserAccountCreateFriendInviteTokenResponse"] = betterproto.message_field(1)
@dataclass
class CUserAccountViewFriendInviteTokenRequest(betterproto.Message):
steamid: int = betterproto.fixed64_field(1)
invite_token: str = betterproto.string_field(2)
@dataclass
class CUserAccountViewFriendInviteTokenResponse(betterproto.Message):
valid: bool = betterproto.bool_field(1)
steamid: int = betterproto.uint64_field(2)
invite_duration: int = betterproto.uint64_field(3)
@dataclass
class CUserAccountRedeemFriendInviteTokenRequest(betterproto.Message):
steamid: int = betterproto.fixed64_field(1)
invite_token: str = betterproto.string_field(2)
@dataclass
class CUserAccountRedeemFriendInviteTokenResponse(betterproto.Message):
pass
@dataclass
class CUserAccountRevokeFriendInviteTokenRequest(betterproto.Message):
invite_token: str = betterproto.string_field(1)
@dataclass
class CUserAccountRevokeFriendInviteTokenResponse(betterproto.Message):
pass
@dataclass
class CUserAccountRegisterCompatToolRequest(betterproto.Message):
compat_tool: int = betterproto.uint32_field(1)
@dataclass
class CUserAccountRegisterCompatToolResponse(betterproto.Message):
pass
@dataclass
class CAccountLinkingGetLinkedAccountInfoRequest(betterproto.Message):
account_type: "EInternalAccountType" = betterproto.enum_field(1)
account_id: int = betterproto.uint64_field(2)
filter: "EExternalAccountType" = betterproto.enum_field(3)
return_access_token: bool = betterproto.bool_field(4)
@dataclass
class CAccountLinkingGetLinkedAccountInfoResponse(betterproto.Message):
external_accounts: List[
"CAccountLinkingGetLinkedAccountInfoResponseCExternalAccountTupleResponse"
] = betterproto.message_field(1)
@dataclass
class CAccountLinkingGetLinkedAccountInfoResponseCExternalAccountTupleResponse(betterproto.Message):
external_type: "EExternalAccountType" = betterproto.enum_field(1)
external_id: str = betterproto.string_field(2)
external_user_name: str = betterproto.string_field(3)
external_url: str = betterproto.string_field(4)
access_token: str = betterproto.string_field(5)
access_token_secret: str = betterproto.string_field(6)
is_valid: bool = betterproto.bool_field(7)
@dataclass
class CEmbeddedClientAuthorizeCurrentDeviceRequest(betterproto.Message):
steamid: int = betterproto.fixed64_field(1)
appid: int = betterproto.uint32_field(2)
device_info: str = betterproto.string_field(3)
deviceid: int = betterproto.uint32_field(4)
@dataclass
class CEmbeddedClientToken(betterproto.Message):
steamid: int = betterproto.fixed64_field(1)
client_token: bytes = betterproto.bytes_field(2)
expiry: int = betterproto.uint32_field(3)
deviceid: int = betterproto.uint32_field(4)
@dataclass
class CEmbeddedClientAuthorizeDeviceResponse(betterproto.Message):
result: int = betterproto.uint32_field(1)
token: "CEmbeddedClientToken" = betterproto.message_field(2)
|
class MinHeap:
def __init__(self, capacity):
self.storage = [0] * capacity
self.capacity = capacity
self.size = 0
def get_parent_index(self, index):
return (index - 1) // 2
def get_left_child_index(self, index):
return 2 * index + 1
def get_right_child_index(self, index):
return 2 * index + 2
def has_parent(self, index):
return self.get_parent_index(index) >= 0
def has_left_child(self, index):
return self.get_left_child_index(index) < self.size
def has_right_child(self, index):
return self.get_right_child_index(index) < self.size
def parent(self, index):
return self.storage[self.get_parent_index(index)]
def left_child(self, index):
return self.storage[self.get_left_child_index(index)]
def right_child(self, index):
return self.storage[self.get_right_child_index(index)]
def is_full(self):
return self.size == self.capacity
def swap(self, index1, index2):
temp = self.storage[index1]
self.storage[index1] = self.storage[index2]
self.storage[index2] = temp
def insert(self, data):
if self.is_full():
raise ("Heap is Full")
self.storage[self.size] = data
self.size += 1
self.heapify_up(self.size - 1)
def heapify_up(self, index):
if self.has_parent(index) and self.parent(index) > self.storage[index]:
self.swap(self.get_parent_index(index), index)
self.heapify_up(self.get_parent_index(index))
def remove_min(self):
if self.size == 0:
raise ("Empty Heap")
data = self.storage[0]
self.storage[0] = self.storage[self.size - 1]
self.size -= 1
self.heapify_down(0)
return data
def heapify_down(self, index):
smallest = index
# while self.has_left_child(index):
# smaller_child_index = self.get_left_child_index(index)
if self.has_left_child(index) and self.storage[smallest] > self.left_child(index):
smallest = self.get_left_child_index(index)
if self.has_right_child(index) and self.storage[smallest] > self.right_child(index):
smallest = self.get_right_child_index(index)
if smallest != index:
self.swap(index, smallest)
self.heapify_down(smallest)
if __name__ == '__main__':
h = MinHeap(7)
inserts = (0, 10, 5, 20, 8, 15)
for i in inserts:
h.insert(i)
for _ in range(h.size):
h.remove_min()
pass
|
"""
.. _ref_create_unstructured:
Creating an Unstructured Grid
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Create an irregular, unstructured grid from NumPy arrays.
"""
import pyvista as pv
import vtk
import numpy as np
###############################################################################
# An unstructured grid can be created directly from NumPy arrays.
# This is useful when creating a grid from scratch or copying it from another
# format. See `vtkUnstructuredGrid <https://www.vtk.org/doc/nightly/html/classvtkUnstructuredGrid.html>`_
# for available cell types and their descriptions.
# offset array. Identifies the start of each cell in the cells array
offset = np.array([0, 9])
# Contains information on the points composing each cell.
# Each cell begins with the number of points in the cell and then the points
# composing the cell
cells = np.array([8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 13, 14, 15])
# cell type array. Contains the cell type of each cell
cell_type = np.array([vtk.VTK_HEXAHEDRON, vtk.VTK_HEXAHEDRON])
# in this example, each cell uses separate points
cell1 = np.array(
[
[0, 0, 0],
[1, 0, 0],
[1, 1, 0],
[0, 1, 0],
[0, 0, 1],
[1, 0, 1],
[1, 1, 1],
[0, 1, 1],
]
)
cell2 = np.array(
[
[0, 0, 2],
[1, 0, 2],
[1, 1, 2],
[0, 1, 2],
[0, 0, 3],
[1, 0, 3],
[1, 1, 3],
[0, 1, 3],
]
)
# points of the cell array
points = np.vstack((cell1, cell2))
# create the unstructured grid directly from the numpy arrays
grid = pv.UnstructuredGrid(offset, cells, cell_type, points)
# plot the grid (and suppress the camera position output)
_ = grid.plot(show_edges=True)
###############################################################################
# UnstructuredGrid with Shared Points
# -----------------------------------
#
# The next example again creates an unstructured grid containing
# hexahedral cells, but using common points between the cells.
# these points will all be shared between the cells
points = np.array([[0. , 0. , 0. ],
[1. , 0. , 0. ],
[0.5, 0. , 0. ],
[1. , 1. , 0. ],
[1. , 0.5, 0. ],
[0. , 1. , 0. ],
[0.5, 1. , 0. ],
[0. , 0.5, 0. ],
[0.5, 0.5, 0. ],
[1. , 0. , 0.5],
[1. , 0. , 1. ],
[0. , 0. , 0.5],
[0. , 0. , 1. ],
[0.5, 0. , 0.5],
[0.5, 0. , 1. ],
[1. , 1. , 0.5],
[1. , 1. , 1. ],
[1. , 0.5, 0.5],
[1. , 0.5, 1. ],
[0. , 1. , 0.5],
[0. , 1. , 1. ],
[0.5, 1. , 0.5],
[0.5, 1. , 1. ],
[0. , 0.5, 0.5],
[0. , 0.5, 1. ],
[0.5, 0.5, 0.5],
[0.5, 0.5, 1. ]])
# Each cell in the cell array needs to include the size of the cell
# and the points belonging to the cell. In this example, there are 8
# hexahedral cells that have common points between them.
cells = np.array([[ 8, 0, 2, 8, 7, 11, 13, 25, 23],
[ 8, 2, 1, 4, 8, 13, 9, 17, 25],
[ 8, 7, 8, 6, 5, 23, 25, 21, 19],
[ 8, 8, 4, 3, 6, 25, 17, 15, 21],
[ 8, 11, 13, 25, 23, 12, 14, 26, 24],
[ 8, 13, 9, 17, 25, 14, 10, 18, 26],
[ 8, 23, 25, 21, 19, 24, 26, 22, 20],
[ 8, 25, 17, 15, 21, 26, 18, 16, 22]]).ravel()
# each cell is a VTK_HEXAHEDRON
celltypes = np.empty(8, dtype=np.uint8)
celltypes[:] = vtk.VTK_HEXAHEDRON
# the offset array points to the start of each cell (via flat indexing)
offset = np.array([ 0, 9, 18, 27, 36, 45, 54, 63])
# Effectively, when visualizing a VTK unstructured grid, it will
# sequentially access the cell array by first looking at each index of
# cell array (based on the offset array), and then read the number of
# points based on the first value of the cell. In this case, the
# VTK_HEXAHEDRON is described by 8 points.
# for example, the 5th cell would be accessed by vtk with:
start_of_cell = offset[4]
n_points_in_cell = cells[start_of_cell]
indices_in_cell = cells[start_of_cell + 1: start_of_cell + n_points_in_cell + 1]
print(indices_in_cell)
###############################################################################
# Finally, create the unstructured grid and plot it
# if you are using VTK 9.0 or newer, you do not need to input the offset array:
# grid = pv.UnstructuredGrid(cells, celltypes, points)
# if you are not using VTK 9.0 or newer, you must use the offset array
grid = pv.UnstructuredGrid(offset, cells, celltypes, points)
# plot the grid (and suppress the camera position output)
_ = grid.plot(show_edges=True)
|
# This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from sqlalchemy.dialects.postgresql import ARRAY
from sqlalchemy.ext.hybrid import hybrid_property
from indico.core.db import db
from indico.core.db.sqlalchemy import UTCDateTime
from indico.core.notifications import make_email, send_email
from indico.modules.events.ical import event_to_ical
from indico.modules.events.registration.models.registrations import Registration
from indico.modules.events.reminders import logger
from indico.modules.events.reminders.util import make_reminder_email
from indico.util.date_time import now_utc
from indico.util.string import format_repr
class EventReminder(db.Model):
"""Email reminders for events."""
__tablename__ = 'reminders'
__table_args__ = (db.Index(None, 'scheduled_dt', postgresql_where=db.text('not is_sent')),
{'schema': 'events'})
#: The ID of the reminder
id = db.Column(
db.Integer,
primary_key=True
)
#: The ID of the event
event_id = db.Column(
db.Integer,
db.ForeignKey('events.events.id'),
index=True,
nullable=False
)
#: The ID of the user who created the reminder
creator_id = db.Column(
db.Integer,
db.ForeignKey('users.users.id'),
index=True,
nullable=False
)
#: The date/time when the reminder was created
created_dt = db.Column(
UTCDateTime,
nullable=False,
default=now_utc
)
#: The date/time when the reminder should be sent
scheduled_dt = db.Column(
UTCDateTime,
nullable=False
)
#: If the reminder has been sent
is_sent = db.Column(
db.Boolean,
nullable=False,
default=False
)
#: How long before the event start the reminder should be sent
#: This is needed to update the `scheduled_dt` when changing the
#: start time of the event.
event_start_delta = db.Column(
db.Interval,
nullable=True
)
#: The recipients of the notification
recipients = db.Column(
ARRAY(db.String),
nullable=False,
default=[]
)
#: If the notification should also be sent to all event participants
send_to_participants = db.Column(
db.Boolean,
nullable=False,
default=False
)
#: If the notification should include a summary of the event's schedule.
include_summary = db.Column(
db.Boolean,
nullable=False,
default=False
)
#: If the notification should include the event's description.
include_description = db.Column(
db.Boolean,
nullable=False,
default=False
)
#: If the notification should include the event's iCalendar file.
attach_ical = db.Column(
db.Boolean,
nullable=False,
default=True
)
#: The address to use as Reply-To in the notification email.
reply_to_address = db.Column(
db.String,
nullable=False
)
#: Custom message to include in the email
message = db.Column(
db.String,
nullable=False,
default=''
)
#: The user who created the reminder
creator = db.relationship(
'User',
lazy=True,
backref=db.backref(
'event_reminders',
lazy='dynamic'
)
)
#: The Event this reminder is associated with
event = db.relationship(
'Event',
lazy=True,
backref=db.backref(
'reminders',
lazy='dynamic'
)
)
@property
def locator(self):
return dict(self.event.locator, reminder_id=self.id)
@property
def all_recipients(self):
"""Return all recipients of the notifications.
This includes both explicit recipients and, if enabled,
participants of the event.
"""
recipients = set(self.recipients)
if self.send_to_participants:
recipients.update(reg.email for reg in Registration.get_all_for_event(self.event))
recipients.discard('') # just in case there was an empty email address somewhere
return recipients
@hybrid_property
def is_relative(self):
"""Return if the reminder is relative to the event time."""
return self.event_start_delta is not None
@is_relative.expression
def is_relative(self):
return self.event_start_delta != None # NOQA
@property
def is_overdue(self):
return not self.is_sent and self.scheduled_dt <= now_utc()
def send(self):
"""Send the reminder to its recipients."""
self.is_sent = True
recipients = self.all_recipients
if not recipients:
logger.info('Notification %s has no recipients; not sending anything', self)
return
email_tpl = make_reminder_email(self.event, self.include_summary, self.include_description, self.message)
attachments = []
if self.attach_ical:
event_ical = event_to_ical(self.event)
attachments.append(('event.ics', event_ical, 'text/calendar'))
email = make_email(
bcc_list=recipients, from_address=self.reply_to_address, template=email_tpl, attachments=attachments
)
logger.info(self.event.organizer_info)
send_email(email, self.event, 'Reminder', self.creator)
def __repr__(self):
return format_repr(self, 'id', 'event_id', 'scheduled_dt', is_sent=False)
|
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from os import environ, sys
from .log import accesslogger
import logging
db = SQLAlchemy()
def create_app():
"""Construct the core application."""
app = Flask(__name__)
app.logger.addHandler(logging.StreamHandler(sys.stdout))
app.logger.setLevel(logging.ERROR)
"""Loading configuratons."""
if environ.get('ENV') == 'PRODUCTION':
app.config.from_object('config.ProductionConfig')
app.config.from_object('config.oAuthConfig')
accesslogger.info("Loaded: Configuration of Production")
elif environ.get('ENV') == 'STAGE':
app.config.from_object('config.StageConfig')
app.config.from_object('config.oAuthConfig')
accesslogger.info("Loaded: Configuration of Stage")
elif environ.get('ENV') == 'TESTING':
app.config.from_object('config.TestConfig')
app.config.from_object('config.oAuthConfig')
accesslogger.info("Loaded: Configuration of Testing")
else:
app.config.from_object('config.DevelopmentConfig')
app.config.from_object('config.oAuthConfig')
accesslogger.info("Loaded: configuration of Development")
db.init_app(app)
with app.app_context():
from . import routes_auth
from . import routes_oauth
db.create_all()
return app
authapp = create_app()
|
"""
Django settings for incredibus project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import dj_database_url
import logging
from django.db import connection
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# define the following in the environment
SECRET_KEY = os.environ.get('SECRET_KEY', '')
FDW_URL = os.environ.get('FDW_URL', '')
DEBUG = os.environ.get('DEBUG', False)
TEMPLATE_DEBUG = DEBUG
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as TCP
TEMPLATE_CONTEXT_PROCESSORS = TCP + (
'django.core.context_processors.request',
'django.core.context_processors.media',
)
# Django suit
SUIT_CONFIG = {
'ADMIN_NAME': 'The Borg Collector'
}
# Application definition
INSTALLED_APPS = (
'borg', # Up top for template overrides
'suit', # Nice theme
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_extensions',
'django_uwsgi',
#'django_wsgiserver',
'reversion', # Versioning
# Sub-app definitions
'tablemanager',
'harvest',
'filemanager',
'rolemanager',
'application',
'wmsmanager',
'layergroup',
'monitor',
'borg_utils',
'dpaw_utils'
)
#from ldap_email_auth import ldap_default_settings
#ldap_default_settings()
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
#'ldap_email_auth.auth.EmailBackend'
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'dpaw_utils.middleware.SSOLoginMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'borg.urls'
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.dummy.DummyCache",
}
}
if os.environ.get("REDIS_URL",None):
CACHES["shared"] = {
"BACKEND":"django_redis.cache.RedisCache",
"LOCATION": os.environ.get("REDIS_URL"),
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
}
WSGI_APPLICATION = 'borg.wsgi.application'
# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'Australia/Perth'
USE_I18N = True
USE_L10N = True
USE_TZ = True
LOGIN_URL = '/login/'
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "static"),
)
try:
log_level = int(os.environ.get("LOGGING_LEVEL",logging.INFO))
except:
log_level = logging.INFO
logging.basicConfig(
level = log_level,
format = '%(asctime)s %(levelname)s %(message)s',
)
DOWNLOAD_ROOT = os.path.join(BASE_DIR,'download')
DOWNLOAD_URL = '/download/'
PREVIEW_ROOT = os.path.join(BASE_DIR,'preview')
PREVIEW_URL = '/preview/'
HARVEST_CONFIG = {
"BORG_SCHEMA" : "public",
"ROWID_COLUMN" : "_rowid",
"TEST_SCHEMA" : "test",
"INPUT_SCHEMA" : "input",
"NORMAL_SCHEMA" : "normal_form",
"TRANSFORM_SCHEMA" : "transform",
"PUBLISH_SCHEMA" : "publish",
"PUBLISH_VIEW_SCHEMA" : "publish_view",
"FULL_DATA_DUMP_DIR" : os.path.abspath(os.path.join(DOWNLOAD_ROOT, "full_data")),
"STYLE_FILE_DUMP_DIR" : os.path.abspath(os.path.join(DOWNLOAD_ROOT, "style_file")),
"WORKSPACE_AS_SCHEMA" : True,
"MAX_TEST_IMPORT_TIME" : 5, #seconds
"RETRY_INTERVAL" : 300, #seconds
"IMPORT_CANCEL_TIME" : 60, #seconds
"BORG_STATE_REPOSITORY" : os.environ.get("BORG_STATE_REPOSITORY", os.path.join(BASE_DIR, "borgcollector-state")),
"BORG_STATE_USER": os.environ.get("BORG_STATE_USER", "borgcollector"),
"BORG_STATE_SSH": "ssh -i " + os.environ.get("BORG_STATE_SSH", "~/.ssh/id_rsa"),
"USERLIST": os.environ.get("USERLIST", ""),
"USERLIST_USERNAME": os.environ.get("USERLIST_USERNAME", ""),
"USERLIST_PASSWORD": os.environ.get("USERLIST_PASSWORD", ""),
"MASTER_PATH_PREFIX": os.environ.get("MASTER_PATH_PREFIX", "")
}
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
DATABASES = {'default': dict(dj_database_url.config(),
**{
'OPTIONS':{
'options' : '-c search_path=' + HARVEST_CONFIG['BORG_SCHEMA']
}
}
)}
cursor = connection.cursor()
cursor.execute("CREATE SCHEMA IF NOT EXISTS {0}".format(HARVEST_CONFIG['BORG_SCHEMA']))
cursor.close()
cursor = None
|
from unittest.mock import patch
from corehq.apps.case_search.utils import get_expanded_case_results
from corehq.form_processor.models import CommCareCaseSQL
@patch("corehq.apps.case_search.utils._get_case_search_cases")
def test_get_expanded_case_results(get_cases_mock):
cases = [
CommCareCaseSQL(case_json={}),
CommCareCaseSQL(case_json={"potential_duplicate_id": "123"}),
CommCareCaseSQL(case_json={"potential_duplicate_id": "456"}),
CommCareCaseSQL(case_json={"potential_duplicate_id": ""}),
CommCareCaseSQL(case_json={"potential_duplicate_id": None}),
]
helper = None
get_expanded_case_results(helper, "potential_duplicate_id", cases)
get_cases_mock.assert_called_with(helper, {"123", "456"})
|
import pandas as pd
import numpy as np
import sklearn.neural_network.multilayer_perceptron
import os
import data_preprocessing as dp
df_dict = dp.rd.read_data_to_dict()
train_df = dp.preprocess(df_dict)
y = train_df.pop('Score')
X = train_df |
import copy
import json
import logging
from collections import defaultdict
from typing import Any, Dict, List, Optional, Sequence, Tuple, TypeVar, Union
import math
import numpy
import torch
from allennlp.common.checks import ConfigurationError
logger = logging.getLogger(__name__)
T = TypeVar("T")
def has_tensor(obj) -> bool:
if isinstance(obj, torch.Tensor):
return True
elif isinstance(obj, dict):
return any(has_tensor(value) for value in obj.values())
elif isinstance(obj, (list, tuple)):
return any(has_tensor(item) for item in obj)
else:
return False
def move_to_device(obj, cuda_device: Union[torch.device, int]):
from allennlp.common.util import int_to_device
cuda_device = int_to_device(cuda_device)
if cuda_device == torch.device("cpu") or not has_tensor(obj):
return obj
elif isinstance(obj, torch.Tensor):
return obj.cuda(cuda_device)
elif isinstance(obj, dict):
return {key: move_to_device(value, cuda_device) for key, value in obj.items()}
elif isinstance(obj, list):
return [move_to_device(item, cuda_device) for item in obj]
elif isinstance(obj, tuple) and hasattr(obj, "_fields"):
return obj.__class__(*(move_to_device(item, cuda_device) for item in obj))
elif isinstance(obj, tuple):
return tuple(move_to_device(item, cuda_device) for item in obj)
else:
return obj
def clamp_tensor(tensor, minimum, maximum):
if tensor.is_sparse:
coalesced_tensor = tensor.coalesce()
coalesced_tensor._values().clamp_(minimum, maximum)
return coalesced_tensor
else:
return tensor.clamp(minimum, maximum)
def batch_tensor_dicts(
tensor_dicts: List[Dict[str, torch.Tensor]], remove_trailing_dimension: bool = False
) -> Dict[str, torch.Tensor]:
key_to_tensors: Dict[str, List[torch.Tensor]] = defaultdict(list)
for tensor_dict in tensor_dicts:
for key, tensor in tensor_dict.items():
key_to_tensors[key].append(tensor)
batched_tensors = {}
for key, tensor_list in key_to_tensors.items():
batched_tensor = torch.stack(tensor_list)
if remove_trailing_dimension and all(tensor.size(-1) == 1 for tensor in tensor_list):
batched_tensor = batched_tensor.squeeze(-1)
batched_tensors[key] = batched_tensor
return batched_tensors
def get_lengths_from_binary_sequence_mask(mask: torch.BoolTensor) -> torch.LongTensor:
return mask.sum(-1)
def get_mask_from_sequence_lengths(
sequence_lengths: torch.Tensor, max_length: int
) -> torch.BoolTensor:
ones = sequence_lengths.new_ones(sequence_lengths.size(0), max_length)
range_tensor = ones.cumsum(dim=1)
return sequence_lengths.unsqueeze(1) >= range_tensor
def sort_batch_by_length(tensor: torch.Tensor, sequence_lengths: torch.Tensor):
if not isinstance(tensor, torch.Tensor) or not isinstance(sequence_lengths, torch.Tensor):
raise ConfigurationError("Both the tensor and sequence lengths must be torch.Tensors.")
sorted_sequence_lengths, permutation_index = sequence_lengths.sort(0, descending=True)
sorted_tensor = tensor.index_select(0, permutation_index)
index_range = torch.arange(0, len(sequence_lengths), device=sequence_lengths.device)
_, reverse_mapping = permutation_index.sort(0, descending=False)
restoration_indices = index_range.index_select(0, reverse_mapping)
return sorted_tensor, sorted_sequence_lengths, restoration_indices, permutation_index
def get_final_encoder_states(
encoder_outputs: torch.Tensor, mask: torch.BoolTensor, bidirectional: bool = False
) -> torch.Tensor:
last_word_indices = mask.sum(1) - 1
batch_size, _, encoder_output_dim = encoder_outputs.size()
expanded_indices = last_word_indices.view(-1, 1, 1).expand(batch_size, 1, encoder_output_dim)
final_encoder_output = encoder_outputs.gather(1, expanded_indices)
final_encoder_output = final_encoder_output.squeeze(1) # (batch_size, encoder_output_dim)
if bidirectional:
final_forward_output = final_encoder_output[:, : (encoder_output_dim // 2)]
final_backward_output = encoder_outputs[:, 0, (encoder_output_dim // 2) :]
final_encoder_output = torch.cat([final_forward_output, final_backward_output], dim=-1)
return final_encoder_output
def get_dropout_mask(dropout_probability: float, tensor_for_masking: torch.Tensor):
binary_mask = (torch.rand(tensor_for_masking.size()) > dropout_probability).to(
tensor_for_masking.device
)
dropout_mask = binary_mask.float().div(1.0 - dropout_probability)
return dropout_mask
def masked_softmax(
vector: torch.Tensor, mask: torch.BoolTensor, dim: int = -1, memory_efficient: bool = False,
) -> torch.Tensor:
if mask is None:
result = torch.nn.functional.softmax(vector, dim=dim)
else:
while mask.dim() < vector.dim():
mask = mask.unsqueeze(1)
if not memory_efficient:
result = torch.nn.functional.softmax(vector * mask, dim=dim)
result = result * mask
result = result / (
result.sum(dim=dim, keepdim=True) + tiny_value_of_dtype(result.dtype)
)
else:
masked_vector = vector.masked_fill(~mask, min_value_of_dtype(vector.dtype))
result = torch.nn.functional.softmax(masked_vector, dim=dim)
return result
def masked_log_softmax(vector: torch.Tensor, mask: torch.BoolTensor, dim: int = -1) -> torch.Tensor:
if mask is not None:
while mask.dim() < vector.dim():
mask = mask.unsqueeze(1)
vector = vector + (mask + tiny_value_of_dtype(vector.dtype)).log()
return torch.nn.functional.log_softmax(vector, dim=dim)
def masked_max(
vector: torch.Tensor, mask: torch.BoolTensor, dim: int, keepdim: bool = False,
) -> torch.Tensor:
replaced_vector = vector.masked_fill(~mask, min_value_of_dtype(vector.dtype))
max_value, _ = replaced_vector.max(dim=dim, keepdim=keepdim)
return max_value
def masked_mean(
vector: torch.Tensor, mask: torch.BoolTensor, dim: int, keepdim: bool = False
) -> torch.Tensor:
replaced_vector = vector.masked_fill(~mask, 0.0)
value_sum = torch.sum(replaced_vector, dim=dim, keepdim=keepdim)
value_count = torch.sum(mask, dim=dim, keepdim=keepdim)
return value_sum / value_count.float().clamp(min=tiny_value_of_dtype(torch.float))
def masked_flip(padded_sequence: torch.Tensor, sequence_lengths: List[int]) -> torch.Tensor:
assert padded_sequence.size(0) == len(
sequence_lengths
), f"sequence_lengths length ${len(sequence_lengths)} does not match batch size ${padded_sequence.size(0)}"
num_timesteps = padded_sequence.size(1)
flipped_padded_sequence = torch.flip(padded_sequence, [1])
sequences = [
flipped_padded_sequence[i, num_timesteps - length :]
for i, length in enumerate(sequence_lengths)
]
return torch.nn.utils.rnn.pad_sequence(sequences, batch_first=True)
def viterbi_decode(
tag_sequence: torch.Tensor,
transition_matrix: torch.Tensor,
tag_observations: Optional[List[int]] = None,
allowed_start_transitions: torch.Tensor = None,
allowed_end_transitions: torch.Tensor = None,
top_k: int = None,
):
if top_k is None:
top_k = 1
flatten_output = True
elif top_k >= 1:
flatten_output = False
else:
raise ValueError(f"top_k must be either None or an integer >=1. Instead received {top_k}")
sequence_length, num_tags = list(tag_sequence.size())
has_start_end_restrictions = (
allowed_end_transitions is not None or allowed_start_transitions is not None
)
if has_start_end_restrictions:
if allowed_end_transitions is None:
allowed_end_transitions = torch.zeros(num_tags)
if allowed_start_transitions is None:
allowed_start_transitions = torch.zeros(num_tags)
num_tags = num_tags + 2
new_transition_matrix = torch.zeros(num_tags, num_tags)
new_transition_matrix[:-2, :-2] = transition_matrix
allowed_start_transitions = torch.cat(
[allowed_start_transitions, torch.tensor([-math.inf, -math.inf])]
)
allowed_end_transitions = torch.cat(
[allowed_end_transitions, torch.tensor([-math.inf, -math.inf])]
)
new_transition_matrix[-2, :] = allowed_start_transitions
new_transition_matrix[-1, :] = -math.inf
new_transition_matrix[:, -1] = allowed_end_transitions
new_transition_matrix[:, -2] = -math.inf
transition_matrix = new_transition_matrix
if tag_observations:
if len(tag_observations) != sequence_length:
raise ConfigurationError(
"Observations were provided, but they were not the same length "
"as the sequence. Found sequence of length: {} and evidence: {}".format(
sequence_length, tag_observations
)
)
else:
tag_observations = [-1 for _ in range(sequence_length)]
if has_start_end_restrictions:
tag_observations = [num_tags - 2] + tag_observations + [num_tags - 1]
zero_sentinel = torch.zeros(1, num_tags)
extra_tags_sentinel = torch.ones(sequence_length, 2) * -math.inf
tag_sequence = torch.cat([tag_sequence, extra_tags_sentinel], -1)
tag_sequence = torch.cat([zero_sentinel, tag_sequence, zero_sentinel], 0)
sequence_length = tag_sequence.size(0)
path_scores = []
path_indices = []
if tag_observations[0] != -1:
one_hot = torch.zeros(num_tags)
one_hot[tag_observations[0]] = 100000.0
path_scores.append(one_hot.unsqueeze(0))
else:
path_scores.append(tag_sequence[0, :].unsqueeze(0))
for timestep in range(1, sequence_length):
summed_potentials = path_scores[timestep - 1].unsqueeze(2) + transition_matrix
summed_potentials = summed_potentials.view(-1, num_tags)
max_k = min(summed_potentials.size()[0], top_k)
scores, paths = torch.topk(summed_potentials, k=max_k, dim=0)
observation = tag_observations[timestep]
if tag_observations[timestep - 1] != -1 and observation != -1:
if transition_matrix[tag_observations[timestep - 1], observation] < -10000:
logger.warning(
"The pairwise potential between tags you have passed as "
"observations is extremely unlikely. Double check your evidence "
"or transition potentials!"
)
if observation != -1:
one_hot = torch.zeros(num_tags)
one_hot[observation] = 100000.0
path_scores.append(one_hot.unsqueeze(0))
else:
path_scores.append(tag_sequence[timestep, :] + scores)
path_indices.append(paths.squeeze())
path_scores_v = path_scores[-1].view(-1)
max_k = min(path_scores_v.size()[0], top_k)
viterbi_scores, best_paths = torch.topk(path_scores_v, k=max_k, dim=0)
viterbi_paths = []
for i in range(max_k):
viterbi_path = [best_paths[i]]
for backward_timestep in reversed(path_indices):
viterbi_path.append(int(backward_timestep.view(-1)[viterbi_path[-1]]))
viterbi_path.reverse()
if has_start_end_restrictions:
viterbi_path = viterbi_path[1:-1]
viterbi_path = [j % num_tags for j in viterbi_path]
viterbi_paths.append(viterbi_path)
if flatten_output:
return viterbi_paths[0], viterbi_scores[0]
return viterbi_paths, viterbi_scores
def get_text_field_mask(
text_field_tensors: Dict[str, Dict[str, torch.Tensor]],
num_wrapping_dims: int = 0,
padding_id: int = 0,
) -> torch.BoolTensor:
masks = []
for indexer_name, indexer_tensors in text_field_tensors.items():
if "mask" in indexer_tensors:
masks.append(indexer_tensors["mask"].bool())
if len(masks) == 1:
return masks[0]
elif len(masks) > 1:
raise ValueError("found two mask outputs; not sure which to use!")
tensor_dims = [
(tensor.dim(), tensor)
for indexer_output in text_field_tensors.values()
for tensor in indexer_output.values()
]
tensor_dims.sort(key=lambda x: x[0])
smallest_dim = tensor_dims[0][0] - num_wrapping_dims
if smallest_dim == 2:
token_tensor = tensor_dims[0][1]
return token_tensor != padding_id
elif smallest_dim == 3:
character_tensor = tensor_dims[0][1]
return (character_tensor != padding_id).any(dim=-1)
else:
raise ValueError("Expected a tensor with dimension 2 or 3, found {}".format(smallest_dim))
def get_token_ids_from_text_field_tensors(
text_field_tensors: Dict[str, Dict[str, torch.Tensor]],
) -> torch.Tensor:
for indexer_name, indexer_tensors in text_field_tensors.items():
for argument_name, tensor in indexer_tensors.items():
if argument_name in ["tokens", "token_ids", "input_ids"]:
return tensor
raise NotImplementedError(
"Our heuristic for guessing the right token ids failed. Please open an issue on "
"github with more detail on how you got this error, so we can implement more robust "
"logic in this method."
)
def weighted_sum(matrix: torch.Tensor, attention: torch.Tensor) -> torch.Tensor:
if attention.dim() == 2 and matrix.dim() == 3:
return attention.unsqueeze(1).bmm(matrix).squeeze(1)
if attention.dim() == 3 and matrix.dim() == 3:
return attention.bmm(matrix)
if matrix.dim() - 1 < attention.dim():
expanded_size = list(matrix.size())
for i in range(attention.dim() - matrix.dim() + 1):
matrix = matrix.unsqueeze(1)
expanded_size.insert(i + 1, attention.size(i + 1))
matrix = matrix.expand(*expanded_size)
intermediate = attention.unsqueeze(-1).expand_as(matrix) * matrix
return intermediate.sum(dim=-2)
def sequence_cross_entropy_with_logits(
logits: torch.FloatTensor,
targets: torch.LongTensor,
weights: Union[torch.FloatTensor, torch.BoolTensor],
average: str = "batch",
label_smoothing: float = None,
gamma: float = None,
alpha: Union[float, List[float], torch.FloatTensor] = None,
) -> torch.FloatTensor:
if average not in {None, "token", "batch"}:
raise ValueError("Got average f{average}, expected one of None, 'token', or 'batch'")
weights = weights.to(logits.dtype)
non_batch_dims = tuple(range(1, len(weights.shape)))
weights_batch_sum = weights.sum(dim=non_batch_dims)
logits_flat = logits.view(-1, logits.size(-1))
log_probs_flat = torch.nn.functional.log_softmax(logits_flat, dim=-1)
targets_flat = targets.view(-1, 1).long()
if gamma:
probs_flat = log_probs_flat.exp()
probs_flat = torch.gather(probs_flat, dim=1, index=targets_flat)
focal_factor = (1.0 - probs_flat) ** gamma
focal_factor = focal_factor.view(*targets.size())
weights = weights * focal_factor
if alpha is not None:
if isinstance(alpha, (float, int)):
alpha_factor = torch.tensor(
[1.0 - float(alpha), float(alpha)], dtype=weights.dtype, device=weights.device
)
elif isinstance(alpha, (list, numpy.ndarray, torch.Tensor)):
alpha_factor = torch.tensor(alpha, dtype=weights.dtype, device=weights.device)
if not alpha_factor.size():
alpha_factor = alpha_factor.view(1)
alpha_factor = torch.cat([1 - alpha_factor, alpha_factor])
else:
raise TypeError(
("alpha must be float, list of float, or torch.FloatTensor, {} provided.").format(
type(alpha)
)
)
alpha_factor = torch.gather(alpha_factor, dim=0, index=targets_flat.view(-1)).view(
*targets.size()
)
weights = weights * alpha_factor
if label_smoothing is not None and label_smoothing > 0.0:
num_classes = logits.size(-1)
smoothing_value = label_smoothing / num_classes
one_hot_targets = torch.zeros_like(log_probs_flat).scatter_(
-1, targets_flat, 1.0 - label_smoothing
)
smoothed_targets = one_hot_targets + smoothing_value
negative_log_likelihood_flat = -log_probs_flat * smoothed_targets
negative_log_likelihood_flat = negative_log_likelihood_flat.sum(-1, keepdim=True)
else:
negative_log_likelihood_flat = -torch.gather(log_probs_flat, dim=1, index=targets_flat)
negative_log_likelihood = negative_log_likelihood_flat.view(*targets.size())
negative_log_likelihood = negative_log_likelihood * weights
if average == "batch":
per_batch_loss = negative_log_likelihood.sum(non_batch_dims) / (
weights_batch_sum + tiny_value_of_dtype(negative_log_likelihood.dtype)
)
num_non_empty_sequences = (weights_batch_sum > 0).sum() + tiny_value_of_dtype(
negative_log_likelihood.dtype
)
return per_batch_loss.sum() / num_non_empty_sequences
elif average == "token":
return negative_log_likelihood.sum() / (
weights_batch_sum.sum() + tiny_value_of_dtype(negative_log_likelihood.dtype)
)
else:
per_batch_loss = negative_log_likelihood.sum(non_batch_dims) / (
weights_batch_sum + tiny_value_of_dtype(negative_log_likelihood.dtype)
)
return per_batch_loss
def replace_masked_values(
tensor: torch.Tensor, mask: torch.BoolTensor, replace_with: float
) -> torch.Tensor:
if tensor.dim() != mask.dim():
raise ConfigurationError(
"tensor.dim() (%d) != mask.dim() (%d)" % (tensor.dim(), mask.dim())
)
return tensor.masked_fill(~mask, replace_with)
def tensors_equal(tensor1: torch.Tensor, tensor2: torch.Tensor, tolerance: float = 1e-12) -> bool:
if isinstance(tensor1, (list, tuple)):
if not isinstance(tensor2, (list, tuple)) or len(tensor1) != len(tensor2):
return False
return all(tensors_equal(t1, t2, tolerance) for t1, t2 in zip(tensor1, tensor2))
elif isinstance(tensor1, dict):
if not isinstance(tensor2, dict):
return False
if tensor1.keys() != tensor2.keys():
return False
return all(tensors_equal(tensor1[key], tensor2[key], tolerance) for key in tensor1)
elif isinstance(tensor1, torch.Tensor):
if not isinstance(tensor2, torch.Tensor):
return False
if tensor1.size() != tensor2.size():
return False
if tensor1.dtype == torch.bool or tensor2.dtype == torch.bool:
return (tensor1 == tensor2).all()
return ((tensor1 - tensor2).abs().float() < tolerance).all()
else:
try:
return tensor1 == tensor2
except RuntimeError:
print(type(tensor1), type(tensor2))
raise
def device_mapping(cuda_device: int):
def inner_device_mapping(storage: torch.Storage, location) -> torch.Storage:
if cuda_device >= 0:
return storage.cuda(cuda_device)
else:
return storage
return inner_device_mapping
def combine_tensors(combination: str, tensors: List[torch.Tensor]) -> torch.Tensor:
if len(tensors) > 9:
raise ConfigurationError("Double-digit tensor lists not currently supported")
combination = combination.replace("x", "1").replace("y", "2")
to_concatenate = [_get_combination(piece, tensors) for piece in combination.split(",")]
return torch.cat(to_concatenate, dim=-1)
def _rindex(sequence: Sequence[T], obj: T) -> int:
for i in range(len(sequence) - 1, -1, -1):
if sequence[i] == obj:
return i
raise ValueError(f"Unable to find {obj} in sequence {sequence}.")
def _get_combination(combination: str, tensors: List[torch.Tensor]) -> torch.Tensor:
if combination.isdigit():
index = int(combination) - 1
return tensors[index]
else:
if len(combination) != 3:
raise ConfigurationError("Invalid combination: " + combination)
first_tensor = _get_combination(combination[0], tensors)
second_tensor = _get_combination(combination[2], tensors)
operation = combination[1]
if operation == "*":
return first_tensor * second_tensor
elif operation == "/":
return first_tensor / second_tensor
elif operation == "+":
return first_tensor + second_tensor
elif operation == "-":
return first_tensor - second_tensor
else:
raise ConfigurationError("Invalid operation: " + operation)
def combine_tensors_and_multiply(
combination: str, tensors: List[torch.Tensor], weights: torch.nn.Parameter
) -> torch.Tensor:
if len(tensors) > 9:
raise ConfigurationError("Double-digit tensor lists not currently supported")
combination = combination.replace("x", "1").replace("y", "2")
pieces = combination.split(",")
tensor_dims = [tensor.size(-1) for tensor in tensors]
combination_dims = [_get_combination_dim(piece, tensor_dims) for piece in pieces]
dims_so_far = 0
to_sum = []
for piece, combination_dim in zip(pieces, combination_dims):
weight = weights[dims_so_far : (dims_so_far + combination_dim)]
dims_so_far += combination_dim
to_sum.append(_get_combination_and_multiply(piece, tensors, weight))
result = to_sum[0]
for result_piece in to_sum[1:]:
result = result + result_piece
return result
def _get_combination_and_multiply(
combination: str, tensors: List[torch.Tensor], weight: torch.nn.Parameter
) -> torch.Tensor:
if combination.isdigit():
index = int(combination) - 1
return torch.matmul(tensors[index], weight)
else:
if len(combination) != 3:
raise ConfigurationError("Invalid combination: " + combination)
first_tensor = _get_combination(combination[0], tensors)
second_tensor = _get_combination(combination[2], tensors)
operation = combination[1]
if operation == "*":
if first_tensor.dim() > 4 or second_tensor.dim() > 4:
raise ValueError("Tensors with dim > 4 not currently supported")
desired_dim = max(first_tensor.dim(), second_tensor.dim()) - 1
if first_tensor.dim() == 4:
expanded_dim = _rindex(first_tensor.size(), 1)
first_tensor = first_tensor.squeeze(expanded_dim)
if second_tensor.dim() == 4:
expanded_dim = _rindex(second_tensor.size(), 1)
second_tensor = second_tensor.squeeze(expanded_dim)
intermediate = first_tensor * weight
result = torch.matmul(intermediate, second_tensor.transpose(-1, -2))
if result.dim() == desired_dim + 1:
result = result.squeeze(-1)
return result
elif operation == "/":
if first_tensor.dim() > 4 or second_tensor.dim() > 4:
raise ValueError("Tensors with dim > 4 not currently supported")
desired_dim = max(first_tensor.dim(), second_tensor.dim()) - 1
if first_tensor.dim() == 4:
expanded_dim = _rindex(first_tensor.size(), 1)
first_tensor = first_tensor.squeeze(expanded_dim)
if second_tensor.dim() == 4:
expanded_dim = _rindex(second_tensor.size(), 1)
second_tensor = second_tensor.squeeze(expanded_dim)
intermediate = first_tensor * weight
result = torch.matmul(intermediate, second_tensor.pow(-1).transpose(-1, -2))
if result.dim() == desired_dim + 1:
result = result.squeeze(-1)
return result
elif operation == "+":
return torch.matmul(first_tensor, weight) + torch.matmul(second_tensor, weight)
elif operation == "-":
return torch.matmul(first_tensor, weight) - torch.matmul(second_tensor, weight)
else:
raise ConfigurationError("Invalid operation: " + operation)
def get_combined_dim(combination: str, tensor_dims: List[int]) -> int:
if len(tensor_dims) > 9:
raise ConfigurationError("Double-digit tensor lists not currently supported")
combination = combination.replace("x", "1").replace("y", "2")
return sum(_get_combination_dim(piece, tensor_dims) for piece in combination.split(","))
def _get_combination_dim(combination: str, tensor_dims: List[int]) -> int:
if combination.isdigit():
index = int(combination) - 1
return tensor_dims[index]
else:
if len(combination) != 3:
raise ConfigurationError("Invalid combination: " + combination)
first_tensor_dim = _get_combination_dim(combination[0], tensor_dims)
second_tensor_dim = _get_combination_dim(combination[2], tensor_dims)
operation = combination[1]
if first_tensor_dim != second_tensor_dim:
raise ConfigurationError('Tensor dims must match for operation "{}"'.format(operation))
return first_tensor_dim
def logsumexp(tensor: torch.Tensor, dim: int = -1, keepdim: bool = False) -> torch.Tensor:
max_score, _ = tensor.max(dim, keepdim=keepdim)
if keepdim:
stable_vec = tensor - max_score
else:
stable_vec = tensor - max_score.unsqueeze(dim)
return max_score + (stable_vec.exp().sum(dim, keepdim=keepdim)).log()
def get_device_of(tensor: torch.Tensor) -> int:
if not tensor.is_cuda:
return -1
else:
return tensor.get_device()
def flatten_and_batch_shift_indices(indices: torch.Tensor, sequence_length: int) -> torch.Tensor:
if torch.max(indices) >= sequence_length or torch.min(indices) < 0:
raise ConfigurationError(
f"All elements in indices should be in range (0, {sequence_length - 1})"
)
offsets = get_range_vector(indices.size(0), get_device_of(indices)) * sequence_length
for _ in range(len(indices.size()) - 1):
offsets = offsets.unsqueeze(1)
offset_indices = indices + offsets
offset_indices = offset_indices.view(-1)
return offset_indices
def batched_index_select(
target: torch.Tensor,
indices: torch.LongTensor,
flattened_indices: Optional[torch.LongTensor] = None,
) -> torch.Tensor:
if flattened_indices is None:
flattened_indices = flatten_and_batch_shift_indices(indices, target.size(1))
flattened_target = target.view(-1, target.size(-1))
flattened_selected = flattened_target.index_select(0, flattened_indices)
selected_shape = list(indices.size()) + [target.size(-1)]
selected_targets = flattened_selected.view(*selected_shape)
return selected_targets
def batched_span_select(target: torch.Tensor, spans: torch.LongTensor) -> torch.Tensor:
span_starts, span_ends = spans.split(1, dim=-1)
span_widths = span_ends - span_starts
max_batch_span_width = span_widths.max().item() + 1
max_span_range_indices = get_range_vector(max_batch_span_width, get_device_of(target)).view(
1, 1, -1
)
span_mask = max_span_range_indices <= span_widths
raw_span_indices = span_ends - max_span_range_indices
span_mask = span_mask & (raw_span_indices >= 0)
span_indices = torch.nn.functional.relu(raw_span_indices.float()).long()
span_embeddings = batched_index_select(target, span_indices)
return span_embeddings, span_mask
def flattened_index_select(target: torch.Tensor, indices: torch.LongTensor) -> torch.Tensor:
if indices.dim() != 2:
raise ConfigurationError(
"Indices passed to flattened_index_select had shape {} but "
"only 2 dimensional inputs are supported.".format(indices.size())
)
flattened_selected = target.index_select(1, indices.view(-1))
selected = flattened_selected.view(target.size(0), indices.size(0), indices.size(1), -1)
return selected
def get_range_vector(size: int, device: int) -> torch.Tensor:
if device > -1:
return torch.cuda.LongTensor(size, device=device).fill_(1).cumsum(0) - 1
else:
return torch.arange(0, size, dtype=torch.long)
def bucket_values(
distances: torch.Tensor, num_identity_buckets: int = 4, num_total_buckets: int = 10
) -> torch.Tensor:
logspace_index = (distances.float().log() / math.log(2)).floor().long() + (
num_identity_buckets - 1
)
use_identity_mask = (distances <= num_identity_buckets).long()
use_buckets_mask = 1 + (-1 * use_identity_mask)
combined_index = use_identity_mask * distances + use_buckets_mask * logspace_index
return combined_index.clamp(0, num_total_buckets - 1)
def add_sentence_boundary_token_ids(
tensor: torch.Tensor, mask: torch.BoolTensor, sentence_begin_token: Any, sentence_end_token: Any
) -> Tuple[torch.Tensor, torch.BoolTensor]:
sequence_lengths = mask.sum(dim=1).detach().cpu().numpy()
tensor_shape = list(tensor.data.shape)
new_shape = list(tensor_shape)
new_shape[1] = tensor_shape[1] + 2
tensor_with_boundary_tokens = tensor.new_zeros(*new_shape)
if len(tensor_shape) == 2:
tensor_with_boundary_tokens[:, 1:-1] = tensor
tensor_with_boundary_tokens[:, 0] = sentence_begin_token
for i, j in enumerate(sequence_lengths):
tensor_with_boundary_tokens[i, j + 1] = sentence_end_token
new_mask = tensor_with_boundary_tokens != 0
elif len(tensor_shape) == 3:
tensor_with_boundary_tokens[:, 1:-1, :] = tensor
for i, j in enumerate(sequence_lengths):
tensor_with_boundary_tokens[i, 0, :] = sentence_begin_token
tensor_with_boundary_tokens[i, j + 1, :] = sentence_end_token
new_mask = (tensor_with_boundary_tokens > 0).sum(dim=-1) > 0
else:
raise ValueError("add_sentence_boundary_token_ids only accepts 2D and 3D input")
return tensor_with_boundary_tokens, new_mask
def remove_sentence_boundaries(
tensor: torch.Tensor, mask: torch.BoolTensor
) -> Tuple[torch.Tensor, torch.Tensor]:
sequence_lengths = mask.sum(dim=1).detach().cpu().numpy()
tensor_shape = list(tensor.data.shape)
new_shape = list(tensor_shape)
new_shape[1] = tensor_shape[1] - 2
tensor_without_boundary_tokens = tensor.new_zeros(*new_shape)
new_mask = tensor.new_zeros((new_shape[0], new_shape[1]), dtype=torch.bool)
for i, j in enumerate(sequence_lengths):
if j > 2:
tensor_without_boundary_tokens[i, : (j - 2), :] = tensor[i, 1 : (j - 1), :]
new_mask[i, : (j - 2)] = True
return tensor_without_boundary_tokens, new_mask
def add_positional_features(
tensor: torch.Tensor, min_timescale: float = 1.0, max_timescale: float = 1.0e4
):
_, timesteps, hidden_dim = tensor.size()
timestep_range = get_range_vector(timesteps, get_device_of(tensor)).data.float()
num_timescales = hidden_dim // 2
timescale_range = get_range_vector(num_timescales, get_device_of(tensor)).data.float()
log_timescale_increments = math.log(float(max_timescale) / float(min_timescale)) / float(
num_timescales - 1
)
inverse_timescales = min_timescale * torch.exp(timescale_range * -log_timescale_increments)
scaled_time = timestep_range.unsqueeze(1) * inverse_timescales.unsqueeze(0)
sinusoids = torch.cat([torch.sin(scaled_time), torch.cos(scaled_time)], 1)
if hidden_dim % 2 != 0:
sinusoids = torch.cat([sinusoids, sinusoids.new_zeros(timesteps, 1)], 1)
return tensor + sinusoids.unsqueeze(0)
def clone(module: torch.nn.Module, num_copies: int) -> torch.nn.ModuleList:
return torch.nn.ModuleList(copy.deepcopy(module) for _ in range(num_copies))
def combine_initial_dims(tensor: torch.Tensor) -> torch.Tensor:
if tensor.dim() <= 2:
return tensor
else:
return tensor.view(-1, tensor.size(-1))
def uncombine_initial_dims(tensor: torch.Tensor, original_size: torch.Size) -> torch.Tensor:
if len(original_size) <= 2:
return tensor
else:
view_args = list(original_size) + [tensor.size(-1)]
return tensor.view(*view_args)
def inspect_parameters(module: torch.nn.Module, quiet: bool = False) -> Dict[str, Any]:
results: Dict[str, Any] = {}
for name, param in sorted(module.named_parameters()):
keys = name.split(".")
write_to = results
for key in keys[:-1]:
if key not in write_to:
write_to[key] = {}
write_to = write_to[key]
write_to[keys[-1]] = "tunable" if param.requires_grad else "frozen"
if not quiet:
print(json.dumps(results, indent=4))
return results
def find_embedding_layer(model: torch.nn.Module) -> torch.nn.Module:
from transformers.modeling_gpt2 import GPT2Model
from transformers.modeling_bert import BertEmbeddings
from allennlp.modules.text_field_embedders.text_field_embedder import TextFieldEmbedder
from allennlp.modules.text_field_embedders.basic_text_field_embedder import (
BasicTextFieldEmbedder,
)
from allennlp.modules.token_embedders.embedding import Embedding
mismatched = False
for module in model.modules():
if "Mismatched" in module.__class__.__name__:
mismatched = True
if not mismatched:
for module in model.modules():
if isinstance(module, BertEmbeddings):
return module.word_embeddings
if isinstance(module, GPT2Model):
return module.wte
for module in model.modules():
if isinstance(module, TextFieldEmbedder):
if isinstance(module, BasicTextFieldEmbedder):
if len(module._token_embedders) == 1:
embedder = list(module._token_embedders.values())[0]
if isinstance(embedder, Embedding):
if embedder._projection is None:
return embedder
return module
raise RuntimeError("No embedding module found!")
def extend_layer(layer: torch.nn.Module, new_dim: int) -> None:
valid_layers = [torch.nn.Linear, torch.nn.Bilinear]
if not any([isinstance(layer, i) for i in valid_layers]):
raise ConfigurationError("Inappropriate layer type")
extend_dim = new_dim - layer.out_features
if not extend_dim:
return layer
if isinstance(layer, torch.nn.Linear):
new_weight = torch.FloatTensor(extend_dim, layer.in_features)
elif isinstance(layer, torch.nn.Bilinear):
new_weight = torch.FloatTensor(extend_dim, layer.in1_features, layer.in2_features)
new_bias = torch.FloatTensor(extend_dim)
torch.nn.init.xavier_uniform_(new_weight)
torch.nn.init.zeros_(new_bias)
device = layer.weight.device
layer.weight = torch.nn.Parameter(
torch.cat([layer.weight.data, new_weight.to(device)], dim=0),
requires_grad=layer.weight.requires_grad,
)
layer.bias = torch.nn.Parameter(
torch.cat([layer.bias.data, new_bias.to(device)], dim=0),
requires_grad=layer.bias.requires_grad,
)
layer.out_features = new_dim
def masked_topk(
input_: torch.FloatTensor,
mask: torch.BoolTensor,
k: Union[int, torch.LongTensor],
dim: int = -1,
) -> Tuple[torch.LongTensor, torch.LongTensor, torch.FloatTensor]:
if input_.size() != mask.size():
raise ValueError("`input_` and `mask` must have the same shape.")
if not -input_.dim() <= dim < input_.dim():
raise ValueError("`dim` must be in `[-input_.dim(), input_.dim())`")
dim = (dim + input_.dim()) % input_.dim()
max_k = k if isinstance(k, int) else k.max()
permutation = list(range(input_.dim()))
permutation.pop(dim)
permutation += [dim]
reverse_permutation = list(range(input_.dim() - 1))
reverse_permutation.insert(dim, -1)
other_dims_size = list(input_.size())
other_dims_size.pop(dim)
permuted_size = other_dims_size + [max_k] # for restoration
if isinstance(k, int):
k = k * torch.ones(*other_dims_size, dtype=torch.long, device=mask.device)
else:
if list(k.size()) != other_dims_size:
raise ValueError(
"`k` must have the same shape as `input_` with dimension `dim` removed."
)
num_items = input_.size(dim)
input_ = input_.permute(*permutation).reshape(-1, num_items)
mask = mask.permute(*permutation).reshape(-1, num_items)
k = k.reshape(-1)
input_ = replace_masked_values(input_, mask, min_value_of_dtype(input_.dtype))
_, top_indices = input_.topk(max_k, 1)
top_indices_mask = get_mask_from_sequence_lengths(k, max_k).bool()
fill_value, _ = top_indices.max(dim=1, keepdim=True)
top_indices = torch.where(top_indices_mask, top_indices, fill_value)
top_indices, _ = top_indices.sort(1)
sequence_mask = mask.gather(1, top_indices)
top_mask = top_indices_mask & sequence_mask
top_input = input_.gather(1, top_indices)
return (
top_input.reshape(*permuted_size).permute(*reverse_permutation),
top_mask.reshape(*permuted_size).permute(*reverse_permutation),
top_indices.reshape(*permuted_size).permute(*reverse_permutation),
)
def info_value_of_dtype(dtype: torch.dtype):
if dtype == torch.bool:
raise TypeError("Does not support torch.bool")
elif dtype.is_floating_point:
return torch.finfo(dtype)
else:
reveal_type(torch) |
import logging
from collections import OrderedDict
from datetime import datetime
from extractionSteps.JobStepBase import JobStepBase
from util.stdlib_utils import get_recursively
class DashboardsAPM(JobStepBase):
def __init__(self):
super().__init__("apm")
async def extract(self, controllerData):
"""
Extract Dashboard details.
1. No API calls to make, simply associate dashboards with which applications they have widgets for.
"""
jobStepName = type(self).__name__
for host, hostInfo in controllerData.items():
logging.info(f'{hostInfo["controller"].host} - Extracting {jobStepName}')
for dashboard in hostInfo["exportedDashboards"]:
dashboard["applicationNames"] = get_recursively(dashboard, "applicationName")
dashboard["applicationIDs"] = get_recursively(dashboard, "applicationId")
dashboard["adqlQueries"] = get_recursively(dashboard, "adqlQueryList")
for idx, applicationName in enumerate(hostInfo[self.componentType]):
application = hostInfo[self.componentType][applicationName]
application["apmDashboards"] = []
application["biqDashboards"] = []
for dashboard in hostInfo["exportedDashboards"]:
if application["name"] in dashboard["applicationNames"]:
application["apmDashboards"].append(dashboard)
elif application["id"] in dashboard["applicationIDs"]:
application["apmDashboards"].append(dashboard)
if any(application["name"] in item for item in dashboard["adqlQueries"]):
application["biqDashboards"].append(dashboard)
def analyze(self, controllerData, thresholds):
"""
Analysis of node level details.
1. Determines last modified date of dashboards per application.
2. Determines number of dashboards per application.
3. Determines number of dashboards with BiQ widgets per application.
"""
jobStepName = type(self).__name__
# Get thresholds related to job
jobStepThresholds = thresholds[self.componentType][jobStepName]
now = datetime.now()
for host, hostInfo in controllerData.items():
logging.info(f'{hostInfo["controller"].host} - Analyzing {jobStepName}')
for application in hostInfo[self.componentType].values():
# Root node of current application for current JobStep.
analysisDataRoot = application[jobStepName] = OrderedDict()
# This data goes into the 'JobStep - Metrics' xlsx sheet.
analysisDataEvaluatedMetrics = analysisDataRoot["evaluated"] = OrderedDict()
# This data goes into the 'JobStep - Raw' xlsx sheet.
analysisDataRawMetrics = analysisDataRoot["raw"] = OrderedDict()
# numberOfDashboards
analysisDataEvaluatedMetrics["numberOfDashboards"] = len(application["apmDashboards"]) + len(application["biqDashboards"])
# percentageOfDashboardsModifiedLast6Months
numDashboardsModifiedLast6Months = 0
for dashboard in application["apmDashboards"]:
modified = datetime.fromtimestamp(dashboard["modifiedOn"] / 1000.0)
num_months = (now.year - modified.year) * 12 + (now.month - modified.month)
if num_months <= 6:
numDashboardsModifiedLast6Months += 1
for dashboard in application["biqDashboards"]:
modified = datetime.fromtimestamp(dashboard["modifiedOn"] / 1000.0)
num_months = (now.year - modified.year) * 12 + (now.month - modified.month)
if num_months <= 6:
numDashboardsModifiedLast6Months += 1
if len(application["apmDashboards"]) + len(application["biqDashboards"]) == 0:
analysisDataEvaluatedMetrics["percentageOfDashboardsModifiedLast6Months"] = 0
else:
analysisDataEvaluatedMetrics["percentageOfDashboardsModifiedLast6Months"] = (
numDashboardsModifiedLast6Months / (len(application["apmDashboards"]) + len(application["biqDashboards"])) * 100
)
# numberOfDashboardsUsingBiQ
analysisDataEvaluatedMetrics["numberOfDashboardsUsingBiQ"] = len(application["biqDashboards"])
self.applyThresholds(analysisDataEvaluatedMetrics, analysisDataRoot, jobStepThresholds)
|
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^fitbitredirect$', views.fitbit_redirect, name='fitbit_redirect'),
url(r'^postmessage$', views.post_weight_to_slack, name='post_message'),
url(r'^postmessagediscord$', views.post_weight_to_discord, name='post_message_discord'),
]
|
import functools
import re
import mm_param
class RootNode(object):
def __init__(self, parameters):
self._p = parameters
for v in parameters.values():
v.parent = self
def child(self, key):
if key in self._p:
return self._p[key]
raise Exception("no child with key(%s)" % key)
def add_child(self, child):
self._p[child.api_name] = child
def find_param(self, keys):
obj = self
for k in keys.split('.'):
obj = obj.child(k.strip())
return obj
def add_parameter(self, argv):
v = argv.split(" ")
name = v[0]
items = v[1:]
cmd = "add %s" % argv
node_name = name
parent = self
i = name.rfind(":")
if i > 0:
parent = self.find_param(name[:i])
node_name = name[(i+1):]
else:
if name in self._p:
raise Exception("Execute cmd(%s) failed, the "
"parameter(%s) is exist" % (cmd, name))
p = {}
crud = []
t = set()
for item in items:
i = item.find(":")
if i == -1:
raise Exception("Execute cmd(%s) failed, the "
"parameter should be in format of k:v where "
"k is one of create, update, read and v is "
"the index to the real parameter" % cmd)
op = item[:i]
if op not in ["create", "upate", "read"]:
raise Exception("Execute cmd(%s) failed, the operation "
"must be crate, update or read" % cmd)
o = self.find_param(item[(i + 1):])
p[op] = o
crud.append(op[0])
t.add(type(o))
if len(t) != 1:
raise Exception("Execute cmd(%s) failed, all the "
"parameter should be the same type" % cmd)
obj = p.values()[0].clone()
obj.api_name = node_name
obj.parent = parent
obj.set_item("name", node_name)
obj.set_item("crud", "".join(crud))
if crud == "r":
obj.set_item("output", True)
parent.add_child(obj)
if "create" in p:
o = p["create"]
v = o.get_item("required")
if v:
obj.set_item("required", v)
v = o.get_item("description")
if v:
obj.set_item("description", v)
return
if "update" in p:
v = p["update"].get_item("description")
if v:
obj.set_item("description", v)
return
if "read" in p:
v = p["read"].get_item("description")
if v:
obj.set_item("description", v)
def rename(self, argv):
v = argv.split(" ")
if len(v) != 2:
raise Exception("Execute cmd(rename %s) failed, must input "
"node and its new name" % argv)
p = self.find_param(v[0])
p.set_item("name", v[1])
def delete(self, node):
p = self.find_param(node)
p.set_item("exclude", True)
def _config_values(p, pn, v):
if not isinstance(p, mm_param.MMEnum):
print("Can not set values for a non enum(%s) parameter(%s)" %
(type(p), pn))
else:
p.set_item("values", map(str.strip, v.strip(', ').split(',')))
def _config_element_type(p, pn, v):
if not isinstance(p, mm_param.MMEnum):
print("Can not set values for a non enum(%s) parameter(%s)" %
(type(p), pn))
else:
p.set_item("element_type", v)
def _find_param(parameters, k):
keys = k.split('.')
k0 = keys[0]
obj = parameters.get(k0)
if obj is None:
raise Exception("Can not find the head parameter(%s)" % k0)
try:
for k in keys[1:]:
obj = getattr(obj, k)
except AttributeError:
raise Exception("Can not find the parameter(%s)" % k)
return parameters if obj.parent is None else obj.parent, obj, keys[-1]
def _replace_description(fields, parameters, properties):
def _replace_desc(p, old, new):
desc = p.get_item("description")
pt = re.compile("\\b%s\\b" % old)
if re.findall(pt, desc):
p.set_item("description", re.sub(pt, new, desc))
find_param = functools.partial(_find_param, parameters, properties)
for p, new in fields.items():
if new == "name": # 'name' is not a specical parameter, ignore it.
continue
i = p.rfind('.')
if i > 0:
obj, pn = find_param(p[:i])
if not obj:
continue
f = functools.partial(_replace_desc, old=p[i+1:], new=new)
obj.traverse(f)
else:
f = functools.partial(_replace_desc, old=p, new=new)
for _, obj in parameters.items():
obj.traverse(f)
for _, obj in properties.items():
obj.traverse(f)
def _config_list_op(cnf, api_info, fields):
list_op = cnf["list_op"]
identity = list_op.get("identity", None)
if not identity:
raise Exception("Must set (identity) in list_op")
obj = api_info["list"]
if fields:
obj["identity"] = [
fields.get(i, i) for i in identity
]
for i in obj["api"]["query_params"]:
if i["name"] in fields:
i["name"] = fields[i["name"]]
else:
obj["identity"] = identity
def _replace_path_params(api_info, fields):
for _, v in api_info.items():
for i in v["api"].get("path_params", []):
if i["name"] in fields:
i["name"] = fields[i["name"]]
def custom_config(cnf, parameters, properties, api_info):
rn = RootNode(parameters)
fm = {
'rename': rn.rename,
'delete': rn.delete,
'add': rn.add_parameter,
}
for cmds in cnf.get("adjust", []):
if isinstance(cmds, str):
cmds = [cmds]
for cmd in cmds:
print cmd
i = cmd.find(" ")
f = fm.get(cmd[:i])
if not f:
raise Exception("Execute cmd(%s) failed, "
"unknown cmd(%s)" % (cmd, cmd[:i]))
f(cmd[(i + 1):])
print " done"
|
from .CRF import *
|
import discord
import random
import asyncio
from discord import Client
from discord.ext import commands
from discord.ext.commands import Bot
from discord.utils import get
bot = commands.Bot(command_prefix = '.')
bot.remove_command('help')
@bot.event
async def on_ready():
print('duck1 is online!')
@bot.command(pass_context=True)
async def help(ctx):
author = ctx.message.author
embed = discord.Embed(
colour = discord.Colour.orange()
)
embed.set_author(name='Commands')
embed.add_field(name='ping', value='Returns the latency', inline=False)
embed.add_field(name='test', value='Returns a quack', inline=False)
await author.send(embed=embed)
await ctx.message.delete()
@bot.command()
async def test(ctx):
await ctx.send('quack')
await ctx.message.delete()
@bot.command()
async def ping(ctx):
await ctx.send(f'latency is {round(bot.latency * 1000)}ms')
await ctx.message.delete()
bot.load_extension('pinbot')
async def change_status():
await bot.wait_until_ready()
statuses = ["for 📌", "for your pin emotes"]
while not bot.is_closed():
status = random.choice(statuses)
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name=status))
await asyncio.sleep(5)
bot.loop.create_task(change_status())
bot.run('your_token_here') |
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.13.7
# kernelspec:
# display_name: Python [default]
# language: python
# name: python2
# ---
# %%
from pyPRMS import Streamflow as sf
# %%
workdir = '/Users/pnorton/Projects/National_Hydrology_Model/datasets/bandit/jobs/20180927_ARPO'
filename = '{}/sf_data'.format(workdir)
sf_data = sf.Streamflow(filename, verbose=True)
# %%
df = sf_data.data
df.head()
# %%
aa = df.iloc[:,1976]
aa
# %%
aa.info()
# %%
infile = open(filename, 'r')
rawdata = infile.read().splitlines()
infile.close()
it = iter(rawdata)
hdr_count = 0
# Skip to the data section
for line in it:
hdr_count += 1
if line[0:10] == '##########':
hdr_count += 1 # plus one for good measure
break
print('Data starts at line: {}'.format(hdr_count))
# %%
cline = 0
pcols = []
plines = []
pdata = []
for line in it:
flds = line.split()
cline += 1
for idx, ff in enumerate(flds):
try:
aa = float(ff)
except ValueError:
pcols.append(idx)
plines.append(cline)
pdata.append(ff)
# print('Error in line {}, column {}, data = {}'.format(cline, idx, ff))
print('Bad columns: {}'.format(set(pcols)))
print('Bad lines: {}'.format(set(plines)))
print('Bad data: {}'.format(set(pdata)))
# %%
workdir = '/Users/pnorton/Projects/National_Hydrology_Model/datasets/bandit/paramdb_v2'
filename = '{}/poi_gage_id.csv'.format(workdir)
infile = open(filename, 'r')
rawdata = infile.read().splitlines()
infile.close()
it = iter(rawdata)
it.next()
gageids = {}
for line in it:
flds = line.split(',')
if flds[1] in gageids:
print '{} ({}): Duplicate gageid {} ({})'.format(flds[1], gageids[flds[1]], flds[1], flds[0])
else:
gageids[flds[1]] = flds[0]
# %%
|
import datetime
import collada
from collada.util import unittest
from collada.xmlutil import etree
fromstring = etree.fromstring
tostring = etree.tostring
class TestAsset(unittest.TestCase):
def setUp(self):
self.dummy = collada.Collada(validate_output=True)
def test_asset_contributor(self):
contributor = collada.asset.Contributor()
self.assertIsNone(contributor.author)
self.assertIsNone(contributor.authoring_tool)
self.assertIsNone(contributor.comments)
self.assertIsNone(contributor.copyright)
self.assertIsNone(contributor.source_data)
contributor.save()
contributor = collada.asset.Contributor.load(self.dummy, {}, fromstring(tostring(contributor.xmlnode)))
self.assertIsNone(contributor.author)
self.assertIsNone(contributor.authoring_tool)
self.assertIsNone(contributor.comments)
self.assertIsNone(contributor.copyright)
self.assertIsNone(contributor.source_data)
contributor.author = "author1"
contributor.authoring_tool = "tool2"
contributor.comments = "comments3"
contributor.copyright = "copyright4"
contributor.source_data = "data5"
contributor.save()
contributor = collada.asset.Contributor.load(self.dummy, {}, fromstring(tostring(contributor.xmlnode)))
self.assertEqual(contributor.author, "author1")
self.assertEqual(contributor.authoring_tool, "tool2")
self.assertEqual(contributor.comments, "comments3")
self.assertEqual(contributor.copyright, "copyright4")
self.assertEqual(contributor.source_data, "data5")
def test_asset(self):
asset = collada.asset.Asset()
self.assertIsNone(asset.title)
self.assertIsNone(asset.subject)
self.assertIsNone(asset.revision)
self.assertIsNone(asset.keywords)
self.assertIsNone(asset.unitname)
self.assertIsNone(asset.unitmeter)
self.assertEqual(asset.contributors, [])
self.assertEqual(asset.upaxis, collada.asset.UP_AXIS.Y_UP)
self.assertIsInstance(asset.created, datetime.datetime)
self.assertIsInstance(asset.modified, datetime.datetime)
asset.save()
asset = collada.asset.Asset.load(self.dummy, {}, fromstring(tostring(asset.xmlnode)))
self.assertIsNone(asset.title)
self.assertIsNone(asset.subject)
self.assertIsNone(asset.revision)
self.assertIsNone(asset.keywords)
self.assertIsNone(asset.unitname)
self.assertIsNone(asset.unitmeter)
self.assertEqual(asset.contributors, [])
self.assertEqual(asset.upaxis, collada.asset.UP_AXIS.Y_UP)
self.assertIsInstance(asset.created, datetime.datetime)
self.assertIsInstance(asset.modified, datetime.datetime)
asset.title = 'title1'
asset.subject = 'subject2'
asset.revision = 'revision3'
asset.keywords = 'keywords4'
asset.unitname = 'feet'
asset.unitmeter = 3.1
contrib1 = collada.asset.Contributor(author="jeff")
contrib2 = collada.asset.Contributor(author="bob")
asset.contributors = [contrib1, contrib2]
asset.upaxis = collada.asset.UP_AXIS.Z_UP
time1 = datetime.datetime.now()
asset.created = time1
time2 = datetime.datetime.now() + datetime.timedelta(hours=5)
asset.modified = time2
asset.save()
asset = collada.asset.Asset.load(self.dummy, {}, fromstring(tostring(asset.xmlnode)))
self.assertEqual(asset.title, 'title1')
self.assertEqual(asset.subject, 'subject2')
self.assertEqual(asset.revision, 'revision3')
self.assertEqual(asset.keywords, 'keywords4')
self.assertEqual(asset.unitname, 'feet')
self.assertEqual(asset.unitmeter, 3.1)
self.assertEqual(asset.upaxis, collada.asset.UP_AXIS.Z_UP)
self.assertEqual(asset.created, time1)
self.assertEqual(asset.modified, time2)
self.assertEqual(len(asset.contributors), 2)
if __name__ == '__main__':
unittest.main()
|
import info
class subinfo(info.infoclass):
def setTargets(self):
self.versionInfo.setDefaultValues()
self.displayName = "JuK"
self.patchToApply["18.08.1"] = [("juk-18.08.1-20181029.diff", 1)]
self.description = "JuK is a simple music player and helps manage your music collection"
self.webpage = "https://juk.kde.org/"
def setDependencies(self):
self.runtimeDependencies["virtual/base"] = None
self.buildDependencies["kde/frameworks/extra-cmake-modules"] = None
self.runtimeDependencies["libs/qt5/qtbase"] = None
self.runtimeDependencies["libs/qt5/qtsvg"] = None
self.runtimeDependencies["qt-libs/phonon"] = None
self.runtimeDependencies["libs/taglib"] = None
self.runtimeDependencies["kde/frameworks/tier1/kconfig"] = None
self.runtimeDependencies["kde/frameworks/tier1/kconfig"] = None
self.runtimeDependencies["kde/frameworks/tier1/kcoreaddons"] = None
self.runtimeDependencies["kde/frameworks/tier1/ki18n"] = None
self.runtimeDependencies["kde/frameworks/tier1/kwidgetsaddons"] = None
self.runtimeDependencies["kde/frameworks/tier1/kwindowsystem"] = None
self.runtimeDependencies["kde/frameworks/tier2/kcompletion"] = None
self.runtimeDependencies["kde/frameworks/tier2/kcrash"] = None
self.runtimeDependencies["kde/frameworks/tier2/kdoctools"] = None
self.runtimeDependencies["kde/frameworks/tier2/kjobwidgets"] = None
self.runtimeDependencies["kde/frameworks/tier3/kglobalaccel"] = None
self.runtimeDependencies["kde/frameworks/tier3/kiconthemes"] = None
self.runtimeDependencies["kde/frameworks/tier3/kio"] = None
self.runtimeDependencies["kde/frameworks/tier3/knotifications"] = None
self.runtimeDependencies["kde/frameworks/tier3/ktextwidgets"] = None
self.runtimeDependencies["kde/frameworks/tier3/kwallet"] = None
self.runtimeDependencies["kde/frameworks/tier3/kxmlgui"] = None
from Package.CMakePackageBase import *
class Package(CMakePackageBase):
def __init__(self):
CMakePackageBase.__init__(self)
|
""" Cisco_IOS_XR_Ethernet_SPAN_subscriber_cfg
This module contains a collection of YANG definitions
for Cisco IOS\-XR Ethernet\-SPAN\-subscriber package configuration.
This YANG module augments the
Cisco\-IOS\-XR\-subscriber\-infra\-tmplmgr\-cfg
module with configuration data.
Copyright (c) 2013\-2018 by Cisco Systems, Inc.
All rights reserved.
"""
import sys
from collections import OrderedDict
from ydk.types import Entity as _Entity_
from ydk.types import EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, LeafDataList, Bits, Empty, Decimal64
from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, LeafDataList, Bits, Empty, Decimal64
from ydk.filters import YFilter
from ydk.errors import YError, YModelError
from ydk.errors.error_handler import handle_type_error as _handle_type_error
class SpanMirrorInterval(Enum):
"""
SpanMirrorInterval (Enum Class)
Span mirror interval
.. data:: Y_512 = 1
Mirror 1 in every 512 packets
.. data:: Y_1k = 2
Mirror 1 in every 1024 packets
.. data:: Y_2k = 3
Mirror 1 in every 2048 packets
.. data:: Y_4k = 4
Mirror 1 in every 4096 packets
.. data:: Y_8k = 5
Mirror 1 in every 8192 packets
.. data:: Y_16k = 6
Mirror 1 in every 16384 packets
"""
Y_512 = Enum.YLeaf(1, "512")
Y_1k = Enum.YLeaf(2, "1k")
Y_2k = Enum.YLeaf(3, "2k")
Y_4k = Enum.YLeaf(4, "4k")
Y_8k = Enum.YLeaf(5, "8k")
Y_16k = Enum.YLeaf(6, "16k")
@staticmethod
def _meta_info():
from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_Ethernet_SPAN_subscriber_cfg as meta
return meta._meta_table['SpanMirrorInterval']
class SpanTrafficDirection(Enum):
"""
SpanTrafficDirection (Enum Class)
Span traffic direction
.. data:: rx_only = 1
Replicate only received (ingress) traffic
.. data:: tx_only = 2
Replicate only transmitted (egress) traffic
"""
rx_only = Enum.YLeaf(1, "rx-only")
tx_only = Enum.YLeaf(2, "tx-only")
@staticmethod
def _meta_info():
from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_Ethernet_SPAN_subscriber_cfg as meta
return meta._meta_table['SpanTrafficDirection']
|
import pytest
from unittest import TestCase
from flask import url_for, json
from web.server import create_app
from web.db import db
from web.status import status
from web.models import User
from tests.integration_tests.post_helpers import PostHelper
class UsersTests(TestCase):
@pytest.fixture(autouse=True)
def transact(self, request, configfile, waitForDb):
self.app = create_app(configfile, waitForDb)
self.test_client = self.app.test_client()
self.app_context = self.app.app_context()
self.app_context.push()
self.test_user_name = 'testuserusers'
self.test_user_password = 'T3s!p4s5w0RDd12#'
self.ph = PostHelper(self.test_client, self.test_user_name, self.test_user_password)
db.create_all()
yield
db.session.remove()
db.drop_all()
self.app_context.pop()
def test_retrieve_users_list(self):
"""
Ensure we can retrieve the users paginated list
"""
# Insert our first and 6 more
res = self.ph.create_user(self.test_user_name, self.test_user_password)
self.assertEqual(res.status_code, status.HTTP_201_CREATED, json.loads(res.get_data(as_text=True)))
for i in range(6):
name, password = 'integrationTestUser{}'.format(i), 'Password1!.{}'.format(i)
res = self.ph.create_user(name, password)
self.assertEqual(res.status_code, status.HTTP_201_CREATED, json.loads(res.get_data(as_text=True)))
# Validate we have in total only 7
self.assertEqual(User.query.count(), 7)
# Get the first page
first_url = url_for('api.userlistresource', _external=True)
first_res = self.test_client.get(
first_url,
headers=self.ph.get_authentication_headers())
first_res_data = json.loads(first_res.get_data(as_text=True))
# Make sure we only get the first 5 elements
self.assertEqual(first_res.status_code, status.HTTP_200_OK, json.loads(first_res.get_data(as_text=True)))
self.assertEqual(first_res_data['count'], 7)
self.assertIsNone(first_res_data['previous'])
self.assertEqual(first_res_data['next'], url_for('api.userlistresource', page=2, size=5))
self.assertIsNone(first_res_data['previous'])
self.assertIsNotNone(first_res_data['results'])
self.assertEqual(len(first_res_data['results']), 5)
self.assertEqual(first_res_data['results'][0]['name'], self.test_user_name)
# Get the second page, there should be only 2 elements
second_url = url_for('api.userlistresource', page=2)
second_res = self.test_client.get(
second_url,
headers=self.ph.get_authentication_headers())
second_res_data = json.loads(second_res.get_data(as_text=True))
self.assertEqual(second_res.status_code, status.HTTP_200_OK, json.loads(first_res.get_data(as_text=True)))
self.assertIsNotNone(second_res_data['previous'])
self.assertEqual(second_res_data['previous'], url_for('api.userlistresource', page=1, size=5))
self.assertIsNone(second_res_data['next'])
self.assertIsNotNone(second_res_data['results'])
self.assertEqual(len(second_res_data['results']), 2)
|
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the BSD License.
"""
myppy.util: misc utility functions for myppy
"""
from __future__ import with_statement
import os
import sys
import errno
import tempfile
import subprocess
import shutil
import hashlib
import contextlib
import platform
from fnmatch import fnmatch
class tempdir:
"""Context manager for creating auto-removed temp dirs.
This is a simple context manager for creating temporary directories, that
are automatically cleaned up when the context exists successfully.
Use it like this:
with tempdir() as mydir:
...do stuff with the temp dir...
"""
def __init__(self,suffix="",prefix="",dir=None):
self.suffix = suffix
self.prefix = prefix
self.dir = dir
def __enter__(self):
self.path = tempfile.mkdtemp(self.suffix,self.prefix,self.dir)
return self.path
def __exit__(self,exc_type,exc_value,traceback):
if exc_type is None:
for _ in xrange(5):
try:
shutil.rmtree(self.path)
break
except EnvironmentError:
pass
else:
shutil.rmtree(self.path)
@contextlib.contextmanager
def chstdin(new_stdin):
"""Context manager changing standard input"""
old_stdin = sys.stdin
try:
if isinstance(new_stdin,basestring):
sys.stdin = tempfile.TemporaryFile()
sys.stdin.write(new_stdin)
sys.stdin.seek(0)
else:
sys.stdin = new_stdin
yield
finally:
sys.stdin = old_stdin
def which(name):
"""Just like the "which" shell command."""
paths = os.environ.get("PATH","/bin:/usr/bin:/usr/local/bin").split(":")
for path in paths:
if os.path.exists(os.path.join(path,name)):
return os.path.join(path,name)
return None
def md5file(path):
"""Calculate md5 of given file."""
hash = hashlib.md5()
with open(path,"rb") as f:
chunk = f.read(1024*512)
while chunk:
hash.update(chunk)
chunk = f.read(1024*512)
return hash.hexdigest()
def do(*cmdline):
"""Execute the given command as a new subprocess."""
subprocess.check_call(cmdline)
def bt(*cmdline):
"""Execute the command, returning stdout.
"bt" is short for "backticks"; hopefully its use is obvious to shell
scripters and the like.
"""
p = subprocess.Popen(cmdline,stdout=subprocess.PIPE)
output = p.stdout.read()
retcode = p.wait()
if retcode != 0:
raise subprocess.CalledProcessError(retcode,cmdline)
return output
@contextlib.contextmanager
def cd(newdir):
"""Context manager for temporarily changing working directory."""
olddir = os.getcwd()
os.chdir(newdir)
try:
yield
finally:
os.chdir(olddir)
def relpath(path):
while path.startswith("/"):
path = path[1:]
return path
def prune_dir(path):
"""Remove a directory if it's empty."""
try:
os.rmdir(path)
except EnvironmentError, e:
if e.errno == errno.ENOTEMPTY:
pass
elif e.errno == errno.ENOTDIR:
while path.endswith("/"):
path = path[:-1]
if os.path.islink(path):
os.unlink(path)
else:
raise
else:
raise
def relpath_from(src,dst):
"""Calculate relative path from one path to another.
>>> relpath_from("hello/world","hello/there/sport")
"../there/sport
"""
src = os.path.abspath(src).split(os.sep)
dst = os.path.abspath(dst).split(os.sep)
assert src[0] == dst[0]
backrefs = []; fwdrefs = []
while src != dst:
if len(src) > len(dst):
src.pop()
backrefs.append("..")
else:
fwdrefs.append(dst.pop())
if not backrefs:
relpath = "."
else:
relpath = os.path.join(*backrefs)
relpath = os.path.join(relpath,*reversed(fwdrefs))
return relpath
def isrealdir(path):
"""Check if path is a real directory, not a symlink to a directory."""
return (os.path.isdir(path) and not os.path.islink(path))
def python_architecture():
"""Check architecture (32/64 bit) of python interpreter."""
if sys.platform.startswith('darwin'):
if sys.maxint > 2L ** 32:
return '64bit'
else:
return '32bit'
else:
return platform.architecture()[0]
|
#########################################################
# This file is part of the MultilayerOptics package. #
# Version 0.1.0 #
# Copyright (c) 2016 and later, Kanglin Xiong. #
#########################################################
import random
''' This module is to solve f(x, y) == 0 by Newton's method. '''
class Newton:
'''
Newton's method to find root for f(x, y) == 0
x(n+1) = x(n) - f(x(n))/f'(x(n)
By default, f(x, y) is incidentLight(gain, wavelength)
'''
def __init__(self, f, x0, y0, x1, x2, y1, y2):
'''
x0 and y0 are initial values. [x1, x2] and [y1, y2] are ranges.
'''
self.f = f
self.x = x0
self.y = y0
self.xmin = x1
self.xmax = x2
self.ymin = y1
self.ymax = y2
self.tolerance = 1e-3
def dfdx(self):
return (self.f(self.x + 1e-6, self.y)\
- self.f(self.x, self.y))/1e-6
def dfdy(self):
return (self.f(self.x, self.y + 1e-6)\
- self.f(self.x, self.y))/1e-6
def run(self, maxIteration = 1e2):
''' Search with given tolerance and max iterations. '''
count = 0
while(count < maxIteration):
count += 1
# update x
if(self.dfdx() != 0 ):
dx = - self.f(self.x, self.y)/self.dfdx()
if(self.x + dx < self.xmin or self.x + dx > self.xmax):
self.x = random.uniform(self.xmin, self.xmax)
else:
self.x += dx
else:
self.x = random.uniform(self.xmin, self.xmax)
# root is found
if(abs(self.f(self.x, self.y)) < self.tolerance):
break
# update y
if(self.dfdy() != 0):
dy = - self.f(self.x, self.y)/self.dfdy()
if(self.y + dy < self.ymin):
self.y = self.ymin
elif(self.y + dy > self.ymax):
self.y = self.ymax
else:
self.y += dy
else:
self.y = random.uniform(self.xmin, self.xmax)
# root is found
if(abs(self.f(self.x, self.y)) < self.tolerance):
break
# print process
print(count, self.f(self.x, self.y), self.x, self.y)
return (self.f(self.x, self.y), self.x, self.y)
|
import pygame as p
import dice
import buttonPanel
import StatisticsPanel
WIDTH = 900
HEIGHT = 600
BACKGROUND_COLOR = 'white'
MAX_FPS = 5
def main():
p.init()
screen = p.display.set_mode([WIDTH, HEIGHT])
p.display.set_caption('Dice Sim V. 1')
screen.fill(p.Color(BACKGROUND_COLOR))
clock = p.time.Clock()
dice.draw(screen)
buttons = buttonPanel.draw(screen, 0)
rollingDice = False
running = True
while running:
for event in p.event.get():
if event.type == p.QUIT:
running = False
if event.type == p.MOUSEBUTTONDOWN:
for i in range(len(buttons)):
if buttons[i].collidepoint(event.pos):
if i == 0:
rollingDice = True
buttons = buttonPanel.draw(screen, 1)
elif i == 1:
rollingDice = False
buttons = buttonPanel.draw(screen, 2)
elif i == 2:
rollingDice = False
dice.countsOfSix = [0, 0, 0, 0, 0, 0]
dice.NUM_OF_ROLLS = 0
buttons = buttonPanel.draw(screen, 3)
if event.type == p.KEYDOWN:
if event.key == p.K_SPACE:
if rollingDice == True:
rollingDice = False
buttons = buttonPanel.draw(screen, 2)
elif rollingDice == False:
rollingDice = True
buttons = buttonPanel.draw(screen, 1)
if event.key == p.K_r:
rollingDice = False
dice.countsOfSix = [0, 0, 0, 0, 0, 0]
dice.NUM_OF_ROLLS = 0
buttons = buttonPanel.draw(screen, 3)
if rollingDice:
dice.roll_a_dice(screen)
StatisticsPanel.draw(screen)
p.display.flip()
clock.tick(MAX_FPS)
main()
|
from aws_cdk import (
Duration,
Stack,
aws_logs as logs,
aws_sns as sns,
aws_lambda as lambda_,
)
from constructs import Construct
class LambdaSnsPublishStack(Stack):
def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)
# Hardcoding an ARN like this is bad. See role_arn.py for a better way
target_sns_arn = "arn:aws:sns:eu-west-1:12345678901:example-topic"
target_sns = sns.Topic.from_topic_arn(self, "TargetSnsTopic", target_sns_arn)
example_function = lambda_.Function(self, "ExampleFunction",
description="Example Lambda Function",
runtime=lambda_.Runtime.JAVA_11,
code=lambda_.Code.from_asset("./assets/dummy_lambda"),
handler="com.example.generated.ExtractorHandler::handleRequest",
timeout=Duration.seconds(180),
log_retention=logs.RetentionDays.THREE_MONTHS,
memory_size=512,
environment={"SNS_TOPIC_ARN": target_sns.topic_arn},
)
# Grants all permissions needed for the function to publish to the specified topic
target_sns.grant_publish(example_function)
|
"""Submit jobs to Sun Grid Engine."""
# pylint: disable=invalid-name
import os
import subprocess
from . import tracker
def submit(args):
"""Job submission script for SGE."""
if args.jobname is None:
args.jobname = ('dmlc%d.' % args.num_workers) + args.command[0].split('/')[-1]
if args.sge_log_dir is None:
args.sge_log_dir = args.jobname + '.log'
if os.path.exists(args.sge_log_dir):
if not os.path.isdir(args.sge_log_dir):
raise RuntimeError('specified --sge-log-dir %s is not a dir' % args.sge_log_dir)
else:
os.mkdir(args.sge_log_dir)
runscript = '%s/rundmlc.sh' % args.logdir
fo = open(runscript, 'w')
fo.write('source ~/.bashrc\n')
fo.write('export DMLC_TASK_ID=${SGE_TASK_ID}\n')
fo.write('export DMLC_JOB_CLUSTER=sge\n')
fo.write('\"$@\"\n')
fo.close()
def sge_submit(nworker, nserver, pass_envs):
"""Internal submission function."""
env_arg = ','.join(['%s=\"%s\"' % (k, str(v)) for k, v in list(pass_envs.items())])
cmd = 'qsub -cwd -t 1-%d -S /bin/bash' % (nworker + nserver)
if args.queue != 'default':
cmd += '-q %s' % args.queue
cmd += ' -N %s ' % args.jobname
cmd += ' -e %s -o %s' % (args.logdir, args.logdir)
cmd += ' -pe orte %d' % (args.vcores)
cmd += ' -v %s,PATH=${PATH}:.' % env_arg
cmd += ' %s %s' % (runscript, ' '.join(args.command))
print(cmd)
subprocess.check_call(cmd, shell=True)
print('Waiting for the jobs to get up...')
# call submit, with nslave, the commands to run each job and submit function
tracker.submit(args.num_workers, args.num_servers,
fun_submit=sge_submit,
pscmd=' '.join(args.command))
|
import os
from cluster_func import Arguments
alphabet = 'abcdefghijklmnopqrst'
args = zip(range(20), alphabet)
my_args1 = zip(range(20), reversed(alphabet))
my_args2 = [Arguments(number=n, letter=l) for n,l in my_args1]
def my_func(number, letter):
print os.environ['MYENV']
print letter, number
def target(number, letter):
print number, letter
cluf_options = {
"jobs_dir": "my_jobs",
"target": "target",
"args": "my_args1",
"processes": 2,
"bins": "0/10",
"env": {"MYENV": 5},
"prepend_statements": [
"echo my-prepend-statement-2",
"echo my-prepend-statement-3"
],
"append_statements": [
"echo my-append-statement-2",
"echo my-append-statement-3"
],
"append_script": "my-append-script-2,my-append-script-3",
"prepend_script": "my-prepend-script-2,my-prepend-script-3",
"iterations": 5,
"pbs_options": {
'name': 'yo-{subjob}-{num_subjobs}-{target}',
'stdout': '~/my-job-{target}-{subjob}-{num_subjobs}.stdout',
'stderr': '~/../my-job-{target}-{subjob}-{num_subjobs}.stderr'
}
}
|
import math
from decimal import Decimal
class Transaction:
def __init__(
self,
transaction: dict,
):
"""
type: buy / sell
block_number: number of ETH block tx occurred in
totx_digg_supply: time of tx total digg supply
totx_digg_price: {
wbtc: wbtc / digg
eth: eth / digg based on wbtc price
usdc: usdc / digg based on wbtc price
}
raw_digg_amount: amount of DIGG token tx'd
market_cap_pct: raw_digg_amount / totx_digg_supply -> percentage of digg supply tx'd
"""
self.block_number = transaction.get("blockNumber")
self.timestamp = transaction.get("timeStamp")
self.from_address = transaction.get("from")
self.to_address = transaction.get("to")
self.value = Decimal(transaction.get("value"))
self.token_decimal = int(transaction.get("tokenDecimal", 0))
self.token_amount = self.value / Decimal(math.pow(10, self.token_decimal))
self.tx_type = transaction.get("type")
self.totx_digg_supply = transaction.get("totx_supply")
self.totx_digg_price = transaction.get("totx_price")
self.market_cap_pct = self.token_amount / self.totx_digg_supply
self.totx_market_cap_price = self._get_market_cap_price()
def _get_digg_supply(self, timestamp: str) -> float:
return float(1)
def _get_digg_price(self, block_number: str) -> dict:
return {}
def _get_market_cap_price(self) -> dict:
mcap_price = {}
mcap_price["mcap_usdc"] = (
self.totx_digg_price["digg_usdc_price"] * self.totx_digg_supply
)
mcap_price["mcap_wbtc"] = (
self.totx_digg_price["digg_wbtc_price"] * self.totx_digg_supply
)
return mcap_price
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Implementation of extraction.
Usage:
>>> from extract_pdf import extract
>>> extract('/path/of/pdf', 3, 7)
"""
import os
from PyPDF2 import PdfFileReader, PdfFileWriter
__all__ = ['extract']
def extract(file_path, first_page, last_page):
"""
Extract pdf
:param file_path: Path of PDF file
:param first_page: number of first page
:param last_page: number of last page
"""
file_name = os.path.splitext(os.path.basename(file_path))[0]
new_name = '{}_new.pdf'.format(file_name)
try:
pdf = PdfFileReader(file_path)
pdf_writer = PdfFileWriter()
for page in range(first_page, last_page+1):
pdf_writer.addPage(pdf.getPage(page))
with open(new_name, 'wb') as out:
pdf_writer.write(out)
print('Created: {}'.format(new_name))
except:
print("file_path: {}".format(file_path))
print("first_page: {}".format(first_page))
print("last_page: {}".format(last_page))
if __name__ == '__main__':
path = input('Enter pdf path: ')
min_page = int(input('Enter first page: '))
max_page = int(input('Enter last page: '))
extract(path, min_page, max_page)
|
import logging
import os
import jinja2
from IPython.core.display import display, HTML
from pyspark.ml.feature import SQLTransformer
from pyspark.ml.stat import Correlation
from pyspark.serializers import PickleSerializer, AutoBatchedSerializer
from pyspark.sql import DataFrame
from pyspark.sql import functions as F
from optimus.helpers.decorators import *
from optimus.helpers.functions import parse_columns, collect_as_dict, random_int, val_to_list
from optimus.spark import Spark
import multiprocessing
cpu_count = multiprocessing.cpu_count()
@add_method(DataFrame)
def rollout(self):
"""
Just a function to check if the Spark dataframe has been Monkey Patched
:param self:
:return:
"""
print("Yes!")
@add_method(DataFrame)
def to_json(self):
"""
Return a json from a Spark Dataframe
:param self:
:return:
"""
return collect_as_dict(self.collect())
@add_method(DataFrame)
def sample_n(self, n=10, random=False):
"""
Return a n number of sample from a dataFrame
:param self:
:param n: Number of samples
:param random: if true get a semi random sample
:return:
"""
if random is True:
seed = random_int()
elif random is False:
seed = 0
rows_count = self.count()
fraction = n / rows_count
return self.sample(False, fraction, seed=seed)
@add_method(DataFrame)
def pivot(self, index, column, values):
"""
Return reshaped DataFrame organized by given index / column values.
:param self:
:param index: Column to use to make new frame’s index.
:param column: Column to use to make new frame’s columns.
:param values: Column(s) to use for populating new frame’s values.
:return:
"""
return self.groupby(index).pivot(column).agg(F.first(values))
@add_method(DataFrame)
def melt(self, id_vars, value_vars, var_name="variable", value_name="value", data_type="str"):
"""
Convert DataFrame from wide to long format.
:param self:
:param id_vars:
:param value_vars:
:param var_name: column name for vars
:param value_name: column name for values
:param data_type: because all data must have the same type
:return:
"""
df = self
id_vars = val_to_list(id_vars)
# Cast all colums to the same type
df = df.cols.cast(id_vars + value_vars, data_type)
vars_and_vals = [F.struct(F.lit(c).alias(var_name), F.col(c).alias(value_name)) for c in value_vars]
# Add to the DataFrame and explode
df = df.withColumn("vars_and_vals", F.explode(F.array(*vars_and_vals)))
cols = id_vars + [F.col("vars_and_vals")[x].alias(x) for x in [var_name, value_name]]
return df.select(*cols)
@add_method(DataFrame)
def size(self):
"""
Get the size of a dataframe in bytes
:param self:
:return:
"""
def _to_java_object_rdd(rdd):
"""
Return a JavaRDD of Object by unpickling
It will convert each Python object into Java object by Pyrolite, whenever the
RDD is serialized in batch or not.
"""
rdd = rdd._reserialize(AutoBatchedSerializer(PickleSerializer()))
return rdd.ctx._jvm.org.apache.spark.mllib.api.python.SerDe.pythonToJava(rdd._jrdd, True)
java_obj = _to_java_object_rdd(self.rdd)
n_bytes = Spark.instance.sc._jvm.org.apache.spark.util.SizeEstimator.estimate(java_obj)
return n_bytes
@add_method(DataFrame)
def run(self):
"""
This method is a very useful function to break lineage of transformations. By default Spark uses the lazy
evaluation approach in processing data: transformation functions are not computed into an action is called.
Sometimes when transformations are numerous, the computations are very extensive because the high number of
operations that spark needs to run in order to get the results.
Other important thing is that apache spark usually save task but not result of dataFrame, so tasks are
accumulated and the same situation happens.
The problem can be deal it with the checkPoint method. This method save the resulting dataFrame in disk, so
the lineage is cut.
"""
# Check pointing of dataFrame. One question can be thought. Why not use cache() or persist() instead of
# checkpoint. This is because cache() and persis() apparently do not break the lineage of operations,
logging.info("Saving changes at disk by checkpoint...")
self.cache().count
logging.info("Done.")
return True
@add_method(DataFrame)
def sql(self, sql_expression):
"""
Implements the transformations which are defined by SQL statement. Currently we only support
SQL syntax like "SELECT ... FROM __THIS__ ..." where "__THIS__" represents the
underlying table of the input dataframe.
:param self:
:param sql_expression: SQL expression.
:return: Dataframe with columns changed by SQL statement.
"""
sql_transformer = SQLTransformer(statement=sql_expression)
return sql_transformer.transform(self)
@add_attr(DataFrame)
def partitions(self):
"""
Return dataframes partitions number
:param self:
:return:
"""
print(self.rdd.getNumPartitions())
@add_method(DataFrame)
def h_repartition(self):
"""
Get the number of cpu available and apply an "optimus" repartition in the dataframe
#Reference: https://stackoverflow.com/questions/35800795/number-of-partitions-in-rdd-and-performance-in-spark/35804407#35804407
:param self:
:return:
"""
return self.repartition(cpu_count * 4)
@add_method(DataFrame)
def table_html(self, limit=100, columns=None):
"""
Return a HTML table with the dataframe cols, data types and values
:param self:
:param columns: Columns to be printed
:param limit: how many rows will be printed
:return:
"""
columns = parse_columns(self, columns)
data = self.select(columns).limit(limit).to_json()
# Load template
path = os.path.dirname(os.path.abspath(__file__))
template_loader = jinja2.FileSystemLoader(searchpath=path + "//../templates")
template_env = jinja2.Environment(loader=template_loader, autoescape=True)
template = template_env.get_template("table.html")
# Filter only the columns and data type info need it
dtypes = list(filter(lambda x: x[0] in columns, self.dtypes))
total_rows = self.count()
if total_rows < limit:
limit = total_rows
# Print table
output = template.render(cols=dtypes, data=data, limit=limit, total_rows=total_rows, total_cols=self.cols.count())
return output
@add_method(DataFrame)
def table(self, limit=100, columns=None):
result = self.table_html(limit=limit, columns=columns)
return display(HTML(result))
@add_method(DataFrame)
def correlation(self, columns, method="pearson", strategy="mean", output="json"):
"""
Calculate the correlation between columns. It will try to cast a column to float where necessary and impute
missing values
:param self:
:param columns: Columns to be processed
:param method: Method used to calculate the correlation
:param strategy: Imputing strategy
:param output: array or json
:return:
"""
columns = parse_columns(self, columns)
# try to parse the select column to float and create a vector
df = self
for col_name in columns:
df = df.cols.cast(col_name, "float")
logging.info("Casting {col_name} to float...".format(col_name=col_name))
# Impute missing values
imputed_cols = [c + "_imputed" for c in columns]
df = df.cols.impute(columns, imputed_cols, strategy)
logging.info("Imputing {columns}, Using '{strategy}'...".format(columns=columns, strategy=strategy))
# Create Vector necessary to calculate the correlation
df = df.cols.nest(imputed_cols, "features", "vector")
corr = Correlation.corr(df, "features", method).head()[0].toArray()
if output is "array":
result = corr
elif output is "json":
# Parse result to json
col_pair = []
for col_name in columns:
for col_name_2 in columns:
col_pair.append({"between": col_name, "an": col_name_2})
# flat array
values = corr.flatten('F').tolist()
result = []
for n, v in zip(col_pair, values):
# Remove correlation between the same column
if n["between"] is not n["an"]:
n["value"] = v
result.append(n)
result = sorted(result, key=lambda k: k['value'], reverse=True)
return result
|
from ._ScanAngle import *
|
class GameContainer:
def __init__(self, lowest_level, high_score, stat_diffs, points_available):
self.lowest_level = lowest_level
self.high_score = high_score
self.stat_diffs = stat_diffs
self.points_available = points_available
|
#coding:utf-8
import time,datetime
import os,os.path
import json
import traceback
from threading import Thread,Condition
from Queue import Queue
from collections import OrderedDict
from mantis.fundamental.utils.timeutils import timestamp_current, timestamp_to_str,datetime_to_timestamp,\
current_datetime_string,current_date_string,TimedTask
from mantis.fundamental.utils.useful import hash_object,object_assign
from mantis.fundamental.utils.useful import singleton
from base import *
import controller
class Market(object):
"""行情源 , 不同产品的接入行情方式不同,不同的券商接口"""
Bars =['1m','5m','15m','30m','60m','d','w','m','q','y']
def __init__(self,product):
self.product = product
self.generator = None
self.recorder = None
self.tick_handlers = OrderedDict() # {code:[handler,],..}
self.bar_handlers = OrderedDict() # {code-bar:[handler,],...} 600232-1m:func,..
self.thread = Thread(target=self.processThread)
self.actived = False
self.queue = Queue()
def init(self,*args,**kwargs):
self.setupGenerator(MarketGenerator())
self.setupRecorder(MarketRecorder())
return self
def setupGenerator(self,generator):
self.generator = generator
self.generator.market = self
return self
def setupRecorder(self,recorder):
self.recorder = recorder
return self
def open(self):
# 开始行情接收
if self.generator:
# self.generator.open()
pass
if self.recorder:
self.recorder.open()
self.thread.start()
return True
def close(self):
self.actived = False
# self.thread.join()
def initTradeObject(self,obj):
return obj
def subReset(self):
"""取消訂閱tick和bar"""
self.tick_handlers = OrderedDict()
self.bar_handlers = OrderedDict()
return self
def subTick(self,code,handler):
"""订阅行情周期"""
obj = self.product.getOrNewTradeObject(code)
self.initTradeObject(obj)
handlers = self.tick_handlers.get(code,[])
if not handlers:
self.tick_handlers[code] = [handler]
else:
handlers.append(handler)
return obj
def subBar(self,code,handler,cycle='1m'):
"""订阅k线数据"""
key = '{}-{}'.format(code,cycle)
obj = self.product.getOrNewTradeObject(code)
self.initTradeObject(obj)
handlers = self.bar_handlers.get(key, [])
if not handlers:
self.bar_handlers[key] = [handler,]
else:
handlers.append(handler)
return obj
def getHistoryBars(self,code,cycle,limit):
"""查询历史k线"""
pass
def onTick(self,tick):
if not tick.trade_object:
obj = self.product.getOrNewTradeObject(tick.code)
tick.trade_object = self.product.market.initTradeObject(obj)
self.tickInit(tick)
handlers = self.tick_handlers.get(tick.code,[])
for handler in handlers:
handler(tick)
if self.recorder:
self.recorder.write(tick)
tick.trade_object = None
def tickInit(self,tick):
tick.trade_object.setPrice(tick.price)
def onBar(self,bar):
if not bar.trade_object:
obj = self.product.getOrNewTradeObject(bar.code)
bar.trade_object = self.product.market.initTradeObject(obj)
k = '{}-{}'.format(bar.code,bar.cycle)
handlers = self.bar_handlers.get(k,[])
for handler in handlers:
handler(bar)
if self.recorder:
self.recorder.write(bar)
def putData(self,data):
"""接收到的行情数据置入队列,等待被读取处理 """
self.queue.put(data)
def processThread(self):
self.actived = True
while self.actived:
try:
try:
data = self.queue.get(timeout=1)
except:
continue
if not data:
continue
if isinstance(data,TickData):
self.onTick(data)
if isinstance(data,BarData):
self.onBar(data)
except:
traceback.print_exc()
# controller.getLogger().debug('Market Data Thread Exiting..')
controller.TradeController().getLogger().debug( 'Market Data Thread Exiting..')
|
jogador = {}
atletas = []
gols = []
total = []
while True:
jogador['nome'] = str(input('Nome: '))
partidas = int(input(f'Quantas partidas {jogador["nome"]} jogou? '))
for c in range(0,partidas):
gols.append(int(input(f'Quantos gols na partida {c+1}? ')))
jogador['gols'] = gols[:]
jogador['total'] = sum(gols)
atletas.append(jogador.copy())
gols.clear()
jogador.clear()
print('=' * 40)
while True:
cont = str(input('Quer continuar? [S/N]: ')).upper()[0]
if cont in 'SN':
break
print('ERRO! Digite apenas S ou N: ')
if cont == 'N':
break
print('=' * 40)
print('COD Nome Gols Total')
print('-' * 40)
for i, j in enumerate(atletas):
print(f'{i:>3}', end =" ")
for k, v in j.items():
print(f'{str(v):<10}', end = ' ')
print()
print('=' * 40)
while True:
dados = int(input('Mostrar dados de qual jogador? [999 Encerra] '))
print('-'* 40)
if dados == 999:
break
for i, j in enumerate(atletas):
if dados == i:
print(f'== MOSTRANDO DADOS DO JOGADOR {j["nome"]}:')
for i, d in enumerate(j["gols"]):
print(f' No jogo {i+1} fez {j["gols"][i]} gols.')
if dados > i:
print('ERRO! Digite um valor válido')
print('<<<< ENCERRANDO >>>>')
|
# -*- coding: utf-8 -*-
# 门店装修服务
class DecorationService:
__client = None
def __init__(self, client):
self.__client = client
def create_sign(self, sign):
"""
创建招贴
:param sign:招贴信息和其关联门店ID集合
"""
return self.__client.call("eleme.decoration.sign.createSign", {"sign": sign})
def update_sign(self, sign_id, sign):
"""
修改招贴
:param signId:招贴ID
:param sign:招贴信息和其关联门店ID
"""
return self.__client.call("eleme.decoration.sign.updateSign", {"signId": sign_id, "sign": sign})
def invalid_sign(self, sign_id):
"""
作废招贴
:param signId:招贴ID
"""
return self.__client.call("eleme.decoration.sign.invalidSign", {"signId": sign_id})
def get_sign_history_image(self, sign):
"""
获取历史上传过的招贴图片
:param sign:查询条件
"""
return self.__client.call("eleme.decoration.sign.getSignHistoryImage", {"sign": sign})
def query_sign(self):
"""
查询有效招贴集合
"""
return self.__client.call("eleme.decoration.sign.querySign", {})
def get_sign_by_id(self, sign_id):
"""
根据招贴ID查询店铺招贴详情
:param signId:招贴ID
"""
return self.__client.call("eleme.decoration.sign.getSignById", {"signId": sign_id})
def create_brand_story(self, story):
"""
新增品牌故事
:param story:品牌故事信息和其关联连锁店子店ID
"""
return self.__client.call("eleme.decoration.story.createBrandStory", {"story": story})
def update_brand_story(self, brand_story_id, story):
"""
更新品牌故事
:param brandStoryId:品牌故事ID
:param story:品牌故事信息和其关联连锁店子店ID
"""
return self.__client.call("eleme.decoration.story.updateBrandStory", {"brandStoryId": brand_story_id, "story": story})
def delete_brand_story(self, brand_story_id):
"""
删除品牌故事
:param brandStoryId:品牌故事ID
"""
return self.__client.call("eleme.decoration.story.deleteBrandStory", {"brandStoryId": brand_story_id})
def query_brand_story_list(self):
"""
查询品牌故事列表
"""
return self.__client.call("eleme.decoration.story.queryBrandStoryList", {})
def get_brand_story_by_id(self, brand_story_id):
"""
查询当前设置的品牌故事信息
:param brandStoryId:品牌故事ID
"""
return self.__client.call("eleme.decoration.story.getBrandStoryById", {"brandStoryId": brand_story_id})
def save_category(self, category):
"""
保存精准分类
:param category:精准分类信息
"""
return self.__client.call("eleme.decoration.accurateCategory.saveCategory", {"category": category})
def get_accurate_category(self, category):
"""
根据门店ID获取精准分类
:param category:查询参数
"""
return self.__client.call("eleme.decoration.accurateCategory.getAccurateCategory", {"category": category})
def query_accurate_category_list(self, category):
"""
查询精准分类
:param category:查询参数
"""
return self.__client.call("eleme.decoration.accurateCategory.queryAccurateCategoryList", {"category": category})
def create_poster(self, poster):
"""
创建海报
:param poster:海报信息和其关联门店ID和门店商品
"""
return self.__client.call("eleme.decoration.poster.createPoster", {"poster": poster})
def update_poster(self, poster_id, poster):
"""
修改海报
:param posterId:海报ID
:param poster:海报信息和其关联门店ID和门店商品
"""
return self.__client.call("eleme.decoration.poster.updatePoster", {"posterId": poster_id, "poster": poster})
def invalid_poster(self, poster):
"""
作废海报
:param poster:作废海报信息
"""
return self.__client.call("eleme.decoration.poster.invalidPoster", {"poster": poster})
def get_poster_detail_by_id(self, poster_id):
"""
根据海报ID获取海报详情
:param posterId:海报ID
"""
return self.__client.call("eleme.decoration.poster.getPosterDetailById", {"posterId": poster_id})
def query_effective_posters(self):
"""
查询有效的海报信息集合
"""
return self.__client.call("eleme.decoration.poster.queryEffectivePosters", {})
def get_poster_history_image(self):
"""
获取历史上传过的海报图片
"""
return self.__client.call("eleme.decoration.poster.getPosterHistoryImage", {})
def save_burst_window(self, burst_window):
"""
保存爆款橱窗
:param burstWindow:爆款橱窗信息
"""
return self.__client.call("eleme.decoration.burstWindow.saveBurstWindow", {"burstWindow": burst_window})
def close_burst_window_by_shop_id(self, shop_id):
"""
根据门店ID关闭店铺爆款橱窗
:param shopId:门店ID
"""
return self.__client.call("eleme.decoration.burstWindow.closeBurstWindowByShopId", {"shopId": shop_id})
def get_burst_window_by_shop_id(self, shop_id):
"""
根据店铺ID查询该店铺的爆款橱窗信息
:param shopId:店铺ID
"""
return self.__client.call("eleme.decoration.burstWindow.getBurstWindowByShopId", {"shopId": shop_id})
def query_burst_window_list(self, shop_ids):
"""
根据门店ID集合查询店铺爆款橱窗信息集合
:param shopIds:查询条件
"""
return self.__client.call("eleme.decoration.burstWindow.queryBurstWindowList", {"shopIds": shop_ids})
def upload(self, image):
"""
上传图片
:param image:文件内容base64编码值
"""
return self.__client.call("eleme.decoration.image.upload", {"image": image})
def get_image(self, hash):
"""
根据图片HASH值获取图片信息
:param hash:图片HASH值
"""
return self.__client.call("eleme.decoration.image.getImage", {"hash": hash})
|
# ============================================================================
# FILE: project.py
# AUTHOR: Qiming Zhao <[email protected]>
# License: MIT license
# ============================================================================
# pylint: disable=E0401,C0411
import os
from .base import Base
from denite import util
from ..kind.base import Base as BaseKind
from operator import itemgetter
from os.path import normpath
class Source(Base):
def __init__(self, vim):
super().__init__(vim)
self.name = 'project'
self.kind = Kind(vim)
self.sorters = []
def on_init(self, context):
folders = self.vim.vars.get('project_folders', [])
context['__folders'] = [util.expand(normpath(x)) for x in folders]
def highlight(self):
self.vim.command('highlight link deniteSource__ProjectRoot Comment')
self.vim.command('highlight link deniteSource__ProjectName Identifier')
def define_syntax(self):
self.vim.command(r'syntax match deniteSource__ProjectHeader /^.*$/ '
r'containedin=' + self.syntax_name)
self.vim.command(r'syntax match deniteSource__ProjectRoot /^.*\%16c/ contained '
r'contained containedin=deniteSource__ProjectHeader')
self.vim.command(r'syntax match deniteSource__ProjectName /\%17c.*$/ contained '
r'contained containedin=deniteSource__ProjectHeader')
def gather_candidates(self, context):
candidates = []
for directory in context['__folders']:
if not os.access(directory, os.X_OK):
continue
base = os.path.basename(directory)
items = os.scandir(directory)
for item in items:
if item.name[0] == '.':
continue
candidates.append({
'word': item.name,
'abbr': '%-14s %-20s' % (base, item.name),
'source__root': item.path,
'source__mtime': item.stat().st_mtime
})
candidates = sorted(candidates, key=itemgetter('source__mtime'),
reverse=True)
return candidates
class Kind(BaseKind):
def __init__(self, vim):
super().__init__(vim)
self.default_action = 'open'
self.name = 'project'
def action_open(self, context):
target = context['targets'][0]
self.vim.command('Denite file_rec:%s' % target['source__root'])
def action_tabopen(self, context):
target = context['targets'][0]
self.vim.call('denite#extra#iterm_tabopen', target['source__root'])
|
import json
from datetime import datetime
from json.decoder import JSONDecodeError
from django.db.models import Q
from django.http import JsonResponse, Http404
from django.shortcuts import get_object_or_404
from django.utils import timezone
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_http_methods
from utils.decorators import require_basic_auth, redirect_preflight
from utils.exceptions import get_stacktrace_str
from world.models import Campaign, Map, Action, CampaignProperty, MapProperty
@redirect_preflight
@require_basic_auth
@require_http_methods(["GET"])
def load_world(request):
try:
campaigns = Campaign.objects.all().order_by('name')
response = {
'status': 200,
'message': f'World loaded',
'world': {
'campaigns': [{'name': x.name, 'id': x.campaign_id} for x in campaigns]
}
}
except Http404 as e:
response = {'status': 404, 'message': str(e)}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@redirect_preflight
@require_basic_auth
@require_http_methods(["GET"])
def load_campaign(request, campaign_id):
try:
campaign = get_object_or_404(Campaign, campaign_id=campaign_id)
user_properties = CampaignProperty.objects.filter(campaign=campaign, user=request.user)
properties = [{'name': x.name, 'value': x.value} for x in user_properties]
property_names = [p.name for p in user_properties]
default_properties = CampaignProperty.objects.filter(campaign=campaign, user__isnull=True)
for p in default_properties:
if p.name not in property_names:
properties.append({'name': p.name, 'value': p.value})
players = [x.user for x in CampaignProperty.objects.filter(campaign=campaign, name='IS_PLAYER')]
master_name = get_object_or_404(CampaignProperty, campaign=campaign, name='IS_MASTER').user.username
response = {
'status': 200,
'message': f'Campaign loaded (name={campaign.name}, id={campaign.campaign_id})',
'date': timezone.localtime(campaign.updated).isoformat(timespec='microseconds'),
'campaign': {
'properties': properties,
'maps': [{'name': x.name, 'id': x.map_id} for x in campaign.map_set.order_by('name')],
'players': [{'name': x.username, 'id': x.id, 'master': x.username == master_name} for x in players],
}
}
except Http404 as e:
response = {'status': 404, 'message': str(e)}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@redirect_preflight
@require_basic_auth
@require_http_methods(["GET"])
def load_campaign_property(request, campaign_id, property_name):
try:
campaign = get_object_or_404(Campaign, campaign_id=campaign_id)
props = CampaignProperty.objects.filter(campaign=campaign, user=request.user, name=property_name)
prop = props[0] if props else get_object_or_404(CampaignProperty,
campaign=campaign, user=None, name=property_name)
response = {
'status': 200,
'message': f'Campaign Property loaded (campaign_name={campaign.name}, name={property_name})',
'campaign': {'properties': [{'name': prop.name, 'value': prop.value}]}
}
except Http404 as e:
response = {'status': 404, 'message': str(e) + f' (campaign={campaign_id}, property={property_name}'}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@csrf_exempt
@redirect_preflight
@require_basic_auth
@require_http_methods(["POST"])
def save_campaign_property(request, campaign_id, property_name):
try:
campaign = get_object_or_404(Campaign, campaign_id=campaign_id)
prop = CampaignProperty.objects.get_or_create(campaign=campaign, user=request.user, name=property_name)[0]
prop.name = property_name
prop.value = request.body.decode('utf-8')
prop.save()
response = {
'status': 200,
'message': f'Campaign Property saved (campaign_name={campaign.name}, '
f'name={property_name}, value={prop.value})',
}
except Http404 as e:
response = {'status': 404, 'message': str(e) + f' (campaign={campaign_id})'}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@csrf_exempt
@redirect_preflight
@require_basic_auth
@require_http_methods(["POST"])
def default_campaign_property(request, campaign_id, property_name):
try:
campaign = get_object_or_404(Campaign, campaign_id=campaign_id)
prop = CampaignProperty.objects.get_or_create(campaign=campaign, user=None, name=property_name)[0]
prop.name = property_name
prop.value = request.body.decode('utf-8')
prop.save()
response = {
'status': 200,
'message': f'Campaign Property default (campaign_name={campaign.name}, '
f'name={property_name}, value={prop.value})',
}
except Http404 as e:
response = {'status': 404, 'message': str(e) + f' (campaign={campaign_id})'}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@csrf_exempt
@redirect_preflight
@require_basic_auth
@require_http_methods(["DELETE"])
def delete_campaign_property(request, campaign_id, property_name):
try:
campaign = get_object_or_404(Campaign, campaign_id=campaign_id)
prop = get_object_or_404(CampaignProperty, campaign=campaign, user=request.user, name=property_name)
prop.delete()
response = {
'status': 200,
'message': f'Campaign Property deleted (campaign_name={campaign.name})',
}
except Http404 as e:
response = {'status': 404, 'message': str(e) + f' (campaign={campaign_id}, name={property_name})'}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@csrf_exempt
@redirect_preflight
@require_basic_auth
@require_http_methods(["POST"])
def save_map_property(request, campaign_id, map_id, property_name):
try:
tile_map = get_object_or_404(Map, campaign__campaign_id=campaign_id, map_id=map_id)
prop = MapProperty.objects.get_or_create(map=tile_map, user=request.user, name=property_name)[0]
prop.value = request.body.decode('utf-8')
prop.save()
response = {
'status': 200,
'message': f'Map Property saved (map_name={tile_map.name}, name={property_name}, value={prop.value})',
}
except Http404 as e:
response = {'status': 404, 'message': str(e) + f' (campaign={campaign_id}, map={map_id})'}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@csrf_exempt
@redirect_preflight
@require_basic_auth
@require_http_methods(["POST"])
def default_map_property(request, campaign_id, map_id, property_name):
try:
tile_map = get_object_or_404(Map, campaign__campaign_id=campaign_id, map_id=map_id)
prop = MapProperty.objects.get_or_create(map=tile_map, user=None, name=property_name)[0]
prop.value = request.body.decode('utf-8')
prop.save()
response = {
'status': 200,
'message': f'Map Property default (map_name={tile_map.name}, name={property_name}, value={prop.value})',
}
except Http404 as e:
response = {'status': 404, 'message': str(e) + f' (campaign={campaign_id}, map={map_id})'}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@csrf_exempt
@redirect_preflight
@require_basic_auth
@require_http_methods(["DELETE"])
def delete_map_property(request, campaign_id, map_id, property_name):
try:
tile_map = get_object_or_404(Map, campaign__campaign_id=campaign_id, map_id=map_id)
prop = get_object_or_404(MapProperty, map=tile_map, user=request.user, name=property_name)
prop.delete()
response = {
'status': 200,
'message': f'Map Property deleted (map_name={tile_map.name}, name={property_name})',
}
except Http404 as e:
response = {'status': 404, 'message': str(e) + f' (campaign={campaign_id}, map={map_id}, name={property_name}'}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@redirect_preflight
@require_basic_auth
@require_http_methods(["GET"])
def load_map(request, campaign_id, map_id):
try:
tile_map = get_object_or_404(Map, campaign__campaign_id=campaign_id, map_id=map_id)
response = {
'status': 200,
'message': f'Map loaded (name={tile_map.name}, id={map_id})',
'date': timezone.localtime(tile_map.saved).isoformat(timespec='microseconds'),
'map': json.loads(tile_map.data)
}
except Http404 as e:
response = {'status': 404, 'message': str(e) + f' (campaign={campaign_id}, map={map_id})'}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@redirect_preflight
@require_basic_auth
@require_http_methods(["GET"])
def load_map_properties(request, campaign_id, map_id):
try:
tile_map = get_object_or_404(Map, campaign__campaign_id=campaign_id, map_id=map_id)
# user_properties = MapProperty.objects.filter(map=tile_map, user=request.user)
# properties = [{'name': x.name, 'value': x.value} for x in user_properties]
# property_names = [p.name for p in user_properties]
# default_properties = MapProperty.objects.filter(map=tile_map, user__isnull=True)
# for p in default_properties:
# if p.name not in property_names:
# properties.append({'name': p.name, 'value': p.value})
user_properties = MapProperty.objects.filter(Q(map=tile_map, user=request.user) |
Q(map=tile_map, user__isnull=True))
properties = [{'name': x.name, 'value': x.value} for x in user_properties]
response = {
'status': 200,
'message': f'Map Properties loaded (len={len(properties)})',
'date': timezone.localtime(tile_map.saved).isoformat(timespec='microseconds'),
'properties': properties
}
except Http404 as e:
response = {'status': 404, 'message': str(e) + f' (campaign={campaign_id}, map={map_id}'}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@redirect_preflight
@require_basic_auth
@require_http_methods(["GET"])
def load_map_properties_for_user(request, campaign_id, map_id, user_id):
try:
tile_map = get_object_or_404(Map, campaign__campaign_id=campaign_id, map_id=map_id)
user_properties = MapProperty.objects.filter(Q(map=tile_map, user_id=user_id) |
Q(map=tile_map, user__isnull=True))
properties = [{'name': x.name, 'value': x.value} for x in user_properties]
response = {
'status': 200,
'message': f'Map Properties loaded (len={len(properties)})',
'date': timezone.localtime(tile_map.saved).isoformat(timespec='microseconds'),
'properties': properties
}
except Http404 as e:
response = {'status': 404, 'message': str(e) + f' (campaign={campaign_id}, map={map_id}'}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
PERMISSIONS = [
"SHARED_NAME",
"SHARED_POSITION",
"SHARED_VISION",
"SHARED_CONTROL",
"SHARED_HEALTH",
"SHARED_STAMINA",
"SHARED_MANA",
]
@csrf_exempt
@redirect_preflight
@require_basic_auth
@require_http_methods(["POST"])
def reset_permissions(request, campaign_id, map_id):
try:
tile_map = get_object_or_404(Map, campaign__campaign_id=campaign_id, map_id=map_id)
entities = json.loads(request.body.decode('utf-8'))['entities']
MapProperty.objects.filter(map=tile_map, name__in=PERMISSIONS, value__in=entities).delete()
response = {
'status': 200,
'message': f'Map Permissions reset for entities (id__in={entities})',
}
except Http404 as e:
response = {'status': 404, 'message': str(e) + f' (campaign={campaign_id}, map={map_id})'}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@csrf_exempt
@redirect_preflight
@require_basic_auth
@require_http_methods(["POST"])
def default_permissions(request, campaign_id, map_id):
try:
tile_map = get_object_or_404(Map, campaign__campaign_id=campaign_id, map_id=map_id)
data = json.loads(request.body.decode('utf-8'))
entities = data['entities']
players = data['players']
if players:
MapProperty.objects.filter(map=tile_map, user_id__in=players,
name__in=PERMISSIONS, value__in=entities).delete()
else:
MapProperty.objects.filter(map=tile_map, user__isnull=True,
name__in=PERMISSIONS, value__in=entities).delete()
response = {
'status': 200,
'message': f'Map Permissions default for entities (id__in={entities})',
}
except Http404 as e:
response = {'status': 404, 'message': str(e) + f' (campaign={campaign_id}, map={map_id})'}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@csrf_exempt
@redirect_preflight
@require_basic_auth
@require_http_methods(["POST"])
def map_permissions(request, campaign_id, map_id):
try:
tile_map = get_object_or_404(Map, campaign__campaign_id=campaign_id, map_id=map_id)
permissions = json.loads(request.body.decode('utf-8'))['permissions']
player_reset = []
for permission in permissions:
entity = permission['entity']
player = permission['player']
perm = permission['permission']
property_name = {
'name': 'SHARED_NAME',
'position': 'SHARED_POSITION',
'vision': 'SHARED_VISION',
'control': 'SHARED_CONTROL',
'health': 'SHARED_HEALTH',
'stamina': 'SHARED_STAMINA',
'mana': 'SHARED_MANA',
}[perm]
if player not in player_reset:
if player:
MapProperty.objects.filter(map=tile_map, user_id=player,
name__in=PERMISSIONS, value=entity).delete()
else:
MapProperty.objects.filter(map=tile_map, user__isnull=True,
name__in=PERMISSIONS, value=entity).delete()
player_reset.append(player)
if player:
MapProperty.objects.get_or_create(map=tile_map, user_id=player,
name=property_name, value=entity)[0].save()
else:
MapProperty.objects.get_or_create(map=tile_map, user__isnull=True,
name=property_name, value=entity)[0].save()
response = {
'status': 200,
'message': f'Map Permissions updates (len={len(permissions)})',
}
except Http404 as e:
response = {'status': 404, 'message': str(e) + f' (campaign={campaign_id}, map={map_id})'}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@csrf_exempt
@redirect_preflight
@require_basic_auth
@require_http_methods(["POST"])
def save_map(request, campaign_id, map_id):
try:
campaign = get_object_or_404(Campaign, campaign_id=campaign_id)
tile_map = Map.objects.get_or_create(campaign=campaign, map_id=map_id)[0]
json_data = request.body.decode('utf-8')
data = json.loads(json_data)
tile_map.name = data['name']
tile_map.data = json_data
tile_map.saved = timezone.now()
tile_map.save()
response = {
'status': 200,
'message': f'Map saved (name={tile_map.name}, id={map_id})',
'date': timezone.localtime(tile_map.saved).isoformat(timespec='microseconds'),
}
except Http404 as e:
response = {'status': 404, 'message': str(e)}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@csrf_exempt
@redirect_preflight
@require_basic_auth
@require_http_methods(["DELETE"])
def delete_map(request, campaign_id, map_id):
try:
tile_map = get_object_or_404(Map, campaign__campaign_id=campaign_id, map_id=map_id)
tile_map.delete()
response = {
'status': 200,
'message': f'Map deleted (name={tile_map.name}, id={map_id})',
}
except Http404 as e:
response = {'status': 404, 'message': str(e)}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@redirect_preflight
@require_basic_auth
@require_http_methods(["GET"])
def map_actions(request, campaign_id, map_id):
try:
tile_map = get_object_or_404(Map, campaign__campaign_id=campaign_id, map_id=map_id)
actions = tile_map.action_set.all().filter(created__gt=tile_map.saved)
date = timezone.localtime(
actions.last().created if actions else tile_map.saved).isoformat(timespec='microseconds')
response = {
'status': 200,
'message': f'Actions loaded (len={len(actions)})',
'date': date,
'actions': [json.loads(x.data) for x in actions],
}
except Http404 as e:
response = {'status': 404, 'message': str(e)}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@csrf_exempt
@redirect_preflight
@require_basic_auth
@require_http_methods(["POST"])
def update_actions(request, campaign_id, datetime_iso: str):
try:
campaign = get_object_or_404(Campaign, campaign_id=campaign_id)
data = request.body.decode('utf-8')
actions_post = json.loads(data)['actions'] if data else []
for action in actions_post:
if action.get('map'):
tile_map = get_object_or_404(Map, campaign=campaign, map_id=action['map'])
Action.objects.create(campaign=campaign, map=tile_map, user=request.user, data=json.dumps(action))
else:
Action.objects.create(campaign=campaign, user=request.user, data=json.dumps(action))
actions = Action.objects.filter(campaign=campaign, created__gt=datetime.fromisoformat(datetime_iso))
date = timezone.localtime(actions.last().created).isoformat(timespec='microseconds') if actions else datetime_iso
actions = list(actions.exclude(user=request.user))
response = {
'status': 200,
'message': f'Actions loaded (len={len(actions_post)}). Actions downloaded (len={len(actions)})',
'date': date,
'actions': [json.loads(x.data) for x in actions],
}
except Http404 as e:
response = {'status': 404, 'message': str(e)}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
@csrf_exempt
@redirect_preflight
@require_basic_auth
@require_http_methods(["DELETE"])
def reset_actions(request, campaign_id):
try:
campaign = get_object_or_404(Campaign, campaign_id=campaign_id)
actions = list(campaign.action_set.all())
for action in actions:
action.delete()
response = {
'status': 200,
'message': f'Actions deleted (len={len(actions)})',
}
except Http404 as e:
response = {'status': 404, 'message': str(e)}
except JSONDecodeError as e:
response = {'status': 400, 'message': "JSONDecodeError: " + str(e)}
except Exception as e:
response = {'status': 500, 'message': get_stacktrace_str(e)}
return JsonResponse(response, safe=False, status=response['status'])
|
# coding: utf-8
"""
Train a model.
How to use:
train_model.py <MODEL> <DATA> <BINS> <EPOCH>
- MODEL: model directory
- DATA: directory path to images
- BINS: bins per color channel
- EPOCH: total number of epoch (1 batch per epoch)
"""
import sys
# Parse cmd line args
if len(sys.argv) == 5:
_, NAME, DATA, BINS, EPOCH = sys.argv
else:
print(__doc__)
sys.exit(0)
import os
import time
import json
import numpy as np
import tensorflow as tf
from add_lib_to_path import *
from Lib.lib import calc_hist
data = tf.keras.preprocessing.image.DirectoryIterator(
DATA,
tf.keras.preprocessing.image.ImageDataGenerator(dtype=np.uint8),
target_size=(640,360),
class_mode='sparse',
batch_size=100,
dtype=np.uint8
)
model = tf.keras.models.load_model(NAME)
model.compile(
optimizer=tf.keras.optimizers.Adam(1e-3),
loss=tf.keras.losses.sparse_categorical_crossentropy,
metrics=["accuracy"]
)
t = str(int(time.time()))
basename, modelname = os.path.split(NAME)
training_logfile = tf.summary.create_file_writer(basename+"/logs_"+t)
with training_logfile.as_default():
for n, (images, labels) in enumerate(data):
histograms = calc_hist(images, int(BINS), print_trace=True)
training = model.fit(histograms, labels, batch_size=32, epochs=1)
tf.summary.scalar("loss", training.history['loss'][0], step=n)
tf.summary.scalar("accuracy", training.history['accuracy'][0], step=n)
if n==int(EPOCH): break
model.save(basename+"/model_"+t+".h5")
np.save(basename+"/classes.npy", os.listdir(DATA))
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import socket # UDP通信用
import threading # マルチスレッド用
import time # ウェイト時間用
import numpy as np # 画像データの配列用
# import libh264decoder # H.264のデコード用(自分でビルドしたlibh264decoder.so)
class Tello:
"""Telloドローンと通信するラッパークラス"""
def __init__(self, local_ip, local_port, imperial=False, command_timeout=.3, tello_ip='172.20.72.33', tello_port=8889):
"""
クラスの初期化.ローカルのIP/ポートをバインドし,Telloをコマンドモードにする.
:param local_ip (str): バインドする(UDPサーバにする)ローカルのIPアドレス
:param local_port (int): バインドするローカルのポート番号
:param imperial (bool): Trueの場合,速度の単位はマイル/時,距離の単位はフィート.
Falseの場合, 速度の単位はkm/h,距離はメートル.デフォルトはFalse
:param command_timeout (int|float): コマンドの応答を待つ時間.デフォルトは0.3秒.
:param tello_ip (str): TelloのIPアドレス.EDUでなければ192.168.10.1
:param tello_port (int): Telloのポート.普通は8889
"""
self.abort_flag = False # 中断フラグ
# self.decoder = libh264decoder.H264Decoder() # H.264のデコード関数を登録
self.command_timeout = command_timeout # タイムアウトまでの時間
self.imperial = imperial # 速度と距離の単位を選択
self.response = None # Telloが応答したデータが入る
self.frame = None # BGR並びのnumpy配列 -- カメラの出力した現在の画像
self.is_freeze = False # カメラ出力を一時停止(フリーズ)するかどうかのフラグ
self.last_frame = None # 一時停止時に出力する画像
self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # コマンド送受信のソケット
# self.socket_video = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # ビデオストリーム受信用のソケット
self.tello_address = (tello_ip, tello_port) # IPアドレスとポート番号のタプル(変更不可能)
self.local_video_port = 11111 # ビデオ受信のポート番号
self.last_height = 0 # get_heightで確認した最終の高度
self.socket.bind((local_ip, local_port)) # コマンド受信のUDPサーバのスタート(バインド)
# コマンドに対する応答の受信スレッド
self.receive_thread = threading.Thread(target=self._receive_thread) # スレッドの作成
self.receive_thread.daemon = True # メインプロセスの終了と一緒にスレッドが死ぬように設定
self.receive_thread.start() # スレッドスタート
# ビデオ受信の開始 -- コマンド送信: command, streamon
self.socket.sendto(b'command', self.tello_address) # 'command'を送信し,TelloをSDKモードに
print ('sent: command')
# self.socket.sendto(b'streamon', self.tello_address) # 'streamon'を送信し,ビデオのストリーミングを開始
# print ('sent: streamon')
# self.socket_video.bind((local_ip, self.local_video_port)) # ビデオ受信のUDPサーバのスタート(バインド)
# ビデオ受信のスレッド
# self.receive_video_thread = threading.Thread(target=self._receive_video_thread) # スレッドの作成
# self.receive_video_thread.daemon = True # メインプロセスの終了と一緒にスレッドが死ぬように設定
# self.receive_video_thread.start() # スレッドスタート
def __del__(self):
"""ローカルのソケットを閉じる"""
self.socket.close() # コマンド送受信のソケットを閉じる
# self.socket_video.close() # ビデオ受信のソケットを閉じる
# def read(self):
# """カメラで受信した最新の画像を返す"""
# if self.is_freeze: # 一時停止フラグがTrueのときは,保存してある画像を返す
# return self.last_frame
# else: # そうでないときは,最新の画像を返す
# return self.frame
# def video_freeze(self, is_freeze=True):
# """ビデオ出力の一時停止 -- is_freezeフラグをTrueにセットすること"""
# self.is_freeze = is_freeze # 一時停止フラグの状態をセット
# if is_freeze: # Trueのときは,現在の画像をlast_frameに保存しておく
# self.last_frame = self.frame
def _receive_thread(self):
"""
Telloからの応答を監視する
スレッドとして走らせる.Telloが最後に返した応答をself.responseに格納する
"""
while True:
try:
self.response, ip = self.socket.recvfrom(3000) # Telloからの応答を受信(最大3000バイトまで一度に受け取れる)
#print(self.response)
except socket.error as exc: # エラー時の処理
print ("Caught exception socket.error : %s" % exc)
# def _receive_video_thread(self):
"""
Telloからのビデオストリーミング(H.264のrawデータ)を監視する
スレッドとして走らせる.Telloから受信した最新の画像をself.frameに格納する
"""
packet_data = "" # 変数を初期化
while True:
try:
res_string, ip = self.socket_video.recvfrom(2048) # Telloからの画像データを受信(最大2048バイトまで一度に受け取れる)
packet_data += res_string # packet_dataに受信データを連結して1つの長いデータにする
# フレームの最後
if len(res_string) != 1460: # 受信データのバイト数が1460以外のとき,packet_dataをデコードしframeを得る.
for frame in self._h264_decode(packet_data): # デコードしたデータには何枚分かの画像が入っているので,枚数分繰り返す
self.frame = frame
packet_data = "" # 変数を初期化
except socket.error as exc:
print ("Caught exception socket.error : %s" % exc)
# def _h264_decode(self, packet_data):
"""
Telloから受信したH.264の生データをデコードする
:param packet_data: H.264のrawデータ
:return: デコードされた画像のリスト(複数枚の画像が入っていることもある)
"""
res_frame_list = [] # リストの初期化
frames = self.decoder.decode(packet_data) # packet_dataをデコードする
for framedata in frames: # 何枚分かの画像が入っているので,枚数分繰り返す
(frame, w, h, ls) = framedata # データの分解
if frame is not None: # frameの中身が空でないとき
# print 'frame size %i bytes, w %i, h %i, linesize %i' % (len(frame), w, h, ls)
frame = np.fromstring(frame, dtype=np.ubyte, count=len(frame), sep='') # 文字列データをnp.ubyte型の配列に作りなおす
frame = (frame.reshape((h, ls / 3, 3))) # RGBを考慮して3次元配列にする
frame = frame[:, :w, :] # 画像の幅のぶんだけ取り出し,右側のゴミは捨てる
res_frame_list.append(frame) # リストの要素として追加
return res_frame_list # 複数枚の画像が入ったリストとして返す
def send_command(self, command):
"""
Telloへコマンドを送信し,応答を待つ
:param command: 送信するコマンド
:return (str): Telloの応答
"""
print (">> send cmd: {}".format(command))
self.abort_flag = False # 中断フラグを倒す
timer = threading.Timer(self.command_timeout, self.set_abort_flag) # タイムアウト時間が立ったらフラグを立てるタイマースレッドを作成
self.socket.sendto(command.encode('utf-8'), self.tello_address) # コマンドを送信
timer.start() # スレッドスタート
while self.response is None: # タイムアウト前に応答が来たらwhile終了
if self.abort_flag is True: # タイムアウト時刻になったらブレイク
break
timer.cancel() # スレッド中断
if self.response is None: # 応答データが無い時
response = 'none_response'
else: # 応答データがあるとき
response = self.response.decode('utf-8')
self.response = None # _receive_threadスレッドが次の応答を入れてくれるので,ここでは空にしておく
return response # 今回の応答データを返す
def set_abort_flag(self):
"""
self.abort_flagのフラグをTrueにする
send_command関数の中のタイマーで呼ばれる.
この関数が呼ばれるということは,応答が来なくてタイムアウトした,ということ.
"""
self.abort_flag = True
def takeoff(self):
"""
離陸開始
Returns:
str: Telloからの応答.'OK'または'FALSE'.
"""
return self.send_command('takeoff')
def set_speed(self, speed):
"""
スピードを設定
この関数の引数にはkm/hかマイル/hを使う.
Tello APIは 1〜100 センチメートル/秒を使う
Metric: .1 to 3.6 km/h
Imperial: .1 to 2.2 Mile/h
Args:
speed (int|float): スピード
Returns:
str: Telloからの応答.'OK'または'FALSE'.
"""
speed = float(speed)
if self.imperial is True: # 単位系に応じて計算
speed = int(round(speed * 44.704)) # Mile/h -> cm/s
else:
speed = int(round(speed * 27.7778)) # km/h -> cm/s
return self.send_command('speed %s' % speed)
def rotate_cw(self, degrees):
"""
時計回りの旋回
Args:
degrees (int): 旋回角度, 1〜360度
Returns:
str: Telloからの応答.'OK'または'FALSE'.
"""
return self.send_command('cw %s' % degrees)
def rotate_ccw(self, degrees):
"""
反時計回りの旋回
Args:
degrees (int): 旋回角度, 1〜360度.
Returns:
str: Telloからの応答.'OK'または'FALSE'.
"""
return self.send_command('ccw %s' % degrees)
def flip(self, direction):
"""
宙返り
Args:
direction (str): 宙返りする方向の文字, 'l', 'r', 'f', 'b'.
Returns:
str: Telloからの応答.'OK'または'FALSE'.
"""
return self.send_command('flip %s' % direction)
def get_response(self):
"""
Telloの応答を返す
Returns:
int: Telloの応答
"""
response = self.response
return response
def get_height(self):
"""
Telloの高度(dm)を返す
Returns:
int: Telloの高度(dm)
"""
height = self.send_command('height?')
height = str(height)
print("Debug" + height)
height = filter(str.isdigit, height)
try:
height = int(height)
self.last_height = height
except:
height = self.last_height
pass
return height
def get_battery(self):
"""
バッテリー残量をパーセンテージで返す
Returns:
int: バッテリー残量のパーセンテージ
"""
battery = self.send_command('battery?')
try:
battery = int(battery)
except:
pass
return battery
def get_flight_time(self):
"""
飛行時間を秒数で返す
Returns:
int: 飛行の経過時間
"""
flight_time = self.send_command('time?')
try:
flight_time = int(flight_time)
except:
pass
return flight_time
def get_speed(self):
"""
現在のスピードを返す
Returns:
int: 現在スピード, km/h または Mile/h
"""
speed = self.send_command('speed?')
try:
speed = float(speed)
if self.imperial is True:
speed = round((speed / 44.704), 1) # cm/s -> mile/h
else:
speed = round((speed / 27.7778), 1) # cm/s -> km/h
except:
pass
return speed
def land(self):
"""
着陸を開始
Returns:
str: Telloからの応答.'OK'または'FALSE'.
"""
return self.send_command('land')
def move(self, direction, distance):
"""
direction の方向へ distance の距離だけ移動する.
この引数にはメートルまたはフィートを使う.
Tello API は 20〜500センチメートルを使う.
Metric: .02 〜 5 メートル
Imperial: .7 〜 16.4 フィート
Args:
direction (str): 移動する方向の文字列,'forward', 'back', 'right' or 'left'.
distance (int|float): 移動する距離.(メートルまたはフィート)
Returns:
str: Telloからの応答.'OK'または'FALSE'.
"""
distance = float(distance)
if self.imperial is True:
distance = int(round(distance * 30.48)) # feet -> cm
else:
distance = int(round(distance * 100)) # m -> cm
return self.send_command('%s %s' % (direction, distance))
def move_backward(self, distance):
"""
distance の距離だけ後進する.
Tello.move()のコメントを見ること.
Args:
distance (int): 移動する距離
Returns:
str: Telloからの応答.'OK'または'FALSE'.
"""
return self.move('back', distance)
def move_down(self, distance):
"""
distance の距離だけ降下する.
Tello.move()のコメントを見ること.
Args:
distance (int): 移動する距離
Returns:
str: Telloからの応答.'OK'または'FALSE'.
"""
return self.move('down', distance)
def move_forward(self, distance):
"""
distance の距離だけ前進する.
Tello.move()のコメントを見ること.
Args:
distance (int): 移動する距離
Returns:
str: Telloからの応答.'OK'または'FALSE'.
"""
return self.move('forward', distance)
def move_left(self, distance):
"""
distance の距離だけ左移動する.
Tello.move()のコメントを見ること.
Args:
distance (int): 移動する距離
Returns:
str: Telloからの応答.'OK'または'FALSE'.
"""
return self.move('left', distance)
def move_right(self, distance):
"""
distance の距離だけ右移動する.
Tello.move()のコメントを見ること.
Args:
distance (int): 移動する距離
Returns:
str: Telloからの応答.'OK'または'FALSE'.
"""
return self.move('right', distance)
def move_up(self, distance):
"""
distance の距離だけ上昇する.
Tello.move()のコメントを見ること.
Args:
distance (int): 移動する距離
Returns:
str: Telloからの応答.'OK'または'FALSE'.
"""
return self.move('up', distance) |
name = "PwnedPy"
import requests
import json
headers = {
'User-Agent': 'PwnedPy v1.0-May-2019'
}
def getBreaches(account, Truncated=False, Unverified=False):
params = (("truncateResponse", Truncated),("includeUnverified",Unverified))
account = str(account)
baseURL = "https://haveibeenpwned.com/api/v2/breachedaccount/"
url = baseURL + account
response = requests.get(url, headers=headers, params=params)
return response.json()
def getBreachesByDomain(account, domain, Truncated=False, Unverified=False):
params = (("domain", domain),("truncateResponse", Truncated),("includeUnverified",Unverified))
account = str(account)
domain = str(domain)
baseURL = "https://haveibeenpwned.com/api/v2/breachedaccount/"
url = baseURL + account
try:
response = requests.get(url, headers=headers, params=params)
except:
print("Are you sure your inputs were valid?")
return response.json()
def getAllBreaches(domain=""):
params = (("domain",domain),)
url = "https://haveibeenpwned.com/api/v2/breaches"
response = requests.get(url, headers=headers, params=params)
return response.json()
def getPastes(account):
account = str(account)
baseURL = "https://haveibeenpwned.com/api/v2/pasteaccount/"
url = baseURL + account
print(account + "\n" + url)
response = requests.get(url, headers=headers)
return response.json()
|
import struct
import unittest
import json
from manticore.platforms import evm
from manticore.core import state
from manticore.core.smtlib import Operators, ConstraintSet
import os
class EVMTest_SLT(unittest.TestCase):
_multiprocess_can_split_ = True
maxDiff = None
def _execute(self, new_vm):
last_returned = None
last_exception = None
try:
new_vm.execute()
except evm.Stop as e:
last_exception = "STOP"
except evm.NotEnoughGas:
last_exception = "OOG"
except evm.StackUnderflow:
last_exception = "INSUFFICIENT STACK"
except evm.InvalidOpcode:
last_exception = "INVALID"
except evm.SelfDestruct:
last_exception = "SUICIDED"
except evm.Return as e:
last_exception = "RETURN"
last_returned = e.data
except evm.Revert:
last_exception = "REVERT"
return last_exception, last_returned
def test_SLT_1(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_2(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
new_vm._push(0)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_3(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
new_vm._push(1)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_4(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_5(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_6(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
new_vm._push(16)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_7(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
new_vm._push(32)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_8(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
new_vm._push(48)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_9(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
new_vm._push(6089590155545428825848686802984512581899718912)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_10(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(0)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_11(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(0)
new_vm._push(0)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_12(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(0)
new_vm._push(1)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_13(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(0)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_14(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(0)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_15(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(0)
new_vm._push(16)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_16(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(0)
new_vm._push(32)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_17(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(0)
new_vm._push(48)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_18(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(0)
new_vm._push(6089590155545428825848686802984512581899718912)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_19(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(1)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_20(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(1)
new_vm._push(0)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_21(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(1)
new_vm._push(1)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_22(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(1)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_23(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(1)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_24(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(1)
new_vm._push(16)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_25(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(1)
new_vm._push(32)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_26(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(1)
new_vm._push(48)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_27(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(1)
new_vm._push(6089590155545428825848686802984512581899718912)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_28(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_29(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
new_vm._push(0)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_30(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
new_vm._push(1)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_31(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_32(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_33(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
new_vm._push(16)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_34(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
new_vm._push(32)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_35(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
new_vm._push(48)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_36(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
new_vm._push(6089590155545428825848686802984512581899718912)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_37(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_38(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
new_vm._push(0)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_39(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
new_vm._push(1)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_40(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_41(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_42(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
new_vm._push(16)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_43(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
new_vm._push(32)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_44(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
new_vm._push(48)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_45(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
new_vm._push(6089590155545428825848686802984512581899718912)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_46(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(16)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_47(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(16)
new_vm._push(0)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_48(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(16)
new_vm._push(1)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_49(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(16)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_50(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(16)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_51(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(16)
new_vm._push(16)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_52(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(16)
new_vm._push(32)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_53(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(16)
new_vm._push(48)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_54(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(16)
new_vm._push(6089590155545428825848686802984512581899718912)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_55(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(32)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_56(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(32)
new_vm._push(0)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_57(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(32)
new_vm._push(1)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_58(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(32)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_59(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(32)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_60(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(32)
new_vm._push(16)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_61(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(32)
new_vm._push(32)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_62(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(32)
new_vm._push(48)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_63(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(32)
new_vm._push(6089590155545428825848686802984512581899718912)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_64(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(48)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_65(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(48)
new_vm._push(0)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_66(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(48)
new_vm._push(1)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_67(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(48)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_68(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(48)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_69(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(48)
new_vm._push(16)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_70(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(48)
new_vm._push(32)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_71(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(48)
new_vm._push(48)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_72(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(48)
new_vm._push(6089590155545428825848686802984512581899718912)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_73(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(6089590155545428825848686802984512581899718912)
new_vm._push(115792089237316195423570985008687907853269984665640564039457584007913129639935)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_74(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(6089590155545428825848686802984512581899718912)
new_vm._push(0)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_75(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(6089590155545428825848686802984512581899718912)
new_vm._push(1)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_76(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(6089590155545428825848686802984512581899718912)
new_vm._push(57896044618658097711785492504343953926634992332820282019728792003956564819952)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_77(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(6089590155545428825848686802984512581899718912)
new_vm._push(3618502788666131106986593281521497120414687020801267626233049500247285301263)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
def test_SLT_78(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(6089590155545428825848686802984512581899718912)
new_vm._push(16)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_79(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(6089590155545428825848686802984512581899718912)
new_vm._push(32)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_80(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(6089590155545428825848686802984512581899718912)
new_vm._push(48)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [1])
def test_SLT_81(self):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
address = 0x222222222222222222222222222222222222200
caller = origin = 0x111111111111111111111111111111111111100
price = 0
value = 10000
bytecode = b"\x12"
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
header = {"coinbase": 0, "timestamp": 0, "number": 0, "difficulty": 0, "gaslimit": 0}
gas = 1000000
new_vm = evm.EVM(constraints, address, data, caller, value, bytecode, gas=gas, world=world)
new_vm._push(6089590155545428825848686802984512581899718912)
new_vm._push(6089590155545428825848686802984512581899718912)
last_exception, last_returned = self._execute(new_vm)
self.assertEqual(last_exception, None)
self.assertEqual(new_vm.pc, 1)
self.assertEqual(new_vm.stack, [0])
if __name__ == "__main__":
unittest.main()
|
import numpy as np
class ExternalIndex:
def __init__(self, groundtruth, clusters):
self.ground = groundtruth
self.clusters = clusters
self.ground_incidence_matrix = self.incidence_matrix(self.ground)
self.cluster_incidence_matrix = self.incidence_matrix(self.clusters)
self.M11, self.M00, self.M10, self.M01 \
= self.categories(self.ground_incidence_matrix, self.cluster_incidence_matrix)
def incidence_matrix(self, clusters):
N = clusters.shape[0]
matrix = np.zeros((N, N), dtype='int')
for i in range(clusters.shape[0]):
for j in range(i + 1, clusters.shape[0]):
if (clusters[i] == clusters[j]) and (clusters[i] != -1 or clusters[j] != -1):
matrix[i][j] = matrix[j][i] = 1
return matrix
def categories(self, ground_incidence_matrix, cluster_incidence_matrix):
M11 = M00 = M10 = M01 = 0
for i in range(cluster_incidence_matrix.shape[0]):
for j in range(cluster_incidence_matrix.shape[0]):
if cluster_incidence_matrix[i][j] == ground_incidence_matrix[i][j] == 1:
M11 = M11 + 1
elif cluster_incidence_matrix[i][j] == ground_incidence_matrix[i][j] == 0:
M00 = M00 + 1
elif cluster_incidence_matrix[i][j] == 1 and ground_incidence_matrix[i][j] == 0:
M10 = M10 + 1
elif cluster_incidence_matrix[i][j] == 0 and ground_incidence_matrix[i][j] == 1:
M01 = M01 + 1
return M11, M00, M10, M01
def rand_index(self):
rand_index = float(self.M11 + self.M00)/float(self.M11 + self.M00 + self.M10 + self.M01)
return rand_index
def jaccard_coefficient(self):
jaccard_coefficient = float(self.M11) / float(self.M11 + self.M10 + self.M01)
return jaccard_coefficient
|
from Mementos import Memento, EflowMemento
from Originators import Originator, EflowOriginator
from Memento_models import Eflow
class Caretaker:
def __init__(self):
self.store = {}
def add(self, key="", memento=Memento):
self.store[key] = memento
print("儲存一張表單! 建立日期{0},內容: {1}".format(
memento.eflow.createOn, memento.eflow.formData))
def get(self, key=""):
restoredMemento = self.store[key]
print("回存一張表單! 建立日期{0},內容: {1}".format(
restoredMemento.eflow.createOn, restoredMemento.eflow.formData))
return restoredMemento
|
#!/usr/bin/env python
import glob, os
path_data = "/home/sj/Desktop/Logs/Labeled/current/"
# Percentage of images to be used for the test set
percentage_test = 5;
file_train = open(path_data+'train.txt', 'w')
file_test = open(path_data+'test.txt', 'w')
# Populate train.txt and test.txt
counter = 1
index_test = round(100 / percentage_test)
for pathAndFilename in glob.iglob(os.path.join(path_data, "*.jpg")):
print(pathAndFilename)
title, ext = os.path.splitext(os.path.basename(pathAndFilename))
if counter == index_test:
counter = 1
file_test.write(path_data + title + '.jpg' + "\n")
else:
file_train.write(path_data + title + '.jpg' + "\n")
counter = counter + 1
|
# (c) 2021 Ruggero Rossi
# Load a Robosoc2d game state log
# supported version: 1.0.0
def load_state_log(file_name):
history = None
with open(file_name, 'r') as f:
game={}
version=f.readline()
if len(version)==0 :
return None
game['ver']=version
game['team1_name']=f.readline().strip()
if len(game['team1_name']) == 0:
game['team1_name'] = "Team A"
game['team2_name']=f.readline().strip()
if len(game['team2_name']) == 0:
game['team2_name'] = "Team B"
players=f.readline()
if len(players)==0 :
return None
players= players.split(',')
if len(players)<2:
return None
game['n_players']=[]
if players[0].isdigit():
game['n_players'].append(int(players[0]))
else:
return None
players[1]=players[1].strip('\n')
if players[1].isdigit():
game['n_players'].append(int(players[1]))
else:
return None
settings=f.readline()
if len(settings)==0 :
return None
settings=settings.split(',')
if len(settings) < 34 :
return None
sett={}
sett['ticks_per_time']=int(settings[0])
sett['pitch_length']=float(settings[1])
sett['pitch_width']=float(settings[2])
sett['goal_width']=float(settings[3])
sett['center_radius']=float(settings[4])
sett['pole_radius']=float(settings[5])
sett['ball_radius']=float(settings[6])
sett['player_radius']=float(settings[7])
sett['catch_radius']=float(settings[8])
sett['catch_holding_ticks']=int(settings[9])
sett['kick_radius']=float(settings[10])
sett['kickable_distance']=float(settings[11])
sett['catchable_distance']=float(settings[12])
sett['kickable_angle']=float(settings[13])
sett['kickable_direction_angle']=float(settings[14])
sett['catchable_angle']=float(settings[15])
sett['net_length']=float(settings[16])
sett['catchable_area_length']=float(settings[17])
sett['catchable_area_width']=float(settings[18])
sett['corner_min_distance']=float(settings[19])
sett['throwin_min_distance']=float(settings[20])
sett['out_pitch_limit']=float(settings[21])
sett['max_dash_power']=float(settings[22])
sett['max_kick_power']=float(settings[23])
sett['player_velocity_decay']=float(settings[24])
sett['ball_velocity_decay']=float(settings[25])
sett['max_player_speed']=float(settings[26])
sett['max_ball_speed']=float(settings[27])
sett['catch_probability']=float(settings[28])
sett['player_random_noise']=float(settings[29])
sett['player_direction_noise']=float(settings[30])
sett['player_velocity_direction_mix']=float(settings[31])
sett['ball_inside_player_velocity_displace']=float(settings[32])
sett['after_catch_distance']=float(settings[33].strip('\n'))
game['sett']=sett
ticks=[]
min_line_len=offset=8+game['n_players'][0]*5+game['n_players'][1]*5+4
default_empty=[0]*min_line_len
prev_tick=default_empty
for tick in f:
tick=tick.split(',')
if len(tick) < min_line_len:
print("* error: missing data at tick: "+str(len(ticks)))
tick=prev_tick
t={}
t['score1']=int(tick[1])
t['score2']=int(tick[2])
t['state']=int(tick[3])
t['ball_x']=float(tick[4])
t['ball_y']=float(tick[5])
t['ball_velocity_x']=float(tick[6])
t['ball_velocity_y']=float(tick[7])
t['teams']=[[],[]]
offset=game['n_players'][0]*5
for which_team in range(2):
for i in range(game['n_players'][which_team]):
p={}
p['x']=float(tick[i*5+8+offset*which_team])
p['y']=float(tick[i*5+9+offset*which_team])
p['velocity_x']=float(tick[i*5+10+offset*which_team])
p['velocity_y']=float(tick[i*5+11+offset*which_team])
p['direction']=float(tick[i*5+12+offset*which_team])
t['teams'][which_team].append(p)
offset=(game['n_players'][0]+game['n_players'][1])*5
t['last_touched_team2']=bool(int(tick[8+offset]))
t['starting_team_max_range']=float(tick[9+offset])
t['ball_catched']=int(tick[10+offset])
t['ball_catched_team2']=bool(int(tick[11+offset].strip('\n')))
ticks.append(t)
prev_tick=tick
game['ticks']=ticks
history=game
return history |
# Modified by Microsoft Corporation.
# Licensed under the MIT license.
import json
import random
import sys
import torch
from torch.autograd import Variable
class DatasetWoz(object):
'''
data container for woz dataset
'''
def __init__(self, config, percentage=1.0, use_cuda=False):
# setup
feat_file = config['DATA']['feat_file']
text_file = config['DATA']['text_file']
dataSplit_file = config['DATA']['dataSplit_file']
vocab_file = config['DATA']['vocab_file']
template_file = config['DATA']['template_file']
self.template = template_file # for further scoring
self.USE_CUDA = use_cuda
# hyper-params
self.batch_size = config.getint('DATA', 'batch_size')
self.percentage = percentage # percentage of data used
self.data = {'train':[],'valid':[],'test':[]}
self.data_index = {'train': 0, 'valid': 0, 'test': 0} # index for accessing data
self.n_batch = {}
self.shuffle = config.getboolean('DATA', 'shuffle')
# load vocab from file
self._loadVocab(vocab_file) # a list of vocab, andy
# set input feature cardinality
self._setCardinality(template_file)
self.do_size = self.dfs[1] - self.dfs[0]
self.da_size = self.dfs[2] - self.dfs[1]
self.sv_size = self.dfs[3] - self.dfs[2]
# initialise dataset
self._setupData(text_file, feat_file, dataSplit_file)
self.reset()
def reset(self):
self.data_index = {'train': 0, 'valid': 0, 'test': 0}
if self.shuffle:
random.shuffle(self.data['train'])
def next_batch(self, data_type='train'):
def indexes_from_sentence(sentence, add_eos=False):
indexes = [self.word2index[word] if word in self.word2index else self.word2index['UNK_token'] for word in sentence.split(' ')]
if add_eos:
return indexes + [self.word2index['EOS_token']]
else:
return indexes
# Pad a with the PAD symbol
def pad_seq(seq, max_length):
seq += [self.word2index['PAD_token'] for i in range(max_length - len(seq))]
return seq
# turn list of word indexes into 1-hot matrix
def getOneHot(indexes):
res = []
for index in indexes:
hot = [0]*len(self.word2index)
hot[index] = 1
res.append(hot)
return res
# reading a batch
start = self.data_index[data_type]
end = self.data_index[data_type] + self.batch_size
data = self.data[data_type][start:end]
self.data_index[data_type] += self.batch_size
sentences, refs, feats, featStrs = [], [], [], []
# do_label, da_label, sv_label, sv_seqs = [], [], [], []
sv_indexes = []
for dial_idx, turn_idx, text, meta in data:
text_ori, text_delex = text['ori'], text['delex']
sentences.append(indexes_from_sentence(text_delex, add_eos=True))
refs.append(text_delex)
# get semantic feature
do_idx, da_idx, sv_idx, featStr = self.getFeatIdx(meta)
do_cond = [1 if i in do_idx else 0 for i in range(self.do_size)] # domain condition
da_cond = [1 if i in da_idx else 0 for i in range(self.da_size)] # dial act condition
sv_cond = [1 if i in sv_idx else 0 for i in range(self.sv_size)] # slot/value condition
feats.append(do_cond + da_cond + sv_cond)
featStrs.append(featStr)
# # get labels for da, slots
sv_indexes.append(sv_idx)
# Zip into pairs, sort by length (descending), unzip
# Note: _words and _seqs should be sorted in the same order
seq_pairs = sorted(zip(sentences, refs, feats, featStrs, sv_indexes), key=lambda p: len(p[0]), reverse=True)
sentences, refs, feats, featStrs, sv_indexes = zip(*seq_pairs)
# Pad with 0s to max length
lengths = [len(s) for s in sentences]
sentences_padded = [pad_seq(s, max(lengths)) for s in sentences]
# Turn (batch_size, max_len) into (batch_size, max_len, n_vocab)
sentences = [getOneHot(s) for s in sentences_padded]
input_var = Variable(torch.FloatTensor(sentences))
label_var = Variable(torch.LongTensor(sentences_padded))
feats_var = Variable(torch.FloatTensor(feats))
if self.USE_CUDA:
input_var = input_var.cuda()
label_var = label_var.cuda()
feats_var = feats_var.cuda()
return input_var, label_var, feats_var, lengths, refs, featStrs, sv_indexes
def _setCardinality(self, template_file):
self.cardinality = []
with open(template_file) as f:
self.dfs = [0,0,0,0]
for line in f.readlines():
self.cardinality.append(line.replace('\n',''))
if line.startswith('d:'):
self.dfs[1]+=1
elif line.startswith('d-a:'):
self.dfs[2]+=1
elif line.startswith('d-a-s-v:'):
self.dfs[3]+=1
for i in range(0, len(self.dfs)-1):
self.dfs[i+1] = self.dfs[i] + self.dfs[i+1]
def printDataInfo(self):
print('***** DATA INFO *****')
print('Using {}% of training data'.format(self.percentage*100))
print('BATCH SIZE:', self.batch_size)
print('Train:', len(self.data['train']), 'turns')
print('Valid:', len(self.data['valid']), 'turns')
print('Test:', len(self.data['test']), 'turns')
print('# of turns', file=sys.stderr)
print('Train:', len(self.data['train']), file=sys.stderr)
print('Valid:', len(self.data['valid']), file=sys.stderr)
print('Test:', len(self.data['test']), file=sys.stderr)
print('# of batches: Train {} Valid {} Test {}'.format(self.n_batch['train'], self.n_batch['valid'], self.n_batch['test']))
print('# of batches: Train {} Valid {} Test {}'.format(self.n_batch['train'], self.n_batch['valid'], self.n_batch['test']), file=sys.stderr)
print('*************************\n')
def _setupData(self, text_file, feat_file, dataSplit_file):
with open(text_file) as f:
dial2text = json.load(f)
with open(feat_file) as f:
dial2meta = json.load(f)
with open(dataSplit_file) as f:
dataSet_split = json.load(f)
for data_type in ['train', 'valid', 'test']:
for dial_idx, turn_idx, _ in dataSet_split[data_type]:
# might have empty feat turn which is not in feat file
if turn_idx not in dial2meta[dial_idx]:
continue
meta = dial2meta[dial_idx][turn_idx]
text = dial2text[dial_idx][turn_idx]
self.data[data_type].append((dial_idx, turn_idx, text, meta))
# percentage of training data
if self.percentage < 1:
_len = len(self.data['train'])
self.data['train'] = self.data['train'][:int(_len*self.percentage)]
# setup number of batch
for _type in ['train', 'valid', 'test']:
self.n_batch[_type] = len(self.data[_type]) // self.batch_size
self.printDataInfo()
def _loadVocab(self,vocab_file):
# load vocab
self.word2index = {}
self.index2word = {}
idx = 0
with open(vocab_file) as fin:
for word in fin.readlines():
word = word.strip().split('\t')[0]
self.word2index[word] = idx
self.index2word[idx] = word
idx += 1
def getFeatIdx(self, meta):
feat_container = []
do_idx, da_idx, sv_idx = [], [], []
for da, slots in meta.items():
do = da.split('-')[0]
_do_idx = self.cardinality.index('d:'+do) - self.dfs[0]
if _do_idx not in do_idx:
do_idx.append(_do_idx)
da_idx.append( self.cardinality.index('d-a:'+da) - self.dfs[1] )
for _slot in slots: # e.g. ('Day', '1', 'Wednesday ')
sv_idx.append( self.cardinality.index('d-a-s-v:'+da+'-'+_slot[0]+'-'+_slot[1]) - self.dfs[2] )
feat_container.append( da+'-'+_slot[0]+'-'+_slot[1] )
feat_container = sorted(feat_container) # sort SVs across DAs to make sure universal order
feat = '|'.join(feat_container)
return do_idx, da_idx, sv_idx, feat
class SimpleDatasetWoz(DatasetWoz):
def __init__(self, config):
vocab_file = config['DATA']['vocab_file']
template_file = config['DATA']['template_file']
self.batch_size = 1
# load vocab from file
self._loadVocab(vocab_file) # a list of vocab, andy
# set input feature cardinality
self._setCardinality(template_file)
self.do_size = self.dfs[1] - self.dfs[0]
self.da_size = self.dfs[2] - self.dfs[1]
self.sv_size = self.dfs[3] - self.dfs[2]
|
#!/usr/bin/env python3
import tpmdata
import multiprocessing
import pprint
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import dates
from astropy.time import Time
from argparse import ArgumentParser
from matplotlib import animation
import astropy.units as u
__version__ = '3.0.1'
tpmdata.tinit()
def get_tpm_packet(out_dict):
data = tpmdata.packet(1, 1)
for key, val in data.items():
out_dict[key] = val
return 0
class StripChart:
def __init__(self, key, fig, ax):
self.key = key
# self.fig = plt.figure(figsize=(6, 4))
# self.ax = self.fig.gca()
self.fig = fig
self.ax = ax
self.formatter = dates.DateFormatter('%H:%M')
data = multiprocessing.Manager().dict()
tpm_thread = multiprocessing.Process(
target=get_tpm_packet, args=(data,))
tpm_thread.start()
tpm_thread.join(2)
if tpm_thread.is_alive():
tpm_thread.kill()
raise ConnectionError("Could not reach TPM")
self.t0 = Time.now()
self.times = Time([data['ctime']], format='unix')
self.values = np.array([data[self.key]])
self.line = plt.plot(self.times.plot_date, self.values)
self.ax.xaxis.set_major_formatter(self.formatter)
# self.fig.canvas.show()
# plt.draw()
def update(self, i):
data = multiprocessing.Manager().dict()
tpm_thread = multiprocessing.Process(
target=get_tpm_packet, args=(data,))
tpm_thread.start()
tpm_thread.join(2)
if tpm_thread.is_alive():
tpm_thread.kill()
raise ConnectionError("Could not reach TPM")
self.times = Time(np.append(self.times, Time(data['ctime'],
format='unix')))
self.values = np.append(self.values, data[self.key])
sorter = np.argsort(self.times)
self.times = self.times[sorter]
self.values = self.values[sorter]
cutoff = self.times >= self.t0
self.times = self.times[cutoff]
self.values = self.values[cutoff]
if self.times.shape == (0,):
print('No times to plot')
return
self.ax.clear()
# print(self.times.to_datetime(), self.values)
self.ax.plot(self.times.to_datetime(), self.values, linewidth=3,
label=self.key)
self.ax.xaxis.set_major_formatter(self.formatter)
self.ax.axhline(self.values[0], c='r', linewidth=1,
label=f'Initial Value {self.key}')
self.ax.legend()
def parseargs():
parser = ArgumentParser(description='A tool to create strip charts using'
' the TPM')
parser.add_argument('-c', '--channels', nargs='+', default=['dewar_sp1_lb'],
help='Channel(s) to query and print')
parser.add_argument('-p', '--plot', action='store_true',
help='Channel(s) to plot')
parser.add_argument('-v', '--verbose', action='store_true')
parser.add_argument('--version', action='store_true')
parser.add_argument('--dt', nargs=1, type=float, default=5,
help='Time interval between prints (used with'
' --channels)')
parser.add_argument('--list-channels', dest='list_channels',
action='store_true',
help='Prints a list of all queriable channels')
args = parser.parse_args()
return args
def main(args=None):
if args is None:
args = parseargs()
if args.list_channels:
args.channels = []
if args.version:
print(__version__)
if args.list_channels:
data = multiprocessing.Manager().dict()
tpm_thread = multiprocessing.Process(
target=get_tpm_packet, args=(data,))
tpm_thread.start()
tpm_thread.join(2)
if tpm_thread.is_alive():
tpm_thread.kill()
raise ConnectionError("Could not reach TPM")
pprint.pprint(data.keys())
if args.plot:
charts = []
anis = []
for channel in args.channels:
fig = plt.figure(figsize=(6, 4))
ax = fig.add_subplot(1, 1, 1)
chart = StripChart(channel, fig, ax)
print(args.dt * 1000)
anis.append(animation.FuncAnimation(fig, chart.update,
interval=args.dt * 1000))
charts.append(chart)
print('Close the plots to get a table feed')
plt.show()
if args.channels:
print()
print(f"{'Time':10}" + ''.join([' {:<12}'.format(channel)
for channel in args.channels]))
while True:
data = multiprocessing.Manager().dict()
tpm_thread = multiprocessing.Process(
target=get_tpm_packet, args=(data,))
tpm_thread.start()
tpm_thread.join(2)
if tpm_thread.is_alive():
tpm_thread.kill()
raise ConnectionError("Could not reach TPM")
old_t = Time(data['ctime'], format='unix')
new_t = old_t
loop_cond = True
while loop_cond:
data = multiprocessing.Manager().dict()
tpm_thread = multiprocessing.Process(
target=get_tpm_packet, args=(data,))
tpm_thread.start()
tpm_thread.join(2)
if tpm_thread.is_alive():
tpm_thread.kill()
raise ConnectionError("Could not reach TPM")
new_t = Time(data['ctime'], format='unix')
# print((new_t - old_t).to(u.s))
loop_cond = (new_t - old_t) < (args.dt * u.s)
print(f'{new_t.isot[11:19]:<10}' + ''.join([' {:12}'.format(
data[channel]) for channel in args.channels]))
if __name__ == '__main__':
main()
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import operator
base = "L4, R2, R4, L5, L3, L1, R4, R5, R1, R3, L3, L2, L2, R5, R1, L1, L2, R2, R2, L5, R5, R5, L2, R1, R2, L2, L4, L1, R5, R2, R1, R1, L2, L3, R2, L5, L186, L5, L3, R3, L5, R4, R2, L5, R1, R4, L1, L3, R3, R1, L1, R4, R2, L1, L4, R5, L1, R50, L4, R3, R78, R4, R2, L4, R3, L4, R4, L1, R5, L4, R1, L2, R3, L2, R5, R5, L4, L1, L2, R185, L5, R2, R1, L3, R4, L5, R2, R4, L3, R4, L2, L5, R1, R2, L2, L1, L2, R2, L2, R1, L5, L3, L4, L3, L4, L2, L5, L5, R2, L3, L4, R4, R4, R5, L4, L2, R4, L5, R3, R1, L1, R3, L2, R2, R1, R5, L4, R5, L3, R2, R3, R1, R4, L4, R1, R3, L5, L1, L3, R2, R1, R4, L4, R3, L3, R3, R2, L3, L3, R4, L2, R4, L3, L4, R5, R1, L1, R5, R3, R1, R3, R4, L1, R4, R3, R1, L5, L5, L4, R4, R3, L2, R1, R5, L3, R4, R5, L4, L5, R2"
coordinates = [0,0]
axe = 0
path = [coordinates]
#Internal use
_dir = [[0,1],[1,0],[0,-1],[-1,0]]
_reg = re.compile('([LR])([0-9]*)')
#Preparation
inputs = base.split(', ')
for input in inputs:
#Extraction
result = _reg.match(input)
#Direction
axe += 1 if result.group(1) == "L" else -1
axe = axe % 4
#Distance
dist=int(result.group(2))
#Parcourt du trajet
for i in range(dist):
coordinates = map(operator.add, coordinates, _dir[axe])
if coordinates in path:
print("Distance = {}".format(sum(map(abs,coordinates))))
quit()
else:
path.append(coordinates)
|
import sys
import os
import pytest
import pandas as pd
import arcus.ml.timeseries.timeops as tops
import arcus.ml.dataframes as adf
import logging
from unittest.mock import patch
logging.basicConfig(level=logging.DEBUG)
mylogger = logging.getLogger()
time_series_df = pd.read_csv('tests/resources/datasets/sunspots.csv')
def test_time_slice_default():
df = adf.to_timeseries( time_series_df, 'Date')
slice_df = tops.time_slice(df, 'Date')
assert slice_df.shape == (30, 3)
#df = tops.time_slice(df, '')
def test_time_slice_start():
df = adf.to_timeseries( time_series_df, 'Date')
slice_df = tops.time_slice(df, 'Date', start='01/02/2001')
assert slice_df.shape == (30, 3)
slice_df = tops.time_slice(df, 'Date', start='01/01/2018')
assert slice_df.shape == (5, 3)
def test_time_slice_end():
df = adf.to_timeseries( time_series_df, 'Date')
slice_df = tops.time_slice(df, 'Date', end='01/02/2020')
assert slice_df.shape == (30, 3)
slice_df = tops.time_slice(df, 'Date', end='01/01/2017')
assert slice_df.shape == (13, 3)
def test_time_slice_both():
df = adf.to_timeseries( time_series_df, 'Date')
slice_df = tops.time_slice(df, 'Date', start = '01/01/2001', end='01/02/2020')
assert slice_df.shape == (30, 3)
slice_df = tops.time_slice(df, 'Date', start='01/01/2016', end='01/01/2017')
assert slice_df.shape == (12, 3) |
import geopandas as gpd
# GeoDataFrame creation
file = 'constituencies.shp'
poly = gpd.read_file(file)
points = poly.copy()
# change the geometry
# points.geometry = points['geometry'].centroid
points.to_crs(epsg=4326, inplace=True)
# same crs #points.crs =poly.crs
# print(points['geometry'])
for index, row in points.iterrows():
conid = row['PCON20CD']
conname = row['PCON20NM']
lat = row['LAT']
lon = row['LONG']
# centroid_lat = str(row['geometry'].x)
# centroid_lon = str(row['geometry'].y)
print ( conid + "|" + conname + "|" + str(lat) + "|" + str(lon) )
|
import unittest
import kpf
from textwrap import dedent
from kpf.patch import sha256
def readBinary(fn):
with open(fn,"rb") as f:
return bytearray(f.read())
class KPFTests(unittest.TestCase):
def test_record_parse(self):
r = kpf.Record.fromLine("00000002=02")
self.assertEqual(type(r),kpf.Record)
self.assertEqual(r.address,2)
self.assertEqual(r.value,2)
self.assertIsNone(r.compare)
def test_patch_parse(self):
patches = kpf.parse(dedent("""\
.patch
.name NOP the check for XYZ encoding
00003033=0x00
.endpatch"""))
self.assertEqual(len(patches),1)
self.assertEqual(patches[0].name,"NOP the check for XYZ encoding")
self.assertIsNone(patches[0].hash)
self.assertEqual(patches[0].records[0].address,0x3033)
self.assertEqual(patches[0].records[0].value,0)
def test_patch_text(self):
patch1 = kpf.Patch("Test case")
patch1.records=[]
patch1.records.append(kpf.Record.fromLine("0002=02"))
self.assertEqual(patch1.text,".patch\n.name Test case\n00000002=02\n.endpatch")
if __name__=="__main__": unittest.main()
|
#!/usr/bin/env python3
#
# Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
#
import logging
import os
import sys
from argparse import ArgumentParser, SUPPRESS
import matplotlib.pyplot as plt
import numpy as np
def build_argparser():
parser = ArgumentParser(add_help=False)
args = parser.add_argument_group('Options')
args.add_argument('-h', '--help', action='help', default=SUPPRESS,
help='Show this help message and exit.')
args.add_argument('-i', '--input',
help='Required. Path to seismic datafolder.',
required=True, type=str)
args.add_argument('-o', '--output',
help='Required. Path to save seismic interpretations.',
default='visualization', type=str)
args.add_argument('-m', '--model_type',
help='Type of model task.',
choices=['facies', 'salt', 'fault'],
type=str, default='facies')
args.add_argument('-t', '--slice_type',
help='Type of slice .',
choices=['inline', 'crossline', 'timeline'],
type=str, default='crossline')
args.add_argument('-s', '--slice_no',
help='Index of slice .',
type=int, default=0)
return parser
def get_logger(dir_path):
''' Setting up Logging and return logger.'''
INFO = 5
logging.addLevelName(INFO, 'VISUALIZATION')
def info(self, message, *args, **kws):
self.log(INFO, message, *args, **kws)
logging.Logger.info = info
logging.basicConfig(format='[%(levelname)s] %(message)s',
handlers=[logging.FileHandler(os.path.join(dir_path, 'info.log')),
logging.StreamHandler(sys.stdout)]
)
logger = logging.getLogger('visualization')
logger.setLevel(INFO)
return logger
def decode_segmap(label_mask):
"""Decode segmentation class labels into a color image
Args:
label_mask (np.ndarray): an (M,N) array of integer values denoting
the class label at each spatial location.
plot (bool, optional): whether to show the resulting color image
in a figure.
Returns:
(np.ndarray, optional): the resulting decoded color image.
"""
label_colours = np.asarray([[69, 117, 180], [145, 191, 219],
[224, 243, 248], [254, 224, 144],
[252, 141, 89], [215, 48, 39]])
r = label_mask.copy()
g = label_mask.copy()
b = label_mask.copy()
for ll in range(0, len(label_colours)):
r[label_mask == ll] = label_colours[ll, 0]
g[label_mask == ll] = label_colours[ll, 1]
b[label_mask == ll] = label_colours[ll, 2]
rgb = np.zeros((label_mask.shape[0], label_mask.shape[1], 3))
rgb[:, :, 0] = r / 255.0
rgb[:, :, 1] = g / 255.0
rgb[:, :, 2] = b / 255.0
return rgb
def show_facies_interpretation(args, labels):
from matplotlib.colors import LinearSegmentedColormap
res_image = decode_segmap(labels.squeeze())
color_list = np.asarray([[69, 117, 180], [145, 191, 219],
[224, 243, 248], [254, 224, 144],
[252, 141, 89], [215, 48, 39]]) / 255
cm = LinearSegmentedColormap.from_list('custom_cmap', color_list, N=6)
fig = plt.figure()
ax = plt.subplot()
fig.suptitle("Facies classification results", fontsize=22)
im = ax.imshow(res_image, cmap=cm)
ax.set_title('Interpretation of the slice')
cbaxes = fig.add_axes([0.81, 0.2, 0.01, 0.6])
cb = fig.colorbar(im, ax=ax, cax=cbaxes,
ticks=[0.23, 0.36, 0.5, 0.65, 0.78, 0.93])
cb.ax.set_yticklabels(['upper_ns', 'middle_ns', 'lower_ns',
'rijnland_chalk', 'scruff', 'zechstein'],
fontsize=9, ha="left")
plt.savefig(os.path.join(args.output, 'interpretation.png'))
plt.show()
return os.path.join(args.output, 'interpretation.png')
def show_fault_interpretation(args, labels, slice_index=0):
assert slice_index >= 0, \
'Invalid slice index argument, slice index must not be negative'
labels[labels > 0.5] = 1
labels[labels <= 0.5] = 0
x, y, z = labels.shape
fig = plt.figure()
fig.suptitle("Fault segmentation", fontsize=22)
plt.subplot(1, 3, 1)
assert slice_index < x, f'Invalid slice index, must be in {[0, x - 1]}'
plt.imshow(labels[slice_index, :, :], interpolation='nearest', aspect=1)
plt.title(f"Time slice, index - {slice_index}")
plt.subplot(1, 3, 2)
assert slice_index < y, f'Invalid slice index, must be in {[0, y - 1]}'
plt.imshow(labels[:, slice_index,:], interpolation='nearest', aspect=1)
plt.title(f"Cross slice, index - {slice_index}")
plt.subplot(1, 3, 3)
assert slice_index < z, f'Invalid slice index, must be in {[0, z - 1]}'
plt.imshow(labels[:, :, slice_index], interpolation='nearest', aspect=1)
plt.title(f"Inline slice, index - {slice_index}")
plt.tight_layout()
plt.savefig(os.path.join(args.output, 'interpretation.png'))
plt.show()
return os.path.join(args.output, 'interpretation.png')
def show_salt_interpretation(args, labels, slice_index=0, slice_type='crossline'):
if len(labels.shape) > 3:
labels = labels.argmax(axis=0)
assert slice_index >= 0, \
'Invalid slice index argument, slice index must not be negative'
x, y, z = labels.shape
fig = plt.figure()
fig.suptitle("Salt segmentation", fontsize=22)
if slice_type == 'timeline':
assert slice_index < x, f'Invalid slice index, must be in {[0, x - 1]}'
img = labels[slice_index, :, :]
elif slice_type == 'crossline':
assert slice_index < y, f'Invalid slice index, must be in {[0, y - 1]}'
img = labels[:, slice_index, :]
elif slice_type == 'inline':
assert slice_index < z, f'Invalid slice index, must be in {[0, z - 1]}'
img = labels[:, :, slice_index]
plt.imshow(img, interpolation='nearest', cmap='Greys', aspect=1)
plt.title(f"{slice_type} slice, index - {slice_index}")
plt.tight_layout()
plt.savefig(os.path.join(args.output, 'interpretation.png'))
plt.show()
return os.path.join(args.output, 'interpretation.png')
def get_datafile_path(input_path):
for dirs, _, files in os.walk(input_path):
if files:
return os.path.join(dirs, files[0])
return None
def main(args, logger):
path_to_file = get_datafile_path(args.input)
data_file = np.load(path_to_file)
logger.info(f"Data file {path_to_file} - loaded")
if args.model_type == 'facies':
saved_datapath = show_facies_interpretation(args, data_file.T)
elif args.model_type == 'fault':
saved_datapath = show_fault_interpretation(args, data_file, args.slice_no)
elif args.model_type == 'salt':
saved_datapath = show_salt_interpretation(args, data_file, args.slice_no, args.slice_type)
logger.info(f"Visualization complete! File saved to: {saved_datapath}" )
if __name__ == '__main__':
args = build_argparser().parse_args()
all_runs_subdirs = [os.path.join('runs', d) for d in os.listdir('./runs')]
latest_run_subdir = max(all_runs_subdirs, key=os.path.getmtime)
args.input = os.path.join(latest_run_subdir, args.input)
args.output = os.path.join(latest_run_subdir, args.output)
os.makedirs(args.output, exist_ok=True)
logger = get_logger(latest_run_subdir)
main(args, logger)
|
# Generated by Django 3.1.3 on 2021-06-27 12:01
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('auctions', '0012_comment'),
]
operations = [
migrations.DeleteModel(
name='bids',
),
]
|
print("Here is simple_substract test:")
a = 456
b = 123
substract = a - b
print("456 - 123 =", substract)
print('')
a = eval(input("Please enter an integer 'a':"))
b = eval(input("Please enter another integer 'b':"))
substract = a - b
print("a - b =", substract)
print('')
|
import sys
from numba import vectorize, guvectorize, float64, complex128, void
import numpy as np
import warnings
import xarray as xr
from ..utils import timing
from .utils import logger
from .models import get_model
@timing(logger.info)
def invert_from_model(inc, sigma0, sigma0_dual=None, /, ancillary_wind=None, dsig_co=0.1, dsig_cr=0.1, model=None, **kwargs):
"""
Invert sigma0 to retrieve windspeed from model (lut or gmf).
Parameters
----------
inc: xarray.DataArray
incidence angle
sigma0: xarray.DataArray
sigma0 to be inverted.
sigma0_dual: xarray.DataArray (optional)
sigma0 in cross pol for dualpol invertion
ancillary_wind=: xarray.DataArray (numpy.complex28)
ancillary wind
| (for example ecmwf winds), in **model convention**
model=: str or tuple
model to use.
| If mono pol invertion, it could be a single str
| If dualpol, it should be ordered (model_co, model_cr)
Other Parameters
----------------
dsig_co=: float
parameter used for
| `Jsig_co=((sigma0_gmf - sigma0) / dsig_co) ** 2`
dsig_cr=: float or xarray.DataArray
parameters used for
| `Jsig_cr=((sigma0_gmf - sigma0) / dsig_cr) ** 2`
Returns
-------
xarray.DataArray or tuple
inverted windspeed in m/s.
If available (copol or dualpol), the returned array is `np.complex64`, with the angle of the returned array is
inverted direction in **gmf convention** (use `-np.conj(result))` to get it in standard convention)
See Also
--------
xsarsea.windspeed.available_models
"""
# default array values if no dualpol
nan = sigma0 * np.nan
if not isinstance(model, tuple):
models = (model, None)
else:
models = model
models = tuple(get_model(m) if m is not None else None for m in models)
if ancillary_wind is None:
ancillary_wind = nan
if sigma0_dual is None:
# mono-pol inversion
try:
pol = sigma0.pol
except AttributeError:
pol = None
model_pol = models[0].pol
if pol is None:
warnings.warn('Unable to check sigma0 pol. Assuming %s' % model_pol)
else:
if pol not in model_pol:
raise ValueError("sigma0 pol is %s, and model %s can only handle %s" % (pol, models[0].name, model_pol))
if models[0].iscopol:
sigma0_co = sigma0
sigma0_cr = nan
# copol needs valid ancillary wind
assert np.any(~np.isnan(ancillary_wind))
elif models[0].iscrosspol:
sigma0_co = nan
sigma0_cr = sigma0
# cross pol only is better with no ancillary wind
if not np.all(np.isnan(ancillary_wind)):
warnings.warn('crosspol inversion is best without ancillary wind, but using it as requested.')
models = (None, models[0])
else:
# dualpol inversion
sigma0_co = sigma0
sigma0_cr = sigma0_dual
if np.isscalar(dsig_cr):
dsig_cr = sigma0_cr * 0 + dsig_cr
# to dB
sigma0_co_db = 10 * np.log10(sigma0_co + 1e-15)
if sigma0_cr is not nan:
sigma0_cr_db = 10 * np.log10(sigma0_cr + 1e-15)
else:
sigma0_cr_db = nan
def _invert_from_model_numpy(np_inc, np_sigma0_co_db, np_sigma0_cr_db, np_dsig_cr, np_ancillary_wind):
# this wrapper function is only useful if using dask.array.map_blocks:
# local variables defined here will be available on the worker, and they will be used
# in _invert_copol_numba
d_antenna = 2
d_azi = 2
dwspd_fg = 2
try:
sigma0_co_lut_db = models[0].to_lut(units='dB', **kwargs) # shape (inc, wspd, phi)
np_sigma0_co_lut_db = np.ascontiguousarray(np.asarray(sigma0_co_lut_db.transpose('wspd', 'phi', 'incidence')))
np_wspd_dim = np.asarray(sigma0_co_lut_db.wspd)
np_phi_dim = np.asarray(sigma0_co_lut_db.phi)
np_inc_dim = np.asarray(sigma0_co_lut_db.incidence)
if (180 - (np_phi_dim[-1] - np_phi_dim[0])) < 2:
# phi is in range [ 0, 180 ] (symetrical lut)
phi_180 = True
else:
phi_180 = False
except AttributeError:
# no copol, crosspol only
# declare dummy numpy arrays for numba
np_sigma0_co_lut_db = np.array([[[]]], dtype=np.float64)
np_wspd_dim = np.array([], dtype=np.float64)
np_phi_dim = np.array([], dtype=np.float64)
np_inc_dim = np.array([], dtype=np.float64)
phi_180 = False
np_phi_lut, np_wspd_lut = np.meshgrid(np_phi_dim, np_wspd_dim) # shape (wspd,phi)
np_wspd_lut_co_antenna = np_wspd_lut * np.cos(np.radians(np_phi_lut)) # antenna (xtrack)
np_wspd_lut_co_azi = np_wspd_lut * np.sin(np.radians(np_phi_lut)) # azi (atrack)
if not np.all(np.isnan(np_sigma0_cr_db)):
sigma0_cr_lut_db = models[1].to_lut(units='dB', **kwargs)
np_sigma0_cr_lut_db = np.ascontiguousarray(np.asarray(sigma0_cr_lut_db.transpose('wspd', 'incidence')))
np_wspd_lut_cr = np.asarray(sigma0_cr_lut_db.wspd)
np_inc_cr_dim = np.asarray(sigma0_cr_lut_db.incidence)
else:
# dummy empty for numba typing
np_inc_cr_dim = np.array([], dtype=np.float64)
np_wspd_lut_cr = np.array([], dtype=np.float64)
np_sigma0_cr_lut_db = np.array([[]], dtype=np.float64)
def __invert_from_model_1d(inc_1d, sigma0_co_db_1d, sigma0_cr_db_1d, dsig_cr_1d, ancillary_wind_1d, out_co, out_cr):
# invert from gmf for 1d vector (float) input.
# this function will be vectorized with 'numba.guvectorize' or 'numpy.frompyfunc'
# set debug=True below to force 'numpy.frompyfunc', so you can debug this code
# gmf and lut doesn't have the same direction convention than xsarsea in the xtrack direction
# for xsarsea, positive xtrack means in the xtrack increasing direction
# for gmf and lut, positive means in the xtrack decreasing direction
# we switch ancillary wind to the gmf convention
#ancillary_wind_1d = -np.conj(ancillary_wind_1d)
for i in range(len(inc_1d)):
one_inc = inc_1d[i]
one_sigma0_co_db = sigma0_co_db_1d[i]
one_sigma0_cr_db = sigma0_cr_db_1d[i]
one_dsig_cr = dsig_cr_1d[i]
one_ancillary_wind = ancillary_wind_1d[i]
if np.isnan(one_inc):
out_co[i] = np.nan
out_cr[i] = np.nan
return None
if not np.isnan(one_sigma0_co_db):
# copol inversion available
i_inc = np.argmin(np.abs(np_inc_dim-one_inc))
np_sigma0_co_lut_db_inc = np_sigma0_co_lut_db[:, :, i_inc]
# get wind dir components, relative to antenna and azi
m_antenna = np.real(one_ancillary_wind) # antenna (xtrack)
m_azi = np.imag(one_ancillary_wind) # azi (atrack)
if phi_180:
m_azi = np.abs(m_azi) # symetrical lut
Jwind_co = ((np_wspd_lut_co_antenna - m_antenna) / d_antenna) ** 2 + \
((np_wspd_lut_co_azi - m_azi) / d_azi) ** 2 # shape (phi, wspd)
Jsig_co = ((np_sigma0_co_lut_db_inc - one_sigma0_co_db) / dsig_co) ** 2 # shape (wspd, phi)
J_co = Jwind_co + Jsig_co
## cost function
iJ_co = np.argmin(J_co)
lut_idx = (iJ_co // J_co.shape[-1], iJ_co % J_co.shape[-1])
wspd_co = np_wspd_lut[lut_idx]
wphi_co = np_phi_lut[lut_idx]
if phi_180:
# two phi solution. choose closest from ancillary wind
diff_angle = np.angle(one_ancillary_wind / (wspd_co + np.exp(1j * np.deg2rad(wphi_co))) )
wphi_co_rad = np.arctan2(np.sin(diff_angle), np.cos(diff_angle))
else:
wphi_co_rad = np.deg2rad(wphi_co)
wind_co = wspd_co * np.exp(1j * wphi_co_rad)
else:
# no copol. use ancillary wind as wspd_co (if available)
wind_co = one_ancillary_wind
if not np.isnan(one_sigma0_cr_db) and not np.isnan(one_dsig_cr):
# crosspol available, do dualpol inversion
i_inc = np.argmin(np.abs(np_inc_cr_dim - one_inc))
np_sigma0_cr_lut_db_inc = np_sigma0_cr_lut_db[:, i_inc]
Jwind_cr = ((np_wspd_lut_cr - np.abs(wind_co)) / dwspd_fg) ** 2.
Jsig_cr = ((np_sigma0_cr_lut_db_inc - one_sigma0_cr_db) / one_dsig_cr) ** 2.
if not np.isnan(np.abs(wind_co)):
# dualpol inversion, or crosspol with ancillary wind
J_cr = Jsig_cr + Jwind_cr
else:
# crosspol only inversion
J_cr = Jsig_cr
# numba doesn't support nanargmin
# having nan in J_cr is an edge case, but if some nan where provided to analytical
# function, we have to handle it
# J_cr[np.isnan(J_cr)] = np.nanmax(J_cr)
wspd_dual = np_wspd_lut_cr[np.argmin(J_cr)]
if not np.isnan(np.abs(wind_co)):
# dualpol inversion, or crosspol with ancillary wind
phi_dual = np.angle(wind_co)
else:
# crosspol only, no direction
phi_dual = 0
wind_dual = wspd_dual * np.exp(1j*phi_dual)
else:
wind_dual = np.nan * 1j
out_co[i] = wind_co
out_cr[i] = wind_dual
return None
# build a vectorized function from __invert_from_gmf_scalar
debug = sys.gettrace()
# debug = True # force pure python
# debug = False # force numba.guvectorize
if debug:
logger.debug('using __invert_from_model_1d in pure python mode (debug)')
@timing(logger=logger.debug)
def __invert_from_model_vect(*args):
ori_shape = args[0].shape
args_flat = tuple((arg.flatten() for arg in args))
out_co = np.empty_like(args_flat[0])
out_cr = np.empty_like(args_flat[1])
__invert_from_model_1d(*args_flat, out_co, out_cr )
return out_co.reshape(ori_shape), out_cr.reshape(ori_shape)
else:
# fastmath can be used, but we will need nan handling
__invert_from_model_vect = timing(logger=logger.debug)(
guvectorize(
[void(float64[:], float64[:], float64[:], float64[:], complex128[:], complex128[:], complex128[:])],
'(n),(n),(n),(n),(n)->(n),(n)',
fastmath={'nnan': False}, target='parallel')
(__invert_from_model_1d)
)
with warnings.catch_warnings():
warnings.filterwarnings('ignore', message='.*invalid value encountered.*', category=RuntimeWarning)
return __invert_from_model_vect(np_inc, np_sigma0_co_db,
np_sigma0_cr_db, np_dsig_cr, np_ancillary_wind)
def _invert_from_model_any(inc, sigma0_co_db, sigma0_cr_db, dsig_cr, ancillary_wind):
# wrapper to allow computation on any type (xarray, numpy)
try:
# if input is xarray, will return xarray
da_ws_co = xr.zeros_like(sigma0_co_db, dtype=np.complex128)
da_ws_co.name = 'windspeed_gmf'
da_ws_co.attrs.clear()
da_ws_cr = xr.zeros_like(sigma0_co_db, dtype=np.float64)
da_ws_cr.name = 'windspeed_gmf'
da_ws_cr.attrs.clear()
try:
# if dask array, use map_blocks
# raise ImportError
import dask.array as da
if any(
[
isinstance(v.data, da.Array)
for v in [inc, sigma0_co_db, sigma0_cr_db, dsig_cr, ancillary_wind]
]
):
da_ws_co.data, da_ws_cr.data = da.apply_gufunc(
_invert_from_model_numpy,
'(n),(n),(n),(n),(n)->(n),(n)',
inc.data, sigma0_co_db.data, sigma0_cr_db.data, dsig_cr.data, ancillary_wind.data
)
logger.debug('invert with map_blocks')
else:
raise TypeError
except (ImportError, TypeError):
# use numpy array, but store in xarray
da_ws_co.data, da_ws_cr.data = _invert_from_model_numpy(
np.asarray(inc),
np.asarray(sigma0_co_db),
np.asarray(sigma0_cr_db),
np.asarray(dsig_cr),
np.asarray(ancillary_wind),
)
logger.debug('invert with xarray.values. no chunks')
except TypeError:
# full numpy
logger.debug('invert with numpy')
da_ws_co, da_ws_cr = _invert_from_model_numpy(
inc,
sigma0_co_db,
sigma0_cr_db,
dsig_cr,
ancillary_wind
)
return da_ws_co, da_ws_cr
# main
ws_co, ws_cr_or_dual = _invert_from_model_any(inc, sigma0_co_db, sigma0_cr_db, dsig_cr, ancillary_wind)
if models[0] and models[0].iscopol:
try:
ws_co.attrs['comment'] = "wind speed and direction inverted from model %s (%s)" % ( models[0].name, models[0].pol)
ws_co.attrs['model'] = models[0].name
ws_co.attrs['units'] = 'm/s'
except AttributeError:
# numpy only
pass
if models[1]:
if sigma0_dual is None and models[1].iscrosspol:
# crosspol only
try:
ws_cr_or_dual.attrs['comment'] = "wind speed inverted from model %s (%s)" % (models[1].name, models[1].pol)
ws_cr_or_dual.attrs['model'] = models[1].name
ws_cr_or_dual.attrs['units'] = 'm/s'
except AttributeError:
# numpy only
pass
if sigma0_dual is None:
# monopol inversion
if models[0] is not None:
# mono copol
return ws_co
else:
# mono crosspol (no wind direction)
ws_cr = np.abs(ws_cr_or_dual)
return ws_cr
else:
# dualpol inversion
wspd_dual = xr.where((np.abs(ws_co) < 5) | (np.abs(ws_cr_or_dual) < 5), ws_co, ws_cr_or_dual)
#wspd_dual = ws_cr_or_dual
try:
wspd_dual.attrs['comment'] = "wind speed and direction inverted from model %s (%s) and %s (%s)" % (models[0].name, models[0].pol, models[1].name, models[1].pol)
wspd_dual.attrs['model'] = "%s %s" % (models[0].name, models[1].name)
wspd_dual.attrs['units'] = 'm/s'
except AttributeError:
# numpy only
pass
return ws_co, wspd_dual
|
__version__ = '6.1.1'
|
from typing import get_args
from .mission_generator_constants import MissionGeneratorConstants as con
from .mission import Mission
from .data_gateway import DataGateway
import random
def _can_use_mission_type(mission_type, available_mission_types):
return mission_type in [con.SPECIAL,con.COMMANDER_FOCUS, con.GM_CHOICE] or mission_type in available_mission_types
def _get_next_mission_type(the_mission_type):
assert the_mission_type not in [con.COMMANDER_FOCUS, con.GM_CHOICE]
return con.mission_types[con.mission_types.index(the_mission_type)+1]
def _initialize_mission(the_mission, title, the_mission_type, commanders_focus, gm_mission_type):
the_mission.set_mission_title(title)
if the_mission_type == con.AUGMENTED_GM_FOCUS:
the_mission_type = con.COMMANDER_FOCUS
the_mission.add_note(con.AUGMENTED_GM_FOCUS)
elif the_mission_type == con.LAY_TRAP:
the_mission_type = con.ASSAULT
the_mission.add_note(con.LAY_TRAP)
if the_mission_type == con.COMMANDER_FOCUS:
the_mission.set_mission_type(commanders_focus)
elif the_mission_type == con.GM_CHOICE:
the_mission.set_mission_type(gm_mission_type)
else:
the_mission.set_mission_type(the_mission_type)
def _generate_base_missions(gateway, are_special_mission_acquired_by_spymaster, trap_laid_by_spymaster, mission_augmented_by_spymaster, commanders_focus, gm_mission_type, available_mission_types):
custom_missions = []
if are_special_mission_acquired_by_spymaster:
custom_missions.append(con.SPECIAL)
if trap_laid_by_spymaster:
custom_missions.append(con.LAY_TRAP)
if mission_augmented_by_spymaster:
custom_missions.append(con.AUGMENTED_GM_FOCUS)
count, note = gateway.get_mission_count()
if(note == con.ONE_IS_SPECIAL):
custom_missions.append(con.SPECIAL)
the_missions=[]
for i in range(count):
the_mission = Mission()
title = gateway.get_title()
if len(custom_missions) >0:
the_mission_type = custom_missions.pop()
else:
the_mission_type = gateway.get_mission_type()
while not _can_use_mission_type(the_mission_type, available_mission_types):
the_mission_type = _get_next_mission_type(the_mission_type)
_initialize_mission(the_mission, title, the_mission_type, commanders_focus, gm_mission_type)
the_missions.append(the_mission)
nonspecialist_missions= [mission for mission in the_missions if mission.get_mission_type() != con.SPECIAL].copy()
if len(nonspecialist_missions)>0:
if note == con.ONE_HAS_FAVOR:
gateway.get_random_mission(nonspecialist_missions).set_favor_type(gateway.get_favor_type())
elif note == con.PLUS_ONE_SPECIALIST:
gateway.get_random_mission(nonspecialist_missions).set_additional_specialist(gateway.get_specialist())
return the_missions
def _set_target(mission, selected_target, gm_choice, chosens_favor):
the_target =selected_target
if the_target == con.PICK_ONE_PLUS_DANGER:
the_target= gm_choice
mission.set_danger()
if the_target ==con.PICK_ONE_WITH_FAVOR:
the_target = gm_choice
mission.set_favor_type(chosens_favor)
mission.set_target(the_target)
return
def _setup_assault_mission(the_mission, gateway, chosens_favor, gm_assault_target, is_augmented):
target=gateway.get_assault_target()
_set_target(the_mission, target, gm_assault_target, chosens_favor)
the_mission.set_rewards(gateway.get_assault_rewards(is_augmented))
the_mission.set_penalties(gateway.get_assault_penalties(is_augmented))
if not con.LAY_TRAP in the_mission.notes:
the_mission.add_note(gateway.get_assault_target_types())
the_mission.add_requirement(con.required_assault_specialists)
the_mission.add_objective(gateway.get_assault_objective())
def _setup_recon_mission(the_mission, gateway, chosens_favor, gm_recon_target, is_augmented):
target = gateway.get_recon_target()
_set_target(the_mission, target, gm_recon_target, chosens_favor)
the_mission.set_rewards(gateway.get_recon_rewards( is_augmented))
the_mission.set_penalties(gateway.get_recon_penalties(is_augmented))
the_mission.add_note(gateway.get_recon_target_types())
the_mission.add_requirement(con.required_recon_specialists)
the_mission.add_objective(gateway.get_recon_objective())
def _setup_religious_mission(the_mission, gateway, chosens_favor, gm_religious_target, is_augmented):
target = gateway.get_religious_target()
_set_target(the_mission, target, gm_religious_target, chosens_favor)
the_mission.set_rewards(gateway.get_religious_rewards( is_augmented))
the_mission.set_penalties(gateway.get_religious_penalties(is_augmented))
the_mission.add_note(con.CULTURE_USE_NOTE.format(gateway.get_religious_culture()))
the_mission.add_requirement(con.required_religious_specialists)
the_mission.add_objective(gateway.get_religious_objective())
def _setup_supply_mission(the_mission, gateway, chosens_favor, is_augmented):
target = gateway.get_supply_target()
_set_target(the_mission, target, con.NOTHING, chosens_favor)
the_mission.set_rewards(gateway.get_supply_rewards(is_augmented))
the_mission.set_penalties(gateway.get_supply_penalties(is_augmented))
the_mission.add_requirement(con.required_supply_specialists)
the_mission.add_objective(gateway.get_supply_objective())
the_mission.add_note(f'Supply Problem: {gateway.get_supply_problem()}')
the_mission.add_note(f'Supply Type: {gateway.get_supply_type()}')
def check_if_mission_is_augmented(mission):
if con.AUGMENTED_GM_FOCUS in mission.notes:
#mission.notes.remove(con.AUGMENTED_GM_FOCUS) #leave note in so that gm sees that it i augmented
return True
return False
def _configure_mission_by_type(mission, chosens_favor, gm_assault_target, gm_recon_target, gm_religious_target, gateway):
is_augmented = check_if_mission_is_augmented(mission)
if mission.get_mission_type() == con.ASSAULT:
_setup_assault_mission(mission, gateway, chosens_favor, gm_assault_target, is_augmented)
elif mission.get_mission_type() == con.RECON:
_setup_recon_mission(mission, gateway, chosens_favor, gm_recon_target, is_augmented)
elif mission.get_mission_type() == con.RELIGIOUS:
_setup_religious_mission(mission, gateway, chosens_favor, gm_religious_target, is_augmented)
elif mission.get_mission_type() == con.SUPPLY:
_setup_supply_mission(mission, gateway, chosens_favor, is_augmented)
def generate_missions(commanders_focus, gm_mission_type, gm_assault_target, gm_recon_target, gm_religious_target, chosens_favor, available_mission_types, special_mission_acquired_by_spymaster, trap_laid_by_spymaster, mission_augmented_by_spymaster, gateway=None):
if gateway == None or gateway == con.NOTHING:
gateway = DataGateway()
if gm_mission_type == con.NOTHING or gm_mission_type==None:
gm_mission_type = gateway.get_simple_mission()
if gm_assault_target == con.NOTHING or gm_assault_target==None:
gm_assault_target = gateway.get_simple_assault_target()
if gm_recon_target == con.NOTHING or gm_recon_target==None:
gm_recon_target = gateway.get_simple_recon_target()
if gm_religious_target == con.NOTHING or gm_religious_target==None:
gm_religious_target = gateway.get_simple_religious_target()
missions = _generate_base_missions(gateway, special_mission_acquired_by_spymaster, trap_laid_by_spymaster, mission_augmented_by_spymaster, commanders_focus, gm_mission_type, available_mission_types)
for mission in missions:
_configure_mission_by_type(mission, chosens_favor,gm_assault_target, gm_recon_target, gm_religious_target, gateway)
return missions |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from .models import VocabularyNodeType, Term, Node, NodeRevision
class VocabularyNodeTypeAdmin(admin.ModelAdmin):
list_display = ('name',)
class TermAdmin(MPTTModelAdmin):
list_display = ('name', 'vocabulary',)
def get_queryset(self, request):
return super(TermAdmin, self).get_queryset(request).select_related('vocabulary')
class NodeRevisionInline(admin.StackedInline):
model = NodeRevision
raw_id_fields = ('author',)
extra = 0
class NodeAdmin(admin.ModelAdmin):
list_display = ('title', 'node_type', 'is_published',)
raw_id_fields = ('author',)
list_filter = ('node_type', 'terms')
inlines = (NodeRevisionInline,)
admin.site.register(VocabularyNodeType, VocabularyNodeTypeAdmin)
admin.site.register(Term, TermAdmin)
admin.site.register(Node, NodeAdmin)
|
import extract_global, config
import os, argparse
def parse_arguments():
parser = argparse.ArgumentParser(description='Extract frame FVs')
parser.add_argument(
'--sift_mode', # mode = 0 -> SIFT detector; 1 -> Hessian affine detector
type=int,
required=False,
default=1
)
parser.add_argument(
'--gaussians',
type=int,
required=False,
default=128
)
parser.add_argument(
'--num_threads',
type=int,
required=False,
default=8
)
args = parser.parse_args()
return args
def main(args):
videosearch_dir = '../videosearch'
joint_index_name = 'joint_index_frames.sift_scfv_idx'
output_dir = os.path.join(config.OUTPUT_DIR, 'output_frame_descriptors')
if not os.path.exists(output_dir):
os.makedirs(output_dir)
extract_global.generateGlobalFeatureFrame(videosearch_dir, output_dir, config.DATASET_DIR, joint_index_name, args.gaussians, args.sift_mode, args.num_threads)
if __name__ == '__main__':
main(parse_arguments())
|
# -*- coding: utf-8 -*-
############################################################################################################################
#
#
#
############################################################################################################################
class stats(object):
def __init__(self, parent):
self.parent = parent
self.elasticsearch_client = parent.elasticsearch_client
self.logger = parent.logger
def test(self):
self.logger.info("stats test") |
# A Python program for Prims's MST for
# adjacency list representation of graph
import math
import numpy as np
from collections import defaultdict
# Converts from adjacency matrix to adjacency list
def convert_matrix_to_list(matrix):
adjList = defaultdict(list)
for i in range(len(matrix)):
for j in range(len(matrix[i])):
if matrix[i][j] > 0:
newNode = [j, matrix[i][j]]
adjList[i].append(newNode)
return adjList
class Heap():
def __init__(self):
self.array = []
self.size = 0
self.pos = []
def newMinHeapNode(self, v, dist):
minHeapNode = [v, dist]
return minHeapNode
# A utility function to swap two nodes of
# min heap. Needed for min heapify
def swapMinHeapNode(self, a, b):
t = self.array[a]
self.array[a] = self.array[b]
self.array[b] = t
# A standard function to heapify at given idx
# This function also updates position of nodes
# when they are swapped. Position is needed
# for decreaseKey()
def minHeapify(self, idx):
smallest = idx
left = 2 * idx + 1
right = 2 * idx + 2
if left < self.size and self.array[left][1] < self.array[smallest][1]:
smallest = left
if right < self.size and self.array[right][1] < self.array[smallest][1]:
smallest = right
# The nodes to be swapped in min heap
# if idx is not smallest
if smallest != idx:
# Swap positions
self.pos[ self.array[smallest][0] ] = idx
self.pos[ self.array[idx][0] ] = smallest
# Swap nodes
self.swapMinHeapNode(smallest, idx)
self.minHeapify(smallest)
# Standard function to extract minimum node from heap
def extractMin(self):
# Return NULL wif heap is empty
if self.isEmpty() == True:
return
# Store the root node
root = self.array[0]
# Replace root node with last node
lastNode = self.array[self.size - 1]
self.array[0] = lastNode
# Update position of last node
self.pos[lastNode[0]] = 0
self.pos[root[0]] = self.size - 1
# Reduce heap size and heapify root
self.size -= 1
self.minHeapify(0)
return root
def isEmpty(self):
return True if self.size == 0 else False
def decreaseKey(self, v, dist):
# Get the index of v in heap array
i = self.pos[v]
# Get the node and update its dist value
self.array[i][1] = dist
# Travel up while the complete tree is not
# hepified. This is a O(Logn) loop
while i > 0 and self.array[i][1] < self.array[(i - 1) // 2][1]:
# Swap this node with its parent
self.pos[ self.array[i][0] ] = (i-1) // 2
self.pos[ self.array[(i-1)//2][0]] = i
self.swapMinHeapNode(i, (i - 1) // 2)
# move to parent index
i = (i - 1) // 2;
# A utility function to check if a given vertex
# 'v' is in min heap or not
def isInMinHeap(self, v):
if self.pos[v] < self.size:
return True
return False
class Graph():
def __init__(self, adjacency_matrix):
self.V = adjacency_matrix.shape[0]
self._graph = convert_matrix_to_list(adjacency_matrix)
def _build_edges(self, parent, n):
edges = []
for i in range(1, n):
edges.append([parent[i], i])
return np.array(edges)
# The main function that prints the Minimum
# Spanning Tree(MST) using the Prim's Algorithm.
# It is a O(ELogV) function
def PrimMST(self):
# Get the number of vertices in graph
V = self.V
# key values used to pick minimum weight edge in cut
key = []
# List to store contructed MST
parent = []
# minHeap represents set E
minHeap = Heap()
# Initialize min heap with all vertices. Key values of all
# vertices (except the 0th vertex) is is initially infinite
for v in range(V):
parent.append(-1)
key.append(math.inf)
minHeap.array.append(minHeap.newMinHeapNode(v, key[v]))
minHeap.pos.append(v)
# Make key value of 0th vertex as 0 so
# that it is extracted first
minHeap.pos[0] = 0
key[0] = 0
minHeap.decreaseKey(0, key[0])
# Initially size of min heap is equal to V
minHeap.size = V
# In the following loop, min heap contains all nodes
# not yet added in the MST.
while minHeap.isEmpty() == False:
# Extract the vertex with minimum distance value
newHeapNode = minHeap.extractMin()
u = newHeapNode[0]
# Traverse through all adjacent vertices of u
# (the extracted vertex) and update their
# distance values
for pCrawl in self._graph[u]:
v = pCrawl[0]
# If shortest distance to v is not finalized
# yet, and distance to v through u is less than
# its previously calculated distance
if minHeap.isInMinHeap(v) and pCrawl[1] < key[v]:
key[v] = pCrawl[1]
parent[v] = u
# update distance value in min heap also
minHeap.decreaseKey(v, key[v])
return self._build_edges(parent, V)
def MST(adjacency_matrix):
graph = Graph(adjacency_matrix)
return graph.PrimMST()
# Debug
# if __name__ == "__main__":
# a = np.array(
# [[0, 9, 75, 2, 0, 10],
# [9, 0, 95, 19, 42, 99],
# [75, 95, 0, 51, 66, 12],
# [2, 19, 51, 0, 31, 22],
# [0, 42, 66, 31, 0, 89],
# [10, 99, 12, 22, 89, 0]]
# )
# graph = Graph(a)
# print("Adjacency List:")
# for i in graph._graph:
# print(i, end ="")
# for node in graph._graph[i]:
# print(" -> {}".format(node[0]), end ="")
# print()
# print("="*20)
# MST = graph.PrimMST()
# print(MST)
|
from google_nest_sdm.structure import Structure
def test_no_traits() -> None:
raw = {
"name": "my/structure/name",
}
structure = Structure.MakeStructure(raw)
assert "my/structure/name" == structure.name
assert not ("sdm.structures.traits.Info" in structure.traits)
def test_empty_traits() -> None:
raw = {
"name": "my/structure/name",
"traits": {},
}
structure = Structure.MakeStructure(raw)
assert "my/structure/name" == structure.name
assert not ("sdm.structures.traits.Info" in structure.traits)
def test_info_traits() -> None:
raw = {
"name": "my/structure/name",
"traits": {
"sdm.structures.traits.Info": {
"customName": "Structure Name",
},
},
}
structure = Structure.MakeStructure(raw)
assert "my/structure/name" == structure.name
assert "sdm.structures.traits.Info" in structure.traits
trait = structure.traits["sdm.structures.traits.Info"]
assert "Structure Name" == trait.custom_name
def test_room_info_traits() -> None:
raw = {
"name": "my/structure/name",
"traits": {
"sdm.structures.traits.RoomInfo": {
"customName": "Structure Name",
},
},
}
structure = Structure.MakeStructure(raw)
assert "my/structure/name" == structure.name
assert "sdm.structures.traits.RoomInfo" in structure.traits
trait = structure.traits["sdm.structures.traits.RoomInfo"]
assert "Structure Name" == trait.custom_name
|
# <Copyright 2019, Argo AI, LLC. Released under the MIT license.>
import os
import pathlib
import pytest
from argoverse.data_loading.simple_track_dataloader import SimpleArgoverseTrackingDataLoader
_TEST_DATA = pathlib.Path(__file__).parent / "test_data" / "tracking"
_LOG_ID = "1"
@pytest.fixture # type: ignore
def data_loader() -> SimpleArgoverseTrackingDataLoader:
return SimpleArgoverseTrackingDataLoader(os.fspath(_TEST_DATA), os.fspath(_TEST_DATA))
def test_get_city_name(data_loader: SimpleArgoverseTrackingDataLoader) -> None:
assert data_loader.get_city_name(_LOG_ID) == "PIT"
def test_get_log_calibration_data(
data_loader: SimpleArgoverseTrackingDataLoader,
) -> None:
# Just check that it doesn't raise.
assert data_loader.get_log_calibration_data(_LOG_ID)
def test_get_city_to_egovehicle_se3(
data_loader: SimpleArgoverseTrackingDataLoader,
) -> None:
assert data_loader.get_city_to_egovehicle_se3(_LOG_ID, 0) is not None
assert data_loader.get_city_to_egovehicle_se3(_LOG_ID, 100) is None
def test_get_closest_im_fpath(data_loader: SimpleArgoverseTrackingDataLoader) -> None:
# Test data doesn't have cameras so we cannot currently test this if we
assert data_loader.get_closest_im_fpath(_LOG_ID, "nonexisting_camera_name", 0) is None
def test_get_ordered_log_ply_fpaths(
data_loader: SimpleArgoverseTrackingDataLoader,
) -> None:
# Test data doesn't have cameras so we cannot currently test this if we
assert len(data_loader.get_ordered_log_ply_fpaths(_LOG_ID)) == 3
def test_get_labels_at_lidar_timestamp(
data_loader: SimpleArgoverseTrackingDataLoader,
) -> None:
assert data_loader.get_labels_at_lidar_timestamp(_LOG_ID, 0) is not None
assert data_loader.get_labels_at_lidar_timestamp(_LOG_ID, 100) is None
def test_get_closest_im_fpath_exists(
data_loader: SimpleArgoverseTrackingDataLoader,
) -> None:
# Test data does have ring front cameras at timestamps 0,1,2,3. Compare with ground truth (gt)
im_fpath = data_loader.get_closest_im_fpath(_LOG_ID, "ring_front_right", 2)
assert im_fpath is not None
gt_im_fpath = f"test_data/tracking/{_LOG_ID}/ring_front_right/ring_front_right_2.jpg"
assert "/".join(im_fpath.split("/")[-5:]) == gt_im_fpath
def test_get_closest_lidar_fpath_found_match(
data_loader: SimpleArgoverseTrackingDataLoader,
) -> None:
""" Just barely within 51 ms allowed buffer"""
cam_timestamp = int(50 * 1e6)
ply_fpath = data_loader.get_closest_lidar_fpath(_LOG_ID, cam_timestamp)
assert ply_fpath is not None
gt_ply_fpath = f"test_data/tracking/{_LOG_ID}/lidar/PC_2.ply"
assert "/".join(ply_fpath.split("/")[-5:]) == gt_ply_fpath
def test_get_closest_lidar_fpath_no_match(
data_loader: SimpleArgoverseTrackingDataLoader,
) -> None:
"""LiDAR rotates at 10 Hz (sensor message per 100 ms). Test if camera measurement
just barely outside 51 ms allowed buffer. Max LiDAR timestamp in log is 2.
51 ms, not 50 ms, is allowed to give time for occasional delay.
"""
max_allowed_interval = ((100 / 2) + 1) * 1e6
log_max_lidar_timestamp = 2
cam_timestamp = int(log_max_lidar_timestamp + max_allowed_interval + 1)
ply_fpath = data_loader.get_closest_lidar_fpath(_LOG_ID, cam_timestamp)
assert ply_fpath is None
def test_get_ordered_log_cam_fpaths(
data_loader: SimpleArgoverseTrackingDataLoader,
) -> None:
""" Make sure all images for one camera in one log are returned in correct order. """
camera_name = "ring_rear_right"
cam_img_fpaths = data_loader.get_ordered_log_cam_fpaths(_LOG_ID, camera_name)
gt_cam_img_fpaths = [
f"test_data/tracking/{_LOG_ID}/ring_rear_right/ring_rear_right_0.jpg",
f"test_data/tracking/{_LOG_ID}/ring_rear_right/ring_rear_right_1.jpg",
f"test_data/tracking/{_LOG_ID}/ring_rear_right/ring_rear_right_2.jpg",
f"test_data/tracking/{_LOG_ID}/ring_rear_right/ring_rear_right_3.jpg",
]
relative_img_fpaths = ["/".join(fpath.split("/")[-5:]) for fpath in cam_img_fpaths]
assert relative_img_fpaths == gt_cam_img_fpaths
|
### 3d_tools.py
import pyassimp as pas
def model_geom(file_root, w, nextId, opt):
## Read TINs from the DAE
global bid
dir_parts = file_root.split("/")
if ( len(dir_parts) > 0 ):
bid = dir_parts[len(dir_parts)-1]
else:
bid = "unknown"
myProcessing = pas.postprocess.aiProcess_Triangulate | pas.postprocess.aiProcess_PreTransformVertices
scene = pas.load(file_root + '.dae', processing=myProcessing)
assert len(scene.meshes), "file has no meshes... aborting"
if os.path.isfile(file_root + '.czml') and opt.relModelPos:
json_data=open(file_root + '.czml', "rb")
data = json.load(json_data)
json_data.close()
else:
data = json.loads('[{"skip": "me"},{"position": {"cartographicDegrees": [0,0,0]}}]')
[mx,my,mz] = data[1]["position"]["cartographicDegrees"]
mx = float(mx)
my = float(my)
mz = float(mz)
g1 = "POINT (%f %f %f)" % (mx,my,mz)
if (opt.s_srs != opt.t_srs):
g2 = project_point(g1, opt.s_srs, opt.t_srs)
else:
g2 = ogr.CreateGeometryFromWkt(g1)
return convert_meshes(scene, g2, opt, w)
def geom_model():
pass
def mesh_from_nodes():
pass
|
# coding: UTF-8
print(r'''
【程序18】题目:两个乒乓球队进行比赛,各出三人。甲队为a,b,c三人,乙队为x,y,z三人。已抽签决定比赛名单。有人向队员打听比赛的名单。a说他不和x比,c说他不和x,z比,请编程序找出三队赛手的名单。
''')
import random
# random.randint(0, 2)
def isCanGame(Jname, Yname):
if Jname == 'a' and Yname == 'x':
return False
if Jname == 'c' and Yname == 'x':
return False
if Jname == 'c' and Yname == 'z':
return False
return True
JTeam = ['a','b','c']
YTeam = ['x','y','z']
# while len(JTeam) > 0:
# Jindex = random.randint(0, len(JTeam) - 1)
# Yindex = random.randint(0, len(YTeam) - 1)
# print(JTeam[Jindex], YTeam[Yindex])
# if isCanGame(JTeam[Jindex], YTeam[Yindex]):
# print('名单: {} vs {}'.format(JTeam[Jindex], YTeam[Yindex]))
# del JTeam[Jindex]
# del YTeam[Yindex]
# if len(JTeam) == len(YTeam) == 1:
# print("死循环: ", JTeam[0], YTeam[0])
# break
# 唯一答案:
# 'c' vs 'y'
# 'a' vs 'z'
# 'b' vs 'x'
# 如果要解答这种题目, 需要以每个人的条件的数目大小排序依次匹配执行, 从多到少
|
import FWCore.ParameterSet.Config as cms
import sys
process = cms.Process("TestElectrons")
process.load("FWCore.MessageService.MessageLogger_cfi")
process.MessageLogger.cerr.FwkReport.reportEvery = 100
process.load("Configuration.StandardSequences.GeometryDB_cff")
process.load("Configuration.StandardSequences.MagneticField_cff")
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
# NOTE: the pick the right global tag!
# for PHYS14 scenario PU4bx50 : global tag is ???
# for PHYS14 scenario PU20bx25: global tag is PHYS14_25_V1
# as a rule, find the global tag in the DAS under the Configs for given dataset
#process.GlobalTag.globaltag = 'PHYS14_25_V1::All'
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
#
# Define input data to read
#
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1000) )
#AOD test files dataset :/RelValZEE_13/CMSSW_8_0_21-PU25ns_80X_mcRun2_asymptotic_2016_TrancheIV_v6_Tr4GT_v6-v1/GEN-SIM-RECO
inputFilesAOD = cms.untracked.vstring(
'/store/relval/CMSSW_8_0_21/RelValZEE_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_2016_TrancheIV_v6_Tr4GT_v6-v1/10000/105EBFE7-9198-E611-8604-0025905B85D2.root',
'/store/relval/CMSSW_8_0_21/RelValZEE_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_2016_TrancheIV_v6_Tr4GT_v6-v1/10000/483FD411-9498-E611-9427-0025905B85D2.root',
'/store/relval/CMSSW_8_0_21/RelValZEE_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_2016_TrancheIV_v6_Tr4GT_v6-v1/10000/4ACA8789-A498-E611-A54C-0025905B858E.root',
'/store/relval/CMSSW_8_0_21/RelValZEE_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_2016_TrancheIV_v6_Tr4GT_v6-v1/10000/5A20FA98-9498-E611-9DB0-0CC47A78A33E.root',
'/store/relval/CMSSW_8_0_21/RelValZEE_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_2016_TrancheIV_v6_Tr4GT_v6-v1/10000/6694D992-9098-E611-8461-0CC47A4D768E.root',
'/store/relval/CMSSW_8_0_21/RelValZEE_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_2016_TrancheIV_v6_Tr4GT_v6-v1/10000/7887DD0D-9498-E611-8D98-0CC47A4C8E64.root',
'/store/relval/CMSSW_8_0_21/RelValZEE_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_2016_TrancheIV_v6_Tr4GT_v6-v1/10000/845B6ABD-9098-E611-A2E3-0CC47A78A4BA.root',
'/store/relval/CMSSW_8_0_21/RelValZEE_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_2016_TrancheIV_v6_Tr4GT_v6-v1/10000/A8877C9C-A498-E611-8EFF-0025905A607E.root',
#'file:/opt/ppd/scratch/harper/mcTestFiles/ZToEE_NNPDF30_13TeV-powheg_M_200_400_PUSpring16_80X_mcRun2_asymptotic_2016_v3-v2_FE668C0A-8B09-E611-ACDE-B083FED76DBD.root'
)
#AOD test files dataset :/RelValZEE_13/CMSSW_8_0_21-PU25ns_80X_mcRun2_asymptotic_2016_TrancheIV_v6_Tr4GT_v6-v1/MINIAODSIM
inputFilesMiniAOD = cms.untracked.vstring(
'/store/relval/CMSSW_8_0_21/RelValZEE_13/MINIAODSIM/PU25ns_80X_mcRun2_asymptotic_2016_TrancheIV_v6_Tr4GT_v6-v1/10000/0E6B945E-A498-E611-BD29-0CC47A78A30E.root',
'/store/relval/CMSSW_8_0_21/RelValZEE_13/MINIAODSIM/PU25ns_80X_mcRun2_asymptotic_2016_TrancheIV_v6_Tr4GT_v6-v1/10000/EE70625F-A498-E611-8CC7-0CC47A4D766C.root',
)
# Set up input/output depending on the format
# You can list here either AOD or miniAOD files, but not both types mixed
#
print(sys.argv[2])
useAOD = bool(int(sys.argv[2]))
if useAOD == True :
inputFiles = inputFilesAOD
outputFile = "electron_ntuple.root"
print("AOD input files are used")
else :
inputFiles = inputFilesMiniAOD
outputFile = "electron_ntuple_mini.root"
print("MiniAOD input files are used")
process.source = cms.Source ("PoolSource", fileNames = inputFiles )
#
# Set up electron ID (VID framework)
#
from PhysicsTools.SelectorUtils.tools.vid_id_tools import *
# turn on VID producer, indicate data format to be
# DataFormat.AOD or DataFormat.MiniAOD, as appropriate
if useAOD == True :
dataFormat = DataFormat.AOD
else :
dataFormat = DataFormat.MiniAOD
switchOnVIDElectronIdProducer(process, dataFormat)
# define which IDs we want to produce
my_id_modules = [sys.argv[3]]
#add them to the VID producer
for idmod in my_id_modules:
setupAllVIDIdsInModule(process,idmod,setupVIDElectronSelection)
# Make sure to add the ID sequence upstream from the user analysis module
process.p = cms.Path(process.egmGsfElectronIDSequence)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.