content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# Copyright (c) 2021-Present (Prashanth Pradeep) # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import requests as re import infapy from infapy.exceptions import InvalidDetailsProvided
[ 2, 15069, 357, 66, 8, 33448, 12, 34695, 357, 6836, 1077, 29313, 1736, 671, 538, 8, 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, 1184...
3.869318
176
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making (BlueKing) available. Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://opensource.org/licenses/MIT 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 common.mymako import render_mako_context, render_json from blueking.component.shortcuts import get_client_by_request from django.views.decorators.csrf import csrf_exempt from models import TEST, HostDisk, ScriptExecInfo import json import base64 def home(request): """ """ # yewu = [ # {'id': 1, "name": u"1"}, # {'id': 2, "name": u"2"}, # {'id': 3, "name": u"3"}, # ] # APPrequest client = get_client_by_request(request) kwargs = {} result = client.cc.search_business(kwargs) print(result) yewu = result['data']['info'] return render_mako_context(request, '/home_application/home.html', { "yewu": yewu, "AAA": u"" }) def submit_template(request): """ """ print(request.body) return render_json({"1111111": "dddddddddd"}) def dev_guide(request): """ """ return render_mako_context(request, '/home_application/dev_guide.html') def contactus(request): """ """ return render_mako_context(request, '/home_application/contact.html') # #################### def download_file(request): """ :param request: :return: response """ from django.http import FileResponse # file_name = request.GET.get('filename') fd = open('./' + file_name, 'rb') response = FileResponse(fd) response['Content-Type'] = 'application/octet-stream' response['Content-Disposition'] = 'attachment;filename="%s"' % file_name return response
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 24893, 1087, 318, 10607, 284, 1104, 262, 1280, 2723, 2055, 416, 1642, 357, 14573, 15708, 8, 1695, 13, 198, 15269, 357, 34, 8, 2177, 2320, 43, 317, 1959, 15...
2.586932
903
""" "" `multiprocessing` . """ from multiprocessing import Process import os if __name__ == "__main__": main()
[ 37811, 198, 15931, 220, 198, 63, 16680, 541, 305, 919, 278, 63, 220, 220, 220, 220, 198, 220, 764, 198, 37811, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 198, 11748, 28686, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12...
2.423077
52
__author__ = '@dominofire' import os from sweeper.cloud import resource_config_combinations from sweeper.cloud.localhost import resource_config_factory as config_factory from sweeper.resource import Resource
[ 834, 9800, 834, 796, 705, 31, 3438, 259, 1659, 557, 6, 198, 198, 11748, 28686, 198, 198, 6738, 3490, 5723, 13, 17721, 1330, 8271, 62, 11250, 62, 24011, 7352, 198, 6738, 3490, 5723, 13, 17721, 13, 36750, 1330, 8271, 62, 11250, 62, 69...
3.610169
59
# Copyright 2021 Google LLC. 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. """Tests for tfx.orchestration.experimental.core.service_jobs.""" from absl.testing.absltest import mock import tensorflow as tf from tfx.orchestration.experimental.core import service_jobs from tfx.orchestration.experimental.core import test_utils if __name__ == '__main__': tf.test.main()
[ 2, 15069, 33448, 3012, 11419, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.572
250
from __future__ import absolute_import, division, print_function import matplotlib import numpy as np import os import subprocess import sys import tempfile matplotlib.use('pdf') import matplotlib.pyplot as plt from abc import abstractmethod, ABCMeta from dragonn.metrics import ClassificationResult from sklearn.svm import SVC as scikit_SVC from sklearn.tree import DecisionTreeClassifier as scikit_DecisionTree from sklearn.ensemble import RandomForestClassifier from keras.models import load_model from dragonn.runtime_metrics import * from dragonn.custom_losses import * import warnings warnings.filterwarnings('ignore') class SequenceDNN(Model): """ Sequence DNN models. Parameters ---------- seq_length : int, optional length of input sequence. keras_model : instance of keras.models.Sequential, optional seq_length or keras_model must be specified. num_tasks : int, optional number of tasks. Default: 1. num_filters : list[int] | tuple[int] number of convolutional filters in each layer. Default: (15,). conv_width : list[int] | tuple[int] width of each layer's convolutional filters. Default: (15,). pool_width : int width of max pooling after the last layer. Default: 35. L1 : float strength of L1 penalty. dropout : float dropout probability in every convolutional layer. Default: 0. verbose: int Verbosity level during training. Valida values: 0, 1, 2. Returns ------- Compiled DNN model. """ def get_sequence_filters(self): """ Returns 3D array of 2D sequence filters. """ return self.model.layers[0].get_weights()[0].squeeze(axis=1) def predict(self, X): if self.model_file is None: raise RuntimeError("GkmSvm hasn't been trained!") # write test fasta file test_fname = "%s.test.fa" % self.prefix self.encode_sequence_into_fasta_file(X, test_fname) # test gkmsvm temp_ofp = tempfile.NamedTemporaryFile() threads_option = '-T %s' % (str(self.threads)) command = ' '.join(['gkmpredict', test_fname, self.model_file, temp_ofp.name, threads_option]) process = subprocess.Popen(command, shell=True) process.wait() # wait for it to finish os.system("rm %s" % test_fname) # remove fasta file # get classification results temp_ofp.seek(0) y = np.array([line.split()[-1] for line in temp_ofp], dtype=float) temp_ofp.close() return np.expand_dims(y, 1) class SVC(Model): class DecisionTree(Model): class RandomForest(DecisionTree):
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 11748, 2603, 29487, 8019, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 20218, 7753, 198, ...
2.43958
1,142
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-03-20 08:34 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import parler.models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 940, 319, 2864, 12, 3070, 12, 1238, 8487, 25, 2682, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.813333
75
import logging import random from dgt.graph.graph_matcher import GraphWeightedMatch from dgt.utils import graph_iterations _logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 11748, 4738, 198, 198, 6738, 288, 13655, 13, 34960, 13, 34960, 62, 6759, 2044, 1330, 29681, 25844, 276, 23850, 198, 6738, 288, 13655, 13, 26791, 1330, 4823, 62, 2676, 602, 198, 198, 62, 6404, 1362, 796, 18931, 13, 1...
3.188679
53
import argparse import cv2 import common # from .utils.cropAtCenter import cropImageCenter # from cropAtCenter import cropImageCenter from gabriel_client.websocket_client import WebsocketClient from gabriel_client.opencv_adapter import OpencvAdapter DEFAULT_SERVER_HOST = '128.2.212.50' DEFAULT_ZOOM_FACTOR = 10 if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 11748, 269, 85, 17, 198, 198, 11748, 2219, 198, 2, 422, 764, 26791, 13, 31476, 2953, 23656, 1330, 13833, 5159, 23656, 198, 2, 422, 13833, 2953, 23656, 1330, 13833, 5159, 23656, 198, 198, 6738, 308, 397, 11719, ...
2.887097
124
from api import get_result import os import shutil from glob import glob from PIL import Image if __name__ == '__main__': image_files = glob('./test_images/*.*') result_dir = './test_results' if os.path.exists(result_dir): shutil.rmtree(result_dir) os.mkdir(result_dir) txt_file = os.path.join(result_dir, 'result.txt') txt_f = open(txt_file, 'w') for image_file in sorted(image_files): if ".gitkeep" in image_files: continue print("Finded file", image_file, end=" ") result = get_result(Image.open(image_file)) print(":", result) txt_f.write(image_file.split('/')[-1].split('.')[0] + ':' + result + '\n') txt_f.close()
[ 6738, 40391, 1330, 651, 62, 20274, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 15095, 1330, 15095, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 2939, ...
2.239875
321
# Copyright (C) 2010-2011 Richard Lincoln # # 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 CIM14.ENTSOE.Equipment.Core.IdentifiedObject import IdentifiedObject
[ 2, 15069, 357, 34, 8, 3050, 12, 9804, 6219, 12406, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, 25423, 123...
3.865132
304
from __future__ import unicode_literals
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 628, 198 ]
3.5
12
# Copyright 2020 Curtin University # # 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. # Author: James Diprose import os import unittest from unittest.mock import patch import pendulum from azure.common import AzureMissingResourceHttpError from azure.cosmosdb.table.tableservice import TableService from azure.storage.blob import ContainerProperties from mag_archiver.azure import create_table from mag_archiver.mag import make_mag_query, MagState, MagDateType, MagRelease, MagTask, MagArchiverClient, \ hide_if_not_none
[ 2, 15069, 12131, 19569, 259, 2059, 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, 262, 13789, 13, 198, 2, 921, 743...
3.628975
283
''' Created on Mar 22, 2018 Edited on Jan 11, 2019 @author: npvance2 @author: curtisd2 Variables that will need to be edited/personalized: monitorID in Variables() (line 27) projectStartDate in Variables() (line 28) projectEndDate in Variables() (line 29) authToken in getAuthToken() (line 49) consumer_key in twitterAPI() (line 62) consumer_secret in twitterAPI() (line 63) access_token in twitterAPI() (line 64) access_secret in twitterAPI() (line 65) ''' from datetime import date, timedelta import urllib.request import json import csv import tweepy from tweepy import OAuthHandler ########### # # You'll need to generate your own Crimson API key/token from here: # https://apidocs.crimsonhexagon.com/reference # ########### ########### # # You'll need to add your own Twitter API keys here. # Instructions on generating API keys: https://developer.twitter.com/en/docs/basics/authentication/guides/access-tokens.html # API reference guide: https://developer.twitter.com/en/docs/api-reference-index.html # ########### if __name__ == '__main__': main()
[ 7061, 6, 198, 41972, 319, 1526, 2534, 11, 2864, 198, 45882, 319, 2365, 1367, 11, 13130, 198, 198, 31, 9800, 25, 45941, 19259, 17, 198, 31, 9800, 25, 1090, 83, 9409, 17, 198, 198, 23907, 2977, 326, 481, 761, 284, 307, 13012, 14, 22...
2.871212
396
#! /opt/cloud_sdk/bin/python import asyncio import logging import subprocess import sys import citc_cloud sys.excepthook = handle_exception if __name__ == "__main__": log = logging.getLogger("startnode") log.setLevel(logging.INFO) handler = logging.FileHandler('/var/log/slurm/elastic.log') formatter = logging.Formatter('%(asctime)s %(name)-10s %(levelname)-8s %(message)s') handler.setFormatter(formatter) log.addHandler(handler) loop = asyncio.get_event_loop() try: loop.run_until_complete(main()) finally: loop.close()
[ 2, 0, 1220, 8738, 14, 17721, 62, 21282, 74, 14, 8800, 14, 29412, 198, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 15433, 66, 62, 17721, 628, 628, 198, 17597, 13, 1069, 344, 79, 4...
2.476596
235
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. avzis # orthologue # (c) 1998-2018 all rights reserved # """ Verify that component registration interacts correctly with the pyre configurator model """ # access # print(" -- importing pyre") import pyre # print(" -- done") # main if __name__ == "__main__": test() # end of file
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 285, 40302, 257, 13, 70, 13, 1196, 89, 271, 198, 2, 29617, 39795, 198, 2, 357, 66, 8, 7795, 12, ...
2.789063
128
import asyncio from io import BytesIO import pytest from asyncssh.connection import SSHClientConnection from asyncssh.stream import SSHReader from scrapli.exceptions import ScrapliConnectionNotOpened, ScrapliTimeout def test_write(asyncssh_transport): asyncssh_transport.stdin = BytesIO() asyncssh_transport.write(b"blah") asyncssh_transport.stdin.seek(0) assert asyncssh_transport.stdin.read() == b"blah" def test_write_exception(asyncssh_transport): with pytest.raises(ScrapliConnectionNotOpened): asyncssh_transport.write("blah")
[ 11748, 30351, 952, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 198, 11748, 12972, 9288, 198, 6738, 30351, 45824, 13, 38659, 1330, 33825, 11792, 32048, 198, 6738, 30351, 45824, 13, 5532, 1330, 33825, 33634, 198, 198, 6738, 19320, 489, 7...
2.782609
207
from django.shortcuts import get_object_or_404 import jingo import waffle from django.contrib.auth.models import User from challenges.models import Submission, Category from projects.models import Project from blogs.models import BlogEntry from events.models import Event def splash(request, project, slug, template_name='ignite/splash.html'): """Show an individual project challenge.""" project = get_object_or_404(Project, slug=project) challenge = get_object_or_404(project.challenge_set, slug=slug) num_blogs = 3 # have we announced the winners yet - switch template if waffle.switch_is_active('announce_winners'): template_name = 'ignite/homepage-winners.html' num_blogs = 5 blogs = BlogEntry.objects.filter( page='splash' ).order_by("-updated",)[:num_blogs] # if the dev challenge is open we want to only show dev entries if request.development.is_open: entries = (Submission.objects.visible() .filter(phase__challenge=challenge) .filter(phase__name="Development") .order_by("?")) num_entries = len(entries) entries_from = 'apps' if num_entries < 5: entries = (Submission.objects.visible() .filter(phase__challenge=challenge) .filter(phase__name="Ideation") .order_by("?")) entries_from = 'ideas' else: entries = (Submission.objects.visible() .filter(phase__challenge=challenge) .filter(phase__name="Ideation") .order_by("?")) entries_from = 'ideas' event_list = Event.objects.get_featured()[:5] return jingo.render(request, template_name, { 'challenge': challenge, 'project': project, 'phases': list(enumerate(challenge.phases.all(), start=1)), 'entries': entries[:5], 'categories': Category.objects.all(), 'blogs': blogs, 'event_list': event_list, 'entries_from': entries_from, }) def judges(request, project, slug, template_name='challenges/all_judges.html'): """ List all judges we have in the system """ profiles = [] for judge in User.objects.filter(groups__name='Judges'): profile = judge.get_profile() # we only want to show featured profiles if profile.featured == True: profiles.append(profile) return jingo.render(request, 'ignite/judges.html', { 'profiles': profiles }) def action_unavailable_response(request, message=None, template_name="action_unavailable.html"): """Generic page for unavailable actions""" context = {'message': message} return jingo.render(request, template_name, context, status=403)
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 198, 11748, 474, 32735, 198, 11748, 266, 30697, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 6459, 13, 27530, ...
2.275173
1,301
from plotly.subplots import make_subplots import plotly.graph_objects as go import plotly.io as pio from dataProcessor import parseLabels, parseLangs import plotly.io as pio import os years = parseLabels() langs = parseLangs() #make the plotly results fig = make_subplots( rows=1, cols=2, specs=[[{"type": "xy"}, {"type": "domain"}]], ) fig.add_trace(go.Bar(y = list(langs.values()), x = list(langs.keys()), showlegend=False), row=1, col=1) fig.add_trace(go.Pie(values = list(years.values()), labels = list(years.keys())), row=1, col=2) fig.update_layout(height=600) pio.write_html(fig, 'index.html', auto_open=True)
[ 6738, 7110, 306, 13, 7266, 489, 1747, 1330, 787, 62, 7266, 489, 1747, 198, 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 198, 11748, 7110, 306, 13, 952, 355, 279, 952, 198, 6738, 1366, 18709, 273, 1330, 21136, 17822, 1424, 11, 2...
2.414545
275
# Copyright 2019 BDL Benchmarks Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Diabetic retinopathy diagnosis BDL Benchmark.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import os from typing import Callable from typing import Dict from typing import Optional from typing import Sequence from typing import Text from typing import Tuple from typing import Union import numpy as np import pandas as pd import tensorflow as tf from absl import logging from ..core import transforms from ..core.benchmark import Benchmark from ..core.benchmark import BenchmarkInfo from ..core.benchmark import DataSplits from ..core.constants import DATA_DIR from ..core.levels import Level tfk = tf.keras _DIABETIC_RETINOPATHY_DIAGNOSIS_DATA_DIR = os.path.join( DATA_DIR, "downloads", "manual", "diabetic_retinopathy_diagnosis")
[ 2, 15069, 13130, 347, 19260, 25187, 14306, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 1184...
3.821608
398
# # PySNMP MIB module CXConsoleDriver-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CXConsoleDriver-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:32:28 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) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion") cxConsoleDriver, = mibBuilder.importSymbols("CXProduct-SMI", "cxConsoleDriver") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Counter64, Gauge32, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Unsigned32, Integer32, ModuleIdentity, NotificationType, ObjectIdentity, MibIdentifier, Counter32, iso, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "Gauge32", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Unsigned32", "Integer32", "ModuleIdentity", "NotificationType", "ObjectIdentity", "MibIdentifier", "Counter32", "iso", "Bits") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") cxCdBaudRate = MibScalar((1, 3, 6, 1, 4, 1, 495, 2, 1, 5, 6, 1), Integer32().clone(9600)).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCdBaudRate.setStatus('mandatory') if mibBuilder.loadTexts: cxCdBaudRate.setDescription('Determines the baud rate of the console port. The setting of this object is dynamic. The console port immediately implements the option you enter. Options: 9600 19200 38400 115200 Default Value: 9600 Configuration Changed: operative') cxCdCharSize = MibScalar((1, 3, 6, 1, 4, 1, 495, 2, 1, 5, 6, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(7, 8)).clone(8)).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCdCharSize.setStatus('mandatory') if mibBuilder.loadTexts: cxCdCharSize.setDescription('Determines how many bits constitute a character for the console port. Options: none - the value is fixed at 8 Default Value: 8 Configuration Changed: none ') cxCdParity = MibScalar((1, 3, 6, 1, 4, 1, 495, 2, 1, 5, 6, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("noParity", 1), ("evenParity", 2), ("oddParity", 3))).clone('noParity')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCdParity.setStatus('mandatory') if mibBuilder.loadTexts: cxCdParity.setDescription('Determines the parity scheme the CPU uses to validate the characters it receives through the console port. Options: none - the value is fixed at noParity Default Value: noParity Configuration Changed: none ') cxCdStopBit = MibScalar((1, 3, 6, 1, 4, 1, 495, 2, 1, 5, 6, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCdStopBit.setStatus('mandatory') if mibBuilder.loadTexts: cxCdStopBit.setDescription('Determines how many stop bits are at the end of each character the console port receives. Options: none - the value is fixed at 1 Default Value: 1 Configuration Changed: none ') cxCdProtocol = MibScalar((1, 3, 6, 1, 4, 1, 495, 2, 1, 5, 6, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("localConsole", 1), ("ppp", 2))).clone('localConsole')).setMaxAccess("readwrite") if mibBuilder.loadTexts: cxCdProtocol.setStatus('mandatory') if mibBuilder.loadTexts: cxCdProtocol.setDescription('Determines the protocol (configuration method) for the console port. The setting of this object is dynamic. The console port immediately implements the option you enter. However, if you change the protocol you are currently using to configure the port your connection will be lost. Options: localConsole (1): you use this protocol when you attach a TTY terminal directly to the console port. This protocol requires you to use command line configuration. You also must enter a password to gain access to the configuration tables. You can define the password using the object uiPassword of the CXUserInterface Table. ppp (2): you use this protocol when you are configuring via a windows-based application such as HP/OV (Hewlett Packard-OpenView). Default Value: ppp (2) Configuration Changed: operative') mibBuilder.exportSymbols("CXConsoleDriver-MIB", cxCdParity=cxCdParity, cxCdProtocol=cxCdProtocol, cxCdBaudRate=cxCdBaudRate, cxCdStopBit=cxCdStopBit, cxCdCharSize=cxCdCharSize)
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 327, 55, 47581, 32103, 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, 47562...
3.073354
1,595
# coding:utf-8 import datetime import json import re import redis from config.conf import get_redis_args redis_args = get_redis_args()
[ 2, 19617, 25, 40477, 12, 23, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 302, 198, 198, 11748, 2266, 271, 198, 6738, 4566, 13, 10414, 1330, 651, 62, 445, 271, 62, 22046, 198, 198, 445, 271, 62, 22046, 796, 651, 62, 445, ...
2.857143
49
import base64 import logging import msgpack logger = logging.getLogger(__name__) loadargs = {'use_list': False, 'raw': False} if msgpack.version < (1, 0, 0): loadargs['encoding'] = 'utf-8' else: loadargs['strict_map_key'] = False VSIG = b'MSGVIV'.ljust(8, b'\x00')
[ 11748, 2779, 2414, 198, 11748, 18931, 198, 198, 11748, 31456, 8002, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 2220, 22046, 796, 1391, 6, 1904, 62, 4868, 10354, 10352, 11, 705, 1831, 10354...
2.378151
119
"""This forms the core of the pytest plugin.""" import pytest import testing.postgresql from pytest_pgsql import database from pytest_pgsql import ext def pytest_addoption(parser): """Add configuration options for pytest_pgsql.""" parser.addoption( '--pg-extensions', action='store', default='', help="A comma-separated list of PostgreSQL extensions to install at " "the beginning of the session for use by all tests. Example: " "--pg-extensions=uuid-ossp,pg_tgrm,pgcrypto") parser.addoption( '--pg-work-mem', type=int, default=32, help='Set the value of the `work_mem` setting, in megabytes. ' '`pytest_pgsql` defaults to 32. Adjusting this up or down can ' 'help performance; see the Postgres documentation for more details.') parser.addoption( '--pg-conf-opt', action='append', help='Add a key=value line that will be appended to postgresql.conf') #: A SQLAlchemy engine shared by the transacted and non-transacted database fixtures. #: #: .. seealso:: `pytest_pgsql.ext.create_engine_fixture` # pylint: disable=invalid-name pg_engine = ext.create_engine_fixture('pg_engine', scope='session') # pylint: enable=invalid-name # pylint: disable=invalid-name #: Create a test database instance and cleans up after each test finishes. #: #: You should prefer the `transacted_postgresql_db` fixture unless your test #: cannot be run in a single transaction. The `transacted_postgresql_db` fixture #: leads to faster tests since it doesn't tear down the entire database between #: each test. postgresql_db = \ database.PostgreSQLTestDB.create_fixture('postgresql_db') #: Create a test database instance that rolls back the current transaction after #: each test finishes, verifying its integrity before returning. #: #: Read the warning in the main documentation page before using this fixture. transacted_postgresql_db = \ database.TransactedPostgreSQLTestDB.create_fixture('transacted_postgresql_db') # pylint: enable=invalid-name
[ 37811, 1212, 5107, 262, 4755, 286, 262, 12972, 9288, 13877, 526, 15931, 198, 198, 11748, 12972, 9288, 198, 11748, 4856, 13, 7353, 34239, 13976, 198, 198, 6738, 12972, 9288, 62, 6024, 25410, 1330, 6831, 198, 6738, 12972, 9288, 62, 6024, ...
2.988439
692
# written by abraham on aug 24
[ 2, 3194, 416, 450, 13220, 319, 16339, 1987, 628 ]
3.555556
9
import glob from os import walk exclude_folders = [ 'node_modules', 'ios', 'android', '__pycache__' ] exclude_files = [ 'json', 'txt', 'traineddata', 'lstmf', 'yml', 'md' 'log', 'env', 'gitignore', 'dockerignore' ] # get all files in directory dirr = '/home/viktor/Documents/personal-expenses-accounting/app/services/web_service/' folders = glob.glob(dirr + '/**/', recursive=True) # only app related directories directories = [] for folder in folders: current_folder = folder.split('/')[-2] if current_folder not in exclude_folders: files = glob.glob(folder + '*') print(files) directories.append(folder) # num_lines = sum(1 for line in open('myfile.txt'))
[ 11748, 15095, 198, 6738, 28686, 1330, 2513, 198, 198, 1069, 9152, 62, 11379, 364, 796, 685, 198, 220, 220, 220, 705, 17440, 62, 18170, 3256, 198, 220, 220, 220, 705, 4267, 3256, 198, 220, 220, 220, 705, 19411, 3256, 198, 220, 220, 2...
2.394904
314
from models.contact import Contact testdata = [Contact(first_name="Firstname", last_name="Lastname", mobile_phone="+12345678", work_phone="12345", home_phone="67890", fax="55443322", email_1="email_1@email.com", email_2="email_2@email.com", email_3="email_3@email.com", address="Street, 15 \n 12345 New-York")]
[ 198, 6738, 4981, 13, 32057, 1330, 14039, 198, 198, 9288, 7890, 796, 685, 17829, 7, 11085, 62, 3672, 2625, 5962, 3672, 1600, 938, 62, 3672, 2625, 5956, 3672, 1600, 5175, 62, 4862, 2625, 10, 10163, 2231, 30924, 1600, 198, 220, 220, 220,...
1.985437
206
# Copyright 2014-2015 Canonical Limited. # # 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. """Compatibility with the nrpe-external-master charm""" # Copyright 2012 Canonical Ltd. # # Authors: # Matthew Wedgwood <matthew.wedgwood@canonical.com> import subprocess import pwd import grp import os import glob import shutil import re import shlex import yaml from charmhelpers.core.hookenv import ( config, hook_name, local_unit, log, relation_get, relation_ids, relation_set, relations_of_type, ) from charmhelpers.core.host import service from charmhelpers.core import host # This module adds compatibility with the nrpe-external-master and plain nrpe # subordinate charms. To use it in your charm: # # 1. Update metadata.yaml # # provides: # (...) # nrpe-external-master: # interface: nrpe-external-master # scope: container # # and/or # # provides: # (...) # local-monitors: # interface: local-monitors # scope: container # # 2. Add the following to config.yaml # # nagios_context: # default: "juju" # type: string # description: | # Used by the nrpe subordinate charms. # A string that will be prepended to instance name to set the host name # in nagios. So for instance the hostname would be something like: # juju-myservice-0 # If you're running multiple environments with the same services in them # this allows you to differentiate between them. # nagios_servicegroups: # default: "" # type: string # description: | # A comma-separated list of nagios servicegroups. # If left empty, the nagios_context will be used as the servicegroup # # 3. Add custom checks (Nagios plugins) to files/nrpe-external-master # # 4. Update your hooks.py with something like this: # # from charmsupport.nrpe import NRPE # (...) # def update_nrpe_config(): # nrpe_compat = NRPE() # nrpe_compat.add_check( # shortname = "myservice", # description = "Check MyService", # check_cmd = "check_http -w 2 -c 10 http://localhost" # ) # nrpe_compat.add_check( # "myservice_other", # "Check for widget failures", # check_cmd = "/srv/myapp/scripts/widget_check" # ) # nrpe_compat.write() # # def config_changed(): # (...) # update_nrpe_config() # # def nrpe_external_master_relation_changed(): # update_nrpe_config() # # def local_monitors_relation_changed(): # update_nrpe_config() # # 4.a If your charm is a subordinate charm set primary=False # # from charmsupport.nrpe import NRPE # (...) # def update_nrpe_config(): # nrpe_compat = NRPE(primary=False) # # 5. ln -s hooks.py nrpe-external-master-relation-changed # ln -s hooks.py local-monitors-relation-changed def get_nagios_hostcontext(relation_name='nrpe-external-master'): """ Query relation with nrpe subordinate, return the nagios_host_context :param str relation_name: Name of relation nrpe sub joined to """ for rel in relations_of_type(relation_name): if 'nagios_host_context' in rel: return rel['nagios_host_context'] def get_nagios_hostname(relation_name='nrpe-external-master'): """ Query relation with nrpe subordinate, return the nagios_hostname :param str relation_name: Name of relation nrpe sub joined to """ for rel in relations_of_type(relation_name): if 'nagios_hostname' in rel: return rel['nagios_hostname'] def get_nagios_unit_name(relation_name='nrpe-external-master'): """ Return the nagios unit name prepended with host_context if needed :param str relation_name: Name of relation nrpe sub joined to """ host_context = get_nagios_hostcontext(relation_name) if host_context: unit = "%s:%s" % (host_context, local_unit()) else: unit = local_unit() return unit def add_init_service_checks(nrpe, services, unit_name, immediate_check=True): """ Add checks for each service in list :param NRPE nrpe: NRPE object to add check to :param list services: List of services to check :param str unit_name: Unit name to use in check description :param bool immediate_check: For sysv init, run the service check immediately """ for svc in services: # Don't add a check for these services from neutron-gateway if svc in ['ext-port', 'os-charm-phy-nic-mtu']: next upstart_init = '/etc/init/%s.conf' % svc sysv_init = '/etc/init.d/%s' % svc if host.init_is_systemd(): nrpe.add_check( shortname=svc, description='process check {%s}' % unit_name, check_cmd='check_systemd.py %s' % svc ) elif os.path.exists(upstart_init): nrpe.add_check( shortname=svc, description='process check {%s}' % unit_name, check_cmd='check_upstart_job %s' % svc ) elif os.path.exists(sysv_init): cronpath = '/etc/cron.d/nagios-service-check-%s' % svc checkpath = '%s/service-check-%s.txt' % (nrpe.homedir, svc) croncmd = ( '/usr/local/lib/nagios/plugins/check_exit_status.pl ' '-e -s /etc/init.d/%s status' % svc ) cron_file = '*/5 * * * * root %s > %s\n' % (croncmd, checkpath) f = open(cronpath, 'w') f.write(cron_file) f.close() nrpe.add_check( shortname=svc, description='service check {%s}' % unit_name, check_cmd='check_status_file.py -f %s' % checkpath, ) # if /var/lib/nagios doesn't exist open(checkpath, 'w') will fail # (LP: #1670223). if immediate_check and os.path.isdir(nrpe.homedir): f = open(checkpath, 'w') subprocess.call( croncmd.split(), stdout=f, stderr=subprocess.STDOUT ) f.close() os.chmod(checkpath, 0o644) def copy_nrpe_checks(nrpe_files_dir=None): """ Copy the nrpe checks into place """ NAGIOS_PLUGINS = '/usr/local/lib/nagios/plugins' if nrpe_files_dir is None: # determine if "charmhelpers" is in CHARMDIR or CHARMDIR/hooks for segment in ['.', 'hooks']: nrpe_files_dir = os.path.abspath(os.path.join( os.getenv('CHARM_DIR'), segment, 'charmhelpers', 'contrib', 'openstack', 'files')) if os.path.isdir(nrpe_files_dir): break else: raise RuntimeError("Couldn't find charmhelpers directory") if not os.path.exists(NAGIOS_PLUGINS): os.makedirs(NAGIOS_PLUGINS) for fname in glob.glob(os.path.join(nrpe_files_dir, "check_*")): if os.path.isfile(fname): shutil.copy2(fname, os.path.join(NAGIOS_PLUGINS, os.path.basename(fname))) def add_haproxy_checks(nrpe, unit_name): """ Add checks for each service in list :param NRPE nrpe: NRPE object to add check to :param str unit_name: Unit name to use in check description """ nrpe.add_check( shortname='haproxy_servers', description='Check HAProxy {%s}' % unit_name, check_cmd='check_haproxy.sh') nrpe.add_check( shortname='haproxy_queue', description='Check HAProxy queue depth {%s}' % unit_name, check_cmd='check_haproxy_queue_depth.sh')
[ 2, 15069, 1946, 12, 4626, 19507, 605, 15302, 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, 262, 13789, 13, 19...
2.2171
3,731
"""Implements the generic progress logger class, and the ProgressBar class. """ from tqdm import tqdm, tqdm_notebook from collections import OrderedDict import time SETTINGS = { 'notebook': False } def default_bar_logger(logger, bars=None, ignored_bars=None, logged_bars='all', min_time_interval=0, ignore_bars_under=0): if logger == 'bar': return TqdmProgressBarLogger( bars=bars, ignored_bars=ignored_bars, logged_bars=logged_bars, min_time_interval=min_time_interval, ignore_bars_under=ignore_bars_under ) elif logger is None: return MuteProgressBarLogger() else: return logger
[ 37811, 3546, 1154, 902, 262, 14276, 4371, 49706, 1398, 11, 290, 262, 18387, 10374, 1398, 13, 198, 37811, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 11, 256, 80, 36020, 62, 11295, 2070, 198, 6738, 17268, 1330, 14230, 1068, 3...
2.241379
319
import gdsfactory as gf from gdsfactory.component import Component yaml = """ name: test_component_yaml_without_cell instances: mmi: component: mmi1x2 bend: component: bend_s connections: bend,o1: mmi,o2 """ def test_component_from_yaml_without_cell() -> Component: """bezier does not have cell""" c = gf.read.from_yaml(yaml) assert c.name == "test_component_yaml_without_cell", c.name assert len(c.get_dependencies()) == 2, len(c.get_dependencies()) assert len(c.ports) == 0, len(c.ports) return c if __name__ == "__main__": c = test_component_from_yaml_without_cell() print(c.name) c.show()
[ 11748, 308, 9310, 69, 9548, 355, 308, 69, 198, 6738, 308, 9310, 69, 9548, 13, 42895, 1330, 35100, 198, 198, 88, 43695, 796, 37227, 198, 3672, 25, 198, 220, 220, 220, 1332, 62, 42895, 62, 88, 43695, 62, 19419, 62, 3846, 198, 198, 8...
2.358156
282
from pathlib import Path from types import GeneratorType from typing import AsyncIterable, Iterable, TypeAlias import ujson from cats.errors import MalformedHeadersError try: from django.db.models import QuerySet, Model except ImportError: QuerySet = type('QuerySet', (list,), {}) Model = type('Model', (list,), {}) __all__ = [ 'Bytes', 'BytesGen', 'BytesAsyncGen', 'BytesAnyGen', 'Byte', 'Json', 'File', 'List', 'Missing', 'MISSING', 'QuerySet', 'Model', 'T_Headers', 'Headers', ] Bytes: TypeAlias = bytes | bytearray | memoryview BytesGen: TypeAlias = Iterable[Bytes] BytesAsyncGen: TypeAlias = AsyncIterable[Bytes] BytesAnyGen: TypeAlias = BytesGen | BytesAsyncGen Byte: TypeAlias = Bytes Json: TypeAlias = str | int | float | dict | list | bool | None File: TypeAlias = Path | str List = list | tuple | set | GeneratorType | QuerySet MISSING = Missing() T_Headers: TypeAlias = Headers | dict[str]
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 3858, 1330, 35986, 6030, 198, 6738, 19720, 1330, 1081, 13361, 29993, 540, 11, 40806, 540, 11, 5994, 40489, 198, 198, 11748, 334, 17752, 198, 198, 6738, 11875, 13, 48277, 1330, 4434, 12214, 13847, ...
2.725
360
from __future__ import absolute_import try: import urlparse as _urlparse except ImportError: from urllib import parse as _urlparse urlparse = _urlparse.urlparse
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 19016, 29572, 355, 4808, 6371, 29572, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 2956, 297, 571, 1330, 21136, 355, 4808, 6371, ...
3.107143
56
import setuptools setuptools.setup( name="monet_memory_optimized_training", version="0.0.1", description="Memory Optimized Network Training Framework", url="https://github.com/philkr/lowrank_conv", packages=setuptools.find_packages(include = ['monet', 'monet.*', 'models', 'checkmate', 'gist']), classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], python_requires='>=3.6', )
[ 11748, 900, 37623, 10141, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, 220, 220, 220, 1438, 2625, 2144, 316, 62, 31673, 62, 40085, 1143, 62, 34409, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 15, 13, 16, 1600, 198, 220, 220, ...
2.701571
191
# -*- coding: utf-8 -*- """ @date Created on Thu Dec 18 13:56:33 2014 @copyright (C) 2014-2015 EOMYS ENGINEERING. @author pierre_b """ from unittest import TestCase from ddt import ddt, data from pyleecan.Classes.Arc1 import Arc1 from pyleecan.Classes.Segment import Segment from pyleecan.Classes.MagnetType11 import MagnetType11 from pyleecan.Classes.LamSlotMag import LamSlotMag from pyleecan.Classes.SlotMPolar import SlotMPolar from numpy import pi, exp, angle, array from pyleecan.Methods.Machine.Magnet.comp_surface import comp_surface Mag11_test = list() # Internal Slot surface lam = LamSlotMag(is_internal=True, Rext=0.5) lam.slot = SlotMPolar(H0=0, W0=pi / 4, Zs=4) lam.slot.magnet = [MagnetType11(Hmag=1, Wmag=pi / 4)] Mag11_test.append({"test_obj": lam, "S_exp": 0.78539616, "Ao": pi / 4, "H_exp": 1}) # Internal Slot inset lam = LamSlotMag(is_internal=True, Rext=0.5) lam.slot = SlotMPolar(H0=40e-3, W0=pi / 4, Zs=4) lam.slot.magnet = [MagnetType11(Hmag=20e-3, Wmag=pi / 4)] Mag11_test.append({"test_obj": lam, "S_exp": 7.3827e-3, "Ao": pi / 4, "H_exp": 20e-3}) # Outward Slot inset lam = LamSlotMag(is_internal=False, Rext=0.1325) lam.slot = SlotMPolar(H0=5e-3, W0=pi / 10, Zs=8) lam.slot.magnet = [MagnetType11(Hmag=8e-3, Wmag=pi / 12)] Mag11_test.append({"test_obj": lam, "S_exp": 2.09439e-6, "Ao": pi / 12, "H_exp": 8e-3}) # For AlmostEqual DELTA = 1e-4
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 4475, 15622, 319, 26223, 4280, 1248, 1511, 25, 3980, 25, 2091, 1946, 198, 31, 22163, 4766, 357, 34, 8, 1946, 12, 4626, 412, 2662, 16309, 36924, 8881, 1...
2.29402
602
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ from operator import mod from tomo_encoders.misc.voxel_processing import modified_autocontrast, TimerGPU from tomo_encoders.reconstruction.recon import recon_patches_3d import cupy as cp import numpy as np from skimage.filters import threshold_otsu from tomo_encoders import Grid def segment_otsu(vol, s = 0.05): '''segment volume with otsu''' timer = TimerGPU() timer.tic() tmp_values = vol[::4,::4,::4].get() # rec_min_max = modified_autocontrast(tmp_values, s = s, normalize_sampling_factor=1) thresh = cp.float32(threshold_otsu(tmp_values.reshape(-1))) vol = (vol < thresh).astype(cp.uint8) timer.toc("otsu thresholding") return vol def edge_map(Y): ''' this algorithm was inspired by: https://github.com/tomochallenge/tomochallenge_utils/blob/master/foam_phantom_utils.py ''' msk = cp.zeros_like(Y) tmp = Y[:-1]!=Y[1:] msk[:-1][tmp] = 1 msk[1:][tmp] = 1 tmp = Y[:,:-1]!=Y[:,1:] msk[:,:-1][tmp] = 1 msk[:,1:][tmp] = 1 tmp = Y[:,:,:-1]!=Y[:,:,1:] msk[:,:,:-1][tmp] = 1 msk[:,:,1:][tmp] = 1 return msk > 0
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 220, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 220, 198, 37811, 220, 198, 37811, 220, 198, 6738, 10088, 1330, 953, 198, 6738, 284, 5908, 62, 12685, 375, 364, 13...
2.168807
545
# Generated by Django 2.2.1 on 2019-06-22 11:03 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 16, 319, 13130, 12, 3312, 12, 1828, 1367, 25, 3070, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# -*- coding: UTF-8 -*- import json from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt import tushare as ts from .publiceClass import DateEncoder
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 33571, 13, 12501, 273, 2024, 13, 6359, 41871, 1330, 269, 27891, 69, 62,...
2.921875
64
from mock import patch, MagicMock from django.contrib.auth.models import User from django.test import TestCase from django.core.urlresolvers import reverse from django.utils.datastructures import MultiValueDictKeyError from account.models import Role, Team, Organization from physical.tests.factory import EnvironmentFactory, PlanFactory from physical.models import Plan
[ 6738, 15290, 1330, 8529, 11, 6139, 44, 735, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 6...
3.895833
96
# Generated by Django 3.1.4 on 2021-05-05 21:16 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 19, 319, 33448, 12, 2713, 12, 2713, 2310, 25, 1433, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
#!/usr/bin/python3 """ Good morning! Here's your coding interview problem for today. This problem was recently asked by Google. Given a list of numbers and a number k, return whether any two numbers from the list add up to k. For example, given [10, 15, 3, 7] and k of 17, return true since 10 + 7 is 17. Bonus: Can you do this in one pass? """ print(func([10, 15, 3, 7], 17))
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 37811, 198, 10248, 3329, 0, 3423, 338, 534, 19617, 2720, 1917, 329, 1909, 13, 198, 198, 1212, 1917, 373, 2904, 1965, 416, 3012, 13, 198, 198, 15056, 257, 1351, 286, 3146, 290, 257, 1271...
3.237288
118
import json import setuptools with open("template/README.md", "r") as fh: long_description = fh.read() with open('requirements.txt') as fr: requirements = fr.read().strip().split('\n') with open('metadata.json') as fr: metadata = json.load(fr) setuptools.setup( name="", # Name of the repository version="0.0.1", author=metadata.get("author", ""), author_email=metadata.get("author_email", ""), description=metadata.get("description", ""), long_description=long_description, long_description_content_type="text/markdown", url="", # Repository URL or externally maintained page packages=setuptools.find_packages(), python_requires='>=3.6', install_requires=requirements, )
[ 11748, 33918, 198, 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 28243, 14, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 4480, 1280...
2.833977
259
""" @Time : 201/21/19 10:41 @Author : TaylorMei @Email : mhy845879017@gmail.com @Project : iccv @File : train_base3.py @Function: """ import datetime import os import torch from torch import nn from torch import optim from torch.autograd import Variable from torch.backends import cudnn from torch.utils.data import DataLoader from torchvision import transforms from tensorboardX import SummaryWriter from tqdm import tqdm import joint_transforms from config import msd_training_root from config import backbone_path from dataset import ImageFolder from misc import AvgMeter, check_mkdir from model.base3 import BASE3 import loss as L cudnn.benchmark = True device_ids = [2] ckpt_path = './ckpt' exp_name = 'BASE3' args = { 'epoch_num': 100, 'train_batch_size': 14, 'last_epoch': 0, 'lr': 5e-3, 'lr_decay': 0.9, 'weight_decay': 5e-4, 'momentum': 0.9, 'snapshot': '', 'scale': 384, 'save_point': [60, 80, 90], 'add_graph': True, 'poly_train': True, 'optimizer': 'SGD' } # Path. check_mkdir(ckpt_path) check_mkdir(os.path.join(ckpt_path, exp_name)) vis_path = os.path.join(ckpt_path, exp_name, 'log') check_mkdir(vis_path) log_path = os.path.join(ckpt_path, exp_name, str(datetime.datetime.now()) + '.txt') writer = SummaryWriter(log_dir=vis_path, comment=exp_name) # Transform Data. joint_transform = joint_transforms.Compose([ joint_transforms.RandomRotate(), joint_transforms.Resize((args['scale'], args['scale'])) ]) img_transform = transforms.Compose([ transforms.ToTensor(), transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]) # maybe can optimized. ]) target_transform = transforms.ToTensor() # Prepare Data Set. train_set = ImageFolder(msd_training_root, joint_transform, img_transform, target_transform) print("Train set: {}".format(train_set.__len__())) train_loader = DataLoader(train_set, batch_size=args['train_batch_size'], num_workers=0, shuffle=True) if __name__ == '__main__': main()
[ 37811, 198, 2488, 7575, 220, 220, 220, 1058, 580, 14, 2481, 14, 1129, 838, 25, 3901, 198, 2488, 13838, 220, 1058, 8121, 5308, 72, 198, 2488, 15333, 220, 220, 1058, 285, 12114, 23, 29334, 3720, 29326, 31, 14816, 13, 785, 198, 220, 19...
2.619974
771
import unittest from app.models import Comment, Pitch from app import db
[ 11748, 555, 715, 395, 198, 6738, 598, 13, 27530, 1330, 18957, 11, 33517, 198, 6738, 598, 1330, 20613 ]
4
18
from django.shortcuts import render from django.http import HttpResponse from django.contrib.auth.decorators import login_required from django.views.decorators.csrf import csrf_exempt from django.template import loader from django.db import connection from django.http import HttpResponseRedirect import datetime from django.http import JsonResponse from administrator.models import Course, CourseTeacher, CourseStudent, Student from django.core.exceptions import PermissionDenied
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, ...
3.730769
130
import logging import pytest import re from . import text from ... import matchers from ...utils import answer, SimpleTrigger logger = logging.getLogger(__name__) def test_serialize_text_any(): m_old = text.Any() m_new = matchers.deserialize(matchers.serialize(m_old)) assert isinstance(m_new, text.Any) def test_serialize_text_match(): m_old = text.Match('hello (.*)', re.IGNORECASE) m_new = matchers.deserialize(matchers.serialize(m_old)) assert isinstance(m_new, text.Match) assert m_new.matcher.match('Hello Piter!') def test_text_qual_should_handle_text(): assert isinstance(matchers.get_validator('just pure text'), text.Equal)
[ 11748, 18931, 198, 11748, 12972, 9288, 198, 11748, 302, 198, 6738, 764, 1330, 2420, 198, 6738, 2644, 1330, 2603, 3533, 198, 6738, 2644, 26791, 1330, 3280, 11, 17427, 48344, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834...
2.718254
252
"""Objects representing API interface to Wikibase site.""" # # (C) Pywikibot team, 2012-2022 # # Distributed under the terms of the MIT license. # import datetime import json import uuid from contextlib import suppress from typing import Optional from warnings import warn import pywikibot from pywikibot.data import api from pywikibot.exceptions import ( APIError, EntityTypeUnknownError, IsRedirectPageError, NoPageError, NoWikibaseEntityError, ) from pywikibot.site._apisite import APISite from pywikibot.site._decorators import need_extension, need_right, need_version from pywikibot.tools import itergroup, merge_unique_dicts, remove_last_args __all__ = ('DataSite', ) def geo_shape_repository(self): """Return Site object for the geo-shapes repository e.g. commons.""" url = self.siteinfo['general'].get('wikibase-geoshapestoragebaseurl') if url: return pywikibot.Site(url=url, user=self.username()) return None def tabular_data_repository(self): """Return Site object for the tabular-datas repository e.g. commons.""" url = self.siteinfo['general'].get( 'wikibase-tabulardatastoragebaseurl') if url: return pywikibot.Site(url=url, user=self.username()) return None def loadcontent(self, identification, *props): """ Fetch the current content of a Wikibase item. This is called loadcontent since wbgetentities does not support fetching old revisions. Eventually this will get replaced by an actual loadrevisions. :param identification: Parameters used to identify the page(s) :type identification: dict :param props: the optional properties to fetch. """ params = merge_unique_dicts(identification, action='wbgetentities', # TODO: When props is empty it results in # an empty string ('&props=') but it should # result in a missing entry. props=props if props else False) req = self.simple_request(**params) data = req.submit() if 'success' not in data: raise APIError(data['errors'], '') return data['entities'] def preload_entities(self, pagelist, groupsize: int = 50): """ Yield subclasses of WikibaseEntity's with content prefilled. Note that pages will be iterated in a different order than in the underlying pagelist. :param pagelist: an iterable that yields either WikibaseEntity objects, or Page objects linked to an ItemPage. :param groupsize: how many pages to query at a time """ if not hasattr(self, '_entity_namespaces'): self._cache_entity_namespaces() for sublist in itergroup(pagelist, groupsize): req = {'ids': [], 'titles': [], 'sites': []} for p in sublist: if isinstance(p, pywikibot.page.WikibaseEntity): ident = p._defined_by() for key in ident: req[key].append(ident[key]) else: if p.site == self and p.namespace() in ( self._entity_namespaces.values()): req['ids'].append(p.title(with_ns=False)) else: assert p.site.has_data_repository, \ 'Site must have a data repository' req['sites'].append(p.site.dbName()) req['titles'].append(p._link._text) req = self.simple_request(action='wbgetentities', **req) data = req.submit() for entity in data['entities']: if 'missing' in data['entities'][entity]: continue cls = self._type_to_class[data['entities'][entity]['type']] page = cls(self, entity) # No api call is made because item._content is given page._content = data['entities'][entity] with suppress(IsRedirectPageError): page.get() # cannot provide get_redirect=True (T145971) yield page def getPropertyType(self, prop): """ Obtain the type of a property. This is used specifically because we can cache the value for a much longer time (near infinite). """ params = {'action': 'wbgetentities', 'ids': prop.getID(), 'props': 'datatype'} expiry = datetime.timedelta(days=365 * 100) # Store it for 100 years req = self._request(expiry=expiry, parameters=params) data = req.submit() # the IDs returned from the API can be upper or lowercase, depending # on the version. See bug T55894 for more information. try: dtype = data['entities'][prop.getID()]['datatype'] except KeyError: dtype = data['entities'][prop.getID().lower()]['datatype'] return dtype def search_entities(self, search: str, language: str, total: Optional[int] = None, **kwargs): """ Search for pages or properties that contain the given text. :param search: Text to find. :param language: Language to search in. :param total: Maximum number of pages to retrieve in total, or None in case of no limit. :return: 'search' list from API output. :rtype: Generator """ lang_codes = self._paraminfo.parameter('wbsearchentities', 'language')['type'] if language not in lang_codes: raise ValueError('Data site used does not support provided ' 'language.') if 'site' in kwargs: if kwargs['site'].sitename != self.sitename: raise ValueError('The site given in the kwargs is different.') warn('search_entities should not get a site via kwargs.', UserWarning, 2) del kwargs['site'] parameters = dict(search=search, language=language, **kwargs) gen = self._generator(api.APIGenerator, type_arg='wbsearchentities', data_name='search', total=total, parameters=parameters) return gen def wbsetaliases(self, itemdef, aliases, **kwargs): """ Set aliases for a single Wikibase entity. See self._wbset_action() for parameters """ return self._wbset_action(itemdef, 'wbsetaliases', aliases, **kwargs) def wbsetdescription(self, itemdef, description, **kwargs): """ Set description for a single Wikibase entity. See self._wbset_action() """ return self._wbset_action(itemdef, 'wbsetdescription', description, **kwargs) def wbsetlabel(self, itemdef, label, **kwargs): """ Set label for a single Wikibase entity. See self._wbset_action() for parameters """ return self._wbset_action(itemdef, 'wbsetlabel', label, **kwargs) def wbsetsitelink(self, itemdef, sitelink, **kwargs): """ Set, remove or modify a sitelink on a Wikibase item. See self._wbset_action() for parameters """ return self._wbset_action(itemdef, 'wbsetsitelink', sitelink, **kwargs)
[ 37811, 10267, 82, 10200, 7824, 7071, 284, 11145, 571, 589, 2524, 526, 15931, 198, 2, 198, 2, 357, 34, 8, 9485, 20763, 571, 313, 1074, 11, 2321, 12, 1238, 1828, 198, 2, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 17168, 5964, 13,...
2.179253
3,509
from flask import Flask from flask import render_template, request from flask import jsonify import requests import json app = Flask(__name__) app.run(debug=True)
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 2581, 220, 198, 6738, 42903, 1330, 33918, 1958, 198, 11748, 7007, 198, 11748, 33918, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 1324, 13, 5143, 7, 2444...
3.666667
45
from pyspark.sql import SparkSession # spark = SparkSession.builder.master("local[*]").getOrCreate() spark = SparkSession.builder.getOrCreate() file_path = "C:\home_work\local_github\Spark-The-Definitive-Guide\data\/flight-data\csv\/2015-summary.csv" # COMMAND ---------- # COMMAND ---------- flightData2015 = spark\ .read\ .option("inferSchema", "true")\ .option("header", "true")\ .csv("./data/flight-data/csv/2015-summary.csv") # COMMAND ---------- flightData2015.createOrReplaceTempView("flight_data_2015") # COMMAND ---------- sqlWay = spark.sql(""" SELECT DEST_COUNTRY_NAME, count(1) FROM flight_data_2015 GROUP BY DEST_COUNTRY_NAME """) dataFrameWay = flightData2015\ .groupBy("DEST_COUNTRY_NAME")\ .count() sqlWay.explain() dataFrameWay.explain() # COMMAND ---------- from pyspark.sql.functions import max, col # flightData2015.select(max(col("count"))).show(1) # COMMAND ---------- maxSql = spark.sql(""" SELECT DEST_COUNTRY_NAME, sum(count) as destination_total FROM flight_data_2015 GROUP BY DEST_COUNTRY_NAME ORDER BY sum(count) DESC LIMIT 5 """) maxSql.show() # COMMAND ---------- from pyspark.sql.functions import desc flightData2015\ .groupBy("DEST_COUNTRY_NAME")\ .sum("count")\ .withColumnRenamed("sum(count)", "destination_total")\ .sort(desc("destination_total"))\ .limit(5)\ .show() # COMMAND ---------- flightData2015\ .groupBy("DEST_COUNTRY_NAME")\ .sum("count")\ .withColumnRenamed("sum(count)", "destination_total")\ .sort(desc("destination_total"))\ .limit(5)\ .explain() # COMMAND ----------
[ 6738, 279, 893, 20928, 13, 25410, 1330, 17732, 36044, 198, 198, 2, 9009, 796, 17732, 36044, 13, 38272, 13, 9866, 7203, 12001, 58, 9, 60, 11074, 1136, 5574, 16447, 3419, 198, 198, 2777, 668, 796, 17732, 36044, 13, 38272, 13, 1136, 5574...
2.666667
594
import os import pickle import pytest import pandas as pd from shapely import wkt from intake_postgres import PostgresSource from intake import open_catalog from .util import verify_datasource_interface TEST_DATA_DIR = 'tests' TEST_DATA = [ ('sample1', 'sample1.csv'), ('sample2_1', 'sample2_1.csv'), ('sample2_2', 'sample2_2.csv'), ] TEST_GIS_DATA = [ ('points', 'sample_points.psql'), ('multipoints', 'sample_multipoints.psql'), ('lines', 'sample_lines.psql'), ('multilines', 'sample_multilines.psql'), ('polygons', 'sample_polygons.psql'), ('multipolygons', 'sample_multipolygons.psql'), # ('triangles', 'sample_triangles.psql'), ] TEST_TEMPLATE_DATA = [ 'jinja2_params_with_env', ] def test_catalog_join(engine): catalog_fpath = os.path.join(TEST_DATA_DIR, 'catalog1.yml') catalog = open_catalog(catalog_fpath) ds_name = 'sample2' src = catalog[ds_name] pgsrc = src.get() pgsrc._uri = str(engine.url) assert src.describe()['container'] == 'dataframe' assert src.describe_open()['plugin'] == 'postgres' assert src.describe_open()['args']['sql_expr'][:6] in ('select', 'SELECT') metadata = pgsrc.discover() assert metadata['npartitions'] == 1 expected_df = pd.read_sql_query(pgsrc._sql_expr, engine) df = pgsrc.read() assert expected_df.equals(df) pgsrc.close()
[ 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 12972, 9288, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 5485, 306, 1330, 266, 21841, 198, 198, 6738, 10337, 62, 7353, 34239, 1330, 2947, 34239, 7416, 198, 6738, 10337, 1330, 1280, 6...
2.443662
568
# file = open('C:\\Users\\dks10\\OneDrive\\Desktop\\Projects\\Code\\Python\\PythonCrypto\\Module_3\\eye.png', 'rb') file = open('encrypt_eye.png', 'rb') image = file.read() file.close() image = bytearray(image) key = 48 for index, value in enumerate(image): image[index] = value^key file = open('2eye.png','wb') file.write(image) file.close()
[ 2, 2393, 796, 1280, 10786, 34, 25, 6852, 14490, 6852, 67, 591, 940, 6852, 3198, 24825, 6852, 36881, 6852, 16775, 82, 6852, 10669, 6852, 37906, 6852, 37906, 23919, 78, 6852, 26796, 62, 18, 6852, 25379, 13, 11134, 3256, 705, 26145, 11537,...
2.619403
134
import time import logging from ledfxcontroller.effects import Effect from threading import Thread import voluptuous as vol _LOGGER = logging.getLogger(__name__) DEFAULT_RATE = 1.0 / 60.0
[ 11748, 640, 198, 11748, 18931, 198, 6738, 2957, 21373, 36500, 13, 34435, 1330, 7896, 198, 6738, 4704, 278, 1330, 14122, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 198, 62, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 367...
3.258621
58
n=int(input()) c = 1 while c**2 < n: print(c**2) c += 1
[ 77, 28, 600, 7, 15414, 28955, 198, 66, 796, 352, 198, 4514, 269, 1174, 17, 1279, 299, 25, 198, 220, 220, 3601, 7, 66, 1174, 17, 8, 198, 220, 220, 269, 15853, 352, 198 ]
1.823529
34
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628, 198 ]
3
7
from nltk.tokenize import sent_tokenize, word_tokenize from nltk.corpus import stopwords import speech_recognition as sr import nltk from google_images_download import google_images_download response = google_images_download.googleimagesdownload() r = sr.Recognizer() with sr.Microphone() as source: print("Say something!") audio = r.listen(source) data = r.recognize_google(audio).encode("utf-8") print (data) stopWords = set(stopwords.words('english')) words = word_tokenize(data) wordsFiltered = [] for w in words: if w not in stopWords: wordsFiltered.append(w) into_string = str(wordsFiltered) print(into_string) arguments = {"keywords":into_string,"limit":2,"print_urls":True} #creating list of arguments response.download(arguments) #passing the arguments to the function
[ 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 1908, 62, 30001, 1096, 11, 1573, 62, 30001, 1096, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879, 198, 11748, 4046, 62, 26243, 653, 355, 19677, 198, 11748, 299, 2528, 74, ...
2.967033
273
from dataclasses import dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198 ]
3.777778
9
# Copyright (c) 2009-2021 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause # License. """MPI communicator.""" from hoomd import _hoomd import hoomd import contextlib def barrier(self): """Perform a barrier synchronization across all ranks in the partition. Note: Does nothing in builds with ENABLE_MPI=off. """ if hoomd.version.mpi_enabled: self.cpp_mpi_conf.barrier() # store the "current" communicator to be used for MPI_Abort calls. This defaults # to the world communicator, but users can opt in to a more specific # communicator using the Device.localize_abort context manager _current_communicator = Communicator()
[ 2, 15069, 357, 66, 8, 3717, 12, 1238, 2481, 383, 3310, 658, 286, 262, 2059, 286, 7055, 198, 2, 770, 2393, 318, 636, 286, 262, 40115, 2662, 35, 12, 17585, 1628, 11, 2716, 739, 262, 347, 10305, 513, 12, 2601, 682, 198, 2, 13789, 1...
2.915709
261
from config import DataGeneratorCfg from sklearn.datasets.samples_generator import make_blobs import numpy as np
[ 6738, 4566, 1330, 6060, 8645, 1352, 34, 40616, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 13, 82, 12629, 62, 8612, 1352, 1330, 787, 62, 2436, 8158, 198, 11748, 299, 32152, 355, 45941, 628 ]
3.352941
34
import _ast from peon.src.project.file.function_def.function import FunctionLint
[ 11748, 4808, 459, 198, 198, 6738, 613, 261, 13, 10677, 13, 16302, 13, 7753, 13, 8818, 62, 4299, 13, 8818, 1330, 15553, 43, 600, 628, 628, 628, 198 ]
3.142857
28
############################################################################### # # '''Website Database-connection-related features''' # # # ############################################################################### import cymysql from conf import website_db from time import gmtime from time import strftime db_host = website_db.ip db_port = website_db.port db = website_db.db db_user = website_db.user db_pw = website_db.pw ############################################################################### # # '''Databse-connect and close''' # # # ############################################################################### ############################################################################### # # '''Donation-Page data''' # # # ############################################################################### ############################################################################### # # '''Short-URL data''' # # # ############################################################################### ############################################################################### # # '''Old Worlds''' # # # ############################################################################### ############################################################################### # # '''Server Backup-Size in Dash''' # # # ###############################################################################
[ 29113, 29113, 7804, 4242, 21017, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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.799043
1,463
from minio import Minio import json import os from .Inspector import Inspector from .topic_model import topic_model #def handle(event):
[ 6738, 949, 952, 1330, 1855, 952, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 764, 818, 4443, 273, 1330, 24625, 198, 6738, 764, 26652, 62, 19849, 1330, 7243, 62, 19849, 198, 198, 2, 4299, 5412, 7, 15596, 2599, 198 ]
3.512821
39
""" Proxmox VE exporter for the Prometheus monitoring system. """ import sys from argparse import ArgumentParser from pve_exporter.http import start_http_server def main(args=None): """ Main entry point. """ parser = ArgumentParser() parser.add_argument('config', nargs='?', default='pve.yml', help='Path to configuration file (pve.yml)') parser.add_argument('port', nargs='?', type=int, default='9221', help='Port on which the exporter is listening (9221)') parser.add_argument('address', nargs='?', default='', help='Address to which the exporter will bind') params = parser.parse_args(args if args is None else sys.argv[1:]) start_http_server(params.config, params.port, params.address)
[ 37811, 198, 2964, 87, 76, 1140, 569, 36, 1033, 4337, 329, 262, 42696, 9904, 1080, 13, 198, 37811, 198, 198, 11748, 25064, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 279, 303, 62, 1069, 26634, 13, 4023, 1330, 923, 62, 4023,...
2.573718
312
#SPDX-License-Identifier: MIT import logging, os, sys, time, requests, json from datetime import datetime from multiprocessing import Process, Queue import pandas as pd import sqlalchemy as s from workers.worker_base import Worker # NOTE: This worker primarily inserts rows into the REPO_INFO table, which serves the primary purposes of # 1. Displaying discrete metadata like "number of forks" and how they change over time # 2. Validating other workers, like those related to pull requests, issues, and commits. Our totals should be at or very near the totals in the repo_info table. # This table also updates the REPO table in 2 cases: # 1. Recognizing when a repository is a forked repository by updating the "forked_from" field and # 2. Recognizing when a repository is archived, and recording the data we observed the change in status.
[ 2, 4303, 36227, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 11748, 18931, 11, 28686, 11, 25064, 11, 640, 11, 7007, 11, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 11, 4670, 518, 198, ...
3.944186
215
# coding: utf-8 from __future__ import print_function from __future__ import division from __future__ import absolute_import from __future__ import unicode_literals import argparse
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17...
3.603774
53
from fbs_runtime.application_context.PyQt5 import ApplicationContext, cached_property from fbs_runtime.platform import is_windows, is_mac # system imports import sys # module imports from PyQt5 import uic, QtWidgets from PyQt5.QtWidgets import QMessageBox import numpy as np import matplotlib.pyplot as plt import matplotlib import scipy.constants as constants from scipy.integrate import simps, quad from scipy.interpolate import splrep, splint from scipy.optimize import fmin if is_windows(): matplotlib.use('Qt5Agg') elif is_mac(): matplotlib.use('macosx') #def run(): # win = MainWindow() # QtGui.QApplication.instance().exec_() # return win #run() if __name__ == '__main__': appctxt = AppContext() # 1. Instantiate ApplicationContext exit_code = appctxt.run() sys.exit(exit_code) # 2. Invoke appctxt.app.exec_()
[ 6738, 277, 1443, 62, 43282, 13, 31438, 62, 22866, 13, 20519, 48, 83, 20, 1330, 15678, 21947, 11, 39986, 62, 26745, 198, 6738, 277, 1443, 62, 43282, 13, 24254, 1330, 318, 62, 28457, 11, 318, 62, 20285, 198, 2, 1080, 17944, 198, 11748...
2.75974
308
import io import logging import os import sys from PyQt5 import QtGui, QtCore, QtWidgets from helpus import icon_file_path from helpus import __version__ LOGGER = logging.getLogger('HelpUs') LOGGER.setLevel(logging.DEBUG) def get_qtconsole_object(): if isinstance(sys.stdin, MyBreakPoint): return sys.stdin.console else: return MyBreakPoint.console def setup_breakpoint_hook(parent, method, redirect_streams=False): if not isinstance(sys.stdin, MyBreakPoint): sys.stdin = MyBreakPoint(parent) else: # Restore Streams sys.stdin = sys.__stdin__ sys.stdout = sys.__stdout__ sys.stderr = sys.__stderr__ raise Exception( "Multiple Instances are not allowed. Can be possible, but I'm to lazy to go deep with development." ) if redirect_streams: sys.stdin.redirect_outerr_stream() return __method if __name__ == '__main__': p = QtWidgets.QApplication(sys.argv) LOGGER.error('Ceva') LOGGER.error = setup_breakpoint_hook(None, LOGGER.error, redirect_streams=True) # LOGGER.error = setup_breakpoint_hook(None, LOGGER.error, redirect_streams=True) x = 90 LOGGER.error('Altceva') print(x)
[ 11748, 33245, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 8205, 72, 11, 33734, 14055, 11, 33734, 54, 312, 11407, 198, 6738, 1037, 385, 1330, 7196, 62, 7753, 62, 6978, 198, 67...
2.481928
498
import math def test_01(): schedule = Schedule(100, 10) for batch in schedule: print(batch) print(schedule) if __name__ == "__main__": test_02()
[ 11748, 10688, 628, 198, 4299, 1332, 62, 486, 33529, 198, 220, 220, 220, 7269, 796, 19281, 7, 3064, 11, 838, 8, 198, 220, 220, 220, 329, 15458, 287, 7269, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 43501, 8, 198, 220, 2...
2.328947
76
# -*- coding: utf-8 -*- import asyncio import os import sys root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(root + '/python') import ccxt.async as ccxt # noqa: E402 if __name__ == '__main__': print(asyncio.get_event_loop().run_until_complete(test_gdax()))
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 30351, 952, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 15763, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 69...
2.409091
132
__author__ = 'Rio'
[ 834, 9800, 834, 796, 705, 49, 952, 6, 198 ]
2.111111
9
from abc import ABCMeta, abstractmethod
[ 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 628 ]
4.1
10
from __future__ import absolute_import import os import shutil import locket import string from toolz import memoize from contextlib import contextmanager from .utils import nested_get, flatten # http://stackoverflow.com/questions/295135/turn-a-string-into-a-valid-filename-in-python valid_chars = "-_.() " + string.ascii_letters + string.digits + os.path.sep def escape_filename(fn): """ Escape text so that it is a valid filename >>> escape_filename('Foo!bar?') 'Foobar' """ return ''.join(filter(valid_chars.__contains__, fn)) def token(key): """ >>> token('hello') 'hello' >>> token(('hello', 'world')) # doctest: +SKIP 'hello/world' """ if isinstance(key, str): return key elif isinstance(key, tuple): return os.path.join(*map(token, key)) else: return str(key)
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 300, 5459, 198, 11748, 4731, 198, 6738, 2891, 89, 1330, 16155, 1096, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 764, 26...
2.612121
330
''' model ensemble for cifar10 // input size(32,32) ''' import torch import torchvision import copy import torch.nn as nn from resnetv2 import ResNet50 as resnet50v2
[ 7061, 6, 201, 198, 19849, 34549, 329, 269, 361, 283, 940, 220, 3373, 5128, 2546, 7, 2624, 11, 2624, 8, 201, 198, 7061, 6, 201, 198, 201, 198, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 10178, 201, 198, 201, 198, 11748, 4866, ...
2.466667
75
# -*- coding: utf-8 -*- """ Function that implement Complement the Complementary Cumulative Distribution Function (CCDF). """ # # written by Chengcheng Shao <sccotte@gmail.com> import numpy as np import pandas as pd def ccdf(s): """ Parameters: `s`, series, the values of s should be variable to be handled Return: a new series `s`, index of s will be X axis (number), value of s will be Y axis (probability) """ s = s.copy() s = s.sort_values(ascending=True, inplace=False) s.reset_index(drop=True, inplace=True) n = len(s) s.drop_duplicates(keep='first', inplace=True) X = s.values Y = [n - i for i in s.index] return pd.Series(data=Y, index=X) / n def sum_ccdf(s): """ Parameters: `s`, series, the values of s should be variable to be handled Return: a news series `s`, index of s will be X axis (number), values will be Y axis (sum(X>=x)) """ s = s.copy() s = s.value_counts() s = s.sort_index(ascending=True) cumulative = [] for i in range(len(s)): s1 = s.iloc[i:] cumulative.append(np.inner(s1.index, s1.values)) return pd.Series(cumulative, index=s.index)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 15553, 326, 3494, 955, 26908, 262, 955, 26908, 560, 27843, 13628, 198, 20344, 3890, 15553, 357, 4093, 8068, 737, 198, 37811, 198, 2, 198, 2, 3194, 416, 27692, 239...
2.345489
521
# -*- coding: utf-8 -*- from __future__ import print_function import numpy as np import pandas as pd from lifelines.fitters import UnivariateFitter from lifelines.utils import _preprocess_inputs, _additive_estimate, StatError, inv_normal_cdf,\ median_survival_times from lifelines.plotting import plot_loglogs
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 3868, 20655, 13, 11147, 1010, 13...
3.038462
104
import numpy as np from pydmfet import tools from .fermi import find_efermi, entropy_corr from pyscf import ao2mo, gto, scf, dft, lib from pydmfet.qcwrap import fermi import time from functools import reduce # The following is deprecated! ''' def rhf(mol, OEI, TEI, Norb, Nelec, OneDM0=None ): # Get the RHF solution OEI = 0.5*(OEI.T + OEI) #mol = gto.Mole() #mol.max_memory = 8000 #mol.build( verbose=0 ) #mol.atom.append(('C', (0, 0, 0))) mol.nelectron = Nelec mol.incore_anyway = True mf = pyscf_scf.RHF( mol ) mf.get_hcore = lambda *args: OEI mf.get_ovlp = lambda *args: np.eye( Norb ) mf._eri = ao2mo.restore(8, TEI, Norb) mf.max_cycle = 100 #mf.conv_tol = 1e-8 #adiis = pyscf_scf.diis.ADIIS() #mf.diis = adiis #mf.verbose = 5 mf.kernel(OneDM0) if ( mf.converged == False ): #RDM1 = mf.make_rdm1() #cdiis = pyscf_scf.diis.SCF_DIIS() #mf.diis = cdiis #mf.max_cycle = 200 #mf.kernel(RDM1) if ( mf.converged == False ): raise Exception(" rhf not converged!") return mf def rks(mol, OEI, TEI, Norb, Nelec, xcfunc, OneDM0=None ): # Get the RKS solution OEI = 0.5*(OEI.T + OEI) #mol = gto.Mole() #mol.build( verbose=5 ) #mol.atom.append(('C', (0, 0, 0))) mol.nelectron = Nelec # mol.incore_anyway = True mf = pyscf_scf.RKS( mol ) mf.xc = xcfunc.lower() # mf.get_hcore = lambda *args: OEI # mf.get_ovlp = lambda *args: np.eye( Norb ) # mf._eri = ao2mo.restore(8, TEI, Norb) OneDM0 = None mf.kernel( OneDM0 ) if ( mf.converged == False ): raise Exception(" rks not converged!") return mf def scf(mol, OEI, TEI, Norb, Nelec, OneDM0=None, mf_method = 'HF' ): # Get the mean-field solution if(mf_method.lower() == 'hf'): mf = rhf(mol, OEI, TEI, Norb, Nelec, OneDM0 ) else: mf = rks(mol, OEI, TEI, Norb, Nelec, mf_method ,OneDM0 ) RDM1 = mf.make_rdm1() RDM1 = 0.5*(RDM1.T + RDM1) mo_coeff = mf.mo_coeff mo_energy = mf.mo_energy energy = mf.energy_elec(RDM1)[0] mo = np.zeros([Norb,Norb+1],dtype=float) mo[:,:-1] = mo_coeff mo[:,-1] = mo_energy #print "mo energy" #print mf.mo_energy #tools.MatPrint(mf.get_fock(),"fock") #JK = mf.get_veff(None, dm=RDM1) #tools.MatPrint(JK,"JK") #tools.MatPrint(np.dot(mf.get_fock(), mf.mo_coeff),"test") #tools.MatPrint(mf.mo_coeff,"mo_coeff") return (energy, RDM1, mo) '''
[ 11748, 299, 32152, 355, 45941, 198, 6738, 279, 5173, 76, 34045, 1330, 4899, 198, 6738, 764, 2232, 11632, 1330, 1064, 62, 891, 7780, 72, 11, 40709, 62, 10215, 81, 198, 6738, 279, 893, 12993, 1330, 257, 78, 17, 5908, 11, 308, 1462, 11...
1.9
1,330
#!/usr/bin/env python # # Copyright Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license" file accompanying this file. This file 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. # # Parse the report.html of Fortify and create an ASCII summary import os import sys from subprocess import call from xml.etree import ElementTree # print usage if len(sys.argv) != 2: print "usage summarizy-fortify.py LOGDIR" sys.exit(1) # get directory where the logs are placed logdir=sys.argv[1] # strip this part of the directory information of workdirectory = os.getcwd() + '/' # get the fortify report; first make it valid XML filename=logdir+'/log/report.html' call(['perl', '-p', '-i', '-e', 's#<((img|meta) [^>]+)>#<$1/>#', filename]) # make sure we can run this script multiple times on the same html file call(['perl', '-p', '-i', '-e', 's#//>#/>#', filename]) # parse the html file and jump to the last table data=ElementTree.parse(filename).getroot() table=data.find('.//table')[-1] # iterate over all rows and print their content in a more useable format for data in table.iter('tr'): # handle only the rows that contain results if len(data) != 4: continue # extract file information, convert absolute path into relative one location=data[2].find('a') # header does not have <a ...> if location is None: continue filename=location.get('href') filename=filename.replace('file://','') filename=filename.replace(workdirectory,'') severity=data[3].text if severity is None: severity=data[3].find('span').text # strip newline and space sequences problem=data[0].text.replace('\n','').replace('\r','') short=problem.replace(' ',' ') while len(short) < len(problem): problem=short short=problem.replace(' ',' ') column=ElementTree.tostring(data[2].findall("*")[0]).split(':')[2] printstring = filename + ':' + column.strip() + ', ' + \ severity.strip() + ', ' + \ problem if data[1].text is not None: printstring = printstring + ', ' + data[1].text print printstring
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 220, 15069, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 220, 220, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, ...
3.034398
814
# pylint:disable=line-too-long import logging from ...sim_type import SimTypeFunction, SimTypeShort, SimTypeInt, SimTypeLong, SimTypeLongLong, SimTypeDouble, SimTypeFloat, SimTypePointer, SimTypeChar, SimStruct, SimTypeFixedSizeArray, SimTypeBottom, SimUnion, SimTypeBool from ...calling_conventions import SimCCStdcall, SimCCMicrosoftAMD64 from .. import SIM_PROCEDURES as P from . import SimLibrary _l = logging.getLogger(name=__name__) lib = SimLibrary() lib.set_default_cc('X86', SimCCStdcall) lib.set_default_cc('AMD64', SimCCMicrosoftAMD64) lib.set_library_names("wsmsvc.dll") prototypes = \ { # 'WSManInitialize': SimTypeFunction([SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypePointer(SimStruct({}, name="WSMAN_API", pack=False, align=None), offset=0), offset=0)], SimTypeInt(signed=False, label="UInt32"), arg_names=["flags", "apiHandle"]), # 'WSManDeinitialize': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_API", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=False, label="UInt32"), arg_names=["apiHandle", "flags"]), # 'WSManGetErrorMessage': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_API", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), label="LPArray", offset=0), SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)], SimTypeInt(signed=False, label="UInt32"), arg_names=["apiHandle", "flags", "languageCode", "errorCode", "messageLength", "message", "messageLengthUsed"]), # 'WSManCreateSession': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_API", pack=False, align=None), offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"authenticationMechanism": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"userAccount": SimStruct({"username": SimTypePointer(SimTypeChar(label="Char"), offset=0), "password": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_USERNAME_PASSWORD_CREDS", pack=False, align=None), "certificateThumbprint": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="<anon>", label="None")}, name="WSMAN_AUTHENTICATION_CREDENTIALS", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"accessType": SimTypeInt(signed=False, label="UInt32"), "authenticationCredentials": SimStruct({"authenticationMechanism": SimTypeInt(signed=False, label="UInt32"), "Anonymous": SimUnion({"userAccount": SimStruct({"username": SimTypePointer(SimTypeChar(label="Char"), offset=0), "password": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_USERNAME_PASSWORD_CREDS", pack=False, align=None), "certificateThumbprint": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="<anon>", label="None")}, name="WSMAN_AUTHENTICATION_CREDENTIALS", pack=False, align=None)}, name="WSMAN_PROXY_INFO", pack=False, align=None), offset=0), SimTypePointer(SimTypePointer(SimStruct({}, name="WSMAN_SESSION", pack=False, align=None), offset=0), offset=0)], SimTypeInt(signed=False, label="UInt32"), arg_names=["apiHandle", "connection", "flags", "serverAuthenticationCredentials", "proxyInfo", "session"]), # 'WSManCloseSession': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SESSION", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=False, label="UInt32"), arg_names=["session", "flags"]), # 'WSManSetSessionOption': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SESSION", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="WSManSessionOption"), SimTypePointer(SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), offset=0)], SimTypeInt(signed=False, label="UInt32"), arg_names=["session", "option", "data"]), # 'WSManGetSessionOptionAsDword': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SESSION", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="WSManSessionOption"), SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)], SimTypeInt(signed=False, label="UInt32"), arg_names=["session", "option", "value"]), # 'WSManGetSessionOptionAsString': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SESSION", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="WSManSessionOption"), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), label="LPArray", offset=0), SimTypePointer(SimTypeInt(signed=False, label="UInt32"), offset=0)], SimTypeInt(signed=False, label="UInt32"), arg_names=["session", "option", "stringLength", "string", "stringLengthUsed"]), # 'WSManCloseOperation': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=False, label="UInt32"), arg_names=["operationHandle", "flags"]), # 'WSManCreateShell': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SESSION", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimStruct({"__AnonymousBase_wsman_L665_C48": SimStruct({"inputStreamSet": SimTypePointer(SimStruct({"streamIDsCount": SimTypeInt(signed=False, label="UInt32"), "streamIDs": SimTypePointer(SimTypePointer(SimTypeChar(label="Char"), offset=0), offset=0)}, name="WSMAN_STREAM_ID_SET", pack=False, align=None), offset=0), "outputStreamSet": SimTypePointer(SimStruct({"streamIDsCount": SimTypeInt(signed=False, label="UInt32"), "streamIDs": SimTypePointer(SimTypePointer(SimTypeChar(label="Char"), offset=0), offset=0)}, name="WSMAN_STREAM_ID_SET", pack=False, align=None), offset=0), "idleTimeoutMs": SimTypeInt(signed=False, label="UInt32"), "workingDirectory": SimTypePointer(SimTypeChar(label="Char"), offset=0), "variableSet": SimTypePointer(SimStruct({"varsCount": SimTypeInt(signed=False, label="UInt32"), "vars": SimTypePointer(SimStruct({"name": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ENVIRONMENT_VARIABLE", pack=False, align=None), offset=0)}, name="WSMAN_ENVIRONMENT_VARIABLE_SET", pack=False, align=None), offset=0)}, name="WSMAN_SHELL_STARTUP_INFO_V10", pack=False, align=None), "name": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_SHELL_STARTUP_INFO_V11", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"optionsCount": SimTypeInt(signed=False, label="UInt32"), "options": SimTypePointer(SimStruct({"name": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0), "mustComply": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION", pack=False, align=None), offset=0), "optionsMustUnderstand": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION_SET", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"operationContext": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "completionFunction": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"code": SimTypeInt(signed=False, label="UInt32"), "errorDetail": SimTypePointer(SimTypeChar(label="Char"), offset=0), "language": SimTypePointer(SimTypeChar(label="Char"), offset=0), "machineName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pluginName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ERROR", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypePointer(SimUnion({"receiveData": SimStruct({"streamId": SimTypePointer(SimTypeChar(label="Char"), offset=0), "streamData": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), "commandState": SimTypePointer(SimTypeChar(label="Char"), offset=0), "exitCode": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_RECEIVE_DATA_RESULT", pack=False, align=None), "connectData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CONNECT_DATA", pack=False, align=None), "createData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CREATE_SHELL_DATA", pack=False, align=None)}, name="<anon>", label="None"), offset=0)], SimTypeBottom(label="Void"), arg_names=["operationContext", "flags", "error", "shell", "command", "operationHandle", "data"]), offset=0)}, name="WSMAN_SHELL_ASYNC", pack=False, align=None), offset=0), SimTypePointer(SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), offset=0)], SimTypeBottom(label="Void"), arg_names=["session", "flags", "resourceUri", "startupInfo", "options", "createXml", "async", "shell"]), # 'WSManRunShellCommand': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimStruct({"argsCount": SimTypeInt(signed=False, label="UInt32"), "args": SimTypePointer(SimTypePointer(SimTypeChar(label="Char"), offset=0), offset=0)}, name="WSMAN_COMMAND_ARG_SET", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"optionsCount": SimTypeInt(signed=False, label="UInt32"), "options": SimTypePointer(SimStruct({"name": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0), "mustComply": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION", pack=False, align=None), offset=0), "optionsMustUnderstand": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION_SET", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"operationContext": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "completionFunction": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"code": SimTypeInt(signed=False, label="UInt32"), "errorDetail": SimTypePointer(SimTypeChar(label="Char"), offset=0), "language": SimTypePointer(SimTypeChar(label="Char"), offset=0), "machineName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pluginName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ERROR", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypePointer(SimUnion({"receiveData": SimStruct({"streamId": SimTypePointer(SimTypeChar(label="Char"), offset=0), "streamData": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), "commandState": SimTypePointer(SimTypeChar(label="Char"), offset=0), "exitCode": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_RECEIVE_DATA_RESULT", pack=False, align=None), "connectData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CONNECT_DATA", pack=False, align=None), "createData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CREATE_SHELL_DATA", pack=False, align=None)}, name="<anon>", label="None"), offset=0)], SimTypeBottom(label="Void"), arg_names=["operationContext", "flags", "error", "shell", "command", "operationHandle", "data"]), offset=0)}, name="WSMAN_SHELL_ASYNC", pack=False, align=None), offset=0), SimTypePointer(SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), offset=0)], SimTypeBottom(label="Void"), arg_names=["shell", "flags", "commandLine", "args", "options", "async", "command"]), # 'WSManSignalShell': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimStruct({"operationContext": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "completionFunction": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"code": SimTypeInt(signed=False, label="UInt32"), "errorDetail": SimTypePointer(SimTypeChar(label="Char"), offset=0), "language": SimTypePointer(SimTypeChar(label="Char"), offset=0), "machineName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pluginName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ERROR", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypePointer(SimUnion({"receiveData": SimStruct({"streamId": SimTypePointer(SimTypeChar(label="Char"), offset=0), "streamData": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), "commandState": SimTypePointer(SimTypeChar(label="Char"), offset=0), "exitCode": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_RECEIVE_DATA_RESULT", pack=False, align=None), "connectData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CONNECT_DATA", pack=False, align=None), "createData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CREATE_SHELL_DATA", pack=False, align=None)}, name="<anon>", label="None"), offset=0)], SimTypeBottom(label="Void"), arg_names=["operationContext", "flags", "error", "shell", "command", "operationHandle", "data"]), offset=0)}, name="WSMAN_SHELL_ASYNC", pack=False, align=None), offset=0), SimTypePointer(SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), offset=0)], SimTypeBottom(label="Void"), arg_names=["shell", "command", "flags", "code", "async", "signalOperation"]), # 'WSManReceiveShellOutput': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"streamIDsCount": SimTypeInt(signed=False, label="UInt32"), "streamIDs": SimTypePointer(SimTypePointer(SimTypeChar(label="Char"), offset=0), offset=0)}, name="WSMAN_STREAM_ID_SET", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"operationContext": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "completionFunction": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"code": SimTypeInt(signed=False, label="UInt32"), "errorDetail": SimTypePointer(SimTypeChar(label="Char"), offset=0), "language": SimTypePointer(SimTypeChar(label="Char"), offset=0), "machineName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pluginName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ERROR", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypePointer(SimUnion({"receiveData": SimStruct({"streamId": SimTypePointer(SimTypeChar(label="Char"), offset=0), "streamData": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), "commandState": SimTypePointer(SimTypeChar(label="Char"), offset=0), "exitCode": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_RECEIVE_DATA_RESULT", pack=False, align=None), "connectData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CONNECT_DATA", pack=False, align=None), "createData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CREATE_SHELL_DATA", pack=False, align=None)}, name="<anon>", label="None"), offset=0)], SimTypeBottom(label="Void"), arg_names=["operationContext", "flags", "error", "shell", "command", "operationHandle", "data"]), offset=0)}, name="WSMAN_SHELL_ASYNC", pack=False, align=None), offset=0), SimTypePointer(SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), offset=0)], SimTypeBottom(label="Void"), arg_names=["shell", "command", "flags", "desiredStreamSet", "async", "receiveOperation"]), # 'WSManSendShellInput': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), offset=0), SimTypeInt(signed=True, label="Int32"), SimTypePointer(SimStruct({"operationContext": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "completionFunction": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"code": SimTypeInt(signed=False, label="UInt32"), "errorDetail": SimTypePointer(SimTypeChar(label="Char"), offset=0), "language": SimTypePointer(SimTypeChar(label="Char"), offset=0), "machineName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pluginName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ERROR", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypePointer(SimUnion({"receiveData": SimStruct({"streamId": SimTypePointer(SimTypeChar(label="Char"), offset=0), "streamData": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), "commandState": SimTypePointer(SimTypeChar(label="Char"), offset=0), "exitCode": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_RECEIVE_DATA_RESULT", pack=False, align=None), "connectData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CONNECT_DATA", pack=False, align=None), "createData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CREATE_SHELL_DATA", pack=False, align=None)}, name="<anon>", label="None"), offset=0)], SimTypeBottom(label="Void"), arg_names=["operationContext", "flags", "error", "shell", "command", "operationHandle", "data"]), offset=0)}, name="WSMAN_SHELL_ASYNC", pack=False, align=None), offset=0), SimTypePointer(SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), offset=0)], SimTypeBottom(label="Void"), arg_names=["shell", "command", "flags", "streamId", "streamData", "endOfStream", "async", "sendOperation"]), # 'WSManCloseCommand': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"operationContext": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "completionFunction": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"code": SimTypeInt(signed=False, label="UInt32"), "errorDetail": SimTypePointer(SimTypeChar(label="Char"), offset=0), "language": SimTypePointer(SimTypeChar(label="Char"), offset=0), "machineName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pluginName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ERROR", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypePointer(SimUnion({"receiveData": SimStruct({"streamId": SimTypePointer(SimTypeChar(label="Char"), offset=0), "streamData": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), "commandState": SimTypePointer(SimTypeChar(label="Char"), offset=0), "exitCode": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_RECEIVE_DATA_RESULT", pack=False, align=None), "connectData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CONNECT_DATA", pack=False, align=None), "createData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CREATE_SHELL_DATA", pack=False, align=None)}, name="<anon>", label="None"), offset=0)], SimTypeBottom(label="Void"), arg_names=["operationContext", "flags", "error", "shell", "command", "operationHandle", "data"]), offset=0)}, name="WSMAN_SHELL_ASYNC", pack=False, align=None), offset=0)], SimTypeBottom(label="Void"), arg_names=["commandHandle", "flags", "async"]), # 'WSManCloseShell': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"operationContext": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "completionFunction": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"code": SimTypeInt(signed=False, label="UInt32"), "errorDetail": SimTypePointer(SimTypeChar(label="Char"), offset=0), "language": SimTypePointer(SimTypeChar(label="Char"), offset=0), "machineName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pluginName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ERROR", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypePointer(SimUnion({"receiveData": SimStruct({"streamId": SimTypePointer(SimTypeChar(label="Char"), offset=0), "streamData": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), "commandState": SimTypePointer(SimTypeChar(label="Char"), offset=0), "exitCode": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_RECEIVE_DATA_RESULT", pack=False, align=None), "connectData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CONNECT_DATA", pack=False, align=None), "createData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CREATE_SHELL_DATA", pack=False, align=None)}, name="<anon>", label="None"), offset=0)], SimTypeBottom(label="Void"), arg_names=["operationContext", "flags", "error", "shell", "command", "operationHandle", "data"]), offset=0)}, name="WSMAN_SHELL_ASYNC", pack=False, align=None), offset=0)], SimTypeBottom(label="Void"), arg_names=["shellHandle", "flags", "async"]), # 'WSManCreateShellEx': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SESSION", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimStruct({"__AnonymousBase_wsman_L665_C48": SimStruct({"inputStreamSet": SimTypePointer(SimStruct({"streamIDsCount": SimTypeInt(signed=False, label="UInt32"), "streamIDs": SimTypePointer(SimTypePointer(SimTypeChar(label="Char"), offset=0), offset=0)}, name="WSMAN_STREAM_ID_SET", pack=False, align=None), offset=0), "outputStreamSet": SimTypePointer(SimStruct({"streamIDsCount": SimTypeInt(signed=False, label="UInt32"), "streamIDs": SimTypePointer(SimTypePointer(SimTypeChar(label="Char"), offset=0), offset=0)}, name="WSMAN_STREAM_ID_SET", pack=False, align=None), offset=0), "idleTimeoutMs": SimTypeInt(signed=False, label="UInt32"), "workingDirectory": SimTypePointer(SimTypeChar(label="Char"), offset=0), "variableSet": SimTypePointer(SimStruct({"varsCount": SimTypeInt(signed=False, label="UInt32"), "vars": SimTypePointer(SimStruct({"name": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ENVIRONMENT_VARIABLE", pack=False, align=None), offset=0)}, name="WSMAN_ENVIRONMENT_VARIABLE_SET", pack=False, align=None), offset=0)}, name="WSMAN_SHELL_STARTUP_INFO_V10", pack=False, align=None), "name": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_SHELL_STARTUP_INFO_V11", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"optionsCount": SimTypeInt(signed=False, label="UInt32"), "options": SimTypePointer(SimStruct({"name": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0), "mustComply": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION", pack=False, align=None), offset=0), "optionsMustUnderstand": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION_SET", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"operationContext": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "completionFunction": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"code": SimTypeInt(signed=False, label="UInt32"), "errorDetail": SimTypePointer(SimTypeChar(label="Char"), offset=0), "language": SimTypePointer(SimTypeChar(label="Char"), offset=0), "machineName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pluginName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ERROR", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypePointer(SimUnion({"receiveData": SimStruct({"streamId": SimTypePointer(SimTypeChar(label="Char"), offset=0), "streamData": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), "commandState": SimTypePointer(SimTypeChar(label="Char"), offset=0), "exitCode": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_RECEIVE_DATA_RESULT", pack=False, align=None), "connectData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CONNECT_DATA", pack=False, align=None), "createData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CREATE_SHELL_DATA", pack=False, align=None)}, name="<anon>", label="None"), offset=0)], SimTypeBottom(label="Void"), arg_names=["operationContext", "flags", "error", "shell", "command", "operationHandle", "data"]), offset=0)}, name="WSMAN_SHELL_ASYNC", pack=False, align=None), offset=0), SimTypePointer(SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), offset=0)], SimTypeBottom(label="Void"), arg_names=["session", "flags", "resourceUri", "shellId", "startupInfo", "options", "createXml", "async", "shell"]), # 'WSManRunShellCommandEx': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimStruct({"argsCount": SimTypeInt(signed=False, label="UInt32"), "args": SimTypePointer(SimTypePointer(SimTypeChar(label="Char"), offset=0), offset=0)}, name="WSMAN_COMMAND_ARG_SET", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"optionsCount": SimTypeInt(signed=False, label="UInt32"), "options": SimTypePointer(SimStruct({"name": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0), "mustComply": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION", pack=False, align=None), offset=0), "optionsMustUnderstand": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION_SET", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"operationContext": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "completionFunction": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"code": SimTypeInt(signed=False, label="UInt32"), "errorDetail": SimTypePointer(SimTypeChar(label="Char"), offset=0), "language": SimTypePointer(SimTypeChar(label="Char"), offset=0), "machineName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pluginName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ERROR", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypePointer(SimUnion({"receiveData": SimStruct({"streamId": SimTypePointer(SimTypeChar(label="Char"), offset=0), "streamData": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), "commandState": SimTypePointer(SimTypeChar(label="Char"), offset=0), "exitCode": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_RECEIVE_DATA_RESULT", pack=False, align=None), "connectData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CONNECT_DATA", pack=False, align=None), "createData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CREATE_SHELL_DATA", pack=False, align=None)}, name="<anon>", label="None"), offset=0)], SimTypeBottom(label="Void"), arg_names=["operationContext", "flags", "error", "shell", "command", "operationHandle", "data"]), offset=0)}, name="WSMAN_SHELL_ASYNC", pack=False, align=None), offset=0), SimTypePointer(SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), offset=0)], SimTypeBottom(label="Void"), arg_names=["shell", "flags", "commandId", "commandLine", "args", "options", "async", "command"]), # 'WSManDisconnectShell': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"idleTimeoutMs": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_SHELL_DISCONNECT_INFO", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"operationContext": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "completionFunction": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"code": SimTypeInt(signed=False, label="UInt32"), "errorDetail": SimTypePointer(SimTypeChar(label="Char"), offset=0), "language": SimTypePointer(SimTypeChar(label="Char"), offset=0), "machineName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pluginName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ERROR", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypePointer(SimUnion({"receiveData": SimStruct({"streamId": SimTypePointer(SimTypeChar(label="Char"), offset=0), "streamData": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), "commandState": SimTypePointer(SimTypeChar(label="Char"), offset=0), "exitCode": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_RECEIVE_DATA_RESULT", pack=False, align=None), "connectData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CONNECT_DATA", pack=False, align=None), "createData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CREATE_SHELL_DATA", pack=False, align=None)}, name="<anon>", label="None"), offset=0)], SimTypeBottom(label="Void"), arg_names=["operationContext", "flags", "error", "shell", "command", "operationHandle", "data"]), offset=0)}, name="WSMAN_SHELL_ASYNC", pack=False, align=None), offset=0)], SimTypeBottom(label="Void"), arg_names=["shell", "flags", "disconnectInfo", "async"]), # 'WSManReconnectShell': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"operationContext": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "completionFunction": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"code": SimTypeInt(signed=False, label="UInt32"), "errorDetail": SimTypePointer(SimTypeChar(label="Char"), offset=0), "language": SimTypePointer(SimTypeChar(label="Char"), offset=0), "machineName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pluginName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ERROR", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypePointer(SimUnion({"receiveData": SimStruct({"streamId": SimTypePointer(SimTypeChar(label="Char"), offset=0), "streamData": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), "commandState": SimTypePointer(SimTypeChar(label="Char"), offset=0), "exitCode": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_RECEIVE_DATA_RESULT", pack=False, align=None), "connectData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CONNECT_DATA", pack=False, align=None), "createData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CREATE_SHELL_DATA", pack=False, align=None)}, name="<anon>", label="None"), offset=0)], SimTypeBottom(label="Void"), arg_names=["operationContext", "flags", "error", "shell", "command", "operationHandle", "data"]), offset=0)}, name="WSMAN_SHELL_ASYNC", pack=False, align=None), offset=0)], SimTypeBottom(label="Void"), arg_names=["shell", "flags", "async"]), # 'WSManReconnectShellCommand': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"operationContext": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "completionFunction": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"code": SimTypeInt(signed=False, label="UInt32"), "errorDetail": SimTypePointer(SimTypeChar(label="Char"), offset=0), "language": SimTypePointer(SimTypeChar(label="Char"), offset=0), "machineName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pluginName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ERROR", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypePointer(SimUnion({"receiveData": SimStruct({"streamId": SimTypePointer(SimTypeChar(label="Char"), offset=0), "streamData": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), "commandState": SimTypePointer(SimTypeChar(label="Char"), offset=0), "exitCode": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_RECEIVE_DATA_RESULT", pack=False, align=None), "connectData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CONNECT_DATA", pack=False, align=None), "createData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CREATE_SHELL_DATA", pack=False, align=None)}, name="<anon>", label="None"), offset=0)], SimTypeBottom(label="Void"), arg_names=["operationContext", "flags", "error", "shell", "command", "operationHandle", "data"]), offset=0)}, name="WSMAN_SHELL_ASYNC", pack=False, align=None), offset=0)], SimTypeBottom(label="Void"), arg_names=["commandHandle", "flags", "async"]), # 'WSManConnectShell': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SESSION", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimStruct({"optionsCount": SimTypeInt(signed=False, label="UInt32"), "options": SimTypePointer(SimStruct({"name": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0), "mustComply": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION", pack=False, align=None), offset=0), "optionsMustUnderstand": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION_SET", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"operationContext": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "completionFunction": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"code": SimTypeInt(signed=False, label="UInt32"), "errorDetail": SimTypePointer(SimTypeChar(label="Char"), offset=0), "language": SimTypePointer(SimTypeChar(label="Char"), offset=0), "machineName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pluginName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ERROR", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypePointer(SimUnion({"receiveData": SimStruct({"streamId": SimTypePointer(SimTypeChar(label="Char"), offset=0), "streamData": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), "commandState": SimTypePointer(SimTypeChar(label="Char"), offset=0), "exitCode": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_RECEIVE_DATA_RESULT", pack=False, align=None), "connectData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CONNECT_DATA", pack=False, align=None), "createData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CREATE_SHELL_DATA", pack=False, align=None)}, name="<anon>", label="None"), offset=0)], SimTypeBottom(label="Void"), arg_names=["operationContext", "flags", "error", "shell", "command", "operationHandle", "data"]), offset=0)}, name="WSMAN_SHELL_ASYNC", pack=False, align=None), offset=0), SimTypePointer(SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), offset=0)], SimTypeBottom(label="Void"), arg_names=["session", "flags", "resourceUri", "shellID", "options", "connectXml", "async", "shell"]), # 'WSManConnectShellCommand': SimTypeFunction([SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimStruct({"optionsCount": SimTypeInt(signed=False, label="UInt32"), "options": SimTypePointer(SimStruct({"name": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0), "mustComply": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION", pack=False, align=None), offset=0), "optionsMustUnderstand": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION_SET", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), offset=0), SimTypePointer(SimStruct({"operationContext": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "completionFunction": SimTypePointer(SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"code": SimTypeInt(signed=False, label="UInt32"), "errorDetail": SimTypePointer(SimTypeChar(label="Char"), offset=0), "language": SimTypePointer(SimTypeChar(label="Char"), offset=0), "machineName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "pluginName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_ERROR", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_SHELL", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), SimTypePointer(SimStruct({}, name="WSMAN_OPERATION", pack=False, align=None), offset=0), SimTypePointer(SimUnion({"receiveData": SimStruct({"streamId": SimTypePointer(SimTypeChar(label="Char"), offset=0), "streamData": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), "commandState": SimTypePointer(SimTypeChar(label="Char"), offset=0), "exitCode": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_RECEIVE_DATA_RESULT", pack=False, align=None), "connectData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CONNECT_DATA", pack=False, align=None), "createData": SimStruct({"data": SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None)}, name="WSMAN_CREATE_SHELL_DATA", pack=False, align=None)}, name="<anon>", label="None"), offset=0)], SimTypeBottom(label="Void"), arg_names=["operationContext", "flags", "error", "shell", "command", "operationHandle", "data"]), offset=0)}, name="WSMAN_SHELL_ASYNC", pack=False, align=None), offset=0), SimTypePointer(SimTypePointer(SimStruct({}, name="WSMAN_COMMAND", pack=False, align=None), offset=0), offset=0)], SimTypeBottom(label="Void"), arg_names=["shell", "flags", "commandID", "options", "connectXml", "async", "command"]), # 'WSManPluginReportContext': SimTypeFunction([SimTypePointer(SimStruct({"senderDetails": SimTypePointer(SimStruct({"senderName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "authenticationMechanism": SimTypePointer(SimTypeChar(label="Char"), offset=0), "certificateDetails": SimTypePointer(SimStruct({"subject": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerThumbprint": SimTypePointer(SimTypeChar(label="Char"), offset=0), "subjectName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_CERTIFICATE_DETAILS", pack=False, align=None), offset=0), "clientToken": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "httpURL": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_SENDER_DETAILS", pack=False, align=None), offset=0), "locale": SimTypePointer(SimTypeChar(label="Char"), offset=0), "resourceUri": SimTypePointer(SimTypeChar(label="Char"), offset=0), "operationInfo": SimTypePointer(SimStruct({"fragment": SimStruct({"path": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dialect": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_FRAGMENT", pack=False, align=None), "filter": SimStruct({"filter": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dialect": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_FILTER", pack=False, align=None), "selectorSet": SimStruct({"numberKeys": SimTypeInt(signed=False, label="UInt32"), "keys": SimTypePointer(SimStruct({"key": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_KEY", pack=False, align=None), offset=0)}, name="WSMAN_SELECTOR_SET", pack=False, align=None), "optionSet": SimStruct({"optionsCount": SimTypeInt(signed=False, label="UInt32"), "options": SimTypePointer(SimStruct({"name": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0), "mustComply": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION", pack=False, align=None), offset=0), "optionsMustUnderstand": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION_SET", pack=False, align=None), "reserved": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "version": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_OPERATION_INFO", pack=False, align=None), offset=0), "shutdownNotification": SimTypeInt(signed=True, label="Int32"), "shutdownNotificationHandle": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "dataLocale": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_PLUGIN_REQUEST", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeBottom(label="Void"), offset=0)], SimTypeInt(signed=False, label="UInt32"), arg_names=["requestDetails", "flags", "context"]), # 'WSManPluginReceiveResult': SimTypeFunction([SimTypePointer(SimStruct({"senderDetails": SimTypePointer(SimStruct({"senderName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "authenticationMechanism": SimTypePointer(SimTypeChar(label="Char"), offset=0), "certificateDetails": SimTypePointer(SimStruct({"subject": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerThumbprint": SimTypePointer(SimTypeChar(label="Char"), offset=0), "subjectName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_CERTIFICATE_DETAILS", pack=False, align=None), offset=0), "clientToken": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "httpURL": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_SENDER_DETAILS", pack=False, align=None), offset=0), "locale": SimTypePointer(SimTypeChar(label="Char"), offset=0), "resourceUri": SimTypePointer(SimTypeChar(label="Char"), offset=0), "operationInfo": SimTypePointer(SimStruct({"fragment": SimStruct({"path": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dialect": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_FRAGMENT", pack=False, align=None), "filter": SimStruct({"filter": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dialect": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_FILTER", pack=False, align=None), "selectorSet": SimStruct({"numberKeys": SimTypeInt(signed=False, label="UInt32"), "keys": SimTypePointer(SimStruct({"key": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_KEY", pack=False, align=None), offset=0)}, name="WSMAN_SELECTOR_SET", pack=False, align=None), "optionSet": SimStruct({"optionsCount": SimTypeInt(signed=False, label="UInt32"), "options": SimTypePointer(SimStruct({"name": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0), "mustComply": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION", pack=False, align=None), offset=0), "optionsMustUnderstand": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION_SET", pack=False, align=None), "reserved": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "version": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_OPERATION_INFO", pack=False, align=None), offset=0), "shutdownNotification": SimTypeInt(signed=True, label="Int32"), "shutdownNotificationHandle": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "dataLocale": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_PLUGIN_REQUEST", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypePointer(SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), offset=0), SimTypePointer(SimTypeChar(label="Char"), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=False, label="UInt32"), arg_names=["requestDetails", "flags", "stream", "streamResult", "commandState", "exitCode"]), # 'WSManPluginOperationComplete': SimTypeFunction([SimTypePointer(SimStruct({"senderDetails": SimTypePointer(SimStruct({"senderName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "authenticationMechanism": SimTypePointer(SimTypeChar(label="Char"), offset=0), "certificateDetails": SimTypePointer(SimStruct({"subject": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerThumbprint": SimTypePointer(SimTypeChar(label="Char"), offset=0), "subjectName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_CERTIFICATE_DETAILS", pack=False, align=None), offset=0), "clientToken": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "httpURL": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_SENDER_DETAILS", pack=False, align=None), offset=0), "locale": SimTypePointer(SimTypeChar(label="Char"), offset=0), "resourceUri": SimTypePointer(SimTypeChar(label="Char"), offset=0), "operationInfo": SimTypePointer(SimStruct({"fragment": SimStruct({"path": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dialect": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_FRAGMENT", pack=False, align=None), "filter": SimStruct({"filter": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dialect": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_FILTER", pack=False, align=None), "selectorSet": SimStruct({"numberKeys": SimTypeInt(signed=False, label="UInt32"), "keys": SimTypePointer(SimStruct({"key": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_KEY", pack=False, align=None), offset=0)}, name="WSMAN_SELECTOR_SET", pack=False, align=None), "optionSet": SimStruct({"optionsCount": SimTypeInt(signed=False, label="UInt32"), "options": SimTypePointer(SimStruct({"name": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0), "mustComply": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION", pack=False, align=None), offset=0), "optionsMustUnderstand": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION_SET", pack=False, align=None), "reserved": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "version": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_OPERATION_INFO", pack=False, align=None), offset=0), "shutdownNotification": SimTypeInt(signed=True, label="Int32"), "shutdownNotificationHandle": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "dataLocale": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_PLUGIN_REQUEST", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0)], SimTypeInt(signed=False, label="UInt32"), arg_names=["requestDetails", "flags", "errorCode", "extendedInformation"]), # 'WSManPluginGetOperationParameters': SimTypeFunction([SimTypePointer(SimStruct({"senderDetails": SimTypePointer(SimStruct({"senderName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "authenticationMechanism": SimTypePointer(SimTypeChar(label="Char"), offset=0), "certificateDetails": SimTypePointer(SimStruct({"subject": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerThumbprint": SimTypePointer(SimTypeChar(label="Char"), offset=0), "subjectName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_CERTIFICATE_DETAILS", pack=False, align=None), offset=0), "clientToken": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "httpURL": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_SENDER_DETAILS", pack=False, align=None), offset=0), "locale": SimTypePointer(SimTypeChar(label="Char"), offset=0), "resourceUri": SimTypePointer(SimTypeChar(label="Char"), offset=0), "operationInfo": SimTypePointer(SimStruct({"fragment": SimStruct({"path": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dialect": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_FRAGMENT", pack=False, align=None), "filter": SimStruct({"filter": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dialect": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_FILTER", pack=False, align=None), "selectorSet": SimStruct({"numberKeys": SimTypeInt(signed=False, label="UInt32"), "keys": SimTypePointer(SimStruct({"key": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_KEY", pack=False, align=None), offset=0)}, name="WSMAN_SELECTOR_SET", pack=False, align=None), "optionSet": SimStruct({"optionsCount": SimTypeInt(signed=False, label="UInt32"), "options": SimTypePointer(SimStruct({"name": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0), "mustComply": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION", pack=False, align=None), offset=0), "optionsMustUnderstand": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION_SET", pack=False, align=None), "reserved": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "version": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_OPERATION_INFO", pack=False, align=None), offset=0), "shutdownNotification": SimTypeInt(signed=True, label="Int32"), "shutdownNotificationHandle": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "dataLocale": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_PLUGIN_REQUEST", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), offset=0)], SimTypeInt(signed=False, label="UInt32"), arg_names=["requestDetails", "flags", "data"]), # 'WSManPluginGetConfiguration': SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"type": SimTypeInt(signed=False, label="WSManDataType"), "Anonymous": SimUnion({"text": SimStruct({"bufferLength": SimTypeInt(signed=False, label="UInt32"), "buffer": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_DATA_TEXT", pack=False, align=None), "binaryData": SimStruct({"dataLength": SimTypeInt(signed=False, label="UInt32"), "data": SimTypePointer(SimTypeChar(label="Byte"), offset=0)}, name="WSMAN_DATA_BINARY", pack=False, align=None), "number": SimTypeInt(signed=False, label="UInt32")}, name="<anon>", label="None")}, name="WSMAN_DATA", pack=False, align=None), offset=0)], SimTypeInt(signed=False, label="UInt32"), arg_names=["pluginContext", "flags", "data"]), # 'WSManPluginReportCompletion': SimTypeFunction([SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32")], SimTypeInt(signed=False, label="UInt32"), arg_names=["pluginContext", "flags"]), # 'WSManPluginFreeRequestDetails': SimTypeFunction([SimTypePointer(SimStruct({"senderDetails": SimTypePointer(SimStruct({"senderName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "authenticationMechanism": SimTypePointer(SimTypeChar(label="Char"), offset=0), "certificateDetails": SimTypePointer(SimStruct({"subject": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerThumbprint": SimTypePointer(SimTypeChar(label="Char"), offset=0), "subjectName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_CERTIFICATE_DETAILS", pack=False, align=None), offset=0), "clientToken": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "httpURL": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_SENDER_DETAILS", pack=False, align=None), offset=0), "locale": SimTypePointer(SimTypeChar(label="Char"), offset=0), "resourceUri": SimTypePointer(SimTypeChar(label="Char"), offset=0), "operationInfo": SimTypePointer(SimStruct({"fragment": SimStruct({"path": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dialect": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_FRAGMENT", pack=False, align=None), "filter": SimStruct({"filter": SimTypePointer(SimTypeChar(label="Char"), offset=0), "dialect": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_FILTER", pack=False, align=None), "selectorSet": SimStruct({"numberKeys": SimTypeInt(signed=False, label="UInt32"), "keys": SimTypePointer(SimStruct({"key": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_KEY", pack=False, align=None), offset=0)}, name="WSMAN_SELECTOR_SET", pack=False, align=None), "optionSet": SimStruct({"optionsCount": SimTypeInt(signed=False, label="UInt32"), "options": SimTypePointer(SimStruct({"name": SimTypePointer(SimTypeChar(label="Char"), offset=0), "value": SimTypePointer(SimTypeChar(label="Char"), offset=0), "mustComply": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION", pack=False, align=None), offset=0), "optionsMustUnderstand": SimTypeInt(signed=True, label="Int32")}, name="WSMAN_OPTION_SET", pack=False, align=None), "reserved": SimTypePointer(SimTypeBottom(label="Void"), offset=0), "version": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_OPERATION_INFO", pack=False, align=None), offset=0), "shutdownNotification": SimTypeInt(signed=True, label="Int32"), "shutdownNotificationHandle": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "dataLocale": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_PLUGIN_REQUEST", pack=False, align=None), offset=0)], SimTypeInt(signed=False, label="UInt32"), arg_names=["requestDetails"]), # 'WSManPluginAuthzUserComplete': SimTypeFunction([SimTypePointer(SimStruct({"senderName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "authenticationMechanism": SimTypePointer(SimTypeChar(label="Char"), offset=0), "certificateDetails": SimTypePointer(SimStruct({"subject": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerThumbprint": SimTypePointer(SimTypeChar(label="Char"), offset=0), "subjectName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_CERTIFICATE_DETAILS", pack=False, align=None), offset=0), "clientToken": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "httpURL": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_SENDER_DETAILS", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), SimTypeInt(signed=True, label="Int32"), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0)], SimTypeInt(signed=False, label="UInt32"), arg_names=["senderDetails", "flags", "userAuthorizationContext", "impersonationToken", "userIsAdministrator", "errorCode", "extendedErrorInformation"]), # 'WSManPluginAuthzOperationComplete': SimTypeFunction([SimTypePointer(SimStruct({"senderName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "authenticationMechanism": SimTypePointer(SimTypeChar(label="Char"), offset=0), "certificateDetails": SimTypePointer(SimStruct({"subject": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerThumbprint": SimTypePointer(SimTypeChar(label="Char"), offset=0), "subjectName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_CERTIFICATE_DETAILS", pack=False, align=None), offset=0), "clientToken": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "httpURL": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_SENDER_DETAILS", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeBottom(label="Void"), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0)], SimTypeInt(signed=False, label="UInt32"), arg_names=["senderDetails", "flags", "userAuthorizationContext", "errorCode", "extendedErrorInformation"]), # 'WSManPluginAuthzQueryQuotaComplete': SimTypeFunction([SimTypePointer(SimStruct({"senderName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "authenticationMechanism": SimTypePointer(SimTypeChar(label="Char"), offset=0), "certificateDetails": SimTypePointer(SimStruct({"subject": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerName": SimTypePointer(SimTypeChar(label="Char"), offset=0), "issuerThumbprint": SimTypePointer(SimTypeChar(label="Char"), offset=0), "subjectName": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_CERTIFICATE_DETAILS", pack=False, align=None), offset=0), "clientToken": SimTypePointer(SimTypeInt(signed=True, label="Int"), label="IntPtr", offset=0), "httpURL": SimTypePointer(SimTypeChar(label="Char"), offset=0)}, name="WSMAN_SENDER_DETAILS", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimStruct({"maxAllowedConcurrentShells": SimTypeInt(signed=False, label="UInt32"), "maxAllowedConcurrentOperations": SimTypeInt(signed=False, label="UInt32"), "timeslotSize": SimTypeInt(signed=False, label="UInt32"), "maxAllowedOperationsPerTimeslot": SimTypeInt(signed=False, label="UInt32")}, name="WSMAN_AUTHZ_QUOTA", pack=False, align=None), offset=0), SimTypeInt(signed=False, label="UInt32"), SimTypePointer(SimTypeChar(label="Char"), offset=0)], SimTypeInt(signed=False, label="UInt32"), arg_names=["senderDetails", "flags", "quota", "errorCode", "extendedErrorInformation"]), } lib.set_prototypes(prototypes)
[ 2, 279, 2645, 600, 25, 40223, 28, 1370, 12, 18820, 12, 6511, 198, 11748, 18931, 198, 198, 6738, 2644, 14323, 62, 4906, 1330, 3184, 6030, 22203, 11, 220, 220, 220, 220, 3184, 6030, 16438, 11, 3184, 6030, 5317, 11, 3184, 6030, 14617, ...
3.012982
30,272
"""Define the aiolookin package.""" from .device import async_get_device # noqa
[ 37811, 7469, 500, 262, 257, 1669, 566, 259, 5301, 526, 15931, 198, 6738, 764, 25202, 1330, 30351, 62, 1136, 62, 25202, 220, 1303, 645, 20402, 198 ]
3.115385
26
# -*- coding: utf-8 -*- from .common import loadOde from .common import dGeomID from .common import dSpaceID from .common import dVector3 from ctypes import POINTER from ctypes import CFUNCTYPE from ctypes import c_void_p from ctypes import c_int32 dNearCallback = CFUNCTYPE(None, c_void_p, dGeomID, dGeomID) dQuadTreeSpaceCreate = loadOde('dQuadTreeSpaceCreate', dSpaceID, dSpaceID, dVector3, dVector3, c_int32) dSweepAndPruneSpaceCreate = loadOde('dSweepAndPruneSpaceCreate', dSpaceID, dSpaceID, c_int32) dSpaceDestroy = loadOde('dSpaceDestroy', None, dSpaceID) dHashSpaceSetLevels = loadOde('dHashSpaceSetLevels', None, dSpaceID, c_int32, c_int32) dHashSpaceGetLevels = loadOde('dHashSpaceGetLevels', None, dSpaceID, POINTER(c_int32), POINTER(c_int32)) dSpaceSetCleanup = loadOde('dSpaceSetCleanup', None, dSpaceID, c_int32) dSpaceGetCleanup = loadOde('dSpaceGetCleanup', c_int32, dSpaceID) dSpaceSetSublevel = loadOde('dSpaceSetSublevel', None, dSpaceID, c_int32) dSpaceGetSublevel = loadOde('dSpaceGetSublevel', c_int32, dSpaceID) dSpaceSetManualCleanup = loadOde('dSpaceSetManualCleanup', None, dSpaceID, c_int32) dSpaceGetManualCleanup = loadOde('dSpaceGetManualCleanup', c_int32, dSpaceID) dSpaceAdd = loadOde('dSpaceAdd', None, dSpaceID, dGeomID) dSpaceRemove = loadOde('dSpaceRemove', None, dSpaceID, dGeomID) dSpaceQuery = loadOde('dSpaceQuery', c_int32, dSpaceID, dGeomID) dSpaceClean = loadOde('dSpaceClean', None, dSpaceID) dSpaceGetNumGeoms = loadOde('dSpaceGetNumGeoms', c_int32, dSpaceID) dSpaceGetGeom = loadOde('dSpaceGetGeom', dGeomID, dSpaceID, c_int32) dSpaceGetClass = loadOde('dSpaceGetClass', c_int32, dSpaceID)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 764, 11321, 1330, 3440, 46, 2934, 198, 6738, 764, 11321, 1330, 288, 10082, 296, 2389, 198, 6738, 764, 11321, 1330, 288, 14106, 2389, 198, 6738, 764, 11321, 13...
2.588328
634
#!/usr/bin/python3 # pip3 install websockets import asyncio import websockets import json import datetime import sys # wbsocket event loop # connect to pythd, subscribe to and start publishing on two symbols if __name__ == '__main__': uri='ws://localhost:8910' eloop = asyncio.get_event_loop() try: eloop.run_until_complete( poll( uri ) ) except ConnectionRefusedError: print( f'connection refused uri={uri}' ) sys.exit(1)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2, 7347, 18, 2721, 2639, 11603, 198, 11748, 30351, 952, 198, 11748, 2639, 11603, 198, 11748, 33918, 198, 11748, 4818, 8079, 198, 11748, 25064, 628, 198, 2, 266, 1443, 5459, 1785, 905...
2.883871
155
''' Given an array of intervals, merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input. Input: intervals = [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] and [2,6] overlaps, merge them into [1,6]. ''' if __name__ == '__main__': R = int(input("Enter the number of rows:")) C = int(input("Enter the number of columns:")) interval = [[int(input("Enter the elements: ")) for x in range (C)] for y in range(R)] print("Overlapping interval: ",interval) print("Non-overlapping intervals: ",merge(interval)) """ Time complexity : O(n^2) Space complexity : O(n^2) INPUT:- Enter the number of rows:4 Enter the number of columns:2 Enter the elements: 1 Enter the elements: 3 Enter the elements: 2 Enter the elements: 6 Enter the elements: 8 Enter the elements: 10 Enter the elements: 15 Enter the elements: 18 OUTPUT:- Overlapping interval: [[1, 3], [2, 6], [8, 10], [15, 18]] Non-overlapping intervals: [[1, 6], [8, 10], [15, 18]] """
[ 7061, 6, 198, 15056, 281, 7177, 286, 20016, 11, 20121, 477, 32997, 20016, 11, 220, 198, 392, 1441, 281, 7177, 286, 262, 1729, 12, 2502, 75, 5912, 20016, 326, 3002, 477, 262, 20016, 287, 262, 5128, 13, 198, 198, 20560, 25, 20016, 796...
2.864721
377
"""Unit tests.""" import inspect import json from mock import Mock import os import sys import uuid import pytest # Add the lambda directory to the python library search path lambda_dir = os.path.join( os.path.dirname(inspect.getfile(inspect.currentframe())), '..') sys.path.append(lambda_dir) import lambdautils.utils def test_get_secret_from_env(monkeypatch): """Get a secret from an (encrypted) environment variable.""" key = str(uuid.uuid4()).replace('-', '.') value = str(uuid.uuid4()) monkeypatch.setenv(key.replace('.', '_').upper(), value) secret = lambdautils.utils.get_secret(key) assert secret == value def test_get_setting(monkeypatch): """Should be an alias for get_secret.""" resp = str(uuid.uuid4()) arg = str(uuid.uuid4()) kwarg = str(uuid.uuid4()) get_secret = Mock(return_value=resp) monkeypatch.setattr("lambdautils.state.get_secret", get_secret) resp2 = lambdautils.state.get_setting(arg, kwarg=kwarg) assert resp2 == resp get_secret.assert_called_with(arg, kwarg=kwarg) def test_no_state_table(boto3_resource, monkeypatch): """Test accessing state variable without having a state table.""" monkeypatch.setattr("boto3.resource", boto3_resource) monkeypatch.delenv("HUMILIS_ENVIRONMENT") with pytest.raises(lambdautils.state.StateTableError): lambdautils.utils.set_state("sample_state_key", "sample_state_value") with pytest.raises(lambdautils.state.StateTableError): lambdautils.utils.delete_state("sample_state_key") with pytest.raises(lambdautils.state.StateTableError): lambdautils.utils.get_state("sample_state_key") def test_sentry_monitor_bad_client(boto3_client, raven_client, context, monkeypatch): """Test that sentry_monitor handles raven client errors gracefully.""" monkeypatch.setattr("raven.Client", Mock(side_effect=raise_error)) monkeypatch.setattr("boto3.client", boto3_client) lambda_handler(None, context) raven_client.captureException.assert_not_called() def test_send_to_kinesis_stream(search_events, boto3_client, monkeypatch): """Tests sending events to a Kinesis stream.""" monkeypatch.setattr("boto3.client", boto3_client) lambdautils.utils.send_to_kinesis_stream(search_events, "dummy_stream") boto3_client("kinesis").put_records.call_count == 1 def test_send_to_delivery_stream(search_events, boto3_client, monkeypatch): """Tests sending events to a Firehose delivery stream.""" monkeypatch.setattr("boto3.client", boto3_client) lambdautils.utils.send_to_delivery_stream(search_events, "dummy_stream") boto3_client("firehose").put_record_batch.call_count == 1
[ 37811, 26453, 5254, 526, 15931, 198, 198, 11748, 10104, 198, 11748, 33918, 198, 6738, 15290, 1330, 44123, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 334, 27112, 198, 198, 11748, 12972, 9288, 198, 198, 2, 3060, 262, 37456, 8619, 284...
2.642166
1,034
import os from testr.packages import make_regress_files regress_files = ['starcheck.txt', 'starcheck/pcad_att_check.txt'] clean = {'starcheck.txt': [(r'\s*Run on.*[\n\r]*', ''), (os.environ['SKA'], '')], 'starcheck/pcad_att_check.txt': [(os.environ['SKA'], '')]} make_regress_files(regress_files, clean=clean)
[ 11748, 28686, 198, 6738, 1332, 81, 13, 43789, 1330, 787, 62, 2301, 601, 62, 16624, 198, 198, 2301, 601, 62, 16624, 796, 37250, 7364, 9122, 13, 14116, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.010989
182
""" WSGI config for testsite project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` setting. Usually you will have the standard Django WSGI application here, but it also might make sense to replace the whole Django WSGI application with a custom one that later delegates to the Django one. For example, you could introduce WSGI middleware here, or combine a Django application with an application of another framework. """ import os, signal #pylint: disable=invalid-name if os.getenv('DJANGO_COVERAGE'): import atexit, sys import coverage cov = coverage.coverage(data_file=os.path.join(os.getenv('DJANGO_COVERAGE'), ".coverage.%d" % os.getpid())) cov.start() atexit.register(save_coverage) try: signal.signal(signal.SIGTERM, save_coverage) except ValueError as e: # trapping signals does not work with manage # trying to do so fails with # ValueError: signal only works in main thread pass os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testsite.settings") # This application object is used by any WSGI server configured to use this # file. This includes Django's development server, if the WSGI_APPLICATION # setting points here. from django.core.wsgi import get_wsgi_application #pylint: disable=invalid-name application = get_wsgi_application()
[ 37811, 198, 19416, 18878, 4566, 329, 5254, 578, 1628, 13, 198, 198, 1212, 8265, 4909, 262, 25290, 18878, 3586, 973, 416, 37770, 338, 2478, 4382, 198, 392, 597, 3227, 25290, 18878, 40854, 13, 632, 815, 15651, 257, 8265, 12, 5715, 7885, ...
3.248447
483
#!/usr/bin/env python3 -u # -* encoding: utf-8 *- import argparse import asyncore import json import logging import signal import sys import os from types import FrameType from typing import Tuple, Sequence, Any, Union, Optional, List, Dict from concurrent.futures import ThreadPoolExecutor as Pool import daemon from django.db.utils import OperationalError import authserver from maildaemons.utils import SMTPWrapper, PatchedSMTPChannel, SaneSMTPServer _log = logging.getLogger(__name__) pool = Pool() if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 532, 84, 198, 2, 532, 9, 21004, 25, 3384, 69, 12, 23, 1635, 12, 198, 198, 11748, 1822, 29572, 198, 11748, 355, 2047, 7295, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 6737, 198,...
3.147727
176
import requests from bs4 import BeautifulSoup, element
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 11, 5002, 628 ]
4
14
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from product_details import settings_defaults def settings_fallback(key): """Grab user-defined settings, or fall back to default.""" try: return getattr(settings, key) except (AttributeError, ImportError, ImproperlyConfigured): return getattr(settings_defaults, key)
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 12205, 525, 306, 16934, 1522, 198, 198, 6738, 1720, 62, 36604, 1330, 6460, 62, 12286, 82, 628, 198, 4299, 6460, 62, 7207, 1891, 7, 25...
3.206612
121
# CPU: 0.06 s possessed, found, condition = map(int, input().split()) possessed += found count = 0 while possessed >= condition: div, mod = divmod(possessed, condition) count += div possessed = div + mod print(count)
[ 2, 9135, 25, 657, 13, 3312, 264, 198, 79, 793, 6676, 11, 1043, 11, 4006, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 79, 793, 6676, 15853, 1043, 198, 9127, 796, 657, 198, 4514, 17273, 18189, 4006, 25, 198, 220, 220, 220...
2.898734
79
""" Copyright 2017-2018 yhenon (https://github.com/yhenon/) Copyright 2017-2018 Fizyr (https://fizyr.com) 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 generators.common import Generator import cv2 import numpy as np from PIL import Image from six import raise_from import csv import sys import os.path as osp from collections import OrderedDict import os def _parse(value, function, fmt): """ Parse a string into a value, and format a nice ValueError if it fails. Returns `function(value)`. Any `ValueError` raised is catched and a new `ValueError` is raised with message `fmt.format(e)`, where `e` is the caught `ValueError`. """ try: return function(value) except ValueError as e: raise_from(ValueError(fmt.format(e)), None) def _read_classes(csv_reader): """ Parse the classes file given by csv_reader. """ result = OrderedDict() for line, row in enumerate(csv_reader): line += 1 try: class_name, class_id = row except ValueError: raise_from(ValueError('line {}: format should be \'class_name,class_id\''.format(line)), None) class_id = _parse(class_id, int, 'line {}: malformed class ID: {{}}'.format(line)) if class_name in result: raise ValueError('line {}: duplicate class name: \'{}\''.format(line, class_name)) result[class_name] = class_id return result def _read_quadrangle_annotations(csv_reader, classes, detect_text=False): """ Read annotations from the csv_reader. Args: csv_reader: csv reader of args.annotations_path classes: list[str] all the class names read from args.classes_path Returns: result: dict, dict is like {image_path: [{'x1': x1, 'y1': y1, 'x2': x2, 'y2': y2, 'x3': x3, 'y3': y3, 'x4': x4, 'y4': y4, 'class': class_name}]} """ result = OrderedDict() for line, row in enumerate(csv_reader, 1): try: img_file, x1, y1, x2, y2, x3, y3, x4, y4, class_name = row[:10] if img_file not in result: result[img_file] = [] # If a row contains only an image path, it's an image without annotations. if (x1, y1, x2, y2, x3, y3, x4, y4, class_name) == ('', '', '', '', '', '', '', '', ''): continue x1 = _parse(x1, int, 'line {}: malformed x1: {{}}'.format(line)) y1 = _parse(y1, int, 'line {}: malformed y1: {{}}'.format(line)) x2 = _parse(x2, int, 'line {}: malformed x2: {{}}'.format(line)) y2 = _parse(y2, int, 'line {}: malformed y2: {{}}'.format(line)) x3 = _parse(x3, int, 'line {}: malformed x3: {{}}'.format(line)) y3 = _parse(y3, int, 'line {}: malformed y3: {{}}'.format(line)) x4 = _parse(x4, int, 'line {}: malformed x4: {{}}'.format(line)) y4 = _parse(y4, int, 'line {}: malformed y4: {{}}'.format(line)) # check if the current class name is correctly present if detect_text: if class_name == '###': continue else: class_name = 'text' if class_name not in classes: raise ValueError(f'line {line}: unknown class name: \'{class_name}\' (classes: {classes})') result[img_file].append({'x1': x1, 'y1': y1, 'x2': x2, 'y2': y2, 'x3': x3, 'y3': y3, 'x4': x4, 'y4': y4, 'class': class_name}) except ValueError: raise_from(ValueError( f'line {line}: format should be \'img_file,x1,y1,x2,y2,x3,y3,x4,y4,class_name\' or \'img_file,,,,,\''), None) return result def _read_annotations(csv_reader, classes, base_dir): """ Read annotations from the csv_reader. Args: csv_reader: csv reader of args.annotations_path classes: list[str] all the class names read from args.classes_path Returns: result: dict, dict is like {image_path: [{'x1': x1, 'y1': y1, 'x2': x2, 'y2': y2, 'class': class_name}]} """ result = OrderedDict() for line, row in enumerate(csv_reader, 1): try: img_file, x1, y1, x2, y2 = row[:5] class_name = img_file.split("/")[0] if img_file not in result: result[img_file] = [] # If a row contains only an image path, it's an image without annotations. if (x1, y1, x2, y2, class_name) == ('', '', '', '', ''): continue x1 = _parse(x1, int, 'line {}: malformed x1: {{}}'.format(line)) y1 = _parse(y1, int, 'line {}: malformed y1: {{}}'.format(line)) x2 = _parse(x2, int, 'line {}: malformed x2: {{}}'.format(line)) y2 = _parse(y2, int, 'line {}: malformed y2: {{}}'.format(line)) if class_name not in classes: raise ValueError(f'line {line}: unknown class name: \'{class_name}\' (classes: {classes})') result[img_file].append({'x1': x1, 'y1': y1, 'x2': x2, 'y2': y2, 'class': class_name, 'filename':img_file}) except ValueError: raise_from(ValueError( f'line {line}: format should be \'img_file,x1,y1,x2,y2,class_name\' or \'img_file,,,,,\''), None) return result def _open_for_csv(path): """ Open a file with flags suitable for csv.reader. This is different for python2 it means with mode 'rb', for python3 this means 'r' with "universal newlines". """ if sys.version_info[0] < 3: return open(path, 'rb') else: return open(path, 'r', newline='') def load_image(path): """ Load an image at the image_index. """ image = cv2.imread(path) image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) return image
[ 37811, 198, 15269, 2177, 12, 7908, 331, 831, 261, 357, 5450, 1378, 12567, 13, 785, 14, 88, 831, 261, 34729, 198, 15269, 2177, 12, 7908, 376, 528, 2417, 357, 5450, 1378, 69, 528, 2417, 13, 785, 8, 198, 198, 26656, 15385, 739, 262, ...
2.199519
2,912
from . import events # noqa from django.core.wsgi import get_wsgi_application import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hoover.site.settings") application = get_wsgi_application()
[ 6738, 764, 1330, 2995, 220, 1303, 645, 20402, 198, 6738, 42625, 14208, 13, 7295, 13, 18504, 12397, 1330, 651, 62, 18504, 12397, 62, 31438, 198, 11748, 28686, 198, 418, 13, 268, 2268, 13, 2617, 12286, 7203, 35028, 1565, 11230, 62, 28480,...
2.941176
68
#!/usr/bin/env python #Copyright (C) 2013 by Glenn Hickey # #Released under the MIT license, see LICENSE.txt #!/usr/bin/env python """This is a two-state continuous time markov model: 0: unconstratined. 1: constrained. There are two transition rates to go between states. lossRate: 1->0 and gainRate: 0->1. Probability Matrix and Stationary Distribution are computed from the two rates and a time t. (see pdf) """ import argparse import os import sys import copy import random import math from collections import defaultdict import numpy as np import subprocess import tempfile #constrained is always 1. unconstrained is always 0 # compute probability matrix from rates and time. # compute stationary distribution from rates and time # compute the absolute difference between the values of the # probability matrix and stationary distribution computed from a given # rate, and a set of absolute values of the same. This is a sum of four # differences, 2 for the distribution, 4 for the matrix. # compute the sum of squared differences for a pair of rate parameters # and a set of data points. Each data point is a 3 tuple: # (1x2 stationary distribution pi, 2x2 probability matrix P, time t) # use really simple gradient descent type approach to find rate values that # minimize the squared difference with some data points. Each data point # is a 3-tuple as described above. The gradient descent iteratres over # maxIt iterations. Each iteration it tries to add and subtract delta from # the current best rates (4 combinations: add delta to gain, add delta to loss, # subtract delta from gain, subtract delta from loss). The best pair # of rate parameters are returned, along with their square difference from # the data. # add some noise to parameters # generate some random "estimated" parameters for values of t # within a given range. random noise is added as specifed by maxNoise if __name__ == "__main__": sys.exit(main())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15269, 357, 34, 8, 2211, 416, 17551, 367, 40389, 198, 2, 198, 2, 45037, 739, 262, 17168, 5964, 11, 766, 38559, 24290, 13, 14116, 198, 2, 48443, 14629, 14, 8800, 14, 24330, ...
3.893069
505
from django.test import TestCase from .validators import validate_budget_period from .models import Budget, Expense, Payment from django.contrib.auth.models import User from django.core.exceptions import ValidationError
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 764, 12102, 2024, 1330, 26571, 62, 37315, 62, 41007, 198, 6738, 764, 27530, 1330, 15401, 11, 5518, 1072, 11, 28784, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530...
3.779661
59
# Generated by Django 3.2.3 on 2021-06-13 19:58 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 18, 319, 33448, 12, 3312, 12, 1485, 678, 25, 3365, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import re from spack.package import *
[ 2, 15069, 2211, 12, 1238, 1828, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, ...
3.414286
70
print(18 * 1234) print(18 * 1234 * 2) print(0 * 1) print(1 * 0) print(0.0 * 1.0) print(1.0 * 0.0)
[ 4798, 7, 1507, 1635, 1105, 2682, 8, 198, 4798, 7, 1507, 1635, 1105, 2682, 1635, 362, 8, 198, 4798, 7, 15, 1635, 352, 8, 198, 4798, 7, 16, 1635, 657, 8, 198, 4798, 7, 15, 13, 15, 1635, 352, 13, 15, 8, 198, 4798, 7, 16, 13, ...
1.814815
54
num = int(input()) d1 = (num % 10 ** 4) // 10 ** 3 d2 = (num % 10 ** 3) // 10 ** 2 d3 = (num % 10 ** 2) // 10 d4 = num % 10 print(" ", d1) print(" ", d2) print(" ", d3) print(" ", d4) # print("Python", , "is the best") _quit = 1 print(_quit * 2)
[ 22510, 796, 493, 7, 15414, 28955, 198, 67, 16, 796, 357, 22510, 4064, 838, 12429, 604, 8, 3373, 838, 12429, 513, 198, 67, 17, 796, 357, 22510, 4064, 838, 12429, 513, 8, 3373, 838, 12429, 362, 198, 67, 18, 796, 357, 22510, 4064, 83...
2.132231
121
import csv from os import listdir from os.path import isfile, join from osgeo import ogr from multiprocessing import Pool driver = ogr.GetDriverByName('GeoJSON') countryFile = driver.Open("../data/external/countries.json") layer = countryFile.GetLayer() def getCountry(lat, lng): """ Checks given gps-incoming coordinates for country. Output is either country shape index or None """ point = ogr.Geometry(ogr.wkbPoint) point.AddPoint(lng, lat) for i in range(layer.GetFeatureCount()): country = layer.GetFeature(i) if country.geometry().Contains(point): return Country(country).iso # nothing found return None def process_chunk(file): with open(file, 'r') as read_obj, open(f"{file}_done.csv", 'w') as write_obj: # pass the file object to reader() to get the reader object csv_reader = csv.reader(read_obj) csv_writer = csv.writer(write_obj) # Iterate over each row in the csv using reader object count=0 for row in csv_reader: # row variable is a list that represents a row in csv if row[2] and row[3]: country = getCountry(float(row[2]), float(row[3])) row.append(country) csv_writer.writerow(row) count+=1 if count%100==0: print(f"File {file} progress: {count}/100000") print(f"Processing {file} terminated") allfiles = [join("q1a_latlon_split", f) for f in listdir("q1a_latlon_split") if isfile(join("q1a_latlon_split", f))] with Pool(32) as p: p.map(process_chunk, allfiles)
[ 11748, 269, 21370, 198, 6738, 28686, 1330, 1351, 15908, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4654, 198, 198, 6738, 28686, 469, 78, 1330, 267, 2164, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 198, 198, 26230, 796, 267, 2...
2.337625
699
import cv2 import numpy as np def process_core(image): ''' Returns an inverted preprocessed binary image, with noise reduction achieved with greyscaling, Gaussian Blur, Otsu's Threshold, and an open morph. ''' #apply greyscaling, Gaussian Blur, and Otsu's Threshold greyscale = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) blur = cv2.GaussianBlur(greyscale, (3, 3), 0) threshold = cv2.threshold(blur, 0, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)[1] #apply an open morph to invert image to remove noise kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (3, 3)) invert = 255 - cv2.morphologyEx(threshold, cv2.MORPH_OPEN, kernel, iterations=1) return invert #Transform the perspective to render as if looking down on paper (top-down view) #Process the grid based on expected clean binary image input
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 1429, 62, 7295, 7, 9060, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 16409, 281, 37204, 662, 14681, 276, 13934, 2939, 11, 351, 7838, 198, 220, 220,...
2.507163
349
# Copyright (c) Facebook, Inc. and its affiliates. """ Tasks come above datasets in hierarchy level. In case you want to implement a new task, you need to inherit ``BaseTask`` class. You need to implement ``_get_available_datasets`` and ``_preprocess_item`` functions to complete the implementation. You can check the source to see if you need to override any other methods like ``prepare_batch``. Check example of ``VQATask`` here_. Example:: from pythia.tasks.base_task import BaseTask from pythia.common.registry import registry @registry.register_task("my") class MyTask(BaseTask): def __init__(self): super().__init__("my") def _get_available_datasets(self): return ["my"] def _preprocess_item(self): item.text = None return item .. _here: https://github.com/facebookresearch/pythia/blob/v0.3/pythia/tasks/vqa/vqa_task.py """ import sys import numpy as np from torch.utils.data import Dataset from pythia.common.registry import registry
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 37811, 198, 51, 6791, 1282, 2029, 40522, 287, 18911, 1241, 13, 554, 1339, 345, 765, 284, 198, 320, 26908, 257, 649, 4876, 11, 345, 761, 284, 16955, 7559, 14881, 2...
2.763926
377
from numba import jit import numpy as np
[ 6738, 997, 7012, 1330, 474, 270, 198, 11748, 299, 32152, 355, 45941 ]
3.333333
12
# vim:ts=4:sts=4:sw=4:expandtab from token import token_container from satori.core.export.type_helpers import DefineException AccessDenied = DefineException('AccessDenied', 'You don\'t have rights to call this procedure') def init(): global Privilege from satori.core.models import Privilege
[ 2, 43907, 25, 912, 28, 19, 25, 6448, 28, 19, 25, 2032, 28, 19, 25, 11201, 392, 8658, 198, 6738, 11241, 1330, 11241, 62, 34924, 198, 6738, 264, 1352, 72, 13, 7295, 13, 39344, 13, 4906, 62, 16794, 364, 1330, 2896, 500, 16922, 198, ...
3.089109
101