content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# --------------------------------------------------------------------- # Vendor: Cisco # OS: SCOS # --------------------------------------------------------------------- # Copyright (C) 2007-2012 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # NOC modules from noc.core.profile.base import BaseProfile
[ 2, 16529, 30934, 198, 2, 39896, 25, 28289, 198, 2, 7294, 25, 220, 220, 220, 220, 6374, 2640, 198, 2, 16529, 30934, 198, 2, 15069, 357, 34, 8, 4343, 12, 6999, 383, 399, 4503, 4935, 198, 2, 4091, 38559, 24290, 329, 3307, 198, 2, 1...
5.712121
66
# Licensed to the Apache Software Foundation (ASF) 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. """ This DAG will not work unless you create an Amazon EMR cluster running Apache Hive and copy data into it following steps 1-4 (inclusive) here: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/EMRforDynamoDB.Tutorial.html """ import os from datetime import datetime from airflow import DAG from airflow.decorators import task from airflow.models import Connection from airflow.providers.amazon.aws.hooks.dynamodb import DynamoDBHook from airflow.providers.amazon.aws.transfers.hive_to_dynamodb import HiveToDynamoDBOperator from airflow.utils import db DYNAMODB_TABLE_NAME = 'example_hive_to_dynamodb_table' HIVE_CONNECTION_ID = os.getenv('HIVE_CONNECTION_ID', 'hive_on_emr') HIVE_HOSTNAME = os.getenv('HIVE_HOSTNAME', 'ec2-123-45-67-890.compute-1.amazonaws.com') # These values assume you set up the Hive data source following the link above. DYNAMODB_TABLE_HASH_KEY = 'feature_id' HIVE_SQL = 'SELECT feature_id, feature_name, feature_class, state_alpha FROM hive_features' # Included for sample purposes only; in production you wouldn't delete # the table you just backed your data up to. Using 'all_done' so even # if an intermediate step fails, the DAG will clean up after itself. # Included for sample purposes only; in production this should # be configured in the environment and not be part of the DAG. # Note: The 'hiveserver2_default' connection will not work if Hive # is hosted on EMR. You must set the host name of the connection # to match your EMR cluster's hostname. with DAG( dag_id='example_hive_to_dynamodb', schedule_interval=None, start_date=datetime(2021, 1, 1), tags=['example'], catchup=False, ) as dag: # Add the prerequisites docstring to the DAG in the UI. dag.doc_md = __doc__ # [START howto_transfer_hive_to_dynamodb] backup_to_dynamodb = HiveToDynamoDBOperator( task_id='backup_to_dynamodb', hiveserver2_conn_id=HIVE_CONNECTION_ID, sql=HIVE_SQL, table_name=DYNAMODB_TABLE_NAME, table_keys=[DYNAMODB_TABLE_HASH_KEY], ) # [END howto_transfer_hive_to_dynamodb] ( configure_hive_connection() >> create_dynamodb_table() >> backup_to_dynamodb >> get_dynamodb_item_count() >> delete_dynamodb_table() )
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
2.904045
1,063
__version__ = "0.1.0" from tle_download.main import get_tles, write_tles
[ 834, 9641, 834, 796, 366, 15, 13, 16, 13, 15, 1, 198, 198, 6738, 256, 293, 62, 15002, 13, 12417, 1330, 651, 62, 83, 829, 11, 3551, 62, 83, 829, 198 ]
2.387097
31
import numpy as np import random
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 628, 628, 628, 628, 628, 198 ]
3.071429
14
"""Support for the Netatmo climate schedule selector.""" from __future__ import annotations import logging from homeassistant.components.select import SelectEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity_platform import AddEntitiesCallback from .const import ( CONF_URL_ENERGY, DATA_SCHEDULES, DOMAIN, EVENT_TYPE_SCHEDULE, MANUFACTURER, NETATMO_CREATE_SELECT, ) from .data_handler import HOME, SIGNAL_NAME, NetatmoHome from .netatmo_entity_base import NetatmoBase _LOGGER = logging.getLogger(__name__)
[ 37811, 15514, 329, 262, 3433, 265, 5908, 4258, 7269, 31870, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 18931, 198, 198, 6738, 1363, 562, 10167, 13, 5589, 3906, 13, 19738, 1330, 9683, 32398, 198, 6738, 1363, ...
3.101322
227
# Ivan Carvalho # Solution to https://www.urionlinejudge.com.br/judge/problems/view/1943 #!/usr/bin/env python2.7 # encoding : utf-8 e = int(raw_input()) if e == 1: print "Top 1" elif e <= 3: print "Top 3" elif e <= 5: print "Top 5" elif e <= 10: print "Top 10" elif e <= 25: print "Top 25" elif e <= 50: print "Top 50" else: print "Top 100"
[ 2, 21798, 1879, 2100, 8873, 198, 2, 28186, 284, 3740, 1378, 2503, 13, 40956, 1370, 10456, 469, 13, 785, 13, 1671, 14, 10456, 469, 14, 1676, 22143, 14, 1177, 14, 1129, 3559, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, ...
2.251613
155
from dataclasses import dataclass, field from typing import Optional __NAMESPACE__ = "sdformat/v1.5/physics.xsd"
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 32233, 198, 198, 834, 45, 29559, 47, 11598, 834, 796, 366, 21282, 18982, 14, 85, 16, 13, 20, 14, 746, 23154, 13, 87, 21282, 1, 628 ]
2.875
40
# -*- coding: utf-8 -*- # # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """A calliope command that prints help for another calliope command.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import argparse from googlecloudsdk.calliope import base from googlecloudsdk.command_lib.help_search import search from googlecloudsdk.command_lib.help_search import search_util from googlecloudsdk.core import log _DEFAULT_LIMIT = 5
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 1303, 198, 2, 15069, 2211, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, ...
3.637631
287
from .main import main as run # noqa: F401 __version__ = '0.0.3'
[ 6738, 764, 12417, 1330, 1388, 355, 1057, 220, 1303, 645, 20402, 25, 376, 21844, 198, 834, 9641, 834, 796, 705, 15, 13, 15, 13, 18, 6, 198 ]
2.444444
27
# Copyright (c) OpenMMLab. All rights reserved. from .darts_backbone import DartsBackbone from .searchable_mobilenet import SearchableMobileNet from .searchable_shufflenet_v2 import SearchableShuffleNetV2 __all__ = ['DartsBackbone', 'SearchableShuffleNetV2', 'SearchableMobileNet']
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 6738, 764, 67, 5889, 62, 1891, 15992, 1330, 360, 5889, 7282, 15992, 198, 6738, 764, 12947, 540, 62, 76, 25898, 268, 316, 1330, 11140, 540, 17066, 7934, 198, ...
3.10989
91
#!/usr/bin/env python # Copyright 2018-present Facebook, 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. from __future__ import absolute_import, division, print_function, unicode_literals import os import shutil import subprocess # The location of the generate grammar kit script DIR = os.path.dirname(__file__) # The location of the plugin directory PLUGIN_PATH = os.path.abspath(os.path.join(DIR, "..")) # The location of the grammar-kit directory GRAMMAR_KIT = os.path.abspath( os.path.join(DIR, "../../../third-party/java/grammar-kit/") ) OUT_DIR = os.path.join(PLUGIN_PATH, "gen") FLEX_OUT_DIR = os.path.join(OUT_DIR, "com/facebook/buck/intellij/ideabuck/lang") GRAMMAR_KIT_JAR = os.path.join(GRAMMAR_KIT, "grammar-kit.jar") GRAMMAR_KIT_JFLEX_JAR = os.path.join(GRAMMAR_KIT, "JFlex.jar") JFLEX_SKELETON = os.path.join(PLUGIN_PATH, "resources/idea-flex.skeleton") FLEX_FILE = os.path.join( PLUGIN_PATH, "src/com/facebook/buck/intellij/ideabuck/lang/Buck.flex" ) BNF_FILE = os.path.join( PLUGIN_PATH, "src/com/facebook/buck/intellij/ideabuck/lang/Buck.bnf" ) shutil.rmtree(OUT_DIR, ignore_errors=True) subprocess_call(["java", "-jar", GRAMMAR_KIT_JAR, OUT_DIR, BNF_FILE]) subprocess_call( [ "java", "-jar", GRAMMAR_KIT_JFLEX_JAR, "-sliceandcharat", "-skel", JFLEX_SKELETON, "-d", FLEX_OUT_DIR, FLEX_FILE, ] )
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 2864, 12, 25579, 3203, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428,...
2.494148
769
from lxml import html from d_parser.d_spider_common import DSpiderCommon from d_parser.helpers.re_set import Ree from helpers.url_generator import UrlGenerator from d_parser.helpers.stat_counter import StatCounter as SC VERSION = 29 # Warn: Don't remove task argument even if not use it (it's break grab and spider crashed) # Warn: noinspection PyUnusedLocal
[ 6738, 300, 19875, 1330, 27711, 198, 198, 6738, 288, 62, 48610, 13, 67, 62, 2777, 1304, 62, 11321, 1330, 360, 41294, 17227, 198, 6738, 288, 62, 48610, 13, 16794, 364, 13, 260, 62, 2617, 1330, 29030, 198, 6738, 49385, 13, 6371, 62, 86...
3.401869
107
from tkinter import Label, GROOVE from willsmith.gui_display_controller import GUIDisplayController
[ 6738, 256, 74, 3849, 1330, 36052, 11, 10863, 6684, 6089, 198, 198, 6738, 481, 21453, 13, 48317, 62, 13812, 62, 36500, 1330, 19348, 2389, 271, 1759, 22130, 628 ]
3.642857
28
#!/usr/bin/python3 import logging import argparse from time import time import toml from data.io.knowledge_graph import KnowledgeGraph from data.io.tarball import Tarball from data.io.tsv import TSV from data.utils import is_readable, is_writable from embeddings import graph_structure from tasks.node_classification import build_dataset, build_model, evaluate_model from tasks.utils import mksplits, init_fold, mkfolds, sample_mask, set_seed, strip_graph if __name__ == "__main__": timestamp = int(time()) parser = argparse.ArgumentParser() parser.add_argument("-c", "--config", help="Configuration file (toml)", required=True, default=None) parser.add_argument("-i", "--input", help="Optional prepared input file (tar)", default=None) parser.add_argument("-o", "--output", help="Output directory", default="/tmp/") parser.add_argument("-v", "--verbose", help="Increase output verbosity", action='count', default=0) args = parser.parse_args() # load configuration assert is_readable(args.config) config = toml.load(args.config) # set output base filename baseFilename = "{}{}{}".format(args.output, config['name'], timestamp) if args.output.endswith("/") \ else "{}/{}{}".format(args.output, config['name'], timestamp) assert is_writable(baseFilename) init_logger(baseFilename+'.log', args.verbose) logger = logging.getLogger(__name__) tsv_writer = TSV(baseFilename+'.tsv', 'w') # log parameters logger.debug("Arguments:\n{}".format( "\n".join(["\t{}: {}".format(arg, getattr(args, arg)) for arg in vars(args)]))) logger.debug("Configuration:\n{}".format( "\n".join(["\t{}: {}".format(k,v) for k,v in config.items()]))) # run training run(args, tsv_writer, config) logging.shutdown()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 6738, 640, 1330, 640, 198, 198, 11748, 284, 4029, 198, 198, 6738, 1366, 13, 952, 13, 45066, 62, 34960, 1330, 20414, 37065, 198, 6738, 1366...
2.774242
660
import argparse, time, os, cv2, shutil, datetime, math, subprocess, pickle, multiprocessing from actn import * ap = argparse.ArgumentParser() # for help -> python alpha.py --help ap.add_argument("-f", "--file", required=True, help="name of the file") ap.add_argument("-o", "--output", required=True, help="specifiy the folder path of output") ap.add_argument("-b", "--before", required=True, help="seconds to cut before", type=int) ap.add_argument("-a", "--after", required=True, help="seconds to cut after", type=int) args = vars(ap.parse_args()) if __name__ == "__main__": a = core_overwatch(file_name=str(args['file']), output_folder=str(args['output']), before=int(args['before']), after=int(args['after'])) a.build_folder() start_frame, n, common_diff = a.which_frame_formula() # returns a,n,d c = a.select_frame(start_frame, n, common_diff) # returns which_frame_list st = time.time() print("[+++++]Reading Frames....") a.read_save_frame() print("[+++++++]Finished Reading Frames") print("[+++++++]Image Processing Rolling....") d = a.get_action_process_multithreaded_cmd_run_commands() print("[++++++++]Finished Processing Images") f = a.action_index_find(raw_list=d, which_frame=c) # return list to start aft and bef(action first observed) g = a.build_frame_range_to_cut(f) a.send_frame_signal(frame_range=g) print('[++++++]Time req to run The Engine is {0}m'.format((time.time() - st) / 60)) print('Deleting temp folders..') shutil.rmtree('./raw_calc/frame_db_temp') os.remove('./tmp1') os.remove('./tmp2')
[ 11748, 1822, 29572, 11, 640, 11, 28686, 11, 269, 85, 17, 11, 4423, 346, 11, 4818, 8079, 11, 10688, 11, 850, 14681, 11, 2298, 293, 11, 18540, 305, 919, 278, 198, 6738, 719, 77, 1330, 1635, 198, 198, 499, 796, 1822, 29572, 13, 28100...
2.455861
691
from dcim.choices import DeviceStatusChoices from dcim.models import Device from extras.reports import Report
[ 6738, 30736, 320, 13, 6679, 1063, 1330, 16232, 19580, 22164, 1063, 198, 6738, 30736, 320, 13, 27530, 1330, 16232, 198, 6738, 33849, 13, 48922, 1330, 6358, 628 ]
4.111111
27
import socket import random import os import requests import re import github import minecraft import string import sys HOST = "xeroxirc.net" PORT = 6667 NICK = "ak_sus" #PASSWORD = os.getenv("PASSWORD") CHANNEL = "#BlockySurvival" SERVER = "" readbuffer = "" s = socket.socket() s.connect((HOST, PORT)) send(bytes("NICK %s\r\n" % NICK, "UTF-8")) send(bytes("USER %s %s %s :%s\r\n" % (NICK, NICK, NICK, NICK), "UTF-8")) #s.send(bytes("PRIVMSG NickServ regain {} {}\r\n".format(NICK, PASSWORD), "UTF-8")) #s.send(bytes("PRIVMSG NickServ identify {} {}\r\n".format(NICK, PASSWORD), "UTF-8")) send(bytes("JOIN {}\r\n".format(CHANNEL), "UTF-8")) #s.send(bytes("PRIVMSG NickServ :identify {}\r\n".format(PASSWORD), "UTF-8")) readbuffer = readbuffer + s.recv(1024).decode("UTF-8") temp = str.split(readbuffer, "\n") readbuffer = temp.pop() for line in temp: SERVER = str.rstrip(line)[1:].split()[0] print(str.rstrip(line)) while 1: readbuffer = readbuffer + s.recv(1024).decode("UTF-8") temp = str.split(readbuffer, "\n") readbuffer = temp.pop() for line in temp: print(str.rstrip(line)) message = str.rstrip(line).split(" PRIVMSG {} :".format(CHANNEL)) if "PING" in line: send("PONG :{}\r\n".format(SERVER).encode("utf-8")) msg = message[-1] tokens = msg.split() if msg == "$hello": send("PRIVMSG {} :Hello!\r\n".format(CHANNEL).encode("utf-8")) if msg == "$ping": send("PRIVMSG {} :Pong!\r\n".format(CHANNEL).encode("utf-8")) if msg == "$random": send("PRIVMSG {} :{}\r\n".format(CHANNEL, random.randint(0, 100)).encode("utf-8")) if msg.startswith("$youtube "): html = requests.get("https://www.youtube.com/results?search_query=" + " ".join(msg.split()[1:])).content video_ids = re.findall(r"watch\?v=(\S{11})", html.decode()) send("PRIVMSG {} :https://www.youtube.com/watch?v={}\r\n".format(CHANNEL, video_ids[0]).encode("utf-8")) #if msg.startswith("$google "): send("PRIVMSG {} :{}\r\n".format(CHANNEL, googlesearch.search(" ".join(msg.split()[1:]))[0]).encode("utf-8")) #if msg.startswith("$wolfram "): send("PRIVMSG {} :{}\r\n".format(CHANNEL, wolfram.get(" ".join(msg.split()[1:]))).encode("utf-8")) if msg.startswith("$github "): if tokens[1] == "url": send("PRIVMSG {} :https://github.com/{}/{}\r\n".format(CHANNEL, tokens[2], tokens[3]).encode("utf-8")) if tokens[1] == "issues": send("PRIVMSG {} :#{}: {}\r\n".format(CHANNEL, tokens[4], github.get_issue_title(tokens[2], tokens[3], tokens[4])).encode("utf-8")) if msg == "$server": send("PRIVMSG {} :{}\r\n".format(CHANNEL, minecraft.get()).encode("utf-8")) if msg == "$help": send("PRIVMSG {} :Avalible commands: $hello, $ping, $youtube, $google, $github, $wolfram.\r\n".format(CHANNEL).encode("utf-8")) if msg.startswith("$help "): if tokens[1] == "hello": send("PRIVMSG {} :Syntax: $hello Action: Says \"Hello!\".\r\n".format(CHANNEL).encode("utf-8")) if tokens[1] == "ping":send("PRIVMSG {} :Syntax: $ping Action: Says \"Ping!\".\r\n".format(CHANNEL).encode("utf-8")) if tokens[1] == "youtube": send("PRIVMSG {} :Syntax: $youtube <keyword> Action: Sends the URL of a YouTube video matching the keyword given.\r\n".format(CHANNEL).encode("utf-8")) #if tokens[1] == "google": send("PRIVMSG {} :Syntax: $google <keyword> Action: Sends the URL of a google search with the keyword given\r\n".format(CHANNEL).encode("utf-8")) if tokens[1] == "github": send("PRIVMSG {} :Syntax: $github <topic> <user> <repo> <number> Action: Returns data about a github repo.\r\n".format(CHANNEL).encode("utf-8")) #if tokens[1] == "wolfram": send("PRIVMSG {} :Syntax: $wolfram <query> Action: Asks Wolfram|Alpha the query given.\r\n".format(CHANNEL).encode("utf-8"))
[ 11748, 17802, 198, 11748, 4738, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 302, 198, 11748, 33084, 198, 11748, 6164, 3323, 198, 11748, 4731, 198, 11748, 25064, 198, 39, 10892, 796, 366, 87, 263, 1140, 1980, 13, 3262, 1, 198, 15490...
2.291617
1,694
""" The file defines the evaluate process on target dataset. @Author: Yang Lu @Github: https://github.com/luyanger1799 @Project: https://github.com/luyanger1799/amazing-semantic-segmentation """ from sklearn.metrics import multilabel_confusion_matrix from amazingutils.helpers import * from amazingutils.utils import load_image import numpy as np import argparse import sys import cv2 import os parser = argparse.ArgumentParser() parser.add_argument('--dataset', help='The path of the dataset.', type=str, default='CamVid') parser.add_argument('--crop_height', help='The height to crop the image.', type=int, default=256) parser.add_argument('--crop_width', help='The width to crop the image.', type=int, default=256) parser.add_argument('--predictions', help='The path of predicted image.', type=str, required=True) args = parser.parse_args() # check related paths paths = check_related_path(os.getcwd()) # get image and label file names for training and validation _, _, _, _, _, test_label_names = get_dataset_info(args.dataset) # get color info csv_file = os.path.join(args.dataset, 'class_dict.csv') class_names, _ = get_colored_info(csv_file) # get the prediction file name list if not os.path.exists(args.predictions): raise ValueError('the path of predictions does not exit.') prediction_names = [] for file in sorted(os.listdir(args.predictions)): prediction_names.append(os.path.join(args.predictions, file)) # evaluated classes evaluated_classes = get_evaluated_classes(os.path.join(args.dataset, 'evaluated_classes.txt')) num_classes = len(class_names) class_iou = dict() for name in evaluated_classes: class_iou[name] = list() class_idx = dict(zip(class_names, range(num_classes))) # begin evaluate assert len(test_label_names) == len(prediction_names) for i, (name1, name2) in enumerate(zip(test_label_names, prediction_names)): sys.stdout.write('\rRunning test image %d / %d' % (i + 1, len(test_label_names))) sys.stdout.flush() label = np.array(cv2.resize(load_image(name1), dsize=(args.crop_width, args.crop_height), interpolation=cv2.INTER_NEAREST)) pred = np.array(cv2.resize(load_image(name2), dsize=(args.crop_width, args.crop_height), interpolation=cv2.INTER_NEAREST)) confusion_matrix = multilabel_confusion_matrix(label.flatten(), pred.flatten(), labels=list(class_idx.values())) for eval_cls in evaluated_classes: eval_idx = class_idx[eval_cls] (tn, fp), (fn, tp) = confusion_matrix[eval_idx] if tp + fn > 0: class_iou[eval_cls].append(tp / (tp + fp + fn)) print('\n****************************************') print('* The IoU of each class is as follows: *') print('****************************************') for eval_cls in evaluated_classes: class_iou[eval_cls] = np.mean(class_iou[eval_cls]) print('{cls:}: {iou:.4f}'.format(cls=eval_cls, iou=class_iou[eval_cls])) print('\n**********************************************') print('* The Mean IoU of all classes is as follows: *') print('**********************************************') print('Mean IoU: {mean_iou:.4f}'.format(mean_iou=np.mean(list(class_iou.values()))))
[ 37811, 198, 464, 2393, 15738, 262, 13446, 1429, 319, 2496, 27039, 13, 198, 198, 31, 13838, 25, 10998, 6026, 198, 31, 38, 10060, 25, 3740, 1378, 12567, 13, 785, 14, 2290, 88, 2564, 1558, 2079, 198, 31, 16775, 25, 3740, 1378, 12567, 1...
2.729822
1,177
from pso.GPSO import GPSO import numpy as np import time import pandas as pd np.random.seed(42) # f1 # f2 # f3 # f4 # f5 # f6 # f7 def Rosenbrock(p): ''' -2.048<=xi<=2.048 (1,...,1)0 :param p: :return: ''' n_dim = len(p) res = 0 for i in range(n_dim - 1): res += 100 * np.square(np.square(p[i]) - p[i + 1]) + np.square(p[i] - 1) return res # f8 ,APSOf8 # f9 def Rastrigin(p): ''' -5.12<=xi<=5.12 10n has a global minimum at x = 0 where f(x) = 0 ''' return np.sum([np.square(x) - 10 * np.cos(2 * np.pi * x) + 10 for x in p]) # f10 # f11 ok def Griewank(p): ''' (0,...,0)0 -600<=xi<=600 ''' part1 = [np.square(x) / 4000 for x in p] part2 = [np.cos(x / np.sqrt(i + 1)) for i, x in enumerate(p)] return np.sum(part1) - np.prod(part2) + 1 g = 10000 times = 30 table = np.zeros((2, 10)) gBest = np.zeros((10, 30)) # 101030 for i in range(times): optimizer = GPSO(func=Sphere, dim=30, pop=20, max_iter=g, lb=np.ones(30) * (-100), ub=np.ones(30) * 100, w=0.9, c1=2, c2=2, acceptance=0.01) start = time.time() optimizer.run() end = time.time() print('Sphere:', optimizer.gbest_y) table[0, 0] += optimizer.gbest_y table[1, 0] += end - start gBest[0, i] = optimizer.gbest_y optimizer = GPSO(func=Sch222, dim=30, pop=20, max_iter=g, lb=np.ones(30) * (-10), ub=np.ones(30) * 10, w=0.9, c1=2, c2=2, acceptance=0.01) start = time.time() optimizer.run() end = time.time() print('Sch222:', optimizer.gbest_y) table[0, 1] += optimizer.gbest_y table[1, 1] += end - start gBest[1, i] = optimizer.gbest_y optimizer = GPSO(func=Quadric, dim=30, pop=20, max_iter=g, lb=np.ones(30) * (-100), ub=np.ones(30) * 100, w=0.9, c1=2, c2=2, acceptance=100) start = time.time() optimizer.run() end = time.time() print('Quadric:', optimizer.gbest_y) table[0, 2] += optimizer.gbest_y table[1, 2] += end - start gBest[2, i] = optimizer.gbest_y optimizer = GPSO(func=Rosenbrock, dim=30, pop=20, max_iter=g, lb=np.ones(30) * (-10), ub=np.ones(30) * 10, w=0.9, c1=2, c2=2, acceptance=100) start = time.time() optimizer.run() end = time.time() print('Rosenbrock:', optimizer.gbest_y) table[0, 3] += optimizer.gbest_y table[1, 3] += end - start gBest[3, i] = optimizer.gbest_y optimizer = GPSO(func=Step, dim=30, pop=20, max_iter=g, lb=np.ones(30) * (-100), ub=np.ones(30) * 100, w=0.9, c1=2, c2=2, acceptance=0) start = time.time() optimizer.run() end = time.time() print('Step:', optimizer.gbest_y) table[0, 4] += optimizer.gbest_y table[1, 4] += end - start gBest[4, i] = optimizer.gbest_y optimizer = GPSO(func=Noise, dim=30, pop=20, max_iter=g, lb=np.ones(30) * (-1.28), ub=np.ones(30) * 1.28, w=0.9, c1=2, c2=2, acceptance=0.01) start = time.time() optimizer.run() end = time.time() print('Noise:', optimizer.gbest_y) table[0, 5] += optimizer.gbest_y table[1, 5] += end - start gBest[5, i] = optimizer.gbest_y optimizer = GPSO(func=Schewel, dim=30, pop=20, max_iter=g, lb=np.ones(30) * (-500), ub=np.ones(30) * 500, w=0.9, c1=2, c2=2, acceptance=-10000) start = time.time() optimizer.run() end = time.time() print('Schewel:', optimizer.gbest_y) table[0, 6] += optimizer.gbest_y table[1, 6] += end - start gBest[6, i] = optimizer.gbest_y optimizer = GPSO(func=Rastrigin, dim=30, pop=20, max_iter=g, lb=np.ones(30) * (-5.12), ub=np.ones(30) * 5.12, w=0.9, c1=2, c2=2, acceptance=50) start = time.time() optimizer.run() end = time.time() print('Rastrigin:', optimizer.gbest_y) table[0, 7] += optimizer.gbest_y table[1, 7] += end - start gBest[7, i] = optimizer.gbest_y optimizer = GPSO(func=Ackley, dim=30, pop=20, max_iter=g, lb=np.ones(30) * (-32), ub=np.ones(30) * 32, w=0.9, c1=2, c2=2, acceptance=0.01) start = time.time() optimizer.run() end = time.time() print('Ackley:', optimizer.gbest_y) table[0, 8] += optimizer.gbest_y table[1, 8] += end - start gBest[8, i] = optimizer.gbest_y optimizer = GPSO(func=Griewank, dim=30, pop=20, max_iter=g, lb=np.ones(30) * (-600), ub=np.ones(30) * 600, w=0.9, c1=2, c2=2, acceptance=0.01) start = time.time() optimizer.run() end = time.time() print('Griewank:', optimizer.gbest_y) table[0, 9] += optimizer.gbest_y table[1, 9] += end - start gBest[9, i] = optimizer.gbest_y table = table / times table = pd.DataFrame(table) table.columns = ['Sphere', 'Schwefel_P222', 'Quadric', 'Rosenbrock', 'Step', 'Quadric_Noise', 'Schwefel', 'Rastrigin', 'Ackley', 'Griewank'] table.index = ['mean score', 'mean time'] print(table) print('1030std:', np.std(gBest, axis=1)) print('1030best:', np.min(gBest, axis=1))
[ 6738, 279, 568, 13, 38, 3705, 46, 1330, 15472, 46, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 37659, 13, 25120, 13, 28826, 7, 3682, 8, 628, 198, 2, 277, 16, 220, 198, 2, ...
1.942586
2,630
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # from setuptools import setup import setuptools setup( name='contrail-server-manager', version='0.1dev', packages=setuptools.find_packages(exclude=["*.pyc"]), zip_safe=False, long_description="Server Manager package", )
[ 2, 198, 2, 15069, 357, 66, 8, 2211, 7653, 9346, 27862, 11, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 11748, 900, 37623, 10141, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, ...
2.844037
109
# Test restoring a scene with multiple lists with different number # of fiducials # first fiducial list displayNode1 = slicer.vtkMRMLMarkupsDisplayNode() slicer.mrmlScene.AddNode(displayNode1) fidNode1 = slicer.vtkMRMLMarkupsFiducialNode() fidNode1.SetName("FidNode1") slicer.mrmlScene.AddNode(fidNode1) fidNode1.SetAndObserveDisplayNodeID(displayNode1.GetID()) coords = [0.0, 0.0, 0.0] numFidsInList1 = 5 for i in range(numFidsInList1): fidNode1.AddFiducialFromArray(coords) coords[0] += 1.0 coords[1] += 2.0 coords[2] += 1.0 # second fiducial list displayNode2 = slicer.vtkMRMLMarkupsDisplayNode() slicer.mrmlScene.AddNode(displayNode2) fidNode2 = slicer.vtkMRMLMarkupsFiducialNode() fidNode2.SetName("FidNode2") slicer.mrmlScene.AddNode(fidNode2) fidNode2.SetAndObserveDisplayNodeID(displayNode2.GetID()) numFidsInList2 = 10 for i in range(numFidsInList2): fidNode2.AddFiducialFromArray(coords) coords[0] += 1.0 coords[1] += 1.0 coords[2] += 3.0 sv = slicer.mrmlScene.AddNode(slicer.vtkMRMLSceneViewNode()) numFidNodesBeforeStore = slicer.mrmlScene.GetNumberOfNodesByClass('vtkMRMLMarkupsFiducialNode') sv.StoreScene() # add a third list that will get removed on restore # second fiducial list displayNode3 = slicer.vtkMRMLMarkupsDisplayNode() slicer.mrmlScene.AddNode(displayNode3) fidNode3 = slicer.vtkMRMLMarkupsFiducialNode() fidNode3.SetName("FidNode3") slicer.mrmlScene.AddNode(fidNode3) fidNode3.SetAndObserveDisplayNodeID(displayNode3.GetID()) numFidsInList3 = 2 for i in range(numFidsInList3): fidNode3.AddFiducialFromArray(coords) coords[0] += 1.0 coords[1] += 2.0 coords[2] += 3.0 sv.RestoreScene() numFidNodesAfterRestore = slicer.mrmlScene.GetNumberOfNodesByClass('vtkMRMLMarkupsFiducialNode') if numFidNodesAfterRestore != numFidNodesBeforeStore: print "After restoring the scene, expected ", numFidNodesBeforeStore, " fiducial nodes, but have ", numFidNodesAfterRestore exceptionMessage = "After restoring the scene, expected " + str(numFidNodesBeforeStore) + " fiducial nodes, but have " + str(numFidNodesAfterRestore) raise Exception(exceptionMessage) #fid1AfterRestore = slicer.mrmlScene.GetNodeByID("vtkMRMLMarkupsFiducialNode1") fid1AfterRestore = slicer.mrmlScene.GetFirstNodeByName("FidNode1") numFidsInList1AfterRestore = fid1AfterRestore.GetNumberOfMarkups() print "After restore, list with name FidNode1 has id ", fid1AfterRestore.GetID(), " and num fids = ", numFidsInList1AfterRestore if numFidsInList1AfterRestore != numFidsInList1: exceptionMessage = "After restoring list 1, id = " + fid1AfterRestore.GetID() exceptionMessage += ", expected " + str(numFidsInList1) + " but got " exceptionMessage += str(numFidsInList1AfterRestore) raise Exception(exceptionMessage) # fid2AfterRestore = slicer.mrmlScene.GetNodeByID("vtkMRMLMarkupsFiducialNode2") fid2AfterRestore = slicer.mrmlScene.GetFirstNodeByName("FidNode2") numFidsInList2AfterRestore = fid2AfterRestore.GetNumberOfMarkups() print "After restore, list with name FidNode2 has id ", fid2AfterRestore.GetID(), " and num fids = ", numFidsInList2AfterRestore if numFidsInList2AfterRestore != numFidsInList2: exceptionMessage = "After restoring list 2, id = " + fid2AfterRestore.GetID() exceptionMessage += ", expected " + str(numFidsInList2) + " but got " exceptionMessage += str(numFidsInList2AfterRestore) raise Exception(exceptionMessage) # check the displayable manager for the right number of widgets/seeds lm = slicer.app.layoutManager() td = lm.threeDWidget(0) ms = vtk.vtkCollection() td.getDisplayableManagers(ms) fidManagerIndex = -1 for i in range(ms.GetNumberOfItems()): m = ms.GetItemAsObject(i) if m.GetClassName() == "vtkMRMLMarkupsFiducialDisplayableManager3D": fidManagerIndex = i print m.GetClassName(), fidManagerIndex if fidManagerIndex == -1: exceptionMessage = "Failed to find markups fiducial displayable manager 3d!" raise Exception(exceptionMessage) mfm = ms.GetItemAsObject(fidManagerIndex) h = mfm.GetHelper() print 'Helper = ',h seedWidget1 = h.GetWidget(fid1AfterRestore) rep1 = seedWidget1.GetRepresentation() print "Seed widget 1 has number of seeds = ",rep1.GetNumberOfSeeds() if rep1.GetNumberOfSeeds() != numFidsInList1AfterRestore: exceptionMessage = "After restoring list 1, expected seed widget to have " exceptionMessage += str(numFidsInList1AfterRestore) + " seeds, but it has " exceptionMessage += str(rep1.GetNumberOfSeeds()) raise Exception(exceptionMessage) # check positions for s in range(numFidsInList1AfterRestore): seed = seedWidget1.GetSeed(s) handleRep = seed.GetHandleRepresentation() worldPos = handleRep.GetWorldPosition() print "seed ",s," world position = ",worldPos fidPos = [0.0,0.0,0.0] fid1AfterRestore.GetNthFiducialPosition(s,fidPos) xdiff = fidPos[0] - worldPos[0] ydiff = fidPos[1] - worldPos[1] zdiff = fidPos[2] - worldPos[2] diffTotal = xdiff + ydiff + zdiff if diffTotal > 0.1: exceptionMessage = "List1: Difference between seed position " + str(s) exceptionMessage += " and fiducial position totals = " + str(diffTotal) raise Exception(exceptionMessage) seedWidget2 = h.GetWidget(fid2AfterRestore) rep2 = seedWidget2.GetRepresentation() print "Seed widget 2 has number of seeds = ",rep2.GetNumberOfSeeds() if rep2.GetNumberOfSeeds() != numFidsInList2AfterRestore: exceptionMessage = "After restoring fid list 2, expected seed widget to have " exceptionMessage += str(numFidsInList2AfterRestore) + " seeds, but it has " exceptionMessage += str(rep2.GetNumberOfSeeds()) raise Exception(exceptionMessage) # check positions for s in range(numFidsInList2AfterRestore): seed = seedWidget2.GetSeed(s) handleRep = seed.GetHandleRepresentation() worldPos = handleRep.GetWorldPosition() print "seed ",s," world position = ",worldPos fidPos = [0.0,0.0,0.0] fid2AfterRestore.GetNthFiducialPosition(s,fidPos) xdiff = fidPos[0] - worldPos[0] ydiff = fidPos[1] - worldPos[1] zdiff = fidPos[2] - worldPos[2] diffTotal = xdiff + ydiff + zdiff if diffTotal > 0.1: exceptionMessage = "List2: Difference between seed position " + str(s) exceptionMessage += " and fiducial position totals = " + str(diffTotal) raise Exception(exceptionMessage) ms.RemoveAllItems()
[ 198, 2, 6208, 25646, 257, 3715, 351, 3294, 8341, 351, 1180, 1271, 198, 2, 286, 49909, 1229, 8231, 198, 198, 2, 717, 49909, 1229, 498, 1351, 198, 13812, 19667, 16, 796, 14369, 263, 13, 85, 30488, 13599, 5805, 9704, 4739, 23114, 19667, ...
2.770318
2,264
# -*- coding:utf-8 -*- # @Time : 2019/7/21 12:35 PM # @Author : __wutonghe__ # docs https://channels.readthedocs.io/en/latest/tutorial/part_3.html#rewrite-the-consumer-to-be-asynchronous from channels.generic.websocket import AsyncWebsocketConsumer import json
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 13130, 14, 22, 14, 2481, 1105, 25, 2327, 3122, 198, 2, 2488, 13838, 220, 1058, 11593, 86, 315, 506, 258, 834, 198, 2, 34165, 3740, 1...
2.567308
104
import eagerpy as ep import numpy as np from scipy.interpolate import RegularGridInterpolator import hypney tl = ep.numpy def test_regular_grid_interpolator(): """Adapted from https://github.com/sbarratt/torch_interpolations/blob/master/tests/test_grid_interpolator.py """ points = [tl.arange(-0.5, 2.5, 0.1) * 1.0, tl.arange(-0.5, 2.5, 0.2) * 1.0] values = ( hypney.utils.eagerpy.sin(points[0])[:, None] + 2 * hypney.utils.eagerpy.cos(points[1])[None, :] + hypney.utils.eagerpy.sin(5 * points[0][:, None] @ points[1][None, :]) ) X, Y = ep.meshgrid(tl.arange(-0.5, 2, 0.1), tl.arange(-0.5, 2, 0.1)) points_to_interp = ep.stack([X.flatten(), Y.flatten()]).T gi = hypney.utils.interpolation.RegularGridInterpolator(points, values) fx = gi(points_to_interp) rgi = RegularGridInterpolator( [p.numpy() for p in points], [x.numpy() for x in values], bounds_error=False ) rfx = rgi(points_to_interp.numpy()) np.testing.assert_allclose(rfx, fx.numpy(), atol=1e-6) # TODO: port derivative test to eagerpy # note that points_to_interp has to be transposed # # def test_regular_grid_interpolator_derivative(): # points = [torch.arange(-.5, 2.5, .5) * 1., torch.arange(-.5, 2.5, .5) * 1.] # values = torch.sin(points[0])[:, None] + 2 * torch.cos(points[1])[None, :] + torch.sin(5 * points[0][:, None] @ points[1][None, :]) # values.requires_grad_(True) # # X, Y = np.meshgrid(np.arange(-.5, 2, .19), np.arange(-.5, 2, .19)) # points_to_interp = [torch.from_numpy( # X.flatten()).float(), torch.from_numpy(Y.flatten()).float()] # # def f(values): # return torch_interpolations.RegularGridInterpolator( # points, values)(points_to_interp) # # torch.autograd.gradcheck(f, (values,), eps=1e-5, atol=1e-1, rtol=1e-1)
[ 11748, 11069, 9078, 355, 2462, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 3849, 16104, 378, 1330, 23603, 41339, 9492, 16104, 1352, 198, 198, 11748, 5328, 1681, 198, 198, 28781, 796, 2462, 13, 77, 32152, 628, 198, ...
2.169591
855
#!/usr/bin/python3 ########################################## # Routino database access from Python. # # Part of the Routino routing software. ########################################## # This file Copyright 2018 Andrew M. Bishop # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. ########################################## import routino.database # Database, access all attributes database = routino.database.LoadDatabase("../../src/test/fat", "turns") if database is None: database = routino.database.LoadDatabase("../src/test/fat", "turns") if database is None: print("Failed to load database") exit(1) print(database) database_attrs = ['nnodes', 'nsegments', 'nways', 'nrelations'] for attr in database_attrs: print(" Attribute: " + attr + " =", getattr(database, attr)) print("") # A single node, access all attributes and all functions node=database.GetNode(0) print("1st node =", node) node_attrs = ['id', 'firstsegment', 'latitude', 'longitude', 'allow', 'flags'] node_infos = ['', '', 'degrees', 'degrees', '[note 1]', '[note 2]'] for attr,info in zip(node_attrs,node_infos): print(" Attribute: " + attr + " =", getattr(node, attr), info) segments = node.Segments() print(" Function: " + "Segments()" + " = [" + ", ".join([str(segments[x]) for x in range(len(segments))]) + "]") print("") # A single segment, access all attributes and all functions segment=database.GetSegment(0) print("1st segment =", segment) segment_attrs = ['id', 'node1', 'node2', 'next2', 'way', 'distance', 'flags'] segment_infos = ['', '', '', '', '', 'km', '[note 3]'] for attr,info in zip(segment_attrs,segment_infos): print(" Attribute: " + attr + " =", getattr(segment, attr), info) print(" Function: " + "Node1()" + " = " + str(segment.Node1())) print(" Function: " + "Node2()" + " = " + str(segment.Node2())) print(" Function: " + "Way()" + " = " + str(segment.Way())) print("") # A single way, access all attributes and all functions way=database.GetWay(0) print("1st way =", way) way_attrs = ['id', 'name', 'allow', 'type', 'props', 'speed', 'weight', 'height', 'width', 'length'] way_infos = ['', '', '[note 1]', '[note 4]', '[note 5]', 'km/hr [note 6]', 'tonnes [note 6]', 'metres [note 6]', 'metres [note 6]', 'metres [note 6]'] for attr,info in zip(way_attrs,way_infos): print(" Attribute: " + attr + " =", getattr(way, attr), info) print("") # A single relation, access all attributes and all functions relation=database.GetRelation(0) print("1st relation =", relation) relation_attrs = ['id', 'from_seg', 'via_node', 'to_seg', 'from_way', 'to_way', 'from_node', 'to_node', 'except_transport'] relation_infos = ['', '', '', '', '', '', '', '', '[note 7]'] for attr,info in zip(relation_attrs,relation_infos): print(" Attribute: " + attr + " =", getattr(relation, attr), info) print(" Function: " + "FromSegment()" + " = " + str(relation.FromSegment())) print(" Function: " + "ViaNode()" + " = " + str(relation.ViaNode())) print(" Function: " + "ToSegment()" + " = " + str(relation.ToSegment())) print(" Function: " + "FromWay()" + " = " + str(relation.FromWay())) print(" Function: " + "ToWay()" + " = " + str(relation.ToWay())) print(" Function: " + "FromNode()" + " = " + str(relation.FromNode())) print(" Function: " + "ToNode()" + " = " + str(relation.ToNode())) print("") # The list of nodes as a list and an iterable (just the first 4) nodes=database.Nodes() print("len(database.Nodes()) = " + str(len(nodes))) print("database.Nodes() = [" + ", ".join([str(nodes[x]) for x in range(4)]) + ", ...]") for node in nodes: if node.id == 4: break print(node) print("") # The list of segments as a list and an iterable (just the first 4) segments=database.Segments() print("len(database.Segments()) = " + str(len(segments))) print("database.Segments() = [" + ", ".join([str(segments[x]) for x in range(4)]) + ", ...]") for segment in segments: if segment.id == 4: break print(segment) print("") # The list of ways as a list and an iterable (just the first 4) ways=database.Ways() print("len(database.Ways()) = " + str(len(ways))) print("database.Ways() = [" + ", ".join([str(ways[x]) for x in range(4)]) + ", ...]") for way in ways: if way.id == 4: break print(way) print("") # The list of relations as a list and an iterable (just the first 4) relations=database.Relations() print("len(database.Relations()) = " + str(len(relations))) print("database.Relations() = [" + ", ".join([str(relations[x]) for x in range(4)]) + ", ...]") for relation in relations: if relation.id == 4: break print(relation) print("") # Enumerated lists transports_enum = ["Transports_None", "Transports_Foot", "Transports_Horse", "Transports_Wheelchair", "Transports_Bicycle", "Transports_Moped", "Transports_Motorcycle", "Transports_Motorcar", "Transports_Goods", "Transports_HGV", "Transports_PSV", "Transports_ALL"] nodeflags_enum = ["Nodeflag_Super", "Nodeflag_U_Turn", "Nodeflag_Mini_Roundabout", "Nodeflag_Turn_Restrict", "Nodeflag_Turn_Restrict2"] segmentflags_enum = ["Segmentflag_Area", "Segmentflag_Oneway_1to2", "Segmentflag_Oneway_2to1", "Segmentflag_Super", "Segmentflag_Normal"] properties_enum = ["Properties_None", "Properties_Paved", "Properties_Multilane", "Properties_Bridge", "Properties_Tunnel", "Properties_FootRoute", "Properties_BicycleRoute", "Properties_ALL"] highway_enum = ["Highway_Motorway", "Highway_Trunk", "Highway_Primary", "Highway_Secondary", "Highway_Tertiary", "Highway_Unclassified", "Highway_Residential", "Highway_Service", "Highway_Track", "Highway_Cycleway", "Highway_Path", "Highway_Steps", "Highway_Ferry", "Highway_Count", "Highway_CycleBothWays", "Highway_OneWay", "Highway_Roundabout", "Highway_Area"] print("Note 1: The Node's and Way's 'allow' parameter can be the combination of these enumerated values:") print_enum(transports_enum) print("") print("Note 2: The Node's 'flags' parameter can be the combination of these enumerated values:") print_enum(nodeflags_enum) print("") print("Note 3: The Segment's 'flags' parameter can be the combination of these enumerated values:") print_enum(segmentflags_enum) print("") print("Note 4: The Way's 'type' parameter can be one the combination of these enumerated values:") print_enum(highway_enum) print("") print("Note 5: The Way's 'props' parameter can be the combination of these enumerated values:") print_enum(properties_enum) print("") print("Note 6: A value of zero for a Way's speed, weight, height, width or length means that there is no limit.") print("") print("Note 7: The Relation's 'except_transport' parameter can be the combination of these enumerated values:") print_enum(transports_enum) print("") import gc gc.collect()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 29113, 7804, 2235, 198, 2, 39602, 2879, 6831, 1895, 422, 11361, 13, 198, 2, 198, 2, 2142, 286, 262, 39602, 2879, 28166, 3788, 13, 198, 29113, 7804, 2235, 198, 2, 770, 2393, 15069, 2864,...
2.380979
3,512
import io from .. import util
[ 11748, 33245, 198, 198, 6738, 11485, 1330, 7736, 628 ]
3.555556
9
matA = [[1,2,3],[4,5,6],[7,8,15]] print(determinant(matA))
[ 198, 6759, 32, 796, 16410, 16, 11, 17, 11, 18, 38430, 19, 11, 20, 11, 21, 38430, 22, 11, 23, 11, 1314, 11907, 220, 220, 220, 198, 4798, 7, 67, 13221, 415, 7, 6759, 32, 4008 ]
1.722222
36
# # PySNMP MIB module BAY-STACK-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BAY-STACK-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:19:06 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, Counter64, Bits, Counter32, ModuleIdentity, ObjectIdentity, IpAddress, iso, Integer32, NotificationType, MibIdentifier, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "Counter64", "Bits", "Counter32", "ModuleIdentity", "ObjectIdentity", "IpAddress", "iso", "Integer32", "NotificationType", "MibIdentifier", "Unsigned32") TruthValue, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "TextualConvention", "DisplayString") bayStackMibs, = mibBuilder.importSymbols("SYNOPTICS-ROOT-MIB", "bayStackMibs") bayStackMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 45, 5, 13)) bayStackMib.setRevisions(('2013-10-11 00:00', '2012-10-02 00:00', '2009-09-28 00:00', '2007-09-04 00:00', '2005-08-22 00:00',)) if mibBuilder.loadTexts: bayStackMib.setLastUpdated('201310110000Z') if mibBuilder.loadTexts: bayStackMib.setOrganization('Nortel Networks') bayStackObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 45, 5, 13, 1)) bayStackConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 45, 5, 13, 1, 1)) bayStackConfigExpectedStackSize = MibScalar((1, 3, 6, 1, 4, 1, 45, 5, 13, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 8))).setMaxAccess("readwrite") if mibBuilder.loadTexts: bayStackConfigExpectedStackSize.setStatus('current') bayStackConfigStackErrorNotificationInterval = MibScalar((1, 3, 6, 1, 4, 1, 45, 5, 13, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)).clone(60)).setUnits('Seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: bayStackConfigStackErrorNotificationInterval.setStatus('current') bayStackConfigStackErrorNotificationEnabled = MibScalar((1, 3, 6, 1, 4, 1, 45, 5, 13, 1, 1, 3), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: bayStackConfigStackErrorNotificationEnabled.setStatus('current') bayStackConfigStackRebootUnitOnFailure = MibScalar((1, 3, 6, 1, 4, 1, 45, 5, 13, 1, 1, 4), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: bayStackConfigStackRebootUnitOnFailure.setStatus('current') bayStackConfigStackRetryCount = MibScalar((1, 3, 6, 1, 4, 1, 45, 5, 13, 1, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readwrite") if mibBuilder.loadTexts: bayStackConfigStackRetryCount.setStatus('current') bayStackUnitConfigTable = MibTable((1, 3, 6, 1, 4, 1, 45, 5, 13, 1, 2), ) if mibBuilder.loadTexts: bayStackUnitConfigTable.setStatus('current') bayStackUnitConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 45, 5, 13, 1, 2, 1), ).setIndexNames((0, "BAY-STACK-MIB", "bayStackUnitConfigIndex")) if mibBuilder.loadTexts: bayStackUnitConfigEntry.setStatus('current') bayStackUnitConfigIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 5, 13, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 8))).setMaxAccess("readonly") if mibBuilder.loadTexts: bayStackUnitConfigIndex.setStatus('current') bayStackUnitConfigRearPortAdminMode = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 5, 13, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("standalone", 1), ("stacking", 2), ("spb", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: bayStackUnitConfigRearPortAdminMode.setStatus('current') bayStackUnitConfigRearPortOperMode = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 5, 13, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("standalone", 1), ("stacking", 2), ("spb", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: bayStackUnitConfigRearPortOperMode.setStatus('current') mibBuilder.exportSymbols("BAY-STACK-MIB", bayStackMib=bayStackMib, bayStackUnitConfigIndex=bayStackUnitConfigIndex, bayStackConfigStackErrorNotificationEnabled=bayStackConfigStackErrorNotificationEnabled, PYSNMP_MODULE_ID=bayStackMib, bayStackConfigStackRetryCount=bayStackConfigStackRetryCount, bayStackConfigStackErrorNotificationInterval=bayStackConfigStackErrorNotificationInterval, bayStackUnitConfigRearPortOperMode=bayStackUnitConfigRearPortOperMode, bayStackUnitConfigEntry=bayStackUnitConfigEntry, bayStackConfigStackRebootUnitOnFailure=bayStackConfigStackRebootUnitOnFailure, bayStackObjects=bayStackObjects, bayStackUnitConfigRearPortAdminMode=bayStackUnitConfigRearPortAdminMode, bayStackConfig=bayStackConfig, bayStackUnitConfigTable=bayStackUnitConfigTable, bayStackConfigExpectedStackSize=bayStackConfigExpectedStackSize)
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 347, 4792, 12, 2257, 8120, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 615, ...
2.844283
1,933
#!/usr/bin/env python # This "flattens" a LaTeX document by replacing all # \input{X} lines w/ the text actually contained in X. See # associated README.md for details. # Use as a python module in a python script by saying import flatex then flatex.main(in file, out file) import os import re import sys def is_input(line): """ Determines whether or not a read in line contains an uncommented out \input{} statement. Allows only spaces between start of line and '\input{}'. """ #tex_input_re = r"""^\s*\\input{[^}]*}""" # input only tex_input_re = r"""(^[^\%]*\\input{[^}]*})|(^[^\%]*\\include{[^}]*})""" # input or include return re.search(tex_input_re, line) def get_input(line): """ Gets the file name from a line containing an input statement. """ tex_input_filename_re = r"""{[^}]*""" m = re.search(tex_input_filename_re, line) return m.group()[1:] def combine_path(base_path, relative_ref): """ Combines the base path of the tex document being worked on with the the relate reference found in that document. """ #if (base_path != ""): #print "os.getcwd()", os.getcwd() #os.chdir(base_path) filePath = os.path.abspath(relative_ref) filePath = filePath + ".tex" return filePath def expand_file(base_file): """ Recursively-defined function that takes as input a file and returns it with all the inputs replaced with the contents of the referenced file. """ output_lines = [] f = open(base_file, "r") for line in f: if is_input(line): new_base_file = combine_path(current_path, get_input(line)) output_lines += expand_file(new_base_file) output_lines.append('\n') # add a new line after each file input else: output_lines.append(line) f.close() return output_lines if __name__ == '__main__': base_file, output_file = sys.argv[1:] current_path = os.path.split(base_file)[0] main(base_file, output_file)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 220, 770, 366, 2704, 1078, 641, 1, 257, 4689, 49568, 3188, 416, 13586, 477, 220, 198, 2, 220, 3467, 15414, 90, 55, 92, 3951, 266, 14, 262, 2420, 1682, 7763, 287, 1395, 13, ...
2.490842
819
from .encrypt import register
[ 6738, 764, 12685, 6012, 1330, 7881, 198 ]
4.285714
7
import datetime import os import pandas from polygon.rest.client import RESTClient # ---------------------------- daystr = "2021-09-10" df = pull_day("LC", daystr) fname = r"M:\data\out.csv" print("Writing: ", fname) df.to_csv (fname, index = False, header=True)
[ 11748, 4818, 8079, 201, 198, 11748, 28686, 201, 198, 11748, 19798, 292, 201, 198, 6738, 7514, 14520, 13, 2118, 13, 16366, 1330, 30617, 11792, 201, 198, 201, 198, 201, 198, 2, 34400, 10541, 201, 198, 220, 220, 201, 198, 820, 2536, 220,...
2.592593
108
from random import choice, randint from re import sub, split, findall from string import ascii_letters from subprocess import PIPE, Popen from sys import argv, executable, stderr from .responses import pronouns, reactions, remarks if __name__ == "__main__": main()
[ 6738, 4738, 1330, 3572, 11, 43720, 600, 198, 6738, 302, 1330, 850, 11, 6626, 11, 1064, 439, 198, 6738, 4731, 1330, 355, 979, 72, 62, 15653, 198, 6738, 850, 14681, 1330, 350, 4061, 36, 11, 8099, 268, 198, 6738, 25064, 1330, 1822, 85,...
3.382716
81
import os from fabric.api import env, run, sudo, execute, local, settings, \ hide, open_shell, parallel, serial, put from fabric.decorators import hosts from fabric.contrib.console import confirm import fabric.colors as fab_col import paramiko import getpass from tabulate import tabulate file_hosts = "hosts.txt" paramiko.util.log_to_file("paramiko.log") env.colorize_errors = True # The selected hosts are the hosts in env (at the beginning) selected_hosts = env.hosts running_hosts = {} env.connection_attempts = 2 # env.skip_bad_hosts = True def load_hosts(): """ Load hosts from hosts.txt. A host can either be in form username@host[:port] password or username@host[:port] If no port is specified, port 22 is selected. """ with open(file_hosts, "r") as f: data = f.readlines() for line in data: try: host, password = line.strip().split() except ValueError: host = line.strip() password = None if len(host.split(':')) == 1: host = host + ":22" env.hosts.append(host) if password is not None: env.passwords[host] = password.strip() env.hosts = list(set(env.hosts)) # Remove duplicates def add_host(): """ Add a new host to the running hosts. The user can decide whether to add the host also to the external hosts.txt file. """ name = raw_input("Username: ") host = raw_input("Host: ") port = input("Port: ") new_host = name + "@" + host + ":" + str(port) selected_hosts.append(new_host) password = None if confirm("Authenticate using a password? "): password = getpass.getpass("Password: ").strip() env.passwords[new_host] = password # Append the new host to the hosts file if confirm("Add the new host to the hosts file? "): if password is not None: line = new_host + " " + password + "\n" else: line = new_host + "\n" with open(file_hosts, 'a') as f: f.write(line) def print_hosts(): """ Print selected hosts. If hosts haven't been hand-selected yet, all hosts are selected. """ hosts = map(lambda x: [x, env.passwords.get(x, None)], selected_hosts) print(fab_col.green(tabulate(hosts, ["Host", "Password"]))) def check_hosts(): """ Check if hosts are active or not and print the result. """ global running_hosts running_hosts = dict() for host in selected_hosts: print(fab_col.magenta("\nPing host %d of %d" % (selected_hosts.index(host) + 1, len(selected_hosts)))) response = os.system("ping -c 1 " + host.split("@")[1].split(":")[0]) if response == 0: running_hosts[host] = True else: running_hosts[host] = False # Convert running_hosts in order to print it as table mylist = map(lambda index: [index[0], str(index[1])], running_hosts.items()) print(fab_col.green(tabulate(mylist, ["Host", "Running"]))) def select_running_hosts(): """ Select all active hosts. """ global selected_hosts with hide('stdout'): check_hosts() host_up = filter(lambda x: running_hosts.get(x, False), running_hosts.keys()) selected_hosts = host_up def choose_hosts(): """ Select the hosts to be used. """ global selected_hosts mylist = map(lambda (num, h): [num, h], enumerate(env.hosts)) print(fab_col.blue("Select Hosts (space-separated):")) print(fab_col.blue(tabulate(mylist, ["Number", "Host"]))) choices = raw_input("> ").split() # Avoid letters in string index choices = filter(lambda x: x.isdigit(), choices) # Convert to int list choices = map(int, choices) # Avoid IndexError choices = filter(lambda x: x < len(env.hosts), choices) # Remove duplicates choices = list(set(choices)) # If no hosts are selected, keep the current hosts if len(choices) == 0: return # Get only selected hosts selected_hosts = map(lambda i: env.hosts[i], choices) def run_locally(cmd=None): """ Execute a command locally. """ if cmd is None: cmd = raw_input("Insert command: ") with settings(warn_only=True): local(cmd) # This function cannot have the parallel decorator since # a sudo command must receive the user password def open_sh(): """ Open a shell on a host. """ mylist = map(lambda (num, h): [num, h], enumerate(selected_hosts)) print(fab_col.blue(tabulate(mylist, ["Number", "Host"]))) try: n = input("Open shell in host number: ") h = selected_hosts[n] execute(open_shell, host=h) except (NameError, IndexError): print(fab_col.red("Error: invalid host selection.")) print(fab_col.red("Shell not opened."))
[ 11748, 28686, 198, 6738, 9664, 13, 15042, 1330, 17365, 11, 1057, 11, 21061, 11, 12260, 11, 1957, 11, 6460, 11, 3467, 198, 220, 220, 220, 7808, 11, 1280, 62, 29149, 11, 10730, 11, 11389, 11, 1234, 198, 6738, 9664, 13, 12501, 273, 202...
2.442574
2,020
objects = {}
[ 628, 198, 48205, 796, 23884, 628, 628, 198 ]
2.5
8
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json from google.appengine.ext import ndb from google.protobuf import json_format from google.protobuf import struct_pb2 from protorpc import messages from components import utils from proto import common_pb2 import bbutil import config import logging import model # Names of well-known parameters. BUILDER_PARAMETER = 'builder_name' PROPERTIES_PARAMETER = 'properties' def format_luci_bucket(bucket_id): """Returns V1 luci bucket name, e.g. "luci.chromium.try".""" return 'luci.%s.%s' % config.parse_bucket_id(bucket_id) def parse_luci_bucket(bucket): """Converts V1 LUCI bucket to a bucket ID string. Returns '' if bucket is not a LUCI bucket. """ parts = bucket.split('.', 2) if len(parts) == 3 and parts[0] == 'luci': return config.format_bucket_id(parts[1], parts[2]) return '' CANARY_PREFERENCE_TO_TRINARY = { CanaryPreference.AUTO: common_pb2.UNSET, CanaryPreference.PROD: common_pb2.NO, CanaryPreference.CANARY: common_pb2.YES, } TRINARY_TO_CANARY_PREFERENCE = { v: k for k, v in CANARY_PREFERENCE_TO_TRINARY.iteritems() } # List of deprecated properties that are converted from float to int for # backward compatibility. # TODO(crbug.com/877161): remove this list. INTEGER_PROPERTIES = [ 'buildnumber', 'issue', 'patchset', 'patch_issue', 'patch_set', ] def get_build_url(build): """Returns view URL of the build.""" if build.url: return build.url settings = config.get_settings_async().get_result() return 'https://%s/b/%d' % (settings.swarming.milo_hostname, build.proto.id) def properties_to_json(properties): """Converts properties to JSON. properties should be struct_pb2.Struct, but for convenience in tests a dict is also accepted. CAUTION: in general converts all numbers to floats, because JSON format does not distinguish floats and ints. For backward compatibility, temporarily (crbug.com/877161) renders widely used, deprecated properties as integers, see INTEGER_PROPERTIES. """ return json.dumps(_properties_to_dict(properties), sort_keys=True) def _properties_to_dict(properties): """Implements properties_to_json.""" assert isinstance(properties, (dict, struct_pb2.Struct)), properties if isinstance(properties, dict): # pragma: no branch properties = bbutil.dict_to_struct(properties) # Note: this dict does not necessarily equal the original one. # In particular, an int may turn into a float. as_dict = json_format.MessageToDict(properties) for p in INTEGER_PROPERTIES: if isinstance(as_dict.get(p), float): as_dict[p] = int(as_dict[p]) return as_dict def build_to_message(build_bundle, include_lease_key=False): """Converts a model.BuildBundle to BuildMessage.""" build = build_bundle.build assert build assert build.key assert build.key.id() bp = build.proto infra = build_bundle.infra.parse() sw = infra.swarming logdog = infra.logdog recipe = infra.recipe result_details = (build.result_details or {}).copy() result_details['properties'] = {} if build_bundle.output_properties: # pragma: no branch result_details['properties'] = _properties_to_dict( build_bundle.output_properties.parse() ) if bp.summary_markdown: result_details['ui'] = {'info': bp.summary_markdown} parameters = (build.parameters or {}).copy() parameters[BUILDER_PARAMETER] = bp.builder.builder parameters[PROPERTIES_PARAMETER] = _properties_to_dict( infra.buildbucket.requested_properties ) recipe_name = recipe.name if build_bundle.input_properties: # pragma: no cover input_props = build_bundle.input_properties.parse() if 'recipe' in input_props.fields: recipe_name = input_props['recipe'] if bp.status != common_pb2.SUCCESS and bp.summary_markdown: result_details['error'] = { 'message': bp.summary_markdown, } if sw.bot_dimensions: by_key = {} for d in sw.bot_dimensions: by_key.setdefault(d.key, []).append(d.value) result_details.setdefault('swarming', {})['bot_dimensions'] = by_key tags = set(build.tags) if build.is_luci: tags.add('swarming_hostname:%s' % sw.hostname) tags.add('swarming_task_id:%s' % sw.task_id) # Milo uses swarming tags. tags.add('swarming_tag:recipe_name:%s' % recipe_name) tags.add( 'swarming_tag:recipe_package:%s' % (bp.exe.cipd_package or recipe.cipd_package) ) tags.add( 'swarming_tag:log_location:logdog://%s/%s/%s/+/annotations' % (logdog.hostname, logdog.project, logdog.prefix) ) tags.add('swarming_tag:luci_project:%s' % bp.builder.project) # Try to find OS for d in sw.bot_dimensions: if d.key == 'os': tags.add('swarming_tag:os:%s' % d.value) break msg = BuildMessage( id=build.key.id(), project=bp.builder.project, bucket=legacy_bucket_name(build.bucket_id, build.is_luci), tags=sorted(tags), parameters_json=json.dumps(parameters, sort_keys=True), status=build.status_legacy, result=build.result, result_details_json=json.dumps(result_details, sort_keys=True), cancelation_reason=build.cancelation_reason, failure_reason=build.failure_reason, lease_key=build.lease_key if include_lease_key else None, url=get_build_url(build), created_ts=proto_to_timestamp(bp.create_time), started_ts=proto_to_timestamp(bp.start_time), updated_ts=proto_to_timestamp(bp.update_time), completed_ts=proto_to_timestamp(bp.end_time), created_by=build.created_by.to_bytes() if build.created_by else None, status_changed_ts=utils.datetime_to_timestamp(build.status_changed_time), utcnow_ts=utils.datetime_to_timestamp(utils.utcnow()), retry_of=build.retry_of, canary_preference=( # This is not accurate, but it does not matter at this point. # This is deprecated. CanaryPreference.CANARY if build.canary else CanaryPreference.PROD ), canary=build.canary, experimental=build.experimental, service_account=sw.task_service_account, # when changing this function, make sure build_to_dict would still work ) if build.lease_expiration_date is not None: msg.lease_expiration_ts = utils.datetime_to_timestamp( build.lease_expiration_date ) return msg def build_to_dict(build_bundle, include_lease_key=False): """Converts a build to an externally consumable dict. This function returns a dict that a BuildMessage would be encoded to. """ # Implementing this function in a generic way (message_to_dict) requires # knowledge of many protorpc and endpoints implementation details. # Not worth it. msg = build_to_message(build_bundle, include_lease_key=include_lease_key) # Special cases result = { 'tags': msg.tags, # a list } for f in msg.all_fields(): v = msg.get_assigned_value(f.name) if f.name in result or v is None: # None is the default. It is omitted by Cloud Endpoints. continue if isinstance(v, messages.Enum): v = str(v) else: assert isinstance(v, (basestring, int, long, bool)), v if (isinstance(f, messages.IntegerField) and f.variant == messages.Variant.INT64): v = str(v) result[f.name] = v return result
[ 2, 15069, 2177, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 11748...
2.637834
2,844
""" This package implements random variables. Random variables are the primary in- and outputs of probabilistic numerical methods. A generic signature of such methods looks like this: .. highlight:: python .. code-block:: python randvar_out, info = probnum_method(problem, randvar_in, **kwargs) """ from ._dirac import Dirac from ._normal import Normal from ._random_variable import ( ContinuousRandomVariable, DiscreteRandomVariable, RandomVariable, ) from ._scipy_stats import ( WrappedSciPyContinuousRandomVariable, WrappedSciPyDiscreteRandomVariable, WrappedSciPyRandomVariable, ) from ._utils import asrandvar # Public classes and functions. Order is reflected in documentation. __all__ = [ "asrandvar", "RandomVariable", "DiscreteRandomVariable", "ContinuousRandomVariable", "Dirac", "Normal", "WrappedSciPyRandomVariable", "WrappedSciPyDiscreteRandomVariable", "WrappedSciPyContinuousRandomVariable", ] # Set correct module paths. Corrects links and module paths in documentation. RandomVariable.__module__ = "probnum.random_variables" DiscreteRandomVariable.__module__ = "probnum.random_variables" ContinuousRandomVariable.__module__ = "probnum.random_variables" WrappedSciPyRandomVariable.__module__ = "probnum.random_variables" WrappedSciPyDiscreteRandomVariable.__module__ = "probnum.random_variables" WrappedSciPyContinuousRandomVariable.__module__ = "probnum.random_variables" Dirac.__module__ = "probnum.random_variables" Normal.__module__ = "probnum.random_variables" asrandvar.__module__ = "probnum.random_variables"
[ 37811, 198, 1212, 5301, 23986, 4738, 9633, 13, 14534, 9633, 389, 262, 4165, 287, 12, 290, 198, 22915, 82, 286, 1861, 14991, 2569, 29052, 5050, 13, 317, 14276, 9877, 286, 884, 5050, 3073, 198, 2339, 428, 25, 198, 198, 492, 7238, 3712, ...
3.136719
512
from app import App import requests import json import polling2 from behave import step from openshift import Openshift from util import substitute_scenario_id from string import Template
[ 6738, 598, 1330, 2034, 198, 11748, 7007, 198, 11748, 33918, 198, 11748, 13985, 17, 198, 6738, 17438, 1330, 2239, 198, 6738, 9808, 29323, 1330, 8670, 641, 29323, 198, 6738, 7736, 1330, 15373, 62, 1416, 39055, 62, 312, 198, 6738, 4731, 13...
4.081633
49
import json import logging from math import sqrt, floor, ceil, log10 from copy import deepcopy logger = logging.getLogger(__name__)
[ 11748, 33918, 198, 11748, 18931, 198, 6738, 10688, 1330, 19862, 17034, 11, 4314, 11, 2906, 346, 11, 2604, 940, 198, 6738, 4866, 1330, 2769, 30073, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628 ]
3.325
40
from rest_framework.throttling import SimpleRateThrottle
[ 6738, 1334, 62, 30604, 13, 26110, 926, 1359, 1330, 17427, 32184, 817, 305, 23296, 628 ]
3.866667
15
# encoding: utf-8 from test.vim_test_case import VimTestCase as _VimTest from test.constant import * from test.util import running_on_windows # Tests for Bug #691575
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 6738, 1332, 13, 31124, 62, 9288, 62, 7442, 1330, 36645, 14402, 20448, 355, 4808, 53, 320, 14402, 198, 6738, 1332, 13, 9979, 415, 1330, 1635, 198, 6738, 1332, 13, 22602, 1330, 2491, 62, 261, 62, ...
2.716049
81
from scipy.optimize import minimize
[ 6738, 629, 541, 88, 13, 40085, 1096, 1330, 17775, 628 ]
3.7
10
# This code is licensed under the MIT License (see LICENSE file for details) import threading import time from ..util import smart_serial from ..util import property_device from ..util import state_stack from ..config import scope_configuration from . import iotool LAMP_DAC_COMMANDS = { 'uv': _make_dac_bytes(0x18, 0), 'blue': _make_dac_bytes(0x1A, 0), 'cyan': _make_dac_bytes(0x18, 1), 'teal': _make_dac_bytes(0x1A, 1), 'green_yellow': _make_dac_bytes(0x18, 2), 'red': _make_dac_bytes(0x18, 3) } LAMP_SPECS = { 'uv': (396, 16), 'blue': (434, 22), 'cyan': (481, 22), 'teal': (508, 29), 'green_yellow': (545, 70), 'red': (633, 19) } LAMP_NAMES = set(LAMP_DAC_COMMANDS.keys())
[ 2, 770, 2438, 318, 11971, 739, 262, 17168, 13789, 357, 3826, 38559, 24290, 2393, 329, 3307, 8, 198, 198, 11748, 4704, 278, 198, 11748, 640, 198, 198, 6738, 11485, 22602, 1330, 4451, 62, 46911, 198, 6738, 11485, 22602, 1330, 3119, 62, ...
2.25
324
"""Performance testing utility.""" from ._format_perf_counter import format_perf_counter from ._multi_case_timer import MultiCaseTimer from ._util import plot_run, to_dataframe from ._wrappers import run_multivariate_test __all__ = [ "MultiCaseTimer", "run_multivariate_test", "format_perf_counter", "plot_run", "to_dataframe", ]
[ 37811, 32273, 4856, 10361, 526, 15931, 198, 198, 6738, 47540, 18982, 62, 525, 69, 62, 24588, 1330, 5794, 62, 525, 69, 62, 24588, 198, 6738, 47540, 41684, 62, 7442, 62, 45016, 1330, 15237, 20448, 48801, 198, 6738, 47540, 22602, 1330, 711...
2.885246
122
import numpy as np import torch from sklearn.metrics import roc_auc_score from sklearn.metrics import average_precision_score def get_roc_score(edges_pos, edges_neg, embeddings, adj_sparse): "from https://github.com/tkipf/gae" score_matrix = np.dot(embeddings, embeddings.T) # Store positive edge predictions, actual values preds_pos = [] pos = [] for edge in edges_pos: preds_pos.append(sigmoid(score_matrix[edge[0], edge[1]])) # predicted score pos.append(adj_sparse[edge[0], edge[1]]) # actual value (1 for positive) # Store negative edge predictions, actual values preds_neg = [] neg = [] for edge in edges_neg: preds_neg.append(sigmoid(score_matrix[edge[0], edge[1]])) # predicted score neg.append(adj_sparse[edge[0], edge[1]]) # actual value (0 for negative) # Calculate scores preds_all = np.hstack([preds_pos, preds_neg]) labels_all = np.hstack([np.ones(len(preds_pos)), np.zeros(len(preds_neg))]) #print(preds_all, labels_all ) roc_score = roc_auc_score(labels_all, preds_all) ap_score = average_precision_score(labels_all, preds_all) return roc_score, ap_score
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 686, 66, 62, 14272, 62, 26675, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 2811, 62, 3866, 16005, 62, 26675, 628, 198, 198, 4299, 651, ...
2.362573
513
import email import logging import re from imapclient import IMAPClient
[ 11748, 3053, 198, 11748, 18931, 198, 11748, 302, 198, 198, 6738, 545, 499, 16366, 1330, 8959, 2969, 11792, 628 ]
3.894737
19
VERSION = '2.11.2'
[ 43717, 796, 705, 17, 13, 1157, 13, 17, 6, 198 ]
1.9
10
import logging import os import pandas as pd from .example_filetype_format import FileTypeFormat from . import process_functions logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 11748, 28686, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 764, 20688, 62, 7753, 4906, 62, 18982, 1330, 9220, 6030, 26227, 198, 6738, 764, 1330, 1429, 62, 12543, 2733, 198, 198, 6404, 1362, 796, 18931, ...
3.333333
51
import sys from . import app sys.path.append(str(app.config['LIB_PATH'])) from musicautobot.music_transformer import * from musicautobot.config import * from flask import Response, send_from_directory, send_file, request, jsonify from .save import to_s3 import torch import traceback torch.set_num_threads(4) data = load_data(app.config['DATA_PATH'], app.config['DATA_SAVE_NAME'], num_workers=1) learn = music_model_learner(data, pretrained_path=app.config['MUSIC_MODEL_PATH']) if torch.cuda.is_available(): learn.model.cuda() # learn.to_fp16(loss_scale=512) # fp16 not supported for cpu - https://github.com/pytorch/pytorch/issues/17699 # @app.route('/midi/song/<path:sid>') # def get_song_midi(sid): # return send_from_directory(file_path/data_dir, htlist[sid]['midi'], mimetype='audio/midi')
[ 11748, 25064, 198, 6738, 764, 1330, 598, 198, 17597, 13, 6978, 13, 33295, 7, 2536, 7, 1324, 13, 11250, 17816, 40347, 62, 34219, 20520, 4008, 198, 198, 6738, 2647, 2306, 672, 313, 13, 28965, 62, 7645, 16354, 1330, 1635, 198, 6738, 2647...
2.677741
301
from __future__ import absolute_import, division, print_function from tests.core import mock from trakt import Trakt from httmock import HTTMock import pytest
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 6738, 5254, 13, 7295, 1330, 15290, 198, 6738, 1291, 21841, 1330, 4759, 21841, 198, 198, 6738, 1841, 76, 735, 1330, 7154, 15972, 735, 198, 11748, 1...
3.644444
45
import sys import PyQt5.QtWidgets as qtw import PyQt5.QtCore as qtc from Image import Image from main_layout import Ui_MainWindow import logging import os logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) formatter = logging.Formatter('%(levelname)s:%(name)s:%(asctime)s - %(message)s') file_handler = logging.FileHandler('log') file_handler.setLevel(logging.INFO) file_handler.setFormatter(formatter) logger.addHandler(file_handler) if __name__ == '__main__': main_window()
[ 11748, 25064, 198, 11748, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 355, 10662, 4246, 198, 11748, 9485, 48, 83, 20, 13, 48, 83, 14055, 355, 10662, 23047, 198, 6738, 7412, 1330, 7412, 198, 6738, 1388, 62, 39786, 1330, 471, 72, ...
2.693548
186
from django import forms # Form for create sales
[ 6738, 42625, 14208, 1330, 5107, 198, 198, 2, 5178, 329, 2251, 4200 ]
4.083333
12
# -*- coding: utf-8 -*- """Pipeline for VarGenPath""" from typing import Optional from .constants import LINKSET_PATH, FILE_TYPES from .utils import ( get_cytoscape_connection, get_associated_genes, var_genes_network, extend_vargen_network, save_session, save_image, save_network ) def get_vargenpath_network( *, variant_list: list, network_name: Optional[str] = 'VarGenPath network', linkset_path: Optional[str] = LINKSET_PATH, session_path: Optional[str] = None, image_path: Optional[str] = None, extend_network: bool = True, image_type: Optional[str] = 'svg', network_path: Optional[str] = None, network_file_path: Optional[str] = 'cyjs', ) -> dict: """ Pipeline for creating vargenpath network. :param network_file_path: the type of network file to be saved. :param network_path: if input path, the cytoscape network will be saved to this path. :param variant_list: list of variants. :param network_name: the name of the network. :param linkset_path: the path to the linkset to extend network. :param session_path: if input path, the cytoscape session will be saved to this path. :param image_path: if input path, the image of the network will be saved to this path. :param extend_network: if true, the network will be extended. :param image_type: the type of the image to be saved. :return: cytoscape network """ try: cy = get_cytoscape_connection() except Exception: raise Exception('Uh-oh! Make sure that cytoscape is open then try again.') vargen_df = get_associated_genes(variant_list) network = var_genes_network(variants_genes_df=vargen_df, client=cy, network_name=network_name) if extend_network: network = extend_vargen_network(linkset_path, client=cy) if session_path is not None: save_session(session_file=session_path, client=cy) if image_path is not None: save_image(network_image=image_path, image_type=FILE_TYPES[image_type]) if network_path is not None: save_network(network_path=network_path, file_type=FILE_TYPES[network_file_path]) return network
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 47, 541, 4470, 329, 12372, 13746, 15235, 37811, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 764, 9979, 1187, 1330, 34426, 28480, 62, 34219, 11, 45811, 62, ...
2.753827
784
# coding=utf-8 # Copyright 2021 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """A model for to embed structured features.""" from typing import Any, Tuple import flax.linen as nn import jax.numpy as jnp
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33448, 3012, 11419, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351,...
3.623116
199
from models import shoe_box # run if __name__ == "__main__": # create models createHBjsons()
[ 6738, 4981, 1330, 17292, 62, 3524, 198, 198, 2, 1057, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 220, 220, 1303, 2251, 4981, 198, 220, 220, 220, 2251, 32886, 8457, 684, 3419, 198 ]
2.710526
38
from reikna.core.signature import Type, Annotation, Parameter, Signature from reikna.core.computation import Computation from reikna.core.transformation import Transformation, Indices
[ 6738, 302, 1134, 2616, 13, 7295, 13, 12683, 1300, 1330, 5994, 11, 1052, 38983, 11, 25139, 2357, 11, 34894, 198, 6738, 302, 1134, 2616, 13, 7295, 13, 785, 1996, 341, 1330, 22476, 341, 198, 6738, 302, 1134, 2616, 13, 7295, 13, 7645, 1...
3.755102
49
from sqlalchemy import engine_from_config from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from sqlalchemy.schema import MetaData import zope.sqlalchemy from .node import Node NAMING_CONVENTION = { "ix": 'ix_%(column_0_label)s', "uq": "uq_%(table_name)s_%(column_0_name)s", "ck": "ck_%(table_name)s_%(constraint_name)s", "fk": "fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s", "pk": "pk_%(table_name)s" } metadata = MetaData(naming_convention=NAMING_CONVENTION) Base = declarative_base(metadata=metadata)
[ 6738, 44161, 282, 26599, 1330, 3113, 62, 6738, 62, 11250, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 6738, 44161, 282, 26...
2.354582
251
from __future__ import absolute_import from __future__ import print_function from __future__ import division
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 628 ]
4.4
25
import typing from typing import ( Any, Callable, Dict, Iterable, List, Literal, Optional, Set, Tuple, Union, ) from ncadquery import Workplane from OCP.Quantity import Quantity_NameOfColor from OCP.TCollection import TCollection_ExtendedString from OCP.TDataStd import TDataStd_Name from OCP.TDF import TDF_Label, TDF_TagSource from OCP.TNaming import TNaming_Builder, TNaming_NamedShape from OCP.TopoDS import TopoDS_Shape from OCP.TPrsStd import TPrsStd_AISPresentation from PyQt5.QtCore import QPersistentModelIndex, Qt from nales.nales_cq_impl import NALES_TYPES, CQMethodCall, Part from nales.utils import TypeChecker from nales.widgets.msg_boxs import StdErrorMsgBox
[ 11748, 19720, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 4377, 11, 198, 220, 220, 220, 4889, 540, 11, 198, 220, 220, 220, 360, 713, 11, 198, 220, 220, 220, 40806, 540, 11, 198, 220, 220, 220, 7343, 11, 198, 220, 220, 220, ...
2.629091
275
from flyingObject import FlyingObject from bullet import Bullet import random
[ 6738, 7348, 10267, 1330, 19903, 10267, 198, 6738, 10492, 1330, 18003, 198, 11748, 4738, 628 ]
5.266667
15
import sys import pygame as pg import numpy as np import random import time pic = np.zeros(shape=(128,64)) width = 128 height = 64 refresh_rate = 60 interval = 1 / refresh_rate bootrom_file = "bootrom0" rom_file = "rom" # rom_file = "hello_world" debug = False pg.display.init() display = pg.display.set_mode((width*4, height*4), flags=0, depth=8) screen = pg.Surface((width, height), flags=0, depth=8) pg.transform.scale(screen, (width*4, height*4), display) screen_clear() # screen_draw_line(0,0,0b10101011) # input() ONE_REG = reg() ONE_REG.value = 1 FL = Flags() halt = False A = reg() B = reg() C = reg() D = reg() E = reg() H = reg() L = reg() BC = Dreg(B, C) DE = Dreg(D, E) HL = Dreg(H, L) #E.value = 0x1 # Randomness loop PC = regPC() SP = regSP() memory = [] jumped = False print("RESERVING MEMORY...") for i in range(0x10000): memory.append(memByte()) print("MEMORY RESERVED.") print("LOADING MEMORY...") f = open(bootrom_file, "rb") rom_data = f.read() f.close() for i in range(len(rom_data)): memory[i+0x0].value = rom_data[i] f = open(rom_file, "rb") rom_data = f.read() f.close() for i in range(len(rom_data)): memory[i+0x597].value = rom_data[i] print("MEMORY LOADED.") MOV_REGISTERS = [B, C, D, E, H, L, HL, A] MOVB_OPCODES = [0x09, 0x19, 0x29, 0x39, 0x49, 0x59, 0x69, 0x79] MOVC_OPCODES = [0x99, 0x99, 0xA9, 0xB9, 0xC9, 0xD9, 0xE9, 0xF9] MOVD_OPCODES = [0x0A, 0x1A, 0x2A, 0x3A, 0x4A, 0x5A, 0x6A, 0x7A] MOVE_OPCODES = [0x8A, 0x9A, 0xAA, 0xBA, 0xCA, 0xDA, 0xEA, 0xFA] MOVH_OPCODES = [0x0B, 0x1B, 0x2B, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B] MOVL_OPCODES = [0x8B, 0x9B, 0xAB, 0xBB, 0xCB, 0xDB, 0xEB, 0xFB] MOVMHL_OPCODES = [0x0C, 0x1C, 0x2C, 0x3C, 0x4C, 0x5C, 0x6C, 0x7C] MOVA_OPCODES = [0x8C, 0x9C, 0xAC, 0xBC, 0xCC, 0xDC, 0xEC, 0xFC] screen_update() last_update = time.time() while not halt: b_up = memory[PC.value].readUpper() b_down = memory[PC.value].readLower() b_val = memory[PC.value].value jumped = False if time.time() > last_update + interval: screen_update() last_update = time.time() # Handle pygame events for event in pg.event.get(): # print("EVENT:",event.type) # input() pass if debug: pass#input() if debug or False: print(hex(PC.value), hex(b_val)) # if b_val in [0x86, 0x96, 0xA6, 0xB6, 0xC6, 0xD6, 0xE6, 0xF6]: # print("CMP R") # input() # if b_val == 0xF7: # print("CMPI") # input() # HCF (HALT) if b_val == 0x6C: halt = True # LDI R, xx if b_val == 0x20: LDI(B) elif b_val == 0x30: LDI(C) elif b_val == 0x40: LDI(D) elif b_val == 0x50: LDI(E) elif b_val == 0x60: LDI(H) elif b_val == 0x70: LDI(L) elif b_val == 0x80: LDI(HL, mem=True) elif b_val == 0x90: LDI(A) # LDX RR, xxyy elif b_val == 0x21: LDX(BC) elif b_val == 0x31: LDX(DE) elif b_val == 0x41: LDX(HL) elif b_val == 0x22: LDX(SP) # PUSH R elif b_val == 0x81: PUSH_R(B) elif b_val == 0x91: PUSH_R(C) elif b_val == 0xA1: PUSH_R(D) elif b_val == 0xB1: PUSH_R(E) elif b_val == 0xC1: PUSH_R(H) elif b_val == 0xD1: PUSH_R(L) elif b_val == 0xC0: PUSH_R(HL, mem=True) elif b_val == 0xD0: PUSH_R(A) # PUSH RR elif b_val == 0x51: PUSH_RR(BC) elif b_val == 0x61: PUSH_RR(DE) elif b_val == 0x71: PUSH_RR(HL) # POP R elif b_val == 0x82: POP_R(B) elif b_val == 0x92: POP_R(C) elif b_val == 0xA2: POP_R(D) elif b_val == 0xB2: POP_R(E) elif b_val == 0xC2: POP_R(H) elif b_val == 0xD2: POP_R(L) elif b_val == 0xC3: POP_R(HL, mem=True) elif b_val == 0xD3: POP_R(A) # POP RR elif b_val == 0x52: POP_RR(BC) elif b_val == 0x62: POP_RR(DE) elif b_val == 0x72: POP_RR(HL) # MOV R1, R2 elif b_val in MOVB_OPCODES: MOV(B, MOVB_OPCODES.index(b_val)) elif b_val in MOVC_OPCODES: MOV(C, MOVC_OPCODES.index(b_val)) elif b_val in MOVD_OPCODES: MOV(D, MOVD_OPCODES.index(b_val)) elif b_val in MOVE_OPCODES: MOV(E, MOVE_OPCODES.index(b_val)) elif b_val in MOVH_OPCODES: MOV(H, MOVH_OPCODES.index(b_val)) elif b_val in MOVL_OPCODES: MOV(L, MOVL_OPCODES.index(b_val)) elif b_val in MOVMHL_OPCODES: MOV(HL, MOVMHL_OPCODES.index(b_val), mem=True) elif b_val in MOVA_OPCODES: MOV(A, MOVA_OPCODES.index(b_val)) # MOV RR1, RR2 elif b_val == 0xED: MOV_RR(HL, BC) elif b_val == 0xFD: MOV_RR(HL, DE) # CLRFLAG elif b_val == 0x08: FL.clearFlags() # SETFLAG f, x elif b_val == 0x18: FL.setZero() elif b_val == 0x28: FL.clearZero() elif b_val == 0x38: FL.setNeg() elif b_val == 0x48: FL.clearNeg() elif b_val == 0x58: FL.setHalf() elif b_val == 0x68: FL.clearHalf() elif b_val == 0x78: FL.setCarry() elif b_val == 0x88: FL.clearCarry() # ADD R elif b_val == 0x04: ADD_R(B) elif b_val == 0x14: ADD_R(C) elif b_val == 0x24: ADD_R(D) elif b_val == 0x34: ADD_R(E) elif b_val == 0x44: ADD_R(H) elif b_val == 0x54: ADD_R(L) elif b_val == 0x64: ADD_R(HL, mem=True) elif b_val == 0x74: ADD_R(A) # ADDI xx elif b_val == 0xA7: PC.inc() value = ADD_8(A.value, memory[PC.value].value) A.value = value # ADDX RR elif b_val == 0x83: ADDX_RR(BC) elif b_val == 0x93: ADDX_RR(DE) elif b_val == 0xA3: ADDX_RR(HL) # SUB R | CMP R elif b_val == 0x84 or b_val == 0x86: SUB_R(B, b_val == 0x86) elif b_val == 0x94 or b_val == 0x96: SUB_R(C, b_val == 0x96) elif b_val == 0xA4 or b_val == 0xA6: SUB_R(D, b_val == 0xA6) elif b_val == 0xB4 or b_val == 0xB6: SUB_R(E, b_val == 0xB6) elif b_val == 0xC4 or b_val == 0xC6: SUB_R(H, b_val == 0xC6) elif b_val == 0xD4 or b_val == 0xD6: SUB_R(L, b_val == 0xD6) elif b_val == 0xE4 or b_val == 0xE6: SUB_R(HL, b_val == 0xE6, mem=True) elif b_val == 0xF4 or b_val == 0xF6: SUB_R(A, b_val == 0xF6) # SUBI xx | CMPI xx elif b_val == 0xB7 or b_val == 0xF7: PC.inc() value = SUB_8(A.value, memory[PC.value].value) if b_val == 0xB7: # SUBI xx A.value = value # INC R elif b_val == 0x03: INC(B) elif b_val == 0x13: INC(C) elif b_val == 0x23: INC(D) elif b_val == 0x33: INC(E) elif b_val == 0x43: INC(H) elif b_val == 0x53: INC(L) elif b_val == 0x63: INC(HL, mem=True) elif b_val == 0x73: INC(A) # INX RR elif b_val == 0xA8: BC.getvalue() BC.value += 1 BC.value & 0xffff BC.setvalue() elif b_val == 0xB8: DE.getvalue() DE.value += 1 DE.value & 0xffff DE.setvalue() elif b_val == 0xC8: HL.getvalue() HL.value += 1 HL.value & 0xffff HL.setvalue() # DEC R elif b_val == 0x07: DEC(B) elif b_val == 0x17: DEC(C) elif b_val == 0x27: DEC(D) elif b_val == 0x37: DEC(E) elif b_val == 0x47: DEC(H) elif b_val == 0x57: DEC(L) elif b_val == 0x67: DEC(HL, mem=True) elif b_val == 0x77: DEC(A) # AND R elif b_val == 0x05: AND_R(B) elif b_val == 0x15: AND_R(C) elif b_val == 0x25: AND_R(D) elif b_val == 0x35: AND_R(E) elif b_val == 0x45: AND_R(H) elif b_val == 0x55: AND_R(L) elif b_val == 0x65: AND_R(HL, mem=True) elif b_val == 0x75: AND_R(A) # ANDI xx elif b_val == 0xC7: PC.inc() value = AND_8(memory[PC.value].value, A.value) A.value = value # OR R elif b_val == 0x85: OR_R(B) elif b_val == 0x95: OR_R(C) elif b_val == 0xA5: OR_R(D) elif b_val == 0xB5: OR_R(E) elif b_val == 0xC5: OR_R(H) elif b_val == 0xD5: OR_R(L) elif b_val == 0xE5: OR_R(HL, mem=True) elif b_val == 0xF5: OR_R(A) # ORI xx elif b_val == 0xD7: PC.inc() value = OR_8(memory[PC.value].value, A.value) A.value = value # XOR R elif b_val == 0x06: XOR_R(B) elif b_val == 0x16: XOR_R(C) elif b_val == 0x26: XOR_R(D) elif b_val == 0x36: XOR_R(E) elif b_val == 0x46: XOR_R(H) elif b_val == 0x56: XOR_R(L) elif b_val == 0x66: XOR_R(HL, mem=True) elif b_val == 0x76: XOR_R(A) # XORI xx elif b_val == 0xE7: PC.inc() value = XOR_8(memory[PC.value].value, A.value) A.value = value # CMPS R elif b_val == 0x0D: CMPS(B) elif b_val == 0x1D: CMPS(C) elif b_val == 0x2D: CMPS(D) elif b_val == 0x3D: CMPS(E) elif b_val == 0x4D: CMPS(H) elif b_val == 0x5D: CMPS(L) elif b_val == 0x6D: CMPS(HL, mem=True) elif b_val == 0x7D: CMPS(A) # SIN elif b_val == 0xE0: A.value = ord(sys.stdin.buffer.read(1)) & 0xff pass # SOUT elif b_val == 0xE1: print(chr(A.value),end="",flush=True) if A.value == 7: print("[BELL]") pass # CLRSCR elif b_val == 0xF0: screen_clear() # DRAW elif b_val == 0xF1: x = C.value if x & 0b10000000: x = - ((0x100 - x) & 0xff) y = B.value if y & 0b10000000: y = - ((0x100 - y) & 0xff) screen_draw_line(x, y, A.value & 0xff) # JMP xxyy elif b_val == 0x0F: JUMP() # JMPcc xxyy elif b_val == 0x1F: if FL.z: JUMP() else: PC.inc(2) elif b_val == 0x2F: if not FL.z: JUMP() else: PC.inc(2) elif b_val == 0x3F: if FL.n: JUMP() else: PC.inc(2) elif b_val == 0x4F: if not FL.n: JUMP() else: PC.inc(2) elif b_val == 0x5F: if FL.h: JUMP() elif b_val == 0x6F: if not FL.h: JUMP() else: PC.inc(2) elif b_val == 0x7F: if FL.c: JUMP() else: PC.inc(2) elif b_val == 0x8F: if not FL.c: JUMP() else: PC.inc(2) # JMP xx elif b_val == 0x9F: REL_JUMP() # JMPcc xx elif b_val == 0xAF: if FL.z: REL_JUMP() else: PC.inc() elif b_val == 0xBF: if not FL.z: REL_JUMP() else: PC.inc() elif b_val == 0xCF: if FL.n: REL_JUMP() else: PC.inc() elif b_val == 0xDF: if not FL.n: REL_JUMP() else: PC.inc() elif b_val == 0xEF: if FL.h: REL_JUMP() else: PC.inc() elif b_val == 0xFF: if not FL.h: REL_JUMP() else: PC.inc() elif b_val == 0xEE: if FL.c: REL_JUMP() else: PC.inc() elif b_val == 0xFE: if not FL.c: REL_JUMP() else: PC.inc() # CALL xxyy elif b_val == 0x1E: memory[SP.value].value = (PC.value+3) & 0xff memory[SP.value + 1].value = (PC.value+3) >> 8 SP.dec() JUMP() # RET elif b_val == 0x0E: SP.inc() PC.value = memory[SP.value].value + (memory[SP.value + 1].value << 8) jumped = True # NOP elif b_val == 0x00: pass else: pass print("UNKNOWN:",hex(b_val),"@",hex(PC.value)) if debug: BC.getvalue() DE.getvalue() HL.getvalue() print("A:",hex(A.value),"B:",hex(B.value),"C:",hex(C.value),"D:",hex(D.value),"E:",hex(E.value),"H:",hex(H.value), "L:",hex(L.value),"BC:",hex(BC.value),"DE:",hex(DE.value),"HL:",hex(HL.value),"PC:",hex(PC.value),"SP:",hex(SP.value)) if not jumped: PC.inc() else: pass #print("JUMPED")
[ 11748, 25064, 198, 11748, 12972, 6057, 355, 23241, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 11748, 640, 198, 198, 16564, 796, 45941, 13, 9107, 418, 7, 43358, 16193, 12762, 11, 2414, 4008, 198, 10394, 796, 13108, 198, 1...
1.624101
7,784
from __future__ import print_function import json import os
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 33918, 198, 11748, 28686, 628, 198 ]
3.875
16
# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTests.test_write -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Main program for the child process run by L{twisted.test.test_stdio.StandardInputOutputTests.test_write} to test that ITransport.write() works for process transports. """ __import__('_preamble') import sys from twisted.internet import stdio, protocol from twisted.python import reflect if __name__ == '__main__': reflect.namedAny(sys.argv[1]).install() from twisted.internet import reactor stdio.StandardIO(WriteChild()) reactor.run()
[ 2, 532, 9, 12, 1332, 12, 7442, 12, 3672, 25, 19074, 13, 9288, 13, 9288, 62, 19282, 952, 13, 23615, 20560, 26410, 51, 3558, 13, 9288, 62, 13564, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 40006, 24936, 46779, 13, 198, 2, 4091, 38559,...
3.169231
195
# calculate the load on each org import threading # cannot use from wpad_dispatch here, have to import whole module, # because of circular dependency import wpad_dispatch from wpad_utils import * from wlcg_wpad import getiporg orgcleanminutes = 5 orgcleantime = 0 # Minute records keep track of the number of requests in each minute orgdata = {} # lock for adding, deleting, and looking up an org orgdatalock = threading.Lock() # return triple of org name, minutes remaining in an overload, # and percent of limit in the last minutes being tracked
[ 2, 15284, 262, 3440, 319, 1123, 8745, 198, 198, 11748, 4704, 278, 198, 2, 2314, 779, 422, 266, 15636, 62, 6381, 17147, 994, 11, 423, 284, 1330, 2187, 8265, 11, 220, 198, 2, 220, 220, 780, 286, 18620, 20203, 198, 11748, 266, 15636, ...
3.56051
157
import requests from datetime import datetime import time headers = { 'Content-Type': 'application/json' } with open('test/logs.txt', 'r') as f: logs = f.read().split('\n') levels = ['INFO', 'WARN', 'DEBUG', 'ERROR', 'TRACE'] messages = [] for i in range(0, len(logs)): if i % 100 == 0: print('{} of {}'.format(i, len(logs))) data = { 'messages': messages } requests.post('http://localhost:9090/insert', json=data, headers=headers) messages = [] now = datetime.now() message = { 'year': now.year, 'month': now.month, 'day': now.day, 'hour': now.hour, 'minute': now.minute, 'second': now.second, 'service': 'foobar', 'message': logs[i], 'level': levels[i % 5] } time.sleep(0.001) messages.append(message)
[ 11748, 7007, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 640, 628, 198, 50145, 796, 1391, 198, 220, 220, 220, 705, 19746, 12, 6030, 10354, 705, 31438, 14, 17752, 6, 198, 92, 198, 198, 4480, 1280, 10786, 9288, 14, 6404, 82, ...
2.1625
400
import os import sys sys.path.append(os.path.abspath('')) # Raises linting error because not at top of file # Not sure how to resolve this with the pathing from src import uploadJson # noqa: E402 import src.config as config # noqa: E402 # Taking out of commission until new geojson format requested developed # def test_main(): # from src import main # import json # import geojson # #from src import main # main_dict = main.main(['county']) # for v in main_dict.values(): # v_str = json.dumps(v) # v_geojson = geojson.loads(v_str) # assert v_geojson.is_valid == True
[ 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 7061, 4008, 198, 2, 7567, 2696, 300, 600, 278, 4049, 780, 407, 379, 1353, 286, 2393, 198, 2, 1892, 1654, 703, 284, 10568, 4...
2.589958
239
#!/usr/bin/env python """ Code is personal property of the owner.Rights reserved by the user only. Codes on https://github.com/kt97679/tetris Attempt to spread the open source knowledge :) """ import sys import select import tty import termios import random import os import time import fcntl if (sys.hexversion >> 16) >= 0x202: FCNTL = fcntl else: import FCNTL import contextlib PLAYFIELD_W = 10 PLAYFIELD_H = 20 PLAYFIELD_X = 30 PLAYFIELD_Y = 1 BORDER_COLOR = 'yellow' HELP_X = 58 HELP_Y = 1 HELP_COLOR = 'cyan' SCORE_X = 1 SCORE_Y = 2 SCORE_COLOR = 'green' NEXT_X = 14 NEXT_Y = 11 GAMEOVER_X = 1 GAMEOVER_Y = PLAYFIELD_H + 3 INITIAL_MOVE_DOWN_DELAY = 1.0 DELAY_FACTOR = 0.8 LEVEL_UP = 20 NEXT_EMPTY_CELL = " " PLAYFIELD_EMPTY_CELL = " ." FILLED_CELL = "[]" class TetrisInputProcessor: delay = INITIAL_MOVE_DOWN_DELAY if __name__ == '__main__': run()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 10669, 318, 2614, 3119, 286, 262, 4870, 13, 49, 2337, 10395, 416, 262, 2836, 691, 13, 198, 34, 4147, 319, 3740, 1378, 12567, 13, 785, 14, 21841, 5607, 37601, 14, 83, 316,...
2.344828
377
import time import json def export_users(ucm_axl): """ retrieve users from ucm """ try: user_list = ucm_axl.get_users( tagfilter={ "userid": "", "firstName": "", "lastName": "", "directoryUri": "", "telephoneNumber": "", "enableCti": "", "mailid": "", "primaryExtension": {"pattern": "", "routePartitionName": ""}, "enableMobility": "", "homeCluster": "", "associatedPc": "", "enableEmcc": "", "imAndPresenceEnable": "", "serviceProfile": {"_value_1": ""}, "status": "", "userLocale": "", "title": "", "subscribeCallingSearchSpaceName": "", } ) all_users = [] for user in user_list: # print(user) user_details = {} user_details['userid'] = user.userid user_details['firstName'] = user.firstName user_details['lastName'] = user.lastName user_details['telephoneNumber'] = user.telephoneNumber user_details['primaryExtension'] = user.primaryExtension.pattern user_details['directoryUri'] = user.directoryUri user_details['mailid'] = user.mailid all_users.append(user_details) print( f"{user_details.get('userid')} -- {user_details.get('firstName')} {user_details.get('lastName')}: {user_details.get('primaryExtension')}" ) print("-" * 35) print(f"number of users: {len(all_users)}") # print(user_list) # print(json.dumps(all_users, indent=2)) return all_users except Exception as e: print(e) return [] def export_phones(ucm_axl): """ Export Phones """ try: phone_list = ucm_axl.get_phones( tagfilter={ "name": "", "description": "", "product": "", "model": "", "class": "", "protocol": "", "protocolSide": "", "callingSearchSpaceName": "", "devicePoolName": "", "commonDeviceConfigName": "", "commonPhoneConfigName": "", "networkLocation": "", "locationName": "", "mediaResourceListName": "", "networkHoldMohAudioSourceId": "", "userHoldMohAudioSourceId": "", "loadInformation": "", "securityProfileName": "", "sipProfileName": "", "cgpnTransformationCssName": "", "useDevicePoolCgpnTransformCss": "", "numberOfButtons": "", "phoneTemplateName": "", "primaryPhoneName": "", "loginUserId": "", "defaultProfileName": "", "enableExtensionMobility": "", "currentProfileName": "", "loginTime": "", "loginDuration": "", # "currentConfig": "", "ownerUserName": "", "subscribeCallingSearchSpaceName": "", "rerouteCallingSearchSpaceName": "", "allowCtiControlFlag": "", "alwaysUsePrimeLine": "", "alwaysUsePrimeLineForVoiceMessage": "", } ) all_phones = [] for phone in phone_list: # print(phone) phone_details = { "name": phone.name, "description": phone.description, "product": phone.product, "model": phone.model, "protocol": phone.protocol, "protocolSide": phone.protocolSide, "callingSearchSpaceName": phone.callingSearchSpaceName._value_1, "devicePoolName": phone.defaultProfileName._value_1, "commonDeviceConfigName": phone.commonDeviceConfigName._value_1, "commonPhoneConfigName": phone.commonPhoneConfigName._value_1, "networkLocation": phone.networkLocation, "locationName": phone.locationName._value_1, "mediaResourceListName": phone.mediaResourceListName._value_1, "networkHoldMohAudioSourceId": phone.networkHoldMohAudioSourceId, "userHoldMohAudioSourceId": phone.userHoldMohAudioSourceId, "loadInformation": phone.loadInformation, "securityProfileName": phone.securityProfileName._value_1, "sipProfileName": phone.sipProfileName._value_1, "cgpnTransformationCssName": phone.cgpnTransformationCssName._value_1, "useDevicePoolCgpnTransformCss": phone.useDevicePoolCgpnTransformCss, "numberOfButtons": phone.numberOfButtons, "phoneTemplateName": phone.phoneTemplateName._value_1, "primaryPhoneName": phone.primaryPhoneName._value_1, "loginUserId": phone.loginUserId, "defaultProfileName": phone.defaultProfileName._value_1, "enableExtensionMobility": phone.enableExtensionMobility, "currentProfileName": phone.currentProfileName._value_1, "loginTime": phone.loginTime, "loginDuration": phone.loginDuration, # "currentConfig": phone.currentConfig, "ownerUserName": phone.ownerUserName._value_1, "subscribeCallingSearchSpaceName": phone.subscribeCallingSearchSpaceName._value_1, "rerouteCallingSearchSpaceName": phone.rerouteCallingSearchSpaceName._value_1, "allowCtiControlFlag": phone.allowCtiControlFlag, "alwaysUsePrimeLine": phone.alwaysUsePrimeLine, "alwaysUsePrimeLineForVoiceMessage": phone.alwaysUsePrimeLineForVoiceMessage, } line_details = ucm_axl.get_phone(name=phone.name) # print(line_details.lines.line) try: for line in line_details.lines.line: # print(line) phone_details[f"line_{line.index}_dirn"] = line.dirn.pattern phone_details[f"line_{line.index}_routePartitionName"] = line.dirn.routePartitionName._value_1 phone_details[f"line_{line.index}_display"] = line.display phone_details[f"line_{line.index}_e164Mask"] = line.e164Mask except Exception as e: print(e) all_phones.append(phone_details) print( f"exporting: {phone.name}: {phone.model} - {phone.description}") print("-" * 35) print(f"number of phones: {len(all_phones)}") return all_phones except Exception as e: print(e) return [] def export_phone_registrations(ucm_axl, ucm_ris): """ Export Phone Registrations """ nodes = ucm_axl.list_process_nodes() del nodes[0] # remove EnterpriseWideData node subs = [] for node in nodes: subs.append(node.name) phones = ucm_axl.get_phones(tagfilter={"name": ""}) all_phones = [] phone_reg = [] reg = {} for phone in phones: all_phones.append(phone.name) groups = limit(all_phones) for group in groups: registered = ucm_ris.checkRegistration(group, subs) if registered["TotalDevicesFound"] < 1: print("no devices found!") else: reg["user"] = registered["LoginUserId"] reg["regtime"] = time.strftime( "%Y-%m-%d %H:%M:%S", time.localtime(registered["TimeStamp"])) for item in registered["IPAddress"]: reg["ip"] = item[1][0]["IP"] for item in registered["LinesStatus"]: reg["primeline"] = item[1][0]["DirectoryNumber"] reg["name"] = registered["Name"] print(f"exporting: {reg['name']}: {reg['ip']} - {reg['regtime']}") phone_reg.append(reg) print("-" * 35) print(f"number of registered phones: {len(phone_reg)}") return phone_reg
[ 11748, 640, 198, 11748, 33918, 628, 198, 4299, 10784, 62, 18417, 7, 1229, 76, 62, 897, 75, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 19818, 2985, 422, 334, 11215, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1949, 25, ...
1.979568
4,209
host = "localhost" port = 9999 dboptions = { "host": "194.67.198.163", "user": "postgres", "password": "werdwerd2012", "database": "zno_bot", 'migrate': True } API_PATH = '/api/' API_VERSION = 'v1' API_URL = API_PATH + API_VERSION
[ 4774, 796, 366, 36750, 1, 198, 634, 796, 860, 17032, 198, 198, 9945, 25811, 796, 1391, 198, 220, 220, 220, 366, 4774, 1298, 366, 22913, 13, 3134, 13, 22337, 13, 24136, 1600, 198, 220, 220, 220, 366, 7220, 1298, 366, 7353, 34239, 160...
2.226087
115
import pandas as pd import numpy as np from sklearn.datasets import load_iris from sklearn.naive_bayes import GaussianNB import pickle def train_iris_nb(): """Train a GaussianNB model on iris dataset.""" X, y_train = load_iris(return_X_y=True, as_frame=True) colnames = X.columns X_train = X.values model = GaussianNB() model.fit(X_train, y_train) return model def dump_model(model_path, model): """Save model as binary pickle file.""" with open(model_path, 'wb') as file: pickle.dump(model, file) def load_model(model_path): """Load model to return for future use.""" with open(model_path, 'rb') as file: model = pickle.load(file) return model if __name__ == '__main__': main()
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 3440, 62, 29616, 198, 6738, 1341, 35720, 13, 2616, 425, 62, 24406, 274, 1330, 12822, 31562, 32819, 198, 11748, 2298...
2.55102
294
# -*- coding: utf-8 -*- from .parserules import parseAll
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 764, 48610, 5028, 1330, 21136, 3237, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
1.654545
55
# ***************************************************************************** # precompressed/context_processors.py # ***************************************************************************** """ A set of request processors that return dictionaries to be merged into a template context. Each function takes the request object as its only parameter and returns a dictionary to add to the context. These are referenced from the setting TEMPLATE_CONTEXT_PROCESSORS and used by RequestContext. """ from __future__ import absolute_import, division from __future__ import print_function, unicode_literals from precompressed import utils # ***************************************************************************** # accepts_gzip # ***************************************************************************** def accepts_gzip(request): """ defines ACCEPTS_GZIP -- a boolean which reflects whether the request accepts Content-Type: gzip. """ return {'ACCEPTS_GZIP': utils.accepts_gzip(request)}
[ 2, 41906, 17174, 4557, 35625, 198, 2, 662, 5589, 2790, 14, 22866, 62, 14681, 669, 13, 9078, 198, 2, 41906, 17174, 4557, 35625, 198, 198, 37811, 198, 32, 900, 286, 2581, 20399, 326, 1441, 48589, 3166, 284, 307, 23791, 656, 257, 198, ...
4.450216
231
#Import modules import os import pandas as pd import numpy as np from pandas import DatetimeIndex import dask import scipy import time import glob import torch import torch.nn as nn from live_plotter import live_plotter import matplotlib.pyplot as plt from mpl_toolkits import mplot3d from functools import partial from abc import ABCMeta, abstractmethod import plottingTools import pytorchModel import loadData
[ 2, 20939, 13103, 201, 198, 11748, 28686, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 19798, 292, 1330, 16092, 8079, 15732, 201, 198, 11748, 288, 2093, 201, 198, 11748, 629, 541, ...
2.883871
155
import numpy as np import tensorflow as tf from tensorflow import keras import warnings warnings.filterwarnings('ignore') mnist = tf.keras.datasets.mnist (X_train, y_train), (X_test, y_test) = mnist.load_data() X_train, X_test = X_train / 255.0, X_test / 255.0 X_train.shape = (60000, 28, 28) model = tf.keras.Sequential([ tf.keras.layers.Flatten(input_shape=(28, 28)), tf.keras.layers.Dense(128, activation='relu'), tf.keras.layers.Dropout(0.2), tf.keras.layers.Dense(10) ]) # output shape is (None, 10) ie batch size, 10 # logits is the inverse of sigmoid logits = model(X_train[:1]).numpy() loss_fn = keras.losses.SparseCategoricalCrossentropy(from_logits=True) model.compile(optimizer='adam', loss=loss_fn, metrics=['accuracy']) model.fit(X_train, y_train, epochs=1) model.evaluate(X_test, y_test, verbose=2) probab_model = keras.Sequential([ model, keras.layers.Softmax() ])
[ 11748, 299, 32152, 355, 45941, 220, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 11748, 14601, 198, 40539, 654, 13, 24455, 40539, 654, 10786, 46430, 11537, 198, 10295, 396, 796, 48700, 13...
2.391076
381
__version__ = "2.1.0.dev0" from pyquil.quil import Program from pyquil.api import list_quantum_computers, get_qc
[ 834, 9641, 834, 796, 366, 17, 13, 16, 13, 15, 13, 7959, 15, 1, 198, 198, 6738, 12972, 421, 346, 13, 421, 346, 1330, 6118, 198, 6738, 12972, 421, 346, 13, 15042, 1330, 1351, 62, 40972, 388, 62, 785, 41510, 11, 651, 62, 80, 66, ...
2.478261
46
#!/bin/env python3.5 import math # binary seperation # tan line method if __name__ == '__main__': print(binary_seperation(test_func,[0,1] )) print(tanline(test_func, df_test_func, [0,1]))
[ 2, 48443, 8800, 14, 24330, 21015, 18, 13, 20, 198, 198, 11748, 10688, 628, 220, 220, 220, 220, 198, 2, 13934, 384, 525, 341, 198, 198, 2, 25706, 1627, 2446, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 2...
1.790541
148
import unittest from rdflib import Graph tests = [ ("basic", """\ SELECT ?name WHERE { ?a <http://xmlns.com/foaf/0.1/name> ?name }"""), ("simple_prefix", """\ PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name WHERE { ?a foaf:name ?name }"""), ("base_statement", """\ BASE <http://xmlns.com/foaf/0.1/> SELECT ?name WHERE { ?a <name> ?name }"""), ("prefix_and_colon_only_prefix", """\ PREFIX : <http://xmlns.com/foaf/0.1/> PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> SELECT ?name ?title WHERE { ?a :name ?name . ?a vcard:TITLE ?title }"""), ("predicate_object_list_notation", """\ PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name ?mbox WHERE { ?x foaf:name ?name ; foaf:mbox ?mbox . }"""), ("object_list_notation", """\ PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?x WHERE { ?x foaf:nick "Alice" , "Alice_" . } """), ("escaped_literals", """\ PREFIX tag: <http://xmlns.com/foaf/0.1/> PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> SELECT ?name WHERE { ?a tag:name ?name ; vcard:TITLE "escape test vcard:TITLE " ; <tag://test/escaping> "This is a ''' Test \"\"\"" ; <tag://test/escaping> ?d } """), ("key_word_as_variable", """\ PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?PREFIX ?WHERE WHERE { ?x foaf:name ?PREFIX ; foaf:mbox ?WHERE . }"""), ("key_word_as_prefix", """\ PREFIX WHERE: <http://xmlns.com/foaf/0.1/> SELECT ?name ?mbox WHERE { ?x WHERE:name ?name ; WHERE:mbox ?mbox . }"""), ("some_test_cases_from_grammar_py_1", """\ SELECT ?title WHERE { <http://example.org/book/book1> <http://purl.org/dc/elements/1.1/title> ?title . }"""), ("some_test_cases_from_grammar_py_2", """\ PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name ?mbox WHERE { ?person foaf:name ?name . OPTIONAL { ?person foaf:mbox ?mbox} }"""), ("some_test_cases_from_grammar_py_3", """\ PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name ?name2 WHERE { ?person foaf:name ?name . OPTIONAL { ?person foaf:knows ?p2 . ?p2 foaf:name ?name2 . } }"""), ("some_test_cases_from_grammar_py_4", """\ PREFIX foaf: <http://xmlns.com/foaf/0.1/> #PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?name ?mbox WHERE { { ?person rdf:type foaf:Person } . OPTIONAL { ?person foaf:name ?name } . OPTIONAL {?person foaf:mbox ?mbox} . }""") ]
[ 11748, 555, 715, 395, 198, 6738, 374, 67, 2704, 571, 1330, 29681, 198, 198, 41989, 796, 685, 198, 220, 220, 220, 5855, 35487, 1600, 198, 220, 220, 220, 37227, 59, 198, 220, 220, 220, 33493, 5633, 3672, 198, 220, 220, 220, 33411, 139...
1.928325
1,451
if __name__ == '__main__': print(f'Part 1: {part_one()}\nPart 2: {part_two()}')
[ 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7, 69, 6, 7841, 352, 25, 1391, 3911, 62, 505, 3419, 32239, 77, 7841, 362, 25, 1391, 3911, 62, 11545, 3419, 92, 11537, 198 ]
2.121951
41
#!/usr/bin/env python3 # -*- coding: future_fstrings -*- from db_sync_tool.utility import mode, system, output, helper from db_sync_tool.remote import client as remote_client from file_sync_tool.transfer import utility def transfer_files(): """ Transfering configured files between clients :return: """ if 'files' in system.config: for config in system.config['files']['config']: output.message( output.Subject.INFO, f'Starting rsync file transfer' ) if 'exclude' not in config: config['exclude'] = [] if mode.get_sync_mode() == mode.SyncMode.PROXY: # Proxy mode: Transferring from origin to local and from local to target utility.generate_temp_dir_name() helper.check_and_create_dump_dir(mode.Client.LOCAL, utility.temp_data_dir) synchronize( origin_path=config[mode.Client.ORIGIN], target_path=utility.temp_data_dir, exclude=config['exclude'], pseudo_client=mode.Client.ORIGIN ) synchronize( origin_path=f'{utility.temp_data_dir}/*', target_path=config[mode.Client.TARGET], exclude=config['exclude'], pseudo_client=mode.Client.TARGET ) utility.remove_temporary_dir() elif mode.get_sync_mode() == mode.SyncMode.SYNC_REMOTE: synchronize( origin_path=config[mode.Client.ORIGIN], target_path=config[mode.Client.TARGET], exclude=config['exclude'], client=mode.Client.ORIGIN, force_remote=True ) else: synchronize( origin_path=config[mode.Client.ORIGIN], target_path=config[mode.Client.TARGET], exclude=config['exclude'] ) else: f'{output.Subject.WARNING} No file sync configuration provided' def synchronize(origin_path, target_path, exclude, client=mode.Client.LOCAL, pseudo_client=None, force_remote=False): """ Using rsync command to synchronize files between systems :param origin_path: String :param target_path: String :param exclude: List :param client: String :param pseudo_client: String Client, which will be forced as remote client. Necessary for proxy transfer. :param force_remote: Boolean :return: """ _remote_client = None if force_remote: remote_client.load_ssh_client_origin() _origin_subject = f'{output.Subject.ORIGIN}{output.CliFormat.BLACK}[REMOTE]{output.CliFormat.ENDC} ' _target_subject = f'{output.Subject.TARGET}{output.CliFormat.BLACK}[REMOTE]{output.CliFormat.ENDC} ' elif mode.is_remote(mode.Client.ORIGIN) and pseudo_client != mode.Client.TARGET: _remote_client = mode.Client.ORIGIN _origin_subject = f'{output.Subject.ORIGIN}{output.CliFormat.BLACK}[REMOTE]{output.CliFormat.ENDC} ' _target_subject = f'{output.Subject.TARGET}{output.CliFormat.BLACK}[LOCAL]{output.CliFormat.ENDC} ' elif mode.is_remote(mode.Client.TARGET) and pseudo_client != mode.Client.ORIGIN: _remote_client = mode.Client.TARGET _origin_subject = f'{output.Subject.ORIGIN}{output.CliFormat.BLACK}[LOCAL]{output.CliFormat.ENDC} ' _target_subject = f'{output.Subject.TARGET}{output.CliFormat.BLACK}[REMOTE]{output.CliFormat.ENDC} ' elif not mode.is_remote(mode.Client.TARGET) and not mode.is_remote(mode.Client.ORIGIN): _origin_subject = f'{output.Subject.ORIGIN}{output.CliFormat.BLACK}[LOCAL]{output.CliFormat.ENDC} ' _target_subject = f'{output.Subject.TARGET}{output.CliFormat.BLACK}[LOCAL]{output.CliFormat.ENDC} ' _origin_name = helper.get_ssh_host_name(mode.Client.ORIGIN, True) if _remote_client == mode.Client.ORIGIN else '' _target_name = helper.get_ssh_host_name(mode.Client.TARGET, True) if _remote_client == mode.Client.TARGET else '' if not system.config['mute']: print( f'{_origin_subject}' f'{_origin_name}' f'{output.CliFormat.BLACK}{origin_path}{output.CliFormat.ENDC}' ) print( f'{_target_subject}' f'{_target_name}' f'{output.CliFormat.BLACK}{target_path}{output.CliFormat.ENDC}' ) _origin_user_host = utility.get_host(mode.Client.ORIGIN) if _remote_client == mode.Client.ORIGIN else '' _target_user_host = utility.get_host(mode.Client.TARGET) if _remote_client == mode.Client.TARGET else '' _output = mode.run_command( f'{utility.get_password_environment(_remote_client)}rsync {utility.get_options()} ' f'{utility.get_authorization(_remote_client)} {utility.get_excludes(exclude)}' f'{_origin_user_host}{origin_path} {_target_user_host}{target_path}', client, True ) utility.read_stats(_output)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 2003, 62, 69, 37336, 532, 9, 12, 198, 198, 6738, 20613, 62, 27261, 62, 25981, 13, 315, 879, 1330, 4235, 11, 1080, 11, 5072, 11, 31904, 198, 6738, 20...
2.16027
2,371
# coding: utf-8 # # Training Set Analysis # The purpose of this notebook is to compute the kernel density estimate of the PDF between the judgement and each feature in a training set, in order to estimate how each feature is performing. # # # TODO # Modify features to use custom function score queries, and use ML to optimise features given the below plot (plot ideal relationship between judgement and features, and optimise to get as close as possible). # In[51]: import sys import numpy as np import scipy from scipy import stats import matplotlib.pylab as plt models_dir = "/Users/sullid/ONS/dp-search-service/src/main/resources/elastic.ltr/models" model_name = sys.argv[1] # In[52]: trainingData = TrainingData(models_dir, model_name) # In[56]: import matplotlib.gridspec as gridspec import matplotlib.pylab as pylab fs=25 params = {'legend.fontsize': 'x-large', 'figure.figsize': (15, 5), 'axes.labelsize': fs, 'axes.titlesize':fs, 'xtick.labelsize':fs, 'ytick.labelsize':fs} pylab.rcParams.update(params) print "QIDS: ", trainingData.qids() for qid in trainingData.qids(): numFeatures = trainingData.numFeatures(qid) + 1 fig = plt.figure(figsize=(50, 50)) plt.suptitle('qid:%d' % qid, fontsize=fs*1.5) gs = gridspec.GridSpec(numFeatures, numFeatures) for i in range(numFeatures): rowLabel, rowValues = getValues(trainingData, qid, i) labelRow = True for j in range(i+1, numFeatures): colLabel, colValues = getValues(trainingData, qid, j) ax = plt.subplot(gs[i,j-numFeatures]) # ax.text(0.25, 0.5, "ax %d:%d" % (i,j)) if (labelRow): ax.set_ylabel(rowLabel) labelRow = False if (j == (i+1)): ax.set_xlabel(colLabel) try: Z, (xmin,xmax,ymin,ymax) = fitKernel(colValues, rowValues, 200j) extent = [xmin,xmax,ymin,ymax] ax.imshow(Z, cmap=plt.cm.gist_stern_r, extent=extent) ax.set_xlim([xmin, xmax]) ax.set_ylim([ymin, ymax]) forceAspect(ax) except: pass # ax.imshow(np.rot90(Z), cmap=plt.cm.gist_earth_r, # extent=[xmin, xmax, ymin, ymax], aspect=50) # ax.plot(x, y, 'k.', markersize=2) # ax.set_xlim([xmin, xmax]) # ax.set_ylim([ymin, ymax]) plt.show()
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1303, 13614, 5345, 14691, 198, 2, 383, 4007, 286, 428, 20922, 318, 284, 24061, 262, 9720, 12109, 8636, 286, 262, 12960, 1022, 262, 23071, 290, 1123, 3895, 287, 257, 3047, 900, 11, ...
2.133913
1,150
from operator import attrgetter, itemgetter from typing import ( Sequence, Any, Tuple, Union, List, Iterable, Dict, Callable, NamedTuple, ) SortSpec = NamedTuple("SortSpec", [("sort_key", Union[str, int]), ("reversed", bool)]) def index_list_of_objects( data: Iterable[Union[Sequence, Any]], key_field, use_get_item: bool, cast_index: Callable = None, ): """ Will index a list of objects based on key_field. Returns a dict with key based on key_field of object Parameters ---------- data : Iterable[Union[Sequence, Any]] [description] key : [type] [description] use_get_item : bool [description] cast_index : Callable, optional [description], by default None Returns ------- [type] [description] """ if use_get_item: indexer = itemgetter(key_field) else: indexer = attrgetter(key_field) result = {} for item in data: key_field_value = indexer(item) if cast_index is not None: key_field_value = cast_index(key_field_value) result[key_field_value] = item return result
[ 6738, 10088, 1330, 708, 81, 1136, 353, 11, 2378, 1136, 353, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 45835, 11, 198, 220, 220, 220, 4377, 11, 198, 220, 220, 220, 309, 29291, 11, 198, 220, 220, 220, 4479, 11, 198, 220, 220,...
2.309021
521
from django.contrib import admin from models import Location, ItemTemplate, Log, Inventory, Supplier admin.site.register(Location) admin.site.register(ItemTemplate, ItemTemplateAdmin) admin.site.register(Log) admin.site.register(Inventory) admin.site.register(Supplier)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 4981, 1330, 13397, 11, 9097, 30800, 11, 5972, 11, 35772, 11, 8105, 2505, 628, 198, 28482, 13, 15654, 13, 30238, 7, 14749, 8, 198, 28482, 13, 15654, 13, 30238, 7, 7449, ...
3.512821
78
from typing import Dict, Type from injector import Module, Binder from core_get.actions.action import Action from core_get.actions.init.init import Init from core_get.actions.init.init_options import InitOptions from core_get.actions.install.install import Install from core_get.actions.install.install_options import InstallOptions from core_get.actions.login.login import Login from core_get.actions.login.login_options import LoginOptions from core_get.actions.package.package import Package from core_get.actions.package.package_options import PackageOptions from core_get.actions.publish.publish import Publish from core_get.actions.publish.publish_options import PublishOptions from core_get.actions.remove.remove import Remove from core_get.actions.remove.remove_options import RemoveOptions from core_get.actions.test.test import Test from core_get.actions.test.test_options import TestOptions from core_get.actions.yank.yank import Yank from core_get.actions.yank.yank_options import YankOptions from core_get.options.options import Options from core_get.utils.injection import MultiMapClassProvider
[ 6738, 19720, 1330, 360, 713, 11, 5994, 198, 198, 6738, 8677, 273, 1330, 19937, 11, 347, 5540, 198, 198, 6738, 4755, 62, 1136, 13, 4658, 13, 2673, 1330, 7561, 198, 6738, 4755, 62, 1136, 13, 4658, 13, 15003, 13, 15003, 1330, 44707, 19...
3.706667
300
from panda3d.core import * # Leave these imports in, they may be used by ptf files. from panda3d.physics import * from . import Particles from . import ForceGroup from direct.directnotify import DirectNotifyGlobal
[ 198, 6738, 279, 5282, 18, 67, 13, 7295, 1330, 1635, 198, 198, 2, 17446, 777, 17944, 287, 11, 484, 743, 307, 973, 416, 279, 27110, 3696, 13, 198, 6738, 279, 5282, 18, 67, 13, 746, 23154, 1330, 1635, 198, 6738, 764, 1330, 2142, 2983...
3.40625
64
from django.core.exceptions import ValidationError from django.db import models from django.utils.functional import cached_property from django.utils.translation import ugettext_lazy as _ from jsonfield import JSONField from orchestra.models.fields import PrivateFileField from orchestra.models.queryset import group_by from . import settings from .methods import PaymentMethod def get_due_delta(self): return self.method_instance.due_delta def clean(self): self.data = self.method_instance.clean_data() class TransactionQuerySet(models.QuerySet): group_by = group_by class Transaction(models.Model): WAITTING_PROCESSING = 'WAITTING_PROCESSING' # CREATED WAITTING_EXECUTION = 'WAITTING_EXECUTION' # PROCESSED EXECUTED = 'EXECUTED' SECURED = 'SECURED' REJECTED = 'REJECTED' STATES = ( (WAITTING_PROCESSING, _("Waitting processing")), (WAITTING_EXECUTION, _("Waitting execution")), (EXECUTED, _("Executed")), (SECURED, _("Secured")), (REJECTED, _("Rejected")), ) STATE_HELP = { WAITTING_PROCESSING: _("The transaction is created and requires processing by the " "specific payment method."), WAITTING_EXECUTION: _("The transaction is processed and its pending execution on " "the related financial institution."), EXECUTED: _("The transaction is executed on the financial institution."), SECURED: _("The transaction ammount is secured."), REJECTED: _("The transaction has failed and the ammount is lost, a new transaction " "should be created for recharging."), } bill = models.ForeignKey('bills.bill', verbose_name=_("bill"), related_name='transactions') source = models.ForeignKey(PaymentSource, null=True, blank=True, on_delete=models.SET_NULL, verbose_name=_("source"), related_name='transactions') process = models.ForeignKey('payments.TransactionProcess', null=True, blank=True, on_delete=models.SET_NULL, verbose_name=_("process"), related_name='transactions') state = models.CharField(_("state"), max_length=32, choices=STATES, default=WAITTING_PROCESSING) amount = models.DecimalField(_("amount"), max_digits=12, decimal_places=2) currency = models.CharField(max_length=10, default=settings.PAYMENT_CURRENCY) created_at = models.DateTimeField(_("created"), auto_now_add=True) modified_at = models.DateTimeField(_("modified"), auto_now=True) objects = TransactionQuerySet.as_manager() class TransactionProcess(models.Model): """ Stores arbitrary data generated by payment methods while processing transactions """ CREATED = 'CREATED' EXECUTED = 'EXECUTED' ABORTED = 'ABORTED' COMMITED = 'COMMITED' STATES = ( (CREATED, _("Created")), (EXECUTED, _("Executed")), (ABORTED, _("Aborted")), (COMMITED, _("Commited")), ) data = JSONField(_("data"), blank=True) file = PrivateFileField(_("file"), blank=True) state = models.CharField(_("state"), max_length=16, choices=STATES, default=CREATED) created_at = models.DateTimeField(_("created"), auto_now_add=True, db_index=True) updated_at = models.DateTimeField(_("updated"), auto_now=True)
[ 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 45124, 1330, 39986, 62, 26745, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, ...
2.601241
1,289
# -*- coding: utf-8 -*- ########## # IMPORT # ########## import plotly.offline as py import plotly.tools as tls tls.set_credentials_file(username='ducktypers', api_key='fd81wnx3lh') ######## # MAIN # ######## def draw_map(lon, lat, text, titre='NO TITLE'): """ Take 3list as input, and the title of the map. """ py.plot({ # use `py.iplot` inside the ipython notebook "data": [{ 'type': 'scattergeo', 'locationmode': 'france', 'lon': lon, 'lat': lat, 'text': text, 'mode': 'markers', 'marker': dict( size = 8, opacity = 0.8, line = dict(width=1, color="rgb(102,102,102)") ) }], "layout": { 'title': str(titre), 'geo': dict(scope='europe', projection=dict( type='albers europe' ), showland = True, landcolor = "rgb(200, 200, 200)", subunitcolor = "rgb(217, 217, 217)", countrycolor = "rgb(217, 217, 217)", countrywidth = 1, subunitwidth = 1) } }, filename='interactive_map', # name of the file as saved in your plotly account #sharing='public' )
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7804, 2235, 198, 2, 30023, 9863, 1303, 198, 7804, 2235, 198, 11748, 7110, 306, 13, 2364, 1370, 355, 12972, 198, 11748, 7110, 306, 13, 31391, 355, 256, 7278, 628, ...
1.931193
654
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: acp.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() import custom_components.mbapi2020.proto.gogo_pb2 as gogo__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='acp.proto', package='proto', syntax='proto3', serialized_options=b'\n\032com.daimler.mbcarkit.proto\220\001\001\320\341\036\001', create_key=_descriptor._internal_create_key, serialized_pb=b'\n\tacp.proto\x12\x05proto\x1a\ngogo.proto\"\xa5\x02\n\x03VVA\"v\n\x0c\x43ommandState\x12\x19\n\x15UNKNOWN_COMMAND_STATE\x10\x00\x12\x0c\n\x07\x43REATED\x10\xf2\x07\x12\r\n\x08\x45NQUEUED\x10\xf8\x07\x12\x0f\n\nPROCESSING\x10\xf4\x07\x12\x0e\n\tSUSPENDED\x10\xf9\x07\x12\r\n\x08\x46INISHED\x10\xfa\x07\"\xa5\x01\n\x10\x43ommandCondition\x12\x1d\n\x19UNKNWON_COMMAND_CONDITION\x10\x00\x12\t\n\x04NONE\x10\xe8\x07\x12\r\n\x08\x41\x43\x43\x45PTED\x10\xe9\x07\x12\r\n\x08REJECTED\x10\xea\x07\x12\x0e\n\tTERMINATE\x10\xeb\x07\x12\x0c\n\x07SUCCESS\x10\xf3\x07\x12\x0b\n\x06\x46\x41ILED\x10\xf5\x07\x12\x10\n\x0bOVERWRITTEN\x10\xf6\x07\x12\x0c\n\x07TIMEOUT\x10\xf7\x07\"\x8f\x0b\n\nVehicleAPI\"~\n\x0c\x43ommandState\x12\x19\n\x15UNKNOWN_COMMAND_STATE\x10\x00\x12\x0e\n\nINITIATION\x10\x01\x12\x0c\n\x08\x45NQUEUED\x10\x02\x12\x0e\n\nPROCESSING\x10\x03\x12\x0b\n\x07WAITING\x10\x04\x12\x0c\n\x08\x46INISHED\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\"S\n\x0f\x41ttributeStatus\x12\r\n\tVALUE_SET\x10\x00\x12\x11\n\rVALUE_NOT_SET\x10\x01\x12\x0b\n\x07INVALID\x10\x03\x12\x11\n\rNOT_AVAILABLE\x10\x04\"\xab\t\n\tQueueType\x12\x1b\n\x17UNKNOWNCOMMANDQUEUETYPE\x10\x00\x12\t\n\x05\x44OORS\x10\n\x12\x0b\n\x07\x41UXHEAT\x10\x0b\x12\x0b\n\x07PRECOND\x10\x0c\x12\r\n\tCHARGEOPT\x10\r\x12\x0f\n\x0bMAINTENANCE\x10\x0e\x12\x07\n\x03TCU\x10\x0f\x12\x08\n\x04\x46\x45\x45\x44\x10\x10\x12\x15\n\x11SERVICEACTIVATION\x10\x11\x12\x07\n\x03\x41TP\x10\x12\x12\x0e\n\nASSISTANCE\x10\x13\x12\x08\n\x04RACP\x10\x14\x12\x0f\n\x0bWEEKPROFILE\x10\x15\x12\x13\n\x0fREMOTEDIAGNOSIS\x10\x16\x12\x08\n\x04\x46LSH\x10\x17\x12\x0f\n\x0bTEMPERATURE\x10\x18\x12\x0c\n\x08TRIPCOMP\x10\x19\x12\n\n\x06\x45NGINE\x10\x1a\x12\x0e\n\nTHEFTALARM\x10\x1b\x12\n\n\x06WINDOW\x10\x1c\x12\x0c\n\x08HEADUNIT\x10\x1d\x12\n\n\x06MECALL\x10\x1f\x12\x0f\n\x0bIMMOBILIZER\x10 \x12\x10\n\x0cRENTALSIGNAL\x10!\x12\x07\n\x03\x42\x43\x46\x10\"\x12\x11\n\rPLUGANDCHARGE\x10#\x12\x14\n\x10\x43\x41RSHARINGMODULE\x10$\x12\x0b\n\x07\x42\x41TTERY\x10%\x12\x11\n\rONBOARDFENCES\x10&\x12\x0f\n\x0bSPEEDFENCES\x10\'\x12\x13\n\x0f\x43HARGINGTARIFFS\x10(\x12\r\n\tRTMCONFIG\x10)\x12\x17\n\x13MAINTENANCECOMPUTER\x10*\x12\x0b\n\x07MECALL2\x10+\x12\x19\n\x15\x41UTOMATEDVALETPARKING\x10,\x12\x11\n\rCHARGECONTROL\x10-\x12\x0e\n\nSPEEDALERT\x10.\x12\x1b\n\x17unknowncommandqueuetype\x10\x00\x12\t\n\x05\x64oors\x10\n\x12\x0b\n\x07\x61uxheat\x10\x0b\x12\x0b\n\x07precond\x10\x0c\x12\r\n\tchargeopt\x10\r\x12\x0f\n\x0bmaintenance\x10\x0e\x12\x07\n\x03tcu\x10\x0f\x12\x08\n\x04\x66\x65\x65\x64\x10\x10\x12\x15\n\x11serviceactivation\x10\x11\x12\x07\n\x03\x61tp\x10\x12\x12\x0e\n\nassistance\x10\x13\x12\x08\n\x04racp\x10\x14\x12\x0f\n\x0bweekprofile\x10\x15\x12\x13\n\x0fremotediagnosis\x10\x16\x12\x08\n\x04\x66lsh\x10\x17\x12\x0f\n\x0btemperature\x10\x18\x12\x0c\n\x08tripcomp\x10\x19\x12\n\n\x06\x65ngine\x10\x1a\x12\x0e\n\ntheftalarm\x10\x1b\x12\n\n\x06window\x10\x1c\x12\x0c\n\x08headunit\x10\x1d\x12\n\n\x06mecall\x10\x1f\x12\x0f\n\x0bimmobilizer\x10 \x12\x10\n\x0crentalsignal\x10!\x12\x07\n\x03\x62\x63\x66\x10\"\x12\x11\n\rplugandcharge\x10#\x12\x14\n\x10\x63\x61rsharingmodule\x10$\x12\x0b\n\x07\x62\x61ttery\x10%\x12\x11\n\ronboardfences\x10&\x12\x0f\n\x0bspeedfences\x10\'\x12\x13\n\x0f\x63hargingtariffs\x10(\x12\r\n\trtmconfig\x10)\x12\x17\n\x13maintenancecomputer\x10*\x12\x0b\n\x07mecall2\x10+\x12\x19\n\x15\x61utomatedvaletparking\x10,\x12\x11\n\rchargecontrol\x10-\x12\x0e\n\nspeedalert\x10.\x1a\x02\x10\x01\"\xa9\x31\n\x03\x41\x43P\"\xa1\x31\n\x0b\x43ommandType\x12\x16\n\x12UNKNOWNCOMMANDTYPE\x10\x00\x12\r\n\tDOORSLOCK\x10\x64\x12\x0f\n\x0b\x44OORSUNLOCK\x10n\x12\x0f\n\x0bTRUNKUNLOCK\x10s\x12\x12\n\x0e\x46UELFLAPUNLOCK\x10t\x12\x14\n\x10\x43HARGEFLAPUNLOCK\x10u\x12\x17\n\x13\x43HARGECOUPLERUNLOCK\x10v\x12\x16\n\x12\x44OORSPREPARERENTAL\x10x\x12\x17\n\x12\x44OORSSECUREVEHICLE\x10\x82\x01\x12\x11\n\x0c\x41UXHEATSTART\x10\xac\x02\x12\x10\n\x0b\x41UXHEATSTOP\x10\xb6\x02\x12\x15\n\x10\x41UXHEATCONFIGURE\x10\xc0\x02\x12\x19\n\x14TEMPERATURECONFIGURE\x10\xde\x02\x12\x19\n\x14WEEKPROFILECONFIGURE\x10\xe8\x02\x12\x1b\n\x16WEEKPROFILEV2CONFIGURE\x10\xf2\x02\x12\x11\n\x0cPRECONDSTART\x10\x90\x03\x12\x10\n\x0bPRECONDSTOP\x10\x9a\x03\x12\x15\n\x10PRECONDCONFIGURE\x10\xa4\x03\x12\x1a\n\x15PRECONDCONFIGURESEATS\x10\xa9\x03\x12\x17\n\x12\x43HARGEOPTCONFIGURE\x10\xae\x03\x12\x13\n\x0e\x43HARGEOPTSTART\x10\xb8\x03\x12\x12\n\rCHARGEOPTSTOP\x10\xc2\x03\x12\x0c\n\x07\x46\x45\x45\x44POI\x10\xf4\x03\x12\x11\n\x0c\x46\x45\x45\x44\x46REETEXT\x10\xfe\x03\x12\x10\n\x0b\x45NGINESTART\x10\xa6\x04\x12\x0f\n\nENGINESTOP\x10\xb0\x04\x12\x13\n\x0e\x45NGINEAVPSTART\x10\xba\x04\x12\x0e\n\tTCUWAKEUP\x10\xd8\x04\x12\x10\n\x0bTCUSWUPDATE\x10\xe2\x04\x12\x10\n\x0bTCURCSRESET\x10\xec\x04\x12\x15\n\x10TCUINTERROGATION\x10\xf6\x04\x12\x14\n\x0fSPEEDALERTSTART\x10\xc6\x05\x12\x13\n\x0eSPEEDALERTSTOP\x10\xd0\x05\x12\x0e\n\tFLSHSTART\x10\xee\x05\x12\r\n\x08\x46LSHSTOP\x10\xf8\x05\x12\x10\n\x0bSIGPOSSTART\x10\x82\x06\x12\x16\n\x11\x43ONTRACTCONFIGURE\x10\xa0\x06\x12\x13\n\x0e\x43ONTRACTREMOVE\x10\xaa\x06\x12\x12\n\rROOTCONFIGURE\x10\xb4\x06\x12\x0f\n\nROOTREMOVE\x10\xbe\x06\x12\r\n\x08TRIPCOMP\x10\xd2\x06\x12\x19\n\x14MAINTENANCECONFIGURE\x10\xa2\x07\x12\x1e\n\x19MAINTENANCECOMPUTEROFFSET\x10\xa3\x07\x12\x15\n\x10SHORTTESTEXECUTE\x10\xa7\x07\x12\x1f\n\x1aSERVICEACTIVATIONCONFIGURE\x10\xac\x07\x12\"\n\x1d\x44\x43\x32SERVICEACTIVATIONCONFIGURE\x10\xb1\x07\x12\x13\n\x0e\x44\x43\x32RAWDOWNLOAD\x10\xb6\x07\x12\x1d\n\x18\x41PPLICATIONCONFIGURATION\x10\xbb\x07\x12\x15\n\x10\x44\x43\x32STARTTRACKING\x10\xc0\x07\x12\x10\n\x0b\x41TPSEQUENCE\x10\xde\x07\x12\x1d\n\x18THEFTALARMTOGGLEINTERIOR\x10\xe8\x07\x12\x18\n\x13THEFTALARMTOGGLETOW\x10\xf2\x07\x12 \n\x1bTHEFTALARMSELECTINTERIORTOW\x10\xfc\x07\x12\"\n\x1dTHEFTALARMDESELECTINTERIORTOW\x10\x86\x08\x12\x13\n\x0eTHEFTALARMSTOP\x10\x90\x08\x12\x0f\n\nWINDOWOPEN\x10\xcc\x08\x12\x10\n\x0bWINDOWCLOSE\x10\xd6\x08\x12\x14\n\x0fWINDOWVENTILATE\x10\xe0\x08\x12\x0f\n\nWINDOWMOVE\x10\xe1\x08\x12\r\n\x08ROOFOPEN\x10\xea\x08\x12\x0e\n\tROOFCLOSE\x10\xf4\x08\x12\r\n\x08ROOFLIFT\x10\xfe\x08\x12\r\n\x08ROOFMOVE\x10\xff\x08\x12\x12\n\rBATTERYMAXSOC\x10\xd0\x0f\x12\x19\n\x14\x42\x41TTERYCHARGEPROGRAM\x10\xda\x0f\x12\x1b\n\x16\x43HARGEPROGRAMCONFIGURE\x10\xe4\x0f\x12\x18\n\x13ONBOARDFENCESCREATE\x10\xb4\x10\x12\x18\n\x13ONBOARDFENCESUPDATE\x10\xbe\x10\x12\x18\n\x13ONBOARDFENCESDELETE\x10\xc8\x10\x12\x16\n\x11SPEEDFENCESCREATE\x10\x98\x11\x12\x16\n\x11SPEEDFENCESUPDATE\x10\xa2\x11\x12\x16\n\x11SPEEDFENCESDELETE\x10\xac\x11\x12\x1a\n\x15\x43HARGINGTARIFFSCREATE\x10\xfc\x11\x12\x1a\n\x15\x43HARGINGTARIFFSUPDATE\x10\x86\x12\x12\x1a\n\x15\x43HARGINGTARIFFSDELETE\x10\x90\x12\x12\x14\n\x0fTHEFTALARMSTART\x10\xc4\x13\x12\x1d\n\x18THEFTALARMSELECTINTERIOR\x10\xce\x13\x12\x1f\n\x1aTHEFTALARMDESELECTINTERIOR\x10\xd8\x13\x12\x18\n\x13THEFTALARMSELECTTOW\x10\xe2\x13\x12\x1a\n\x15THEFTALARMDESELECTTOW\x10\xec\x13\x12$\n\x1fTHEFTALARMSELECTDAMAGEDETECTION\x10\xf6\x13\x12&\n!THEFTALARMDESELECTDAMAGEDETECTION\x10\x80\x14\x12%\n THEFTALARMCONFIRMDAMAGEDETECTION\x10\x8a\x14\x12\x11\n\x0cMECALL2START\x10\xa8\x14\x12\x1e\n\x19UDXTRIGGERSYNCHRONIZATION\x10\xb0\t\x12\x19\n\x14UDXACTIVEUSERPROFILE\x10\xba\t\x12\x15\n\x10UDXRESETUSERDATA\x10\xc4\t\x12\x12\n\rUSERPROFSYNCH\x10\xce\t\x12\x12\n\rUSERDATARESET\x10\xd8\t\x12\x17\n\x12PROFACTIVATIONSNAP\x10\xe2\t\x12\x19\n\x14PROFACTIVATIONDIRECT\x10\xe7\t\x12\x13\n\x0eSOFTWAREUPDATE\x10\xec\t\x12\x15\n\x10PUSHNOTIFICATION\x10\xf6\t\x12\x12\n\rMECALLCOMMAND\x10\x9e\n\x12\x14\n\x0fPRECONDSTARTRCS\x10\xf8\n\x12\x13\n\x0ePRECONDSTOPRCS\x10\x82\x0b\x12\x18\n\x13PRECONDCONFIGURERCS\x10\x8c\x0b\x12\x11\n\x0cTCUCONFIGURE\x10\x96\x0b\x12\x1c\n\x17\x45\x44ISONSERVICEACTIVATION\x10\x97\x0b\x12\x11\n\x0cTESTSEQUENCE\x10\x98\x0b\x12\x19\n\x14PRECONDCONFIGURERACP\x10\x99\x0b\x12\x1b\n\x16\x43HARGEOPTCONFIGURERACP\x10\x9a\x0b\x12\x18\n\x13TARIFFTABLEDOWNLOAD\x10\x9b\x0b\x12\x15\n\x10PRECONDSTARTRACP\x10\x9c\x0b\x12\x14\n\x0fPRECONDSTOPRACP\x10\x9d\x0b\x12\x1a\n\x15ROOTCERTIFICATEREMOVE\x10\x9e\x0b\x12\x19\n\x14ONREQUESTPROBEUPLOAD\x10\x9f\x0b\x12\x1c\n\x17ROOTCERTIFICATEDOWNLOAD\x10\xa0\x0b\x12\x1e\n\x19\x43ONTRACTCERTIFICATEREMOVE\x10\xa1\x0b\x12 \n\x1b\x43ONTRACTCERTIFICATEDOWNLOAD\x10\xa2\x0b\x12\x1d\n\x18PROBECONFIGURATIONUPDATE\x10\xa3\x0b\x12\x13\n\x0eRDIAGDELETEECU\x10\xdc\x0b\x12\x16\n\x11RDIAGSTATUSREPORT\x10\xdd\x0b\x12\x13\n\x0eRDIAGEXECUTION\x10\xde\x0b\x12\x19\n\x14IMMOBILIZERCHALLENGE\x10\xc0\x0c\x12\x1d\n\x18IMMOBILIZERSEARCHKEYLINE\x10\xca\x0c\x12\x1e\n\x19IMMOBILIZERRELEASEKEYLINE\x10\xd4\x0c\x12\x1b\n\x16IMMOBILIZERLOCKKEYLINE\x10\xde\x0c\x12\x1b\n\x16IMMOBILIZERLOCKVEHICLE\x10\xdf\x0c\x12\x1e\n\x19IMMOBILIZERRELEASEVEHICLE\x10\xd5\x0c\x12\x14\n\x0fSETRENTALSIGNAL\x10\xa4\r\x12\x19\n\x14\x42LACKCHANNELDOWNLOAD\x10\x88\x0e\x12\x17\n\x12\x42LACKCHANNELUPLOAD\x10\x92\x0e\x12\x11\n\x0c\x43ONFIGURECSM\x10\xec\x0e\x12\x16\n\x11UPDATEVEHICLEINFO\x10\xed\x0e\x12\x16\n\x11RELAYMESSAGETOCSM\x10\xee\x0e\x12\x1c\n\x17RELAYRENTALREQUESTTOCSB\x10\xef\x0e\x12\x16\n\x11RTMDOWNLOADCONFIG\x10\xe0\x12\x12\x12\n\rRTMREADCONFIG\x10\xea\x12\x12\x10\n\x0b\x41VPACTIVATE\x10\x8c\x15\x12\x1b\n\x16\x43HARGECONTROLCONFIGURE\x10\xf0\x15\x12\x16\n\x12unknownCommandType\x10\x00\x12\r\n\tdoorsLock\x10\x64\x12\x0f\n\x0b\x64oorsUnlock\x10n\x12\x0f\n\x0btrunkUnlock\x10s\x12\x12\n\x0e\x66uelflapUnlock\x10t\x12\x14\n\x10\x63hargeflapUnlock\x10u\x12\x17\n\x13\x63hargecouplerUnlock\x10v\x12\x16\n\x12\x64oorsPrepareRental\x10x\x12\x17\n\x12\x64oorsSecureVehicle\x10\x82\x01\x12\x11\n\x0c\x61uxheatStart\x10\xac\x02\x12\x10\n\x0b\x61uxheatStop\x10\xb6\x02\x12\x15\n\x10\x61uxheatConfigure\x10\xc0\x02\x12\x19\n\x14temperatureConfigure\x10\xde\x02\x12\x19\n\x14weekprofileConfigure\x10\xe8\x02\x12\x1b\n\x16weekprofileV2Configure\x10\xf2\x02\x12\x11\n\x0cprecondStart\x10\x90\x03\x12\x10\n\x0bprecondStop\x10\x9a\x03\x12\x15\n\x10precondConfigure\x10\xa4\x03\x12\x1a\n\x15precondConfigureSeats\x10\xa9\x03\x12\x17\n\x12\x63hargeoptConfigure\x10\xae\x03\x12\x13\n\x0e\x63hargeoptStart\x10\xb8\x03\x12\x12\n\rchargeoptStop\x10\xc2\x03\x12\x0c\n\x07\x66\x65\x65\x64Poi\x10\xf4\x03\x12\x11\n\x0c\x66\x65\x65\x64\x46reetext\x10\xfe\x03\x12\x10\n\x0b\x65ngineStart\x10\xa6\x04\x12\x0f\n\nengineStop\x10\xb0\x04\x12\x13\n\x0e\x65ngineAvpstart\x10\xba\x04\x12\x0e\n\ttcuWakeup\x10\xd8\x04\x12\x10\n\x0btcuSwUpdate\x10\xe2\x04\x12\x10\n\x0btcuRcsReset\x10\xec\x04\x12\x15\n\x10tcuInterrogation\x10\xf6\x04\x12\x14\n\x0fspeedalertStart\x10\xc6\x05\x12\x13\n\x0espeedalertStop\x10\xd0\x05\x12\x0e\n\tflshStart\x10\xee\x05\x12\r\n\x08\x66lshStop\x10\xf8\x05\x12\x10\n\x0bsigposStart\x10\x82\x06\x12\x16\n\x11\x63ontractConfigure\x10\xa0\x06\x12\x13\n\x0e\x63ontractRemove\x10\xaa\x06\x12\x12\n\rrootConfigure\x10\xb4\x06\x12\x0f\n\nrootRemove\x10\xbe\x06\x12\r\n\x08tripcomp\x10\xd2\x06\x12\x19\n\x14maintenanceConfigure\x10\xa2\x07\x12\x1e\n\x19maintenanceComputerOffset\x10\xa3\x07\x12\x15\n\x10shorttestExecute\x10\xa7\x07\x12\x1f\n\x1aserviceactivationConfigure\x10\xac\x07\x12\"\n\x1d\x64\x63\x32ServiceactivationConfigure\x10\xb1\x07\x12\x13\n\x0e\x64\x63\x32RawDownload\x10\xb6\x07\x12\x1d\n\x18\x61pplicationConfiguration\x10\xbb\x07\x12\x15\n\x10\x64\x63\x32StartTracking\x10\xc0\x07\x12\x10\n\x0b\x61tpSequence\x10\xde\x07\x12\x1d\n\x18theftalarmToggleInterior\x10\xe8\x07\x12\x18\n\x13theftalarmToggleTow\x10\xf2\x07\x12 \n\x1btheftalarmSelectInteriorTow\x10\xfc\x07\x12\"\n\x1dtheftalarmDeselectInteriorTow\x10\x86\x08\x12\x13\n\x0etheftalarmStop\x10\x90\x08\x12\x0f\n\nwindowOpen\x10\xcc\x08\x12\x10\n\x0bwindowClose\x10\xd6\x08\x12\x14\n\x0fwindowVentilate\x10\xe0\x08\x12\x0f\n\nwindowMove\x10\xe1\x08\x12\r\n\x08roofOpen\x10\xea\x08\x12\x0e\n\troofClose\x10\xf4\x08\x12\r\n\x08roofLift\x10\xfe\x08\x12\r\n\x08roofMove\x10\xff\x08\x12\x12\n\rbatteryMaxsoc\x10\xd0\x0f\x12\x19\n\x14\x62\x61tteryChargeprogram\x10\xda\x0f\x12\x1b\n\x16\x63hargeprogramconfigure\x10\xe4\x0f\x12\x18\n\x13onboardfencesCreate\x10\xb4\x10\x12\x18\n\x13onboardfencesUpdate\x10\xbe\x10\x12\x18\n\x13onboardfencesDelete\x10\xc8\x10\x12\x16\n\x11speedfencesCreate\x10\x98\x11\x12\x16\n\x11speedfencesUpdate\x10\xa2\x11\x12\x16\n\x11speedfencesDelete\x10\xac\x11\x12\x1a\n\x15\x63hargingtariffsCreate\x10\xfc\x11\x12\x1a\n\x15\x63hargingtariffsUpdate\x10\x86\x12\x12\x1a\n\x15\x63hargingtariffsDelete\x10\x90\x12\x12\x14\n\x0ftheftalarmstart\x10\xc4\x13\x12\x1d\n\x18theftalarmselectinterior\x10\xce\x13\x12\x1f\n\x1atheftalarmdeselectinterior\x10\xd8\x13\x12\x18\n\x13theftalarmselecttow\x10\xe2\x13\x12\x1a\n\x15theftalarmdeselecttow\x10\xec\x13\x12$\n\x1ftheftalarmselectdamagedetection\x10\xf6\x13\x12&\n!theftalarmdeselectdamagedetection\x10\x80\x14\x12%\n theftalarmconfirmdamagedetection\x10\x8a\x14\x12\x11\n\x0cmecall2start\x10\xa8\x14\x12\x1e\n\x19udxTriggerSynchronization\x10\xb0\t\x12\x19\n\x14udxActiveUserProfile\x10\xba\t\x12\x15\n\x10udxResetUserData\x10\xc4\t\x12\x12\n\ruserProfSynch\x10\xce\t\x12\x12\n\ruserDataReset\x10\xd8\t\x12\x17\n\x12profActivationSnap\x10\xe2\t\x12\x19\n\x14profActivationDirect\x10\xe7\t\x12\x13\n\x0esoftwareUpdate\x10\xec\t\x12\x15\n\x10pushNotification\x10\xf6\t\x12\x12\n\rmecallcommand\x10\x9e\n\x12\x14\n\x0fprecondStartRcs\x10\xf8\n\x12\x13\n\x0eprecondStopRcs\x10\x82\x0b\x12\x18\n\x13precondConfigureRcs\x10\x8c\x0b\x12\x11\n\x0ctcuConfigure\x10\x96\x0b\x12\x1c\n\x17\x65\x64isonServiceActivation\x10\x97\x0b\x12\x11\n\x0ctestSequence\x10\x98\x0b\x12\x19\n\x14precondConfigureRacp\x10\x99\x0b\x12\x1b\n\x16\x63hargeoptConfigureRacp\x10\x9a\x0b\x12\x18\n\x13tariffTableDownload\x10\x9b\x0b\x12\x15\n\x10precondStartRacp\x10\x9c\x0b\x12\x14\n\x0fprecondStopRacp\x10\x9d\x0b\x12\x1a\n\x15rootCertificateRemove\x10\x9e\x0b\x12\x19\n\x14onRequestProbeUpload\x10\x9f\x0b\x12\x1c\n\x17rootCertificateDownload\x10\xa0\x0b\x12\x1e\n\x19\x63ontractCertificateRemove\x10\xa1\x0b\x12 \n\x1b\x63ontractCertificateDownload\x10\xa2\x0b\x12\x1d\n\x18probeConfigurationUpdate\x10\xa3\x0b\x12\x13\n\x0erdiagDeleteEcu\x10\xdc\x0b\x12\x16\n\x11rdiagStatusReport\x10\xdd\x0b\x12\x13\n\x0erdiagExecution\x10\xde\x0b\x12\x19\n\x14immobilizerChallenge\x10\xc0\x0c\x12\x1d\n\x18immobilizerSearchKeyline\x10\xca\x0c\x12\x1e\n\x19immobilizerReleaseKeyline\x10\xd4\x0c\x12\x1b\n\x16immobilizerLockKeyline\x10\xde\x0c\x12\x1b\n\x16immobilizerLockVehicle\x10\xdf\x0c\x12\x1e\n\x19immobilizerReleaseVehicle\x10\xd5\x0c\x12\x14\n\x0fsetRentalSignal\x10\xa4\r\x12\x19\n\x14\x62lackchannelDownload\x10\x88\x0e\x12\x17\n\x12\x62lackchannelUpload\x10\x92\x0e\x12\x11\n\x0c\x63onfigurecsm\x10\xec\x0e\x12\x16\n\x11updatevehicleinfo\x10\xed\x0e\x12\x16\n\x11relaymessagetocsm\x10\xee\x0e\x12\x1c\n\x17relayrentalrequesttocsb\x10\xef\x0e\x12\x16\n\x11rtmDownloadConfig\x10\xe0\x12\x12\x12\n\rrtmReadConfig\x10\xea\x12\x12\x10\n\x0b\x61vpActivate\x10\x8c\x15\x12\x1b\n\x16\x63hargecontrolconfigure\x10\xf0\x15\x1a\x02\x10\x01\x42#\n\x1a\x63om.daimler.mbcarkit.proto\x90\x01\x01\xd0\xe1\x1e\x01\x62\x06proto3' , dependencies=[gogo__pb2.DESCRIPTOR,]) _VVA_COMMANDSTATE = _descriptor.EnumDescriptor( name='CommandState', full_name='proto.VVA.CommandState', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNKNOWN_COMMAND_STATE', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CREATED', index=1, number=1010, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ENQUEUED', index=2, number=1016, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PROCESSING', index=3, number=1012, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SUSPENDED', index=4, number=1017, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FINISHED', index=5, number=1018, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=40, serialized_end=158, ) _sym_db.RegisterEnumDescriptor(_VVA_COMMANDSTATE) _VVA_COMMANDCONDITION = _descriptor.EnumDescriptor( name='CommandCondition', full_name='proto.VVA.CommandCondition', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNKNWON_COMMAND_CONDITION', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='NONE', index=1, number=1000, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ACCEPTED', index=2, number=1001, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='REJECTED', index=3, number=1002, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TERMINATE', index=4, number=1003, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SUCCESS', index=5, number=1011, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FAILED', index=6, number=1013, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='OVERWRITTEN', index=7, number=1014, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TIMEOUT', index=8, number=1015, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=161, serialized_end=326, ) _sym_db.RegisterEnumDescriptor(_VVA_COMMANDCONDITION) _VEHICLEAPI_COMMANDSTATE = _descriptor.EnumDescriptor( name='CommandState', full_name='proto.VehicleAPI.CommandState', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNKNOWN_COMMAND_STATE', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='INITIATION', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ENQUEUED', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PROCESSING', index=3, number=3, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='WAITING', index=4, number=4, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FINISHED', index=5, number=5, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FAILED', index=6, number=6, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=343, serialized_end=469, ) _sym_db.RegisterEnumDescriptor(_VEHICLEAPI_COMMANDSTATE) _VEHICLEAPI_ATTRIBUTESTATUS = _descriptor.EnumDescriptor( name='AttributeStatus', full_name='proto.VehicleAPI.AttributeStatus', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='VALUE_SET', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='VALUE_NOT_SET', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='INVALID', index=2, number=3, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='NOT_AVAILABLE', index=3, number=4, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=471, serialized_end=554, ) _sym_db.RegisterEnumDescriptor(_VEHICLEAPI_ATTRIBUTESTATUS) _VEHICLEAPI_QUEUETYPE = _descriptor.EnumDescriptor( name='QueueType', full_name='proto.VehicleAPI.QueueType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNKNOWNCOMMANDQUEUETYPE', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DOORS', index=1, number=10, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='AUXHEAT', index=2, number=11, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PRECOND', index=3, number=12, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CHARGEOPT', index=4, number=13, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MAINTENANCE', index=5, number=14, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TCU', index=6, number=15, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FEED', index=7, number=16, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SERVICEACTIVATION', index=8, number=17, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ATP', index=9, number=18, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ASSISTANCE', index=10, number=19, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='RACP', index=11, number=20, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='WEEKPROFILE', index=12, number=21, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='REMOTEDIAGNOSIS', index=13, number=22, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FLSH', index=14, number=23, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TEMPERATURE', index=15, number=24, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TRIPCOMP', index=16, number=25, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ENGINE', index=17, number=26, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='THEFTALARM', index=18, number=27, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='WINDOW', index=19, number=28, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='HEADUNIT', index=20, number=29, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MECALL', index=21, number=31, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='IMMOBILIZER', index=22, number=32, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='RENTALSIGNAL', index=23, number=33, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='BCF', index=24, number=34, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PLUGANDCHARGE', index=25, number=35, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CARSHARINGMODULE', index=26, number=36, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='BATTERY', index=27, number=37, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ONBOARDFENCES', index=28, number=38, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SPEEDFENCES', index=29, number=39, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CHARGINGTARIFFS', index=30, number=40, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='RTMCONFIG', index=31, number=41, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MAINTENANCECOMPUTER', index=32, number=42, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MECALL2', index=33, number=43, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='AUTOMATEDVALETPARKING', index=34, number=44, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CHARGECONTROL', index=35, number=45, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SPEEDALERT', index=36, number=46, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='unknowncommandqueuetype', index=37, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='doors', index=38, number=10, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='auxheat', index=39, number=11, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='precond', index=40, number=12, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='chargeopt', index=41, number=13, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='maintenance', index=42, number=14, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='tcu', index=43, number=15, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='feed', index=44, number=16, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='serviceactivation', index=45, number=17, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='atp', index=46, number=18, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='assistance', index=47, number=19, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='racp', index=48, number=20, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='weekprofile', index=49, number=21, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='remotediagnosis', index=50, number=22, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='flsh', index=51, number=23, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='temperature', index=52, number=24, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='tripcomp', index=53, number=25, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='engine', index=54, number=26, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='theftalarm', index=55, number=27, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='window', index=56, number=28, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='headunit', index=57, number=29, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='mecall', index=58, number=31, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='immobilizer', index=59, number=32, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='rentalsignal', index=60, number=33, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='bcf', index=61, number=34, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='plugandcharge', index=62, number=35, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='carsharingmodule', index=63, number=36, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='battery', index=64, number=37, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='onboardfences', index=65, number=38, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='speedfences', index=66, number=39, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='chargingtariffs', index=67, number=40, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='rtmconfig', index=68, number=41, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='maintenancecomputer', index=69, number=42, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='mecall2', index=70, number=43, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='automatedvaletparking', index=71, number=44, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='chargecontrol', index=72, number=45, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='speedalert', index=73, number=46, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=b'\020\001', serialized_start=557, serialized_end=1752, ) _sym_db.RegisterEnumDescriptor(_VEHICLEAPI_QUEUETYPE) _ACP_COMMANDTYPE = _descriptor.EnumDescriptor( name='CommandType', full_name='proto.ACP.CommandType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNKNOWNCOMMANDTYPE', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DOORSLOCK', index=1, number=100, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DOORSUNLOCK', index=2, number=110, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TRUNKUNLOCK', index=3, number=115, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FUELFLAPUNLOCK', index=4, number=116, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CHARGEFLAPUNLOCK', index=5, number=117, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CHARGECOUPLERUNLOCK', index=6, number=118, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DOORSPREPARERENTAL', index=7, number=120, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DOORSSECUREVEHICLE', index=8, number=130, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='AUXHEATSTART', index=9, number=300, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='AUXHEATSTOP', index=10, number=310, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='AUXHEATCONFIGURE', index=11, number=320, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TEMPERATURECONFIGURE', index=12, number=350, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='WEEKPROFILECONFIGURE', index=13, number=360, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='WEEKPROFILEV2CONFIGURE', index=14, number=370, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PRECONDSTART', index=15, number=400, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PRECONDSTOP', index=16, number=410, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PRECONDCONFIGURE', index=17, number=420, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PRECONDCONFIGURESEATS', index=18, number=425, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CHARGEOPTCONFIGURE', index=19, number=430, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CHARGEOPTSTART', index=20, number=440, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CHARGEOPTSTOP', index=21, number=450, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FEEDPOI', index=22, number=500, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FEEDFREETEXT', index=23, number=510, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ENGINESTART', index=24, number=550, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ENGINESTOP', index=25, number=560, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ENGINEAVPSTART', index=26, number=570, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TCUWAKEUP', index=27, number=600, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TCUSWUPDATE', index=28, number=610, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TCURCSRESET', index=29, number=620, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TCUINTERROGATION', index=30, number=630, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SPEEDALERTSTART', index=31, number=710, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SPEEDALERTSTOP', index=32, number=720, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FLSHSTART', index=33, number=750, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FLSHSTOP', index=34, number=760, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SIGPOSSTART', index=35, number=770, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CONTRACTCONFIGURE', index=36, number=800, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CONTRACTREMOVE', index=37, number=810, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ROOTCONFIGURE', index=38, number=820, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ROOTREMOVE', index=39, number=830, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TRIPCOMP', index=40, number=850, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MAINTENANCECONFIGURE', index=41, number=930, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MAINTENANCECOMPUTEROFFSET', index=42, number=931, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SHORTTESTEXECUTE', index=43, number=935, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SERVICEACTIVATIONCONFIGURE', index=44, number=940, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DC2SERVICEACTIVATIONCONFIGURE', index=45, number=945, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DC2RAWDOWNLOAD', index=46, number=950, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='APPLICATIONCONFIGURATION', index=47, number=955, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='DC2STARTTRACKING', index=48, number=960, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ATPSEQUENCE', index=49, number=990, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='THEFTALARMTOGGLEINTERIOR', index=50, number=1000, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='THEFTALARMTOGGLETOW', index=51, number=1010, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='THEFTALARMSELECTINTERIORTOW', index=52, number=1020, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='THEFTALARMDESELECTINTERIORTOW', index=53, number=1030, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='THEFTALARMSTOP', index=54, number=1040, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='WINDOWOPEN', index=55, number=1100, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='WINDOWCLOSE', index=56, number=1110, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='WINDOWVENTILATE', index=57, number=1120, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='WINDOWMOVE', index=58, number=1121, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ROOFOPEN', index=59, number=1130, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ROOFCLOSE', index=60, number=1140, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ROOFLIFT', index=61, number=1150, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ROOFMOVE', index=62, number=1151, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='BATTERYMAXSOC', index=63, number=2000, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='BATTERYCHARGEPROGRAM', index=64, number=2010, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CHARGEPROGRAMCONFIGURE', index=65, number=2020, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ONBOARDFENCESCREATE', index=66, number=2100, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ONBOARDFENCESUPDATE', index=67, number=2110, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ONBOARDFENCESDELETE', index=68, number=2120, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SPEEDFENCESCREATE', index=69, number=2200, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SPEEDFENCESUPDATE', index=70, number=2210, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SPEEDFENCESDELETE', index=71, number=2220, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CHARGINGTARIFFSCREATE', index=72, number=2300, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CHARGINGTARIFFSUPDATE', index=73, number=2310, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CHARGINGTARIFFSDELETE', index=74, number=2320, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='THEFTALARMSTART', index=75, number=2500, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='THEFTALARMSELECTINTERIOR', index=76, number=2510, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='THEFTALARMDESELECTINTERIOR', index=77, number=2520, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='THEFTALARMSELECTTOW', index=78, number=2530, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='THEFTALARMDESELECTTOW', index=79, number=2540, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='THEFTALARMSELECTDAMAGEDETECTION', index=80, number=2550, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='THEFTALARMDESELECTDAMAGEDETECTION', index=81, number=2560, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='THEFTALARMCONFIRMDAMAGEDETECTION', index=82, number=2570, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MECALL2START', index=83, number=2600, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='UDXTRIGGERSYNCHRONIZATION', index=84, number=1200, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='UDXACTIVEUSERPROFILE', index=85, number=1210, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='UDXRESETUSERDATA', index=86, number=1220, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='USERPROFSYNCH', index=87, number=1230, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='USERDATARESET', index=88, number=1240, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PROFACTIVATIONSNAP', index=89, number=1250, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PROFACTIVATIONDIRECT', index=90, number=1255, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SOFTWAREUPDATE', index=91, number=1260, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PUSHNOTIFICATION', index=92, number=1270, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='MECALLCOMMAND', index=93, number=1310, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PRECONDSTARTRCS', index=94, number=1400, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PRECONDSTOPRCS', index=95, number=1410, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PRECONDCONFIGURERCS', index=96, number=1420, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TCUCONFIGURE', index=97, number=1430, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='EDISONSERVICEACTIVATION', index=98, number=1431, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TESTSEQUENCE', index=99, number=1432, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PRECONDCONFIGURERACP', index=100, number=1433, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CHARGEOPTCONFIGURERACP', index=101, number=1434, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TARIFFTABLEDOWNLOAD', index=102, number=1435, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PRECONDSTARTRACP', index=103, number=1436, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PRECONDSTOPRACP', index=104, number=1437, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ROOTCERTIFICATEREMOVE', index=105, number=1438, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ONREQUESTPROBEUPLOAD', index=106, number=1439, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ROOTCERTIFICATEDOWNLOAD', index=107, number=1440, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CONTRACTCERTIFICATEREMOVE', index=108, number=1441, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CONTRACTCERTIFICATEDOWNLOAD', index=109, number=1442, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PROBECONFIGURATIONUPDATE', index=110, number=1443, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='RDIAGDELETEECU', index=111, number=1500, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='RDIAGSTATUSREPORT', index=112, number=1501, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='RDIAGEXECUTION', index=113, number=1502, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='IMMOBILIZERCHALLENGE', index=114, number=1600, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='IMMOBILIZERSEARCHKEYLINE', index=115, number=1610, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='IMMOBILIZERRELEASEKEYLINE', index=116, number=1620, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='IMMOBILIZERLOCKKEYLINE', index=117, number=1630, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='IMMOBILIZERLOCKVEHICLE', index=118, number=1631, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='IMMOBILIZERRELEASEVEHICLE', index=119, number=1621, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SETRENTALSIGNAL', index=120, number=1700, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='BLACKCHANNELDOWNLOAD', index=121, number=1800, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='BLACKCHANNELUPLOAD', index=122, number=1810, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CONFIGURECSM', index=123, number=1900, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='UPDATEVEHICLEINFO', index=124, number=1901, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='RELAYMESSAGETOCSM', index=125, number=1902, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='RELAYRENTALREQUESTTOCSB', index=126, number=1903, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='RTMDOWNLOADCONFIG', index=127, number=2400, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='RTMREADCONFIG', index=128, number=2410, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='AVPACTIVATE', index=129, number=2700, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CHARGECONTROLCONFIGURE', index=130, number=2800, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='unknownCommandType', index=131, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='doorsLock', index=132, number=100, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='doorsUnlock', index=133, number=110, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='trunkUnlock', index=134, number=115, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='fuelflapUnlock', index=135, number=116, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='chargeflapUnlock', index=136, number=117, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='chargecouplerUnlock', index=137, number=118, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='doorsPrepareRental', index=138, number=120, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='doorsSecureVehicle', index=139, number=130, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='auxheatStart', index=140, number=300, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='auxheatStop', index=141, number=310, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='auxheatConfigure', index=142, number=320, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='temperatureConfigure', index=143, number=350, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='weekprofileConfigure', index=144, number=360, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='weekprofileV2Configure', index=145, number=370, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='precondStart', index=146, number=400, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='precondStop', index=147, number=410, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='precondConfigure', index=148, number=420, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='precondConfigureSeats', index=149, number=425, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='chargeoptConfigure', index=150, number=430, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='chargeoptStart', index=151, number=440, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='chargeoptStop', index=152, number=450, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='feedPoi', index=153, number=500, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='feedFreetext', index=154, number=510, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='engineStart', index=155, number=550, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='engineStop', index=156, number=560, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='engineAvpstart', index=157, number=570, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='tcuWakeup', index=158, number=600, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='tcuSwUpdate', index=159, number=610, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='tcuRcsReset', index=160, number=620, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='tcuInterrogation', index=161, number=630, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='speedalertStart', index=162, number=710, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='speedalertStop', index=163, number=720, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='flshStart', index=164, number=750, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='flshStop', index=165, number=760, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='sigposStart', index=166, number=770, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='contractConfigure', index=167, number=800, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='contractRemove', index=168, number=810, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='rootConfigure', index=169, number=820, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='rootRemove', index=170, number=830, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='tripcomp', index=171, number=850, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='maintenanceConfigure', index=172, number=930, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='maintenanceComputerOffset', index=173, number=931, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='shorttestExecute', index=174, number=935, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='serviceactivationConfigure', index=175, number=940, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='dc2ServiceactivationConfigure', index=176, number=945, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='dc2RawDownload', index=177, number=950, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='applicationConfiguration', index=178, number=955, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='dc2StartTracking', index=179, number=960, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='atpSequence', index=180, number=990, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='theftalarmToggleInterior', index=181, number=1000, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='theftalarmToggleTow', index=182, number=1010, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='theftalarmSelectInteriorTow', index=183, number=1020, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='theftalarmDeselectInteriorTow', index=184, number=1030, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='theftalarmStop', index=185, number=1040, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='windowOpen', index=186, number=1100, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='windowClose', index=187, number=1110, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='windowVentilate', index=188, number=1120, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='windowMove', index=189, number=1121, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='roofOpen', index=190, number=1130, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='roofClose', index=191, number=1140, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='roofLift', index=192, number=1150, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='roofMove', index=193, number=1151, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='batteryMaxsoc', index=194, number=2000, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='batteryChargeprogram', index=195, number=2010, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='chargeprogramconfigure', index=196, number=2020, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='onboardfencesCreate', index=197, number=2100, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='onboardfencesUpdate', index=198, number=2110, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='onboardfencesDelete', index=199, number=2120, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='speedfencesCreate', index=200, number=2200, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='speedfencesUpdate', index=201, number=2210, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='speedfencesDelete', index=202, number=2220, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='chargingtariffsCreate', index=203, number=2300, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='chargingtariffsUpdate', index=204, number=2310, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='chargingtariffsDelete', index=205, number=2320, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='theftalarmstart', index=206, number=2500, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='theftalarmselectinterior', index=207, number=2510, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='theftalarmdeselectinterior', index=208, number=2520, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='theftalarmselecttow', index=209, number=2530, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='theftalarmdeselecttow', index=210, number=2540, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='theftalarmselectdamagedetection', index=211, number=2550, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='theftalarmdeselectdamagedetection', index=212, number=2560, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='theftalarmconfirmdamagedetection', index=213, number=2570, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='mecall2start', index=214, number=2600, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='udxTriggerSynchronization', index=215, number=1200, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='udxActiveUserProfile', index=216, number=1210, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='udxResetUserData', index=217, number=1220, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='userProfSynch', index=218, number=1230, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='userDataReset', index=219, number=1240, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='profActivationSnap', index=220, number=1250, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='profActivationDirect', index=221, number=1255, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='softwareUpdate', index=222, number=1260, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='pushNotification', index=223, number=1270, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='mecallcommand', index=224, number=1310, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='precondStartRcs', index=225, number=1400, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='precondStopRcs', index=226, number=1410, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='precondConfigureRcs', index=227, number=1420, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='tcuConfigure', index=228, number=1430, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='edisonServiceActivation', index=229, number=1431, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='testSequence', index=230, number=1432, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='precondConfigureRacp', index=231, number=1433, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='chargeoptConfigureRacp', index=232, number=1434, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='tariffTableDownload', index=233, number=1435, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='precondStartRacp', index=234, number=1436, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='precondStopRacp', index=235, number=1437, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='rootCertificateRemove', index=236, number=1438, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='onRequestProbeUpload', index=237, number=1439, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='rootCertificateDownload', index=238, number=1440, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='contractCertificateRemove', index=239, number=1441, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='contractCertificateDownload', index=240, number=1442, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='probeConfigurationUpdate', index=241, number=1443, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='rdiagDeleteEcu', index=242, number=1500, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='rdiagStatusReport', index=243, number=1501, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='rdiagExecution', index=244, number=1502, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='immobilizerChallenge', index=245, number=1600, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='immobilizerSearchKeyline', index=246, number=1610, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='immobilizerReleaseKeyline', index=247, number=1620, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='immobilizerLockKeyline', index=248, number=1630, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='immobilizerLockVehicle', index=249, number=1631, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='immobilizerReleaseVehicle', index=250, number=1621, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='setRentalSignal', index=251, number=1700, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='blackchannelDownload', index=252, number=1800, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='blackchannelUpload', index=253, number=1810, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='configurecsm', index=254, number=1900, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='updatevehicleinfo', index=255, number=1901, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='relaymessagetocsm', index=256, number=1902, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='relayrentalrequesttocsb', index=257, number=1903, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='rtmDownloadConfig', index=258, number=2400, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='rtmReadConfig', index=259, number=2410, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='avpActivate', index=260, number=2700, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='chargecontrolconfigure', index=261, number=2800, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=b'\020\001', serialized_start=1763, serialized_end=8068, ) _sym_db.RegisterEnumDescriptor(_ACP_COMMANDTYPE) _VVA = _descriptor.Descriptor( name='VVA', full_name='proto.VVA', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ _VVA_COMMANDSTATE, _VVA_COMMANDCONDITION, ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=33, serialized_end=326, ) _VEHICLEAPI = _descriptor.Descriptor( name='VehicleAPI', full_name='proto.VehicleAPI', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ _VEHICLEAPI_COMMANDSTATE, _VEHICLEAPI_ATTRIBUTESTATUS, _VEHICLEAPI_QUEUETYPE, ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=329, serialized_end=1752, ) _ACP = _descriptor.Descriptor( name='ACP', full_name='proto.ACP', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ _ACP_COMMANDTYPE, ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1755, serialized_end=8068, ) _VVA_COMMANDSTATE.containing_type = _VVA _VVA_COMMANDCONDITION.containing_type = _VVA _VEHICLEAPI_COMMANDSTATE.containing_type = _VEHICLEAPI _VEHICLEAPI_ATTRIBUTESTATUS.containing_type = _VEHICLEAPI _VEHICLEAPI_QUEUETYPE.containing_type = _VEHICLEAPI _ACP_COMMANDTYPE.containing_type = _ACP DESCRIPTOR.message_types_by_name['VVA'] = _VVA DESCRIPTOR.message_types_by_name['VehicleAPI'] = _VEHICLEAPI DESCRIPTOR.message_types_by_name['ACP'] = _ACP _sym_db.RegisterFileDescriptor(DESCRIPTOR) VVA = _reflection.GeneratedProtocolMessageType('VVA', (_message.Message,), { 'DESCRIPTOR' : _VVA, '__module__' : 'acp_pb2' # @@protoc_insertion_point(class_scope:proto.VVA) }) _sym_db.RegisterMessage(VVA) VehicleAPI = _reflection.GeneratedProtocolMessageType('VehicleAPI', (_message.Message,), { 'DESCRIPTOR' : _VEHICLEAPI, '__module__' : 'acp_pb2' # @@protoc_insertion_point(class_scope:proto.VehicleAPI) }) _sym_db.RegisterMessage(VehicleAPI) ACP = _reflection.GeneratedProtocolMessageType('ACP', (_message.Message,), { 'DESCRIPTOR' : _ACP, '__module__' : 'acp_pb2' # @@protoc_insertion_point(class_scope:proto.ACP) }) _sym_db.RegisterMessage(ACP) DESCRIPTOR._options = None _VEHICLEAPI_QUEUETYPE._options = None _ACP_COMMANDTYPE._options = None # @@protoc_insertion_point(module_scope)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 936, 79, 13, 1676, 1462, 198, 37811, 8645, 515, 8435, 11876, 2438, 526, ...
2.139029
41,754
''' Uses HPI [[https://github.com/karlicoss/HPI/blob/master/doc/MODULES.org#myreddit][reddit]] module ''' from itertools import chain from typing import Set, Optional from ..common import Visit, Loc, extract_urls, Results, logger # mostly here so we can keep track of how the user # wants to render markdown import typing if typing.TYPE_CHECKING: from my.reddit.common import Submission, Comment, Save, Upvote, RedditBase
[ 7061, 6, 198, 5842, 274, 6574, 40, 16410, 5450, 1378, 12567, 13, 785, 14, 21070, 677, 793, 14, 39, 11901, 14, 2436, 672, 14, 9866, 14, 15390, 14, 33365, 6239, 1546, 13, 2398, 2, 1820, 10748, 7131, 10748, 11907, 8265, 198, 7061, 6, ...
3.238806
134
import optparse import sys from sys import getsizeof import logging from signal import signal, SIGINT import time import requests # MIT License # # Copyright (c) 2022 SaicharanKandukuri # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. from rich.logging import RichHandler FORMAT = "%(message)s" logging.basicConfig( level="NOTSET", format=FORMAT, datefmt="[%X]", handlers=[RichHandler()] ) logging.disable('DEBUG') log = logging.getLogger("rich") # def get_xml_msg(xml): # for later ('') # return Et.parse(xml).getroot()[1] def grey_print(_string): """prints outs grey text Args: _string (str) """ print(f"\033[90m{_string}\033[0m") def connection_to(url, timeout=10): """checks if connection to url is available""" try: requests.get(url, timeout=timeout) return True except (requests.ConnectionError, requests.Timeout): return False def keep_alive(username, password, host, port): """keeps connection alive to wifi host""" while True: if connection_to("http://10.0.0.11:8090/"): log.info("connection to router \"available\"") else: log.critical("connection to router \"unavailable\"") if connection_to("https://google.com"): log.info("Connected to the internet") else: log.warning("Not connected to the internet") log.info("Tying to login back") try: log.info(WifiUtils.login(username, password, host, port)) except (requests.ConnectionError, requests.Timeout): log.critical( "Connection error: \"UNSTABLE CONNECTION TO HOST\"") time.sleep(5) def exit_handler(_signal, frame): """captures keyboard interrupts and kill signals & exits with messesage""" log.warning('SIGINT or CTRL-C detected. Exiting gracefully') grey_print("signal:"+str(_signal)) grey_print("frame:"+str(frame)) sys.exit(0) if __name__ == '__main__': signal(SIGINT, exit_handler) parser = optparse.OptionParser() parser.add_option('-u', '--username', dest='username', help='username to login/logout with parul university wifi service') parser.add_option('-p', '--password', dest='password', help='password to login/logout with parul university wifi service') parser.add_option('-H', '--host', dest='host', default='10.0.0.11', type=str) parser.add_option('-P', '--port', dest='port', default='8090', type=str) parser.add_option('-k', '--keep-alive', action='store_true', help='keep connecting to wifi when it gets signed out', default=False) parser.add_option('-o', '--logout', action='store_true', help='logout from wifi', default=False) parser.add_option('-l', '--login', action='store_true', help='login to wifi', default=False) options, args = parser.parse_args() WifiUtils = WifiUtils( options.username, options.password, options.host, options.port) if options.login: log.info("=> login <=") log.info(WifiUtils.login(options.username, options.password, options.host, options.port, )) sys.exit(0) if options.logout: log.info("=> logout <=") log.info(WifiUtils.logout(options.username, options.password, options.host, options.port, )) sys.exit(0) if options.keep_alive: log.info("=> keep alive <=") keep_alive(options.username, options.password, options.host, options.port, )
[ 11748, 2172, 29572, 198, 11748, 25064, 198, 6738, 25064, 1330, 3011, 1096, 1659, 198, 11748, 18931, 198, 6738, 6737, 1330, 6737, 11, 33993, 12394, 198, 11748, 640, 198, 11748, 7007, 198, 198, 2, 17168, 13789, 198, 2, 198, 2, 15069, 357,...
2.438404
2,005
""" sphinx-simulink.application ~~~~~~~~~~~~~~~~~~~~~~~ Embed Simulink diagrams on your documentation. :copyright: Copyright 2016 by Dennis Edward Kalinowski <dekalinowski@gmail.com>. :license: MIT, see LICENSE for details. """ import matlab.engine import os from sphinx.errors import SphinxError from sphinx.util.osutil import ensuredir from sphinxsimulink.diagram import directives,nodes from sphinxsimulink.metadata import __version__ engine = None
[ 37811, 198, 220, 220, 220, 599, 20079, 87, 12, 14323, 377, 676, 13, 31438, 198, 220, 220, 220, 220, 27156, 8728, 4907, 93, 628, 220, 220, 220, 13302, 276, 3184, 377, 676, 37067, 319, 534, 10314, 13, 628, 220, 220, 220, 1058, 22163, ...
3.018293
164
from ._internal.frameworks.pytorch_lightning import load from ._internal.frameworks.pytorch_lightning import save from ._internal.frameworks.pytorch_lightning import load_runner __all__ = ["load", "load_runner", "save"]
[ 6738, 47540, 32538, 13, 19298, 19653, 13, 9078, 13165, 354, 62, 2971, 768, 1330, 3440, 198, 6738, 47540, 32538, 13, 19298, 19653, 13, 9078, 13165, 354, 62, 2971, 768, 1330, 3613, 198, 6738, 47540, 32538, 13, 19298, 19653, 13, 9078, 1316...
3.298507
67
from django import template from django.conf import settings register = template.Library()
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 198 ]
4.181818
22
""" Author: Konstantinos Angelopoulos Date: 04/02/2020 All rights reserved. Feel free to use and modify and if you like it give it a star. Import the Robot's Step Files and Color/Scale/Assemble them using the instructions in /RoboDK/KUKA/KUKA LWR IV+ Description (for Original=kuka_lwr_model_description.json, for custom=custom_kuka_lwr_model_description, for custom2=custom_kuka_lwr_model_description_2) before running the code to complete the robot model. ######################################################################### ######### To quickly color and scale use the next lines of code ######### ######################################################################### from robolink import * # RoboDK API from robodk import * # Robot toolbox RDK = Robolink() for station in RDK.ItemList(): for item in station.Childs(): item.Scale(1000) item.setColor(255/255, 85/255, 0/255, 255/255) ######################################################################## #### For custom2 run these commands before assembling the stl files #### ######################################################################## from robolink import * # RoboDK API from robodk import * # Robot toolbox import numpy as np RDK = Robolink() for station in RDK.ItemList(): for item in station.Childs(): item.setGeometryPose(item.Pose()*rotz(np.pi)) item.Scale(1000) item.setColor(255/255, 85/255, 0/255, 255/255) and after building the mechanism and import it, in order to rotate the robot run: from robolink import * # RoboDK API from robodk import * # Robot toolbox RDK = Robolink() ref = RDK.Item('reference2') ref.setPoseAbs(ref.Pose()*rotz(pi)) ############################################################################################## ##### The original option is just the robot model without any inverted sense and joints ###### ##### home are [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ########################################### ############################################################################################## ##### The custom robot is the real model that has the same limitations, home joints and ###### ##### senses as the REAl KUKA LWR but the X and Y axis system are inverted ################### ############################################################################################## ##### The custom2 robot is the same as the custom option but with the X and Y axis being ##### ##### the same as the REAL KUKA ROBOT ######################################################## ############################################################################################## """ # Start the RoboDK API from robolink.robolink import * from robodk.robodk import * import json import os # ORIGINAL ROBOT DATA with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'RoboDK/KUKA/KUKA LWR IV+ Description/kuka_lwr_model_description.json')) as config_file: data = json.load(config_file) original_robot_name = data['Robot name'] original_robot_dof = data['DOF'] original_robot_joint1 = data['Joint 1'] original_robot_joint2 = data['Joint 2'] original_robot_joint3 = data['Joint 3'] original_robot_joint4 = data['Joint 4'] original_robot_joint5 = data['Joint 5'] original_robot_joint6 = data['Joint 6'] original_robot_joint7 = data['Joint 7'] original_robot_joints_build = [original_robot_joint1["Build joints"], original_robot_joint2["Build joints"], original_robot_joint3["Build joints"], original_robot_joint4["Build joints"], original_robot_joint5["Build joints"], original_robot_joint6["Build joints"], original_robot_joint7["Build joints"]] original_robot_joints_home = [original_robot_joint1["Home"], original_robot_joint2["Home"], original_robot_joint3["Home"], original_robot_joint4["Home"], original_robot_joint5["Home"], original_robot_joint6["Home"], original_robot_joint7["Home"]] original_robot_parameters = [data["d1"], data["d3"], data["d5"], data["d7"], data["dtheta1"], data["dtheta2"], data["dtheta3"], data["dtheta4"], data["dtheta5"], data["dtheta6"], data["dtheta7"]] original_robot_joint_senses = [original_robot_joint1["Invert Sense"], original_robot_joint2["Invert Sense"], original_robot_joint3["Invert Sense"], original_robot_joint4["Invert Sense"], original_robot_joint5["Invert Sense"], original_robot_joint6["Invert Sense"], original_robot_joint7["Invert Sense"]] original_robot_joint_lower_limit = [original_robot_joint1["Minimum limit"], original_robot_joint2["Minimum limit"], original_robot_joint3["Minimum limit"], original_robot_joint4["Minimum limit"], original_robot_joint5["Minimum limit"], original_robot_joint6["Minimum limit"], original_robot_joint7["Minimum limit"]] original_robot_joint_upper_limit = [original_robot_joint1["Maximum limit"], original_robot_joint2["Maximum limit"], original_robot_joint3["Maximum limit"], original_robot_joint4["Maximum limit"], original_robot_joint5["Maximum limit"], original_robot_joint6["Maximum limit"], original_robot_joint7["Maximum limit"]] original_robot_base_pose = data["Base shift"] original_robot_tool_pose = data["End-effector shift"] # CUSTOM ROBOT DATA with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'RoboDK/KUKA/KUKA LWR IV+ Description/custom_lwr_model_description.json')) as config_file: data = json.load(config_file) custom_robot_name = data['Robot name'] custom_robot_dof = data['DOF'] custom_robot_joint1 = data['Joint 1'] custom_robot_joint2 = data['Joint 2'] custom_robot_joint3 = data['Joint 3'] custom_robot_joint4 = data['Joint 4'] custom_robot_joint5 = data['Joint 5'] custom_robot_joint6 = data['Joint 6'] custom_robot_joint7 = data['Joint 7'] custom_robot_joints_build = [custom_robot_joint1["Build joints"], custom_robot_joint2["Build joints"], custom_robot_joint3["Build joints"], custom_robot_joint4["Build joints"], custom_robot_joint5["Build joints"], custom_robot_joint6["Build joints"], custom_robot_joint7["Build joints"]] custom_robot_joints_home = [custom_robot_joint1["Home"], custom_robot_joint2["Home"], custom_robot_joint3["Home"], custom_robot_joint4["Home"], custom_robot_joint5["Home"], custom_robot_joint6["Home"], custom_robot_joint7["Home"]] custom_robot_parameters = [data["d1"], data["d3"], data["d5"], data["d7"], data["dtheta1"], data["dtheta2"], data["dtheta3"], data["dtheta4"], data["dtheta5"], data["dtheta6"], data["dtheta7"]] custom_robot_joint_senses = [custom_robot_joint1["Invert Sense"], custom_robot_joint2["Invert Sense"], custom_robot_joint3["Invert Sense"], custom_robot_joint4["Invert Sense"], custom_robot_joint5["Invert Sense"], custom_robot_joint6["Invert Sense"], custom_robot_joint7["Invert Sense"]] custom_robot_joint_lower_limit = [custom_robot_joint1["Minimum limit"], custom_robot_joint2["Minimum limit"], custom_robot_joint3["Minimum limit"], custom_robot_joint4["Minimum limit"], custom_robot_joint5["Minimum limit"], custom_robot_joint6["Minimum limit"], custom_robot_joint7["Minimum limit"]] custom_robot_joint_upper_limit = [custom_robot_joint1["Maximum limit"], custom_robot_joint2["Maximum limit"], custom_robot_joint3["Maximum limit"], custom_robot_joint4["Maximum limit"], custom_robot_joint5["Maximum limit"], custom_robot_joint6["Maximum limit"], custom_robot_joint7["Maximum limit"]] custom_robot_base_pose = data["Base shift"] custom_robot_tool_pose = data["End-effector shift"] # CUSTOM 2 ROBOT DATA with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'RoboDK/KUKA/KUKA LWR IV+ Description/custom_lwr_model_description_2.json')) as config_file: data = json.load(config_file) custom_2_robot_name = data['Robot name'] custom_2_robot_dof = data['DOF'] custom_2_robot_joint1 = data['Joint 1'] custom_2_robot_joint2 = data['Joint 2'] custom_2_robot_joint3 = data['Joint 3'] custom_2_robot_joint4 = data['Joint 4'] custom_2_robot_joint5 = data['Joint 5'] custom_2_robot_joint6 = data['Joint 6'] custom_2_robot_joint7 = data['Joint 7'] custom_2_robot_joints_build = [custom_2_robot_joint1["Build joints"], custom_2_robot_joint2["Build joints"], custom_2_robot_joint3["Build joints"], custom_2_robot_joint4["Build joints"], custom_2_robot_joint5["Build joints"], custom_2_robot_joint6["Build joints"], custom_2_robot_joint7["Build joints"]] custom_2_robot_joints_home = [custom_2_robot_joint1["Home"], custom_2_robot_joint2["Home"], custom_2_robot_joint3["Home"], custom_2_robot_joint4["Home"], custom_2_robot_joint5["Home"], custom_2_robot_joint6["Home"], custom_2_robot_joint7["Home"]] custom_2_robot_parameters = [data["d1"], data["d3"], data["d5"], data["d7"], data["dtheta1"], data["dtheta2"], data["dtheta3"], data["dtheta4"], data["dtheta5"], data["dtheta6"], data["dtheta7"]] custom_2_robot_joint_senses = [custom_2_robot_joint1["Invert Sense"], custom_2_robot_joint2["Invert Sense"], custom_2_robot_joint3["Invert Sense"], custom_2_robot_joint4["Invert Sense"], custom_2_robot_joint5["Invert Sense"], custom_2_robot_joint6["Invert Sense"], custom_2_robot_joint7["Invert Sense"]] custom_2_robot_joint_lower_limit = [custom_2_robot_joint1["Minimum limit"], custom_2_robot_joint2["Minimum limit"], custom_2_robot_joint3["Minimum limit"], custom_2_robot_joint4["Minimum limit"], custom_2_robot_joint5["Minimum limit"], custom_2_robot_joint6["Minimum limit"], custom_2_robot_joint7["Minimum limit"]] custom_2_robot_joint_upper_limit = [custom_2_robot_joint1["Maximum limit"], custom_2_robot_joint2["Maximum limit"], custom_2_robot_joint3["Maximum limit"], custom_2_robot_joint4["Maximum limit"], custom_2_robot_joint5["Maximum limit"], custom_2_robot_joint6["Maximum limit"], custom_2_robot_joint7["Maximum limit"]] custom_2_robot_base_pose = data["Base shift"] custom_2_robot_tool_pose = data["End-effector shift"] RDK = Robolink() custom = False custom2 = True if custom: robot_name = custom_robot_name DOFs = custom_robot_dof joints_build = custom_robot_joints_build joints_home = custom_robot_joints_home parameters = custom_robot_parameters joints_senses = custom_robot_joint_senses # -1 = Inverted, +1 = Not Inverted lower_limits = custom_robot_joint_lower_limit upper_limits = custom_robot_joint_upper_limit base_pose = xyzrpw_2_pose(custom_robot_base_pose) tool_pose = xyzrpw_2_pose(custom_robot_tool_pose) list_objects = [] elif custom2: robot_name = custom_2_robot_name DOFs = custom_2_robot_dof joints_build = custom_2_robot_joints_build joints_home = custom_2_robot_joints_home parameters = custom_2_robot_parameters joints_senses = custom_2_robot_joint_senses # -1 = Inverted, +1 = Not Inverted lower_limits = custom_2_robot_joint_lower_limit upper_limits = custom_2_robot_joint_upper_limit base_pose = xyzrpw_2_pose(custom_2_robot_base_pose) tool_pose = xyzrpw_2_pose(custom_2_robot_tool_pose) list_objects = [] else: robot_name = original_robot_name DOFs = original_robot_dof joints_build = original_robot_joints_build joints_home = original_robot_joints_home parameters = original_robot_parameters joints_senses = original_robot_joint_senses # -1 = Inverted, +1 = Not Inverted lower_limits = original_robot_joint_lower_limit upper_limits = original_robot_joint_upper_limit base_pose = xyzrpw_2_pose(original_robot_base_pose) tool_pose = xyzrpw_2_pose(original_robot_tool_pose) list_objects = [] for i in range(DOFs + 1): if i == 0: itm = RDK.Item('base', ITEM_TYPE_OBJECT) else: itm = RDK.Item('link_'+str(i), ITEM_TYPE_OBJECT) list_objects.append(itm) new_robot = RDK.BuildMechanism(MAKE_ROBOT_7DOF, list_objects, parameters, joints_build, joints_home, joints_senses, lower_limits, upper_limits, base_pose, tool_pose, robot_name) if not new_robot.Valid(): print("Failed to create the robot. Check input values.") else: print("Robot/mechanism created: " + new_robot.Name())
[ 37811, 198, 13838, 25, 17431, 18797, 11996, 3905, 20338, 198, 10430, 25, 8702, 14, 2999, 14, 42334, 198, 3237, 2489, 10395, 13, 198, 35114, 1479, 284, 779, 290, 13096, 290, 611, 345, 588, 340, 1577, 340, 257, 3491, 13, 198, 198, 20939...
2.406968
5,482
import unittest from context import parser if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 4732, 1330, 30751, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.818182
33
# -*- coding: utf-8 -*- # This file is part of Archdiffer and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Created on Sat May 12 20:39:46 2018 @author: Pavla Kratochvilova <pavla.kratochvilova@gmail.com> """ from random import choice from datetime import datetime from . import RESTTest from ..constants import STATE_STRINGS from .. import database DATETIMES = [ '1000-01-01 00:00:00', '2018-01-01 00:00:00', '9999-01-01 00:00:00', ] IDS = LIMITS = OFFSETS = ['0', '1', '2', '10', '999999'] STATES = list(STATE_STRINGS.values())
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 770, 2393, 318, 636, 286, 5579, 26069, 263, 290, 318, 2716, 739, 198, 2, 262, 17168, 13789, 25, 2638, 1378, 2503, 13, 44813, 1668, 13, 2398, 14, 677, 4541, 1...
2.586957
230
from urllib.parse import quote from django import template register = template.Library()
[ 6738, 2956, 297, 571, 13, 29572, 1330, 9577, 198, 6738, 42625, 14208, 1330, 11055, 198, 198, 30238, 796, 11055, 13, 23377, 3419 ]
4.045455
22
# Generated by Django 2.0.6 on 2018-06-11 23:50 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 21, 319, 2864, 12, 3312, 12, 1157, 2242, 25, 1120, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
from datetime import datetime from pydantic import BaseModel from typing import Optional, List from fastapi import Query
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 6738, 19720, 1330, 32233, 11, 7343, 198, 6738, 3049, 15042, 1330, 43301, 628 ]
4.357143
28
# IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # $Source: src/test/testcases/testPSUReadSbeMem.py $ # # OpenPOWER sbe Project # # Contributors Listed Below - COPYRIGHT 2017,2019 # [+] International Business Machines Corp. # # # 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. # # IBM_PROLOG_END_TAG from __future__ import print_function import sys sys.path.append("targets/p9_nimbus/sbeTest" ) sys.path.append("targets/p9_axone/sbeTest" ) import testPSUUtil import testRegistry as reg import testUtil import testMemUtil #------------------------------- # This is a Test Expected Data #------------------------------- def readSeeprom(offset, size, destAddr, primStatus, secStatus): ''' #------------------------------------------------------------------------------------------------------------------------------ # SBE side test data - #------------------------------------------------------------------------------------------------------------------------------ ''' sbe_test_data = ( #----------------------------------------------------------------------------------------------------- # OP Reg ValueToWrite size Test Expected Data Description #----------------------------------------------------------------------------------------------------- # FFDC Size, Pass CMD Size ["write", reg.REG_MBOX0, "0000010000F0D703", 8, "None", "Writing to MBOX0 address"], # seeprom offset, Size ["write", reg.REG_MBOX1, getdoubleword((offset<<32)+size), 8, "None", "Writing to MBOX1 address"], # response Addr ["write", reg.REG_MBOX2, getdoubleword(destAddr), 8, "None", "Writing to MBOX2 address"], ["write", reg.PSU_SBE_DOORBELL_REG_WO_OR, "8000000000000000", 8, "None", "Update SBE Doorbell register to interrupt SBE"], ) ''' #--------------------- # Host side test data - SUCCESS #--------------------- ''' host_test_data_success = ( #---------------------------------------------------------------------------------------------------------------- # OP Reg ValueToWrite size Test Expected Data Description #---------------------------------------------------------------------------------------------------------------- ["read", reg.REG_MBOX4, "0", 8, getdoubleword((primStatus<<48)+(secStatus<<32)+0xF0D703), "Reading Host MBOX4 data to Validate"], ) ''' #----------------------------------------------------------------------- # Do not modify - Used to simulate interrupt on Ringing Doorbell on Host #----------------------------------------------------------------------- ''' host_polling_data = ( #---------------------------------------------------------------------------------------------------------------- # OP Reg ValueToWrite size Test Expected Data Description #---------------------------------------------------------------------------------------------------------------- ["read", reg.PSU_HOST_DOORBELL_REG_WO_OR, "0", 8, "8000000000000000", "Reading Host Doorbell for Interrupt Bit0"], ) # Run Simics initially testUtil.runCycles( 10000000 ); # Intialize the class obj instances regObj = testPSUUtil.registry() # Registry obj def for operation # HOST->SBE data set execution regObj.ExecuteTestOp( testPSUUtil.simSbeObj, sbe_test_data ) print("\n Poll on Host side for INTR ...\n") #Poll on HOST DoorBell Register for interrupt regObj.pollingOn( testPSUUtil.simSbeObj, host_polling_data, 5 ) #SBE->HOST data set execution regObj.ExecuteTestOp( testPSUUtil.simSbeObj, host_test_data_success ) #------------------------- # Main Function #------------------------- if __name__ == "__main__": if testUtil.getMachineName() == "axone": try: main() except: print ( "\nTest Suite completed with error(s)" ) testUtil.collectFFDC() raise() print ( "\nTest Suite completed with no errors" ) else: main() if err: print ( "\nTest Suite completed with error(s)" ) #sys.exit(1) else: print ( "\nTest Suite completed with no errors" ) #sys.exit(0);
[ 2, 19764, 62, 4805, 33462, 62, 33, 43312, 62, 42197, 198, 2, 770, 318, 281, 6338, 7560, 386, 6404, 13, 198, 2, 198, 2, 720, 7416, 25, 12351, 14, 9288, 14, 9288, 33964, 14, 9288, 3705, 4261, 1329, 50, 1350, 13579, 13, 9078, 720, ...
2.860845
1,775
#!/usr/bin/env python3 """Module containing the ClusteringPredict class and the command line interface.""" import argparse import pandas as pd import joblib from biobb_common.generic.biobb_object import BiobbObject from sklearn.preprocessing import StandardScaler from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu from biobb_common.tools.file_utils import launchlogger from biobb_ml.clustering.common import * def clustering_predict(input_model_path: str, output_results_path: str, input_dataset_path: str = None, properties: dict = None, **kwargs) -> int: """Execute the :class:`ClusteringPredict <clustering.clustering_predict.ClusteringPredict>` class and execute the :meth:`launch() <clustering.clustering_predict.ClusteringPredict.launch>` method.""" return ClusteringPredict(input_model_path=input_model_path, output_results_path=output_results_path, input_dataset_path=input_dataset_path, properties=properties, **kwargs).launch() def main(): """Command line execution of this building block. Please check the command line documentation.""" parser = argparse.ArgumentParser(description="Makes predictions from an input dataset and a given clustering model.", formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999)) parser.add_argument('--config', required=False, help='Configuration file') # Specific args of each building block required_args = parser.add_argument_group('required arguments') required_args.add_argument('--input_model_path', required=True, help='Path to the input model. Accepted formats: pkl.') required_args.add_argument('--output_results_path', required=True, help='Path to the output results file. Accepted formats: csv.') parser.add_argument('--input_dataset_path', required=False, help='Path to the dataset to predict. Accepted formats: csv.') args = parser.parse_args() args.config = args.config or "{}" properties = settings.ConfReader(config=args.config).get_prop_dic() # Specific call of each building block clustering_predict(input_model_path=args.input_model_path, output_results_path=args.output_results_path, input_dataset_path=args.input_dataset_path, properties=properties) if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 26796, 7268, 262, 1012, 436, 1586, 47, 17407, 1398, 290, 262, 3141, 1627, 7071, 526, 15931, 198, 11748, 1822, 29572, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 1...
2.916867
830
from sprake import treeviz # we don't actually have any meaningful tests that we can do, but at least # we can do this
[ 198, 6738, 599, 33788, 1330, 5509, 85, 528, 198, 198, 2, 356, 836, 470, 1682, 423, 597, 11570, 5254, 326, 356, 460, 466, 11, 475, 379, 1551, 198, 2, 356, 460, 466, 428, 198 ]
3.558824
34
import sys tmpl = """ #include "yabs_mx_calc_table.h" #include <kernel/matrixnet/mn_sse.h> #include <library/archive/yarchive.h> #include <util/memory/blob.h> #include <util/generic/hash.h> #include <util/generic/ptr.h> #include <util/generic/singleton.h> using namespace NMatrixnet; extern "C" { extern const unsigned char MxFormulas[]; extern const ui32 MxFormulasSize; } namespace { struct TFml: public TBlob, public TMnSseInfo { inline TFml(const TBlob& b) : TBlob(b) , TMnSseInfo(Data(), Size()) { } }; struct TFormulas: public THashMap<size_t, TAutoPtr<TFml>> { inline TFormulas() { TBlob b = TBlob::NoCopy(MxFormulas, MxFormulasSize); TArchiveReader ar(b); %s } inline const TMnSseInfo& at(size_t n) const throw () { return *find(n)->second; } }; %s static func_descr_t yabs_funcs[] = { %s }; } yabs_mx_calc_table_t yabs_mx_calc_table = {YABS_MX_CALC_VERSION, 10000, 0, yabs_funcs}; """ if __name__ == '__main__': init = [] body = [] defs = {} for i in sys.argv[1:]: name = i.replace('.', '_') num = long(name.split('_')[1]) init.append('(*this)[%s] = new TFml(ar.ObjectBlobByKey("%s"));' % (num, '/' + i)) f1 = 'static void yabs_%s(size_t count, const float** args, double* res) {Singleton<TFormulas>()->at(%s).DoCalcRelevs(args, res, count);}' % (name, num) f2 = 'static size_t yabs_%s_factor_count() {return Singleton<TFormulas>()->at(%s).MaxFactorIndex() + 1;}' % (name, num) body.append(f1) body.append(f2) d1 = 'yabs_%s' % name d2 = 'yabs_%s_factor_count' % name defs[num] = '{%s, %s}' % (d1, d2) print tmpl % ('\n'.join(init), '\n\n'.join(body), ',\n'.join((defs.get(i, '{nullptr, nullptr}') for i in range(0, 10000))))
[ 11748, 25064, 198, 198, 17209, 489, 796, 37227, 198, 2, 17256, 366, 88, 8937, 62, 36802, 62, 9948, 66, 62, 11487, 13, 71, 1, 198, 198, 2, 17256, 1279, 33885, 14, 6759, 8609, 3262, 14, 10295, 62, 82, 325, 13, 71, 29, 198, 198, 2,...
2.010438
958